diff --git a/.apigentools-info b/.apigentools-info index 987d3074c1f..3b4fdfe919b 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-02-23 20:26:18.102104", - "spec_repo_commit": "437dad25" + "regenerated": "2023-02-28 08:02:11.936889", + "spec_repo_commit": "91508715" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-02-23 20:26:18.114733", - "spec_repo_commit": "437dad25" + "regenerated": "2023-02-28 08:02:11.949082", + "spec_repo_commit": "91508715" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e349e1bc7ef..dc5d91460de 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -211,6 +211,13 @@ components: items: $ref: '#/components/schemas/IncidentRelatedObject' type: array + IncidentIntegrationMetadataIDPathParameter: + description: The UUID of the incident integration metadata. + in: path + name: integration_metadata_id + required: true + schema: + type: string IncidentSearchIncludeQueryParameter: description: Specifies which types of related objects should be included in the response. @@ -4347,6 +4354,167 @@ components: - TEXTARRAY - METRICTAG - AUTOCOMPLETE + IncidentIntegrationMetadataAttributes: + description: Incident integration metadata's attributes for a create request. + properties: + incident_id: + description: UUID of the incident this integration metadata is connected + to. + example: 00000000-aaaa-0000-0000-000000000000 + type: string + integration_type: + description: 'A number indicating the type of integration this metadata + is for. 1 indicates Slack; + + 8 indicates Jira.' + example: 1 + format: int32 + maximum: 9 + type: integer + metadata: + $ref: '#/components/schemas/IncidentIntegrationMetadataMetadata' + status: + description: 'A number indicating the status of this integration metadata. + 0 indicates unknown; + + 1 indicates pending; 2 indicates complete; 3 indicates manually created; + + 4 indicates manually updated; 5 indicates failed.' + format: int32 + maximum: 5 + type: integer + required: + - integration_type + - metadata + type: object + IncidentIntegrationMetadataCreateData: + description: Incident integration metadata data for a create request. + properties: + attributes: + $ref: '#/components/schemas/IncidentIntegrationMetadataAttributes' + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - type + - attributes + type: object + IncidentIntegrationMetadataCreateRequest: + description: Create request for an incident integration metadata. + properties: + data: + $ref: '#/components/schemas/IncidentIntegrationMetadataCreateData' + required: + - data + type: object + IncidentIntegrationMetadataListResponse: + description: Response with a list of incident integration metadata. + properties: + data: + description: An array of incident integration metadata. + items: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseMeta' + required: + - data + type: object + IncidentIntegrationMetadataMetadata: + description: Incident integration metadata's metadata attribute. + oneOf: + - $ref: '#/components/schemas/SlackIntegrationMetadata' + - $ref: '#/components/schemas/JiraIntegrationMetadata' + type: object + IncidentIntegrationMetadataPatchData: + description: Incident integration metadata data for a patch request. + properties: + attributes: + $ref: '#/components/schemas/IncidentIntegrationMetadataAttributes' + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - type + - attributes + type: object + IncidentIntegrationMetadataPatchRequest: + description: Patch request for an incident integration metadata. + properties: + data: + $ref: '#/components/schemas/IncidentIntegrationMetadataPatchData' + required: + - data + type: object + IncidentIntegrationMetadataResponse: + description: Response with an incident integration metadata. + properties: + data: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseData' + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseMeta' + required: + - data + type: object + IncidentIntegrationMetadataResponseData: + description: Incident integration metadata from a response. + properties: + attributes: + $ref: '#/components/schemas/IncidentIntegrationMetadataAttributes' + id: + description: The incident integration metadata's ID. + example: 00000000-0000-0000-1234-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - id + - type + type: object + IncidentIntegrationMetadataResponseIncludedItem: + description: An object related to an incident integration metadata that is included + in the response. + oneOf: + - $ref: '#/components/schemas/User' + type: object + IncidentIntegrationMetadataResponseMeta: + description: The metadata object containing pagination metadata. + properties: + pagination: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseMetaPagination' + readOnly: true + type: object + IncidentIntegrationMetadataResponseMetaPagination: + description: Pagination properties. + properties: + next_offset: + description: 'The index of the first element in the next page of results. + + Equal to page size added to the current offset.' + example: 1000 + format: int64 + type: integer + offset: + description: The index of the first element in the results. + example: 10 + format: int64 + type: integer + size: + description: Maximum size of pages to return. + example: 1000 + format: int64 + type: integer + type: object IncidentIntegrationMetadataType: default: incident_integrations description: Integration metadata resource type. @@ -5201,7 +5369,7 @@ components: attributes: $ref: '#/components/schemas/IncidentUpdateAttributes' id: - description: The team's ID. + description: The incident's ID. example: 00000000-0000-0000-4567-000000000000 type: string relationships: @@ -5348,6 +5516,45 @@ components: type: string type: array type: object + JiraIntegrationMetadata: + description: Incident integration metadata for the Slack integration. + properties: + issues: + description: Array of Jira issues in this integration metadata. + example: [] + items: + $ref: '#/components/schemas/JiraIntegrationMetadataIssuesItem' + type: array + required: + - issues + type: object + JiraIntegrationMetadataIssuesItem: + description: Item in the Jira integration metadata issue array. + properties: + account: + description: URL of issue's Jira account. + example: https://example.atlassian.net + type: string + issue_key: + description: Jira issue's issue key. + example: PROJ-123 + type: string + issuetype_id: + description: Jira issue's issue type. + example: '1000' + type: string + project_key: + description: Jira issue's project keys. + example: PROJ + type: string + redirect_url: + description: URL redirecting to the Jira issue. + example: https://example.atlassian.net/browse/PROJ-123 + type: string + required: + - project_key + - account + type: object ListApplicationKeysResponse: description: Response for a list of application keys. properties: @@ -8965,7 +9172,7 @@ components: type: incident_integrations properties: data: - description: The integration metadata relationship array + description: Integration metadata relationship array example: - id: 00000000-abcd-0003-0000-000000000000 type: incident_integrations @@ -12129,6 +12336,42 @@ components: $ref: '#/components/schemas/ServiceDefinitionData' type: array type: object + SlackIntegrationMetadata: + description: Incident integration metadata for the Slack integration. + properties: + channels: + description: Array of Slack channels in this integration metadata. + example: [] + items: + $ref: '#/components/schemas/SlackIntegrationMetadataChannelItem' + type: array + required: + - channels + type: object + SlackIntegrationMetadataChannelItem: + description: Item in the Slack integration metadata channel array. + properties: + channel_id: + description: Slack channel ID. + example: C0123456789 + type: string + channel_name: + description: Name of the Slack channel. + example: '#example-channel-name' + type: string + redirect_url: + description: URL redirecting to the Slack channel. + example: https://slack.com/app_redirect?channel=C0123456789&team=T01234567 + type: string + team_id: + description: Slack team ID. + example: T01234567 + type: string + required: + - channel_id + - channel_name + - redirect_url + type: object TagsEventAttribute: description: Array of tags associated with your event. example: @@ -14475,6 +14718,189 @@ paths: x-unstable: '**Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/relationships/integrations: + get: + description: Get all integration metadata for an incident. + operationId: ListIncidentIntegrations + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of an incident's integration metadata + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create an incident integration metadata. + operationId: CreateIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataCreateRequest' + description: Incident integration metadata payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident integration metadata + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}: + delete: + description: Delete an incident integration metadata. + operationId: DeleteIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIntegrationMetadataIDPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident integration metadata + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get incident integration metadata details. + operationId: GetIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIntegrationMetadataIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident integration metadata details + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Update an existing incident integration metadata. + operationId: UpdateIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIntegrationMetadataIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataPatchRequest' + description: Incident integration metadata payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an existing incident integration metadata + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/integration/opsgenie/services: get: description: Get a list of all services from the Datadog Opsgenie integration. diff --git a/examples/v1/authentication/Validate.java b/examples/v1/authentication/Validate.java index 3a89a4d5955..9bafaddba28 100644 --- a/examples/v1/authentication/Validate.java +++ b/examples/v1/authentication/Validate.java @@ -1,9 +1,15 @@ // Validate API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AuthenticationApi; import com.datadog.api.client.v1.model.AuthenticationValidationResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/CreateAWSAccount.java b/examples/v1/aws-integration/CreateAWSAccount.java index d23463665e5..08eb616a64f 100644 --- a/examples/v1/aws-integration/CreateAWSAccount.java +++ b/examples/v1/aws-integration/CreateAWSAccount.java @@ -1,12 +1,15 @@ // Create an AWS integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; -import com.datadog.api.client.v1.model.AWSAccount; import com.datadog.api.client.v1.model.AWSAccountCreateResponse; +import com.datadog.api.client.v1.model.AWSAccount; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -14,18 +17,16 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); - AWSAccount body = - new AWSAccount() - .accountId("1234567") - .accountSpecificNamespaceRules( - Map.ofEntries(Map.entry("auto_scaling", false), Map.entry("opswork", false))) - .cspmResourceCollectionEnabled(true) - .excludedRegions(Arrays.asList("us-east-1", "us-west-2")) - .filterTags(Collections.singletonList("$KEY:$VALUE")) - .hostTags(Collections.singletonList("$KEY:$VALUE")) - .metricsCollectionEnabled(false) - .resourceCollectionEnabled(true) - .roleName("DatadogAWSIntegrationRole"); + AWSAccount body = new AWSAccount() +.accountId("1234567") +.accountSpecificNamespaceRules(Map.ofEntries(Map.entry("auto_scaling", false),Map.entry("opswork", false))) +.cspmResourceCollectionEnabled(true) +.excludedRegions(Arrays.asList("us-east-1", "us-west-2")) +.filterTags(Collections.singletonList("$KEY:$VALUE")) +.hostTags(Collections.singletonList("$KEY:$VALUE")) +.metricsCollectionEnabled(false) +.resourceCollectionEnabled(true) +.roleName("DatadogAWSIntegrationRole"); try { AWSAccountCreateResponse result = apiInstance.createAWSAccount(body); @@ -38,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/CreateAWSTagFilter.java b/examples/v1/aws-integration/CreateAWSTagFilter.java index 3a76d14d9d6..c81cca64ee2 100644 --- a/examples/v1/aws-integration/CreateAWSTagFilter.java +++ b/examples/v1/aws-integration/CreateAWSTagFilter.java @@ -1,21 +1,26 @@ // Set an AWS tag filter returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; import com.datadog.api.client.v1.model.AWSNamespace; import com.datadog.api.client.v1.model.AWSTagFilterCreateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); - AWSTagFilterCreateRequest body = - new AWSTagFilterCreateRequest() - .accountId("1234567") - .namespace(AWSNamespace.ELB) - .tagFilterStr("prod*"); + AWSTagFilterCreateRequest body = new AWSTagFilterCreateRequest() +.accountId("1234567") +.namespace(AWSNamespace.ELB) +.tagFilterStr("prod*"); try { apiInstance.createAWSTagFilter(body); @@ -27,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/CreateNewAWSExternalID.java b/examples/v1/aws-integration/CreateNewAWSExternalID.java index f89249d38a0..b52ede3e984 100644 --- a/examples/v1/aws-integration/CreateNewAWSExternalID.java +++ b/examples/v1/aws-integration/CreateNewAWSExternalID.java @@ -1,12 +1,15 @@ // Generate a new external ID returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; -import com.datadog.api.client.v1.model.AWSAccount; import com.datadog.api.client.v1.model.AWSAccountCreateResponse; +import com.datadog.api.client.v1.model.AWSAccount; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -14,18 +17,16 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); - AWSAccount body = - new AWSAccount() - .accountId("1234567") - .accountSpecificNamespaceRules( - Map.ofEntries(Map.entry("auto_scaling", false), Map.entry("opswork", false))) - .cspmResourceCollectionEnabled(true) - .excludedRegions(Arrays.asList("us-east-1", "us-west-2")) - .filterTags(Collections.singletonList("$KEY:$VALUE")) - .hostTags(Collections.singletonList("$KEY:$VALUE")) - .metricsCollectionEnabled(false) - .resourceCollectionEnabled(true) - .roleName("DatadogAWSIntegrationRole"); + AWSAccount body = new AWSAccount() +.accountId("1234567") +.accountSpecificNamespaceRules(Map.ofEntries(Map.entry("auto_scaling", false),Map.entry("opswork", false))) +.cspmResourceCollectionEnabled(true) +.excludedRegions(Arrays.asList("us-east-1", "us-west-2")) +.filterTags(Collections.singletonList("$KEY:$VALUE")) +.hostTags(Collections.singletonList("$KEY:$VALUE")) +.metricsCollectionEnabled(false) +.resourceCollectionEnabled(true) +.roleName("DatadogAWSIntegrationRole"); try { AWSAccountCreateResponse result = apiInstance.createNewAWSExternalID(body); @@ -38,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/DeleteAWSAccount.java b/examples/v1/aws-integration/DeleteAWSAccount.java index 178906b67f9..94991f8ee64 100644 --- a/examples/v1/aws-integration/DeleteAWSAccount.java +++ b/examples/v1/aws-integration/DeleteAWSAccount.java @@ -1,17 +1,24 @@ // Delete an AWS integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; import com.datadog.api.client.v1.model.AWSAccountDeleteRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); - AWSAccountDeleteRequest body = - new AWSAccountDeleteRequest().accountId("1234567").roleName("DatadogAWSIntegrationRole"); + AWSAccountDeleteRequest body = new AWSAccountDeleteRequest() +.accountId("1234567") +.roleName("DatadogAWSIntegrationRole"); try { apiInstance.deleteAWSAccount(body); @@ -23,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/DeleteAWSTagFilter.java b/examples/v1/aws-integration/DeleteAWSTagFilter.java index dacd590c77c..082fff09853 100644 --- a/examples/v1/aws-integration/DeleteAWSTagFilter.java +++ b/examples/v1/aws-integration/DeleteAWSTagFilter.java @@ -1,20 +1,25 @@ // Delete a tag filtering entry returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; import com.datadog.api.client.v1.model.AWSNamespace; import com.datadog.api.client.v1.model.AWSTagFilterDeleteRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); - AWSTagFilterDeleteRequest body = - new AWSTagFilterDeleteRequest() - .accountId("FAKEAC0FAKEAC2FAKEAC") - .namespace(AWSNamespace.ELB); + AWSTagFilterDeleteRequest body = new AWSTagFilterDeleteRequest() +.accountId("FAKEAC0FAKEAC2FAKEAC") +.namespace(AWSNamespace.ELB); try { apiInstance.deleteAWSTagFilter(body); @@ -26,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/ListAWSAccounts.java b/examples/v1/aws-integration/ListAWSAccounts.java index 35ebac955b4..2f841ee6e31 100644 --- a/examples/v1/aws-integration/ListAWSAccounts.java +++ b/examples/v1/aws-integration/ListAWSAccounts.java @@ -1,9 +1,15 @@ // List all AWS integrations returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; import com.datadog.api.client.v1.model.AWSAccountListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/ListAWSTagFilters.java b/examples/v1/aws-integration/ListAWSTagFilters.java index 1d9eff13e91..4e84e518884 100644 --- a/examples/v1/aws-integration/ListAWSTagFilters.java +++ b/examples/v1/aws-integration/ListAWSTagFilters.java @@ -1,9 +1,15 @@ // Get all AWS tag filters returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; import com.datadog.api.client.v1.model.AWSTagFilterListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/ListAvailableAWSNamespaces.java b/examples/v1/aws-integration/ListAvailableAWSNamespaces.java index 85061e6c6b8..3ca3817cb18 100644 --- a/examples/v1/aws-integration/ListAvailableAWSNamespaces.java +++ b/examples/v1/aws-integration/ListAvailableAWSNamespaces.java @@ -1,9 +1,14 @@ // List namespace rules returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +26,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-integration/UpdateAWSAccount.java b/examples/v1/aws-integration/UpdateAWSAccount.java index 7b683701e0e..f7130b4b174 100644 --- a/examples/v1/aws-integration/UpdateAWSAccount.java +++ b/examples/v1/aws-integration/UpdateAWSAccount.java @@ -1,12 +1,15 @@ // Update an AWS integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsIntegrationApi; import com.datadog.api.client.v1.api.AwsIntegrationApi.UpdateAWSAccountOptionalParameters; import com.datadog.api.client.v1.model.AWSAccount; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -14,24 +17,19 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); - AWSAccount body = - new AWSAccount() - .accountId("123456789012") - .accountSpecificNamespaceRules(Map.ofEntries(Map.entry("auto_scaling", false))) - .cspmResourceCollectionEnabled(true) - .excludedRegions(Arrays.asList("us-east-1", "us-west-2")) - .filterTags(Collections.singletonList("$KEY:$VALUE")) - .hostTags(Collections.singletonList("$KEY:$VALUE")) - .metricsCollectionEnabled(false) - .resourceCollectionEnabled(true) - .roleName("datadog-role"); + AWSAccount body = new AWSAccount() +.accountId("123456789012") +.accountSpecificNamespaceRules(Map.ofEntries(Map.entry("auto_scaling", false))) +.cspmResourceCollectionEnabled(true) +.excludedRegions(Arrays.asList("us-east-1", "us-west-2")) +.filterTags(Collections.singletonList("$KEY:$VALUE")) +.hostTags(Collections.singletonList("$KEY:$VALUE")) +.metricsCollectionEnabled(false) +.resourceCollectionEnabled(true) +.roleName("datadog-role"); try { - apiInstance.updateAWSAccount( - body, - new UpdateAWSAccountOptionalParameters() - .accountId("123456789012") - .roleName("datadog-role")); + apiInstance.updateAWSAccount(body,new UpdateAWSAccountOptionalParameters().accountId("123456789012").roleName("datadog-role")); } catch (ApiException e) { System.err.println("Exception when calling AwsIntegrationApi#updateAWSAccount"); System.err.println("Status code: " + e.getCode()); @@ -40,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.java b/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.java index 48c6feac8c1..7714c6c0d5b 100644 --- a/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.java +++ b/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.java @@ -1,20 +1,25 @@ // Check that an AWS Lambda Function exists returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; -import com.datadog.api.client.v1.model.AWSAccountAndLambdaRequest; import com.datadog.api.client.v1.model.AWSLogsAsyncResponse; +import com.datadog.api.client.v1.model.AWSAccountAndLambdaRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsLogsIntegrationApi apiInstance = new AwsLogsIntegrationApi(defaultClient); - AWSAccountAndLambdaRequest body = - new AWSAccountAndLambdaRequest() - .accountId("1234567") - .lambdaArn("arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"); + AWSAccountAndLambdaRequest body = new AWSAccountAndLambdaRequest() +.accountId("1234567") +.lambdaArn("arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"); try { AWSLogsAsyncResponse result = apiInstance.checkAWSLogsLambdaAsync(body); @@ -27,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.java b/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.java index 63a595a0530..c73a0599183 100644 --- a/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.java +++ b/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.java @@ -1,21 +1,25 @@ // Check permissions for log services returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; import com.datadog.api.client.v1.model.AWSLogsAsyncResponse; import com.datadog.api.client.v1.model.AWSLogsServicesRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsLogsIntegrationApi apiInstance = new AwsLogsIntegrationApi(defaultClient); - AWSLogsServicesRequest body = - new AWSLogsServicesRequest() - .accountId("1234567") - .services(Arrays.asList("s3", "elb", "elbv2", "cloudfront", "redshift", "lambda")); + AWSLogsServicesRequest body = new AWSLogsServicesRequest() +.accountId("1234567") +.services(Arrays.asList("s3", "elb", "elbv2", "cloudfront", "redshift", "lambda")); try { AWSLogsAsyncResponse result = apiInstance.checkAWSLogsServicesAsync(body); @@ -28,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/CreateAWSLambdaARN.java b/examples/v1/aws-logs-integration/CreateAWSLambdaARN.java index f9a9ea3a082..244618797bb 100644 --- a/examples/v1/aws-logs-integration/CreateAWSLambdaARN.java +++ b/examples/v1/aws-logs-integration/CreateAWSLambdaARN.java @@ -1,19 +1,24 @@ // Add AWS Log Lambda ARN returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; import com.datadog.api.client.v1.model.AWSAccountAndLambdaRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsLogsIntegrationApi apiInstance = new AwsLogsIntegrationApi(defaultClient); - AWSAccountAndLambdaRequest body = - new AWSAccountAndLambdaRequest() - .accountId("1234567") - .lambdaArn("arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"); + AWSAccountAndLambdaRequest body = new AWSAccountAndLambdaRequest() +.accountId("1234567") +.lambdaArn("arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"); try { apiInstance.createAWSLambdaARN(body); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.java b/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.java index 15b3d2accb7..bf7957f3271 100644 --- a/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.java +++ b/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.java @@ -1,19 +1,24 @@ // Delete an AWS Logs integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; import com.datadog.api.client.v1.model.AWSAccountAndLambdaRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsLogsIntegrationApi apiInstance = new AwsLogsIntegrationApi(defaultClient); - AWSAccountAndLambdaRequest body = - new AWSAccountAndLambdaRequest() - .accountId("1234567") - .lambdaArn("arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"); + AWSAccountAndLambdaRequest body = new AWSAccountAndLambdaRequest() +.accountId("1234567") +.lambdaArn("arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"); try { apiInstance.deleteAWSLambdaARN(body); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/EnableAWSLogServices.java b/examples/v1/aws-logs-integration/EnableAWSLogServices.java index f9bb181a2a2..5965dd719ae 100644 --- a/examples/v1/aws-logs-integration/EnableAWSLogServices.java +++ b/examples/v1/aws-logs-integration/EnableAWSLogServices.java @@ -1,20 +1,24 @@ // Enable an AWS Logs integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; import com.datadog.api.client.v1.model.AWSLogsServicesRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AwsLogsIntegrationApi apiInstance = new AwsLogsIntegrationApi(defaultClient); - AWSLogsServicesRequest body = - new AWSLogsServicesRequest() - .accountId("1234567") - .services(Arrays.asList("s3", "elb", "elbv2", "cloudfront", "redshift", "lambda")); + AWSLogsServicesRequest body = new AWSLogsServicesRequest() +.accountId("1234567") +.services(Arrays.asList("s3", "elb", "elbv2", "cloudfront", "redshift", "lambda")); try { apiInstance.enableAWSLogServices(body); @@ -26,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.java b/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.java index 2fc69c84df5..9d756d5ae5a 100644 --- a/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.java +++ b/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.java @@ -1,10 +1,15 @@ // List all AWS Logs integrations returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; import com.datadog.api.client.v1.model.AWSLogsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/aws-logs-integration/ListAWSLogsServices.java b/examples/v1/aws-logs-integration/ListAWSLogsServices.java index 45615290b7f..84a6c915317 100644 --- a/examples/v1/aws-logs-integration/ListAWSLogsServices.java +++ b/examples/v1/aws-logs-integration/ListAWSLogsServices.java @@ -1,10 +1,15 @@ // Get list of AWS log ready services returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AwsLogsIntegrationApi; import com.datadog.api.client.v1.model.AWSLogsListServicesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/azure-integration/CreateAzureIntegration.java b/examples/v1/azure-integration/CreateAzureIntegration.java index ea131e8680d..cf19b2d4ace 100644 --- a/examples/v1/azure-integration/CreateAzureIntegration.java +++ b/examples/v1/azure-integration/CreateAzureIntegration.java @@ -1,26 +1,30 @@ // Create an Azure integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient); - AzureAccount body = - new AzureAccount() - .automute(true) - .clientId("testc7f6-1234-5678-9101-3fcbf464test") - .clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .newClientId("new1c7f6-1234-5678-9101-3fcbf464test") - .newTenantName("new1c44-1234-5678-9101-cc00736ftest") - .tenantName("testc44-1234-5678-9101-cc00736ftest"); + AzureAccount body = new AzureAccount() +.automute(true) +.clientId("testc7f6-1234-5678-9101-3fcbf464test") +.clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.newClientId("new1c7f6-1234-5678-9101-3fcbf464test") +.newTenantName("new1c44-1234-5678-9101-cc00736ftest") +.tenantName("testc44-1234-5678-9101-cc00736ftest"); try { apiInstance.createAzureIntegration(body); @@ -32,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/azure-integration/DeleteAzureIntegration.java b/examples/v1/azure-integration/DeleteAzureIntegration.java index fad12a8cbcb..42efbce0b56 100644 --- a/examples/v1/azure-integration/DeleteAzureIntegration.java +++ b/examples/v1/azure-integration/DeleteAzureIntegration.java @@ -1,26 +1,30 @@ // Delete an Azure integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient); - AzureAccount body = - new AzureAccount() - .automute(true) - .clientId("testc7f6-1234-5678-9101-3fcbf464test") - .clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .newClientId("new1c7f6-1234-5678-9101-3fcbf464test") - .newTenantName("new1c44-1234-5678-9101-cc00736ftest") - .tenantName("testc44-1234-5678-9101-cc00736ftest"); + AzureAccount body = new AzureAccount() +.automute(true) +.clientId("testc7f6-1234-5678-9101-3fcbf464test") +.clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.newClientId("new1c7f6-1234-5678-9101-3fcbf464test") +.newTenantName("new1c44-1234-5678-9101-cc00736ftest") +.tenantName("testc44-1234-5678-9101-cc00736ftest"); try { apiInstance.deleteAzureIntegration(body); @@ -32,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/azure-integration/ListAzureIntegration.java b/examples/v1/azure-integration/ListAzureIntegration.java index 83a363e7567..b9f9298c15a 100644 --- a/examples/v1/azure-integration/ListAzureIntegration.java +++ b/examples/v1/azure-integration/ListAzureIntegration.java @@ -1,10 +1,15 @@ // List all Azure integrations returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.java b/examples/v1/azure-integration/UpdateAzureHostFilters.java index 15491f52f3d..64ab1981f12 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.java +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.java @@ -1,26 +1,30 @@ // Update Azure integration host filters returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient); - AzureAccount body = - new AzureAccount() - .automute(true) - .clientId("testc7f6-1234-5678-9101-3fcbf464test") - .clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .newClientId("new1c7f6-1234-5678-9101-3fcbf464test") - .newTenantName("new1c44-1234-5678-9101-cc00736ftest") - .tenantName("testc44-1234-5678-9101-cc00736ftest"); + AzureAccount body = new AzureAccount() +.automute(true) +.clientId("testc7f6-1234-5678-9101-3fcbf464test") +.clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.newClientId("new1c7f6-1234-5678-9101-3fcbf464test") +.newTenantName("new1c44-1234-5678-9101-cc00736ftest") +.tenantName("testc44-1234-5678-9101-cc00736ftest"); try { apiInstance.updateAzureHostFilters(body); @@ -32,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.java b/examples/v1/azure-integration/UpdateAzureIntegration.java index ba70c03a044..47e615a75f2 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.java +++ b/examples/v1/azure-integration/UpdateAzureIntegration.java @@ -1,26 +1,30 @@ // Update an Azure integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.AzureIntegrationApi; import com.datadog.api.client.v1.model.AzureAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient); - AzureAccount body = - new AzureAccount() - .automute(true) - .clientId("testc7f6-1234-5678-9101-3fcbf464test") - .clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .newClientId("new1c7f6-1234-5678-9101-3fcbf464test") - .newTenantName("new1c44-1234-5678-9101-cc00736ftest") - .tenantName("testc44-1234-5678-9101-cc00736ftest"); + AzureAccount body = new AzureAccount() +.automute(true) +.clientId("testc7f6-1234-5678-9101-3fcbf464test") +.clientSecret("testingx./Sw*g/Y33t..R1cH+hScMDt") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.newClientId("new1c7f6-1234-5678-9101-3fcbf464test") +.newTenantName("new1c44-1234-5678-9101-cc00736ftest") +.tenantName("testc44-1234-5678-9101-cc00736ftest"); try { apiInstance.updateAzureIntegration(body); @@ -32,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboard-lists/CreateDashboardList.java b/examples/v1/dashboard-lists/CreateDashboardList.java index 8b608a2e251..350eb0d250e 100644 --- a/examples/v1/dashboard-lists/CreateDashboardList.java +++ b/examples/v1/dashboard-lists/CreateDashboardList.java @@ -1,17 +1,24 @@ // Create a dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardListsApi; import com.datadog.api.client.v1.model.DashboardList; +import com.datadog.api.client.v1.model.DashboardList; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardListsApi apiInstance = new DashboardListsApi(defaultClient); - DashboardList body = - new DashboardList().name("Example-Create_a_dashboard_list_returns_OK_response"); + DashboardList body = new DashboardList() +.name("Example-Create_a_dashboard_list_returns_OK_response"); try { DashboardList result = apiInstance.createDashboardList(body); @@ -24,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboard-lists/DeleteDashboardList.java b/examples/v1/dashboard-lists/DeleteDashboardList.java index b91208fe71a..c0b7bf7e628 100644 --- a/examples/v1/dashboard-lists/DeleteDashboardList.java +++ b/examples/v1/dashboard-lists/DeleteDashboardList.java @@ -1,9 +1,15 @@ // Delete a dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardListsApi; import com.datadog.api.client.v1.model.DashboardListDeleteResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboard-lists/GetDashboardList.java b/examples/v1/dashboard-lists/GetDashboardList.java index b6051e4056e..d4a29d1d2a0 100644 --- a/examples/v1/dashboard-lists/GetDashboardList.java +++ b/examples/v1/dashboard-lists/GetDashboardList.java @@ -1,9 +1,15 @@ // Get a dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardListsApi; import com.datadog.api.client.v1.model.DashboardList; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboard-lists/ListDashboardLists.java b/examples/v1/dashboard-lists/ListDashboardLists.java index 872cbc28b31..3bc720c65d4 100644 --- a/examples/v1/dashboard-lists/ListDashboardLists.java +++ b/examples/v1/dashboard-lists/ListDashboardLists.java @@ -1,9 +1,15 @@ // Get all dashboard lists returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardListsApi; import com.datadog.api.client.v1.model.DashboardListListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboard-lists/UpdateDashboardList.java b/examples/v1/dashboard-lists/UpdateDashboardList.java index 3480e8e5c67..9aeeaa95fca 100644 --- a/examples/v1/dashboard-lists/UpdateDashboardList.java +++ b/examples/v1/dashboard-lists/UpdateDashboardList.java @@ -1,9 +1,16 @@ // Update a dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardListsApi; import com.datadog.api.client.v1.model.DashboardList; +import com.datadog.api.client.v1.model.DashboardList; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,8 +20,8 @@ public static void main(String[] args) { // there is a valid "dashboard_list" in the system Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID")); - DashboardList body = - new DashboardList().name("updated Example-Update_a_dashboard_list_returns_OK_response"); + DashboardList body = new DashboardList() +.name("updated Example-Update_a_dashboard_list_returns_OK_response"); try { DashboardList result = apiInstance.updateDashboardList(DASHBOARD_LIST_ID, body); @@ -27,4 +34,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard.java b/examples/v1/dashboards/CreateDashboard.java index e69b8946ac1..6428aef3976 100644 --- a/examples/v1/dashboards/CreateDashboard.java +++ b/examples/v1/dashboards/CreateDashboard.java @@ -1,9 +1,10 @@ // Create a new dashboard returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.LogQueryDefinition; import com.datadog.api.client.v1.model.LogQueryDefinitionGroupBy; @@ -16,49 +17,39 @@ import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title("Example-Create_a_new_dashboard_returns_OK_response with Profile Metrics Query") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TimeseriesWidgetDefinition() - .type(TimeseriesWidgetDefinitionType.TIMESERIES) - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .profileMetricsQuery( - new LogQueryDefinition() - .compute( - new LogsQueryCompute() - .aggregation("sum") - .facet("@prof_core_cpu_cores")) - .search( - new LogQueryDefinitionSearch() - .query("runtime:jvm")) - .groupBy( - Collections.singletonList( - new LogQueryDefinitionGroupBy() - .facet("service") - .limit(10L) - .sort( - new LogQueryDefinitionGroupBySort() - .aggregation("sum") - .order( - WidgetSort - .DESCENDING) - .facet( - "@prof_core_cpu_cores"))))))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_returns_OK_response with Profile Metrics Query") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TimeseriesWidgetDefinition() +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.profileMetricsQuery(new LogQueryDefinition() +.compute(new LogsQueryCompute() +.aggregation("sum") +.facet("@prof_core_cpu_cores")) +.search(new LogQueryDefinitionSearch() +.query("runtime:jvm")) +.groupBy(Collections.singletonList(new LogQueryDefinitionGroupBy() +.facet("service") +.limit(10L) +.sort(new LogQueryDefinitionGroupBySort() +.aggregation("sum") +.order(WidgetSort.DESCENDING) +.facet("@prof_core_cpu_cores"))))))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -71,4 +62,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1024858348.java b/examples/v1/dashboards/CreateDashboard_1024858348.java index d1d03d4a57e..d8c950c9150 100644 --- a/examples/v1/dashboards/CreateDashboard_1024858348.java +++ b/examples/v1/dashboards/CreateDashboard_1024858348.java @@ -1,9 +1,10 @@ // Create a new dashboard with a formulas and functions treemap widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinition; @@ -19,55 +20,45 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetFormula; import com.datadog.api.client.v1.model.WidgetLayout; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TreeMapWidgetDefinition() - .title("") - .type(TreeMapWidgetDefinitionType.TREEMAP) - .requests( - Collections.singletonList( - new TreeMapWidgetRequest() - .formulas( - Arrays.asList( - new WidgetFormula() - .formula("hour_before(query1)"), - new WidgetFormula().formula("query1"))) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionEventQueryDefinition() - .dataSource( - FormulaAndFunctionEventsDataSource - .LOGS) - .name("query1") - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes( - Collections.singletonList("*")) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT))))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TreeMapWidgetDefinition() +.title("") +.type(TreeMapWidgetDefinitionType.TREEMAP) +.requests(Collections.singletonList(new TreeMapWidgetRequest() +.formulas(Arrays.asList(new WidgetFormula() +.formula("hour_before(query1)"), new WidgetFormula() +.formula("query1"))) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionEventQueryDefinition() +.dataSource(FormulaAndFunctionEventsDataSource.LOGS) +.name("query1") +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(FormulaAndFunctionEventAggregation.COUNT))))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(4L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -80,4 +71,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1039800684.java b/examples/v1/dashboards/CreateDashboard_1039800684.java index ccfcfb1c647..f7fb5660446 100644 --- a/examples/v1/dashboards/CreateDashboard_1039800684.java +++ b/examples/v1/dashboards/CreateDashboard_1039800684.java @@ -1,9 +1,10 @@ // Create a new dashboard with logs_pattern_stream list_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -16,45 +17,35 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget with" - + " list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource( - ListStreamSource.LOGS_PATTERN_STREAM) - .queryString("") - .groupBy( - Collections.singletonList( - new ListStreamGroupByItems() - .facet("service")))) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.LOGS_PATTERN_STREAM) +.queryString("") +.groupBy(Collections.singletonList(new ListStreamGroupByItems() +.facet("service")))) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -67,4 +58,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_109450134.java b/examples/v1/dashboards/CreateDashboard_109450134.java index a8e61bb3f62..b4a9d3769c0 100644 --- a/examples/v1/dashboards/CreateDashboard_109450134.java +++ b/examples/v1/dashboards/CreateDashboard_109450134.java @@ -1,9 +1,10 @@ // Create a new dashboard with slo list widget with sort -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.SLOListWidgetDefinition; import com.datadog.api.client.v1.model.SLOListWidgetDefinitionType; @@ -16,43 +17,42 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetSort; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_slo_list_widget_with_sort") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(60L).height(21L)) - .definition( - new WidgetDefinition( - new SLOListWidgetDefinition() - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(SLOListWidgetDefinitionType.SLO_LIST) - .requests( - Collections.singletonList( - new SLOListWidgetRequest() - .query( - new SLOListWidgetQuery() - .queryString("env:prod AND service:my-app") - .limit(75L) - .sort( - Collections.singletonList( - new WidgetFieldSort() - .column("status.sli") - .order(WidgetSort.ASCENDING)))) - .requestType( - SLOListWidgetRequestType.SLO_LIST))))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_slo_list_widget_with_sort") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(60L) +.height(21L)) +.definition(new WidgetDefinition( +new SLOListWidgetDefinition() +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(SLOListWidgetDefinitionType.SLO_LIST) +.requests(Collections.singletonList(new SLOListWidgetRequest() +.query(new SLOListWidgetQuery() +.queryString("env:prod AND service:my-app") +.limit(75L) +.sort(Collections.singletonList(new WidgetFieldSort() +.column("status.sli") +.order(WidgetSort.ASCENDING)))) +.requestType(SLOListWidgetRequestType.SLO_LIST))))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -65,4 +65,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1094917386.java b/examples/v1/dashboards/CreateDashboard_1094917386.java index 6a3e5f37609..bb0707e2c38 100644 --- a/examples/v1/dashboards/CreateDashboard_1094917386.java +++ b/examples/v1/dashboards/CreateDashboard_1094917386.java @@ -1,9 +1,10 @@ // Create a new dashboard with manage_status widget and show_priority parameter -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.MonitorSummaryWidgetDefinition; import com.datadog.api.client.v1.model.MonitorSummaryWidgetDefinitionType; @@ -14,39 +15,42 @@ import com.datadog.api.client.v1.model.WidgetMonitorSummaryDisplayFormat; import com.datadog.api.client.v1.model.WidgetMonitorSummarySort; import com.datadog.api.client.v1.model.WidgetSummaryType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title( - "Example-Create_a_new_dashboard_with_manage_status_widget_and_show_priority_parameter") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(50L).height(25L)) - .definition( - new WidgetDefinition( - new MonitorSummaryWidgetDefinition() - .type(MonitorSummaryWidgetDefinitionType.MANAGE_STATUS) - .summaryType(WidgetSummaryType.MONITORS) - .displayFormat( - WidgetMonitorSummaryDisplayFormat.COUNTS_AND_LIST) - .colorPreference(WidgetColorPreference.TEXT) - .hideZeroCounts(true) - .showLastTriggered(false) - .query("") - .sort(WidgetMonitorSummarySort.PRIORITY_ASCENDING) - .count(50L) - .start(0L) - .showPriority(false))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_manage_status_widget_and_show_priority_parameter") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(50L) +.height(25L)) +.definition(new WidgetDefinition( +new MonitorSummaryWidgetDefinition() +.type(MonitorSummaryWidgetDefinitionType.MANAGE_STATUS) +.summaryType(WidgetSummaryType.MONITORS) +.displayFormat(WidgetMonitorSummaryDisplayFormat.COUNTS_AND_LIST) +.colorPreference(WidgetColorPreference.TEXT) +.hideZeroCounts(true) +.showLastTriggered(false) +.query("") +.sort(WidgetMonitorSummarySort.PRIORITY_ASCENDING) +.count(50L) +.start(0L) +.showPriority(false))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -59,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1177423752.java b/examples/v1/dashboards/CreateDashboard_1177423752.java index 88cec77c946..a0f9a183e4c 100644 --- a/examples/v1/dashboards/CreateDashboard_1177423752.java +++ b/examples/v1/dashboards/CreateDashboard_1177423752.java @@ -1,9 +1,10 @@ // Create a new dashboard with heatmap widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.HeatMapWidgetDefinition; import com.datadog.api.client.v1.model.HeatMapWidgetDefinitionType; @@ -14,37 +15,40 @@ import com.datadog.api.client.v1.model.WidgetStyle; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_heatmap_widget") - .description(null) - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new HeatMapWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(HeatMapWidgetDefinitionType.HEATMAP) - .requests( - Collections.singletonList( - new HeatMapWidgetRequest() - .q("avg:system.cpu.user{*} by {service}") - .style( - new WidgetStyle().palette("dog_classic")))))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_heatmap_widget") +.description(null) +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new HeatMapWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(HeatMapWidgetDefinitionType.HEATMAP) +.requests(Collections.singletonList(new HeatMapWidgetRequest() +.q("avg:system.cpu.user{*} by {service}") +.style(new WidgetStyle() +.palette("dog_classic")))))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -57,4 +61,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1200099236.java b/examples/v1/dashboards/CreateDashboard_1200099236.java index 5dabd5334f5..7ec4cbc6723 100644 --- a/examples/v1/dashboards/CreateDashboard_1200099236.java +++ b/examples/v1/dashboards/CreateDashboard_1200099236.java @@ -1,9 +1,10 @@ // Create a new dashboard with hostmap widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.HostMapRequest; import com.datadog.api.client.v1.model.HostMapWidgetDefinition; @@ -15,42 +16,44 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetNodeType; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_hostmap_widget") - .description(null) - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(22L)) - .definition( - new WidgetDefinition( - new HostMapWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(HostMapWidgetDefinitionType.HOSTMAP) - .requests( - new HostMapWidgetDefinitionRequests() - .fill( - new HostMapRequest() - .q("avg:system.cpu.user{*} by {host}"))) - .nodeType(WidgetNodeType.HOST) - .noMetricHosts(true) - .noGroupHosts(true) - .style( - new HostMapWidgetDefinitionStyle() - .palette("green_to_orange") - .paletteFlip(false)))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_hostmap_widget") +.description(null) +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(22L)) +.definition(new WidgetDefinition( +new HostMapWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(HostMapWidgetDefinitionType.HOSTMAP) +.requests(new HostMapWidgetDefinitionRequests() +.fill(new HostMapRequest() +.q("avg:system.cpu.user{*} by {host}"))) +.nodeType(WidgetNodeType.HOST) +.noMetricHosts(true) +.noGroupHosts(true) +.style(new HostMapWidgetDefinitionStyle() +.palette("green_to_orange") +.paletteFlip(false)))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -63,4 +66,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1213075383.java b/examples/v1/dashboards/CreateDashboard_1213075383.java index c5374694b5f..9f08e05d69d 100644 --- a/examples/v1/dashboards/CreateDashboard_1213075383.java +++ b/examples/v1/dashboards/CreateDashboard_1213075383.java @@ -1,9 +1,10 @@ // Create a new dashboard with toplist widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -21,58 +22,49 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_toplist_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new ToplistWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(ToplistWidgetDefinitionType.TOPLIST) - .requests( - Collections.singletonList( - new ToplistWidgetRequest() - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .query( - "avg:system.cpu.user{*} by" - + " {service}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)))) - .formulas( - Collections.singletonList( - new WidgetFormula() - .formula("query1") - .limit( - new WidgetFormulaLimit() - .count(10L) - .order(QuerySortOrder.DESC)))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_toplist_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new ToplistWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(ToplistWidgetDefinitionType.TOPLIST) +.requests(Collections.singletonList(new ToplistWidgetRequest() +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.query("avg:system.cpu.user{*} by {service}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)))) +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1") +.limit(new WidgetFormulaLimit() +.count(10L) +.order(QuerySortOrder.DESC)))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -85,4 +77,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1307120899.java b/examples/v1/dashboards/CreateDashboard_1307120899.java index bcdd2f627ad..bb5ca535eae 100644 --- a/examples/v1/dashboards/CreateDashboard_1307120899.java +++ b/examples/v1/dashboards/CreateDashboard_1307120899.java @@ -1,9 +1,10 @@ // Create a new timeseries widget with ci_tests data source -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DashboardReflowType; import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; @@ -26,71 +27,49 @@ import com.datadog.api.client.v1.model.WidgetLineWidth; import com.datadog.api.client.v1.model.WidgetRequestStyle; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title( - "Example-Create_a_new_timeseries_widget_with_ci_tests_data_source with ci_tests" - + " datasource") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TimeseriesWidgetDefinition() - .title("") - .showLegend(true) - .legendLayout(TimeseriesWidgetLegendLayout.AUTO) - .legendColumns( - Arrays.asList( - TimeseriesWidgetLegendColumn.AVG, - TimeseriesWidgetLegendColumn.MIN, - TimeseriesWidgetLegendColumn.MAX, - TimeseriesWidgetLegendColumn.VALUE, - TimeseriesWidgetLegendColumn.SUM)) - .time(new WidgetTime()) - .type(TimeseriesWidgetDefinitionType.TIMESERIES) - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .formulas( - Collections.singletonList( - new WidgetFormula().formula("query1"))) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionEventQueryDefinition() - .dataSource( - FormulaAndFunctionEventsDataSource - .CI_TESTS) - .name("query1") - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("test_level:test")) - .indexes( - Collections.singletonList("*")) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT))))) - .responseFormat( - FormulaAndFunctionResponseFormat.TIMESERIES) - .style( - new WidgetRequestStyle() - .palette("dog_classic") - .lineType(WidgetLineType.SOLID) - .lineWidth(WidgetLineWidth.NORMAL)) - .displayType(WidgetDisplayType.LINE))))))) - .layoutType(DashboardLayoutType.ORDERED) - .reflowType(DashboardReflowType.AUTO); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_timeseries_widget_with_ci_tests_data_source with ci_tests datasource") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TimeseriesWidgetDefinition() +.title("") +.showLegend(true) +.legendLayout(TimeseriesWidgetLegendLayout.AUTO) +.legendColumns(Arrays.asList(TimeseriesWidgetLegendColumn.AVG, TimeseriesWidgetLegendColumn.MIN, TimeseriesWidgetLegendColumn.MAX, TimeseriesWidgetLegendColumn.VALUE, TimeseriesWidgetLegendColumn.SUM)) +.time(new WidgetTime()) +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1"))) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionEventQueryDefinition() +.dataSource(FormulaAndFunctionEventsDataSource.CI_TESTS) +.name("query1") +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("test_level:test")) +.indexes(Collections.singletonList("*")) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(FormulaAndFunctionEventAggregation.COUNT))))) +.responseFormat(FormulaAndFunctionResponseFormat.TIMESERIES) +.style(new WidgetRequestStyle() +.palette("dog_classic") +.lineType(WidgetLineType.SOLID) +.lineWidth(WidgetLineWidth.NORMAL)) +.displayType(WidgetDisplayType.LINE))))))) +.layoutType(DashboardLayoutType.ORDERED) +.reflowType(DashboardReflowType.AUTO); try { Dashboard result = apiInstance.createDashboard(body); @@ -103,4 +82,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1423904722.java b/examples/v1/dashboards/CreateDashboard_1423904722.java index 78f5e963104..83ae023e79c 100644 --- a/examples/v1/dashboards/CreateDashboard_1423904722.java +++ b/examples/v1/dashboards/CreateDashboard_1423904722.java @@ -1,9 +1,10 @@ // Create a new dashboard with slo list widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.SLOListWidgetDefinition; import com.datadog.api.client.v1.model.SLOListWidgetDefinitionType; @@ -14,38 +15,39 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_slo_list_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(60L).height(21L)) - .definition( - new WidgetDefinition( - new SLOListWidgetDefinition() - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(SLOListWidgetDefinitionType.SLO_LIST) - .requests( - Collections.singletonList( - new SLOListWidgetRequest() - .query( - new SLOListWidgetQuery() - .queryString("env:prod AND service:my-app") - .limit(75L)) - .requestType( - SLOListWidgetRequestType.SLO_LIST))))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_slo_list_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(60L) +.height(21L)) +.definition(new WidgetDefinition( +new SLOListWidgetDefinition() +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(SLOListWidgetDefinitionType.SLO_LIST) +.requests(Collections.singletonList(new SLOListWidgetRequest() +.query(new SLOListWidgetQuery() +.queryString("env:prod AND service:my-app") +.limit(75L)) +.requestType(SLOListWidgetRequestType.SLO_LIST))))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -58,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1442588603.java b/examples/v1/dashboards/CreateDashboard_1442588603.java index 25facd81902..33a412dc433 100644 --- a/examples/v1/dashboards/CreateDashboard_1442588603.java +++ b/examples/v1/dashboards/CreateDashboard_1442588603.java @@ -1,10 +1,10 @@ -// Create a distribution widget using a histogram request containing a formulas and functions APM -// Stats query +// Create a distribution widget using a histogram request containing a formulas and functions APM Stats query -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DistributionWidgetDefinition; import com.datadog.api.client.v1.model.DistributionWidgetDefinitionType; @@ -21,69 +21,60 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetStyle; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title( - "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_APM_Stats") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new DistributionWidgetDefinition() - .title("APM Stats - Request latency HOP") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .showLegend(false) - .type(DistributionWidgetDefinitionType.DISTRIBUTION) - .xaxis( - new DistributionWidgetXAxis() - .max("auto") - .includeZero(true) - .scale("linear") - .min("auto")) - .yaxis( - new DistributionWidgetYAxis() - .max("auto") - .includeZero(true) - .scale("linear") - .min("auto")) - .requests( - Collections.singletonList( - new DistributionWidgetRequest() - .query( - new DistributionWidgetHistogramRequestQuery( - new FormulaAndFunctionApmResourceStatsQueryDefinition() - .primaryTagValue("*") - .stat( - FormulaAndFunctionApmResourceStatName - .LATENCY_DISTRIBUTION) - .dataSource( - FormulaAndFunctionApmResourceStatsDataSource - .APM_RESOURCE_STATS) - .name("query1") - .service("azure-bill-import") - .groupBy( - Collections.singletonList( - "resource_name")) - .env("staging") - .primaryTagName("datacenter") - .operationName( - "universal.http.client"))) - .requestType( - DistributionWidgetHistogramRequestType - .HISTOGRAM) - .style(new WidgetStyle().palette("dog_classic")))))) - .layout(new WidgetLayout().x(8L).y(0L).width(4L).height(2L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_APM_Stats") +.description("") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new DistributionWidgetDefinition() +.title("APM Stats - Request latency HOP") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.showLegend(false) +.type(DistributionWidgetDefinitionType.DISTRIBUTION) +.xaxis(new DistributionWidgetXAxis() +.max("auto") +.includeZero(true) +.scale("linear") +.min("auto")) +.yaxis(new DistributionWidgetYAxis() +.max("auto") +.includeZero(true) +.scale("linear") +.min("auto")) +.requests(Collections.singletonList(new DistributionWidgetRequest() +.query(new DistributionWidgetHistogramRequestQuery( +new FormulaAndFunctionApmResourceStatsQueryDefinition() +.primaryTagValue("*") +.stat(FormulaAndFunctionApmResourceStatName.LATENCY_DISTRIBUTION) +.dataSource(FormulaAndFunctionApmResourceStatsDataSource.APM_RESOURCE_STATS) +.name("query1") +.service("azure-bill-import") +.groupBy(Collections.singletonList("resource_name")) +.env("staging") +.primaryTagName("datacenter") +.operationName("universal.http.client"))) +.requestType(DistributionWidgetHistogramRequestType.HISTOGRAM) +.style(new WidgetStyle() +.palette("dog_classic")))))) +.layout(new WidgetLayout() +.x(8L) +.y(0L) +.width(4L) +.height(2L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -96,4 +87,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_145494973.java b/examples/v1/dashboards/CreateDashboard_145494973.java index 5fdd10c1eb0..ded7801047a 100644 --- a/examples/v1/dashboards/CreateDashboard_145494973.java +++ b/examples/v1/dashboards/CreateDashboard_145494973.java @@ -1,9 +1,10 @@ // Create a new dashboard with apm resource stats widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionApmResourceStatName; import com.datadog.api.client.v1.model.FormulaAndFunctionApmResourceStatsDataSource; @@ -17,53 +18,46 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_apm_resource_stats_widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TableWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(TableWidgetDefinitionType.QUERY_TABLE) - .requests( - Collections.singletonList( - new TableWidgetRequest() - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionApmResourceStatsQueryDefinition() - .primaryTagValue( - "edge-eu1.prod.dog") - .stat( - FormulaAndFunctionApmResourceStatName - .HITS) - .name("query1") - .service("cassandra") - .dataSource( - FormulaAndFunctionApmResourceStatsDataSource - .APM_RESOURCE_STATS) - .env("ci") - .primaryTagName("datacenter") - .operationName("cassandra.query") - .groupBy( - Collections.singletonList( - "resource_name"))))))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_apm_resource_stats_widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TableWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(TableWidgetDefinitionType.QUERY_TABLE) +.requests(Collections.singletonList(new TableWidgetRequest() +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionApmResourceStatsQueryDefinition() +.primaryTagValue("edge-eu1.prod.dog") +.stat(FormulaAndFunctionApmResourceStatName.HITS) +.name("query1") +.service("cassandra") +.dataSource(FormulaAndFunctionApmResourceStatsDataSource.APM_RESOURCE_STATS) +.env("ci") +.primaryTagName("datacenter") +.operationName("cassandra.query") +.groupBy(Collections.singletonList("resource_name"))))))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(4L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -76,4 +70,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_173805046.java b/examples/v1/dashboards/CreateDashboard_173805046.java index 9db6e521a08..5272e670a4f 100644 --- a/examples/v1/dashboards/CreateDashboard_173805046.java +++ b/examples/v1/dashboards/CreateDashboard_173805046.java @@ -1,9 +1,10 @@ // Create a new dashboard with slo widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.SLOWidgetDefinition; import com.datadog.api.client.v1.model.SLOWidgetDefinitionType; @@ -13,7 +14,12 @@ import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTimeWindows; import com.datadog.api.client.v1.model.WidgetViewMode; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,29 +29,28 @@ public static void main(String[] args) { // there is a valid "slo" in the system String SLO_DATA_0_ID = System.getenv("SLO_DATA_0_ID"); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_slo_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(60L).height(21L)) - .definition( - new WidgetDefinition( - new SLOWidgetDefinition() - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(SLOWidgetDefinitionType.SLO) - .viewType("detail") - .timeWindows( - Collections.singletonList(WidgetTimeWindows.SEVEN_DAYS)) - .sloId(SLO_DATA_0_ID) - .showErrorBudget(true) - .viewMode(WidgetViewMode.OVERALL) - .globalTimeTarget("0"))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_slo_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(60L) +.height(21L)) +.definition(new WidgetDefinition( +new SLOWidgetDefinition() +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(SLOWidgetDefinitionType.SLO) +.viewType("detail") +.timeWindows(Collections.singletonList(WidgetTimeWindows.SEVEN_DAYS)) +.sloId(SLO_DATA_0_ID) +.showErrorBudget(true) +.viewMode(WidgetViewMode.OVERALL) +.globalTimeTarget("0"))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -58,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1738608750.java b/examples/v1/dashboards/CreateDashboard_1738608750.java index f28c955ebe5..4cbebe638a8 100644 --- a/examples/v1/dashboards/CreateDashboard_1738608750.java +++ b/examples/v1/dashboards/CreateDashboard_1738608750.java @@ -1,9 +1,10 @@ // Create a new dashboard with free_text widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FreeTextWidgetDefinition; import com.datadog.api.client.v1.model.FreeTextWidgetDefinitionType; @@ -11,31 +12,36 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_free_text_widget") - .description(null) - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(24L).height(6L)) - .definition( - new WidgetDefinition( - new FreeTextWidgetDefinition() - .type(FreeTextWidgetDefinitionType.FREE_TEXT) - .text("Example free text") - .color("#4d4d4d") - .fontSize("auto") - .textAlign(WidgetTextAlign.LEFT))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_free_text_widget") +.description(null) +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(24L) +.height(6L)) +.definition(new WidgetDefinition( +new FreeTextWidgetDefinition() +.type(FreeTextWidgetDefinitionType.FREE_TEXT) +.text("Example free text") +.color("#4d4d4d") +.fontSize("auto") +.textAlign(WidgetTextAlign.LEFT))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -48,4 +54,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2029850837.java b/examples/v1/dashboards/CreateDashboard_2029850837.java index c4c74a2d142..f89da363190 100644 --- a/examples/v1/dashboards/CreateDashboard_2029850837.java +++ b/examples/v1/dashboards/CreateDashboard_2029850837.java @@ -1,9 +1,10 @@ // Create a new dashboard with log_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.LogStreamWidgetDefinition; import com.datadog.api.client.v1.model.LogStreamWidgetDefinitionType; @@ -14,41 +15,44 @@ import com.datadog.api.client.v1.model.WidgetMessageDisplay; import com.datadog.api.client.v1.model.WidgetSort; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_log_stream_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(36L)) - .definition( - new WidgetDefinition( - new LogStreamWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(LogStreamWidgetDefinitionType.LOG_STREAM) - .indexes(Collections.singletonList("main")) - .query("") - .sort( - new WidgetFieldSort() - .column("time") - .order(WidgetSort.DESCENDING)) - .columns(Arrays.asList("host", "service")) - .showDateColumn(true) - .showMessageColumn(true) - .messageDisplay(WidgetMessageDisplay.EXPANDED_MEDIUM))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_log_stream_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(36L)) +.definition(new WidgetDefinition( +new LogStreamWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(LogStreamWidgetDefinitionType.LOG_STREAM) +.indexes(Collections.singletonList("main")) +.query("") +.sort(new WidgetFieldSort() +.column("time") +.order(WidgetSort.DESCENDING)) +.columns(Arrays.asList("host", "service")) +.showDateColumn(true) +.showMessageColumn(true) +.messageDisplay(WidgetMessageDisplay.EXPANDED_MEDIUM))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -61,4 +65,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2034634967.java b/examples/v1/dashboards/CreateDashboard_2034634967.java index 3952cef5d9c..dbe05c33d3d 100644 --- a/examples/v1/dashboards/CreateDashboard_2034634967.java +++ b/examples/v1/dashboards/CreateDashboard_2034634967.java @@ -1,9 +1,10 @@ // Create a new dashboard with servicemap widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ServiceMapWidgetDefinition; import com.datadog.api.client.v1.model.ServiceMapWidgetDefinitionType; @@ -11,33 +12,37 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_servicemap_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new ServiceMapWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(ServiceMapWidgetDefinitionType.SERVICEMAP) - .service("") - .filters(Arrays.asList("env:none", "environment:*")))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_servicemap_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new ServiceMapWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(ServiceMapWidgetDefinitionType.SERVICEMAP) +.service("") +.filters(Arrays.asList("env:none", "environment:*")))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -50,4 +55,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2104498738.java b/examples/v1/dashboards/CreateDashboard_2104498738.java index 9b2658b4468..c80312ba821 100644 --- a/examples/v1/dashboards/CreateDashboard_2104498738.java +++ b/examples/v1/dashboards/CreateDashboard_2104498738.java @@ -1,91 +1,75 @@ // Create a new dashboard with formulas and functions scatterplot widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricQueryDefinition; import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; import com.datadog.api.client.v1.model.FormulaAndFunctionResponseFormat; +import com.datadog.api.client.v1.model.ScatterplotDimension; +import com.datadog.api.client.v1.model.ScatterplotTableRequest; import com.datadog.api.client.v1.model.ScatterPlotWidgetDefinition; import com.datadog.api.client.v1.model.ScatterPlotWidgetDefinitionRequests; import com.datadog.api.client.v1.model.ScatterPlotWidgetDefinitionType; -import com.datadog.api.client.v1.model.ScatterplotDimension; -import com.datadog.api.client.v1.model.ScatterplotTableRequest; import com.datadog.api.client.v1.model.ScatterplotWidgetFormula; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_formulas_and_functions_scatterplot_widget") - .widgets( - Collections.singletonList( - new Widget() - .id(5346764334358972L) - .definition( - new WidgetDefinition( - new ScatterPlotWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(ScatterPlotWidgetDefinitionType.SCATTERPLOT) - .requests( - new ScatterPlotWidgetDefinitionRequests() - .table( - new ScatterplotTableRequest() - .formulas( - Arrays.asList( - new ScatterplotWidgetFormula() - .formula("query1") - .dimension(ScatterplotDimension.X) - .alias("my-query1"), - new ScatterplotWidgetFormula() - .formula("query2") - .dimension(ScatterplotDimension.Y) - .alias("my-query2"))) - .queries( - Arrays.asList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .query( - "avg:system.cpu.user{*} by" - + " {service}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)), - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query2") - .query( - "avg:system.mem.used{*} by" - + " {service}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(2L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_formulas_and_functions_scatterplot_widget") +.widgets(Collections.singletonList(new Widget() +.id(5346764334358972L) +.definition(new WidgetDefinition( +new ScatterPlotWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(ScatterPlotWidgetDefinitionType.SCATTERPLOT) +.requests(new ScatterPlotWidgetDefinitionRequests() +.table(new ScatterplotTableRequest() +.formulas(Arrays.asList(new ScatterplotWidgetFormula() +.formula("query1") +.dimension(ScatterplotDimension.X) +.alias("my-query1"), new ScatterplotWidgetFormula() +.formula("query2") +.dimension(ScatterplotDimension.Y) +.alias("my-query2"))) +.queries(Arrays.asList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.query("avg:system.cpu.user{*} by {service}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)), new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query2") +.query("avg:system.mem.used{*} by {service}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(2L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -98,4 +82,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2308247857.java b/examples/v1/dashboards/CreateDashboard_2308247857.java index 36a05a4e272..b5d0d27c444 100644 --- a/examples/v1/dashboards/CreateDashboard_2308247857.java +++ b/examples/v1/dashboards/CreateDashboard_2308247857.java @@ -1,8 +1,9 @@ // Create a new dashboard with alert_graph widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.AlertGraphWidgetDefinition; import com.datadog.api.client.v1.model.AlertGraphWidgetDefinitionType; import com.datadog.api.client.v1.model.Dashboard; @@ -13,7 +14,12 @@ import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; import com.datadog.api.client.v1.model.WidgetVizType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,26 +29,26 @@ public static void main(String[] args) { // there is a valid "monitor" in the system Long MONITOR_ID = Long.parseLong(System.getenv("MONITOR_ID")); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_alert_graph_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new AlertGraphWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(AlertGraphWidgetDefinitionType.ALERT_GRAPH) - .alertId("7") - .vizType(WidgetVizType.TIMESERIES))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_alert_graph_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new AlertGraphWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(AlertGraphWidgetDefinitionType.ALERT_GRAPH) +.alertId("7") +.vizType(WidgetVizType.TIMESERIES))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -55,4 +61,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2316374332.java b/examples/v1/dashboards/CreateDashboard_2316374332.java index 8bc43b8fb26..4c1107de182 100644 --- a/examples/v1/dashboards/CreateDashboard_2316374332.java +++ b/examples/v1/dashboards/CreateDashboard_2316374332.java @@ -1,8 +1,9 @@ // Create a new dashboard with alert_value widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.AlertValueWidgetDefinition; import com.datadog.api.client.v1.model.AlertValueWidgetDefinitionType; import com.datadog.api.client.v1.model.Dashboard; @@ -11,7 +12,12 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,27 +27,27 @@ public static void main(String[] args) { // there is a valid "monitor" in the system Long MONITOR_ID = Long.parseLong(System.getenv("MONITOR_ID")); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_alert_value_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(15L).height(8L)) - .definition( - new WidgetDefinition( - new AlertValueWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(AlertValueWidgetDefinitionType.ALERT_VALUE) - .alertId("7") - .unit("auto") - .textAlign(WidgetTextAlign.LEFT) - .precision(2L))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_alert_value_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(15L) +.height(8L)) +.definition(new WidgetDefinition( +new AlertValueWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(AlertValueWidgetDefinitionType.ALERT_VALUE) +.alertId("7") +.unit("auto") +.textAlign(WidgetTextAlign.LEFT) +.precision(2L))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -54,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2336428357.java b/examples/v1/dashboards/CreateDashboard_2336428357.java index bbfe78dc164..fcb68591883 100644 --- a/examples/v1/dashboards/CreateDashboard_2336428357.java +++ b/examples/v1/dashboards/CreateDashboard_2336428357.java @@ -1,9 +1,10 @@ // Create a new dashboard with query_table widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -23,61 +24,51 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_query_table_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(54L).height(32L)) - .definition( - new WidgetDefinition( - new TableWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(TableWidgetDefinitionType.QUERY_TABLE) - .requests( - Collections.singletonList( - new TableWidgetRequest() - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .query( - "avg:system.cpu.user{*} by" - + " {host}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)))) - .formulas( - Collections.singletonList( - new WidgetFormula() - .formula("query1") - .limit( - new WidgetFormulaLimit() - .count(500L) - .order(QuerySortOrder.DESC)) - .cellDisplayMode( - TableWidgetCellDisplayMode.BAR))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))) - .hasSearchBar(TableWidgetHasSearchBar.AUTO))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_query_table_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(54L) +.height(32L)) +.definition(new WidgetDefinition( +new TableWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(TableWidgetDefinitionType.QUERY_TABLE) +.requests(Collections.singletonList(new TableWidgetRequest() +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.query("avg:system.cpu.user{*} by {host}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)))) +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1") +.limit(new WidgetFormulaLimit() +.count(500L) +.order(QuerySortOrder.DESC)) +.cellDisplayMode(TableWidgetCellDisplayMode.BAR))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))) +.hasSearchBar(TableWidgetHasSearchBar.AUTO))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -90,4 +81,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2338918735.java b/examples/v1/dashboards/CreateDashboard_2338918735.java index 21b57f94ca4..07edb8054ee 100644 --- a/examples/v1/dashboards/CreateDashboard_2338918735.java +++ b/examples/v1/dashboards/CreateDashboard_2338918735.java @@ -1,9 +1,10 @@ // Create a new dashboard with list_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -15,39 +16,33 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title("Example-Create_a_new_dashboard_with_list_stream_widget with list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource( - ListStreamSource.APM_ISSUE_STREAM) - .queryString("")) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_list_stream_widget with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.APM_ISSUE_STREAM) +.queryString("")) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -60,4 +55,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2342457693.java b/examples/v1/dashboards/CreateDashboard_2342457693.java index 470cde8f375..f06ec98c4cb 100644 --- a/examples/v1/dashboards/CreateDashboard_2342457693.java +++ b/examples/v1/dashboards/CreateDashboard_2342457693.java @@ -1,20 +1,21 @@ // Create a new dashboard with scatterplot widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricQueryDefinition; import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; import com.datadog.api.client.v1.model.FormulaAndFunctionResponseFormat; +import com.datadog.api.client.v1.model.ScatterplotDimension; +import com.datadog.api.client.v1.model.ScatterplotTableRequest; import com.datadog.api.client.v1.model.ScatterPlotWidgetDefinition; import com.datadog.api.client.v1.model.ScatterPlotWidgetDefinitionRequests; import com.datadog.api.client.v1.model.ScatterPlotWidgetDefinitionType; -import com.datadog.api.client.v1.model.ScatterplotDimension; -import com.datadog.api.client.v1.model.ScatterplotTableRequest; import com.datadog.api.client.v1.model.ScatterplotWidgetFormula; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetAxis; @@ -22,86 +23,67 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_scatterplot_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new ScatterPlotWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(ScatterPlotWidgetDefinitionType.SCATTERPLOT) - .requests( - new ScatterPlotWidgetDefinitionRequests() - .table( - new ScatterplotTableRequest() - .formulas( - Arrays.asList( - new ScatterplotWidgetFormula() - .formula("query1") - .dimension(ScatterplotDimension.X) - .alias(""), - new ScatterplotWidgetFormula() - .formula("query2") - .dimension(ScatterplotDimension.Y) - .alias(""))) - .queries( - Arrays.asList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .query( - "avg:system.cpu.user{*} by" - + " {service}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)), - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query2") - .query( - "avg:system.mem.used{*} by" - + " {service}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))) - .xaxis( - new WidgetAxis() - .scale("linear") - .includeZero(true) - .min("auto") - .max("auto")) - .yaxis( - new WidgetAxis() - .scale("linear") - .includeZero(true) - .min("auto") - .max("auto")))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_scatterplot_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new ScatterPlotWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(ScatterPlotWidgetDefinitionType.SCATTERPLOT) +.requests(new ScatterPlotWidgetDefinitionRequests() +.table(new ScatterplotTableRequest() +.formulas(Arrays.asList(new ScatterplotWidgetFormula() +.formula("query1") +.dimension(ScatterplotDimension.X) +.alias(""), new ScatterplotWidgetFormula() +.formula("query2") +.dimension(ScatterplotDimension.Y) +.alias(""))) +.queries(Arrays.asList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.query("avg:system.cpu.user{*} by {service}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)), new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query2") +.query("avg:system.mem.used{*} by {service}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))) +.xaxis(new WidgetAxis() +.scale("linear") +.includeZero(true) +.min("auto") +.max("auto")) +.yaxis(new WidgetAxis() +.scale("linear") +.includeZero(true) +.min("auto") +.max("auto")))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -114,4 +96,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2349863258.java b/examples/v1/dashboards/CreateDashboard_2349863258.java index 83d025b1003..dd386dfbb3d 100644 --- a/examples/v1/dashboards/CreateDashboard_2349863258.java +++ b/examples/v1/dashboards/CreateDashboard_2349863258.java @@ -1,9 +1,10 @@ // Create a new dashboard with query_value widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -18,50 +19,46 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_query_value_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new QueryValueWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(QueryValueWidgetDefinitionType.QUERY_VALUE) - .requests( - Collections.singletonList( - new QueryValueWidgetRequest() - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .name("query1") - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .query("avg:system.cpu.user{*}") - .aggregator( - FormulaAndFunctionMetricAggregation - .AVG)))))) - .autoscale(true) - .precision(2L))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_query_value_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new QueryValueWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(QueryValueWidgetDefinitionType.QUERY_VALUE) +.requests(Collections.singletonList(new QueryValueWidgetRequest() +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.name("query1") +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.query("avg:system.cpu.user{*}") +.aggregator(FormulaAndFunctionMetricAggregation.AVG)))))) +.autoscale(true) +.precision(2L))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -74,4 +71,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2432046716.java b/examples/v1/dashboards/CreateDashboard_2432046716.java index f4d83ea67c5..1a9e9ab9357 100644 --- a/examples/v1/dashboards/CreateDashboard_2432046716.java +++ b/examples/v1/dashboards/CreateDashboard_2432046716.java @@ -1,9 +1,10 @@ // Create a new dashboard with event_stream list_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -16,41 +17,34 @@ import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetEventSize; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_event_stream_list_stream_widget with" - + " list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource(ListStreamSource.EVENT_STREAM) - .queryString("") - .eventSize(WidgetEventSize.LARGE)) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_event_stream_list_stream_widget with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.EVENT_STREAM) +.queryString("") +.eventSize(WidgetEventSize.LARGE)) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -63,4 +57,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2490110261.java b/examples/v1/dashboards/CreateDashboard_2490110261.java index 2c7bb51e6c0..f3248d85d26 100644 --- a/examples/v1/dashboards/CreateDashboard_2490110261.java +++ b/examples/v1/dashboards/CreateDashboard_2490110261.java @@ -1,9 +1,10 @@ // Create a new dashboard with an audit logs query -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinition; @@ -18,49 +19,41 @@ import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title("Example-Create_a_new_dashboard_with_an_audit_logs_query with Audit Logs Query") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TimeseriesWidgetDefinition() - .type(TimeseriesWidgetDefinitionType.TIMESERIES) - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .responseFormat( - FormulaAndFunctionResponseFormat.TIMESERIES) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionEventQueryDefinition() - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .dataSource( - FormulaAndFunctionEventsDataSource - .AUDIT) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT)) - .name("query1") - .indexes( - Collections.singletonList( - "*"))))))))) - .layout(new WidgetLayout().x(2L).y(0L).width(4L).height(2L)))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_an_audit_logs_query with Audit Logs Query") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TimeseriesWidgetDefinition() +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.responseFormat(FormulaAndFunctionResponseFormat.TIMESERIES) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionEventQueryDefinition() +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.dataSource(FormulaAndFunctionEventsDataSource.AUDIT) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(FormulaAndFunctionEventAggregation.COUNT)) +.name("query1") +.indexes(Collections.singletonList("*"))))))))) +.layout(new WidgetLayout() +.x(2L) +.y(0L) +.width(4L) +.height(2L)))); try { Dashboard result = apiInstance.createDashboard(body); @@ -73,4 +66,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_252716965.java b/examples/v1/dashboards/CreateDashboard_252716965.java index 7e2ccc6cb11..e5fb65573d9 100644 --- a/examples/v1/dashboards/CreateDashboard_252716965.java +++ b/examples/v1/dashboards/CreateDashboard_252716965.java @@ -1,10 +1,10 @@ -// Create a distribution widget using a histogram request containing a formulas and functions -// metrics query +// Create a distribution widget using a histogram request containing a formulas and functions metrics query -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DistributionWidgetDefinition; import com.datadog.api.client.v1.model.DistributionWidgetDefinitionType; @@ -20,57 +20,53 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetStyle; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title( - "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_metrics_q") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new DistributionWidgetDefinition() - .title("Metrics HOP") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .showLegend(false) - .type(DistributionWidgetDefinitionType.DISTRIBUTION) - .xaxis( - new DistributionWidgetXAxis() - .max("auto") - .includeZero(true) - .scale("linear") - .min("auto")) - .yaxis( - new DistributionWidgetYAxis() - .max("auto") - .includeZero(true) - .scale("linear") - .min("auto")) - .requests( - Collections.singletonList( - new DistributionWidgetRequest() - .query( - new DistributionWidgetHistogramRequestQuery( - new FormulaAndFunctionMetricQueryDefinition() - .query("histogram:trace.Load{*}") - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1"))) - .requestType( - DistributionWidgetHistogramRequestType - .HISTOGRAM) - .style(new WidgetStyle().palette("dog_classic")))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(2L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_metrics_q") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new DistributionWidgetDefinition() +.title("Metrics HOP") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.showLegend(false) +.type(DistributionWidgetDefinitionType.DISTRIBUTION) +.xaxis(new DistributionWidgetXAxis() +.max("auto") +.includeZero(true) +.scale("linear") +.min("auto")) +.yaxis(new DistributionWidgetYAxis() +.max("auto") +.includeZero(true) +.scale("linear") +.min("auto")) +.requests(Collections.singletonList(new DistributionWidgetRequest() +.query(new DistributionWidgetHistogramRequestQuery( +new FormulaAndFunctionMetricQueryDefinition() +.query("histogram:trace.Load{*}") +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1"))) +.requestType(DistributionWidgetHistogramRequestType.HISTOGRAM) +.style(new WidgetStyle() +.palette("dog_classic")))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(2L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -83,4 +79,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2607944105.java b/examples/v1/dashboards/CreateDashboard_2607944105.java index f0b4b9ee575..5bedb135245 100644 --- a/examples/v1/dashboards/CreateDashboard_2607944105.java +++ b/examples/v1/dashboards/CreateDashboard_2607944105.java @@ -1,8 +1,9 @@ // Create a new dashboard with check_status widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.CheckStatusWidgetDefinition; import com.datadog.api.client.v1.model.CheckStatusWidgetDefinitionType; import com.datadog.api.client.v1.model.Dashboard; @@ -12,32 +13,37 @@ import com.datadog.api.client.v1.model.WidgetGrouping; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_check_status_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(15L).height(8L)) - .definition( - new WidgetDefinition( - new CheckStatusWidgetDefinition() - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(CheckStatusWidgetDefinitionType.CHECK_STATUS) - .check("datadog.agent.up") - .grouping(WidgetGrouping.CHECK) - .tags(Collections.singletonList("*")))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_check_status_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(15L) +.height(8L)) +.definition(new WidgetDefinition( +new CheckStatusWidgetDefinition() +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(CheckStatusWidgetDefinitionType.CHECK_STATUS) +.check("datadog.agent.up") +.grouping(WidgetGrouping.CHECK) +.tags(Collections.singletonList("*")))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -50,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2610827685.java b/examples/v1/dashboards/CreateDashboard_2610827685.java index 5cfac3dae69..11b9c659b7b 100644 --- a/examples/v1/dashboards/CreateDashboard_2610827685.java +++ b/examples/v1/dashboards/CreateDashboard_2610827685.java @@ -1,9 +1,10 @@ // Create a new dashboard with run-workflow widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.RunWorkflowWidgetDefinition; import com.datadog.api.client.v1.model.RunWorkflowWidgetDefinitionType; @@ -13,37 +14,40 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_run_workflow_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new RunWorkflowWidgetDefinition() - .title("Run workflow title") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(RunWorkflowWidgetDefinitionType.RUN_WORKFLOW) - .workflowId("2e055f16-8b6a-4cdd-b452-17a34c44b160") - .inputs( - Collections.singletonList( - new RunWorkflowWidgetInput() - .name("environment") - .value("$env.value"))))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_run_workflow_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new RunWorkflowWidgetDefinition() +.title("Run workflow title") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(RunWorkflowWidgetDefinitionType.RUN_WORKFLOW) +.workflowId("2e055f16-8b6a-4cdd-b452-17a34c44b160") +.inputs(Collections.singletonList(new RunWorkflowWidgetInput() +.name("environment") +.value("$env.value"))))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -56,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2634813877.java b/examples/v1/dashboards/CreateDashboard_2634813877.java index 7231218d18e..513890901fd 100644 --- a/examples/v1/dashboards/CreateDashboard_2634813877.java +++ b/examples/v1/dashboards/CreateDashboard_2634813877.java @@ -1,9 +1,10 @@ // Create a new dashboard with event_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.EventStreamWidgetDefinition; import com.datadog.api.client.v1.model.EventStreamWidgetDefinitionType; @@ -12,33 +13,38 @@ import com.datadog.api.client.v1.model.WidgetEventSize; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_event_stream_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(38L)) - .definition( - new WidgetDefinition( - new EventStreamWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(EventStreamWidgetDefinitionType.EVENT_STREAM) - .query("example-query") - .tagsExecution("and") - .eventSize(WidgetEventSize.SMALL))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_event_stream_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(38L)) +.definition(new WidgetDefinition( +new EventStreamWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(EventStreamWidgetDefinitionType.EVENT_STREAM) +.query("example-query") +.tagsExecution("and") +.eventSize(WidgetEventSize.SMALL))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -51,4 +57,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2644712913.java b/examples/v1/dashboards/CreateDashboard_2644712913.java index 1f6efe95250..f60464315af 100644 --- a/examples/v1/dashboards/CreateDashboard_2644712913.java +++ b/examples/v1/dashboards/CreateDashboard_2644712913.java @@ -1,9 +1,10 @@ // Create a new dashboard with a query value widget using the percentile aggregator -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -19,54 +20,46 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_a_query_value_widget_using_the_percentile_aggregator" - + " with QVW Percentile Aggregator") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new QueryValueWidgetDefinition() - .titleSize("16") - .title("") - .titleAlign(WidgetTextAlign.LEFT) - .precision(2L) - .time(new WidgetTime()) - .autoscale(true) - .requests( - Collections.singletonList( - new QueryValueWidgetRequest() - .formulas( - Collections.singletonList( - new WidgetFormula().formula("query1"))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .query( - "p90:dist.dd.dogweb.latency{*}") - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .aggregator( - FormulaAndFunctionMetricAggregation - .PERCENTILE)))))) - .type(QueryValueWidgetDefinitionType.QUERY_VALUE))) - .layout(new WidgetLayout().y(0L).x(0L).height(2L).width(2L)))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_a_query_value_widget_using_the_percentile_aggregator with QVW Percentile Aggregator") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new QueryValueWidgetDefinition() +.titleSize("16") +.title("") +.titleAlign(WidgetTextAlign.LEFT) +.precision(2L) +.time(new WidgetTime()) +.autoscale(true) +.requests(Collections.singletonList(new QueryValueWidgetRequest() +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1"))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.query("p90:dist.dd.dogweb.latency{*}") +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.aggregator(FormulaAndFunctionMetricAggregation.PERCENTILE)))))) +.type(QueryValueWidgetDefinitionType.QUERY_VALUE))) +.layout(new WidgetLayout() +.y(0L) +.x(0L) +.height(2L) +.width(2L)))); try { Dashboard result = apiInstance.createDashboard(body); @@ -79,4 +72,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2652180930.java b/examples/v1/dashboards/CreateDashboard_2652180930.java index 802bf37d72b..178c218bda2 100644 --- a/examples/v1/dashboards/CreateDashboard_2652180930.java +++ b/examples/v1/dashboards/CreateDashboard_2652180930.java @@ -1,9 +1,10 @@ // Create a new dashboard with topology_map widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.TopologyMapWidgetDefinition; import com.datadog.api.client.v1.model.TopologyMapWidgetDefinitionType; @@ -15,43 +16,41 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_topology_map_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) - .definition( - new WidgetDefinition( - new TopologyMapWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(TopologyMapWidgetDefinitionType.TOPOLOGY_MAP) - .requests( - Collections.singletonList( - new TopologyRequest() - .requestType(TopologyRequestType.TOPOLOGY) - .query( - new TopologyQuery() - .dataSource( - TopologyQueryDataSource.SERVICE_MAP) - .service("") - .filters( - Arrays.asList( - "env:none", "environment:*"))))))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_topology_map_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(15L)) +.definition(new WidgetDefinition( +new TopologyMapWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(TopologyMapWidgetDefinitionType.TOPOLOGY_MAP) +.requests(Collections.singletonList(new TopologyRequest() +.requestType(TopologyRequestType.TOPOLOGY) +.query(new TopologyQuery() +.dataSource(TopologyQueryDataSource.SERVICE_MAP) +.service("") +.filters(Arrays.asList("env:none", "environment:*"))))))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -64,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2705593938.java b/examples/v1/dashboards/CreateDashboard_2705593938.java index ada55c6f39e..e9459b0e69f 100644 --- a/examples/v1/dashboards/CreateDashboard_2705593938.java +++ b/examples/v1/dashboards/CreateDashboard_2705593938.java @@ -1,9 +1,10 @@ // Create a new dashboard with sunburst widget and metrics data -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -18,50 +19,43 @@ import com.datadog.api.client.v1.model.WidgetFormula; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_sunburst_widget_and_metrics_data") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new SunburstWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(SunburstWidgetDefinitionType.SUNBURST) - .requests( - Collections.singletonList( - new SunburstWidgetRequest() - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .formulas( - Collections.singletonList( - new WidgetFormula().formula("query1"))) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .query( - "sum:system.mem.used{*} by" - + " {service}") - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .aggregator( - FormulaAndFunctionMetricAggregation - .SUM)))))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_sunburst_widget_and_metrics_data") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new SunburstWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(SunburstWidgetDefinitionType.SUNBURST) +.requests(Collections.singletonList(new SunburstWidgetRequest() +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1"))) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.query("sum:system.mem.used{*} by {service}") +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.aggregator(FormulaAndFunctionMetricAggregation.SUM)))))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(4L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -74,4 +68,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2843286292.java b/examples/v1/dashboards/CreateDashboard_2843286292.java index e814fb1b2ff..5a0da3d8a36 100644 --- a/examples/v1/dashboards/CreateDashboard_2843286292.java +++ b/examples/v1/dashboards/CreateDashboard_2843286292.java @@ -1,9 +1,10 @@ // Create a new dashboard with logs_transaction_stream list_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -18,53 +19,38 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget" - + " with list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource( - ListStreamSource - .LOGS_TRANSACTION_STREAM) - .queryString("") - .groupBy( - Collections.singletonList( - new ListStreamGroupByItems() - .facet("service"))) - .compute( - Collections.singletonList( - new ListStreamComputeItems() - .facet("service") - .aggregation( - ListStreamComputeAggregation - .COUNT)))) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.LOGS_TRANSACTION_STREAM) +.queryString("") +.groupBy(Collections.singletonList(new ListStreamGroupByItems() +.facet("service"))) +.compute(Collections.singletonList(new ListStreamComputeItems() +.facet("service") +.aggregation(ListStreamComputeAggregation.COUNT)))) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -77,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2850365602.java b/examples/v1/dashboards/CreateDashboard_2850365602.java index 6a666399623..05aacd71eb2 100644 --- a/examples/v1/dashboards/CreateDashboard_2850365602.java +++ b/examples/v1/dashboards/CreateDashboard_2850365602.java @@ -1,9 +1,10 @@ // Create a new dashboard with template variable presets using values returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DashboardReflowType; import com.datadog.api.client.v1.model.DashboardTemplateVariable; @@ -15,47 +16,41 @@ import com.datadog.api.client.v1.model.HostMapWidgetDefinitionType; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .description(null) - .isReadOnly(false) - .layoutType(DashboardLayoutType.ORDERED) - .reflowType(DashboardReflowType.AUTO) - .templateVariablePresets( - Collections.singletonList( - new DashboardTemplateVariablePreset() - .name("my saved view") - .templateVariables( - Collections.singletonList( - new DashboardTemplateVariablePresetValue() - .name("datacenter") - .values(Arrays.asList("*", "my-host")))))) - .templateVariables( - Collections.singletonList( - new DashboardTemplateVariable() - .availableValues(Arrays.asList("my-host", "host1", "host2")) - .defaults(Collections.singletonList("my-host")) - .name("host1") - .prefix("host"))) - .title("") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new HostMapWidgetDefinition() - .requests( - new HostMapWidgetDefinitionRequests() - .fill(new HostMapRequest().q("avg:system.cpu.user{*}"))) - .type(HostMapWidgetDefinitionType.HOSTMAP))))); + Dashboard body = new Dashboard() +.description(null) +.isReadOnly(false) +.layoutType(DashboardLayoutType.ORDERED) +.reflowType(DashboardReflowType.AUTO) +.templateVariablePresets(Collections.singletonList(new DashboardTemplateVariablePreset() +.name("my saved view") +.templateVariables(Collections.singletonList(new DashboardTemplateVariablePresetValue() +.name("datacenter") +.values(Arrays.asList("*", "my-host")))))) +.templateVariables(Collections.singletonList(new DashboardTemplateVariable() +.availableValues(Arrays.asList("my-host", "host1", "host2")) +.defaults(Collections.singletonList("my-host")) +.name("host1") +.prefix("host"))) +.title("") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new HostMapWidgetDefinition() +.requests(new HostMapWidgetDefinitionRequests() +.fill(new HostMapRequest() +.q("avg:system.cpu.user{*}"))) +.type(HostMapWidgetDefinitionType.HOSTMAP))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -68,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2917274132.java b/examples/v1/dashboards/CreateDashboard_2917274132.java index ff7dee115ec..8952e679bc1 100644 --- a/examples/v1/dashboards/CreateDashboard_2917274132.java +++ b/examples/v1/dashboards/CreateDashboard_2917274132.java @@ -1,9 +1,10 @@ // Create a new dashboard with manage_status widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.MonitorSummaryWidgetDefinition; import com.datadog.api.client.v1.model.MonitorSummaryWidgetDefinitionType; @@ -14,37 +15,41 @@ import com.datadog.api.client.v1.model.WidgetMonitorSummaryDisplayFormat; import com.datadog.api.client.v1.model.WidgetMonitorSummarySort; import com.datadog.api.client.v1.model.WidgetSummaryType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_manage_status_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(50L).height(25L)) - .definition( - new WidgetDefinition( - new MonitorSummaryWidgetDefinition() - .type(MonitorSummaryWidgetDefinitionType.MANAGE_STATUS) - .summaryType(WidgetSummaryType.MONITORS) - .displayFormat( - WidgetMonitorSummaryDisplayFormat.COUNTS_AND_LIST) - .colorPreference(WidgetColorPreference.TEXT) - .hideZeroCounts(true) - .showLastTriggered(false) - .query("") - .sort(WidgetMonitorSummarySort.STATUS_ASCENDING) - .count(50L) - .start(0L))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_manage_status_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(50L) +.height(25L)) +.definition(new WidgetDefinition( +new MonitorSummaryWidgetDefinition() +.type(MonitorSummaryWidgetDefinitionType.MANAGE_STATUS) +.summaryType(WidgetSummaryType.MONITORS) +.displayFormat(WidgetMonitorSummaryDisplayFormat.COUNTS_AND_LIST) +.colorPreference(WidgetColorPreference.TEXT) +.hideZeroCounts(true) +.showLastTriggered(false) +.query("") +.sort(WidgetMonitorSummarySort.STATUS_ASCENDING) +.count(50L) +.start(0L))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -57,4 +62,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_2921337351.java b/examples/v1/dashboards/CreateDashboard_2921337351.java index 9376488b8d7..25a5e6347dd 100644 --- a/examples/v1/dashboards/CreateDashboard_2921337351.java +++ b/examples/v1/dashboards/CreateDashboard_2921337351.java @@ -1,9 +1,10 @@ // Create a new dashboard with trace_service widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ServiceSummaryWidgetDefinition; import com.datadog.api.client.v1.model.ServiceSummaryWidgetDefinitionType; @@ -13,40 +14,45 @@ import com.datadog.api.client.v1.model.WidgetServiceSummaryDisplayFormat; import com.datadog.api.client.v1.model.WidgetSizeFormat; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_trace_service_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(72L).height(72L)) - .definition( - new WidgetDefinition( - new ServiceSummaryWidgetDefinition() - .title("Service Summary") - .time(new WidgetTime()) - .type(ServiceSummaryWidgetDefinitionType.TRACE_SERVICE) - .env("none") - .service("") - .spanName("") - .showHits(true) - .showErrors(true) - .showLatency(true) - .showBreakdown(true) - .showDistribution(true) - .showResourceList(false) - .sizeFormat(WidgetSizeFormat.MEDIUM) - .displayFormat(WidgetServiceSummaryDisplayFormat.TWO_COLUMN))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_trace_service_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(72L) +.height(72L)) +.definition(new WidgetDefinition( +new ServiceSummaryWidgetDefinition() +.title("Service Summary") +.time(new WidgetTime()) +.type(ServiceSummaryWidgetDefinitionType.TRACE_SERVICE) +.env("none") +.service("") +.spanName("") +.showHits(true) +.showErrors(true) +.showLatency(true) +.showBreakdown(true) +.showDistribution(true) +.showResourceList(false) +.sizeFormat(WidgetSizeFormat.MEDIUM) +.displayFormat(WidgetServiceSummaryDisplayFormat.TWO_COLUMN))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -59,4 +65,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_3117424216.java b/examples/v1/dashboards/CreateDashboard_3117424216.java index 2749b9df082..6e3a76228aa 100644 --- a/examples/v1/dashboards/CreateDashboard_3117424216.java +++ b/examples/v1/dashboards/CreateDashboard_3117424216.java @@ -1,9 +1,10 @@ // Create a new dashboard with logs_stream list_stream widget and storage parameter -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -15,41 +16,34 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_logs_stream_list_stream_widget_and_storage_parameter" - + " with list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource(ListStreamSource.LOGS_STREAM) - .queryString("") - .storage("hot")) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_logs_stream_list_stream_widget_and_storage_parameter with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.LOGS_STREAM) +.queryString("") +.storage("hot")) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -62,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_3250131584.java b/examples/v1/dashboards/CreateDashboard_3250131584.java index a244d784a4a..437206ad402 100644 --- a/examples/v1/dashboards/CreateDashboard_3250131584.java +++ b/examples/v1/dashboards/CreateDashboard_3250131584.java @@ -1,9 +1,10 @@ // Create a new dashboard with event_timeline widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.EventTimelineWidgetDefinition; import com.datadog.api.client.v1.model.EventTimelineWidgetDefinitionType; @@ -11,32 +12,37 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_event_timeline_widget") - .description(null) - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(9L)) - .definition( - new WidgetDefinition( - new EventTimelineWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(EventTimelineWidgetDefinitionType.EVENT_TIMELINE) - .query("status:error priority:all") - .tagsExecution("and"))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_event_timeline_widget") +.description(null) +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(9L)) +.definition(new WidgetDefinition( +new EventTimelineWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(EventTimelineWidgetDefinitionType.EVENT_TIMELINE) +.query("status:error priority:all") +.tagsExecution("and"))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -49,4 +55,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_3669695268.java b/examples/v1/dashboards/CreateDashboard_3669695268.java index 98e43cea2ce..0256af116e4 100644 --- a/examples/v1/dashboards/CreateDashboard_3669695268.java +++ b/examples/v1/dashboards/CreateDashboard_3669695268.java @@ -1,9 +1,10 @@ // Create a new dashboard with logs query table widget and storage parameter -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinition; @@ -21,60 +22,43 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetFormula; import com.datadog.api.client.v1.model.WidgetFormulaLimit; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter" - + " with query table widget and storage parameter") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TableWidgetDefinition() - .type(TableWidgetDefinitionType.QUERY_TABLE) - .requests( - Collections.singletonList( - new TableWidgetRequest() - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionEventQueryDefinition() - .dataSource( - FormulaAndFunctionEventsDataSource - .LOGS) - .name("query1") - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes( - Collections.singletonList("*")) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT)) - .storage("online_archives")))) - .formulas( - Collections.singletonList( - new WidgetFormula() - .cellDisplayMode( - TableWidgetCellDisplayMode.BAR) - .formula("query1") - .limit( - new WidgetFormulaLimit() - .count(50L) - .order(QuerySortOrder.DESC)))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter with query table widget and storage parameter") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TableWidgetDefinition() +.type(TableWidgetDefinitionType.QUERY_TABLE) +.requests(Collections.singletonList(new TableWidgetRequest() +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionEventQueryDefinition() +.dataSource(FormulaAndFunctionEventsDataSource.LOGS) +.name("query1") +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(FormulaAndFunctionEventAggregation.COUNT)) +.storage("online_archives")))) +.formulas(Collections.singletonList(new WidgetFormula() +.cellDisplayMode(TableWidgetCellDisplayMode.BAR) +.formula("query1") +.limit(new WidgetFormulaLimit() +.count(50L) +.order(QuerySortOrder.DESC)))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -87,4 +71,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_3882428227.java b/examples/v1/dashboards/CreateDashboard_3882428227.java index 328a96516cf..1bd6ea4db30 100644 --- a/examples/v1/dashboards/CreateDashboard_3882428227.java +++ b/examples/v1/dashboards/CreateDashboard_3882428227.java @@ -1,10 +1,10 @@ -// Create a distribution widget using a histogram request containing a formulas and functions events -// query +// Create a distribution widget using a histogram request containing a formulas and functions events query -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DistributionWidgetDefinition; import com.datadog.api.client.v1.model.DistributionWidgetDefinitionType; @@ -22,68 +22,57 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title( - "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu") - .description( - "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new DistributionWidgetDefinition() - .title("Events Platform - Request latency HOP") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .showLegend(false) - .type(DistributionWidgetDefinitionType.DISTRIBUTION) - .xaxis( - new DistributionWidgetXAxis() - .max("auto") - .includeZero(true) - .scale("linear") - .min("auto")) - .yaxis( - new DistributionWidgetYAxis() - .max("auto") - .includeZero(true) - .scale("linear") - .min("auto")) - .requests( - Collections.singletonList( - new DistributionWidgetRequest() - .query( - new DistributionWidgetHistogramRequestQuery( - new FormulaAndFunctionEventQueryDefinition() - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .dataSource( - FormulaAndFunctionEventsDataSource - .EVENTS) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .metric("@duration") - .aggregation( - FormulaAndFunctionEventAggregation - .MIN)) - .name("query1") - .indexes( - Collections.singletonList("*")))) - .requestType( - DistributionWidgetHistogramRequestType - .HISTOGRAM))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(2L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu") +.description("Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new DistributionWidgetDefinition() +.title("Events Platform - Request latency HOP") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.showLegend(false) +.type(DistributionWidgetDefinitionType.DISTRIBUTION) +.xaxis(new DistributionWidgetXAxis() +.max("auto") +.includeZero(true) +.scale("linear") +.min("auto")) +.yaxis(new DistributionWidgetYAxis() +.max("auto") +.includeZero(true) +.scale("linear") +.min("auto")) +.requests(Collections.singletonList(new DistributionWidgetRequest() +.query(new DistributionWidgetHistogramRequestQuery( +new FormulaAndFunctionEventQueryDefinition() +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.dataSource(FormulaAndFunctionEventsDataSource.EVENTS) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.metric("@duration") +.aggregation(FormulaAndFunctionEventAggregation.MIN)) +.name("query1") +.indexes(Collections.singletonList("*")))) +.requestType(DistributionWidgetHistogramRequestType.HISTOGRAM))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(2L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -96,4 +85,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_3982498788.java b/examples/v1/dashboards/CreateDashboard_3982498788.java index 73e510f5d56..f33ea88ddb9 100644 --- a/examples/v1/dashboards/CreateDashboard_3982498788.java +++ b/examples/v1/dashboards/CreateDashboard_3982498788.java @@ -1,9 +1,10 @@ // Create a new dashboard with timeseries widget containing style attributes -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.TimeseriesWidgetDefinition; import com.datadog.api.client.v1.model.TimeseriesWidgetDefinitionType; @@ -14,39 +15,33 @@ import com.datadog.api.client.v1.model.WidgetLineType; import com.datadog.api.client.v1.model.WidgetLineWidth; import com.datadog.api.client.v1.model.WidgetRequestStyle; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_timeseries_widget_containing_style_attributes" - + " with timeseries widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TimeseriesWidgetDefinition() - .type(TimeseriesWidgetDefinitionType.TIMESERIES) - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .q( - "sum:trace.test.errors{env:prod,service:datadog-api-spec}" - + " by {resource_name}.as_count()") - .onRightYaxis(false) - .style( - new WidgetRequestStyle() - .palette("warm") - .lineType(WidgetLineType.SOLID) - .lineWidth(WidgetLineWidth.NORMAL)) - .displayType(WidgetDisplayType.BARS))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_timeseries_widget_containing_style_attributes with timeseries widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TimeseriesWidgetDefinition() +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.q("sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()") +.onRightYaxis(false) +.style(new WidgetRequestStyle() +.palette("warm") +.lineType(WidgetLineType.SOLID) +.lineWidth(WidgetLineWidth.NORMAL)) +.displayType(WidgetDisplayType.BARS))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -59,4 +54,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_4026341408.java b/examples/v1/dashboards/CreateDashboard_4026341408.java index 689f2919f37..4c401befb94 100644 --- a/examples/v1/dashboards/CreateDashboard_4026341408.java +++ b/examples/v1/dashboards/CreateDashboard_4026341408.java @@ -1,9 +1,10 @@ // Create a new dashboard with apm_issue_stream list_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -15,41 +16,33 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget with" - + " list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource( - ListStreamSource.APM_ISSUE_STREAM) - .queryString("")) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.APM_ISSUE_STREAM) +.queryString("")) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -62,4 +55,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_4076476470.java b/examples/v1/dashboards/CreateDashboard_4076476470.java index 3a343bc2a5a..6b7867f964c 100644 --- a/examples/v1/dashboards/CreateDashboard_4076476470.java +++ b/examples/v1/dashboards/CreateDashboard_4076476470.java @@ -1,9 +1,10 @@ // Create a new dashboard with rum_issue_stream list_stream widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -15,41 +16,33 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget with" - + " list_stream widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource( - ListStreamSource.RUM_ISSUE_STREAM) - .queryString("")) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget with list_stream widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.RUM_ISSUE_STREAM) +.queryString("")) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -62,4 +55,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_41622531.java b/examples/v1/dashboards/CreateDashboard_41622531.java index 1475a67d832..155c8d8a528 100644 --- a/examples/v1/dashboards/CreateDashboard_41622531.java +++ b/examples/v1/dashboards/CreateDashboard_41622531.java @@ -1,9 +1,10 @@ // Create a new dashboard with timeseries widget and formula style attributes -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DashboardReflowType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -24,67 +25,48 @@ import com.datadog.api.client.v1.model.WidgetLineWidth; import com.datadog.api.client.v1.model.WidgetRequestStyle; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title( - "Example-Create_a_new_dashboard_with_timeseries_widget_and_formula_style_attributes" - + " with formula style") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TimeseriesWidgetDefinition() - .title("styled timeseries") - .showLegend(true) - .legendLayout(TimeseriesWidgetLegendLayout.AUTO) - .legendColumns( - Arrays.asList( - TimeseriesWidgetLegendColumn.AVG, - TimeseriesWidgetLegendColumn.MIN, - TimeseriesWidgetLegendColumn.MAX, - TimeseriesWidgetLegendColumn.VALUE, - TimeseriesWidgetLegendColumn.SUM)) - .time(new WidgetTime()) - .type(TimeseriesWidgetDefinitionType.TIMESERIES) - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .formulas( - Collections.singletonList( - new WidgetFormula() - .formula("query1") - .style( - new WidgetFormulaStyle() - .paletteIndex(4L) - .palette("classic")))) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .query("avg:system.cpu.user{*}") - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1")))) - .responseFormat( - FormulaAndFunctionResponseFormat.TIMESERIES) - .style( - new WidgetRequestStyle() - .palette("dog_classic") - .lineType(WidgetLineType.SOLID) - .lineWidth(WidgetLineWidth.NORMAL)) - .displayType(WidgetDisplayType.LINE))))))) - .layoutType(DashboardLayoutType.ORDERED) - .reflowType(DashboardReflowType.AUTO); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_timeseries_widget_and_formula_style_attributes with formula style") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TimeseriesWidgetDefinition() +.title("styled timeseries") +.showLegend(true) +.legendLayout(TimeseriesWidgetLegendLayout.AUTO) +.legendColumns(Arrays.asList(TimeseriesWidgetLegendColumn.AVG, TimeseriesWidgetLegendColumn.MIN, TimeseriesWidgetLegendColumn.MAX, TimeseriesWidgetLegendColumn.VALUE, TimeseriesWidgetLegendColumn.SUM)) +.time(new WidgetTime()) +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1") +.style(new WidgetFormulaStyle() +.paletteIndex(4L) +.palette("classic")))) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.query("avg:system.cpu.user{*}") +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1")))) +.responseFormat(FormulaAndFunctionResponseFormat.TIMESERIES) +.style(new WidgetRequestStyle() +.palette("dog_classic") +.lineType(WidgetLineType.SOLID) +.lineWidth(WidgetLineWidth.NORMAL)) +.displayType(WidgetDisplayType.LINE))))))) +.layoutType(DashboardLayoutType.ORDERED) +.reflowType(DashboardReflowType.AUTO); try { Dashboard result = apiInstance.createDashboard(body); @@ -97,4 +79,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_417992286.java b/examples/v1/dashboards/CreateDashboard_417992286.java index 217de58ca51..cce103969c1 100644 --- a/examples/v1/dashboards/CreateDashboard_417992286.java +++ b/examples/v1/dashboards/CreateDashboard_417992286.java @@ -1,37 +1,43 @@ // Create a new dashboard with note widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.NoteWidgetDefinition; import com.datadog.api.client.v1.model.NoteWidgetDefinitionType; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_note_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(18L).height(24L)) - .definition( - new WidgetDefinition( - new NoteWidgetDefinition() - .type(NoteWidgetDefinitionType.NOTE) - .content("# Example Note"))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_note_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(18L) +.height(24L)) +.definition(new WidgetDefinition( +new NoteWidgetDefinition() +.type(NoteWidgetDefinitionType.NOTE) +.content("# Example Note"))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -44,4 +50,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_578885732.java b/examples/v1/dashboards/CreateDashboard_578885732.java index a8b7f8717fb..2d4ab3eb23b 100644 --- a/examples/v1/dashboards/CreateDashboard_578885732.java +++ b/examples/v1/dashboards/CreateDashboard_578885732.java @@ -1,8 +1,9 @@ // Create a new dashboard with a formulas and functions change widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.ChangeWidgetDefinition; import com.datadog.api.client.v1.model.ChangeWidgetDefinitionType; import com.datadog.api.client.v1.model.ChangeWidgetRequest; @@ -25,63 +26,53 @@ import com.datadog.api.client.v1.model.WidgetSort; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ChangeWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(ChangeWidgetDefinitionType.CHANGE) - .requests( - Collections.singletonList( - new ChangeWidgetRequest() - .formulas( - Arrays.asList( - new WidgetFormula() - .formula("hour_before(query1)"), - new WidgetFormula().formula("query1"))) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionEventQueryDefinition() - .dataSource( - FormulaAndFunctionEventsDataSource - .LOGS) - .name("query1") - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes( - Collections.singletonList("*")) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT))))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .compareTo(WidgetCompareTo.HOUR_BEFORE) - .increaseGood(true) - .orderBy(WidgetOrderBy.CHANGE) - .changeType(WidgetChangeType.ABSOLUTE) - .orderDir(WidgetSort.DESCENDING))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ChangeWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(ChangeWidgetDefinitionType.CHANGE) +.requests(Collections.singletonList(new ChangeWidgetRequest() +.formulas(Arrays.asList(new WidgetFormula() +.formula("hour_before(query1)"), new WidgetFormula() +.formula("query1"))) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionEventQueryDefinition() +.dataSource(FormulaAndFunctionEventsDataSource.LOGS) +.name("query1") +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(FormulaAndFunctionEventAggregation.COUNT))))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.compareTo(WidgetCompareTo.HOUR_BEFORE) +.increaseGood(true) +.orderBy(WidgetOrderBy.CHANGE) +.changeType(WidgetChangeType.ABSOLUTE) +.orderDir(WidgetSort.DESCENDING))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(4L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -94,4 +85,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_651038379.java b/examples/v1/dashboards/CreateDashboard_651038379.java index 62f971416ac..a399fcb355e 100644 --- a/examples/v1/dashboards/CreateDashboard_651038379.java +++ b/examples/v1/dashboards/CreateDashboard_651038379.java @@ -1,9 +1,10 @@ // Create a new dashboard with image widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ImageWidgetDefinition; import com.datadog.api.client.v1.model.ImageWidgetDefinitionType; @@ -11,29 +12,34 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetImageSizing; import com.datadog.api.client.v1.model.WidgetLayout; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_image_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(12L).height(12L)) - .definition( - new WidgetDefinition( - new ImageWidgetDefinition() - .type(ImageWidgetDefinitionType.IMAGE) - .url("https://example.com/image.png") - .sizing(WidgetImageSizing.COVER))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_image_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(12L) +.height(12L)) +.definition(new WidgetDefinition( +new ImageWidgetDefinition() +.type(ImageWidgetDefinitionType.IMAGE) +.url("https://example.com/image.png") +.sizing(WidgetImageSizing.COVER))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -46,4 +52,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_765140092.java b/examples/v1/dashboards/CreateDashboard_765140092.java index c5093f737bb..8ee3d9fcfd0 100644 --- a/examples/v1/dashboards/CreateDashboard_765140092.java +++ b/examples/v1/dashboards/CreateDashboard_765140092.java @@ -1,9 +1,10 @@ // Create a new dashboard with a query value widget using timeseries background -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource; @@ -22,58 +23,50 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title( - "Example-Create_a_new_dashboard_with_a_query_value_widget_using_timeseries_background" - + " with QVW Timeseries Background") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new QueryValueWidgetDefinition() - .titleSize("16") - .title("") - .titleAlign(WidgetTextAlign.LEFT) - .precision(2L) - .time(new WidgetTime()) - .autoscale(true) - .requests( - Collections.singletonList( - new QueryValueWidgetRequest() - .formulas( - Collections.singletonList( - new WidgetFormula().formula("query1"))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionMetricQueryDefinition() - .query( - "sum:my.cool.count.metric{*}") - .dataSource( - FormulaAndFunctionMetricDataSource - .METRICS) - .name("query1") - .aggregator( - FormulaAndFunctionMetricAggregation - .PERCENTILE)))))) - .type(QueryValueWidgetDefinitionType.QUERY_VALUE) - .timeseriesBackground( - new TimeseriesBackground() - .type(TimeseriesBackgroundType.AREA) - .yaxis(new WidgetAxis().includeZero(true))))) - .layout(new WidgetLayout().y(0L).x(0L).height(2L).width(2L)))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_a_query_value_widget_using_timeseries_background with QVW Timeseries Background") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new QueryValueWidgetDefinition() +.titleSize("16") +.title("") +.titleAlign(WidgetTextAlign.LEFT) +.precision(2L) +.time(new WidgetTime()) +.autoscale(true) +.requests(Collections.singletonList(new QueryValueWidgetRequest() +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1"))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionMetricQueryDefinition() +.query("sum:my.cool.count.metric{*}") +.dataSource(FormulaAndFunctionMetricDataSource.METRICS) +.name("query1") +.aggregator(FormulaAndFunctionMetricAggregation.PERCENTILE)))))) +.type(QueryValueWidgetDefinitionType.QUERY_VALUE) +.timeseriesBackground(new TimeseriesBackground() +.type(TimeseriesBackgroundType.AREA) +.yaxis(new WidgetAxis() +.includeZero(true))))) +.layout(new WidgetLayout() +.y(0L) +.x(0L) +.height(2L) +.width(2L)))); try { Dashboard result = apiInstance.createDashboard(body); @@ -86,4 +79,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_798168180.java b/examples/v1/dashboards/CreateDashboard_798168180.java index 97ad98e9b02..a87ff46af38 100644 --- a/examples/v1/dashboards/CreateDashboard_798168180.java +++ b/examples/v1/dashboards/CreateDashboard_798168180.java @@ -1,9 +1,10 @@ // Create a new dashboard with apm dependency stats widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionApmDependencyStatName; import com.datadog.api.client.v1.model.FormulaAndFunctionApmDependencyStatsDataSource; @@ -17,57 +18,46 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_apm_dependency_stats_widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new TableWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(TableWidgetDefinitionType.QUERY_TABLE) - .requests( - Collections.singletonList( - new TableWidgetRequest() - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionApmDependencyStatsQueryDefinition() - .primaryTagValue( - "edge-eu1.prod.dog") - .stat( - FormulaAndFunctionApmDependencyStatName - .AVG_DURATION) - .resourceName( - "DELETE FROM" - + " monitor_history.monitor_state_change_history" - + " WHERE org_id = ? AND" - + " monitor_id IN ? AND" - + " group = ?") - .name("query1") - .service("cassandra") - .dataSource( - FormulaAndFunctionApmDependencyStatsDataSource - .APM_DEPENDENCY_STATS) - .env("ci") - .primaryTagName("datacenter") - .operationName( - "cassandra.query")))))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_apm_dependency_stats_widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new TableWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(TableWidgetDefinitionType.QUERY_TABLE) +.requests(Collections.singletonList(new TableWidgetRequest() +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionApmDependencyStatsQueryDefinition() +.primaryTagValue("edge-eu1.prod.dog") +.stat(FormulaAndFunctionApmDependencyStatName.AVG_DURATION) +.resourceName("DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?") +.name("query1") +.service("cassandra") +.dataSource(FormulaAndFunctionApmDependencyStatsDataSource.APM_DEPENDENCY_STATS) +.env("ci") +.primaryTagName("datacenter") +.operationName("cassandra.query")))))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(4L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -80,4 +70,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_803346562.java b/examples/v1/dashboards/CreateDashboard_803346562.java index 2707f38bef3..8d8a1c2e39d 100644 --- a/examples/v1/dashboards/CreateDashboard_803346562.java +++ b/examples/v1/dashboards/CreateDashboard_803346562.java @@ -1,8 +1,9 @@ // Create a new dashboard with distribution widget and apm stats data -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.ApmStatsQueryDefinition; import com.datadog.api.client.v1.model.ApmStatsQueryRowType; import com.datadog.api.client.v1.model.Dashboard; @@ -14,38 +15,40 @@ import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_distribution_widget_and_apm_stats_data") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new DistributionWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .type(DistributionWidgetDefinitionType.DISTRIBUTION) - .requests( - Collections.singletonList( - new DistributionWidgetRequest() - .apmStatsQuery( - new ApmStatsQueryDefinition() - .env("prod") - .service("cassandra") - .name("cassandra.query") - .primaryTag("datacenter:dc1") - .rowType(ApmStatsQueryRowType.SERVICE)))))) - .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)))) - .layoutType(DashboardLayoutType.ORDERED); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_distribution_widget_and_apm_stats_data") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new DistributionWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.type(DistributionWidgetDefinitionType.DISTRIBUTION) +.requests(Collections.singletonList(new DistributionWidgetRequest() +.apmStatsQuery(new ApmStatsQueryDefinition() +.env("prod") +.service("cassandra") +.name("cassandra.query") +.primaryTag("datacenter:dc1") +.rowType(ApmStatsQueryRowType.SERVICE)))))) +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(4L) +.height(4L)))) +.layoutType(DashboardLayoutType.ORDERED); try { Dashboard result = apiInstance.createDashboard(body); @@ -58,4 +61,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_858397694.java b/examples/v1/dashboards/CreateDashboard_858397694.java index df7a2bb99da..21eaf4d4e1f 100644 --- a/examples/v1/dashboards/CreateDashboard_858397694.java +++ b/examples/v1/dashboards/CreateDashboard_858397694.java @@ -1,9 +1,10 @@ // Create a new dashboard with template variable defaults returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.DashboardReflowType; import com.datadog.api.client.v1.model.DashboardTemplateVariable; @@ -13,38 +14,36 @@ import com.datadog.api.client.v1.model.HostMapWidgetDefinitionType; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .description(null) - .isReadOnly(false) - .layoutType(DashboardLayoutType.ORDERED) - .reflowType(DashboardReflowType.AUTO) - .templateVariables( - Collections.singletonList( - new DashboardTemplateVariable() - .availableValues(Arrays.asList("my-host", "host1", "host2")) - .defaults(Collections.singletonList("my-host")) - .name("host1") - .prefix("host"))) - .title("") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new HostMapWidgetDefinition() - .requests( - new HostMapWidgetDefinitionRequests() - .fill(new HostMapRequest().q("avg:system.cpu.user{*}"))) - .type(HostMapWidgetDefinitionType.HOSTMAP))))); + Dashboard body = new Dashboard() +.description(null) +.isReadOnly(false) +.layoutType(DashboardLayoutType.ORDERED) +.reflowType(DashboardReflowType.AUTO) +.templateVariables(Collections.singletonList(new DashboardTemplateVariable() +.availableValues(Arrays.asList("my-host", "host1", "host2")) +.defaults(Collections.singletonList("my-host")) +.name("host1") +.prefix("host"))) +.title("") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new HostMapWidgetDefinition() +.requests(new HostMapWidgetDefinitionRequests() +.fill(new HostMapRequest() +.q("avg:system.cpu.user{*}"))) +.type(HostMapWidgetDefinitionType.HOSTMAP))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -57,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_913313564.java b/examples/v1/dashboards/CreateDashboard_913313564.java index ae210627ce9..c5ec3e21d6b 100644 --- a/examples/v1/dashboards/CreateDashboard_913313564.java +++ b/examples/v1/dashboards/CreateDashboard_913313564.java @@ -1,37 +1,43 @@ // Create a new dashboard with iframe widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.IFrameWidgetDefinition; import com.datadog.api.client.v1.model.IFrameWidgetDefinitionType; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; import com.datadog.api.client.v1.model.WidgetLayout; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_iframe_widget") - .description("") - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(12L).height(12L)) - .definition( - new WidgetDefinition( - new IFrameWidgetDefinition() - .type(IFrameWidgetDefinitionType.IFRAME) - .url("https://docs.datadoghq.com/api/latest/"))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_iframe_widget") +.description("") +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(12L) +.height(12L)) +.definition(new WidgetDefinition( +new IFrameWidgetDefinition() +.type(IFrameWidgetDefinitionType.IFRAME) +.url("https://docs.datadoghq.com/api/latest/"))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -44,4 +50,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_915214113.java b/examples/v1/dashboards/CreateDashboard_915214113.java index 81913be992a..e9b923e6462 100644 --- a/examples/v1/dashboards/CreateDashboard_915214113.java +++ b/examples/v1/dashboards/CreateDashboard_915214113.java @@ -1,9 +1,10 @@ // Create a new dashboard with geomap widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinition; @@ -27,81 +28,63 @@ import com.datadog.api.client.v1.model.WidgetLayout; import com.datadog.api.client.v1.model.WidgetTextAlign; import com.datadog.api.client.v1.model.WidgetTime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .title("Example-Create_a_new_dashboard_with_geomap_widget") - .description(null) - .widgets( - Collections.singletonList( - new Widget() - .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(30L)) - .definition( - new WidgetDefinition( - new GeomapWidgetDefinition() - .title("") - .titleSize("16") - .titleAlign(WidgetTextAlign.LEFT) - .time(new WidgetTime()) - .type(GeomapWidgetDefinitionType.GEOMAP) - .requests( - Collections.singletonList( - new GeomapWidgetRequest() - .formulas( - Collections.singletonList( - new WidgetFormula() - .formula("query1") - .limit( - new WidgetFormulaLimit() - .count(250L) - .order(QuerySortOrder.DESC)))) - .queries( - Collections.singletonList( - new FormulaAndFunctionQueryDefinition( - new FormulaAndFunctionEventQueryDefinition() - .name("query1") - .dataSource( - FormulaAndFunctionEventsDataSource - .RUM) - .search( - new FormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes( - Collections.singletonList("*")) - .compute( - new FormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT)) - .groupBy( - Collections.singletonList( - new FormulaAndFunctionEventQueryGroupBy() - .facet( - "@geo.country_iso_code") - .limit(250L) - .sort( - new FormulaAndFunctionEventQueryGroupBySort() - .order( - QuerySortOrder - .DESC) - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT))))))) - .responseFormat( - FormulaAndFunctionResponseFormat.SCALAR))) - .style( - new GeomapWidgetDefinitionStyle() - .palette("hostmap_blues") - .paletteFlip(false)) - .view(new GeomapWidgetDefinitionView().focus("WORLD")))))) - .layoutType(DashboardLayoutType.FREE) - .isReadOnly(false); + Dashboard body = new Dashboard() +.title("Example-Create_a_new_dashboard_with_geomap_widget") +.description(null) +.widgets(Collections.singletonList(new Widget() +.layout(new WidgetLayout() +.x(0L) +.y(0L) +.width(47L) +.height(30L)) +.definition(new WidgetDefinition( +new GeomapWidgetDefinition() +.title("") +.titleSize("16") +.titleAlign(WidgetTextAlign.LEFT) +.time(new WidgetTime()) +.type(GeomapWidgetDefinitionType.GEOMAP) +.requests(Collections.singletonList(new GeomapWidgetRequest() +.formulas(Collections.singletonList(new WidgetFormula() +.formula("query1") +.limit(new WidgetFormulaLimit() +.count(250L) +.order(QuerySortOrder.DESC)))) +.queries(Collections.singletonList(new FormulaAndFunctionQueryDefinition( +new FormulaAndFunctionEventQueryDefinition() +.name("query1") +.dataSource(FormulaAndFunctionEventsDataSource.RUM) +.search(new FormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new FormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(FormulaAndFunctionEventAggregation.COUNT)) +.groupBy(Collections.singletonList(new FormulaAndFunctionEventQueryGroupBy() +.facet("@geo.country_iso_code") +.limit(250L) +.sort(new FormulaAndFunctionEventQueryGroupBySort() +.order(QuerySortOrder.DESC) +.aggregation(FormulaAndFunctionEventAggregation.COUNT))))))) +.responseFormat(FormulaAndFunctionResponseFormat.SCALAR))) +.style(new GeomapWidgetDefinitionStyle() +.palette("hostmap_blues") +.paletteFlip(false)) +.view(new GeomapWidgetDefinitionView() +.focus("WORLD")))))) +.layoutType(DashboardLayoutType.FREE) +.isReadOnly(false); try { Dashboard result = apiInstance.createDashboard(body); @@ -114,4 +97,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_927141680.java b/examples/v1/dashboards/CreateDashboard_927141680.java index fadda4f37d2..b2236d19e0a 100644 --- a/examples/v1/dashboards/CreateDashboard_927141680.java +++ b/examples/v1/dashboards/CreateDashboard_927141680.java @@ -1,9 +1,10 @@ // Create a new dashboard with funnel widget -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.FunnelQuery; import com.datadog.api.client.v1.model.FunnelRequestType; @@ -13,32 +14,30 @@ import com.datadog.api.client.v1.model.FunnelWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardsApi apiInstance = new DashboardsApi(defaultClient); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title("Example-Create_a_new_dashboard_with_funnel_widget with funnel widget") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new FunnelWidgetDefinition() - .type(FunnelWidgetDefinitionType.FUNNEL) - .requests( - Collections.singletonList( - new FunnelWidgetRequest() - .query( - new FunnelQuery() - .dataSource(FunnelSource.RUM) - .queryString("")) - .requestType(FunnelRequestType.FUNNEL))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Create_a_new_dashboard_with_funnel_widget with funnel widget") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new FunnelWidgetDefinition() +.type(FunnelWidgetDefinitionType.FUNNEL) +.requests(Collections.singletonList(new FunnelWidgetRequest() +.query(new FunnelQuery() +.dataSource(FunnelSource.RUM) +.queryString("")) +.requestType(FunnelRequestType.FUNNEL))))))); try { Dashboard result = apiInstance.createDashboard(body); @@ -51,4 +50,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/DeleteDashboard.java b/examples/v1/dashboards/DeleteDashboard.java index 6531ec4069b..b867c0c8237 100644 --- a/examples/v1/dashboards/DeleteDashboard.java +++ b/examples/v1/dashboards/DeleteDashboard.java @@ -1,9 +1,15 @@ // Delete a dashboard returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.DashboardDeleteResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/DeleteDashboards.java b/examples/v1/dashboards/DeleteDashboards.java index bb948122a98..ddf818ec1c4 100644 --- a/examples/v1/dashboards/DeleteDashboards.java +++ b/examples/v1/dashboards/DeleteDashboards.java @@ -1,12 +1,17 @@ // Delete dashboards returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.DashboardBulkActionData; import com.datadog.api.client.v1.model.DashboardBulkDeleteRequest; import com.datadog.api.client.v1.model.DashboardResourceType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,13 +21,10 @@ public static void main(String[] args) { // there is a valid "dashboard" in the system String DASHBOARD_ID = System.getenv("DASHBOARD_ID"); - DashboardBulkDeleteRequest body = - new DashboardBulkDeleteRequest() - .data( - Collections.singletonList( - new DashboardBulkActionData() - .id(DASHBOARD_ID) - .type(DashboardResourceType.DASHBOARD))); + DashboardBulkDeleteRequest body = new DashboardBulkDeleteRequest() +.data(Collections.singletonList(new DashboardBulkActionData() +.id(DASHBOARD_ID) +.type(DashboardResourceType.DASHBOARD))); try { apiInstance.deleteDashboards(body); @@ -34,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/GetDashboard.java b/examples/v1/dashboards/GetDashboard.java index 4f07b36e322..43441c5d637 100644 --- a/examples/v1/dashboards/GetDashboard.java +++ b/examples/v1/dashboards/GetDashboard.java @@ -1,9 +1,15 @@ // Get a dashboard returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/GetDashboard_4262333854.java b/examples/v1/dashboards/GetDashboard_4262333854.java index f1e7e7e0755..3518cc4834e 100644 --- a/examples/v1/dashboards/GetDashboard_4262333854.java +++ b/examples/v1/dashboards/GetDashboard_4262333854.java @@ -1,9 +1,15 @@ // Get a dashboard returns 'author_name' -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/ListDashboards.java b/examples/v1/dashboards/ListDashboards.java index 04fbc57dd98..6e4831d7d87 100644 --- a/examples/v1/dashboards/ListDashboards.java +++ b/examples/v1/dashboards/ListDashboards.java @@ -1,10 +1,16 @@ // Get all dashboards returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.api.DashboardsApi.ListDashboardsOptionalParameters; import com.datadog.api.client.v1.model.DashboardSummary; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +18,7 @@ public static void main(String[] args) { DashboardsApi apiInstance = new DashboardsApi(defaultClient); try { - DashboardSummary result = - apiInstance.listDashboards(new ListDashboardsOptionalParameters().filterShared(false)); + DashboardSummary result = apiInstance.listDashboards(new ListDashboardsOptionalParameters().filterShared(false)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardsApi#listDashboards"); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/ListDashboards_1773932563.java b/examples/v1/dashboards/ListDashboards_1773932563.java index 87fef04b12c..fa461b84ba4 100644 --- a/examples/v1/dashboards/ListDashboards_1773932563.java +++ b/examples/v1/dashboards/ListDashboards_1773932563.java @@ -1,10 +1,16 @@ // Get deleted dashboards returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.api.DashboardsApi.ListDashboardsOptionalParameters; import com.datadog.api.client.v1.model.DashboardSummary; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +18,7 @@ public static void main(String[] args) { DashboardsApi apiInstance = new DashboardsApi(defaultClient); try { - DashboardSummary result = - apiInstance.listDashboards(new ListDashboardsOptionalParameters().filterDeleted(true)); + DashboardSummary result = apiInstance.listDashboards(new ListDashboardsOptionalParameters().filterDeleted(true)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardsApi#listDashboards"); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/RestoreDashboards.java b/examples/v1/dashboards/RestoreDashboards.java index ead09447cbf..3f6fe8dfe8f 100644 --- a/examples/v1/dashboards/RestoreDashboards.java +++ b/examples/v1/dashboards/RestoreDashboards.java @@ -1,12 +1,17 @@ // Restore deleted dashboards returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.DashboardBulkActionData; import com.datadog.api.client.v1.model.DashboardResourceType; import com.datadog.api.client.v1.model.DashboardRestoreRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,13 +21,10 @@ public static void main(String[] args) { // there is a valid "dashboard" in the system String DASHBOARD_ID = System.getenv("DASHBOARD_ID"); - DashboardRestoreRequest body = - new DashboardRestoreRequest() - .data( - Collections.singletonList( - new DashboardBulkActionData() - .id(DASHBOARD_ID) - .type(DashboardResourceType.DASHBOARD))); + DashboardRestoreRequest body = new DashboardRestoreRequest() +.data(Collections.singletonList(new DashboardBulkActionData() +.id(DASHBOARD_ID) +.type(DashboardResourceType.DASHBOARD))); try { apiInstance.restoreDashboards(body); @@ -34,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/dashboards/UpdateDashboard.java b/examples/v1/dashboards/UpdateDashboard.java index 00adf0634d2..ebcb7869a7b 100644 --- a/examples/v1/dashboards/UpdateDashboard.java +++ b/examples/v1/dashboards/UpdateDashboard.java @@ -1,9 +1,10 @@ // Update a dashboard returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DashboardsApi; import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.Dashboard; import com.datadog.api.client.v1.model.DashboardLayoutType; import com.datadog.api.client.v1.model.ListStreamColumn; import com.datadog.api.client.v1.model.ListStreamColumnWidth; @@ -15,7 +16,12 @@ import com.datadog.api.client.v1.model.ListStreamWidgetRequest; import com.datadog.api.client.v1.model.Widget; import com.datadog.api.client.v1.model.WidgetDefinition; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,33 +31,22 @@ public static void main(String[] args) { // there is a valid "dashboard" in the system String DASHBOARD_ID = System.getenv("DASHBOARD_ID"); - Dashboard body = - new Dashboard() - .layoutType(DashboardLayoutType.ORDERED) - .title("Example-Update_a_dashboard_returns_OK_response with list_stream widget") - .description("Updated description") - .widgets( - Collections.singletonList( - new Widget() - .definition( - new WidgetDefinition( - new ListStreamWidgetDefinition() - .type(ListStreamWidgetDefinitionType.LIST_STREAM) - .requests( - Collections.singletonList( - new ListStreamWidgetRequest() - .columns( - Collections.singletonList( - new ListStreamColumn() - .width(ListStreamColumnWidth.AUTO) - .field("timestamp"))) - .query( - new ListStreamQuery() - .dataSource( - ListStreamSource.APM_ISSUE_STREAM) - .queryString("")) - .responseFormat( - ListStreamResponseFormat.EVENT_LIST))))))); + Dashboard body = new Dashboard() +.layoutType(DashboardLayoutType.ORDERED) +.title("Example-Update_a_dashboard_returns_OK_response with list_stream widget") +.description("Updated description") +.widgets(Collections.singletonList(new Widget() +.definition(new WidgetDefinition( +new ListStreamWidgetDefinition() +.type(ListStreamWidgetDefinitionType.LIST_STREAM) +.requests(Collections.singletonList(new ListStreamWidgetRequest() +.columns(Collections.singletonList(new ListStreamColumn() +.width(ListStreamColumnWidth.AUTO) +.field("timestamp"))) +.query(new ListStreamQuery() +.dataSource(ListStreamSource.APM_ISSUE_STREAM) +.queryString("")) +.responseFormat(ListStreamResponseFormat.EVENT_LIST))))))); try { Dashboard result = apiInstance.updateDashboard(DASHBOARD_ID, body); @@ -64,4 +59,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CancelDowntime.java b/examples/v1/downtimes/CancelDowntime.java index 889c3a4fbc3..776f323d48c 100644 --- a/examples/v1/downtimes/CancelDowntime.java +++ b/examples/v1/downtimes/CancelDowntime.java @@ -1,8 +1,14 @@ // Cancel a downtime returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CancelDowntimesByScope.java b/examples/v1/downtimes/CancelDowntimesByScope.java index e4a2314df26..76411d88335 100644 --- a/examples/v1/downtimes/CancelDowntimesByScope.java +++ b/examples/v1/downtimes/CancelDowntimesByScope.java @@ -1,10 +1,16 @@ // Cancel downtimes by scope returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; -import com.datadog.api.client.v1.model.CancelDowntimesByScopeRequest; import com.datadog.api.client.v1.model.CanceledDowntimesIds; +import com.datadog.api.client.v1.model.CancelDowntimesByScopeRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,8 @@ public static void main(String[] args) { // there is a valid "downtime" in the system String DOWNTIME_SCOPE_0 = System.getenv("DOWNTIME_SCOPE_0"); - CancelDowntimesByScopeRequest body = - new CancelDowntimesByScopeRequest().scope(DOWNTIME_SCOPE_0); + CancelDowntimesByScopeRequest body = new CancelDowntimesByScopeRequest() +.scope(DOWNTIME_SCOPE_0); try { CanceledDowntimesIds result = apiInstance.cancelDowntimesByScope(body); @@ -28,4 +34,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CreateDowntime.java b/examples/v1/downtimes/CreateDowntime.java index 56ff141ead9..7d4c6b1aa49 100644 --- a/examples/v1/downtimes/CreateDowntime.java +++ b/examples/v1/downtimes/CreateDowntime.java @@ -1,30 +1,34 @@ // Schedule a downtime returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.Downtime; import com.datadog.api.client.v1.model.DowntimeRecurrence; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DowntimesApi apiInstance = new DowntimesApi(defaultClient); - Downtime body = - new Downtime() - .message("Example-Schedule_a_downtime_returns_OK_response") - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .timezone("Etc/UTC") - .scope(Collections.singletonList("test:examplescheduleadowntimereturnsokresponse")) - .recurrence( - new DowntimeRecurrence() - .type("weeks") - .period(1) - .weekDays(Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri")) - .untilDate(OffsetDateTime.now().plusDays(21).toInstant().getEpochSecond())); + Downtime body = new Downtime() +.message("Example-Schedule_a_downtime_returns_OK_response") +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.timezone("Etc/UTC") +.scope(Collections.singletonList("test:examplescheduleadowntimereturnsokresponse")) +.recurrence(new DowntimeRecurrence() +.type("weeks") +.period(1) +.weekDays(Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri")) +.untilDate(OffsetDateTime.now().plusDays(21).toInstant().getEpochSecond())); try { Downtime result = apiInstance.createDowntime(body); @@ -37,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CreateDowntime_1393233946.java b/examples/v1/downtimes/CreateDowntime_1393233946.java index 7fa213114a5..6f349a93d26 100644 --- a/examples/v1/downtimes/CreateDowntime_1393233946.java +++ b/examples/v1/downtimes/CreateDowntime_1393233946.java @@ -1,32 +1,36 @@ // Schedule a downtime with until occurrences -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.Downtime; import com.datadog.api.client.v1.model.DowntimeRecurrence; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DowntimesApi apiInstance = new DowntimesApi(defaultClient); - Downtime body = - new Downtime() - .message("Example-Schedule_a_downtime_with_until_occurrences") - .recurrence( - new DowntimeRecurrence() - .period(1) - .type("weeks") - .untilOccurrences(3) - .weekDays(Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri"))) - .scope(Collections.singletonList("*")) - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) - .timezone("Etc/UTC") - .monitorTags(Collections.singletonList("tag0")); + Downtime body = new Downtime() +.message("Example-Schedule_a_downtime_with_until_occurrences") +.recurrence(new DowntimeRecurrence() +.period(1) +.type("weeks") +.untilOccurrences(3) +.weekDays(Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri"))) +.scope(Collections.singletonList("*")) +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) +.timezone("Etc/UTC") +.monitorTags(Collections.singletonList("tag0")); try { Downtime result = apiInstance.createDowntime(body); @@ -39,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CreateDowntime_2908359488.java b/examples/v1/downtimes/CreateDowntime_2908359488.java index e7aca78fa6f..9a60c8ffcbe 100644 --- a/examples/v1/downtimes/CreateDowntime_2908359488.java +++ b/examples/v1/downtimes/CreateDowntime_2908359488.java @@ -1,33 +1,37 @@ // Schedule a downtime until date -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.Downtime; import com.datadog.api.client.v1.model.DowntimeRecurrence; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DowntimesApi apiInstance = new DowntimesApi(defaultClient); - Downtime body = - new Downtime() - .message("Example-Schedule_a_downtime_until_date") - .recurrence( - new DowntimeRecurrence() - .period(1) - .type("weeks") - .untilDate(OffsetDateTime.now().plusDays(21).toInstant().getEpochSecond()) - .weekDays(Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri"))) - .scope(Collections.singletonList("*")) - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) - .timezone("Etc/UTC") - .muteFirstRecoveryNotification(true) - .monitorTags(Collections.singletonList("tag0")); + Downtime body = new Downtime() +.message("Example-Schedule_a_downtime_until_date") +.recurrence(new DowntimeRecurrence() +.period(1) +.type("weeks") +.untilDate(OffsetDateTime.now().plusDays(21).toInstant().getEpochSecond()) +.weekDays(Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri"))) +.scope(Collections.singletonList("*")) +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) +.timezone("Etc/UTC") +.muteFirstRecoveryNotification(true) +.monitorTags(Collections.singletonList("tag0")); try { Downtime result = apiInstance.createDowntime(body); @@ -40,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CreateDowntime_3059354445.java b/examples/v1/downtimes/CreateDowntime_3059354445.java index a9d40c515a1..5b9e348582f 100644 --- a/examples/v1/downtimes/CreateDowntime_3059354445.java +++ b/examples/v1/downtimes/CreateDowntime_3059354445.java @@ -1,27 +1,35 @@ // Schedule a downtime once a year -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.Downtime; import com.datadog.api.client.v1.model.DowntimeRecurrence; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DowntimesApi apiInstance = new DowntimesApi(defaultClient); - Downtime body = - new Downtime() - .message("Example-Schedule_a_downtime_once_a_year") - .recurrence(new DowntimeRecurrence().period(1).type("years")) - .scope(Collections.singletonList("*")) - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) - .timezone("Etc/UTC") - .muteFirstRecoveryNotification(true) - .monitorTags(Collections.singletonList("tag0")); + Downtime body = new Downtime() +.message("Example-Schedule_a_downtime_once_a_year") +.recurrence(new DowntimeRecurrence() +.period(1) +.type("years")) +.scope(Collections.singletonList("*")) +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) +.timezone("Etc/UTC") +.muteFirstRecoveryNotification(true) +.monitorTags(Collections.singletonList("tag0")); try { Downtime result = apiInstance.createDowntime(body); @@ -34,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/CreateDowntime_3355644446.java b/examples/v1/downtimes/CreateDowntime_3355644446.java index 3c7f8ca24a2..7dbed0d1e6a 100644 --- a/examples/v1/downtimes/CreateDowntime_3355644446.java +++ b/examples/v1/downtimes/CreateDowntime_3355644446.java @@ -1,10 +1,17 @@ // Schedule a monitor downtime returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.Downtime; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,14 +21,12 @@ public static void main(String[] args) { // there is a valid "monitor" in the system Long MONITOR_ID = Long.parseLong(System.getenv("MONITOR_ID")); - Downtime body = - new Downtime() - .message("Example-Schedule_a_monitor_downtime_returns_OK_response") - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .timezone("Etc/UTC") - .scope( - Collections.singletonList("test:examplescheduleamonitordowntimereturnsokresponse")) - .monitorId(MONITOR_ID); + Downtime body = new Downtime() +.message("Example-Schedule_a_monitor_downtime_returns_OK_response") +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.timezone("Etc/UTC") +.scope(Collections.singletonList("test:examplescheduleamonitordowntimereturnsokresponse")) +.monitorId(MONITOR_ID); try { Downtime result = apiInstance.createDowntime(body); @@ -34,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/GetDowntime.java b/examples/v1/downtimes/GetDowntime.java index 3acbdfb3146..3c1ee903b95 100644 --- a/examples/v1/downtimes/GetDowntime.java +++ b/examples/v1/downtimes/GetDowntime.java @@ -1,9 +1,15 @@ // Get a downtime returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/ListDowntimes.java b/examples/v1/downtimes/ListDowntimes.java index abe97de1611..58be7e7ac53 100644 --- a/examples/v1/downtimes/ListDowntimes.java +++ b/examples/v1/downtimes/ListDowntimes.java @@ -1,10 +1,15 @@ // Get all downtimes returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/ListMonitorDowntimes.java b/examples/v1/downtimes/ListMonitorDowntimes.java index c26a17707c6..0a65507cd76 100644 --- a/examples/v1/downtimes/ListMonitorDowntimes.java +++ b/examples/v1/downtimes/ListMonitorDowntimes.java @@ -1,10 +1,15 @@ // Get all downtimes for a monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/downtimes/UpdateDowntime.java b/examples/v1/downtimes/UpdateDowntime.java index 27b33128f35..ef46bd670f6 100644 --- a/examples/v1/downtimes/UpdateDowntime.java +++ b/examples/v1/downtimes/UpdateDowntime.java @@ -1,9 +1,16 @@ // Update a downtime returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.DowntimesApi; import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.Downtime; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,10 +20,9 @@ public static void main(String[] args) { // there is a valid "downtime" in the system Long DOWNTIME_ID = Long.parseLong(System.getenv("DOWNTIME_ID")); - Downtime body = - new Downtime() - .message("Example-Update_a_downtime_returns_OK_response-updated") - .muteFirstRecoveryNotification(true); + Downtime body = new Downtime() +.message("Example-Update_a_downtime_returns_OK_response-updated") +.muteFirstRecoveryNotification(true); try { Downtime result = apiInstance.updateDowntime(DOWNTIME_ID, body); @@ -29,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/events/CreateEvent.java b/examples/v1/events/CreateEvent.java index aaac3500fad..2c4f393f1f8 100644 --- a/examples/v1/events/CreateEvent.java +++ b/examples/v1/events/CreateEvent.java @@ -1,22 +1,26 @@ // Post an event returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.EventsApi; -import com.datadog.api.client.v1.model.EventCreateRequest; import com.datadog.api.client.v1.model.EventCreateResponse; +import com.datadog.api.client.v1.model.EventCreateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); EventsApi apiInstance = new EventsApi(defaultClient); - EventCreateRequest body = - new EventCreateRequest() - .title("Example-Post_an_event_returns_OK_response") - .text("A text message.") - .tags(Collections.singletonList("test:ExamplePostaneventreturnsOKresponse")); + EventCreateRequest body = new EventCreateRequest() +.title("Example-Post_an_event_returns_OK_response") +.text("A text message.") +.tags(Collections.singletonList("test:ExamplePostaneventreturnsOKresponse")); try { EventCreateResponse result = apiInstance.createEvent(body); @@ -29,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/events/CreateEvent_19927815.java b/examples/v1/events/CreateEvent_19927815.java index d4adb9811f9..217c8249e8b 100644 --- a/examples/v1/events/CreateEvent_19927815.java +++ b/examples/v1/events/CreateEvent_19927815.java @@ -1,27 +1,26 @@ // Post an event with a long title returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.EventsApi; -import com.datadog.api.client.v1.model.EventCreateRequest; import com.datadog.api.client.v1.model.EventCreateResponse; +import com.datadog.api.client.v1.model.EventCreateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); EventsApi apiInstance = new EventsApi(defaultClient); - EventCreateRequest body = - new EventCreateRequest() - .title( - "Example-Post_an_event_with_a_long_title_returns_OK_response very very very" - + " looooooooong looooooooooooong loooooooooooooooooooooong" - + " looooooooooooooooooooooooooong title with 100+ characters") - .text("A text message.") - .tags( - Collections.singletonList( - "test:ExamplePostaneventwithalongtitlereturnsOKresponse")); + EventCreateRequest body = new EventCreateRequest() +.title("Example-Post_an_event_with_a_long_title_returns_OK_response very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong title with 100+ characters") +.text("A text message.") +.tags(Collections.singletonList("test:ExamplePostaneventwithalongtitlereturnsOKresponse")); try { EventCreateResponse result = apiInstance.createEvent(body); @@ -34,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/events/GetEvent.java b/examples/v1/events/GetEvent.java index 14e182ee170..33f327d985f 100644 --- a/examples/v1/events/GetEvent.java +++ b/examples/v1/events/GetEvent.java @@ -1,9 +1,15 @@ // Get an event returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.EventsApi; import com.datadog.api.client.v1.model.EventResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/events/ListEvents.java b/examples/v1/events/ListEvents.java index 5a0c35d82e3..700e2a87e92 100644 --- a/examples/v1/events/ListEvents.java +++ b/examples/v1/events/ListEvents.java @@ -1,9 +1,15 @@ // Get a list of events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.EventsApi; import com.datadog.api.client.v1.model.EventListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/gcp-integration/CreateGCPIntegration.java b/examples/v1/gcp-integration/CreateGCPIntegration.java index ac8724cbd3d..6220d6c4df0 100644 --- a/examples/v1/gcp-integration/CreateGCPIntegration.java +++ b/examples/v1/gcp-integration/CreateGCPIntegration.java @@ -1,31 +1,35 @@ // Create a GCP integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.GcpIntegrationApi; import com.datadog.api.client.v1.model.GCPAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); GcpIntegrationApi apiInstance = new GcpIntegrationApi(defaultClient); - GCPAccount body = - new GCPAccount() - .authProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") - .authUri("https://accounts.google.com/o/oauth2/auth") - .clientEmail("api-dev@datadog-sandbox.iam.gserviceaccount.com") - .clientId("123456712345671234567") - .clientX509CertUrl("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .isCspmEnabled(true) - .privateKey("private_key") - .privateKeyId("123456789abcdefghi123456789abcdefghijklm") - .projectId("datadog-apitest") - .tokenUri("https://accounts.google.com/o/oauth2/token") - .type("service_account"); + GCPAccount body = new GCPAccount() +.authProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") +.authUri("https://accounts.google.com/o/oauth2/auth") +.clientEmail("api-dev@datadog-sandbox.iam.gserviceaccount.com") +.clientId("123456712345671234567") +.clientX509CertUrl("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.isCspmEnabled(true) +.privateKey("private_key") +.privateKeyId("123456789abcdefghi123456789abcdefghijklm") +.projectId("datadog-apitest") +.tokenUri("https://accounts.google.com/o/oauth2/token") +.type("service_account"); try { apiInstance.createGCPIntegration(body); @@ -37,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/gcp-integration/DeleteGCPIntegration.java b/examples/v1/gcp-integration/DeleteGCPIntegration.java index dfc7cf7795b..3fe9a98db62 100644 --- a/examples/v1/gcp-integration/DeleteGCPIntegration.java +++ b/examples/v1/gcp-integration/DeleteGCPIntegration.java @@ -1,31 +1,35 @@ // Delete a GCP integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.GcpIntegrationApi; import com.datadog.api.client.v1.model.GCPAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); GcpIntegrationApi apiInstance = new GcpIntegrationApi(defaultClient); - GCPAccount body = - new GCPAccount() - .authProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") - .authUri("https://accounts.google.com/o/oauth2/auth") - .clientEmail("api-dev@datadog-sandbox.iam.gserviceaccount.com") - .clientId("123456712345671234567") - .clientX509CertUrl("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .isCspmEnabled(true) - .privateKey("private_key") - .privateKeyId("123456789abcdefghi123456789abcdefghijklm") - .projectId("datadog-apitest") - .tokenUri("https://accounts.google.com/o/oauth2/token") - .type("service_account"); + GCPAccount body = new GCPAccount() +.authProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") +.authUri("https://accounts.google.com/o/oauth2/auth") +.clientEmail("api-dev@datadog-sandbox.iam.gserviceaccount.com") +.clientId("123456712345671234567") +.clientX509CertUrl("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.isCspmEnabled(true) +.privateKey("private_key") +.privateKeyId("123456789abcdefghi123456789abcdefghijklm") +.projectId("datadog-apitest") +.tokenUri("https://accounts.google.com/o/oauth2/token") +.type("service_account"); try { apiInstance.deleteGCPIntegration(body); @@ -37,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/gcp-integration/ListGCPIntegration.java b/examples/v1/gcp-integration/ListGCPIntegration.java index cf56ef8121c..419258eb87d 100644 --- a/examples/v1/gcp-integration/ListGCPIntegration.java +++ b/examples/v1/gcp-integration/ListGCPIntegration.java @@ -1,10 +1,15 @@ // List all GCP integrations returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.GcpIntegrationApi; import com.datadog.api.client.v1.model.GCPAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/gcp-integration/UpdateGCPIntegration.java b/examples/v1/gcp-integration/UpdateGCPIntegration.java index 0c4cb831778..c9a598b25d9 100644 --- a/examples/v1/gcp-integration/UpdateGCPIntegration.java +++ b/examples/v1/gcp-integration/UpdateGCPIntegration.java @@ -1,31 +1,35 @@ // Update a GCP integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.GcpIntegrationApi; import com.datadog.api.client.v1.model.GCPAccount; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); GcpIntegrationApi apiInstance = new GcpIntegrationApi(defaultClient); - GCPAccount body = - new GCPAccount() - .authProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") - .authUri("https://accounts.google.com/o/oauth2/auth") - .clientEmail("api-dev@datadog-sandbox.iam.gserviceaccount.com") - .clientId("123456712345671234567") - .clientX509CertUrl("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL") - .errors(Collections.singletonList("*")) - .hostFilters("key:value,filter:example") - .isCspmEnabled(true) - .privateKey("private_key") - .privateKeyId("123456789abcdefghi123456789abcdefghijklm") - .projectId("datadog-apitest") - .tokenUri("https://accounts.google.com/o/oauth2/token") - .type("service_account"); + GCPAccount body = new GCPAccount() +.authProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") +.authUri("https://accounts.google.com/o/oauth2/auth") +.clientEmail("api-dev@datadog-sandbox.iam.gserviceaccount.com") +.clientId("123456712345671234567") +.clientX509CertUrl("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL") +.errors(Collections.singletonList("*")) +.hostFilters("key:value,filter:example") +.isCspmEnabled(true) +.privateKey("private_key") +.privateKeyId("123456789abcdefghi123456789abcdefghijklm") +.projectId("datadog-apitest") +.tokenUri("https://accounts.google.com/o/oauth2/token") +.type("service_account"); try { apiInstance.updateGCPIntegration(body); @@ -37,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/hosts/GetHostTotals.java b/examples/v1/hosts/GetHostTotals.java index 80f0ea2050d..3e9f32c8714 100644 --- a/examples/v1/hosts/GetHostTotals.java +++ b/examples/v1/hosts/GetHostTotals.java @@ -1,9 +1,15 @@ // Get the total number of active hosts returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.HostsApi; import com.datadog.api.client.v1.model.HostTotals; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/hosts/ListHosts.java b/examples/v1/hosts/ListHosts.java index ce377118213..b3b1fbca8a0 100644 --- a/examples/v1/hosts/ListHosts.java +++ b/examples/v1/hosts/ListHosts.java @@ -1,10 +1,16 @@ // Get all hosts for your organization returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.HostsApi; import com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters; import com.datadog.api.client.v1.model.HostListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +18,7 @@ public static void main(String[] args) { HostsApi apiInstance = new HostsApi(defaultClient); try { - HostListResponse result = - apiInstance.listHosts(new ListHostsOptionalParameters().filter("env:ci")); + HostListResponse result = apiInstance.listHosts(new ListHostsOptionalParameters().filter("env:ci")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling HostsApi#listHosts"); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/hosts/ListHosts_2975406675.java b/examples/v1/hosts/ListHosts_2975406675.java index b03d71a5da8..37f2817e4d2 100644 --- a/examples/v1/hosts/ListHosts_2975406675.java +++ b/examples/v1/hosts/ListHosts_2975406675.java @@ -1,10 +1,16 @@ // Get all hosts with metadata for your organization returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.HostsApi; import com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters; import com.datadog.api.client.v1.model.HostListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +18,7 @@ public static void main(String[] args) { HostsApi apiInstance = new HostsApi(defaultClient); try { - HostListResponse result = - apiInstance.listHosts(new ListHostsOptionalParameters().includeHostsMetadata(true)); + HostListResponse result = apiInstance.listHosts(new ListHostsOptionalParameters().includeHostsMetadata(true)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling HostsApi#listHosts"); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/hosts/ListHosts_347346033.java b/examples/v1/hosts/ListHosts_347346033.java index d0d333b48e4..963aa9134e8 100644 --- a/examples/v1/hosts/ListHosts_347346033.java +++ b/examples/v1/hosts/ListHosts_347346033.java @@ -1,10 +1,16 @@ // Get all hosts with metadata deserializes successfully -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.HostsApi; import com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters; import com.datadog.api.client.v1.model.HostListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +18,7 @@ public static void main(String[] args) { HostsApi apiInstance = new HostsApi(defaultClient); try { - HostListResponse result = - apiInstance.listHosts(new ListHostsOptionalParameters().includeHostsMetadata(true)); + HostListResponse result = apiInstance.listHosts(new ListHostsOptionalParameters().includeHostsMetadata(true)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling HostsApi#listHosts"); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/hosts/MuteHost.java b/examples/v1/hosts/MuteHost.java index fc1a96f1130..cddf66e2cf2 100644 --- a/examples/v1/hosts/MuteHost.java +++ b/examples/v1/hosts/MuteHost.java @@ -1,21 +1,26 @@ // Mute a host returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.HostsApi; import com.datadog.api.client.v1.model.HostMuteResponse; import com.datadog.api.client.v1.model.HostMuteSettings; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); HostsApi apiInstance = new HostsApi(defaultClient); - HostMuteSettings body = - new HostMuteSettings() - .end(1579098130L) - .message("Muting this host for a test!") - .override(false); + HostMuteSettings body = new HostMuteSettings() +.end(1579098130L) +.message("Muting this host for a test!") +.override(false); try { HostMuteResponse result = apiInstance.muteHost("host_name", body); @@ -28,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/hosts/UnmuteHost.java b/examples/v1/hosts/UnmuteHost.java index ff0e2b9c9cb..a8aafdbc564 100644 --- a/examples/v1/hosts/UnmuteHost.java +++ b/examples/v1/hosts/UnmuteHost.java @@ -1,9 +1,15 @@ // Unmute a host returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.HostsApi; import com.datadog.api.client.v1.model.HostMuteResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/ip-ranges/GetIPRanges.java b/examples/v1/ip-ranges/GetIPRanges.java index 54898ac7fc9..dac7074c202 100644 --- a/examples/v1/ip-ranges/GetIPRanges.java +++ b/examples/v1/ip-ranges/GetIPRanges.java @@ -1,9 +1,15 @@ // List IP Ranges returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.IpRangesApi; import com.datadog.api.client.v1.model.IPRanges; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/CreateAPIKey.java b/examples/v1/key-management/CreateAPIKey.java index e60d619869c..86afc9f9c19 100644 --- a/examples/v1/key-management/CreateAPIKey.java +++ b/examples/v1/key-management/CreateAPIKey.java @@ -1,17 +1,24 @@ // Create an API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; -import com.datadog.api.client.v1.model.ApiKey; import com.datadog.api.client.v1.model.ApiKeyResponse; +import com.datadog.api.client.v1.model.ApiKey; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApiKey body = new ApiKey().name("example user"); + ApiKey body = new ApiKey() +.name("example user"); try { ApiKeyResponse result = apiInstance.createAPIKey(body); @@ -24,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/CreateApplicationKey.java b/examples/v1/key-management/CreateApplicationKey.java index 0160c976396..32e0df27051 100644 --- a/examples/v1/key-management/CreateApplicationKey.java +++ b/examples/v1/key-management/CreateApplicationKey.java @@ -1,17 +1,24 @@ // Create an application key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; -import com.datadog.api.client.v1.model.ApplicationKey; import com.datadog.api.client.v1.model.ApplicationKeyResponse; +import com.datadog.api.client.v1.model.ApplicationKey; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApplicationKey body = new ApplicationKey().name("example user"); + ApplicationKey body = new ApplicationKey() +.name("example user"); try { ApplicationKeyResponse result = apiInstance.createApplicationKey(body); @@ -24,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/DeleteAPIKey.java b/examples/v1/key-management/DeleteAPIKey.java index 2dddab44767..227539becda 100644 --- a/examples/v1/key-management/DeleteAPIKey.java +++ b/examples/v1/key-management/DeleteAPIKey.java @@ -1,9 +1,15 @@ // Delete an API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; import com.datadog.api.client.v1.model.ApiKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/DeleteApplicationKey.java b/examples/v1/key-management/DeleteApplicationKey.java index 10d73c99580..4271f2e23ff 100644 --- a/examples/v1/key-management/DeleteApplicationKey.java +++ b/examples/v1/key-management/DeleteApplicationKey.java @@ -1,9 +1,15 @@ // Delete an application key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; import com.datadog.api.client.v1.model.ApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/GetAPIKey.java b/examples/v1/key-management/GetAPIKey.java index d546b7546de..98f1e35939e 100644 --- a/examples/v1/key-management/GetAPIKey.java +++ b/examples/v1/key-management/GetAPIKey.java @@ -1,9 +1,15 @@ // Get API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; import com.datadog.api.client.v1.model.ApiKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/GetApplicationKey.java b/examples/v1/key-management/GetApplicationKey.java index 3a258c4c8d4..c281f28ebac 100644 --- a/examples/v1/key-management/GetApplicationKey.java +++ b/examples/v1/key-management/GetApplicationKey.java @@ -1,9 +1,15 @@ // Get an application key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; import com.datadog.api.client.v1.model.ApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/ListAPIKeys.java b/examples/v1/key-management/ListAPIKeys.java index 536a954de43..4eb3436bf58 100644 --- a/examples/v1/key-management/ListAPIKeys.java +++ b/examples/v1/key-management/ListAPIKeys.java @@ -1,9 +1,15 @@ // Get all API keys returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; import com.datadog.api.client.v1.model.ApiKeyListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/ListApplicationKeys.java b/examples/v1/key-management/ListApplicationKeys.java index 9c01b680bae..a7280ddce2d 100644 --- a/examples/v1/key-management/ListApplicationKeys.java +++ b/examples/v1/key-management/ListApplicationKeys.java @@ -1,9 +1,15 @@ // Get all application keys returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; import com.datadog.api.client.v1.model.ApplicationKeyListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/UpdateAPIKey.java b/examples/v1/key-management/UpdateAPIKey.java index bfa4b4dd621..3b52d620bb7 100644 --- a/examples/v1/key-management/UpdateAPIKey.java +++ b/examples/v1/key-management/UpdateAPIKey.java @@ -1,17 +1,24 @@ // Edit an API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; -import com.datadog.api.client.v1.model.ApiKey; import com.datadog.api.client.v1.model.ApiKeyResponse; +import com.datadog.api.client.v1.model.ApiKey; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApiKey body = new ApiKey().name("example user"); + ApiKey body = new ApiKey() +.name("example user"); try { ApiKeyResponse result = apiInstance.updateAPIKey("key", body); @@ -24,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/key-management/UpdateApplicationKey.java b/examples/v1/key-management/UpdateApplicationKey.java index afa70e9f049..a8bb8808432 100644 --- a/examples/v1/key-management/UpdateApplicationKey.java +++ b/examples/v1/key-management/UpdateApplicationKey.java @@ -1,17 +1,24 @@ // Edit an application key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.KeyManagementApi; -import com.datadog.api.client.v1.model.ApplicationKey; import com.datadog.api.client.v1.model.ApplicationKeyResponse; +import com.datadog.api.client.v1.model.ApplicationKey; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApplicationKey body = new ApplicationKey().name("example user"); + ApplicationKey body = new ApplicationKey() +.name("example user"); try { ApplicationKeyResponse result = apiInstance.updateApplicationKey("key", body); @@ -24,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-indexes/CreateLogsIndex.java b/examples/v1/logs-indexes/CreateLogsIndex.java index a49f52d64e5..78331c4b793 100644 --- a/examples/v1/logs-indexes/CreateLogsIndex.java +++ b/examples/v1/logs-indexes/CreateLogsIndex.java @@ -1,30 +1,36 @@ // Create an index returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsIndexesApi; +import com.datadog.api.client.v1.model.LogsIndex; import com.datadog.api.client.v1.model.LogsExclusion; import com.datadog.api.client.v1.model.LogsExclusionFilter; import com.datadog.api.client.v1.model.LogsFilter; import com.datadog.api.client.v1.model.LogsIndex; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsIndexesApi apiInstance = new LogsIndexesApi(defaultClient); - LogsIndex body = - new LogsIndex() - .dailyLimit(300000000L) - .exclusionFilters( - Collections.singletonList( - new LogsExclusion() - .filter(new LogsExclusionFilter().query("*").sampleRate(1.0)) - .name("payment"))) - .filter(new LogsFilter().query("source:python")) - .name("main") - .numRetentionDays(15L); + LogsIndex body = new LogsIndex() +.dailyLimit(300000000L) +.exclusionFilters(Collections.singletonList(new LogsExclusion() +.filter(new LogsExclusionFilter() +.query("*") +.sampleRate(1.0)) +.name("payment"))) +.filter(new LogsFilter() +.query("source:python")) +.name("main") +.numRetentionDays(15L); try { LogsIndex result = apiInstance.createLogsIndex(body); @@ -37,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-indexes/GetLogsIndex.java b/examples/v1/logs-indexes/GetLogsIndex.java index 2fda9787fe9..fcb9d5ba985 100644 --- a/examples/v1/logs-indexes/GetLogsIndex.java +++ b/examples/v1/logs-indexes/GetLogsIndex.java @@ -1,9 +1,15 @@ // Get an index returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsIndexesApi; import com.datadog.api.client.v1.model.LogsIndex; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-indexes/GetLogsIndexOrder.java b/examples/v1/logs-indexes/GetLogsIndexOrder.java index b7a162f089a..49794fac2d5 100644 --- a/examples/v1/logs-indexes/GetLogsIndexOrder.java +++ b/examples/v1/logs-indexes/GetLogsIndexOrder.java @@ -1,9 +1,15 @@ // Get indexes order returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsIndexesApi; import com.datadog.api.client.v1.model.LogsIndexesOrder; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-indexes/ListLogIndexes.java b/examples/v1/logs-indexes/ListLogIndexes.java index c8b6b128148..ab0db90c22c 100644 --- a/examples/v1/logs-indexes/ListLogIndexes.java +++ b/examples/v1/logs-indexes/ListLogIndexes.java @@ -1,9 +1,15 @@ // Get all indexes returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsIndexesApi; import com.datadog.api.client.v1.model.LogsIndexListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-indexes/UpdateLogsIndex.java b/examples/v1/logs-indexes/UpdateLogsIndex.java index 78bd6355634..cf63fa6afc4 100644 --- a/examples/v1/logs-indexes/UpdateLogsIndex.java +++ b/examples/v1/logs-indexes/UpdateLogsIndex.java @@ -1,31 +1,36 @@ // Update an index returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsIndexesApi; +import com.datadog.api.client.v1.model.LogsIndex; import com.datadog.api.client.v1.model.LogsExclusion; import com.datadog.api.client.v1.model.LogsExclusionFilter; import com.datadog.api.client.v1.model.LogsFilter; -import com.datadog.api.client.v1.model.LogsIndex; import com.datadog.api.client.v1.model.LogsIndexUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsIndexesApi apiInstance = new LogsIndexesApi(defaultClient); - LogsIndexUpdateRequest body = - new LogsIndexUpdateRequest() - .dailyLimit(300000000L) - .disableDailyLimit(false) - .exclusionFilters( - Collections.singletonList( - new LogsExclusion() - .filter(new LogsExclusionFilter().query("*").sampleRate(1.0)) - .name("payment"))) - .filter(new LogsFilter().query("source:python")) - .numRetentionDays(15L); + LogsIndexUpdateRequest body = new LogsIndexUpdateRequest() +.dailyLimit(300000000L) +.disableDailyLimit(false) +.exclusionFilters(Collections.singletonList(new LogsExclusion() +.filter(new LogsExclusionFilter() +.query("*") +.sampleRate(1.0)) +.name("payment"))) +.filter(new LogsFilter() +.query("source:python")) +.numRetentionDays(15L); try { LogsIndex result = apiInstance.updateLogsIndex("name", body); @@ -38,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-indexes/UpdateLogsIndexOrder.java b/examples/v1/logs-indexes/UpdateLogsIndexOrder.java index c5760206e46..2da74012bc8 100644 --- a/examples/v1/logs-indexes/UpdateLogsIndexOrder.java +++ b/examples/v1/logs-indexes/UpdateLogsIndexOrder.java @@ -1,18 +1,24 @@ // Update indexes order returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsIndexesApi; import com.datadog.api.client.v1.model.LogsIndexesOrder; +import com.datadog.api.client.v1.model.LogsIndexesOrder; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsIndexesApi apiInstance = new LogsIndexesApi(defaultClient); - LogsIndexesOrder body = - new LogsIndexesOrder().indexNames(Arrays.asList("main", "payments", "web")); + LogsIndexesOrder body = new LogsIndexesOrder() +.indexNames(Arrays.asList("main", "payments", "web")); try { LogsIndexesOrder result = apiInstance.updateLogsIndexOrder(body); @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/CreateLogsPipeline.java b/examples/v1/logs-pipelines/CreateLogsPipeline.java index 653c2920035..53e2e31b963 100644 --- a/examples/v1/logs-pipelines/CreateLogsPipeline.java +++ b/examples/v1/logs-pipelines/CreateLogsPipeline.java @@ -1,44 +1,47 @@ // Create a pipeline returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; +import com.datadog.api.client.v1.model.LogsPipeline; import com.datadog.api.client.v1.model.LogsFilter; import com.datadog.api.client.v1.model.LogsGrokParser; import com.datadog.api.client.v1.model.LogsGrokParserRules; import com.datadog.api.client.v1.model.LogsGrokParserType; import com.datadog.api.client.v1.model.LogsPipeline; import com.datadog.api.client.v1.model.LogsProcessor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsPipelinesApi apiInstance = new LogsPipelinesApi(defaultClient); - LogsPipeline body = - new LogsPipeline() - .filter(new LogsFilter().query("source:python")) - .name("") - .processors( - Collections.singletonList( - new LogsProcessor( - new LogsGrokParser() - .grok( - new LogsGrokParserRules() - .matchRules(""" + LogsPipeline body = new LogsPipeline() +.filter(new LogsFilter() +.query("source:python")) +.name("") +.processors(Collections.singletonList(new LogsProcessor( +new LogsGrokParser() +.grok(new LogsGrokParserRules() +.matchRules(""" rule_name_1 foo rule_name_2 bar """) - .supportRules(""" +.supportRules(""" rule_name_1 foo rule_name_2 bar """)) - .isEnabled(false) - .source("message") - .type(LogsGrokParserType.GROK_PARSER)))); +.isEnabled(false) +.source("message") +.type(LogsGrokParserType.GROK_PARSER)))); try { LogsPipeline result = apiInstance.createLogsPipeline(body); @@ -51,4 +54,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/DeleteLogsPipeline.java b/examples/v1/logs-pipelines/DeleteLogsPipeline.java index 0b6e4568d8b..8ef74ab98f7 100644 --- a/examples/v1/logs-pipelines/DeleteLogsPipeline.java +++ b/examples/v1/logs-pipelines/DeleteLogsPipeline.java @@ -1,8 +1,14 @@ // Delete a pipeline returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/GetLogsPipeline.java b/examples/v1/logs-pipelines/GetLogsPipeline.java index 50b128697a0..be0c602c82c 100644 --- a/examples/v1/logs-pipelines/GetLogsPipeline.java +++ b/examples/v1/logs-pipelines/GetLogsPipeline.java @@ -1,9 +1,15 @@ // Get a pipeline returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; import com.datadog.api.client.v1.model.LogsPipeline; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/GetLogsPipelineOrder.java b/examples/v1/logs-pipelines/GetLogsPipelineOrder.java index 8bcac02f3b2..cfec2de3f34 100644 --- a/examples/v1/logs-pipelines/GetLogsPipelineOrder.java +++ b/examples/v1/logs-pipelines/GetLogsPipelineOrder.java @@ -1,9 +1,15 @@ // Get pipeline order returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; import com.datadog.api.client.v1.model.LogsPipelinesOrder; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/ListLogsPipelines.java b/examples/v1/logs-pipelines/ListLogsPipelines.java index 9eec8fdee39..3f1487cd2a3 100644 --- a/examples/v1/logs-pipelines/ListLogsPipelines.java +++ b/examples/v1/logs-pipelines/ListLogsPipelines.java @@ -1,10 +1,15 @@ // Get all pipelines returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; import com.datadog.api.client.v1.model.LogsPipeline; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/UpdateLogsPipeline.java b/examples/v1/logs-pipelines/UpdateLogsPipeline.java index bf5e4f82fe3..8dc6e118cd9 100644 --- a/examples/v1/logs-pipelines/UpdateLogsPipeline.java +++ b/examples/v1/logs-pipelines/UpdateLogsPipeline.java @@ -1,44 +1,47 @@ // Update a pipeline returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; +import com.datadog.api.client.v1.model.LogsPipeline; import com.datadog.api.client.v1.model.LogsFilter; import com.datadog.api.client.v1.model.LogsGrokParser; import com.datadog.api.client.v1.model.LogsGrokParserRules; import com.datadog.api.client.v1.model.LogsGrokParserType; import com.datadog.api.client.v1.model.LogsPipeline; import com.datadog.api.client.v1.model.LogsProcessor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsPipelinesApi apiInstance = new LogsPipelinesApi(defaultClient); - LogsPipeline body = - new LogsPipeline() - .filter(new LogsFilter().query("source:python")) - .name("") - .processors( - Collections.singletonList( - new LogsProcessor( - new LogsGrokParser() - .grok( - new LogsGrokParserRules() - .matchRules(""" + LogsPipeline body = new LogsPipeline() +.filter(new LogsFilter() +.query("source:python")) +.name("") +.processors(Collections.singletonList(new LogsProcessor( +new LogsGrokParser() +.grok(new LogsGrokParserRules() +.matchRules(""" rule_name_1 foo rule_name_2 bar """) - .supportRules(""" +.supportRules(""" rule_name_1 foo rule_name_2 bar """)) - .isEnabled(false) - .source("message") - .type(LogsGrokParserType.GROK_PARSER)))); +.isEnabled(false) +.source("message") +.type(LogsGrokParserType.GROK_PARSER)))); try { LogsPipeline result = apiInstance.updateLogsPipeline("pipeline_id", body); @@ -51,4 +54,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.java b/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.java index 97f4d0ee17f..7f17a76c74b 100644 --- a/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.java +++ b/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.java @@ -1,18 +1,24 @@ // Update pipeline order returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsPipelinesApi; import com.datadog.api.client.v1.model.LogsPipelinesOrder; +import com.datadog.api.client.v1.model.LogsPipelinesOrder; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsPipelinesApi apiInstance = new LogsPipelinesApi(defaultClient); - LogsPipelinesOrder body = - new LogsPipelinesOrder().pipelineIds(Arrays.asList("tags", "org_ids", "products")); + LogsPipelinesOrder body = new LogsPipelinesOrder() +.pipelineIds(Arrays.asList("tags", "org_ids", "products")); try { LogsPipelinesOrder result = apiInstance.updateLogsPipelineOrder(body); @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs/ListLogs.java b/examples/v1/logs/ListLogs.java index f1f2c135776..4f4d37af22a 100644 --- a/examples/v1/logs/ListLogs.java +++ b/examples/v1/logs/ListLogs.java @@ -1,28 +1,31 @@ // Search logs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsApi; +import com.datadog.api.client.v1.model.LogsListResponse; import com.datadog.api.client.v1.model.LogsListRequest; import com.datadog.api.client.v1.model.LogsListRequestTime; -import com.datadog.api.client.v1.model.LogsListResponse; import com.datadog.api.client.v1.model.LogsSort; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsListRequest body = - new LogsListRequest() - .index("retention-3,retention-15") - .query("service:web* AND @http.status_code:[200 TO 299]") - .sort(LogsSort.TIME_ASCENDING) - .time( - new LogsListRequestTime() - .from(OffsetDateTime.parse("2020-02-02T02:02:02.202Z")) - .to(OffsetDateTime.parse("2020-02-20T02:02:02.202Z"))); + LogsListRequest body = new LogsListRequest() +.index("retention-3,retention-15") +.query("service:web* AND @http.status_code:[200 TO 299]") +.sort(LogsSort.TIME_ASCENDING) +.time(new LogsListRequestTime() +.from(OffsetDateTime.parse("2020-02-02T02:02:02.202Z")) +.to(OffsetDateTime.parse("2020-02-20T02:02:02.202Z"))); try { LogsListResponse result = apiInstance.listLogs(body); @@ -35,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs/ListLogs_235998668.java b/examples/v1/logs/ListLogs_235998668.java index 9b9325d1359..38b7a7f73ad 100644 --- a/examples/v1/logs/ListLogs_235998668.java +++ b/examples/v1/logs/ListLogs_235998668.java @@ -1,28 +1,33 @@ // Search test logs returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsApi; +import com.datadog.api.client.v1.model.LogsListResponse; import com.datadog.api.client.v1.model.LogsListRequest; import com.datadog.api.client.v1.model.LogsListRequestTime; -import com.datadog.api.client.v1.model.LogsListResponse; import com.datadog.api.client.v1.model.LogsSort; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsListRequest body = - new LogsListRequest() - .index("main") - .query("host:Test*") - .sort(LogsSort.TIME_ASCENDING) - .time( - new LogsListRequestTime() - .from(OffsetDateTime.now().plusHours(-1)) - .timezone("Europe/Paris") - .to(OffsetDateTime.now())); + LogsListRequest body = new LogsListRequest() +.index("main") +.query("host:Test*") +.sort(LogsSort.TIME_ASCENDING) +.time(new LogsListRequestTime() +.from(OffsetDateTime.now().plusHours(-1)) +.timezone("Europe/Paris") +.to(OffsetDateTime.now())); try { LogsListResponse result = apiInstance.listLogs(body); @@ -35,4 +40,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs/SubmitLog.java b/examples/v1/logs/SubmitLog.java index 47b6f37ca3d..599f06082be 100644 --- a/examples/v1/logs/SubmitLog.java +++ b/examples/v1/logs/SubmitLog.java @@ -1,23 +1,24 @@ // Send logs returns "Response from server (always 200 empty JSON)." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsApi; import com.datadog.api.client.v1.model.HTTPLogItem; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - List body = - Collections.singletonList( - new HTTPLogItem() - .message( - "Example-Send_logs_returns_Response_from_server_always_200_empty_JSON_response") - .ddtags("host:ExampleSendlogsreturnsResponsefromserveralways200emptyJSONresponse")); + List body = Collections.singletonList(new HTTPLogItem() +.message("Example-Send_logs_returns_Response_from_server_always_200_empty_JSON_response") +.ddtags("host:ExampleSendlogsreturnsResponsefromserveralways200emptyJSONresponse")); try { apiInstance.submitLog(body); @@ -29,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs/SubmitLog_1920474053.java b/examples/v1/logs/SubmitLog_1920474053.java index b53270c387c..290c6bfa9af 100644 --- a/examples/v1/logs/SubmitLog_1920474053.java +++ b/examples/v1/logs/SubmitLog_1920474053.java @@ -1,30 +1,29 @@ // Send gzip logs returns "Response from server (always 200 empty JSON)." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsApi; import com.datadog.api.client.v1.api.LogsApi.SubmitLogOptionalParameters; import com.datadog.api.client.v1.model.ContentEncoding; import com.datadog.api.client.v1.model.HTTPLogItem; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - List body = - Collections.singletonList( - new HTTPLogItem() - .message( - "Example-Send_gzip_logs_returns_Response_from_server_always_200_empty_JSON_response") - .ddtags( - "host:ExampleSendgziplogsreturnsResponsefromserveralways200emptyJSONresponse")); + List body = Collections.singletonList(new HTTPLogItem() +.message("Example-Send_gzip_logs_returns_Response_from_server_always_200_empty_JSON_response") +.ddtags("host:ExampleSendgziplogsreturnsResponsefromserveralways200emptyJSONresponse")); try { - apiInstance.submitLog( - body, new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.GZIP)); + apiInstance.submitLog(body,new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.GZIP)); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#submitLog"); System.err.println("Status code: " + e.getCode()); @@ -33,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/logs/SubmitLog_3418823904.java b/examples/v1/logs/SubmitLog_3418823904.java index e630f60441c..bc7b6a6bdd4 100644 --- a/examples/v1/logs/SubmitLog_3418823904.java +++ b/examples/v1/logs/SubmitLog_3418823904.java @@ -1,30 +1,29 @@ // Send deflate logs returns "Response from server (always 200 empty JSON)." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.LogsApi; import com.datadog.api.client.v1.api.LogsApi.SubmitLogOptionalParameters; import com.datadog.api.client.v1.model.ContentEncoding; import com.datadog.api.client.v1.model.HTTPLogItem; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - List body = - Collections.singletonList( - new HTTPLogItem() - .message( - "Example-Send_deflate_logs_returns_Response_from_server_always_200_empty_JSON_response") - .ddtags( - "host:ExampleSenddeflatelogsreturnsResponsefromserveralways200emptyJSONresponse")); + List body = Collections.singletonList(new HTTPLogItem() +.message("Example-Send_deflate_logs_returns_Response_from_server_always_200_empty_JSON_response") +.ddtags("host:ExampleSenddeflatelogsreturnsResponsefromserveralways200emptyJSONresponse")); try { - apiInstance.submitLog( - body, new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.DEFLATE)); + apiInstance.submitLog(body,new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.DEFLATE)); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#submitLog"); System.err.println("Status code: " + e.getCode()); @@ -33,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/GetMetricMetadata.java b/examples/v1/metrics/GetMetricMetadata.java index 59dfb1d1cdc..f5ea0d1fa6a 100644 --- a/examples/v1/metrics/GetMetricMetadata.java +++ b/examples/v1/metrics/GetMetricMetadata.java @@ -1,9 +1,15 @@ // Get metric metadata returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.model.MetricMetadata; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/ListActiveMetrics.java b/examples/v1/metrics/ListActiveMetrics.java index 2c117251dab..d059099cacf 100644 --- a/examples/v1/metrics/ListActiveMetrics.java +++ b/examples/v1/metrics/ListActiveMetrics.java @@ -1,9 +1,15 @@ // Get active metrics list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.model.MetricsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/ListMetrics.java b/examples/v1/metrics/ListMetrics.java index 803e112d849..0d0ced75b8c 100644 --- a/examples/v1/metrics/ListMetrics.java +++ b/examples/v1/metrics/ListMetrics.java @@ -1,9 +1,15 @@ // Search metrics returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.model.MetricSearchResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/QueryMetrics.java b/examples/v1/metrics/QueryMetrics.java index 3927287607d..285a72334b2 100644 --- a/examples/v1/metrics/QueryMetrics.java +++ b/examples/v1/metrics/QueryMetrics.java @@ -1,9 +1,16 @@ // Query timeseries points returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.model.MetricsQueryResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,11 +18,7 @@ public static void main(String[] args) { MetricsApi apiInstance = new MetricsApi(defaultClient); try { - MetricsQueryResponse result = - apiInstance.queryMetrics( - OffsetDateTime.now().plusDays(-1).toInstant().getEpochSecond(), - OffsetDateTime.now().toInstant().getEpochSecond(), - "system.cpu.idle{*}"); + MetricsQueryResponse result = apiInstance.queryMetrics(OffsetDateTime.now().plusDays(-1).toInstant().getEpochSecond(), OffsetDateTime.now().toInstant().getEpochSecond(), "system.cpu.idle{*}"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#queryMetrics"); @@ -25,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/SubmitDistributionPoints.java b/examples/v1/metrics/SubmitDistributionPoints.java index da2bd223f2a..31363775790 100644 --- a/examples/v1/metrics/SubmitDistributionPoints.java +++ b/examples/v1/metrics/SubmitDistributionPoints.java @@ -1,34 +1,31 @@ // Submit distribution points returns "Payload accepted" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; +import com.datadog.api.client.v1.model.IntakePayloadAccepted; import com.datadog.api.client.v1.model.DistributionPointItem; import com.datadog.api.client.v1.model.DistributionPointsPayload; import com.datadog.api.client.v1.model.DistributionPointsSeries; -import com.datadog.api.client.v1.model.IntakePayloadAccepted; +import com.datadog.api.client.v1.model.DistributionPointTimestamp; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - DistributionPointsPayload body = - new DistributionPointsPayload() - .series( - Collections.singletonList( - new DistributionPointsSeries() - .metric("system.load.1.dist") - .points( - Collections.singletonList( - Arrays.asList( - new DistributionPointItem( - Long.valueOf( - OffsetDateTime.now().toInstant().getEpochSecond()) - .doubleValue()), - new DistributionPointItem(Arrays.asList(1.0, 2.0))))))); + DistributionPointsPayload body = new DistributionPointsPayload() +.series(Collections.singletonList(new DistributionPointsSeries() +.metric("system.load.1.dist") +.points(Collections.singletonList(Arrays.asList(new DistributionPointItem( +Long.valueOf(OffsetDateTime.now().toInstant().getEpochSecond()).doubleValue()), new DistributionPointItem(Arrays.asList(1.0, 2.0))))))); try { IntakePayloadAccepted result = apiInstance.submitDistributionPoints(body); @@ -41,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/SubmitDistributionPoints_3109558960.java b/examples/v1/metrics/SubmitDistributionPoints_3109558960.java index 53f40374a84..0a59bf696f5 100644 --- a/examples/v1/metrics/SubmitDistributionPoints_3109558960.java +++ b/examples/v1/metrics/SubmitDistributionPoints_3109558960.java @@ -1,43 +1,36 @@ // Submit deflate distribution points returns "Payload accepted" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.api.MetricsApi.SubmitDistributionPointsOptionalParameters; +import com.datadog.api.client.v1.model.IntakePayloadAccepted; import com.datadog.api.client.v1.model.DistributionPointItem; import com.datadog.api.client.v1.model.DistributionPointsContentEncoding; import com.datadog.api.client.v1.model.DistributionPointsPayload; import com.datadog.api.client.v1.model.DistributionPointsSeries; -import com.datadog.api.client.v1.model.IntakePayloadAccepted; +import com.datadog.api.client.v1.model.DistributionPointTimestamp; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - DistributionPointsPayload body = - new DistributionPointsPayload() - .series( - Collections.singletonList( - new DistributionPointsSeries() - .metric("system.load.1.dist") - .points( - Collections.singletonList( - Arrays.asList( - new DistributionPointItem( - Long.valueOf( - OffsetDateTime.now().toInstant().getEpochSecond()) - .doubleValue()), - new DistributionPointItem(Arrays.asList(1.0, 2.0))))))); + DistributionPointsPayload body = new DistributionPointsPayload() +.series(Collections.singletonList(new DistributionPointsSeries() +.metric("system.load.1.dist") +.points(Collections.singletonList(Arrays.asList(new DistributionPointItem( +Long.valueOf(OffsetDateTime.now().toInstant().getEpochSecond()).doubleValue()), new DistributionPointItem(Arrays.asList(1.0, 2.0))))))); try { - IntakePayloadAccepted result = - apiInstance.submitDistributionPoints( - body, - new SubmitDistributionPointsOptionalParameters() - .contentEncoding(DistributionPointsContentEncoding.DEFLATE)); + IntakePayloadAccepted result = apiInstance.submitDistributionPoints(body,new SubmitDistributionPointsOptionalParameters().contentEncoding(DistributionPointsContentEncoding.DEFLATE)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#submitDistributionPoints"); @@ -47,4 +40,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/SubmitMetrics.java b/examples/v1/metrics/SubmitMetrics.java index 5bc897cfa72..f4f81d572fb 100644 --- a/examples/v1/metrics/SubmitMetrics.java +++ b/examples/v1/metrics/SubmitMetrics.java @@ -1,35 +1,30 @@ // Submit metrics returns "Payload accepted" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.model.IntakePayloadAccepted; import com.datadog.api.client.v1.model.MetricsPayload; import com.datadog.api.client.v1.model.Series; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - MetricsPayload body = - new MetricsPayload() - .series( - Collections.singletonList( - new Series() - .metric("system.load.1") - .type("gauge") - .points( - Collections.singletonList( - Arrays.asList( - Long.valueOf(OffsetDateTime.now().toInstant().getEpochSecond()) - .doubleValue(), - 1.1))) - .tags( - Collections.singletonList( - "test:ExampleSubmitmetricsreturnsPayloadacceptedresponse")))); + MetricsPayload body = new MetricsPayload() +.series(Collections.singletonList(new Series() +.metric("system.load.1") +.type("gauge") +.points(Collections.singletonList(Arrays.asList(Long.valueOf(OffsetDateTime.now().toInstant().getEpochSecond()).doubleValue(), 1.1))) +.tags(Collections.singletonList("test:ExampleSubmitmetricsreturnsPayloadacceptedresponse")))); try { IntakePayloadAccepted result = apiInstance.submitMetrics(body); @@ -42,4 +37,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/SubmitMetrics_2203981258.java b/examples/v1/metrics/SubmitMetrics_2203981258.java index 57e61bf9cc3..9b9cb98e513 100644 --- a/examples/v1/metrics/SubmitMetrics_2203981258.java +++ b/examples/v1/metrics/SubmitMetrics_2203981258.java @@ -1,43 +1,35 @@ // Submit deflate metrics returns "Payload accepted" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.api.MetricsApi.SubmitMetricsOptionalParameters; import com.datadog.api.client.v1.model.IntakePayloadAccepted; import com.datadog.api.client.v1.model.MetricContentEncoding; import com.datadog.api.client.v1.model.MetricsPayload; import com.datadog.api.client.v1.model.Series; +import java.io.File; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - MetricsPayload body = - new MetricsPayload() - .series( - Collections.singletonList( - new Series() - .metric("system.load.1") - .type("gauge") - .points( - Collections.singletonList( - Arrays.asList( - Long.valueOf(OffsetDateTime.now().toInstant().getEpochSecond()) - .doubleValue(), - 1.1))) - .tags( - Collections.singletonList( - "test:ExampleSubmitdeflatemetricsreturnsPayloadacceptedresponse")))); + MetricsPayload body = new MetricsPayload() +.series(Collections.singletonList(new Series() +.metric("system.load.1") +.type("gauge") +.points(Collections.singletonList(Arrays.asList(Long.valueOf(OffsetDateTime.now().toInstant().getEpochSecond()).doubleValue(), 1.1))) +.tags(Collections.singletonList("test:ExampleSubmitdeflatemetricsreturnsPayloadacceptedresponse")))); try { - IntakePayloadAccepted result = - apiInstance.submitMetrics( - body, - new SubmitMetricsOptionalParameters().contentEncoding(MetricContentEncoding.DEFLATE)); + IntakePayloadAccepted result = apiInstance.submitMetrics(body,new SubmitMetricsOptionalParameters().contentEncoding(MetricContentEncoding.DEFLATE)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#submitMetrics"); @@ -47,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/metrics/UpdateMetricMetadata.java b/examples/v1/metrics/UpdateMetricMetadata.java index 157ab105909..49db39bc401 100644 --- a/examples/v1/metrics/UpdateMetricMetadata.java +++ b/examples/v1/metrics/UpdateMetricMetadata.java @@ -1,16 +1,26 @@ // Edit metric metadata returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MetricsApi; import com.datadog.api.client.v1.model.MetricMetadata; +import com.datadog.api.client.v1.model.MetricMetadata; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - MetricMetadata body = new MetricMetadata().perUnit("second").type("count").unit("byte"); + MetricMetadata body = new MetricMetadata() +.perUnit("second") +.type("count") +.unit("byte"); try { MetricMetadata result = apiInstance.updateMetricMetadata("metric_name", body); @@ -23,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CheckCanDeleteMonitor.java b/examples/v1/monitors/CheckCanDeleteMonitor.java index a6bf4de2752..d758b25ddf2 100644 --- a/examples/v1/monitors/CheckCanDeleteMonitor.java +++ b/examples/v1/monitors/CheckCanDeleteMonitor.java @@ -1,10 +1,15 @@ // Check if a monitor can be deleted returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.CheckCanDeleteMonitorResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,8 +20,7 @@ public static void main(String[] args) { Long MONITOR_ID = Long.parseLong(System.getenv("MONITOR_ID")); try { - CheckCanDeleteMonitorResponse result = - apiInstance.checkCanDeleteMonitor(Collections.singletonList(MONITOR_ID)); + CheckCanDeleteMonitorResponse result = apiInstance.checkCanDeleteMonitor(Collections.singletonList(MONITOR_ID)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MonitorsApi#checkCanDeleteMonitor"); @@ -26,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor.java b/examples/v1/monitors/CreateMonitor.java index 50d7e9d15cb..74ea9e38c67 100644 --- a/examples/v1/monitors/CreateMonitor.java +++ b/examples/v1/monitors/CreateMonitor.java @@ -1,12 +1,17 @@ // Create a monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,18 +21,16 @@ public static void main(String[] args) { // there is a valid "role" in the system String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID"); - Monitor body = - new Monitor() - .name("Example-Create_a_monitor_returns_OK_response") - .type(MonitorType.LOG_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Create_a_monitor_returns_OK_response") +.type(MonitorType.LOG_ALERT) +.query(""" logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2 """) - .message("some message Notify: @hipchat-channel") - .tags(Arrays.asList("test:examplecreateamonitorreturnsokresponse", "env:ci")) - .priority(3L) - .restrictedRoles(Collections.singletonList(ROLE_DATA_ID)); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplecreateamonitorreturnsokresponse", "env:ci")) +.priority(3L) +.restrictedRoles(Collections.singletonList(ROLE_DATA_ID)); try { Monitor result = apiInstance.createMonitor(body); @@ -40,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_1969035628.java b/examples/v1/monitors/CreateMonitor_1969035628.java index d32d70aee3a..f231c3af9a8 100644 --- a/examples/v1/monitors/CreateMonitor_1969035628.java +++ b/examples/v1/monitors/CreateMonitor_1969035628.java @@ -1,9 +1,10 @@ // Create a ci-tests formula and functions monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventQueryDefinition; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventQueryDefinitionCompute; @@ -13,57 +14,47 @@ import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_a_ci_tests_formula_and_functions_monitor_returns_OK_response") - .type(MonitorType.CI_TESTS_ALERT) - .query(""" + Monitor body = new Monitor() +.name("Example-Create_a_ci_tests_formula_and_functions_monitor_returns_OK_response") +.type(MonitorType.CI_TESTS_ALERT) +.query(""" formula("query1 / query2 * 100").last("15m") >= 0.8 """) - .message("some message Notify: @hipchat-channel") - .tags( - Arrays.asList( - "test:examplecreateacitestsformulaandfunctionsmonitorreturnsokresponse", - "env:ci")) - .priority(3L) - .options( - new MonitorOptions() - .thresholds(new MonitorThresholds().critical(0.8)) - .variables( - Arrays.asList( - new MonitorFormulaAndFunctionQueryDefinition( - new MonitorFormulaAndFunctionEventQueryDefinition() - .dataSource(MonitorFormulaAndFunctionEventsDataSource.CI_TESTS) - .name("query1") - .search( - new MonitorFormulaAndFunctionEventQueryDefinitionSearch() - .query("@test.status:fail")) - .indexes(Collections.singletonList("*")) - .compute( - new MonitorFormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - MonitorFormulaAndFunctionEventAggregation.COUNT))), - new MonitorFormulaAndFunctionQueryDefinition( - new MonitorFormulaAndFunctionEventQueryDefinition() - .dataSource(MonitorFormulaAndFunctionEventsDataSource.CI_TESTS) - .name("query2") - .search( - new MonitorFormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes(Collections.singletonList("*")) - .compute( - new MonitorFormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - MonitorFormulaAndFunctionEventAggregation - .COUNT)))))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplecreateacitestsformulaandfunctionsmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(0.8)) +.variables(Arrays.asList(new MonitorFormulaAndFunctionQueryDefinition( +new MonitorFormulaAndFunctionEventQueryDefinition() +.dataSource(MonitorFormulaAndFunctionEventsDataSource.CI_TESTS) +.name("query1") +.search(new MonitorFormulaAndFunctionEventQueryDefinitionSearch() +.query("@test.status:fail")) +.indexes(Collections.singletonList("*")) +.compute(new MonitorFormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(MonitorFormulaAndFunctionEventAggregation.COUNT))), new MonitorFormulaAndFunctionQueryDefinition( +new MonitorFormulaAndFunctionEventQueryDefinition() +.dataSource(MonitorFormulaAndFunctionEventsDataSource.CI_TESTS) +.name("query2") +.search(new MonitorFormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new MonitorFormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(MonitorFormulaAndFunctionEventAggregation.COUNT)))))); try { Monitor result = apiInstance.createMonitor(body); @@ -76,4 +67,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_2012680290.java b/examples/v1/monitors/CreateMonitor_2012680290.java index 04e37572da8..53d9d54edf3 100644 --- a/examples/v1/monitors/CreateMonitor_2012680290.java +++ b/examples/v1/monitors/CreateMonitor_2012680290.java @@ -1,35 +1,39 @@ // Create a metric monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorOptionsSchedulingOptions; import com.datadog.api.client.v1.model.MonitorOptionsSchedulingOptionsEvaluationWindow; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_a_metric_monitor_returns_OK_response") - .type(MonitorType.METRIC_ALERT) - .query("avg(current_1mo):avg:system.load.5{*} > 0.5") - .message("some message Notify: @hipchat-channel") - .options( - new MonitorOptions() - .thresholds(new MonitorThresholds().critical(0.5)) - .schedulingOptions( - new MonitorOptionsSchedulingOptions() - .evaluationWindow( - new MonitorOptionsSchedulingOptionsEvaluationWindow() - .dayStarts("04:00") - .monthStarts(1)))); + Monitor body = new Monitor() +.name("Example-Create_a_metric_monitor_returns_OK_response") +.type(MonitorType.METRIC_ALERT) +.query("avg(current_1mo):avg:system.load.5{*} > 0.5") +.message("some message Notify: @hipchat-channel") +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(0.5)) +.schedulingOptions(new MonitorOptionsSchedulingOptions() +.evaluationWindow(new MonitorOptionsSchedulingOptionsEvaluationWindow() +.dayStarts("04:00") +.monthStarts(1)))); try { Monitor result = apiInstance.createMonitor(body); @@ -42,4 +46,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_2520912138.java b/examples/v1/monitors/CreateMonitor_2520912138.java index 817908ec724..c51f9f13adb 100644 --- a/examples/v1/monitors/CreateMonitor_2520912138.java +++ b/examples/v1/monitors/CreateMonitor_2520912138.java @@ -1,31 +1,37 @@ // Create a ci-tests monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_a_ci_tests_monitor_returns_OK_response") - .type(MonitorType.CI_TESTS_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Create_a_ci_tests_monitor_returns_OK_response") +.type(MonitorType.CI_TESTS_ALERT) +.query(""" ci-tests("type:test @git.branch:staging* @test.status:fail").rollup("count").by("@test.name").last("5m") >= 1 """) - .message("some message Notify: @hipchat-channel") - .tags(Arrays.asList("test:examplecreateacitestsmonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options(new MonitorOptions().thresholds(new MonitorThresholds().critical(1.0))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplecreateacitestsmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(1.0))); try { Monitor result = apiInstance.createMonitor(body); @@ -38,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_3790803616.java b/examples/v1/monitors/CreateMonitor_3790803616.java index f099db05818..4a962a29b6f 100644 --- a/examples/v1/monitors/CreateMonitor_3790803616.java +++ b/examples/v1/monitors/CreateMonitor_3790803616.java @@ -1,31 +1,37 @@ // Create a ci-pipelines monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_a_ci_pipelines_monitor_returns_OK_response") - .type(MonitorType.CI_PIPELINES_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Create_a_ci_pipelines_monitor_returns_OK_response") +.type(MonitorType.CI_PIPELINES_ALERT) +.query(""" ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1 """) - .message("some message Notify: @hipchat-channel") - .tags(Arrays.asList("test:examplecreateacipipelinesmonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options(new MonitorOptions().thresholds(new MonitorThresholds().critical(1.0))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplecreateacipipelinesmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(1.0))); try { Monitor result = apiInstance.createMonitor(body); @@ -38,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_3824294658.java b/examples/v1/monitors/CreateMonitor_3824294658.java index 33a106f32a4..0dcee3af608 100644 --- a/examples/v1/monitors/CreateMonitor_3824294658.java +++ b/examples/v1/monitors/CreateMonitor_3824294658.java @@ -1,9 +1,10 @@ // Create a ci-pipelines formula and functions monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventQueryDefinition; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventQueryDefinitionCompute; @@ -13,59 +14,47 @@ import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_a_ci_pipelines_formula_and_functions_monitor_returns_OK_response") - .type(MonitorType.CI_PIPELINES_ALERT) - .query(""" + Monitor body = new Monitor() +.name("Example-Create_a_ci_pipelines_formula_and_functions_monitor_returns_OK_response") +.type(MonitorType.CI_PIPELINES_ALERT) +.query(""" formula("query1 / query2 * 100").last("15m") >= 0.8 """) - .message("some message Notify: @hipchat-channel") - .tags( - Arrays.asList( - "test:examplecreateacipipelinesformulaandfunctionsmonitorreturnsokresponse", - "env:ci")) - .priority(3L) - .options( - new MonitorOptions() - .thresholds(new MonitorThresholds().critical(0.8)) - .variables( - Arrays.asList( - new MonitorFormulaAndFunctionQueryDefinition( - new MonitorFormulaAndFunctionEventQueryDefinition() - .dataSource( - MonitorFormulaAndFunctionEventsDataSource.CI_PIPELINES) - .name("query1") - .search( - new MonitorFormulaAndFunctionEventQueryDefinitionSearch() - .query("@ci.status:error")) - .indexes(Collections.singletonList("*")) - .compute( - new MonitorFormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - MonitorFormulaAndFunctionEventAggregation.COUNT))), - new MonitorFormulaAndFunctionQueryDefinition( - new MonitorFormulaAndFunctionEventQueryDefinition() - .dataSource( - MonitorFormulaAndFunctionEventsDataSource.CI_PIPELINES) - .name("query2") - .search( - new MonitorFormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes(Collections.singletonList("*")) - .compute( - new MonitorFormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - MonitorFormulaAndFunctionEventAggregation - .COUNT)))))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplecreateacipipelinesformulaandfunctionsmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(0.8)) +.variables(Arrays.asList(new MonitorFormulaAndFunctionQueryDefinition( +new MonitorFormulaAndFunctionEventQueryDefinition() +.dataSource(MonitorFormulaAndFunctionEventsDataSource.CI_PIPELINES) +.name("query1") +.search(new MonitorFormulaAndFunctionEventQueryDefinitionSearch() +.query("@ci.status:error")) +.indexes(Collections.singletonList("*")) +.compute(new MonitorFormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(MonitorFormulaAndFunctionEventAggregation.COUNT))), new MonitorFormulaAndFunctionQueryDefinition( +new MonitorFormulaAndFunctionEventQueryDefinition() +.dataSource(MonitorFormulaAndFunctionEventsDataSource.CI_PIPELINES) +.name("query2") +.search(new MonitorFormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new MonitorFormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(MonitorFormulaAndFunctionEventAggregation.COUNT)))))); try { Monitor result = apiInstance.createMonitor(body); @@ -78,4 +67,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_3883669300.java b/examples/v1/monitors/CreateMonitor_3883669300.java index d955813dc7c..522b7369b00 100644 --- a/examples/v1/monitors/CreateMonitor_3883669300.java +++ b/examples/v1/monitors/CreateMonitor_3883669300.java @@ -1,9 +1,10 @@ // Create a RUM formula and functions monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventAggregation; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventQueryDefinition; import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionEventQueryDefinitionCompute; @@ -13,56 +14,47 @@ import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_a_RUM_formula_and_functions_monitor_returns_OK_response") - .type(MonitorType.RUM_ALERT) - .query(""" + Monitor body = new Monitor() +.name("Example-Create_a_RUM_formula_and_functions_monitor_returns_OK_response") +.type(MonitorType.RUM_ALERT) +.query(""" formula("query2 / query1 * 100").last("15m") >= 0.8 """) - .message("some message Notify: @hipchat-channel") - .tags( - Arrays.asList( - "test:examplecreatearumformulaandfunctionsmonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options( - new MonitorOptions() - .thresholds(new MonitorThresholds().critical(0.8)) - .variables( - Arrays.asList( - new MonitorFormulaAndFunctionQueryDefinition( - new MonitorFormulaAndFunctionEventQueryDefinition() - .dataSource(MonitorFormulaAndFunctionEventsDataSource.RUM) - .name("query2") - .search( - new MonitorFormulaAndFunctionEventQueryDefinitionSearch() - .query("")) - .indexes(Collections.singletonList("*")) - .compute( - new MonitorFormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - MonitorFormulaAndFunctionEventAggregation.COUNT))), - new MonitorFormulaAndFunctionQueryDefinition( - new MonitorFormulaAndFunctionEventQueryDefinition() - .dataSource(MonitorFormulaAndFunctionEventsDataSource.RUM) - .name("query1") - .search( - new MonitorFormulaAndFunctionEventQueryDefinitionSearch() - .query("status:error")) - .indexes(Collections.singletonList("*")) - .compute( - new MonitorFormulaAndFunctionEventQueryDefinitionCompute() - .aggregation( - MonitorFormulaAndFunctionEventAggregation - .COUNT)))))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplecreatearumformulaandfunctionsmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(0.8)) +.variables(Arrays.asList(new MonitorFormulaAndFunctionQueryDefinition( +new MonitorFormulaAndFunctionEventQueryDefinition() +.dataSource(MonitorFormulaAndFunctionEventsDataSource.RUM) +.name("query2") +.search(new MonitorFormulaAndFunctionEventQueryDefinitionSearch() +.query("")) +.indexes(Collections.singletonList("*")) +.compute(new MonitorFormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(MonitorFormulaAndFunctionEventAggregation.COUNT))), new MonitorFormulaAndFunctionQueryDefinition( +new MonitorFormulaAndFunctionEventQueryDefinition() +.dataSource(MonitorFormulaAndFunctionEventsDataSource.RUM) +.name("query1") +.search(new MonitorFormulaAndFunctionEventQueryDefinitionSearch() +.query("status:error")) +.indexes(Collections.singletonList("*")) +.compute(new MonitorFormulaAndFunctionEventQueryDefinitionCompute() +.aggregation(MonitorFormulaAndFunctionEventAggregation.COUNT)))))); try { Monitor result = apiInstance.createMonitor(body); @@ -75,4 +67,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/CreateMonitor_440013737.java b/examples/v1/monitors/CreateMonitor_440013737.java index cca4e34f56d..6699a01fe43 100644 --- a/examples/v1/monitors/CreateMonitor_440013737.java +++ b/examples/v1/monitors/CreateMonitor_440013737.java @@ -1,33 +1,37 @@ // Create an Error Tracking monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Create_an_Error_Tracking_monitor_returns_OK_response") - .type(MonitorType.ERROR_TRACKING_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Create_an_Error_Tracking_monitor_returns_OK_response") +.type(MonitorType.ERROR_TRACKING_ALERT) +.query(""" error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1 """) - .message("some message") - .tags( - Arrays.asList( - "test:examplecreateanerrortrackingmonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options(new MonitorOptions().thresholds(new MonitorThresholds().critical(1.0))); +.message("some message") +.tags(Arrays.asList("test:examplecreateanerrortrackingmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.thresholds(new MonitorThresholds() +.critical(1.0))); try { Monitor result = apiInstance.createMonitor(body); @@ -40,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/DeleteMonitor.java b/examples/v1/monitors/DeleteMonitor.java index 7f0690e770b..1b22df74a99 100644 --- a/examples/v1/monitors/DeleteMonitor.java +++ b/examples/v1/monitors/DeleteMonitor.java @@ -1,9 +1,15 @@ // Delete a monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.DeletedMonitor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/GetMonitor.java b/examples/v1/monitors/GetMonitor.java index 7cbdd020aa4..7e038caf3c0 100644 --- a/examples/v1/monitors/GetMonitor.java +++ b/examples/v1/monitors/GetMonitor.java @@ -1,9 +1,15 @@ // Get a monitor's details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/GetMonitor_3691711704.java b/examples/v1/monitors/GetMonitor_3691711704.java index 1dea927aa65..6aff801267b 100644 --- a/examples/v1/monitors/GetMonitor_3691711704.java +++ b/examples/v1/monitors/GetMonitor_3691711704.java @@ -1,9 +1,15 @@ // Get a synthetics monitor's details -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { MonitorsApi apiInstance = new MonitorsApi(defaultClient); // there is a valid "synthetics_api_test" in the system - Long SYNTHETICS_API_TEST_MONITOR_ID = - Long.parseLong(System.getenv("SYNTHETICS_API_TEST_MONITOR_ID")); + Long SYNTHETICS_API_TEST_MONITOR_ID = Long.parseLong(System.getenv("SYNTHETICS_API_TEST_MONITOR_ID")); try { Monitor result = apiInstance.getMonitor(SYNTHETICS_API_TEST_MONITOR_ID); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/ListMonitors.java b/examples/v1/monitors/ListMonitors.java index 9397bf78444..934398743b6 100644 --- a/examples/v1/monitors/ListMonitors.java +++ b/examples/v1/monitors/ListMonitors.java @@ -1,10 +1,15 @@ // Get all monitor details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/ListMonitors_3448441939.java b/examples/v1/monitors/ListMonitors_3448441939.java index b0b760ee193..cde7117249c 100644 --- a/examples/v1/monitors/ListMonitors_3448441939.java +++ b/examples/v1/monitors/ListMonitors_3448441939.java @@ -1,11 +1,16 @@ // Get all monitor details with tags -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.api.MonitorsApi.ListMonitorsOptionalParameters; import com.datadog.api.client.v1.model.Monitor; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,11 +18,7 @@ public static void main(String[] args) { MonitorsApi apiInstance = new MonitorsApi(defaultClient); try { - List result = - apiInstance.listMonitors( - new ListMonitorsOptionalParameters() - .tags("test:examplegetallmonitordetailswithtags") - .pageSize(1)); + List result = apiInstance.listMonitors(new ListMonitorsOptionalParameters().tags("test:examplegetallmonitordetailswithtags").pageSize(1)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MonitorsApi#listMonitors"); @@ -27,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/SearchMonitorGroups.java b/examples/v1/monitors/SearchMonitorGroups.java index f430a375eec..00f856da7eb 100644 --- a/examples/v1/monitors/SearchMonitorGroups.java +++ b/examples/v1/monitors/SearchMonitorGroups.java @@ -1,9 +1,15 @@ // Monitors group search returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.MonitorGroupSearchResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/SearchMonitors.java b/examples/v1/monitors/SearchMonitors.java index 4ef41850dcc..8a9606b1fe4 100644 --- a/examples/v1/monitors/SearchMonitors.java +++ b/examples/v1/monitors/SearchMonitors.java @@ -1,9 +1,15 @@ // Monitors search returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.MonitorSearchResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/UpdateMonitor.java b/examples/v1/monitors/UpdateMonitor.java index 06434664257..735043bbf9e 100644 --- a/examples/v1/monitors/UpdateMonitor.java +++ b/examples/v1/monitors/UpdateMonitor.java @@ -1,12 +1,18 @@ // Edit a monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,17 +23,17 @@ public static void main(String[] args) { Long MONITOR_ID = Long.parseLong(System.getenv("MONITOR_ID")); String MONITOR_NAME = System.getenv("MONITOR_NAME"); - MonitorUpdateRequest body = - new MonitorUpdateRequest() - .name("My monitor-updated") - .options( - new MonitorOptions() - .evaluationDelay(null) - .newGroupDelay(600L) - .newHostDelay(null) - .renotifyInterval(null) - .thresholds(new MonitorThresholds().critical(2.0).warning(null)) - .timeoutH(null)); + MonitorUpdateRequest body = new MonitorUpdateRequest() +.name("My monitor-updated") +.options(new MonitorOptions() +.evaluationDelay(null) +.newGroupDelay(600L) +.newHostDelay(null) +.renotifyInterval(null) +.thresholds(new MonitorThresholds() +.critical(2.0) +.warning(null)) +.timeoutH(null)); try { Monitor result = apiInstance.updateMonitor(MONITOR_ID, body); @@ -40,4 +46,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/ValidateExistingMonitor.java b/examples/v1/monitors/ValidateExistingMonitor.java index de73751d3ae..de6b72cb316 100644 --- a/examples/v1/monitors/ValidateExistingMonitor.java +++ b/examples/v1/monitors/ValidateExistingMonitor.java @@ -1,7 +1,7 @@ // Validate an existing monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; @@ -9,7 +9,12 @@ import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; import com.datadog.api.client.v1.model.OnMissingDataOption; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,35 +24,34 @@ public static void main(String[] args) { // there is a valid "monitor" in the system Long MONITOR_ID = Long.parseLong(System.getenv("MONITOR_ID")); - Monitor body = - new Monitor() - .name("Example-Validate_an_existing_monitor_returns_OK_response") - .type(MonitorType.LOG_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Validate_an_existing_monitor_returns_OK_response") +.type(MonitorType.LOG_ALERT) +.query(""" logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2 """) - .message("some message Notify: @hipchat-channel") - .tags(Arrays.asList("test:examplevalidateanexistingmonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options( - new MonitorOptions() - .enableLogsSample(true) - .escalationMessage("the situation has escalated") - .evaluationDelay(700L) - .groupbySimpleMonitor(true) - .includeTags(true) - .locked(false) - .newHostDelay(600L) - .noDataTimeframe(null) - .notifyAudit(false) - .notifyNoData(false) - .onMissingData(OnMissingDataOption.SHOW_AND_NOTIFY_NO_DATA) - .notificationPresetName(MonitorOptionsNotificationPresets.HIDE_HANDLES) - .renotifyInterval(60L) - .requireFullWindow(true) - .timeoutH(24L) - .thresholds(new MonitorThresholds().critical(2.0).warning(1.0))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplevalidateanexistingmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.enableLogsSample(true) +.escalationMessage("the situation has escalated") +.evaluationDelay(700L) +.groupbySimpleMonitor(true) +.includeTags(true) +.locked(false) +.newHostDelay(600L) +.noDataTimeframe(null) +.notifyAudit(false) +.notifyNoData(false) +.onMissingData(OnMissingDataOption.SHOW_AND_NOTIFY_NO_DATA) +.notificationPresetName(MonitorOptionsNotificationPresets.HIDE_HANDLES) +.renotifyInterval(60L) +.requireFullWindow(true) +.timeoutH(24L) +.thresholds(new MonitorThresholds() +.critical(2.0) +.warning(1.0))); try { apiInstance.validateExistingMonitor(MONITOR_ID, body); @@ -59,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/ValidateMonitor.java b/examples/v1/monitors/ValidateMonitor.java index 4ca57d01001..a2df102aeaa 100644 --- a/examples/v1/monitors/ValidateMonitor.java +++ b/examples/v1/monitors/ValidateMonitor.java @@ -1,7 +1,7 @@ // Validate a monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; @@ -9,42 +9,46 @@ import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; import com.datadog.api.client.v1.model.OnMissingDataOption; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Validate_a_monitor_returns_OK_response") - .type(MonitorType.LOG_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Validate_a_monitor_returns_OK_response") +.type(MonitorType.LOG_ALERT) +.query(""" logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2 """) - .message("some message Notify: @hipchat-channel") - .tags(Arrays.asList("test:examplevalidateamonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options( - new MonitorOptions() - .enableLogsSample(true) - .escalationMessage("the situation has escalated") - .evaluationDelay(700L) - .groupbySimpleMonitor(true) - .includeTags(true) - .locked(false) - .newHostDelay(600L) - .noDataTimeframe(null) - .notifyAudit(false) - .notifyNoData(false) - .onMissingData(OnMissingDataOption.SHOW_AND_NOTIFY_NO_DATA) - .notificationPresetName(MonitorOptionsNotificationPresets.HIDE_HANDLES) - .renotifyInterval(60L) - .requireFullWindow(true) - .timeoutH(24L) - .thresholds(new MonitorThresholds().critical(2.0).warning(1.0))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplevalidateamonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.enableLogsSample(true) +.escalationMessage("the situation has escalated") +.evaluationDelay(700L) +.groupbySimpleMonitor(true) +.includeTags(true) +.locked(false) +.newHostDelay(600L) +.noDataTimeframe(null) +.notifyAudit(false) +.notifyNoData(false) +.onMissingData(OnMissingDataOption.SHOW_AND_NOTIFY_NO_DATA) +.notificationPresetName(MonitorOptionsNotificationPresets.HIDE_HANDLES) +.renotifyInterval(60L) +.requireFullWindow(true) +.timeoutH(24L) +.thresholds(new MonitorThresholds() +.critical(2.0) +.warning(1.0))); try { apiInstance.validateMonitor(body); @@ -56,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/monitors/ValidateMonitor_4247196452.java b/examples/v1/monitors/ValidateMonitor_4247196452.java index 1d12cd3d825..4ee793f2d2d 100644 --- a/examples/v1/monitors/ValidateMonitor_4247196452.java +++ b/examples/v1/monitors/ValidateMonitor_4247196452.java @@ -1,52 +1,54 @@ // Validate a multi-alert monitor returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.MonitorsApi; import com.datadog.api.client.v1.model.Monitor; import com.datadog.api.client.v1.model.MonitorOptions; import com.datadog.api.client.v1.model.MonitorThresholds; import com.datadog.api.client.v1.model.MonitorType; import com.datadog.api.client.v1.model.OnMissingDataOption; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - Monitor body = - new Monitor() - .name("Example-Validate_a_multi_alert_monitor_returns_OK_response") - .type(MonitorType.LOG_ALERT) - .query( - """ + Monitor body = new Monitor() +.name("Example-Validate_a_multi_alert_monitor_returns_OK_response") +.type(MonitorType.LOG_ALERT) +.query(""" logs("service:foo AND type:error").index("main").rollup("count").by("source,status").last("5m") > 2 """) - .message("some message Notify: @hipchat-channel") - .tags( - Arrays.asList("test:examplevalidateamultialertmonitorreturnsokresponse", "env:ci")) - .priority(3L) - .options( - new MonitorOptions() - .enableLogsSample(true) - .escalationMessage("the situation has escalated") - .evaluationDelay(700L) - .groupRetentionDuration("2d") - .groupbySimpleMonitor(false) - .includeTags(true) - .locked(false) - .newHostDelay(600L) - .noDataTimeframe(null) - .notifyAudit(false) - .notifyBy(Collections.singletonList("status")) - .notifyNoData(false) - .onMissingData(OnMissingDataOption.SHOW_AND_NOTIFY_NO_DATA) - .renotifyInterval(60L) - .requireFullWindow(true) - .timeoutH(24L) - .thresholds(new MonitorThresholds().critical(2.0).warning(1.0))); +.message("some message Notify: @hipchat-channel") +.tags(Arrays.asList("test:examplevalidateamultialertmonitorreturnsokresponse", "env:ci")) +.priority(3L) +.options(new MonitorOptions() +.enableLogsSample(true) +.escalationMessage("the situation has escalated") +.evaluationDelay(700L) +.groupRetentionDuration("2d") +.groupbySimpleMonitor(false) +.includeTags(true) +.locked(false) +.newHostDelay(600L) +.noDataTimeframe(null) +.notifyAudit(false) +.notifyBy(Collections.singletonList("status")) +.notifyNoData(false) +.onMissingData(OnMissingDataOption.SHOW_AND_NOTIFY_NO_DATA) +.renotifyInterval(60L) +.requireFullWindow(true) +.timeoutH(24L) +.thresholds(new MonitorThresholds() +.critical(2.0) +.warning(1.0))); try { apiInstance.validateMonitor(body); @@ -58,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/notebooks/CreateNotebook.java b/examples/v1/notebooks/CreateNotebook.java index b9da0e5aa98..a8bf0778a92 100644 --- a/examples/v1/notebooks/CreateNotebook.java +++ b/examples/v1/notebooks/CreateNotebook.java @@ -1,11 +1,13 @@ // Create a notebook returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.NotebooksApi; +import com.datadog.api.client.v1.model.NotebookResponse; import com.datadog.api.client.v1.model.NotebookCellCreateRequest; import com.datadog.api.client.v1.model.NotebookCellCreateRequestAttributes; import com.datadog.api.client.v1.model.NotebookCellResourceType; +import com.datadog.api.client.v1.model.NotebookCellTime; import com.datadog.api.client.v1.model.NotebookCreateData; import com.datadog.api.client.v1.model.NotebookCreateDataAttributes; import com.datadog.api.client.v1.model.NotebookCreateRequest; @@ -16,7 +18,6 @@ import com.datadog.api.client.v1.model.NotebookMarkdownCellDefinitionType; import com.datadog.api.client.v1.model.NotebookRelativeTime; import com.datadog.api.client.v1.model.NotebookResourceType; -import com.datadog.api.client.v1.model.NotebookResponse; import com.datadog.api.client.v1.model.NotebookSplitBy; import com.datadog.api.client.v1.model.NotebookStatus; import com.datadog.api.client.v1.model.NotebookTimeseriesCellAttributes; @@ -29,30 +30,26 @@ import com.datadog.api.client.v1.model.WidgetLineWidth; import com.datadog.api.client.v1.model.WidgetLiveSpan; import com.datadog.api.client.v1.model.WidgetRequestStyle; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); NotebooksApi apiInstance = new NotebooksApi(defaultClient); - NotebookCreateRequest body = - new NotebookCreateRequest() - .data( - new NotebookCreateData() - .attributes( - new NotebookCreateDataAttributes() - .cells( - Arrays.asList( - new NotebookCellCreateRequest() - .attributes( - new NotebookCellCreateRequestAttributes( - new NotebookMarkdownCellAttributes() - .definition( - new NotebookMarkdownCellDefinition() - .text( - """ + NotebookCreateRequest body = new NotebookCreateRequest() +.data(new NotebookCreateData() +.attributes(new NotebookCreateDataAttributes() +.cells(Arrays.asList(new NotebookCellCreateRequest() +.attributes(new NotebookCellCreateRequestAttributes( +new NotebookMarkdownCellAttributes() +.definition(new NotebookMarkdownCellDefinition() +.text(""" ## Some test markdown ```js @@ -61,49 +58,32 @@ public static void main(String[] args) { y = 6; ``` """) - .type( - NotebookMarkdownCellDefinitionType - .MARKDOWN)))) - .type(NotebookCellResourceType.NOTEBOOK_CELLS), - new NotebookCellCreateRequest() - .attributes( - new NotebookCellCreateRequestAttributes( - new NotebookTimeseriesCellAttributes() - .definition( - new TimeseriesWidgetDefinition() - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .displayType( - WidgetDisplayType.LINE) - .q("avg:system.load.1{*}") - .style( - new WidgetRequestStyle() - .lineType( - WidgetLineType - .SOLID) - .lineWidth( - WidgetLineWidth - .NORMAL) - .palette( - "dog_classic")))) - .showLegend(true) - .type( - TimeseriesWidgetDefinitionType - .TIMESERIES) - .yaxis( - new WidgetAxis().scale("linear"))) - .graphSize(NotebookGraphSize.MEDIUM) - .splitBy(new NotebookSplitBy()) - .time(null))) - .type(NotebookCellResourceType.NOTEBOOK_CELLS))) - .name("Example-Create_a_notebook_returns_OK_response") - .status(NotebookStatus.PUBLISHED) - .time( - new NotebookGlobalTime( - new NotebookRelativeTime() - .liveSpan(WidgetLiveSpan.PAST_ONE_HOUR)))) - .type(NotebookResourceType.NOTEBOOKS)); +.type(NotebookMarkdownCellDefinitionType.MARKDOWN)))) +.type(NotebookCellResourceType.NOTEBOOK_CELLS), new NotebookCellCreateRequest() +.attributes(new NotebookCellCreateRequestAttributes( +new NotebookTimeseriesCellAttributes() +.definition(new TimeseriesWidgetDefinition() +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.displayType(WidgetDisplayType.LINE) +.q("avg:system.load.1{*}") +.style(new WidgetRequestStyle() +.lineType(WidgetLineType.SOLID) +.lineWidth(WidgetLineWidth.NORMAL) +.palette("dog_classic")))) +.showLegend(true) +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.yaxis(new WidgetAxis() +.scale("linear"))) +.graphSize(NotebookGraphSize.MEDIUM) +.splitBy(new NotebookSplitBy()) +.time(null))) +.type(NotebookCellResourceType.NOTEBOOK_CELLS))) +.name("Example-Create_a_notebook_returns_OK_response") +.status(NotebookStatus.PUBLISHED) +.time(new NotebookGlobalTime( +new NotebookRelativeTime() +.liveSpan(WidgetLiveSpan.PAST_ONE_HOUR)))) +.type(NotebookResourceType.NOTEBOOKS)); try { NotebookResponse result = apiInstance.createNotebook(body); @@ -116,4 +96,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/notebooks/DeleteNotebook.java b/examples/v1/notebooks/DeleteNotebook.java index 8fd7a57e62e..a9232dac3ea 100644 --- a/examples/v1/notebooks/DeleteNotebook.java +++ b/examples/v1/notebooks/DeleteNotebook.java @@ -1,8 +1,14 @@ // Delete a notebook returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.NotebooksApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/notebooks/GetNotebook.java b/examples/v1/notebooks/GetNotebook.java index a717c2166b4..b97a208dbd7 100644 --- a/examples/v1/notebooks/GetNotebook.java +++ b/examples/v1/notebooks/GetNotebook.java @@ -1,9 +1,15 @@ // Get a notebook returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.NotebooksApi; import com.datadog.api.client.v1.model.NotebookResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/notebooks/ListNotebooks.java b/examples/v1/notebooks/ListNotebooks.java index 122c04d69a3..65ac49cba0a 100644 --- a/examples/v1/notebooks/ListNotebooks.java +++ b/examples/v1/notebooks/ListNotebooks.java @@ -1,9 +1,15 @@ // Get all notebooks returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.NotebooksApi; import com.datadog.api.client.v1.model.NotebooksResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/notebooks/UpdateNotebook.java b/examples/v1/notebooks/UpdateNotebook.java index 3fe59f90d2d..d03c2206698 100644 --- a/examples/v1/notebooks/UpdateNotebook.java +++ b/examples/v1/notebooks/UpdateNotebook.java @@ -1,11 +1,13 @@ // Update a notebook returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.NotebooksApi; +import com.datadog.api.client.v1.model.NotebookResponse; import com.datadog.api.client.v1.model.NotebookCellCreateRequest; import com.datadog.api.client.v1.model.NotebookCellCreateRequestAttributes; import com.datadog.api.client.v1.model.NotebookCellResourceType; +import com.datadog.api.client.v1.model.NotebookCellTime; import com.datadog.api.client.v1.model.NotebookGlobalTime; import com.datadog.api.client.v1.model.NotebookGraphSize; import com.datadog.api.client.v1.model.NotebookMarkdownCellAttributes; @@ -13,7 +15,6 @@ import com.datadog.api.client.v1.model.NotebookMarkdownCellDefinitionType; import com.datadog.api.client.v1.model.NotebookRelativeTime; import com.datadog.api.client.v1.model.NotebookResourceType; -import com.datadog.api.client.v1.model.NotebookResponse; import com.datadog.api.client.v1.model.NotebookSplitBy; import com.datadog.api.client.v1.model.NotebookStatus; import com.datadog.api.client.v1.model.NotebookTimeseriesCellAttributes; @@ -30,8 +31,12 @@ import com.datadog.api.client.v1.model.WidgetLineWidth; import com.datadog.api.client.v1.model.WidgetLiveSpan; import com.datadog.api.client.v1.model.WidgetRequestStyle; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -41,23 +46,15 @@ public static void main(String[] args) { // there is a valid "notebook" in the system Long NOTEBOOK_DATA_ID = Long.parseLong(System.getenv("NOTEBOOK_DATA_ID")); - NotebookUpdateRequest body = - new NotebookUpdateRequest() - .data( - new NotebookUpdateData() - .attributes( - new NotebookUpdateDataAttributes() - .cells( - Arrays.asList( - new NotebookUpdateCell( - new NotebookCellCreateRequest() - .attributes( - new NotebookCellCreateRequestAttributes( - new NotebookMarkdownCellAttributes() - .definition( - new NotebookMarkdownCellDefinition() - .text( - """ + NotebookUpdateRequest body = new NotebookUpdateRequest() +.data(new NotebookUpdateData() +.attributes(new NotebookUpdateDataAttributes() +.cells(Arrays.asList(new NotebookUpdateCell( +new NotebookCellCreateRequest() +.attributes(new NotebookCellCreateRequestAttributes( +new NotebookMarkdownCellAttributes() +.definition(new NotebookMarkdownCellDefinition() +.text(""" ## Some test markdown ```js @@ -66,53 +63,33 @@ public static void main(String[] args) { y = 6; ``` """) - .type( - NotebookMarkdownCellDefinitionType - .MARKDOWN)))) - .type(NotebookCellResourceType.NOTEBOOK_CELLS)), - new NotebookUpdateCell( - new NotebookCellCreateRequest() - .attributes( - new NotebookCellCreateRequestAttributes( - new NotebookTimeseriesCellAttributes() - .definition( - new TimeseriesWidgetDefinition() - .requests( - Collections.singletonList( - new TimeseriesWidgetRequest() - .displayType( - WidgetDisplayType - .LINE) - .q( - "avg:system.load.1{*}") - .style( - new WidgetRequestStyle() - .lineType( - WidgetLineType - .SOLID) - .lineWidth( - WidgetLineWidth - .NORMAL) - .palette( - "dog_classic")))) - .showLegend(true) - .type( - TimeseriesWidgetDefinitionType - .TIMESERIES) - .yaxis( - new WidgetAxis() - .scale("linear"))) - .graphSize(NotebookGraphSize.MEDIUM) - .splitBy(new NotebookSplitBy()) - .time(null))) - .type(NotebookCellResourceType.NOTEBOOK_CELLS)))) - .name("Example-Update_a_notebook_returns_OK_response-updated") - .status(NotebookStatus.PUBLISHED) - .time( - new NotebookGlobalTime( - new NotebookRelativeTime() - .liveSpan(WidgetLiveSpan.PAST_ONE_HOUR)))) - .type(NotebookResourceType.NOTEBOOKS)); +.type(NotebookMarkdownCellDefinitionType.MARKDOWN)))) +.type(NotebookCellResourceType.NOTEBOOK_CELLS)), new NotebookUpdateCell( +new NotebookCellCreateRequest() +.attributes(new NotebookCellCreateRequestAttributes( +new NotebookTimeseriesCellAttributes() +.definition(new TimeseriesWidgetDefinition() +.requests(Collections.singletonList(new TimeseriesWidgetRequest() +.displayType(WidgetDisplayType.LINE) +.q("avg:system.load.1{*}") +.style(new WidgetRequestStyle() +.lineType(WidgetLineType.SOLID) +.lineWidth(WidgetLineWidth.NORMAL) +.palette("dog_classic")))) +.showLegend(true) +.type(TimeseriesWidgetDefinitionType.TIMESERIES) +.yaxis(new WidgetAxis() +.scale("linear"))) +.graphSize(NotebookGraphSize.MEDIUM) +.splitBy(new NotebookSplitBy()) +.time(null))) +.type(NotebookCellResourceType.NOTEBOOK_CELLS)))) +.name("Example-Update_a_notebook_returns_OK_response-updated") +.status(NotebookStatus.PUBLISHED) +.time(new NotebookGlobalTime( +new NotebookRelativeTime() +.liveSpan(WidgetLiveSpan.PAST_ONE_HOUR)))) +.type(NotebookResourceType.NOTEBOOKS)); try { NotebookResponse result = apiInstance.updateNotebook(NOTEBOOK_DATA_ID, body); @@ -125,4 +102,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/organizations/CreateChildOrg.java b/examples/v1/organizations/CreateChildOrg.java index 17b10b71ac5..2e0c18cbfb8 100644 --- a/examples/v1/organizations/CreateChildOrg.java +++ b/examples/v1/organizations/CreateChildOrg.java @@ -1,23 +1,30 @@ // Create a child organization returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.OrganizationsApi; +import com.datadog.api.client.v1.model.OrganizationCreateResponse; import com.datadog.api.client.v1.model.OrganizationBilling; import com.datadog.api.client.v1.model.OrganizationCreateBody; -import com.datadog.api.client.v1.model.OrganizationCreateResponse; import com.datadog.api.client.v1.model.OrganizationSubscription; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - OrganizationCreateBody body = - new OrganizationCreateBody() - .billing(new OrganizationBilling().type("parent_billing")) - .name("New child org") - .subscription(new OrganizationSubscription().type("pro")); + OrganizationCreateBody body = new OrganizationCreateBody() +.billing(new OrganizationBilling() +.type("parent_billing")) +.name("New child org") +.subscription(new OrganizationSubscription() +.type("pro")); try { OrganizationCreateResponse result = apiInstance.createChildOrg(body); @@ -30,4 +37,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/organizations/DowngradeOrg.java b/examples/v1/organizations/DowngradeOrg.java index cf533da5bae..207b6818b6f 100644 --- a/examples/v1/organizations/DowngradeOrg.java +++ b/examples/v1/organizations/DowngradeOrg.java @@ -1,9 +1,15 @@ // Spin-off Child Organization returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.OrganizationsApi; import com.datadog.api.client.v1.model.OrgDowngradedResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/organizations/GetOrg.java b/examples/v1/organizations/GetOrg.java index 5774996116b..89d8728683d 100644 --- a/examples/v1/organizations/GetOrg.java +++ b/examples/v1/organizations/GetOrg.java @@ -1,9 +1,15 @@ // Get organization information returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.OrganizationsApi; import com.datadog.api.client.v1.model.OrganizationResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/organizations/ListOrgs.java b/examples/v1/organizations/ListOrgs.java index c410759789d..4bce2271ae5 100644 --- a/examples/v1/organizations/ListOrgs.java +++ b/examples/v1/organizations/ListOrgs.java @@ -1,9 +1,15 @@ // List your managed organizations returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.OrganizationsApi; import com.datadog.api.client.v1.model.OrganizationListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/organizations/UpdateOrg.java b/examples/v1/organizations/UpdateOrg.java index d0de42dfcfd..47075a56711 100644 --- a/examples/v1/organizations/UpdateOrg.java +++ b/examples/v1/organizations/UpdateOrg.java @@ -1,49 +1,55 @@ // Update your organization returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.OrganizationsApi; +import com.datadog.api.client.v1.model.OrganizationResponse; import com.datadog.api.client.v1.model.AccessRole; import com.datadog.api.client.v1.model.Organization; import com.datadog.api.client.v1.model.OrganizationBilling; -import com.datadog.api.client.v1.model.OrganizationResponse; import com.datadog.api.client.v1.model.OrganizationSettings; import com.datadog.api.client.v1.model.OrganizationSettingsSaml; import com.datadog.api.client.v1.model.OrganizationSettingsSamlAutocreateUsersDomains; import com.datadog.api.client.v1.model.OrganizationSettingsSamlIdpInitiatedLogin; import com.datadog.api.client.v1.model.OrganizationSettingsSamlStrictMode; import com.datadog.api.client.v1.model.OrganizationSubscription; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - Organization body = - new Organization() - .billing(new OrganizationBilling().type("parent_billing")) - .description("some description") - .name("New child org") - .publicId("abcdef12345") - .settings( - new OrganizationSettings() - .privateWidgetShare(false) - .saml(new OrganizationSettingsSaml().enabled(false)) - .samlAutocreateAccessRole(AccessRole.STANDARD) - .samlAutocreateUsersDomains( - new OrganizationSettingsSamlAutocreateUsersDomains() - .domains(Collections.singletonList("example.com")) - .enabled(false)) - .samlCanBeEnabled(false) - .samlIdpEndpoint("https://my.saml.endpoint") - .samlIdpInitiatedLogin( - new OrganizationSettingsSamlIdpInitiatedLogin().enabled(false)) - .samlIdpMetadataUploaded(false) - .samlLoginUrl("https://my.saml.login.url") - .samlStrictMode(new OrganizationSettingsSamlStrictMode().enabled(false))) - .subscription(new OrganizationSubscription().type("pro")) - .trial(false); + Organization body = new Organization() +.billing(new OrganizationBilling() +.type("parent_billing")) +.description("some description") +.name("New child org") +.publicId("abcdef12345") +.settings(new OrganizationSettings() +.privateWidgetShare(false) +.saml(new OrganizationSettingsSaml() +.enabled(false)) +.samlAutocreateAccessRole(AccessRole.STANDARD) +.samlAutocreateUsersDomains(new OrganizationSettingsSamlAutocreateUsersDomains() +.domains(Collections.singletonList("example.com")) +.enabled(false)) +.samlCanBeEnabled(false) +.samlIdpEndpoint("https://my.saml.endpoint") +.samlIdpInitiatedLogin(new OrganizationSettingsSamlIdpInitiatedLogin() +.enabled(false)) +.samlIdpMetadataUploaded(false) +.samlLoginUrl("https://my.saml.login.url") +.samlStrictMode(new OrganizationSettingsSamlStrictMode() +.enabled(false))) +.subscription(new OrganizationSubscription() +.type("pro")) +.trial(false); try { OrganizationResponse result = apiInstance.updateOrg("abc123", body); @@ -56,4 +62,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/organizations/UploadIdPForOrg.java b/examples/v1/organizations/UploadIdPForOrg.java index 7b60540921b..4291d1fa9bd 100644 --- a/examples/v1/organizations/UploadIdPForOrg.java +++ b/examples/v1/organizations/UploadIdPForOrg.java @@ -1,10 +1,15 @@ // Upload IdP metadata returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.OrganizationsApi; import com.datadog.api.client.v1.model.IdpResponse; import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.java b/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.java index dcf437fd5f6..683ffaaeaaa 100644 --- a/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.java +++ b/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.java @@ -1,28 +1,35 @@ // Create a new service object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.PagerDutyIntegrationApi; -import com.datadog.api.client.v1.model.PagerDutyService; import com.datadog.api.client.v1.model.PagerDutyServiceName; +import com.datadog.api.client.v1.model.PagerDutyService; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); PagerDutyIntegrationApi apiInstance = new PagerDutyIntegrationApi(defaultClient); - PagerDutyService body = new PagerDutyService().serviceKey("").serviceName(""); + PagerDutyService body = new PagerDutyService() +.serviceKey("") +.serviceName(""); try { PagerDutyServiceName result = apiInstance.createPagerDutyIntegrationService(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling PagerDutyIntegrationApi#createPagerDutyIntegrationService"); + System.err.println("Exception when calling PagerDutyIntegrationApi#createPagerDutyIntegrationService"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.java b/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.java index 882c7163982..d8a28772a36 100644 --- a/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.java +++ b/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.java @@ -1,8 +1,14 @@ // Delete a single service object returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.PagerDutyIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +18,11 @@ public static void main(String[] args) { try { apiInstance.deletePagerDutyIntegrationService("service_name"); } catch (ApiException e) { - System.err.println( - "Exception when calling PagerDutyIntegrationApi#deletePagerDutyIntegrationService"); + System.err.println("Exception when calling PagerDutyIntegrationApi#deletePagerDutyIntegrationService"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.java b/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.java index ee2cb9fcbf0..181cd80eda6 100644 --- a/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.java +++ b/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.java @@ -1,9 +1,15 @@ // Get a single service object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.PagerDutyIntegrationApi; import com.datadog.api.client.v1.model.PagerDutyServiceName; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,12 +20,11 @@ public static void main(String[] args) { PagerDutyServiceName result = apiInstance.getPagerDutyIntegrationService("service_name"); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling PagerDutyIntegrationApi#getPagerDutyIntegrationService"); + System.err.println("Exception when calling PagerDutyIntegrationApi#getPagerDutyIntegrationService"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.java b/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.java index bc8de1cb4e8..4a491d933cd 100644 --- a/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.java +++ b/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.java @@ -1,26 +1,32 @@ // Update a single service object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.PagerDutyIntegrationApi; import com.datadog.api.client.v1.model.PagerDutyServiceKey; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); PagerDutyIntegrationApi apiInstance = new PagerDutyIntegrationApi(defaultClient); - PagerDutyServiceKey body = new PagerDutyServiceKey().serviceKey(""); + PagerDutyServiceKey body = new PagerDutyServiceKey() +.serviceKey(""); try { apiInstance.updatePagerDutyIntegrationService("service_name", body); } catch (ApiException e) { - System.err.println( - "Exception when calling PagerDutyIntegrationApi#updatePagerDutyIntegrationService"); + System.err.println("Exception when calling PagerDutyIntegrationApi#updatePagerDutyIntegrationService"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.java b/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.java index 5ea3afc96ba..a9327d314e5 100644 --- a/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.java +++ b/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.java @@ -1,30 +1,34 @@ // Add a security signal to an incident returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SecurityMonitoringApi; -import com.datadog.api.client.v1.model.AddSignalToIncidentRequest; import com.datadog.api.client.v1.model.SuccessfulSignalUpdateResponse; +import com.datadog.api.client.v1.model.AddSignalToIncidentRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - AddSignalToIncidentRequest body = new AddSignalToIncidentRequest().incidentId(2609L); + AddSignalToIncidentRequest body = new AddSignalToIncidentRequest() +.incidentId(2609L); try { - SuccessfulSignalUpdateResponse result = - apiInstance.addSecurityMonitoringSignalToIncident( - "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE", body); + SuccessfulSignalUpdateResponse result = apiInstance.addSecurityMonitoringSignalToIncident("AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#addSecurityMonitoringSignalToIncident"); + System.err.println("Exception when calling SecurityMonitoringApi#addSecurityMonitoringSignalToIncident"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.java b/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.java index e0bb16aaa7d..62112a11b5d 100644 --- a/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.java +++ b/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.java @@ -1,31 +1,34 @@ // Modify the triage assignee of a security signal returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SecurityMonitoringApi; -import com.datadog.api.client.v1.model.SignalAssigneeUpdateRequest; import com.datadog.api.client.v1.model.SuccessfulSignalUpdateResponse; +import com.datadog.api.client.v1.model.SignalAssigneeUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SignalAssigneeUpdateRequest body = - new SignalAssigneeUpdateRequest().assignee("773b045d-ccf8-4808-bd3b-955ef6a8c940"); + SignalAssigneeUpdateRequest body = new SignalAssigneeUpdateRequest() +.assignee("773b045d-ccf8-4808-bd3b-955ef6a8c940"); try { - SuccessfulSignalUpdateResponse result = - apiInstance.editSecurityMonitoringSignalAssignee( - "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE", body); + SuccessfulSignalUpdateResponse result = apiInstance.editSecurityMonitoringSignalAssignee("AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalAssignee"); + System.err.println("Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalAssignee"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.java b/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.java index 1fe4f2bf7df..b36ea013f4d 100644 --- a/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.java +++ b/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.java @@ -1,35 +1,37 @@ // Change the triage state of a security signal returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SecurityMonitoringApi; +import com.datadog.api.client.v1.model.SuccessfulSignalUpdateResponse; import com.datadog.api.client.v1.model.SignalArchiveReason; import com.datadog.api.client.v1.model.SignalStateUpdateRequest; import com.datadog.api.client.v1.model.SignalTriageState; -import com.datadog.api.client.v1.model.SuccessfulSignalUpdateResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SignalStateUpdateRequest body = - new SignalStateUpdateRequest() - .archiveReason(SignalArchiveReason.NONE) - .state(SignalTriageState.OPEN); + SignalStateUpdateRequest body = new SignalStateUpdateRequest() +.archiveReason(SignalArchiveReason.NONE) +.state(SignalTriageState.OPEN); try { - SuccessfulSignalUpdateResponse result = - apiInstance.editSecurityMonitoringSignalState( - "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE", body); + SuccessfulSignalUpdateResponse result = apiInstance.editSecurityMonitoringSignalState("AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalState"); + System.err.println("Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalState"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-checks/SubmitServiceCheck.java b/examples/v1/service-checks/SubmitServiceCheck.java index 8576250fdab..03a9dba922f 100644 --- a/examples/v1/service-checks/SubmitServiceCheck.java +++ b/examples/v1/service-checks/SubmitServiceCheck.java @@ -1,28 +1,28 @@ // Submit a Service Check returns "Payload accepted" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceChecksApi; import com.datadog.api.client.v1.model.IntakePayloadAccepted; import com.datadog.api.client.v1.model.ServiceCheck; import com.datadog.api.client.v1.model.ServiceCheckStatus; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ServiceChecksApi apiInstance = new ServiceChecksApi(defaultClient); - List body = - Collections.singletonList( - new ServiceCheck() - .check("app.ok") - .hostName("host") - .status(ServiceCheckStatus.OK) - .tags( - Collections.singletonList( - "test:ExampleSubmitaServiceCheckreturnsPayloadacceptedresponse"))); + List body = Collections.singletonList(new ServiceCheck() +.check("app.ok") +.hostName("host") +.status(ServiceCheckStatus.OK) +.tags(Collections.singletonList("test:ExampleSubmitaServiceCheckreturnsPayloadacceptedresponse"))); try { IntakePayloadAccepted result = apiInstance.submitServiceCheck(body); @@ -35,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objective-corrections/CreateSLOCorrection.java b/examples/v1/service-level-objective-corrections/CreateSLOCorrection.java index 82e9d7b81bc..d3e1b5fb1bf 100644 --- a/examples/v1/service-level-objective-corrections/CreateSLOCorrection.java +++ b/examples/v1/service-level-objective-corrections/CreateSLOCorrection.java @@ -1,48 +1,50 @@ // Create an SLO correction returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; +import com.datadog.api.client.v1.model.SLOCorrectionResponse; import com.datadog.api.client.v1.model.SLOCorrectionCategory; import com.datadog.api.client.v1.model.SLOCorrectionCreateData; import com.datadog.api.client.v1.model.SLOCorrectionCreateRequest; import com.datadog.api.client.v1.model.SLOCorrectionCreateRequestAttributes; -import com.datadog.api.client.v1.model.SLOCorrectionResponse; import com.datadog.api.client.v1.model.SLOCorrectionType; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - ServiceLevelObjectiveCorrectionsApi apiInstance = - new ServiceLevelObjectiveCorrectionsApi(defaultClient); + ServiceLevelObjectiveCorrectionsApi apiInstance = new ServiceLevelObjectiveCorrectionsApi(defaultClient); // there is a valid "slo" in the system String SLO_DATA_0_ID = System.getenv("SLO_DATA_0_ID"); - SLOCorrectionCreateRequest body = - new SLOCorrectionCreateRequest() - .data( - new SLOCorrectionCreateData() - .attributes( - new SLOCorrectionCreateRequestAttributes() - .category(SLOCorrectionCategory.SCHEDULED_MAINTENANCE) - .description("Example-Create_an_SLO_correction_returns_OK_response") - .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) - .sloId(SLO_DATA_0_ID) - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .timezone("UTC")) - .type(SLOCorrectionType.CORRECTION)); + SLOCorrectionCreateRequest body = new SLOCorrectionCreateRequest() +.data(new SLOCorrectionCreateData() +.attributes(new SLOCorrectionCreateRequestAttributes() +.category(SLOCorrectionCategory.SCHEDULED_MAINTENANCE) +.description("Example-Create_an_SLO_correction_returns_OK_response") +.end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) +.sloId(SLO_DATA_0_ID) +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.timezone("UTC")) +.type(SLOCorrectionType.CORRECTION)); try { SLOCorrectionResponse result = apiInstance.createSLOCorrection(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectiveCorrectionsApi#createSLOCorrection"); + System.err.println("Exception when calling ServiceLevelObjectiveCorrectionsApi#createSLOCorrection"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.java b/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.java index 54f6a19bf84..4cfc683ede2 100644 --- a/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.java +++ b/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.java @@ -1,50 +1,51 @@ // Create an SLO correction with rrule returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; +import com.datadog.api.client.v1.model.SLOCorrectionResponse; import com.datadog.api.client.v1.model.SLOCorrectionCategory; import com.datadog.api.client.v1.model.SLOCorrectionCreateData; import com.datadog.api.client.v1.model.SLOCorrectionCreateRequest; import com.datadog.api.client.v1.model.SLOCorrectionCreateRequestAttributes; -import com.datadog.api.client.v1.model.SLOCorrectionResponse; import com.datadog.api.client.v1.model.SLOCorrectionType; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - ServiceLevelObjectiveCorrectionsApi apiInstance = - new ServiceLevelObjectiveCorrectionsApi(defaultClient); + ServiceLevelObjectiveCorrectionsApi apiInstance = new ServiceLevelObjectiveCorrectionsApi(defaultClient); // there is a valid "slo" in the system String SLO_DATA_0_ID = System.getenv("SLO_DATA_0_ID"); - SLOCorrectionCreateRequest body = - new SLOCorrectionCreateRequest() - .data( - new SLOCorrectionCreateData() - .attributes( - new SLOCorrectionCreateRequestAttributes() - .category(SLOCorrectionCategory.SCHEDULED_MAINTENANCE) - .description( - "Example-Create_an_SLO_correction_with_rrule_returns_OK_response") - .sloId(SLO_DATA_0_ID) - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .duration(3600L) - .rrule("FREQ=DAILY;INTERVAL=10;COUNT=5") - .timezone("UTC")) - .type(SLOCorrectionType.CORRECTION)); + SLOCorrectionCreateRequest body = new SLOCorrectionCreateRequest() +.data(new SLOCorrectionCreateData() +.attributes(new SLOCorrectionCreateRequestAttributes() +.category(SLOCorrectionCategory.SCHEDULED_MAINTENANCE) +.description("Example-Create_an_SLO_correction_with_rrule_returns_OK_response") +.sloId(SLO_DATA_0_ID) +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.duration(3600L) +.rrule("FREQ=DAILY;INTERVAL=10;COUNT=5") +.timezone("UTC")) +.type(SLOCorrectionType.CORRECTION)); try { SLOCorrectionResponse result = apiInstance.createSLOCorrection(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectiveCorrectionsApi#createSLOCorrection"); + System.err.println("Exception when calling ServiceLevelObjectiveCorrectionsApi#createSLOCorrection"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.java b/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.java index 4add3ccfc8b..c7162ee3e84 100644 --- a/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.java +++ b/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.java @@ -1,24 +1,28 @@ // Delete an SLO correction returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - ServiceLevelObjectiveCorrectionsApi apiInstance = - new ServiceLevelObjectiveCorrectionsApi(defaultClient); + ServiceLevelObjectiveCorrectionsApi apiInstance = new ServiceLevelObjectiveCorrectionsApi(defaultClient); try { apiInstance.deleteSLOCorrection("slo_correction_id"); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectiveCorrectionsApi#deleteSLOCorrection"); + System.err.println("Exception when calling ServiceLevelObjectiveCorrectionsApi#deleteSLOCorrection"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objective-corrections/GetSLOCorrection.java b/examples/v1/service-level-objective-corrections/GetSLOCorrection.java index 600159c8c6f..f606a7b4eba 100644 --- a/examples/v1/service-level-objective-corrections/GetSLOCorrection.java +++ b/examples/v1/service-level-objective-corrections/GetSLOCorrection.java @@ -1,15 +1,20 @@ // Get an SLO correction for an SLO returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; import com.datadog.api.client.v1.model.SLOCorrectionResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - ServiceLevelObjectiveCorrectionsApi apiInstance = - new ServiceLevelObjectiveCorrectionsApi(defaultClient); + ServiceLevelObjectiveCorrectionsApi apiInstance = new ServiceLevelObjectiveCorrectionsApi(defaultClient); // there is a valid "correction" for "slo" String CORRECTION_DATA_ID = System.getenv("CORRECTION_DATA_ID"); @@ -18,12 +23,11 @@ public static void main(String[] args) { SLOCorrectionResponse result = apiInstance.getSLOCorrection(CORRECTION_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectiveCorrectionsApi#getSLOCorrection"); + System.err.println("Exception when calling ServiceLevelObjectiveCorrectionsApi#getSLOCorrection"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objective-corrections/ListSLOCorrection.java b/examples/v1/service-level-objective-corrections/ListSLOCorrection.java index 8334beac4ec..d7f19b2d1fc 100644 --- a/examples/v1/service-level-objective-corrections/ListSLOCorrection.java +++ b/examples/v1/service-level-objective-corrections/ListSLOCorrection.java @@ -1,29 +1,31 @@ // Get all SLO corrections returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi.ListSLOCorrectionOptionalParameters; import com.datadog.api.client.v1.model.SLOCorrectionListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - ServiceLevelObjectiveCorrectionsApi apiInstance = - new ServiceLevelObjectiveCorrectionsApi(defaultClient); + ServiceLevelObjectiveCorrectionsApi apiInstance = new ServiceLevelObjectiveCorrectionsApi(defaultClient); try { - SLOCorrectionListResponse result = - apiInstance.listSLOCorrection( - new ListSLOCorrectionOptionalParameters().offset(1L).limit(1L)); + SLOCorrectionListResponse result = apiInstance.listSLOCorrection(new ListSLOCorrectionOptionalParameters().offset(1L).limit(1L)); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectiveCorrectionsApi#listSLOCorrection"); + System.err.println("Exception when calling ServiceLevelObjectiveCorrectionsApi#listSLOCorrection"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.java b/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.java index e47f5d9c635..89d6d70a8dd 100644 --- a/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.java +++ b/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.java @@ -1,47 +1,49 @@ // Update an SLO correction returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; -import com.datadog.api.client.v1.model.SLOCorrectionCategory; import com.datadog.api.client.v1.model.SLOCorrectionResponse; +import com.datadog.api.client.v1.model.SLOCorrectionCategory; import com.datadog.api.client.v1.model.SLOCorrectionType; import com.datadog.api.client.v1.model.SLOCorrectionUpdateData; import com.datadog.api.client.v1.model.SLOCorrectionUpdateRequest; import com.datadog.api.client.v1.model.SLOCorrectionUpdateRequestAttributes; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - ServiceLevelObjectiveCorrectionsApi apiInstance = - new ServiceLevelObjectiveCorrectionsApi(defaultClient); + ServiceLevelObjectiveCorrectionsApi apiInstance = new ServiceLevelObjectiveCorrectionsApi(defaultClient); // there is a valid "correction" for "slo" String CORRECTION_DATA_ID = System.getenv("CORRECTION_DATA_ID"); - SLOCorrectionUpdateRequest body = - new SLOCorrectionUpdateRequest() - .data( - new SLOCorrectionUpdateData() - .attributes( - new SLOCorrectionUpdateRequestAttributes() - .category(SLOCorrectionCategory.DEPLOYMENT) - .description("Example-Update_an_SLO_correction_returns_OK_response") - .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) - .start(OffsetDateTime.now().toInstant().getEpochSecond()) - .timezone("UTC")) - .type(SLOCorrectionType.CORRECTION)); + SLOCorrectionUpdateRequest body = new SLOCorrectionUpdateRequest() +.data(new SLOCorrectionUpdateData() +.attributes(new SLOCorrectionUpdateRequestAttributes() +.category(SLOCorrectionCategory.DEPLOYMENT) +.description("Example-Update_an_SLO_correction_returns_OK_response") +.end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) +.start(OffsetDateTime.now().toInstant().getEpochSecond()) +.timezone("UTC")) +.type(SLOCorrectionType.CORRECTION)); try { SLOCorrectionResponse result = apiInstance.updateSLOCorrection(CORRECTION_DATA_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectiveCorrectionsApi#updateSLOCorrection"); + System.err.println("Exception when calling ServiceLevelObjectiveCorrectionsApi#updateSLOCorrection"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/CheckCanDeleteSLO.java b/examples/v1/service-level-objectives/CheckCanDeleteSLO.java index 07ad4aa8096..d1976bc52dc 100644 --- a/examples/v1/service-level-objectives/CheckCanDeleteSLO.java +++ b/examples/v1/service-level-objectives/CheckCanDeleteSLO.java @@ -1,9 +1,15 @@ // Check if SLOs can be safely deleted returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.CheckCanDeleteSLOResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/CreateSLO.java b/examples/v1/service-level-objectives/CreateSLO.java index 623d724a20c..4c8e7bad3b4 100644 --- a/examples/v1/service-level-objectives/CreateSLO.java +++ b/examples/v1/service-level-objectives/CreateSLO.java @@ -1,44 +1,44 @@ // Create an SLO object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLOListResponse; +import com.datadog.api.client.v1.model.ServiceLevelObjectiveQuery; +import com.datadog.api.client.v1.model.ServiceLevelObjectiveRequest; import com.datadog.api.client.v1.model.SLOThreshold; import com.datadog.api.client.v1.model.SLOTimeframe; import com.datadog.api.client.v1.model.SLOType; -import com.datadog.api.client.v1.model.ServiceLevelObjectiveQuery; -import com.datadog.api.client.v1.model.ServiceLevelObjectiveRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ServiceLevelObjectivesApi apiInstance = new ServiceLevelObjectivesApi(defaultClient); - ServiceLevelObjectiveRequest body = - new ServiceLevelObjectiveRequest() - .type(SLOType.METRIC) - .description("string") - .groups(Arrays.asList("env:test", "role:mysql")) - .name("Example-Create_an_SLO_object_returns_OK_response") - .query( - new ServiceLevelObjectiveQuery() - .denominator("sum:httpservice.hits{!code:3xx}.as_count()") - .numerator("sum:httpservice.hits{code:2xx}.as_count()")) - .tags(Arrays.asList("env:prod", "app:core")) - .thresholds( - Collections.singletonList( - new SLOThreshold() - .target(97.0) - .targetDisplay("97.0") - .timeframe(SLOTimeframe.SEVEN_DAYS) - .warning(98.0) - .warningDisplay("98.0"))) - .timeframe(SLOTimeframe.SEVEN_DAYS) - .targetThreshold(97.0) - .warningThreshold(98.0); + ServiceLevelObjectiveRequest body = new ServiceLevelObjectiveRequest() +.type(SLOType.METRIC) +.description("string") +.groups(Arrays.asList("env:test", "role:mysql")) +.name("Example-Create_an_SLO_object_returns_OK_response") +.query(new ServiceLevelObjectiveQuery() +.denominator("sum:httpservice.hits{!code:3xx}.as_count()") +.numerator("sum:httpservice.hits{code:2xx}.as_count()")) +.tags(Arrays.asList("env:prod", "app:core")) +.thresholds(Collections.singletonList(new SLOThreshold() +.target(97.0) +.targetDisplay("97.0") +.timeframe(SLOTimeframe.SEVEN_DAYS) +.warning(98.0) +.warningDisplay("98.0"))) +.timeframe(SLOTimeframe.SEVEN_DAYS) +.targetThreshold(97.0) +.warningThreshold(98.0); try { SLOListResponse result = apiInstance.createSLO(body); @@ -51,4 +51,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/DeleteSLO.java b/examples/v1/service-level-objectives/DeleteSLO.java index 2ed55304c86..79ce3f7596f 100644 --- a/examples/v1/service-level-objectives/DeleteSLO.java +++ b/examples/v1/service-level-objectives/DeleteSLO.java @@ -1,9 +1,15 @@ // Delete an SLO returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLODeleteResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.java b/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.java index fec3261f301..07216ecdb64 100644 --- a/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.java +++ b/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.java @@ -1,11 +1,14 @@ // Bulk Delete SLO Timeframes returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLOBulkDeleteResponse; import com.datadog.api.client.v1.model.SLOTimeframe; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -14,21 +17,17 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ServiceLevelObjectivesApi apiInstance = new ServiceLevelObjectivesApi(defaultClient); - Map> body = - Map.ofEntries( - Map.entry("id1", Arrays.asList(SLOTimeframe.SEVEN_DAYS, SLOTimeframe.THIRTY_DAYS)), - Map.entry("id2", Arrays.asList(SLOTimeframe.SEVEN_DAYS, SLOTimeframe.THIRTY_DAYS))); + Map> body = Map.ofEntries(Map.entry("id1", Arrays.asList(SLOTimeframe.SEVEN_DAYS, SLOTimeframe.THIRTY_DAYS)),Map.entry("id2", Arrays.asList(SLOTimeframe.SEVEN_DAYS, SLOTimeframe.THIRTY_DAYS))); try { SLOBulkDeleteResponse result = apiInstance.deleteSLOTimeframeInBulk(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceLevelObjectivesApi#deleteSLOTimeframeInBulk"); + System.err.println("Exception when calling ServiceLevelObjectivesApi#deleteSLOTimeframeInBulk"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/GetSLO.java b/examples/v1/service-level-objectives/GetSLO.java index 9df6faf9aa3..d81149c4dad 100644 --- a/examples/v1/service-level-objectives/GetSLO.java +++ b/examples/v1/service-level-objectives/GetSLO.java @@ -1,9 +1,15 @@ // Get an SLO's details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLOResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/GetSLOCorrections.java b/examples/v1/service-level-objectives/GetSLOCorrections.java index 4363039a44c..acccb8cf070 100644 --- a/examples/v1/service-level-objectives/GetSLOCorrections.java +++ b/examples/v1/service-level-objectives/GetSLOCorrections.java @@ -1,9 +1,15 @@ // Get Corrections For an SLO returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLOCorrectionListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/GetSLOHistory.java b/examples/v1/service-level-objectives/GetSLOHistory.java index 7ca0d13ef5b..6e9169e574d 100644 --- a/examples/v1/service-level-objectives/GetSLOHistory.java +++ b/examples/v1/service-level-objectives/GetSLOHistory.java @@ -1,9 +1,16 @@ // Get an SLO's history returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLOHistoryResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,11 +21,7 @@ public static void main(String[] args) { String SLO_DATA_0_ID = System.getenv("SLO_DATA_0_ID"); try { - SLOHistoryResponse result = - apiInstance.getSLOHistory( - SLO_DATA_0_ID, - OffsetDateTime.now().plusDays(-1).toInstant().getEpochSecond(), - OffsetDateTime.now().toInstant().getEpochSecond()); + SLOHistoryResponse result = apiInstance.getSLOHistory(SLO_DATA_0_ID, OffsetDateTime.now().plusDays(-1).toInstant().getEpochSecond(), OffsetDateTime.now().toInstant().getEpochSecond()); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceLevelObjectivesApi#getSLOHistory"); @@ -28,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/ListSLOs.java b/examples/v1/service-level-objectives/ListSLOs.java index 895a88823d4..ae9da1fab93 100644 --- a/examples/v1/service-level-objectives/ListSLOs.java +++ b/examples/v1/service-level-objectives/ListSLOs.java @@ -1,10 +1,16 @@ // Get all SLOs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi.ListSLOsOptionalParameters; import com.datadog.api.client.v1.model.SLOListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,8 +21,7 @@ public static void main(String[] args) { String SLO_DATA_0_ID = System.getenv("SLO_DATA_0_ID"); try { - SLOListResponse result = - apiInstance.listSLOs(new ListSLOsOptionalParameters().ids(SLO_DATA_0_ID)); + SLOListResponse result = apiInstance.listSLOs(new ListSLOsOptionalParameters().ids(SLO_DATA_0_ID)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceLevelObjectivesApi#listSLOs"); @@ -26,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/SearchSLO.java b/examples/v1/service-level-objectives/SearchSLO.java index 6698aa4ac14..cc13845e7f8 100644 --- a/examples/v1/service-level-objectives/SearchSLO.java +++ b/examples/v1/service-level-objectives/SearchSLO.java @@ -1,10 +1,16 @@ // Search for SLOs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi.SearchSLOOptionalParameters; import com.datadog.api.client.v1.model.SearchSLOResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,12 +21,7 @@ public static void main(String[] args) { String SLO_DATA_0_NAME = System.getenv("SLO_DATA_0_NAME"); try { - SearchSLOResponse result = - apiInstance.searchSLO( - new SearchSLOOptionalParameters() - .query(SLO_DATA_0_NAME) - .pageSize(20L) - .pageNumber(0L)); + SearchSLOResponse result = apiInstance.searchSLO(new SearchSLOOptionalParameters().query(SLO_DATA_0_NAME).pageSize(20L).pageNumber(0L)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceLevelObjectivesApi#searchSLO"); @@ -30,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/service-level-objectives/UpdateSLO.java b/examples/v1/service-level-objectives/UpdateSLO.java index cbbc5a24437..4b6061c8a64 100644 --- a/examples/v1/service-level-objectives/UpdateSLO.java +++ b/examples/v1/service-level-objectives/UpdateSLO.java @@ -1,15 +1,20 @@ // Update an SLO returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.ServiceLevelObjectivesApi; import com.datadog.api.client.v1.model.SLOListResponse; +import com.datadog.api.client.v1.model.ServiceLevelObjective; +import com.datadog.api.client.v1.model.ServiceLevelObjectiveQuery; import com.datadog.api.client.v1.model.SLOThreshold; import com.datadog.api.client.v1.model.SLOTimeframe; import com.datadog.api.client.v1.model.SLOType; -import com.datadog.api.client.v1.model.ServiceLevelObjective; -import com.datadog.api.client.v1.model.ServiceLevelObjectiveQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -20,23 +25,19 @@ public static void main(String[] args) { String SLO_DATA_0_ID = System.getenv("SLO_DATA_0_ID"); String SLO_DATA_0_NAME = System.getenv("SLO_DATA_0_NAME"); - ServiceLevelObjective body = - new ServiceLevelObjective() - .type(SLOType.METRIC) - .name(SLO_DATA_0_NAME) - .thresholds( - Collections.singletonList( - new SLOThreshold() - .target(97.0) - .timeframe(SLOTimeframe.SEVEN_DAYS) - .warning(98.0))) - .timeframe(SLOTimeframe.SEVEN_DAYS) - .targetThreshold(97.0) - .warningThreshold(98.0) - .query( - new ServiceLevelObjectiveQuery() - .numerator("sum:httpservice.hits{code:2xx}.as_count()") - .denominator("sum:httpservice.hits{!code:3xx}.as_count()")); + ServiceLevelObjective body = new ServiceLevelObjective() +.type(SLOType.METRIC) +.name(SLO_DATA_0_NAME) +.thresholds(Collections.singletonList(new SLOThreshold() +.target(97.0) +.timeframe(SLOTimeframe.SEVEN_DAYS) +.warning(98.0))) +.timeframe(SLOTimeframe.SEVEN_DAYS) +.targetThreshold(97.0) +.warningThreshold(98.0) +.query(new ServiceLevelObjectiveQuery() +.numerator("sum:httpservice.hits{code:2xx}.as_count()") +.denominator("sum:httpservice.hits{!code:3xx}.as_count()")); try { SLOListResponse result = apiInstance.updateSLO(SLO_DATA_0_ID, body); @@ -49,4 +50,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/slack-integration/CreateSlackIntegrationChannel.java b/examples/v1/slack-integration/CreateSlackIntegrationChannel.java index c29fea01c02..288d7abbdb3 100644 --- a/examples/v1/slack-integration/CreateSlackIntegrationChannel.java +++ b/examples/v1/slack-integration/CreateSlackIntegrationChannel.java @@ -1,37 +1,40 @@ // Create a Slack integration channel returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SlackIntegrationApi; import com.datadog.api.client.v1.model.SlackIntegrationChannel; +import com.datadog.api.client.v1.model.SlackIntegrationChannel; import com.datadog.api.client.v1.model.SlackIntegrationChannelDisplay; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SlackIntegrationApi apiInstance = new SlackIntegrationApi(defaultClient); - SlackIntegrationChannel body = - new SlackIntegrationChannel() - .display( - new SlackIntegrationChannelDisplay() - .message(true) - .notified(true) - .snapshot(true) - .tags(true)) - .name("#general"); + SlackIntegrationChannel body = new SlackIntegrationChannel() +.display(new SlackIntegrationChannelDisplay() +.message(true) +.notified(true) +.snapshot(true) +.tags(true)) +.name("#general"); try { - SlackIntegrationChannel result = - apiInstance.createSlackIntegrationChannel("account_name", body); + SlackIntegrationChannel result = apiInstance.createSlackIntegrationChannel("account_name", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SlackIntegrationApi#createSlackIntegrationChannel"); + System.err.println("Exception when calling SlackIntegrationApi#createSlackIntegrationChannel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/slack-integration/GetSlackIntegrationChannel.java b/examples/v1/slack-integration/GetSlackIntegrationChannel.java index 6830b2ba5f9..09aefe8b616 100644 --- a/examples/v1/slack-integration/GetSlackIntegrationChannel.java +++ b/examples/v1/slack-integration/GetSlackIntegrationChannel.java @@ -1,9 +1,15 @@ // Get a Slack integration channel returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SlackIntegrationApi; import com.datadog.api.client.v1.model.SlackIntegrationChannel; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { SlackIntegrationApi apiInstance = new SlackIntegrationApi(defaultClient); try { - SlackIntegrationChannel result = - apiInstance.getSlackIntegrationChannel("account_name", "channel_name"); + SlackIntegrationChannel result = apiInstance.getSlackIntegrationChannel("account_name", "channel_name"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SlackIntegrationApi#getSlackIntegrationChannel"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/slack-integration/GetSlackIntegrationChannels.java b/examples/v1/slack-integration/GetSlackIntegrationChannels.java index 6fdf038698a..97a5262d30e 100644 --- a/examples/v1/slack-integration/GetSlackIntegrationChannels.java +++ b/examples/v1/slack-integration/GetSlackIntegrationChannels.java @@ -1,10 +1,15 @@ // Get all channels in a Slack integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SlackIntegrationApi; import com.datadog.api.client.v1.model.SlackIntegrationChannel; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { SlackIntegrationApi apiInstance = new SlackIntegrationApi(defaultClient); try { - List result = - apiInstance.getSlackIntegrationChannels("account_name"); + List result = apiInstance.getSlackIntegrationChannels("account_name"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SlackIntegrationApi#getSlackIntegrationChannels"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/slack-integration/RemoveSlackIntegrationChannel.java b/examples/v1/slack-integration/RemoveSlackIntegrationChannel.java index 2d83622305c..373ccd7a48c 100644 --- a/examples/v1/slack-integration/RemoveSlackIntegrationChannel.java +++ b/examples/v1/slack-integration/RemoveSlackIntegrationChannel.java @@ -1,8 +1,14 @@ // Remove a Slack integration channel returns "The channel was removed successfully." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SlackIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +18,11 @@ public static void main(String[] args) { try { apiInstance.removeSlackIntegrationChannel("account_name", "channel_name"); } catch (ApiException e) { - System.err.println( - "Exception when calling SlackIntegrationApi#removeSlackIntegrationChannel"); + System.err.println("Exception when calling SlackIntegrationApi#removeSlackIntegrationChannel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java index 2705ced47c0..ccdd525e777 100644 --- a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java +++ b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.java @@ -1,37 +1,40 @@ // Update a Slack integration channel returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SlackIntegrationApi; import com.datadog.api.client.v1.model.SlackIntegrationChannel; +import com.datadog.api.client.v1.model.SlackIntegrationChannel; import com.datadog.api.client.v1.model.SlackIntegrationChannelDisplay; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SlackIntegrationApi apiInstance = new SlackIntegrationApi(defaultClient); - SlackIntegrationChannel body = - new SlackIntegrationChannel() - .display( - new SlackIntegrationChannelDisplay() - .message(true) - .notified(true) - .snapshot(true) - .tags(true)) - .name("#general"); + SlackIntegrationChannel body = new SlackIntegrationChannel() +.display(new SlackIntegrationChannelDisplay() +.message(true) +.notified(true) +.snapshot(true) +.tags(true)) +.name("#general"); try { - SlackIntegrationChannel result = - apiInstance.updateSlackIntegrationChannel("account_name", "channel_name", body); + SlackIntegrationChannel result = apiInstance.updateSlackIntegrationChannel("account_name", "channel_name", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SlackIntegrationApi#updateSlackIntegrationChannel"); + System.err.println("Exception when calling SlackIntegrationApi#updateSlackIntegrationChannel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/snapshots/GetGraphSnapshot.java b/examples/v1/snapshots/GetGraphSnapshot.java index 85d0662a9d7..32c139bff48 100644 --- a/examples/v1/snapshots/GetGraphSnapshot.java +++ b/examples/v1/snapshots/GetGraphSnapshot.java @@ -1,10 +1,17 @@ // Take graph snapshots returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SnapshotsApi; import com.datadog.api.client.v1.api.SnapshotsApi.GetGraphSnapshotOptionalParameters; import com.datadog.api.client.v1.model.GraphSnapshot; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,15 +19,7 @@ public static void main(String[] args) { SnapshotsApi apiInstance = new SnapshotsApi(defaultClient); try { - GraphSnapshot result = - apiInstance.getGraphSnapshot( - OffsetDateTime.now().plusDays(-1).toInstant().getEpochSecond(), - OffsetDateTime.now().toInstant().getEpochSecond(), - new GetGraphSnapshotOptionalParameters() - .metricQuery("avg:system.load.1{*}") - .title("System load") - .height(400L) - .width(600L)); + GraphSnapshot result = apiInstance.getGraphSnapshot(OffsetDateTime.now().plusDays(-1).toInstant().getEpochSecond(), OffsetDateTime.now().toInstant().getEpochSecond(),new GetGraphSnapshotOptionalParameters().metricQuery("avg:system.load.1{*}").title("System load").height(400L).width(600L)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SnapshotsApi#getGraphSnapshot"); @@ -30,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateGlobalVariable.java b/examples/v1/synthetics/CreateGlobalVariable.java index 9f0df920568..7b727e7bf99 100644 --- a/examples/v1/synthetics/CreateGlobalVariable.java +++ b/examples/v1/synthetics/CreateGlobalVariable.java @@ -1,43 +1,45 @@ // Create a global variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableAttributes; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptions; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType; -import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableValue; import com.datadog.api.client.v1.model.SyntheticsVariableParser; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsGlobalVariable body = - new SyntheticsGlobalVariable() - .attributes( - new SyntheticsGlobalVariableAttributes() - .restrictedRoles( - Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))) - .description("Example description") - .name("MY_VARIABLE") - .parseTestOptions( - new SyntheticsGlobalVariableParseTestOptions() - .field("content-type") - .localVariableName("LOCAL_VARIABLE") - .parser( - new SyntheticsVariableParser() - .type(SyntheticsGlobalVariableParserType.REGEX) - .value(".*")) - .type(SyntheticsGlobalVariableParseTestOptionsType.HTTP_BODY)) - .parseTestPublicId("abc-def-123") - .tags(Arrays.asList("team:front", "test:workflow-1")) - .value(new SyntheticsGlobalVariableValue().secure(true).value("value")); + SyntheticsGlobalVariable body = new SyntheticsGlobalVariable() +.attributes(new SyntheticsGlobalVariableAttributes() +.restrictedRoles(Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))) +.description("Example description") +.name("MY_VARIABLE") +.parseTestOptions(new SyntheticsGlobalVariableParseTestOptions() +.field("content-type") +.localVariableName("LOCAL_VARIABLE") +.parser(new SyntheticsVariableParser() +.type(SyntheticsGlobalVariableParserType.REGEX) +.value(".*")) +.type(SyntheticsGlobalVariableParseTestOptionsType.HTTP_BODY)) +.parseTestPublicId("abc-def-123") +.tags(Arrays.asList("team:front", "test:workflow-1")) +.value(new SyntheticsGlobalVariableValue() +.secure(true) +.value("value")); try { SyntheticsGlobalVariable result = apiInstance.createGlobalVariable(body); @@ -50,4 +52,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateGlobalVariable_1068962881.java b/examples/v1/synthetics/CreateGlobalVariable_1068962881.java index d14b2f0cd91..8ffb209d740 100644 --- a/examples/v1/synthetics/CreateGlobalVariable_1068962881.java +++ b/examples/v1/synthetics/CreateGlobalVariable_1068962881.java @@ -1,14 +1,21 @@ // Create a global variable from test returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableOptions; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptions; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableTOTPParameters; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableValue; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,28 +23,22 @@ public static void main(String[] args) { SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); // there is a valid "synthetics_api_test_multi_step" in the system - String SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = - System.getenv("SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"); + String SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"); - SyntheticsGlobalVariable body = - new SyntheticsGlobalVariable() - .description("") - .name("GLOBAL_VARIABLE_PAYLOAD_EXAMPLECREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE") - .value( - new SyntheticsGlobalVariableValue() - .secure(false) - .value("") - .options( - new SyntheticsGlobalVariableOptions() - .totpParameters( - new SyntheticsGlobalVariableTOTPParameters() - .digits(6) - .refreshInterval(30)))) - .parseTestPublicId(SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID) - .parseTestOptions( - new SyntheticsGlobalVariableParseTestOptions() - .type(SyntheticsGlobalVariableParseTestOptionsType.LOCAL_VARIABLE) - .localVariableName("EXTRACTED_VALUE")); + SyntheticsGlobalVariable body = new SyntheticsGlobalVariable() +.description("") +.name("GLOBAL_VARIABLE_PAYLOAD_EXAMPLECREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE") +.value(new SyntheticsGlobalVariableValue() +.secure(false) +.value("") +.options(new SyntheticsGlobalVariableOptions() +.totpParameters(new SyntheticsGlobalVariableTOTPParameters() +.digits(6) +.refreshInterval(30)))) +.parseTestPublicId(SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID) +.parseTestOptions(new SyntheticsGlobalVariableParseTestOptions() +.type(SyntheticsGlobalVariableParseTestOptionsType.LOCAL_VARIABLE) +.localVariableName("EXTRACTED_VALUE")); try { SyntheticsGlobalVariable result = apiInstance.createGlobalVariable(body); @@ -50,4 +51,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreatePrivateLocation.java b/examples/v1/synthetics/CreatePrivateLocation.java index 77add10e147..09891f0859f 100644 --- a/examples/v1/synthetics/CreatePrivateLocation.java +++ b/examples/v1/synthetics/CreatePrivateLocation.java @@ -1,12 +1,17 @@ // Create a private location returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; -import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; import com.datadog.api.client.v1.model.SyntheticsPrivateLocationCreationResponse; +import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; import com.datadog.api.client.v1.model.SyntheticsPrivateLocationMetadata; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,14 +21,12 @@ public static void main(String[] args) { // there is a valid "role" in the system String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID"); - SyntheticsPrivateLocation body = - new SyntheticsPrivateLocation() - .description("Test Example-Create_a_private_location_returns_OK_response description") - .metadata( - new SyntheticsPrivateLocationMetadata() - .restrictedRoles(Collections.singletonList(ROLE_DATA_ID))) - .name("Example-Create_a_private_location_returns_OK_response") - .tags(Collections.singletonList("test:examplecreateaprivatelocationreturnsokresponse")); + SyntheticsPrivateLocation body = new SyntheticsPrivateLocation() +.description("Test Example-Create_a_private_location_returns_OK_response description") +.metadata(new SyntheticsPrivateLocationMetadata() +.restrictedRoles(Collections.singletonList(ROLE_DATA_ID))) +.name("Example-Create_a_private_location_returns_OK_response") +.tags(Collections.singletonList("test:examplecreateaprivatelocationreturnsokresponse")); try { SyntheticsPrivateLocationCreationResponse result = apiInstance.createPrivateLocation(body); @@ -36,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest.java b/examples/v1/synthetics/CreateSyntheticsAPITest.java index 21e2b233f0c..02572d4b9c5 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest.java @@ -1,9 +1,10 @@ // Create an API test returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -23,62 +24,56 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptionsSchedulingTimeframe; import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Collections.singletonList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.LESS_THAN) - .target(1000) - .type(SyntheticsAssertionType.RESPONSE_TIME)))) - .request(new SyntheticsTestRequest().method("GET").url("https://example.com"))) - .locations(Collections.singletonList("aws:eu-west-3")) - .message("Notification message") - .name("Example test name") - .options( - new SyntheticsTestOptions() - .ci( - new SyntheticsTestCiOptions() - .executionRule(SyntheticsTestExecutionRule.BLOCKING)) - .deviceIds(Collections.singletonList(SyntheticsDeviceID.LAPTOP_LARGE)) - .httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1) - .monitorOptions(new SyntheticsTestOptionsMonitorOptions()) - .restrictedRoles( - Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")) - .retry(new SyntheticsTestOptionsRetry()) - .rumSettings( - new SyntheticsBrowserTestRumSettings() - .applicationId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") - .clientTokenId(12345L) - .isEnabled(true)) - .scheduling( - new SyntheticsTestOptionsScheduling() - .timeframes( - Arrays.asList( - new SyntheticsTestOptionsSchedulingTimeframe() - .day(1) - .from("07:00") - .to("16:00"), - new SyntheticsTestOptionsSchedulingTimeframe() - .day(3) - .from("07:00") - .to("16:00"))) - .timezone("America/New_York"))) - .status(SyntheticsTestPauseStatus.LIVE) - .subtype(SyntheticsTestDetailsSubType.HTTP) - .tags(Collections.singletonList("env:production")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Collections.singletonList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.LESS_THAN) +.target(1000) +.type(SyntheticsAssertionType.RESPONSE_TIME)))) +.request(new SyntheticsTestRequest() +.method("GET") +.url("https://example.com"))) +.locations(Collections.singletonList("aws:eu-west-3")) +.message("Notification message") +.name("Example test name") +.options(new SyntheticsTestOptions() +.ci(new SyntheticsTestCiOptions() +.executionRule(SyntheticsTestExecutionRule.BLOCKING)) +.deviceIds(Collections.singletonList(SyntheticsDeviceID.LAPTOP_LARGE)) +.httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1) +.monitorOptions(new SyntheticsTestOptionsMonitorOptions()) +.restrictedRoles(Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")) +.retry(new SyntheticsTestOptionsRetry()) +.rumSettings(new SyntheticsBrowserTestRumSettings() +.applicationId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") +.clientTokenId(12345L) +.isEnabled(true)) +.scheduling(new SyntheticsTestOptionsScheduling() +.timeframes(Arrays.asList(new SyntheticsTestOptionsSchedulingTimeframe() +.day(1) +.from("07:00") +.to("16:00"), new SyntheticsTestOptionsSchedulingTimeframe() +.day(3) +.from("07:00") +.to("16:00"))) +.timezone("America/New_York"))) +.status(SyntheticsTestPauseStatus.LIVE) +.subtype(SyntheticsTestDetailsSubType.HTTP) +.tags(Collections.singletonList("env:production")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -91,4 +86,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.java b/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.java index 1da0b79bdd6..d53d0817e9b 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.java @@ -1,9 +1,10 @@ // Create an API SSL test returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -13,37 +14,38 @@ import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType; import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Collections.singletonList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS_IN_MORE_DAYS_THAN) - .target(10) - .type(SyntheticsAssertionType.CERTIFICATE)))) - .request(new SyntheticsTestRequest().host("datadoghq.com").port(443L))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_ssl_test_payload.json") - .name( - "Example-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(true) - .checkCertificateRevocation(true) - .tickEvery(60L)) - .subtype(SyntheticsTestDetailsSubType.SSL) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Collections.singletonList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS_IN_MORE_DAYS_THAN) +.target(10) +.type(SyntheticsAssertionType.CERTIFICATE)))) +.request(new SyntheticsTestRequest() +.host("datadoghq.com") +.port(443L))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_ssl_test_payload.json") +.name("Example-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(true) +.checkCertificateRevocation(true) +.tickEvery(60L)) +.subtype(SyntheticsTestDetailsSubType.SSL) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -56,4 +58,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java index 1d8c090aee9..292ce7f3ee6 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java @@ -1,8 +1,9 @@ // Create an API test with multi subtype returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPIStep; import com.datadog.api.client.v1.model.SyntheticsAPIStepSubtype; import com.datadog.api.client.v1.model.SyntheticsAPITest; @@ -14,82 +15,74 @@ import com.datadog.api.client.v1.model.SyntheticsAssertionType; import com.datadog.api.client.v1.model.SyntheticsConfigVariable; import com.datadog.api.client.v1.model.SyntheticsConfigVariableType; -import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType; import com.datadog.api.client.v1.model.SyntheticsParsingOptions; import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType; import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry; import com.datadog.api.client.v1.model.SyntheticsTestRequest; import com.datadog.api.client.v1.model.SyntheticsVariableParser; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT))) - .steps( - Collections.singletonList( - new SyntheticsAPIStep() - .allowFailure(true) - .assertions( - Collections.singletonList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .type(SyntheticsAssertionType.STATUS_CODE) - .target(200)))) - .extractedValues( - Collections.singletonList( - new SyntheticsParsingOptions() - .field("server") - .name("EXTRACTED_VALUE") - .parser( - new SyntheticsVariableParser() - .type(SyntheticsGlobalVariableParserType.RAW)) - .type( - SyntheticsGlobalVariableParseTestOptionsType - .HTTP_HEADER))) - .isCritical(true) - .name("request is sent") - .request( - new SyntheticsTestRequest() - .method("GET") - .timeout(10.0) - .url("https://datadoghq.com")) - .retry(new SyntheticsTestOptionsRetry().count(5L).interval(1000.0)) - .subtype(SyntheticsAPIStepSubtype.HTTP)))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_test_multi_step_payload.json") - .name( - "Example-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .monitorName( - "Example-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response") - .monitorPriority(5) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(1000.0)) - .tickEvery(60L)) - .subtype(SyntheticsTestDetailsSubType.MULTI) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT))) +.steps(Collections.singletonList(new SyntheticsAPIStep() +.allowFailure(true) +.assertions(Collections.singletonList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.type(SyntheticsAssertionType.STATUS_CODE) +.target(200)))) +.extractedValues(Collections.singletonList(new SyntheticsParsingOptions() +.field("server") +.name("EXTRACTED_VALUE") +.parser(new SyntheticsVariableParser() +.type(SyntheticsGlobalVariableParserType.RAW)) +.type(SyntheticsGlobalVariableParseTestOptionsType.HTTP_HEADER))) +.isCritical(true) +.name("request is sent") +.request(new SyntheticsTestRequest() +.method("GET") +.timeout(10.0) +.url("https://datadoghq.com")) +.retry(new SyntheticsTestOptionsRetry() +.count(5L) +.interval(1000.0)) +.subtype(SyntheticsAPIStepSubtype.HTTP)))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_test_multi_step_payload.json") +.name("Example-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.monitorName("Example-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response") +.monitorPriority(5) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(1000.0)) +.tickEvery(60L)) +.subtype(SyntheticsTestDetailsSubType.MULTI) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -102,4 +95,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.java b/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.java index 6016f97c27e..85402b842bb 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.java @@ -1,9 +1,10 @@ // Create an API GRPC test returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -14,7 +15,11 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestOptionsMonitorOptions; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -22,40 +27,33 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Collections.singletonList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .target(1) - .type(SyntheticsAssertionType.GRPC_HEALTHCHECK_STATUS)))) - .request( - new SyntheticsTestRequest() - .host("localhost") - .port(50051L) - .service("Hello") - .method("GET") - .message("") - .metadata(Map.ofEntries()))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_grpc_test_payload.json") - .name( - "Example-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .minFailureDuration(0L) - .minLocationFailed(1L) - .monitorOptions(new SyntheticsTestOptionsMonitorOptions().renotifyInterval(0L)) - .monitorName( - "Example-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response") - .tickEvery(60L)) - .subtype(SyntheticsTestDetailsSubType.GRPC) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Collections.singletonList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.target(1) +.type(SyntheticsAssertionType.GRPC_HEALTHCHECK_STATUS)))) +.request(new SyntheticsTestRequest() +.host("localhost") +.port(50051L) +.service("Hello") +.method("GET") +.message("") +.metadata(Map.ofEntries()))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_grpc_test_payload.json") +.name("Example-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.minFailureDuration(0L) +.minLocationFailed(1L) +.monitorOptions(new SyntheticsTestOptionsMonitorOptions() +.renotifyInterval(0L)) +.monitorName("Example-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response") +.tickEvery(60L)) +.subtype(SyntheticsTestDetailsSubType.GRPC) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -68,4 +66,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java index e6529905cd3..a85f085630c 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java @@ -1,9 +1,10 @@ // Create an API HTTP test returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -30,8 +31,11 @@ import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate; import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem; import com.datadog.api.client.v1.model.SyntheticsTestRequestProxy; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -39,107 +43,83 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Arrays.asList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .property("{{ PROPERTY }}") - .target("text/html") - .type(SyntheticsAssertionType.HEADER)), - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.LESS_THAN) - .target(2000) - .type(SyntheticsAssertionType.RESPONSE_TIME)), - new SyntheticsAssertion( - new SyntheticsAssertionJSONPathTarget() - .operator( - SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH) - .target( - new SyntheticsAssertionJSONPathTargetTarget() - .jsonPath("topKey") - .operator("isNot") - .targetValue("0")) - .type(SyntheticsAssertionType.BODY)), - new SyntheticsAssertion( - new SyntheticsAssertionXPathTarget() - .operator(SyntheticsAssertionXPathOperator.VALIDATES_X_PATH) - .target( - new SyntheticsAssertionXPathTargetTarget() - .xPath("target-xpath") - .targetValue("0") - .operator("contains")) - .type(SyntheticsAssertionType.BODY)))) - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT))) - .request( - new SyntheticsTestRequest() - .certificate( - new SyntheticsTestRequestCertificate() - .cert( - new SyntheticsTestRequestCertificateItem() - .content("cert-content") - .filename("cert-filename") - .updatedAt("2020-10-16T09:23:24.857Z")) - .key( - new SyntheticsTestRequestCertificateItem() - .content("key-content") - .filename("key-filename") - .updatedAt("2020-10-16T09:23:24.857Z"))) - .headers( - Map.ofEntries( - Map.entry( - "unique", - "examplecreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse"))) - .method("GET") - .timeout(10.0) - .url("https://datadoghq.com") - .proxy( - new SyntheticsTestRequestProxy() - .url("https://datadoghq.com") - .headers(Map.ofEntries())) - .basicAuth( - new SyntheticsBasicAuth( - new SyntheticsBasicAuthOauthClient() - .accessTokenUrl("https://datadog-token.com") - .audience("audience") - .clientId("client-id") - .clientSecret("client-secret") - .resource("resource") - .scope("yoyo") - .tokenApiAuthentication( - SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER) - .type(SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT))))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_http_test_payload.json") - .name( - "Example-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .monitorName( - "Example-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response") - .monitorPriority(5) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(60L) - .httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP2)) - .subtype(SyntheticsTestDetailsSubType.HTTP) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Arrays.asList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.property("{{ PROPERTY }}") +.target("text/html") +.type(SyntheticsAssertionType.HEADER)), new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.LESS_THAN) +.target(2000) +.type(SyntheticsAssertionType.RESPONSE_TIME)), new SyntheticsAssertion( +new SyntheticsAssertionJSONPathTarget() +.operator(SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH) +.target(new SyntheticsAssertionJSONPathTargetTarget() +.jsonPath("topKey") +.operator("isNot") +.targetValue("0")) +.type(SyntheticsAssertionType.BODY)), new SyntheticsAssertion( +new SyntheticsAssertionXPathTarget() +.operator(SyntheticsAssertionXPathOperator.VALIDATES_X_PATH) +.target(new SyntheticsAssertionXPathTargetTarget() +.xPath("target-xpath") +.targetValue("0") +.operator("contains")) +.type(SyntheticsAssertionType.BODY)))) +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT))) +.request(new SyntheticsTestRequest() +.certificate(new SyntheticsTestRequestCertificate() +.cert(new SyntheticsTestRequestCertificateItem() +.content("cert-content") +.filename("cert-filename") +.updatedAt("2020-10-16T09:23:24.857Z")) +.key(new SyntheticsTestRequestCertificateItem() +.content("key-content") +.filename("key-filename") +.updatedAt("2020-10-16T09:23:24.857Z"))) +.headers(Map.ofEntries(Map.entry("unique", "examplecreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse"))) +.method("GET") +.timeout(10.0) +.url("https://datadoghq.com") +.proxy(new SyntheticsTestRequestProxy() +.url("https://datadoghq.com") +.headers(Map.ofEntries())) +.basicAuth(new SyntheticsBasicAuth( +new SyntheticsBasicAuthOauthClient() +.accessTokenUrl("https://datadog-token.com") +.audience("audience") +.clientId("client-id") +.clientSecret("client-secret") +.resource("resource") +.scope("yoyo") +.tokenApiAuthentication(SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER) +.type(SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT))))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_http_test_payload.json") +.name("Example-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.monitorName("Example-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response") +.monitorPriority(5) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(60L) +.httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP2)) +.subtype(SyntheticsTestDetailsSubType.HTTP) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -152,4 +132,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.java b/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.java index c89eb26fedd..0c1c0c27ffe 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.java @@ -1,10 +1,10 @@ -// Create an API test with WEBSOCKET subtype returns "OK - Returns the created test details." -// response +// Create an API test with WEBSOCKET subtype returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -15,51 +15,50 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Arrays.asList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .target("message") - .type(SyntheticsAssertionType.RECEIVED_MESSAGE)), - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.LESS_THAN) - .target(2000) - .type(SyntheticsAssertionType.RESPONSE_TIME)))) - .request( - new SyntheticsTestRequest().url("ws://datadoghq.com").message("message"))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_test_websocket_payload.json") - .name( - "Example-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .monitorName( - "Example-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response") - .monitorPriority(5) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(60L)) - .subtype(SyntheticsTestDetailsSubType.WEBSOCKET) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Arrays.asList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.target("message") +.type(SyntheticsAssertionType.RECEIVED_MESSAGE)), new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.LESS_THAN) +.target(2000) +.type(SyntheticsAssertionType.RESPONSE_TIME)))) +.request(new SyntheticsTestRequest() +.url("ws://datadoghq.com") +.message("message"))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_test_websocket_payload.json") +.name("Example-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.monitorName("Example-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response") +.monitorPriority(5) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(60L)) +.subtype(SyntheticsTestDetailsSubType.WEBSOCKET) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -72,4 +71,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.java b/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.java index d9c354d80e5..99f52218764 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.java @@ -1,9 +1,10 @@ // Create an API test with UDP subtype returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -14,54 +15,51 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Arrays.asList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .target("message") - .type(SyntheticsAssertionType.RECEIVED_MESSAGE)), - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.LESS_THAN) - .target(2000) - .type(SyntheticsAssertionType.RESPONSE_TIME)))) - .request( - new SyntheticsTestRequest() - .host("https://datadoghq.com") - .message("message") - .port(443L))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_test_udp_payload.json") - .name( - "Example-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .monitorName( - "Example-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response") - .monitorPriority(5) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(60L)) - .subtype(SyntheticsTestDetailsSubType.UDP) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Arrays.asList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.target("message") +.type(SyntheticsAssertionType.RECEIVED_MESSAGE)), new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.LESS_THAN) +.target(2000) +.type(SyntheticsAssertionType.RESPONSE_TIME)))) +.request(new SyntheticsTestRequest() +.host("https://datadoghq.com") +.message("message") +.port(443L))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_test_udp_payload.json") +.name("Example-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.monitorName("Example-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response") +.monitorPriority(5) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(60L)) +.subtype(SyntheticsTestDetailsSubType.UDP) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -74,4 +72,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.java b/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.java index 986145959c1..d9319b3c746 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.java @@ -1,9 +1,10 @@ // Create an API HTTP with oauth-rop test returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -29,8 +30,11 @@ import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate; import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem; import com.datadog.api.client.v1.model.SyntheticsTestRequestProxy; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -38,108 +42,84 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Arrays.asList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .property("{{ PROPERTY }}") - .target("text/html") - .type(SyntheticsAssertionType.HEADER)), - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.LESS_THAN) - .target(2000) - .type(SyntheticsAssertionType.RESPONSE_TIME)), - new SyntheticsAssertion( - new SyntheticsAssertionJSONPathTarget() - .operator( - SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH) - .target( - new SyntheticsAssertionJSONPathTargetTarget() - .jsonPath("topKey") - .operator("isNot") - .targetValue("0")) - .type(SyntheticsAssertionType.BODY)), - new SyntheticsAssertion( - new SyntheticsAssertionXPathTarget() - .operator(SyntheticsAssertionXPathOperator.VALIDATES_X_PATH) - .target( - new SyntheticsAssertionXPathTargetTarget() - .xPath("target-xpath") - .targetValue("0") - .operator("contains")) - .type(SyntheticsAssertionType.BODY)))) - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT))) - .request( - new SyntheticsTestRequest() - .certificate( - new SyntheticsTestRequestCertificate() - .cert( - new SyntheticsTestRequestCertificateItem() - .content("cert-content") - .filename("cert-filename") - .updatedAt("2020-10-16T09:23:24.857Z")) - .key( - new SyntheticsTestRequestCertificateItem() - .content("key-content") - .filename("key-filename") - .updatedAt("2020-10-16T09:23:24.857Z"))) - .headers( - Map.ofEntries( - Map.entry( - "unique", - "examplecreateanapihttpwithoauthroptestreturnsokreturnsthecreatedtestdetailsresponse"))) - .method("GET") - .timeout(10.0) - .url("https://datadoghq.com") - .proxy( - new SyntheticsTestRequestProxy() - .url("https://datadoghq.com") - .headers(Map.ofEntries())) - .basicAuth( - new SyntheticsBasicAuth( - new SyntheticsBasicAuthOauthROP() - .accessTokenUrl("https://datadog-token.com") - .audience("audience") - .clientId("client-id") - .clientSecret("client-secret") - .resource("resource") - .scope("yoyo") - .tokenApiAuthentication( - SyntheticsBasicAuthOauthTokenApiAuthentication.BODY) - .type(SyntheticsBasicAuthOauthROPType.OAUTH_ROP) - .username("oauth-usermame") - .password("oauth-password"))))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_http_test_payload.json") - .name( - "Example-Create_an_API_HTTP_with_oauth_rop_test_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .monitorName( - "Example-Create_an_API_HTTP_with_oauth_rop_test_returns_OK_Returns_the_created_test_details_response") - .monitorPriority(5) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(60L)) - .subtype(SyntheticsTestDetailsSubType.HTTP) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Arrays.asList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.property("{{ PROPERTY }}") +.target("text/html") +.type(SyntheticsAssertionType.HEADER)), new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.LESS_THAN) +.target(2000) +.type(SyntheticsAssertionType.RESPONSE_TIME)), new SyntheticsAssertion( +new SyntheticsAssertionJSONPathTarget() +.operator(SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH) +.target(new SyntheticsAssertionJSONPathTargetTarget() +.jsonPath("topKey") +.operator("isNot") +.targetValue("0")) +.type(SyntheticsAssertionType.BODY)), new SyntheticsAssertion( +new SyntheticsAssertionXPathTarget() +.operator(SyntheticsAssertionXPathOperator.VALIDATES_X_PATH) +.target(new SyntheticsAssertionXPathTargetTarget() +.xPath("target-xpath") +.targetValue("0") +.operator("contains")) +.type(SyntheticsAssertionType.BODY)))) +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT))) +.request(new SyntheticsTestRequest() +.certificate(new SyntheticsTestRequestCertificate() +.cert(new SyntheticsTestRequestCertificateItem() +.content("cert-content") +.filename("cert-filename") +.updatedAt("2020-10-16T09:23:24.857Z")) +.key(new SyntheticsTestRequestCertificateItem() +.content("key-content") +.filename("key-filename") +.updatedAt("2020-10-16T09:23:24.857Z"))) +.headers(Map.ofEntries(Map.entry("unique", "examplecreateanapihttpwithoauthroptestreturnsokreturnsthecreatedtestdetailsresponse"))) +.method("GET") +.timeout(10.0) +.url("https://datadoghq.com") +.proxy(new SyntheticsTestRequestProxy() +.url("https://datadoghq.com") +.headers(Map.ofEntries())) +.basicAuth(new SyntheticsBasicAuth( +new SyntheticsBasicAuthOauthROP() +.accessTokenUrl("https://datadog-token.com") +.audience("audience") +.clientId("client-id") +.clientSecret("client-secret") +.resource("resource") +.scope("yoyo") +.tokenApiAuthentication(SyntheticsBasicAuthOauthTokenApiAuthentication.BODY) +.type(SyntheticsBasicAuthOauthROPType.OAUTH_ROP) +.username("oauth-usermame") +.password("oauth-password"))))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_http_test_payload.json") +.name("Example-Create_an_API_HTTP_with_oauth_rop_test_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.monitorName("Example-Create_an_API_HTTP_with_oauth_rop_test_returns_OK_Returns_the_created_test_details_response") +.monitorPriority(5) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(60L)) +.subtype(SyntheticsTestDetailsSubType.HTTP) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body); @@ -152,4 +132,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest.java b/examples/v1/synthetics/CreateSyntheticsBrowserTest.java index 7033b8e0cca..ad397d29ebd 100644 --- a/examples/v1/synthetics/CreateSyntheticsBrowserTest.java +++ b/examples/v1/synthetics/CreateSyntheticsBrowserTest.java @@ -1,9 +1,10 @@ // Create a browser test returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsBrowserTest; +import com.datadog.api.client.v1.model.SyntheticsBrowserTest; import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig; import com.datadog.api.client.v1.model.SyntheticsBrowserTestType; import com.datadog.api.client.v1.model.SyntheticsConfigVariable; @@ -14,53 +15,54 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsBrowserTest body = - new SyntheticsBrowserTest() - .config( - new SyntheticsBrowserTestConfig() - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT) - .secure(true))) - .request(new SyntheticsTestRequest().method("GET").url("https://datadoghq.com")) - .setCookie("name:test")) - .locations(Collections.singletonList("aws:us-east-2")) - .message("Test message") - .name( - "Example-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET)) - .disableCors(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .noScreenshot(true) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(300L)) - .tags(Collections.singletonList("testing:browser")) - .type(SyntheticsBrowserTestType.BROWSER) - .steps( - Collections.singletonList( - new SyntheticsStep() - .allowFailure(false) - .isCritical(true) - .name("Refresh page") - .params(new Object()) - .type(SyntheticsStepType.REFRESH))); + SyntheticsBrowserTest body = new SyntheticsBrowserTest() +.config(new SyntheticsBrowserTestConfig() +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT) +.secure(true))) +.request(new SyntheticsTestRequest() +.method("GET") +.url("https://datadoghq.com")) +.setCookie("name:test")) +.locations(Collections.singletonList("aws:us-east-2")) +.message("Test message") +.name("Example-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET)) +.disableCors(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.noScreenshot(true) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(300L)) +.tags(Collections.singletonList("testing:browser")) +.type(SyntheticsBrowserTestType.BROWSER) +.steps(Collections.singletonList(new SyntheticsStep() +.allowFailure(false) +.isCritical(true) +.name("Refresh page") +.params(new Object()) +.type(SyntheticsStepType.REFRESH))); try { SyntheticsBrowserTest result = apiInstance.createSyntheticsBrowserTest(body); @@ -73,4 +75,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.java b/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.java index 45a0ee4a6e8..bb4cd1381f0 100644 --- a/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.java +++ b/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.java @@ -1,9 +1,10 @@ // Create a browser test returns "OK - Returns saved rumSettings." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsBrowserTest; +import com.datadog.api.client.v1.model.SyntheticsBrowserTest; import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig; import com.datadog.api.client.v1.model.SyntheticsBrowserTestRumSettings; import com.datadog.api.client.v1.model.SyntheticsBrowserTestType; @@ -17,66 +18,63 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptions; import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsBrowserTest body = - new SyntheticsBrowserTest() - .config( - new SyntheticsBrowserTestConfig() - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT))) - .request( - new SyntheticsTestRequest() - .method("GET") - .url("https://datadoghq.com") - .certificateDomains(Collections.singletonList("https://datadoghq.com"))) - .setCookie("name:test")) - .locations(Collections.singletonList("aws:us-east-2")) - .message("Test message") - .name("Example-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET)) - .disableCors(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .noScreenshot(true) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .rumSettings( - new SyntheticsBrowserTestRumSettings() - .isEnabled(true) - .applicationId("mockApplicationId") - .clientTokenId(12345L)) - .tickEvery(300L) - .ci( - new SyntheticsTestCiOptions() - .executionRule(SyntheticsTestExecutionRule.SKIPPED)) - .ignoreServerCertificateError(true) - .disableCsp(true) - .initialNavigationTimeout(200L)) - .tags(Collections.singletonList("testing:browser")) - .type(SyntheticsBrowserTestType.BROWSER) - .steps( - Collections.singletonList( - new SyntheticsStep() - .allowFailure(false) - .isCritical(true) - .name("Refresh page") - .params(new Object()) - .type(SyntheticsStepType.REFRESH))); + SyntheticsBrowserTest body = new SyntheticsBrowserTest() +.config(new SyntheticsBrowserTestConfig() +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT))) +.request(new SyntheticsTestRequest() +.method("GET") +.url("https://datadoghq.com") +.certificateDomains(Collections.singletonList("https://datadoghq.com"))) +.setCookie("name:test")) +.locations(Collections.singletonList("aws:us-east-2")) +.message("Test message") +.name("Example-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET)) +.disableCors(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.noScreenshot(true) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.rumSettings(new SyntheticsBrowserTestRumSettings() +.isEnabled(true) +.applicationId("mockApplicationId") +.clientTokenId(12345L)) +.tickEvery(300L) +.ci(new SyntheticsTestCiOptions() +.executionRule(SyntheticsTestExecutionRule.SKIPPED)) +.ignoreServerCertificateError(true) +.disableCsp(true) +.initialNavigationTimeout(200L)) +.tags(Collections.singletonList("testing:browser")) +.type(SyntheticsBrowserTestType.BROWSER) +.steps(Collections.singletonList(new SyntheticsStep() +.allowFailure(false) +.isCritical(true) +.name("Refresh page") +.params(new Object()) +.type(SyntheticsStepType.REFRESH))); try { SyntheticsBrowserTest result = apiInstance.createSyntheticsBrowserTest(body); @@ -89,4 +87,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.java b/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.java index 0ea6010d7eb..033c403231f 100644 --- a/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.java +++ b/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.java @@ -1,10 +1,10 @@ -// Create a browser test with advanced scheduling options returns "OK - Returns the created test -// details." response +// Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsBrowserTest; +import com.datadog.api.client.v1.model.SyntheticsBrowserTest; import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig; import com.datadog.api.client.v1.model.SyntheticsBrowserTestType; import com.datadog.api.client.v1.model.SyntheticsConfigVariable; @@ -17,66 +17,62 @@ import com.datadog.api.client.v1.model.SyntheticsTestOptionsScheduling; import com.datadog.api.client.v1.model.SyntheticsTestOptionsSchedulingTimeframe; import com.datadog.api.client.v1.model.SyntheticsTestRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsBrowserTest body = - new SyntheticsBrowserTest() - .config( - new SyntheticsBrowserTestConfig() - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT))) - .request(new SyntheticsTestRequest().method("GET").url("https://datadoghq.com")) - .setCookie("name:test")) - .locations(Collections.singletonList("aws:us-east-2")) - .message("Test message") - .name( - "Example-Create_a_browser_test_with_advanced_scheduling_options_returns_OK_Returns_the_created_test_details_r") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET)) - .disableCors(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .noScreenshot(true) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(300L) - .scheduling( - new SyntheticsTestOptionsScheduling() - .timeframes( - Arrays.asList( - new SyntheticsTestOptionsSchedulingTimeframe() - .day(1) - .from("07:00") - .to("16:00"), - new SyntheticsTestOptionsSchedulingTimeframe() - .day(3) - .from("07:00") - .to("16:00"))) - .timezone("America/New_York"))) - .tags(Collections.singletonList("testing:browser")) - .type(SyntheticsBrowserTestType.BROWSER) - .steps( - Collections.singletonList( - new SyntheticsStep() - .allowFailure(false) - .isCritical(true) - .name("Refresh page") - .params(new Object()) - .type(SyntheticsStepType.REFRESH))); + SyntheticsBrowserTest body = new SyntheticsBrowserTest() +.config(new SyntheticsBrowserTestConfig() +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT))) +.request(new SyntheticsTestRequest() +.method("GET") +.url("https://datadoghq.com")) +.setCookie("name:test")) +.locations(Collections.singletonList("aws:us-east-2")) +.message("Test message") +.name("Example-Create_a_browser_test_with_advanced_scheduling_options_returns_OK_Returns_the_created_test_details_r") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET)) +.disableCors(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.noScreenshot(true) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(300L) +.scheduling(new SyntheticsTestOptionsScheduling() +.timeframes(Arrays.asList(new SyntheticsTestOptionsSchedulingTimeframe() +.day(1) +.from("07:00") +.to("16:00"), new SyntheticsTestOptionsSchedulingTimeframe() +.day(3) +.from("07:00") +.to("16:00"))) +.timezone("America/New_York"))) +.tags(Collections.singletonList("testing:browser")) +.type(SyntheticsBrowserTestType.BROWSER) +.steps(Collections.singletonList(new SyntheticsStep() +.allowFailure(false) +.isCritical(true) +.name("Refresh page") +.params(new Object()) +.type(SyntheticsStepType.REFRESH))); try { SyntheticsBrowserTest result = apiInstance.createSyntheticsBrowserTest(body); @@ -89,4 +85,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/DeleteGlobalVariable.java b/examples/v1/synthetics/DeleteGlobalVariable.java index 546721578c9..dd0c1cebbdd 100644 --- a/examples/v1/synthetics/DeleteGlobalVariable.java +++ b/examples/v1/synthetics/DeleteGlobalVariable.java @@ -1,8 +1,14 @@ // Delete a global variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/DeletePrivateLocation.java b/examples/v1/synthetics/DeletePrivateLocation.java index 86f086aca4a..e4aaf12bf5e 100644 --- a/examples/v1/synthetics/DeletePrivateLocation.java +++ b/examples/v1/synthetics/DeletePrivateLocation.java @@ -1,8 +1,14 @@ // Delete a private location returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/DeleteTests.java b/examples/v1/synthetics/DeleteTests.java index 1fa48e4bf8b..5eb8d63c26a 100644 --- a/examples/v1/synthetics/DeleteTests.java +++ b/examples/v1/synthetics/DeleteTests.java @@ -1,11 +1,16 @@ // Delete tests returns "OK." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; -import com.datadog.api.client.v1.model.SyntheticsDeleteTestsPayload; import com.datadog.api.client.v1.model.SyntheticsDeleteTestsResponse; +import com.datadog.api.client.v1.model.SyntheticsDeleteTestsPayload; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,9 +20,8 @@ public static void main(String[] args) { // there is a valid "synthetics_api_test" in the system String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID"); - SyntheticsDeleteTestsPayload body = - new SyntheticsDeleteTestsPayload() - .publicIds(Collections.singletonList(SYNTHETICS_API_TEST_PUBLIC_ID)); + SyntheticsDeleteTestsPayload body = new SyntheticsDeleteTestsPayload() +.publicIds(Collections.singletonList(SYNTHETICS_API_TEST_PUBLIC_ID)); try { SyntheticsDeleteTestsResponse result = apiInstance.deleteTests(body); @@ -30,4 +34,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/EditGlobalVariable.java b/examples/v1/synthetics/EditGlobalVariable.java index ba29d3acdef..723aee3cbc1 100644 --- a/examples/v1/synthetics/EditGlobalVariable.java +++ b/examples/v1/synthetics/EditGlobalVariable.java @@ -1,43 +1,45 @@ // Edit a global variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableAttributes; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptions; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType; -import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType; import com.datadog.api.client.v1.model.SyntheticsGlobalVariableValue; import com.datadog.api.client.v1.model.SyntheticsVariableParser; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsGlobalVariable body = - new SyntheticsGlobalVariable() - .attributes( - new SyntheticsGlobalVariableAttributes() - .restrictedRoles( - Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))) - .description("Example description") - .name("MY_VARIABLE") - .parseTestOptions( - new SyntheticsGlobalVariableParseTestOptions() - .field("content-type") - .localVariableName("LOCAL_VARIABLE") - .parser( - new SyntheticsVariableParser() - .type(SyntheticsGlobalVariableParserType.REGEX) - .value(".*")) - .type(SyntheticsGlobalVariableParseTestOptionsType.HTTP_BODY)) - .parseTestPublicId("abc-def-123") - .tags(Arrays.asList("team:front", "test:workflow-1")) - .value(new SyntheticsGlobalVariableValue().secure(true).value("value")); + SyntheticsGlobalVariable body = new SyntheticsGlobalVariable() +.attributes(new SyntheticsGlobalVariableAttributes() +.restrictedRoles(Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))) +.description("Example description") +.name("MY_VARIABLE") +.parseTestOptions(new SyntheticsGlobalVariableParseTestOptions() +.field("content-type") +.localVariableName("LOCAL_VARIABLE") +.parser(new SyntheticsVariableParser() +.type(SyntheticsGlobalVariableParserType.REGEX) +.value(".*")) +.type(SyntheticsGlobalVariableParseTestOptionsType.HTTP_BODY)) +.parseTestPublicId("abc-def-123") +.tags(Arrays.asList("team:front", "test:workflow-1")) +.value(new SyntheticsGlobalVariableValue() +.secure(true) +.value("value")); try { SyntheticsGlobalVariable result = apiInstance.editGlobalVariable("variable_id", body); @@ -50,4 +52,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetAPITest.java b/examples/v1/synthetics/GetAPITest.java index 28f82b07c9a..f03677ed5cb 100644 --- a/examples/v1/synthetics/GetAPITest.java +++ b/examples/v1/synthetics/GetAPITest.java @@ -1,9 +1,15 @@ // Get an API test returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetAPITestLatestResults.java b/examples/v1/synthetics/GetAPITestLatestResults.java index c6dac93afb6..afed3797ec3 100644 --- a/examples/v1/synthetics/GetAPITestLatestResults.java +++ b/examples/v1/synthetics/GetAPITestLatestResults.java @@ -1,9 +1,15 @@ // Get an API test's latest results summaries returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsGetAPITestLatestResultsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); try { - SyntheticsGetAPITestLatestResultsResponse result = - apiInstance.getAPITestLatestResults("hwb-332-3xe"); + SyntheticsGetAPITestLatestResultsResponse result = apiInstance.getAPITestLatestResults("hwb-332-3xe"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SyntheticsApi#getAPITestLatestResults"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetAPITestResult.java b/examples/v1/synthetics/GetAPITestResult.java index 0e015961e1f..4e8ba57413e 100644 --- a/examples/v1/synthetics/GetAPITestResult.java +++ b/examples/v1/synthetics/GetAPITestResult.java @@ -1,9 +1,15 @@ // Get an API test result returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITestResultFull; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); try { - SyntheticsAPITestResultFull result = - apiInstance.getAPITestResult("hwb-332-3xe", "3420446318379485707"); + SyntheticsAPITestResultFull result = apiInstance.getAPITestResult("hwb-332-3xe", "3420446318379485707"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SyntheticsApi#getAPITestResult"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetAPITestResult_1321866518.java b/examples/v1/synthetics/GetAPITestResult_1321866518.java index 6a826dca5b7..ce68c183ff3 100644 --- a/examples/v1/synthetics/GetAPITestResult_1321866518.java +++ b/examples/v1/synthetics/GetAPITestResult_1321866518.java @@ -1,9 +1,15 @@ // Get an API test result returns result with failure object -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITestResultFull; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,18 +17,13 @@ public static void main(String[] args) { SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); // there is a "synthetics_api_test_with_wrong_dns" in the system - String SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID = - System.getenv("SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID"); + String SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID"); // the "synthetics_api_test_with_wrong_dns" is triggered - String SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID = - System.getenv("SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID"); + String SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID = System.getenv("SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID"); try { - SyntheticsAPITestResultFull result = - apiInstance.getAPITestResult( - SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID, - SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID); + SyntheticsAPITestResultFull result = apiInstance.getAPITestResult(SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID, SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SyntheticsApi#getAPITestResult"); @@ -32,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetBrowserTest.java b/examples/v1/synthetics/GetBrowserTest.java index 3dfa9afce41..ca1550da2a2 100644 --- a/examples/v1/synthetics/GetBrowserTest.java +++ b/examples/v1/synthetics/GetBrowserTest.java @@ -1,9 +1,15 @@ // Get a browser test returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsBrowserTest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetBrowserTestLatestResults.java b/examples/v1/synthetics/GetBrowserTestLatestResults.java index 5ed331b886f..b2e1cdcf78a 100644 --- a/examples/v1/synthetics/GetBrowserTestLatestResults.java +++ b/examples/v1/synthetics/GetBrowserTestLatestResults.java @@ -1,9 +1,15 @@ // Get a browser test's latest results summaries returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsGetBrowserTestLatestResultsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); try { - SyntheticsGetBrowserTestLatestResultsResponse result = - apiInstance.getBrowserTestLatestResults("2yy-sem-mjh"); + SyntheticsGetBrowserTestLatestResultsResponse result = apiInstance.getBrowserTestLatestResults("2yy-sem-mjh"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SyntheticsApi#getBrowserTestLatestResults"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetBrowserTestResult.java b/examples/v1/synthetics/GetBrowserTestResult.java index 560cf20f175..ae1e072d468 100644 --- a/examples/v1/synthetics/GetBrowserTestResult.java +++ b/examples/v1/synthetics/GetBrowserTestResult.java @@ -1,9 +1,15 @@ // Get a browser test result returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsBrowserTestResultFull; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); try { - SyntheticsBrowserTestResultFull result = - apiInstance.getBrowserTestResult("2yy-sem-mjh", "5671719892074090418"); + SyntheticsBrowserTestResultFull result = apiInstance.getBrowserTestResult("2yy-sem-mjh", "5671719892074090418"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SyntheticsApi#getBrowserTestResult"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetGlobalVariable.java b/examples/v1/synthetics/GetGlobalVariable.java index 8b5d6726797..2a10270719d 100644 --- a/examples/v1/synthetics/GetGlobalVariable.java +++ b/examples/v1/synthetics/GetGlobalVariable.java @@ -1,9 +1,15 @@ // Get a global variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetPrivateLocation.java b/examples/v1/synthetics/GetPrivateLocation.java index 39c59f7e5bd..df5a4eb7cd1 100644 --- a/examples/v1/synthetics/GetPrivateLocation.java +++ b/examples/v1/synthetics/GetPrivateLocation.java @@ -1,9 +1,15 @@ // Get a private location returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetSyntheticsCIBatch.java b/examples/v1/synthetics/GetSyntheticsCIBatch.java index c67ff68ab39..2009b87c32e 100644 --- a/examples/v1/synthetics/GetSyntheticsCIBatch.java +++ b/examples/v1/synthetics/GetSyntheticsCIBatch.java @@ -1,9 +1,15 @@ // Get details of batch returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsBatchDetails; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/GetTest.java b/examples/v1/synthetics/GetTest.java index 6696b498884..7a1fbae6f7b 100644 --- a/examples/v1/synthetics/GetTest.java +++ b/examples/v1/synthetics/GetTest.java @@ -1,9 +1,15 @@ // Get a test configuration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsTestDetails; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/ListGlobalVariables.java b/examples/v1/synthetics/ListGlobalVariables.java index bd3376d9e7e..7927874ccb1 100644 --- a/examples/v1/synthetics/ListGlobalVariables.java +++ b/examples/v1/synthetics/ListGlobalVariables.java @@ -1,9 +1,15 @@ // Get all global variables returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsListGlobalVariablesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/ListLocations.java b/examples/v1/synthetics/ListLocations.java index f704da56551..1bc709b5070 100644 --- a/examples/v1/synthetics/ListLocations.java +++ b/examples/v1/synthetics/ListLocations.java @@ -1,9 +1,15 @@ // Get all locations (public and private) returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsLocations; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/ListTests.java b/examples/v1/synthetics/ListTests.java index 0e1f7e89cb7..69716e516af 100644 --- a/examples/v1/synthetics/ListTests.java +++ b/examples/v1/synthetics/ListTests.java @@ -1,10 +1,15 @@ -// Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." -// response +// Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsListTestsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/ListTests_2779190961.java b/examples/v1/synthetics/ListTests_2779190961.java index 1e8e172904c..d2ad1fb485d 100644 --- a/examples/v1/synthetics/ListTests_2779190961.java +++ b/examples/v1/synthetics/ListTests_2779190961.java @@ -1,9 +1,15 @@ // Client is resilient to enum and oneOf deserialization errors -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsListTestsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/TriggerCITests.java b/examples/v1/synthetics/TriggerCITests.java index c18ce8724f2..aa5dcd5730d 100644 --- a/examples/v1/synthetics/TriggerCITests.java +++ b/examples/v1/synthetics/TriggerCITests.java @@ -1,8 +1,9 @@ // Trigger tests from CI/CD pipelines returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; +import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse; import com.datadog.api.client.v1.model.SyntheticsBasicAuth; import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb; import com.datadog.api.client.v1.model.SyntheticsBasicAuthWebType; @@ -15,36 +16,34 @@ import com.datadog.api.client.v1.model.SyntheticsCITestBody; import com.datadog.api.client.v1.model.SyntheticsDeviceID; import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry; -import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsCITestBody body = - new SyntheticsCITestBody() - .tests( - Collections.singletonList( - new SyntheticsCITest() - .basicAuth( - new SyntheticsBasicAuth( - new SyntheticsBasicAuthWeb() - .password("PaSSw0RD!") - .type(SyntheticsBasicAuthWebType.WEB) - .username("my_username"))) - .deviceIds(Collections.singletonList(SyntheticsDeviceID.LAPTOP_LARGE)) - .locations(Collections.singletonList("aws:eu-west-3")) - .metadata( - new SyntheticsCIBatchMetadata() - .ci( - new SyntheticsCIBatchMetadataCI() - .pipeline(new SyntheticsCIBatchMetadataPipeline()) - .provider(new SyntheticsCIBatchMetadataProvider())) - .git(new SyntheticsCIBatchMetadataGit())) - .publicId("aaa-aaa-aaa") - .retry(new SyntheticsTestOptionsRetry()))); + SyntheticsCITestBody body = new SyntheticsCITestBody() +.tests(Collections.singletonList(new SyntheticsCITest() +.basicAuth(new SyntheticsBasicAuth( +new SyntheticsBasicAuthWeb() +.password("PaSSw0RD!") +.type(SyntheticsBasicAuthWebType.WEB) +.username("my_username"))) +.deviceIds(Collections.singletonList(SyntheticsDeviceID.LAPTOP_LARGE)) +.locations(Collections.singletonList("aws:eu-west-3")) +.metadata(new SyntheticsCIBatchMetadata() +.ci(new SyntheticsCIBatchMetadataCI() +.pipeline(new SyntheticsCIBatchMetadataPipeline()) +.provider(new SyntheticsCIBatchMetadataProvider())) +.git(new SyntheticsCIBatchMetadataGit())) +.publicId("aaa-aaa-aaa") +.retry(new SyntheticsTestOptionsRetry()))); try { SyntheticsTriggerCITestsResponse result = apiInstance.triggerCITests(body); @@ -57,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/TriggerTests.java b/examples/v1/synthetics/TriggerTests.java index 81628c49382..a80b6bceba4 100644 --- a/examples/v1/synthetics/TriggerTests.java +++ b/examples/v1/synthetics/TriggerTests.java @@ -1,12 +1,17 @@ // Trigger Synthetics tests returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; -import com.datadog.api.client.v1.model.SyntheticsTriggerBody; import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse; +import com.datadog.api.client.v1.model.SyntheticsTriggerBody; import com.datadog.api.client.v1.model.SyntheticsTriggerTest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,11 +21,9 @@ public static void main(String[] args) { // there is a valid "synthetics_api_test" in the system String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID"); - SyntheticsTriggerBody body = - new SyntheticsTriggerBody() - .tests( - Collections.singletonList( - new SyntheticsTriggerTest().publicId(SYNTHETICS_API_TEST_PUBLIC_ID))); + SyntheticsTriggerBody body = new SyntheticsTriggerBody() +.tests(Collections.singletonList(new SyntheticsTriggerTest() +.publicId(SYNTHETICS_API_TEST_PUBLIC_ID))); try { SyntheticsTriggerCITestsResponse result = apiInstance.triggerTests(body); @@ -33,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/UpdateAPITest.java b/examples/v1/synthetics/UpdateAPITest.java index b72600a2980..294cc8e3d4b 100644 --- a/examples/v1/synthetics/UpdateAPITest.java +++ b/examples/v1/synthetics/UpdateAPITest.java @@ -1,9 +1,10 @@ // Edit an API test returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsAPITest; import com.datadog.api.client.v1.model.SyntheticsAPITestConfig; import com.datadog.api.client.v1.model.SyntheticsAPITestType; import com.datadog.api.client.v1.model.SyntheticsAssertion; @@ -22,8 +23,11 @@ import com.datadog.api.client.v1.model.SyntheticsTestRequest; import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate; import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -34,76 +38,61 @@ public static void main(String[] args) { // there is a valid "synthetics_api_test" in the system String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID"); - SyntheticsAPITest body = - new SyntheticsAPITest() - .config( - new SyntheticsAPITestConfig() - .assertions( - Arrays.asList( - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.IS) - .property("{{ PROPERTY }}") - .target("text/html") - .type(SyntheticsAssertionType.HEADER)), - new SyntheticsAssertion( - new SyntheticsAssertionTarget() - .operator(SyntheticsAssertionOperator.LESS_THAN) - .target(2000) - .type(SyntheticsAssertionType.RESPONSE_TIME)), - new SyntheticsAssertion( - new SyntheticsAssertionJSONPathTarget() - .operator( - SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH) - .target( - new SyntheticsAssertionJSONPathTargetTarget() - .jsonPath("topKey") - .operator("isNot") - .targetValue("0")) - .type(SyntheticsAssertionType.BODY)))) - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .example("content-type") - .name("PROPERTY") - .pattern("content-type") - .type(SyntheticsConfigVariableType.TEXT))) - .request( - new SyntheticsTestRequest() - .certificate( - new SyntheticsTestRequestCertificate() - .cert( - new SyntheticsTestRequestCertificateItem() - .filename("cert-filename") - .updatedAt("2020-10-16T09:23:24.857Z")) - .key( - new SyntheticsTestRequestCertificateItem() - .filename("key-filename") - .updatedAt("2020-10-16T09:23:24.857Z"))) - .headers( - Map.ofEntries( - Map.entry("unique", "exampleeditanapitestreturnsokresponse"))) - .method("GET") - .timeout(10.0) - .url("https://datadoghq.com"))) - .locations(Collections.singletonList("aws:us-east-2")) - .message("BDD test payload: synthetics_api_test_payload.json") - .name("Example-Edit_an_API_test_returns_OK_response-updated") - .options( - new SyntheticsTestOptions() - .acceptSelfSigned(false) - .allowInsecure(true) - .followRedirects(true) - .minFailureDuration(10L) - .minLocationFailed(1L) - .monitorName("Test-TestSyntheticsAPITestLifecycle-1623076664") - .monitorPriority(5) - .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0)) - .tickEvery(60L)) - .status(SyntheticsTestPauseStatus.LIVE) - .subtype(SyntheticsTestDetailsSubType.HTTP) - .tags(Collections.singletonList("testing:api")) - .type(SyntheticsAPITestType.API); + SyntheticsAPITest body = new SyntheticsAPITest() +.config(new SyntheticsAPITestConfig() +.assertions(Arrays.asList(new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.IS) +.property("{{ PROPERTY }}") +.target("text/html") +.type(SyntheticsAssertionType.HEADER)), new SyntheticsAssertion( +new SyntheticsAssertionTarget() +.operator(SyntheticsAssertionOperator.LESS_THAN) +.target(2000) +.type(SyntheticsAssertionType.RESPONSE_TIME)), new SyntheticsAssertion( +new SyntheticsAssertionJSONPathTarget() +.operator(SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH) +.target(new SyntheticsAssertionJSONPathTargetTarget() +.jsonPath("topKey") +.operator("isNot") +.targetValue("0")) +.type(SyntheticsAssertionType.BODY)))) +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.example("content-type") +.name("PROPERTY") +.pattern("content-type") +.type(SyntheticsConfigVariableType.TEXT))) +.request(new SyntheticsTestRequest() +.certificate(new SyntheticsTestRequestCertificate() +.cert(new SyntheticsTestRequestCertificateItem() +.filename("cert-filename") +.updatedAt("2020-10-16T09:23:24.857Z")) +.key(new SyntheticsTestRequestCertificateItem() +.filename("key-filename") +.updatedAt("2020-10-16T09:23:24.857Z"))) +.headers(Map.ofEntries(Map.entry("unique", "exampleeditanapitestreturnsokresponse"))) +.method("GET") +.timeout(10.0) +.url("https://datadoghq.com"))) +.locations(Collections.singletonList("aws:us-east-2")) +.message("BDD test payload: synthetics_api_test_payload.json") +.name("Example-Edit_an_API_test_returns_OK_response-updated") +.options(new SyntheticsTestOptions() +.acceptSelfSigned(false) +.allowInsecure(true) +.followRedirects(true) +.minFailureDuration(10L) +.minLocationFailed(1L) +.monitorName("Test-TestSyntheticsAPITestLifecycle-1623076664") +.monitorPriority(5) +.retry(new SyntheticsTestOptionsRetry() +.count(3L) +.interval(10.0)) +.tickEvery(60L)) +.status(SyntheticsTestPauseStatus.LIVE) +.subtype(SyntheticsTestDetailsSubType.HTTP) +.tags(Collections.singletonList("testing:api")) +.type(SyntheticsAPITestType.API); try { SyntheticsAPITest result = apiInstance.updateAPITest(SYNTHETICS_API_TEST_PUBLIC_ID, body); @@ -116,4 +105,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/UpdateBrowserTest.java b/examples/v1/synthetics/UpdateBrowserTest.java index 68347cdc6c6..19ee39ce930 100644 --- a/examples/v1/synthetics/UpdateBrowserTest.java +++ b/examples/v1/synthetics/UpdateBrowserTest.java @@ -1,8 +1,9 @@ // Edit a browser test returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; +import com.datadog.api.client.v1.model.SyntheticsBrowserTest; import com.datadog.api.client.v1.model.SyntheticsBasicAuth; import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb; import com.datadog.api.client.v1.model.SyntheticsBasicAuthWebType; @@ -32,84 +33,71 @@ import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate; import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem; import com.datadog.api.client.v1.model.SyntheticsTestRequestProxy; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsBrowserTest body = - new SyntheticsBrowserTest() - .config( - new SyntheticsBrowserTestConfig() - .configVariables( - Collections.singletonList( - new SyntheticsConfigVariable() - .name("VARIABLE_NAME") - .secure(false) - .type(SyntheticsConfigVariableType.TEXT))) - .request( - new SyntheticsTestRequest() - .basicAuth( - new SyntheticsBasicAuth( - new SyntheticsBasicAuthWeb() - .password("PaSSw0RD!") - .type(SyntheticsBasicAuthWebType.WEB) - .username("my_username"))) - .bodyType(SyntheticsTestRequestBodyType.TEXT_PLAIN) - .callType(SyntheticsTestCallType.UNARY) - .certificate( - new SyntheticsTestRequestCertificate() - .cert(new SyntheticsTestRequestCertificateItem()) - .key(new SyntheticsTestRequestCertificateItem())) - .proxy(new SyntheticsTestRequestProxy().url("https://example.com")) - .service("Greeter") - .url("https://example.com")) - .variables( - Collections.singletonList( - new SyntheticsBrowserVariable() - .name("VARIABLE_NAME") - .type(SyntheticsBrowserVariableType.TEXT)))) - .locations(Collections.singletonList("aws:eu-west-3")) - .message("") - .name("Example test name") - .options( - new SyntheticsTestOptions() - .ci( - new SyntheticsTestCiOptions() - .executionRule(SyntheticsTestExecutionRule.BLOCKING)) - .deviceIds(Collections.singletonList(SyntheticsDeviceID.LAPTOP_LARGE)) - .httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1) - .monitorOptions(new SyntheticsTestOptionsMonitorOptions()) - .restrictedRoles( - Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")) - .retry(new SyntheticsTestOptionsRetry()) - .rumSettings( - new SyntheticsBrowserTestRumSettings() - .applicationId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") - .clientTokenId(12345L) - .isEnabled(true)) - .scheduling( - new SyntheticsTestOptionsScheduling() - .timeframes( - Arrays.asList( - new SyntheticsTestOptionsSchedulingTimeframe() - .day(1) - .from("07:00") - .to("16:00"), - new SyntheticsTestOptionsSchedulingTimeframe() - .day(3) - .from("07:00") - .to("16:00"))) - .timezone("America/New_York"))) - .status(SyntheticsTestPauseStatus.LIVE) - .steps( - Collections.singletonList( - new SyntheticsStep().type(SyntheticsStepType.ASSERT_ELEMENT_CONTENT))) - .tags(Collections.singletonList("env:prod")) - .type(SyntheticsBrowserTestType.BROWSER); + SyntheticsBrowserTest body = new SyntheticsBrowserTest() +.config(new SyntheticsBrowserTestConfig() +.configVariables(Collections.singletonList(new SyntheticsConfigVariable() +.name("VARIABLE_NAME") +.secure(false) +.type(SyntheticsConfigVariableType.TEXT))) +.request(new SyntheticsTestRequest() +.basicAuth(new SyntheticsBasicAuth( +new SyntheticsBasicAuthWeb() +.password("PaSSw0RD!") +.type(SyntheticsBasicAuthWebType.WEB) +.username("my_username"))) +.bodyType(SyntheticsTestRequestBodyType.TEXT_PLAIN) +.callType(SyntheticsTestCallType.UNARY) +.certificate(new SyntheticsTestRequestCertificate() +.cert(new SyntheticsTestRequestCertificateItem()) +.key(new SyntheticsTestRequestCertificateItem())) +.proxy(new SyntheticsTestRequestProxy() +.url("https://example.com")) +.service("Greeter") +.url("https://example.com")) +.variables(Collections.singletonList(new SyntheticsBrowserVariable() +.name("VARIABLE_NAME") +.type(SyntheticsBrowserVariableType.TEXT)))) +.locations(Collections.singletonList("aws:eu-west-3")) +.message("") +.name("Example test name") +.options(new SyntheticsTestOptions() +.ci(new SyntheticsTestCiOptions() +.executionRule(SyntheticsTestExecutionRule.BLOCKING)) +.deviceIds(Collections.singletonList(SyntheticsDeviceID.LAPTOP_LARGE)) +.httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1) +.monitorOptions(new SyntheticsTestOptionsMonitorOptions()) +.restrictedRoles(Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")) +.retry(new SyntheticsTestOptionsRetry()) +.rumSettings(new SyntheticsBrowserTestRumSettings() +.applicationId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") +.clientTokenId(12345L) +.isEnabled(true)) +.scheduling(new SyntheticsTestOptionsScheduling() +.timeframes(Arrays.asList(new SyntheticsTestOptionsSchedulingTimeframe() +.day(1) +.from("07:00") +.to("16:00"), new SyntheticsTestOptionsSchedulingTimeframe() +.day(3) +.from("07:00") +.to("16:00"))) +.timezone("America/New_York"))) +.status(SyntheticsTestPauseStatus.LIVE) +.steps(Collections.singletonList(new SyntheticsStep() +.type(SyntheticsStepType.ASSERT_ELEMENT_CONTENT))) +.tags(Collections.singletonList("env:prod")) +.type(SyntheticsBrowserTestType.BROWSER); try { SyntheticsBrowserTest result = apiInstance.updateBrowserTest("public_id", body); @@ -122,4 +110,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/UpdatePrivateLocation.java b/examples/v1/synthetics/UpdatePrivateLocation.java index 0152a7634c2..fe2af4b7401 100644 --- a/examples/v1/synthetics/UpdatePrivateLocation.java +++ b/examples/v1/synthetics/UpdatePrivateLocation.java @@ -1,26 +1,29 @@ // Edit a private location returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; +import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; import com.datadog.api.client.v1.model.SyntheticsPrivateLocationMetadata; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsPrivateLocation body = - new SyntheticsPrivateLocation() - .description("Description of private location") - .metadata( - new SyntheticsPrivateLocationMetadata() - .restrictedRoles( - Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))) - .name("New private location") - .tags(Collections.singletonList("team:front")); + SyntheticsPrivateLocation body = new SyntheticsPrivateLocation() +.description("Description of private location") +.metadata(new SyntheticsPrivateLocationMetadata() +.restrictedRoles(Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))) +.name("New private location") +.tags(Collections.singletonList("team:front")); try { SyntheticsPrivateLocation result = apiInstance.updatePrivateLocation("location_id", body); @@ -33,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/synthetics/UpdateTestPauseStatus.java b/examples/v1/synthetics/UpdateTestPauseStatus.java index 7da494fbd9c..276ce932f40 100644 --- a/examples/v1/synthetics/UpdateTestPauseStatus.java +++ b/examples/v1/synthetics/UpdateTestPauseStatus.java @@ -1,19 +1,24 @@ -// Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." -// response +// Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.SyntheticsApi; import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus; import com.datadog.api.client.v1.model.SyntheticsUpdateTestPauseStatusPayload; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - SyntheticsUpdateTestPauseStatusPayload body = - new SyntheticsUpdateTestPauseStatusPayload().newStatus(SyntheticsTestPauseStatus.LIVE); + SyntheticsUpdateTestPauseStatusPayload body = new SyntheticsUpdateTestPauseStatusPayload() +.newStatus(SyntheticsTestPauseStatus.LIVE); try { Boolean result = apiInstance.updateTestPauseStatus("public_id", body); @@ -26,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/tags/CreateHostTags.java b/examples/v1/tags/CreateHostTags.java index 2f09445a66c..3a445ac0dbb 100644 --- a/examples/v1/tags/CreateHostTags.java +++ b/examples/v1/tags/CreateHostTags.java @@ -1,18 +1,25 @@ // Add tags to a host returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.TagsApi; import com.datadog.api.client.v1.model.HostTags; +import com.datadog.api.client.v1.model.HostTags; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); TagsApi apiInstance = new TagsApi(defaultClient); - HostTags body = - new HostTags().host("test.host").tags(Collections.singletonList("environment:production")); + HostTags body = new HostTags() +.host("test.host") +.tags(Collections.singletonList("environment:production")); try { HostTags result = apiInstance.createHostTags("host_name", body); @@ -25,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/tags/DeleteHostTags.java b/examples/v1/tags/DeleteHostTags.java index 2eb15c3c503..4a28ee80748 100644 --- a/examples/v1/tags/DeleteHostTags.java +++ b/examples/v1/tags/DeleteHostTags.java @@ -1,8 +1,14 @@ // Remove host tags returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.TagsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/tags/GetHostTags.java b/examples/v1/tags/GetHostTags.java index 41cbdae0358..6f40ddc318f 100644 --- a/examples/v1/tags/GetHostTags.java +++ b/examples/v1/tags/GetHostTags.java @@ -1,9 +1,15 @@ // Get host tags returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.TagsApi; import com.datadog.api.client.v1.model.HostTags; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/tags/ListHostTags.java b/examples/v1/tags/ListHostTags.java index a63fe39f365..0ca20bcf3e7 100644 --- a/examples/v1/tags/ListHostTags.java +++ b/examples/v1/tags/ListHostTags.java @@ -1,9 +1,15 @@ // Get Tags returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.TagsApi; import com.datadog.api.client.v1.model.TagToHosts; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/tags/UpdateHostTags.java b/examples/v1/tags/UpdateHostTags.java index cf9f8c70d77..c3cb30d1898 100644 --- a/examples/v1/tags/UpdateHostTags.java +++ b/examples/v1/tags/UpdateHostTags.java @@ -1,18 +1,25 @@ // Update host tags returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.TagsApi; import com.datadog.api.client.v1.model.HostTags; +import com.datadog.api.client.v1.model.HostTags; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); TagsApi apiInstance = new TagsApi(defaultClient); - HostTags body = - new HostTags().host("test.host").tags(Collections.singletonList("environment:production")); + HostTags body = new HostTags() +.host("test.host") +.tags(Collections.singletonList("environment:production")); try { HostTags result = apiInstance.updateHostTags("host_name", body); @@ -25,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetDailyCustomReports.java b/examples/v1/usage-metering/GetDailyCustomReports.java index 2a8d4251870..ebb90297451 100644 --- a/examples/v1/usage-metering/GetDailyCustomReports.java +++ b/examples/v1/usage-metering/GetDailyCustomReports.java @@ -1,9 +1,15 @@ // Get the list of available daily custom reports returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageCustomReportsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetHourlyUsageAttribution.java b/examples/v1/usage-metering/GetHourlyUsageAttribution.java index 5e37c5c3cbb..d11e59f6a49 100644 --- a/examples/v1/usage-metering/GetHourlyUsageAttribution.java +++ b/examples/v1/usage-metering/GetHourlyUsageAttribution.java @@ -1,10 +1,17 @@ // Get hourly usage attribution returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.HourlyUsageAttributionResponse; import com.datadog.api.client.v1.model.HourlyUsageAttributionUsageType; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,9 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - HourlyUsageAttributionResponse result = - apiInstance.getHourlyUsageAttribution( - OffsetDateTime.now().plusDays(-3), HourlyUsageAttributionUsageType.INFRA_HOST_USAGE); + HourlyUsageAttributionResponse result = apiInstance.getHourlyUsageAttribution(OffsetDateTime.now().plusDays(-3), HourlyUsageAttributionUsageType.INFRA_HOST_USAGE); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getHourlyUsageAttribution"); @@ -24,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetIncidentManagement.java b/examples/v1/usage-metering/GetIncidentManagement.java index fd0c14505ac..740ebce399a 100644 --- a/examples/v1/usage-metering/GetIncidentManagement.java +++ b/examples/v1/usage-metering/GetIncidentManagement.java @@ -1,10 +1,17 @@ // Get hourly usage for incident management returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetIncidentManagementOptionalParameters; import com.datadog.api.client.v1.model.UsageIncidentManagementResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageIncidentManagementResponse result = - apiInstance.getIncidentManagement( - OffsetDateTime.now().plusDays(-5), - new GetIncidentManagementOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageIncidentManagementResponse result = apiInstance.getIncidentManagement(OffsetDateTime.now().plusDays(-5),new GetIncidentManagementOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getIncidentManagement"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetIngestedSpans.java b/examples/v1/usage-metering/GetIngestedSpans.java index 862f94341f0..b674da8613d 100644 --- a/examples/v1/usage-metering/GetIngestedSpans.java +++ b/examples/v1/usage-metering/GetIngestedSpans.java @@ -1,10 +1,17 @@ // Get hourly usage for ingested spans returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetIngestedSpansOptionalParameters; import com.datadog.api.client.v1.model.UsageIngestedSpansResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageIngestedSpansResponse result = - apiInstance.getIngestedSpans( - OffsetDateTime.now().plusDays(-5), - new GetIngestedSpansOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageIngestedSpansResponse result = apiInstance.getIngestedSpans(OffsetDateTime.now().plusDays(-5),new GetIngestedSpansOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getIngestedSpans"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetMonthlyCustomReports.java b/examples/v1/usage-metering/GetMonthlyCustomReports.java index 55cee0cc596..87c699323bb 100644 --- a/examples/v1/usage-metering/GetMonthlyCustomReports.java +++ b/examples/v1/usage-metering/GetMonthlyCustomReports.java @@ -1,9 +1,15 @@ // Get the list of available monthly custom reports returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageCustomReportsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetMonthlyUsageAttribution.java b/examples/v1/usage-metering/GetMonthlyUsageAttribution.java index bc3579bed4a..0d27a2b06cb 100644 --- a/examples/v1/usage-metering/GetMonthlyUsageAttribution.java +++ b/examples/v1/usage-metering/GetMonthlyUsageAttribution.java @@ -1,10 +1,17 @@ // Get monthly usage attribution returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.MonthlyUsageAttributionResponse; import com.datadog.api.client.v1.model.MonthlyUsageAttributionSupportedMetrics; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - MonthlyUsageAttributionResponse result = - apiInstance.getMonthlyUsageAttribution( - OffsetDateTime.now().plusDays(-3), - MonthlyUsageAttributionSupportedMetrics.INFRA_HOST_USAGE); + MonthlyUsageAttributionResponse result = apiInstance.getMonthlyUsageAttribution(OffsetDateTime.now().plusDays(-3), MonthlyUsageAttributionSupportedMetrics.INFRA_HOST_USAGE); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getMonthlyUsageAttribution"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.java b/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.java index 2836ca4bbcb..2df450b5ab5 100644 --- a/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.java +++ b/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.java @@ -1,11 +1,18 @@ // Paginate monthly usage attribution -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetMonthlyUsageAttributionOptionalParameters; import com.datadog.api.client.v1.model.MonthlyUsageAttributionResponse; import com.datadog.api.client.v1.model.MonthlyUsageAttributionSupportedMetrics; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,16 +20,10 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); // there is a valid "monthly_usage_attribution" response - String MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID = - System.getenv("MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID"); + String MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID = System.getenv("MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID"); try { - MonthlyUsageAttributionResponse result = - apiInstance.getMonthlyUsageAttribution( - OffsetDateTime.now().plusDays(-3), - MonthlyUsageAttributionSupportedMetrics.INFRA_HOST_USAGE, - new GetMonthlyUsageAttributionOptionalParameters() - .nextRecordId(MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID)); + MonthlyUsageAttributionResponse result = apiInstance.getMonthlyUsageAttribution(OffsetDateTime.now().plusDays(-3), MonthlyUsageAttributionSupportedMetrics.INFRA_HOST_USAGE,new GetMonthlyUsageAttributionOptionalParameters().nextRecordId(MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getMonthlyUsageAttribution"); @@ -32,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.java b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.java index 9f48ec0ab92..3931d379194 100644 --- a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.java +++ b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.java @@ -1,9 +1,15 @@ // Get specified daily custom reports returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSpecifiedCustomReportsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSpecifiedCustomReportsResponse result = - apiInstance.getSpecifiedDailyCustomReports("2022-03-20"); + UsageSpecifiedCustomReportsResponse result = apiInstance.getSpecifiedDailyCustomReports("2022-03-20"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getSpecifiedDailyCustomReports"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.java b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.java index c99a3318ba4..488d66b0585 100644 --- a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.java +++ b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.java @@ -1,9 +1,15 @@ // Get specified monthly custom reports returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSpecifiedCustomReportsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,16 +17,14 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSpecifiedCustomReportsResponse result = - apiInstance.getSpecifiedMonthlyCustomReports("2021-05-01"); + UsageSpecifiedCustomReportsResponse result = apiInstance.getSpecifiedMonthlyCustomReports("2021-05-01"); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling UsageMeteringApi#getSpecifiedMonthlyCustomReports"); + System.err.println("Exception when calling UsageMeteringApi#getSpecifiedMonthlyCustomReports"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageAnalyzedLogs.java b/examples/v1/usage-metering/GetUsageAnalyzedLogs.java index 629028c3e23..2e81c2c6c29 100644 --- a/examples/v1/usage-metering/GetUsageAnalyzedLogs.java +++ b/examples/v1/usage-metering/GetUsageAnalyzedLogs.java @@ -1,10 +1,17 @@ // Get hourly usage for analyzed logs returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageAnalyzedLogsOptionalParameters; import com.datadog.api.client.v1.model.UsageAnalyzedLogsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageAnalyzedLogsResponse result = - apiInstance.getUsageAnalyzedLogs( - OffsetDateTime.now().plusDays(-5), - new GetUsageAnalyzedLogsOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageAnalyzedLogsResponse result = apiInstance.getUsageAnalyzedLogs(OffsetDateTime.now().plusDays(-5),new GetUsageAnalyzedLogsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageAnalyzedLogs"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageAttribution.java b/examples/v1/usage-metering/GetUsageAttribution.java index 8d9d12e87c0..16cbf228ce6 100644 --- a/examples/v1/usage-metering/GetUsageAttribution.java +++ b/examples/v1/usage-metering/GetUsageAttribution.java @@ -1,11 +1,20 @@ // Get usage attribution returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageAttributionOptionalParameters; import com.datadog.api.client.v1.model.UsageAttributionResponse; +import com.datadog.api.client.v1.model.UsageAttributionLimit; +import com.datadog.api.client.v1.model.UsageAttributionOffset; import com.datadog.api.client.v1.model.UsageAttributionSupportedMetrics; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,11 +22,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageAttributionResponse result = - apiInstance.getUsageAttribution( - OffsetDateTime.now().plusDays(-3), - UsageAttributionSupportedMetrics.ALL, - new GetUsageAttributionOptionalParameters().offset(0L).limit(1L)); + UsageAttributionResponse result = apiInstance.getUsageAttribution(OffsetDateTime.now().plusDays(-3), UsageAttributionSupportedMetrics.ALL,new GetUsageAttributionOptionalParameters().offset(0L).limit(1L)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageAttribution"); @@ -27,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageAuditLogs.java b/examples/v1/usage-metering/GetUsageAuditLogs.java index 9e8a7227a8e..de294986009 100644 --- a/examples/v1/usage-metering/GetUsageAuditLogs.java +++ b/examples/v1/usage-metering/GetUsageAuditLogs.java @@ -1,10 +1,17 @@ // Get hourly usage for audit logs returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageAuditLogsOptionalParameters; import com.datadog.api.client.v1.model.UsageAuditLogsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageAuditLogsResponse result = - apiInstance.getUsageAuditLogs( - OffsetDateTime.now().plusDays(-5), - new GetUsageAuditLogsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageAuditLogsResponse result = apiInstance.getUsageAuditLogs(OffsetDateTime.now().plusDays(-5),new GetUsageAuditLogsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageAuditLogs"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageBillableSummary.java b/examples/v1/usage-metering/GetUsageBillableSummary.java index 08bc97e224d..d5f25b69233 100644 --- a/examples/v1/usage-metering/GetUsageBillableSummary.java +++ b/examples/v1/usage-metering/GetUsageBillableSummary.java @@ -1,9 +1,15 @@ // Get billable usage across your account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageBillableSummaryResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageCIApp.java b/examples/v1/usage-metering/GetUsageCIApp.java index ebfea106fa9..248992f6708 100644 --- a/examples/v1/usage-metering/GetUsageCIApp.java +++ b/examples/v1/usage-metering/GetUsageCIApp.java @@ -1,10 +1,15 @@ // Get hourly usage for CI visibility returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageCIVisibilityResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageCIVisibilityResponse result = - apiInstance.getUsageCIApp(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageCIVisibilityResponse result = apiInstance.getUsageCIApp(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageCIApp"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageCIApp_1064440884.java b/examples/v1/usage-metering/GetUsageCIApp_1064440884.java index 07c45d6f001..2db8a030b01 100644 --- a/examples/v1/usage-metering/GetUsageCIApp_1064440884.java +++ b/examples/v1/usage-metering/GetUsageCIApp_1064440884.java @@ -1,10 +1,17 @@ // Get hourly usage for CI Visibility returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageCIAppOptionalParameters; import com.datadog.api.client.v1.model.UsageCIVisibilityResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageCIVisibilityResponse result = - apiInstance.getUsageCIApp( - OffsetDateTime.now().plusDays(-5), - new GetUsageCIAppOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageCIVisibilityResponse result = apiInstance.getUsageCIApp(OffsetDateTime.now().plusDays(-5),new GetUsageCIAppOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageCIApp"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageCWS.java b/examples/v1/usage-metering/GetUsageCWS.java index d07d98f1e74..3d8dcb315c2 100644 --- a/examples/v1/usage-metering/GetUsageCWS.java +++ b/examples/v1/usage-metering/GetUsageCWS.java @@ -1,10 +1,15 @@ // Get hourly usage for cloud workload security returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageCWSResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageCWSResponse result = - apiInstance.getUsageCWS(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageCWSResponse result = apiInstance.getUsageCWS(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageCWS"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageCWS_736958514.java b/examples/v1/usage-metering/GetUsageCWS_736958514.java index f94fdefdfa6..60901697781 100644 --- a/examples/v1/usage-metering/GetUsageCWS_736958514.java +++ b/examples/v1/usage-metering/GetUsageCWS_736958514.java @@ -1,10 +1,17 @@ // Get hourly usage for Cloud Workload Security returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageCWSOptionalParameters; import com.datadog.api.client.v1.model.UsageCWSResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageCWSResponse result = - apiInstance.getUsageCWS( - OffsetDateTime.now().plusDays(-5), - new GetUsageCWSOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageCWSResponse result = apiInstance.getUsageCWS(OffsetDateTime.now().plusDays(-5),new GetUsageCWSOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageCWS"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.java b/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.java index 0dbe7bc0110..cfd04b0219b 100644 --- a/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.java +++ b/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.java @@ -1,9 +1,16 @@ // Get hourly usage for CSPM returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageCloudSecurityPostureManagementResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,16 +18,14 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageCloudSecurityPostureManagementResponse result = - apiInstance.getUsageCloudSecurityPostureManagement(OffsetDateTime.now().plusDays(-3)); + UsageCloudSecurityPostureManagementResponse result = apiInstance.getUsageCloudSecurityPostureManagement(OffsetDateTime.now().plusDays(-3)); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling UsageMeteringApi#getUsageCloudSecurityPostureManagement"); + System.err.println("Exception when calling UsageMeteringApi#getUsageCloudSecurityPostureManagement"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageDBM.java b/examples/v1/usage-metering/GetUsageDBM.java index 1b3d6cfc06c..2f04cf786d9 100644 --- a/examples/v1/usage-metering/GetUsageDBM.java +++ b/examples/v1/usage-metering/GetUsageDBM.java @@ -1,10 +1,15 @@ // Get hourly usage for database monitoring returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageDBMResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageDBMResponse result = - apiInstance.getUsageDBM(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageDBMResponse result = apiInstance.getUsageDBM(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageDBM"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageDBM_3446806203.java b/examples/v1/usage-metering/GetUsageDBM_3446806203.java index 8edfdbe2950..5dbe5e5e332 100644 --- a/examples/v1/usage-metering/GetUsageDBM_3446806203.java +++ b/examples/v1/usage-metering/GetUsageDBM_3446806203.java @@ -1,10 +1,17 @@ // Get hourly usage for Database Monitoring returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageDBMOptionalParameters; import com.datadog.api.client.v1.model.UsageDBMResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageDBMResponse result = - apiInstance.getUsageDBM( - OffsetDateTime.now().plusDays(-5), - new GetUsageDBMOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageDBMResponse result = apiInstance.getUsageDBM(OffsetDateTime.now().plusDays(-5),new GetUsageDBMOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageDBM"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageFargate.java b/examples/v1/usage-metering/GetUsageFargate.java index 825d5f98f79..cc3d1cc1cbd 100644 --- a/examples/v1/usage-metering/GetUsageFargate.java +++ b/examples/v1/usage-metering/GetUsageFargate.java @@ -1,10 +1,17 @@ // Get hourly usage for Fargate returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageFargateOptionalParameters; import com.datadog.api.client.v1.model.UsageFargateResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageFargateResponse result = - apiInstance.getUsageFargate( - OffsetDateTime.now().plusDays(-5), - new GetUsageFargateOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageFargateResponse result = apiInstance.getUsageFargate(OffsetDateTime.now().plusDays(-5),new GetUsageFargateOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageFargate"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageHosts.java b/examples/v1/usage-metering/GetUsageHosts.java index 1140892bf30..14c9f7e102d 100644 --- a/examples/v1/usage-metering/GetUsageHosts.java +++ b/examples/v1/usage-metering/GetUsageHosts.java @@ -1,10 +1,17 @@ // Get hourly usage for hosts and containers returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageHostsOptionalParameters; import com.datadog.api.client.v1.model.UsageHostsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageHostsResponse result = - apiInstance.getUsageHosts( - OffsetDateTime.now().plusDays(-5), - new GetUsageHostsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageHostsResponse result = apiInstance.getUsageHosts(OffsetDateTime.now().plusDays(-5),new GetUsageHostsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageHosts"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageIndexedSpans.java b/examples/v1/usage-metering/GetUsageIndexedSpans.java index 0636cdf5568..ab36282b5b0 100644 --- a/examples/v1/usage-metering/GetUsageIndexedSpans.java +++ b/examples/v1/usage-metering/GetUsageIndexedSpans.java @@ -1,10 +1,17 @@ // Get hourly usage for indexed spans returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageIndexedSpansOptionalParameters; import com.datadog.api.client.v1.model.UsageIndexedSpansResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageIndexedSpansResponse result = - apiInstance.getUsageIndexedSpans( - OffsetDateTime.now().plusDays(-5), - new GetUsageIndexedSpansOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageIndexedSpansResponse result = apiInstance.getUsageIndexedSpans(OffsetDateTime.now().plusDays(-5),new GetUsageIndexedSpansOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageIndexedSpans"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageInternetOfThings.java b/examples/v1/usage-metering/GetUsageInternetOfThings.java index bbd7cf899bc..3d6e7eb60ec 100644 --- a/examples/v1/usage-metering/GetUsageInternetOfThings.java +++ b/examples/v1/usage-metering/GetUsageInternetOfThings.java @@ -1,10 +1,17 @@ // Get hourly usage for IoT returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageInternetOfThingsOptionalParameters; import com.datadog.api.client.v1.model.UsageIoTResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageIoTResponse result = - apiInstance.getUsageInternetOfThings( - OffsetDateTime.now().plusDays(-5), - new GetUsageInternetOfThingsOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageIoTResponse result = apiInstance.getUsageInternetOfThings(OffsetDateTime.now().plusDays(-5),new GetUsageInternetOfThingsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageInternetOfThings"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLambda.java b/examples/v1/usage-metering/GetUsageLambda.java index d726c325d02..b3ec231d9c5 100644 --- a/examples/v1/usage-metering/GetUsageLambda.java +++ b/examples/v1/usage-metering/GetUsageLambda.java @@ -1,10 +1,15 @@ // Get hourly usage for lambda returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageLambdaResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLambdaResponse result = - apiInstance.getUsageLambda(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageLambdaResponse result = apiInstance.getUsageLambda(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLambda"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLambda_3132428705.java b/examples/v1/usage-metering/GetUsageLambda_3132428705.java index b1584519872..553d1dbf0a5 100644 --- a/examples/v1/usage-metering/GetUsageLambda_3132428705.java +++ b/examples/v1/usage-metering/GetUsageLambda_3132428705.java @@ -1,10 +1,17 @@ // Get hourly usage for Lambda returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageLambdaOptionalParameters; import com.datadog.api.client.v1.model.UsageLambdaResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLambdaResponse result = - apiInstance.getUsageLambda( - OffsetDateTime.now().plusDays(-5), - new GetUsageLambdaOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageLambdaResponse result = apiInstance.getUsageLambda(OffsetDateTime.now().plusDays(-5),new GetUsageLambdaOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLambda"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLogs.java b/examples/v1/usage-metering/GetUsageLogs.java index eaaba7eba65..88d2cc496f0 100644 --- a/examples/v1/usage-metering/GetUsageLogs.java +++ b/examples/v1/usage-metering/GetUsageLogs.java @@ -1,10 +1,15 @@ // Get hourly usage for logs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageLogsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLogsResponse result = - apiInstance.getUsageLogs(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageLogsResponse result = apiInstance.getUsageLogs(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLogs"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLogsByIndex.java b/examples/v1/usage-metering/GetUsageLogsByIndex.java index 5f66fb62ede..d857a2cf590 100644 --- a/examples/v1/usage-metering/GetUsageLogsByIndex.java +++ b/examples/v1/usage-metering/GetUsageLogsByIndex.java @@ -1,10 +1,15 @@ // Get hourly usage for logs by index returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageLogsByIndexResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLogsByIndexResponse result = - apiInstance.getUsageLogsByIndex(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageLogsByIndexResponse result = apiInstance.getUsageLogsByIndex(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLogsByIndex"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.java b/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.java index 42e5d3b2763..de61e2d7d2f 100644 --- a/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.java +++ b/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.java @@ -1,10 +1,17 @@ // Get hourly usage for Logs by Index returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageLogsByIndexOptionalParameters; import com.datadog.api.client.v1.model.UsageLogsByIndexResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLogsByIndexResponse result = - apiInstance.getUsageLogsByIndex( - OffsetDateTime.now().plusDays(-5), - new GetUsageLogsByIndexOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageLogsByIndexResponse result = apiInstance.getUsageLogsByIndex(OffsetDateTime.now().plusDays(-5),new GetUsageLogsByIndexOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLogsByIndex"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLogsByRetention.java b/examples/v1/usage-metering/GetUsageLogsByRetention.java index c19792276b4..ca527918fb8 100644 --- a/examples/v1/usage-metering/GetUsageLogsByRetention.java +++ b/examples/v1/usage-metering/GetUsageLogsByRetention.java @@ -1,10 +1,17 @@ // Get hourly logs usage by retention returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageLogsByRetentionOptionalParameters; import com.datadog.api.client.v1.model.UsageLogsByRetentionResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLogsByRetentionResponse result = - apiInstance.getUsageLogsByRetention( - OffsetDateTime.now().plusDays(-5), - new GetUsageLogsByRetentionOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageLogsByRetentionResponse result = apiInstance.getUsageLogsByRetention(OffsetDateTime.now().plusDays(-5),new GetUsageLogsByRetentionOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLogsByRetention"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageLogs_2562396405.java b/examples/v1/usage-metering/GetUsageLogs_2562396405.java index e219d3560d9..0e48842c807 100644 --- a/examples/v1/usage-metering/GetUsageLogs_2562396405.java +++ b/examples/v1/usage-metering/GetUsageLogs_2562396405.java @@ -1,10 +1,17 @@ // Get hourly usage for Logs returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageLogsOptionalParameters; import com.datadog.api.client.v1.model.UsageLogsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLogsResponse result = - apiInstance.getUsageLogs( - OffsetDateTime.now().plusDays(-5), - new GetUsageLogsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageLogsResponse result = apiInstance.getUsageLogs(OffsetDateTime.now().plusDays(-5),new GetUsageLogsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLogs"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageNetworkFlows.java b/examples/v1/usage-metering/GetUsageNetworkFlows.java index 45d0cb2ae56..592a7bfb2cd 100644 --- a/examples/v1/usage-metering/GetUsageNetworkFlows.java +++ b/examples/v1/usage-metering/GetUsageNetworkFlows.java @@ -1,10 +1,15 @@ // get hourly usage for network flows returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageNetworkFlowsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageNetworkFlowsResponse result = - apiInstance.getUsageNetworkFlows(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageNetworkFlowsResponse result = apiInstance.getUsageNetworkFlows(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageNetworkFlows"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.java b/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.java index 7d251be21d1..4e72cea29df 100644 --- a/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.java +++ b/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.java @@ -1,10 +1,17 @@ // Get hourly usage for Network Flows returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageNetworkFlowsOptionalParameters; import com.datadog.api.client.v1.model.UsageNetworkFlowsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageNetworkFlowsResponse result = - apiInstance.getUsageNetworkFlows( - OffsetDateTime.now().plusDays(-5), - new GetUsageNetworkFlowsOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageNetworkFlowsResponse result = apiInstance.getUsageNetworkFlows(OffsetDateTime.now().plusDays(-5),new GetUsageNetworkFlowsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageNetworkFlows"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageNetworkHosts.java b/examples/v1/usage-metering/GetUsageNetworkHosts.java index 20f7a6c16d5..0a6eb1497cf 100644 --- a/examples/v1/usage-metering/GetUsageNetworkHosts.java +++ b/examples/v1/usage-metering/GetUsageNetworkHosts.java @@ -1,10 +1,15 @@ // Get hourly usage for network hosts returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageNetworkHostsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageNetworkHostsResponse result = - apiInstance.getUsageNetworkHosts(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageNetworkHostsResponse result = apiInstance.getUsageNetworkHosts(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageNetworkHosts"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.java b/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.java index 7ce1be02b74..b8f96df946a 100644 --- a/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.java +++ b/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.java @@ -1,10 +1,17 @@ // Get hourly usage for Network Hosts returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageNetworkHostsOptionalParameters; import com.datadog.api.client.v1.model.UsageNetworkHostsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageNetworkHostsResponse result = - apiInstance.getUsageNetworkHosts( - OffsetDateTime.now().plusDays(-5), - new GetUsageNetworkHostsOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageNetworkHostsResponse result = apiInstance.getUsageNetworkHosts(OffsetDateTime.now().plusDays(-5),new GetUsageNetworkHostsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageNetworkHosts"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageOnlineArchive.java b/examples/v1/usage-metering/GetUsageOnlineArchive.java index e26f35a95b7..8b54efc03ef 100644 --- a/examples/v1/usage-metering/GetUsageOnlineArchive.java +++ b/examples/v1/usage-metering/GetUsageOnlineArchive.java @@ -1,10 +1,15 @@ // Get hourly usage for online archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageOnlineArchiveResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageOnlineArchiveResponse result = - apiInstance.getUsageOnlineArchive(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageOnlineArchiveResponse result = apiInstance.getUsageOnlineArchive(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageOnlineArchive"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.java b/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.java index df128179687..0f79c657a63 100644 --- a/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.java +++ b/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.java @@ -1,10 +1,17 @@ // Get hourly usage for Online Archive returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageOnlineArchiveOptionalParameters; import com.datadog.api.client.v1.model.UsageOnlineArchiveResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageOnlineArchiveResponse result = - apiInstance.getUsageOnlineArchive( - OffsetDateTime.now().plusDays(-5), - new GetUsageOnlineArchiveOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageOnlineArchiveResponse result = apiInstance.getUsageOnlineArchive(OffsetDateTime.now().plusDays(-5),new GetUsageOnlineArchiveOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageOnlineArchive"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageProfiling.java b/examples/v1/usage-metering/GetUsageProfiling.java index a0b6da7bbd8..3cb133a37f7 100644 --- a/examples/v1/usage-metering/GetUsageProfiling.java +++ b/examples/v1/usage-metering/GetUsageProfiling.java @@ -1,10 +1,17 @@ // Get hourly usage for profiled hosts returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageProfilingOptionalParameters; import com.datadog.api.client.v1.model.UsageProfilingResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageProfilingResponse result = - apiInstance.getUsageProfiling( - OffsetDateTime.now().plusDays(-5), - new GetUsageProfilingOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageProfilingResponse result = apiInstance.getUsageProfiling(OffsetDateTime.now().plusDays(-5),new GetUsageProfilingOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageProfiling"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageRumSessions.java b/examples/v1/usage-metering/GetUsageRumSessions.java index 794c1ed295e..31bc59fd2f3 100644 --- a/examples/v1/usage-metering/GetUsageRumSessions.java +++ b/examples/v1/usage-metering/GetUsageRumSessions.java @@ -1,10 +1,15 @@ // Get hourly usage for RUM sessions returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageRumSessionsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageRumSessionsResponse result = - apiInstance.getUsageRumSessions(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageRumSessionsResponse result = apiInstance.getUsageRumSessions(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageRumSessions"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageRumSessions_3271366243.java b/examples/v1/usage-metering/GetUsageRumSessions_3271366243.java index f31cf89364a..72011a7216b 100644 --- a/examples/v1/usage-metering/GetUsageRumSessions_3271366243.java +++ b/examples/v1/usage-metering/GetUsageRumSessions_3271366243.java @@ -1,10 +1,17 @@ // Get mobile hourly usage for RUM Sessions returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageRumSessionsOptionalParameters; import com.datadog.api.client.v1.model.UsageRumSessionsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageRumSessionsResponse result = - apiInstance.getUsageRumSessions( - OffsetDateTime.now().plusDays(-5), - new GetUsageRumSessionsOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3)) - .type("mobile")); + UsageRumSessionsResponse result = apiInstance.getUsageRumSessions(OffsetDateTime.now().plusDays(-5),new GetUsageRumSessionsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3)).type("mobile")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageRumSessions"); @@ -27,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageRumSessions_714937291.java b/examples/v1/usage-metering/GetUsageRumSessions_714937291.java index 8f2794dc9a1..aafa6fb9cc7 100644 --- a/examples/v1/usage-metering/GetUsageRumSessions_714937291.java +++ b/examples/v1/usage-metering/GetUsageRumSessions_714937291.java @@ -1,10 +1,17 @@ // Get hourly usage for RUM Sessions returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageRumSessionsOptionalParameters; import com.datadog.api.client.v1.model.UsageRumSessionsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageRumSessionsResponse result = - apiInstance.getUsageRumSessions( - OffsetDateTime.now().plusDays(-5), - new GetUsageRumSessionsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageRumSessionsResponse result = apiInstance.getUsageRumSessions(OffsetDateTime.now().plusDays(-5),new GetUsageRumSessionsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageRumSessions"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageRumUnits.java b/examples/v1/usage-metering/GetUsageRumUnits.java index 2aec092b680..61d7f47362d 100644 --- a/examples/v1/usage-metering/GetUsageRumUnits.java +++ b/examples/v1/usage-metering/GetUsageRumUnits.java @@ -1,10 +1,15 @@ // Get hourly usage for RUM units returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageRumUnitsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageRumUnitsResponse result = - apiInstance.getUsageRumUnits(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageRumUnitsResponse result = apiInstance.getUsageRumUnits(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageRumUnits"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageRumUnits_3959755399.java b/examples/v1/usage-metering/GetUsageRumUnits_3959755399.java index fea31ee5fc7..bb6ef75e26f 100644 --- a/examples/v1/usage-metering/GetUsageRumUnits_3959755399.java +++ b/examples/v1/usage-metering/GetUsageRumUnits_3959755399.java @@ -1,10 +1,17 @@ // Get hourly usage for RUM Units returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageRumUnitsOptionalParameters; import com.datadog.api.client.v1.model.UsageRumUnitsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageRumUnitsResponse result = - apiInstance.getUsageRumUnits( - OffsetDateTime.now().plusDays(-5), - new GetUsageRumUnitsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageRumUnitsResponse result = apiInstance.getUsageRumUnits(OffsetDateTime.now().plusDays(-5),new GetUsageRumUnitsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageRumUnits"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSDS.java b/examples/v1/usage-metering/GetUsageSDS.java index d8145b53c6e..43c0c1aa5f4 100644 --- a/examples/v1/usage-metering/GetUsageSDS.java +++ b/examples/v1/usage-metering/GetUsageSDS.java @@ -1,10 +1,15 @@ // Get hourly usage for sensitive data scanner returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSDSResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSDSResponse result = - apiInstance.getUsageSDS(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageSDSResponse result = apiInstance.getUsageSDS(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSDS"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSDS_271128478.java b/examples/v1/usage-metering/GetUsageSDS_271128478.java index df027d2081a..ee1b0441df1 100644 --- a/examples/v1/usage-metering/GetUsageSDS_271128478.java +++ b/examples/v1/usage-metering/GetUsageSDS_271128478.java @@ -1,10 +1,17 @@ // Get hourly usage for Sensitive Data Scanner returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageSDSOptionalParameters; import com.datadog.api.client.v1.model.UsageSDSResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSDSResponse result = - apiInstance.getUsageSDS( - OffsetDateTime.now().plusDays(-5), - new GetUsageSDSOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageSDSResponse result = apiInstance.getUsageSDS(OffsetDateTime.now().plusDays(-5),new GetUsageSDSOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSDS"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSNMP.java b/examples/v1/usage-metering/GetUsageSNMP.java index 003992f1668..f0aebbc0895 100644 --- a/examples/v1/usage-metering/GetUsageSNMP.java +++ b/examples/v1/usage-metering/GetUsageSNMP.java @@ -1,10 +1,17 @@ // Get hourly usage for SNMP devices returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageSNMPOptionalParameters; import com.datadog.api.client.v1.model.UsageSNMPResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSNMPResponse result = - apiInstance.getUsageSNMP( - OffsetDateTime.now().plusDays(-5), - new GetUsageSNMPOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageSNMPResponse result = apiInstance.getUsageSNMP(OffsetDateTime.now().plusDays(-5),new GetUsageSNMPOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSNMP"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSummary.java b/examples/v1/usage-metering/GetUsageSummary.java index 5460d2cad31..c24f3c7fa76 100644 --- a/examples/v1/usage-metering/GetUsageSummary.java +++ b/examples/v1/usage-metering/GetUsageSummary.java @@ -1,10 +1,15 @@ // Get usage across your account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSummaryResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSummaryResponse result = - apiInstance.getUsageSummary(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageSummaryResponse result = apiInstance.getUsageSummary(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSummary"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSynthetics.java b/examples/v1/usage-metering/GetUsageSynthetics.java index 430efd96007..7b814f9ede9 100644 --- a/examples/v1/usage-metering/GetUsageSynthetics.java +++ b/examples/v1/usage-metering/GetUsageSynthetics.java @@ -1,10 +1,15 @@ // Get hourly usage for synthetics checks returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSyntheticsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSyntheticsResponse result = - apiInstance.getUsageSynthetics(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageSyntheticsResponse result = apiInstance.getUsageSynthetics(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSynthetics"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSyntheticsAPI.java b/examples/v1/usage-metering/GetUsageSyntheticsAPI.java index ef628dff2e9..21d8cd54e94 100644 --- a/examples/v1/usage-metering/GetUsageSyntheticsAPI.java +++ b/examples/v1/usage-metering/GetUsageSyntheticsAPI.java @@ -1,10 +1,15 @@ // Get hourly usage for synthetics API checks returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSyntheticsAPIResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSyntheticsAPIResponse result = - apiInstance.getUsageSyntheticsAPI(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageSyntheticsAPIResponse result = apiInstance.getUsageSyntheticsAPI(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSyntheticsAPI"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.java b/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.java index ad4a2301689..1d54b21d42d 100644 --- a/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.java +++ b/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.java @@ -1,10 +1,17 @@ // Get hourly usage for Synthetics API Checks returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageSyntheticsAPIOptionalParameters; import com.datadog.api.client.v1.model.UsageSyntheticsAPIResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSyntheticsAPIResponse result = - apiInstance.getUsageSyntheticsAPI( - OffsetDateTime.now().plusDays(-5), - new GetUsageSyntheticsAPIOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageSyntheticsAPIResponse result = apiInstance.getUsageSyntheticsAPI(OffsetDateTime.now().plusDays(-5),new GetUsageSyntheticsAPIOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSyntheticsAPI"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSyntheticsBrowser.java b/examples/v1/usage-metering/GetUsageSyntheticsBrowser.java index bd845d14214..949381a42ca 100644 --- a/examples/v1/usage-metering/GetUsageSyntheticsBrowser.java +++ b/examples/v1/usage-metering/GetUsageSyntheticsBrowser.java @@ -1,10 +1,15 @@ // Get hourly usage for synthetics browser checks returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.model.UsageSyntheticsBrowserResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,9 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSyntheticsBrowserResponse result = - apiInstance.getUsageSyntheticsBrowser( - OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageSyntheticsBrowserResponse result = apiInstance.getUsageSyntheticsBrowser(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSyntheticsBrowser"); @@ -24,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.java b/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.java index 9ae82a334a1..c8c9edc970e 100644 --- a/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.java +++ b/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.java @@ -1,10 +1,17 @@ // Get hourly usage for Synthetics Browser Checks returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageSyntheticsBrowserOptionalParameters; import com.datadog.api.client.v1.model.UsageSyntheticsBrowserResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageSyntheticsBrowserResponse result = - apiInstance.getUsageSyntheticsBrowser( - OffsetDateTime.now().plusDays(-5), - new GetUsageSyntheticsBrowserOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageSyntheticsBrowserResponse result = apiInstance.getUsageSyntheticsBrowser(OffsetDateTime.now().plusDays(-5),new GetUsageSyntheticsBrowserOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageSyntheticsBrowser"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageTimeseries.java b/examples/v1/usage-metering/GetUsageTimeseries.java index 42ac234db9a..9262058d75b 100644 --- a/examples/v1/usage-metering/GetUsageTimeseries.java +++ b/examples/v1/usage-metering/GetUsageTimeseries.java @@ -1,10 +1,17 @@ // Get hourly usage for custom metrics returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageTimeseriesOptionalParameters; import com.datadog.api.client.v1.model.UsageTimeseriesResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageTimeseriesResponse result = - apiInstance.getUsageTimeseries( - OffsetDateTime.now().plusDays(-5), - new GetUsageTimeseriesOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); + UsageTimeseriesResponse result = apiInstance.getUsageTimeseries(OffsetDateTime.now().plusDays(-5),new GetUsageTimeseriesOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageTimeseries"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/usage-metering/GetUsageTopAvgMetrics.java b/examples/v1/usage-metering/GetUsageTopAvgMetrics.java index 0094c238f30..2571086ef38 100644 --- a/examples/v1/usage-metering/GetUsageTopAvgMetrics.java +++ b/examples/v1/usage-metering/GetUsageTopAvgMetrics.java @@ -1,10 +1,17 @@ // Get all custom metrics by hourly average returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsageMeteringApi; import com.datadog.api.client.v1.api.UsageMeteringApi.GetUsageTopAvgMetricsOptionalParameters; import com.datadog.api.client.v1.model.UsageTopAvgMetricsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,9 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageTopAvgMetricsResponse result = - apiInstance.getUsageTopAvgMetrics( - new GetUsageTopAvgMetricsOptionalParameters().day(OffsetDateTime.now().plusDays(-3))); + UsageTopAvgMetricsResponse result = apiInstance.getUsageTopAvgMetrics(new GetUsageTopAvgMetricsOptionalParameters().day(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageTopAvgMetrics"); @@ -24,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/users/CreateUser.java b/examples/v1/users/CreateUser.java index e56e72ca852..1f45a669c69 100644 --- a/examples/v1/users/CreateUser.java +++ b/examples/v1/users/CreateUser.java @@ -1,24 +1,29 @@ // Create a user returns "User created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsersApi; +import com.datadog.api.client.v1.model.UserResponse; import com.datadog.api.client.v1.model.AccessRole; import com.datadog.api.client.v1.model.User; -import com.datadog.api.client.v1.model.UserResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); UsersApi apiInstance = new UsersApi(defaultClient); - User body = - new User() - .accessRole(AccessRole.STANDARD) - .disabled(false) - .email("test@datadoghq.com") - .handle("test@datadoghq.com") - .name("test user"); + User body = new User() +.accessRole(AccessRole.STANDARD) +.disabled(false) +.email("test@datadoghq.com") +.handle("test@datadoghq.com") +.name("test user"); try { UserResponse result = apiInstance.createUser(body); @@ -31,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/users/DisableUser.java b/examples/v1/users/DisableUser.java index f1777a6f68b..5001ede82ff 100644 --- a/examples/v1/users/DisableUser.java +++ b/examples/v1/users/DisableUser.java @@ -1,9 +1,15 @@ // Disable a user returns "User disabled" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsersApi; import com.datadog.api.client.v1.model.UserDisableResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/users/GetUser.java b/examples/v1/users/GetUser.java index ab53bd078ff..6ca62cec136 100644 --- a/examples/v1/users/GetUser.java +++ b/examples/v1/users/GetUser.java @@ -1,9 +1,15 @@ // Get user details returns "OK for get user" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsersApi; import com.datadog.api.client.v1.model.UserResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/users/ListUsers.java b/examples/v1/users/ListUsers.java index ba57030fff7..fac215395aa 100644 --- a/examples/v1/users/ListUsers.java +++ b/examples/v1/users/ListUsers.java @@ -1,9 +1,15 @@ // List all users returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsersApi; import com.datadog.api.client.v1.model.UserListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/users/UpdateUser.java b/examples/v1/users/UpdateUser.java index 4b81d5ddec8..2bf646f9930 100644 --- a/examples/v1/users/UpdateUser.java +++ b/examples/v1/users/UpdateUser.java @@ -1,24 +1,29 @@ // Update a user returns "User updated" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.UsersApi; +import com.datadog.api.client.v1.model.UserResponse; import com.datadog.api.client.v1.model.AccessRole; import com.datadog.api.client.v1.model.User; -import com.datadog.api.client.v1.model.UserResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); UsersApi apiInstance = new UsersApi(defaultClient); - User body = - new User() - .accessRole(AccessRole.STANDARD) - .disabled(false) - .email("test@datadoghq.com") - .handle("test@datadoghq.com") - .name("test user"); + User body = new User() +.accessRole(AccessRole.STANDARD) +.disabled(false) +.email("test@datadoghq.com") +.handle("test@datadoghq.com") +.name("test user"); try { UserResponse result = apiInstance.updateUser("test@datadoghq.com", body); @@ -31,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/CreateWebhooksIntegration.java b/examples/v1/webhooks-integration/CreateWebhooksIntegration.java index 11df4d668c2..cdfd5506492 100644 --- a/examples/v1/webhooks-integration/CreateWebhooksIntegration.java +++ b/examples/v1/webhooks-integration/CreateWebhooksIntegration.java @@ -1,19 +1,25 @@ // Create a webhooks integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; import com.datadog.api.client.v1.model.WebhooksIntegration; +import com.datadog.api.client.v1.model.WebhooksIntegration; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); WebhooksIntegrationApi apiInstance = new WebhooksIntegrationApi(defaultClient); - WebhooksIntegration body = - new WebhooksIntegration() - .name("Example-Create_a_webhooks_integration_returns_OK_response") - .url("https://example.com/webhook"); + WebhooksIntegration body = new WebhooksIntegration() +.name("Example-Create_a_webhooks_integration_returns_OK_response") +.url("https://example.com/webhook"); try { WebhooksIntegration result = apiInstance.createWebhooksIntegration(body); @@ -26,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.java b/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.java index b7ceed90a3f..65922913e4e 100644 --- a/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.java +++ b/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.java @@ -1,33 +1,36 @@ // Create a custom variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; -import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariable; import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableResponse; +import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); WebhooksIntegrationApi apiInstance = new WebhooksIntegrationApi(defaultClient); - WebhooksIntegrationCustomVariable body = - new WebhooksIntegrationCustomVariable() - .isSecret(true) - .name("EXAMPLECREATEACUSTOMVARIABLERETURNSOKRESPONSE") - .value("CUSTOM_VARIABLE_VALUE"); + WebhooksIntegrationCustomVariable body = new WebhooksIntegrationCustomVariable() +.isSecret(true) +.name("EXAMPLECREATEACUSTOMVARIABLERETURNSOKRESPONSE") +.value("CUSTOM_VARIABLE_VALUE"); try { - WebhooksIntegrationCustomVariableResponse result = - apiInstance.createWebhooksIntegrationCustomVariable(body); + WebhooksIntegrationCustomVariableResponse result = apiInstance.createWebhooksIntegrationCustomVariable(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling WebhooksIntegrationApi#createWebhooksIntegrationCustomVariable"); + System.err.println("Exception when calling WebhooksIntegrationApi#createWebhooksIntegrationCustomVariable"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/DeleteWebhooksIntegration.java b/examples/v1/webhooks-integration/DeleteWebhooksIntegration.java index 87dda298753..2ee25bf0183 100644 --- a/examples/v1/webhooks-integration/DeleteWebhooksIntegration.java +++ b/examples/v1/webhooks-integration/DeleteWebhooksIntegration.java @@ -1,8 +1,14 @@ // Delete a webhook returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.java b/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.java index eb43d38b2e5..4e63e0f57cb 100644 --- a/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.java +++ b/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.java @@ -1,8 +1,14 @@ // Delete a custom variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,12 +21,11 @@ public static void main(String[] args) { try { apiInstance.deleteWebhooksIntegrationCustomVariable(WEBHOOK_CUSTOM_VARIABLE_NAME); } catch (ApiException e) { - System.err.println( - "Exception when calling WebhooksIntegrationApi#deleteWebhooksIntegrationCustomVariable"); + System.err.println("Exception when calling WebhooksIntegrationApi#deleteWebhooksIntegrationCustomVariable"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/GetWebhooksIntegration.java b/examples/v1/webhooks-integration/GetWebhooksIntegration.java index 103bbcd9820..1b392906c7a 100644 --- a/examples/v1/webhooks-integration/GetWebhooksIntegration.java +++ b/examples/v1/webhooks-integration/GetWebhooksIntegration.java @@ -1,9 +1,15 @@ // Get a webhook integration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; import com.datadog.api.client.v1.model.WebhooksIntegration; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.java b/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.java index da5bb74338f..80df73ea3f0 100644 --- a/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.java +++ b/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.java @@ -1,9 +1,15 @@ // Get a custom variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,16 +17,14 @@ public static void main(String[] args) { WebhooksIntegrationApi apiInstance = new WebhooksIntegrationApi(defaultClient); try { - WebhooksIntegrationCustomVariableResponse result = - apiInstance.getWebhooksIntegrationCustomVariable("custom_variable_name"); + WebhooksIntegrationCustomVariableResponse result = apiInstance.getWebhooksIntegrationCustomVariable("custom_variable_name"); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling WebhooksIntegrationApi#getWebhooksIntegrationCustomVariable"); + System.err.println("Exception when calling WebhooksIntegrationApi#getWebhooksIntegrationCustomVariable"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/UpdateWebhooksIntegration.java b/examples/v1/webhooks-integration/UpdateWebhooksIntegration.java index a5f5abe727e..eaf9c3646fe 100644 --- a/examples/v1/webhooks-integration/UpdateWebhooksIntegration.java +++ b/examples/v1/webhooks-integration/UpdateWebhooksIntegration.java @@ -1,10 +1,16 @@ // Update a webhook returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; import com.datadog.api.client.v1.model.WebhooksIntegration; import com.datadog.api.client.v1.model.WebhooksIntegrationUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,8 @@ public static void main(String[] args) { // there is a valid "webhook" in the system String WEBHOOK_NAME = System.getenv("WEBHOOK_NAME"); - WebhooksIntegrationUpdateRequest body = - new WebhooksIntegrationUpdateRequest().url("https://example.com/webhook-updated"); + WebhooksIntegrationUpdateRequest body = new WebhooksIntegrationUpdateRequest() +.url("https://example.com/webhook-updated"); try { WebhooksIntegration result = apiInstance.updateWebhooksIntegration(WEBHOOK_NAME, body); @@ -28,4 +34,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.java b/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.java index 49975a383f0..efaa59396cd 100644 --- a/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.java +++ b/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.java @@ -1,10 +1,16 @@ // Update a custom variable returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v1.api.WebhooksIntegrationApi; import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableResponse; import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,20 +20,18 @@ public static void main(String[] args) { // there is a valid "webhook_custom_variable" in the system String WEBHOOK_CUSTOM_VARIABLE_NAME = System.getenv("WEBHOOK_CUSTOM_VARIABLE_NAME"); - WebhooksIntegrationCustomVariableUpdateRequest body = - new WebhooksIntegrationCustomVariableUpdateRequest().value("variable-updated"); + WebhooksIntegrationCustomVariableUpdateRequest body = new WebhooksIntegrationCustomVariableUpdateRequest() +.value("variable-updated"); try { - WebhooksIntegrationCustomVariableResponse result = - apiInstance.updateWebhooksIntegrationCustomVariable(WEBHOOK_CUSTOM_VARIABLE_NAME, body); + WebhooksIntegrationCustomVariableResponse result = apiInstance.updateWebhooksIntegrationCustomVariable(WEBHOOK_CUSTOM_VARIABLE_NAME, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling WebhooksIntegrationApi#updateWebhooksIntegrationCustomVariable"); + System.err.println("Exception when calling WebhooksIntegrationApi#updateWebhooksIntegrationCustomVariable"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/audit/ListAuditLogs.java b/examples/v2/audit/ListAuditLogs.java index 123f0b8d355..0092383311d 100644 --- a/examples/v2/audit/ListAuditLogs.java +++ b/examples/v2/audit/ListAuditLogs.java @@ -1,9 +1,15 @@ // Get a list of Audit Logs events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuditApi; import com.datadog.api.client.v2.model.AuditLogsEventsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/audit/ListAuditLogs_1275402458.java b/examples/v2/audit/ListAuditLogs_1275402458.java index 0e387ef318c..ab037aa35e4 100644 --- a/examples/v2/audit/ListAuditLogs_1275402458.java +++ b/examples/v2/audit/ListAuditLogs_1275402458.java @@ -1,10 +1,18 @@ // Get a list of Audit Logs events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.AuditApi; import com.datadog.api.client.v2.api.AuditApi.ListAuditLogsOptionalParameters; +import com.datadog.api.client.v2.model.AuditLogsEventsResponse; import com.datadog.api.client.v2.model.AuditLogsEvent; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +20,10 @@ public static void main(String[] args) { AuditApi apiInstance = new AuditApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listAuditLogsWithPagination( - new ListAuditLogsOptionalParameters().pageLimit(2)); + PaginationIterable iterable = apiInstance.listAuditLogsWithPagination(new ListAuditLogsOptionalParameters().pageLimit(2)); for (AuditLogsEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling AuditApi#listAuditLogsWithPagination"); @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/audit/SearchAuditLogs.java b/examples/v2/audit/SearchAuditLogs.java index 90dad0b1a4e..a6eab9695b8 100644 --- a/examples/v2/audit/SearchAuditLogs.java +++ b/examples/v2/audit/SearchAuditLogs.java @@ -1,7 +1,7 @@ // Search Audit Logs events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuditApi; import com.datadog.api.client.v2.api.AuditApi.SearchAuditLogsOptionalParameters; import com.datadog.api.client.v2.model.AuditLogsEventsResponse; @@ -10,26 +10,32 @@ import com.datadog.api.client.v2.model.AuditLogsQueryPageOptions; import com.datadog.api.client.v2.model.AuditLogsSearchEventsRequest; import com.datadog.api.client.v2.model.AuditLogsSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AuditApi apiInstance = new AuditApi(defaultClient); - AuditLogsSearchEventsRequest body = - new AuditLogsSearchEventsRequest() - .filter( - new AuditLogsQueryFilter() - .from("now-15m") - .query("@type:session AND @session.type:user") - .to("now")) - .options(new AuditLogsQueryOptions().timeOffset(0L).timezone("GMT")) - .page(new AuditLogsQueryPageOptions().limit(25)) - .sort(AuditLogsSort.TIMESTAMP_ASCENDING); + AuditLogsSearchEventsRequest body = new AuditLogsSearchEventsRequest() +.filter(new AuditLogsQueryFilter() +.from("now-15m") +.query("@type:session AND @session.type:user") +.to("now")) +.options(new AuditLogsQueryOptions() +.timeOffset(0L) +.timezone("GMT")) +.page(new AuditLogsQueryPageOptions() +.limit(25)) +.sort(AuditLogsSort.TIMESTAMP_ASCENDING); try { - AuditLogsEventsResponse result = - apiInstance.searchAuditLogs(new SearchAuditLogsOptionalParameters().body(body)); + AuditLogsEventsResponse result = apiInstance.searchAuditLogs(new SearchAuditLogsOptionalParameters().body(body)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AuditApi#searchAuditLogs"); @@ -39,4 +45,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/audit/SearchAuditLogs_3215529662.java b/examples/v2/audit/SearchAuditLogs_3215529662.java index 51e8b5eb628..290be049e9e 100644 --- a/examples/v2/audit/SearchAuditLogs_3215529662.java +++ b/examples/v2/audit/SearchAuditLogs_3215529662.java @@ -1,35 +1,44 @@ // Search Audit Logs events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.AuditApi; import com.datadog.api.client.v2.api.AuditApi.SearchAuditLogsOptionalParameters; +import com.datadog.api.client.v2.model.AuditLogsEventsResponse; import com.datadog.api.client.v2.model.AuditLogsEvent; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.AuditLogsQueryFilter; import com.datadog.api.client.v2.model.AuditLogsQueryOptions; import com.datadog.api.client.v2.model.AuditLogsQueryPageOptions; import com.datadog.api.client.v2.model.AuditLogsSearchEventsRequest; import com.datadog.api.client.v2.model.AuditLogsSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); AuditApi apiInstance = new AuditApi(defaultClient); - AuditLogsSearchEventsRequest body = - new AuditLogsSearchEventsRequest() - .filter(new AuditLogsQueryFilter().from("now-15m").to("now")) - .options(new AuditLogsQueryOptions().timezone("GMT")) - .page(new AuditLogsQueryPageOptions().limit(2)) - .sort(AuditLogsSort.TIMESTAMP_ASCENDING); + AuditLogsSearchEventsRequest body = new AuditLogsSearchEventsRequest() +.filter(new AuditLogsQueryFilter() +.from("now-15m") +.to("now")) +.options(new AuditLogsQueryOptions() +.timezone("GMT")) +.page(new AuditLogsQueryPageOptions() +.limit(2)) +.sort(AuditLogsSort.TIMESTAMP_ASCENDING); try { - PaginationIterable iterable = - apiInstance.searchAuditLogsWithPagination( - new SearchAuditLogsOptionalParameters().body(body)); + PaginationIterable iterable = apiInstance.searchAuditLogsWithPagination(new SearchAuditLogsOptionalParameters().body(body)); for (AuditLogsEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling AuditApi#searchAuditLogsWithPagination"); @@ -37,4 +46,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/authn-mappings/CreateAuthNMapping.java b/examples/v2/authn-mappings/CreateAuthNMapping.java index 43b2ee630fc..939efaeb157 100644 --- a/examples/v2/authn-mappings/CreateAuthNMapping.java +++ b/examples/v2/authn-mappings/CreateAuthNMapping.java @@ -1,17 +1,23 @@ // Create an AuthN Mapping returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuthNMappingsApi; +import com.datadog.api.client.v2.model.AuthNMappingResponse; import com.datadog.api.client.v2.model.AuthNMappingCreateAttributes; import com.datadog.api.client.v2.model.AuthNMappingCreateData; import com.datadog.api.client.v2.model.AuthNMappingCreateRelationships; import com.datadog.api.client.v2.model.AuthNMappingCreateRequest; -import com.datadog.api.client.v2.model.AuthNMappingResponse; import com.datadog.api.client.v2.model.AuthNMappingsType; import com.datadog.api.client.v2.model.RelationshipToRole; import com.datadog.api.client.v2.model.RelationshipToRoleData; import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,23 +27,17 @@ public static void main(String[] args) { // there is a valid "role" in the system String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID"); - AuthNMappingCreateRequest body = - new AuthNMappingCreateRequest() - .data( - new AuthNMappingCreateData() - .attributes( - new AuthNMappingCreateAttributes() - .attributeKey("examplecreateanauthnmappingreturnsokresponse") - .attributeValue("Example-Create_an_AuthN_Mapping_returns_OK_response")) - .relationships( - new AuthNMappingCreateRelationships() - .role( - new RelationshipToRole() - .data( - new RelationshipToRoleData() - .id(ROLE_DATA_ID) - .type(RolesType.ROLES)))) - .type(AuthNMappingsType.AUTHN_MAPPINGS)); + AuthNMappingCreateRequest body = new AuthNMappingCreateRequest() +.data(new AuthNMappingCreateData() +.attributes(new AuthNMappingCreateAttributes() +.attributeKey("examplecreateanauthnmappingreturnsokresponse") +.attributeValue("Example-Create_an_AuthN_Mapping_returns_OK_response")) +.relationships(new AuthNMappingCreateRelationships() +.role(new RelationshipToRole() +.data(new RelationshipToRoleData() +.id(ROLE_DATA_ID) +.type(RolesType.ROLES)))) +.type(AuthNMappingsType.AUTHN_MAPPINGS)); try { AuthNMappingResponse result = apiInstance.createAuthNMapping(body); @@ -50,4 +50,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/authn-mappings/DeleteAuthNMapping.java b/examples/v2/authn-mappings/DeleteAuthNMapping.java index b8830b0e01b..368572698be 100644 --- a/examples/v2/authn-mappings/DeleteAuthNMapping.java +++ b/examples/v2/authn-mappings/DeleteAuthNMapping.java @@ -1,8 +1,14 @@ // Delete an AuthN Mapping returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuthNMappingsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/authn-mappings/GetAuthNMapping.java b/examples/v2/authn-mappings/GetAuthNMapping.java index e268ec18b33..ee4a3b229bc 100644 --- a/examples/v2/authn-mappings/GetAuthNMapping.java +++ b/examples/v2/authn-mappings/GetAuthNMapping.java @@ -1,9 +1,15 @@ // Get an AuthN Mapping by UUID returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuthNMappingsApi; import com.datadog.api.client.v2.model.AuthNMappingResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/authn-mappings/ListAuthNMappings.java b/examples/v2/authn-mappings/ListAuthNMappings.java index f9962a1a983..0a24b51368c 100644 --- a/examples/v2/authn-mappings/ListAuthNMappings.java +++ b/examples/v2/authn-mappings/ListAuthNMappings.java @@ -1,9 +1,15 @@ // List all AuthN Mappings returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuthNMappingsApi; import com.datadog.api.client.v2.model.AuthNMappingsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/authn-mappings/UpdateAuthNMapping.java b/examples/v2/authn-mappings/UpdateAuthNMapping.java index 5dc3fee0603..ec9771a9cd1 100644 --- a/examples/v2/authn-mappings/UpdateAuthNMapping.java +++ b/examples/v2/authn-mappings/UpdateAuthNMapping.java @@ -1,17 +1,23 @@ // Edit an AuthN Mapping returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.AuthNMappingsApi; import com.datadog.api.client.v2.model.AuthNMappingResponse; +import com.datadog.api.client.v2.model.AuthNMappingsType; import com.datadog.api.client.v2.model.AuthNMappingUpdateAttributes; import com.datadog.api.client.v2.model.AuthNMappingUpdateData; import com.datadog.api.client.v2.model.AuthNMappingUpdateRelationships; import com.datadog.api.client.v2.model.AuthNMappingUpdateRequest; -import com.datadog.api.client.v2.model.AuthNMappingsType; import com.datadog.api.client.v2.model.RelationshipToRole; import com.datadog.api.client.v2.model.RelationshipToRoleData; import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,24 +30,18 @@ public static void main(String[] args) { // there is a valid "role" in the system String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID"); - AuthNMappingUpdateRequest body = - new AuthNMappingUpdateRequest() - .data( - new AuthNMappingUpdateData() - .attributes( - new AuthNMappingUpdateAttributes() - .attributeKey("member-of") - .attributeValue("Development")) - .id(AUTHN_MAPPING_DATA_ID) - .relationships( - new AuthNMappingUpdateRelationships() - .role( - new RelationshipToRole() - .data( - new RelationshipToRoleData() - .id(ROLE_DATA_ID) - .type(RolesType.ROLES)))) - .type(AuthNMappingsType.AUTHN_MAPPINGS)); + AuthNMappingUpdateRequest body = new AuthNMappingUpdateRequest() +.data(new AuthNMappingUpdateData() +.attributes(new AuthNMappingUpdateAttributes() +.attributeKey("member-of") +.attributeValue("Development")) +.id(AUTHN_MAPPING_DATA_ID) +.relationships(new AuthNMappingUpdateRelationships() +.role(new RelationshipToRole() +.data(new RelationshipToRoleData() +.id(ROLE_DATA_ID) +.type(RolesType.ROLES)))) +.type(AuthNMappingsType.AUTHN_MAPPINGS)); try { AuthNMappingResponse result = apiInstance.updateAuthNMapping(AUTHN_MAPPING_DATA_ID, body); @@ -54,4 +54,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.java b/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.java index d23f7c63dca..2e633bada3b 100644 --- a/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.java +++ b/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.java @@ -1,56 +1,56 @@ // Aggregate pipelines events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi; +import com.datadog.api.client.v2.model.CIAppPipelinesAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.CIAppAggregationFunction; import com.datadog.api.client.v2.model.CIAppCompute; import com.datadog.api.client.v2.model.CIAppComputeType; import com.datadog.api.client.v2.model.CIAppGroupByTotal; +import com.datadog.api.client.v2.model.CIAppGroupByTotalBoolean; import com.datadog.api.client.v2.model.CIAppPipelinesAggregateRequest; -import com.datadog.api.client.v2.model.CIAppPipelinesAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.CIAppPipelinesGroupBy; import com.datadog.api.client.v2.model.CIAppPipelinesQueryFilter; import com.datadog.api.client.v2.model.CIAppQueryOptions; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CiVisibilityPipelinesApi apiInstance = new CiVisibilityPipelinesApi(defaultClient); - CIAppPipelinesAggregateRequest body = - new CIAppPipelinesAggregateRequest() - .compute( - Collections.singletonList( - new CIAppCompute() - .aggregation(CIAppAggregationFunction.PERCENTILE_90) - .metric("@duration") - .type(CIAppComputeType.TOTAL))) - .filter( - new CIAppPipelinesQueryFilter() - .from("now-15m") - .query("@ci.provider.name:(gitlab OR github)") - .to("now")) - .groupBy( - Collections.singletonList( - new CIAppPipelinesGroupBy() - .facet("@ci.status") - .limit(10L) - .total(new CIAppGroupByTotal(false)))) - .options(new CIAppQueryOptions().timezone("GMT")); + CIAppPipelinesAggregateRequest body = new CIAppPipelinesAggregateRequest() +.compute(Collections.singletonList(new CIAppCompute() +.aggregation(CIAppAggregationFunction.PERCENTILE_90) +.metric("@duration") +.type(CIAppComputeType.TOTAL))) +.filter(new CIAppPipelinesQueryFilter() +.from("now-15m") +.query("@ci.provider.name:(gitlab OR github)") +.to("now")) +.groupBy(Collections.singletonList(new CIAppPipelinesGroupBy() +.facet("@ci.status") +.limit(10L) +.total(new CIAppGroupByTotal( +false)))) +.options(new CIAppQueryOptions() +.timezone("GMT")); try { - CIAppPipelinesAnalyticsAggregateResponse result = - apiInstance.aggregateCIAppPipelineEvents(body); + CIAppPipelinesAnalyticsAggregateResponse result = apiInstance.aggregateCIAppPipelineEvents(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CiVisibilityPipelinesApi#aggregateCIAppPipelineEvents"); + System.err.println("Exception when calling CiVisibilityPipelinesApi#aggregateCIAppPipelineEvents"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.java b/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.java index 45f2c34f6f6..1b706d54d51 100644 --- a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.java +++ b/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.java @@ -1,10 +1,17 @@ // Get a list of pipelines events returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi.ListCIAppPipelineEventsOptionalParameters; import com.datadog.api.client.v2.model.CIAppPipelineEventsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,13 +19,7 @@ public static void main(String[] args) { CiVisibilityPipelinesApi apiInstance = new CiVisibilityPipelinesApi(defaultClient); try { - CIAppPipelineEventsResponse result = - apiInstance.listCIAppPipelineEvents( - new ListCIAppPipelineEventsOptionalParameters() - .filterQuery("@ci.provider.name:circleci") - .filterFrom(OffsetDateTime.now().plusMinutes(-30)) - .filterTo(OffsetDateTime.now()) - .pageLimit(5)); + CIAppPipelineEventsResponse result = apiInstance.listCIAppPipelineEvents(new ListCIAppPipelineEventsOptionalParameters().filterQuery("@ci.provider.name:circleci").filterFrom(OffsetDateTime.now().plusMinutes(-30)).filterTo(OffsetDateTime.now()).pageLimit(5)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CiVisibilityPipelinesApi#listCIAppPipelineEvents"); @@ -28,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.java b/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.java index 7e0ae6405bb..3c9df2a8b87 100644 --- a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.java +++ b/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.java @@ -1,10 +1,19 @@ // Get a list of pipelines events returns "OK" response with pagination +import java.time.OffsetDateTime; + +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi.ListCIAppPipelineEventsOptionalParameters; +import com.datadog.api.client.v2.model.CIAppPipelineEventsResponse; import com.datadog.api.client.v2.model.CIAppPipelineEvent; +import com.datadog.api.client.PaginationIterable; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,21 +21,15 @@ public static void main(String[] args) { CiVisibilityPipelinesApi apiInstance = new CiVisibilityPipelinesApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listCIAppPipelineEventsWithPagination( - new ListCIAppPipelineEventsOptionalParameters() - .filterFrom(OffsetDateTime.now().plusSeconds(-30)) - .filterTo(OffsetDateTime.now()) - .pageLimit(2)); + PaginationIterable iterable = apiInstance.listCIAppPipelineEventsWithPagination(new ListCIAppPipelineEventsOptionalParameters().filterFrom(OffsetDateTime.now().plusSeconds(-30)).filterTo(OffsetDateTime.now()).pageLimit(2)); for (CIAppPipelineEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { - System.err.println( - "Exception when calling CiVisibilityPipelinesApi#listCIAppPipelineEventsWithPagination"); + System.err.println("Exception when calling CiVisibilityPipelinesApi#listCIAppPipelineEventsWithPagination"); System.err.println("Reason: " + e.getMessage()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.java b/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.java index 4fabb25fc7f..3ea79472dcb 100644 --- a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.java +++ b/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.java @@ -1,44 +1,47 @@ // Search pipelines events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi.SearchCIAppPipelineEventsOptionalParameters; -import com.datadog.api.client.v2.model.CIAppPipelineEventsRequest; import com.datadog.api.client.v2.model.CIAppPipelineEventsResponse; +import com.datadog.api.client.v2.model.CIAppPipelineEventsRequest; import com.datadog.api.client.v2.model.CIAppPipelinesQueryFilter; import com.datadog.api.client.v2.model.CIAppQueryOptions; import com.datadog.api.client.v2.model.CIAppQueryPageOptions; import com.datadog.api.client.v2.model.CIAppSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CiVisibilityPipelinesApi apiInstance = new CiVisibilityPipelinesApi(defaultClient); - CIAppPipelineEventsRequest body = - new CIAppPipelineEventsRequest() - .filter( - new CIAppPipelinesQueryFilter() - .from("now-15m") - .query("@ci.provider.name:github AND @ci.status:error") - .to("now")) - .options(new CIAppQueryOptions().timezone("GMT")) - .page(new CIAppQueryPageOptions().limit(5)) - .sort(CIAppSort.TIMESTAMP_ASCENDING); + CIAppPipelineEventsRequest body = new CIAppPipelineEventsRequest() +.filter(new CIAppPipelinesQueryFilter() +.from("now-15m") +.query("@ci.provider.name:github AND @ci.status:error") +.to("now")) +.options(new CIAppQueryOptions() +.timezone("GMT")) +.page(new CIAppQueryPageOptions() +.limit(5)) +.sort(CIAppSort.TIMESTAMP_ASCENDING); try { - CIAppPipelineEventsResponse result = - apiInstance.searchCIAppPipelineEvents( - new SearchCIAppPipelineEventsOptionalParameters().body(body)); + CIAppPipelineEventsResponse result = apiInstance.searchCIAppPipelineEvents(new SearchCIAppPipelineEventsOptionalParameters().body(body)); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CiVisibilityPipelinesApi#searchCIAppPipelineEvents"); + System.err.println("Exception when calling CiVisibilityPipelinesApi#searchCIAppPipelineEvents"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.java b/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.java index 35b8acdb3a7..ed8cc7c0cae 100644 --- a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.java +++ b/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.java @@ -1,42 +1,49 @@ // Search pipelines events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi; import com.datadog.api.client.v2.api.CiVisibilityPipelinesApi.SearchCIAppPipelineEventsOptionalParameters; +import com.datadog.api.client.v2.model.CIAppPipelineEventsResponse; import com.datadog.api.client.v2.model.CIAppPipelineEvent; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.CIAppPipelineEventsRequest; import com.datadog.api.client.v2.model.CIAppPipelinesQueryFilter; import com.datadog.api.client.v2.model.CIAppQueryOptions; import com.datadog.api.client.v2.model.CIAppQueryPageOptions; import com.datadog.api.client.v2.model.CIAppSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CiVisibilityPipelinesApi apiInstance = new CiVisibilityPipelinesApi(defaultClient); - CIAppPipelineEventsRequest body = - new CIAppPipelineEventsRequest() - .filter(new CIAppPipelinesQueryFilter().from("now-30s").to("now")) - .options(new CIAppQueryOptions().timezone("GMT")) - .page(new CIAppQueryPageOptions().limit(2)) - .sort(CIAppSort.TIMESTAMP_ASCENDING); + CIAppPipelineEventsRequest body = new CIAppPipelineEventsRequest() +.filter(new CIAppPipelinesQueryFilter() +.from("now-30s") +.to("now")) +.options(new CIAppQueryOptions() +.timezone("GMT")) +.page(new CIAppQueryPageOptions() +.limit(2)) +.sort(CIAppSort.TIMESTAMP_ASCENDING); try { - PaginationIterable iterable = - apiInstance.searchCIAppPipelineEventsWithPagination( - new SearchCIAppPipelineEventsOptionalParameters().body(body)); + PaginationIterable iterable = apiInstance.searchCIAppPipelineEventsWithPagination(new SearchCIAppPipelineEventsOptionalParameters().body(body)); for (CIAppPipelineEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { - System.err.println( - "Exception when calling" - + " CiVisibilityPipelinesApi#searchCIAppPipelineEventsWithPagination"); + System.err.println("Exception when calling CiVisibilityPipelinesApi#searchCIAppPipelineEventsWithPagination"); System.err.println("Reason: " + e.getMessage()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.java b/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.java index a5daaae1c42..a10e701afb7 100644 --- a/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.java +++ b/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.java @@ -1,47 +1,50 @@ // Aggregate tests events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CiVisibilityTestsApi; +import com.datadog.api.client.v2.model.CIAppTestsAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.CIAppAggregateSort; import com.datadog.api.client.v2.model.CIAppAggregationFunction; import com.datadog.api.client.v2.model.CIAppCompute; import com.datadog.api.client.v2.model.CIAppComputeType; import com.datadog.api.client.v2.model.CIAppGroupByTotal; +import com.datadog.api.client.v2.model.CIAppGroupByTotalBoolean; import com.datadog.api.client.v2.model.CIAppQueryOptions; import com.datadog.api.client.v2.model.CIAppSortOrder; import com.datadog.api.client.v2.model.CIAppTestsAggregateRequest; -import com.datadog.api.client.v2.model.CIAppTestsAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.CIAppTestsGroupBy; import com.datadog.api.client.v2.model.CIAppTestsQueryFilter; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CiVisibilityTestsApi apiInstance = new CiVisibilityTestsApi(defaultClient); - CIAppTestsAggregateRequest body = - new CIAppTestsAggregateRequest() - .compute( - Collections.singletonList( - new CIAppCompute() - .aggregation(CIAppAggregationFunction.COUNT) - .metric("@test.is_flaky") - .type(CIAppComputeType.TOTAL))) - .filter( - new CIAppTestsQueryFilter() - .from("now-15m") - .query("@language:(python OR go)") - .to("now")) - .groupBy( - Collections.singletonList( - new CIAppTestsGroupBy() - .facet("@git.branch") - .limit(10L) - .sort(new CIAppAggregateSort().order(CIAppSortOrder.ASCENDING)) - .total(new CIAppGroupByTotal(false)))) - .options(new CIAppQueryOptions().timezone("GMT")); + CIAppTestsAggregateRequest body = new CIAppTestsAggregateRequest() +.compute(Collections.singletonList(new CIAppCompute() +.aggregation(CIAppAggregationFunction.COUNT) +.metric("@test.is_flaky") +.type(CIAppComputeType.TOTAL))) +.filter(new CIAppTestsQueryFilter() +.from("now-15m") +.query("@language:(python OR go)") +.to("now")) +.groupBy(Collections.singletonList(new CIAppTestsGroupBy() +.facet("@git.branch") +.limit(10L) +.sort(new CIAppAggregateSort() +.order(CIAppSortOrder.ASCENDING)) +.total(new CIAppGroupByTotal( +false)))) +.options(new CIAppQueryOptions() +.timezone("GMT")); try { CIAppTestsAnalyticsAggregateResponse result = apiInstance.aggregateCIAppTestEvents(body); @@ -54,4 +57,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-tests/ListCIAppTestEvents.java b/examples/v2/ci-visibility-tests/ListCIAppTestEvents.java index 34ba5711b08..a43dd3ad8fb 100644 --- a/examples/v2/ci-visibility-tests/ListCIAppTestEvents.java +++ b/examples/v2/ci-visibility-tests/ListCIAppTestEvents.java @@ -1,10 +1,17 @@ // Get a list of tests events returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CiVisibilityTestsApi; import com.datadog.api.client.v2.api.CiVisibilityTestsApi.ListCIAppTestEventsOptionalParameters; import com.datadog.api.client.v2.model.CIAppTestEventsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,13 +19,7 @@ public static void main(String[] args) { CiVisibilityTestsApi apiInstance = new CiVisibilityTestsApi(defaultClient); try { - CIAppTestEventsResponse result = - apiInstance.listCIAppTestEvents( - new ListCIAppTestEventsOptionalParameters() - .filterQuery("@test.service:web-ui-tests") - .filterFrom(OffsetDateTime.now().plusSeconds(-30)) - .filterTo(OffsetDateTime.now()) - .pageLimit(5)); + CIAppTestEventsResponse result = apiInstance.listCIAppTestEvents(new ListCIAppTestEventsOptionalParameters().filterQuery("@test.service:web-ui-tests").filterFrom(OffsetDateTime.now().plusSeconds(-30)).filterTo(OffsetDateTime.now()).pageLimit(5)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CiVisibilityTestsApi#listCIAppTestEvents"); @@ -28,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.java b/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.java index 431010e0a86..78042015ca1 100644 --- a/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.java +++ b/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.java @@ -1,10 +1,19 @@ // Get a list of tests events returns "OK" response with pagination +import java.time.OffsetDateTime; + +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.CiVisibilityTestsApi; import com.datadog.api.client.v2.api.CiVisibilityTestsApi.ListCIAppTestEventsOptionalParameters; +import com.datadog.api.client.v2.model.CIAppTestEventsResponse; import com.datadog.api.client.v2.model.CIAppTestEvent; +import com.datadog.api.client.PaginationIterable; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,21 +21,15 @@ public static void main(String[] args) { CiVisibilityTestsApi apiInstance = new CiVisibilityTestsApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listCIAppTestEventsWithPagination( - new ListCIAppTestEventsOptionalParameters() - .filterFrom(OffsetDateTime.now().plusSeconds(-30)) - .filterTo(OffsetDateTime.now()) - .pageLimit(2)); + PaginationIterable iterable = apiInstance.listCIAppTestEventsWithPagination(new ListCIAppTestEventsOptionalParameters().filterFrom(OffsetDateTime.now().plusSeconds(-30)).filterTo(OffsetDateTime.now()).pageLimit(2)); for (CIAppTestEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { - System.err.println( - "Exception when calling CiVisibilityTestsApi#listCIAppTestEventsWithPagination"); + System.err.println("Exception when calling CiVisibilityTestsApi#listCIAppTestEventsWithPagination"); System.err.println("Reason: " + e.getMessage()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.java b/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.java index 8a5ade1e29e..d11cebaad8f 100644 --- a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.java +++ b/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.java @@ -1,36 +1,40 @@ // Search tests events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CiVisibilityTestsApi; import com.datadog.api.client.v2.api.CiVisibilityTestsApi.SearchCIAppTestEventsOptionalParameters; +import com.datadog.api.client.v2.model.CIAppTestEventsResponse; import com.datadog.api.client.v2.model.CIAppQueryOptions; import com.datadog.api.client.v2.model.CIAppQueryPageOptions; import com.datadog.api.client.v2.model.CIAppSort; import com.datadog.api.client.v2.model.CIAppTestEventsRequest; -import com.datadog.api.client.v2.model.CIAppTestEventsResponse; import com.datadog.api.client.v2.model.CIAppTestsQueryFilter; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CiVisibilityTestsApi apiInstance = new CiVisibilityTestsApi(defaultClient); - CIAppTestEventsRequest body = - new CIAppTestEventsRequest() - .filter( - new CIAppTestsQueryFilter() - .from("now-15m") - .query("@test.service:web-ui-tests AND @test.status:skip") - .to("now")) - .options(new CIAppQueryOptions().timezone("GMT")) - .page(new CIAppQueryPageOptions().limit(25)) - .sort(CIAppSort.TIMESTAMP_ASCENDING); + CIAppTestEventsRequest body = new CIAppTestEventsRequest() +.filter(new CIAppTestsQueryFilter() +.from("now-15m") +.query("@test.service:web-ui-tests AND @test.status:skip") +.to("now")) +.options(new CIAppQueryOptions() +.timezone("GMT")) +.page(new CIAppQueryPageOptions() +.limit(25)) +.sort(CIAppSort.TIMESTAMP_ASCENDING); try { - CIAppTestEventsResponse result = - apiInstance.searchCIAppTestEvents( - new SearchCIAppTestEventsOptionalParameters().body(body)); + CIAppTestEventsResponse result = apiInstance.searchCIAppTestEvents(new SearchCIAppTestEventsOptionalParameters().body(body)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CiVisibilityTestsApi#searchCIAppTestEvents"); @@ -40,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.java b/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.java index 1e1a347828b..b94ca4c3b96 100644 --- a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.java +++ b/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.java @@ -1,43 +1,47 @@ // Search tests events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.CiVisibilityTestsApi; import com.datadog.api.client.v2.api.CiVisibilityTestsApi.SearchCIAppTestEventsOptionalParameters; +import com.datadog.api.client.v2.model.CIAppTestEventsResponse; +import com.datadog.api.client.v2.model.CIAppTestEvent; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.CIAppQueryPageOptions; import com.datadog.api.client.v2.model.CIAppSort; -import com.datadog.api.client.v2.model.CIAppTestEvent; import com.datadog.api.client.v2.model.CIAppTestEventsRequest; import com.datadog.api.client.v2.model.CIAppTestsQueryFilter; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CiVisibilityTestsApi apiInstance = new CiVisibilityTestsApi(defaultClient); - CIAppTestEventsRequest body = - new CIAppTestEventsRequest() - .filter( - new CIAppTestsQueryFilter() - .from("now-15m") - .query("@test.status:pass AND -@language:python") - .to("now")) - .page(new CIAppQueryPageOptions().limit(2)) - .sort(CIAppSort.TIMESTAMP_ASCENDING); + CIAppTestEventsRequest body = new CIAppTestEventsRequest() +.filter(new CIAppTestsQueryFilter() +.from("now-15m") +.query("@test.status:pass AND -@language:python") +.to("now")) +.page(new CIAppQueryPageOptions() +.limit(2)) +.sort(CIAppSort.TIMESTAMP_ASCENDING); try { - PaginationIterable iterable = - apiInstance.searchCIAppTestEventsWithPagination( - new SearchCIAppTestEventsOptionalParameters().body(body)); + PaginationIterable iterable = apiInstance.searchCIAppTestEventsWithPagination(new SearchCIAppTestEventsOptionalParameters().body(body)); for (CIAppTestEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { - System.err.println( - "Exception when calling CiVisibilityTestsApi#searchCIAppTestEventsWithPagination"); + System.err.println("Exception when calling CiVisibilityTestsApi#searchCIAppTestEventsWithPagination"); System.err.println("Reason: " + e.getMessage()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.java b/examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.java index 228b8775037..618f853bf35 100644 --- a/examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.java +++ b/examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.java @@ -1,44 +1,45 @@ // Create a Cloud Workload Security Agent rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudWorkloadSecurityApi; +import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateAttributes; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateData; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateRequest; -import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CloudWorkloadSecurityApi apiInstance = new CloudWorkloadSecurityApi(defaultClient); - CloudWorkloadSecurityAgentRuleCreateRequest body = - new CloudWorkloadSecurityAgentRuleCreateRequest() - .data( - new CloudWorkloadSecurityAgentRuleCreateData() - .attributes( - new CloudWorkloadSecurityAgentRuleCreateAttributes() - .description("Test Agent rule") - .enabled(true) - .expression(""" + CloudWorkloadSecurityAgentRuleCreateRequest body = new CloudWorkloadSecurityAgentRuleCreateRequest() +.data(new CloudWorkloadSecurityAgentRuleCreateData() +.attributes(new CloudWorkloadSecurityAgentRuleCreateAttributes() +.description("Test Agent rule") +.enabled(true) +.expression(""" exec.file.name == "sh" """) - .name("examplecreateacloudworkloadsecurityagentrulereturnsokresponse")) - .type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE)); +.name("examplecreateacloudworkloadsecurityagentrulereturnsokresponse")) +.type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE)); try { - CloudWorkloadSecurityAgentRuleResponse result = - apiInstance.createCloudWorkloadSecurityAgentRule(body); + CloudWorkloadSecurityAgentRuleResponse result = apiInstance.createCloudWorkloadSecurityAgentRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CloudWorkloadSecurityApi#createCloudWorkloadSecurityAgentRule"); + System.err.println("Exception when calling CloudWorkloadSecurityApi#createCloudWorkloadSecurityAgentRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloud-workload-security/DeleteCloudWorkloadSecurityAgentRule.java b/examples/v2/cloud-workload-security/DeleteCloudWorkloadSecurityAgentRule.java index 1c7a066a018..a66f05e6075 100644 --- a/examples/v2/cloud-workload-security/DeleteCloudWorkloadSecurityAgentRule.java +++ b/examples/v2/cloud-workload-security/DeleteCloudWorkloadSecurityAgentRule.java @@ -1,8 +1,14 @@ // Delete a Cloud Workload Security Agent rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudWorkloadSecurityApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,12 +21,11 @@ public static void main(String[] args) { try { apiInstance.deleteCloudWorkloadSecurityAgentRule(AGENT_RULE_DATA_ID); } catch (ApiException e) { - System.err.println( - "Exception when calling CloudWorkloadSecurityApi#deleteCloudWorkloadSecurityAgentRule"); + System.err.println("Exception when calling CloudWorkloadSecurityApi#deleteCloudWorkloadSecurityAgentRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloud-workload-security/DownloadCloudWorkloadPolicyFile.java b/examples/v2/cloud-workload-security/DownloadCloudWorkloadPolicyFile.java index a38825e3f48..bf4c8103159 100644 --- a/examples/v2/cloud-workload-security/DownloadCloudWorkloadPolicyFile.java +++ b/examples/v2/cloud-workload-security/DownloadCloudWorkloadPolicyFile.java @@ -1,9 +1,15 @@ // Get the latest Cloud Workload Security policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudWorkloadSecurityApi; import java.io.File; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,12 +20,11 @@ public static void main(String[] args) { File result = apiInstance.downloadCloudWorkloadPolicyFile(); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CloudWorkloadSecurityApi#downloadCloudWorkloadPolicyFile"); + System.err.println("Exception when calling CloudWorkloadSecurityApi#downloadCloudWorkloadPolicyFile"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloud-workload-security/GetCloudWorkloadSecurityAgentRule.java b/examples/v2/cloud-workload-security/GetCloudWorkloadSecurityAgentRule.java index 5df72d10610..4e7cda4827b 100644 --- a/examples/v2/cloud-workload-security/GetCloudWorkloadSecurityAgentRule.java +++ b/examples/v2/cloud-workload-security/GetCloudWorkloadSecurityAgentRule.java @@ -1,9 +1,15 @@ // Get a Cloud Workload Security Agent rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudWorkloadSecurityApi; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,16 +20,14 @@ public static void main(String[] args) { String AGENT_RULE_DATA_ID = System.getenv("AGENT_RULE_DATA_ID"); try { - CloudWorkloadSecurityAgentRuleResponse result = - apiInstance.getCloudWorkloadSecurityAgentRule(AGENT_RULE_DATA_ID); + CloudWorkloadSecurityAgentRuleResponse result = apiInstance.getCloudWorkloadSecurityAgentRule(AGENT_RULE_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CloudWorkloadSecurityApi#getCloudWorkloadSecurityAgentRule"); + System.err.println("Exception when calling CloudWorkloadSecurityApi#getCloudWorkloadSecurityAgentRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloud-workload-security/ListCloudWorkloadSecurityAgentRules.java b/examples/v2/cloud-workload-security/ListCloudWorkloadSecurityAgentRules.java index 2ff7a1b4fe9..df591beff05 100644 --- a/examples/v2/cloud-workload-security/ListCloudWorkloadSecurityAgentRules.java +++ b/examples/v2/cloud-workload-security/ListCloudWorkloadSecurityAgentRules.java @@ -1,9 +1,15 @@ // Get all Cloud Workload Security Agent rules returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudWorkloadSecurityApi; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRulesListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,16 +17,14 @@ public static void main(String[] args) { CloudWorkloadSecurityApi apiInstance = new CloudWorkloadSecurityApi(defaultClient); try { - CloudWorkloadSecurityAgentRulesListResponse result = - apiInstance.listCloudWorkloadSecurityAgentRules(); + CloudWorkloadSecurityAgentRulesListResponse result = apiInstance.listCloudWorkloadSecurityAgentRules(); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CloudWorkloadSecurityApi#listCloudWorkloadSecurityAgentRules"); + System.err.println("Exception when calling CloudWorkloadSecurityApi#listCloudWorkloadSecurityAgentRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloud-workload-security/UpdateCloudWorkloadSecurityAgentRule.java b/examples/v2/cloud-workload-security/UpdateCloudWorkloadSecurityAgentRule.java index 5bdf51a138b..b494aae11d0 100644 --- a/examples/v2/cloud-workload-security/UpdateCloudWorkloadSecurityAgentRule.java +++ b/examples/v2/cloud-workload-security/UpdateCloudWorkloadSecurityAgentRule.java @@ -1,13 +1,19 @@ // Update a Cloud Workload Security Agent rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudWorkloadSecurityApi; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleType; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateAttributes; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateData; import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,30 +23,25 @@ public static void main(String[] args) { // there is a valid "agent_rule" in the system String AGENT_RULE_DATA_ID = System.getenv("AGENT_RULE_DATA_ID"); - CloudWorkloadSecurityAgentRuleUpdateRequest body = - new CloudWorkloadSecurityAgentRuleUpdateRequest() - .data( - new CloudWorkloadSecurityAgentRuleUpdateData() - .attributes( - new CloudWorkloadSecurityAgentRuleUpdateAttributes() - .description("Test Agent rule") - .enabled(true) - .expression(""" + CloudWorkloadSecurityAgentRuleUpdateRequest body = new CloudWorkloadSecurityAgentRuleUpdateRequest() +.data(new CloudWorkloadSecurityAgentRuleUpdateData() +.attributes(new CloudWorkloadSecurityAgentRuleUpdateAttributes() +.description("Test Agent rule") +.enabled(true) +.expression(""" exec.file.name == "sh" """)) - .type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE)); +.type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE)); try { - CloudWorkloadSecurityAgentRuleResponse result = - apiInstance.updateCloudWorkloadSecurityAgentRule(AGENT_RULE_DATA_ID, body); + CloudWorkloadSecurityAgentRuleResponse result = apiInstance.updateCloudWorkloadSecurityAgentRule(AGENT_RULE_DATA_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling CloudWorkloadSecurityApi#updateCloudWorkloadSecurityAgentRule"); + System.err.println("Exception when calling CloudWorkloadSecurityApi#updateCloudWorkloadSecurityAgentRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloudflare-integration/CreateCloudflareAccount.java b/examples/v2/cloudflare-integration/CreateCloudflareAccount.java index e8d704523af..ec279021556 100644 --- a/examples/v2/cloudflare-integration/CreateCloudflareAccount.java +++ b/examples/v2/cloudflare-integration/CreateCloudflareAccount.java @@ -1,29 +1,32 @@ // Add Cloudflare account returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudflareIntegrationApi; +import com.datadog.api.client.v2.model.CloudflareAccountResponse; import com.datadog.api.client.v2.model.CloudflareAccountCreateRequest; import com.datadog.api.client.v2.model.CloudflareAccountCreateRequestAttributes; import com.datadog.api.client.v2.model.CloudflareAccountCreateRequestData; -import com.datadog.api.client.v2.model.CloudflareAccountResponse; import com.datadog.api.client.v2.model.CloudflareAccountType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); CloudflareIntegrationApi apiInstance = new CloudflareIntegrationApi(defaultClient); - CloudflareAccountCreateRequest body = - new CloudflareAccountCreateRequest() - .data( - new CloudflareAccountCreateRequestData() - .attributes( - new CloudflareAccountCreateRequestAttributes() - .apiKey("6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu") - .email("new@email") - .name("exampleaddcloudflareaccountreturnscreatedresponse")) - .type(CloudflareAccountType.CLOUDFLARE_ACCOUNTS)); + CloudflareAccountCreateRequest body = new CloudflareAccountCreateRequest() +.data(new CloudflareAccountCreateRequestData() +.attributes(new CloudflareAccountCreateRequestAttributes() +.apiKey("6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu") +.email("new@email") +.name("exampleaddcloudflareaccountreturnscreatedresponse")) +.type(CloudflareAccountType.CLOUDFLARE_ACCOUNTS)); try { CloudflareAccountResponse result = apiInstance.createCloudflareAccount(body); @@ -36,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloudflare-integration/DeleteCloudflareAccount.java b/examples/v2/cloudflare-integration/DeleteCloudflareAccount.java index c839f1ff7f7..2c7aa74967b 100644 --- a/examples/v2/cloudflare-integration/DeleteCloudflareAccount.java +++ b/examples/v2/cloudflare-integration/DeleteCloudflareAccount.java @@ -1,8 +1,14 @@ // Delete Cloudflare account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudflareIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloudflare-integration/GetCloudflareAccount.java b/examples/v2/cloudflare-integration/GetCloudflareAccount.java index 903ca9d23be..e8af4f1fba6 100644 --- a/examples/v2/cloudflare-integration/GetCloudflareAccount.java +++ b/examples/v2/cloudflare-integration/GetCloudflareAccount.java @@ -1,9 +1,15 @@ // Get Cloudflare account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudflareIntegrationApi; import com.datadog.api.client.v2.model.CloudflareAccountResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,7 @@ public static void main(String[] args) { String CLOUDFLARE_ACCOUNT_DATA_ID = System.getenv("CLOUDFLARE_ACCOUNT_DATA_ID"); try { - CloudflareAccountResponse result = - apiInstance.getCloudflareAccount(CLOUDFLARE_ACCOUNT_DATA_ID); + CloudflareAccountResponse result = apiInstance.getCloudflareAccount(CLOUDFLARE_ACCOUNT_DATA_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CloudflareIntegrationApi#getCloudflareAccount"); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloudflare-integration/ListCloudflareAccounts.java b/examples/v2/cloudflare-integration/ListCloudflareAccounts.java index c62eb2e74a1..046bc63275f 100644 --- a/examples/v2/cloudflare-integration/ListCloudflareAccounts.java +++ b/examples/v2/cloudflare-integration/ListCloudflareAccounts.java @@ -1,9 +1,15 @@ // List Cloudflare accounts returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudflareIntegrationApi; import com.datadog.api.client.v2.model.CloudflareAccountsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/cloudflare-integration/UpdateCloudflareAccount.java b/examples/v2/cloudflare-integration/UpdateCloudflareAccount.java index 9e6702a860c..23ebc6ef874 100644 --- a/examples/v2/cloudflare-integration/UpdateCloudflareAccount.java +++ b/examples/v2/cloudflare-integration/UpdateCloudflareAccount.java @@ -1,13 +1,19 @@ // Update Cloudflare account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.CloudflareIntegrationApi; import com.datadog.api.client.v2.model.CloudflareAccountResponse; import com.datadog.api.client.v2.model.CloudflareAccountType; import com.datadog.api.client.v2.model.CloudflareAccountUpdateRequest; import com.datadog.api.client.v2.model.CloudflareAccountUpdateRequestAttributes; import com.datadog.api.client.v2.model.CloudflareAccountUpdateRequestData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,19 +23,15 @@ public static void main(String[] args) { // there is a valid "cloudflare_account" in the system String CLOUDFLARE_ACCOUNT_DATA_ID = System.getenv("CLOUDFLARE_ACCOUNT_DATA_ID"); - CloudflareAccountUpdateRequest body = - new CloudflareAccountUpdateRequest() - .data( - new CloudflareAccountUpdateRequestData() - .attributes( - new CloudflareAccountUpdateRequestAttributes() - .apiKey("6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu") - .email("new@email")) - .type(CloudflareAccountType.CLOUDFLARE_ACCOUNTS)); + CloudflareAccountUpdateRequest body = new CloudflareAccountUpdateRequest() +.data(new CloudflareAccountUpdateRequestData() +.attributes(new CloudflareAccountUpdateRequestAttributes() +.apiKey("6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu") +.email("new@email")) +.type(CloudflareAccountType.CLOUDFLARE_ACCOUNTS)); try { - CloudflareAccountResponse result = - apiInstance.updateCloudflareAccount(CLOUDFLARE_ACCOUNT_DATA_ID, body); + CloudflareAccountResponse result = apiInstance.updateCloudflareAccount(CLOUDFLARE_ACCOUNT_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CloudflareIntegrationApi#updateCloudflareAccount"); @@ -39,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/CreateConfluentAccount.java b/examples/v2/confluent-cloud/CreateConfluentAccount.java index 3591219f6df..fbbbf28f5f2 100644 --- a/examples/v2/confluent-cloud/CreateConfluentAccount.java +++ b/examples/v2/confluent-cloud/CreateConfluentAccount.java @@ -1,38 +1,37 @@ // Add Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; +import com.datadog.api.client.v2.model.ConfluentAccountResponse; import com.datadog.api.client.v2.model.ConfluentAccountCreateRequest; import com.datadog.api.client.v2.model.ConfluentAccountCreateRequestAttributes; import com.datadog.api.client.v2.model.ConfluentAccountCreateRequestData; import com.datadog.api.client.v2.model.ConfluentAccountResourceAttributes; -import com.datadog.api.client.v2.model.ConfluentAccountResponse; import com.datadog.api.client.v2.model.ConfluentAccountType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ConfluentCloudApi apiInstance = new ConfluentCloudApi(defaultClient); - ConfluentAccountCreateRequest body = - new ConfluentAccountCreateRequest() - .data( - new ConfluentAccountCreateRequestData() - .attributes( - new ConfluentAccountCreateRequestAttributes() - .apiKey("TESTAPIKEY123") - .apiSecret("test-api-secret-123") - .resources( - Collections.singletonList( - new ConfluentAccountResourceAttributes() - .id("resource-id-123") - .resourceType("kafka") - .tags(Arrays.asList("myTag", "myTag2:myValue")))) - .tags(Arrays.asList("myTag", "myTag2:myValue"))) - .type(ConfluentAccountType.CONFLUENT_CLOUD_ACCOUNTS)); + ConfluentAccountCreateRequest body = new ConfluentAccountCreateRequest() +.data(new ConfluentAccountCreateRequestData() +.attributes(new ConfluentAccountCreateRequestAttributes() +.apiKey("TESTAPIKEY123") +.apiSecret("test-api-secret-123") +.resources(Collections.singletonList(new ConfluentAccountResourceAttributes() +.id("resource-id-123") +.resourceType("kafka") +.tags(Arrays.asList("myTag", "myTag2:myValue")))) +.tags(Arrays.asList("myTag", "myTag2:myValue"))) +.type(ConfluentAccountType.CONFLUENT_CLOUD_ACCOUNTS)); try { ConfluentAccountResponse result = apiInstance.createConfluentAccount(body); @@ -45,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/CreateConfluentResource.java b/examples/v2/confluent-cloud/CreateConfluentResource.java index 63263e4b866..19fa4d9e47e 100644 --- a/examples/v2/confluent-cloud/CreateConfluentResource.java +++ b/examples/v2/confluent-cloud/CreateConfluentResource.java @@ -1,14 +1,19 @@ // Add resource to Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; +import com.datadog.api.client.v2.model.ConfluentResourceResponse; import com.datadog.api.client.v2.model.ConfluentResourceRequest; import com.datadog.api.client.v2.model.ConfluentResourceRequestAttributes; import com.datadog.api.client.v2.model.ConfluentResourceRequestData; -import com.datadog.api.client.v2.model.ConfluentResourceResponse; import com.datadog.api.client.v2.model.ConfluentResourceType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -18,20 +23,16 @@ public static void main(String[] args) { // there is a valid "confluent_account" in the system String CONFLUENT_ACCOUNT_DATA_ID = System.getenv("CONFLUENT_ACCOUNT_DATA_ID"); - ConfluentResourceRequest body = - new ConfluentResourceRequest() - .data( - new ConfluentResourceRequestData() - .attributes( - new ConfluentResourceRequestAttributes() - .resourceType("kafka") - .tags(Arrays.asList("myTag", "myTag2:myValue"))) - .id("exampleaddresourcetoconfluentaccountreturnsokresponse") - .type(ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES)); + ConfluentResourceRequest body = new ConfluentResourceRequest() +.data(new ConfluentResourceRequestData() +.attributes(new ConfluentResourceRequestAttributes() +.resourceType("kafka") +.tags(Arrays.asList("myTag", "myTag2:myValue"))) +.id("exampleaddresourcetoconfluentaccountreturnsokresponse") +.type(ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES)); try { - ConfluentResourceResponse result = - apiInstance.createConfluentResource(CONFLUENT_ACCOUNT_DATA_ID, body); + ConfluentResourceResponse result = apiInstance.createConfluentResource(CONFLUENT_ACCOUNT_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ConfluentCloudApi#createConfluentResource"); @@ -41,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/DeleteConfluentAccount.java b/examples/v2/confluent-cloud/DeleteConfluentAccount.java index b263133aceb..8434b626f8f 100644 --- a/examples/v2/confluent-cloud/DeleteConfluentAccount.java +++ b/examples/v2/confluent-cloud/DeleteConfluentAccount.java @@ -1,8 +1,14 @@ // Delete Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.java b/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.java index e8863c32e9d..a63273daf2a 100644 --- a/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.java +++ b/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.java @@ -1,8 +1,14 @@ // Delete resource from Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/GetConfluentAccount.java b/examples/v2/confluent-cloud/GetConfluentAccount.java index 61ea55f00e5..99d9276c247 100644 --- a/examples/v2/confluent-cloud/GetConfluentAccount.java +++ b/examples/v2/confluent-cloud/GetConfluentAccount.java @@ -1,9 +1,15 @@ // Get Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; import com.datadog.api.client.v2.model.ConfluentAccountResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/GetConfluentResource.java b/examples/v2/confluent-cloud/GetConfluentResource.java index 6de1a361586..db8b3c61033 100644 --- a/examples/v2/confluent-cloud/GetConfluentResource.java +++ b/examples/v2/confluent-cloud/GetConfluentResource.java @@ -1,9 +1,15 @@ // Get resource from Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; import com.datadog.api.client.v2.model.ConfluentResourceResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { ConfluentCloudApi apiInstance = new ConfluentCloudApi(defaultClient); try { - ConfluentResourceResponse result = - apiInstance.getConfluentResource("account_id", "resource_id"); + ConfluentResourceResponse result = apiInstance.getConfluentResource("account_id", "resource_id"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ConfluentCloudApi#getConfluentResource"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/ListConfluentAccount.java b/examples/v2/confluent-cloud/ListConfluentAccount.java index 75baf82e476..f4a27a7bfae 100644 --- a/examples/v2/confluent-cloud/ListConfluentAccount.java +++ b/examples/v2/confluent-cloud/ListConfluentAccount.java @@ -1,9 +1,15 @@ // List Confluent accounts returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; import com.datadog.api.client.v2.model.ConfluentAccountsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/ListConfluentResource.java b/examples/v2/confluent-cloud/ListConfluentResource.java index 70363ae0771..50dee1d0104 100644 --- a/examples/v2/confluent-cloud/ListConfluentResource.java +++ b/examples/v2/confluent-cloud/ListConfluentResource.java @@ -1,9 +1,15 @@ // List Confluent Account resources returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; import com.datadog.api.client.v2.model.ConfluentResourcesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/UpdateConfluentAccount.java b/examples/v2/confluent-cloud/UpdateConfluentAccount.java index 6d36a67e873..7c8d427580c 100644 --- a/examples/v2/confluent-cloud/UpdateConfluentAccount.java +++ b/examples/v2/confluent-cloud/UpdateConfluentAccount.java @@ -1,14 +1,19 @@ // Update Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; import com.datadog.api.client.v2.model.ConfluentAccountResponse; import com.datadog.api.client.v2.model.ConfluentAccountType; import com.datadog.api.client.v2.model.ConfluentAccountUpdateRequest; import com.datadog.api.client.v2.model.ConfluentAccountUpdateRequestAttributes; import com.datadog.api.client.v2.model.ConfluentAccountUpdateRequestData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,24 +21,19 @@ public static void main(String[] args) { ConfluentCloudApi apiInstance = new ConfluentCloudApi(defaultClient); // there is a valid "confluent_account" in the system - String CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY = - System.getenv("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY"); + String CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY = System.getenv("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY"); String CONFLUENT_ACCOUNT_DATA_ID = System.getenv("CONFLUENT_ACCOUNT_DATA_ID"); - ConfluentAccountUpdateRequest body = - new ConfluentAccountUpdateRequest() - .data( - new ConfluentAccountUpdateRequestData() - .attributes( - new ConfluentAccountUpdateRequestAttributes() - .apiKey(CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY) - .apiSecret("update-secret") - .tags(Collections.singletonList("updated_tag:val"))) - .type(ConfluentAccountType.CONFLUENT_CLOUD_ACCOUNTS)); + ConfluentAccountUpdateRequest body = new ConfluentAccountUpdateRequest() +.data(new ConfluentAccountUpdateRequestData() +.attributes(new ConfluentAccountUpdateRequestAttributes() +.apiKey(CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY) +.apiSecret("update-secret") +.tags(Collections.singletonList("updated_tag:val"))) +.type(ConfluentAccountType.CONFLUENT_CLOUD_ACCOUNTS)); try { - ConfluentAccountResponse result = - apiInstance.updateConfluentAccount(CONFLUENT_ACCOUNT_DATA_ID, body); + ConfluentAccountResponse result = apiInstance.updateConfluentAccount(CONFLUENT_ACCOUNT_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ConfluentCloudApi#updateConfluentAccount"); @@ -43,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/confluent-cloud/UpdateConfluentResource.java b/examples/v2/confluent-cloud/UpdateConfluentResource.java index a3639933964..0a2024446f9 100644 --- a/examples/v2/confluent-cloud/UpdateConfluentResource.java +++ b/examples/v2/confluent-cloud/UpdateConfluentResource.java @@ -1,34 +1,35 @@ // Update resource in Confluent account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ConfluentCloudApi; +import com.datadog.api.client.v2.model.ConfluentResourceResponse; import com.datadog.api.client.v2.model.ConfluentResourceRequest; import com.datadog.api.client.v2.model.ConfluentResourceRequestAttributes; import com.datadog.api.client.v2.model.ConfluentResourceRequestData; -import com.datadog.api.client.v2.model.ConfluentResourceResponse; import com.datadog.api.client.v2.model.ConfluentResourceType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ConfluentCloudApi apiInstance = new ConfluentCloudApi(defaultClient); - ConfluentResourceRequest body = - new ConfluentResourceRequest() - .data( - new ConfluentResourceRequestData() - .attributes( - new ConfluentResourceRequestAttributes() - .resourceType("kafka") - .tags(Arrays.asList("myTag", "myTag2:myValue"))) - .id("resource-id-123") - .type(ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES)); + ConfluentResourceRequest body = new ConfluentResourceRequest() +.data(new ConfluentResourceRequestData() +.attributes(new ConfluentResourceRequestAttributes() +.resourceType("kafka") +.tags(Arrays.asList("myTag", "myTag2:myValue"))) +.id("resource-id-123") +.type(ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES)); try { - ConfluentResourceResponse result = - apiInstance.updateConfluentResource("account_id", "resource_id", body); + ConfluentResourceResponse result = apiInstance.updateConfluentResource("account_id", "resource_id", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ConfluentCloudApi#updateConfluentResource"); @@ -38,4 +39,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/CreateDashboardListItems.java b/examples/v2/dashboard-lists/CreateDashboardListItems.java index 2a5d129c418..696df22bf3d 100644 --- a/examples/v2/dashboard-lists/CreateDashboardListItems.java +++ b/examples/v2/dashboard-lists/CreateDashboardListItems.java @@ -1,30 +1,31 @@ // Add Items to a Dashboard List returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; -import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; import com.datadog.api.client.v2.model.DashboardListAddItemsResponse; +import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardListsApi apiInstance = new DashboardListsApi(defaultClient); - DashboardListAddItemsRequest body = - new DashboardListAddItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id("q5j-nti-fv6") - .type(DashboardType.HOST_TIMEBOARD))); + DashboardListAddItemsRequest body = new DashboardListAddItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id("q5j-nti-fv6") +.type(DashboardType.HOST_TIMEBOARD))); try { - DashboardListAddItemsResponse result = - apiInstance.createDashboardListItems(9223372036854775807L, body); + DashboardListAddItemsResponse result = apiInstance.createDashboardListItems(9223372036854775807L, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#createDashboardListItems"); @@ -34,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.java b/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.java index f7fabd1df27..0bba76650c2 100644 --- a/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.java +++ b/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.java @@ -1,13 +1,18 @@ // Add custom timeboard dashboard to an existing dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; -import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; import com.datadog.api.client.v2.model.DashboardListAddItemsResponse; +import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -20,17 +25,13 @@ public static void main(String[] args) { // there is a valid "dashboard" in the system String DASHBOARD_ID = System.getenv("DASHBOARD_ID"); - DashboardListAddItemsRequest body = - new DashboardListAddItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id(DASHBOARD_ID) - .type(DashboardType.CUSTOM_TIMEBOARD))); + DashboardListAddItemsRequest body = new DashboardListAddItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id(DASHBOARD_ID) +.type(DashboardType.CUSTOM_TIMEBOARD))); try { - DashboardListAddItemsResponse result = - apiInstance.createDashboardListItems(DASHBOARD_LIST_ID, body); + DashboardListAddItemsResponse result = apiInstance.createDashboardListItems(DASHBOARD_LIST_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#createDashboardListItems"); @@ -40,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.java b/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.java index 4c644c7cd6a..20b6c5d4d68 100644 --- a/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.java +++ b/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.java @@ -1,13 +1,18 @@ // Add custom screenboard dashboard to an existing dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; -import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; import com.datadog.api.client.v2.model.DashboardListAddItemsResponse; +import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -20,17 +25,13 @@ public static void main(String[] args) { // there is a valid "screenboard_dashboard" in the system String SCREENBOARD_DASHBOARD_ID = System.getenv("SCREENBOARD_DASHBOARD_ID"); - DashboardListAddItemsRequest body = - new DashboardListAddItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id(SCREENBOARD_DASHBOARD_ID) - .type(DashboardType.CUSTOM_SCREENBOARD))); + DashboardListAddItemsRequest body = new DashboardListAddItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id(SCREENBOARD_DASHBOARD_ID) +.type(DashboardType.CUSTOM_SCREENBOARD))); try { - DashboardListAddItemsResponse result = - apiInstance.createDashboardListItems(DASHBOARD_LIST_ID, body); + DashboardListAddItemsResponse result = apiInstance.createDashboardListItems(DASHBOARD_LIST_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#createDashboardListItems"); @@ -40,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/DeleteDashboardListItems.java b/examples/v2/dashboard-lists/DeleteDashboardListItems.java index f600d7a19ae..ff4c161dcd1 100644 --- a/examples/v2/dashboard-lists/DeleteDashboardListItems.java +++ b/examples/v2/dashboard-lists/DeleteDashboardListItems.java @@ -1,30 +1,31 @@ // Delete items from a dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; -import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse; +import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); DashboardListsApi apiInstance = new DashboardListsApi(defaultClient); - DashboardListDeleteItemsRequest body = - new DashboardListDeleteItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id("q5j-nti-fv6") - .type(DashboardType.HOST_TIMEBOARD))); + DashboardListDeleteItemsRequest body = new DashboardListDeleteItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id("q5j-nti-fv6") +.type(DashboardType.HOST_TIMEBOARD))); try { - DashboardListDeleteItemsResponse result = - apiInstance.deleteDashboardListItems(9223372036854775807L, body); + DashboardListDeleteItemsResponse result = apiInstance.deleteDashboardListItems(9223372036854775807L, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#deleteDashboardListItems"); @@ -34,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.java b/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.java index d2276062532..5822278f027 100644 --- a/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.java +++ b/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.java @@ -1,13 +1,18 @@ // Delete custom timeboard dashboard from an existing dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; -import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse; +import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -20,17 +25,13 @@ public static void main(String[] args) { // there is a valid "dashboard" in the system String DASHBOARD_ID = System.getenv("DASHBOARD_ID"); - DashboardListDeleteItemsRequest body = - new DashboardListDeleteItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id(DASHBOARD_ID) - .type(DashboardType.CUSTOM_TIMEBOARD))); + DashboardListDeleteItemsRequest body = new DashboardListDeleteItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id(DASHBOARD_ID) +.type(DashboardType.CUSTOM_TIMEBOARD))); try { - DashboardListDeleteItemsResponse result = - apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID, body); + DashboardListDeleteItemsResponse result = apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#deleteDashboardListItems"); @@ -40,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.java b/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.java index 017af4ecd42..2c658aa0b37 100644 --- a/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.java +++ b/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.java @@ -1,13 +1,18 @@ // Delete custom screenboard dashboard from an existing dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; -import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse; +import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -20,17 +25,13 @@ public static void main(String[] args) { // there is a valid "screenboard_dashboard" in the system String SCREENBOARD_DASHBOARD_ID = System.getenv("SCREENBOARD_DASHBOARD_ID"); - DashboardListDeleteItemsRequest body = - new DashboardListDeleteItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id(SCREENBOARD_DASHBOARD_ID) - .type(DashboardType.CUSTOM_SCREENBOARD))); + DashboardListDeleteItemsRequest body = new DashboardListDeleteItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id(SCREENBOARD_DASHBOARD_ID) +.type(DashboardType.CUSTOM_SCREENBOARD))); try { - DashboardListDeleteItemsResponse result = - apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID, body); + DashboardListDeleteItemsResponse result = apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#deleteDashboardListItems"); @@ -40,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/GetDashboardListItems.java b/examples/v2/dashboard-lists/GetDashboardListItems.java index cbedf7de7a2..65ba8a7feba 100644 --- a/examples/v2/dashboard-lists/GetDashboardListItems.java +++ b/examples/v2/dashboard-lists/GetDashboardListItems.java @@ -1,9 +1,15 @@ // Get items of a Dashboard List returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; import com.datadog.api.client.v2.model.DashboardListItems; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/dashboard-lists/UpdateDashboardListItems.java b/examples/v2/dashboard-lists/UpdateDashboardListItems.java index 2adbba022bc..75fc3e9dec7 100644 --- a/examples/v2/dashboard-lists/UpdateDashboardListItems.java +++ b/examples/v2/dashboard-lists/UpdateDashboardListItems.java @@ -1,13 +1,18 @@ // Update items of a dashboard list returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.DashboardListsApi; +import com.datadog.api.client.v2.model.DashboardListUpdateItemsResponse; import com.datadog.api.client.v2.model.DashboardListItemRequest; import com.datadog.api.client.v2.model.DashboardListUpdateItemsRequest; -import com.datadog.api.client.v2.model.DashboardListUpdateItemsResponse; import com.datadog.api.client.v2.model.DashboardType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -20,17 +25,13 @@ public static void main(String[] args) { // there is a valid "screenboard_dashboard" in the system String SCREENBOARD_DASHBOARD_ID = System.getenv("SCREENBOARD_DASHBOARD_ID"); - DashboardListUpdateItemsRequest body = - new DashboardListUpdateItemsRequest() - .dashboards( - Collections.singletonList( - new DashboardListItemRequest() - .id(SCREENBOARD_DASHBOARD_ID) - .type(DashboardType.CUSTOM_SCREENBOARD))); + DashboardListUpdateItemsRequest body = new DashboardListUpdateItemsRequest() +.dashboards(Collections.singletonList(new DashboardListItemRequest() +.id(SCREENBOARD_DASHBOARD_ID) +.type(DashboardType.CUSTOM_SCREENBOARD))); try { - DashboardListUpdateItemsResponse result = - apiInstance.updateDashboardListItems(DASHBOARD_LIST_ID, body); + DashboardListUpdateItemsResponse result = apiInstance.updateDashboardListItems(DASHBOARD_LIST_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DashboardListsApi#updateDashboardListItems"); @@ -40,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/events/ListEvents.java b/examples/v2/events/ListEvents.java index 5d5a309c2c3..8025a5d2bd3 100644 --- a/examples/v2/events/ListEvents.java +++ b/examples/v2/events/ListEvents.java @@ -1,9 +1,15 @@ // Get a list of events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.EventsApi; import com.datadog.api.client.v2.model.EventsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/events/ListEvents_1527584014.java b/examples/v2/events/ListEvents_1527584014.java index dee26d29f85..6aa513a880d 100644 --- a/examples/v2/events/ListEvents_1527584014.java +++ b/examples/v2/events/ListEvents_1527584014.java @@ -1,10 +1,18 @@ // Get a list of events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.EventsApi; import com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters; +import com.datadog.api.client.v2.model.EventsListResponse; import com.datadog.api.client.v2.model.EventResponse; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,15 +21,10 @@ public static void main(String[] args) { EventsApi apiInstance = new EventsApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listEventsWithPagination( - new ListEventsOptionalParameters() - .filterFrom("now-15m") - .filterTo("now") - .pageLimit(2)); + PaginationIterable iterable = apiInstance.listEventsWithPagination(new ListEventsOptionalParameters().filterFrom("now-15m").filterTo("now").pageLimit(2)); for (EventResponse item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling EventsApi#listEventsWithPagination"); @@ -29,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/events/ListEvents_2663715109.java b/examples/v2/events/ListEvents_2663715109.java index 9373aef6faf..3bf459f8fef 100644 --- a/examples/v2/events/ListEvents_2663715109.java +++ b/examples/v2/events/ListEvents_2663715109.java @@ -1,10 +1,16 @@ // Get a quick list of events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.EventsApi; import com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters; import com.datadog.api.client.v2.model.EventsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,13 +19,7 @@ public static void main(String[] args) { EventsApi apiInstance = new EventsApi(defaultClient); try { - EventsListResponse result = - apiInstance.listEvents( - new ListEventsOptionalParameters() - .filterQuery("datadog-agent") - .filterFrom("2020-09-17T11:48:36+01:00") - .filterTo("2020-09-17T12:48:36+01:00") - .pageLimit(5)); + EventsListResponse result = apiInstance.listEvents(new ListEventsOptionalParameters().filterQuery("datadog-agent").filterFrom("2020-09-17T11:48:36+01:00").filterTo("2020-09-17T12:48:36+01:00").pageLimit(5)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling EventsApi#listEvents"); @@ -29,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/events/SearchEvents.java b/examples/v2/events/SearchEvents.java index f41714de194..83f5697ea89 100644 --- a/examples/v2/events/SearchEvents.java +++ b/examples/v2/events/SearchEvents.java @@ -1,14 +1,20 @@ // Search events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.EventsApi; import com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters; -import com.datadog.api.client.v2.model.EventsListRequest; import com.datadog.api.client.v2.model.EventsListResponse; +import com.datadog.api.client.v2.model.EventsListRequest; import com.datadog.api.client.v2.model.EventsQueryFilter; import com.datadog.api.client.v2.model.EventsRequestPage; import com.datadog.api.client.v2.model.EventsSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,19 +22,17 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.searchEvents", true); EventsApi apiInstance = new EventsApi(defaultClient); - EventsListRequest body = - new EventsListRequest() - .filter( - new EventsQueryFilter() - .query("datadog-agent") - .from("2020-09-17T11:48:36+01:00") - .to("2020-09-17T12:48:36+01:00")) - .sort(EventsSort.TIMESTAMP_ASCENDING) - .page(new EventsRequestPage().limit(5)); + EventsListRequest body = new EventsListRequest() +.filter(new EventsQueryFilter() +.query("datadog-agent") +.from("2020-09-17T11:48:36+01:00") +.to("2020-09-17T12:48:36+01:00")) +.sort(EventsSort.TIMESTAMP_ASCENDING) +.page(new EventsRequestPage() +.limit(5)); try { - EventsListResponse result = - apiInstance.searchEvents(new SearchEventsOptionalParameters().body(body)); + EventsListResponse result = apiInstance.searchEvents(new SearchEventsOptionalParameters().body(body)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling EventsApi#searchEvents"); @@ -38,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/events/SearchEvents_3856995058.java b/examples/v2/events/SearchEvents_3856995058.java index 526c7ebdbc7..e0fdda79940 100644 --- a/examples/v2/events/SearchEvents_3856995058.java +++ b/examples/v2/events/SearchEvents_3856995058.java @@ -1,15 +1,23 @@ // Search events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.EventsApi; import com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters; +import com.datadog.api.client.v2.model.EventsListResponse; import com.datadog.api.client.v2.model.EventResponse; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.EventsListRequest; import com.datadog.api.client.v2.model.EventsQueryFilter; import com.datadog.api.client.v2.model.EventsQueryOptions; import com.datadog.api.client.v2.model.EventsRequestPage; import com.datadog.api.client.v2.model.EventsSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,19 +25,21 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.searchEvents", true); EventsApi apiInstance = new EventsApi(defaultClient); - EventsListRequest body = - new EventsListRequest() - .filter(new EventsQueryFilter().from("now-15m").to("now")) - .options(new EventsQueryOptions().timezone("GMT")) - .page(new EventsRequestPage().limit(2)) - .sort(EventsSort.TIMESTAMP_ASCENDING); + EventsListRequest body = new EventsListRequest() +.filter(new EventsQueryFilter() +.from("now-15m") +.to("now")) +.options(new EventsQueryOptions() +.timezone("GMT")) +.page(new EventsRequestPage() +.limit(2)) +.sort(EventsSort.TIMESTAMP_ASCENDING); try { - PaginationIterable iterable = - apiInstance.searchEventsWithPagination(new SearchEventsOptionalParameters().body(body)); + PaginationIterable iterable = apiInstance.searchEventsWithPagination(new SearchEventsOptionalParameters().body(body)); for (EventResponse item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling EventsApi#searchEventsWithPagination"); @@ -37,4 +47,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/CreateFastlyAccount.java b/examples/v2/fastly-integration/CreateFastlyAccount.java index a2943ed6de3..ebbd39f5f01 100644 --- a/examples/v2/fastly-integration/CreateFastlyAccount.java +++ b/examples/v2/fastly-integration/CreateFastlyAccount.java @@ -1,28 +1,31 @@ // Add Fastly account returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; +import com.datadog.api.client.v2.model.FastlyAccountResponse; import com.datadog.api.client.v2.model.FastlyAccountCreateRequest; import com.datadog.api.client.v2.model.FastlyAccountCreateRequestAttributes; import com.datadog.api.client.v2.model.FastlyAccountCreateRequestData; -import com.datadog.api.client.v2.model.FastlyAccountResponse; import com.datadog.api.client.v2.model.FastlyAccountType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); FastlyIntegrationApi apiInstance = new FastlyIntegrationApi(defaultClient); - FastlyAccountCreateRequest body = - new FastlyAccountCreateRequest() - .data( - new FastlyAccountCreateRequestData() - .attributes( - new FastlyAccountCreateRequestAttributes() - .apiKey("ExampleAddFastlyaccountreturnsCREATEDresponse") - .name("Example-Add_Fastly_account_returns_CREATED_response")) - .type(FastlyAccountType.FASTLY_ACCOUNTS)); + FastlyAccountCreateRequest body = new FastlyAccountCreateRequest() +.data(new FastlyAccountCreateRequestData() +.attributes(new FastlyAccountCreateRequestAttributes() +.apiKey("ExampleAddFastlyaccountreturnsCREATEDresponse") +.name("Example-Add_Fastly_account_returns_CREATED_response")) +.type(FastlyAccountType.FASTLY_ACCOUNTS)); try { FastlyAccountResponse result = apiInstance.createFastlyAccount(body); @@ -35,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/CreateFastlyService.java b/examples/v2/fastly-integration/CreateFastlyService.java index b7b825251ef..81c700a30da 100644 --- a/examples/v2/fastly-integration/CreateFastlyService.java +++ b/examples/v2/fastly-integration/CreateFastlyService.java @@ -1,29 +1,31 @@ // Add Fastly service returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; +import com.datadog.api.client.v2.model.FastlyServiceResponse; import com.datadog.api.client.v2.model.FastlyServiceAttributes; import com.datadog.api.client.v2.model.FastlyServiceData; import com.datadog.api.client.v2.model.FastlyServiceRequest; -import com.datadog.api.client.v2.model.FastlyServiceResponse; import com.datadog.api.client.v2.model.FastlyServiceType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); FastlyIntegrationApi apiInstance = new FastlyIntegrationApi(defaultClient); - FastlyServiceRequest body = - new FastlyServiceRequest() - .data( - new FastlyServiceData() - .attributes( - new FastlyServiceAttributes() - .tags(Arrays.asList("myTag", "myTag2:myValue"))) - .id("abc123") - .type(FastlyServiceType.FASTLY_SERVICES)); + FastlyServiceRequest body = new FastlyServiceRequest() +.data(new FastlyServiceData() +.attributes(new FastlyServiceAttributes() +.tags(Arrays.asList("myTag", "myTag2:myValue"))) +.id("abc123") +.type(FastlyServiceType.FASTLY_SERVICES)); try { FastlyServiceResponse result = apiInstance.createFastlyService("account_id", body); @@ -36,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/DeleteFastlyAccount.java b/examples/v2/fastly-integration/DeleteFastlyAccount.java index 67bdf797de7..075b8b23e3b 100644 --- a/examples/v2/fastly-integration/DeleteFastlyAccount.java +++ b/examples/v2/fastly-integration/DeleteFastlyAccount.java @@ -1,8 +1,14 @@ // Delete Fastly account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/DeleteFastlyService.java b/examples/v2/fastly-integration/DeleteFastlyService.java index 299f24aa1b5..f716742b258 100644 --- a/examples/v2/fastly-integration/DeleteFastlyService.java +++ b/examples/v2/fastly-integration/DeleteFastlyService.java @@ -1,8 +1,14 @@ // Delete Fastly service returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/GetFastlyAccount.java b/examples/v2/fastly-integration/GetFastlyAccount.java index 0e430d94536..38cf0564139 100644 --- a/examples/v2/fastly-integration/GetFastlyAccount.java +++ b/examples/v2/fastly-integration/GetFastlyAccount.java @@ -1,9 +1,15 @@ // Get Fastly account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; import com.datadog.api.client.v2.model.FastlyAccountResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/GetFastlyService.java b/examples/v2/fastly-integration/GetFastlyService.java index 2cffa0a1ade..7429dfc0de3 100644 --- a/examples/v2/fastly-integration/GetFastlyService.java +++ b/examples/v2/fastly-integration/GetFastlyService.java @@ -1,9 +1,15 @@ // Get Fastly service returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; import com.datadog.api.client.v2.model.FastlyServiceResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/ListFastlyAccounts.java b/examples/v2/fastly-integration/ListFastlyAccounts.java index d36c1141c4a..36457707923 100644 --- a/examples/v2/fastly-integration/ListFastlyAccounts.java +++ b/examples/v2/fastly-integration/ListFastlyAccounts.java @@ -1,9 +1,15 @@ // List Fastly accounts returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; import com.datadog.api.client.v2.model.FastlyAccountsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/ListFastlyServices.java b/examples/v2/fastly-integration/ListFastlyServices.java index f2f12f64d3a..8c8ec0c02f9 100644 --- a/examples/v2/fastly-integration/ListFastlyServices.java +++ b/examples/v2/fastly-integration/ListFastlyServices.java @@ -1,9 +1,15 @@ // List Fastly services returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; import com.datadog.api.client.v2.model.FastlyServicesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/UpdateFastlyAccount.java b/examples/v2/fastly-integration/UpdateFastlyAccount.java index bd8b1e7aa8c..064a756129d 100644 --- a/examples/v2/fastly-integration/UpdateFastlyAccount.java +++ b/examples/v2/fastly-integration/UpdateFastlyAccount.java @@ -1,13 +1,19 @@ // Update Fastly account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; import com.datadog.api.client.v2.model.FastlyAccountResponse; import com.datadog.api.client.v2.model.FastlyAccountType; import com.datadog.api.client.v2.model.FastlyAccountUpdateRequest; import com.datadog.api.client.v2.model.FastlyAccountUpdateRequestAttributes; import com.datadog.api.client.v2.model.FastlyAccountUpdateRequestData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,12 +23,11 @@ public static void main(String[] args) { // there is a valid "fastly_account" in the system String FASTLY_ACCOUNT_DATA_ID = System.getenv("FASTLY_ACCOUNT_DATA_ID"); - FastlyAccountUpdateRequest body = - new FastlyAccountUpdateRequest() - .data( - new FastlyAccountUpdateRequestData() - .attributes(new FastlyAccountUpdateRequestAttributes().apiKey("update-secret")) - .type(FastlyAccountType.FASTLY_ACCOUNTS)); + FastlyAccountUpdateRequest body = new FastlyAccountUpdateRequest() +.data(new FastlyAccountUpdateRequestData() +.attributes(new FastlyAccountUpdateRequestAttributes() +.apiKey("update-secret")) +.type(FastlyAccountType.FASTLY_ACCOUNTS)); try { FastlyAccountResponse result = apiInstance.updateFastlyAccount(FASTLY_ACCOUNT_DATA_ID, body); @@ -35,4 +40,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/fastly-integration/UpdateFastlyService.java b/examples/v2/fastly-integration/UpdateFastlyService.java index 35652071344..e5f951a8aa3 100644 --- a/examples/v2/fastly-integration/UpdateFastlyService.java +++ b/examples/v2/fastly-integration/UpdateFastlyService.java @@ -1,33 +1,34 @@ // Update Fastly service returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.FastlyIntegrationApi; +import com.datadog.api.client.v2.model.FastlyServiceResponse; import com.datadog.api.client.v2.model.FastlyServiceAttributes; import com.datadog.api.client.v2.model.FastlyServiceData; import com.datadog.api.client.v2.model.FastlyServiceRequest; -import com.datadog.api.client.v2.model.FastlyServiceResponse; import com.datadog.api.client.v2.model.FastlyServiceType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); FastlyIntegrationApi apiInstance = new FastlyIntegrationApi(defaultClient); - FastlyServiceRequest body = - new FastlyServiceRequest() - .data( - new FastlyServiceData() - .attributes( - new FastlyServiceAttributes() - .tags(Arrays.asList("myTag", "myTag2:myValue"))) - .id("abc123") - .type(FastlyServiceType.FASTLY_SERVICES)); + FastlyServiceRequest body = new FastlyServiceRequest() +.data(new FastlyServiceData() +.attributes(new FastlyServiceAttributes() +.tags(Arrays.asList("myTag", "myTag2:myValue"))) +.id("abc123") +.type(FastlyServiceType.FASTLY_SERVICES)); try { - FastlyServiceResponse result = - apiInstance.updateFastlyService("account_id", "service_id", body); + FastlyServiceResponse result = apiInstance.updateFastlyService("account_id", "service_id", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FastlyIntegrationApi#updateFastlyService"); @@ -37,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-services/CreateIncidentService.java b/examples/v2/incident-services/CreateIncidentService.java index 531d92c9371..bedc5fffb36 100644 --- a/examples/v2/incident-services/CreateIncidentService.java +++ b/examples/v2/incident-services/CreateIncidentService.java @@ -1,13 +1,19 @@ // Create a new incident service returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentServicesApi; +import com.datadog.api.client.v2.model.IncidentServiceResponse; import com.datadog.api.client.v2.model.IncidentServiceCreateAttributes; import com.datadog.api.client.v2.model.IncidentServiceCreateData; import com.datadog.api.client.v2.model.IncidentServiceCreateRequest; -import com.datadog.api.client.v2.model.IncidentServiceResponse; import com.datadog.api.client.v2.model.IncidentServiceType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,15 +21,11 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.createIncidentService", true); IncidentServicesApi apiInstance = new IncidentServicesApi(defaultClient); - IncidentServiceCreateRequest body = - new IncidentServiceCreateRequest() - .data( - new IncidentServiceCreateData() - .type(IncidentServiceType.SERVICES) - .attributes( - new IncidentServiceCreateAttributes() - .name( - "Example-Create_a_new_incident_service_returns_CREATED_response"))); + IncidentServiceCreateRequest body = new IncidentServiceCreateRequest() +.data(new IncidentServiceCreateData() +.type(IncidentServiceType.SERVICES) +.attributes(new IncidentServiceCreateAttributes() +.name("Example-Create_a_new_incident_service_returns_CREATED_response"))); try { IncidentServiceResponse result = apiInstance.createIncidentService(body); @@ -36,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-services/DeleteIncidentService.java b/examples/v2/incident-services/DeleteIncidentService.java index 3d594329482..da3695c40a6 100644 --- a/examples/v2/incident-services/DeleteIncidentService.java +++ b/examples/v2/incident-services/DeleteIncidentService.java @@ -1,8 +1,14 @@ // Delete an existing incident service returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentServicesApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-services/GetIncidentService.java b/examples/v2/incident-services/GetIncidentService.java index 66ca3a15e6c..4193f9357a3 100644 --- a/examples/v2/incident-services/GetIncidentService.java +++ b/examples/v2/incident-services/GetIncidentService.java @@ -1,9 +1,15 @@ // Get details of an incident service returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentServicesApi; import com.datadog.api.client.v2.model.IncidentServiceResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-services/ListIncidentServices.java b/examples/v2/incident-services/ListIncidentServices.java index be92966f783..2ea3596cd10 100644 --- a/examples/v2/incident-services/ListIncidentServices.java +++ b/examples/v2/incident-services/ListIncidentServices.java @@ -1,10 +1,16 @@ // Get a list of all incident services returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentServicesApi; import com.datadog.api.client.v2.api.IncidentServicesApi.ListIncidentServicesOptionalParameters; import com.datadog.api.client.v2.model.IncidentServicesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,9 +22,7 @@ public static void main(String[] args) { String SERVICE_DATA_ATTRIBUTES_NAME = System.getenv("SERVICE_DATA_ATTRIBUTES_NAME"); try { - IncidentServicesResponse result = - apiInstance.listIncidentServices( - new ListIncidentServicesOptionalParameters().filter(SERVICE_DATA_ATTRIBUTES_NAME)); + IncidentServicesResponse result = apiInstance.listIncidentServices(new ListIncidentServicesOptionalParameters().filter(SERVICE_DATA_ATTRIBUTES_NAME)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IncidentServicesApi#listIncidentServices"); @@ -28,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-services/UpdateIncidentService.java b/examples/v2/incident-services/UpdateIncidentService.java index 50975c21f18..d88532407d8 100644 --- a/examples/v2/incident-services/UpdateIncidentService.java +++ b/examples/v2/incident-services/UpdateIncidentService.java @@ -1,13 +1,19 @@ // Update an existing incident service returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentServicesApi; import com.datadog.api.client.v2.model.IncidentServiceResponse; import com.datadog.api.client.v2.model.IncidentServiceType; import com.datadog.api.client.v2.model.IncidentServiceUpdateAttributes; import com.datadog.api.client.v2.model.IncidentServiceUpdateData; import com.datadog.api.client.v2.model.IncidentServiceUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,13 +25,11 @@ public static void main(String[] args) { String SERVICE_DATA_ATTRIBUTES_NAME = System.getenv("SERVICE_DATA_ATTRIBUTES_NAME"); String SERVICE_DATA_ID = System.getenv("SERVICE_DATA_ID"); - IncidentServiceUpdateRequest body = - new IncidentServiceUpdateRequest() - .data( - new IncidentServiceUpdateData() - .type(IncidentServiceType.SERVICES) - .attributes( - new IncidentServiceUpdateAttributes().name("service name-updated"))); + IncidentServiceUpdateRequest body = new IncidentServiceUpdateRequest() +.data(new IncidentServiceUpdateData() +.type(IncidentServiceType.SERVICES) +.attributes(new IncidentServiceUpdateAttributes() +.name("service name-updated"))); try { IncidentServiceResponse result = apiInstance.updateIncidentService(SERVICE_DATA_ID, body); @@ -38,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-teams/CreateIncidentTeam.java b/examples/v2/incident-teams/CreateIncidentTeam.java index 02a29a3c4b5..8724ab3f08a 100644 --- a/examples/v2/incident-teams/CreateIncidentTeam.java +++ b/examples/v2/incident-teams/CreateIncidentTeam.java @@ -1,13 +1,19 @@ // Create a new incident team returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentTeamsApi; +import com.datadog.api.client.v2.model.IncidentTeamResponse; import com.datadog.api.client.v2.model.IncidentTeamCreateAttributes; import com.datadog.api.client.v2.model.IncidentTeamCreateData; import com.datadog.api.client.v2.model.IncidentTeamCreateRequest; -import com.datadog.api.client.v2.model.IncidentTeamResponse; import com.datadog.api.client.v2.model.IncidentTeamType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,14 +21,11 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.createIncidentTeam", true); IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient); - IncidentTeamCreateRequest body = - new IncidentTeamCreateRequest() - .data( - new IncidentTeamCreateData() - .type(IncidentTeamType.TEAMS) - .attributes( - new IncidentTeamCreateAttributes() - .name("Example-Create_a_new_incident_team_returns_CREATED_response"))); + IncidentTeamCreateRequest body = new IncidentTeamCreateRequest() +.data(new IncidentTeamCreateData() +.type(IncidentTeamType.TEAMS) +.attributes(new IncidentTeamCreateAttributes() +.name("Example-Create_a_new_incident_team_returns_CREATED_response"))); try { IncidentTeamResponse result = apiInstance.createIncidentTeam(body); @@ -35,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-teams/DeleteIncidentTeam.java b/examples/v2/incident-teams/DeleteIncidentTeam.java index 980da07a03a..30f5021ad33 100644 --- a/examples/v2/incident-teams/DeleteIncidentTeam.java +++ b/examples/v2/incident-teams/DeleteIncidentTeam.java @@ -1,8 +1,14 @@ // Delete an existing incident team returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentTeamsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-teams/GetIncidentTeam.java b/examples/v2/incident-teams/GetIncidentTeam.java index 65a44254d38..613cf655c05 100644 --- a/examples/v2/incident-teams/GetIncidentTeam.java +++ b/examples/v2/incident-teams/GetIncidentTeam.java @@ -1,9 +1,15 @@ // Get details of an incident team returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentTeamsApi; import com.datadog.api.client.v2.model.IncidentTeamResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-teams/ListIncidentTeams.java b/examples/v2/incident-teams/ListIncidentTeams.java index 5413ad8be61..11cde47e9ed 100644 --- a/examples/v2/incident-teams/ListIncidentTeams.java +++ b/examples/v2/incident-teams/ListIncidentTeams.java @@ -1,10 +1,16 @@ // Get a list of all incident teams returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentTeamsApi; import com.datadog.api.client.v2.api.IncidentTeamsApi.ListIncidentTeamsOptionalParameters; import com.datadog.api.client.v2.model.IncidentTeamsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,9 +22,7 @@ public static void main(String[] args) { String TEAM_DATA_ATTRIBUTES_NAME = System.getenv("TEAM_DATA_ATTRIBUTES_NAME"); try { - IncidentTeamsResponse result = - apiInstance.listIncidentTeams( - new ListIncidentTeamsOptionalParameters().filter(TEAM_DATA_ATTRIBUTES_NAME)); + IncidentTeamsResponse result = apiInstance.listIncidentTeams(new ListIncidentTeamsOptionalParameters().filter(TEAM_DATA_ATTRIBUTES_NAME)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IncidentTeamsApi#listIncidentTeams"); @@ -28,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incident-teams/UpdateIncidentTeam.java b/examples/v2/incident-teams/UpdateIncidentTeam.java index 6ea1210f0f4..a201f94e586 100644 --- a/examples/v2/incident-teams/UpdateIncidentTeam.java +++ b/examples/v2/incident-teams/UpdateIncidentTeam.java @@ -1,13 +1,19 @@ // Update an existing incident team returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentTeamsApi; import com.datadog.api.client.v2.model.IncidentTeamResponse; import com.datadog.api.client.v2.model.IncidentTeamType; import com.datadog.api.client.v2.model.IncidentTeamUpdateAttributes; import com.datadog.api.client.v2.model.IncidentTeamUpdateData; import com.datadog.api.client.v2.model.IncidentTeamUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,12 +25,11 @@ public static void main(String[] args) { String TEAM_DATA_ATTRIBUTES_NAME = System.getenv("TEAM_DATA_ATTRIBUTES_NAME"); String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID"); - IncidentTeamUpdateRequest body = - new IncidentTeamUpdateRequest() - .data( - new IncidentTeamUpdateData() - .type(IncidentTeamType.TEAMS) - .attributes(new IncidentTeamUpdateAttributes().name("team name-updated"))); + IncidentTeamUpdateRequest body = new IncidentTeamUpdateRequest() +.data(new IncidentTeamUpdateData() +.type(IncidentTeamType.TEAMS) +.attributes(new IncidentTeamUpdateAttributes() +.name("team name-updated"))); try { IncidentTeamResponse result = apiInstance.updateIncidentTeam(TEAM_DATA_ID, body); @@ -37,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/CreateIncident.java b/examples/v2/incidents/CreateIncident.java index f90a2f6c33d..b022428228a 100644 --- a/examples/v2/incidents/CreateIncident.java +++ b/examples/v2/incidents/CreateIncident.java @@ -1,8 +1,9 @@ // Create an incident returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentCreateAttributes; import com.datadog.api.client.v2.model.IncidentCreateData; import com.datadog.api.client.v2.model.IncidentCreateRelationships; @@ -10,11 +11,15 @@ import com.datadog.api.client.v2.model.IncidentFieldAttributes; import com.datadog.api.client.v2.model.IncidentFieldAttributesSingleValue; import com.datadog.api.client.v2.model.IncidentFieldAttributesSingleValueType; -import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentType; import com.datadog.api.client.v2.model.NullableRelationshipToUser; import com.datadog.api.client.v2.model.NullableRelationshipToUserData; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -26,32 +31,21 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ID = System.getenv("USER_DATA_ID"); - IncidentCreateRequest body = - new IncidentCreateRequest() - .data( - new IncidentCreateData() - .type(IncidentType.INCIDENTS) - .attributes( - new IncidentCreateAttributes() - .title("Example-Create_an_incident_returns_CREATED_response") - .customerImpacted(false) - .fields( - Map.ofEntries( - Map.entry( - "state", - new IncidentFieldAttributes( - new IncidentFieldAttributesSingleValue() - .type( - IncidentFieldAttributesSingleValueType.DROPDOWN) - .value("resolved")))))) - .relationships( - new IncidentCreateRelationships() - .commanderUser( - new NullableRelationshipToUser() - .data( - new NullableRelationshipToUserData() - .type(UsersType.USERS) - .id(USER_DATA_ID))))); + IncidentCreateRequest body = new IncidentCreateRequest() +.data(new IncidentCreateData() +.type(IncidentType.INCIDENTS) +.attributes(new IncidentCreateAttributes() +.title("Example-Create_an_incident_returns_CREATED_response") +.customerImpacted(false) +.fields(Map.ofEntries(Map.entry("state", new IncidentFieldAttributes( +new IncidentFieldAttributesSingleValue() +.type(IncidentFieldAttributesSingleValueType.DROPDOWN) +.value("resolved")))))) +.relationships(new IncidentCreateRelationships() +.commanderUser(new NullableRelationshipToUser() +.data(new NullableRelationshipToUserData() +.type(UsersType.USERS) +.id(USER_DATA_ID))))); try { IncidentResponse result = apiInstance.createIncident(body); @@ -64,4 +58,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/CreateIncidentIntegration.java b/examples/v2/incidents/CreateIncidentIntegration.java new file mode 100644 index 00000000000..441cb0a185f --- /dev/null +++ b/examples/v2/incidents/CreateIncidentIntegration.java @@ -0,0 +1,49 @@ +// Create an incident integration metadata returns "CREATED" response + +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataResponse; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataAttributes; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataCreateData; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataCreateRequest; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataMetadata; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataType; +import com.datadog.api.client.v2.model.SlackIntegrationMetadata; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createIncidentIntegration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + // there is a valid "incident" in the system + String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID"); + + IncidentIntegrationMetadataCreateRequest body = new IncidentIntegrationMetadataCreateRequest() +.data(new IncidentIntegrationMetadataCreateData() +.attributes(new IncidentIntegrationMetadataAttributes() +.incidentId("00000000-aaaa-0000-0000-000000000000") +.integrationType(1) +.metadata(new IncidentIntegrationMetadataMetadata( +new SlackIntegrationMetadata()))) +.type(IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS)); + + try { + IncidentIntegrationMetadataResponse result = apiInstance.createIncidentIntegration(INCIDENT_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#createIncidentIntegration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/examples/v2/incidents/DeleteIncident.java b/examples/v2/incidents/DeleteIncident.java index 74ca8f2920d..8663ce830da 100644 --- a/examples/v2/incidents/DeleteIncident.java +++ b/examples/v2/incidents/DeleteIncident.java @@ -1,8 +1,14 @@ // Delete an existing incident returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/DeleteIncidentIntegration.java b/examples/v2/incidents/DeleteIncidentIntegration.java new file mode 100644 index 00000000000..52b6c074172 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentIntegration.java @@ -0,0 +1,35 @@ +// Delete an incident integration metadata returns "OK" response + +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.v2.api.IncidentsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteIncidentIntegration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + // there is a valid "incident" in the system + String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID"); + + // the "incident" has an "incident_integration_metadata" + String INCIDENT_INTEGRATION_METADATA_DATA_ID = System.getenv("INCIDENT_INTEGRATION_METADATA_DATA_ID"); + + try { + apiInstance.deleteIncidentIntegration(INCIDENT_DATA_ID, INCIDENT_INTEGRATION_METADATA_DATA_ID); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#deleteIncidentIntegration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/examples/v2/incidents/GetIncident.java b/examples/v2/incidents/GetIncident.java index 650afa03bbc..a3820ba3068 100644 --- a/examples/v2/incidents/GetIncident.java +++ b/examples/v2/incidents/GetIncident.java @@ -1,9 +1,15 @@ // Get the details of an incident returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/GetIncidentIntegration.java b/examples/v2/incidents/GetIncidentIntegration.java new file mode 100644 index 00000000000..65f8376c07b --- /dev/null +++ b/examples/v2/incidents/GetIncidentIntegration.java @@ -0,0 +1,37 @@ +// Get incident integration metadata details returns "OK" response + +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getIncidentIntegration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + // there is a valid "incident" in the system + String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID"); + + // the "incident" has an "incident_integration_metadata" + String INCIDENT_INTEGRATION_METADATA_DATA_ID = System.getenv("INCIDENT_INTEGRATION_METADATA_DATA_ID"); + + try { + IncidentIntegrationMetadataResponse result = apiInstance.getIncidentIntegration(INCIDENT_DATA_ID, INCIDENT_INTEGRATION_METADATA_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#getIncidentIntegration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/examples/v2/incidents/ListIncidentAttachments.java b/examples/v2/incidents/ListIncidentAttachments.java index 195a15c3024..98061b4a7a0 100644 --- a/examples/v2/incidents/ListIncidentAttachments.java +++ b/examples/v2/incidents/ListIncidentAttachments.java @@ -1,9 +1,15 @@ // Get a list of attachments returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentAttachmentsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/ListIncidentAttachments_2457735435.java b/examples/v2/incidents/ListIncidentAttachments_2457735435.java index 0d1243ff539..b4535013bd0 100644 --- a/examples/v2/incidents/ListIncidentAttachments_2457735435.java +++ b/examples/v2/incidents/ListIncidentAttachments_2457735435.java @@ -1,9 +1,15 @@ // Get incident attachments returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentAttachmentsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/ListIncidentIntegrations.java b/examples/v2/incidents/ListIncidentIntegrations.java new file mode 100644 index 00000000000..7beb872d5d7 --- /dev/null +++ b/examples/v2/incidents/ListIncidentIntegrations.java @@ -0,0 +1,31 @@ +// Get a list of an incident's integration metadata returns "OK" response + +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listIncidentIntegrations", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + try { + IncidentIntegrationMetadataListResponse result = apiInstance.listIncidentIntegrations("incident_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#listIncidentIntegrations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/examples/v2/incidents/ListIncidents.java b/examples/v2/incidents/ListIncidents.java index 5da28e4662c..709979b6535 100644 --- a/examples/v2/incidents/ListIncidents.java +++ b/examples/v2/incidents/ListIncidents.java @@ -1,9 +1,15 @@ // Get a list of incidents returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/ListIncidents_2665616954.java b/examples/v2/incidents/ListIncidents_2665616954.java index 45a2ab0ce1a..785af99e2e3 100644 --- a/examples/v2/incidents/ListIncidents_2665616954.java +++ b/examples/v2/incidents/ListIncidents_2665616954.java @@ -1,10 +1,18 @@ // Get a list of incidents returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.api.IncidentsApi.ListIncidentsOptionalParameters; +import com.datadog.api.client.v2.model.IncidentsResponse; import com.datadog.api.client.v2.model.IncidentResponseData; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,12 +21,10 @@ public static void main(String[] args) { IncidentsApi apiInstance = new IncidentsApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listIncidentsWithPagination( - new ListIncidentsOptionalParameters().pageSize(2L)); + PaginationIterable iterable = apiInstance.listIncidentsWithPagination(new ListIncidentsOptionalParameters().pageSize(2L)); for (IncidentResponseData item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling IncidentsApi#listIncidentsWithPagination"); @@ -26,4 +32,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/SearchIncidents.java b/examples/v2/incidents/SearchIncidents.java index 2638c73ef12..515098c9926 100644 --- a/examples/v2/incidents/SearchIncidents.java +++ b/examples/v2/incidents/SearchIncidents.java @@ -1,9 +1,15 @@ // Search for incidents returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentSearchResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,8 +18,7 @@ public static void main(String[] args) { IncidentsApi apiInstance = new IncidentsApi(defaultClient); try { - IncidentSearchResponse result = - apiInstance.searchIncidents("state:(active OR stable OR resolved)"); + IncidentSearchResponse result = apiInstance.searchIncidents("state:(active OR stable OR resolved)"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IncidentsApi#searchIncidents"); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/UpdateIncident.java b/examples/v2/incidents/UpdateIncident.java index 29753f2f03a..7fb581794fe 100644 --- a/examples/v2/incidents/UpdateIncident.java +++ b/examples/v2/incidents/UpdateIncident.java @@ -1,16 +1,21 @@ // Update an existing incident returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentFieldAttributes; import com.datadog.api.client.v2.model.IncidentFieldAttributesSingleValue; import com.datadog.api.client.v2.model.IncidentFieldAttributesSingleValueType; -import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentType; import com.datadog.api.client.v2.model.IncidentUpdateAttributes; import com.datadog.api.client.v2.model.IncidentUpdateData; import com.datadog.api.client.v2.model.IncidentUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -23,24 +28,16 @@ public static void main(String[] args) { String INCIDENT_DATA_ATTRIBUTES_TITLE = System.getenv("INCIDENT_DATA_ATTRIBUTES_TITLE"); String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID"); - IncidentUpdateRequest body = - new IncidentUpdateRequest() - .data( - new IncidentUpdateData() - .id(INCIDENT_DATA_ID) - .type(IncidentType.INCIDENTS) - .attributes( - new IncidentUpdateAttributes() - .fields( - Map.ofEntries( - Map.entry( - "state", - new IncidentFieldAttributes( - new IncidentFieldAttributesSingleValue() - .type( - IncidentFieldAttributesSingleValueType.DROPDOWN) - .value("resolved"))))) - .title("A test incident title-updated"))); + IncidentUpdateRequest body = new IncidentUpdateRequest() +.data(new IncidentUpdateData() +.id(INCIDENT_DATA_ID) +.type(IncidentType.INCIDENTS) +.attributes(new IncidentUpdateAttributes() +.fields(Map.ofEntries(Map.entry("state", new IncidentFieldAttributes( +new IncidentFieldAttributesSingleValue() +.type(IncidentFieldAttributesSingleValueType.DROPDOWN) +.value("resolved"))))) +.title("A test incident title-updated"))); try { IncidentResponse result = apiInstance.updateIncident(INCIDENT_DATA_ID, body); @@ -53,4 +50,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/UpdateIncidentAttachments.java b/examples/v2/incidents/UpdateIncidentAttachments.java index 4705ca08f6c..ee6384892dc 100644 --- a/examples/v2/incidents/UpdateIncidentAttachments.java +++ b/examples/v2/incidents/UpdateIncidentAttachments.java @@ -1,20 +1,25 @@ // Create, update, and delete incident attachments returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentAttachmentUpdateResponse; import com.datadog.api.client.v2.model.IncidentAttachmentLinkAttachmentType; import com.datadog.api.client.v2.model.IncidentAttachmentLinkAttributes; import com.datadog.api.client.v2.model.IncidentAttachmentLinkAttributesAttachmentObject; import com.datadog.api.client.v2.model.IncidentAttachmentPostmortemAttachmentType; import com.datadog.api.client.v2.model.IncidentAttachmentPostmortemAttributes; +import com.datadog.api.client.v2.model.IncidentAttachmentsPostmortemAttributesAttachmentObject; import com.datadog.api.client.v2.model.IncidentAttachmentType; import com.datadog.api.client.v2.model.IncidentAttachmentUpdateAttributes; import com.datadog.api.client.v2.model.IncidentAttachmentUpdateData; import com.datadog.api.client.v2.model.IncidentAttachmentUpdateRequest; -import com.datadog.api.client.v2.model.IncidentAttachmentUpdateResponse; -import com.datadog.api.client.v2.model.IncidentAttachmentsPostmortemAttributesAttachmentObject; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,40 +27,28 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.updateIncidentAttachments", true); IncidentsApi apiInstance = new IncidentsApi(defaultClient); - IncidentAttachmentUpdateRequest body = - new IncidentAttachmentUpdateRequest() - .data( - Arrays.asList( - new IncidentAttachmentUpdateData() - .attributes( - new IncidentAttachmentUpdateAttributes( - new IncidentAttachmentPostmortemAttributes() - .attachment( - new IncidentAttachmentsPostmortemAttributesAttachmentObject() - .documentUrl("https://app.datadoghq.com/notebook/123") - .title("Postmortem IR-123")) - .attachmentType( - IncidentAttachmentPostmortemAttachmentType.POSTMORTEM))) - .id("00000000-abcd-0002-0000-000000000000") - .type(IncidentAttachmentType.INCIDENT_ATTACHMENTS), - new IncidentAttachmentUpdateData() - .attributes( - new IncidentAttachmentUpdateAttributes( - new IncidentAttachmentLinkAttributes() - .attachment( - new IncidentAttachmentLinkAttributesAttachmentObject() - .documentUrl( - "https://www.example.com/webstore-failure-runbook") - .title("Runbook for webstore service failures")) - .attachmentType(IncidentAttachmentLinkAttachmentType.LINK))) - .type(IncidentAttachmentType.INCIDENT_ATTACHMENTS), - new IncidentAttachmentUpdateData() - .id("00000000-abcd-0003-0000-000000000000") - .type(IncidentAttachmentType.INCIDENT_ATTACHMENTS))); + IncidentAttachmentUpdateRequest body = new IncidentAttachmentUpdateRequest() +.data(Arrays.asList(new IncidentAttachmentUpdateData() +.attributes(new IncidentAttachmentUpdateAttributes( +new IncidentAttachmentPostmortemAttributes() +.attachment(new IncidentAttachmentsPostmortemAttributesAttachmentObject() +.documentUrl("https://app.datadoghq.com/notebook/123") +.title("Postmortem IR-123")) +.attachmentType(IncidentAttachmentPostmortemAttachmentType.POSTMORTEM))) +.id("00000000-abcd-0002-0000-000000000000") +.type(IncidentAttachmentType.INCIDENT_ATTACHMENTS), new IncidentAttachmentUpdateData() +.attributes(new IncidentAttachmentUpdateAttributes( +new IncidentAttachmentLinkAttributes() +.attachment(new IncidentAttachmentLinkAttributesAttachmentObject() +.documentUrl("https://www.example.com/webstore-failure-runbook") +.title("Runbook for webstore service failures")) +.attachmentType(IncidentAttachmentLinkAttachmentType.LINK))) +.type(IncidentAttachmentType.INCIDENT_ATTACHMENTS), new IncidentAttachmentUpdateData() +.id("00000000-abcd-0003-0000-000000000000") +.type(IncidentAttachmentType.INCIDENT_ATTACHMENTS))); try { - IncidentAttachmentUpdateResponse result = - apiInstance.updateIncidentAttachments("incident_id", body); + IncidentAttachmentUpdateResponse result = apiInstance.updateIncidentAttachments("incident_id", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IncidentsApi#updateIncidentAttachments"); @@ -65,4 +58,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/UpdateIncidentAttachments_3881702075.java b/examples/v2/incidents/UpdateIncidentAttachments_3881702075.java index 6b757974cfe..f2c98d5244a 100644 --- a/examples/v2/incidents/UpdateIncidentAttachments_3881702075.java +++ b/examples/v2/incidents/UpdateIncidentAttachments_3881702075.java @@ -1,8 +1,9 @@ // Create an incident attachment returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentAttachmentUpdateResponse; import com.datadog.api.client.v2.model.IncidentAttachmentLinkAttachmentType; import com.datadog.api.client.v2.model.IncidentAttachmentLinkAttributes; import com.datadog.api.client.v2.model.IncidentAttachmentLinkAttributesAttachmentObject; @@ -10,8 +11,12 @@ import com.datadog.api.client.v2.model.IncidentAttachmentUpdateAttributes; import com.datadog.api.client.v2.model.IncidentAttachmentUpdateData; import com.datadog.api.client.v2.model.IncidentAttachmentUpdateRequest; -import com.datadog.api.client.v2.model.IncidentAttachmentUpdateResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,25 +27,18 @@ public static void main(String[] args) { // there is a valid "incident" in the system String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID"); - IncidentAttachmentUpdateRequest body = - new IncidentAttachmentUpdateRequest() - .data( - Collections.singletonList( - new IncidentAttachmentUpdateData() - .type(IncidentAttachmentType.INCIDENT_ATTACHMENTS) - .attributes( - new IncidentAttachmentUpdateAttributes( - new IncidentAttachmentLinkAttributes() - .attachmentType(IncidentAttachmentLinkAttachmentType.LINK) - .attachment( - new IncidentAttachmentLinkAttributesAttachmentObject() - .documentUrl("https://www.example.com/doc") - .title( - "Example-Create_an_incident_attachment_returns_OK_response")))))); + IncidentAttachmentUpdateRequest body = new IncidentAttachmentUpdateRequest() +.data(Collections.singletonList(new IncidentAttachmentUpdateData() +.type(IncidentAttachmentType.INCIDENT_ATTACHMENTS) +.attributes(new IncidentAttachmentUpdateAttributes( +new IncidentAttachmentLinkAttributes() +.attachmentType(IncidentAttachmentLinkAttachmentType.LINK) +.attachment(new IncidentAttachmentLinkAttributesAttachmentObject() +.documentUrl("https://www.example.com/doc") +.title("Example-Create_an_incident_attachment_returns_OK_response")))))); try { - IncidentAttachmentUpdateResponse result = - apiInstance.updateIncidentAttachments(INCIDENT_DATA_ID, body); + IncidentAttachmentUpdateResponse result = apiInstance.updateIncidentAttachments(INCIDENT_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IncidentsApi#updateIncidentAttachments"); @@ -50,4 +48,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/UpdateIncidentIntegration.java b/examples/v2/incidents/UpdateIncidentIntegration.java new file mode 100644 index 00000000000..1e3f0f80253 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentIntegration.java @@ -0,0 +1,46 @@ +// Update an existing incident integration metadata returns "CREATED" response + +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.v2.api.IncidentsApi; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataResponse; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataAttributes; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataMetadata; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataPatchData; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataPatchRequest; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataType; +import com.datadog.api.client.v2.model.SlackIntegrationMetadata; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateIncidentIntegration", true); + IncidentsApi apiInstance = new IncidentsApi(defaultClient); + + IncidentIntegrationMetadataPatchRequest body = new IncidentIntegrationMetadataPatchRequest() +.data(new IncidentIntegrationMetadataPatchData() +.attributes(new IncidentIntegrationMetadataAttributes() +.incidentId("00000000-aaaa-0000-0000-000000000000") +.integrationType(1) +.metadata(new IncidentIntegrationMetadataMetadata( +new SlackIntegrationMetadata()))) +.type(IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS)); + + try { + IncidentIntegrationMetadataResponse result = apiInstance.updateIncidentIntegration("incident_id", "integration_metadata_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IncidentsApi#updateIncidentIntegration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/examples/v2/incidents/UpdateIncident_1009194038.java b/examples/v2/incidents/UpdateIncident_1009194038.java index c7175f57e46..947d2df2b8e 100644 --- a/examples/v2/incidents/UpdateIncident_1009194038.java +++ b/examples/v2/incidents/UpdateIncident_1009194038.java @@ -1,7 +1,7 @@ // Remove commander from an incident returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentType; @@ -9,6 +9,13 @@ import com.datadog.api.client.v2.model.IncidentUpdateRelationships; import com.datadog.api.client.v2.model.IncidentUpdateRequest; import com.datadog.api.client.v2.model.NullableRelationshipToUser; +import com.datadog.api.client.v2.model.NullableRelationshipToUserData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,15 +26,13 @@ public static void main(String[] args) { // there is a valid "incident" in the system String INCIDENT_DATA_ID = System.getenv("INCIDENT_DATA_ID"); - IncidentUpdateRequest body = - new IncidentUpdateRequest() - .data( - new IncidentUpdateData() - .id(INCIDENT_DATA_ID) - .type(IncidentType.INCIDENTS) - .relationships( - new IncidentUpdateRelationships() - .commanderUser(new NullableRelationshipToUser().data(null)))); + IncidentUpdateRequest body = new IncidentUpdateRequest() +.data(new IncidentUpdateData() +.id(INCIDENT_DATA_ID) +.type(IncidentType.INCIDENTS) +.relationships(new IncidentUpdateRelationships() +.commanderUser(new NullableRelationshipToUser() +.data(null)))); try { IncidentResponse result = apiInstance.updateIncident(INCIDENT_DATA_ID, body); @@ -40,4 +45,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/incidents/UpdateIncident_3369341440.java b/examples/v2/incidents/UpdateIncident_3369341440.java index 72d389aecf8..32bb306e713 100644 --- a/examples/v2/incidents/UpdateIncident_3369341440.java +++ b/examples/v2/incidents/UpdateIncident_3369341440.java @@ -1,7 +1,7 @@ // Add commander to an incident returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IncidentsApi; import com.datadog.api.client.v2.model.IncidentResponse; import com.datadog.api.client.v2.model.IncidentType; @@ -11,6 +11,12 @@ import com.datadog.api.client.v2.model.NullableRelationshipToUser; import com.datadog.api.client.v2.model.NullableRelationshipToUserData; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,20 +30,15 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ID = System.getenv("USER_DATA_ID"); - IncidentUpdateRequest body = - new IncidentUpdateRequest() - .data( - new IncidentUpdateData() - .id(INCIDENT_DATA_ID) - .type(IncidentType.INCIDENTS) - .relationships( - new IncidentUpdateRelationships() - .commanderUser( - new NullableRelationshipToUser() - .data( - new NullableRelationshipToUserData() - .id(USER_DATA_ID) - .type(UsersType.USERS))))); + IncidentUpdateRequest body = new IncidentUpdateRequest() +.data(new IncidentUpdateData() +.id(INCIDENT_DATA_ID) +.type(IncidentType.INCIDENTS) +.relationships(new IncidentUpdateRelationships() +.commanderUser(new NullableRelationshipToUser() +.data(new NullableRelationshipToUserData() +.id(USER_DATA_ID) +.type(UsersType.USERS))))); try { IncidentResponse result = apiInstance.updateIncident(INCIDENT_DATA_ID, body); @@ -50,4 +51,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ip-allowlist/GetIPAllowlist.java b/examples/v2/ip-allowlist/GetIPAllowlist.java index 6da0613942c..f2d0cba6c7b 100644 --- a/examples/v2/ip-allowlist/GetIPAllowlist.java +++ b/examples/v2/ip-allowlist/GetIPAllowlist.java @@ -1,9 +1,15 @@ // Get IP Allowlist returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IpAllowlistApi; import com.datadog.api.client.v2.model.IPAllowlistResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/ip-allowlist/UpdateIPAllowlist.java b/examples/v2/ip-allowlist/UpdateIPAllowlist.java index d7e85a074cf..4d0c81e5634 100644 --- a/examples/v2/ip-allowlist/UpdateIPAllowlist.java +++ b/examples/v2/ip-allowlist/UpdateIPAllowlist.java @@ -1,43 +1,40 @@ // Update IP Allowlist returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.IpAllowlistApi; +import com.datadog.api.client.v2.model.IPAllowlistResponse; import com.datadog.api.client.v2.model.IPAllowlistAttributes; import com.datadog.api.client.v2.model.IPAllowlistData; import com.datadog.api.client.v2.model.IPAllowlistEntry; import com.datadog.api.client.v2.model.IPAllowlistEntryAttributes; import com.datadog.api.client.v2.model.IPAllowlistEntryData; import com.datadog.api.client.v2.model.IPAllowlistEntryType; -import com.datadog.api.client.v2.model.IPAllowlistResponse; import com.datadog.api.client.v2.model.IPAllowlistType; import com.datadog.api.client.v2.model.IPAllowlistUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); IpAllowlistApi apiInstance = new IpAllowlistApi(defaultClient); - IPAllowlistUpdateRequest body = - new IPAllowlistUpdateRequest() - .data( - new IPAllowlistData() - .attributes( - new IPAllowlistAttributes() - .entries( - Collections.singletonList( - new IPAllowlistEntry() - .data( - new IPAllowlistEntryData() - .attributes( - new IPAllowlistEntryAttributes() - .note( - "Example-Update_IP_Allowlist_returns_OK_response") - .cidrBlock("127.0.0.1")) - .type(IPAllowlistEntryType.IP_ALLOWLIST_ENTRY)))) - .enabled(false)) - .type(IPAllowlistType.IP_ALLOWLIST)); + IPAllowlistUpdateRequest body = new IPAllowlistUpdateRequest() +.data(new IPAllowlistData() +.attributes(new IPAllowlistAttributes() +.entries(Collections.singletonList(new IPAllowlistEntry() +.data(new IPAllowlistEntryData() +.attributes(new IPAllowlistEntryAttributes() +.note("Example-Update_IP_Allowlist_returns_OK_response") +.cidrBlock("127.0.0.1")) +.type(IPAllowlistEntryType.IP_ALLOWLIST_ENTRY)))) +.enabled(false)) +.type(IPAllowlistType.IP_ALLOWLIST)); try { IPAllowlistResponse result = apiInstance.updateIPAllowlist(body); @@ -50,4 +47,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/CreateAPIKey.java b/examples/v2/key-management/CreateAPIKey.java index 4bfa4c20146..048274504f0 100644 --- a/examples/v2/key-management/CreateAPIKey.java +++ b/examples/v2/key-management/CreateAPIKey.java @@ -1,27 +1,30 @@ // Create an API key returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.APIKeyResponse; import com.datadog.api.client.v2.model.APIKeyCreateAttributes; import com.datadog.api.client.v2.model.APIKeyCreateData; import com.datadog.api.client.v2.model.APIKeyCreateRequest; -import com.datadog.api.client.v2.model.APIKeyResponse; import com.datadog.api.client.v2.model.APIKeysType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - APIKeyCreateRequest body = - new APIKeyCreateRequest() - .data( - new APIKeyCreateData() - .type(APIKeysType.API_KEYS) - .attributes( - new APIKeyCreateAttributes() - .name("Example-Create_an_API_key_returns_Created_response"))); + APIKeyCreateRequest body = new APIKeyCreateRequest() +.data(new APIKeyCreateData() +.type(APIKeysType.API_KEYS) +.attributes(new APIKeyCreateAttributes() +.name("Example-Create_an_API_key_returns_Created_response"))); try { APIKeyResponse result = apiInstance.createAPIKey(body); @@ -34,4 +37,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/CreateCurrentUserApplicationKey.java b/examples/v2/key-management/CreateCurrentUserApplicationKey.java index 149a034d2ce..229a3e85bd4 100644 --- a/examples/v2/key-management/CreateCurrentUserApplicationKey.java +++ b/examples/v2/key-management/CreateCurrentUserApplicationKey.java @@ -1,33 +1,31 @@ // Create an application key for current user returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeyCreateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyCreateData; import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApplicationKeyCreateRequest body = - new ApplicationKeyCreateRequest() - .data( - new ApplicationKeyCreateData() - .attributes( - new ApplicationKeyCreateAttributes() - .name("Application Key for managing dashboards") - .scopes( - Arrays.asList( - "dashboards_read", - "dashboards_write", - "dashboards_public_share"))) - .type(ApplicationKeysType.APPLICATION_KEYS)); + ApplicationKeyCreateRequest body = new ApplicationKeyCreateRequest() +.data(new ApplicationKeyCreateData() +.attributes(new ApplicationKeyCreateAttributes() +.name("Application Key for managing dashboards") +.scopes(Arrays.asList("dashboards_read", "dashboards_write", "dashboards_public_share"))) +.type(ApplicationKeysType.APPLICATION_KEYS)); try { ApplicationKeyResponse result = apiInstance.createCurrentUserApplicationKey(body); @@ -40,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.java b/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.java index 07a0fbffc25..34b14ba1d0f 100644 --- a/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.java +++ b/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.java @@ -1,28 +1,30 @@ // Create an Application key for current user returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeyCreateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyCreateData; import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApplicationKeyCreateRequest body = - new ApplicationKeyCreateRequest() - .data( - new ApplicationKeyCreateData() - .type(ApplicationKeysType.APPLICATION_KEYS) - .attributes( - new ApplicationKeyCreateAttributes() - .name( - "Example-Create_an_Application_key_for_current_user_returns_Created_response"))); + ApplicationKeyCreateRequest body = new ApplicationKeyCreateRequest() +.data(new ApplicationKeyCreateData() +.type(ApplicationKeysType.APPLICATION_KEYS) +.attributes(new ApplicationKeyCreateAttributes() +.name("Example-Create_an_Application_key_for_current_user_returns_Created_response"))); try { ApplicationKeyResponse result = apiInstance.createCurrentUserApplicationKey(body); @@ -35,4 +37,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.java b/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.java index b26611aad55..e1f320fe118 100644 --- a/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.java +++ b/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.java @@ -1,34 +1,31 @@ // Create an Application key with scopes for current user returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeyCreateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyCreateData; import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); - ApplicationKeyCreateRequest body = - new ApplicationKeyCreateRequest() - .data( - new ApplicationKeyCreateData() - .type(ApplicationKeysType.APPLICATION_KEYS) - .attributes( - new ApplicationKeyCreateAttributes() - .name( - "Example-Create_an_Application_key_with_scopes_for_current_user_returns_Created_response") - .scopes( - Arrays.asList( - "dashboards_read", - "dashboards_write", - "dashboards_public_share")))); + ApplicationKeyCreateRequest body = new ApplicationKeyCreateRequest() +.data(new ApplicationKeyCreateData() +.type(ApplicationKeysType.APPLICATION_KEYS) +.attributes(new ApplicationKeyCreateAttributes() +.name("Example-Create_an_Application_key_with_scopes_for_current_user_returns_Created_response") +.scopes(Arrays.asList("dashboards_read", "dashboards_write", "dashboards_public_share")))); try { ApplicationKeyResponse result = apiInstance.createCurrentUserApplicationKey(body); @@ -41,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/DeleteAPIKey.java b/examples/v2/key-management/DeleteAPIKey.java index 51f789bfe4f..fe9b8122bff 100644 --- a/examples/v2/key-management/DeleteAPIKey.java +++ b/examples/v2/key-management/DeleteAPIKey.java @@ -1,8 +1,14 @@ // Delete an API key returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/DeleteApplicationKey.java b/examples/v2/key-management/DeleteApplicationKey.java index 3ab38d63a91..b0a2f104d32 100644 --- a/examples/v2/key-management/DeleteApplicationKey.java +++ b/examples/v2/key-management/DeleteApplicationKey.java @@ -1,8 +1,14 @@ // Delete an application key returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/DeleteApplicationKey_771691550.java b/examples/v2/key-management/DeleteApplicationKey_771691550.java index d81cedd5dbf..87fbd3a791e 100644 --- a/examples/v2/key-management/DeleteApplicationKey_771691550.java +++ b/examples/v2/key-management/DeleteApplicationKey_771691550.java @@ -1,8 +1,14 @@ // Delete an Application key returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/DeleteCurrentUserApplicationKey.java b/examples/v2/key-management/DeleteCurrentUserApplicationKey.java index 6e2ce24e94c..f2e56d8fe68 100644 --- a/examples/v2/key-management/DeleteCurrentUserApplicationKey.java +++ b/examples/v2/key-management/DeleteCurrentUserApplicationKey.java @@ -1,8 +1,14 @@ // Delete an application key owned by current user returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.java b/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.java index 059430357f7..73a0166b787 100644 --- a/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.java +++ b/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.java @@ -1,8 +1,14 @@ // Delete an Application key owned by current user returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/GetAPIKey.java b/examples/v2/key-management/GetAPIKey.java index cd76717ae2b..3430a6d36af 100644 --- a/examples/v2/key-management/GetAPIKey.java +++ b/examples/v2/key-management/GetAPIKey.java @@ -1,9 +1,15 @@ // Get API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.APIKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/GetApplicationKey.java b/examples/v2/key-management/GetApplicationKey.java index 212667942fd..76b70d4d9df 100644 --- a/examples/v2/key-management/GetApplicationKey.java +++ b/examples/v2/key-management/GetApplicationKey.java @@ -1,9 +1,15 @@ // Get an application key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/GetCurrentUserApplicationKey.java b/examples/v2/key-management/GetCurrentUserApplicationKey.java index 74627c99a99..c26bf5bde3d 100644 --- a/examples/v2/key-management/GetCurrentUserApplicationKey.java +++ b/examples/v2/key-management/GetCurrentUserApplicationKey.java @@ -1,9 +1,15 @@ // Get one application key owned by current user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.java b/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.java index 26d20ccd958..f56ffef9cfb 100644 --- a/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.java +++ b/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.java @@ -1,9 +1,15 @@ // Get one Application key owned by current user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,7 @@ public static void main(String[] args) { String APPLICATION_KEY_DATA_ID = System.getenv("APPLICATION_KEY_DATA_ID"); try { - ApplicationKeyResponse result = - apiInstance.getCurrentUserApplicationKey(APPLICATION_KEY_DATA_ID); + ApplicationKeyResponse result = apiInstance.getCurrentUserApplicationKey(APPLICATION_KEY_DATA_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling KeyManagementApi#getCurrentUserApplicationKey"); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/ListAPIKeys.java b/examples/v2/key-management/ListAPIKeys.java index de4f20af1a1..13ee2d0446b 100644 --- a/examples/v2/key-management/ListAPIKeys.java +++ b/examples/v2/key-management/ListAPIKeys.java @@ -1,10 +1,16 @@ // Get all API keys returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.api.KeyManagementApi.ListAPIKeysOptionalParameters; import com.datadog.api.client.v2.model.APIKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,9 +21,7 @@ public static void main(String[] args) { String API_KEY_DATA_ATTRIBUTES_NAME = System.getenv("API_KEY_DATA_ATTRIBUTES_NAME"); try { - APIKeysResponse result = - apiInstance.listAPIKeys( - new ListAPIKeysOptionalParameters().filter(API_KEY_DATA_ATTRIBUTES_NAME)); + APIKeysResponse result = apiInstance.listAPIKeys(new ListAPIKeysOptionalParameters().filter(API_KEY_DATA_ATTRIBUTES_NAME)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling KeyManagementApi#listAPIKeys"); @@ -27,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/ListApplicationKeys.java b/examples/v2/key-management/ListApplicationKeys.java index 71ed5b3c151..a1c47b3f180 100644 --- a/examples/v2/key-management/ListApplicationKeys.java +++ b/examples/v2/key-management/ListApplicationKeys.java @@ -1,9 +1,15 @@ // Get all application keys returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/ListApplicationKeys_2237010090.java b/examples/v2/key-management/ListApplicationKeys_2237010090.java index 29ff0614a11..c2848a1cd00 100644 --- a/examples/v2/key-management/ListApplicationKeys_2237010090.java +++ b/examples/v2/key-management/ListApplicationKeys_2237010090.java @@ -1,9 +1,15 @@ // Get all Application keys returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/ListCurrentUserApplicationKeys.java b/examples/v2/key-management/ListCurrentUserApplicationKeys.java index 3a049ea4fe0..cf8b767b41a 100644 --- a/examples/v2/key-management/ListCurrentUserApplicationKeys.java +++ b/examples/v2/key-management/ListCurrentUserApplicationKeys.java @@ -1,9 +1,15 @@ // Get all application keys owned by current user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.java b/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.java index 881d74f58cb..10a2984687a 100644 --- a/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.java +++ b/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.java @@ -1,9 +1,15 @@ // Get all Application keys owned by current user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/UpdateAPIKey.java b/examples/v2/key-management/UpdateAPIKey.java index ac674a023c2..8e59bcfadf4 100644 --- a/examples/v2/key-management/UpdateAPIKey.java +++ b/examples/v2/key-management/UpdateAPIKey.java @@ -1,13 +1,19 @@ // Edit an API key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.APIKeyResponse; +import com.datadog.api.client.v2.model.APIKeysType; import com.datadog.api.client.v2.model.APIKeyUpdateAttributes; import com.datadog.api.client.v2.model.APIKeyUpdateData; import com.datadog.api.client.v2.model.APIKeyUpdateRequest; -import com.datadog.api.client.v2.model.APIKeysType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,15 +23,12 @@ public static void main(String[] args) { // there is a valid "api_key" in the system String API_KEY_DATA_ID = System.getenv("API_KEY_DATA_ID"); - APIKeyUpdateRequest body = - new APIKeyUpdateRequest() - .data( - new APIKeyUpdateData() - .type(APIKeysType.API_KEYS) - .id(API_KEY_DATA_ID) - .attributes( - new APIKeyUpdateAttributes() - .name("Example-Edit_an_API_key_returns_OK_response"))); + APIKeyUpdateRequest body = new APIKeyUpdateRequest() +.data(new APIKeyUpdateData() +.type(APIKeysType.API_KEYS) +.id(API_KEY_DATA_ID) +.attributes(new APIKeyUpdateAttributes() +.name("Example-Edit_an_API_key_returns_OK_response"))); try { APIKeyResponse result = apiInstance.updateAPIKey(API_KEY_DATA_ID, body); @@ -38,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/UpdateApplicationKey.java b/examples/v2/key-management/UpdateApplicationKey.java index 5621c91269b..020524587fb 100644 --- a/examples/v2/key-management/UpdateApplicationKey.java +++ b/examples/v2/key-management/UpdateApplicationKey.java @@ -1,13 +1,19 @@ // Edit an application key returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeysType; import com.datadog.api.client.v2.model.ApplicationKeyUpdateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyUpdateData; import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,23 +21,18 @@ public static void main(String[] args) { KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); // there is a valid "application_key" in the system - String APPLICATION_KEY_DATA_ATTRIBUTES_NAME = - System.getenv("APPLICATION_KEY_DATA_ATTRIBUTES_NAME"); + String APPLICATION_KEY_DATA_ATTRIBUTES_NAME = System.getenv("APPLICATION_KEY_DATA_ATTRIBUTES_NAME"); String APPLICATION_KEY_DATA_ID = System.getenv("APPLICATION_KEY_DATA_ID"); - ApplicationKeyUpdateRequest body = - new ApplicationKeyUpdateRequest() - .data( - new ApplicationKeyUpdateData() - .id(APPLICATION_KEY_DATA_ID) - .type(ApplicationKeysType.APPLICATION_KEYS) - .attributes( - new ApplicationKeyUpdateAttributes() - .name("Application Key for managing dashboards-updated"))); + ApplicationKeyUpdateRequest body = new ApplicationKeyUpdateRequest() +.data(new ApplicationKeyUpdateData() +.id(APPLICATION_KEY_DATA_ID) +.type(ApplicationKeysType.APPLICATION_KEYS) +.attributes(new ApplicationKeyUpdateAttributes() +.name("Application Key for managing dashboards-updated"))); try { - ApplicationKeyResponse result = - apiInstance.updateApplicationKey(APPLICATION_KEY_DATA_ID, body); + ApplicationKeyResponse result = apiInstance.updateApplicationKey(APPLICATION_KEY_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling KeyManagementApi#updateApplicationKey"); @@ -41,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/key-management/UpdateCurrentUserApplicationKey.java b/examples/v2/key-management/UpdateCurrentUserApplicationKey.java index e3469d279b5..e79fdecbd4d 100644 --- a/examples/v2/key-management/UpdateCurrentUserApplicationKey.java +++ b/examples/v2/key-management/UpdateCurrentUserApplicationKey.java @@ -1,13 +1,19 @@ // Edit an application key owned by current user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.KeyManagementApi; import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeysType; import com.datadog.api.client.v2.model.ApplicationKeyUpdateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyUpdateData; import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,23 +21,18 @@ public static void main(String[] args) { KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); // there is a valid "application_key" in the system - String APPLICATION_KEY_DATA_ATTRIBUTES_NAME = - System.getenv("APPLICATION_KEY_DATA_ATTRIBUTES_NAME"); + String APPLICATION_KEY_DATA_ATTRIBUTES_NAME = System.getenv("APPLICATION_KEY_DATA_ATTRIBUTES_NAME"); String APPLICATION_KEY_DATA_ID = System.getenv("APPLICATION_KEY_DATA_ID"); - ApplicationKeyUpdateRequest body = - new ApplicationKeyUpdateRequest() - .data( - new ApplicationKeyUpdateData() - .id(APPLICATION_KEY_DATA_ID) - .type(ApplicationKeysType.APPLICATION_KEYS) - .attributes( - new ApplicationKeyUpdateAttributes() - .name("Application Key for managing dashboards-updated"))); + ApplicationKeyUpdateRequest body = new ApplicationKeyUpdateRequest() +.data(new ApplicationKeyUpdateData() +.id(APPLICATION_KEY_DATA_ID) +.type(ApplicationKeysType.APPLICATION_KEYS) +.attributes(new ApplicationKeyUpdateAttributes() +.name("Application Key for managing dashboards-updated"))); try { - ApplicationKeyResponse result = - apiInstance.updateCurrentUserApplicationKey(APPLICATION_KEY_DATA_ID, body); + ApplicationKeyResponse result = apiInstance.updateCurrentUserApplicationKey(APPLICATION_KEY_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling KeyManagementApi#updateCurrentUserApplicationKey"); @@ -41,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/AddReadRoleToArchive.java b/examples/v2/logs-archives/AddReadRoleToArchive.java index b9e41b3d227..4cb20c00711 100644 --- a/examples/v2/logs-archives/AddReadRoleToArchive.java +++ b/examples/v2/logs-archives/AddReadRoleToArchive.java @@ -1,23 +1,27 @@ // Grant role to an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.RelationshipToRole; import com.datadog.api.client.v2.model.RelationshipToRoleData; import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsArchivesApi apiInstance = new LogsArchivesApi(defaultClient); - RelationshipToRole body = - new RelationshipToRole() - .data( - new RelationshipToRoleData() - .id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") - .type(RolesType.ROLES)); + RelationshipToRole body = new RelationshipToRole() +.data(new RelationshipToRoleData() +.id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") +.type(RolesType.ROLES)); try { apiInstance.addReadRoleToArchive("archive_id", body); @@ -29,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/CreateLogsArchive.java b/examples/v2/logs-archives/CreateLogsArchive.java index 64bd6342222..dd84837bf14 100644 --- a/examples/v2/logs-archives/CreateLogsArchive.java +++ b/examples/v2/logs-archives/CreateLogsArchive.java @@ -1,7 +1,7 @@ // Create an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.LogsArchive; import com.datadog.api.client.v2.model.LogsArchiveCreateRequest; @@ -11,35 +11,35 @@ import com.datadog.api.client.v2.model.LogsArchiveDestinationAzure; import com.datadog.api.client.v2.model.LogsArchiveDestinationAzureType; import com.datadog.api.client.v2.model.LogsArchiveIntegrationAzure; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsArchivesApi apiInstance = new LogsArchivesApi(defaultClient); - LogsArchiveCreateRequest body = - new LogsArchiveCreateRequest() - .data( - new LogsArchiveCreateRequestDefinition() - .attributes( - new LogsArchiveCreateRequestAttributes() - .destination( - new LogsArchiveCreateRequestDestination( - new LogsArchiveDestinationAzure() - .container("container-name") - .integration( - new LogsArchiveIntegrationAzure() - .clientId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa") - .tenantId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa")) - .storageAccount("account-name") - .type(LogsArchiveDestinationAzureType.AZURE))) - .includeTags(false) - .name("Nginx Archive") - .query("source:nginx") - .rehydrationMaxScanSizeInGb(100L) - .rehydrationTags(Arrays.asList("team:intake", "team:app"))) - .type("archives")); + LogsArchiveCreateRequest body = new LogsArchiveCreateRequest() +.data(new LogsArchiveCreateRequestDefinition() +.attributes(new LogsArchiveCreateRequestAttributes() +.destination(new LogsArchiveCreateRequestDestination( +new LogsArchiveDestinationAzure() +.container("container-name") +.integration(new LogsArchiveIntegrationAzure() +.clientId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa") +.tenantId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa")) +.storageAccount("account-name") +.type(LogsArchiveDestinationAzureType.AZURE))) +.includeTags(false) +.name("Nginx Archive") +.query("source:nginx") +.rehydrationMaxScanSizeInGb(100L) +.rehydrationTags(Arrays.asList("team:intake", "team:app"))) +.type("archives")); try { LogsArchive result = apiInstance.createLogsArchive(body); @@ -52,4 +52,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/DeleteLogsArchive.java b/examples/v2/logs-archives/DeleteLogsArchive.java index d0b3c2f820e..cc83cc45baf 100644 --- a/examples/v2/logs-archives/DeleteLogsArchive.java +++ b/examples/v2/logs-archives/DeleteLogsArchive.java @@ -1,8 +1,14 @@ // Delete an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/GetLogsArchive.java b/examples/v2/logs-archives/GetLogsArchive.java index 5e193de2d81..6c5a6dfe789 100644 --- a/examples/v2/logs-archives/GetLogsArchive.java +++ b/examples/v2/logs-archives/GetLogsArchive.java @@ -1,9 +1,15 @@ // Get an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.LogsArchive; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/GetLogsArchiveOrder.java b/examples/v2/logs-archives/GetLogsArchiveOrder.java index 37b1c9b149b..ade07195b31 100644 --- a/examples/v2/logs-archives/GetLogsArchiveOrder.java +++ b/examples/v2/logs-archives/GetLogsArchiveOrder.java @@ -1,9 +1,15 @@ // Get archive order returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.LogsArchiveOrder; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/ListArchiveReadRoles.java b/examples/v2/logs-archives/ListArchiveReadRoles.java index c4205a64d08..34317a1e208 100644 --- a/examples/v2/logs-archives/ListArchiveReadRoles.java +++ b/examples/v2/logs-archives/ListArchiveReadRoles.java @@ -1,9 +1,15 @@ // List read roles for an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.RolesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/ListLogsArchives.java b/examples/v2/logs-archives/ListLogsArchives.java index f36f5b222d2..1f315884ae2 100644 --- a/examples/v2/logs-archives/ListLogsArchives.java +++ b/examples/v2/logs-archives/ListLogsArchives.java @@ -1,9 +1,15 @@ // Get all archives returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.LogsArchives; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/RemoveRoleFromArchive.java b/examples/v2/logs-archives/RemoveRoleFromArchive.java index 1ec5f584834..60b0df92530 100644 --- a/examples/v2/logs-archives/RemoveRoleFromArchive.java +++ b/examples/v2/logs-archives/RemoveRoleFromArchive.java @@ -1,23 +1,27 @@ // Revoke role from an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.RelationshipToRole; import com.datadog.api.client.v2.model.RelationshipToRoleData; import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsArchivesApi apiInstance = new LogsArchivesApi(defaultClient); - RelationshipToRole body = - new RelationshipToRole() - .data( - new RelationshipToRoleData() - .id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") - .type(RolesType.ROLES)); + RelationshipToRole body = new RelationshipToRole() +.data(new RelationshipToRoleData() +.id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") +.type(RolesType.ROLES)); try { apiInstance.removeRoleFromArchive("archive_id", body); @@ -29,4 +33,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/UpdateLogsArchive.java b/examples/v2/logs-archives/UpdateLogsArchive.java index 1ca22cb1fdb..ef3661fa7ab 100644 --- a/examples/v2/logs-archives/UpdateLogsArchive.java +++ b/examples/v2/logs-archives/UpdateLogsArchive.java @@ -1,7 +1,7 @@ // Update an archive returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.LogsArchive; import com.datadog.api.client.v2.model.LogsArchiveCreateRequest; @@ -11,35 +11,35 @@ import com.datadog.api.client.v2.model.LogsArchiveDestinationAzure; import com.datadog.api.client.v2.model.LogsArchiveDestinationAzureType; import com.datadog.api.client.v2.model.LogsArchiveIntegrationAzure; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsArchivesApi apiInstance = new LogsArchivesApi(defaultClient); - LogsArchiveCreateRequest body = - new LogsArchiveCreateRequest() - .data( - new LogsArchiveCreateRequestDefinition() - .attributes( - new LogsArchiveCreateRequestAttributes() - .destination( - new LogsArchiveCreateRequestDestination( - new LogsArchiveDestinationAzure() - .container("container-name") - .integration( - new LogsArchiveIntegrationAzure() - .clientId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa") - .tenantId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa")) - .storageAccount("account-name") - .type(LogsArchiveDestinationAzureType.AZURE))) - .includeTags(false) - .name("Nginx Archive") - .query("source:nginx") - .rehydrationMaxScanSizeInGb(100L) - .rehydrationTags(Arrays.asList("team:intake", "team:app"))) - .type("archives")); + LogsArchiveCreateRequest body = new LogsArchiveCreateRequest() +.data(new LogsArchiveCreateRequestDefinition() +.attributes(new LogsArchiveCreateRequestAttributes() +.destination(new LogsArchiveCreateRequestDestination( +new LogsArchiveDestinationAzure() +.container("container-name") +.integration(new LogsArchiveIntegrationAzure() +.clientId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa") +.tenantId("aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa")) +.storageAccount("account-name") +.type(LogsArchiveDestinationAzureType.AZURE))) +.includeTags(false) +.name("Nginx Archive") +.query("source:nginx") +.rehydrationMaxScanSizeInGb(100L) +.rehydrationTags(Arrays.asList("team:intake", "team:app"))) +.type("archives")); try { LogsArchive result = apiInstance.updateLogsArchive("archive_id", body); @@ -52,4 +52,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-archives/UpdateLogsArchiveOrder.java b/examples/v2/logs-archives/UpdateLogsArchiveOrder.java index ccc78ada400..2774b3c754a 100644 --- a/examples/v2/logs-archives/UpdateLogsArchiveOrder.java +++ b/examples/v2/logs-archives/UpdateLogsArchiveOrder.java @@ -1,31 +1,30 @@ // Update archive order returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsArchivesApi; import com.datadog.api.client.v2.model.LogsArchiveOrder; +import com.datadog.api.client.v2.model.LogsArchiveOrder; import com.datadog.api.client.v2.model.LogsArchiveOrderAttributes; import com.datadog.api.client.v2.model.LogsArchiveOrderDefinition; import com.datadog.api.client.v2.model.LogsArchiveOrderDefinitionType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsArchivesApi apiInstance = new LogsArchivesApi(defaultClient); - LogsArchiveOrder body = - new LogsArchiveOrder() - .data( - new LogsArchiveOrderDefinition() - .attributes( - new LogsArchiveOrderAttributes() - .archiveIds( - Arrays.asList( - "a2zcMylnM4OCHpYusxIi1g", - "a2zcMylnM4OCHpYusxIi2g", - "a2zcMylnM4OCHpYusxIi3g"))) - .type(LogsArchiveOrderDefinitionType.ARCHIVE_ORDER)); + LogsArchiveOrder body = new LogsArchiveOrder() +.data(new LogsArchiveOrderDefinition() +.attributes(new LogsArchiveOrderAttributes() +.archiveIds(Arrays.asList("a2zcMylnM4OCHpYusxIi1g", "a2zcMylnM4OCHpYusxIi2g", "a2zcMylnM4OCHpYusxIi3g"))) +.type(LogsArchiveOrderDefinitionType.ARCHIVE_ORDER)); try { LogsArchiveOrder result = apiInstance.updateLogsArchiveOrder(body); @@ -38,4 +37,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-metrics/CreateLogsMetric.java b/examples/v2/logs-metrics/CreateLogsMetric.java index f5112540f47..e04b5b9bb5b 100644 --- a/examples/v2/logs-metrics/CreateLogsMetric.java +++ b/examples/v2/logs-metrics/CreateLogsMetric.java @@ -1,34 +1,37 @@ // Create a log-based metric returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsMetricsApi; +import com.datadog.api.client.v2.model.LogsMetricResponse; import com.datadog.api.client.v2.model.LogsMetricCompute; import com.datadog.api.client.v2.model.LogsMetricComputeAggregationType; +import com.datadog.api.client.v2.model.LogsMetricComputeIncludePercentiles; import com.datadog.api.client.v2.model.LogsMetricCreateAttributes; import com.datadog.api.client.v2.model.LogsMetricCreateData; import com.datadog.api.client.v2.model.LogsMetricCreateRequest; -import com.datadog.api.client.v2.model.LogsMetricResponse; import com.datadog.api.client.v2.model.LogsMetricType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsMetricsApi apiInstance = new LogsMetricsApi(defaultClient); - LogsMetricCreateRequest body = - new LogsMetricCreateRequest() - .data( - new LogsMetricCreateData() - .id("Example-Create_a_log_based_metric_returns_OK_response") - .type(LogsMetricType.LOGS_METRICS) - .attributes( - new LogsMetricCreateAttributes() - .compute( - new LogsMetricCompute() - .aggregationType(LogsMetricComputeAggregationType.DISTRIBUTION) - .includePercentiles(true) - .path("@duration")))); + LogsMetricCreateRequest body = new LogsMetricCreateRequest() +.data(new LogsMetricCreateData() +.id("Example-Create_a_log_based_metric_returns_OK_response") +.type(LogsMetricType.LOGS_METRICS) +.attributes(new LogsMetricCreateAttributes() +.compute(new LogsMetricCompute() +.aggregationType(LogsMetricComputeAggregationType.DISTRIBUTION) +.includePercentiles(true) +.path("@duration")))); try { LogsMetricResponse result = apiInstance.createLogsMetric(body); @@ -41,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-metrics/DeleteLogsMetric.java b/examples/v2/logs-metrics/DeleteLogsMetric.java index d0822915525..f7359779413 100644 --- a/examples/v2/logs-metrics/DeleteLogsMetric.java +++ b/examples/v2/logs-metrics/DeleteLogsMetric.java @@ -1,8 +1,14 @@ // Delete a log-based metric returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsMetricsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-metrics/GetLogsMetric.java b/examples/v2/logs-metrics/GetLogsMetric.java index 9a71e9b1c5b..7faec5ca301 100644 --- a/examples/v2/logs-metrics/GetLogsMetric.java +++ b/examples/v2/logs-metrics/GetLogsMetric.java @@ -1,9 +1,15 @@ // Get a log-based metric returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsMetricsApi; import com.datadog.api.client.v2.model.LogsMetricResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-metrics/ListLogsMetrics.java b/examples/v2/logs-metrics/ListLogsMetrics.java index 382bd0bb5ba..df27b1cf8db 100644 --- a/examples/v2/logs-metrics/ListLogsMetrics.java +++ b/examples/v2/logs-metrics/ListLogsMetrics.java @@ -1,9 +1,15 @@ // Get all log-based metrics returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsMetricsApi; import com.datadog.api.client.v2.model.LogsMetricsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-metrics/UpdateLogsMetric.java b/examples/v2/logs-metrics/UpdateLogsMetric.java index 517146c0004..d508d92f10d 100644 --- a/examples/v2/logs-metrics/UpdateLogsMetric.java +++ b/examples/v2/logs-metrics/UpdateLogsMetric.java @@ -1,14 +1,20 @@ // Update a log-based metric returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsMetricsApi; -import com.datadog.api.client.v2.model.LogsMetricFilter; import com.datadog.api.client.v2.model.LogsMetricResponse; +import com.datadog.api.client.v2.model.LogsMetricFilter; import com.datadog.api.client.v2.model.LogsMetricType; import com.datadog.api.client.v2.model.LogsMetricUpdateAttributes; import com.datadog.api.client.v2.model.LogsMetricUpdateData; import com.datadog.api.client.v2.model.LogsMetricUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,22 +22,15 @@ public static void main(String[] args) { LogsMetricsApi apiInstance = new LogsMetricsApi(defaultClient); // there is a valid "logs_metric" in the system - String LOGS_METRIC_DATA_ATTRIBUTES_FILTER_QUERY = - System.getenv("LOGS_METRIC_DATA_ATTRIBUTES_FILTER_QUERY"); + String LOGS_METRIC_DATA_ATTRIBUTES_FILTER_QUERY = System.getenv("LOGS_METRIC_DATA_ATTRIBUTES_FILTER_QUERY"); String LOGS_METRIC_DATA_ID = System.getenv("LOGS_METRIC_DATA_ID"); - LogsMetricUpdateRequest body = - new LogsMetricUpdateRequest() - .data( - new LogsMetricUpdateData() - .type(LogsMetricType.LOGS_METRICS) - .attributes( - new LogsMetricUpdateAttributes() - .filter( - new LogsMetricFilter() - .query( - "service:web* AND @http.status_code:[200 TO" - + " 299]-updated")))); + LogsMetricUpdateRequest body = new LogsMetricUpdateRequest() +.data(new LogsMetricUpdateData() +.type(LogsMetricType.LOGS_METRICS) +.attributes(new LogsMetricUpdateAttributes() +.filter(new LogsMetricFilter() +.query("service:web* AND @http.status_code:[200 TO 299]-updated")))); try { LogsMetricResponse result = apiInstance.updateLogsMetric(LOGS_METRIC_DATA_ID, body); @@ -44,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.java b/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.java index c989af03d6d..b1655aff596 100644 --- a/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.java +++ b/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.java @@ -1,14 +1,21 @@ // Update a log-based metric with include_percentiles field returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsMetricsApi; import com.datadog.api.client.v2.model.LogsMetricResponse; +import com.datadog.api.client.v2.model.LogsMetricComputeIncludePercentiles; import com.datadog.api.client.v2.model.LogsMetricType; import com.datadog.api.client.v2.model.LogsMetricUpdateAttributes; import com.datadog.api.client.v2.model.LogsMetricUpdateCompute; import com.datadog.api.client.v2.model.LogsMetricUpdateData; import com.datadog.api.client.v2.model.LogsMetricUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -18,18 +25,15 @@ public static void main(String[] args) { // there is a valid "logs_metric_percentile" in the system String LOGS_METRIC_PERCENTILE_DATA_ID = System.getenv("LOGS_METRIC_PERCENTILE_DATA_ID"); - LogsMetricUpdateRequest body = - new LogsMetricUpdateRequest() - .data( - new LogsMetricUpdateData() - .type(LogsMetricType.LOGS_METRICS) - .attributes( - new LogsMetricUpdateAttributes() - .compute(new LogsMetricUpdateCompute().includePercentiles(false)))); + LogsMetricUpdateRequest body = new LogsMetricUpdateRequest() +.data(new LogsMetricUpdateData() +.type(LogsMetricType.LOGS_METRICS) +.attributes(new LogsMetricUpdateAttributes() +.compute(new LogsMetricUpdateCompute() +.includePercentiles(false)))); try { - LogsMetricResponse result = - apiInstance.updateLogsMetric(LOGS_METRIC_PERCENTILE_DATA_ID, body); + LogsMetricResponse result = apiInstance.updateLogsMetric(LOGS_METRIC_PERCENTILE_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogsMetricsApi#updateLogsMetric"); @@ -39,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/AggregateLogs.java b/examples/v2/logs/AggregateLogs.java index 4d08336a2be..b633812e378 100644 --- a/examples/v2/logs/AggregateLogs.java +++ b/examples/v2/logs/AggregateLogs.java @@ -1,26 +1,29 @@ // Aggregate events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; -import com.datadog.api.client.v2.model.LogsAggregateRequest; import com.datadog.api.client.v2.model.LogsAggregateResponse; +import com.datadog.api.client.v2.model.LogsAggregateRequest; import com.datadog.api.client.v2.model.LogsQueryFilter; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsAggregateRequest body = - new LogsAggregateRequest() - .filter( - new LogsQueryFilter() - .from("now-15m") - .indexes(Collections.singletonList("main")) - .query("*") - .to("now")); + LogsAggregateRequest body = new LogsAggregateRequest() +.filter(new LogsQueryFilter() +.from("now-15m") +.indexes(Collections.singletonList("main")) +.query("*") +.to("now")); try { LogsAggregateResponse result = apiInstance.aggregateLogs(body); @@ -33,4 +36,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/AggregateLogs_2527007002.java b/examples/v2/logs/AggregateLogs_2527007002.java index 5b75ed93f24..d25de98f806 100644 --- a/examples/v2/logs/AggregateLogs_2527007002.java +++ b/examples/v2/logs/AggregateLogs_2527007002.java @@ -1,35 +1,36 @@ // Aggregate compute events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; -import com.datadog.api.client.v2.model.LogsAggregateRequest; import com.datadog.api.client.v2.model.LogsAggregateResponse; +import com.datadog.api.client.v2.model.LogsAggregateRequest; import com.datadog.api.client.v2.model.LogsAggregationFunction; import com.datadog.api.client.v2.model.LogsCompute; import com.datadog.api.client.v2.model.LogsComputeType; import com.datadog.api.client.v2.model.LogsQueryFilter; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsAggregateRequest body = - new LogsAggregateRequest() - .compute( - Collections.singletonList( - new LogsCompute() - .aggregation(LogsAggregationFunction.COUNT) - .interval("5m") - .type(LogsComputeType.TIMESERIES))) - .filter( - new LogsQueryFilter() - .from("now-15m") - .indexes(Collections.singletonList("main")) - .query("*") - .to("now")); + LogsAggregateRequest body = new LogsAggregateRequest() +.compute(Collections.singletonList(new LogsCompute() +.aggregation(LogsAggregationFunction.COUNT) +.interval("5m") +.type(LogsComputeType.TIMESERIES))) +.filter(new LogsQueryFilter() +.from("now-15m") +.indexes(Collections.singletonList("main")) +.query("*") +.to("now")); try { LogsAggregateResponse result = apiInstance.aggregateLogs(body); @@ -42,4 +43,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/AggregateLogs_2955613758.java b/examples/v2/logs/AggregateLogs_2955613758.java index 60ab7160623..1e28ef9e8e5 100644 --- a/examples/v2/logs/AggregateLogs_2955613758.java +++ b/examples/v2/logs/AggregateLogs_2955613758.java @@ -1,10 +1,10 @@ // Aggregate compute events with group by returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; -import com.datadog.api.client.v2.model.LogsAggregateRequest; import com.datadog.api.client.v2.model.LogsAggregateResponse; +import com.datadog.api.client.v2.model.LogsAggregateRequest; import com.datadog.api.client.v2.model.LogsAggregateSort; import com.datadog.api.client.v2.model.LogsAggregateSortType; import com.datadog.api.client.v2.model.LogsAggregationFunction; @@ -15,39 +15,39 @@ import com.datadog.api.client.v2.model.LogsGroupByTotal; import com.datadog.api.client.v2.model.LogsQueryFilter; import com.datadog.api.client.v2.model.LogsSortOrder; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsAggregateRequest body = - new LogsAggregateRequest() - .compute( - Collections.singletonList( - new LogsCompute() - .aggregation(LogsAggregationFunction.COUNT) - .interval("5m") - .type(LogsComputeType.TIMESERIES))) - .filter( - new LogsQueryFilter() - .from("now-15m") - .indexes(Collections.singletonList("main")) - .query("*") - .to("now")) - .groupBy( - Collections.singletonList( - new LogsGroupBy() - .facet("host") - .missing(new LogsGroupByMissing("miss")) - .sort( - new LogsAggregateSort() - .type(LogsAggregateSortType.MEASURE) - .order(LogsSortOrder.ASCENDING) - .aggregation(LogsAggregationFunction.PERCENTILE_90) - .metric("@duration")) - .total(new LogsGroupByTotal("recall")))); + LogsAggregateRequest body = new LogsAggregateRequest() +.compute(Collections.singletonList(new LogsCompute() +.aggregation(LogsAggregationFunction.COUNT) +.interval("5m") +.type(LogsComputeType.TIMESERIES))) +.filter(new LogsQueryFilter() +.from("now-15m") +.indexes(Collections.singletonList("main")) +.query("*") +.to("now")) +.groupBy(Collections.singletonList(new LogsGroupBy() +.facet("host") +.missing(new LogsGroupByMissing( +"miss")) +.sort(new LogsAggregateSort() +.type(LogsAggregateSortType.MEASURE) +.order(LogsSortOrder.ASCENDING) +.aggregation(LogsAggregationFunction.PERCENTILE_90) +.metric("@duration")) +.total(new LogsGroupByTotal( +"recall")))); try { LogsAggregateResponse result = apiInstance.aggregateLogs(body); @@ -60,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/ListLogs.java b/examples/v2/logs/ListLogs.java index 27e991c33cf..5b2a03d8dcb 100644 --- a/examples/v2/logs/ListLogs.java +++ b/examples/v2/logs/ListLogs.java @@ -1,31 +1,35 @@ // Search logs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters; +import com.datadog.api.client.v2.model.LogsListResponse; import com.datadog.api.client.v2.model.LogsListRequest; import com.datadog.api.client.v2.model.LogsListRequestPage; -import com.datadog.api.client.v2.model.LogsListResponse; import com.datadog.api.client.v2.model.LogsQueryFilter; import com.datadog.api.client.v2.model.LogsSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsListRequest body = - new LogsListRequest() - .filter( - new LogsQueryFilter() - .query("datadog-agent") - .indexes(Collections.singletonList("main")) - .from("2020-09-17T11:48:36+01:00") - .to("2020-09-17T12:48:36+01:00")) - .sort(LogsSort.TIMESTAMP_ASCENDING) - .page(new LogsListRequestPage().limit(5)); + LogsListRequest body = new LogsListRequest() +.filter(new LogsQueryFilter() +.query("datadog-agent") +.indexes(Collections.singletonList("main")) +.from("2020-09-17T11:48:36+01:00") +.to("2020-09-17T12:48:36+01:00")) +.sort(LogsSort.TIMESTAMP_ASCENDING) +.page(new LogsListRequestPage() +.limit(5)); try { LogsListResponse result = apiInstance.listLogs(new ListLogsOptionalParameters().body(body)); @@ -38,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/ListLogsGet.java b/examples/v2/logs/ListLogsGet.java index ac6adfe2426..8680bb4d560 100644 --- a/examples/v2/logs/ListLogsGet.java +++ b/examples/v2/logs/ListLogsGet.java @@ -1,9 +1,15 @@ // Get a list of logs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.model.LogsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/ListLogsGet_2034110533.java b/examples/v2/logs/ListLogsGet_2034110533.java index be2d309e008..c476b1d64cb 100644 --- a/examples/v2/logs/ListLogsGet_2034110533.java +++ b/examples/v2/logs/ListLogsGet_2034110533.java @@ -1,11 +1,16 @@ // Get a quick list of logs returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters; import com.datadog.api.client.v2.model.LogsListResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,14 +18,7 @@ public static void main(String[] args) { LogsApi apiInstance = new LogsApi(defaultClient); try { - LogsListResponse result = - apiInstance.listLogsGet( - new ListLogsGetOptionalParameters() - .filterQuery("datadog-agent") - .filterIndex("main") - .filterFrom(OffsetDateTime.parse("2020-09-17T11:48:36+01:00")) - .filterTo(OffsetDateTime.parse("2020-09-17T12:48:36+01:00")) - .pageLimit(5)); + LogsListResponse result = apiInstance.listLogsGet(new ListLogsGetOptionalParameters().filterQuery("datadog-agent").filterIndex("main").filterFrom(OffsetDateTime.parse("2020-09-17T11:48:36+01:00")).filterTo(OffsetDateTime.parse("2020-09-17T12:48:36+01:00")).pageLimit(5)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#listLogsGet"); @@ -30,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/ListLogsGet_738202670.java b/examples/v2/logs/ListLogsGet_738202670.java index 3597517bef4..bb2bc2dcb35 100644 --- a/examples/v2/logs/ListLogsGet_738202670.java +++ b/examples/v2/logs/ListLogsGet_738202670.java @@ -1,10 +1,18 @@ // Get a list of logs returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters; +import com.datadog.api.client.v2.model.LogsListResponse; import com.datadog.api.client.v2.model.Log; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +20,10 @@ public static void main(String[] args) { LogsApi apiInstance = new LogsApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listLogsGetWithPagination(new ListLogsGetOptionalParameters().pageLimit(2)); + PaginationIterable iterable = apiInstance.listLogsGetWithPagination(new ListLogsGetOptionalParameters().pageLimit(2)); for (Log item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling LogsApi#listLogsGetWithPagination"); @@ -24,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/ListLogs_3138392594.java b/examples/v2/logs/ListLogs_3138392594.java index 884dc7b0dc5..52a42bf11cb 100644 --- a/examples/v2/logs/ListLogs_3138392594.java +++ b/examples/v2/logs/ListLogs_3138392594.java @@ -1,39 +1,45 @@ // Search logs returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters; +import com.datadog.api.client.v2.model.LogsListResponse; import com.datadog.api.client.v2.model.Log; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.LogsListRequest; import com.datadog.api.client.v2.model.LogsListRequestPage; import com.datadog.api.client.v2.model.LogsQueryFilter; import com.datadog.api.client.v2.model.LogsQueryOptions; import com.datadog.api.client.v2.model.LogsSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - LogsListRequest body = - new LogsListRequest() - .filter( - new LogsQueryFilter() - .from("now-15m") - .indexes(Collections.singletonList("main")) - .to("now")) - .options(new LogsQueryOptions().timezone("GMT")) - .page(new LogsListRequestPage().limit(2)) - .sort(LogsSort.TIMESTAMP_ASCENDING); + LogsListRequest body = new LogsListRequest() +.filter(new LogsQueryFilter() +.from("now-15m") +.indexes(Collections.singletonList("main")) +.to("now")) +.options(new LogsQueryOptions() +.timezone("GMT")) +.page(new LogsListRequestPage() +.limit(2)) +.sort(LogsSort.TIMESTAMP_ASCENDING); try { - PaginationIterable iterable = - apiInstance.listLogsWithPagination(new ListLogsOptionalParameters().body(body)); + PaginationIterable iterable = apiInstance.listLogsWithPagination(new ListLogsOptionalParameters().body(body)); for (Log item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling LogsApi#listLogsWithPagination"); @@ -41,4 +47,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/SubmitLog.java b/examples/v2/logs/SubmitLog.java index 440c42be05d..7a8e6f01d0d 100644 --- a/examples/v2/logs/SubmitLog.java +++ b/examples/v2/logs/SubmitLog.java @@ -1,26 +1,28 @@ // Send logs returns "Request accepted for processing (always 202 empty JSON)." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.model.HTTPLogItem; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - List body = - Collections.singletonList( - new HTTPLogItem() - .ddsource("nginx") - .ddtags("env:staging,version:5.1") - .hostname("i-012345678") - .message("2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World") - .service("payment") - .putAdditionalProperty("status", "error")); + List body = Collections.singletonList(new HTTPLogItem() +.ddsource("nginx") +.ddtags("env:staging,version:5.1") +.hostname("i-012345678") +.message("2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World") +.service("payment") +.putAdditionalProperty("status", "error")); try { apiInstance.submitLog(body); @@ -32,4 +34,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/SubmitLog_3496222707.java b/examples/v2/logs/SubmitLog_3496222707.java index 7cf1afc3275..91b6f1d106b 100644 --- a/examples/v2/logs/SubmitLog_3496222707.java +++ b/examples/v2/logs/SubmitLog_3496222707.java @@ -1,31 +1,32 @@ // Send gzip logs returns "Request accepted for processing (always 202 empty JSON)." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.api.LogsApi.SubmitLogOptionalParameters; import com.datadog.api.client.v2.model.ContentEncoding; import com.datadog.api.client.v2.model.HTTPLogItem; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - List body = - Collections.singletonList( - new HTTPLogItem() - .ddsource("nginx") - .ddtags("env:staging,version:5.1") - .hostname("i-012345678") - .message("2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World") - .service("payment")); + List body = Collections.singletonList(new HTTPLogItem() +.ddsource("nginx") +.ddtags("env:staging,version:5.1") +.hostname("i-012345678") +.message("2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World") +.service("payment")); try { - apiInstance.submitLog( - body, new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.GZIP)); + apiInstance.submitLog(body,new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.GZIP)); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#submitLog"); System.err.println("Status code: " + e.getCode()); @@ -34,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/logs/SubmitLog_904601870.java b/examples/v2/logs/SubmitLog_904601870.java index f1d28a5dfee..297f7e757c7 100644 --- a/examples/v2/logs/SubmitLog_904601870.java +++ b/examples/v2/logs/SubmitLog_904601870.java @@ -1,31 +1,32 @@ // Send deflate logs returns "Request accepted for processing (always 202 empty JSON)." response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.LogsApi; import com.datadog.api.client.v2.api.LogsApi.SubmitLogOptionalParameters; import com.datadog.api.client.v2.model.ContentEncoding; import com.datadog.api.client.v2.model.HTTPLogItem; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); LogsApi apiInstance = new LogsApi(defaultClient); - List body = - Collections.singletonList( - new HTTPLogItem() - .ddsource("nginx") - .ddtags("env:staging,version:5.1") - .hostname("i-012345678") - .message("2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World") - .service("payment")); + List body = Collections.singletonList(new HTTPLogItem() +.ddsource("nginx") +.ddtags("env:staging,version:5.1") +.hostname("i-012345678") +.message("2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World") +.service("payment")); try { - apiInstance.submitLog( - body, new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.DEFLATE)); + apiInstance.submitLog(body,new SubmitLogOptionalParameters().contentEncoding(ContentEncoding.DEFLATE)); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#submitLog"); System.err.println("Status code: " + e.getCode()); @@ -34,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.java b/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.java index dfbf8c75817..2d0c0dc3f22 100644 --- a/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.java +++ b/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.java @@ -1,15 +1,19 @@ // Configure tags for multiple metrics returns "Accepted" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.MetricBulkTagConfigResponse; import com.datadog.api.client.v2.model.MetricBulkConfigureTagsType; import com.datadog.api.client.v2.model.MetricBulkTagConfigCreate; import com.datadog.api.client.v2.model.MetricBulkTagConfigCreateAttributes; import com.datadog.api.client.v2.model.MetricBulkTagConfigCreateRequest; -import com.datadog.api.client.v2.model.MetricBulkTagConfigResponse; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,19 +23,13 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ATTRIBUTES_EMAIL = System.getenv("USER_DATA_ATTRIBUTES_EMAIL"); - MetricBulkTagConfigCreateRequest body = - new MetricBulkTagConfigCreateRequest() - .data( - new MetricBulkTagConfigCreate() - .attributes( - new MetricBulkTagConfigCreateAttributes() - .emails(Collections.singletonList(USER_DATA_ATTRIBUTES_EMAIL)) - .tags( - Arrays.asList( - "test", - "exampleconfiguretagsformultiplemetricsreturnsacceptedresponse"))) - .id("system.load.1") - .type(MetricBulkConfigureTagsType.BULK_MANAGE_TAGS)); + MetricBulkTagConfigCreateRequest body = new MetricBulkTagConfigCreateRequest() +.data(new MetricBulkTagConfigCreate() +.attributes(new MetricBulkTagConfigCreateAttributes() +.emails(Collections.singletonList(USER_DATA_ATTRIBUTES_EMAIL)) +.tags(Arrays.asList("test", "exampleconfiguretagsformultiplemetricsreturnsacceptedresponse"))) +.id("system.load.1") +.type(MetricBulkConfigureTagsType.BULK_MANAGE_TAGS)); try { MetricBulkTagConfigResponse result = apiInstance.createBulkTagsMetricsConfiguration(body); @@ -44,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/CreateTagConfiguration.java b/examples/v2/metrics/CreateTagConfiguration.java index 628e48bcd88..f2c448e4cb1 100644 --- a/examples/v2/metrics/CreateTagConfiguration.java +++ b/examples/v2/metrics/CreateTagConfiguration.java @@ -1,36 +1,36 @@ // Create a tag configuration returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationCreateAttributes; import com.datadog.api.client.v2.model.MetricTagConfigurationCreateData; import com.datadog.api.client.v2.model.MetricTagConfigurationCreateRequest; import com.datadog.api.client.v2.model.MetricTagConfigurationMetricTypes; -import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - MetricTagConfigurationCreateRequest body = - new MetricTagConfigurationCreateRequest() - .data( - new MetricTagConfigurationCreateData() - .type(MetricTagConfigurationType.MANAGE_TAGS) - .id("ExampleCreateatagconfigurationreturnsCreatedresponse") - .attributes( - new MetricTagConfigurationCreateAttributes() - .tags(Arrays.asList("app", "datacenter")) - .metricType(MetricTagConfigurationMetricTypes.GAUGE))); + MetricTagConfigurationCreateRequest body = new MetricTagConfigurationCreateRequest() +.data(new MetricTagConfigurationCreateData() +.type(MetricTagConfigurationType.MANAGE_TAGS) +.id("ExampleCreateatagconfigurationreturnsCreatedresponse") +.attributes(new MetricTagConfigurationCreateAttributes() +.tags(Arrays.asList("app", "datacenter")) +.metricType(MetricTagConfigurationMetricTypes.GAUGE))); try { - MetricTagConfigurationResponse result = - apiInstance.createTagConfiguration( - "ExampleCreateatagconfigurationreturnsCreatedresponse", body); + MetricTagConfigurationResponse result = apiInstance.createTagConfiguration("ExampleCreateatagconfigurationreturnsCreatedresponse", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#createTagConfiguration"); @@ -40,4 +40,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/DeleteTagConfiguration.java b/examples/v2/metrics/DeleteTagConfiguration.java index 73f5eadc0fc..6ce6939df5d 100644 --- a/examples/v2/metrics/DeleteTagConfiguration.java +++ b/examples/v2/metrics/DeleteTagConfiguration.java @@ -1,8 +1,14 @@ // Delete a tag configuration returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/EstimateMetricsOutputSeries.java b/examples/v2/metrics/EstimateMetricsOutputSeries.java index d7b146b292c..bb15f3b6d61 100644 --- a/examples/v2/metrics/EstimateMetricsOutputSeries.java +++ b/examples/v2/metrics/EstimateMetricsOutputSeries.java @@ -1,10 +1,16 @@ // Tag Configuration Cardinality Estimator returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.api.MetricsApi.EstimateMetricsOutputSeriesOptionalParameters; import com.datadog.api.client.v2.model.MetricEstimateResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +18,7 @@ public static void main(String[] args) { MetricsApi apiInstance = new MetricsApi(defaultClient); try { - MetricEstimateResponse result = - apiInstance.estimateMetricsOutputSeries( - "system.cpu.idle", - new EstimateMetricsOutputSeriesOptionalParameters() - .filterGroups("app,host") - .filterNumAggregations(4)); + MetricEstimateResponse result = apiInstance.estimateMetricsOutputSeries("system.cpu.idle",new EstimateMetricsOutputSeriesOptionalParameters().filterGroups("app,host").filterNumAggregations(4)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#estimateMetricsOutputSeries"); @@ -27,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListActiveMetricConfigurations.java b/examples/v2/metrics/ListActiveMetricConfigurations.java index b43877c9648..a0904ded72b 100644 --- a/examples/v2/metrics/ListActiveMetricConfigurations.java +++ b/examples/v2/metrics/ListActiveMetricConfigurations.java @@ -1,9 +1,15 @@ // List active tags and aggregations returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.MetricSuggestedTagsAndAggregationsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,9 +17,7 @@ public static void main(String[] args) { MetricsApi apiInstance = new MetricsApi(defaultClient); try { - MetricSuggestedTagsAndAggregationsResponse result = - apiInstance.listActiveMetricConfigurations( - "ExampleListactivetagsandaggregationsreturnsSuccessresponse"); + MetricSuggestedTagsAndAggregationsResponse result = apiInstance.listActiveMetricConfigurations("ExampleListactivetagsandaggregationsreturnsSuccessresponse"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#listActiveMetricConfigurations"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListTagConfigurationByName.java b/examples/v2/metrics/ListTagConfigurationByName.java index 133a3377f9f..6b056ac2d36 100644 --- a/examples/v2/metrics/ListTagConfigurationByName.java +++ b/examples/v2/metrics/ListTagConfigurationByName.java @@ -1,9 +1,15 @@ // List tag configuration by name returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,7 @@ public static void main(String[] args) { String METRIC_TAG_CONFIGURATION_DATA_ID = System.getenv("METRIC_TAG_CONFIGURATION_DATA_ID"); try { - MetricTagConfigurationResponse result = - apiInstance.listTagConfigurationByName(METRIC_TAG_CONFIGURATION_DATA_ID); + MetricTagConfigurationResponse result = apiInstance.listTagConfigurationByName(METRIC_TAG_CONFIGURATION_DATA_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#listTagConfigurationByName"); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListTagConfigurations.java b/examples/v2/metrics/ListTagConfigurations.java index 50b65f38814..ee2d35e615d 100644 --- a/examples/v2/metrics/ListTagConfigurations.java +++ b/examples/v2/metrics/ListTagConfigurations.java @@ -1,9 +1,15 @@ // Get a list of metrics returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListTagConfigurations_265033704.java b/examples/v2/metrics/ListTagConfigurations_265033704.java index ae7fb984ff7..3cdf963cbab 100644 --- a/examples/v2/metrics/ListTagConfigurations_265033704.java +++ b/examples/v2/metrics/ListTagConfigurations_265033704.java @@ -1,10 +1,16 @@ // Get a list of metrics with a tag filter returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.api.MetricsApi.ListTagConfigurationsOptionalParameters; import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +18,7 @@ public static void main(String[] args) { MetricsApi apiInstance = new MetricsApi(defaultClient); try { - MetricsAndMetricTagConfigurationsResponse result = - apiInstance.listTagConfigurations( - new ListTagConfigurationsOptionalParameters() - .filterTags("ExampleGetalistofmetricswithatagfilterreturnsSuccessresponse")); + MetricsAndMetricTagConfigurationsResponse result = apiInstance.listTagConfigurations(new ListTagConfigurationsOptionalParameters().filterTags("ExampleGetalistofmetricswithatagfilterreturnsSuccessresponse")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#listTagConfigurations"); @@ -25,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListTagConfigurations_2739018321.java b/examples/v2/metrics/ListTagConfigurations_2739018321.java index d1782c50b92..1158678a3f6 100644 --- a/examples/v2/metrics/ListTagConfigurations_2739018321.java +++ b/examples/v2/metrics/ListTagConfigurations_2739018321.java @@ -1,10 +1,16 @@ // Get a list of metrics with configured filter returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.api.MetricsApi.ListTagConfigurationsOptionalParameters; import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,9 +18,7 @@ public static void main(String[] args) { MetricsApi apiInstance = new MetricsApi(defaultClient); try { - MetricsAndMetricTagConfigurationsResponse result = - apiInstance.listTagConfigurations( - new ListTagConfigurationsOptionalParameters().filterConfigured(true)); + MetricsAndMetricTagConfigurationsResponse result = apiInstance.listTagConfigurations(new ListTagConfigurationsOptionalParameters().filterConfigured(true)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#listTagConfigurations"); @@ -24,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListTagsByMetricName.java b/examples/v2/metrics/ListTagsByMetricName.java index 5146710ee03..05492cb9db4 100644 --- a/examples/v2/metrics/ListTagsByMetricName.java +++ b/examples/v2/metrics/ListTagsByMetricName.java @@ -1,9 +1,15 @@ // List tags by metric name returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.MetricAllTagsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,7 @@ public static void main(String[] args) { String METRIC_TAG_CONFIGURATION_DATA_ID = System.getenv("METRIC_TAG_CONFIGURATION_DATA_ID"); try { - MetricAllTagsResponse result = - apiInstance.listTagsByMetricName(METRIC_TAG_CONFIGURATION_DATA_ID); + MetricAllTagsResponse result = apiInstance.listTagsByMetricName(METRIC_TAG_CONFIGURATION_DATA_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#listTagsByMetricName"); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/ListVolumesByMetricName.java b/examples/v2/metrics/ListVolumesByMetricName.java index 6663ca36c08..674c015e9de 100644 --- a/examples/v2/metrics/ListVolumesByMetricName.java +++ b/examples/v2/metrics/ListVolumesByMetricName.java @@ -1,9 +1,15 @@ // List distinct metric volumes by metric name returns "Success" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.MetricVolumesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,9 +17,7 @@ public static void main(String[] args) { MetricsApi apiInstance = new MetricsApi(defaultClient); try { - MetricVolumesResponse result = - apiInstance.listVolumesByMetricName( - "ExampleListdistinctmetricvolumesbymetricnamereturnsSuccessresponse"); + MetricVolumesResponse result = apiInstance.listVolumesByMetricName("ExampleListdistinctmetricvolumesbymetricnamereturnsSuccessresponse"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#listVolumesByMetricName"); @@ -23,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/QueryScalarData.java b/examples/v2/metrics/QueryScalarData.java index b90489b0728..76463ea8381 100644 --- a/examples/v2/metrics/QueryScalarData.java +++ b/examples/v2/metrics/QueryScalarData.java @@ -1,8 +1,9 @@ // Query scalar data across multiple products returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.ScalarFormulaQueryResponse; import com.datadog.api.client.v2.model.FormulaLimit; import com.datadog.api.client.v2.model.MetricsAggregator; import com.datadog.api.client.v2.model.MetricsDataSource; @@ -10,12 +11,16 @@ import com.datadog.api.client.v2.model.QueryFormula; import com.datadog.api.client.v2.model.QuerySortOrder; import com.datadog.api.client.v2.model.ScalarFormulaQueryRequest; -import com.datadog.api.client.v2.model.ScalarFormulaQueryResponse; import com.datadog.api.client.v2.model.ScalarFormulaRequest; import com.datadog.api.client.v2.model.ScalarFormulaRequestAttributes; import com.datadog.api.client.v2.model.ScalarFormulaRequestType; import com.datadog.api.client.v2.model.ScalarQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,30 +28,22 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.queryScalarData", true); MetricsApi apiInstance = new MetricsApi(defaultClient); - ScalarFormulaQueryRequest body = - new ScalarFormulaQueryRequest() - .data( - new ScalarFormulaRequest() - .attributes( - new ScalarFormulaRequestAttributes() - .formulas( - Collections.singletonList( - new QueryFormula() - .formula("a+b") - .limit( - new FormulaLimit() - .count(10) - .order(QuerySortOrder.DESC)))) - .from(1568899800000L) - .queries( - Collections.singletonList( - new ScalarQuery( - new MetricsScalarQuery() - .aggregator(MetricsAggregator.AVG) - .dataSource(MetricsDataSource.METRICS) - .query("avg:system.cpu.user{*} by {env}")))) - .to(1568923200000L)) - .type(ScalarFormulaRequestType.SCALAR_REQUEST)); + ScalarFormulaQueryRequest body = new ScalarFormulaQueryRequest() +.data(new ScalarFormulaRequest() +.attributes(new ScalarFormulaRequestAttributes() +.formulas(Collections.singletonList(new QueryFormula() +.formula("a+b") +.limit(new FormulaLimit() +.count(10) +.order(QuerySortOrder.DESC)))) +.from(1568899800000L) +.queries(Collections.singletonList(new ScalarQuery( +new MetricsScalarQuery() +.aggregator(MetricsAggregator.AVG) +.dataSource(MetricsDataSource.METRICS) +.query("avg:system.cpu.user{*} by {env}")))) +.to(1568923200000L)) +.type(ScalarFormulaRequestType.SCALAR_REQUEST)); try { ScalarFormulaQueryResponse result = apiInstance.queryScalarData(body); @@ -59,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/QueryScalarData_3112571352.java b/examples/v2/metrics/QueryScalarData_3112571352.java index e68bfa3c125..5c6572c1c08 100644 --- a/examples/v2/metrics/QueryScalarData_3112571352.java +++ b/examples/v2/metrics/QueryScalarData_3112571352.java @@ -1,8 +1,9 @@ // Scalar cross product query returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.ScalarFormulaQueryResponse; import com.datadog.api.client.v2.model.FormulaLimit; import com.datadog.api.client.v2.model.MetricsAggregator; import com.datadog.api.client.v2.model.MetricsDataSource; @@ -10,12 +11,16 @@ import com.datadog.api.client.v2.model.QueryFormula; import com.datadog.api.client.v2.model.QuerySortOrder; import com.datadog.api.client.v2.model.ScalarFormulaQueryRequest; -import com.datadog.api.client.v2.model.ScalarFormulaQueryResponse; import com.datadog.api.client.v2.model.ScalarFormulaRequest; import com.datadog.api.client.v2.model.ScalarFormulaRequestAttributes; import com.datadog.api.client.v2.model.ScalarFormulaRequestType; import com.datadog.api.client.v2.model.ScalarQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -23,31 +28,23 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.queryScalarData", true); MetricsApi apiInstance = new MetricsApi(defaultClient); - ScalarFormulaQueryRequest body = - new ScalarFormulaQueryRequest() - .data( - new ScalarFormulaRequest() - .attributes( - new ScalarFormulaRequestAttributes() - .formulas( - Collections.singletonList( - new QueryFormula() - .formula("a") - .limit( - new FormulaLimit() - .count(10) - .order(QuerySortOrder.DESC)))) - .from(1671612804000L) - .queries( - Collections.singletonList( - new ScalarQuery( - new MetricsScalarQuery() - .aggregator(MetricsAggregator.AVG) - .dataSource(MetricsDataSource.METRICS) - .query("avg:system.cpu.user{*}") - .name("a")))) - .to(1671620004000L)) - .type(ScalarFormulaRequestType.SCALAR_REQUEST)); + ScalarFormulaQueryRequest body = new ScalarFormulaQueryRequest() +.data(new ScalarFormulaRequest() +.attributes(new ScalarFormulaRequestAttributes() +.formulas(Collections.singletonList(new QueryFormula() +.formula("a") +.limit(new FormulaLimit() +.count(10) +.order(QuerySortOrder.DESC)))) +.from(1671612804000L) +.queries(Collections.singletonList(new ScalarQuery( +new MetricsScalarQuery() +.aggregator(MetricsAggregator.AVG) +.dataSource(MetricsDataSource.METRICS) +.query("avg:system.cpu.user{*}") +.name("a")))) +.to(1671620004000L)) +.type(ScalarFormulaRequestType.SCALAR_REQUEST)); try { ScalarFormulaQueryResponse result = apiInstance.queryScalarData(body); @@ -60,4 +57,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/QueryTimeseriesData.java b/examples/v2/metrics/QueryTimeseriesData.java index 1e06a5d393f..642e3e710ff 100644 --- a/examples/v2/metrics/QueryTimeseriesData.java +++ b/examples/v2/metrics/QueryTimeseriesData.java @@ -1,20 +1,25 @@ // Query timeseries data across multiple products returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TimeseriesFormulaQueryResponse; import com.datadog.api.client.v2.model.FormulaLimit; import com.datadog.api.client.v2.model.MetricsDataSource; import com.datadog.api.client.v2.model.MetricsTimeseriesQuery; import com.datadog.api.client.v2.model.QueryFormula; import com.datadog.api.client.v2.model.QuerySortOrder; import com.datadog.api.client.v2.model.TimeseriesFormulaQueryRequest; -import com.datadog.api.client.v2.model.TimeseriesFormulaQueryResponse; import com.datadog.api.client.v2.model.TimeseriesFormulaRequest; import com.datadog.api.client.v2.model.TimeseriesFormulaRequestAttributes; import com.datadog.api.client.v2.model.TimeseriesFormulaRequestType; import com.datadog.api.client.v2.model.TimeseriesQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,30 +27,22 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.queryTimeseriesData", true); MetricsApi apiInstance = new MetricsApi(defaultClient); - TimeseriesFormulaQueryRequest body = - new TimeseriesFormulaQueryRequest() - .data( - new TimeseriesFormulaRequest() - .attributes( - new TimeseriesFormulaRequestAttributes() - .formulas( - Collections.singletonList( - new QueryFormula() - .formula("a+b") - .limit( - new FormulaLimit() - .count(10) - .order(QuerySortOrder.DESC)))) - .from(1568899800000L) - .interval(5000L) - .queries( - Collections.singletonList( - new TimeseriesQuery( - new MetricsTimeseriesQuery() - .dataSource(MetricsDataSource.METRICS) - .query("avg:system.cpu.user{*} by {env}")))) - .to(1568923200000L)) - .type(TimeseriesFormulaRequestType.TIMESERIES_REQUEST)); + TimeseriesFormulaQueryRequest body = new TimeseriesFormulaQueryRequest() +.data(new TimeseriesFormulaRequest() +.attributes(new TimeseriesFormulaRequestAttributes() +.formulas(Collections.singletonList(new QueryFormula() +.formula("a+b") +.limit(new FormulaLimit() +.count(10) +.order(QuerySortOrder.DESC)))) +.from(1568899800000L) +.interval(5000L) +.queries(Collections.singletonList(new TimeseriesQuery( +new MetricsTimeseriesQuery() +.dataSource(MetricsDataSource.METRICS) +.query("avg:system.cpu.user{*} by {env}")))) +.to(1568923200000L)) +.type(TimeseriesFormulaRequestType.TIMESERIES_REQUEST)); try { TimeseriesFormulaQueryResponse result = apiInstance.queryTimeseriesData(body); @@ -58,4 +55,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/QueryTimeseriesData_301142940.java b/examples/v2/metrics/QueryTimeseriesData_301142940.java index ae0cb70e46e..76f1c79caaf 100644 --- a/examples/v2/metrics/QueryTimeseriesData_301142940.java +++ b/examples/v2/metrics/QueryTimeseriesData_301142940.java @@ -1,20 +1,25 @@ // Timeseries cross product query returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TimeseriesFormulaQueryResponse; import com.datadog.api.client.v2.model.FormulaLimit; import com.datadog.api.client.v2.model.MetricsDataSource; import com.datadog.api.client.v2.model.MetricsTimeseriesQuery; import com.datadog.api.client.v2.model.QueryFormula; import com.datadog.api.client.v2.model.QuerySortOrder; import com.datadog.api.client.v2.model.TimeseriesFormulaQueryRequest; -import com.datadog.api.client.v2.model.TimeseriesFormulaQueryResponse; import com.datadog.api.client.v2.model.TimeseriesFormulaRequest; import com.datadog.api.client.v2.model.TimeseriesFormulaRequestAttributes; import com.datadog.api.client.v2.model.TimeseriesFormulaRequestType; import com.datadog.api.client.v2.model.TimeseriesQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,31 +27,23 @@ public static void main(String[] args) { defaultClient.setUnstableOperationEnabled("v2.queryTimeseriesData", true); MetricsApi apiInstance = new MetricsApi(defaultClient); - TimeseriesFormulaQueryRequest body = - new TimeseriesFormulaQueryRequest() - .data( - new TimeseriesFormulaRequest() - .attributes( - new TimeseriesFormulaRequestAttributes() - .formulas( - Collections.singletonList( - new QueryFormula() - .formula("a") - .limit( - new FormulaLimit() - .count(10) - .order(QuerySortOrder.DESC)))) - .from(1671612804000L) - .interval(5000L) - .queries( - Collections.singletonList( - new TimeseriesQuery( - new MetricsTimeseriesQuery() - .dataSource(MetricsDataSource.METRICS) - .query("avg:system.cpu.user{*}") - .name("a")))) - .to(1671620004000L)) - .type(TimeseriesFormulaRequestType.TIMESERIES_REQUEST)); + TimeseriesFormulaQueryRequest body = new TimeseriesFormulaQueryRequest() +.data(new TimeseriesFormulaRequest() +.attributes(new TimeseriesFormulaRequestAttributes() +.formulas(Collections.singletonList(new QueryFormula() +.formula("a") +.limit(new FormulaLimit() +.count(10) +.order(QuerySortOrder.DESC)))) +.from(1671612804000L) +.interval(5000L) +.queries(Collections.singletonList(new TimeseriesQuery( +new MetricsTimeseriesQuery() +.dataSource(MetricsDataSource.METRICS) +.query("avg:system.cpu.user{*}") +.name("a")))) +.to(1671620004000L)) +.type(TimeseriesFormulaRequestType.TIMESERIES_REQUEST)); try { TimeseriesFormulaQueryResponse result = apiInstance.queryTimeseriesData(body); @@ -59,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/SubmitMetrics.java b/examples/v2/metrics/SubmitMetrics.java index 5234b93b0a3..522d3402443 100644 --- a/examples/v2/metrics/SubmitMetrics.java +++ b/examples/v2/metrics/SubmitMetrics.java @@ -1,6 +1,8 @@ // Submit metrics returns "Payload accepted" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.IntakePayloadAccepted; import com.datadog.api.client.v2.model.MetricIntakeType; @@ -8,29 +10,28 @@ import com.datadog.api.client.v2.model.MetricPoint; import com.datadog.api.client.v2.model.MetricResource; import com.datadog.api.client.v2.model.MetricSeries; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - MetricPayload body = - new MetricPayload() - .series( - Collections.singletonList( - new MetricSeries() - .metric("system.load.1") - .type(MetricIntakeType.UNSPECIFIED) - .points( - Collections.singletonList( - new MetricPoint() - .timestamp(OffsetDateTime.now().toInstant().getEpochSecond()) - .value(0.7))) - .resources( - Collections.singletonList( - new MetricResource().name("dummyhost").type("host"))))); + MetricPayload body = new MetricPayload() +.series(Collections.singletonList(new MetricSeries() +.metric("system.load.1") +.type(MetricIntakeType.UNSPECIFIED) +.points(Collections.singletonList(new MetricPoint() +.timestamp(OffsetDateTime.now().toInstant().getEpochSecond()) +.value(0.7))) +.resources(Collections.singletonList(new MetricResource() +.name("dummyhost") +.type("host"))))); try { IntakePayloadAccepted result = apiInstance.submitMetrics(body); @@ -43,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/SubmitMetrics_1762007427.java b/examples/v2/metrics/SubmitMetrics_1762007427.java index 38130eb0fb4..821b781007c 100644 --- a/examples/v2/metrics/SubmitMetrics_1762007427.java +++ b/examples/v2/metrics/SubmitMetrics_1762007427.java @@ -1,6 +1,8 @@ // Submit metrics with compression returns "Payload accepted" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.api.MetricsApi.SubmitMetricsOptionalParameters; import com.datadog.api.client.v2.model.IntakePayloadAccepted; @@ -9,32 +11,28 @@ import com.datadog.api.client.v2.model.MetricPayload; import com.datadog.api.client.v2.model.MetricPoint; import com.datadog.api.client.v2.model.MetricSeries; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MetricsApi apiInstance = new MetricsApi(defaultClient); - MetricPayload body = - new MetricPayload() - .series( - Collections.singletonList( - new MetricSeries() - .metric("system.load.1") - .type(MetricIntakeType.UNSPECIFIED) - .points( - Collections.singletonList( - new MetricPoint() - .timestamp(OffsetDateTime.now().toInstant().getEpochSecond()) - .value(0.7))))); + MetricPayload body = new MetricPayload() +.series(Collections.singletonList(new MetricSeries() +.metric("system.load.1") +.type(MetricIntakeType.UNSPECIFIED) +.points(Collections.singletonList(new MetricPoint() +.timestamp(OffsetDateTime.now().toInstant().getEpochSecond()) +.value(0.7))))); try { - IntakePayloadAccepted result = - apiInstance.submitMetrics( - body, - new SubmitMetricsOptionalParameters().contentEncoding(MetricContentEncoding.ZSTD1)); + IntakePayloadAccepted result = apiInstance.submitMetrics(body,new SubmitMetricsOptionalParameters().contentEncoding(MetricContentEncoding.ZSTD1)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#submitMetrics"); @@ -44,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/metrics/UpdateTagConfiguration.java b/examples/v2/metrics/UpdateTagConfiguration.java index 42ed710f9cc..c1edf3f0ca7 100644 --- a/examples/v2/metrics/UpdateTagConfiguration.java +++ b/examples/v2/metrics/UpdateTagConfiguration.java @@ -1,14 +1,19 @@ // Update a tag configuration returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MetricsApi; import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationType; import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateAttributes; import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateData; import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -18,19 +23,15 @@ public static void main(String[] args) { // there is a valid "metric_tag_configuration" in the system String METRIC_TAG_CONFIGURATION_DATA_ID = System.getenv("METRIC_TAG_CONFIGURATION_DATA_ID"); - MetricTagConfigurationUpdateRequest body = - new MetricTagConfigurationUpdateRequest() - .data( - new MetricTagConfigurationUpdateData() - .type(MetricTagConfigurationType.MANAGE_TAGS) - .id(METRIC_TAG_CONFIGURATION_DATA_ID) - .attributes( - new MetricTagConfigurationUpdateAttributes() - .tags(Collections.singletonList("app")))); + MetricTagConfigurationUpdateRequest body = new MetricTagConfigurationUpdateRequest() +.data(new MetricTagConfigurationUpdateData() +.type(MetricTagConfigurationType.MANAGE_TAGS) +.id(METRIC_TAG_CONFIGURATION_DATA_ID) +.attributes(new MetricTagConfigurationUpdateAttributes() +.tags(Collections.singletonList("app")))); try { - MetricTagConfigurationResponse result = - apiInstance.updateTagConfiguration(METRIC_TAG_CONFIGURATION_DATA_ID, body); + MetricTagConfigurationResponse result = apiInstance.updateTagConfiguration(METRIC_TAG_CONFIGURATION_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MetricsApi#updateTagConfiguration"); @@ -40,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/monitors/CreateMonitorConfigPolicy.java b/examples/v2/monitors/CreateMonitorConfigPolicy.java index 6fb3bdf4081..9820c6dbc2e 100644 --- a/examples/v2/monitors/CreateMonitorConfigPolicy.java +++ b/examples/v2/monitors/CreateMonitorConfigPolicy.java @@ -1,37 +1,38 @@ // Create a monitor configuration policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MonitorsApi; +import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; import com.datadog.api.client.v2.model.MonitorConfigPolicyAttributeCreateRequest; import com.datadog.api.client.v2.model.MonitorConfigPolicyCreateData; import com.datadog.api.client.v2.model.MonitorConfigPolicyCreateRequest; import com.datadog.api.client.v2.model.MonitorConfigPolicyPolicyCreateRequest; import com.datadog.api.client.v2.model.MonitorConfigPolicyResourceType; -import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; import com.datadog.api.client.v2.model.MonitorConfigPolicyTagPolicyCreateRequest; import com.datadog.api.client.v2.model.MonitorConfigPolicyType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); MonitorsApi apiInstance = new MonitorsApi(defaultClient); - MonitorConfigPolicyCreateRequest body = - new MonitorConfigPolicyCreateRequest() - .data( - new MonitorConfigPolicyCreateData() - .attributes( - new MonitorConfigPolicyAttributeCreateRequest() - .policyType(MonitorConfigPolicyType.TAG) - .policy( - new MonitorConfigPolicyPolicyCreateRequest( - new MonitorConfigPolicyTagPolicyCreateRequest() - .tagKey("datacenter") - .tagKeyRequired(true) - .validTagValues(Arrays.asList("prod", "staging"))))) - .type(MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY)); + MonitorConfigPolicyCreateRequest body = new MonitorConfigPolicyCreateRequest() +.data(new MonitorConfigPolicyCreateData() +.attributes(new MonitorConfigPolicyAttributeCreateRequest() +.policyType(MonitorConfigPolicyType.TAG) +.policy(new MonitorConfigPolicyPolicyCreateRequest( +new MonitorConfigPolicyTagPolicyCreateRequest() +.tagKey("datacenter") +.tagKeyRequired(true) +.validTagValues(Arrays.asList("prod", "staging"))))) +.type(MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY)); try { MonitorConfigPolicyResponse result = apiInstance.createMonitorConfigPolicy(body); @@ -44,4 +45,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/monitors/DeleteMonitorConfigPolicy.java b/examples/v2/monitors/DeleteMonitorConfigPolicy.java index d0c123bd136..4a9d3616fd0 100644 --- a/examples/v2/monitors/DeleteMonitorConfigPolicy.java +++ b/examples/v2/monitors/DeleteMonitorConfigPolicy.java @@ -1,8 +1,14 @@ // Delete a monitor configuration policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MonitorsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -10,8 +16,7 @@ public static void main(String[] args) { MonitorsApi apiInstance = new MonitorsApi(defaultClient); // there is a valid "monitor_configuration_policy" in the system - String MONITOR_CONFIGURATION_POLICY_DATA_ID = - System.getenv("MONITOR_CONFIGURATION_POLICY_DATA_ID"); + String MONITOR_CONFIGURATION_POLICY_DATA_ID = System.getenv("MONITOR_CONFIGURATION_POLICY_DATA_ID"); try { apiInstance.deleteMonitorConfigPolicy(MONITOR_CONFIGURATION_POLICY_DATA_ID); @@ -23,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/monitors/GetMonitorConfigPolicy.java b/examples/v2/monitors/GetMonitorConfigPolicy.java index cdac12ab7c7..e0b3f9c5a31 100644 --- a/examples/v2/monitors/GetMonitorConfigPolicy.java +++ b/examples/v2/monitors/GetMonitorConfigPolicy.java @@ -1,9 +1,15 @@ // Get a monitor configuration policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MonitorsApi; import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,12 +17,10 @@ public static void main(String[] args) { MonitorsApi apiInstance = new MonitorsApi(defaultClient); // there is a valid "monitor_configuration_policy" in the system - String MONITOR_CONFIGURATION_POLICY_DATA_ID = - System.getenv("MONITOR_CONFIGURATION_POLICY_DATA_ID"); + String MONITOR_CONFIGURATION_POLICY_DATA_ID = System.getenv("MONITOR_CONFIGURATION_POLICY_DATA_ID"); try { - MonitorConfigPolicyResponse result = - apiInstance.getMonitorConfigPolicy(MONITOR_CONFIGURATION_POLICY_DATA_ID); + MonitorConfigPolicyResponse result = apiInstance.getMonitorConfigPolicy(MONITOR_CONFIGURATION_POLICY_DATA_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MonitorsApi#getMonitorConfigPolicy"); @@ -26,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/monitors/ListMonitorConfigPolicies.java b/examples/v2/monitors/ListMonitorConfigPolicies.java index 00c6477f551..9bebd4faca7 100644 --- a/examples/v2/monitors/ListMonitorConfigPolicies.java +++ b/examples/v2/monitors/ListMonitorConfigPolicies.java @@ -1,9 +1,15 @@ // Get all monitor configuration policies returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MonitorsApi; import com.datadog.api.client.v2.model.MonitorConfigPolicyListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/monitors/UpdateMonitorConfigPolicy.java b/examples/v2/monitors/UpdateMonitorConfigPolicy.java index e1a644d1bca..9db295c80f5 100644 --- a/examples/v2/monitors/UpdateMonitorConfigPolicy.java +++ b/examples/v2/monitors/UpdateMonitorConfigPolicy.java @@ -1,17 +1,22 @@ // Edit a monitor configuration policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.MonitorsApi; +import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; import com.datadog.api.client.v2.model.MonitorConfigPolicyAttributeEditRequest; import com.datadog.api.client.v2.model.MonitorConfigPolicyEditData; import com.datadog.api.client.v2.model.MonitorConfigPolicyEditRequest; import com.datadog.api.client.v2.model.MonitorConfigPolicyPolicy; import com.datadog.api.client.v2.model.MonitorConfigPolicyResourceType; -import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; import com.datadog.api.client.v2.model.MonitorConfigPolicyTagPolicy; import com.datadog.api.client.v2.model.MonitorConfigPolicyType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,28 +24,22 @@ public static void main(String[] args) { MonitorsApi apiInstance = new MonitorsApi(defaultClient); // there is a valid "monitor_configuration_policy" in the system - String MONITOR_CONFIGURATION_POLICY_DATA_ID = - System.getenv("MONITOR_CONFIGURATION_POLICY_DATA_ID"); + String MONITOR_CONFIGURATION_POLICY_DATA_ID = System.getenv("MONITOR_CONFIGURATION_POLICY_DATA_ID"); - MonitorConfigPolicyEditRequest body = - new MonitorConfigPolicyEditRequest() - .data( - new MonitorConfigPolicyEditData() - .attributes( - new MonitorConfigPolicyAttributeEditRequest() - .policy( - new MonitorConfigPolicyPolicy( - new MonitorConfigPolicyTagPolicy() - .tagKey("datacenter") - .tagKeyRequired(true) - .validTagValues(Arrays.asList("prod", "staging")))) - .policyType(MonitorConfigPolicyType.TAG)) - .id(MONITOR_CONFIGURATION_POLICY_DATA_ID) - .type(MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY)); + MonitorConfigPolicyEditRequest body = new MonitorConfigPolicyEditRequest() +.data(new MonitorConfigPolicyEditData() +.attributes(new MonitorConfigPolicyAttributeEditRequest() +.policy(new MonitorConfigPolicyPolicy( +new MonitorConfigPolicyTagPolicy() +.tagKey("datacenter") +.tagKeyRequired(true) +.validTagValues(Arrays.asList("prod", "staging")))) +.policyType(MonitorConfigPolicyType.TAG)) +.id(MONITOR_CONFIGURATION_POLICY_DATA_ID) +.type(MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY)); try { - MonitorConfigPolicyResponse result = - apiInstance.updateMonitorConfigPolicy(MONITOR_CONFIGURATION_POLICY_DATA_ID, body); + MonitorConfigPolicyResponse result = apiInstance.updateMonitorConfigPolicy(MONITOR_CONFIGURATION_POLICY_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MonitorsApi#updateMonitorConfigPolicy"); @@ -50,4 +49,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/opsgenie-integration/CreateOpsgenieService.java b/examples/v2/opsgenie-integration/CreateOpsgenieService.java index 692bb6b6035..e5cab0ba65c 100644 --- a/examples/v2/opsgenie-integration/CreateOpsgenieService.java +++ b/examples/v2/opsgenie-integration/CreateOpsgenieService.java @@ -1,30 +1,33 @@ // Create a new service object returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.OpsgenieIntegrationApi; +import com.datadog.api.client.v2.model.OpsgenieServiceResponse; import com.datadog.api.client.v2.model.OpsgenieServiceCreateAttributes; import com.datadog.api.client.v2.model.OpsgenieServiceCreateData; import com.datadog.api.client.v2.model.OpsgenieServiceCreateRequest; import com.datadog.api.client.v2.model.OpsgenieServiceRegionType; -import com.datadog.api.client.v2.model.OpsgenieServiceResponse; import com.datadog.api.client.v2.model.OpsgenieServiceType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); OpsgenieIntegrationApi apiInstance = new OpsgenieIntegrationApi(defaultClient); - OpsgenieServiceCreateRequest body = - new OpsgenieServiceCreateRequest() - .data( - new OpsgenieServiceCreateData() - .attributes( - new OpsgenieServiceCreateAttributes() - .name("Example-Create_a_new_service_object_returns_CREATED_response") - .opsgenieApiKey("00000000-0000-0000-0000-000000000000") - .region(OpsgenieServiceRegionType.US)) - .type(OpsgenieServiceType.OPSGENIE_SERVICE)); + OpsgenieServiceCreateRequest body = new OpsgenieServiceCreateRequest() +.data(new OpsgenieServiceCreateData() +.attributes(new OpsgenieServiceCreateAttributes() +.name("Example-Create_a_new_service_object_returns_CREATED_response") +.opsgenieApiKey("00000000-0000-0000-0000-000000000000") +.region(OpsgenieServiceRegionType.US)) +.type(OpsgenieServiceType.OPSGENIE_SERVICE)); try { OpsgenieServiceResponse result = apiInstance.createOpsgenieService(body); @@ -37,4 +40,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/opsgenie-integration/DeleteOpsgenieService.java b/examples/v2/opsgenie-integration/DeleteOpsgenieService.java index 709975554a2..04fce4d2132 100644 --- a/examples/v2/opsgenie-integration/DeleteOpsgenieService.java +++ b/examples/v2/opsgenie-integration/DeleteOpsgenieService.java @@ -1,8 +1,14 @@ // Delete a single service object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.OpsgenieIntegrationApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/opsgenie-integration/GetOpsgenieService.java b/examples/v2/opsgenie-integration/GetOpsgenieService.java index 499ce354f3f..6926a83565c 100644 --- a/examples/v2/opsgenie-integration/GetOpsgenieService.java +++ b/examples/v2/opsgenie-integration/GetOpsgenieService.java @@ -1,9 +1,15 @@ // Get a single service object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.OpsgenieIntegrationApi; import com.datadog.api.client.v2.model.OpsgenieServiceResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/opsgenie-integration/ListOpsgenieServices.java b/examples/v2/opsgenie-integration/ListOpsgenieServices.java index 4fc5939ff77..beb75ba5b39 100644 --- a/examples/v2/opsgenie-integration/ListOpsgenieServices.java +++ b/examples/v2/opsgenie-integration/ListOpsgenieServices.java @@ -1,9 +1,15 @@ // Get all service objects returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.OpsgenieIntegrationApi; import com.datadog.api.client.v2.model.OpsgenieServicesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/opsgenie-integration/UpdateOpsgenieService.java b/examples/v2/opsgenie-integration/UpdateOpsgenieService.java index 4d393bcc52c..c29e66f4b17 100644 --- a/examples/v2/opsgenie-integration/UpdateOpsgenieService.java +++ b/examples/v2/opsgenie-integration/UpdateOpsgenieService.java @@ -1,14 +1,20 @@ // Update a single service object returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.OpsgenieIntegrationApi; -import com.datadog.api.client.v2.model.OpsgenieServiceRegionType; import com.datadog.api.client.v2.model.OpsgenieServiceResponse; +import com.datadog.api.client.v2.model.OpsgenieServiceRegionType; import com.datadog.api.client.v2.model.OpsgenieServiceType; import com.datadog.api.client.v2.model.OpsgenieServiceUpdateAttributes; import com.datadog.api.client.v2.model.OpsgenieServiceUpdateData; import com.datadog.api.client.v2.model.OpsgenieServiceUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -16,25 +22,20 @@ public static void main(String[] args) { OpsgenieIntegrationApi apiInstance = new OpsgenieIntegrationApi(defaultClient); // there is a valid "opsgenie_service" in the system - String OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME = - System.getenv("OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME"); + String OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME = System.getenv("OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME"); String OPSGENIE_SERVICE_DATA_ID = System.getenv("OPSGENIE_SERVICE_DATA_ID"); - OpsgenieServiceUpdateRequest body = - new OpsgenieServiceUpdateRequest() - .data( - new OpsgenieServiceUpdateData() - .attributes( - new OpsgenieServiceUpdateAttributes() - .name("fake-opsgenie-service-name--updated") - .opsgenieApiKey("00000000-0000-0000-0000-000000000000") - .region(OpsgenieServiceRegionType.EU)) - .id(OPSGENIE_SERVICE_DATA_ID) - .type(OpsgenieServiceType.OPSGENIE_SERVICE)); + OpsgenieServiceUpdateRequest body = new OpsgenieServiceUpdateRequest() +.data(new OpsgenieServiceUpdateData() +.attributes(new OpsgenieServiceUpdateAttributes() +.name("fake-opsgenie-service-name--updated") +.opsgenieApiKey("00000000-0000-0000-0000-000000000000") +.region(OpsgenieServiceRegionType.EU)) +.id(OPSGENIE_SERVICE_DATA_ID) +.type(OpsgenieServiceType.OPSGENIE_SERVICE)); try { - OpsgenieServiceResponse result = - apiInstance.updateOpsgenieService(OPSGENIE_SERVICE_DATA_ID, body); + OpsgenieServiceResponse result = apiInstance.updateOpsgenieService(OPSGENIE_SERVICE_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OpsgenieIntegrationApi#updateOpsgenieService"); @@ -44,4 +45,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/organizations/UploadIdPMetadata.java b/examples/v2/organizations/UploadIdPMetadata.java index 2414e0ad9d4..87e99df28e3 100644 --- a/examples/v2/organizations/UploadIdPMetadata.java +++ b/examples/v2/organizations/UploadIdPMetadata.java @@ -1,10 +1,15 @@ // Upload IdP metadata returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.OrganizationsApi; import com.datadog.api.client.v2.api.OrganizationsApi.UploadIdPMetadataOptionalParameters; import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +17,7 @@ public static void main(String[] args) { OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); try { - apiInstance.uploadIdPMetadata( - new UploadIdPMetadataOptionalParameters() - .idpFile( - new File("fixtures/organizations/saml_configurations/valid_idp_metadata.xml"))); + apiInstance.uploadIdPMetadata(new UploadIdPMetadataOptionalParameters().idpFile(new File("fixtures/organizations/saml_configurations/valid_idp_metadata.xml"))); } catch (ApiException e) { System.err.println("Exception when calling OrganizationsApi#uploadIdPMetadata"); System.err.println("Status code: " + e.getCode()); @@ -24,4 +26,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/processes/ListProcesses.java b/examples/v2/processes/ListProcesses.java index c87f4d20568..7dcd466817a 100644 --- a/examples/v2/processes/ListProcesses.java +++ b/examples/v2/processes/ListProcesses.java @@ -1,10 +1,16 @@ // Get all processes returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ProcessesApi; import com.datadog.api.client.v2.api.ProcessesApi.ListProcessesOptionalParameters; import com.datadog.api.client.v2.model.ProcessSummariesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +18,7 @@ public static void main(String[] args) { ProcessesApi apiInstance = new ProcessesApi(defaultClient); try { - ProcessSummariesResponse result = - apiInstance.listProcesses( - new ListProcessesOptionalParameters() - .search("process-agent") - .tags("testing:true") - .pageLimit(2)); + ProcessSummariesResponse result = apiInstance.listProcesses(new ListProcessesOptionalParameters().search("process-agent").tags("testing:true").pageLimit(2)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ProcessesApi#listProcesses"); @@ -27,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/processes/ListProcesses_797840471.java b/examples/v2/processes/ListProcesses_797840471.java index a2d04fd2ff9..0231fe2631c 100644 --- a/examples/v2/processes/ListProcesses_797840471.java +++ b/examples/v2/processes/ListProcesses_797840471.java @@ -1,10 +1,18 @@ // Get all processes returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.ProcessesApi; import com.datadog.api.client.v2.api.ProcessesApi.ListProcessesOptionalParameters; +import com.datadog.api.client.v2.model.ProcessSummariesResponse; import com.datadog.api.client.v2.model.ProcessSummary; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +20,10 @@ public static void main(String[] args) { ProcessesApi apiInstance = new ProcessesApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listProcessesWithPagination( - new ListProcessesOptionalParameters().pageLimit(2)); + PaginationIterable iterable = apiInstance.listProcessesWithPagination(new ListProcessesOptionalParameters().pageLimit(2)); for (ProcessSummary item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling ProcessesApi#listProcessesWithPagination"); @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/restriction-policies/DeleteRestrictionPolicy.java b/examples/v2/restriction-policies/DeleteRestrictionPolicy.java index 0357f919529..fc315a8a999 100644 --- a/examples/v2/restriction-policies/DeleteRestrictionPolicy.java +++ b/examples/v2/restriction-policies/DeleteRestrictionPolicy.java @@ -1,8 +1,14 @@ // Delete a restriction policy returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RestrictionPoliciesApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/restriction-policies/GetRestrictionPolicy.java b/examples/v2/restriction-policies/GetRestrictionPolicy.java index b388b0ba3c7..72308517cd1 100644 --- a/examples/v2/restriction-policies/GetRestrictionPolicy.java +++ b/examples/v2/restriction-policies/GetRestrictionPolicy.java @@ -1,9 +1,15 @@ // Get a restriction policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RestrictionPoliciesApi; import com.datadog.api.client.v2.model.RestrictionPolicyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/restriction-policies/UpdateRestrictionPolicy.java b/examples/v2/restriction-policies/UpdateRestrictionPolicy.java index f4fc83bd781..0e0f29c3e40 100644 --- a/examples/v2/restriction-policies/UpdateRestrictionPolicy.java +++ b/examples/v2/restriction-policies/UpdateRestrictionPolicy.java @@ -1,15 +1,20 @@ // Update a restriction policy returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RestrictionPoliciesApi; +import com.datadog.api.client.v2.model.RestrictionPolicyResponse; import com.datadog.api.client.v2.model.RestrictionPolicy; import com.datadog.api.client.v2.model.RestrictionPolicyAttributes; import com.datadog.api.client.v2.model.RestrictionPolicyBinding; -import com.datadog.api.client.v2.model.RestrictionPolicyResponse; import com.datadog.api.client.v2.model.RestrictionPolicyType; import com.datadog.api.client.v2.model.RestrictionPolicyUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,28 +22,19 @@ public static void main(String[] args) { RestrictionPoliciesApi apiInstance = new RestrictionPoliciesApi(defaultClient); // there is a valid "user" in the system - String USER_DATA_RELATIONSHIPS_ORG_DATA_ID = - System.getenv("USER_DATA_RELATIONSHIPS_ORG_DATA_ID"); + String USER_DATA_RELATIONSHIPS_ORG_DATA_ID = System.getenv("USER_DATA_RELATIONSHIPS_ORG_DATA_ID"); - RestrictionPolicyUpdateRequest body = - new RestrictionPolicyUpdateRequest() - .data( - new RestrictionPolicy() - .id("dashboard:abc-def-ghi") - .type(RestrictionPolicyType.RESTRICTION_POLICY) - .attributes( - new RestrictionPolicyAttributes() - .bindings( - Collections.singletonList( - new RestrictionPolicyBinding() - .relation("editor") - .principals( - Collections.singletonList( - "org:00000000-0000-beef-0000-000000000000")))))); + RestrictionPolicyUpdateRequest body = new RestrictionPolicyUpdateRequest() +.data(new RestrictionPolicy() +.id("dashboard:abc-def-ghi") +.type(RestrictionPolicyType.RESTRICTION_POLICY) +.attributes(new RestrictionPolicyAttributes() +.bindings(Collections.singletonList(new RestrictionPolicyBinding() +.relation("editor") +.principals(Collections.singletonList("org:00000000-0000-beef-0000-000000000000")))))); try { - RestrictionPolicyResponse result = - apiInstance.updateRestrictionPolicy("dashboard:abc-def-ghi", body); + RestrictionPolicyResponse result = apiInstance.updateRestrictionPolicy("dashboard:abc-def-ghi", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RestrictionPoliciesApi#updateRestrictionPolicy"); @@ -48,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/AddPermissionToRole.java b/examples/v2/roles/AddPermissionToRole.java index c2d2e44e92e..231f15b66e9 100644 --- a/examples/v2/roles/AddPermissionToRole.java +++ b/examples/v2/roles/AddPermissionToRole.java @@ -1,12 +1,18 @@ // Grant permission to a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.model.PermissionsResponse; import com.datadog.api.client.v2.model.PermissionsType; import com.datadog.api.client.v2.model.RelationshipToPermission; import com.datadog.api.client.v2.model.RelationshipToPermissionData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,12 +25,10 @@ public static void main(String[] args) { // there is a valid "permission" in the system String PERMISSION_ID = System.getenv("PERMISSION_ID"); - RelationshipToPermission body = - new RelationshipToPermission() - .data( - new RelationshipToPermissionData() - .id(PERMISSION_ID) - .type(PermissionsType.PERMISSIONS)); + RelationshipToPermission body = new RelationshipToPermission() +.data(new RelationshipToPermissionData() +.id(PERMISSION_ID) +.type(PermissionsType.PERMISSIONS)); try { PermissionsResponse result = apiInstance.addPermissionToRole(ROLE_DATA_ID, body); @@ -37,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/AddUserToRole.java b/examples/v2/roles/AddUserToRole.java index 6690f56a4d6..c6fedb7f56d 100644 --- a/examples/v2/roles/AddUserToRole.java +++ b/examples/v2/roles/AddUserToRole.java @@ -1,12 +1,18 @@ // Add a user to a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; +import com.datadog.api.client.v2.model.UsersResponse; import com.datadog.api.client.v2.model.RelationshipToUser; import com.datadog.api.client.v2.model.RelationshipToUserData; -import com.datadog.api.client.v2.model.UsersResponse; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,9 +25,10 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ID = System.getenv("USER_DATA_ID"); - RelationshipToUser body = - new RelationshipToUser() - .data(new RelationshipToUserData().id(USER_DATA_ID).type(UsersType.USERS)); + RelationshipToUser body = new RelationshipToUser() +.data(new RelationshipToUserData() +.id(USER_DATA_ID) +.type(UsersType.USERS)); try { UsersResponse result = apiInstance.addUserToRole(ROLE_DATA_ID, body); @@ -34,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/CloneRole.java b/examples/v2/roles/CloneRole.java index 518a5d612aa..40c5b337b83 100644 --- a/examples/v2/roles/CloneRole.java +++ b/examples/v2/roles/CloneRole.java @@ -1,13 +1,19 @@ // Create a new role by cloning an existing role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; +import com.datadog.api.client.v2.model.RoleResponse; import com.datadog.api.client.v2.model.RoleClone; import com.datadog.api.client.v2.model.RoleCloneAttributes; import com.datadog.api.client.v2.model.RoleCloneRequest; -import com.datadog.api.client.v2.model.RoleResponse; import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,16 +23,11 @@ public static void main(String[] args) { // there is a valid "role" in the system String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID"); - RoleCloneRequest body = - new RoleCloneRequest() - .data( - new RoleClone() - .attributes( - new RoleCloneAttributes() - .name( - "Example-Create_a_new_role_by_cloning_an_existing_role_returns_OK_response" - + " clone")) - .type(RolesType.ROLES)); + RoleCloneRequest body = new RoleCloneRequest() +.data(new RoleClone() +.attributes(new RoleCloneAttributes() +.name("Example-Create_a_new_role_by_cloning_an_existing_role_returns_OK_response clone")) +.type(RolesType.ROLES)); try { RoleResponse result = apiInstance.cloneRole(ROLE_DATA_ID, body); @@ -39,4 +40,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/CreateRole.java b/examples/v2/roles/CreateRole.java index 4e5afeae9d1..604dc84a12e 100644 --- a/examples/v2/roles/CreateRole.java +++ b/examples/v2/roles/CreateRole.java @@ -1,27 +1,30 @@ // Create role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; +import com.datadog.api.client.v2.model.RoleCreateResponse; import com.datadog.api.client.v2.model.RoleCreateAttributes; import com.datadog.api.client.v2.model.RoleCreateData; import com.datadog.api.client.v2.model.RoleCreateRequest; -import com.datadog.api.client.v2.model.RoleCreateResponse; import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); RolesApi apiInstance = new RolesApi(defaultClient); - RoleCreateRequest body = - new RoleCreateRequest() - .data( - new RoleCreateData() - .type(RolesType.ROLES) - .attributes( - new RoleCreateAttributes() - .name("Example-Create_role_returns_OK_response"))); + RoleCreateRequest body = new RoleCreateRequest() +.data(new RoleCreateData() +.type(RolesType.ROLES) +.attributes(new RoleCreateAttributes() +.name("Example-Create_role_returns_OK_response"))); try { RoleCreateResponse result = apiInstance.createRole(body); @@ -34,4 +37,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/DeleteRole.java b/examples/v2/roles/DeleteRole.java index f217980e478..cb071eb3076 100644 --- a/examples/v2/roles/DeleteRole.java +++ b/examples/v2/roles/DeleteRole.java @@ -1,8 +1,14 @@ // Delete role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/GetRole.java b/examples/v2/roles/GetRole.java index fbd0aee2a77..25c8e434db6 100644 --- a/examples/v2/roles/GetRole.java +++ b/examples/v2/roles/GetRole.java @@ -1,9 +1,15 @@ // Get a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.model.RoleResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/ListPermissions.java b/examples/v2/roles/ListPermissions.java index b2d90b5a545..402cd7a0963 100644 --- a/examples/v2/roles/ListPermissions.java +++ b/examples/v2/roles/ListPermissions.java @@ -1,9 +1,15 @@ // List permissions returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.model.PermissionsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/ListRolePermissions.java b/examples/v2/roles/ListRolePermissions.java index 057152e73d4..fa366319ffc 100644 --- a/examples/v2/roles/ListRolePermissions.java +++ b/examples/v2/roles/ListRolePermissions.java @@ -1,9 +1,15 @@ // List permissions for a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.model.PermissionsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/ListRoleUsers.java b/examples/v2/roles/ListRoleUsers.java index 66d85a36e5f..7c851ee2157 100644 --- a/examples/v2/roles/ListRoleUsers.java +++ b/examples/v2/roles/ListRoleUsers.java @@ -1,9 +1,15 @@ // Get all users of a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.model.UsersResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/ListRoles.java b/examples/v2/roles/ListRoles.java index e15681a7a71..dc4d62ef1d3 100644 --- a/examples/v2/roles/ListRoles.java +++ b/examples/v2/roles/ListRoles.java @@ -1,10 +1,16 @@ // List roles returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.api.RolesApi.ListRolesOptionalParameters; import com.datadog.api.client.v2.model.RolesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,9 +21,7 @@ public static void main(String[] args) { String ROLE_DATA_ATTRIBUTES_NAME = System.getenv("ROLE_DATA_ATTRIBUTES_NAME"); try { - RolesResponse result = - apiInstance.listRoles( - new ListRolesOptionalParameters().filter(ROLE_DATA_ATTRIBUTES_NAME)); + RolesResponse result = apiInstance.listRoles(new ListRolesOptionalParameters().filter(ROLE_DATA_ATTRIBUTES_NAME)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RolesApi#listRoles"); @@ -27,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/RemovePermissionFromRole.java b/examples/v2/roles/RemovePermissionFromRole.java index 18f6c0e4ec1..b879d132ce9 100644 --- a/examples/v2/roles/RemovePermissionFromRole.java +++ b/examples/v2/roles/RemovePermissionFromRole.java @@ -1,12 +1,18 @@ // Revoke permission returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; import com.datadog.api.client.v2.model.PermissionsResponse; import com.datadog.api.client.v2.model.PermissionsType; import com.datadog.api.client.v2.model.RelationshipToPermission; import com.datadog.api.client.v2.model.RelationshipToPermissionData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,12 +25,10 @@ public static void main(String[] args) { // there is a valid "permission" in the system String PERMISSION_ID = System.getenv("PERMISSION_ID"); - RelationshipToPermission body = - new RelationshipToPermission() - .data( - new RelationshipToPermissionData() - .id(PERMISSION_ID) - .type(PermissionsType.PERMISSIONS)); + RelationshipToPermission body = new RelationshipToPermission() +.data(new RelationshipToPermissionData() +.id(PERMISSION_ID) +.type(PermissionsType.PERMISSIONS)); try { PermissionsResponse result = apiInstance.removePermissionFromRole(ROLE_DATA_ID, body); @@ -37,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/RemoveUserFromRole.java b/examples/v2/roles/RemoveUserFromRole.java index c881597d631..6206b1b2471 100644 --- a/examples/v2/roles/RemoveUserFromRole.java +++ b/examples/v2/roles/RemoveUserFromRole.java @@ -1,12 +1,18 @@ // Remove a user from a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; +import com.datadog.api.client.v2.model.UsersResponse; import com.datadog.api.client.v2.model.RelationshipToUser; import com.datadog.api.client.v2.model.RelationshipToUserData; -import com.datadog.api.client.v2.model.UsersResponse; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,9 +25,10 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ID = System.getenv("USER_DATA_ID"); - RelationshipToUser body = - new RelationshipToUser() - .data(new RelationshipToUserData().id(USER_DATA_ID).type(UsersType.USERS)); + RelationshipToUser body = new RelationshipToUser() +.data(new RelationshipToUserData() +.id(USER_DATA_ID) +.type(UsersType.USERS)); try { UsersResponse result = apiInstance.removeUserFromRole(ROLE_DATA_ID, body); @@ -34,4 +41,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/roles/UpdateRole.java b/examples/v2/roles/UpdateRole.java index 31fceb483d6..52993b556e0 100644 --- a/examples/v2/roles/UpdateRole.java +++ b/examples/v2/roles/UpdateRole.java @@ -1,18 +1,23 @@ // Update a role returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RolesApi; +import com.datadog.api.client.v2.model.RoleUpdateResponse; import com.datadog.api.client.v2.model.PermissionsType; import com.datadog.api.client.v2.model.RelationshipToPermissionData; import com.datadog.api.client.v2.model.RelationshipToPermissions; import com.datadog.api.client.v2.model.RoleRelationships; +import com.datadog.api.client.v2.model.RolesType; import com.datadog.api.client.v2.model.RoleUpdateAttributes; import com.datadog.api.client.v2.model.RoleUpdateData; import com.datadog.api.client.v2.model.RoleUpdateRequest; -import com.datadog.api.client.v2.model.RoleUpdateResponse; -import com.datadog.api.client.v2.model.RolesType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -26,22 +31,17 @@ public static void main(String[] args) { // there is a valid "permission" in the system String PERMISSION_ID = System.getenv("PERMISSION_ID"); - RoleUpdateRequest body = - new RoleUpdateRequest() - .data( - new RoleUpdateData() - .id(ROLE_DATA_ID) - .type(RolesType.ROLES) - .attributes(new RoleUpdateAttributes().name("developers-updated")) - .relationships( - new RoleRelationships() - .permissions( - new RelationshipToPermissions() - .data( - Collections.singletonList( - new RelationshipToPermissionData() - .id(PERMISSION_ID) - .type(PermissionsType.PERMISSIONS)))))); + RoleUpdateRequest body = new RoleUpdateRequest() +.data(new RoleUpdateData() +.id(ROLE_DATA_ID) +.type(RolesType.ROLES) +.attributes(new RoleUpdateAttributes() +.name("developers-updated")) +.relationships(new RoleRelationships() +.permissions(new RelationshipToPermissions() +.data(Collections.singletonList(new RelationshipToPermissionData() +.id(PERMISSION_ID) +.type(PermissionsType.PERMISSIONS)))))); try { RoleUpdateResponse result = apiInstance.updateRole(ROLE_DATA_ID, body); @@ -54,4 +54,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/AggregateRUMEvents.java b/examples/v2/rum/AggregateRUMEvents.java index b119b4dc959..7f89d76665a 100644 --- a/examples/v2/rum/AggregateRUMEvents.java +++ b/examples/v2/rum/AggregateRUMEvents.java @@ -1,46 +1,49 @@ // Aggregate RUM events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; +import com.datadog.api.client.v2.model.RUMAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.RUMAggregateRequest; import com.datadog.api.client.v2.model.RUMAggregationFunction; -import com.datadog.api.client.v2.model.RUMAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.RUMCompute; import com.datadog.api.client.v2.model.RUMComputeType; import com.datadog.api.client.v2.model.RUMGroupBy; import com.datadog.api.client.v2.model.RUMGroupByTotal; +import com.datadog.api.client.v2.model.RUMGroupByTotalBoolean; import com.datadog.api.client.v2.model.RUMQueryFilter; import com.datadog.api.client.v2.model.RUMQueryOptions; import com.datadog.api.client.v2.model.RUMQueryPageOptions; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); RumApi apiInstance = new RumApi(defaultClient); - RUMAggregateRequest body = - new RUMAggregateRequest() - .compute( - Collections.singletonList( - new RUMCompute() - .aggregation(RUMAggregationFunction.PERCENTILE_90) - .metric("@view.time_spent") - .type(RUMComputeType.TOTAL))) - .filter( - new RUMQueryFilter() - .from("now-15m") - .query("@type:view AND @session.type:user") - .to("now")) - .groupBy( - Collections.singletonList( - new RUMGroupBy() - .facet("@view.time_spent") - .limit(10L) - .total(new RUMGroupByTotal(false)))) - .options(new RUMQueryOptions().timezone("GMT")) - .page(new RUMQueryPageOptions().limit(25)); + RUMAggregateRequest body = new RUMAggregateRequest() +.compute(Collections.singletonList(new RUMCompute() +.aggregation(RUMAggregationFunction.PERCENTILE_90) +.metric("@view.time_spent") +.type(RUMComputeType.TOTAL))) +.filter(new RUMQueryFilter() +.from("now-15m") +.query("@type:view AND @session.type:user") +.to("now")) +.groupBy(Collections.singletonList(new RUMGroupBy() +.facet("@view.time_spent") +.limit(10L) +.total(new RUMGroupByTotal( +false)))) +.options(new RUMQueryOptions() +.timezone("GMT")) +.page(new RUMQueryPageOptions() +.limit(25)); try { RUMAnalyticsAggregateResponse result = apiInstance.aggregateRUMEvents(body); @@ -53,4 +56,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/CreateRUMApplication.java b/examples/v2/rum/CreateRUMApplication.java index de970831207..896b1598d87 100644 --- a/examples/v2/rum/CreateRUMApplication.java +++ b/examples/v2/rum/CreateRUMApplication.java @@ -1,28 +1,31 @@ // Create a new RUM application returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; +import com.datadog.api.client.v2.model.RUMApplicationResponse; import com.datadog.api.client.v2.model.RUMApplicationCreate; import com.datadog.api.client.v2.model.RUMApplicationCreateAttributes; import com.datadog.api.client.v2.model.RUMApplicationCreateRequest; import com.datadog.api.client.v2.model.RUMApplicationCreateType; -import com.datadog.api.client.v2.model.RUMApplicationResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); RumApi apiInstance = new RumApi(defaultClient); - RUMApplicationCreateRequest body = - new RUMApplicationCreateRequest() - .data( - new RUMApplicationCreate() - .attributes( - new RUMApplicationCreateAttributes() - .name("my_new_rum_application") - .type("ios")) - .type(RUMApplicationCreateType.RUM_APPLICATION_CREATE)); + RUMApplicationCreateRequest body = new RUMApplicationCreateRequest() +.data(new RUMApplicationCreate() +.attributes(new RUMApplicationCreateAttributes() +.name("my_new_rum_application") +.type("ios")) +.type(RUMApplicationCreateType.RUM_APPLICATION_CREATE)); try { RUMApplicationResponse result = apiInstance.createRUMApplication(body); @@ -35,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/DeleteRUMApplication.java b/examples/v2/rum/DeleteRUMApplication.java index d4fd3dcc6d5..224d149d393 100644 --- a/examples/v2/rum/DeleteRUMApplication.java +++ b/examples/v2/rum/DeleteRUMApplication.java @@ -1,8 +1,14 @@ // Delete a RUM application returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/GetRUMApplication.java b/examples/v2/rum/GetRUMApplication.java index 61b89bf11f8..3c54f150d0a 100644 --- a/examples/v2/rum/GetRUMApplication.java +++ b/examples/v2/rum/GetRUMApplication.java @@ -1,9 +1,15 @@ // Get a RUM application returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; import com.datadog.api.client.v2.model.RUMApplicationResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/GetRUMApplications.java b/examples/v2/rum/GetRUMApplications.java index 5fbfc30f290..a884a8a4b60 100644 --- a/examples/v2/rum/GetRUMApplications.java +++ b/examples/v2/rum/GetRUMApplications.java @@ -1,9 +1,15 @@ // List all the RUM applications returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; import com.datadog.api.client.v2.model.RUMApplicationsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/ListRUMEvents.java b/examples/v2/rum/ListRUMEvents.java index 2e63a4b9f18..2095b6c42fe 100644 --- a/examples/v2/rum/ListRUMEvents.java +++ b/examples/v2/rum/ListRUMEvents.java @@ -1,9 +1,15 @@ // Get a list of RUM events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; import com.datadog.api.client.v2.model.RUMEventsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/ListRUMEvents_2680821282.java b/examples/v2/rum/ListRUMEvents_2680821282.java index 68d7cc1012f..601cf95798d 100644 --- a/examples/v2/rum/ListRUMEvents_2680821282.java +++ b/examples/v2/rum/ListRUMEvents_2680821282.java @@ -1,10 +1,18 @@ // Get a list of RUM events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.RumApi; import com.datadog.api.client.v2.api.RumApi.ListRUMEventsOptionalParameters; +import com.datadog.api.client.v2.model.RUMEventsResponse; import com.datadog.api.client.v2.model.RUMEvent; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,12 +20,10 @@ public static void main(String[] args) { RumApi apiInstance = new RumApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listRUMEventsWithPagination( - new ListRUMEventsOptionalParameters().pageLimit(2)); + PaginationIterable iterable = apiInstance.listRUMEventsWithPagination(new ListRUMEventsOptionalParameters().pageLimit(2)); for (RUMEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling RumApi#listRUMEventsWithPagination"); @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/SearchRUMEvents.java b/examples/v2/rum/SearchRUMEvents.java index 49bb2c54e0d..3c21a9f5ed4 100644 --- a/examples/v2/rum/SearchRUMEvents.java +++ b/examples/v2/rum/SearchRUMEvents.java @@ -1,7 +1,7 @@ // Search RUM events returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; import com.datadog.api.client.v2.model.RUMEventsResponse; import com.datadog.api.client.v2.model.RUMQueryFilter; @@ -9,22 +9,29 @@ import com.datadog.api.client.v2.model.RUMQueryPageOptions; import com.datadog.api.client.v2.model.RUMSearchEventsRequest; import com.datadog.api.client.v2.model.RUMSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); RumApi apiInstance = new RumApi(defaultClient); - RUMSearchEventsRequest body = - new RUMSearchEventsRequest() - .filter( - new RUMQueryFilter() - .from("now-15m") - .query("@type:session AND @session.type:user") - .to("now")) - .options(new RUMQueryOptions().timeOffset(0L).timezone("GMT")) - .page(new RUMQueryPageOptions().limit(25)) - .sort(RUMSort.TIMESTAMP_ASCENDING); + RUMSearchEventsRequest body = new RUMSearchEventsRequest() +.filter(new RUMQueryFilter() +.from("now-15m") +.query("@type:session AND @session.type:user") +.to("now")) +.options(new RUMQueryOptions() +.timeOffset(0L) +.timezone("GMT")) +.page(new RUMQueryPageOptions() +.limit(25)) +.sort(RUMSort.TIMESTAMP_ASCENDING); try { RUMEventsResponse result = apiInstance.searchRUMEvents(body); @@ -37,4 +44,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/SearchRUMEvents_574690310.java b/examples/v2/rum/SearchRUMEvents_574690310.java index 9d02befda91..3d420664791 100644 --- a/examples/v2/rum/SearchRUMEvents_574690310.java +++ b/examples/v2/rum/SearchRUMEvents_574690310.java @@ -1,36 +1,45 @@ // Search RUM events returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.RumApi; +import com.datadog.api.client.v2.model.RUMEventsResponse; import com.datadog.api.client.v2.model.RUMEvent; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.RUMQueryFilter; import com.datadog.api.client.v2.model.RUMQueryOptions; import com.datadog.api.client.v2.model.RUMQueryPageOptions; import com.datadog.api.client.v2.model.RUMSearchEventsRequest; import com.datadog.api.client.v2.model.RUMSort; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); RumApi apiInstance = new RumApi(defaultClient); - RUMSearchEventsRequest body = - new RUMSearchEventsRequest() - .filter( - new RUMQueryFilter() - .from("now-15m") - .query("@type:session AND @session.type:user") - .to("now")) - .options(new RUMQueryOptions().timeOffset(0L).timezone("GMT")) - .page(new RUMQueryPageOptions().limit(2)) - .sort(RUMSort.TIMESTAMP_ASCENDING); + RUMSearchEventsRequest body = new RUMSearchEventsRequest() +.filter(new RUMQueryFilter() +.from("now-15m") +.query("@type:session AND @session.type:user") +.to("now")) +.options(new RUMQueryOptions() +.timeOffset(0L) +.timezone("GMT")) +.page(new RUMQueryPageOptions() +.limit(2)) +.sort(RUMSort.TIMESTAMP_ASCENDING); try { PaginationIterable iterable = apiInstance.searchRUMEventsWithPagination(body); for (RUMEvent item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { System.err.println("Exception when calling RumApi#searchRUMEventsWithPagination"); @@ -38,4 +47,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/rum/UpdateRUMApplication.java b/examples/v2/rum/UpdateRUMApplication.java index 3f24d16a257..007830ab25d 100644 --- a/examples/v2/rum/UpdateRUMApplication.java +++ b/examples/v2/rum/UpdateRUMApplication.java @@ -1,13 +1,19 @@ // Update a RUM application returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.RumApi; import com.datadog.api.client.v2.model.RUMApplicationResponse; import com.datadog.api.client.v2.model.RUMApplicationUpdate; import com.datadog.api.client.v2.model.RUMApplicationUpdateAttributes; import com.datadog.api.client.v2.model.RUMApplicationUpdateRequest; import com.datadog.api.client.v2.model.RUMApplicationUpdateType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,20 +23,16 @@ public static void main(String[] args) { // there is a valid "rum_application" in the system String RUM_APPLICATION_DATA_ID = System.getenv("RUM_APPLICATION_DATA_ID"); - RUMApplicationUpdateRequest body = - new RUMApplicationUpdateRequest() - .data( - new RUMApplicationUpdate() - .attributes( - new RUMApplicationUpdateAttributes() - .name("updated_name_for_my_existing_rum_application") - .type("browser")) - .id(RUM_APPLICATION_DATA_ID) - .type(RUMApplicationUpdateType.RUM_APPLICATION_UPDATE)); + RUMApplicationUpdateRequest body = new RUMApplicationUpdateRequest() +.data(new RUMApplicationUpdate() +.attributes(new RUMApplicationUpdateAttributes() +.name("updated_name_for_my_existing_rum_application") +.type("browser")) +.id(RUM_APPLICATION_DATA_ID) +.type(RUMApplicationUpdateType.RUM_APPLICATION_UPDATE)); try { - RUMApplicationResponse result = - apiInstance.updateRUMApplication(RUM_APPLICATION_DATA_ID, body); + RUMApplicationResponse result = apiInstance.updateRUMApplication(RUM_APPLICATION_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RumApi#updateRUMApplication"); @@ -40,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/CreateSecurityFilter.java b/examples/v2/security-monitoring/CreateSecurityFilter.java index ca45268df94..e838d3e6907 100644 --- a/examples/v2/security-monitoring/CreateSecurityFilter.java +++ b/examples/v2/security-monitoring/CreateSecurityFilter.java @@ -1,38 +1,38 @@ // Create a security filter returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityFilterResponse; import com.datadog.api.client.v2.model.SecurityFilterCreateAttributes; import com.datadog.api.client.v2.model.SecurityFilterCreateData; import com.datadog.api.client.v2.model.SecurityFilterCreateRequest; import com.datadog.api.client.v2.model.SecurityFilterExclusionFilter; import com.datadog.api.client.v2.model.SecurityFilterFilteredDataType; -import com.datadog.api.client.v2.model.SecurityFilterResponse; import com.datadog.api.client.v2.model.SecurityFilterType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityFilterCreateRequest body = - new SecurityFilterCreateRequest() - .data( - new SecurityFilterCreateData() - .attributes( - new SecurityFilterCreateAttributes() - .exclusionFilters( - Collections.singletonList( - new SecurityFilterExclusionFilter() - .name("Exclude staging") - .query("source:staging"))) - .filteredDataType(SecurityFilterFilteredDataType.LOGS) - .isEnabled(true) - .name("Example-Create_a_security_filter_returns_OK_response") - .query("service:ExampleCreateasecurityfilterreturnsOKresponse")) - .type(SecurityFilterType.SECURITY_FILTERS)); + SecurityFilterCreateRequest body = new SecurityFilterCreateRequest() +.data(new SecurityFilterCreateData() +.attributes(new SecurityFilterCreateAttributes() +.exclusionFilters(Collections.singletonList(new SecurityFilterExclusionFilter() +.name("Exclude staging") +.query("source:staging"))) +.filteredDataType(SecurityFilterFilteredDataType.LOGS) +.isEnabled(true) +.name("Example-Create_a_security_filter_returns_OK_response") +.query("service:ExampleCreateasecurityfilterreturnsOKresponse")) +.type(SecurityFilterType.SECURITY_FILTERS)); try { SecurityFilterResponse result = apiInstance.createSecurityFilter(body); @@ -45,4 +45,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule.java b/examples/v2/security-monitoring/CreateSecurityMonitoringRule.java index 3db885e8710..bbfb8f96622 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule.java +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringRule.java @@ -1,8 +1,9 @@ // Create a detection rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCaseCreate; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow; @@ -10,53 +11,50 @@ import com.datadog.api.client.v2.model.SecurityMonitoringRuleMaxSignalDuration; import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; import com.datadog.api.client.v2.model.SecurityMonitoringRuleTypeCreate; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringRuleCreatePayload body = - new SecurityMonitoringRuleCreatePayload( - new SecurityMonitoringStandardRuleCreatePayload() - .name("Example-Create_a_detection_rule_returns_OK_response") - .queries( - Collections.singletonList( - new SecurityMonitoringStandardRuleQuery() - .query("@test:true") - .aggregation(SecurityMonitoringRuleQueryAggregation.COUNT) - .metric(""))) - .cases( - Collections.singletonList( - new SecurityMonitoringRuleCaseCreate() - .name("") - .status(SecurityMonitoringRuleSeverity.INFO) - .condition("a > 0"))) - .options( - new SecurityMonitoringRuleOptions() - .evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) - .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) - .maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) - .message("Test rule") - .isEnabled(true) - .type(SecurityMonitoringRuleTypeCreate.LOG_DETECTION)); + SecurityMonitoringRuleCreatePayload body = new SecurityMonitoringRuleCreatePayload( +new SecurityMonitoringStandardRuleCreatePayload() +.name("Example-Create_a_detection_rule_returns_OK_response") +.queries(Collections.singletonList(new SecurityMonitoringStandardRuleQuery() +.query("@test:true") +.aggregation(SecurityMonitoringRuleQueryAggregation.COUNT) +.metric(""))) +.cases(Collections.singletonList(new SecurityMonitoringRuleCaseCreate() +.name("") +.status(SecurityMonitoringRuleSeverity.INFO) +.condition("a > 0"))) +.options(new SecurityMonitoringRuleOptions() +.evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) +.keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) +.maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) +.message("Test rule") +.isEnabled(true) +.type(SecurityMonitoringRuleTypeCreate.LOG_DETECTION)); try { SecurityMonitoringRuleResponse result = apiInstance.createSecurityMonitoringRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.java b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.java index 18ca0863468..9e7c67820fe 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.java +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.java @@ -1,8 +1,9 @@ // Create a cloud_configuration rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.CloudConfigurationComplianceRuleOptions; import com.datadog.api.client.v2.model.CloudConfigurationRegoRule; import com.datadog.api.client.v2.model.CloudConfigurationRuleCaseCreate; @@ -11,57 +12,52 @@ import com.datadog.api.client.v2.model.CloudConfigurationRuleOptions; import com.datadog.api.client.v2.model.CloudConfigurationRuleType; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringRuleCreatePayload body = - new SecurityMonitoringRuleCreatePayload( - new CloudConfigurationRuleCreatePayload() - .type(CloudConfigurationRuleType.CLOUD_CONFIGURATION) - .name("Example-Create_a_cloud_configuration_rule_returns_OK_response_cloud") - .isEnabled(false) - .cases( - Collections.singletonList( - new CloudConfigurationRuleCaseCreate() - .status(SecurityMonitoringRuleSeverity.INFO) - .notifications(Collections.singletonList("channel")))) - .options( - new CloudConfigurationRuleOptions() - .complianceRuleOptions( - new CloudConfigurationComplianceRuleOptions() - .resourceType("gcp_compute_disk") - .complexRule(false) - .regoRule( - new CloudConfigurationRegoRule() - .policy(""" + SecurityMonitoringRuleCreatePayload body = new SecurityMonitoringRuleCreatePayload( +new CloudConfigurationRuleCreatePayload() +.type(CloudConfigurationRuleType.CLOUD_CONFIGURATION) +.name("Example-Create_a_cloud_configuration_rule_returns_OK_response_cloud") +.isEnabled(false) +.cases(Collections.singletonList(new CloudConfigurationRuleCaseCreate() +.status(SecurityMonitoringRuleSeverity.INFO) +.notifications(Collections.singletonList("channel")))) +.options(new CloudConfigurationRuleOptions() +.complianceRuleOptions(new CloudConfigurationComplianceRuleOptions() +.resourceType("gcp_compute_disk") +.complexRule(false) +.regoRule(new CloudConfigurationRegoRule() +.policy(""" package datadog """) - .resourceTypes( - Collections.singletonList("gcp_compute_disk"))))) - .message("ddd") - .tags(Collections.singletonList("my:tag")) - .complianceSignalOptions( - new CloudConfigurationRuleComplianceSignalOptions() - .userActivationStatus(true) - .userGroupByFields(Collections.singletonList("@account_id")))); +.resourceTypes(Collections.singletonList("gcp_compute_disk"))))) +.message("ddd") +.tags(Collections.singletonList("my:tag")) +.complianceSignalOptions(new CloudConfigurationRuleComplianceSignalOptions() +.userActivationStatus(true) +.userGroupByFields(Collections.singletonList("@account_id")))); try { SecurityMonitoringRuleResponse result = apiInstance.createSecurityMonitoringRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.java b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.java index 850d9676ef0..c4640f6c0cb 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.java +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.java @@ -1,70 +1,67 @@ // Create a detection rule with type 'impossible_travel' returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCaseCreate; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleDetectionMethod; import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow; import com.datadog.api.client.v2.model.SecurityMonitoringRuleImpossibleTravelOptions; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleImpossibleTravelOptionsBaselineUserLocations; import com.datadog.api.client.v2.model.SecurityMonitoringRuleKeepAlive; import com.datadog.api.client.v2.model.SecurityMonitoringRuleMaxSignalDuration; import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; import com.datadog.api.client.v2.model.SecurityMonitoringRuleTypeCreate; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringRuleCreatePayload body = - new SecurityMonitoringRuleCreatePayload( - new SecurityMonitoringStandardRuleCreatePayload() - .queries( - Collections.singletonList( - new SecurityMonitoringStandardRuleQuery() - .aggregation(SecurityMonitoringRuleQueryAggregation.GEO_DATA) - .groupByFields(Collections.singletonList("@usr.id")) - .metric("@network.client.geoip") - .query("*"))) - .cases( - Collections.singletonList( - new SecurityMonitoringRuleCaseCreate() - .name("") - .status(SecurityMonitoringRuleSeverity.INFO))) - .hasExtendedTitle(true) - .message("test") - .isEnabled(true) - .options( - new SecurityMonitoringRuleOptions() - .maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY) - .evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) - .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) - .detectionMethod(SecurityMonitoringRuleDetectionMethod.IMPOSSIBLE_TRAVEL) - .impossibleTravelOptions( - new SecurityMonitoringRuleImpossibleTravelOptions() - .baselineUserLocations(false))) - .name( - "Example-Create_a_detection_rule_with_type_impossible_travel_returns_OK_response") - .type(SecurityMonitoringRuleTypeCreate.LOG_DETECTION)); + SecurityMonitoringRuleCreatePayload body = new SecurityMonitoringRuleCreatePayload( +new SecurityMonitoringStandardRuleCreatePayload() +.queries(Collections.singletonList(new SecurityMonitoringStandardRuleQuery() +.aggregation(SecurityMonitoringRuleQueryAggregation.GEO_DATA) +.groupByFields(Collections.singletonList("@usr.id")) +.metric("@network.client.geoip") +.query("*"))) +.cases(Collections.singletonList(new SecurityMonitoringRuleCaseCreate() +.name("") +.status(SecurityMonitoringRuleSeverity.INFO))) +.hasExtendedTitle(true) +.message("test") +.isEnabled(true) +.options(new SecurityMonitoringRuleOptions() +.maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY) +.evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) +.keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) +.detectionMethod(SecurityMonitoringRuleDetectionMethod.IMPOSSIBLE_TRAVEL) +.impossibleTravelOptions(new SecurityMonitoringRuleImpossibleTravelOptions() +.baselineUserLocations(false))) +.name("Example-Create_a_detection_rule_with_type_impossible_travel_returns_OK_response") +.type(SecurityMonitoringRuleTypeCreate.LOG_DETECTION)); try { SecurityMonitoringRuleResponse result = apiInstance.createSecurityMonitoringRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.java b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.java index ddcf4847142..1e55974d4be 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.java +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.java @@ -1,8 +1,9 @@ // Create a detection rule with type 'workload_security' returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCaseCreate; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow; @@ -10,54 +11,50 @@ import com.datadog.api.client.v2.model.SecurityMonitoringRuleMaxSignalDuration; import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; import com.datadog.api.client.v2.model.SecurityMonitoringRuleTypeCreate; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringRuleCreatePayload body = - new SecurityMonitoringRuleCreatePayload( - new SecurityMonitoringStandardRuleCreatePayload() - .name( - "Example-Create_a_detection_rule_with_type_workload_security_returns_OK_response") - .queries( - Collections.singletonList( - new SecurityMonitoringStandardRuleQuery() - .query("@test:true") - .aggregation(SecurityMonitoringRuleQueryAggregation.COUNT) - .metric(""))) - .cases( - Collections.singletonList( - new SecurityMonitoringRuleCaseCreate() - .name("") - .status(SecurityMonitoringRuleSeverity.INFO) - .condition("a > 0"))) - .options( - new SecurityMonitoringRuleOptions() - .evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) - .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) - .maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) - .message("Test rule") - .isEnabled(true) - .type(SecurityMonitoringRuleTypeCreate.WORKLOAD_SECURITY)); + SecurityMonitoringRuleCreatePayload body = new SecurityMonitoringRuleCreatePayload( +new SecurityMonitoringStandardRuleCreatePayload() +.name("Example-Create_a_detection_rule_with_type_workload_security_returns_OK_response") +.queries(Collections.singletonList(new SecurityMonitoringStandardRuleQuery() +.query("@test:true") +.aggregation(SecurityMonitoringRuleQueryAggregation.COUNT) +.metric(""))) +.cases(Collections.singletonList(new SecurityMonitoringRuleCaseCreate() +.name("") +.status(SecurityMonitoringRuleSeverity.INFO) +.condition("a > 0"))) +.options(new SecurityMonitoringRuleOptions() +.evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) +.keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) +.maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) +.message("Test rule") +.isEnabled(true) +.type(SecurityMonitoringRuleTypeCreate.WORKLOAD_SECURITY)); try { SecurityMonitoringRuleResponse result = apiInstance.createSecurityMonitoringRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.java b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.java index 9a6addf6180..80eeb9519df 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.java +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.java @@ -1,8 +1,9 @@ // Create a detection rule with type 'signal_correlation' returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCaseCreate; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow; @@ -10,13 +11,16 @@ import com.datadog.api.client.v2.model.SecurityMonitoringRuleMaxSignalDuration; import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; import com.datadog.api.client.v2.model.SecurityMonitoringSignalRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringSignalRuleQuery; import com.datadog.api.client.v2.model.SecurityMonitoringSignalRuleType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -29,47 +33,38 @@ public static void main(String[] args) { // there is a valid "security_rule_bis" in the system String SECURITY_RULE_BIS_ID = System.getenv("SECURITY_RULE_BIS_ID"); - SecurityMonitoringRuleCreatePayload body = - new SecurityMonitoringRuleCreatePayload( - new SecurityMonitoringSignalRuleCreatePayload() - .name( - "Example-Create_a_detection_rule_with_type_signal_correlation_returns_OK_response_signal_rule") - .queries( - Arrays.asList( - new SecurityMonitoringSignalRuleQuery() - .ruleId(SECURITY_RULE_ID) - .aggregation(SecurityMonitoringRuleQueryAggregation.EVENT_COUNT) - .correlatedByFields(Collections.singletonList("host")) - .correlatedQueryIndex(1), - new SecurityMonitoringSignalRuleQuery() - .ruleId(SECURITY_RULE_BIS_ID) - .aggregation(SecurityMonitoringRuleQueryAggregation.EVENT_COUNT) - .correlatedByFields(Collections.singletonList("host")))) - .cases( - Collections.singletonList( - new SecurityMonitoringRuleCaseCreate() - .name("") - .status(SecurityMonitoringRuleSeverity.INFO) - .condition("a > 0 && b > 0"))) - .options( - new SecurityMonitoringRuleOptions() - .evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) - .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) - .maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) - .message("Test signal correlation rule") - .isEnabled(true) - .type(SecurityMonitoringSignalRuleType.SIGNAL_CORRELATION)); + SecurityMonitoringRuleCreatePayload body = new SecurityMonitoringRuleCreatePayload( +new SecurityMonitoringSignalRuleCreatePayload() +.name("Example-Create_a_detection_rule_with_type_signal_correlation_returns_OK_response_signal_rule") +.queries(Arrays.asList(new SecurityMonitoringSignalRuleQuery() +.ruleId(SECURITY_RULE_ID) +.aggregation(SecurityMonitoringRuleQueryAggregation.EVENT_COUNT) +.correlatedByFields(Collections.singletonList("host")) +.correlatedQueryIndex(1), new SecurityMonitoringSignalRuleQuery() +.ruleId(SECURITY_RULE_BIS_ID) +.aggregation(SecurityMonitoringRuleQueryAggregation.EVENT_COUNT) +.correlatedByFields(Collections.singletonList("host")))) +.cases(Collections.singletonList(new SecurityMonitoringRuleCaseCreate() +.name("") +.status(SecurityMonitoringRuleSeverity.INFO) +.condition("a > 0 && b > 0"))) +.options(new SecurityMonitoringRuleOptions() +.evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) +.keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) +.maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) +.message("Test signal correlation rule") +.isEnabled(true) +.type(SecurityMonitoringSignalRuleType.SIGNAL_CORRELATION)); try { SecurityMonitoringRuleResponse result = apiInstance.createSecurityMonitoringRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#createSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/DeleteSecurityFilter.java b/examples/v2/security-monitoring/DeleteSecurityFilter.java index d5d7c4f4053..fbb55d4b7b9 100644 --- a/examples/v2/security-monitoring/DeleteSecurityFilter.java +++ b/examples/v2/security-monitoring/DeleteSecurityFilter.java @@ -1,8 +1,14 @@ // Delete a security filter returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.java b/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.java index a9efe85de7b..fa0a0bbf032 100644 --- a/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.java +++ b/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.java @@ -1,8 +1,14 @@ // Delete a security filter returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.java b/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.java index 77ffa75c9d2..ed9943015f4 100644 --- a/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.java +++ b/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.java @@ -1,8 +1,14 @@ // Delete an existing rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,12 +21,11 @@ public static void main(String[] args) { try { apiInstance.deleteSecurityMonitoringRule(SECURITY_RULE_ID); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#deleteSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#deleteSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.java b/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.java index 95692752a22..651498e2d56 100644 --- a/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.java +++ b/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.java @@ -1,39 +1,40 @@ // Modify the triage assignee of a security signal returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalAssigneeUpdateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringSignalAssigneeUpdateData; import com.datadog.api.client.v2.model.SecurityMonitoringSignalAssigneeUpdateRequest; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; import com.datadog.api.client.v2.model.SecurityMonitoringTriageUser; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringSignalAssigneeUpdateRequest body = - new SecurityMonitoringSignalAssigneeUpdateRequest() - .data( - new SecurityMonitoringSignalAssigneeUpdateData() - .attributes( - new SecurityMonitoringSignalAssigneeUpdateAttributes() - .assignee(new SecurityMonitoringTriageUser().uuid("")))); + SecurityMonitoringSignalAssigneeUpdateRequest body = new SecurityMonitoringSignalAssigneeUpdateRequest() +.data(new SecurityMonitoringSignalAssigneeUpdateData() +.attributes(new SecurityMonitoringSignalAssigneeUpdateAttributes() +.assignee(new SecurityMonitoringTriageUser() +.uuid("")))); try { - SecurityMonitoringSignalTriageUpdateResponse result = - apiInstance.editSecurityMonitoringSignalAssignee( - "AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE", body); + SecurityMonitoringSignalTriageUpdateResponse result = apiInstance.editSecurityMonitoringSignalAssignee("AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalAssignee"); + System.err.println("Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalAssignee"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.java b/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.java index 9cb5e963155..6b93584a419 100644 --- a/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.java +++ b/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.java @@ -1,39 +1,38 @@ // Change the related incidents of a security signal returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalIncidentsUpdateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringSignalIncidentsUpdateData; import com.datadog.api.client.v2.model.SecurityMonitoringSignalIncidentsUpdateRequest; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringSignalIncidentsUpdateRequest body = - new SecurityMonitoringSignalIncidentsUpdateRequest() - .data( - new SecurityMonitoringSignalIncidentsUpdateData() - .attributes( - new SecurityMonitoringSignalIncidentsUpdateAttributes() - .incidentIds(Collections.singletonList(2066L)))); + SecurityMonitoringSignalIncidentsUpdateRequest body = new SecurityMonitoringSignalIncidentsUpdateRequest() +.data(new SecurityMonitoringSignalIncidentsUpdateData() +.attributes(new SecurityMonitoringSignalIncidentsUpdateAttributes() +.incidentIds(Collections.singletonList(2066L)))); try { - SecurityMonitoringSignalTriageUpdateResponse result = - apiInstance.editSecurityMonitoringSignalIncidents( - "AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE", body); + SecurityMonitoringSignalTriageUpdateResponse result = apiInstance.editSecurityMonitoringSignalIncidents("AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalIncidents"); + System.err.println("Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalIncidents"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.java b/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.java index a1ac5fbb305..7a91ecedfce 100644 --- a/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.java +++ b/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.java @@ -1,41 +1,41 @@ // Change the triage state of a security signal returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalArchiveReason; import com.datadog.api.client.v2.model.SecurityMonitoringSignalState; import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateData; import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateRequest; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringSignalStateUpdateRequest body = - new SecurityMonitoringSignalStateUpdateRequest() - .data( - new SecurityMonitoringSignalStateUpdateData() - .attributes( - new SecurityMonitoringSignalStateUpdateAttributes() - .archiveReason(SecurityMonitoringSignalArchiveReason.NONE) - .state(SecurityMonitoringSignalState.OPEN))); + SecurityMonitoringSignalStateUpdateRequest body = new SecurityMonitoringSignalStateUpdateRequest() +.data(new SecurityMonitoringSignalStateUpdateData() +.attributes(new SecurityMonitoringSignalStateUpdateAttributes() +.archiveReason(SecurityMonitoringSignalArchiveReason.NONE) +.state(SecurityMonitoringSignalState.OPEN))); try { - SecurityMonitoringSignalTriageUpdateResponse result = - apiInstance.editSecurityMonitoringSignalState( - "AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE", body); + SecurityMonitoringSignalTriageUpdateResponse result = apiInstance.editSecurityMonitoringSignalState("AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalState"); + System.err.println("Exception when calling SecurityMonitoringApi#editSecurityMonitoringSignalState"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/GetSecurityFilter.java b/examples/v2/security-monitoring/GetSecurityFilter.java index 29f8e14ee78..1e7c369dd01 100644 --- a/examples/v2/security-monitoring/GetSecurityFilter.java +++ b/examples/v2/security-monitoring/GetSecurityFilter.java @@ -1,9 +1,15 @@ // Get a security filter returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityFilterResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringRule.java b/examples/v2/security-monitoring/GetSecurityMonitoringRule.java index 6d1d7a62475..b0d3431a2d9 100644 --- a/examples/v2/security-monitoring/GetSecurityMonitoringRule.java +++ b/examples/v2/security-monitoring/GetSecurityMonitoringRule.java @@ -1,9 +1,15 @@ // Get a rule's details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,7 @@ public static void main(String[] args) { String SECURITY_RULE_ID = System.getenv("SECURITY_RULE_ID"); try { - SecurityMonitoringRuleResponse result = - apiInstance.getSecurityMonitoringRule(SECURITY_RULE_ID); + SecurityMonitoringRuleResponse result = apiInstance.getSecurityMonitoringRule(SECURITY_RULE_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SecurityMonitoringApi#getSecurityMonitoringRule"); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.java b/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.java index d70ee92a678..9cc46499041 100644 --- a/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.java +++ b/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.java @@ -1,9 +1,15 @@ // Get a cloud configuration rule's details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,8 +20,7 @@ public static void main(String[] args) { String CLOUD_CONFIGURATION_RULE_ID = System.getenv("CLOUD_CONFIGURATION_RULE_ID"); try { - SecurityMonitoringRuleResponse result = - apiInstance.getSecurityMonitoringRule(CLOUD_CONFIGURATION_RULE_ID); + SecurityMonitoringRuleResponse result = apiInstance.getSecurityMonitoringRule(CLOUD_CONFIGURATION_RULE_ID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SecurityMonitoringApi#getSecurityMonitoringRule"); @@ -25,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringSignal.java b/examples/v2/security-monitoring/GetSecurityMonitoringSignal.java index a07723586aa..378bda0b62f 100644 --- a/examples/v2/security-monitoring/GetSecurityMonitoringSignal.java +++ b/examples/v2/security-monitoring/GetSecurityMonitoringSignal.java @@ -1,9 +1,15 @@ // Get a signal's details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityMonitoringSignal; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,17 +17,14 @@ public static void main(String[] args) { SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - SecurityMonitoringSignal result = - apiInstance.getSecurityMonitoringSignal( - "AQAAAYNqUBVU4-rffwAAAABBWU5xVUJWVUFBQjJBd3ptMDdQUnF3QUE"); + SecurityMonitoringSignal result = apiInstance.getSecurityMonitoringSignal("AQAAAYNqUBVU4-rffwAAAABBWU5xVUJWVUFBQjJBd3ptMDdQUnF3QUE"); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#getSecurityMonitoringSignal"); + System.err.println("Exception when calling SecurityMonitoringApi#getSecurityMonitoringSignal"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/ListSecurityFilters.java b/examples/v2/security-monitoring/ListSecurityFilters.java index ef00451ecb6..e503ab67031 100644 --- a/examples/v2/security-monitoring/ListSecurityFilters.java +++ b/examples/v2/security-monitoring/ListSecurityFilters.java @@ -1,9 +1,15 @@ // Get all security filters returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityFiltersResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringRules.java b/examples/v2/security-monitoring/ListSecurityMonitoringRules.java index d4393cebbd8..570fa1e7dca 100644 --- a/examples/v2/security-monitoring/ListSecurityMonitoringRules.java +++ b/examples/v2/security-monitoring/ListSecurityMonitoringRules.java @@ -1,9 +1,15 @@ // List rules returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityMonitoringListRulesResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,12 +20,11 @@ public static void main(String[] args) { SecurityMonitoringListRulesResponse result = apiInstance.listSecurityMonitoringRules(); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#listSecurityMonitoringRules"); + System.err.println("Exception when calling SecurityMonitoringApi#listSecurityMonitoringRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSignals.java b/examples/v2/security-monitoring/ListSecurityMonitoringSignals.java index 9ecb7660790..1688597ef26 100644 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSignals.java +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSignals.java @@ -1,9 +1,15 @@ // Get a quick list of security signals returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,12 +20,11 @@ public static void main(String[] args) { SecurityMonitoringSignalsListResponse result = apiInstance.listSecurityMonitoringSignals(); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#listSecurityMonitoringSignals"); + System.err.println("Exception when calling SecurityMonitoringApi#listSecurityMonitoringSignals"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.java b/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.java index 8c12d1e8007..66cdbc4d1cd 100644 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.java +++ b/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.java @@ -1,10 +1,18 @@ // Get a quick list of security signals returns "OK" response with pagination +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListSecurityMonitoringSignalsOptionalParameters; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignal; +import com.datadog.api.client.PaginationIterable; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,19 +20,15 @@ public static void main(String[] args) { SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - PaginationIterable iterable = - apiInstance.listSecurityMonitoringSignalsWithPagination( - new ListSecurityMonitoringSignalsOptionalParameters().pageLimit(2)); + PaginationIterable iterable = apiInstance.listSecurityMonitoringSignalsWithPagination(new ListSecurityMonitoringSignalsOptionalParameters().pageLimit(2)); for (SecurityMonitoringSignal item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { - System.err.println( - "Exception when calling" - + " SecurityMonitoringApi#listSecurityMonitoringSignalsWithPagination"); + System.err.println("Exception when calling SecurityMonitoringApi#listSecurityMonitoringSignalsWithPagination"); System.err.println("Reason: " + e.getMessage()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.java b/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.java index 23ed2b5233f..bcc9e9cd509 100644 --- a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.java +++ b/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.java @@ -1,47 +1,45 @@ // Get a list of security signals returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.api.SecurityMonitoringApi.SearchSecurityMonitoringSignalsOptionalParameters; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequestFilter; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequestPage; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalsSort; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringSignalListRequest body = - new SecurityMonitoringSignalListRequest() - .filter( - new SecurityMonitoringSignalListRequestFilter() - .from(OffsetDateTime.parse("2019-01-02T09:42:36.320Z")) - .query("security:attack status:high") - .to(OffsetDateTime.parse("2019-01-03T09:42:36.320Z"))) - .page( - new SecurityMonitoringSignalListRequestPage() - .cursor( - "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==") - .limit(25)) - .sort(SecurityMonitoringSignalsSort.TIMESTAMP_ASCENDING); + SecurityMonitoringSignalListRequest body = new SecurityMonitoringSignalListRequest() +.filter(new SecurityMonitoringSignalListRequestFilter() +.from(OffsetDateTime.parse("2019-01-02T09:42:36.320Z")) +.query("security:attack status:high") +.to(OffsetDateTime.parse("2019-01-03T09:42:36.320Z"))) +.page(new SecurityMonitoringSignalListRequestPage() +.cursor("eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==") +.limit(25)) +.sort(SecurityMonitoringSignalsSort.TIMESTAMP_ASCENDING); try { - SecurityMonitoringSignalsListResponse result = - apiInstance.searchSecurityMonitoringSignals( - new SearchSecurityMonitoringSignalsOptionalParameters().body(body)); + SecurityMonitoringSignalsListResponse result = apiInstance.searchSecurityMonitoringSignals(new SearchSecurityMonitoringSignalsOptionalParameters().body(body)); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#searchSecurityMonitoringSignals"); + System.err.println("Exception when calling SecurityMonitoringApi#searchSecurityMonitoringSignals"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.java b/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.java index 847cd621f44..c0198d9468e 100644 --- a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.java +++ b/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.java @@ -1,44 +1,48 @@ // Get a list of security signals returns "OK" response with pagination +import java.time.OffsetDateTime; + +import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiClient; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.api.SecurityMonitoringApi.SearchSecurityMonitoringSignalsOptionalParameters; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignal; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequestFilter; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequestPage; import com.datadog.api.client.v2.model.SecurityMonitoringSignalsSort; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); - SecurityMonitoringSignalListRequest body = - new SecurityMonitoringSignalListRequest() - .filter( - new SecurityMonitoringSignalListRequestFilter() - .from(OffsetDateTime.now().plusMinutes(-15)) - .query("security:attack status:high") - .to(OffsetDateTime.now())) - .page(new SecurityMonitoringSignalListRequestPage().limit(2)) - .sort(SecurityMonitoringSignalsSort.TIMESTAMP_ASCENDING); + SecurityMonitoringSignalListRequest body = new SecurityMonitoringSignalListRequest() +.filter(new SecurityMonitoringSignalListRequestFilter() +.from(OffsetDateTime.now().plusMinutes(-15)) +.query("security:attack status:high") +.to(OffsetDateTime.now())) +.page(new SecurityMonitoringSignalListRequestPage() +.limit(2)) +.sort(SecurityMonitoringSignalsSort.TIMESTAMP_ASCENDING); try { - PaginationIterable iterable = - apiInstance.searchSecurityMonitoringSignalsWithPagination( - new SearchSecurityMonitoringSignalsOptionalParameters().body(body)); + PaginationIterable iterable = apiInstance.searchSecurityMonitoringSignalsWithPagination(new SearchSecurityMonitoringSignalsOptionalParameters().body(body)); for (SecurityMonitoringSignal item : iterable) { - System.out.println(item); + System.out.println(item); } } catch (RuntimeException e) { - System.err.println( - "Exception when calling" - + " SecurityMonitoringApi#searchSecurityMonitoringSignalsWithPagination"); + System.err.println("Exception when calling SecurityMonitoringApi#searchSecurityMonitoringSignalsWithPagination"); System.err.println("Reason: " + e.getMessage()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/UpdateSecurityFilter.java b/examples/v2/security-monitoring/UpdateSecurityFilter.java index 89c0aff4b07..892d1787a27 100644 --- a/examples/v2/security-monitoring/UpdateSecurityFilter.java +++ b/examples/v2/security-monitoring/UpdateSecurityFilter.java @@ -1,14 +1,20 @@ // Update a security filter returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; -import com.datadog.api.client.v2.model.SecurityFilterFilteredDataType; import com.datadog.api.client.v2.model.SecurityFilterResponse; +import com.datadog.api.client.v2.model.SecurityFilterFilteredDataType; import com.datadog.api.client.v2.model.SecurityFilterType; import com.datadog.api.client.v2.model.SecurityFilterUpdateAttributes; import com.datadog.api.client.v2.model.SecurityFilterUpdateData; import com.datadog.api.client.v2.model.SecurityFilterUpdateRequest; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -18,22 +24,18 @@ public static void main(String[] args) { // there is a valid "security_filter" in the system String SECURITY_FILTER_DATA_ID = System.getenv("SECURITY_FILTER_DATA_ID"); - SecurityFilterUpdateRequest body = - new SecurityFilterUpdateRequest() - .data( - new SecurityFilterUpdateData() - .attributes( - new SecurityFilterUpdateAttributes() - .filteredDataType(SecurityFilterFilteredDataType.LOGS) - .isEnabled(true) - .name("Example-Update_a_security_filter_returns_OK_response") - .query("service:ExampleUpdateasecurityfilterreturnsOKresponse") - .version(1)) - .type(SecurityFilterType.SECURITY_FILTERS)); + SecurityFilterUpdateRequest body = new SecurityFilterUpdateRequest() +.data(new SecurityFilterUpdateData() +.attributes(new SecurityFilterUpdateAttributes() +.filteredDataType(SecurityFilterFilteredDataType.LOGS) +.isEnabled(true) +.name("Example-Update_a_security_filter_returns_OK_response") +.query("service:ExampleUpdateasecurityfilterreturnsOKresponse") +.version(1)) +.type(SecurityFilterType.SECURITY_FILTERS)); try { - SecurityFilterResponse result = - apiInstance.updateSecurityFilter(SECURITY_FILTER_DATA_ID, body); + SecurityFilterResponse result = apiInstance.updateSecurityFilter(SECURITY_FILTER_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SecurityMonitoringApi#updateSecurityFilter"); @@ -43,4 +45,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.java b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.java index f2aa97fc967..706accc2fa0 100644 --- a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.java +++ b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.java @@ -1,8 +1,9 @@ // Update an existing rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCase; import com.datadog.api.client.v2.model.SecurityMonitoringRuleEvaluationWindow; import com.datadog.api.client.v2.model.SecurityMonitoringRuleKeepAlive; @@ -10,11 +11,15 @@ import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQuery; import com.datadog.api.client.v2.model.SecurityMonitoringRuleQueryAggregation; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; import com.datadog.api.client.v2.model.SecurityMonitoringRuleUpdatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringStandardRuleQuery; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,40 +29,32 @@ public static void main(String[] args) { // there is a valid "security_rule" in the system String SECURITY_RULE_ID = System.getenv("SECURITY_RULE_ID"); - SecurityMonitoringRuleUpdatePayload body = - new SecurityMonitoringRuleUpdatePayload() - .name("Example-Update_an_existing_rule_returns_OK_response-Updated") - .queries( - Collections.singletonList( - new SecurityMonitoringRuleQuery( - new SecurityMonitoringStandardRuleQuery() - .query("@test:true") - .aggregation(SecurityMonitoringRuleQueryAggregation.COUNT)))) - .cases( - Collections.singletonList( - new SecurityMonitoringRuleCase() - .name("") - .status(SecurityMonitoringRuleSeverity.INFO) - .condition("a > 0"))) - .options( - new SecurityMonitoringRuleOptions() - .evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) - .keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) - .maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) - .message("Test rule") - .isEnabled(true); + SecurityMonitoringRuleUpdatePayload body = new SecurityMonitoringRuleUpdatePayload() +.name("Example-Update_an_existing_rule_returns_OK_response-Updated") +.queries(Collections.singletonList(new SecurityMonitoringRuleQuery( +new SecurityMonitoringStandardRuleQuery() +.query("@test:true") +.aggregation(SecurityMonitoringRuleQueryAggregation.COUNT)))) +.cases(Collections.singletonList(new SecurityMonitoringRuleCase() +.name("") +.status(SecurityMonitoringRuleSeverity.INFO) +.condition("a > 0"))) +.options(new SecurityMonitoringRuleOptions() +.evaluationWindow(SecurityMonitoringRuleEvaluationWindow.FIFTEEN_MINUTES) +.keepAlive(SecurityMonitoringRuleKeepAlive.ONE_HOUR) +.maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration.ONE_DAY)) +.message("Test rule") +.isEnabled(true); try { - SecurityMonitoringRuleResponse result = - apiInstance.updateSecurityMonitoringRule(SECURITY_RULE_ID, body); + SecurityMonitoringRuleResponse result = apiInstance.updateSecurityMonitoringRule(SECURITY_RULE_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#updateSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#updateSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.java b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.java index f72d46b7b5f..7a9d3976ce2 100644 --- a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.java +++ b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.java @@ -1,17 +1,22 @@ // Update a cloud configuration rule's details returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.CloudConfigurationComplianceRuleOptions; import com.datadog.api.client.v2.model.CloudConfigurationRegoRule; import com.datadog.api.client.v2.model.CloudConfigurationRuleComplianceSignalOptions; import com.datadog.api.client.v2.model.SecurityMonitoringRuleCase; import com.datadog.api.client.v2.model.SecurityMonitoringRuleOptions; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; import com.datadog.api.client.v2.model.SecurityMonitoringRuleSeverity; import com.datadog.api.client.v2.model.SecurityMonitoringRuleUpdatePayload; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,41 +26,33 @@ public static void main(String[] args) { // there is a valid "cloud_configuration_rule" in the system String CLOUD_CONFIGURATION_RULE_ID = System.getenv("CLOUD_CONFIGURATION_RULE_ID"); - SecurityMonitoringRuleUpdatePayload body = - new SecurityMonitoringRuleUpdatePayload() - .name( - "Example-Update_a_cloud_configuration_rule_s_details_returns_OK_response_cloud_updated") - .isEnabled(false) - .cases( - Collections.singletonList( - new SecurityMonitoringRuleCase().status(SecurityMonitoringRuleSeverity.INFO))) - .options( - new SecurityMonitoringRuleOptions() - .complianceRuleOptions( - new CloudConfigurationComplianceRuleOptions() - .resourceType("gcp_compute_disk") - .regoRule( - new CloudConfigurationRegoRule() - .policy(""" + SecurityMonitoringRuleUpdatePayload body = new SecurityMonitoringRuleUpdatePayload() +.name("Example-Update_a_cloud_configuration_rule_s_details_returns_OK_response_cloud_updated") +.isEnabled(false) +.cases(Collections.singletonList(new SecurityMonitoringRuleCase() +.status(SecurityMonitoringRuleSeverity.INFO))) +.options(new SecurityMonitoringRuleOptions() +.complianceRuleOptions(new CloudConfigurationComplianceRuleOptions() +.resourceType("gcp_compute_disk") +.regoRule(new CloudConfigurationRegoRule() +.policy(""" package datadog """) - .resourceTypes(Collections.singletonList("gcp_compute_disk"))))) - .message("ddd") - .complianceSignalOptions( - new CloudConfigurationRuleComplianceSignalOptions().userActivationStatus(false)); +.resourceTypes(Collections.singletonList("gcp_compute_disk"))))) +.message("ddd") +.complianceSignalOptions(new CloudConfigurationRuleComplianceSignalOptions() +.userActivationStatus(false)); try { - SecurityMonitoringRuleResponse result = - apiInstance.updateSecurityMonitoringRule(CLOUD_CONFIGURATION_RULE_ID, body); + SecurityMonitoringRuleResponse result = apiInstance.updateSecurityMonitoringRule(CLOUD_CONFIGURATION_RULE_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling SecurityMonitoringApi#updateSecurityMonitoringRule"); + System.err.println("Exception when calling SecurityMonitoringApi#updateSecurityMonitoringRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/CreateScanningGroup.java b/examples/v2/sensitive-data-scanner/CreateScanningGroup.java index 9c5eda21478..a6277008a71 100644 --- a/examples/v2/sensitive-data-scanner/CreateScanningGroup.java +++ b/examples/v2/sensitive-data-scanner/CreateScanningGroup.java @@ -1,12 +1,12 @@ // Create Scanning Group returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; +import com.datadog.api.client.v2.model.SensitiveDataScannerCreateGroupResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerConfiguration; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigurationData; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigurationType; -import com.datadog.api.client.v2.model.SensitiveDataScannerCreateGroupResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerFilter; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupAttributes; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupCreate; @@ -16,7 +16,12 @@ import com.datadog.api.client.v2.model.SensitiveDataScannerMetaVersionOnly; import com.datadog.api.client.v2.model.SensitiveDataScannerProduct; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -26,30 +31,22 @@ public static void main(String[] args) { // a valid "configuration" in the system String CONFIGURATION_DATA_ID = System.getenv("CONFIGURATION_DATA_ID"); - SensitiveDataScannerGroupCreateRequest body = - new SensitiveDataScannerGroupCreateRequest() - .meta(new SensitiveDataScannerMetaVersionOnly()) - .data( - new SensitiveDataScannerGroupCreate() - .type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) - .attributes( - new SensitiveDataScannerGroupAttributes() - .name("Example-Create_Scanning_Group_returns_OK_response") - .isEnabled(false) - .productList( - Collections.singletonList(SensitiveDataScannerProduct.LOGS)) - .filter(new SensitiveDataScannerFilter().query("*"))) - .relationships( - new SensitiveDataScannerGroupRelationships() - .configuration( - new SensitiveDataScannerConfigurationData() - .data( - new SensitiveDataScannerConfiguration() - .type( - SensitiveDataScannerConfigurationType - .SENSITIVE_DATA_SCANNER_CONFIGURATIONS) - .id(CONFIGURATION_DATA_ID))) - .rules(new SensitiveDataScannerRuleData()))); + SensitiveDataScannerGroupCreateRequest body = new SensitiveDataScannerGroupCreateRequest() +.meta(new SensitiveDataScannerMetaVersionOnly()) +.data(new SensitiveDataScannerGroupCreate() +.type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) +.attributes(new SensitiveDataScannerGroupAttributes() +.name("Example-Create_Scanning_Group_returns_OK_response") +.isEnabled(false) +.productList(Collections.singletonList(SensitiveDataScannerProduct.LOGS)) +.filter(new SensitiveDataScannerFilter() +.query("*"))) +.relationships(new SensitiveDataScannerGroupRelationships() +.configuration(new SensitiveDataScannerConfigurationData() +.data(new SensitiveDataScannerConfiguration() +.type(SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS) +.id(CONFIGURATION_DATA_ID))) +.rules(new SensitiveDataScannerRuleData()))); try { SensitiveDataScannerCreateGroupResponse result = apiInstance.createScanningGroup(body); @@ -62,4 +59,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/CreateScanningRule.java b/examples/v2/sensitive-data-scanner/CreateScanningRule.java index 86caf5373a2..76df7755073 100644 --- a/examples/v2/sensitive-data-scanner/CreateScanningRule.java +++ b/examples/v2/sensitive-data-scanner/CreateScanningRule.java @@ -1,7 +1,7 @@ // Create Scanning Rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; import com.datadog.api.client.v2.model.SensitiveDataScannerCreateRuleResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerGroup; @@ -15,7 +15,12 @@ import com.datadog.api.client.v2.model.SensitiveDataScannerRuleType; import com.datadog.api.client.v2.model.SensitiveDataScannerTextReplacement; import com.datadog.api.client.v2.model.SensitiveDataScannerTextReplacementType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,33 +30,24 @@ public static void main(String[] args) { // there is a valid "scanning_group" in the system String GROUP_DATA_ID = System.getenv("GROUP_DATA_ID"); - SensitiveDataScannerRuleCreateRequest body = - new SensitiveDataScannerRuleCreateRequest() - .meta(new SensitiveDataScannerMetaVersionOnly()) - .data( - new SensitiveDataScannerRuleCreate() - .type(SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE) - .attributes( - new SensitiveDataScannerRuleAttributes() - .name("Example-Create_Scanning_Rule_returns_OK_response") - .pattern("pattern") - .namespaces(Collections.singletonList("admin")) - .excludedNamespaces(Collections.singletonList("admin.name")) - .textReplacement( - new SensitiveDataScannerTextReplacement() - .type(SensitiveDataScannerTextReplacementType.NONE)) - .tags(Collections.singletonList("sensitive_data:true")) - .isEnabled(true)) - .relationships( - new SensitiveDataScannerRuleRelationships() - .group( - new SensitiveDataScannerGroupData() - .data( - new SensitiveDataScannerGroup() - .type( - SensitiveDataScannerGroupType - .SENSITIVE_DATA_SCANNER_GROUP) - .id(GROUP_DATA_ID))))); + SensitiveDataScannerRuleCreateRequest body = new SensitiveDataScannerRuleCreateRequest() +.meta(new SensitiveDataScannerMetaVersionOnly()) +.data(new SensitiveDataScannerRuleCreate() +.type(SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE) +.attributes(new SensitiveDataScannerRuleAttributes() +.name("Example-Create_Scanning_Rule_returns_OK_response") +.pattern("pattern") +.namespaces(Collections.singletonList("admin")) +.excludedNamespaces(Collections.singletonList("admin.name")) +.textReplacement(new SensitiveDataScannerTextReplacement() +.type(SensitiveDataScannerTextReplacementType.NONE)) +.tags(Collections.singletonList("sensitive_data:true")) +.isEnabled(true)) +.relationships(new SensitiveDataScannerRuleRelationships() +.group(new SensitiveDataScannerGroupData() +.data(new SensitiveDataScannerGroup() +.type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) +.id(GROUP_DATA_ID))))); try { SensitiveDataScannerCreateRuleResponse result = apiInstance.createScanningRule(body); @@ -64,4 +60,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/DeleteScanningGroup.java b/examples/v2/sensitive-data-scanner/DeleteScanningGroup.java index 580aa194ac6..89f322fc7e0 100644 --- a/examples/v2/sensitive-data-scanner/DeleteScanningGroup.java +++ b/examples/v2/sensitive-data-scanner/DeleteScanningGroup.java @@ -1,11 +1,17 @@ // Delete Scanning Group returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; -import com.datadog.api.client.v2.model.SensitiveDataScannerGroupDeleteRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupDeleteResponse; +import com.datadog.api.client.v2.model.SensitiveDataScannerGroupDeleteRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerMetaVersionOnly; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,13 +21,11 @@ public static void main(String[] args) { // there is a valid "scanning_group" in the system String GROUP_DATA_ID = System.getenv("GROUP_DATA_ID"); - SensitiveDataScannerGroupDeleteRequest body = - new SensitiveDataScannerGroupDeleteRequest() - .meta(new SensitiveDataScannerMetaVersionOnly()); + SensitiveDataScannerGroupDeleteRequest body = new SensitiveDataScannerGroupDeleteRequest() +.meta(new SensitiveDataScannerMetaVersionOnly()); try { - SensitiveDataScannerGroupDeleteResponse result = - apiInstance.deleteScanningGroup(GROUP_DATA_ID, body); + SensitiveDataScannerGroupDeleteResponse result = apiInstance.deleteScanningGroup(GROUP_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SensitiveDataScannerApi#deleteScanningGroup"); @@ -31,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/DeleteScanningRule.java b/examples/v2/sensitive-data-scanner/DeleteScanningRule.java index d76d391cc01..acabc2e11d6 100644 --- a/examples/v2/sensitive-data-scanner/DeleteScanningRule.java +++ b/examples/v2/sensitive-data-scanner/DeleteScanningRule.java @@ -1,11 +1,17 @@ // Delete Scanning Rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; +import com.datadog.api.client.v2.model.SensitiveDataScannerRuleDeleteResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerMetaVersionOnly; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleDeleteRequest; -import com.datadog.api.client.v2.model.SensitiveDataScannerRuleDeleteResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,12 +21,11 @@ public static void main(String[] args) { // the "scanning_group" has a "scanning_rule" String RULE_DATA_ID = System.getenv("RULE_DATA_ID"); - SensitiveDataScannerRuleDeleteRequest body = - new SensitiveDataScannerRuleDeleteRequest().meta(new SensitiveDataScannerMetaVersionOnly()); + SensitiveDataScannerRuleDeleteRequest body = new SensitiveDataScannerRuleDeleteRequest() +.meta(new SensitiveDataScannerMetaVersionOnly()); try { - SensitiveDataScannerRuleDeleteResponse result = - apiInstance.deleteScanningRule(RULE_DATA_ID, body); + SensitiveDataScannerRuleDeleteResponse result = apiInstance.deleteScanningRule(RULE_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SensitiveDataScannerApi#deleteScanningRule"); @@ -30,4 +35,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/ListScanningGroups.java b/examples/v2/sensitive-data-scanner/ListScanningGroups.java index 382aceb591b..facbf8e7860 100644 --- a/examples/v2/sensitive-data-scanner/ListScanningGroups.java +++ b/examples/v2/sensitive-data-scanner/ListScanningGroups.java @@ -1,9 +1,15 @@ // List Scanning Groups returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; import com.datadog.api.client.v2.model.SensitiveDataScannerGetConfigResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/ListStandardPatterns.java b/examples/v2/sensitive-data-scanner/ListStandardPatterns.java index 6d6a26a4ffa..914869a30b2 100644 --- a/examples/v2/sensitive-data-scanner/ListStandardPatterns.java +++ b/examples/v2/sensitive-data-scanner/ListStandardPatterns.java @@ -1,9 +1,15 @@ // List standard patterns returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; import com.datadog.api.client.v2.model.SensitiveDataScannerStandardPatternsResponseData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/ReorderScanningGroups.java b/examples/v2/sensitive-data-scanner/ReorderScanningGroups.java index b883ddb579b..c1f4e88e771 100644 --- a/examples/v2/sensitive-data-scanner/ReorderScanningGroups.java +++ b/examples/v2/sensitive-data-scanner/ReorderScanningGroups.java @@ -1,8 +1,9 @@ // Reorder Groups returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; +import com.datadog.api.client.v2.model.SensitiveDataScannerReorderGroupsResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigurationRelationships; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigurationType; @@ -11,8 +12,12 @@ import com.datadog.api.client.v2.model.SensitiveDataScannerGroupType; import com.datadog.api.client.v2.model.SensitiveDataScannerMetaVersionOnly; import com.datadog.api.client.v2.model.SensitiveDataScannerReorderConfig; -import com.datadog.api.client.v2.model.SensitiveDataScannerReorderGroupsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -25,25 +30,16 @@ public static void main(String[] args) { // a valid "configuration" in the system String CONFIGURATION_DATA_ID = System.getenv("CONFIGURATION_DATA_ID"); - SensitiveDataScannerConfigRequest body = - new SensitiveDataScannerConfigRequest() - .data( - new SensitiveDataScannerReorderConfig() - .relationships( - new SensitiveDataScannerConfigurationRelationships() - .groups( - new SensitiveDataScannerGroupList() - .data( - Collections.singletonList( - new SensitiveDataScannerGroupItem() - .type( - SensitiveDataScannerGroupType - .SENSITIVE_DATA_SCANNER_GROUP) - .id(GROUP_DATA_ID))))) - .type( - SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS) - .id(CONFIGURATION_DATA_ID)) - .meta(new SensitiveDataScannerMetaVersionOnly()); + SensitiveDataScannerConfigRequest body = new SensitiveDataScannerConfigRequest() +.data(new SensitiveDataScannerReorderConfig() +.relationships(new SensitiveDataScannerConfigurationRelationships() +.groups(new SensitiveDataScannerGroupList() +.data(Collections.singletonList(new SensitiveDataScannerGroupItem() +.type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) +.id(GROUP_DATA_ID))))) +.type(SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS) +.id(CONFIGURATION_DATA_ID)) +.meta(new SensitiveDataScannerMetaVersionOnly()); try { SensitiveDataScannerReorderGroupsResponse result = apiInstance.reorderScanningGroups(body); @@ -56,4 +52,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/UpdateScanningGroup.java b/examples/v2/sensitive-data-scanner/UpdateScanningGroup.java index 3c5916b0046..8b5f08e59de 100644 --- a/examples/v2/sensitive-data-scanner/UpdateScanningGroup.java +++ b/examples/v2/sensitive-data-scanner/UpdateScanningGroup.java @@ -1,8 +1,9 @@ // Update Scanning Group returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; +import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdateResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerConfiguration; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigurationData; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigurationType; @@ -12,11 +13,15 @@ import com.datadog.api.client.v2.model.SensitiveDataScannerGroupType; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdate; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdateRequest; -import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdateResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerMetaVersionOnly; import com.datadog.api.client.v2.model.SensitiveDataScannerProduct; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleData; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -29,35 +34,26 @@ public static void main(String[] args) { // a valid "configuration" in the system String CONFIGURATION_DATA_ID = System.getenv("CONFIGURATION_DATA_ID"); - SensitiveDataScannerGroupUpdateRequest body = - new SensitiveDataScannerGroupUpdateRequest() - .meta(new SensitiveDataScannerMetaVersionOnly()) - .data( - new SensitiveDataScannerGroupUpdate() - .id(GROUP_DATA_ID) - .type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) - .attributes( - new SensitiveDataScannerGroupAttributes() - .name("Example-Update_Scanning_Group_returns_OK_response") - .isEnabled(false) - .productList( - Collections.singletonList(SensitiveDataScannerProduct.LOGS)) - .filter(new SensitiveDataScannerFilter().query("*"))) - .relationships( - new SensitiveDataScannerGroupRelationships() - .configuration( - new SensitiveDataScannerConfigurationData() - .data( - new SensitiveDataScannerConfiguration() - .type( - SensitiveDataScannerConfigurationType - .SENSITIVE_DATA_SCANNER_CONFIGURATIONS) - .id(CONFIGURATION_DATA_ID))) - .rules(new SensitiveDataScannerRuleData()))); + SensitiveDataScannerGroupUpdateRequest body = new SensitiveDataScannerGroupUpdateRequest() +.meta(new SensitiveDataScannerMetaVersionOnly()) +.data(new SensitiveDataScannerGroupUpdate() +.id(GROUP_DATA_ID) +.type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) +.attributes(new SensitiveDataScannerGroupAttributes() +.name("Example-Update_Scanning_Group_returns_OK_response") +.isEnabled(false) +.productList(Collections.singletonList(SensitiveDataScannerProduct.LOGS)) +.filter(new SensitiveDataScannerFilter() +.query("*"))) +.relationships(new SensitiveDataScannerGroupRelationships() +.configuration(new SensitiveDataScannerConfigurationData() +.data(new SensitiveDataScannerConfiguration() +.type(SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS) +.id(CONFIGURATION_DATA_ID))) +.rules(new SensitiveDataScannerRuleData()))); try { - SensitiveDataScannerGroupUpdateResponse result = - apiInstance.updateScanningGroup(GROUP_DATA_ID, body); + SensitiveDataScannerGroupUpdateResponse result = apiInstance.updateScanningGroup(GROUP_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SensitiveDataScannerApi#updateScanningGroup"); @@ -67,4 +63,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/sensitive-data-scanner/UpdateScanningRule.java b/examples/v2/sensitive-data-scanner/UpdateScanningRule.java index df056e3e4f0..be02f8f2978 100644 --- a/examples/v2/sensitive-data-scanner/UpdateScanningRule.java +++ b/examples/v2/sensitive-data-scanner/UpdateScanningRule.java @@ -1,8 +1,9 @@ // Update Scanning Rule returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SensitiveDataScannerApi; +import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdateResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerGroup; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupData; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupType; @@ -12,10 +13,14 @@ import com.datadog.api.client.v2.model.SensitiveDataScannerRuleType; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdate; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdateRequest; -import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdateResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerTextReplacement; import com.datadog.api.client.v2.model.SensitiveDataScannerTextReplacementType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -28,36 +33,26 @@ public static void main(String[] args) { // there is a valid "scanning_group" in the system String GROUP_DATA_ID = System.getenv("GROUP_DATA_ID"); - SensitiveDataScannerRuleUpdateRequest body = - new SensitiveDataScannerRuleUpdateRequest() - .meta(new SensitiveDataScannerMetaVersionOnly()) - .data( - new SensitiveDataScannerRuleUpdate() - .id(RULE_DATA_ID) - .type(SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE) - .attributes( - new SensitiveDataScannerRuleAttributes() - .name("Example-Update_Scanning_Rule_returns_OK_response") - .pattern("pattern") - .textReplacement( - new SensitiveDataScannerTextReplacement() - .type(SensitiveDataScannerTextReplacementType.NONE)) - .tags(Collections.singletonList("sensitive_data:true")) - .isEnabled(true)) - .relationships( - new SensitiveDataScannerRuleRelationships() - .group( - new SensitiveDataScannerGroupData() - .data( - new SensitiveDataScannerGroup() - .type( - SensitiveDataScannerGroupType - .SENSITIVE_DATA_SCANNER_GROUP) - .id(GROUP_DATA_ID))))); + SensitiveDataScannerRuleUpdateRequest body = new SensitiveDataScannerRuleUpdateRequest() +.meta(new SensitiveDataScannerMetaVersionOnly()) +.data(new SensitiveDataScannerRuleUpdate() +.id(RULE_DATA_ID) +.type(SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE) +.attributes(new SensitiveDataScannerRuleAttributes() +.name("Example-Update_Scanning_Rule_returns_OK_response") +.pattern("pattern") +.textReplacement(new SensitiveDataScannerTextReplacement() +.type(SensitiveDataScannerTextReplacementType.NONE)) +.tags(Collections.singletonList("sensitive_data:true")) +.isEnabled(true)) +.relationships(new SensitiveDataScannerRuleRelationships() +.group(new SensitiveDataScannerGroupData() +.data(new SensitiveDataScannerGroup() +.type(SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP) +.id(GROUP_DATA_ID))))); try { - SensitiveDataScannerRuleUpdateResponse result = - apiInstance.updateScanningRule(RULE_DATA_ID, body); + SensitiveDataScannerRuleUpdateResponse result = apiInstance.updateScanningRule(RULE_DATA_ID, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SensitiveDataScannerApi#updateScanningRule"); @@ -67,4 +62,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/CreateServiceAccount.java b/examples/v2/service-accounts/CreateServiceAccount.java index 25ef2d65f0a..fcd47556312 100644 --- a/examples/v2/service-accounts/CreateServiceAccount.java +++ b/examples/v2/service-accounts/CreateServiceAccount.java @@ -1,8 +1,9 @@ // Create a service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import com.datadog.api.client.v2.model.UserResponse; import com.datadog.api.client.v2.model.RelationshipToRoleData; import com.datadog.api.client.v2.model.RelationshipToRoles; import com.datadog.api.client.v2.model.RolesType; @@ -10,9 +11,13 @@ import com.datadog.api.client.v2.model.ServiceAccountCreateData; import com.datadog.api.client.v2.model.ServiceAccountCreateRequest; import com.datadog.api.client.v2.model.UserRelationships; -import com.datadog.api.client.v2.model.UserResponse; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,26 +27,18 @@ public static void main(String[] args) { // there is a valid "role" in the system String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID"); - ServiceAccountCreateRequest body = - new ServiceAccountCreateRequest() - .data( - new ServiceAccountCreateData() - .type(UsersType.USERS) - .attributes( - new ServiceAccountCreateAttributes() - .name("Test API Client") - .email( - "Example-Create_a_service_account_returns_OK_response@datadoghq.com") - .serviceAccount(true)) - .relationships( - new UserRelationships() - .roles( - new RelationshipToRoles() - .data( - Collections.singletonList( - new RelationshipToRoleData() - .id(ROLE_DATA_ID) - .type(RolesType.ROLES)))))); + ServiceAccountCreateRequest body = new ServiceAccountCreateRequest() +.data(new ServiceAccountCreateData() +.type(UsersType.USERS) +.attributes(new ServiceAccountCreateAttributes() +.name("Test API Client") +.email("Example-Create_a_service_account_returns_OK_response@datadoghq.com") +.serviceAccount(true)) +.relationships(new UserRelationships() +.roles(new RelationshipToRoles() +.data(Collections.singletonList(new RelationshipToRoleData() +.id(ROLE_DATA_ID) +.type(RolesType.ROLES)))))); try { UserResponse result = apiInstance.createServiceAccount(body); @@ -54,4 +51,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/CreateServiceAccountApplicationKey.java b/examples/v2/service-accounts/CreateServiceAccountApplicationKey.java index 4e22c585cc0..4ddf75d5395 100644 --- a/examples/v2/service-accounts/CreateServiceAccountApplicationKey.java +++ b/examples/v2/service-accounts/CreateServiceAccountApplicationKey.java @@ -1,46 +1,41 @@ // Create an application key for this service account returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeyCreateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyCreateData; import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ServiceAccountsApi apiInstance = new ServiceAccountsApi(defaultClient); - ApplicationKeyCreateRequest body = - new ApplicationKeyCreateRequest() - .data( - new ApplicationKeyCreateData() - .attributes( - new ApplicationKeyCreateAttributes() - .name("Application Key for managing dashboards") - .scopes( - Arrays.asList( - "dashboards_read", - "dashboards_write", - "dashboards_public_share"))) - .type(ApplicationKeysType.APPLICATION_KEYS)); + ApplicationKeyCreateRequest body = new ApplicationKeyCreateRequest() +.data(new ApplicationKeyCreateData() +.attributes(new ApplicationKeyCreateAttributes() +.name("Application Key for managing dashboards") +.scopes(Arrays.asList("dashboards_read", "dashboards_write", "dashboards_public_share"))) +.type(ApplicationKeysType.APPLICATION_KEYS)); try { - ApplicationKeyResponse result = - apiInstance.createServiceAccountApplicationKey( - "00000000-0000-1234-0000-000000000000", body); + ApplicationKeyResponse result = apiInstance.createServiceAccountApplicationKey("00000000-0000-1234-0000-000000000000", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#createServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#createServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.java b/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.java index 2c14ae7385d..46e6594ca05 100644 --- a/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.java +++ b/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.java @@ -1,13 +1,19 @@ // Create an app key for this service account returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeyCreateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyCreateData; import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,27 +23,21 @@ public static void main(String[] args) { // there is a valid "service_account_user" in the system String SERVICE_ACCOUNT_USER_DATA_ID = System.getenv("SERVICE_ACCOUNT_USER_DATA_ID"); - ApplicationKeyCreateRequest body = - new ApplicationKeyCreateRequest() - .data( - new ApplicationKeyCreateData() - .attributes( - new ApplicationKeyCreateAttributes() - .name( - "Example-Create_an_app_key_for_this_service_account_returns_Created_response")) - .type(ApplicationKeysType.APPLICATION_KEYS)); + ApplicationKeyCreateRequest body = new ApplicationKeyCreateRequest() +.data(new ApplicationKeyCreateData() +.attributes(new ApplicationKeyCreateAttributes() +.name("Example-Create_an_app_key_for_this_service_account_returns_Created_response")) +.type(ApplicationKeysType.APPLICATION_KEYS)); try { - ApplicationKeyResponse result = - apiInstance.createServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, body); + ApplicationKeyResponse result = apiInstance.createServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#createServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#createServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.java b/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.java index 6e359a2d668..7c7d4f3ceb0 100644 --- a/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.java +++ b/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.java @@ -1,14 +1,19 @@ // Create an application key with scopes for this service account returns "Created" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeyCreateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyCreateData; import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; import com.datadog.api.client.v2.model.ApplicationKeysType; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -18,32 +23,22 @@ public static void main(String[] args) { // there is a valid "service_account_user" in the system String SERVICE_ACCOUNT_USER_DATA_ID = System.getenv("SERVICE_ACCOUNT_USER_DATA_ID"); - ApplicationKeyCreateRequest body = - new ApplicationKeyCreateRequest() - .data( - new ApplicationKeyCreateData() - .attributes( - new ApplicationKeyCreateAttributes() - .name( - "Example-Create_an_application_key_with_scopes_for_this_service_account_returns_Created_response") - .scopes( - Arrays.asList( - "dashboards_read", - "dashboards_write", - "dashboards_public_share"))) - .type(ApplicationKeysType.APPLICATION_KEYS)); + ApplicationKeyCreateRequest body = new ApplicationKeyCreateRequest() +.data(new ApplicationKeyCreateData() +.attributes(new ApplicationKeyCreateAttributes() +.name("Example-Create_an_application_key_with_scopes_for_this_service_account_returns_Created_response") +.scopes(Arrays.asList("dashboards_read", "dashboards_write", "dashboards_public_share"))) +.type(ApplicationKeysType.APPLICATION_KEYS)); try { - ApplicationKeyResponse result = - apiInstance.createServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, body); + ApplicationKeyResponse result = apiInstance.createServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#createServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#createServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.java b/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.java index 0d8e6e96a89..4c6e8792302 100644 --- a/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.java +++ b/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.java @@ -1,8 +1,14 @@ // Delete an application key for this service account returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -10,15 +16,13 @@ public static void main(String[] args) { ServiceAccountsApi apiInstance = new ServiceAccountsApi(defaultClient); try { - apiInstance.deleteServiceAccountApplicationKey( - "00000000-0000-1234-0000-000000000000", "app_key_id"); + apiInstance.deleteServiceAccountApplicationKey("00000000-0000-1234-0000-000000000000", "app_key_id"); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#deleteServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#deleteServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.java b/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.java index 6f1188287c5..d66aad1b08e 100644 --- a/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.java +++ b/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.java @@ -1,8 +1,14 @@ // Delete an app key owned by this service account returns "No Content" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -13,19 +19,16 @@ public static void main(String[] args) { String SERVICE_ACCOUNT_USER_DATA_ID = System.getenv("SERVICE_ACCOUNT_USER_DATA_ID"); // there is a valid "service_account_application_key" for "service_account_user" - String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = - System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID"); + String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID"); try { - apiInstance.deleteServiceAccountApplicationKey( - SERVICE_ACCOUNT_USER_DATA_ID, SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID); + apiInstance.deleteServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#deleteServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#deleteServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/GetServiceAccountApplicationKey.java b/examples/v2/service-accounts/GetServiceAccountApplicationKey.java index c537a0e2503..0111b708b42 100644 --- a/examples/v2/service-accounts/GetServiceAccountApplicationKey.java +++ b/examples/v2/service-accounts/GetServiceAccountApplicationKey.java @@ -1,9 +1,15 @@ // Get one application key for this service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,17 +17,14 @@ public static void main(String[] args) { ServiceAccountsApi apiInstance = new ServiceAccountsApi(defaultClient); try { - PartialApplicationKeyResponse result = - apiInstance.getServiceAccountApplicationKey( - "00000000-0000-1234-0000-000000000000", "app_key_id"); + PartialApplicationKeyResponse result = apiInstance.getServiceAccountApplicationKey("00000000-0000-1234-0000-000000000000", "app_key_id"); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#getServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#getServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.java b/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.java index 573f8b27000..0cdbb219d21 100644 --- a/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.java +++ b/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.java @@ -1,9 +1,15 @@ // Get one app key owned by this service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,21 +20,17 @@ public static void main(String[] args) { String SERVICE_ACCOUNT_USER_DATA_ID = System.getenv("SERVICE_ACCOUNT_USER_DATA_ID"); // there is a valid "service_account_application_key" for "service_account_user" - String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = - System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID"); + String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID"); try { - PartialApplicationKeyResponse result = - apiInstance.getServiceAccountApplicationKey( - SERVICE_ACCOUNT_USER_DATA_ID, SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID); + PartialApplicationKeyResponse result = apiInstance.getServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#getServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#getServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/ListServiceAccountApplicationKeys.java b/examples/v2/service-accounts/ListServiceAccountApplicationKeys.java index 225519aac9e..2b2cf2cca16 100644 --- a/examples/v2/service-accounts/ListServiceAccountApplicationKeys.java +++ b/examples/v2/service-accounts/ListServiceAccountApplicationKeys.java @@ -1,9 +1,15 @@ // List application keys for this service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,16 +17,14 @@ public static void main(String[] args) { ServiceAccountsApi apiInstance = new ServiceAccountsApi(defaultClient); try { - ListApplicationKeysResponse result = - apiInstance.listServiceAccountApplicationKeys("00000000-0000-1234-0000-000000000000"); + ListApplicationKeysResponse result = apiInstance.listServiceAccountApplicationKeys("00000000-0000-1234-0000-000000000000"); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#listServiceAccountApplicationKeys"); + System.err.println("Exception when calling ServiceAccountsApi#listServiceAccountApplicationKeys"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.java b/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.java index b06d2196893..d254465d45f 100644 --- a/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.java +++ b/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.java @@ -1,9 +1,15 @@ // Get all app keys owned by this service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -14,16 +20,14 @@ public static void main(String[] args) { String SERVICE_ACCOUNT_USER_DATA_ID = System.getenv("SERVICE_ACCOUNT_USER_DATA_ID"); try { - ListApplicationKeysResponse result = - apiInstance.listServiceAccountApplicationKeys(SERVICE_ACCOUNT_USER_DATA_ID); + ListApplicationKeysResponse result = apiInstance.listServiceAccountApplicationKeys(SERVICE_ACCOUNT_USER_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#listServiceAccountApplicationKeys"); + System.err.println("Exception when calling ServiceAccountsApi#listServiceAccountApplicationKeys"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.java b/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.java index d5f7e794c77..89902eb173f 100644 --- a/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.java +++ b/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.java @@ -1,47 +1,42 @@ // Edit an application key for this service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeysType; import com.datadog.api.client.v2.model.ApplicationKeyUpdateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyUpdateData; import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -import com.datadog.api.client.v2.model.ApplicationKeysType; -import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ServiceAccountsApi apiInstance = new ServiceAccountsApi(defaultClient); - ApplicationKeyUpdateRequest body = - new ApplicationKeyUpdateRequest() - .data( - new ApplicationKeyUpdateData() - .attributes( - new ApplicationKeyUpdateAttributes() - .name("Application Key for managing dashboards") - .scopes( - Arrays.asList( - "dashboards_read", - "dashboards_write", - "dashboards_public_share"))) - .id("00112233-4455-6677-8899-aabbccddeeff") - .type(ApplicationKeysType.APPLICATION_KEYS)); + ApplicationKeyUpdateRequest body = new ApplicationKeyUpdateRequest() +.data(new ApplicationKeyUpdateData() +.attributes(new ApplicationKeyUpdateAttributes() +.name("Application Key for managing dashboards") +.scopes(Arrays.asList("dashboards_read", "dashboards_write", "dashboards_public_share"))) +.id("00112233-4455-6677-8899-aabbccddeeff") +.type(ApplicationKeysType.APPLICATION_KEYS)); try { - PartialApplicationKeyResponse result = - apiInstance.updateServiceAccountApplicationKey( - "00000000-0000-1234-0000-000000000000", "app_key_id", body); + PartialApplicationKeyResponse result = apiInstance.updateServiceAccountApplicationKey("00000000-0000-1234-0000-000000000000", "app_key_id", body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#updateServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#updateServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.java b/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.java index 78f1882dc27..b0c0ebf318a 100644 --- a/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.java +++ b/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.java @@ -1,13 +1,19 @@ // Edit an app key owned by this service account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceAccountsApi; +import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeysType; import com.datadog.api.client.v2.model.ApplicationKeyUpdateAttributes; import com.datadog.api.client.v2.model.ApplicationKeyUpdateData; import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -import com.datadog.api.client.v2.model.ApplicationKeysType; -import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -18,33 +24,25 @@ public static void main(String[] args) { String SERVICE_ACCOUNT_USER_DATA_ID = System.getenv("SERVICE_ACCOUNT_USER_DATA_ID"); // there is a valid "service_account_application_key" for "service_account_user" - String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ATTRIBUTES_NAME = - System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ATTRIBUTES_NAME"); - String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = - System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID"); + String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ATTRIBUTES_NAME = System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ATTRIBUTES_NAME"); + String SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = System.getenv("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID"); - ApplicationKeyUpdateRequest body = - new ApplicationKeyUpdateRequest() - .data( - new ApplicationKeyUpdateData() - .id(SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID) - .type(ApplicationKeysType.APPLICATION_KEYS) - .attributes( - new ApplicationKeyUpdateAttributes() - .name("Application Key for managing dashboards-updated"))); + ApplicationKeyUpdateRequest body = new ApplicationKeyUpdateRequest() +.data(new ApplicationKeyUpdateData() +.id(SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID) +.type(ApplicationKeysType.APPLICATION_KEYS) +.attributes(new ApplicationKeyUpdateAttributes() +.name("Application Key for managing dashboards-updated"))); try { - PartialApplicationKeyResponse result = - apiInstance.updateServiceAccountApplicationKey( - SERVICE_ACCOUNT_USER_DATA_ID, SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID, body); + PartialApplicationKeyResponse result = apiInstance.updateServiceAccountApplicationKey(SERVICE_ACCOUNT_USER_DATA_ID, SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID, body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceAccountsApi#updateServiceAccountApplicationKey"); + System.err.println("Exception when calling ServiceAccountsApi#updateServiceAccountApplicationKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.java b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.java index 3af461035b0..c6fa641b7f4 100644 --- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.java +++ b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.java @@ -1,9 +1,10 @@ // Create or update service definition returns "CREATED" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceDefinitionApi; import com.datadog.api.client.v2.model.ServiceDefinitionCreateResponse; +import com.datadog.api.client.v2.model.ServiceDefinitionsCreateRequest; import com.datadog.api.client.v2.model.ServiceDefinitionV2; import com.datadog.api.client.v2.model.ServiceDefinitionV2Contact; import com.datadog.api.client.v2.model.ServiceDefinitionV2Doc; @@ -16,9 +17,11 @@ import com.datadog.api.client.v2.model.ServiceDefinitionV2OpsgenieRegion; import com.datadog.api.client.v2.model.ServiceDefinitionV2Repo; import com.datadog.api.client.v2.model.ServiceDefinitionV2Version; -import com.datadog.api.client.v2.model.ServiceDefinitionsCreateRequest; +import java.io.File; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Map; public class Example { @@ -26,60 +29,46 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); ServiceDefinitionApi apiInstance = new ServiceDefinitionApi(defaultClient); - ServiceDefinitionsCreateRequest body = - new ServiceDefinitionsCreateRequest( - new ServiceDefinitionV2() - .contacts( - Collections.singletonList( - new ServiceDefinitionV2Contact( - new ServiceDefinitionV2Email() - .contact("contact@datadoghq.com") - .name("Team Email") - .type(ServiceDefinitionV2EmailType.EMAIL)))) - .ddService( - "service-Example-Create_or_update_service_definition_returns_CREATED_response") - .ddTeam("my-team") - .docs( - Collections.singletonList( - new ServiceDefinitionV2Doc() - .name("Architecture") - .provider("google drive") - .url("https://gdrive/mydoc"))) - .extensions(Map.ofEntries(Map.entry("myorgextension", "extensionvalue"))) - .integrations( - new ServiceDefinitionV2Integrations() - .opsgenie( - new ServiceDefinitionV2Opsgenie() - .region(ServiceDefinitionV2OpsgenieRegion.US) - .serviceUrl( - "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000")) - .pagerduty("https://my-org.pagerduty.com/service-directory/PMyService")) - .links( - Collections.singletonList( - new ServiceDefinitionV2Link() - .name("Runbook") - .type(ServiceDefinitionV2LinkType.RUNBOOK) - .url("https://my-runbook"))) - .repos( - Collections.singletonList( - new ServiceDefinitionV2Repo() - .name("Source Code") - .provider("GitHub") - .url("https://github.com/DataDog/schema"))) - .schemaVersion(ServiceDefinitionV2Version.V2) - .tags(Arrays.asList("my:tag", "service:tag")) - .team("my-team")); + ServiceDefinitionsCreateRequest body = new ServiceDefinitionsCreateRequest( +new ServiceDefinitionV2() +.contacts(Collections.singletonList(new ServiceDefinitionV2Contact( +new ServiceDefinitionV2Email() +.contact("contact@datadoghq.com") +.name("Team Email") +.type(ServiceDefinitionV2EmailType.EMAIL)))) +.ddService("service-Example-Create_or_update_service_definition_returns_CREATED_response") +.ddTeam("my-team") +.docs(Collections.singletonList(new ServiceDefinitionV2Doc() +.name("Architecture") +.provider("google drive") +.url("https://gdrive/mydoc"))) +.extensions(Map.ofEntries(Map.entry("myorgextension", "extensionvalue"))) +.integrations(new ServiceDefinitionV2Integrations() +.opsgenie(new ServiceDefinitionV2Opsgenie() +.region(ServiceDefinitionV2OpsgenieRegion.US) +.serviceUrl("https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000")) +.pagerduty("https://my-org.pagerduty.com/service-directory/PMyService")) +.links(Collections.singletonList(new ServiceDefinitionV2Link() +.name("Runbook") +.type(ServiceDefinitionV2LinkType.RUNBOOK) +.url("https://my-runbook"))) +.repos(Collections.singletonList(new ServiceDefinitionV2Repo() +.name("Source Code") +.provider("GitHub") +.url("https://github.com/DataDog/schema"))) +.schemaVersion(ServiceDefinitionV2Version.V2) +.tags(Arrays.asList("my:tag", "service:tag")) +.team("my-team")); try { ServiceDefinitionCreateResponse result = apiInstance.createOrUpdateServiceDefinitions(body); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling ServiceDefinitionApi#createOrUpdateServiceDefinitions"); + System.err.println("Exception when calling ServiceDefinitionApi#createOrUpdateServiceDefinitions"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-definition/DeleteServiceDefinition.java b/examples/v2/service-definition/DeleteServiceDefinition.java index be559451f48..962848ef3c1 100644 --- a/examples/v2/service-definition/DeleteServiceDefinition.java +++ b/examples/v2/service-definition/DeleteServiceDefinition.java @@ -1,8 +1,14 @@ // Delete a single service definition returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceDefinitionApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -19,4 +25,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-definition/GetServiceDefinition.java b/examples/v2/service-definition/GetServiceDefinition.java index b492eb0e802..156f5c7ef1c 100644 --- a/examples/v2/service-definition/GetServiceDefinition.java +++ b/examples/v2/service-definition/GetServiceDefinition.java @@ -1,9 +1,15 @@ // Get a single service definition returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceDefinitionApi; import com.datadog.api.client.v2.model.ServiceDefinitionGetResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { ServiceDefinitionApi apiInstance = new ServiceDefinitionApi(defaultClient); try { - ServiceDefinitionGetResponse result = - apiInstance.getServiceDefinition("service-definition-test"); + ServiceDefinitionGetResponse result = apiInstance.getServiceDefinition("service-definition-test"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceDefinitionApi#getServiceDefinition"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/service-definition/ListServiceDefinitions.java b/examples/v2/service-definition/ListServiceDefinitions.java index 791df67b7d3..17800710b4e 100644 --- a/examples/v2/service-definition/ListServiceDefinitions.java +++ b/examples/v2/service-definition/ListServiceDefinitions.java @@ -1,9 +1,15 @@ // Get all service definitions returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.ServiceDefinitionApi; import com.datadog.api.client.v2.model.ServiceDefinitionsListResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/synthetics/GetOnDemandConcurrencyCap.java b/examples/v2/synthetics/GetOnDemandConcurrencyCap.java index d32f3e5fc8c..5773b4e9f13 100644 --- a/examples/v2/synthetics/GetOnDemandConcurrencyCap.java +++ b/examples/v2/synthetics/GetOnDemandConcurrencyCap.java @@ -1,9 +1,15 @@ // Get the on-demand concurrency cap returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SyntheticsApi; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.java b/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.java index a280586f535..853e47da817 100644 --- a/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.java +++ b/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.java @@ -1,9 +1,15 @@ // Get on demand concurrency cap -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SyntheticsApi; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/synthetics/SetOnDemandConcurrencyCap.java b/examples/v2/synthetics/SetOnDemandConcurrencyCap.java index 3c8d3ad1a8b..4183fa2380c 100644 --- a/examples/v2/synthetics/SetOnDemandConcurrencyCap.java +++ b/examples/v2/synthetics/SetOnDemandConcurrencyCap.java @@ -1,10 +1,16 @@ // Save new value for on-demand concurrency cap returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SyntheticsApi; -import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.java b/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.java index 6c9d1c8aa6b..9cc4bf9423f 100644 --- a/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.java +++ b/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.java @@ -1,18 +1,24 @@ // Save on demand concurrency cap -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.SyntheticsApi; -import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); - OnDemandConcurrencyCapAttributes body = - new OnDemandConcurrencyCapAttributes().onDemandConcurrencyCap(20.0); + OnDemandConcurrencyCapAttributes body = new OnDemandConcurrencyCapAttributes() +.onDemandConcurrencyCap(20.0); try { OnDemandConcurrencyCapResponse result = apiInstance.setOnDemandConcurrencyCap(body); @@ -25,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetCostByOrg.java b/examples/v2/usage-metering/GetCostByOrg.java index df8a2a888d5..c81cc48e4a0 100644 --- a/examples/v2/usage-metering/GetCostByOrg.java +++ b/examples/v2/usage-metering/GetCostByOrg.java @@ -1,9 +1,16 @@ // Get cost across multi-org account returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.model.CostByOrgResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetEstimatedCostByOrg.java b/examples/v2/usage-metering/GetEstimatedCostByOrg.java index cbdeb840893..2077b5db317 100644 --- a/examples/v2/usage-metering/GetEstimatedCostByOrg.java +++ b/examples/v2/usage-metering/GetEstimatedCostByOrg.java @@ -1,9 +1,15 @@ // Get estimated cost across your account returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.model.CostByOrgResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.java b/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.java index e28b6a3ee68..8ad506675d8 100644 --- a/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.java +++ b/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.java @@ -1,10 +1,17 @@ // GetEstimatedCostByOrg with start_month returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.api.UsageMeteringApi.GetEstimatedCostByOrgOptionalParameters; import com.datadog.api.client.v2.model.CostByOrgResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - CostByOrgResponse result = - apiInstance.getEstimatedCostByOrg( - new GetEstimatedCostByOrgOptionalParameters() - .view("sub-org") - .startMonth(OffsetDateTime.now())); + CostByOrgResponse result = apiInstance.getEstimatedCostByOrg(new GetEstimatedCostByOrgOptionalParameters().view("sub-org").startMonth(OffsetDateTime.now())); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getEstimatedCostByOrg"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetHistoricalCostByOrg.java b/examples/v2/usage-metering/GetHistoricalCostByOrg.java index 66c45e10500..d232a27fa5d 100644 --- a/examples/v2/usage-metering/GetHistoricalCostByOrg.java +++ b/examples/v2/usage-metering/GetHistoricalCostByOrg.java @@ -1,10 +1,17 @@ // Get historical cost across your account returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.api.UsageMeteringApi.GetHistoricalCostByOrgOptionalParameters; import com.datadog.api.client.v2.model.CostByOrgResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,10 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - CostByOrgResponse result = - apiInstance.getHistoricalCostByOrg( - OffsetDateTime.now().plusMonths(-2), - new GetHistoricalCostByOrgOptionalParameters().view("sub-org")); + CostByOrgResponse result = apiInstance.getHistoricalCostByOrg(OffsetDateTime.now().plusMonths(-2),new GetHistoricalCostByOrgOptionalParameters().view("sub-org")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getHistoricalCostByOrg"); @@ -25,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetHourlyUsage.java b/examples/v2/usage-metering/GetHourlyUsage.java index 99b733e5251..17b8812c845 100644 --- a/examples/v2/usage-metering/GetHourlyUsage.java +++ b/examples/v2/usage-metering/GetHourlyUsage.java @@ -1,9 +1,16 @@ // Get hourly usage by product family returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.model.HourlyUsageResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +18,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - HourlyUsageResponse result = - apiInstance.getHourlyUsage(OffsetDateTime.now().plusDays(-3), "infra_hosts"); + HourlyUsageResponse result = apiInstance.getHourlyUsage(OffsetDateTime.now().plusDays(-3), "infra_hosts"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getHourlyUsage"); @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.java b/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.java index c30e01373fb..64f3af7ce81 100644 --- a/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.java +++ b/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.java @@ -1,10 +1,15 @@ // Get hourly usage for application security returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.model.UsageApplicationSecurityMonitoringResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,17 +17,14 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageApplicationSecurityMonitoringResponse result = - apiInstance.getUsageApplicationSecurityMonitoring( - OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageApplicationSecurityMonitoringResponse result = apiInstance.getUsageApplicationSecurityMonitoring(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling UsageMeteringApi#getUsageApplicationSecurityMonitoring"); + System.err.println("Exception when calling UsageMeteringApi#getUsageApplicationSecurityMonitoring"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.java b/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.java index 2253b663ade..6c2cd67a131 100644 --- a/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.java +++ b/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.java @@ -1,10 +1,17 @@ // Get hourly usage for Application Security returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.api.UsageMeteringApi.GetUsageApplicationSecurityMonitoringOptionalParameters; import com.datadog.api.client.v2.model.UsageApplicationSecurityMonitoringResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,19 +19,14 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageApplicationSecurityMonitoringResponse result = - apiInstance.getUsageApplicationSecurityMonitoring( - OffsetDateTime.now().plusDays(-5), - new GetUsageApplicationSecurityMonitoringOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageApplicationSecurityMonitoringResponse result = apiInstance.getUsageApplicationSecurityMonitoring(OffsetDateTime.now().plusDays(-5),new GetUsageApplicationSecurityMonitoringOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { - System.err.println( - "Exception when calling UsageMeteringApi#getUsageApplicationSecurityMonitoring"); + System.err.println("Exception when calling UsageMeteringApi#getUsageApplicationSecurityMonitoring"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.java b/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.java index 7d13be4d15c..be7ffac42d0 100644 --- a/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.java +++ b/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.java @@ -1,10 +1,15 @@ // Get hourly usage for lambda traced invocations returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.model.UsageLambdaTracedInvocationsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,9 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLambdaTracedInvocationsResponse result = - apiInstance.getUsageLambdaTracedInvocations( - OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageLambdaTracedInvocationsResponse result = apiInstance.getUsageLambdaTracedInvocations(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLambdaTracedInvocations"); @@ -24,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.java b/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.java index 894562257cb..c1ec6ef5e69 100644 --- a/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.java +++ b/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.java @@ -1,10 +1,17 @@ // Get hourly usage for Lambda Traced Invocations returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.api.UsageMeteringApi.GetUsageLambdaTracedInvocationsOptionalParameters; import com.datadog.api.client.v2.model.UsageLambdaTracedInvocationsResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageLambdaTracedInvocationsResponse result = - apiInstance.getUsageLambdaTracedInvocations( - OffsetDateTime.now().plusDays(-5), - new GetUsageLambdaTracedInvocationsOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageLambdaTracedInvocationsResponse result = apiInstance.getUsageLambdaTracedInvocations(OffsetDateTime.now().plusDays(-5),new GetUsageLambdaTracedInvocationsOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageLambdaTracedInvocations"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetUsageObservabilityPipelines.java b/examples/v2/usage-metering/GetUsageObservabilityPipelines.java index aff961187d5..b8a9d45322e 100644 --- a/examples/v2/usage-metering/GetUsageObservabilityPipelines.java +++ b/examples/v2/usage-metering/GetUsageObservabilityPipelines.java @@ -1,10 +1,15 @@ // Get hourly usage for observability pipelines returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.model.UsageObservabilityPipelinesResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,9 +17,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageObservabilityPipelinesResponse result = - apiInstance.getUsageObservabilityPipelines( - OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); + UsageObservabilityPipelinesResponse result = apiInstance.getUsageObservabilityPipelines(OffsetDateTime.parse("2021-11-11T11:11:11.111+00:00")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageObservabilityPipelines"); @@ -24,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.java b/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.java index a17eb82d8ef..93f7b3897d1 100644 --- a/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.java +++ b/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.java @@ -1,10 +1,17 @@ // Get hourly usage for Observability Pipelines returns "OK" response -import com.datadog.api.client.ApiClient; +import java.time.OffsetDateTime; + import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsageMeteringApi; import com.datadog.api.client.v2.api.UsageMeteringApi.GetUsageObservabilityPipelinesOptionalParameters; import com.datadog.api.client.v2.model.UsageObservabilityPipelinesResponse; +import java.io.File; import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -12,11 +19,7 @@ public static void main(String[] args) { UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); try { - UsageObservabilityPipelinesResponse result = - apiInstance.getUsageObservabilityPipelines( - OffsetDateTime.now().plusDays(-5), - new GetUsageObservabilityPipelinesOptionalParameters() - .endHr(OffsetDateTime.now().plusDays(-3))); + UsageObservabilityPipelinesResponse result = apiInstance.getUsageObservabilityPipelines(OffsetDateTime.now().plusDays(-5),new GetUsageObservabilityPipelinesOptionalParameters().endHr(OffsetDateTime.now().plusDays(-3))); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsageMeteringApi#getUsageObservabilityPipelines"); @@ -26,4 +29,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/CreateUser.java b/examples/v2/users/CreateUser.java index ebdad33dab6..445acff2d66 100644 --- a/examples/v2/users/CreateUser.java +++ b/examples/v2/users/CreateUser.java @@ -1,28 +1,31 @@ // Create a user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; +import com.datadog.api.client.v2.model.UserResponse; import com.datadog.api.client.v2.model.UserCreateAttributes; import com.datadog.api.client.v2.model.UserCreateData; import com.datadog.api.client.v2.model.UserCreateRequest; -import com.datadog.api.client.v2.model.UserResponse; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); UsersApi apiInstance = new UsersApi(defaultClient); - UserCreateRequest body = - new UserCreateRequest() - .data( - new UserCreateData() - .type(UsersType.USERS) - .attributes( - new UserCreateAttributes() - .name("Datadog API Client Python") - .email("Example-Create_a_user_returns_OK_response@datadoghq.com"))); + UserCreateRequest body = new UserCreateRequest() +.data(new UserCreateData() +.type(UsersType.USERS) +.attributes(new UserCreateAttributes() +.name("Datadog API Client Python") +.email("Example-Create_a_user_returns_OK_response@datadoghq.com"))); try { UserResponse result = apiInstance.createUser(body); @@ -35,4 +38,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/DisableUser.java b/examples/v2/users/DisableUser.java index bfa22bdc276..2f73a39d78b 100644 --- a/examples/v2/users/DisableUser.java +++ b/examples/v2/users/DisableUser.java @@ -1,8 +1,14 @@ // Disable a user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -22,4 +28,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/GetInvitation.java b/examples/v2/users/GetInvitation.java index 7d1da9580a6..718e8cf53ad 100644 --- a/examples/v2/users/GetInvitation.java +++ b/examples/v2/users/GetInvitation.java @@ -1,9 +1,15 @@ // Get a user invitation returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.model.UserInvitationResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/GetUser.java b/examples/v2/users/GetUser.java index a230e99eef4..131c6058112 100644 --- a/examples/v2/users/GetUser.java +++ b/examples/v2/users/GetUser.java @@ -1,9 +1,15 @@ // Get user details returns "OK for get user" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.model.UserResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/GetUser_3047557953.java b/examples/v2/users/GetUser_3047557953.java index b007e5decf8..bf00b9a8fd0 100644 --- a/examples/v2/users/GetUser_3047557953.java +++ b/examples/v2/users/GetUser_3047557953.java @@ -1,9 +1,15 @@ // Get a user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.model.UserResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/ListUserOrganizations.java b/examples/v2/users/ListUserOrganizations.java index 56dce1ec9fa..68fd4132984 100644 --- a/examples/v2/users/ListUserOrganizations.java +++ b/examples/v2/users/ListUserOrganizations.java @@ -1,9 +1,15 @@ // Get a user organization returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.model.UserResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -11,8 +17,7 @@ public static void main(String[] args) { UsersApi apiInstance = new UsersApi(defaultClient); try { - UserResponse result = - apiInstance.listUserOrganizations("00000000-0000-9999-0000-000000000000"); + UserResponse result = apiInstance.listUserOrganizations("00000000-0000-9999-0000-000000000000"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#listUserOrganizations"); @@ -22,4 +27,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/ListUserPermissions.java b/examples/v2/users/ListUserPermissions.java index 32e0fe27e6f..3ca5080ae15 100644 --- a/examples/v2/users/ListUserPermissions.java +++ b/examples/v2/users/ListUserPermissions.java @@ -1,9 +1,15 @@ // Get a user permissions returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.model.PermissionsResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,4 +30,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/ListUsers.java b/examples/v2/users/ListUsers.java index 2a3bfdb4bf1..12912b700e1 100644 --- a/examples/v2/users/ListUsers.java +++ b/examples/v2/users/ListUsers.java @@ -1,10 +1,16 @@ // List all users returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.api.UsersApi.ListUsersOptionalParameters; import com.datadog.api.client.v2.model.UsersResponse; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -15,9 +21,7 @@ public static void main(String[] args) { String USER_DATA_ATTRIBUTES_EMAIL = System.getenv("USER_DATA_ATTRIBUTES_EMAIL"); try { - UsersResponse result = - apiInstance.listUsers( - new ListUsersOptionalParameters().filter(USER_DATA_ATTRIBUTES_EMAIL)); + UsersResponse result = apiInstance.listUsers(new ListUsersOptionalParameters().filter(USER_DATA_ATTRIBUTES_EMAIL)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#listUsers"); @@ -27,4 +31,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/SendInvitations.java b/examples/v2/users/SendInvitations.java index cc3e8f08a97..7fe665473f7 100644 --- a/examples/v2/users/SendInvitations.java +++ b/examples/v2/users/SendInvitations.java @@ -1,17 +1,22 @@ // Send invitation emails returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; +import com.datadog.api.client.v2.model.UserInvitationsResponse; import com.datadog.api.client.v2.model.RelationshipToUser; import com.datadog.api.client.v2.model.RelationshipToUserData; import com.datadog.api.client.v2.model.UserInvitationData; import com.datadog.api.client.v2.model.UserInvitationRelationships; import com.datadog.api.client.v2.model.UserInvitationsRequest; -import com.datadog.api.client.v2.model.UserInvitationsResponse; import com.datadog.api.client.v2.model.UserInvitationsType; import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -21,20 +26,14 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ID = System.getenv("USER_DATA_ID"); - UserInvitationsRequest body = - new UserInvitationsRequest() - .data( - Collections.singletonList( - new UserInvitationData() - .type(UserInvitationsType.USER_INVITATIONS) - .relationships( - new UserInvitationRelationships() - .user( - new RelationshipToUser() - .data( - new RelationshipToUserData() - .type(UsersType.USERS) - .id(USER_DATA_ID)))))); + UserInvitationsRequest body = new UserInvitationsRequest() +.data(Collections.singletonList(new UserInvitationData() +.type(UserInvitationsType.USER_INVITATIONS) +.relationships(new UserInvitationRelationships() +.user(new RelationshipToUser() +.data(new RelationshipToUserData() +.type(UsersType.USERS) +.id(USER_DATA_ID)))))); try { UserInvitationsResponse result = apiInstance.sendInvitations(body); @@ -47,4 +46,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/examples/v2/users/UpdateUser.java b/examples/v2/users/UpdateUser.java index 56eb78dbddf..5c6aa2f8cdf 100644 --- a/examples/v2/users/UpdateUser.java +++ b/examples/v2/users/UpdateUser.java @@ -1,13 +1,19 @@ // Update a user returns "OK" response -import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiClient; import com.datadog.api.client.v2.api.UsersApi; import com.datadog.api.client.v2.model.UserResponse; +import com.datadog.api.client.v2.model.UsersType; import com.datadog.api.client.v2.model.UserUpdateAttributes; import com.datadog.api.client.v2.model.UserUpdateData; import com.datadog.api.client.v2.model.UserUpdateRequest; -import com.datadog.api.client.v2.model.UsersType; +import java.io.File; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -17,13 +23,13 @@ public static void main(String[] args) { // there is a valid "user" in the system String USER_DATA_ID = System.getenv("USER_DATA_ID"); - UserUpdateRequest body = - new UserUpdateRequest() - .data( - new UserUpdateData() - .id(USER_DATA_ID) - .type(UsersType.USERS) - .attributes(new UserUpdateAttributes().name("updated").disabled(true))); + UserUpdateRequest body = new UserUpdateRequest() +.data(new UserUpdateData() +.id(USER_DATA_ID) +.type(UsersType.USERS) +.attributes(new UserUpdateAttributes() +.name("updated") +.disabled(true))); try { UserResponse result = apiInstance.updateUser(USER_DATA_ID, body); @@ -36,4 +42,4 @@ public static void main(String[] args) { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/AbstractOpenApiSchema.java b/src/main/java/com/datadog/api/client/AbstractOpenApiSchema.java index 040d2c0356e..9eb8dc13e36 100644 --- a/src/main/java/com/datadog/api/client/AbstractOpenApiSchema.java +++ b/src/main/java/com/datadog/api/client/AbstractOpenApiSchema.java @@ -7,9 +7,9 @@ package com.datadog.api.client; import com.fasterxml.jackson.annotation.JsonValue; -import jakarta.ws.rs.core.GenericType; import java.util.Map; import java.util.Objects; +import jakarta.ws.rs.core.GenericType; /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -135,4 +135,4 @@ public Boolean isNullable() { return Boolean.FALSE; } } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 8dbeb72eb97..e077ad9c813 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -6,11 +6,6 @@ package com.datadog.api.client; -import com.datadog.api.client.auth.ApiKeyAuth; -import com.datadog.api.client.auth.Authentication; -import com.datadog.api.client.auth.HttpBasicAuth; -import com.datadog.api.client.auth.HttpBearerAuth; -import com.datadog.api.client.auth.OAuth; import jakarta.ws.rs.client.AsyncInvoker; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.client.ClientBuilder; @@ -25,52 +20,79 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.core.Variant; -import java.io.File; + +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.filter.EncodingFilter; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; +import org.glassfish.jersey.message.GZipEncoder; +import org.glassfish.jersey.message.DeflateEncoder; + import java.io.IOException; -import java.io.UnsupportedEncodingException; +import java.io.InputStream; + import java.net.URI; import java.net.URISyntaxException; -import java.net.URLEncoder; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.security.cert.X509Certificate; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Arrays; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; +import java.util.logging.Level; +import java.util.logging.Logger; import java.util.Collection; import java.util.Collections; -import java.util.Date; +import java.util.Map; +import java.util.Map.Entry; import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Properties; +import java.util.Arrays; +import java.util.ArrayList; import java.util.Set; +import java.util.Date; +import java.util.Properties; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; import java.util.regex.Matcher; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import org.glassfish.jersey.client.ClientConfig; -import org.glassfish.jersey.client.ClientProperties; -import org.glassfish.jersey.client.HttpUrlConnectorProvider; -import org.glassfish.jersey.client.filter.EncodingFilter; -import org.glassfish.jersey.jackson.JacksonFeature; -import org.glassfish.jersey.logging.LoggingFeature; -import org.glassfish.jersey.media.multipart.FormDataBodyPart; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.MultiPart; -import org.glassfish.jersey.media.multipart.MultiPartFeature; -import org.glassfish.jersey.message.DeflateEncoder; -import org.glassfish.jersey.message.GZipEncoder; +import java.util.regex.Pattern; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.JSON; +import com.datadog.api.client.Pair; +import com.datadog.api.client.RFC3339DateFormat; +import com.datadog.api.client.ServerConfiguration; +import com.datadog.api.client.ServerVariable; +import com.datadog.api.client.StringUtil; + +import com.datadog.api.client.auth.ApiKeyAuth; +import com.datadog.api.client.auth.Authentication; +import com.datadog.api.client.auth.HttpBasicAuth; +import com.datadog.api.client.auth.HttpBearerAuth; +import com.datadog.api.client.auth.OAuth; +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiClient { protected Map defaultHeaderMap = new HashMap(); protected Map defaultCookieMap = new HashMap(); @@ -78,340 +100,440 @@ public class ApiClient { protected String userAgent; private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - protected List servers = - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "The regional site for Datadog customers.", - "datadoghq.com", - new HashSet( - Arrays.asList( - "datadoghq.com", - "us3.datadoghq.com", - "us5.datadoghq.com", - "datadoghq.eu", - "ddog-gov.com")))); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "api", - new HashSet())); - } - }), - new ServerConfiguration( - "{protocol}://{name}", - "No description provided", - new HashMap() { - { - put( - "name", - new ServerVariable( - "Full site DNS name.", "api.datadoghq.com", new HashSet())); - put( - "protocol", - new ServerVariable( - "The protocol for accessing the API.", - "https", - new HashSet())); - } - }), - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "Any Datadog deployment.", "datadoghq.com", new HashSet())); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "api", - new HashSet())); - } - }))); + protected List servers = new ArrayList( + Arrays.asList( + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "The regional site for Datadog customers.", + "datadoghq.com", + new HashSet( + Arrays.asList( + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "datadoghq.eu", + "ddog-gov.com" + ) + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "api", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "{protocol}://{name}", + "No description provided", + new HashMap() { + { + put( + "name", + new ServerVariable( + "Full site DNS name.", + "api.datadoghq.com", + new HashSet( + ) + ) + ); + put( + "protocol", + new ServerVariable( + "The protocol for accessing the API.", + "https", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "Any Datadog deployment.", + "datadoghq.com", + new HashSet( + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "api", + new HashSet( + ) + ) + ); + } + } + ) + ) + ); protected Integer serverIndex = 0; protected Map serverVariables = null; - protected Map> operationServers = - new HashMap>() { - { - put( - "v1.IpRangesApi.getIPRanges", - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "The regional site for Datadog customers.", - "datadoghq.com", - new HashSet( - Arrays.asList( - "datadoghq.com", - "us3.datadoghq.com", - "us5.datadoghq.com", - "datadoghq.eu", - "ddog-gov.com")))); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "ip-ranges", - new HashSet())); - } - }), - new ServerConfiguration( - "{protocol}://{name}", - "No description provided", - new HashMap() { - { - put( - "name", - new ServerVariable( - "Full site DNS name.", - "ip-ranges.datadoghq.com", - new HashSet())); - put( - "protocol", - new ServerVariable( - "The protocol for accessing the API.", - "https", - new HashSet())); - } - }), - new ServerConfiguration( - "https://{subdomain}.datadoghq.com", - "No description provided", - new HashMap() { - { - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "ip-ranges", - new HashSet())); - } - })))); - put( - "v1.ServiceLevelObjectivesApi.searchSLO", - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "The regional site for Datadog customers.", - "datadoghq.com", - new HashSet( - Arrays.asList( - "datadoghq.com", - "datadoghq.eu", - "us3.datadoghq.com", - "us5.datadoghq.com", - "ddog-gov.com")))); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "api", - new HashSet())); - } - }), - new ServerConfiguration( - "{protocol}://{name}", - "No description provided", - new HashMap() { - { - put( - "name", - new ServerVariable( - "Full site DNS name.", - "api.datadoghq.com", - new HashSet())); - put( - "protocol", - new ServerVariable( - "The protocol for accessing the API.", - "https", - new HashSet())); - } - }), - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "Any Datadog deployment.", - "datadoghq.com", - new HashSet())); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "api", - new HashSet())); - } - })))); - put( - "v1.LogsApi.submitLog", - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "The regional site for Datadog customers.", - "datadoghq.com", - new HashSet( - Arrays.asList( - "datadoghq.com", - "us3.datadoghq.com", - "us5.datadoghq.com", - "datadoghq.eu", - "ddog-gov.com")))); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "http-intake.logs", - new HashSet())); - } - }), - new ServerConfiguration( - "{protocol}://{name}", - "No description provided", - new HashMap() { - { - put( - "name", - new ServerVariable( - "Full site DNS name.", - "http-intake.logs.datadoghq.com", - new HashSet())); - put( - "protocol", - new ServerVariable( - "The protocol for accessing the API.", - "https", - new HashSet())); - } - }), - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "Any Datadog deployment.", - "datadoghq.com", - new HashSet())); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "http-intake.logs", - new HashSet())); - } - })))); - put( - "v2.LogsApi.submitLog", - new ArrayList( - Arrays.asList( - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "The regional site for customers.", - "datadoghq.com", - new HashSet( - Arrays.asList( - "datadoghq.com", - "us3.datadoghq.com", - "us5.datadoghq.com", - "datadoghq.eu", - "ddog-gov.com")))); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "http-intake.logs", - new HashSet())); - } - }), - new ServerConfiguration( - "{protocol}://{name}", - "No description provided", - new HashMap() { - { - put( - "name", - new ServerVariable( - "Full site DNS name.", - "http-intake.logs.datadoghq.com", - new HashSet())); - put( - "protocol", - new ServerVariable( - "The protocol for accessing the API.", - "https", - new HashSet())); - } - }), - new ServerConfiguration( - "https://{subdomain}.{site}", - "No description provided", - new HashMap() { - { - put( - "site", - new ServerVariable( - "Any Datadog deployment.", - "datadoghq.com", - new HashSet())); - put( - "subdomain", - new ServerVariable( - "The subdomain where the API is deployed.", - "http-intake.logs", - new HashSet())); - } - })))); + protected Map> operationServers = new HashMap>() {{ + put("v1.IpRangesApi.getIPRanges", new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "The regional site for Datadog customers.", + "datadoghq.com", + new HashSet( + Arrays.asList( + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "datadoghq.eu", + "ddog-gov.com" + ) + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "ip-ranges", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "{protocol}://{name}", + "No description provided", + new HashMap() { + { + put( + "name", + new ServerVariable( + "Full site DNS name.", + "ip-ranges.datadoghq.com", + new HashSet( + ) + ) + ); + put( + "protocol", + new ServerVariable( + "The protocol for accessing the API.", + "https", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "https://{subdomain}.datadoghq.com", + "No description provided", + new HashMap() { + { + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "ip-ranges", + new HashSet( + ) + ) + ); + } + } + ) + ))); + put("v1.ServiceLevelObjectivesApi.searchSLO", new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "The regional site for Datadog customers.", + "datadoghq.com", + new HashSet( + Arrays.asList( + "datadoghq.com", + "datadoghq.eu", + "us3.datadoghq.com", + "us5.datadoghq.com", + "ddog-gov.com" + ) + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "api", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "{protocol}://{name}", + "No description provided", + new HashMap() { + { + put( + "name", + new ServerVariable( + "Full site DNS name.", + "api.datadoghq.com", + new HashSet( + ) + ) + ); + put( + "protocol", + new ServerVariable( + "The protocol for accessing the API.", + "https", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "Any Datadog deployment.", + "datadoghq.com", + new HashSet( + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "api", + new HashSet( + ) + ) + ); + } + } + ) + ))); + put("v1.LogsApi.submitLog", new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "The regional site for Datadog customers.", + "datadoghq.com", + new HashSet( + Arrays.asList( + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "datadoghq.eu", + "ddog-gov.com" + ) + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "http-intake.logs", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "{protocol}://{name}", + "No description provided", + new HashMap() { + { + put( + "name", + new ServerVariable( + "Full site DNS name.", + "http-intake.logs.datadoghq.com", + new HashSet( + ) + ) + ); + put( + "protocol", + new ServerVariable( + "The protocol for accessing the API.", + "https", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "Any Datadog deployment.", + "datadoghq.com", + new HashSet( + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "http-intake.logs", + new HashSet( + ) + ) + ); + } + } + ) + ))); + put("v2.LogsApi.submitLog", new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "The regional site for customers.", + "datadoghq.com", + new HashSet( + Arrays.asList( + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "datadoghq.eu", + "ddog-gov.com" + ) + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "http-intake.logs", + new HashSet( + ) + ) + ); + } + } + ), + new ServerConfiguration( + "{protocol}://{name}", + "No description provided", + new HashMap() { + { + put( + "name", + new ServerVariable( + "Full site DNS name.", + "http-intake.logs.datadoghq.com", + new HashSet( + ) + ) + ); + put( + "protocol", + new ServerVariable( + "The protocol for accessing the API.", + "https", + new HashSet( + ) + ) + ); + } } - }; + ), + new ServerConfiguration( + "https://{subdomain}.{site}", + "No description provided", + new HashMap() { + { + put( + "site", + new ServerVariable( + "Any Datadog deployment.", + "datadoghq.com", + new HashSet( + ) + ) + ); + put( + "subdomain", + new ServerVariable( + "The subdomain where the API is deployed.", + "http-intake.logs", + new HashSet( + ) + ) + ); + } + } + ) + ))); + }}; protected Map operationServerIndex = new HashMap(); - protected Map> operationServerVariables = - new HashMap>(); + protected Map> operationServerVariables = new HashMap>(); protected boolean debugging = false; protected boolean compress = true; protected ClientConfig clientConfig; @@ -425,35 +547,36 @@ public class ApiClient { protected Map authentications; protected DateFormat dateFormat; - protected final Map unstableOperations = - new HashMap() { - { - put("v2.listEvents", false); - put("v2.searchEvents", false); - put("v2.createIncident", false); - put("v2.deleteIncident", false); - put("v2.getIncident", false); - put("v2.listIncidentAttachments", false); - put("v2.listIncidents", false); - put("v2.searchIncidents", false); - put("v2.updateIncident", false); - put("v2.updateIncidentAttachments", false); - put("v2.queryScalarData", false); - put("v2.queryTimeseriesData", false); - put("v2.createIncidentService", false); - put("v2.deleteIncidentService", false); - put("v2.getIncidentService", false); - put("v2.listIncidentServices", false); - put("v2.updateIncidentService", false); - put("v2.createIncidentTeam", false); - put("v2.deleteIncidentTeam", false); - put("v2.getIncidentTeam", false); - put("v2.listIncidentTeams", false); - put("v2.updateIncidentTeam", false); - } - }; - protected static final java.util.logging.Logger logger = - java.util.logging.Logger.getLogger(ApiClient.class.getName()); + protected final Map unstableOperations = new HashMap() {{ + put("v2.listEvents", false); + put("v2.searchEvents", false); + put("v2.createIncident", false); + put("v2.createIncidentIntegration", false); + put("v2.deleteIncident", false); + put("v2.deleteIncidentIntegration", false); + put("v2.getIncident", false); + put("v2.getIncidentIntegration", false); + put("v2.listIncidentAttachments", false); + put("v2.listIncidentIntegrations", false); + put("v2.listIncidents", false); + put("v2.searchIncidents", false); + put("v2.updateIncident", false); + put("v2.updateIncidentAttachments", false); + put("v2.updateIncidentIntegration", false); + put("v2.queryScalarData", false); + put("v2.queryTimeseriesData", false); + put("v2.createIncidentService", false); + put("v2.deleteIncidentService", false); + put("v2.getIncidentService", false); + put("v2.listIncidentServices", false); + put("v2.updateIncidentService", false); + put("v2.createIncidentTeam", false); + put("v2.deleteIncidentTeam", false); + put("v2.getIncidentTeam", false); + put("v2.listIncidentTeams", false); + put("v2.updateIncidentTeam", false); + }}; + protected static final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(ApiClient.class.getName()); private static ApiClient defaultApiClient; @@ -501,16 +624,18 @@ public static void setDefaultApiClient(ApiClient apiClient) { defaultApiClient = apiClient; } - /** Constructs a new ApiClient with default parameters. */ + /** + * Constructs a new ApiClient with default parameters. + */ public ApiClient() { this(null); } /** - * Constructs a new ApiClient with the specified authentication parameters. - * - * @param authMap A hash map containing authentication parameters. - */ + * Constructs a new ApiClient with the specified authentication parameters. + * + * @param authMap A hash map containing authentication parameters. + */ public ApiClient(Map authMap) { json = new JSON(); httpClient = buildHttpClient(); @@ -650,12 +775,12 @@ public ApiClient setServerVariables(Map serverVariables) { private void updateBasePath() { if (serverIndex != null) { - setBasePath(servers.get(serverIndex).URL(serverVariables)); + setBasePath(servers.get(serverIndex).URL(serverVariables)); } } private void setOauthBasePath(String basePath) { - for (Authentication auth : authentications.values()) { + for(Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).setBasePath(basePath); } @@ -782,7 +907,6 @@ public ApiClient setBearerToken(String bearerToken) { /** * Helper method to set access token for the first OAuth2 authentication. - * * @param accessToken Access token * @return API client */ @@ -864,7 +988,6 @@ public ApiClient setOauthScope(String scope) { /** * Set the User-Agent header's value (by adding to the default header map). - * * @param userAgent Http user agent * @return API client */ @@ -876,47 +999,32 @@ public ApiClient setUserAgent(String userAgent) { /** * Get the User-Agent header's value. - * * @return User-Agent string */ - public String getUserAgent() { + public String getUserAgent(){ return userAgent; } /** - * Set the default User-Agent header's value with telemetry information (by adding to the default - * header map). - * + * Set the default User-Agent header's value with telemetry information (by adding to the default header map). * @return API client */ public ApiClient setUserAgent() { final Properties properties = new Properties(); try { - properties.load( - getClass().getClassLoader().getResourceAsStream("com/datadog/api/project.properties")); + properties.load(getClass().getClassLoader().getResourceAsStream("com/datadog/api/project.properties")); } catch (IOException e) { logger.severe("Could not load client version: " + e.toString()); } - String userAgent = - "datadog-api-client-java/" - + properties.getProperty("version") - + " (" - + "java " - + System.getProperty("java.version") - + "; " - + "java_vendor " - + System.getProperty("java.vendor") - + "; " - + "os " - + System.getProperty("os.name") - + "; " - + "os_version " - + System.getProperty("os.version") - + "; " - + "arch " - + System.getProperty("os.arch") - + ")"; + String userAgent = "datadog-api-client-java/" + properties.getProperty("version") + + " (" + + "java " + System.getProperty("java.version") + "; " + + "java_vendor " + System.getProperty("java.vendor") + "; " + + "os " + System.getProperty("os.name") + "; " + + "os_version " + System.getProperty("os.version") + "; " + + "arch " + System.getProperty("os.arch") + + ")"; addDefaultHeader("User-Agent", userAgent); this.userAgent = userAgent; return this; @@ -948,7 +1056,6 @@ public ApiClient addDefaultCookie(String key, String value) { /** * Gets the client config. - * * @return Client config */ public ClientConfig getClientConfig() { @@ -970,7 +1077,6 @@ public ApiClient setClientConfig(ClientConfig clientConfig) { /** * Check that whether debugging is enabled for this API client. - * * @return True if debugging is switched on */ public boolean isDebugging() { @@ -1012,9 +1118,11 @@ public ApiClient setCompress(boolean compress) { return this; } + /** - * The path of temporary folder used to store downloaded files from endpoints with file response. - * The default value is null, i.e. using the system's default temporary folder. + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. * * @return Temp folder path */ @@ -1024,7 +1132,6 @@ public String getTempFolderPath() { /** * Set temp folder path - * * @param tempFolderPath Temp folder path * @return API client */ @@ -1035,7 +1142,6 @@ public ApiClient setTempFolderPath(String tempFolderPath) { /** * Connect timeout (in milliseconds). - * * @return Connection timeout */ public int getConnectTimeout() { @@ -1043,9 +1149,9 @@ public int getConnectTimeout() { } /** - * Set the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values must - * be between 1 and {@link Integer#MAX_VALUE}. - * + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. * @param connectionTimeout Connection timeout in milliseconds * @return API client */ @@ -1057,7 +1163,6 @@ public ApiClient setConnectTimeout(int connectionTimeout) { /** * read timeout (in milliseconds). - * * @return Read timeout */ public int getReadTimeout() { @@ -1065,9 +1170,9 @@ public int getReadTimeout() { } /** - * Set the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be - * between 1 and {@link Integer#MAX_VALUE}. - * + * Set the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. * @param readTimeout Read timeout in milliseconds * @return API client */ @@ -1079,7 +1184,6 @@ public ApiClient setReadTimeout(int readTimeout) { /** * Get the date format used to parse/format date parameters. - * * @return Date format */ public DateFormat getDateFormat() { @@ -1088,7 +1192,6 @@ public DateFormat getDateFormat() { /** * Set the date format used to parse/format date parameters. - * * @param dateFormat Date format * @return API client */ @@ -1101,7 +1204,6 @@ public ApiClient setDateFormat(DateFormat dateFormat) { /** * Get list of all unstable operations - * * @return set of all unstable operations Ids */ public Set getUnstableOperations() { @@ -1110,28 +1212,22 @@ public Set getUnstableOperations() { /** * Mark an unstable operation as enabled/disabled. - * - * @param operation operation Id - this is the name of the method on the API class, e.g. - * "createFoo" + * @param operation operation Id - this is the name of the method on the API class, e.g. "createFoo" * @param enabled whether to mark the operation as enabled (true) or disabled (false) - * @return true if the operation is marked as unstable and thus was enabled/disabled, false - * otherwise + * @return true if the operation is marked as unstable and thus was enabled/disabled, false otherwise */ public boolean setUnstableOperationEnabled(String operation, boolean enabled) { if (unstableOperations.containsKey(operation)) { unstableOperations.put(operation, enabled); return true; } - logger.warning( - String.format("'%s' is not an unstable operation, can't enable/disable", operation)); + logger.warning(String.format("'%s' is not an unstable operation, can't enable/disable", operation)); return false; } /** * Determine whether an operation is an unstable operation. - * - * @param operation operation Id - this is the name of the method on the API class, e.g. - * "createFoo" + * @param operation operation Id - this is the name of the method on the API class, e.g. "createFoo" * @return true if the operation is an unstable operation, false otherwise */ public boolean isUnstableOperation(String operation) { @@ -1140,24 +1236,20 @@ public boolean isUnstableOperation(String operation) { /** * Determine whether an unstable operation is enabled. - * - * @param operation operation Id - this is the name of the method on the API class, e.g. - * "createFoo" + * @param operation operation Id - this is the name of the method on the API class, e.g. "createFoo" * @return true if the operation is unstable and it is enabled, false otherwise */ public boolean isUnstableOperationEnabled(String operation) { if (unstableOperations.containsKey(operation)) { return unstableOperations.get(operation); } else { - logger.warning( - String.format("'%s' is not an unstable operation, is always enabled", operation)); + logger.warning(String.format("'%s' is not an unstable operation, is always enabled", operation)); return true; } } /** * Get the ApiClient logger - * * @return ApiClient logger */ public java.util.logging.Logger getLogger() { @@ -1166,7 +1258,6 @@ public java.util.logging.Logger getLogger() { /** * Format the given Date object into string. - * * @param date Date * @return Date in string format */ @@ -1176,7 +1267,6 @@ public String formatDate(Date date) { /** * Format the given parameter object into string. - * * @param param Object * @return Object in string format */ @@ -1189,8 +1279,8 @@ public String parameterToString(Object param) { return formatOffsetDateTime((OffsetDateTime) param); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { + for(Object o : (Collection)param) { + if(b.length() > 0) { b.append(','); } b.append(String.valueOf(o)); @@ -1208,7 +1298,7 @@ public String parameterToString(Object param) { * @param value Value * @return List of pairs */ - public List parameterToPairs(String collectionFormat, String name, Object value) { + public List parameterToPairs(String collectionFormat, String name, Object value){ List params = new ArrayList(); // preconditions @@ -1222,13 +1312,12 @@ public List parameterToPairs(String collectionFormat, String name, Object return params; } - if (valueCollection.isEmpty()) { + if (valueCollection.isEmpty()){ return params; } // get the collection format (default: csv) - String format = - (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // create the params based on the collection format if ("multi".equals(format)) { @@ -1251,7 +1340,7 @@ public List parameterToPairs(String collectionFormat, String name, Object delimiter = "|"; } - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new StringBuilder() ; for (Object item : valueCollection) { sb.append(delimiter); sb.append(parameterToString(item)); @@ -1263,9 +1352,13 @@ public List parameterToPairs(String collectionFormat, String name, Object } /** - * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; - * charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also default to JSON - * + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON * @param mime MIME * @return True if the MIME type is JSON */ @@ -1275,12 +1368,13 @@ public boolean isJsonMime(String mime) { } /** - * Select the Accept header's value from the given accepts array: if JSON exists in the given - * array, use it; otherwise use all of them (joining into a string) + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) * * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, null will be returned (not to - * set the Accept header explicitly). + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). */ public String selectHeaderAccept(String[] accepts) { if (accepts.length == 0) { @@ -1295,11 +1389,13 @@ public String selectHeaderAccept(String[] accepts) { } /** - * Select the Content-Type header's value from the given array: if JSON exists in the given array, - * use it; otherwise use the first one of the array. + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. * * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, JSON will be used. + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { if (contentTypes.length == 0) { @@ -1315,7 +1411,6 @@ public String selectHeaderContentType(String[] contentTypes) { /** * Escape the given string to be used as URL query value. - * * @param str String * @return Escaped string */ @@ -1328,9 +1423,8 @@ public String escapeString(String str) { } /** - * Serialize the given Java object into string entity according the given Content-Type (only JSON - * is supported for now). - * + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). * @param obj Object * @param formParams Form parameters * @param contentType Content type header @@ -1338,37 +1432,26 @@ public String escapeString(String str) { * @param isBodyNullable Whether the body can be null or not * @return Entity */ - public Entity serialize( - Object obj, - Map formParams, - String contentType, - String contentEncoding, - boolean isBodyNullable) { + public Entity serialize(Object obj, Map formParams, String contentType, String contentEncoding, boolean isBodyNullable) { Entity entity; Variant variant = new Variant(MediaType.valueOf(contentType), "", contentEncoding); if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); - for (Entry param : formParams.entrySet()) { + for (Entry param: formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()) - .size(file.length()) - .build(); - multiPart.bodyPart( - new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) + .fileName(file.getName()).size(file.length()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); } else { - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart( - new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); } else if (contentType.startsWith("application/x-www-form-urlencoded")) { Form form = new Form(); - for (Entry param : formParams.entrySet()) { + for (Entry param: formParams.entrySet()) { form.param(param.getKey(), parameterToString(param.getValue())); } entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); @@ -1376,27 +1459,13 @@ public Entity serialize( // We let jersey handle the serialization if (isBodyNullable) { // payload is nullable if (obj instanceof String) { - entity = - Entity.entity( - obj == null - ? "null" - : "\"" - + ((String) obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) - + "\"", - variant); + entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", variant); } else { entity = Entity.entity(obj == null ? "null" : obj, variant); } } else { if (obj instanceof String) { - entity = - Entity.entity( - obj == null - ? "" - : "\"" - + ((String) obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) - + "\"", - variant); + entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", variant); } else { entity = Entity.entity(obj == null ? "" : obj, variant); } @@ -1407,7 +1476,6 @@ public Entity serialize( /** * Deserialize response body to Java object according to the Content-Type. - * * @param Type * @param response Response * @param returnType Return type @@ -1518,7 +1586,8 @@ public Invocation.Builder createBuilder( allHeaderParams.putAll(headerParams); // update different parameters (e.g. headers) for authentication - updateParamsForAuth(authNames, queryParams, allHeaderParams, cookieParams, target.getUri()); + updateParamsForAuth( + authNames, queryParams, allHeaderParams, cookieParams, target.getUri()); for (Entry entry : allHeaderParams.entrySet()) { String value = entry.getValue(); @@ -1557,13 +1626,7 @@ public ApiResponse invokeAPI( throws ApiException { String contentEncoding = headerParams.get(HttpHeaders.CONTENT_ENCODING); - Entity entity = - serialize( - body, - formParams, - selectHeaderContentType(contentTypes), - contentEncoding, - isBodyNullable); + Entity entity = serialize(body, formParams, selectHeaderContentType(contentTypes), contentEncoding, isBodyNullable); Response response = null; @@ -1605,8 +1668,7 @@ public ApiResponse invokeAPI( } } - private Response sendRequest( - String method, Invocation.Builder invocationBuilder, Entity entity) { + private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity entity) { Response response; if ("POST".equals(method)) { response = invocationBuilder.post(entity); @@ -1648,13 +1710,7 @@ public CompletableFuture> invokeAPIAsync( String contentEncoding = headerParams.get(HttpHeaders.CONTENT_ENCODING); - Entity entity = - serialize( - body, - formParams, - selectHeaderContentType(contentTypes), - contentEncoding, - isBodyNullable); + Entity entity = serialize(body, formParams, selectHeaderContentType(contentTypes), contentEncoding, isBodyNullable); CompletableFuture> result = new CompletableFuture<>(); @@ -1725,13 +1781,12 @@ private Future sendRequestAsync( /** * Build the Client used to make HTTP requests. - * * @return Client */ protected Client buildHttpClient() { // use the default client config if not yet initialized if (clientConfig == null) { - clientConfig = getDefaultClientConfig(); + clientConfig = getDefaultClientConfig(); } if (compress) { @@ -1748,7 +1803,6 @@ protected Client buildHttpClient() { /** * Get the default client config. - * * @return Client config */ public ClientConfig getDefaultClientConfig() { @@ -1760,21 +1814,13 @@ public ClientConfig getDefaultClientConfig() { // turn off compliance validation to be able to send payloads with DELETE calls clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); if (debugging) { - clientConfig.register( - new LoggingFeature( - java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), - java.util.logging.Level.INFO, - LoggingFeature.Verbosity.PAYLOAD_ANY, - 1024 * 50 /* Log payloads up to 50K */)); - clientConfig.property( - LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); + clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); + clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); // Set logger to ALL - java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME) - .setLevel(java.util.logging.Level.ALL); + java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); } else { // suppress warnings for payloads with DELETE calls: - java.util.logging.Logger.getLogger("org.glassfish.jersey.client") - .setLevel(java.util.logging.Level.SEVERE); + java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); } return clientConfig; @@ -1783,15 +1829,16 @@ public ClientConfig getDefaultClientConfig() { /** * Customize the client builder. * - *

This method can be overridden to customize the API client. For example, this can be used to: - * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname against - * its identification information. 2. Set the client-side key store. 3. Set the SSL context that - * will be used when creating secured transport connections to server endpoints from web targets - * created by the client instance that is using this SSL context. 4. Set the client-side trust - * store. + * This method can be overridden to customize the API client. For example, this can be used to: + * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname + * against its identification information. + * 2. Set the client-side key store. + * 3. Set the SSL context that will be used when creating secured transport connections to + * server endpoints from web targets created by the client instance that is using this SSL context. + * 4. Set the client-side trust store. * - *

To completely disable certificate validation (at your own risk), you can override this - * method and invoke disableCertificateValidation(clientBuilder). + * To completely disable certificate validation (at your own risk), you can + * override this method and invoke disableCertificateValidation(clientBuilder). * * @param clientBuilder: HTTP client builder */ @@ -1802,30 +1849,28 @@ protected void customizeClientBuilder(ClientBuilder clientBuilder) { /** * Disable X.509 certificate validation in TLS connections. * - *

Please note that trusting all certificates is extremely risky. This may be useful in a - * development environment with self-signed certificates. + * Please note that trusting all certificates is extremely risky. + * This may be useful in a development environment with self-signed certificates. * * @param clientBuilder: HTTP client builder * @throws KeyManagementException When the SSL context can't be initialized * @throws NoSuchAlgorithmException If the environment doesn't support the required algorithm */ - protected void disableCertificateValidation(ClientBuilder clientBuilder) - throws KeyManagementException, NoSuchAlgorithmException { - TrustManager[] trustAllCerts = - new X509TrustManager[] { - new X509TrustManager() { - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - @Override - public void checkClientTrusted(X509Certificate[] certs, String authType) {} - - @Override - public void checkServerTrusted(X509Certificate[] certs, String authType) {} - } - }; + protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException { + TrustManager[] trustAllCerts = new X509TrustManager[] { + new X509TrustManager() { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, trustAllCerts, new SecureRandom()); clientBuilder.sslContext(sslContext); @@ -1833,7 +1878,7 @@ public void checkServerTrusted(X509Certificate[] certs, String authType) {} protected Map> buildResponseHeaders(Response response) { Map> responseHeaders = new HashMap>(); - for (Entry> entry : response.getHeaders().entrySet()) { + for (Entry> entry: response.getHeaders().entrySet()) { List values = entry.getValue(); List headers = new ArrayList(); for (Object o : values) { @@ -1869,4 +1914,4 @@ protected void updateParamsForAuth( auth.applyToParams(queryParams, headerParams, cookieParams, "", "", uri); } } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/ApiException.java b/src/main/java/com/datadog/api/client/ApiException.java index 84d2a3989a5..4ac0dec78b4 100644 --- a/src/main/java/com/datadog/api/client/ApiException.java +++ b/src/main/java/com/datadog/api/client/ApiException.java @@ -10,8 +10,7 @@ import java.util.Map; /** API Exception */ -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; @@ -91,4 +90,4 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/ApiResponse.java b/src/main/java/com/datadog/api/client/ApiResponse.java index 6bc18b52ecf..3668a11f0af 100644 --- a/src/main/java/com/datadog/api/client/ApiResponse.java +++ b/src/main/java/com/datadog/api/client/ApiResponse.java @@ -14,8 +14,7 @@ * * @param The type of data that is deserialized from response body */ -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiResponse { private final int statusCode; private final Map> headers; @@ -66,4 +65,4 @@ public Map> getHeaders() { public T getData() { return data; } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/JSON.java b/src/main/java/com/datadog/api/client/JSON.java index 271044c16af..4f27c213b9b 100644 --- a/src/main/java/com/datadog/api/client/JSON.java +++ b/src/main/java/com/datadog/api/client/JSON.java @@ -9,17 +9,16 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.ext.ContextResolver; import java.text.DateFormat; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; import org.openapitools.jackson.nullable.JsonNullableModule; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class JSON implements ContextResolver { private ObjectMapper mapper; @@ -40,7 +39,6 @@ public JSON() { /** * Set the date format for JSON (de)serialization with Date properties. - * * @param dateFormat Date format */ public void setDateFormat(DateFormat dateFormat) { @@ -57,13 +55,11 @@ public ObjectMapper getContext(Class type) { * * @return object mapper */ - public ObjectMapper getMapper() { - return mapper; - } + public ObjectMapper getMapper() { return mapper; } /** - * Returns the target model class that should be used to deserialize the input data. The - * discriminator mappings are used to determine the target model class. + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. * * @param node The input data. * @param modelClass The class that contains the discriminator mappings. @@ -77,7 +73,9 @@ public static Class getClassForElement(JsonNode node, Class modelClass) { return null; } - /** Helper class to register the discriminator mappings. */ + /** + * Helper class to register the discriminator mappings. + */ private static class ClassDiscriminatorMapping { // The model class name. Class modelClass; @@ -119,9 +117,9 @@ String getDiscriminatorValue(JsonNode node) { } /** - * Returns the target model class that should be used to deserialize the input data. This - * function can be invoked for anyOf/oneOf composed models with discriminator mappings. The - * discriminator mappings are used to determine the target model class. + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. * * @param node The input data. * @param visitedClasses The set of classes that have already been visited. @@ -167,16 +165,15 @@ Class getClassForElement(JsonNode node, Set> visitedClasses) { /** * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. * - *

The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, so - * it's not possible to use the instanceof keyword. + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. * * @param modelClass A OpenAPI model class. * @param inst The instance object. * @param visitedClasses Keep track of the hierarchy to break cycles * @return Boolean indicating if the class matches */ - public static boolean isInstanceOf( - Class modelClass, Object inst, Set> visitedClasses) { + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { if (modelClass.isInstance(inst)) { // This handles the 'allOf' use case with single parent inheritance. return true; @@ -200,60 +197,60 @@ public static boolean isInstanceOf( return false; } - /** A map of discriminators for all model classes. */ - private static Map, ClassDiscriminatorMapping> modelDiscriminators = - new HashMap, ClassDiscriminatorMapping>(); - - /** A map of oneOf/anyOf descendants for each model class. */ - private static Map, Map> modelDescendants = - new HashMap, Map>(); + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); /** - * Register a model class discriminator. - * - * @param modelClass the model class - * @param discriminatorPropertyName the name of the discriminator property - * @param mappings a map with the discriminator mappings. + * A map of oneOf/anyOf descendants for each model class. */ - public static void registerDiscriminator( - Class modelClass, String discriminatorPropertyName, Map> mappings) { - ClassDiscriminatorMapping m = - new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); modelDiscriminators.put(modelClass, m); } /** - * Register the oneOf/anyOf descendants of the modelClass. - * - * @param modelClass the model class - * @param descendants a map of oneOf/anyOf descendants. - */ - public static void registerDescendants( - Class modelClass, Map descendants) { + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { modelDescendants.put(modelClass, descendants); } private static JSON json; - static { + static + { json = new JSON(); } /** - * Get the default JSON instance. - * - * @return the default JSON instance - */ + * Get the default JSON instance. + * + * @return the default JSON instance + */ public static JSON getDefault() { return json; } /** - * Set the default JSON instance. - * - * @param json JSON instance to be used - */ + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ public static void setDefault(JSON json) { JSON.json = json; } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/JsonTimeSerializer.java b/src/main/java/com/datadog/api/client/JsonTimeSerializer.java index 3270ea798ec..b488882e87a 100644 --- a/src/main/java/com/datadog/api/client/JsonTimeSerializer.java +++ b/src/main/java/com/datadog/api/client/JsonTimeSerializer.java @@ -9,31 +9,29 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; + import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; public class JsonTimeSerializer extends StdSerializer { - private static DateTimeFormatter msFormatter = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); - private static DateTimeFormatter missingMsFormatter = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX"); + private static DateTimeFormatter msFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); + private static DateTimeFormatter missingMsFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX"); - public JsonTimeSerializer() { - this(null); - } + public JsonTimeSerializer() { + this(null); + } - public JsonTimeSerializer(Class t) { - super(t); - } + public JsonTimeSerializer(Class t) { + super(t); + } - @Override - public void serialize(OffsetDateTime value, JsonGenerator gen, SerializerProvider arg2) - throws IOException { - if (value.getNano() == 0) { - gen.writeString(missingMsFormatter.format(value)); - } else { - gen.writeString(msFormatter.format(value)); + @Override + public void serialize(OffsetDateTime value, JsonGenerator gen, SerializerProvider arg2) throws IOException { + if (value.getNano() == 0) { + gen.writeString(missingMsFormatter.format(value)); + } else { + gen.writeString(msFormatter.format(value)); + } } - } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/PaginationIterable.java b/src/main/java/com/datadog/api/client/PaginationIterable.java index 2c23d0aa8ea..55d71832883 100644 --- a/src/main/java/com/datadog/api/client/PaginationIterable.java +++ b/src/main/java/com/datadog/api/client/PaginationIterable.java @@ -46,4 +46,4 @@ public PaginationIterable( public PaginationIterator iterator() { return new PaginationIterator(this); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/PaginationIterator.java b/src/main/java/com/datadog/api/client/PaginationIterator.java index f6be305b132..8c265e6a9e8 100644 --- a/src/main/java/com/datadog/api/client/PaginationIterator.java +++ b/src/main/java/com/datadog/api/client/PaginationIterator.java @@ -42,8 +42,7 @@ private Method buildRequestMethod() { throw new RuntimeException("Unable to find request method " + this.iterable.requestName); } - private void setNextPageValue(Object response) - throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { + private void setNextPageValue(Object response) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Object value = response; Object temp; @@ -158,4 +157,4 @@ public T next() { this.currentIndex++; return ((T) data.get(currentIndex - 1)); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/RFC3339DateFormat.java b/src/main/java/com/datadog/api/client/RFC3339DateFormat.java index 29d8ab1aa03..03375981e5e 100644 --- a/src/main/java/com/datadog/api/client/RFC3339DateFormat.java +++ b/src/main/java/com/datadog/api/client/RFC3339DateFormat.java @@ -44,4 +44,4 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie public Object clone() { return this; } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/ServerConfiguration.java b/src/main/java/com/datadog/api/client/ServerConfiguration.java index 0b92ec29708..931bf14936e 100644 --- a/src/main/java/com/datadog/api/client/ServerConfiguration.java +++ b/src/main/java/com/datadog/api/client/ServerConfiguration.java @@ -62,4 +62,4 @@ public String URL(Map variables) { public String URL() { return URL(null); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/ServerVariable.java b/src/main/java/com/datadog/api/client/ServerVariable.java index 2877a8fa060..55ec9f01403 100644 --- a/src/main/java/com/datadog/api/client/ServerVariable.java +++ b/src/main/java/com/datadog/api/client/ServerVariable.java @@ -25,4 +25,4 @@ public ServerVariable(String description, String defaultValue, HashSet e this.defaultValue = defaultValue; this.enumValues = enumValues; } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/StringUtil.java b/src/main/java/com/datadog/api/client/StringUtil.java index 96cc9b010d5..f1554db2f29 100644 --- a/src/main/java/com/datadog/api/client/StringUtil.java +++ b/src/main/java/com/datadog/api/client/StringUtil.java @@ -9,8 +9,7 @@ import java.util.Collection; import java.util.Iterator; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). @@ -73,4 +72,4 @@ public static String join(Collection list, String separator) { } return out.toString(); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/UnparsedObject.java b/src/main/java/com/datadog/api/client/UnparsedObject.java index f7f154313d4..79d8d79590b 100644 --- a/src/main/java/com/datadog/api/client/UnparsedObject.java +++ b/src/main/java/com/datadog/api/client/UnparsedObject.java @@ -68,4 +68,4 @@ public boolean equals(Object o) { public static UnparsedObject fromValue(Map value) { return new UnparsedObject(value); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/ZstdEncoder.java b/src/main/java/com/datadog/api/client/ZstdEncoder.java index 3a7b6df5e63..e5dc3764adb 100644 --- a/src/main/java/com/datadog/api/client/ZstdEncoder.java +++ b/src/main/java/com/datadog/api/client/ZstdEncoder.java @@ -5,12 +5,12 @@ */ package com.datadog.api.client; -import jakarta.annotation.Priority; -import jakarta.ws.rs.Priorities; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.InvocationTargetException; +import jakarta.annotation.Priority; +import jakarta.ws.rs.Priorities; import org.glassfish.jersey.spi.ContentEncoder; /** Zstd encoding support */ @@ -48,4 +48,4 @@ public OutputStream encode(String contentEncoding, OutputStream entityStream) th throw new RuntimeException(e); } } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/auth/ApiKeyAuth.java b/src/main/java/com/datadog/api/client/auth/ApiKeyAuth.java index b8594405947..83b6885672d 100644 --- a/src/main/java/com/datadog/api/client/auth/ApiKeyAuth.java +++ b/src/main/java/com/datadog/api/client/auth/ApiKeyAuth.java @@ -6,21 +6,19 @@ package com.datadog.api.client.auth; -import com.datadog.api.client.ApiException; import com.datadog.api.client.Pair; +import com.datadog.api.client.ApiException; import java.net.URI; -import java.util.List; import java.util.Map; +import java.util.List; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; private String apiKey; private String apiKeyPrefix; - public ApiKeyAuth(String location, String paramName) { this.location = location; this.paramName = paramName; @@ -51,14 +49,7 @@ public void setApiKeyPrefix(String apiKeyPrefix) { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { if (apiKey == null) { return; } @@ -76,4 +67,4 @@ public void applyToParams( cookieParams.put(paramName, value); } } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/auth/Authentication.java b/src/main/java/com/datadog/api/client/auth/Authentication.java index 98aa6a48b81..b6fb822315e 100644 --- a/src/main/java/com/datadog/api/client/auth/Authentication.java +++ b/src/main/java/com/datadog/api/client/auth/Authentication.java @@ -6,30 +6,24 @@ package com.datadog.api.client.auth; -import com.datadog.api.client.ApiException; import com.datadog.api.client.Pair; +import com.datadog.api.client.ApiException; + import java.net.URI; -import java.util.List; import java.util.Map; +import java.util.List; public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload Raw payload - * @param method HTTP method to authenticate - * @param uri URI to authenticate - * @throws ApiException If the settings can't be applied - */ - void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException; -} + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload Raw payload + * @param method HTTP method to authenticate + * @param uri URI to authenticate + * @throws ApiException If the settings can't be applied + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/auth/HttpBasicAuth.java b/src/main/java/com/datadog/api/client/auth/HttpBasicAuth.java index 37ffa3dce04..a54a40a150b 100644 --- a/src/main/java/com/datadog/api/client/auth/HttpBasicAuth.java +++ b/src/main/java/com/datadog/api/client/auth/HttpBasicAuth.java @@ -6,20 +6,18 @@ package com.datadog.api.client.auth; -import com.datadog.api.client.ApiException; import com.datadog.api.client.Pair; +import com.datadog.api.client.ApiException; import java.net.URI; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.List; import java.util.Map; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HttpBasicAuth implements Authentication { private String username; private String password; - public String getUsername() { return username; } @@ -37,20 +35,11 @@ public void setPassword(String password) { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { if (username == null && password == null) { return; } String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); - headerParams.put( - "Authorization", - "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/auth/HttpBearerAuth.java b/src/main/java/com/datadog/api/client/auth/HttpBearerAuth.java index 86770cc09c2..e668452e8b2 100644 --- a/src/main/java/com/datadog/api/client/auth/HttpBearerAuth.java +++ b/src/main/java/com/datadog/api/client/auth/HttpBearerAuth.java @@ -6,25 +6,23 @@ package com.datadog.api.client.auth; -import com.datadog.api.client.ApiException; import com.datadog.api.client.Pair; +import com.datadog.api.client.ApiException; + import java.net.URI; -import java.util.List; import java.util.Map; +import java.util.List; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; - public HttpBearerAuth(String scheme) { this.scheme = scheme; } /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization - * header. + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. * * @return The bearer token */ @@ -33,8 +31,7 @@ public String getBearerToken() { } /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization - * header. + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. * * @param bearerToken The bearer token to send in the Authorization header */ @@ -43,23 +40,15 @@ public void setBearerToken(String bearerToken) { } @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (bearerToken == null) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if(bearerToken == null) { return; } - headerParams.put( - "Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); } private static String upperCaseBearer(String scheme) { return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/auth/OAuth.java b/src/main/java/com/datadog/api/client/auth/OAuth.java index 946d6252bbc..ddc39343f83 100644 --- a/src/main/java/com/datadog/api/client/auth/OAuth.java +++ b/src/main/java/com/datadog/api/client/auth/OAuth.java @@ -6,13 +6,15 @@ package com.datadog.api.client.auth; -import com.datadog.api.client.ApiException; import com.datadog.api.client.Pair; +import com.datadog.api.client.ApiException; + import com.github.scribejava.core.builder.ServiceBuilder; import com.github.scribejava.core.builder.api.DefaultApi20; import com.github.scribejava.core.exceptions.OAuthException; import com.github.scribejava.core.model.OAuth2AccessToken; import com.github.scribejava.core.oauth.OAuth20Service; + import jakarta.ws.rs.core.UriBuilder; import java.io.IOException; import java.net.MalformedURLException; @@ -23,161 +25,162 @@ 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") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OAuth implements Authentication { - private static final Logger log = Logger.getLogger(OAuth.class.getName()); - - private String tokenUrl; - private String absoluteTokenUrl; - private OAuthFlow flow = OAuthFlow.application; - private OAuth20Service service; - private DefaultApi20 authApi; - private String scope; - private String username; - private String password; - private String code; - private volatile OAuth2AccessToken accessToken; - - public OAuth(String basePath, String tokenUrl) { - this.tokenUrl = tokenUrl; - this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); - authApi = - new DefaultApi20() { - @Override - public String getAccessTokenEndpoint() { - return absoluteTokenUrl; - } - - @Override - protected String getAuthorizationBaseUrl() { - throw new UnsupportedOperationException("Shouldn't get there !"); - } + private static final Logger log = Logger.getLogger(OAuth.class.getName()); + + private String tokenUrl; + private String absoluteTokenUrl; + private OAuthFlow flow = OAuthFlow.application; + private OAuth20Service service; + private DefaultApi20 authApi; + private String scope; + private String username; + private String password; + private String code; + private volatile OAuth2AccessToken accessToken; + public OAuth(String basePath, String tokenUrl) { + this.tokenUrl = tokenUrl; + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); + authApi = new DefaultApi20() { + @Override + public String getAccessTokenEndpoint() { + return absoluteTokenUrl; + } + + @Override + protected String getAuthorizationBaseUrl() { + throw new UnsupportedOperationException("Shouldn't get there !"); + } }; - } - - private static String createAbsoluteTokenUrl(String basePath, String tokenUrl) { - if (!URI.create(tokenUrl).isAbsolute()) { - try { - return UriBuilder.fromPath(basePath).path(tokenUrl).build().toURL().toString(); - } catch (MalformedURLException e) { - log.log(Level.SEVERE, "Couldn't create absolute token URL", e); - } } - return tokenUrl; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - - if (accessToken == null) { - obtainAccessToken(null); + + private static String createAbsoluteTokenUrl(String basePath, String tokenUrl) { + if (!URI.create(tokenUrl).isAbsolute()) { + try { + return UriBuilder.fromPath(basePath).path(tokenUrl).build().toURL().toString(); + } catch (MalformedURLException e) { + log.log(Level.SEVERE, "Couldn't create absolute token URL", e); + } + } + return tokenUrl; } - if (accessToken != null) { - headerParams.put("Authorization", "Bearer " + accessToken.getAccessToken()); + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + + if (accessToken == null) { + obtainAccessToken(null); + } + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken.getAccessToken()); + } } - } - public OAuth2AccessToken renewAccessToken() throws ApiException { - String refreshToken = null; - if (accessToken != null) { - refreshToken = accessToken.getRefreshToken(); - accessToken = null; + public OAuth2AccessToken renewAccessToken() throws ApiException { + String refreshToken = null; + if (accessToken != null) { + refreshToken = accessToken.getRefreshToken(); + accessToken = null; + } + return obtainAccessToken(refreshToken); } - return obtainAccessToken(refreshToken); - } - public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException { - if (service == null) { - log.log(Level.FINE, "service is null in obtainAccessToken."); - return null; + public synchronized OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException { + if (service == null) { + log.log(Level.FINE, "service is null in obtainAccessToken."); + return null; + } + try { + if (refreshToken != null) { + return service.refreshAccessToken(refreshToken); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + log.log(Level.FINE, "Refreshing the access token using the refresh token failed", e); + } + try { + switch (flow) { + case password: + if (username != null && password != null) { + accessToken = service.getAccessTokenPasswordGrant(username, password, scope); + } + break; + case accessCode: + if (code != null) { + accessToken = service.getAccessToken(code); + code = null; + } + break; + case application: + accessToken = service.getAccessTokenClientCredentialsGrant(scope); + break; + default: + log.log(Level.SEVERE, "Invalid flow in obtainAccessToken: " + flow); + } + } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { + throw new ApiException(e); + } + return accessToken; } - try { - if (refreshToken != null) { - return service.refreshAccessToken(refreshToken); - } - } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { - log.log(Level.FINE, "Refreshing the access token using the refresh token failed", e); + + public OAuth2AccessToken getAccessToken() { + return accessToken; } - try { - switch (flow) { - case password: - if (username != null && password != null) { - accessToken = service.getAccessTokenPasswordGrant(username, password, scope); - } - break; - case accessCode: - if (code != null) { - accessToken = service.getAccessToken(code); - code = null; - } - break; - case application: - accessToken = service.getAccessTokenClientCredentialsGrant(scope); - break; - default: - log.log(Level.SEVERE, "Invalid flow in obtainAccessToken: " + flow); - } - } catch (OAuthException | InterruptedException | ExecutionException | IOException e) { - throw new ApiException(e); + + public OAuth setAccessToken(OAuth2AccessToken accessToken) { + this.accessToken = accessToken; + return this; } - return accessToken; - } - - public OAuth2AccessToken getAccessToken() { - return accessToken; - } - - public OAuth setAccessToken(OAuth2AccessToken accessToken) { - this.accessToken = accessToken; - return this; - } - - public OAuth setAccessToken(String accessToken) { - this.accessToken = new OAuth2AccessToken(accessToken); - return this; - } - - public OAuth setScope(String scope) { - this.scope = scope; - return this; - } - - public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) { - if (Boolean.TRUE.equals(debug)) { - service = new ServiceBuilder(clientId).apiSecret(clientSecret).debug().build(authApi); - } else { - service = new ServiceBuilder(clientId).apiSecret(clientSecret).build(authApi); + + public OAuth setAccessToken(String accessToken) { + this.accessToken = new OAuth2AccessToken(accessToken); + return this; + } + + public OAuth setScope(String scope) { + this.scope = scope; + return this; + } + + public OAuth setCredentials(String clientId, String clientSecret, Boolean debug) { + if (Boolean.TRUE.equals(debug)) { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret).debug() + .build(authApi); + } else { + service = new ServiceBuilder(clientId) + .apiSecret(clientSecret) + .build(authApi); + } + return this; + } + + public OAuth usePasswordFlow(String username, String password) { + this.flow = OAuthFlow.password; + this.username = username; + this.password = password; + return this; + } + + public OAuth useAuthorizationCodeFlow(String code) { + this.flow = OAuthFlow.accessCode; + this.code = code; + return this; + } + + public OAuth setFlow(OAuthFlow flow) { + this.flow = flow; + return this; + } + + public void setBasePath(String basePath) { + this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); } - return this; - } - - public OAuth usePasswordFlow(String username, String password) { - this.flow = OAuthFlow.password; - this.username = username; - this.password = password; - return this; - } - - public OAuth useAuthorizationCodeFlow(String code) { - this.flow = OAuthFlow.accessCode; - this.code = code; - return this; - } - - public OAuth setFlow(OAuthFlow flow) { - this.flow = flow; - return this; - } - - public void setBasePath(String basePath) { - this.absoluteTokenUrl = createAbsoluteTokenUrl(basePath, tokenUrl); - } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/AuthenticationApi.java b/src/main/java/com/datadog/api/client/v1/api/AuthenticationApi.java index d5b6b1c3743..90394941c07 100644 --- a/src/main/java/com/datadog/api/client/v1/api/AuthenticationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/AuthenticationApi.java @@ -1,22 +1,30 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.AuthenticationValidationResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.AuthenticationValidationResponse; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthenticationApi { private ApiClient apiClient; - public AuthenticationApi() { this(ApiClient.getDefaultApiClient()); } @@ -44,39 +52,38 @@ public void setApiClient(ApiClient apiClient) { } /** - * Validate API key. - * - *

See {@link #validateWithHttpInfo}. - * - * @return AuthenticationValidationResponse - * @throws ApiException if fails to make API call - */ - public AuthenticationValidationResponse validate() throws ApiException { + * Validate API key. + * + * See {@link #validateWithHttpInfo}. + * + * @return AuthenticationValidationResponse + * @throws ApiException if fails to make API call + */ + public AuthenticationValidationResponse validate() throws ApiException { return validateWithHttpInfo().getData(); } /** - * Validate API key. - * - *

See {@link #validateWithHttpInfoAsync}. - * - * @return CompletableFuture<AuthenticationValidationResponse> - */ - public CompletableFuture validateAsync() { - return validateWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Validate API key. + * + * See {@link #validateWithHttpInfoAsync}. + * + * @return CompletableFuture<AuthenticationValidationResponse> + */ + public CompletableFuturevalidateAsync() { + return validateWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Check if the API key (not the APP key) is valid. If invalid, a 403 is returned. + *

Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.

* * @return ApiResponse<AuthenticationValidationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -89,68 +96,38 @@ public ApiResponse validateWithHttpInfo() thro // create path and map variables String localVarPath = "/api/v1/validate"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AuthenticationApi.validate", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AuthenticationApi.validate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Validate API key. * - *

See {@link #validateWithHttpInfo}. + * See {@link #validateWithHttpInfo}. * * @return CompletableFuture<ApiResponse<AuthenticationValidationResponse>> */ - public CompletableFuture> - validateWithHttpInfoAsync() { + public CompletableFuture> validateWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/validate"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AuthenticationApi.validate", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth"}); + builder = apiClient.createBuilder("v1.AuthenticationApi.validate", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java index d1664d45a62..d75386ce9c6 100644 --- a/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java @@ -1,29 +1,36 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.AWSAccount; -import com.datadog.api.client.v1.model.AWSAccountCreateResponse; -import com.datadog.api.client.v1.model.AWSAccountDeleteRequest; -import com.datadog.api.client.v1.model.AWSAccountListResponse; -import com.datadog.api.client.v1.model.AWSTagFilterCreateRequest; -import com.datadog.api.client.v1.model.AWSTagFilterDeleteRequest; -import com.datadog.api.client.v1.model.AWSTagFilterListResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.AWSAccountDeleteRequest; +import com.datadog.api.client.v1.model.AWSAccountListResponse; +import com.datadog.api.client.v1.model.AWSAccountCreateResponse; +import com.datadog.api.client.v1.model.AWSAccount; +import com.datadog.api.client.v1.model.AWSTagFilterDeleteRequest; +import com.datadog.api.client.v1.model.AWSTagFilterListResponse; +import com.datadog.api.client.v1.model.AWSTagFilterCreateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AwsIntegrationApi { private ApiClient apiClient; - public AwsIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -51,44 +58,44 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an AWS integration. - * - *

See {@link #createAWSAccountWithHttpInfo}. - * - * @param body AWS Request Object (required) - * @return AWSAccountCreateResponse - * @throws ApiException if fails to make API call - */ - public AWSAccountCreateResponse createAWSAccount(AWSAccount body) throws ApiException { + * Create an AWS integration. + * + * See {@link #createAWSAccountWithHttpInfo}. + * + * @param body AWS Request Object (required) + * @return AWSAccountCreateResponse + * @throws ApiException if fails to make API call + */ + public AWSAccountCreateResponse createAWSAccount(AWSAccount body) throws ApiException { return createAWSAccountWithHttpInfo(body).getData(); } /** - * Create an AWS integration. - * - *

See {@link #createAWSAccountWithHttpInfoAsync}. - * - * @param body AWS Request Object (required) - * @return CompletableFuture<AWSAccountCreateResponse> - */ - public CompletableFuture createAWSAccountAsync(AWSAccount body) { - return createAWSAccountWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an AWS integration. + * + * See {@link #createAWSAccountWithHttpInfoAsync}. + * + * @param body AWS Request Object (required) + * @return CompletableFuture<AWSAccountCreateResponse> + */ + public CompletableFuturecreateAWSAccountAsync(AWSAccount body) { + return createAWSAccountWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Datadog-Amazon Web Services integration. Using the POST method updates - * your integration configuration by adding your new configuration to the existing one in your - * Datadog organization. A unique AWS Account ID for role based authentication. + *

Create a Datadog-Amazon Web Services integration. + * Using the POST method updates your integration configuration + * by adding your new configuration to the existing one in your Datadog organization. + * A unique AWS Account ID for role based authentication.

* * @param body AWS Request Object (required) * @return ApiResponse<AWSAccountCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -98,138 +105,95 @@ public CompletableFuture createAWSAccountAsync(AWSAcco * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createAWSAccountWithHttpInfo(AWSAccount body) - throws ApiException { + public ApiResponse createAWSAccountWithHttpInfo(AWSAccount body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAWSAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAWSAccount"); } // create path and map variables String localVarPath = "/api/v1/integration/aws"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.createAWSAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.createAWSAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an AWS integration. * - *

See {@link #createAWSAccountWithHttpInfo}. + * See {@link #createAWSAccountWithHttpInfo}. * * @param body AWS Request Object (required) * @return CompletableFuture<ApiResponse<AWSAccountCreateResponse>> */ - public CompletableFuture> createAWSAccountWithHttpInfoAsync( - AWSAccount body) { + public CompletableFuture> createAWSAccountWithHttpInfoAsync(AWSAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createAWSAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAWSAccount")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.createAWSAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.createAWSAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Set an AWS tag filter. - * - *

See {@link #createAWSTagFilterWithHttpInfo}. - * - * @param body Set an AWS tag filter using an aws_account_identifier, namespace - * , and filtering string. Namespace options are application_elb, - * elb, lambda, network_elb, rds, sqs - * , and custom. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object createAWSTagFilter(AWSTagFilterCreateRequest body) throws ApiException { + * Set an AWS tag filter. + * + * See {@link #createAWSTagFilterWithHttpInfo}. + * + * @param body Set an AWS tag filter using an aws_account_identifier, namespace, and filtering string. Namespace options are application_elb, elb, lambda, network_elb, rds, sqs, and custom. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object createAWSTagFilter(AWSTagFilterCreateRequest body) throws ApiException { return createAWSTagFilterWithHttpInfo(body).getData(); } /** - * Set an AWS tag filter. - * - *

See {@link #createAWSTagFilterWithHttpInfoAsync}. - * - * @param body Set an AWS tag filter using an aws_account_identifier, namespace - * , and filtering string. Namespace options are application_elb, - * elb, lambda, network_elb, rds, sqs - * , and custom. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture createAWSTagFilterAsync(AWSTagFilterCreateRequest body) { - return createAWSTagFilterWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Set an AWS tag filter. + * + * See {@link #createAWSTagFilterWithHttpInfoAsync}. + * + * @param body Set an AWS tag filter using an aws_account_identifier, namespace, and filtering string. Namespace options are application_elb, elb, lambda, network_elb, rds, sqs, and custom. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturecreateAWSTagFilterAsync(AWSTagFilterCreateRequest body) { + return createAWSTagFilterWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Set an AWS tag filter. + *

Set an AWS tag filter.

* - * @param body Set an AWS tag filter using an aws_account_identifier, namespace - * , and filtering string. Namespace options are application_elb, - * elb, lambda, network_elb, rds, sqs - * , and custom. (required) + * @param body Set an AWS tag filter using an aws_account_identifier, namespace, and filtering string. Namespace options are application_elb, elb, lambda, network_elb, rds, sqs, and custom. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -238,141 +202,95 @@ public CompletableFuture createAWSTagFilterAsync(AWSTagFilterCreateReque * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createAWSTagFilterWithHttpInfo(AWSTagFilterCreateRequest body) - throws ApiException { + public ApiResponse createAWSTagFilterWithHttpInfo(AWSTagFilterCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAWSTagFilter"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAWSTagFilter"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/filtering"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.createAWSTagFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.createAWSTagFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Set an AWS tag filter. * - *

See {@link #createAWSTagFilterWithHttpInfo}. + * See {@link #createAWSTagFilterWithHttpInfo}. * - * @param body Set an AWS tag filter using an aws_account_identifier, namespace - * , and filtering string. Namespace options are application_elb, - * elb, lambda, network_elb, rds, sqs - * , and custom. (required) + * @param body Set an AWS tag filter using an aws_account_identifier, namespace, and filtering string. Namespace options are application_elb, elb, lambda, network_elb, rds, sqs, and custom. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> createAWSTagFilterWithHttpInfoAsync( - AWSTagFilterCreateRequest body) { + public CompletableFuture> createAWSTagFilterWithHttpInfoAsync(AWSTagFilterCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createAWSTagFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAWSTagFilter")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/filtering"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.createAWSTagFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.createAWSTagFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Generate a new external ID. - * - *

See {@link #createNewAWSExternalIDWithHttpInfo}. - * - * @param body Your Datadog role delegation name. For more information about your AWS account Role - * name, see the Datadog AWS - * integration configuration info. (required) - * @return AWSAccountCreateResponse - * @throws ApiException if fails to make API call - */ - public AWSAccountCreateResponse createNewAWSExternalID(AWSAccount body) throws ApiException { + * Generate a new external ID. + * + * See {@link #createNewAWSExternalIDWithHttpInfo}. + * + * @param body Your Datadog role delegation name. For more information about your AWS account Role name, see the Datadog AWS integration configuration info. (required) + * @return AWSAccountCreateResponse + * @throws ApiException if fails to make API call + */ + public AWSAccountCreateResponse createNewAWSExternalID(AWSAccount body) throws ApiException { return createNewAWSExternalIDWithHttpInfo(body).getData(); } /** - * Generate a new external ID. - * - *

See {@link #createNewAWSExternalIDWithHttpInfoAsync}. - * - * @param body Your Datadog role delegation name. For more information about your AWS account Role - * name, see the Datadog AWS - * integration configuration info. (required) - * @return CompletableFuture<AWSAccountCreateResponse> - */ - public CompletableFuture createNewAWSExternalIDAsync(AWSAccount body) { - return createNewAWSExternalIDWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Generate a new external ID. + * + * See {@link #createNewAWSExternalIDWithHttpInfoAsync}. + * + * @param body Your Datadog role delegation name. For more information about your AWS account Role name, see the Datadog AWS integration configuration info. (required) + * @return CompletableFuture<AWSAccountCreateResponse> + */ + public CompletableFuturecreateNewAWSExternalIDAsync(AWSAccount body) { + return createNewAWSExternalIDWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Generate a new AWS external ID for a given AWS account ID and role name pair. + *

Generate a new AWS external ID for a given AWS account ID and role name pair.

* - * @param body Your Datadog role delegation name. For more information about your AWS account Role - * name, see the Datadog AWS - * integration configuration info. (required) + * @param body Your Datadog role delegation name. For more information about your AWS account Role name, see the Datadog AWS integration configuration info. (required) * @return ApiResponse<AWSAccountCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -381,133 +299,95 @@ public CompletableFuture createNewAWSExternalIDAsync(A * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createNewAWSExternalIDWithHttpInfo(AWSAccount body) - throws ApiException { + public ApiResponse createNewAWSExternalIDWithHttpInfo(AWSAccount body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createNewAWSExternalID"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createNewAWSExternalID"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/generate_new_external_id"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.createNewAWSExternalID", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.createNewAWSExternalID", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Generate a new external ID. * - *

See {@link #createNewAWSExternalIDWithHttpInfo}. + * See {@link #createNewAWSExternalIDWithHttpInfo}. * - * @param body Your Datadog role delegation name. For more information about your AWS account Role - * name, see the Datadog AWS - * integration configuration info. (required) + * @param body Your Datadog role delegation name. For more information about your AWS account Role name, see the Datadog AWS integration configuration info. (required) * @return CompletableFuture<ApiResponse<AWSAccountCreateResponse>> */ - public CompletableFuture> - createNewAWSExternalIDWithHttpInfoAsync(AWSAccount body) { + public CompletableFuture> createNewAWSExternalIDWithHttpInfoAsync(AWSAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createNewAWSExternalID")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createNewAWSExternalID")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/generate_new_external_id"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.createNewAWSExternalID", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.createNewAWSExternalID", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an AWS integration. - * - *

See {@link #deleteAWSAccountWithHttpInfo}. - * - * @param body AWS request object (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object deleteAWSAccount(AWSAccountDeleteRequest body) throws ApiException { + * Delete an AWS integration. + * + * See {@link #deleteAWSAccountWithHttpInfo}. + * + * @param body AWS request object (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object deleteAWSAccount(AWSAccountDeleteRequest body) throws ApiException { return deleteAWSAccountWithHttpInfo(body).getData(); } /** - * Delete an AWS integration. - * - *

See {@link #deleteAWSAccountWithHttpInfoAsync}. - * - * @param body AWS request object (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture deleteAWSAccountAsync(AWSAccountDeleteRequest body) { - return deleteAWSAccountWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an AWS integration. + * + * See {@link #deleteAWSAccountWithHttpInfoAsync}. + * + * @param body AWS request object (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturedeleteAWSAccountAsync(AWSAccountDeleteRequest body) { + return deleteAWSAccountWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Datadog-AWS integration matching the specified account_id and - * role_name parameters. + *

Delete a Datadog-AWS integration matching the specified account_id and role_name parameters.

* * @param body AWS request object (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -517,132 +397,95 @@ public CompletableFuture deleteAWSAccountAsync(AWSAccountDeleteRequest b * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteAWSAccountWithHttpInfo(AWSAccountDeleteRequest body) - throws ApiException { + public ApiResponse deleteAWSAccountWithHttpInfo(AWSAccountDeleteRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAWSAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteAWSAccount"); } // create path and map variables String localVarPath = "/api/v1/integration/aws"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.deleteAWSAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.deleteAWSAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete an AWS integration. * - *

See {@link #deleteAWSAccountWithHttpInfo}. + * See {@link #deleteAWSAccountWithHttpInfo}. * * @param body AWS request object (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> deleteAWSAccountWithHttpInfoAsync( - AWSAccountDeleteRequest body) { + public CompletableFuture> deleteAWSAccountWithHttpInfoAsync(AWSAccountDeleteRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAWSAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteAWSAccount")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.deleteAWSAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.deleteAWSAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a tag filtering entry. - * - *

See {@link #deleteAWSTagFilterWithHttpInfo}. - * - * @param body Delete a tag filtering entry for a given AWS account and dd-aws - * namespace. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object deleteAWSTagFilter(AWSTagFilterDeleteRequest body) throws ApiException { + * Delete a tag filtering entry. + * + * See {@link #deleteAWSTagFilterWithHttpInfo}. + * + * @param body Delete a tag filtering entry for a given AWS account and dd-aws namespace. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object deleteAWSTagFilter(AWSTagFilterDeleteRequest body) throws ApiException { return deleteAWSTagFilterWithHttpInfo(body).getData(); } /** - * Delete a tag filtering entry. - * - *

See {@link #deleteAWSTagFilterWithHttpInfoAsync}. - * - * @param body Delete a tag filtering entry for a given AWS account and dd-aws - * namespace. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture deleteAWSTagFilterAsync(AWSTagFilterDeleteRequest body) { - return deleteAWSTagFilterWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a tag filtering entry. + * + * See {@link #deleteAWSTagFilterWithHttpInfoAsync}. + * + * @param body Delete a tag filtering entry for a given AWS account and dd-aws namespace. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturedeleteAWSTagFilterAsync(AWSTagFilterDeleteRequest body) { + return deleteAWSTagFilterWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a tag filtering entry. + *

Delete a tag filtering entry.

* - * @param body Delete a tag filtering entry for a given AWS account and dd-aws - * namespace. (required) + * @param body Delete a tag filtering entry for a given AWS account and dd-aws namespace. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -651,127 +494,92 @@ public CompletableFuture deleteAWSTagFilterAsync(AWSTagFilterDeleteReque * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteAWSTagFilterWithHttpInfo(AWSTagFilterDeleteRequest body) - throws ApiException { + public ApiResponse deleteAWSTagFilterWithHttpInfo(AWSTagFilterDeleteRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAWSTagFilter"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteAWSTagFilter"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/filtering"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.deleteAWSTagFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.deleteAWSTagFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete a tag filtering entry. * - *

See {@link #deleteAWSTagFilterWithHttpInfo}. + * See {@link #deleteAWSTagFilterWithHttpInfo}. * - * @param body Delete a tag filtering entry for a given AWS account and dd-aws - * namespace. (required) + * @param body Delete a tag filtering entry for a given AWS account and dd-aws namespace. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> deleteAWSTagFilterWithHttpInfoAsync( - AWSTagFilterDeleteRequest body) { + public CompletableFuture> deleteAWSTagFilterWithHttpInfoAsync(AWSTagFilterDeleteRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAWSTagFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteAWSTagFilter")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/filtering"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.deleteAWSTagFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.deleteAWSTagFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List namespace rules. - * - *

See {@link #listAvailableAWSNamespacesWithHttpInfo}. - * - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List listAvailableAWSNamespaces() throws ApiException { + * List namespace rules. + * + * See {@link #listAvailableAWSNamespacesWithHttpInfo}. + * + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List listAvailableAWSNamespaces() throws ApiException { return listAvailableAWSNamespacesWithHttpInfo().getData(); } /** - * List namespace rules. - * - *

See {@link #listAvailableAWSNamespacesWithHttpInfoAsync}. - * - * @return CompletableFuture<List<String>> - */ - public CompletableFuture> listAvailableAWSNamespacesAsync() { - return listAvailableAWSNamespacesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List namespace rules. + * + * See {@link #listAvailableAWSNamespacesWithHttpInfoAsync}. + * + * @return CompletableFuture<List<String>> + */ + public CompletableFuture>listAvailableAWSNamespacesAsync() { + return listAvailableAWSNamespacesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments. + *

List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.

* * @return ApiResponse<List<String>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -784,71 +592,44 @@ public ApiResponse> listAvailableAWSNamespacesWithHttpInfo() throws // create path and map variables String localVarPath = "/api/v1/integration/aws/available_namespace_rules"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.listAvailableAWSNamespaces", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.listAvailableAWSNamespaces", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * List namespace rules. * - *

See {@link #listAvailableAWSNamespacesWithHttpInfo}. + * See {@link #listAvailableAWSNamespacesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<List<String>>> */ - public CompletableFuture>> - listAvailableAWSNamespacesWithHttpInfoAsync() { + public CompletableFuture>> listAvailableAWSNamespacesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/integration/aws/available_namespace_rules"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.listAvailableAWSNamespaces", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.listAvailableAWSNamespaces", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } - /** Manage optional parameters to listAWSAccounts. */ + /** + * Manage optional parameters to listAWSAccounts. + */ public static class ListAWSAccountsOptionalParameters { private String accountId; private String roleName; @@ -856,9 +637,7 @@ public static class ListAWSAccountsOptionalParameters { /** * Set accountId. - * - * @param accountId Only return AWS accounts that matches this account_id. - * (optional) + * @param accountId Only return AWS accounts that matches this account_id. (optional) * @return ListAWSAccountsOptionalParameters */ public ListAWSAccountsOptionalParameters accountId(String accountId) { @@ -868,7 +647,6 @@ public ListAWSAccountsOptionalParameters accountId(String accountId) { /** * Set roleName. - * * @param roleName Only return AWS accounts that matches this role_name. (optional) * @return ListAWSAccountsOptionalParameters */ @@ -879,9 +657,7 @@ public ListAWSAccountsOptionalParameters roleName(String roleName) { /** * Set accessKeyId. - * - * @param accessKeyId Only return AWS accounts that matches this access_key_id. - * (optional) + * @param accessKeyId Only return AWS accounts that matches this access_key_id. (optional) * @return ListAWSAccountsOptionalParameters */ public ListAWSAccountsOptionalParameters accessKeyId(String accessKeyId) { @@ -891,71 +667,66 @@ public ListAWSAccountsOptionalParameters accessKeyId(String accessKeyId) { } /** - * List all AWS integrations. - * - *

See {@link #listAWSAccountsWithHttpInfo}. - * - * @return AWSAccountListResponse - * @throws ApiException if fails to make API call - */ - public AWSAccountListResponse listAWSAccounts() throws ApiException { + * List all AWS integrations. + * + * See {@link #listAWSAccountsWithHttpInfo}. + * + * @return AWSAccountListResponse + * @throws ApiException if fails to make API call + */ + public AWSAccountListResponse listAWSAccounts () throws ApiException { return listAWSAccountsWithHttpInfo(new ListAWSAccountsOptionalParameters()).getData(); } /** - * List all AWS integrations. - * - *

See {@link #listAWSAccountsWithHttpInfoAsync}. - * - * @return CompletableFuture<AWSAccountListResponse> - */ - public CompletableFuture listAWSAccountsAsync() { - return listAWSAccountsWithHttpInfoAsync(new ListAWSAccountsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * List all AWS integrations. + * + * See {@link #listAWSAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<AWSAccountListResponse> + */ + public CompletableFuturelistAWSAccountsAsync() { + return listAWSAccountsWithHttpInfoAsync(new ListAWSAccountsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * List all AWS integrations. - * - *

See {@link #listAWSAccountsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return AWSAccountListResponse - * @throws ApiException if fails to make API call - */ - public AWSAccountListResponse listAWSAccounts(ListAWSAccountsOptionalParameters parameters) - throws ApiException { + * List all AWS integrations. + * + * See {@link #listAWSAccountsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return AWSAccountListResponse + * @throws ApiException if fails to make API call + */ + public AWSAccountListResponse listAWSAccounts(ListAWSAccountsOptionalParameters parameters) throws ApiException { return listAWSAccountsWithHttpInfo(parameters).getData(); } /** - * List all AWS integrations. - * - *

See {@link #listAWSAccountsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<AWSAccountListResponse> - */ - public CompletableFuture listAWSAccountsAsync( - ListAWSAccountsOptionalParameters parameters) { - return listAWSAccountsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List all AWS integrations. + * + * See {@link #listAWSAccountsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AWSAccountListResponse> + */ + public CompletableFuturelistAWSAccountsAsync(ListAWSAccountsOptionalParameters parameters) { + return listAWSAccountsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List all Datadog-AWS integrations available in your Datadog organization. + *

List all Datadog-AWS integrations available in your Datadog organization.

* * @param parameters Optional parameters for the request. * @return ApiResponse<AWSAccountListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -964,8 +735,7 @@ public CompletableFuture listAWSAccountsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listAWSAccountsWithHttpInfo( - ListAWSAccountsOptionalParameters parameters) throws ApiException { + public ApiResponse listAWSAccountsWithHttpInfo(ListAWSAccountsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String accountId = parameters.accountId; String roleName = parameters.roleName; @@ -973,6 +743,7 @@ public ApiResponse listAWSAccountsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/integration/aws"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -980,36 +751,19 @@ public ApiResponse listAWSAccountsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "role_name", roleName)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "access_key_id", accessKeyId)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.listAWSAccounts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.listAWSAccounts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List all AWS integrations. * - *

See {@link #listAWSAccountsWithHttpInfo}. + * See {@link #listAWSAccountsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<AWSAccountListResponse>> */ - public CompletableFuture> listAWSAccountsWithHttpInfoAsync( - ListAWSAccountsOptionalParameters parameters) { + public CompletableFuture> listAWSAccountsWithHttpInfoAsync(ListAWSAccountsOptionalParameters parameters) { Object localVarPostBody = null; String accountId = parameters.accountId; String roleName = parameters.roleName; @@ -1017,6 +771,7 @@ public CompletableFuture> listAWSAccountsWit // create path and map variables String localVarPath = "/api/v1/integration/aws"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1026,68 +781,51 @@ public CompletableFuture> listAWSAccountsWit Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.listAWSAccounts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.listAWSAccounts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all AWS tag filters. - * - *

See {@link #listAWSTagFiltersWithHttpInfo}. - * - * @param accountId Only return AWS filters that matches this account_id. (required) - * @return AWSTagFilterListResponse - * @throws ApiException if fails to make API call - */ - public AWSTagFilterListResponse listAWSTagFilters(String accountId) throws ApiException { + * Get all AWS tag filters. + * + * See {@link #listAWSTagFiltersWithHttpInfo}. + * + * @param accountId Only return AWS filters that matches this account_id. (required) + * @return AWSTagFilterListResponse + * @throws ApiException if fails to make API call + */ + public AWSTagFilterListResponse listAWSTagFilters(String accountId) throws ApiException { return listAWSTagFiltersWithHttpInfo(accountId).getData(); } /** - * Get all AWS tag filters. - * - *

See {@link #listAWSTagFiltersWithHttpInfoAsync}. - * - * @param accountId Only return AWS filters that matches this account_id. (required) - * @return CompletableFuture<AWSTagFilterListResponse> - */ - public CompletableFuture listAWSTagFiltersAsync(String accountId) { - return listAWSTagFiltersWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Get all AWS tag filters. + * + * See {@link #listAWSTagFiltersWithHttpInfoAsync}. + * + * @param accountId Only return AWS filters that matches this account_id. (required) + * @return CompletableFuture<AWSTagFilterListResponse> + */ + public CompletableFuturelistAWSTagFiltersAsync(String accountId) { + return listAWSTagFiltersWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all AWS tag filters. + *

Get all AWS tag filters.

* * @param accountId Only return AWS filters that matches this account_id. (required) * @return ApiResponse<AWSTagFilterListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1096,66 +834,47 @@ public CompletableFuture listAWSTagFiltersAsync(String * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listAWSTagFiltersWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse listAWSTagFiltersWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling listAWSTagFilters"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling listAWSTagFilters"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/filtering"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.listAWSTagFilters", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.listAWSTagFilters", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all AWS tag filters. * - *

See {@link #listAWSTagFiltersWithHttpInfo}. + * See {@link #listAWSTagFiltersWithHttpInfo}. * * @param accountId Only return AWS filters that matches this account_id. (required) * @return CompletableFuture<ApiResponse<AWSTagFilterListResponse>> */ - public CompletableFuture> - listAWSTagFiltersWithHttpInfoAsync(String accountId) { + public CompletableFuture> listAWSTagFiltersWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling listAWSTagFilters")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling listAWSTagFilters")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/filtering"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1163,32 +882,18 @@ public ApiResponse listAWSTagFiltersWithHttpInfo(Strin Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.listAWSTagFilters", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.listAWSTagFilters", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to updateAWSAccount. */ + /** + * Manage optional parameters to updateAWSAccount. + */ public static class UpdateAWSAccountOptionalParameters { private String accountId; private String roleName; @@ -1196,9 +901,7 @@ public static class UpdateAWSAccountOptionalParameters { /** * Set accountId. - * - * @param accountId Only return AWS accounts that matches this account_id. - * (optional) + * @param accountId Only return AWS accounts that matches this account_id. (optional) * @return UpdateAWSAccountOptionalParameters */ public UpdateAWSAccountOptionalParameters accountId(String accountId) { @@ -1208,9 +911,7 @@ public UpdateAWSAccountOptionalParameters accountId(String accountId) { /** * Set roleName. - * - * @param roleName Only return AWS accounts that match this role_name. Required if - * account_id is specified. (optional) + * @param roleName Only return AWS accounts that match this role_name. Required if account_id is specified. (optional) * @return UpdateAWSAccountOptionalParameters */ public UpdateAWSAccountOptionalParameters roleName(String roleName) { @@ -1220,9 +921,7 @@ public UpdateAWSAccountOptionalParameters roleName(String roleName) { /** * Set accessKeyId. - * - * @param accessKeyId Only return AWS accounts that matches this access_key_id. - * Required if none of the other two options are specified. (optional) + * @param accessKeyId Only return AWS accounts that matches this access_key_id. Required if none of the other two options are specified. (optional) * @return UpdateAWSAccountOptionalParameters */ public UpdateAWSAccountOptionalParameters accessKeyId(String accessKeyId) { @@ -1232,76 +931,71 @@ public UpdateAWSAccountOptionalParameters accessKeyId(String accessKeyId) { } /** - * Update an AWS integration. - * - *

See {@link #updateAWSAccountWithHttpInfo}. - * - * @param body AWS request object (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object updateAWSAccount(AWSAccount body) throws ApiException { - return updateAWSAccountWithHttpInfo(body, new UpdateAWSAccountOptionalParameters()).getData(); + * Update an AWS integration. + * + * See {@link #updateAWSAccountWithHttpInfo}. + * + * @param body AWS request object (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object updateAWSAccount (AWSAccount body) throws ApiException { + return updateAWSAccountWithHttpInfo( body, new UpdateAWSAccountOptionalParameters()).getData(); } /** - * Update an AWS integration. - * - *

See {@link #updateAWSAccountWithHttpInfoAsync}. - * - * @param body AWS request object (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture updateAWSAccountAsync(AWSAccount body) { - return updateAWSAccountWithHttpInfoAsync(body, new UpdateAWSAccountOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Update an AWS integration. + * + * See {@link #updateAWSAccountWithHttpInfoAsync}. + * + * @param body AWS request object (required) + * @return CompletableFuture<Object> + */ + public CompletableFutureupdateAWSAccountAsync(AWSAccount body) { + return updateAWSAccountWithHttpInfoAsync(body, new UpdateAWSAccountOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Update an AWS integration. - * - *

See {@link #updateAWSAccountWithHttpInfo}. - * - * @param body AWS request object (required) - * @param parameters Optional parameters for the request. - * @return Object - * @throws ApiException if fails to make API call - */ - public Object updateAWSAccount(AWSAccount body, UpdateAWSAccountOptionalParameters parameters) - throws ApiException { + * Update an AWS integration. + * + * See {@link #updateAWSAccountWithHttpInfo}. + * + * @param body AWS request object (required) + * @param parameters Optional parameters for the request. + * @return Object + * @throws ApiException if fails to make API call + */ + public Object updateAWSAccount(AWSAccount body, UpdateAWSAccountOptionalParameters parameters) throws ApiException { return updateAWSAccountWithHttpInfo(body, parameters).getData(); } /** - * Update an AWS integration. - * - *

See {@link #updateAWSAccountWithHttpInfoAsync}. - * - * @param body AWS request object (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<Object> - */ - public CompletableFuture updateAWSAccountAsync( - AWSAccount body, UpdateAWSAccountOptionalParameters parameters) { - return updateAWSAccountWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Update an AWS integration. + * + * See {@link #updateAWSAccountWithHttpInfoAsync}. + * + * @param body AWS request object (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Object> + */ + public CompletableFutureupdateAWSAccountAsync( AWSAccount body, UpdateAWSAccountOptionalParameters parameters) { + return updateAWSAccountWithHttpInfoAsync(body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Datadog-Amazon Web Services integration. + *

Update a Datadog-Amazon Web Services integration.

* * @param body AWS request object (required) * @param parameters Optional parameters for the request. * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1311,14 +1005,12 @@ public CompletableFuture updateAWSAccountAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAWSAccountWithHttpInfo( - AWSAccount body, UpdateAWSAccountOptionalParameters parameters) throws ApiException { + public ApiResponse updateAWSAccountWithHttpInfo(AWSAccount body, UpdateAWSAccountOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAWSAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAWSAccount"); } String accountId = parameters.accountId; String roleName = parameters.roleName; @@ -1326,6 +1018,7 @@ public ApiResponse updateAWSAccountWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/integration/aws"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1333,46 +1026,27 @@ public ApiResponse updateAWSAccountWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "role_name", roleName)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "access_key_id", accessKeyId)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.updateAWSAccount", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.AwsIntegrationApi.updateAWSAccount", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an AWS integration. * - *

See {@link #updateAWSAccountWithHttpInfo}. + * See {@link #updateAWSAccountWithHttpInfo}. * * @param body AWS request object (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> updateAWSAccountWithHttpInfoAsync( - AWSAccount body, UpdateAWSAccountOptionalParameters parameters) { + public CompletableFuture> updateAWSAccountWithHttpInfoAsync(AWSAccount body, UpdateAWSAccountOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateAWSAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAWSAccount")); + return result; } String accountId = parameters.accountId; String roleName = parameters.roleName; @@ -1380,6 +1054,7 @@ public CompletableFuture> updateAWSAccountWithHttpInfoAsync( // create path and map variables String localVarPath = "/api/v1/integration/aws"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1389,28 +1064,12 @@ public CompletableFuture> updateAWSAccountWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsIntegrationApi.updateAWSAccount", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsIntegrationApi.updateAWSAccount", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/AwsLogsIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/AwsLogsIntegrationApi.java index 50bd44ff8f9..a91a8bd27b1 100644 --- a/src/main/java/com/datadog/api/client/v1/api/AwsLogsIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/AwsLogsIntegrationApi.java @@ -1,27 +1,34 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.AWSAccountAndLambdaRequest; -import com.datadog.api.client.v1.model.AWSLogsAsyncResponse; -import com.datadog.api.client.v1.model.AWSLogsListResponse; -import com.datadog.api.client.v1.model.AWSLogsListServicesResponse; -import com.datadog.api.client.v1.model.AWSLogsServicesRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.AWSAccountAndLambdaRequest; +import com.datadog.api.client.v1.model.AWSLogsListResponse; +import com.datadog.api.client.v1.model.AWSLogsAsyncResponse; +import com.datadog.api.client.v1.model.AWSLogsListServicesResponse; +import com.datadog.api.client.v1.model.AWSLogsServicesRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AwsLogsIntegrationApi { private ApiClient apiClient; - public AwsLogsIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,54 +56,49 @@ public void setApiClient(ApiClient apiClient) { } /** - * Check that an AWS Lambda Function exists. - * - *

See {@link #checkAWSLogsLambdaAsyncWithHttpInfo}. - * - * @param body Check AWS Log Lambda Async request body. (required) - * @return AWSLogsAsyncResponse - * @throws ApiException if fails to make API call - */ - public AWSLogsAsyncResponse checkAWSLogsLambdaAsync(AWSAccountAndLambdaRequest body) - throws ApiException { + * Check that an AWS Lambda Function exists. + * + * See {@link #checkAWSLogsLambdaAsyncWithHttpInfo}. + * + * @param body Check AWS Log Lambda Async request body. (required) + * @return AWSLogsAsyncResponse + * @throws ApiException if fails to make API call + */ + public AWSLogsAsyncResponse checkAWSLogsLambdaAsync(AWSAccountAndLambdaRequest body) throws ApiException { return checkAWSLogsLambdaAsyncWithHttpInfo(body).getData(); } /** - * Check that an AWS Lambda Function exists. - * - *

See {@link #checkAWSLogsLambdaAsyncWithHttpInfoAsync}. - * - * @param body Check AWS Log Lambda Async request body. (required) - * @return CompletableFuture<AWSLogsAsyncResponse> - */ - public CompletableFuture checkAWSLogsLambdaAsyncAsync( - AWSAccountAndLambdaRequest body) { - return checkAWSLogsLambdaAsyncWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Check that an AWS Lambda Function exists. + * + * See {@link #checkAWSLogsLambdaAsyncWithHttpInfoAsync}. + * + * @param body Check AWS Log Lambda Async request body. (required) + * @return CompletableFuture<AWSLogsAsyncResponse> + */ + public CompletableFuturecheckAWSLogsLambdaAsyncAsync(AWSAccountAndLambdaRequest body) { + return checkAWSLogsLambdaAsyncWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Test if permissions are present to add a log-forwarding triggers for the given services and AWS - * account. The input is the same as for Enable an AWS service log collection. Subsequent requests - * will always repeat the above, so this endpoint can be polled intermittently instead of - * blocking. - * + *

Test if permissions are present to add a log-forwarding triggers for the given services and AWS account. The input + * is the same as for Enable an AWS service log collection. Subsequent requests will always repeat the above, so this + * endpoint can be polled intermittently instead of blocking.

*
    - *
  • Returns a status of 'created' when it's checking if the Lambda exists in the account. - *
  • Returns a status of 'waiting' while checking. - *
  • Returns a status of 'checked and ok' if the Lambda exists. - *
  • Returns a status of 'error' if the Lambda does not exist. + *
  • Returns a status of 'created' when it's checking if the Lambda exists in the account.
  • + *
  • Returns a status of 'waiting' while checking.
  • + *
  • Returns a status of 'checked and ok' if the Lambda exists.
  • + *
  • Returns a status of 'error' if the Lambda does not exist.
  • *
* * @param body Check AWS Log Lambda Async request body. (required) * @return ApiResponse<AWSLogsAsyncResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -105,141 +107,105 @@ public CompletableFuture checkAWSLogsLambdaAsyncAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse checkAWSLogsLambdaAsyncWithHttpInfo( - AWSAccountAndLambdaRequest body) throws ApiException { + public ApiResponse checkAWSLogsLambdaAsyncWithHttpInfo(AWSAccountAndLambdaRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling checkAWSLogsLambdaAsync"); + throw new ApiException(400, "Missing the required parameter 'body' when calling checkAWSLogsLambdaAsync"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/check_async"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.checkAWSLogsLambdaAsync", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.checkAWSLogsLambdaAsync", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Check that an AWS Lambda Function exists. * - *

See {@link #checkAWSLogsLambdaAsyncWithHttpInfo}. + * See {@link #checkAWSLogsLambdaAsyncWithHttpInfo}. * * @param body Check AWS Log Lambda Async request body. (required) * @return CompletableFuture<ApiResponse<AWSLogsAsyncResponse>> */ - public CompletableFuture> - checkAWSLogsLambdaAsyncWithHttpInfoAsync(AWSAccountAndLambdaRequest body) { + public CompletableFuture> checkAWSLogsLambdaAsyncWithHttpInfoAsync(AWSAccountAndLambdaRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling checkAWSLogsLambdaAsync")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling checkAWSLogsLambdaAsync")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/check_async"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.checkAWSLogsLambdaAsync", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.checkAWSLogsLambdaAsync", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Check permissions for log services. - * - *

See {@link #checkAWSLogsServicesAsyncWithHttpInfo}. - * - * @param body Check AWS Logs Async Services request body. (required) - * @return AWSLogsAsyncResponse - * @throws ApiException if fails to make API call - */ - public AWSLogsAsyncResponse checkAWSLogsServicesAsync(AWSLogsServicesRequest body) - throws ApiException { + * Check permissions for log services. + * + * See {@link #checkAWSLogsServicesAsyncWithHttpInfo}. + * + * @param body Check AWS Logs Async Services request body. (required) + * @return AWSLogsAsyncResponse + * @throws ApiException if fails to make API call + */ + public AWSLogsAsyncResponse checkAWSLogsServicesAsync(AWSLogsServicesRequest body) throws ApiException { return checkAWSLogsServicesAsyncWithHttpInfo(body).getData(); } /** - * Check permissions for log services. - * - *

See {@link #checkAWSLogsServicesAsyncWithHttpInfoAsync}. - * - * @param body Check AWS Logs Async Services request body. (required) - * @return CompletableFuture<AWSLogsAsyncResponse> - */ - public CompletableFuture checkAWSLogsServicesAsyncAsync( - AWSLogsServicesRequest body) { - return checkAWSLogsServicesAsyncWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Check permissions for log services. + * + * See {@link #checkAWSLogsServicesAsyncWithHttpInfoAsync}. + * + * @param body Check AWS Logs Async Services request body. (required) + * @return CompletableFuture<AWSLogsAsyncResponse> + */ + public CompletableFuturecheckAWSLogsServicesAsyncAsync(AWSLogsServicesRequest body) { + return checkAWSLogsServicesAsyncWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Test if permissions are present to add log-forwarding triggers for the given services and AWS - * account. Input is the same as for EnableAWSLogServices. Done async, so can be - * repeatedly polled in a non-blocking fashion until the async request completes. - * + *

Test if permissions are present to add log-forwarding triggers for the + * given services and AWS account. Input is the same as for EnableAWSLogServices. + * Done async, so can be repeatedly polled in a non-blocking fashion until + * the async request completes.

*
    - *
  • Returns a status of created when it's checking if the permissions exists in - * the AWS account. - *
  • Returns a status of waiting while checking. - *
  • Returns a status of checked and ok if the Lambda exists. - *
  • Returns a status of error if the Lambda does not exist. + *
  • Returns a status of created when it's checking if the permissions exists + * in the AWS account.
  • + *
  • Returns a status of waiting while checking.
  • + *
  • Returns a status of checked and ok if the Lambda exists.
  • + *
  • Returns a status of error if the Lambda does not exist.
  • *
* * @param body Check AWS Logs Async Services request body. (required) * @return ApiResponse<AWSLogsAsyncResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -248,130 +214,95 @@ public CompletableFuture checkAWSLogsServicesAsyncAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse checkAWSLogsServicesAsyncWithHttpInfo( - AWSLogsServicesRequest body) throws ApiException { + public ApiResponse checkAWSLogsServicesAsyncWithHttpInfo(AWSLogsServicesRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling checkAWSLogsServicesAsync"); + throw new ApiException(400, "Missing the required parameter 'body' when calling checkAWSLogsServicesAsync"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/services_async"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.checkAWSLogsServicesAsync", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.checkAWSLogsServicesAsync", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Check permissions for log services. * - *

See {@link #checkAWSLogsServicesAsyncWithHttpInfo}. + * See {@link #checkAWSLogsServicesAsyncWithHttpInfo}. * * @param body Check AWS Logs Async Services request body. (required) * @return CompletableFuture<ApiResponse<AWSLogsAsyncResponse>> */ - public CompletableFuture> - checkAWSLogsServicesAsyncWithHttpInfoAsync(AWSLogsServicesRequest body) { + public CompletableFuture> checkAWSLogsServicesAsyncWithHttpInfoAsync(AWSLogsServicesRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling checkAWSLogsServicesAsync")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling checkAWSLogsServicesAsync")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/services_async"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.checkAWSLogsServicesAsync", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.checkAWSLogsServicesAsync", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Add AWS Log Lambda ARN. - * - *

See {@link #createAWSLambdaARNWithHttpInfo}. - * - * @param body AWS Log Lambda Async request body. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object createAWSLambdaARN(AWSAccountAndLambdaRequest body) throws ApiException { + * Add AWS Log Lambda ARN. + * + * See {@link #createAWSLambdaARNWithHttpInfo}. + * + * @param body AWS Log Lambda Async request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object createAWSLambdaARN(AWSAccountAndLambdaRequest body) throws ApiException { return createAWSLambdaARNWithHttpInfo(body).getData(); } /** - * Add AWS Log Lambda ARN. - * - *

See {@link #createAWSLambdaARNWithHttpInfoAsync}. - * - * @param body AWS Log Lambda Async request body. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture createAWSLambdaARNAsync(AWSAccountAndLambdaRequest body) { - return createAWSLambdaARNWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Add AWS Log Lambda ARN. + * + * See {@link #createAWSLambdaARNWithHttpInfoAsync}. + * + * @param body AWS Log Lambda Async request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturecreateAWSLambdaARNAsync(AWSAccountAndLambdaRequest body) { + return createAWSLambdaARNWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS - * account ID to enable log collection. + *

Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection.

* * @param body AWS Log Lambda Async request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -380,130 +311,95 @@ public CompletableFuture createAWSLambdaARNAsync(AWSAccountAndLambdaRequ * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createAWSLambdaARNWithHttpInfo(AWSAccountAndLambdaRequest body) - throws ApiException { + public ApiResponse createAWSLambdaARNWithHttpInfo(AWSAccountAndLambdaRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAWSLambdaARN"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAWSLambdaARN"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.createAWSLambdaARN", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.createAWSLambdaARN", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add AWS Log Lambda ARN. * - *

See {@link #createAWSLambdaARNWithHttpInfo}. + * See {@link #createAWSLambdaARNWithHttpInfo}. * * @param body AWS Log Lambda Async request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> createAWSLambdaARNWithHttpInfoAsync( - AWSAccountAndLambdaRequest body) { + public CompletableFuture> createAWSLambdaARNWithHttpInfoAsync(AWSAccountAndLambdaRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createAWSLambdaARN")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAWSLambdaARN")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.createAWSLambdaARN", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.createAWSLambdaARN", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an AWS Logs integration. - * - *

See {@link #deleteAWSLambdaARNWithHttpInfo}. - * - * @param body Delete AWS Lambda ARN request body. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object deleteAWSLambdaARN(AWSAccountAndLambdaRequest body) throws ApiException { + * Delete an AWS Logs integration. + * + * See {@link #deleteAWSLambdaARNWithHttpInfo}. + * + * @param body Delete AWS Lambda ARN request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object deleteAWSLambdaARN(AWSAccountAndLambdaRequest body) throws ApiException { return deleteAWSLambdaARNWithHttpInfo(body).getData(); } /** - * Delete an AWS Logs integration. - * - *

See {@link #deleteAWSLambdaARNWithHttpInfoAsync}. - * - * @param body Delete AWS Lambda ARN request body. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture deleteAWSLambdaARNAsync(AWSAccountAndLambdaRequest body) { - return deleteAWSLambdaARNWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an AWS Logs integration. + * + * See {@link #deleteAWSLambdaARNWithHttpInfoAsync}. + * + * @param body Delete AWS Lambda ARN request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturedeleteAWSLambdaARNAsync(AWSAccountAndLambdaRequest body) { + return deleteAWSLambdaARNWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a - * given AWS account. + *

Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS account.

* * @param body Delete AWS Lambda ARN request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -512,130 +408,95 @@ public CompletableFuture deleteAWSLambdaARNAsync(AWSAccountAndLambdaRequ * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteAWSLambdaARNWithHttpInfo(AWSAccountAndLambdaRequest body) - throws ApiException { + public ApiResponse deleteAWSLambdaARNWithHttpInfo(AWSAccountAndLambdaRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAWSLambdaARN"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteAWSLambdaARN"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.deleteAWSLambdaARN", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.deleteAWSLambdaARN", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete an AWS Logs integration. * - *

See {@link #deleteAWSLambdaARNWithHttpInfo}. + * See {@link #deleteAWSLambdaARNWithHttpInfo}. * * @param body Delete AWS Lambda ARN request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> deleteAWSLambdaARNWithHttpInfoAsync( - AWSAccountAndLambdaRequest body) { + public CompletableFuture> deleteAWSLambdaARNWithHttpInfoAsync(AWSAccountAndLambdaRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAWSLambdaARN")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteAWSLambdaARN")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.deleteAWSLambdaARN", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.deleteAWSLambdaARN", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Enable an AWS Logs integration. - * - *

See {@link #enableAWSLogServicesWithHttpInfo}. - * - * @param body Enable AWS Log Services request body. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object enableAWSLogServices(AWSLogsServicesRequest body) throws ApiException { + * Enable an AWS Logs integration. + * + * See {@link #enableAWSLogServicesWithHttpInfo}. + * + * @param body Enable AWS Log Services request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object enableAWSLogServices(AWSLogsServicesRequest body) throws ApiException { return enableAWSLogServicesWithHttpInfo(body).getData(); } /** - * Enable an AWS Logs integration. - * - *

See {@link #enableAWSLogServicesWithHttpInfoAsync}. - * - * @param body Enable AWS Log Services request body. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture enableAWSLogServicesAsync(AWSLogsServicesRequest body) { - return enableAWSLogServicesWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Enable an AWS Logs integration. + * + * See {@link #enableAWSLogServicesWithHttpInfoAsync}. + * + * @param body Enable AWS Log Services request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFutureenableAWSLogServicesAsync(AWSLogsServicesRequest body) { + return enableAWSLogServicesWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Enable automatic log collection for a list of services. This should be run after running - * CreateAWSLambdaARN to save the configuration. + *

Enable automatic log collection for a list of services. This should be run after running CreateAWSLambdaARN to save the configuration.

* * @param body Enable AWS Log Services request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -644,126 +505,92 @@ public CompletableFuture enableAWSLogServicesAsync(AWSLogsServicesReques * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse enableAWSLogServicesWithHttpInfo(AWSLogsServicesRequest body) - throws ApiException { + public ApiResponse enableAWSLogServicesWithHttpInfo(AWSLogsServicesRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling enableAWSLogServices"); + throw new ApiException(400, "Missing the required parameter 'body' when calling enableAWSLogServices"); } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/services"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.enableAWSLogServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.enableAWSLogServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Enable an AWS Logs integration. * - *

See {@link #enableAWSLogServicesWithHttpInfo}. + * See {@link #enableAWSLogServicesWithHttpInfo}. * * @param body Enable AWS Log Services request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> enableAWSLogServicesWithHttpInfoAsync( - AWSLogsServicesRequest body) { + public CompletableFuture> enableAWSLogServicesWithHttpInfoAsync(AWSLogsServicesRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling enableAWSLogServices")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling enableAWSLogServices")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/services"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.enableAWSLogServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.enableAWSLogServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List all AWS Logs integrations. - * - *

See {@link #listAWSLogsIntegrationsWithHttpInfo}. - * - * @return List<AWSLogsListResponse> - * @throws ApiException if fails to make API call - */ - public List listAWSLogsIntegrations() throws ApiException { + * List all AWS Logs integrations. + * + * See {@link #listAWSLogsIntegrationsWithHttpInfo}. + * + * @return List<AWSLogsListResponse> + * @throws ApiException if fails to make API call + */ + public List listAWSLogsIntegrations() throws ApiException { return listAWSLogsIntegrationsWithHttpInfo().getData(); } /** - * List all AWS Logs integrations. - * - *

See {@link #listAWSLogsIntegrationsWithHttpInfoAsync}. - * - * @return CompletableFuture<List<AWSLogsListResponse>> - */ - public CompletableFuture> listAWSLogsIntegrationsAsync() { - return listAWSLogsIntegrationsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List all AWS Logs integrations. + * + * See {@link #listAWSLogsIntegrationsWithHttpInfoAsync}. + * + * @return CompletableFuture<List<AWSLogsListResponse>> + */ + public CompletableFuture>listAWSLogsIntegrationsAsync() { + return listAWSLogsIntegrationsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all Datadog-AWS Logs integrations configured in your Datadog account. + *

List all Datadog-AWS Logs integrations configured in your Datadog account.

* * @return ApiResponse<List<AWSLogsListResponse>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -772,112 +599,79 @@ public CompletableFuture> listAWSLogsIntegrationsAsync * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse> listAWSLogsIntegrationsWithHttpInfo() - throws ApiException { + public ApiResponse> listAWSLogsIntegrationsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/integration/aws/logs"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.listAWSLogsIntegrations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.listAWSLogsIntegrations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * List all AWS Logs integrations. * - *

See {@link #listAWSLogsIntegrationsWithHttpInfo}. + * See {@link #listAWSLogsIntegrationsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<List<AWSLogsListResponse>>> */ - public CompletableFuture>> - listAWSLogsIntegrationsWithHttpInfoAsync() { + public CompletableFuture>> listAWSLogsIntegrationsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/integration/aws/logs"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.listAWSLogsIntegrations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.listAWSLogsIntegrations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Get list of AWS log ready services. - * - *

See {@link #listAWSLogsServicesWithHttpInfo}. - * - * @return List<AWSLogsListServicesResponse> - * @throws ApiException if fails to make API call - */ - public List listAWSLogsServices() throws ApiException { + * Get list of AWS log ready services. + * + * See {@link #listAWSLogsServicesWithHttpInfo}. + * + * @return List<AWSLogsListServicesResponse> + * @throws ApiException if fails to make API call + */ + public List listAWSLogsServices() throws ApiException { return listAWSLogsServicesWithHttpInfo().getData(); } /** - * Get list of AWS log ready services. - * - *

See {@link #listAWSLogsServicesWithHttpInfoAsync}. - * - * @return CompletableFuture<List<AWSLogsListServicesResponse>> - */ - public CompletableFuture> listAWSLogsServicesAsync() { - return listAWSLogsServicesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get list of AWS log ready services. + * + * See {@link #listAWSLogsServicesWithHttpInfoAsync}. + * + * @return CompletableFuture<List<AWSLogsListServicesResponse>> + */ + public CompletableFuture>listAWSLogsServicesAsync() { + return listAWSLogsServicesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of current AWS services that Datadog offers automatic log collection. Use returned - * service IDs with the services parameter for the Enable an AWS service log collection API - * endpoint. + *

Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint.

* * @return ApiResponse<List<AWSLogsListServicesResponse>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -885,74 +679,43 @@ public CompletableFuture> listAWSLogsServicesA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse> listAWSLogsServicesWithHttpInfo() - throws ApiException { + public ApiResponse> listAWSLogsServicesWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/services"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.listAWSLogsServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.listAWSLogsServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * Get list of AWS log ready services. * - *

See {@link #listAWSLogsServicesWithHttpInfo}. + * See {@link #listAWSLogsServicesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<List<AWSLogsListServicesResponse>>> */ - public CompletableFuture>> - listAWSLogsServicesWithHttpInfoAsync() { + public CompletableFuture>> listAWSLogsServicesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/integration/aws/logs/services"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AwsLogsIntegrationApi.listAWSLogsServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AwsLogsIntegrationApi.listAWSLogsServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture>> result = - new CompletableFuture<>(); + CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); - } -} + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/AzureIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/AzureIntegrationApi.java index 7ef1cae87f0..dcd87b550f8 100644 --- a/src/main/java/com/datadog/api/client/v1/api/AzureIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/AzureIntegrationApi.java @@ -1,23 +1,30 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.AzureAccount; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.AzureAccount; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AzureIntegrationApi { private ApiClient apiClient; - public AzureIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,51 +52,45 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an Azure integration. - * - *

See {@link #createAzureIntegrationWithHttpInfo}. - * - * @param body Create a Datadog-Azure integration for your Datadog account request body. - * (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object createAzureIntegration(AzureAccount body) throws ApiException { + * Create an Azure integration. + * + * See {@link #createAzureIntegrationWithHttpInfo}. + * + * @param body Create a Datadog-Azure integration for your Datadog account request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object createAzureIntegration(AzureAccount body) throws ApiException { return createAzureIntegrationWithHttpInfo(body).getData(); } /** - * Create an Azure integration. - * - *

See {@link #createAzureIntegrationWithHttpInfoAsync}. - * - * @param body Create a Datadog-Azure integration for your Datadog account request body. - * (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture createAzureIntegrationAsync(AzureAccount body) { - return createAzureIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an Azure integration. + * + * See {@link #createAzureIntegrationWithHttpInfoAsync}. + * + * @param body Create a Datadog-Azure integration for your Datadog account request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturecreateAzureIntegrationAsync(AzureAccount body) { + return createAzureIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Datadog-Azure integration. - * + *

Create a Datadog-Azure integration.

*

Using the POST method updates your integration configuration by adding your new - * configuration to the existing one in your Datadog organization. - * + * configuration to the existing one in your Datadog organization.

*

Using the PUT method updates your integration configuration by replacing your - * current configuration with the new one sent to your Datadog organization. + * current configuration with the new one sent to your Datadog organization.

* - * @param body Create a Datadog-Azure integration for your Datadog account request body. - * (required) + * @param body Create a Datadog-Azure integration for your Datadog account request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -98,130 +99,95 @@ public CompletableFuture createAzureIntegrationAsync(AzureAccount body) * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createAzureIntegrationWithHttpInfo(AzureAccount body) - throws ApiException { + public ApiResponse createAzureIntegrationWithHttpInfo(AzureAccount body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAzureIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAzureIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.createAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AzureIntegrationApi.createAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an Azure integration. * - *

See {@link #createAzureIntegrationWithHttpInfo}. + * See {@link #createAzureIntegrationWithHttpInfo}. * - * @param body Create a Datadog-Azure integration for your Datadog account request body. - * (required) + * @param body Create a Datadog-Azure integration for your Datadog account request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> createAzureIntegrationWithHttpInfoAsync( - AzureAccount body) { + public CompletableFuture> createAzureIntegrationWithHttpInfoAsync(AzureAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createAzureIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAzureIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.createAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AzureIntegrationApi.createAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an Azure integration. - * - *

See {@link #deleteAzureIntegrationWithHttpInfo}. - * - * @param body Delete a given Datadog-Azure integration request body. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object deleteAzureIntegration(AzureAccount body) throws ApiException { + * Delete an Azure integration. + * + * See {@link #deleteAzureIntegrationWithHttpInfo}. + * + * @param body Delete a given Datadog-Azure integration request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object deleteAzureIntegration(AzureAccount body) throws ApiException { return deleteAzureIntegrationWithHttpInfo(body).getData(); } /** - * Delete an Azure integration. - * - *

See {@link #deleteAzureIntegrationWithHttpInfoAsync}. - * - * @param body Delete a given Datadog-Azure integration request body. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture deleteAzureIntegrationAsync(AzureAccount body) { - return deleteAzureIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an Azure integration. + * + * See {@link #deleteAzureIntegrationWithHttpInfoAsync}. + * + * @param body Delete a given Datadog-Azure integration request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturedeleteAzureIntegrationAsync(AzureAccount body) { + return deleteAzureIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given Datadog-Azure integration from your Datadog account. + *

Delete a given Datadog-Azure integration from your Datadog account.

* * @param body Delete a given Datadog-Azure integration request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -230,126 +196,92 @@ public CompletableFuture deleteAzureIntegrationAsync(AzureAccount body) * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteAzureIntegrationWithHttpInfo(AzureAccount body) - throws ApiException { + public ApiResponse deleteAzureIntegrationWithHttpInfo(AzureAccount body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAzureIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteAzureIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.deleteAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AzureIntegrationApi.deleteAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete an Azure integration. * - *

See {@link #deleteAzureIntegrationWithHttpInfo}. + * See {@link #deleteAzureIntegrationWithHttpInfo}. * * @param body Delete a given Datadog-Azure integration request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> deleteAzureIntegrationWithHttpInfoAsync( - AzureAccount body) { + public CompletableFuture> deleteAzureIntegrationWithHttpInfoAsync(AzureAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteAzureIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteAzureIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.deleteAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AzureIntegrationApi.deleteAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List all Azure integrations. - * - *

See {@link #listAzureIntegrationWithHttpInfo}. - * - * @return List<AzureAccount> - * @throws ApiException if fails to make API call - */ - public List listAzureIntegration() throws ApiException { + * List all Azure integrations. + * + * See {@link #listAzureIntegrationWithHttpInfo}. + * + * @return List<AzureAccount> + * @throws ApiException if fails to make API call + */ + public List listAzureIntegration() throws ApiException { return listAzureIntegrationWithHttpInfo().getData(); } /** - * List all Azure integrations. - * - *

See {@link #listAzureIntegrationWithHttpInfoAsync}. - * - * @return CompletableFuture<List<AzureAccount>> - */ - public CompletableFuture> listAzureIntegrationAsync() { - return listAzureIntegrationWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List all Azure integrations. + * + * See {@link #listAzureIntegrationWithHttpInfoAsync}. + * + * @return CompletableFuture<List<AzureAccount>> + */ + public CompletableFuture>listAzureIntegrationAsync() { + return listAzureIntegrationWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all Datadog-Azure integrations configured in your Datadog account. + *

List all Datadog-Azure integrations configured in your Datadog account.

* * @return ApiResponse<List<AzureAccount>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -363,107 +295,77 @@ public ApiResponse> listAzureIntegrationWithHttpInfo() throws // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.listAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AzureIntegrationApi.listAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * List all Azure integrations. * - *

See {@link #listAzureIntegrationWithHttpInfo}. + * See {@link #listAzureIntegrationWithHttpInfo}. * * @return CompletableFuture<ApiResponse<List<AzureAccount>>> */ - public CompletableFuture>> - listAzureIntegrationWithHttpInfoAsync() { + public CompletableFuture>> listAzureIntegrationWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.listAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AzureIntegrationApi.listAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Update Azure integration host filters. - * - *

See {@link #updateAzureHostFiltersWithHttpInfo}. - * - * @param body Update a Datadog-Azure integration's host filters request body. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object updateAzureHostFilters(AzureAccount body) throws ApiException { + * Update Azure integration host filters. + * + * See {@link #updateAzureHostFiltersWithHttpInfo}. + * + * @param body Update a Datadog-Azure integration's host filters request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object updateAzureHostFilters(AzureAccount body) throws ApiException { return updateAzureHostFiltersWithHttpInfo(body).getData(); } /** - * Update Azure integration host filters. - * - *

See {@link #updateAzureHostFiltersWithHttpInfoAsync}. - * - * @param body Update a Datadog-Azure integration's host filters request body. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture updateAzureHostFiltersAsync(AzureAccount body) { - return updateAzureHostFiltersWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Azure integration host filters. + * + * See {@link #updateAzureHostFiltersWithHttpInfoAsync}. + * + * @param body Update a Datadog-Azure integration's host filters request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFutureupdateAzureHostFiltersAsync(AzureAccount body) { + return updateAzureHostFiltersWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the defined list of host filters for a given Datadog-Azure integration. + *

Update the defined list of host filters for a given Datadog-Azure integration.

* * @param body Update a Datadog-Azure integration's host filters request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - *

Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -472,132 +374,97 @@ public CompletableFuture updateAzureHostFiltersAsync(AzureAccount body) * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAzureHostFiltersWithHttpInfo(AzureAccount body) - throws ApiException { + public ApiResponse updateAzureHostFiltersWithHttpInfo(AzureAccount body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAzureHostFilters"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAzureHostFilters"); } // create path and map variables String localVarPath = "/api/v1/integration/azure/host_filters"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.updateAzureHostFilters", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AzureIntegrationApi.updateAzureHostFilters", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Azure integration host filters. * - *

See {@link #updateAzureHostFiltersWithHttpInfo}. + * See {@link #updateAzureHostFiltersWithHttpInfo}. * * @param body Update a Datadog-Azure integration's host filters request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> updateAzureHostFiltersWithHttpInfoAsync( - AzureAccount body) { + public CompletableFuture> updateAzureHostFiltersWithHttpInfoAsync(AzureAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateAzureHostFilters")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAzureHostFilters")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/azure/host_filters"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.updateAzureHostFilters", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AzureIntegrationApi.updateAzureHostFilters", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an Azure integration. - * - *

See {@link #updateAzureIntegrationWithHttpInfo}. - * - * @param body Update a Datadog-Azure integration request body. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object updateAzureIntegration(AzureAccount body) throws ApiException { + * Update an Azure integration. + * + * See {@link #updateAzureIntegrationWithHttpInfo}. + * + * @param body Update a Datadog-Azure integration request body. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object updateAzureIntegration(AzureAccount body) throws ApiException { return updateAzureIntegrationWithHttpInfo(body).getData(); } /** - * Update an Azure integration. - * - *

See {@link #updateAzureIntegrationWithHttpInfoAsync}. - * - * @param body Update a Datadog-Azure integration request body. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture updateAzureIntegrationAsync(AzureAccount body) { - return updateAzureIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an Azure integration. + * + * See {@link #updateAzureIntegrationWithHttpInfoAsync}. + * + * @param body Update a Datadog-Azure integration request body. (required) + * @return CompletableFuture<Object> + */ + public CompletableFutureupdateAzureIntegrationAsync(AzureAccount body) { + return updateAzureIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Datadog-Azure integration. Requires an existing tenant_name and - * client_id. Any other fields supplied will overwrite existing values. To overwrite - * tenant_name or client_id, use new_tenant_name and - * new_client_id. To leave a field unchanged, do not supply that field in the payload. + *

Update a Datadog-Azure integration. Requires an existing tenant_name and client_id. + * Any other fields supplied will overwrite existing values. To overwrite tenant_name or client_id, + * use new_tenant_name and new_client_id. To leave a field unchanged, do not supply that field in the payload.

* * @param body Update a Datadog-Azure integration request body. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -606,89 +473,56 @@ public CompletableFuture updateAzureIntegrationAsync(AzureAccount body) * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAzureIntegrationWithHttpInfo(AzureAccount body) - throws ApiException { + public ApiResponse updateAzureIntegrationWithHttpInfo(AzureAccount body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAzureIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAzureIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.updateAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.AzureIntegrationApi.updateAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an Azure integration. * - *

See {@link #updateAzureIntegrationWithHttpInfo}. + * See {@link #updateAzureIntegrationWithHttpInfo}. * * @param body Update a Datadog-Azure integration request body. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> updateAzureIntegrationWithHttpInfoAsync( - AzureAccount body) { + public CompletableFuture> updateAzureIntegrationWithHttpInfoAsync(AzureAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateAzureIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAzureIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/azure"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.AzureIntegrationApi.updateAzureIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.AzureIntegrationApi.updateAzureIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/DashboardListsApi.java b/src/main/java/com/datadog/api/client/v1/api/DashboardListsApi.java index 1c5fb782e5f..9c63139a059 100644 --- a/src/main/java/com/datadog/api/client/v1/api/DashboardListsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/DashboardListsApi.java @@ -1,24 +1,32 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.DashboardList; -import com.datadog.api.client.v1.model.DashboardListDeleteResponse; -import com.datadog.api.client.v1.model.DashboardListListResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.DashboardListListResponse; +import com.datadog.api.client.v1.model.DashboardList; +import com.datadog.api.client.v1.model.DashboardListDeleteResponse; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListsApi { private ApiClient apiClient; - public DashboardListsApi() { this(ApiClient.getDefaultApiClient()); } @@ -46,42 +54,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a dashboard list. - * - *

See {@link #createDashboardListWithHttpInfo}. - * - * @param body Create a dashboard list request body. (required) - * @return DashboardList - * @throws ApiException if fails to make API call - */ - public DashboardList createDashboardList(DashboardList body) throws ApiException { + * Create a dashboard list. + * + * See {@link #createDashboardListWithHttpInfo}. + * + * @param body Create a dashboard list request body. (required) + * @return DashboardList + * @throws ApiException if fails to make API call + */ + public DashboardList createDashboardList(DashboardList body) throws ApiException { return createDashboardListWithHttpInfo(body).getData(); } /** - * Create a dashboard list. - * - *

See {@link #createDashboardListWithHttpInfoAsync}. - * - * @param body Create a dashboard list request body. (required) - * @return CompletableFuture<DashboardList> - */ - public CompletableFuture createDashboardListAsync(DashboardList body) { - return createDashboardListWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a dashboard list. + * + * See {@link #createDashboardListWithHttpInfoAsync}. + * + * @param body Create a dashboard list request body. (required) + * @return CompletableFuture<DashboardList> + */ + public CompletableFuturecreateDashboardListAsync(DashboardList body) { + return createDashboardListWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an empty dashboard list. + *

Create an empty dashboard list.

* * @param body Create a dashboard list request body. (required) * @return ApiResponse<DashboardList> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -90,129 +97,95 @@ public CompletableFuture createDashboardListAsync(DashboardList b * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createDashboardListWithHttpInfo(DashboardList body) - throws ApiException { + public ApiResponse createDashboardListWithHttpInfo(DashboardList body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createDashboardList"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createDashboardList"); } // create path and map variables String localVarPath = "/api/v1/dashboard/lists/manual"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardListsApi.createDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardListsApi.createDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a dashboard list. * - *

See {@link #createDashboardListWithHttpInfo}. + * See {@link #createDashboardListWithHttpInfo}. * * @param body Create a dashboard list request body. (required) * @return CompletableFuture<ApiResponse<DashboardList>> */ - public CompletableFuture> createDashboardListWithHttpInfoAsync( - DashboardList body) { + public CompletableFuture> createDashboardListWithHttpInfoAsync(DashboardList body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createDashboardList")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createDashboardList")); + return result; } // create path and map variables String localVarPath = "/api/v1/dashboard/lists/manual"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardListsApi.createDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardListsApi.createDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a dashboard list. - * - *

See {@link #deleteDashboardListWithHttpInfo}. - * - * @param listId ID of the dashboard list to delete. (required) - * @return DashboardListDeleteResponse - * @throws ApiException if fails to make API call - */ - public DashboardListDeleteResponse deleteDashboardList(Long listId) throws ApiException { + * Delete a dashboard list. + * + * See {@link #deleteDashboardListWithHttpInfo}. + * + * @param listId ID of the dashboard list to delete. (required) + * @return DashboardListDeleteResponse + * @throws ApiException if fails to make API call + */ + public DashboardListDeleteResponse deleteDashboardList(Long listId) throws ApiException { return deleteDashboardListWithHttpInfo(listId).getData(); } /** - * Delete a dashboard list. - * - *

See {@link #deleteDashboardListWithHttpInfoAsync}. - * - * @param listId ID of the dashboard list to delete. (required) - * @return CompletableFuture<DashboardListDeleteResponse> - */ - public CompletableFuture deleteDashboardListAsync(Long listId) { - return deleteDashboardListWithHttpInfoAsync(listId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a dashboard list. + * + * See {@link #deleteDashboardListWithHttpInfoAsync}. + * + * @param listId ID of the dashboard list to delete. (required) + * @return CompletableFuture<DashboardListDeleteResponse> + */ + public CompletableFuturedeleteDashboardListAsync(Long listId) { + return deleteDashboardListWithHttpInfoAsync(listId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a dashboard list. + *

Delete a dashboard list.

* * @param listId ID of the dashboard list to delete. (required) * @return ApiResponse<DashboardListDeleteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -221,135 +194,97 @@ public CompletableFuture deleteDashboardListAsync(L * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteDashboardListWithHttpInfo(Long listId) - throws ApiException { + public ApiResponse deleteDashboardListWithHttpInfo(Long listId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'listId' is set if (listId == null) { - throw new ApiException( - 400, "Missing the required parameter 'listId' when calling deleteDashboardList"); + throw new ApiException(400, "Missing the required parameter 'listId' when calling deleteDashboardList"); } // create path and map variables - String localVarPath = - "/api/v1/dashboard/lists/manual/{list_id}" - .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + String localVarPath = "/api/v1/dashboard/lists/manual/{list_id}" + .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardListsApi.deleteDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardListsApi.deleteDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete a dashboard list. * - *

See {@link #deleteDashboardListWithHttpInfo}. + * See {@link #deleteDashboardListWithHttpInfo}. * * @param listId ID of the dashboard list to delete. (required) * @return CompletableFuture<ApiResponse<DashboardListDeleteResponse>> */ - public CompletableFuture> - deleteDashboardListWithHttpInfoAsync(Long listId) { + public CompletableFuture> deleteDashboardListWithHttpInfoAsync(Long listId) { Object localVarPostBody = null; // verify the required parameter 'listId' is set if (listId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'listId' when calling deleteDashboardList")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'listId' when calling deleteDashboardList")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/dashboard/lists/manual/{list_id}" - .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + String localVarPath = "/api/v1/dashboard/lists/manual/{list_id}" + .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardListsApi.deleteDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardListsApi.deleteDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a dashboard list. - * - *

See {@link #getDashboardListWithHttpInfo}. - * - * @param listId ID of the dashboard list to fetch. (required) - * @return DashboardList - * @throws ApiException if fails to make API call - */ - public DashboardList getDashboardList(Long listId) throws ApiException { + * Get a dashboard list. + * + * See {@link #getDashboardListWithHttpInfo}. + * + * @param listId ID of the dashboard list to fetch. (required) + * @return DashboardList + * @throws ApiException if fails to make API call + */ + public DashboardList getDashboardList(Long listId) throws ApiException { return getDashboardListWithHttpInfo(listId).getData(); } /** - * Get a dashboard list. - * - *

See {@link #getDashboardListWithHttpInfoAsync}. - * - * @param listId ID of the dashboard list to fetch. (required) - * @return CompletableFuture<DashboardList> - */ - public CompletableFuture getDashboardListAsync(Long listId) { - return getDashboardListWithHttpInfoAsync(listId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a dashboard list. + * + * See {@link #getDashboardListWithHttpInfoAsync}. + * + * @param listId ID of the dashboard list to fetch. (required) + * @return CompletableFuture<DashboardList> + */ + public CompletableFuturegetDashboardListAsync(Long listId) { + return getDashboardListWithHttpInfoAsync(listId).thenApply(response -> { + return response.getData(); + }); } + /** - * Fetch an existing dashboard list's definition. + *

Fetch an existing dashboard list's definition.

* * @param listId ID of the dashboard list to fetch. (required) * @return ApiResponse<DashboardList> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -363,124 +298,89 @@ public ApiResponse getDashboardListWithHttpInfo(Long listId) thro // verify the required parameter 'listId' is set if (listId == null) { - throw new ApiException( - 400, "Missing the required parameter 'listId' when calling getDashboardList"); + throw new ApiException(400, "Missing the required parameter 'listId' when calling getDashboardList"); } // create path and map variables - String localVarPath = - "/api/v1/dashboard/lists/manual/{list_id}" - .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + String localVarPath = "/api/v1/dashboard/lists/manual/{list_id}" + .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardListsApi.getDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardListsApi.getDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a dashboard list. * - *

See {@link #getDashboardListWithHttpInfo}. + * See {@link #getDashboardListWithHttpInfo}. * * @param listId ID of the dashboard list to fetch. (required) * @return CompletableFuture<ApiResponse<DashboardList>> */ - public CompletableFuture> getDashboardListWithHttpInfoAsync( - Long listId) { + public CompletableFuture> getDashboardListWithHttpInfoAsync(Long listId) { Object localVarPostBody = null; // verify the required parameter 'listId' is set if (listId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'listId' when calling getDashboardList")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'listId' when calling getDashboardList")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/dashboard/lists/manual/{list_id}" - .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + String localVarPath = "/api/v1/dashboard/lists/manual/{list_id}" + .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardListsApi.getDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardListsApi.getDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all dashboard lists. - * - *

See {@link #listDashboardListsWithHttpInfo}. - * - * @return DashboardListListResponse - * @throws ApiException if fails to make API call - */ - public DashboardListListResponse listDashboardLists() throws ApiException { + * Get all dashboard lists. + * + * See {@link #listDashboardListsWithHttpInfo}. + * + * @return DashboardListListResponse + * @throws ApiException if fails to make API call + */ + public DashboardListListResponse listDashboardLists() throws ApiException { return listDashboardListsWithHttpInfo().getData(); } /** - * Get all dashboard lists. - * - *

See {@link #listDashboardListsWithHttpInfoAsync}. - * - * @return CompletableFuture<DashboardListListResponse> - */ - public CompletableFuture listDashboardListsAsync() { - return listDashboardListsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all dashboard lists. + * + * See {@link #listDashboardListsWithHttpInfoAsync}. + * + * @return CompletableFuture<DashboardListListResponse> + */ + public CompletableFuturelistDashboardListsAsync() { + return listDashboardListsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Fetch all of your existing dashboard list definitions. + *

Fetch all of your existing dashboard list definitions.

* * @return ApiResponse<DashboardListListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -488,117 +388,85 @@ public CompletableFuture listDashboardListsAsync() { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listDashboardListsWithHttpInfo() - throws ApiException { + public ApiResponse listDashboardListsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/dashboard/lists/manual"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardListsApi.listDashboardLists", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardListsApi.listDashboardLists", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all dashboard lists. * - *

See {@link #listDashboardListsWithHttpInfo}. + * See {@link #listDashboardListsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<DashboardListListResponse>> */ - public CompletableFuture> - listDashboardListsWithHttpInfoAsync() { + public CompletableFuture> listDashboardListsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/dashboard/lists/manual"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardListsApi.listDashboardLists", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardListsApi.listDashboardLists", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a dashboard list. - * - *

See {@link #updateDashboardListWithHttpInfo}. - * - * @param listId ID of the dashboard list to update. (required) - * @param body Update a dashboard list request body. (required) - * @return DashboardList - * @throws ApiException if fails to make API call - */ - public DashboardList updateDashboardList(Long listId, DashboardList body) throws ApiException { + * Update a dashboard list. + * + * See {@link #updateDashboardListWithHttpInfo}. + * + * @param listId ID of the dashboard list to update. (required) + * @param body Update a dashboard list request body. (required) + * @return DashboardList + * @throws ApiException if fails to make API call + */ + public DashboardList updateDashboardList(Long listId, DashboardList body) throws ApiException { return updateDashboardListWithHttpInfo(listId, body).getData(); } /** - * Update a dashboard list. - * - *

See {@link #updateDashboardListWithHttpInfoAsync}. - * - * @param listId ID of the dashboard list to update. (required) - * @param body Update a dashboard list request body. (required) - * @return CompletableFuture<DashboardList> - */ - public CompletableFuture updateDashboardListAsync( - Long listId, DashboardList body) { - return updateDashboardListWithHttpInfoAsync(listId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a dashboard list. + * + * See {@link #updateDashboardListWithHttpInfoAsync}. + * + * @param listId ID of the dashboard list to update. (required) + * @param body Update a dashboard list request body. (required) + * @return CompletableFuture<DashboardList> + */ + public CompletableFutureupdateDashboardListAsync(Long listId, DashboardList body) { + return updateDashboardListWithHttpInfoAsync(listId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the name of a dashboard list. + *

Update the name of a dashboard list.

* * @param listId ID of the dashboard list to update. (required) * @param body Update a dashboard list request body. (required) * @return ApiResponse<DashboardList> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -608,109 +476,71 @@ public CompletableFuture updateDashboardListAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateDashboardListWithHttpInfo(Long listId, DashboardList body) - throws ApiException { + public ApiResponse updateDashboardListWithHttpInfo(Long listId, DashboardList body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'listId' is set if (listId == null) { - throw new ApiException( - 400, "Missing the required parameter 'listId' when calling updateDashboardList"); + throw new ApiException(400, "Missing the required parameter 'listId' when calling updateDashboardList"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateDashboardList"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateDashboardList"); } // create path and map variables - String localVarPath = - "/api/v1/dashboard/lists/manual/{list_id}" - .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + String localVarPath = "/api/v1/dashboard/lists/manual/{list_id}" + .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardListsApi.updateDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardListsApi.updateDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a dashboard list. * - *

See {@link #updateDashboardListWithHttpInfo}. + * See {@link #updateDashboardListWithHttpInfo}. * * @param listId ID of the dashboard list to update. (required) * @param body Update a dashboard list request body. (required) * @return CompletableFuture<ApiResponse<DashboardList>> */ - public CompletableFuture> updateDashboardListWithHttpInfoAsync( - Long listId, DashboardList body) { + public CompletableFuture> updateDashboardListWithHttpInfoAsync(Long listId, DashboardList body) { Object localVarPostBody = body; // verify the required parameter 'listId' is set if (listId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'listId' when calling updateDashboardList")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'listId' when calling updateDashboardList")); + 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 updateDashboardList")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateDashboardList")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/dashboard/lists/manual/{list_id}" - .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + String localVarPath = "/api/v1/dashboard/lists/manual/{list_id}" + .replaceAll("\\{" + "list_id" + "\\}", apiClient.escapeString(listId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardListsApi.updateDashboardList", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardListsApi.updateDashboardList", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/DashboardsApi.java b/src/main/java/com/datadog/api/client/v1/api/DashboardsApi.java index 5d9ee96867c..8b8e7022eba 100644 --- a/src/main/java/com/datadog/api/client/v1/api/DashboardsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/DashboardsApi.java @@ -1,27 +1,34 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.Dashboard; -import com.datadog.api.client.v1.model.DashboardBulkDeleteRequest; -import com.datadog.api.client.v1.model.DashboardDeleteResponse; -import com.datadog.api.client.v1.model.DashboardRestoreRequest; -import com.datadog.api.client.v1.model.DashboardSummary; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.DashboardBulkDeleteRequest; +import com.datadog.api.client.v1.model.DashboardSummary; +import com.datadog.api.client.v1.model.DashboardRestoreRequest; +import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.DashboardDeleteResponse; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardsApi { private ApiClient apiClient; - public DashboardsApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,46 +56,42 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a new dashboard. - * - *

See {@link #createDashboardWithHttpInfo}. - * - * @param body Create a dashboard request body. (required) - * @return Dashboard - * @throws ApiException if fails to make API call - */ - public Dashboard createDashboard(Dashboard body) throws ApiException { + * Create a new dashboard. + * + * See {@link #createDashboardWithHttpInfo}. + * + * @param body Create a dashboard request body. (required) + * @return Dashboard + * @throws ApiException if fails to make API call + */ + public Dashboard createDashboard(Dashboard body) throws ApiException { return createDashboardWithHttpInfo(body).getData(); } /** - * Create a new dashboard. - * - *

See {@link #createDashboardWithHttpInfoAsync}. - * - * @param body Create a dashboard request body. (required) - * @return CompletableFuture<Dashboard> - */ - public CompletableFuture createDashboardAsync(Dashboard body) { - return createDashboardWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new dashboard. + * + * See {@link #createDashboardWithHttpInfoAsync}. + * + * @param body Create a dashboard request body. (required) + * @return CompletableFuture<Dashboard> + */ + public CompletableFuturecreateDashboardAsync(Dashboard body) { + return createDashboardWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a dashboard using the specified options. When defining queries in your widgets, take - * note of which queries should have the as_count() or as_rate() - * modifiers appended. Refer to the following documentation - * for more information on these modifiers. + *

Create a dashboard using the specified options. When defining queries in your widgets, take note of which queries should have the as_count() or as_rate() modifiers appended. + * Refer to the following documentation for more information on these modifiers.

* * @param body Create a dashboard request body. (required) * @return ApiResponse<Dashboard> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -102,123 +105,90 @@ public ApiResponse createDashboardWithHttpInfo(Dashboard body) throws // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createDashboard"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createDashboard"); } // create path and map variables String localVarPath = "/api/v1/dashboard"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.createDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.createDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new dashboard. * - *

See {@link #createDashboardWithHttpInfo}. + * See {@link #createDashboardWithHttpInfo}. * * @param body Create a dashboard request body. (required) * @return CompletableFuture<ApiResponse<Dashboard>> */ - public CompletableFuture> createDashboardWithHttpInfoAsync( - Dashboard body) { + public CompletableFuture> createDashboardWithHttpInfoAsync(Dashboard body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createDashboard")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createDashboard")); + return result; } // create path and map variables String localVarPath = "/api/v1/dashboard"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.createDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.createDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a dashboard. - * - *

See {@link #deleteDashboardWithHttpInfo}. - * - * @param dashboardId The ID of the dashboard. (required) - * @return DashboardDeleteResponse - * @throws ApiException if fails to make API call - */ - public DashboardDeleteResponse deleteDashboard(String dashboardId) throws ApiException { + * Delete a dashboard. + * + * See {@link #deleteDashboardWithHttpInfo}. + * + * @param dashboardId The ID of the dashboard. (required) + * @return DashboardDeleteResponse + * @throws ApiException if fails to make API call + */ + public DashboardDeleteResponse deleteDashboard(String dashboardId) throws ApiException { return deleteDashboardWithHttpInfo(dashboardId).getData(); } /** - * Delete a dashboard. - * - *

See {@link #deleteDashboardWithHttpInfoAsync}. - * - * @param dashboardId The ID of the dashboard. (required) - * @return CompletableFuture<DashboardDeleteResponse> - */ - public CompletableFuture deleteDashboardAsync(String dashboardId) { - return deleteDashboardWithHttpInfoAsync(dashboardId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a dashboard. + * + * See {@link #deleteDashboardWithHttpInfoAsync}. + * + * @param dashboardId The ID of the dashboard. (required) + * @return CompletableFuture<DashboardDeleteResponse> + */ + public CompletableFuturedeleteDashboardAsync(String dashboardId) { + return deleteDashboardWithHttpInfoAsync(dashboardId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a dashboard using the specified ID. + *

Delete a dashboard using the specified ID.

* * @param dashboardId The ID of the dashboard. (required) * @return ApiResponse<DashboardDeleteResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -227,135 +197,96 @@ public CompletableFuture deleteDashboardAsync(String da * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteDashboardWithHttpInfo(String dashboardId) - throws ApiException { + public ApiResponse deleteDashboardWithHttpInfo(String dashboardId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'dashboardId' is set if (dashboardId == null) { - throw new ApiException( - 400, "Missing the required parameter 'dashboardId' when calling deleteDashboard"); + throw new ApiException(400, "Missing the required parameter 'dashboardId' when calling deleteDashboard"); } // create path and map variables - String localVarPath = - "/api/v1/dashboard/{dashboard_id}" - .replaceAll( - "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + String localVarPath = "/api/v1/dashboard/{dashboard_id}" + .replaceAll("\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.deleteDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.deleteDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete a dashboard. * - *

See {@link #deleteDashboardWithHttpInfo}. + * See {@link #deleteDashboardWithHttpInfo}. * * @param dashboardId The ID of the dashboard. (required) * @return CompletableFuture<ApiResponse<DashboardDeleteResponse>> */ - public CompletableFuture> deleteDashboardWithHttpInfoAsync( - String dashboardId) { + public CompletableFuture> deleteDashboardWithHttpInfoAsync(String dashboardId) { Object localVarPostBody = null; // verify the required parameter 'dashboardId' is set if (dashboardId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'dashboardId' when calling deleteDashboard")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardId' when calling deleteDashboard")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/dashboard/{dashboard_id}" - .replaceAll( - "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + String localVarPath = "/api/v1/dashboard/{dashboard_id}" + .replaceAll("\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.deleteDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.deleteDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete dashboards. - * - *

See {@link #deleteDashboardsWithHttpInfo}. - * - * @param body Delete dashboards request body. (required) - * @throws ApiException if fails to make API call - */ - public void deleteDashboards(DashboardBulkDeleteRequest body) throws ApiException { + * Delete dashboards. + * + * See {@link #deleteDashboardsWithHttpInfo}. + * + * @param body Delete dashboards request body. (required) + * @throws ApiException if fails to make API call + */ + public void deleteDashboards(DashboardBulkDeleteRequest body) throws ApiException { deleteDashboardsWithHttpInfo(body); } /** - * Delete dashboards. - * - *

See {@link #deleteDashboardsWithHttpInfoAsync}. - * - * @param body Delete dashboards request body. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteDashboardsAsync(DashboardBulkDeleteRequest body) { - return deleteDashboardsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete dashboards. + * + * See {@link #deleteDashboardsWithHttpInfoAsync}. + * + * @param body Delete dashboards request body. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteDashboardsAsync(DashboardBulkDeleteRequest body) { + return deleteDashboardsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete dashboards using the specified IDs. If there are any failures, no dashboards will be - * deleted (partial success is not allowed). + *

Delete dashboards using the specified IDs. If there are any failures, no dashboards will be deleted (partial success is not allowed).

* * @param body Delete dashboards request body. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -365,129 +296,95 @@ public CompletableFuture deleteDashboardsAsync(DashboardBulkDeleteRequest * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
*/ - public ApiResponse deleteDashboardsWithHttpInfo(DashboardBulkDeleteRequest body) - throws ApiException { + public ApiResponse deleteDashboardsWithHttpInfo(DashboardBulkDeleteRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteDashboards"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteDashboards"); } // create path and map variables String localVarPath = "/api/v1/dashboard"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.deleteDashboards", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.deleteDashboards", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** * Delete dashboards. * - *

See {@link #deleteDashboardsWithHttpInfo}. + * See {@link #deleteDashboardsWithHttpInfo}. * * @param body Delete dashboards request body. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteDashboardsWithHttpInfoAsync( - DashboardBulkDeleteRequest body) { + public CompletableFuture> deleteDashboardsWithHttpInfoAsync(DashboardBulkDeleteRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteDashboards")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteDashboards")); + return result; } // create path and map variables String localVarPath = "/api/v1/dashboard"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.deleteDashboards", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.deleteDashboards", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** - * Get a dashboard. - * - *

See {@link #getDashboardWithHttpInfo}. - * - * @param dashboardId The ID of the dashboard. (required) - * @return Dashboard - * @throws ApiException if fails to make API call - */ - public Dashboard getDashboard(String dashboardId) throws ApiException { + * Get a dashboard. + * + * See {@link #getDashboardWithHttpInfo}. + * + * @param dashboardId The ID of the dashboard. (required) + * @return Dashboard + * @throws ApiException if fails to make API call + */ + public Dashboard getDashboard(String dashboardId) throws ApiException { return getDashboardWithHttpInfo(dashboardId).getData(); } /** - * Get a dashboard. - * - *

See {@link #getDashboardWithHttpInfoAsync}. - * - * @param dashboardId The ID of the dashboard. (required) - * @return CompletableFuture<Dashboard> - */ - public CompletableFuture getDashboardAsync(String dashboardId) { - return getDashboardWithHttpInfoAsync(dashboardId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a dashboard. + * + * See {@link #getDashboardWithHttpInfoAsync}. + * + * @param dashboardId The ID of the dashboard. (required) + * @return CompletableFuture<Dashboard> + */ + public CompletableFuturegetDashboardAsync(String dashboardId) { + return getDashboardWithHttpInfoAsync(dashboardId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a dashboard using the specified ID. + *

Get a dashboard using the specified ID.

* * @param dashboardId The ID of the dashboard. (required) * @return ApiResponse<Dashboard> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -501,102 +398,66 @@ public ApiResponse getDashboardWithHttpInfo(String dashboardId) throw // verify the required parameter 'dashboardId' is set if (dashboardId == null) { - throw new ApiException( - 400, "Missing the required parameter 'dashboardId' when calling getDashboard"); + throw new ApiException(400, "Missing the required parameter 'dashboardId' when calling getDashboard"); } // create path and map variables - String localVarPath = - "/api/v1/dashboard/{dashboard_id}" - .replaceAll( - "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + String localVarPath = "/api/v1/dashboard/{dashboard_id}" + .replaceAll("\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.getDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.getDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a dashboard. * - *

See {@link #getDashboardWithHttpInfo}. + * See {@link #getDashboardWithHttpInfo}. * * @param dashboardId The ID of the dashboard. (required) * @return CompletableFuture<ApiResponse<Dashboard>> */ - public CompletableFuture> getDashboardWithHttpInfoAsync( - String dashboardId) { + public CompletableFuture> getDashboardWithHttpInfoAsync(String dashboardId) { Object localVarPostBody = null; // verify the required parameter 'dashboardId' is set if (dashboardId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'dashboardId' when calling getDashboard")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardId' when calling getDashboard")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/dashboard/{dashboard_id}" - .replaceAll( - "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + String localVarPath = "/api/v1/dashboard/{dashboard_id}" + .replaceAll("\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.getDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.getDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listDashboards. */ + /** + * Manage optional parameters to listDashboards. + */ public static class ListDashboardsOptionalParameters { private Boolean filterShared; private Boolean filterDeleted; /** * Set filterShared. - * - * @param filterShared When true, this query only returns shared custom created or - * cloned dashboards. (optional) + * @param filterShared When true, this query only returns shared custom created or cloned dashboards. (optional) * @return ListDashboardsOptionalParameters */ public ListDashboardsOptionalParameters filterShared(Boolean filterShared) { @@ -606,10 +467,7 @@ public ListDashboardsOptionalParameters filterShared(Boolean filterShared) { /** * Set filterDeleted. - * - * @param filterDeleted When true, this query returns only deleted custom-created - * or cloned dashboards. This parameter is incompatible with filter[shared]. - * (optional) + * @param filterDeleted When true, this query returns only deleted custom-created or cloned dashboards. This parameter is incompatible with filter[shared]. (optional) * @return ListDashboardsOptionalParameters */ public ListDashboardsOptionalParameters filterDeleted(Boolean filterDeleted) { @@ -619,74 +477,68 @@ public ListDashboardsOptionalParameters filterDeleted(Boolean filterDeleted) { } /** - * Get all dashboards. - * - *

See {@link #listDashboardsWithHttpInfo}. - * - * @return DashboardSummary - * @throws ApiException if fails to make API call - */ - public DashboardSummary listDashboards() throws ApiException { + * Get all dashboards. + * + * See {@link #listDashboardsWithHttpInfo}. + * + * @return DashboardSummary + * @throws ApiException if fails to make API call + */ + public DashboardSummary listDashboards () throws ApiException { return listDashboardsWithHttpInfo(new ListDashboardsOptionalParameters()).getData(); } /** - * Get all dashboards. - * - *

See {@link #listDashboardsWithHttpInfoAsync}. - * - * @return CompletableFuture<DashboardSummary> - */ - public CompletableFuture listDashboardsAsync() { - return listDashboardsWithHttpInfoAsync(new ListDashboardsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all dashboards. + * + * See {@link #listDashboardsWithHttpInfoAsync}. + * + * @return CompletableFuture<DashboardSummary> + */ + public CompletableFuturelistDashboardsAsync() { + return listDashboardsWithHttpInfoAsync(new ListDashboardsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all dashboards. - * - *

See {@link #listDashboardsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return DashboardSummary - * @throws ApiException if fails to make API call - */ - public DashboardSummary listDashboards(ListDashboardsOptionalParameters parameters) - throws ApiException { + * Get all dashboards. + * + * See {@link #listDashboardsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return DashboardSummary + * @throws ApiException if fails to make API call + */ + public DashboardSummary listDashboards(ListDashboardsOptionalParameters parameters) throws ApiException { return listDashboardsWithHttpInfo(parameters).getData(); } /** - * Get all dashboards. - * - *

See {@link #listDashboardsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<DashboardSummary> - */ - public CompletableFuture listDashboardsAsync( - ListDashboardsOptionalParameters parameters) { - return listDashboardsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all dashboards. + * + * See {@link #listDashboardsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<DashboardSummary> + */ + public CompletableFuturelistDashboardsAsync(ListDashboardsOptionalParameters parameters) { + return listDashboardsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all dashboards. - * - *

Note: This query will only return custom created or cloned dashboards. This - * query will not return preset dashboards. + *

Get all dashboards.

+ *

Note: This query will only return custom created or cloned dashboards. + * This query will not return preset dashboards.

* * @param parameters Optional parameters for the request. * @return ApiResponse<DashboardSummary> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -694,56 +546,40 @@ public CompletableFuture listDashboardsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listDashboardsWithHttpInfo( - ListDashboardsOptionalParameters parameters) throws ApiException { + public ApiResponse listDashboardsWithHttpInfo(ListDashboardsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Boolean filterShared = parameters.filterShared; Boolean filterDeleted = parameters.filterDeleted; // create path and map variables String localVarPath = "/api/v1/dashboard"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[shared]", filterShared)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[deleted]", filterDeleted)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.listDashboards", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.listDashboards", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all dashboards. * - *

See {@link #listDashboardsWithHttpInfo}. + * See {@link #listDashboardsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<DashboardSummary>> */ - public CompletableFuture> listDashboardsWithHttpInfoAsync( - ListDashboardsOptionalParameters parameters) { + public CompletableFuture> listDashboardsWithHttpInfoAsync(ListDashboardsOptionalParameters parameters) { Object localVarPostBody = null; Boolean filterShared = parameters.filterShared; Boolean filterDeleted = parameters.filterDeleted; // create path and map variables String localVarPath = "/api/v1/dashboard"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -752,68 +588,50 @@ public CompletableFuture> listDashboardsWithHttpIn Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.listDashboards", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.listDashboards", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Restore deleted dashboards. - * - *

See {@link #restoreDashboardsWithHttpInfo}. - * - * @param body Restore dashboards request body. (required) - * @throws ApiException if fails to make API call - */ - public void restoreDashboards(DashboardRestoreRequest body) throws ApiException { + * Restore deleted dashboards. + * + * See {@link #restoreDashboardsWithHttpInfo}. + * + * @param body Restore dashboards request body. (required) + * @throws ApiException if fails to make API call + */ + public void restoreDashboards(DashboardRestoreRequest body) throws ApiException { restoreDashboardsWithHttpInfo(body); } /** - * Restore deleted dashboards. - * - *

See {@link #restoreDashboardsWithHttpInfoAsync}. - * - * @param body Restore dashboards request body. (required) - * @return CompletableFuture - */ - public CompletableFuture restoreDashboardsAsync(DashboardRestoreRequest body) { - return restoreDashboardsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Restore deleted dashboards. + * + * See {@link #restoreDashboardsWithHttpInfoAsync}. + * + * @param body Restore dashboards request body. (required) + * @return CompletableFuture + */ + public CompletableFuturerestoreDashboardsAsync(DashboardRestoreRequest body) { + return restoreDashboardsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Restore dashboards using the specified IDs. If there are any failures, no dashboards will be - * restored (partial success is not allowed). + *

Restore dashboards using the specified IDs. If there are any failures, no dashboards will be restored (partial success is not allowed).

* * @param body Restore dashboards request body. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -823,132 +641,98 @@ public CompletableFuture restoreDashboardsAsync(DashboardRestoreRequest bo * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
*/ - public ApiResponse restoreDashboardsWithHttpInfo(DashboardRestoreRequest body) - throws ApiException { + public ApiResponse restoreDashboardsWithHttpInfo(DashboardRestoreRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling restoreDashboards"); + throw new ApiException(400, "Missing the required parameter 'body' when calling restoreDashboards"); } // create path and map variables String localVarPath = "/api/v1/dashboard"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.restoreDashboards", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.restoreDashboards", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** * Restore deleted dashboards. * - *

See {@link #restoreDashboardsWithHttpInfo}. + * See {@link #restoreDashboardsWithHttpInfo}. * * @param body Restore dashboards request body. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> restoreDashboardsWithHttpInfoAsync( - DashboardRestoreRequest body) { + public CompletableFuture> restoreDashboardsWithHttpInfoAsync(DashboardRestoreRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling restoreDashboards")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling restoreDashboards")); + return result; } // create path and map variables String localVarPath = "/api/v1/dashboard"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.restoreDashboards", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.restoreDashboards", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** - * Update a dashboard. - * - *

See {@link #updateDashboardWithHttpInfo}. - * - * @param dashboardId The ID of the dashboard. (required) - * @param body Update Dashboard request body. (required) - * @return Dashboard - * @throws ApiException if fails to make API call - */ - public Dashboard updateDashboard(String dashboardId, Dashboard body) throws ApiException { + * Update a dashboard. + * + * See {@link #updateDashboardWithHttpInfo}. + * + * @param dashboardId The ID of the dashboard. (required) + * @param body Update Dashboard request body. (required) + * @return Dashboard + * @throws ApiException if fails to make API call + */ + public Dashboard updateDashboard(String dashboardId, Dashboard body) throws ApiException { return updateDashboardWithHttpInfo(dashboardId, body).getData(); } /** - * Update a dashboard. - * - *

See {@link #updateDashboardWithHttpInfoAsync}. - * - * @param dashboardId The ID of the dashboard. (required) - * @param body Update Dashboard request body. (required) - * @return CompletableFuture<Dashboard> - */ - public CompletableFuture updateDashboardAsync(String dashboardId, Dashboard body) { - return updateDashboardWithHttpInfoAsync(dashboardId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a dashboard. + * + * See {@link #updateDashboardWithHttpInfoAsync}. + * + * @param dashboardId The ID of the dashboard. (required) + * @param body Update Dashboard request body. (required) + * @return CompletableFuture<Dashboard> + */ + public CompletableFutureupdateDashboardAsync(String dashboardId, Dashboard body) { + return updateDashboardWithHttpInfoAsync(dashboardId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a dashboard using the specified ID. + *

Update a dashboard using the specified ID.

* * @param dashboardId The ID of the dashboard. (required) * @param body Update Dashboard request body. (required) * @return ApiResponse<Dashboard> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -958,111 +742,71 @@ public CompletableFuture updateDashboardAsync(String dashboardId, Das * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateDashboardWithHttpInfo(String dashboardId, Dashboard body) - throws ApiException { + public ApiResponse updateDashboardWithHttpInfo(String dashboardId, Dashboard body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'dashboardId' is set if (dashboardId == null) { - throw new ApiException( - 400, "Missing the required parameter 'dashboardId' when calling updateDashboard"); + throw new ApiException(400, "Missing the required parameter 'dashboardId' when calling updateDashboard"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateDashboard"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateDashboard"); } // create path and map variables - String localVarPath = - "/api/v1/dashboard/{dashboard_id}" - .replaceAll( - "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + String localVarPath = "/api/v1/dashboard/{dashboard_id}" + .replaceAll("\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DashboardsApi.updateDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DashboardsApi.updateDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a dashboard. * - *

See {@link #updateDashboardWithHttpInfo}. + * See {@link #updateDashboardWithHttpInfo}. * * @param dashboardId The ID of the dashboard. (required) * @param body Update Dashboard request body. (required) * @return CompletableFuture<ApiResponse<Dashboard>> */ - public CompletableFuture> updateDashboardWithHttpInfoAsync( - String dashboardId, Dashboard body) { + public CompletableFuture> updateDashboardWithHttpInfoAsync(String dashboardId, Dashboard body) { Object localVarPostBody = body; // verify the required parameter 'dashboardId' is set if (dashboardId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'dashboardId' when calling updateDashboard")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardId' when calling updateDashboard")); + 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 updateDashboard")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateDashboard")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/dashboard/{dashboard_id}" - .replaceAll( - "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + String localVarPath = "/api/v1/dashboard/{dashboard_id}" + .replaceAll("\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DashboardsApi.updateDashboard", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DashboardsApi.updateDashboard", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/DowntimesApi.java b/src/main/java/com/datadog/api/client/v1/api/DowntimesApi.java index 80f27ce5b57..69e8f539406 100644 --- a/src/main/java/com/datadog/api/client/v1/api/DowntimesApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/DowntimesApi.java @@ -1,25 +1,32 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.CancelDowntimesByScopeRequest; -import com.datadog.api.client.v1.model.CanceledDowntimesIds; -import com.datadog.api.client.v1.model.Downtime; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.Downtime; +import com.datadog.api.client.v1.model.CanceledDowntimesIds; +import com.datadog.api.client.v1.model.CancelDowntimesByScopeRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DowntimesApi { private ApiClient apiClient; - public DowntimesApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,41 +54,40 @@ public void setApiClient(ApiClient apiClient) { } /** - * Cancel a downtime. - * - *

See {@link #cancelDowntimeWithHttpInfo}. - * - * @param downtimeId ID of the downtime to cancel. (required) - * @throws ApiException if fails to make API call - */ - public void cancelDowntime(Long downtimeId) throws ApiException { + * Cancel a downtime. + * + * See {@link #cancelDowntimeWithHttpInfo}. + * + * @param downtimeId ID of the downtime to cancel. (required) + * @throws ApiException if fails to make API call + */ + public void cancelDowntime(Long downtimeId) throws ApiException { cancelDowntimeWithHttpInfo(downtimeId); } /** - * Cancel a downtime. - * - *

See {@link #cancelDowntimeWithHttpInfoAsync}. - * - * @param downtimeId ID of the downtime to cancel. (required) - * @return CompletableFuture - */ - public CompletableFuture cancelDowntimeAsync(Long downtimeId) { - return cancelDowntimeWithHttpInfoAsync(downtimeId) - .thenApply( - response -> { - return response.getData(); - }); + * Cancel a downtime. + * + * See {@link #cancelDowntimeWithHttpInfoAsync}. + * + * @param downtimeId ID of the downtime to cancel. (required) + * @return CompletableFuture + */ + public CompletableFuturecancelDowntimeAsync(Long downtimeId) { + return cancelDowntimeWithHttpInfoAsync(downtimeId).thenApply(response -> { + return response.getData(); + }); } + /** - * Cancel a downtime. + *

Cancel a downtime.

* * @param downtimeId ID of the downtime to cancel. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -95,41 +101,24 @@ public ApiResponse cancelDowntimeWithHttpInfo(Long downtimeId) throws ApiE // verify the required parameter 'downtimeId' is set if (downtimeId == null) { - throw new ApiException( - 400, "Missing the required parameter 'downtimeId' when calling cancelDowntime"); + throw new ApiException(400, "Missing the required parameter 'downtimeId' when calling cancelDowntime"); } // create path and map variables - String localVarPath = - "/api/v1/downtime/{downtime_id}" - .replaceAll( - "\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + String localVarPath = "/api/v1/downtime/{downtime_id}" + .replaceAll("\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.cancelDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.cancelDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Cancel a downtime. * - *

See {@link #cancelDowntimeWithHttpInfo}. + * See {@link #cancelDowntimeWithHttpInfo}. * * @param downtimeId ID of the downtime to cancel. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -139,86 +128,65 @@ public CompletableFuture> cancelDowntimeWithHttpInfoAsync(Long // verify the required parameter 'downtimeId' is set if (downtimeId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'downtimeId' when calling cancelDowntime")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'downtimeId' when calling cancelDowntime")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/downtime/{downtime_id}" - .replaceAll( - "\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + String localVarPath = "/api/v1/downtime/{downtime_id}" + .replaceAll("\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.cancelDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.cancelDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Cancel downtimes by scope. - * - *

See {@link #cancelDowntimesByScopeWithHttpInfo}. - * - * @param body Scope to cancel downtimes for. (required) - * @return CanceledDowntimesIds - * @throws ApiException if fails to make API call - */ - public CanceledDowntimesIds cancelDowntimesByScope(CancelDowntimesByScopeRequest body) - throws ApiException { + * Cancel downtimes by scope. + * + * See {@link #cancelDowntimesByScopeWithHttpInfo}. + * + * @param body Scope to cancel downtimes for. (required) + * @return CanceledDowntimesIds + * @throws ApiException if fails to make API call + */ + public CanceledDowntimesIds cancelDowntimesByScope(CancelDowntimesByScopeRequest body) throws ApiException { return cancelDowntimesByScopeWithHttpInfo(body).getData(); } /** - * Cancel downtimes by scope. - * - *

See {@link #cancelDowntimesByScopeWithHttpInfoAsync}. - * - * @param body Scope to cancel downtimes for. (required) - * @return CompletableFuture<CanceledDowntimesIds> - */ - public CompletableFuture cancelDowntimesByScopeAsync( - CancelDowntimesByScopeRequest body) { - return cancelDowntimesByScopeWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Cancel downtimes by scope. + * + * See {@link #cancelDowntimesByScopeWithHttpInfoAsync}. + * + * @param body Scope to cancel downtimes for. (required) + * @return CompletableFuture<CanceledDowntimesIds> + */ + public CompletableFuturecancelDowntimesByScopeAsync(CancelDowntimesByScopeRequest body) { + return cancelDowntimesByScopeWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete all downtimes that match the scope of X. + *

Delete all downtimes that match the scope of X.

* * @param body Scope to cancel downtimes for. (required) * @return ApiResponse<CanceledDowntimesIds> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -228,129 +196,95 @@ public CompletableFuture cancelDowntimesByScopeAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse cancelDowntimesByScopeWithHttpInfo( - CancelDowntimesByScopeRequest body) throws ApiException { + public ApiResponse cancelDowntimesByScopeWithHttpInfo(CancelDowntimesByScopeRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling cancelDowntimesByScope"); + throw new ApiException(400, "Missing the required parameter 'body' when calling cancelDowntimesByScope"); } // create path and map variables String localVarPath = "/api/v1/downtime/cancel/by_scope"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.cancelDowntimesByScope", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.cancelDowntimesByScope", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Cancel downtimes by scope. * - *

See {@link #cancelDowntimesByScopeWithHttpInfo}. + * See {@link #cancelDowntimesByScopeWithHttpInfo}. * * @param body Scope to cancel downtimes for. (required) * @return CompletableFuture<ApiResponse<CanceledDowntimesIds>> */ - public CompletableFuture> - cancelDowntimesByScopeWithHttpInfoAsync(CancelDowntimesByScopeRequest body) { + public CompletableFuture> cancelDowntimesByScopeWithHttpInfoAsync(CancelDowntimesByScopeRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling cancelDowntimesByScope")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling cancelDowntimesByScope")); + return result; } // create path and map variables String localVarPath = "/api/v1/downtime/cancel/by_scope"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.cancelDowntimesByScope", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.cancelDowntimesByScope", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Schedule a downtime. - * - *

See {@link #createDowntimeWithHttpInfo}. - * - * @param body Schedule a downtime request body. (required) - * @return Downtime - * @throws ApiException if fails to make API call - */ - public Downtime createDowntime(Downtime body) throws ApiException { + * Schedule a downtime. + * + * See {@link #createDowntimeWithHttpInfo}. + * + * @param body Schedule a downtime request body. (required) + * @return Downtime + * @throws ApiException if fails to make API call + */ + public Downtime createDowntime(Downtime body) throws ApiException { return createDowntimeWithHttpInfo(body).getData(); } /** - * Schedule a downtime. - * - *

See {@link #createDowntimeWithHttpInfoAsync}. - * - * @param body Schedule a downtime request body. (required) - * @return CompletableFuture<Downtime> - */ - public CompletableFuture createDowntimeAsync(Downtime body) { - return createDowntimeWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Schedule a downtime. + * + * See {@link #createDowntimeWithHttpInfoAsync}. + * + * @param body Schedule a downtime request body. (required) + * @return CompletableFuture<Downtime> + */ + public CompletableFuturecreateDowntimeAsync(Downtime body) { + return createDowntimeWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Schedule a downtime. + *

Schedule a downtime.

* * @param body Schedule a downtime request body. (required) * @return ApiResponse<Downtime> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -364,38 +298,23 @@ public ApiResponse createDowntimeWithHttpInfo(Downtime body) throws Ap // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createDowntime"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createDowntime"); } // create path and map variables String localVarPath = "/api/v1/downtime"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.createDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.createDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Schedule a downtime. * - *

See {@link #createDowntimeWithHttpInfo}. + * See {@link #createDowntimeWithHttpInfo}. * * @param body Schedule a downtime request body. (required) * @return CompletableFuture<ApiResponse<Downtime>> @@ -405,81 +324,64 @@ public CompletableFuture> createDowntimeWithHttpInfoAsync( // 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 createDowntime")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createDowntime")); + return result; } // create path and map variables String localVarPath = "/api/v1/downtime"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.createDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.createDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a downtime. - * - *

See {@link #getDowntimeWithHttpInfo}. - * - * @param downtimeId ID of the downtime to fetch. (required) - * @return Downtime - * @throws ApiException if fails to make API call - */ - public Downtime getDowntime(Long downtimeId) throws ApiException { + * Get a downtime. + * + * See {@link #getDowntimeWithHttpInfo}. + * + * @param downtimeId ID of the downtime to fetch. (required) + * @return Downtime + * @throws ApiException if fails to make API call + */ + public Downtime getDowntime(Long downtimeId) throws ApiException { return getDowntimeWithHttpInfo(downtimeId).getData(); } /** - * Get a downtime. - * - *

See {@link #getDowntimeWithHttpInfoAsync}. - * - * @param downtimeId ID of the downtime to fetch. (required) - * @return CompletableFuture<Downtime> - */ - public CompletableFuture getDowntimeAsync(Long downtimeId) { - return getDowntimeWithHttpInfoAsync(downtimeId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a downtime. + * + * See {@link #getDowntimeWithHttpInfoAsync}. + * + * @param downtimeId ID of the downtime to fetch. (required) + * @return CompletableFuture<Downtime> + */ + public CompletableFuturegetDowntimeAsync(Long downtimeId) { + return getDowntimeWithHttpInfoAsync(downtimeId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get downtime detail by downtime_id. + *

Get downtime detail by downtime_id.

* * @param downtimeId ID of the downtime to fetch. (required) * @return ApiResponse<Downtime> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -493,41 +395,24 @@ public ApiResponse getDowntimeWithHttpInfo(Long downtimeId) throws Api // verify the required parameter 'downtimeId' is set if (downtimeId == null) { - throw new ApiException( - 400, "Missing the required parameter 'downtimeId' when calling getDowntime"); + throw new ApiException(400, "Missing the required parameter 'downtimeId' when calling getDowntime"); } // create path and map variables - String localVarPath = - "/api/v1/downtime/{downtime_id}" - .replaceAll( - "\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + String localVarPath = "/api/v1/downtime/{downtime_id}" + .replaceAll("\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.getDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.getDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a downtime. * - *

See {@link #getDowntimeWithHttpInfo}. + * See {@link #getDowntimeWithHttpInfo}. * * @param downtimeId ID of the downtime to fetch. (required) * @return CompletableFuture<ApiResponse<Downtime>> @@ -537,54 +422,37 @@ public CompletableFuture> getDowntimeWithHttpInfoAsync(Lon // verify the required parameter 'downtimeId' is set if (downtimeId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'downtimeId' when calling getDowntime")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'downtimeId' when calling getDowntime")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/downtime/{downtime_id}" - .replaceAll( - "\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + String localVarPath = "/api/v1/downtime/{downtime_id}" + .replaceAll("\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.getDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.getDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listDowntimes. */ + /** + * Manage optional parameters to listDowntimes. + */ public static class ListDowntimesOptionalParameters { private Boolean currentOnly; /** * Set currentOnly. - * * @param currentOnly Only return downtimes that are active when the request is made. (optional) * @return ListDowntimesOptionalParameters */ @@ -595,71 +463,66 @@ public ListDowntimesOptionalParameters currentOnly(Boolean currentOnly) { } /** - * Get all downtimes. - * - *

See {@link #listDowntimesWithHttpInfo}. - * - * @return List<Downtime> - * @throws ApiException if fails to make API call - */ - public List listDowntimes() throws ApiException { + * Get all downtimes. + * + * See {@link #listDowntimesWithHttpInfo}. + * + * @return List<Downtime> + * @throws ApiException if fails to make API call + */ + public List listDowntimes () throws ApiException { return listDowntimesWithHttpInfo(new ListDowntimesOptionalParameters()).getData(); } /** - * Get all downtimes. - * - *

See {@link #listDowntimesWithHttpInfoAsync}. - * - * @return CompletableFuture<List<Downtime>> - */ - public CompletableFuture> listDowntimesAsync() { - return listDowntimesWithHttpInfoAsync(new ListDowntimesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all downtimes. + * + * See {@link #listDowntimesWithHttpInfoAsync}. + * + * @return CompletableFuture<List<Downtime>> + */ + public CompletableFuture>listDowntimesAsync() { + return listDowntimesWithHttpInfoAsync(new ListDowntimesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all downtimes. - * - *

See {@link #listDowntimesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return List<Downtime> - * @throws ApiException if fails to make API call - */ - public List listDowntimes(ListDowntimesOptionalParameters parameters) - throws ApiException { + * Get all downtimes. + * + * See {@link #listDowntimesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return List<Downtime> + * @throws ApiException if fails to make API call + */ + public List listDowntimes(ListDowntimesOptionalParameters parameters) throws ApiException { return listDowntimesWithHttpInfo(parameters).getData(); } /** - * Get all downtimes. - * - *

See {@link #listDowntimesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<List<Downtime>> - */ - public CompletableFuture> listDowntimesAsync( - ListDowntimesOptionalParameters parameters) { - return listDowntimesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all downtimes. + * + * See {@link #listDowntimesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<List<Downtime>> + */ + public CompletableFuture>listDowntimesAsync(ListDowntimesOptionalParameters parameters) { + return listDowntimesWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all scheduled downtimes. + *

Get all scheduled downtimes.

* * @param parameters Optional parameters for the request. * @return ApiResponse<List<Downtime>> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -667,53 +530,37 @@ public CompletableFuture> listDowntimesAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse> listDowntimesWithHttpInfo( - ListDowntimesOptionalParameters parameters) throws ApiException { + public ApiResponse> listDowntimesWithHttpInfo(ListDowntimesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Boolean currentOnly = parameters.currentOnly; // create path and map variables String localVarPath = "/api/v1/downtime"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "current_only", currentOnly)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.listDowntimes", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.listDowntimes", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * Get all downtimes. * - *

See {@link #listDowntimesWithHttpInfo}. + * See {@link #listDowntimesWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<List<Downtime>>> */ - public CompletableFuture>> listDowntimesWithHttpInfoAsync( - ListDowntimesOptionalParameters parameters) { + public CompletableFuture>> listDowntimesWithHttpInfoAsync(ListDowntimesOptionalParameters parameters) { Object localVarPostBody = null; Boolean currentOnly = parameters.currentOnly; // create path and map variables String localVarPath = "/api/v1/downtime"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -721,68 +568,51 @@ public CompletableFuture>> listDowntimesWithHttpInfoA Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.listDowntimes", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.listDowntimes", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Get all downtimes for a monitor. - * - *

See {@link #listMonitorDowntimesWithHttpInfo}. - * - * @param monitorId The id of the monitor (required) - * @return List<Downtime> - * @throws ApiException if fails to make API call - */ - public List listMonitorDowntimes(Long monitorId) throws ApiException { + * Get all downtimes for a monitor. + * + * See {@link #listMonitorDowntimesWithHttpInfo}. + * + * @param monitorId The id of the monitor (required) + * @return List<Downtime> + * @throws ApiException if fails to make API call + */ + public List listMonitorDowntimes(Long monitorId) throws ApiException { return listMonitorDowntimesWithHttpInfo(monitorId).getData(); } /** - * Get all downtimes for a monitor. - * - *

See {@link #listMonitorDowntimesWithHttpInfoAsync}. - * - * @param monitorId The id of the monitor (required) - * @return CompletableFuture<List<Downtime>> - */ - public CompletableFuture> listMonitorDowntimesAsync(Long monitorId) { - return listMonitorDowntimesWithHttpInfoAsync(monitorId) - .thenApply( - response -> { - return response.getData(); - }); + * Get all downtimes for a monitor. + * + * See {@link #listMonitorDowntimesWithHttpInfoAsync}. + * + * @param monitorId The id of the monitor (required) + * @return CompletableFuture<List<Downtime>> + */ + public CompletableFuture>listMonitorDowntimesAsync(Long monitorId) { + return listMonitorDowntimesWithHttpInfoAsync(monitorId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all active downtimes for the specified monitor. + *

Get all active downtimes for the specified monitor.

* * @param monitorId The id of the monitor (required) * @return ApiResponse<List<Downtime>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -791,136 +621,100 @@ public CompletableFuture> listMonitorDowntimesAsync(Long monitorI * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse> listMonitorDowntimesWithHttpInfo(Long monitorId) - throws ApiException { + public ApiResponse> listMonitorDowntimesWithHttpInfo(Long monitorId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'monitorId' is set if (monitorId == null) { - throw new ApiException( - 400, "Missing the required parameter 'monitorId' when calling listMonitorDowntimes"); + throw new ApiException(400, "Missing the required parameter 'monitorId' when calling listMonitorDowntimes"); } // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}/downtimes" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}/downtimes" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.listMonitorDowntimes", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.listMonitorDowntimes", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * Get all downtimes for a monitor. * - *

See {@link #listMonitorDowntimesWithHttpInfo}. + * See {@link #listMonitorDowntimesWithHttpInfo}. * * @param monitorId The id of the monitor (required) * @return CompletableFuture<ApiResponse<List<Downtime>>> */ - public CompletableFuture>> listMonitorDowntimesWithHttpInfoAsync( - Long monitorId) { + public CompletableFuture>> listMonitorDowntimesWithHttpInfoAsync(Long monitorId) { Object localVarPostBody = null; // verify the required parameter 'monitorId' is set if (monitorId == null) { - CompletableFuture>> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'monitorId' when calling listMonitorDowntimes")); - return result; + CompletableFuture>> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'monitorId' when calling listMonitorDowntimes")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}/downtimes" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}/downtimes" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.listMonitorDowntimes", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.listMonitorDowntimes", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Update a downtime. - * - *

See {@link #updateDowntimeWithHttpInfo}. - * - * @param downtimeId ID of the downtime to update. (required) - * @param body Update a downtime request body. (required) - * @return Downtime - * @throws ApiException if fails to make API call - */ - public Downtime updateDowntime(Long downtimeId, Downtime body) throws ApiException { + * Update a downtime. + * + * See {@link #updateDowntimeWithHttpInfo}. + * + * @param downtimeId ID of the downtime to update. (required) + * @param body Update a downtime request body. (required) + * @return Downtime + * @throws ApiException if fails to make API call + */ + public Downtime updateDowntime(Long downtimeId, Downtime body) throws ApiException { return updateDowntimeWithHttpInfo(downtimeId, body).getData(); } /** - * Update a downtime. - * - *

See {@link #updateDowntimeWithHttpInfoAsync}. - * - * @param downtimeId ID of the downtime to update. (required) - * @param body Update a downtime request body. (required) - * @return CompletableFuture<Downtime> - */ - public CompletableFuture updateDowntimeAsync(Long downtimeId, Downtime body) { - return updateDowntimeWithHttpInfoAsync(downtimeId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a downtime. + * + * See {@link #updateDowntimeWithHttpInfoAsync}. + * + * @param downtimeId ID of the downtime to update. (required) + * @param body Update a downtime request body. (required) + * @return CompletableFuture<Downtime> + */ + public CompletableFutureupdateDowntimeAsync(Long downtimeId, Downtime body) { + return updateDowntimeWithHttpInfoAsync(downtimeId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a single downtime by downtime_id. + *

Update a single downtime by downtime_id.

* * @param downtimeId ID of the downtime to update. (required) * @param body Update a downtime request body. (required) * @return ApiResponse<Downtime> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -930,111 +724,71 @@ public CompletableFuture updateDowntimeAsync(Long downtimeId, Downtime * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateDowntimeWithHttpInfo(Long downtimeId, Downtime body) - throws ApiException { + public ApiResponse updateDowntimeWithHttpInfo(Long downtimeId, Downtime body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'downtimeId' is set if (downtimeId == null) { - throw new ApiException( - 400, "Missing the required parameter 'downtimeId' when calling updateDowntime"); + throw new ApiException(400, "Missing the required parameter 'downtimeId' when calling updateDowntime"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateDowntime"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateDowntime"); } // create path and map variables - String localVarPath = - "/api/v1/downtime/{downtime_id}" - .replaceAll( - "\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + String localVarPath = "/api/v1/downtime/{downtime_id}" + .replaceAll("\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.DowntimesApi.updateDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.DowntimesApi.updateDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a downtime. * - *

See {@link #updateDowntimeWithHttpInfo}. + * See {@link #updateDowntimeWithHttpInfo}. * * @param downtimeId ID of the downtime to update. (required) * @param body Update a downtime request body. (required) * @return CompletableFuture<ApiResponse<Downtime>> */ - public CompletableFuture> updateDowntimeWithHttpInfoAsync( - Long downtimeId, Downtime body) { + public CompletableFuture> updateDowntimeWithHttpInfoAsync(Long downtimeId, Downtime body) { Object localVarPostBody = body; // verify the required parameter 'downtimeId' is set if (downtimeId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'downtimeId' when calling updateDowntime")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'downtimeId' when calling updateDowntime")); + 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 updateDowntime")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateDowntime")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/downtime/{downtime_id}" - .replaceAll( - "\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + String localVarPath = "/api/v1/downtime/{downtime_id}" + .replaceAll("\\{" + "downtime_id" + "\\}", apiClient.escapeString(downtimeId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.DowntimesApi.updateDowntime", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.DowntimesApi.updateDowntime", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/EventsApi.java b/src/main/java/com/datadog/api/client/v1/api/EventsApi.java index 9d9de1457f8..c43c86668c3 100644 --- a/src/main/java/com/datadog/api/client/v1/api/EventsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/EventsApi.java @@ -1,27 +1,34 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.EventCreateRequest; -import com.datadog.api.client.v1.model.EventCreateResponse; -import com.datadog.api.client.v1.model.EventListResponse; -import com.datadog.api.client.v1.model.EventPriority; -import com.datadog.api.client.v1.model.EventResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.EventListResponse; +import com.datadog.api.client.v1.model.EventPriority; +import com.datadog.api.client.v1.model.EventCreateResponse; +import com.datadog.api.client.v1.model.EventCreateRequest; +import com.datadog.api.client.v1.model.EventResponse; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsApi { private ApiClient apiClient; - public EventsApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,43 +56,42 @@ public void setApiClient(ApiClient apiClient) { } /** - * Post an event. - * - *

See {@link #createEventWithHttpInfo}. - * - * @param body Event request object (required) - * @return EventCreateResponse - * @throws ApiException if fails to make API call - */ - public EventCreateResponse createEvent(EventCreateRequest body) throws ApiException { + * Post an event. + * + * See {@link #createEventWithHttpInfo}. + * + * @param body Event request object (required) + * @return EventCreateResponse + * @throws ApiException if fails to make API call + */ + public EventCreateResponse createEvent(EventCreateRequest body) throws ApiException { return createEventWithHttpInfo(body).getData(); } /** - * Post an event. - * - *

See {@link #createEventWithHttpInfoAsync}. - * - * @param body Event request object (required) - * @return CompletableFuture<EventCreateResponse> - */ - public CompletableFuture createEventAsync(EventCreateRequest body) { - return createEventWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Post an event. + * + * See {@link #createEventWithHttpInfoAsync}. + * + * @param body Event request object (required) + * @return CompletableFuture<EventCreateResponse> + */ + public CompletableFuturecreateEventAsync(EventCreateRequest body) { + return createEventWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint allows you to post events to the stream. Tag them, set priority and event - * aggregate them with other events. + *

This endpoint allows you to post events to the stream. + * Tag them, set priority and event aggregate them with other events.

* * @param body Event request object (required) * @return ApiResponse<EventCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -93,8 +99,7 @@ public CompletableFuture createEventAsync(EventCreateReques * *
Response details
Status Code Description Response Headers
202 OK -
429 Too many requests -
*/ - public ApiResponse createEventWithHttpInfo(EventCreateRequest body) - throws ApiException { + public ApiResponse createEventWithHttpInfo(EventCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -104,120 +109,87 @@ public ApiResponse createEventWithHttpInfo(EventCreateReque // create path and map variables String localVarPath = "/api/v1/events"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.EventsApi.createEvent", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.EventsApi.createEvent", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Post an event. * - *

See {@link #createEventWithHttpInfo}. + * See {@link #createEventWithHttpInfo}. * * @param body Event request object (required) * @return CompletableFuture<ApiResponse<EventCreateResponse>> */ - public CompletableFuture> createEventWithHttpInfoAsync( - EventCreateRequest body) { + public CompletableFuture> createEventWithHttpInfoAsync(EventCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling createEvent")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createEvent")); + return result; } // create path and map variables String localVarPath = "/api/v1/events"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.EventsApi.createEvent", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v1.EventsApi.createEvent", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); } 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get an event. - * - *

See {@link #getEventWithHttpInfo}. - * - * @param eventId The ID of the event. (required) - * @return EventResponse - * @throws ApiException if fails to make API call - */ - public EventResponse getEvent(Long eventId) throws ApiException { + * Get an event. + * + * See {@link #getEventWithHttpInfo}. + * + * @param eventId The ID of the event. (required) + * @return EventResponse + * @throws ApiException if fails to make API call + */ + public EventResponse getEvent(Long eventId) throws ApiException { return getEventWithHttpInfo(eventId).getData(); } /** - * Get an event. - * - *

See {@link #getEventWithHttpInfoAsync}. - * - * @param eventId The ID of the event. (required) - * @return CompletableFuture<EventResponse> - */ - public CompletableFuture getEventAsync(Long eventId) { - return getEventWithHttpInfoAsync(eventId) - .thenApply( - response -> { - return response.getData(); - }); + * Get an event. + * + * See {@link #getEventWithHttpInfoAsync}. + * + * @param eventId The ID of the event. (required) + * @return CompletableFuture<EventResponse> + */ + public CompletableFuturegetEventAsync(Long eventId) { + return getEventWithHttpInfoAsync(eventId).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint allows you to query for event details. - * - *

Note: If the event you’re querying contains markdown formatting of any - * kind, you may see characters such as %,\,n in your - * output. + *

This endpoint allows you to query for event details.

+ *

Note: If the event you’re querying contains markdown formatting of any kind, + * you may see characters such as %,\,n in your output.

* * @param eventId The ID of the event. (required) * @return ApiResponse<EventResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -234,36 +206,21 @@ public ApiResponse getEventWithHttpInfo(Long eventId) throws ApiE throw new ApiException(400, "Missing the required parameter 'eventId' when calling getEvent"); } // create path and map variables - String localVarPath = - "/api/v1/events/{event_id}" - .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + String localVarPath = "/api/v1/events/{event_id}" + .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.EventsApi.getEvent", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.EventsApi.getEvent", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an event. * - *

See {@link #getEventWithHttpInfo}. + * See {@link #getEventWithHttpInfo}. * * @param eventId The ID of the event. (required) * @return CompletableFuture<ApiResponse<EventResponse>> @@ -273,46 +230,32 @@ public CompletableFuture> getEventWithHttpInfoAsync(L // verify the required parameter 'eventId' is set if (eventId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'eventId' when calling getEvent")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'eventId' when calling getEvent")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/events/{event_id}" - .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + String localVarPath = "/api/v1/events/{event_id}" + .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.EventsApi.getEvent", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.EventsApi.getEvent", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listEvents. */ + /** + * Manage optional parameters to listEvents. + */ public static class ListEventsOptionalParameters { private EventPriority priority; private String sources; @@ -323,9 +266,7 @@ public static class ListEventsOptionalParameters { /** * Set priority. - * - * @param priority Priority of your events, either low or normal. - * (optional) + * @param priority Priority of your events, either low or normal. (optional) * @return ListEventsOptionalParameters */ public ListEventsOptionalParameters priority(EventPriority priority) { @@ -335,7 +276,6 @@ public ListEventsOptionalParameters priority(EventPriority priority) { /** * Set sources. - * * @param sources A comma separated string of sources. (optional) * @return ListEventsOptionalParameters */ @@ -346,9 +286,7 @@ public ListEventsOptionalParameters sources(String sources) { /** * Set tags. - * - * @param tags A comma separated list indicating what tags, if any, should be used to filter the - * list of events. (optional) + * @param tags A comma separated list indicating what tags, if any, should be used to filter the list of events. (optional) * @return ListEventsOptionalParameters */ public ListEventsOptionalParameters tags(String tags) { @@ -358,13 +296,7 @@ public ListEventsOptionalParameters tags(String tags) { /** * Set unaggregated. - * - * @param unaggregated Set unaggregated to true to return all events within the - * specified [start,end] timeframe. Otherwise if an event is - * aggregated to a parent event with a timestamp outside of the timeframe, it won't be - * available in the output. Aggregated events with is_aggregate=true in the - * response will still be returned unless exclude_aggregate is set to true. - * (optional) + * @param unaggregated Set unaggregated to true to return all events within the specified [start,end] timeframe. Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output. Aggregated events with is_aggregate=true in the response will still be returned unless exclude_aggregate is set to true. (optional) * @return ListEventsOptionalParameters */ public ListEventsOptionalParameters unaggregated(Boolean unaggregated) { @@ -374,11 +306,7 @@ public ListEventsOptionalParameters unaggregated(Boolean unaggregated) { /** * Set excludeAggregate. - * - * @param excludeAggregate Set exclude_aggregate to true to only - * return unaggregated events where is_aggregate=false in the response. If the - * exclude_aggregate parameter is set to true, then the - * unaggregated parameter is ignored and will be true by default. (optional) + * @param excludeAggregate Set exclude_aggregate to true to only return unaggregated events where is_aggregate=false in the response. If the exclude_aggregate parameter is set to true, then the unaggregated parameter is ignored and will be true by default. (optional) * @return ListEventsOptionalParameters */ public ListEventsOptionalParameters excludeAggregate(Boolean excludeAggregate) { @@ -388,11 +316,7 @@ public ListEventsOptionalParameters excludeAggregate(Boolean excludeAggregate) { /** * Set page. - * - * @param page By default 1000 results are returned per request. Set page to the number of the - * page to return with 0 being the first page. The page parameter can only be - * used when either unaggregated or exclude_aggregate is set to true. - * (optional) + * @param page By default 1000 results are returned per request. Set page to the number of the page to return with 0 being the first page. The page parameter can only be used when either unaggregated or exclude_aggregate is set to true. (optional) * @return ListEventsOptionalParameters */ public ListEventsOptionalParameters page(Integer page) { @@ -402,83 +326,75 @@ public ListEventsOptionalParameters page(Integer page) { } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfo}. - * - * @param start POSIX timestamp. (required) - * @param end POSIX timestamp. (required) - * @return EventListResponse - * @throws ApiException if fails to make API call - */ - public EventListResponse listEvents(Long start, Long end) throws ApiException { - return listEventsWithHttpInfo(start, end, new ListEventsOptionalParameters()).getData(); + * Get a list of events. + * + * See {@link #listEventsWithHttpInfo}. + * + * @param start POSIX timestamp. (required) + * @param end POSIX timestamp. (required) + * @return EventListResponse + * @throws ApiException if fails to make API call + */ + public EventListResponse listEvents (Long start, Long end) throws ApiException { + return listEventsWithHttpInfo( start, end, new ListEventsOptionalParameters()).getData(); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfoAsync}. - * - * @param start POSIX timestamp. (required) - * @param end POSIX timestamp. (required) - * @return CompletableFuture<EventListResponse> - */ - public CompletableFuture listEventsAsync(Long start, Long end) { - return listEventsWithHttpInfoAsync(start, end, new ListEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of events. + * + * See {@link #listEventsWithHttpInfoAsync}. + * + * @param start POSIX timestamp. (required) + * @param end POSIX timestamp. (required) + * @return CompletableFuture<EventListResponse> + */ + public CompletableFuturelistEventsAsync(Long start, Long end) { + return listEventsWithHttpInfoAsync(start, end, new ListEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfo}. - * - * @param start POSIX timestamp. (required) - * @param end POSIX timestamp. (required) - * @param parameters Optional parameters for the request. - * @return EventListResponse - * @throws ApiException if fails to make API call - */ - public EventListResponse listEvents(Long start, Long end, ListEventsOptionalParameters parameters) - throws ApiException { + * Get a list of events. + * + * See {@link #listEventsWithHttpInfo}. + * + * @param start POSIX timestamp. (required) + * @param end POSIX timestamp. (required) + * @param parameters Optional parameters for the request. + * @return EventListResponse + * @throws ApiException if fails to make API call + */ + public EventListResponse listEvents(Long start, Long end, ListEventsOptionalParameters parameters) throws ApiException { return listEventsWithHttpInfo(start, end, parameters).getData(); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfoAsync}. - * - * @param start POSIX timestamp. (required) - * @param end POSIX timestamp. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<EventListResponse> - */ - public CompletableFuture listEventsAsync( - Long start, Long end, ListEventsOptionalParameters parameters) { - return listEventsWithHttpInfoAsync(start, end, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of events. + * + * See {@link #listEventsWithHttpInfoAsync}. + * + * @param start POSIX timestamp. (required) + * @param end POSIX timestamp. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<EventListResponse> + */ + public CompletableFuturelistEventsAsync( Long start, Long end, ListEventsOptionalParameters parameters) { + return listEventsWithHttpInfoAsync(start, end, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * The event stream can be queried and filtered by time, priority, sources and tags. - * - *

Notes: - If the event you’re querying contains markdown formatting of any - * kind, you may see characters such as %,\,n in your - * output. - * + *

The event stream can be queried and filtered by time, priority, sources and tags.

+ *

Notes: + * - If the event you’re querying contains markdown formatting of any kind, + * you may see characters such as %,\,n in your output.

*
    - *
  • This endpoint returns a maximum of 1000 most recent results. To return - * additional results, identify the last timestamp of the last result and set that as the - * end query time to paginate the results. You can also use the page parameter - * to specify which set of 1000 results to return. + *
  • This endpoint returns a maximum of 1000 most recent results. To return additional results, + * identify the last timestamp of the last result and set that as the end query time to + * paginate the results. You can also use the page parameter to specify which set of 1000 results to return.
  • *
* * @param start POSIX timestamp. (required) @@ -487,7 +403,7 @@ public CompletableFuture listEventsAsync( * @return ApiResponse<EventListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -496,8 +412,7 @@ public CompletableFuture listEventsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listEventsWithHttpInfo( - Long start, Long end, ListEventsOptionalParameters parameters) throws ApiException { + public ApiResponse listEventsWithHttpInfo(Long start, Long end, ListEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'start' is set @@ -518,6 +433,7 @@ public ApiResponse listEventsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -527,58 +443,38 @@ public ApiResponse listEventsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "sources", sources)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "unaggregated", unaggregated)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "exclude_aggregate", excludeAggregate)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "exclude_aggregate", excludeAggregate)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.EventsApi.listEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.EventsApi.listEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of events. * - *

See {@link #listEventsWithHttpInfo}. + * See {@link #listEventsWithHttpInfo}. * * @param start POSIX timestamp. (required) * @param end POSIX timestamp. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<EventListResponse>> */ - public CompletableFuture> listEventsWithHttpInfoAsync( - Long start, Long end, ListEventsOptionalParameters parameters) { + public CompletableFuture> listEventsWithHttpInfoAsync(Long start, Long end, ListEventsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'start' is set if (start == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'start' when calling listEvents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'start' when calling listEvents")); + return result; } // verify the required parameter 'end' is set if (end == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'end' when calling listEvents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'end' when calling listEvents")); + return result; } EventPriority priority = parameters.priority; String sources = parameters.sources; @@ -589,6 +485,7 @@ public CompletableFuture> listEventsWithHttpInfoA // create path and map variables String localVarPath = "/api/v1/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -598,34 +495,17 @@ public CompletableFuture> listEventsWithHttpInfoA localVarQueryParams.addAll(apiClient.parameterToPairs("", "sources", sources)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "unaggregated", unaggregated)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "exclude_aggregate", excludeAggregate)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "exclude_aggregate", excludeAggregate)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.EventsApi.listEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.EventsApi.listEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/GcpIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/GcpIntegrationApi.java index ff58e438965..2661ba2285f 100644 --- a/src/main/java/com/datadog/api/client/v1/api/GcpIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/GcpIntegrationApi.java @@ -1,23 +1,30 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.GCPAccount; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.GCPAccount; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GcpIntegrationApi { private ApiClient apiClient; - public GcpIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,42 +52,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a GCP integration. - * - *

See {@link #createGCPIntegrationWithHttpInfo}. - * - * @param body Create a Datadog-GCP integration. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object createGCPIntegration(GCPAccount body) throws ApiException { + * Create a GCP integration. + * + * See {@link #createGCPIntegrationWithHttpInfo}. + * + * @param body Create a Datadog-GCP integration. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object createGCPIntegration(GCPAccount body) throws ApiException { return createGCPIntegrationWithHttpInfo(body).getData(); } /** - * Create a GCP integration. - * - *

See {@link #createGCPIntegrationWithHttpInfoAsync}. - * - * @param body Create a Datadog-GCP integration. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture createGCPIntegrationAsync(GCPAccount body) { - return createGCPIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a GCP integration. + * + * See {@link #createGCPIntegrationWithHttpInfoAsync}. + * + * @param body Create a Datadog-GCP integration. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturecreateGCPIntegrationAsync(GCPAccount body) { + return createGCPIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Datadog-GCP integration. + *

Create a Datadog-GCP integration.

* * @param body Create a Datadog-GCP integration. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -94,123 +100,90 @@ public ApiResponse createGCPIntegrationWithHttpInfo(GCPAccount body) thr // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createGCPIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createGCPIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.createGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.GcpIntegrationApi.createGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a GCP integration. * - *

See {@link #createGCPIntegrationWithHttpInfo}. + * See {@link #createGCPIntegrationWithHttpInfo}. * * @param body Create a Datadog-GCP integration. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> createGCPIntegrationWithHttpInfoAsync( - GCPAccount body) { + public CompletableFuture> createGCPIntegrationWithHttpInfoAsync(GCPAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createGCPIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createGCPIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.createGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.GcpIntegrationApi.createGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a GCP integration. - * - *

See {@link #deleteGCPIntegrationWithHttpInfo}. - * - * @param body Delete a given Datadog-GCP integration. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object deleteGCPIntegration(GCPAccount body) throws ApiException { + * Delete a GCP integration. + * + * See {@link #deleteGCPIntegrationWithHttpInfo}. + * + * @param body Delete a given Datadog-GCP integration. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object deleteGCPIntegration(GCPAccount body) throws ApiException { return deleteGCPIntegrationWithHttpInfo(body).getData(); } /** - * Delete a GCP integration. - * - *

See {@link #deleteGCPIntegrationWithHttpInfoAsync}. - * - * @param body Delete a given Datadog-GCP integration. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture deleteGCPIntegrationAsync(GCPAccount body) { - return deleteGCPIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a GCP integration. + * + * See {@link #deleteGCPIntegrationWithHttpInfoAsync}. + * + * @param body Delete a given Datadog-GCP integration. (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturedeleteGCPIntegrationAsync(GCPAccount body) { + return deleteGCPIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given Datadog-GCP integration. + *

Delete a given Datadog-GCP integration.

* * @param body Delete a given Datadog-GCP integration. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - *

Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -224,120 +197,87 @@ public ApiResponse deleteGCPIntegrationWithHttpInfo(GCPAccount body) thr // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteGCPIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteGCPIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.deleteGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.GcpIntegrationApi.deleteGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete a GCP integration. * - *

See {@link #deleteGCPIntegrationWithHttpInfo}. + * See {@link #deleteGCPIntegrationWithHttpInfo}. * * @param body Delete a given Datadog-GCP integration. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> deleteGCPIntegrationWithHttpInfoAsync( - GCPAccount body) { + public CompletableFuture> deleteGCPIntegrationWithHttpInfoAsync(GCPAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteGCPIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteGCPIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.deleteGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.GcpIntegrationApi.deleteGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List all GCP integrations. - * - *

See {@link #listGCPIntegrationWithHttpInfo}. - * - * @return List<GCPAccount> - * @throws ApiException if fails to make API call - */ - public List listGCPIntegration() throws ApiException { + * List all GCP integrations. + * + * See {@link #listGCPIntegrationWithHttpInfo}. + * + * @return List<GCPAccount> + * @throws ApiException if fails to make API call + */ + public List listGCPIntegration() throws ApiException { return listGCPIntegrationWithHttpInfo().getData(); } /** - * List all GCP integrations. - * - *

See {@link #listGCPIntegrationWithHttpInfoAsync}. - * - * @return CompletableFuture<List<GCPAccount>> - */ - public CompletableFuture> listGCPIntegrationAsync() { - return listGCPIntegrationWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List all GCP integrations. + * + * See {@link #listGCPIntegrationWithHttpInfoAsync}. + * + * @return CompletableFuture<List<GCPAccount>> + */ + public CompletableFuture>listGCPIntegrationAsync() { + return listGCPIntegrationWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all Datadog-GCP integrations configured in your Datadog account. + *

List all Datadog-GCP integrations configured in your Datadog account.

* * @return ApiResponse<List<GCPAccount>> * @throws ApiException if fails to make API call * @http.response.details - *

Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -351,32 +291,18 @@ public ApiResponse> listGCPIntegrationWithHttpInfo() throws Api // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.listGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.GcpIntegrationApi.listGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * List all GCP integrations. * - *

See {@link #listGCPIntegrationWithHttpInfo}. + * See {@link #listGCPIntegrationWithHttpInfo}. * * @return CompletableFuture<ApiResponse<List<GCPAccount>>> */ @@ -385,75 +311,60 @@ public CompletableFuture>> listGCPIntegrationWithHt // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.listGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.GcpIntegrationApi.listGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Update a GCP integration. - * - *

See {@link #updateGCPIntegrationWithHttpInfo}. - * - * @param body Update a Datadog-GCP integration. (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object updateGCPIntegration(GCPAccount body) throws ApiException { + * Update a GCP integration. + * + * See {@link #updateGCPIntegrationWithHttpInfo}. + * + * @param body Update a Datadog-GCP integration. (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object updateGCPIntegration(GCPAccount body) throws ApiException { return updateGCPIntegrationWithHttpInfo(body).getData(); } /** - * Update a GCP integration. - * - *

See {@link #updateGCPIntegrationWithHttpInfoAsync}. - * - * @param body Update a Datadog-GCP integration. (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture updateGCPIntegrationAsync(GCPAccount body) { - return updateGCPIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a GCP integration. + * + * See {@link #updateGCPIntegrationWithHttpInfoAsync}. + * + * @param body Update a Datadog-GCP integration. (required) + * @return CompletableFuture<Object> + */ + public CompletableFutureupdateGCPIntegrationAsync(GCPAccount body) { + return updateGCPIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Datadog-GCP integrations host_filters and/or auto-mute. Requires a project_id - * and client_email, however these fields cannot be updated. If you need to - * update these fields, delete and use the create (POST) endpoint. The unspecified - * fields will keep their original values. + *

Update a Datadog-GCP integrations host_filters and/or auto-mute. + * Requires a project_id and client_email, however these fields cannot be updated. + * If you need to update these fields, delete and use the create (POST) endpoint. + * The unspecified fields will keep their original values.

* * @param body Update a Datadog-GCP integration. (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - *

Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -467,83 +378,51 @@ public ApiResponse updateGCPIntegrationWithHttpInfo(GCPAccount body) thr // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateGCPIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateGCPIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.updateGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.GcpIntegrationApi.updateGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a GCP integration. * - *

See {@link #updateGCPIntegrationWithHttpInfo}. + * See {@link #updateGCPIntegrationWithHttpInfo}. * * @param body Update a Datadog-GCP integration. (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> updateGCPIntegrationWithHttpInfoAsync( - GCPAccount body) { + public CompletableFuture> updateGCPIntegrationWithHttpInfoAsync(GCPAccount body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateGCPIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateGCPIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/gcp"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.GcpIntegrationApi.updateGCPIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.GcpIntegrationApi.updateGCPIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/HostsApi.java b/src/main/java/com/datadog/api/client/v1/api/HostsApi.java index bbf0cb50264..ded81b9ea70 100644 --- a/src/main/java/com/datadog/api/client/v1/api/HostsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/HostsApi.java @@ -1,26 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.HostListResponse; -import com.datadog.api.client.v1.model.HostMuteResponse; -import com.datadog.api.client.v1.model.HostMuteSettings; -import com.datadog.api.client.v1.model.HostTotals; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.HostMuteResponse; +import com.datadog.api.client.v1.model.HostMuteSettings; +import com.datadog.api.client.v1.model.HostListResponse; +import com.datadog.api.client.v1.model.HostTotals; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostsApi { private ApiClient apiClient; - public HostsApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,15 +54,15 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to getHostTotals. */ + /** + * Manage optional parameters to getHostTotals. + */ public static class GetHostTotalsOptionalParameters { private Long from; /** * Set from. - * - * @param from Number of seconds from which you want to get total number of active hosts. - * (optional) + * @param from Number of seconds from which you want to get total number of active hosts. (optional) * @return GetHostTotalsOptionalParameters */ public GetHostTotalsOptionalParameters from(Long from) { @@ -65,72 +72,67 @@ public GetHostTotalsOptionalParameters from(Long from) { } /** - * Get the total number of active hosts. - * - *

See {@link #getHostTotalsWithHttpInfo}. - * - * @return HostTotals - * @throws ApiException if fails to make API call - */ - public HostTotals getHostTotals() throws ApiException { + * Get the total number of active hosts. + * + * See {@link #getHostTotalsWithHttpInfo}. + * + * @return HostTotals + * @throws ApiException if fails to make API call + */ + public HostTotals getHostTotals () throws ApiException { return getHostTotalsWithHttpInfo(new GetHostTotalsOptionalParameters()).getData(); } /** - * Get the total number of active hosts. - * - *

See {@link #getHostTotalsWithHttpInfoAsync}. - * - * @return CompletableFuture<HostTotals> - */ - public CompletableFuture getHostTotalsAsync() { - return getHostTotalsWithHttpInfoAsync(new GetHostTotalsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get the total number of active hosts. + * + * See {@link #getHostTotalsWithHttpInfoAsync}. + * + * @return CompletableFuture<HostTotals> + */ + public CompletableFuturegetHostTotalsAsync() { + return getHostTotalsWithHttpInfoAsync(new GetHostTotalsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get the total number of active hosts. - * - *

See {@link #getHostTotalsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return HostTotals - * @throws ApiException if fails to make API call - */ + * Get the total number of active hosts. + * + * See {@link #getHostTotalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return HostTotals + * @throws ApiException if fails to make API call + */ public HostTotals getHostTotals(GetHostTotalsOptionalParameters parameters) throws ApiException { return getHostTotalsWithHttpInfo(parameters).getData(); } /** - * Get the total number of active hosts. - * - *

See {@link #getHostTotalsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HostTotals> - */ - public CompletableFuture getHostTotalsAsync( - GetHostTotalsOptionalParameters parameters) { - return getHostTotalsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get the total number of active hosts. + * + * See {@link #getHostTotalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HostTotals> + */ + public CompletableFuturegetHostTotalsAsync(GetHostTotalsOptionalParameters parameters) { + return getHostTotalsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint returns the total number of active and up hosts in your Datadog account. Active - * means the host has reported in the past hour, and up means it has reported in the past two - * hours. + *

This endpoint returns the total number of active and up hosts in your Datadog account. + * Active means the host has reported in the past hour, and up means it has reported in the past two hours.

* * @param parameters Optional parameters for the request. * @return ApiResponse<HostTotals> * @throws ApiException if fails to make API call * @http.response.details - *

Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -139,53 +141,37 @@ public CompletableFuture getHostTotalsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getHostTotalsWithHttpInfo( - GetHostTotalsOptionalParameters parameters) throws ApiException { + public ApiResponse getHostTotalsWithHttpInfo(GetHostTotalsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long from = parameters.from; // create path and map variables String localVarPath = "/api/v1/hosts/totals"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.HostsApi.getHostTotals", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.HostsApi.getHostTotals", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the total number of active hosts. * - *

See {@link #getHostTotalsWithHttpInfo}. + * See {@link #getHostTotalsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HostTotals>> */ - public CompletableFuture> getHostTotalsWithHttpInfoAsync( - GetHostTotalsOptionalParameters parameters) { + public CompletableFuture> getHostTotalsWithHttpInfoAsync(GetHostTotalsOptionalParameters parameters) { Object localVarPostBody = null; Long from = parameters.from; // create path and map variables String localVarPath = "/api/v1/hosts/totals"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -193,32 +179,18 @@ public CompletableFuture> getHostTotalsWithHttpInfoAsync Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.HostsApi.getHostTotals", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.HostsApi.getHostTotals", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listHosts. */ + /** + * Manage optional parameters to listHosts. + */ public static class ListHostsOptionalParameters { private String filter; private String sortField; @@ -231,7 +203,6 @@ public static class ListHostsOptionalParameters { /** * Set filter. - * * @param filter String to filter search results. (optional) * @return ListHostsOptionalParameters */ @@ -242,7 +213,6 @@ public ListHostsOptionalParameters filter(String filter) { /** * Set sortField. - * * @param sortField Sort hosts by this field. (optional) * @return ListHostsOptionalParameters */ @@ -253,9 +223,7 @@ public ListHostsOptionalParameters sortField(String sortField) { /** * Set sortDir. - * - * @param sortDir Direction of sort. Options include asc and desc. - * (optional) + * @param sortDir Direction of sort. Options include asc and desc. (optional) * @return ListHostsOptionalParameters */ public ListHostsOptionalParameters sortDir(String sortDir) { @@ -265,7 +233,6 @@ public ListHostsOptionalParameters sortDir(String sortDir) { /** * Set start. - * * @param start Host result to start search from. (optional) * @return ListHostsOptionalParameters */ @@ -276,7 +243,6 @@ public ListHostsOptionalParameters start(Long start) { /** * Set count. - * * @param count Number of hosts to return. Max 1000. (optional) * @return ListHostsOptionalParameters */ @@ -287,9 +253,7 @@ public ListHostsOptionalParameters count(Long count) { /** * Set from. - * - * @param from Number of seconds since UNIX epoch from which you want to search your hosts. - * (optional) + * @param from Number of seconds since UNIX epoch from which you want to search your hosts. (optional) * @return ListHostsOptionalParameters */ public ListHostsOptionalParameters from(Long from) { @@ -299,9 +263,7 @@ public ListHostsOptionalParameters from(Long from) { /** * Set includeMutedHostsData. - * - * @param includeMutedHostsData Include information on the muted status of hosts and when the - * mute expires. (optional) + * @param includeMutedHostsData Include information on the muted status of hosts and when the mute expires. (optional) * @return ListHostsOptionalParameters */ public ListHostsOptionalParameters includeMutedHostsData(Boolean includeMutedHostsData) { @@ -311,9 +273,7 @@ public ListHostsOptionalParameters includeMutedHostsData(Boolean includeMutedHos /** * Set includeHostsMetadata. - * - * @param includeHostsMetadata Include additional metadata about the hosts (agent_version, - * machine, platform, processor, etc.). (optional) + * @param includeHostsMetadata Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.). (optional) * @return ListHostsOptionalParameters */ public ListHostsOptionalParameters includeHostsMetadata(Boolean includeHostsMetadata) { @@ -323,72 +283,69 @@ public ListHostsOptionalParameters includeHostsMetadata(Boolean includeHostsMeta } /** - * Get all hosts for your organization. - * - *

See {@link #listHostsWithHttpInfo}. - * - * @return HostListResponse - * @throws ApiException if fails to make API call - */ - public HostListResponse listHosts() throws ApiException { + * Get all hosts for your organization. + * + * See {@link #listHostsWithHttpInfo}. + * + * @return HostListResponse + * @throws ApiException if fails to make API call + */ + public HostListResponse listHosts () throws ApiException { return listHostsWithHttpInfo(new ListHostsOptionalParameters()).getData(); } /** - * Get all hosts for your organization. - * - *

See {@link #listHostsWithHttpInfoAsync}. - * - * @return CompletableFuture<HostListResponse> - */ - public CompletableFuture listHostsAsync() { - return listHostsWithHttpInfoAsync(new ListHostsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all hosts for your organization. + * + * See {@link #listHostsWithHttpInfoAsync}. + * + * @return CompletableFuture<HostListResponse> + */ + public CompletableFuturelistHostsAsync() { + return listHostsWithHttpInfoAsync(new ListHostsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all hosts for your organization. - * - *

See {@link #listHostsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return HostListResponse - * @throws ApiException if fails to make API call - */ + * Get all hosts for your organization. + * + * See {@link #listHostsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return HostListResponse + * @throws ApiException if fails to make API call + */ public HostListResponse listHosts(ListHostsOptionalParameters parameters) throws ApiException { return listHostsWithHttpInfo(parameters).getData(); } /** - * Get all hosts for your organization. - * - *

See {@link #listHostsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HostListResponse> - */ - public CompletableFuture listHostsAsync( - ListHostsOptionalParameters parameters) { - return listHostsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all hosts for your organization. + * + * See {@link #listHostsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HostListResponse> + */ + public CompletableFuturelistHostsAsync(ListHostsOptionalParameters parameters) { + return listHostsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint allows searching for hosts by name, alias, or tag. Hosts live within the past 3 - * hours are included by default. Retention is 7 days. Results are paginated with a max of 1000 - * results at a time. + *

This endpoint allows searching for hosts by name, alias, or tag. + * Hosts live within the past 3 hours are included by default. + * Retention is 7 days. + * Results are paginated with a max of 1000 results at a time.

* * @param parameters Optional parameters for the request. * @return ApiResponse<HostListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -397,8 +354,7 @@ public CompletableFuture listHostsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listHostsWithHttpInfo(ListHostsOptionalParameters parameters) - throws ApiException { + public ApiResponse listHostsWithHttpInfo(ListHostsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filter = parameters.filter; String sortField = parameters.sortField; @@ -411,6 +367,7 @@ public ApiResponse listHostsWithHttpInfo(ListHostsOptionalPara // create path and map variables String localVarPath = "/api/v1/hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -420,41 +377,22 @@ public ApiResponse listHostsWithHttpInfo(ListHostsOptionalPara localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_muted_hosts_data", includeMutedHostsData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_hosts_metadata", includeHostsMetadata)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.HostsApi.listHosts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_muted_hosts_data", includeMutedHostsData)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_hosts_metadata", includeHostsMetadata)); + + Invocation.Builder builder = apiClient.createBuilder("v1.HostsApi.listHosts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all hosts for your organization. * - *

See {@link #listHostsWithHttpInfo}. + * See {@link #listHostsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HostListResponse>> */ - public CompletableFuture> listHostsWithHttpInfoAsync( - ListHostsOptionalParameters parameters) { + public CompletableFuture> listHostsWithHttpInfoAsync(ListHostsOptionalParameters parameters) { Object localVarPostBody = null; String filter = parameters.filter; String sortField = parameters.sortField; @@ -467,6 +405,7 @@ public CompletableFuture> listHostsWithHttpInfoAsy // create path and map variables String localVarPath = "/api/v1/hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -476,78 +415,59 @@ public CompletableFuture> listHostsWithHttpInfoAsy localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_muted_hosts_data", includeMutedHostsData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_hosts_metadata", includeHostsMetadata)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_muted_hosts_data", includeMutedHostsData)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_hosts_metadata", includeHostsMetadata)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.HostsApi.listHosts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.HostsApi.listHosts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Mute a host. - * - *

See {@link #muteHostWithHttpInfo}. - * - * @param hostName Name of the host to mute. (required) - * @param body Mute a host request body. (required) - * @return HostMuteResponse - * @throws ApiException if fails to make API call - */ - public HostMuteResponse muteHost(String hostName, HostMuteSettings body) throws ApiException { + * Mute a host. + * + * See {@link #muteHostWithHttpInfo}. + * + * @param hostName Name of the host to mute. (required) + * @param body Mute a host request body. (required) + * @return HostMuteResponse + * @throws ApiException if fails to make API call + */ + public HostMuteResponse muteHost(String hostName, HostMuteSettings body) throws ApiException { return muteHostWithHttpInfo(hostName, body).getData(); } /** - * Mute a host. - * - *

See {@link #muteHostWithHttpInfoAsync}. - * - * @param hostName Name of the host to mute. (required) - * @param body Mute a host request body. (required) - * @return CompletableFuture<HostMuteResponse> - */ - public CompletableFuture muteHostAsync(String hostName, HostMuteSettings body) { - return muteHostWithHttpInfoAsync(hostName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Mute a host. + * + * See {@link #muteHostWithHttpInfoAsync}. + * + * @param hostName Name of the host to mute. (required) + * @param body Mute a host request body. (required) + * @return CompletableFuture<HostMuteResponse> + */ + public CompletableFuturemuteHostAsync(String hostName, HostMuteSettings body) { + return muteHostWithHttpInfoAsync(hostName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Mute a host. + *

Mute a host.

* * @param hostName Name of the host to mute. (required) * @param body Mute a host request body. (required) * @return ApiResponse<HostMuteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -556,14 +476,12 @@ public CompletableFuture muteHostAsync(String hostName, HostMu * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse muteHostWithHttpInfo(String hostName, HostMuteSettings body) - throws ApiException { + public ApiResponse muteHostWithHttpInfo(String hostName, HostMuteSettings body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'hostName' is set if (hostName == null) { - throw new ApiException( - 400, "Missing the required parameter 'hostName' when calling muteHost"); + throw new ApiException(400, "Missing the required parameter 'hostName' when calling muteHost"); } // verify the required parameter 'body' is set @@ -571,131 +489,97 @@ public ApiResponse muteHostWithHttpInfo(String hostName, HostM throw new ApiException(400, "Missing the required parameter 'body' when calling muteHost"); } // create path and map variables - String localVarPath = - "/api/v1/host/{host_name}/mute" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/host/{host_name}/mute" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.HostsApi.muteHost", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.HostsApi.muteHost", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Mute a host. * - *

See {@link #muteHostWithHttpInfo}. + * See {@link #muteHostWithHttpInfo}. * * @param hostName Name of the host to mute. (required) * @param body Mute a host request body. (required) * @return CompletableFuture<ApiResponse<HostMuteResponse>> */ - public CompletableFuture> muteHostWithHttpInfoAsync( - String hostName, HostMuteSettings body) { + public CompletableFuture> muteHostWithHttpInfoAsync(String hostName, HostMuteSettings body) { Object localVarPostBody = body; // verify the required parameter 'hostName' is set if (hostName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'hostName' when calling muteHost")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'hostName' when calling muteHost")); + 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 muteHost")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling muteHost")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/host/{host_name}/mute" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/host/{host_name}/mute" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.HostsApi.muteHost", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.HostsApi.muteHost", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Unmute a host. - * - *

See {@link #unmuteHostWithHttpInfo}. - * - * @param hostName Name of the host to unmute. (required) - * @return HostMuteResponse - * @throws ApiException if fails to make API call - */ - public HostMuteResponse unmuteHost(String hostName) throws ApiException { + * Unmute a host. + * + * See {@link #unmuteHostWithHttpInfo}. + * + * @param hostName Name of the host to unmute. (required) + * @return HostMuteResponse + * @throws ApiException if fails to make API call + */ + public HostMuteResponse unmuteHost(String hostName) throws ApiException { return unmuteHostWithHttpInfo(hostName).getData(); } /** - * Unmute a host. - * - *

See {@link #unmuteHostWithHttpInfoAsync}. - * - * @param hostName Name of the host to unmute. (required) - * @return CompletableFuture<HostMuteResponse> - */ - public CompletableFuture unmuteHostAsync(String hostName) { - return unmuteHostWithHttpInfoAsync(hostName) - .thenApply( - response -> { - return response.getData(); - }); + * Unmute a host. + * + * See {@link #unmuteHostWithHttpInfoAsync}. + * + * @param hostName Name of the host to unmute. (required) + * @return CompletableFuture<HostMuteResponse> + */ + public CompletableFutureunmuteHostAsync(String hostName) { + return unmuteHostWithHttpInfoAsync(hostName).thenApply(response -> { + return response.getData(); + }); } + /** - * Unmutes a host. This endpoint takes no JSON arguments. + *

Unmutes a host. This endpoint takes no JSON arguments.

* * @param hostName Name of the host to unmute. (required) * @return ApiResponse<HostMuteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -709,87 +593,53 @@ public ApiResponse unmuteHostWithHttpInfo(String hostName) thr // verify the required parameter 'hostName' is set if (hostName == null) { - throw new ApiException( - 400, "Missing the required parameter 'hostName' when calling unmuteHost"); + throw new ApiException(400, "Missing the required parameter 'hostName' when calling unmuteHost"); } // create path and map variables - String localVarPath = - "/api/v1/host/{host_name}/unmute" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/host/{host_name}/unmute" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.HostsApi.unmuteHost", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.HostsApi.unmuteHost", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Unmute a host. * - *

See {@link #unmuteHostWithHttpInfo}. + * See {@link #unmuteHostWithHttpInfo}. * * @param hostName Name of the host to unmute. (required) * @return CompletableFuture<ApiResponse<HostMuteResponse>> */ - public CompletableFuture> unmuteHostWithHttpInfoAsync( - String hostName) { + public CompletableFuture> unmuteHostWithHttpInfoAsync(String hostName) { Object localVarPostBody = null; // verify the required parameter 'hostName' is set if (hostName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'hostName' when calling unmuteHost")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'hostName' when calling unmuteHost")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/host/{host_name}/unmute" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/host/{host_name}/unmute" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.HostsApi.unmuteHost", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.HostsApi.unmuteHost", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/IpRangesApi.java b/src/main/java/com/datadog/api/client/v1/api/IpRangesApi.java index 12870eea8ae..e21af3c4a9d 100644 --- a/src/main/java/com/datadog/api/client/v1/api/IpRangesApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/IpRangesApi.java @@ -1,22 +1,30 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.IPRanges; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.IPRanges; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IpRangesApi { private ApiClient apiClient; - public IpRangesApi() { this(ApiClient.getDefaultApiClient()); } @@ -44,39 +52,38 @@ public void setApiClient(ApiClient apiClient) { } /** - * List IP Ranges. - * - *

See {@link #getIPRangesWithHttpInfo}. - * - * @return IPRanges - * @throws ApiException if fails to make API call - */ - public IPRanges getIPRanges() throws ApiException { + * List IP Ranges. + * + * See {@link #getIPRangesWithHttpInfo}. + * + * @return IPRanges + * @throws ApiException if fails to make API call + */ + public IPRanges getIPRanges() throws ApiException { return getIPRangesWithHttpInfo().getData(); } /** - * List IP Ranges. - * - *

See {@link #getIPRangesWithHttpInfoAsync}. - * - * @return CompletableFuture<IPRanges> - */ - public CompletableFuture getIPRangesAsync() { - return getIPRangesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List IP Ranges. + * + * See {@link #getIPRangesWithHttpInfoAsync}. + * + * @return CompletableFuture<IPRanges> + */ + public CompletableFuturegetIPRangesAsync() { + return getIPRangesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get information about Datadog IP ranges. + *

Get information about Datadog IP ranges.

* * @return ApiResponse<IPRanges> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -88,32 +95,18 @@ public ApiResponse getIPRangesWithHttpInfo() throws ApiException { // create path and map variables String localVarPath = "/"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.IpRangesApi.getIPRanges", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.IpRangesApi.getIPRanges", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List IP Ranges. * - *

See {@link #getIPRangesWithHttpInfo}. + * See {@link #getIPRangesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<IPRanges>> */ @@ -122,32 +115,18 @@ public CompletableFuture> getIPRangesWithHttpInfoAsync() { // create path and map variables String localVarPath = "/"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.IpRangesApi.getIPRanges", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {}); + builder = apiClient.createBuilder("v1.IpRangesApi.getIPRanges", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { }); } 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() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java b/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java index a2eff1a6816..870a8b8b397 100644 --- a/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java @@ -1,27 +1,35 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.ApiKey; -import com.datadog.api.client.v1.model.ApiKeyListResponse; -import com.datadog.api.client.v1.model.ApiKeyResponse; -import com.datadog.api.client.v1.model.ApplicationKey; -import com.datadog.api.client.v1.model.ApplicationKeyListResponse; -import com.datadog.api.client.v1.model.ApplicationKeyResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.ApiKeyListResponse; +import com.datadog.api.client.v1.model.ApiKeyResponse; +import com.datadog.api.client.v1.model.ApiKey; +import com.datadog.api.client.v1.model.ApplicationKeyListResponse; +import com.datadog.api.client.v1.model.ApplicationKeyResponse; +import com.datadog.api.client.v1.model.ApplicationKey; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class KeyManagementApi { private ApiClient apiClient; - public KeyManagementApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,42 +57,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an API key. - * - *

See {@link #createAPIKeyWithHttpInfo}. - * - * @param body (required) - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - */ - public ApiKeyResponse createAPIKey(ApiKey body) throws ApiException { + * Create an API key. + * + * See {@link #createAPIKeyWithHttpInfo}. + * + * @param body (required) + * @return ApiKeyResponse + * @throws ApiException if fails to make API call + */ + public ApiKeyResponse createAPIKey(ApiKey body) throws ApiException { return createAPIKeyWithHttpInfo(body).getData(); } /** - * Create an API key. - * - *

See {@link #createAPIKeyWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<ApiKeyResponse> - */ - public CompletableFuture createAPIKeyAsync(ApiKey body) { - return createAPIKeyWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an API key. + * + * See {@link #createAPIKeyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ApiKeyResponse> + */ + public CompletableFuturecreateAPIKeyAsync(ApiKey body) { + return createAPIKeyWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Creates an API key with a given name. + *

Creates an API key with a given name.

* - * @param body (required) + * @param body (required) * @return ApiResponse<ApiKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -98,40 +105,25 @@ public ApiResponse createAPIKeyWithHttpInfo(ApiKey body) throws // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAPIKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAPIKey"); } // create path and map variables String localVarPath = "/api/v1/api_key"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.createAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.createAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an API key. * - *

See {@link #createAPIKeyWithHttpInfo}. + * See {@link #createAPIKeyWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApiKeyResponse>> */ public CompletableFuture> createAPIKeyWithHttpInfoAsync(ApiKey body) { @@ -139,80 +131,64 @@ public CompletableFuture> createAPIKeyWithHttpInfoAs // 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 createAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAPIKey")); + return result; } // create path and map variables String localVarPath = "/api/v1/api_key"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.createAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.createAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create an application key. - * - *

See {@link #createApplicationKeyWithHttpInfo}. - * - * @param body (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse createApplicationKey(ApplicationKey body) throws ApiException { + * Create an application key. + * + * See {@link #createApplicationKeyWithHttpInfo}. + * + * @param body (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse createApplicationKey(ApplicationKey body) throws ApiException { return createApplicationKeyWithHttpInfo(body).getData(); } /** - * Create an application key. - * - *

See {@link #createApplicationKeyWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture createApplicationKeyAsync(ApplicationKey body) { - return createApplicationKeyWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an application key. + * + * See {@link #createApplicationKeyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturecreateApplicationKeyAsync(ApplicationKey body) { + return createApplicationKeyWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an application key with a given name. + *

Create an application key with a given name.

* - * @param body (required) + * @param body (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -222,129 +198,95 @@ public CompletableFuture createApplicationKeyAsync(Appli * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createApplicationKeyWithHttpInfo(ApplicationKey body) - throws ApiException { + public ApiResponse createApplicationKeyWithHttpInfo(ApplicationKey body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createApplicationKey"); } // create path and map variables String localVarPath = "/api/v1/application_key"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.createApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.createApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an application key. * - *

See {@link #createApplicationKeyWithHttpInfo}. + * See {@link #createApplicationKeyWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - createApplicationKeyWithHttpInfoAsync(ApplicationKey body) { + public CompletableFuture> createApplicationKeyWithHttpInfoAsync(ApplicationKey body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createApplicationKey")); + return result; } // create path and map variables String localVarPath = "/api/v1/application_key"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.createApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.createApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an API key. - * - *

See {@link #deleteAPIKeyWithHttpInfo}. - * - * @param key The specific API key you are working with. (required) - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - */ - public ApiKeyResponse deleteAPIKey(String key) throws ApiException { + * Delete an API key. + * + * See {@link #deleteAPIKeyWithHttpInfo}. + * + * @param key The specific API key you are working with. (required) + * @return ApiKeyResponse + * @throws ApiException if fails to make API call + */ + public ApiKeyResponse deleteAPIKey(String key) throws ApiException { return deleteAPIKeyWithHttpInfo(key).getData(); } /** - * Delete an API key. - * - *

See {@link #deleteAPIKeyWithHttpInfoAsync}. - * - * @param key The specific API key you are working with. (required) - * @return CompletableFuture<ApiKeyResponse> - */ - public CompletableFuture deleteAPIKeyAsync(String key) { - return deleteAPIKeyWithHttpInfoAsync(key) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an API key. + * + * See {@link #deleteAPIKeyWithHttpInfoAsync}. + * + * @param key The specific API key you are working with. (required) + * @return CompletableFuture<ApiKeyResponse> + */ + public CompletableFuturedeleteAPIKeyAsync(String key) { + return deleteAPIKeyWithHttpInfoAsync(key).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given API key. + *

Delete a given API key.

* * @param key The specific API key you are working with. (required) * @return ApiResponse<ApiKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -362,36 +304,21 @@ public ApiResponse deleteAPIKeyWithHttpInfo(String key) throws A throw new ApiException(400, "Missing the required parameter 'key' when calling deleteAPIKey"); } // create path and map variables - String localVarPath = - "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/api_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.deleteAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.deleteAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete an API key. * - *

See {@link #deleteAPIKeyWithHttpInfo}. + * See {@link #deleteAPIKeyWithHttpInfo}. * * @param key The specific API key you are working with. (required) * @return CompletableFuture<ApiResponse<ApiKeyResponse>> @@ -401,82 +328,65 @@ public CompletableFuture> deleteAPIKeyWithHttpInfoAs // verify the required parameter 'key' is set if (key == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'key' when calling deleteAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'key' when calling deleteAPIKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/api_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.deleteAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.deleteAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an application key. - * - *

See {@link #deleteApplicationKeyWithHttpInfo}. - * - * @param key The specific APP key you are working with. (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse deleteApplicationKey(String key) throws ApiException { + * Delete an application key. + * + * See {@link #deleteApplicationKeyWithHttpInfo}. + * + * @param key The specific APP key you are working with. (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse deleteApplicationKey(String key) throws ApiException { return deleteApplicationKeyWithHttpInfo(key).getData(); } /** - * Delete an application key. - * - *

See {@link #deleteApplicationKeyWithHttpInfoAsync}. - * - * @param key The specific APP key you are working with. (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture deleteApplicationKeyAsync(String key) { - return deleteApplicationKeyWithHttpInfoAsync(key) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an application key. + * + * See {@link #deleteApplicationKeyWithHttpInfoAsync}. + * + * @param key The specific APP key you are working with. (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturedeleteApplicationKeyAsync(String key) { + return deleteApplicationKeyWithHttpInfoAsync(key).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given application key. + *

Delete a given application key.

* * @param key The specific APP key you are working with. (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -485,133 +395,97 @@ public CompletableFuture deleteApplicationKeyAsync(Strin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteApplicationKeyWithHttpInfo(String key) - throws ApiException { + public ApiResponse deleteApplicationKeyWithHttpInfo(String key) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'key' is set if (key == null) { - throw new ApiException( - 400, "Missing the required parameter 'key' when calling deleteApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'key' when calling deleteApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/application_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.deleteApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.deleteApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete an application key. * - *

See {@link #deleteApplicationKeyWithHttpInfo}. + * See {@link #deleteApplicationKeyWithHttpInfo}. * * @param key The specific APP key you are working with. (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - deleteApplicationKeyWithHttpInfoAsync(String key) { + public CompletableFuture> deleteApplicationKeyWithHttpInfoAsync(String key) { Object localVarPostBody = null; // verify the required parameter 'key' is set if (key == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'key' when calling deleteApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'key' when calling deleteApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/application_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.deleteApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.deleteApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get API key. - * - *

See {@link #getAPIKeyWithHttpInfo}. - * - * @param key The specific API key you are working with. (required) - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - */ - public ApiKeyResponse getAPIKey(String key) throws ApiException { + * Get API key. + * + * See {@link #getAPIKeyWithHttpInfo}. + * + * @param key The specific API key you are working with. (required) + * @return ApiKeyResponse + * @throws ApiException if fails to make API call + */ + public ApiKeyResponse getAPIKey(String key) throws ApiException { return getAPIKeyWithHttpInfo(key).getData(); } /** - * Get API key. - * - *

See {@link #getAPIKeyWithHttpInfoAsync}. - * - * @param key The specific API key you are working with. (required) - * @return CompletableFuture<ApiKeyResponse> - */ - public CompletableFuture getAPIKeyAsync(String key) { - return getAPIKeyWithHttpInfoAsync(key) - .thenApply( - response -> { - return response.getData(); - }); + * Get API key. + * + * See {@link #getAPIKeyWithHttpInfoAsync}. + * + * @param key The specific API key you are working with. (required) + * @return CompletableFuture<ApiKeyResponse> + */ + public CompletableFuturegetAPIKeyAsync(String key) { + return getAPIKeyWithHttpInfoAsync(key).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a given API key. + *

Get a given API key.

* * @param key The specific API key you are working with. (required) * @return ApiResponse<ApiKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -628,36 +502,21 @@ public ApiResponse getAPIKeyWithHttpInfo(String key) throws ApiE throw new ApiException(400, "Missing the required parameter 'key' when calling getAPIKey"); } // create path and map variables - String localVarPath = - "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/api_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.getAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.getAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get API key. * - *

See {@link #getAPIKeyWithHttpInfo}. + * See {@link #getAPIKeyWithHttpInfo}. * * @param key The specific API key you are working with. (required) * @return CompletableFuture<ApiResponse<ApiKeyResponse>> @@ -667,82 +526,65 @@ public CompletableFuture> getAPIKeyWithHttpInfoAsync // verify the required parameter 'key' is set if (key == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'key' when calling getAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'key' when calling getAPIKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/api_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.getAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.getAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get an application key. - * - *

See {@link #getApplicationKeyWithHttpInfo}. - * - * @param key The specific APP key you are working with. (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse getApplicationKey(String key) throws ApiException { + * Get an application key. + * + * See {@link #getApplicationKeyWithHttpInfo}. + * + * @param key The specific APP key you are working with. (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse getApplicationKey(String key) throws ApiException { return getApplicationKeyWithHttpInfo(key).getData(); } /** - * Get an application key. - * - *

See {@link #getApplicationKeyWithHttpInfoAsync}. - * - * @param key The specific APP key you are working with. (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture getApplicationKeyAsync(String key) { - return getApplicationKeyWithHttpInfoAsync(key) - .thenApply( - response -> { - return response.getData(); - }); + * Get an application key. + * + * See {@link #getApplicationKeyWithHttpInfoAsync}. + * + * @param key The specific APP key you are working with. (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturegetApplicationKeyAsync(String key) { + return getApplicationKeyWithHttpInfoAsync(key).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a given application key. + *

Get a given application key.

* * @param key The specific APP key you are working with. (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -751,130 +593,94 @@ public CompletableFuture getApplicationKeyAsync(String k * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getApplicationKeyWithHttpInfo(String key) - throws ApiException { + public ApiResponse getApplicationKeyWithHttpInfo(String key) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'key' is set if (key == null) { - throw new ApiException( - 400, "Missing the required parameter 'key' when calling getApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'key' when calling getApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/application_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.getApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.getApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an application key. * - *

See {@link #getApplicationKeyWithHttpInfo}. + * See {@link #getApplicationKeyWithHttpInfo}. * * @param key The specific APP key you are working with. (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> getApplicationKeyWithHttpInfoAsync( - String key) { + public CompletableFuture> getApplicationKeyWithHttpInfoAsync(String key) { Object localVarPostBody = null; // verify the required parameter 'key' is set if (key == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'key' when calling getApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'key' when calling getApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/application_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.getApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.getApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all API keys. - * - *

See {@link #listAPIKeysWithHttpInfo}. - * - * @return ApiKeyListResponse - * @throws ApiException if fails to make API call - */ - public ApiKeyListResponse listAPIKeys() throws ApiException { + * Get all API keys. + * + * See {@link #listAPIKeysWithHttpInfo}. + * + * @return ApiKeyListResponse + * @throws ApiException if fails to make API call + */ + public ApiKeyListResponse listAPIKeys() throws ApiException { return listAPIKeysWithHttpInfo().getData(); } /** - * Get all API keys. - * - *

See {@link #listAPIKeysWithHttpInfoAsync}. - * - * @return CompletableFuture<ApiKeyListResponse> - */ - public CompletableFuture listAPIKeysAsync() { - return listAPIKeysWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all API keys. + * + * See {@link #listAPIKeysWithHttpInfoAsync}. + * + * @return CompletableFuture<ApiKeyListResponse> + */ + public CompletableFuturelistAPIKeysAsync() { + return listAPIKeysWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get all API keys available for your account. + *

Get all API keys available for your account.

* * @return ApiResponse<ApiKeyListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -887,32 +693,18 @@ public ApiResponse listAPIKeysWithHttpInfo() throws ApiExcep // create path and map variables String localVarPath = "/api/v1/api_key"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.listAPIKeys", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.listAPIKeys", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all API keys. * - *

See {@link #listAPIKeysWithHttpInfo}. + * See {@link #listAPIKeysWithHttpInfo}. * * @return CompletableFuture<ApiResponse<ApiKeyListResponse>> */ @@ -921,69 +713,54 @@ public CompletableFuture> listAPIKeysWithHttpInf // create path and map variables String localVarPath = "/api/v1/api_key"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.listAPIKeys", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.listAPIKeys", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all application keys. - * - *

See {@link #listApplicationKeysWithHttpInfo}. - * - * @return ApplicationKeyListResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyListResponse listApplicationKeys() throws ApiException { + * Get all application keys. + * + * See {@link #listApplicationKeysWithHttpInfo}. + * + * @return ApplicationKeyListResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyListResponse listApplicationKeys() throws ApiException { return listApplicationKeysWithHttpInfo().getData(); } /** - * Get all application keys. - * - *

See {@link #listApplicationKeysWithHttpInfoAsync}. - * - * @return CompletableFuture<ApplicationKeyListResponse> - */ - public CompletableFuture listApplicationKeysAsync() { - return listApplicationKeysWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all application keys. + * + * See {@link #listApplicationKeysWithHttpInfoAsync}. + * + * @return CompletableFuture<ApplicationKeyListResponse> + */ + public CompletableFuturelistApplicationKeysAsync() { + return listApplicationKeysWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get all application keys available for your Datadog account. + *

Get all application keys available for your Datadog account.

* * @return ApiResponse<ApplicationKeyListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -991,116 +768,85 @@ public CompletableFuture listApplicationKeysAsync() * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listApplicationKeysWithHttpInfo() - throws ApiException { + public ApiResponse listApplicationKeysWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/application_key"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.listApplicationKeys", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.listApplicationKeys", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all application keys. * - *

See {@link #listApplicationKeysWithHttpInfo}. + * See {@link #listApplicationKeysWithHttpInfo}. * * @return CompletableFuture<ApiResponse<ApplicationKeyListResponse>> */ - public CompletableFuture> - listApplicationKeysWithHttpInfoAsync() { + public CompletableFuture> listApplicationKeysWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/application_key"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.listApplicationKeys", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.listApplicationKeys", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an API key. - * - *

See {@link #updateAPIKeyWithHttpInfo}. - * - * @param key The specific API key you are working with. (required) - * @param body (required) - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - */ - public ApiKeyResponse updateAPIKey(String key, ApiKey body) throws ApiException { + * Edit an API key. + * + * See {@link #updateAPIKeyWithHttpInfo}. + * + * @param key The specific API key you are working with. (required) + * @param body (required) + * @return ApiKeyResponse + * @throws ApiException if fails to make API call + */ + public ApiKeyResponse updateAPIKey(String key, ApiKey body) throws ApiException { return updateAPIKeyWithHttpInfo(key, body).getData(); } /** - * Edit an API key. - * - *

See {@link #updateAPIKeyWithHttpInfoAsync}. - * - * @param key The specific API key you are working with. (required) - * @param body (required) - * @return CompletableFuture<ApiKeyResponse> - */ - public CompletableFuture updateAPIKeyAsync(String key, ApiKey body) { - return updateAPIKeyWithHttpInfoAsync(key, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an API key. + * + * See {@link #updateAPIKeyWithHttpInfoAsync}. + * + * @param key The specific API key you are working with. (required) + * @param body (required) + * @return CompletableFuture<ApiKeyResponse> + */ + public CompletableFutureupdateAPIKeyAsync(String key, ApiKey body) { + return updateAPIKeyWithHttpInfoAsync(key, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit an API key name. + *

Edit an API key name.

* * @param key The specific API key you are working with. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<ApiKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1110,8 +856,7 @@ public CompletableFuture updateAPIKeyAsync(String key, ApiKey bo * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAPIKeyWithHttpInfo(String key, ApiKey body) - throws ApiException { + public ApiResponse updateAPIKeyWithHttpInfo(String key, ApiKey body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'key' is set @@ -1121,140 +866,103 @@ public ApiResponse updateAPIKeyWithHttpInfo(String key, ApiKey b // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAPIKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAPIKey"); } // create path and map variables - String localVarPath = - "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/api_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.updateAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.updateAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an API key. * - *

See {@link #updateAPIKeyWithHttpInfo}. + * See {@link #updateAPIKeyWithHttpInfo}. * * @param key The specific API key you are working with. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApiKeyResponse>> */ - public CompletableFuture> updateAPIKeyWithHttpInfoAsync( - String key, ApiKey body) { + public CompletableFuture> updateAPIKeyWithHttpInfoAsync(String key, ApiKey body) { Object localVarPostBody = body; // verify the required parameter 'key' is set if (key == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'key' when calling updateAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'key' when calling updateAPIKey")); + 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 updateAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAPIKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/api_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.updateAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.updateAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an application key. - * - *

See {@link #updateApplicationKeyWithHttpInfo}. - * - * @param key The specific APP key you are working with. (required) - * @param body (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse updateApplicationKey(String key, ApplicationKey body) - throws ApiException { + * Edit an application key. + * + * See {@link #updateApplicationKeyWithHttpInfo}. + * + * @param key The specific APP key you are working with. (required) + * @param body (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse updateApplicationKey(String key, ApplicationKey body) throws ApiException { return updateApplicationKeyWithHttpInfo(key, body).getData(); } /** - * Edit an application key. - * - *

See {@link #updateApplicationKeyWithHttpInfoAsync}. - * - * @param key The specific APP key you are working with. (required) - * @param body (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture updateApplicationKeyAsync( - String key, ApplicationKey body) { - return updateApplicationKeyWithHttpInfoAsync(key, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an application key. + * + * See {@link #updateApplicationKeyWithHttpInfoAsync}. + * + * @param key The specific APP key you are working with. (required) + * @param body (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFutureupdateApplicationKeyAsync(String key, ApplicationKey body) { + return updateApplicationKeyWithHttpInfoAsync(key, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit an application key name. + *

Edit an application key name.

* * @param key The specific APP key you are working with. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1265,109 +973,71 @@ public CompletableFuture updateApplicationKeyAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateApplicationKeyWithHttpInfo( - String key, ApplicationKey body) throws ApiException { + public ApiResponse updateApplicationKeyWithHttpInfo(String key, ApplicationKey body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'key' is set if (key == null) { - throw new ApiException( - 400, "Missing the required parameter 'key' when calling updateApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'key' when calling updateApplicationKey"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/application_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.KeyManagementApi.updateApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.KeyManagementApi.updateApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an application key. * - *

See {@link #updateApplicationKeyWithHttpInfo}. + * See {@link #updateApplicationKeyWithHttpInfo}. * * @param key The specific APP key you are working with. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - updateApplicationKeyWithHttpInfoAsync(String key, ApplicationKey body) { + public CompletableFuture> updateApplicationKeyWithHttpInfoAsync(String key, ApplicationKey body) { Object localVarPostBody = body; // verify the required parameter 'key' is set if (key == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'key' when calling updateApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'key' when calling updateApplicationKey")); + 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 updateApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + String localVarPath = "/api/v1/application_key/{key}" + .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.KeyManagementApi.updateApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.KeyManagementApi.updateApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/LogsApi.java b/src/main/java/com/datadog/api/client/v1/api/LogsApi.java index f352c4a6fb4..531431d32be 100644 --- a/src/main/java/com/datadog/api/client/v1/api/LogsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/LogsApi.java @@ -1,26 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.ContentEncoding; -import com.datadog.api.client.v1.model.HTTPLogItem; -import com.datadog.api.client.v1.model.LogsListRequest; -import com.datadog.api.client.v1.model.LogsListResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.LogsListResponse; +import com.datadog.api.client.v1.model.LogsListRequest; +import com.datadog.api.client.v1.model.ContentEncoding; +import com.datadog.api.client.v1.model.HTTPLogItem; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsApi { private ApiClient apiClient; - public LogsApi() { this(ApiClient.getDefaultApiClient()); } @@ -48,48 +55,45 @@ public void setApiClient(ApiClient apiClient) { } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfo}. - * - * @param body Logs filter (required) - * @return LogsListResponse - * @throws ApiException if fails to make API call - */ - public LogsListResponse listLogs(LogsListRequest body) throws ApiException { + * Search logs. + * + * See {@link #listLogsWithHttpInfo}. + * + * @param body Logs filter (required) + * @return LogsListResponse + * @throws ApiException if fails to make API call + */ + public LogsListResponse listLogs(LogsListRequest body) throws ApiException { return listLogsWithHttpInfo(body).getData(); } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfoAsync}. - * - * @param body Logs filter (required) - * @return CompletableFuture<LogsListResponse> - */ - public CompletableFuture listLogsAsync(LogsListRequest body) { - return listLogsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Search logs. + * + * See {@link #listLogsWithHttpInfoAsync}. + * + * @param body Logs filter (required) + * @return CompletableFuture<LogsListResponse> + */ + public CompletableFuturelistLogsAsync(LogsListRequest body) { + return listLogsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * List endpoint returns logs that match a log search query. Results are paginated. - * - *

If you are considering archiving logs for your organization, consider use of the - * Datadog archive capabilities instead of the log list API. See Datadog Logs Archive - * documentation. + *

List endpoint returns logs that match a log search query. + * Results are paginated.

+ *

If you are considering archiving logs for your organization, + * consider use of the Datadog archive capabilities instead of the log list API. + * See Datadog Logs Archive documentation.

* * @param body Logs filter (required) * @return ApiResponse<LogsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -98,8 +102,7 @@ public CompletableFuture listLogsAsync(LogsListRequest body) { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listLogsWithHttpInfo(LogsListRequest body) - throws ApiException { + public ApiResponse listLogsWithHttpInfo(LogsListRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -109,87 +112,58 @@ public ApiResponse listLogsWithHttpInfo(LogsListRequest body) // create path and map variables String localVarPath = "/api/v1/logs-queries/list"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsApi.listLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsApi.listLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search logs. * - *

See {@link #listLogsWithHttpInfo}. + * See {@link #listLogsWithHttpInfo}. * * @param body Logs filter (required) * @return CompletableFuture<ApiResponse<LogsListResponse>> */ - public CompletableFuture> listLogsWithHttpInfoAsync( - LogsListRequest body) { + public CompletableFuture> listLogsWithHttpInfoAsync(LogsListRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling listLogs")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling listLogs")); + return result; } // create path and map variables String localVarPath = "/api/v1/logs-queries/list"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsApi.listLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsApi.listLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to submitLog. */ + /** + * Manage optional parameters to submitLog. + */ public static class SubmitLogOptionalParameters { private ContentEncoding contentEncoding; private String ddtags; /** * Set contentEncoding. - * * @param contentEncoding HTTP header used to compress the media-type. (optional) * @return SubmitLogOptionalParameters */ @@ -200,9 +174,7 @@ public SubmitLogOptionalParameters contentEncoding(ContentEncoding contentEncodi /** * Set ddtags. - * - * @param ddtags Log tags can be passed as query parameters with text/plain content - * type. (optional) + * @param ddtags Log tags can be passed as query parameters with text/plain content type. (optional) * @return SubmitLogOptionalParameters */ public SubmitLogOptionalParameters ddtags(String ddtags) { @@ -212,114 +184,105 @@ public SubmitLogOptionalParameters ddtags(String ddtags) { } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfo}. - * - * @param body Log to send (JSON format). (required) - * @return Object - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public Object submitLog(List body) throws ApiException { - return submitLogWithHttpInfo(body, new SubmitLogOptionalParameters()).getData(); + * Send logs. + * + * See {@link #submitLogWithHttpInfo}. + * + * @param body Log to send (JSON format). (required) + * @return Object + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public Object submitLog (List body) throws ApiException { + return submitLogWithHttpInfo( body, new SubmitLogOptionalParameters()).getData(); } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfoAsync}. - * - * @param body Log to send (JSON format). (required) - * @return CompletableFuture<Object> - * @deprecated - */ - @Deprecated - public CompletableFuture submitLogAsync(List body) { - return submitLogWithHttpInfoAsync(body, new SubmitLogOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Send logs. + * + * See {@link #submitLogWithHttpInfoAsync}. + * + * @param body Log to send (JSON format). (required) + * @return CompletableFuture<Object> + * @deprecated + */ +@Deprecated + public CompletableFuturesubmitLogAsync(List body) { + return submitLogWithHttpInfoAsync(body, new SubmitLogOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfo}. - * - * @param body Log to send (JSON format). (required) - * @param parameters Optional parameters for the request. - * @return Object - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public Object submitLog(List body, SubmitLogOptionalParameters parameters) - throws ApiException { + * Send logs. + * + * See {@link #submitLogWithHttpInfo}. + * + * @param body Log to send (JSON format). (required) + * @param parameters Optional parameters for the request. + * @return Object + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public Object submitLog(List body, SubmitLogOptionalParameters parameters) throws ApiException { return submitLogWithHttpInfo(body, parameters).getData(); } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfoAsync}. - * - * @param body Log to send (JSON format). (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<Object> - * @deprecated - */ - @Deprecated - public CompletableFuture submitLogAsync( - List body, SubmitLogOptionalParameters parameters) { - return submitLogWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Send logs. + * + * See {@link #submitLogWithHttpInfoAsync}. + * + * @param body Log to send (JSON format). (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Object> + * @deprecated + */ +@Deprecated + public CompletableFuturesubmitLogAsync( List body, SubmitLogOptionalParameters parameters) { + return submitLogWithHttpInfoAsync(body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Send your logs to your Datadog platform over HTTP. Limits per HTTP request are: - * + *

Send your logs to your Datadog platform over HTTP. Limits per HTTP request are:

*
    - *
  • Maximum content size per payload (uncompressed): 5MB - *
  • Maximum size for a single log: 1MB - *
  • Maximum array size if sending multiple logs in an array: 1000 entries + *
  • Maximum content size per payload (uncompressed): 5MB
  • + *
  • Maximum size for a single log: 1MB
  • + *
  • Maximum array size if sending multiple logs in an array: 1000 entries
  • *
- * - *

Any log exceeding 1MB is accepted and truncated by Datadog: - For a single log request, the - * API truncates the log at 1MB and returns a 2xx. - For a multi-logs request, the API processes - * all logs, truncates only logs larger than 1MB, and returns a 2xx. - * - *

Datadog recommends sending your logs compressed. Add the Content-Encoding: gzip - * header to the request when sending compressed logs. - * - *

The status codes answered by the HTTP API are: - 200: OK - 400: Bad request (likely an issue - * in the payload formatting) - 403: Permission issue (likely using an invalid API Key) - 413: - * Payload too large (batch is above 5MB uncompressed) - 5xx: Internal error, request should be - * retried after some time + *

Any log exceeding 1MB is accepted and truncated by Datadog: + * - For a single log request, the API truncates the log at 1MB and returns a 2xx. + * - For a multi-logs request, the API processes all logs, truncates only logs larger than 1MB, and returns a 2xx.

+ *

Datadog recommends sending your logs compressed. + * Add the Content-Encoding: gzip header to the request when sending compressed logs.

+ *

The status codes answered by the HTTP API are: + * - 200: OK + * - 400: Bad request (likely an issue in the payload formatting) + * - 403: Permission issue (likely using an invalid API Key) + * - 413: Payload too large (batch is above 5MB uncompressed) + * - 5xx: Internal error, request should be retried after some time

* * @param body Log to send (JSON format). (required) * @param parameters Optional parameters for the request. * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * * * *
Response details
Status Code Description Response Headers
200 Response from server (always 200 empty JSON). -
400 unexpected error -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse submitLogWithHttpInfo( - List body, SubmitLogOptionalParameters parameters) throws ApiException { + public ApiResponse submitLogWithHttpInfo(List body, SubmitLogOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -331,39 +294,21 @@ public ApiResponse submitLogWithHttpInfo( // create path and map variables String localVarPath = "/v1/input"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "ddtags", ddtags)); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsApi.submitLog", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] { - "application/json", "application/json;simple", "application/logplex-1", "text/plain" - }, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsApi.submitLog", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json", "application/json;simple", "application/logplex-1", "text/plain" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Send logs. * - *

See {@link #submitLogWithHttpInfo}. + * See {@link #submitLogWithHttpInfo}. * * @param body Log to send (JSON format). (required) * @param parameters Optional parameters for the request. @@ -371,55 +316,35 @@ public ApiResponse submitLogWithHttpInfo( * @deprecated */ @Deprecated - public CompletableFuture> submitLogWithHttpInfoAsync( - List body, SubmitLogOptionalParameters parameters) { + public CompletableFuture> submitLogWithHttpInfoAsync(List body, SubmitLogOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling submitLog")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling submitLog")); + return result; } ContentEncoding contentEncoding = parameters.contentEncoding; String ddtags = parameters.ddtags; // create path and map variables String localVarPath = "/v1/input"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "ddtags", ddtags)); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsApi.submitLog", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsApi.submitLog", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] { - "application/json", "application/json;simple", "application/logplex-1", "text/plain" - }, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json", "application/json;simple", "application/logplex-1", "text/plain" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/LogsIndexesApi.java b/src/main/java/com/datadog/api/client/v1/api/LogsIndexesApi.java index 7d240d232e6..43b414cd2c8 100644 --- a/src/main/java/com/datadog/api/client/v1/api/LogsIndexesApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/LogsIndexesApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.LogsIndex; -import com.datadog.api.client.v1.model.LogsIndexListResponse; -import com.datadog.api.client.v1.model.LogsIndexUpdateRequest; -import com.datadog.api.client.v1.model.LogsIndexesOrder; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.LogsIndexesOrder; +import com.datadog.api.client.v1.model.LogsIndexListResponse; +import com.datadog.api.client.v1.model.LogsIndex; +import com.datadog.api.client.v1.model.LogsIndexUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsIndexesApi { private ApiClient apiClient; - public LogsIndexesApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,43 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an index. - * - *

See {@link #createLogsIndexWithHttpInfo}. - * - * @param body Object containing the new index. (required) - * @return LogsIndex - * @throws ApiException if fails to make API call - */ - public LogsIndex createLogsIndex(LogsIndex body) throws ApiException { + * Create an index. + * + * See {@link #createLogsIndexWithHttpInfo}. + * + * @param body Object containing the new index. (required) + * @return LogsIndex + * @throws ApiException if fails to make API call + */ + public LogsIndex createLogsIndex(LogsIndex body) throws ApiException { return createLogsIndexWithHttpInfo(body).getData(); } /** - * Create an index. - * - *

See {@link #createLogsIndexWithHttpInfoAsync}. - * - * @param body Object containing the new index. (required) - * @return CompletableFuture<LogsIndex> - */ - public CompletableFuture createLogsIndexAsync(LogsIndex body) { - return createLogsIndexWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an index. + * + * See {@link #createLogsIndexWithHttpInfoAsync}. + * + * @param body Object containing the new index. (required) + * @return CompletableFuture<LogsIndex> + */ + public CompletableFuturecreateLogsIndexAsync(LogsIndex body) { + return createLogsIndexWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Creates a new index. Returns the Index object passed in the request body when the request is - * successful. + *

Creates a new index. Returns the Index object passed in the request body when the request is successful.

* * @param body Object containing the new index. (required) * @return ApiResponse<LogsIndex> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,123 +103,90 @@ public ApiResponse createLogsIndexWithHttpInfo(LogsIndex body) throws // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsIndex"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createLogsIndex"); } // create path and map variables String localVarPath = "/api/v1/logs/config/indexes"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.createLogsIndex", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsIndexesApi.createLogsIndex", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an index. * - *

See {@link #createLogsIndexWithHttpInfo}. + * See {@link #createLogsIndexWithHttpInfo}. * * @param body Object containing the new index. (required) * @return CompletableFuture<ApiResponse<LogsIndex>> */ - public CompletableFuture> createLogsIndexWithHttpInfoAsync( - LogsIndex body) { + public CompletableFuture> createLogsIndexWithHttpInfoAsync(LogsIndex body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsIndex")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createLogsIndex")); + return result; } // create path and map variables String localVarPath = "/api/v1/logs/config/indexes"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.createLogsIndex", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsIndexesApi.createLogsIndex", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get an index. - * - *

See {@link #getLogsIndexWithHttpInfo}. - * - * @param name Name of the log index. (required) - * @return LogsIndex - * @throws ApiException if fails to make API call - */ - public LogsIndex getLogsIndex(String name) throws ApiException { + * Get an index. + * + * See {@link #getLogsIndexWithHttpInfo}. + * + * @param name Name of the log index. (required) + * @return LogsIndex + * @throws ApiException if fails to make API call + */ + public LogsIndex getLogsIndex(String name) throws ApiException { return getLogsIndexWithHttpInfo(name).getData(); } /** - * Get an index. - * - *

See {@link #getLogsIndexWithHttpInfoAsync}. - * - * @param name Name of the log index. (required) - * @return CompletableFuture<LogsIndex> - */ - public CompletableFuture getLogsIndexAsync(String name) { - return getLogsIndexWithHttpInfoAsync(name) - .thenApply( - response -> { - return response.getData(); - }); + * Get an index. + * + * See {@link #getLogsIndexWithHttpInfoAsync}. + * + * @param name Name of the log index. (required) + * @return CompletableFuture<LogsIndex> + */ + public CompletableFuturegetLogsIndexAsync(String name) { + return getLogsIndexWithHttpInfoAsync(name).thenApply(response -> { + return response.getData(); + }); } + /** - * Get one log index from your organization. This endpoint takes no JSON arguments. + *

Get one log index from your organization. This endpoint takes no JSON arguments.

* * @param name Name of the log index. (required) * @return ApiResponse<LogsIndex> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -227,40 +200,24 @@ public ApiResponse getLogsIndexWithHttpInfo(String name) throws ApiEx // verify the required parameter 'name' is set if (name == null) { - throw new ApiException( - 400, "Missing the required parameter 'name' when calling getLogsIndex"); + throw new ApiException(400, "Missing the required parameter 'name' when calling getLogsIndex"); } // create path and map variables - String localVarPath = - "/api/v1/logs/config/indexes/{name}" - .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + String localVarPath = "/api/v1/logs/config/indexes/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.getLogsIndex", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsIndexesApi.getLogsIndex", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an index. * - *

See {@link #getLogsIndexWithHttpInfo}. + * See {@link #getLogsIndexWithHttpInfo}. * * @param name Name of the log index. (required) * @return CompletableFuture<ApiResponse<LogsIndex>> @@ -270,79 +227,62 @@ public CompletableFuture> getLogsIndexWithHttpInfoAsync(S // verify the required parameter 'name' is set if (name == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'name' when calling getLogsIndex")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'name' when calling getLogsIndex")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/logs/config/indexes/{name}" - .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + String localVarPath = "/api/v1/logs/config/indexes/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.getLogsIndex", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsIndexesApi.getLogsIndex", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get indexes order. - * - *

See {@link #getLogsIndexOrderWithHttpInfo}. - * - * @return LogsIndexesOrder - * @throws ApiException if fails to make API call - */ - public LogsIndexesOrder getLogsIndexOrder() throws ApiException { + * Get indexes order. + * + * See {@link #getLogsIndexOrderWithHttpInfo}. + * + * @return LogsIndexesOrder + * @throws ApiException if fails to make API call + */ + public LogsIndexesOrder getLogsIndexOrder() throws ApiException { return getLogsIndexOrderWithHttpInfo().getData(); } /** - * Get indexes order. - * - *

See {@link #getLogsIndexOrderWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsIndexesOrder> - */ - public CompletableFuture getLogsIndexOrderAsync() { - return getLogsIndexOrderWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get indexes order. + * + * See {@link #getLogsIndexOrderWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsIndexesOrder> + */ + public CompletableFuturegetLogsIndexOrderAsync() { + return getLogsIndexOrderWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the current order of your log indexes. This endpoint takes no JSON arguments. + *

Get the current order of your log indexes. This endpoint takes no JSON arguments.

* * @return ApiResponse<LogsIndexesOrder> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -355,32 +295,18 @@ public ApiResponse getLogsIndexOrderWithHttpInfo() throws ApiE // create path and map variables String localVarPath = "/api/v1/logs/config/index-order"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.getLogsIndexOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsIndexesApi.getLogsIndexOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get indexes order. * - *

See {@link #getLogsIndexOrderWithHttpInfo}. + * See {@link #getLogsIndexOrderWithHttpInfo}. * * @return CompletableFuture<ApiResponse<LogsIndexesOrder>> */ @@ -389,70 +315,55 @@ public CompletableFuture> getLogsIndexOrderWithHtt // create path and map variables String localVarPath = "/api/v1/logs/config/index-order"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.getLogsIndexOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsIndexesApi.getLogsIndexOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all indexes. - * - *

See {@link #listLogIndexesWithHttpInfo}. - * - * @return LogsIndexListResponse - * @throws ApiException if fails to make API call - */ - public LogsIndexListResponse listLogIndexes() throws ApiException { + * Get all indexes. + * + * See {@link #listLogIndexesWithHttpInfo}. + * + * @return LogsIndexListResponse + * @throws ApiException if fails to make API call + */ + public LogsIndexListResponse listLogIndexes() throws ApiException { return listLogIndexesWithHttpInfo().getData(); } /** - * Get all indexes. - * - *

See {@link #listLogIndexesWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsIndexListResponse> - */ - public CompletableFuture listLogIndexesAsync() { - return listLogIndexesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all indexes. + * + * See {@link #listLogIndexesWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsIndexListResponse> + */ + public CompletableFuturelistLogIndexesAsync() { + return listLogIndexesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * The Index object describes the configuration of a log index. This endpoint returns an array of - * the LogIndex objects of your organization. + *

The Index object describes the configuration of a log index. + * This endpoint returns an array of the LogIndex objects of your organization.

* * @return ApiResponse<LogsIndexListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -465,32 +376,18 @@ public ApiResponse listLogIndexesWithHttpInfo() throws Ap // create path and map variables String localVarPath = "/api/v1/logs/config/indexes"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.listLogIndexes", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsIndexesApi.listLogIndexes", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all indexes. * - *

See {@link #listLogIndexesWithHttpInfo}. + * See {@link #listLogIndexesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<LogsIndexListResponse>> */ @@ -499,81 +396,63 @@ public CompletableFuture> listLogIndexesWithH // create path and map variables String localVarPath = "/api/v1/logs/config/indexes"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.listLogIndexes", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsIndexesApi.listLogIndexes", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an index. - * - *

See {@link #updateLogsIndexWithHttpInfo}. - * - * @param name Name of the log index. (required) - * @param body Object containing the new LogsIndexUpdateRequest. (required) - * @return LogsIndex - * @throws ApiException if fails to make API call - */ - public LogsIndex updateLogsIndex(String name, LogsIndexUpdateRequest body) throws ApiException { + * Update an index. + * + * See {@link #updateLogsIndexWithHttpInfo}. + * + * @param name Name of the log index. (required) + * @param body Object containing the new LogsIndexUpdateRequest. (required) + * @return LogsIndex + * @throws ApiException if fails to make API call + */ + public LogsIndex updateLogsIndex(String name, LogsIndexUpdateRequest body) throws ApiException { return updateLogsIndexWithHttpInfo(name, body).getData(); } /** - * Update an index. - * - *

See {@link #updateLogsIndexWithHttpInfoAsync}. - * - * @param name Name of the log index. (required) - * @param body Object containing the new LogsIndexUpdateRequest. (required) - * @return CompletableFuture<LogsIndex> - */ - public CompletableFuture updateLogsIndexAsync( - String name, LogsIndexUpdateRequest body) { - return updateLogsIndexWithHttpInfoAsync(name, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an index. + * + * See {@link #updateLogsIndexWithHttpInfoAsync}. + * + * @param name Name of the log index. (required) + * @param body Object containing the new LogsIndexUpdateRequest. (required) + * @return CompletableFuture<LogsIndex> + */ + public CompletableFutureupdateLogsIndexAsync(String name, LogsIndexUpdateRequest body) { + return updateLogsIndexWithHttpInfoAsync(name, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update an index as identified by its name. Returns the Index object passed in the request body - * when the request is successful. - * - *

Using the PUT method updates your index’s configuration by - * replacing your current configuration with the new one sent to your Datadog - * organization. + *

Update an index as identified by its name. + * Returns the Index object passed in the request body when the request is successful.

+ *

Using the PUT method updates your index’s configuration by replacing + * your current configuration with the new one sent to your Datadog organization.

* * @param name Name of the log index. (required) * @param body Object containing the new LogsIndexUpdateRequest. (required) * @return ApiResponse<LogsIndex> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -582,150 +461,111 @@ public CompletableFuture updateLogsIndexAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too Many Requests -
*/ - public ApiResponse updateLogsIndexWithHttpInfo( - String name, LogsIndexUpdateRequest body) throws ApiException { + public ApiResponse updateLogsIndexWithHttpInfo(String name, LogsIndexUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'name' is set if (name == null) { - throw new ApiException( - 400, "Missing the required parameter 'name' when calling updateLogsIndex"); + throw new ApiException(400, "Missing the required parameter 'name' when calling updateLogsIndex"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsIndex"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsIndex"); } // create path and map variables - String localVarPath = - "/api/v1/logs/config/indexes/{name}" - .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + String localVarPath = "/api/v1/logs/config/indexes/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.updateLogsIndex", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsIndexesApi.updateLogsIndex", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an index. * - *

See {@link #updateLogsIndexWithHttpInfo}. + * See {@link #updateLogsIndexWithHttpInfo}. * * @param name Name of the log index. (required) * @param body Object containing the new LogsIndexUpdateRequest. (required) * @return CompletableFuture<ApiResponse<LogsIndex>> */ - public CompletableFuture> updateLogsIndexWithHttpInfoAsync( - String name, LogsIndexUpdateRequest body) { + public CompletableFuture> updateLogsIndexWithHttpInfoAsync(String name, LogsIndexUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'name' is set if (name == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'name' when calling updateLogsIndex")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'name' when calling updateLogsIndex")); + 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 updateLogsIndex")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsIndex")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/logs/config/indexes/{name}" - .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + String localVarPath = "/api/v1/logs/config/indexes/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.updateLogsIndex", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsIndexesApi.updateLogsIndex", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update indexes order. - * - *

See {@link #updateLogsIndexOrderWithHttpInfo}. - * - * @param body Object containing the new ordered list of index names (required) - * @return LogsIndexesOrder - * @throws ApiException if fails to make API call - */ - public LogsIndexesOrder updateLogsIndexOrder(LogsIndexesOrder body) throws ApiException { + * Update indexes order. + * + * See {@link #updateLogsIndexOrderWithHttpInfo}. + * + * @param body Object containing the new ordered list of index names (required) + * @return LogsIndexesOrder + * @throws ApiException if fails to make API call + */ + public LogsIndexesOrder updateLogsIndexOrder(LogsIndexesOrder body) throws ApiException { return updateLogsIndexOrderWithHttpInfo(body).getData(); } /** - * Update indexes order. - * - *

See {@link #updateLogsIndexOrderWithHttpInfoAsync}. - * - * @param body Object containing the new ordered list of index names (required) - * @return CompletableFuture<LogsIndexesOrder> - */ - public CompletableFuture updateLogsIndexOrderAsync(LogsIndexesOrder body) { - return updateLogsIndexOrderWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update indexes order. + * + * See {@link #updateLogsIndexOrderWithHttpInfoAsync}. + * + * @param body Object containing the new ordered list of index names (required) + * @return CompletableFuture<LogsIndexesOrder> + */ + public CompletableFutureupdateLogsIndexOrderAsync(LogsIndexesOrder body) { + return updateLogsIndexOrderWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint updates the index order of your organization. It returns the index order object - * passed in the request body when the request is successful. + *

This endpoint updates the index order of your organization. + * It returns the index order object passed in the request body when the request is successful.

* * @param body Object containing the new ordered list of index names (required) * @return ApiResponse<LogsIndexesOrder> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -734,89 +574,56 @@ public CompletableFuture updateLogsIndexOrderAsync(LogsIndexes * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateLogsIndexOrderWithHttpInfo(LogsIndexesOrder body) - throws ApiException { + public ApiResponse updateLogsIndexOrderWithHttpInfo(LogsIndexesOrder body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsIndexOrder"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsIndexOrder"); } // create path and map variables String localVarPath = "/api/v1/logs/config/index-order"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.updateLogsIndexOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsIndexesApi.updateLogsIndexOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update indexes order. * - *

See {@link #updateLogsIndexOrderWithHttpInfo}. + * See {@link #updateLogsIndexOrderWithHttpInfo}. * * @param body Object containing the new ordered list of index names (required) * @return CompletableFuture<ApiResponse<LogsIndexesOrder>> */ - public CompletableFuture> updateLogsIndexOrderWithHttpInfoAsync( - LogsIndexesOrder body) { + public CompletableFuture> updateLogsIndexOrderWithHttpInfoAsync(LogsIndexesOrder body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsIndexOrder")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsIndexOrder")); + return result; } // create path and map variables String localVarPath = "/api/v1/logs/config/index-order"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsIndexesApi.updateLogsIndexOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsIndexesApi.updateLogsIndexOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/LogsPipelinesApi.java b/src/main/java/com/datadog/api/client/v1/api/LogsPipelinesApi.java index 1a7c973a02b..16363a257ed 100644 --- a/src/main/java/com/datadog/api/client/v1/api/LogsPipelinesApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/LogsPipelinesApi.java @@ -1,24 +1,31 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.LogsPipeline; -import com.datadog.api.client.v1.model.LogsPipelinesOrder; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.LogsPipelinesOrder; +import com.datadog.api.client.v1.model.LogsPipeline; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsPipelinesApi { private ApiClient apiClient; - public LogsPipelinesApi() { this(ApiClient.getDefaultApiClient()); } @@ -46,42 +53,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a pipeline. - * - *

See {@link #createLogsPipelineWithHttpInfo}. - * - * @param body Definition of the new pipeline. (required) - * @return LogsPipeline - * @throws ApiException if fails to make API call - */ - public LogsPipeline createLogsPipeline(LogsPipeline body) throws ApiException { + * Create a pipeline. + * + * See {@link #createLogsPipelineWithHttpInfo}. + * + * @param body Definition of the new pipeline. (required) + * @return LogsPipeline + * @throws ApiException if fails to make API call + */ + public LogsPipeline createLogsPipeline(LogsPipeline body) throws ApiException { return createLogsPipelineWithHttpInfo(body).getData(); } /** - * Create a pipeline. - * - *

See {@link #createLogsPipelineWithHttpInfoAsync}. - * - * @param body Definition of the new pipeline. (required) - * @return CompletableFuture<LogsPipeline> - */ - public CompletableFuture createLogsPipelineAsync(LogsPipeline body) { - return createLogsPipelineWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a pipeline. + * + * See {@link #createLogsPipelineWithHttpInfoAsync}. + * + * @param body Definition of the new pipeline. (required) + * @return CompletableFuture<LogsPipeline> + */ + public CompletableFuturecreateLogsPipelineAsync(LogsPipeline body) { + return createLogsPipelineWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a pipeline in your organization. + *

Create a pipeline in your organization.

* * @param body Definition of the new pipeline. (required) * @return ApiResponse<LogsPipeline> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -90,128 +96,95 @@ public CompletableFuture createLogsPipelineAsync(LogsPipeline body * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createLogsPipelineWithHttpInfo(LogsPipeline body) - throws ApiException { + public ApiResponse createLogsPipelineWithHttpInfo(LogsPipeline body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsPipeline"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createLogsPipeline"); } // create path and map variables String localVarPath = "/api/v1/logs/config/pipelines"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.createLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.createLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a pipeline. * - *

See {@link #createLogsPipelineWithHttpInfo}. + * See {@link #createLogsPipelineWithHttpInfo}. * * @param body Definition of the new pipeline. (required) * @return CompletableFuture<ApiResponse<LogsPipeline>> */ - public CompletableFuture> createLogsPipelineWithHttpInfoAsync( - LogsPipeline body) { + public CompletableFuture> createLogsPipelineWithHttpInfoAsync(LogsPipeline body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsPipeline")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createLogsPipeline")); + return result; } // create path and map variables String localVarPath = "/api/v1/logs/config/pipelines"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.createLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.createLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a pipeline. - * - *

See {@link #deleteLogsPipelineWithHttpInfo}. - * - * @param pipelineId ID of the pipeline to delete. (required) - * @throws ApiException if fails to make API call - */ - public void deleteLogsPipeline(String pipelineId) throws ApiException { + * Delete a pipeline. + * + * See {@link #deleteLogsPipelineWithHttpInfo}. + * + * @param pipelineId ID of the pipeline to delete. (required) + * @throws ApiException if fails to make API call + */ + public void deleteLogsPipeline(String pipelineId) throws ApiException { deleteLogsPipelineWithHttpInfo(pipelineId); } /** - * Delete a pipeline. - * - *

See {@link #deleteLogsPipelineWithHttpInfoAsync}. - * - * @param pipelineId ID of the pipeline to delete. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteLogsPipelineAsync(String pipelineId) { - return deleteLogsPipelineWithHttpInfoAsync(pipelineId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a pipeline. + * + * See {@link #deleteLogsPipelineWithHttpInfoAsync}. + * + * @param pipelineId ID of the pipeline to delete. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteLogsPipelineAsync(String pipelineId) { + return deleteLogsPipelineWithHttpInfoAsync(pipelineId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given pipeline from your organization. This endpoint takes no JSON arguments. + *

Delete a given pipeline from your organization. + * This endpoint takes no JSON arguments.

* * @param pipelineId ID of the pipeline to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -225,129 +198,93 @@ public ApiResponse deleteLogsPipelineWithHttpInfo(String pipelineId) throw // verify the required parameter 'pipelineId' is set if (pipelineId == null) { - throw new ApiException( - 400, "Missing the required parameter 'pipelineId' when calling deleteLogsPipeline"); + throw new ApiException(400, "Missing the required parameter 'pipelineId' when calling deleteLogsPipeline"); } // create path and map variables - String localVarPath = - "/api/v1/logs/config/pipelines/{pipeline_id}" - .replaceAll( - "\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + String localVarPath = "/api/v1/logs/config/pipelines/{pipeline_id}" + .replaceAll("\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.deleteLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.deleteLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a pipeline. * - *

See {@link #deleteLogsPipelineWithHttpInfo}. + * See {@link #deleteLogsPipelineWithHttpInfo}. * * @param pipelineId ID of the pipeline to delete. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteLogsPipelineWithHttpInfoAsync( - String pipelineId) { + public CompletableFuture> deleteLogsPipelineWithHttpInfoAsync(String pipelineId) { Object localVarPostBody = null; // verify the required parameter 'pipelineId' is set if (pipelineId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'pipelineId' when calling deleteLogsPipeline")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'pipelineId' when calling deleteLogsPipeline")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/logs/config/pipelines/{pipeline_id}" - .replaceAll( - "\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + String localVarPath = "/api/v1/logs/config/pipelines/{pipeline_id}" + .replaceAll("\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.deleteLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.deleteLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a pipeline. - * - *

See {@link #getLogsPipelineWithHttpInfo}. - * - * @param pipelineId ID of the pipeline to get. (required) - * @return LogsPipeline - * @throws ApiException if fails to make API call - */ - public LogsPipeline getLogsPipeline(String pipelineId) throws ApiException { + * Get a pipeline. + * + * See {@link #getLogsPipelineWithHttpInfo}. + * + * @param pipelineId ID of the pipeline to get. (required) + * @return LogsPipeline + * @throws ApiException if fails to make API call + */ + public LogsPipeline getLogsPipeline(String pipelineId) throws ApiException { return getLogsPipelineWithHttpInfo(pipelineId).getData(); } /** - * Get a pipeline. - * - *

See {@link #getLogsPipelineWithHttpInfoAsync}. - * - * @param pipelineId ID of the pipeline to get. (required) - * @return CompletableFuture<LogsPipeline> - */ - public CompletableFuture getLogsPipelineAsync(String pipelineId) { - return getLogsPipelineWithHttpInfoAsync(pipelineId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a pipeline. + * + * See {@link #getLogsPipelineWithHttpInfoAsync}. + * + * @param pipelineId ID of the pipeline to get. (required) + * @return CompletableFuture<LogsPipeline> + */ + public CompletableFuturegetLogsPipelineAsync(String pipelineId) { + return getLogsPipelineWithHttpInfoAsync(pipelineId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a specific pipeline from your organization. This endpoint takes no JSON arguments. + *

Get a specific pipeline from your organization. + * This endpoint takes no JSON arguments.

* * @param pipelineId ID of the pipeline to get. (required) * @return ApiResponse<LogsPipeline> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -356,132 +293,95 @@ public CompletableFuture getLogsPipelineAsync(String pipelineId) { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getLogsPipelineWithHttpInfo(String pipelineId) - throws ApiException { + public ApiResponse getLogsPipelineWithHttpInfo(String pipelineId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'pipelineId' is set if (pipelineId == null) { - throw new ApiException( - 400, "Missing the required parameter 'pipelineId' when calling getLogsPipeline"); + throw new ApiException(400, "Missing the required parameter 'pipelineId' when calling getLogsPipeline"); } // create path and map variables - String localVarPath = - "/api/v1/logs/config/pipelines/{pipeline_id}" - .replaceAll( - "\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + String localVarPath = "/api/v1/logs/config/pipelines/{pipeline_id}" + .replaceAll("\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.getLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.getLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a pipeline. * - *

See {@link #getLogsPipelineWithHttpInfo}. + * See {@link #getLogsPipelineWithHttpInfo}. * * @param pipelineId ID of the pipeline to get. (required) * @return CompletableFuture<ApiResponse<LogsPipeline>> */ - public CompletableFuture> getLogsPipelineWithHttpInfoAsync( - String pipelineId) { + public CompletableFuture> getLogsPipelineWithHttpInfoAsync(String pipelineId) { Object localVarPostBody = null; // verify the required parameter 'pipelineId' is set if (pipelineId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'pipelineId' when calling getLogsPipeline")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'pipelineId' when calling getLogsPipeline")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/logs/config/pipelines/{pipeline_id}" - .replaceAll( - "\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + String localVarPath = "/api/v1/logs/config/pipelines/{pipeline_id}" + .replaceAll("\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.getLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.getLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get pipeline order. - * - *

See {@link #getLogsPipelineOrderWithHttpInfo}. - * - * @return LogsPipelinesOrder - * @throws ApiException if fails to make API call - */ - public LogsPipelinesOrder getLogsPipelineOrder() throws ApiException { + * Get pipeline order. + * + * See {@link #getLogsPipelineOrderWithHttpInfo}. + * + * @return LogsPipelinesOrder + * @throws ApiException if fails to make API call + */ + public LogsPipelinesOrder getLogsPipelineOrder() throws ApiException { return getLogsPipelineOrderWithHttpInfo().getData(); } /** - * Get pipeline order. - * - *

See {@link #getLogsPipelineOrderWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsPipelinesOrder> - */ - public CompletableFuture getLogsPipelineOrderAsync() { - return getLogsPipelineOrderWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get pipeline order. + * + * See {@link #getLogsPipelineOrderWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsPipelinesOrder> + */ + public CompletableFuturegetLogsPipelineOrderAsync() { + return getLogsPipelineOrderWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the current order of your pipelines. This endpoint takes no JSON arguments. + *

Get the current order of your pipelines. + * This endpoint takes no JSON arguments.

* * @return ApiResponse<LogsPipelinesOrder> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -494,104 +394,75 @@ public ApiResponse getLogsPipelineOrderWithHttpInfo() throws // create path and map variables String localVarPath = "/api/v1/logs/config/pipeline-order"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.getLogsPipelineOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.getLogsPipelineOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get pipeline order. * - *

See {@link #getLogsPipelineOrderWithHttpInfo}. + * See {@link #getLogsPipelineOrderWithHttpInfo}. * * @return CompletableFuture<ApiResponse<LogsPipelinesOrder>> */ - public CompletableFuture> - getLogsPipelineOrderWithHttpInfoAsync() { + public CompletableFuture> getLogsPipelineOrderWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/logs/config/pipeline-order"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.getLogsPipelineOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.getLogsPipelineOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all pipelines. - * - *

See {@link #listLogsPipelinesWithHttpInfo}. - * - * @return List<LogsPipeline> - * @throws ApiException if fails to make API call - */ - public List listLogsPipelines() throws ApiException { + * Get all pipelines. + * + * See {@link #listLogsPipelinesWithHttpInfo}. + * + * @return List<LogsPipeline> + * @throws ApiException if fails to make API call + */ + public List listLogsPipelines() throws ApiException { return listLogsPipelinesWithHttpInfo().getData(); } /** - * Get all pipelines. - * - *

See {@link #listLogsPipelinesWithHttpInfoAsync}. - * - * @return CompletableFuture<List<LogsPipeline>> - */ - public CompletableFuture> listLogsPipelinesAsync() { - return listLogsPipelinesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all pipelines. + * + * See {@link #listLogsPipelinesWithHttpInfoAsync}. + * + * @return CompletableFuture<List<LogsPipeline>> + */ + public CompletableFuture>listLogsPipelinesAsync() { + return listLogsPipelinesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get all pipelines from your organization. This endpoint takes no JSON arguments. + *

Get all pipelines from your organization. + * This endpoint takes no JSON arguments.

* * @return ApiResponse<List<LogsPipeline>> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -604,32 +475,18 @@ public ApiResponse> listLogsPipelinesWithHttpInfo() throws Ap // create path and map variables String localVarPath = "/api/v1/logs/config/pipelines"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.listLogsPipelines", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.listLogsPipelines", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * Get all pipelines. * - *

See {@link #listLogsPipelinesWithHttpInfo}. + * See {@link #listLogsPipelinesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<List<LogsPipeline>>> */ @@ -638,80 +495,62 @@ public CompletableFuture>> listLogsPipelinesWithH // create path and map variables String localVarPath = "/api/v1/logs/config/pipelines"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.listLogsPipelines", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.listLogsPipelines", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Update a pipeline. - * - *

See {@link #updateLogsPipelineWithHttpInfo}. - * - * @param pipelineId ID of the pipeline to delete. (required) - * @param body New definition of the pipeline. (required) - * @return LogsPipeline - * @throws ApiException if fails to make API call - */ - public LogsPipeline updateLogsPipeline(String pipelineId, LogsPipeline body) throws ApiException { + * Update a pipeline. + * + * See {@link #updateLogsPipelineWithHttpInfo}. + * + * @param pipelineId ID of the pipeline to delete. (required) + * @param body New definition of the pipeline. (required) + * @return LogsPipeline + * @throws ApiException if fails to make API call + */ + public LogsPipeline updateLogsPipeline(String pipelineId, LogsPipeline body) throws ApiException { return updateLogsPipelineWithHttpInfo(pipelineId, body).getData(); } /** - * Update a pipeline. - * - *

See {@link #updateLogsPipelineWithHttpInfoAsync}. - * - * @param pipelineId ID of the pipeline to delete. (required) - * @param body New definition of the pipeline. (required) - * @return CompletableFuture<LogsPipeline> - */ - public CompletableFuture updateLogsPipelineAsync( - String pipelineId, LogsPipeline body) { - return updateLogsPipelineWithHttpInfoAsync(pipelineId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a pipeline. + * + * See {@link #updateLogsPipelineWithHttpInfoAsync}. + * + * @param pipelineId ID of the pipeline to delete. (required) + * @param body New definition of the pipeline. (required) + * @return CompletableFuture<LogsPipeline> + */ + public CompletableFutureupdateLogsPipelineAsync(String pipelineId, LogsPipeline body) { + return updateLogsPipelineWithHttpInfoAsync(pipelineId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a given pipeline configuration to change it’s processors or their order. - * - *

Note: Using this method updates your pipeline configuration by - * replacing your current configuration with the new one sent to your Datadog - * organization. + *

Update a given pipeline configuration to change it’s processors or their order.

+ *

Note: Using this method updates your pipeline configuration by replacing + * your current configuration with the new one sent to your Datadog organization.

* * @param pipelineId ID of the pipeline to delete. (required) * @param body New definition of the pipeline. (required) * @return ApiResponse<LogsPipeline> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -720,157 +559,113 @@ public CompletableFuture updateLogsPipelineAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateLogsPipelineWithHttpInfo( - String pipelineId, LogsPipeline body) throws ApiException { + public ApiResponse updateLogsPipelineWithHttpInfo(String pipelineId, LogsPipeline body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'pipelineId' is set if (pipelineId == null) { - throw new ApiException( - 400, "Missing the required parameter 'pipelineId' when calling updateLogsPipeline"); + throw new ApiException(400, "Missing the required parameter 'pipelineId' when calling updateLogsPipeline"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsPipeline"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsPipeline"); } // create path and map variables - String localVarPath = - "/api/v1/logs/config/pipelines/{pipeline_id}" - .replaceAll( - "\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + String localVarPath = "/api/v1/logs/config/pipelines/{pipeline_id}" + .replaceAll("\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.updateLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.updateLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a pipeline. * - *

See {@link #updateLogsPipelineWithHttpInfo}. + * See {@link #updateLogsPipelineWithHttpInfo}. * * @param pipelineId ID of the pipeline to delete. (required) * @param body New definition of the pipeline. (required) * @return CompletableFuture<ApiResponse<LogsPipeline>> */ - public CompletableFuture> updateLogsPipelineWithHttpInfoAsync( - String pipelineId, LogsPipeline body) { + public CompletableFuture> updateLogsPipelineWithHttpInfoAsync(String pipelineId, LogsPipeline body) { Object localVarPostBody = body; // verify the required parameter 'pipelineId' is set if (pipelineId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'pipelineId' when calling updateLogsPipeline")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'pipelineId' when calling updateLogsPipeline")); + 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 updateLogsPipeline")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsPipeline")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/logs/config/pipelines/{pipeline_id}" - .replaceAll( - "\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + String localVarPath = "/api/v1/logs/config/pipelines/{pipeline_id}" + .replaceAll("\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.updateLogsPipeline", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.updateLogsPipeline", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update pipeline order. - * - *

See {@link #updateLogsPipelineOrderWithHttpInfo}. - * - * @param body Object containing the new ordered list of pipeline IDs. (required) - * @return LogsPipelinesOrder - * @throws ApiException if fails to make API call - */ - public LogsPipelinesOrder updateLogsPipelineOrder(LogsPipelinesOrder body) throws ApiException { + * Update pipeline order. + * + * See {@link #updateLogsPipelineOrderWithHttpInfo}. + * + * @param body Object containing the new ordered list of pipeline IDs. (required) + * @return LogsPipelinesOrder + * @throws ApiException if fails to make API call + */ + public LogsPipelinesOrder updateLogsPipelineOrder(LogsPipelinesOrder body) throws ApiException { return updateLogsPipelineOrderWithHttpInfo(body).getData(); } /** - * Update pipeline order. - * - *

See {@link #updateLogsPipelineOrderWithHttpInfoAsync}. - * - * @param body Object containing the new ordered list of pipeline IDs. (required) - * @return CompletableFuture<LogsPipelinesOrder> - */ - public CompletableFuture updateLogsPipelineOrderAsync( - LogsPipelinesOrder body) { - return updateLogsPipelineOrderWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update pipeline order. + * + * See {@link #updateLogsPipelineOrderWithHttpInfoAsync}. + * + * @param body Object containing the new ordered list of pipeline IDs. (required) + * @return CompletableFuture<LogsPipelinesOrder> + */ + public CompletableFutureupdateLogsPipelineOrderAsync(LogsPipelinesOrder body) { + return updateLogsPipelineOrderWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the order of your pipelines. Since logs are processed sequentially, reordering a - * pipeline may change the structure and content of the data processed by other pipelines and - * their processors. - * - *

Note: Using the PUT method updates your pipeline order by - * replacing your current order with the new one sent to your Datadog organization. + *

Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change + * the structure and content of the data processed by other pipelines and their processors.

+ *

Note: Using the PUT method updates your pipeline order by replacing your current order + * with the new one sent to your Datadog organization.

* * @param body Object containing the new ordered list of pipeline IDs. (required) * @return ApiResponse<LogsPipelinesOrder> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -880,89 +675,56 @@ public CompletableFuture updateLogsPipelineOrderAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateLogsPipelineOrderWithHttpInfo( - LogsPipelinesOrder body) throws ApiException { + public ApiResponse updateLogsPipelineOrderWithHttpInfo(LogsPipelinesOrder body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsPipelineOrder"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsPipelineOrder"); } // create path and map variables String localVarPath = "/api/v1/logs/config/pipeline-order"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.updateLogsPipelineOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.LogsPipelinesApi.updateLogsPipelineOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update pipeline order. * - *

See {@link #updateLogsPipelineOrderWithHttpInfo}. + * See {@link #updateLogsPipelineOrderWithHttpInfo}. * * @param body Object containing the new ordered list of pipeline IDs. (required) * @return CompletableFuture<ApiResponse<LogsPipelinesOrder>> */ - public CompletableFuture> - updateLogsPipelineOrderWithHttpInfoAsync(LogsPipelinesOrder body) { + public CompletableFuture> updateLogsPipelineOrderWithHttpInfoAsync(LogsPipelinesOrder body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsPipelineOrder")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsPipelineOrder")); + return result; } // create path and map variables String localVarPath = "/api/v1/logs/config/pipeline-order"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.LogsPipelinesApi.updateLogsPipelineOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.LogsPipelinesApi.updateLogsPipelineOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/MetricsApi.java b/src/main/java/com/datadog/api/client/v1/api/MetricsApi.java index a7e3fdc40b9..52444ebea98 100644 --- a/src/main/java/com/datadog/api/client/v1/api/MetricsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/MetricsApi.java @@ -1,31 +1,38 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.DistributionPointsContentEncoding; -import com.datadog.api.client.v1.model.DistributionPointsPayload; -import com.datadog.api.client.v1.model.IntakePayloadAccepted; -import com.datadog.api.client.v1.model.MetricContentEncoding; -import com.datadog.api.client.v1.model.MetricMetadata; -import com.datadog.api.client.v1.model.MetricSearchResponse; -import com.datadog.api.client.v1.model.MetricsListResponse; -import com.datadog.api.client.v1.model.MetricsPayload; -import com.datadog.api.client.v1.model.MetricsQueryResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.IntakePayloadAccepted; +import com.datadog.api.client.v1.model.DistributionPointsContentEncoding; +import com.datadog.api.client.v1.model.DistributionPointsPayload; +import com.datadog.api.client.v1.model.MetricsListResponse; +import com.datadog.api.client.v1.model.MetricMetadata; +import com.datadog.api.client.v1.model.MetricsQueryResponse; +import com.datadog.api.client.v1.model.MetricSearchResponse; +import com.datadog.api.client.v1.model.MetricContentEncoding; +import com.datadog.api.client.v1.model.MetricsPayload; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsApi { private ApiClient apiClient; - public MetricsApi() { this(ApiClient.getDefaultApiClient()); } @@ -53,42 +60,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get metric metadata. - * - *

See {@link #getMetricMetadataWithHttpInfo}. - * - * @param metricName Name of the metric for which to get metadata. (required) - * @return MetricMetadata - * @throws ApiException if fails to make API call - */ - public MetricMetadata getMetricMetadata(String metricName) throws ApiException { + * Get metric metadata. + * + * See {@link #getMetricMetadataWithHttpInfo}. + * + * @param metricName Name of the metric for which to get metadata. (required) + * @return MetricMetadata + * @throws ApiException if fails to make API call + */ + public MetricMetadata getMetricMetadata(String metricName) throws ApiException { return getMetricMetadataWithHttpInfo(metricName).getData(); } /** - * Get metric metadata. - * - *

See {@link #getMetricMetadataWithHttpInfoAsync}. - * - * @param metricName Name of the metric for which to get metadata. (required) - * @return CompletableFuture<MetricMetadata> - */ - public CompletableFuture getMetricMetadataAsync(String metricName) { - return getMetricMetadataWithHttpInfoAsync(metricName) - .thenApply( - response -> { - return response.getData(); - }); + * Get metric metadata. + * + * See {@link #getMetricMetadataWithHttpInfoAsync}. + * + * @param metricName Name of the metric for which to get metadata. (required) + * @return CompletableFuture<MetricMetadata> + */ + public CompletableFuturegetMetricMetadataAsync(String metricName) { + return getMetricMetadataWithHttpInfoAsync(metricName).thenApply(response -> { + return response.getData(); + }); } + /** - * Get metadata about a specific metric. + *

Get metadata about a specific metric.

* * @param metricName Name of the metric for which to get metadata. (required) * @return ApiResponse<MetricMetadata> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,108 +103,71 @@ public CompletableFuture getMetricMetadataAsync(String metricNam * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getMetricMetadataWithHttpInfo(String metricName) - throws ApiException { + public ApiResponse getMetricMetadataWithHttpInfo(String metricName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling getMetricMetadata"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling getMetricMetadata"); } // create path and map variables - String localVarPath = - "/api/v1/metrics/{metric_name}" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v1/metrics/{metric_name}" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.getMetricMetadata", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.getMetricMetadata", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get metric metadata. * - *

See {@link #getMetricMetadataWithHttpInfo}. + * See {@link #getMetricMetadataWithHttpInfo}. * * @param metricName Name of the metric for which to get metadata. (required) * @return CompletableFuture<ApiResponse<MetricMetadata>> */ - public CompletableFuture> getMetricMetadataWithHttpInfoAsync( - String metricName) { + public CompletableFuture> getMetricMetadataWithHttpInfoAsync(String metricName) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'metricName' when calling getMetricMetadata")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling getMetricMetadata")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/metrics/{metric_name}" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v1/metrics/{metric_name}" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.getMetricMetadata", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.getMetricMetadata", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listActiveMetrics. */ + /** + * Manage optional parameters to listActiveMetrics. + */ public static class ListActiveMetricsOptionalParameters { private String host; private String tagFilter; /** * Set host. - * - * @param host Hostname for filtering the list of metrics returned. If set, metrics retrieved - * are those with the corresponding hostname tag. (optional) + * @param host Hostname for filtering the list of metrics returned. If set, metrics retrieved are those with the corresponding hostname tag. (optional) * @return ListActiveMetricsOptionalParameters */ public ListActiveMetricsOptionalParameters host(String host) { @@ -208,9 +177,7 @@ public ListActiveMetricsOptionalParameters host(String host) { /** * Set tagFilter. - * - * @param tagFilter Filter metrics that have been submitted with the given tags. Supports - * boolean and wildcard expressions. Cannot be combined with other filters. (optional) + * @param tagFilter Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Cannot be combined with other filters. (optional) * @return ListActiveMetricsOptionalParameters */ public ListActiveMetricsOptionalParameters tagFilter(String tagFilter) { @@ -220,76 +187,71 @@ public ListActiveMetricsOptionalParameters tagFilter(String tagFilter) { } /** - * Get active metrics list. - * - *

See {@link #listActiveMetricsWithHttpInfo}. - * - * @param from Seconds since the Unix epoch. (required) - * @return MetricsListResponse - * @throws ApiException if fails to make API call - */ - public MetricsListResponse listActiveMetrics(Long from) throws ApiException { - return listActiveMetricsWithHttpInfo(from, new ListActiveMetricsOptionalParameters()).getData(); - } - - /** - * Get active metrics list. - * - *

See {@link #listActiveMetricsWithHttpInfoAsync}. - * - * @param from Seconds since the Unix epoch. (required) - * @return CompletableFuture<MetricsListResponse> - */ - public CompletableFuture listActiveMetricsAsync(Long from) { - return listActiveMetricsWithHttpInfoAsync(from, new ListActiveMetricsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get active metrics list. - * - *

See {@link #listActiveMetricsWithHttpInfo}. - * - * @param from Seconds since the Unix epoch. (required) - * @param parameters Optional parameters for the request. - * @return MetricsListResponse - * @throws ApiException if fails to make API call - */ - public MetricsListResponse listActiveMetrics( - Long from, ListActiveMetricsOptionalParameters parameters) throws ApiException { + * Get active metrics list. + * + * See {@link #listActiveMetricsWithHttpInfo}. + * + * @param from Seconds since the Unix epoch. (required) + * @return MetricsListResponse + * @throws ApiException if fails to make API call + */ + public MetricsListResponse listActiveMetrics (Long from) throws ApiException { + return listActiveMetricsWithHttpInfo( from, new ListActiveMetricsOptionalParameters()).getData(); + } + + /** + * Get active metrics list. + * + * See {@link #listActiveMetricsWithHttpInfoAsync}. + * + * @param from Seconds since the Unix epoch. (required) + * @return CompletableFuture<MetricsListResponse> + */ + public CompletableFuturelistActiveMetricsAsync(Long from) { + return listActiveMetricsWithHttpInfoAsync(from, new ListActiveMetricsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get active metrics list. + * + * See {@link #listActiveMetricsWithHttpInfo}. + * + * @param from Seconds since the Unix epoch. (required) + * @param parameters Optional parameters for the request. + * @return MetricsListResponse + * @throws ApiException if fails to make API call + */ + public MetricsListResponse listActiveMetrics(Long from, ListActiveMetricsOptionalParameters parameters) throws ApiException { return listActiveMetricsWithHttpInfo(from, parameters).getData(); } /** - * Get active metrics list. - * - *

See {@link #listActiveMetricsWithHttpInfoAsync}. - * - * @param from Seconds since the Unix epoch. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MetricsListResponse> - */ - public CompletableFuture listActiveMetricsAsync( - Long from, ListActiveMetricsOptionalParameters parameters) { - return listActiveMetricsWithHttpInfoAsync(from, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get active metrics list. + * + * See {@link #listActiveMetricsWithHttpInfoAsync}. + * + * @param from Seconds since the Unix epoch. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MetricsListResponse> + */ + public CompletableFuturelistActiveMetricsAsync( Long from, ListActiveMetricsOptionalParameters parameters) { + return listActiveMetricsWithHttpInfoAsync(from, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of actively reporting metrics from a given time until now. + *

Get the list of actively reporting metrics from a given time until now.

* * @param from Seconds since the Unix epoch. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<MetricsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -298,20 +260,19 @@ public CompletableFuture listActiveMetricsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listActiveMetricsWithHttpInfo( - Long from, ListActiveMetricsOptionalParameters parameters) throws ApiException { + public ApiResponse listActiveMetricsWithHttpInfo(Long from, ListActiveMetricsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'from' is set if (from == null) { - throw new ApiException( - 400, "Missing the required parameter 'from' when calling listActiveMetrics"); + throw new ApiException(400, "Missing the required parameter 'from' when calling listActiveMetrics"); } String host = parameters.host; String tagFilter = parameters.tagFilter; // create path and map variables String localVarPath = "/api/v1/metrics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -319,52 +280,34 @@ public ApiResponse listActiveMetricsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "host", host)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "tag_filter", tagFilter)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.listActiveMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.listActiveMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get active metrics list. * - *

See {@link #listActiveMetricsWithHttpInfo}. + * See {@link #listActiveMetricsWithHttpInfo}. * * @param from Seconds since the Unix epoch. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MetricsListResponse>> */ - public CompletableFuture> listActiveMetricsWithHttpInfoAsync( - Long from, ListActiveMetricsOptionalParameters parameters) { + public CompletableFuture> listActiveMetricsWithHttpInfoAsync(Long from, ListActiveMetricsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'from' is set if (from == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'from' when calling listActiveMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'from' when calling listActiveMetrics")); + return result; } String host = parameters.host; String tagFilter = parameters.tagFilter; // create path and map variables String localVarPath = "/api/v1/metrics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -374,71 +317,51 @@ public CompletableFuture> listActiveMetricsWith Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.listActiveMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.listActiveMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Search metrics. - * - *

See {@link #listMetricsWithHttpInfo}. - * - * @param q Query string to search metrics upon. Can optionally be prefixed with metrics: - * . (required) - * @return MetricSearchResponse - * @throws ApiException if fails to make API call - */ - public MetricSearchResponse listMetrics(String q) throws ApiException { + * Search metrics. + * + * See {@link #listMetricsWithHttpInfo}. + * + * @param q Query string to search metrics upon. Can optionally be prefixed with metrics:. (required) + * @return MetricSearchResponse + * @throws ApiException if fails to make API call + */ + public MetricSearchResponse listMetrics(String q) throws ApiException { return listMetricsWithHttpInfo(q).getData(); } /** - * Search metrics. - * - *

See {@link #listMetricsWithHttpInfoAsync}. - * - * @param q Query string to search metrics upon. Can optionally be prefixed with metrics: - * . (required) - * @return CompletableFuture<MetricSearchResponse> - */ - public CompletableFuture listMetricsAsync(String q) { - return listMetricsWithHttpInfoAsync(q) - .thenApply( - response -> { - return response.getData(); - }); + * Search metrics. + * + * See {@link #listMetricsWithHttpInfoAsync}. + * + * @param q Query string to search metrics upon. Can optionally be prefixed with metrics:. (required) + * @return CompletableFuture<MetricSearchResponse> + */ + public CompletableFuturelistMetricsAsync(String q) { + return listMetricsWithHttpInfoAsync(q).thenApply(response -> { + return response.getData(); + }); } + /** - * Search for metrics from the last 24 hours in Datadog. + *

Search for metrics from the last 24 hours in Datadog.

* - * @param q Query string to search metrics upon. Can optionally be prefixed with metrics: - * . (required) + * @param q Query string to search metrics upon. Can optionally be prefixed with metrics:. (required) * @return ApiResponse<MetricSearchResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -457,54 +380,37 @@ public ApiResponse listMetricsWithHttpInfo(String q) throw // create path and map variables String localVarPath = "/api/v1/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.listMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.listMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search metrics. * - *

See {@link #listMetricsWithHttpInfo}. + * See {@link #listMetricsWithHttpInfo}. * - * @param q Query string to search metrics upon. Can optionally be prefixed with metrics: - * . (required) + * @param q Query string to search metrics upon. Can optionally be prefixed with metrics:. (required) * @return CompletableFuture<ApiResponse<MetricSearchResponse>> */ - public CompletableFuture> listMetricsWithHttpInfoAsync( - String q) { + public CompletableFuture> listMetricsWithHttpInfoAsync(String q) { Object localVarPostBody = null; // verify the required parameter 'q' is set if (q == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'q' when calling listMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'q' when calling listMetrics")); + return result; } // create path and map variables String localVarPath = "/api/v1/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -512,67 +418,49 @@ public CompletableFuture> listMetricsWithHttpI Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.listMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.listMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Query timeseries points. - * - *

See {@link #queryMetricsWithHttpInfo}. - * - * @param from Start of the queried time period, seconds since the Unix epoch. (required) - * @param to End of the queried time period, seconds since the Unix epoch. (required) - * @param query Query string. (required) - * @return MetricsQueryResponse - * @throws ApiException if fails to make API call - */ - public MetricsQueryResponse queryMetrics(Long from, Long to, String query) throws ApiException { + * Query timeseries points. + * + * See {@link #queryMetricsWithHttpInfo}. + * + * @param from Start of the queried time period, seconds since the Unix epoch. (required) + * @param to End of the queried time period, seconds since the Unix epoch. (required) + * @param query Query string. (required) + * @return MetricsQueryResponse + * @throws ApiException if fails to make API call + */ + public MetricsQueryResponse queryMetrics(Long from, Long to, String query) throws ApiException { return queryMetricsWithHttpInfo(from, to, query).getData(); } /** - * Query timeseries points. - * - *

See {@link #queryMetricsWithHttpInfoAsync}. - * - * @param from Start of the queried time period, seconds since the Unix epoch. (required) - * @param to End of the queried time period, seconds since the Unix epoch. (required) - * @param query Query string. (required) - * @return CompletableFuture<MetricsQueryResponse> - */ - public CompletableFuture queryMetricsAsync( - Long from, Long to, String query) { - return queryMetricsWithHttpInfoAsync(from, to, query) - .thenApply( - response -> { - return response.getData(); - }); + * Query timeseries points. + * + * See {@link #queryMetricsWithHttpInfoAsync}. + * + * @param from Start of the queried time period, seconds since the Unix epoch. (required) + * @param to End of the queried time period, seconds since the Unix epoch. (required) + * @param query Query string. (required) + * @return CompletableFuture<MetricsQueryResponse> + */ + public CompletableFuturequeryMetricsAsync(Long from, Long to, String query) { + return queryMetricsWithHttpInfoAsync(from, to, query).thenApply(response -> { + return response.getData(); + }); } + /** - * Query timeseries points. + *

Query timeseries points.

* * @param from Start of the queried time period, seconds since the Unix epoch. (required) * @param to End of the queried time period, seconds since the Unix epoch. (required) @@ -580,7 +468,7 @@ public CompletableFuture queryMetricsAsync( * @return ApiResponse<MetricsQueryResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -589,14 +477,12 @@ public CompletableFuture queryMetricsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse queryMetricsWithHttpInfo( - Long from, Long to, String query) throws ApiException { + public ApiResponse queryMetricsWithHttpInfo(Long from, Long to, String query) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'from' is set if (from == null) { - throw new ApiException( - 400, "Missing the required parameter 'from' when calling queryMetrics"); + throw new ApiException(400, "Missing the required parameter 'from' when calling queryMetrics"); } // verify the required parameter 'to' is set @@ -606,12 +492,12 @@ public ApiResponse queryMetricsWithHttpInfo( // verify the required parameter 'query' is set if (query == null) { - throw new ApiException( - 400, "Missing the required parameter 'query' when calling queryMetrics"); + throw new ApiException(400, "Missing the required parameter 'query' when calling queryMetrics"); } // create path and map variables String localVarPath = "/api/v1/query"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -619,67 +505,47 @@ public ApiResponse queryMetricsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.queryMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.queryMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Query timeseries points. * - *

See {@link #queryMetricsWithHttpInfo}. + * See {@link #queryMetricsWithHttpInfo}. * * @param from Start of the queried time period, seconds since the Unix epoch. (required) * @param to End of the queried time period, seconds since the Unix epoch. (required) * @param query Query string. (required) * @return CompletableFuture<ApiResponse<MetricsQueryResponse>> */ - public CompletableFuture> queryMetricsWithHttpInfoAsync( - Long from, Long to, String query) { + public CompletableFuture> queryMetricsWithHttpInfoAsync(Long from, Long to, String query) { Object localVarPostBody = null; // verify the required parameter 'from' is set if (from == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'from' when calling queryMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'from' when calling queryMetrics")); + return result; } // verify the required parameter 'to' is set if (to == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'to' when calling queryMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'to' when calling queryMetrics")); + return result; } // verify the required parameter 'query' is set if (query == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'query' when calling queryMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'query' when calling queryMetrics")); + return result; } // create path and map variables String localVarPath = "/api/v1/query"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -689,126 +555,98 @@ public CompletableFuture> queryMetricsWithHttp Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.queryMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.queryMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to submitDistributionPoints. */ + /** + * Manage optional parameters to submitDistributionPoints. + */ public static class SubmitDistributionPointsOptionalParameters { private DistributionPointsContentEncoding contentEncoding; /** * Set contentEncoding. - * * @param contentEncoding HTTP header used to compress the media-type. (optional) * @return SubmitDistributionPointsOptionalParameters */ - public SubmitDistributionPointsOptionalParameters contentEncoding( - DistributionPointsContentEncoding contentEncoding) { + public SubmitDistributionPointsOptionalParameters contentEncoding(DistributionPointsContentEncoding contentEncoding) { this.contentEncoding = contentEncoding; return this; } } /** - * Submit distribution points. - * - *

See {@link #submitDistributionPointsWithHttpInfo}. - * - * @param body (required) - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitDistributionPoints(DistributionPointsPayload body) - throws ApiException { - return submitDistributionPointsWithHttpInfo( - body, new SubmitDistributionPointsOptionalParameters()) - .getData(); - } - - /** - * Submit distribution points. - * - *

See {@link #submitDistributionPointsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitDistributionPointsAsync( - DistributionPointsPayload body) { - return submitDistributionPointsWithHttpInfoAsync( - body, new SubmitDistributionPointsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Submit distribution points. - * - *

See {@link #submitDistributionPointsWithHttpInfo}. - * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitDistributionPoints( - DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) - throws ApiException { + * Submit distribution points. + * + * See {@link #submitDistributionPointsWithHttpInfo}. + * + * @param body (required) + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitDistributionPoints (DistributionPointsPayload body) throws ApiException { + return submitDistributionPointsWithHttpInfo( body, new SubmitDistributionPointsOptionalParameters()).getData(); + } + + /** + * Submit distribution points. + * + * See {@link #submitDistributionPointsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitDistributionPointsAsync(DistributionPointsPayload body) { + return submitDistributionPointsWithHttpInfoAsync(body, new SubmitDistributionPointsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Submit distribution points. + * + * See {@link #submitDistributionPointsWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitDistributionPoints(DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) throws ApiException { return submitDistributionPointsWithHttpInfo(body, parameters).getData(); } /** - * Submit distribution points. - * - *

See {@link #submitDistributionPointsWithHttpInfoAsync}. - * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitDistributionPointsAsync( - DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) { - return submitDistributionPointsWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Submit distribution points. + * + * See {@link #submitDistributionPointsWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitDistributionPointsAsync( DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) { + return submitDistributionPointsWithHttpInfoAsync(body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * The distribution points end-point allows you to post distribution data that can be graphed on - * Datadog’s dashboards. + *

The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards.

* - * @param body (required) + * @param body (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IntakePayloadAccepted> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -819,112 +657,73 @@ public CompletableFuture submitDistributionPointsAsync( * *
Response details
Status Code Description Response Headers
202 Payload accepted -
429 Too many requests -
*/ - public ApiResponse submitDistributionPointsWithHttpInfo( - DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) - throws ApiException { + public ApiResponse submitDistributionPointsWithHttpInfo(DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling submitDistributionPoints"); + throw new ApiException(400, "Missing the required parameter 'body' when calling submitDistributionPoints"); } DistributionPointsContentEncoding contentEncoding = parameters.contentEncoding; // create path and map variables String localVarPath = "/api/v1/distribution_points"; + Map localVarHeaderParams = new HashMap(); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.submitDistributionPoints", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"text/json", "application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"text/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.submitDistributionPoints", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"text/json", "application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"text/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Submit distribution points. * - *

See {@link #submitDistributionPointsWithHttpInfo}. + * See {@link #submitDistributionPointsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IntakePayloadAccepted>> */ - public CompletableFuture> - submitDistributionPointsWithHttpInfoAsync( - DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) { + public CompletableFuture> submitDistributionPointsWithHttpInfoAsync(DistributionPointsPayload body, SubmitDistributionPointsOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling submitDistributionPoints")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling submitDistributionPoints")); + return result; } DistributionPointsContentEncoding contentEncoding = parameters.contentEncoding; // create path and map variables String localVarPath = "/api/v1/distribution_points"; + Map localVarHeaderParams = new HashMap(); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.submitDistributionPoints", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"text/json", "application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.submitDistributionPoints", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"text/json", "application/json" }, new String[] { "apiKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"text/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"text/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to submitMetrics. */ + /** + * Manage optional parameters to submitMetrics. + */ public static class SubmitMetricsOptionalParameters { private MetricContentEncoding contentEncoding; /** * Set contentEncoding. - * - * @param contentEncoding HTTP header used to compress the media-type. (optional, default to - * "deflate") + * @param contentEncoding HTTP header used to compress the media-type. (optional, default to "deflate") * @return SubmitMetricsOptionalParameters */ public SubmitMetricsOptionalParameters contentEncoding(MetricContentEncoding contentEncoding) { @@ -934,89 +733,81 @@ public SubmitMetricsOptionalParameters contentEncoding(MetricContentEncoding con } /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfo}. - * - * @param body (required) - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitMetrics(MetricsPayload body) throws ApiException { - return submitMetricsWithHttpInfo(body, new SubmitMetricsOptionalParameters()).getData(); - } - - /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitMetricsAsync(MetricsPayload body) { - return submitMetricsWithHttpInfoAsync(body, new SubmitMetricsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfo}. - * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitMetrics( - MetricsPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfo}. + * + * @param body (required) + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitMetrics (MetricsPayload body) throws ApiException { + return submitMetricsWithHttpInfo( body, new SubmitMetricsOptionalParameters()).getData(); + } + + /** + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitMetricsAsync(MetricsPayload body) { + return submitMetricsWithHttpInfoAsync(body, new SubmitMetricsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitMetrics(MetricsPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { return submitMetricsWithHttpInfo(body, parameters).getData(); } /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfoAsync}. - * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitMetricsAsync( - MetricsPayload body, SubmitMetricsOptionalParameters parameters) { - return submitMetricsWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitMetricsAsync( MetricsPayload body, SubmitMetricsOptionalParameters parameters) { + return submitMetricsWithHttpInfoAsync(body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * The metrics end-point allows you to post time-series data that can be graphed on Datadog’s - * dashboards. The maximum payload size is 3.2 megabytes (3200000 bytes). Compressed payloads must - * have a decompressed size of less than 62 megabytes (62914560 bytes). - * - *

If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect: - * + *

The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. + * The maximum payload size is 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed size of less than 62 megabytes (62914560 bytes).

+ *

If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:

*
    - *
  • 64 bits for the timestamp - *
  • 64 bits for the value - *
  • 40 bytes for the metric names - *
  • 50 bytes for the timeseries - *
  • The full payload is approximately 100 bytes. However, with the DogStatsD API, compression - * is applied, which reduces the payload size. + *
  • 64 bits for the timestamp
  • + *
  • 64 bits for the value
  • + *
  • 40 bytes for the metric names
  • + *
  • 50 bytes for the timeseries
  • + *
  • The full payload is approximately 100 bytes. However, with the DogStatsD API, + * compression is applied, which reduces the payload size.
  • *
* - * @param body (required) + * @param body (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IntakePayloadAccepted> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1027,144 +818,103 @@ public CompletableFuture submitMetricsAsync( * *
Response details
Status Code Description Response Headers
202 Payload accepted -
429 Too many requests -
*/ - public ApiResponse submitMetricsWithHttpInfo( - MetricsPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { + public ApiResponse submitMetricsWithHttpInfo(MetricsPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling submitMetrics"); + throw new ApiException(400, "Missing the required parameter 'body' when calling submitMetrics"); } MetricContentEncoding contentEncoding = parameters.contentEncoding; // create path and map variables String localVarPath = "/api/v1/series"; + Map localVarHeaderParams = new HashMap(); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.submitMetrics", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"text/json", "application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"text/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.submitMetrics", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"text/json", "application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"text/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Submit metrics. * - *

See {@link #submitMetricsWithHttpInfo}. + * See {@link #submitMetricsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IntakePayloadAccepted>> */ - public CompletableFuture> submitMetricsWithHttpInfoAsync( - MetricsPayload body, SubmitMetricsOptionalParameters parameters) { + public CompletableFuture> submitMetricsWithHttpInfoAsync(MetricsPayload body, SubmitMetricsOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling submitMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling submitMetrics")); + return result; } MetricContentEncoding contentEncoding = parameters.contentEncoding; // create path and map variables String localVarPath = "/api/v1/series"; + Map localVarHeaderParams = new HashMap(); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.submitMetrics", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"text/json", "application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.submitMetrics", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"text/json", "application/json" }, new String[] { "apiKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"text/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"text/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit metric metadata. - * - *

See {@link #updateMetricMetadataWithHttpInfo}. - * - * @param metricName Name of the metric for which to edit metadata. (required) - * @param body New metadata. (required) - * @return MetricMetadata - * @throws ApiException if fails to make API call - */ - public MetricMetadata updateMetricMetadata(String metricName, MetricMetadata body) - throws ApiException { + * Edit metric metadata. + * + * See {@link #updateMetricMetadataWithHttpInfo}. + * + * @param metricName Name of the metric for which to edit metadata. (required) + * @param body New metadata. (required) + * @return MetricMetadata + * @throws ApiException if fails to make API call + */ + public MetricMetadata updateMetricMetadata(String metricName, MetricMetadata body) throws ApiException { return updateMetricMetadataWithHttpInfo(metricName, body).getData(); } /** - * Edit metric metadata. - * - *

See {@link #updateMetricMetadataWithHttpInfoAsync}. - * - * @param metricName Name of the metric for which to edit metadata. (required) - * @param body New metadata. (required) - * @return CompletableFuture<MetricMetadata> - */ - public CompletableFuture updateMetricMetadataAsync( - String metricName, MetricMetadata body) { - return updateMetricMetadataWithHttpInfoAsync(metricName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit metric metadata. + * + * See {@link #updateMetricMetadataWithHttpInfoAsync}. + * + * @param metricName Name of the metric for which to edit metadata. (required) + * @param body New metadata. (required) + * @return CompletableFuture<MetricMetadata> + */ + public CompletableFutureupdateMetricMetadataAsync(String metricName, MetricMetadata body) { + return updateMetricMetadataWithHttpInfoAsync(metricName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit metadata of a specific metric. Find out more about supported types. + *

Edit metadata of a specific metric. Find out more about supported types.

* * @param metricName Name of the metric for which to edit metadata. (required) * @param body New metadata. (required) * @return ApiResponse<MetricMetadata> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1174,112 +924,71 @@ public CompletableFuture updateMetricMetadataAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateMetricMetadataWithHttpInfo( - String metricName, MetricMetadata body) throws ApiException { + public ApiResponse updateMetricMetadataWithHttpInfo(String metricName, MetricMetadata body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling updateMetricMetadata"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling updateMetricMetadata"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateMetricMetadata"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateMetricMetadata"); } // create path and map variables - String localVarPath = - "/api/v1/metrics/{metric_name}" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v1/metrics/{metric_name}" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MetricsApi.updateMetricMetadata", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.MetricsApi.updateMetricMetadata", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit metric metadata. * - *

See {@link #updateMetricMetadataWithHttpInfo}. + * See {@link #updateMetricMetadataWithHttpInfo}. * * @param metricName Name of the metric for which to edit metadata. (required) * @param body New metadata. (required) * @return CompletableFuture<ApiResponse<MetricMetadata>> */ - public CompletableFuture> updateMetricMetadataWithHttpInfoAsync( - String metricName, MetricMetadata body) { + public CompletableFuture> updateMetricMetadataWithHttpInfoAsync(String metricName, MetricMetadata body) { Object localVarPostBody = body; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling updateMetricMetadata")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling updateMetricMetadata")); + 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 updateMetricMetadata")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateMetricMetadata")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/metrics/{metric_name}" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v1/metrics/{metric_name}" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MetricsApi.updateMetricMetadata", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MetricsApi.updateMetricMetadata", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/MonitorsApi.java b/src/main/java/com/datadog/api/client/v1/api/MonitorsApi.java index 8504b95e025..1e28b4dd8b6 100644 --- a/src/main/java/com/datadog/api/client/v1/api/MonitorsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/MonitorsApi.java @@ -1,28 +1,35 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.CheckCanDeleteMonitorResponse; -import com.datadog.api.client.v1.model.DeletedMonitor; -import com.datadog.api.client.v1.model.Monitor; -import com.datadog.api.client.v1.model.MonitorGroupSearchResponse; -import com.datadog.api.client.v1.model.MonitorSearchResponse; -import com.datadog.api.client.v1.model.MonitorUpdateRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.Monitor; +import com.datadog.api.client.v1.model.CheckCanDeleteMonitorResponse; +import com.datadog.api.client.v1.model.MonitorGroupSearchResponse; +import com.datadog.api.client.v1.model.MonitorSearchResponse; +import com.datadog.api.client.v1.model.DeletedMonitor; +import com.datadog.api.client.v1.model.MonitorUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorsApi { private ApiClient apiClient; - public MonitorsApi() { this(ApiClient.getDefaultApiClient()); } @@ -50,44 +57,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Check if a monitor can be deleted. - * - *

See {@link #checkCanDeleteMonitorWithHttpInfo}. - * - * @param monitorIds The IDs of the monitor to check. (required) - * @return CheckCanDeleteMonitorResponse - * @throws ApiException if fails to make API call - */ - public CheckCanDeleteMonitorResponse checkCanDeleteMonitor(List monitorIds) - throws ApiException { + * Check if a monitor can be deleted. + * + * See {@link #checkCanDeleteMonitorWithHttpInfo}. + * + * @param monitorIds The IDs of the monitor to check. (required) + * @return CheckCanDeleteMonitorResponse + * @throws ApiException if fails to make API call + */ + public CheckCanDeleteMonitorResponse checkCanDeleteMonitor(List monitorIds) throws ApiException { return checkCanDeleteMonitorWithHttpInfo(monitorIds).getData(); } /** - * Check if a monitor can be deleted. - * - *

See {@link #checkCanDeleteMonitorWithHttpInfoAsync}. - * - * @param monitorIds The IDs of the monitor to check. (required) - * @return CompletableFuture<CheckCanDeleteMonitorResponse> - */ - public CompletableFuture checkCanDeleteMonitorAsync( - List monitorIds) { - return checkCanDeleteMonitorWithHttpInfoAsync(monitorIds) - .thenApply( - response -> { - return response.getData(); - }); + * Check if a monitor can be deleted. + * + * See {@link #checkCanDeleteMonitorWithHttpInfoAsync}. + * + * @param monitorIds The IDs of the monitor to check. (required) + * @return CompletableFuture<CheckCanDeleteMonitorResponse> + */ + public CompletableFuturecheckCanDeleteMonitorAsync(List monitorIds) { + return checkCanDeleteMonitorWithHttpInfoAsync(monitorIds).thenApply(response -> { + return response.getData(); + }); } + /** - * Check if the given monitors can be deleted. + *

Check if the given monitors can be deleted.

* * @param monitorIds The IDs of the monitor to check. (required) * @return ApiResponse<CheckCanDeleteMonitorResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,68 +101,47 @@ public CompletableFuture checkCanDeleteMonitorAsy * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse checkCanDeleteMonitorWithHttpInfo( - List monitorIds) throws ApiException { + public ApiResponse checkCanDeleteMonitorWithHttpInfo(List monitorIds) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'monitorIds' is set if (monitorIds == null) { - throw new ApiException( - 400, "Missing the required parameter 'monitorIds' when calling checkCanDeleteMonitor"); + throw new ApiException(400, "Missing the required parameter 'monitorIds' when calling checkCanDeleteMonitor"); } // create path and map variables String localVarPath = "/api/v1/monitor/can_delete"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "monitor_ids", monitorIds)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.checkCanDeleteMonitor", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.checkCanDeleteMonitor", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Check if a monitor can be deleted. * - *

See {@link #checkCanDeleteMonitorWithHttpInfo}. + * See {@link #checkCanDeleteMonitorWithHttpInfo}. * * @param monitorIds The IDs of the monitor to check. (required) * @return CompletableFuture<ApiResponse<CheckCanDeleteMonitorResponse>> */ - public CompletableFuture> - checkCanDeleteMonitorWithHttpInfoAsync(List monitorIds) { + public CompletableFuture> checkCanDeleteMonitorWithHttpInfoAsync(List monitorIds) { Object localVarPostBody = null; // verify the required parameter 'monitorIds' is set if (monitorIds == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'monitorIds' when calling checkCanDeleteMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'monitorIds' when calling checkCanDeleteMonitor")); + return result; } // create path and map variables String localVarPath = "/api/v1/monitor/can_delete"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -166,352 +149,215 @@ public ApiResponse checkCanDeleteMonitorWithHttpI Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.checkCanDeleteMonitor", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.checkCanDeleteMonitor", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a monitor. - * - *

See {@link #createMonitorWithHttpInfo}. - * - * @param body Create a monitor request body. (required) - * @return Monitor - * @throws ApiException if fails to make API call - */ - public Monitor createMonitor(Monitor body) throws ApiException { + * Create a monitor. + * + * See {@link #createMonitorWithHttpInfo}. + * + * @param body Create a monitor request body. (required) + * @return Monitor + * @throws ApiException if fails to make API call + */ + public Monitor createMonitor(Monitor body) throws ApiException { return createMonitorWithHttpInfo(body).getData(); } /** - * Create a monitor. - * - *

See {@link #createMonitorWithHttpInfoAsync}. - * - * @param body Create a monitor request body. (required) - * @return CompletableFuture<Monitor> - */ - public CompletableFuture createMonitorAsync(Monitor body) { - return createMonitorWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a monitor. + * + * See {@link #createMonitorWithHttpInfoAsync}. + * + * @param body Create a monitor request body. (required) + * @return CompletableFuture<Monitor> + */ + public CompletableFuturecreateMonitorAsync(Monitor body) { + return createMonitorWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a monitor using the specified options. - * + *

Create a monitor using the specified options.

*

Monitor Types

- * - *

The type of monitor chosen from: - * + *

The type of monitor chosen from:

*
    - *
  • anomaly: query alert - *
  • APM: query alert or trace-analytics alert - *
  • composite: composite - *
  • custom: service check - *
  • event: event alert - *
  • forecast: query alert - *
  • host: service check - *
  • integration: query alert or service check - *
  • live process: process alert - *
  • logs: log alert - *
  • metric: query alert - *
  • network: service check - *
  • outlier: query alert - *
  • process: service check - *
  • rum: rum alert - *
  • SLO: slo alert - *
  • watchdog: event alert - *
  • event-v2: event-v2 alert - *
  • audit: audit alert - *
  • error-tracking: error-tracking alert + *
  • anomaly: query alert
  • + *
  • APM: query alert or trace-analytics alert
  • + *
  • composite: composite
  • + *
  • custom: service check
  • + *
  • event: event alert
  • + *
  • forecast: query alert
  • + *
  • host: service check
  • + *
  • integration: query alert or service check
  • + *
  • live process: process alert
  • + *
  • logs: log alert
  • + *
  • metric: query alert
  • + *
  • network: service check
  • + *
  • outlier: query alert
  • + *
  • process: service check
  • + *
  • rum: rum alert
  • + *
  • SLO: slo alert
  • + *
  • watchdog: event alert
  • + *
  • event-v2: event-v2 alert
  • + *
  • audit: audit alert
  • + *
  • error-tracking: error-tracking alert
  • *
- * - *

Note: Synthetic monitors are created through the Synthetics API. See the - * [Synthetics API] (https://docs.datadoghq.com/api/latest/synthetics/) documentation for more - * information. - * + *

Note: Synthetic monitors are created through the Synthetics API. See the [Synthetics API] (https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information.

*

Query Types

- * - *

Metric Alert Query - * - *

Example: time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator # - * + *

Metric Alert Query

+ *

Example: time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #

*
    - *
  • time_aggr: avg, sum, max, min, change, or pct_change - *
  • time_window: last_#m (with # between 1 and 10080 - * depending on the monitor type) or last_#h(with # between 1 and - * 168 depending on the monitor type) or last_1d, or last_1w - *
  • space_aggr: avg, sum, min, or max - *
  • tags: one or more tags (comma-separated), or * - *
  • key: a 'key' in key:value tag syntax; defines a separate alert for each tag - * in the group (multi-alert) - *
  • operator: <, <=, >, >=, ==, or != - *
  • #: an integer or decimal number used to set the threshold + *
  • time_aggr: avg, sum, max, min, change, or pct_change
  • + *
  • time_window: last_#m (with # between 1 and 10080 depending on the monitor type) or last_#h(with # between 1 and 168 depending on the monitor type) or last_1d, or last_1w
  • + *
  • space_aggr: avg, sum, min, or max
  • + *
  • tags: one or more tags (comma-separated), or *
  • + *
  • key: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert)
  • + *
  • operator: <, <=, >, >=, ==, or !=
  • + *
  • #: an integer or decimal number used to set the threshold
  • *
- * - *

If you are using the _change_ or _pct_change_ time aggregator, - * instead use change_aggr(time_aggr(time_window), - * timeshift):space_aggr:metric{tags} [by {key}] operator # with: - * + *

If you are using the _change_ or _pct_change_ time aggregator, instead use change_aggr(time_aggr(time_window), + * timeshift):space_aggr:metric{tags} [by {key}] operator # with:

*
    - *
  • change_aggr change, pct_change - *
  • time_aggr avg, sum, max, min Learn - * more - *
  • time_window last_#m (between 1 and 2880 depending on the monitor type), - * last_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - *
  • timeshift #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago + *
  • change_aggr change, pct_change
  • + *
  • time_aggr avg, sum, max, min Learn more
  • + *
  • time_window last_#m (between 1 and 2880 depending on the monitor type), last_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2)
  • + *
  • timeshift #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago
  • *
- * - *

Use this to create an outlier monitor using the following query: - * avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0 - * - * - *

Service Check Query - * - *

Example: "check".over(tags).last(count).by(group).count_by_status() - * + *

Use this to create an outlier monitor using the following query: + * avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0

+ *

Service Check Query

+ *

Example: "check".over(tags).last(count).by(group).count_by_status()

*
    - *
  • check name of the check, for example datadog.agent.up - *
  • tags one or more quoted tags (comma-separated), or "*". for example: - * .over("env:prod", "role:db"); over cannot be blank. - *
  • count must be at greater than or equal to your max threshold (defined in the - * options). It is limited to 100. For example, if you've specified to notify - * on 1 critical, 3 ok, and 2 warn statuses, count should be at least 3. - *
  • group must be specified for check monitors. Per-check grouping is already - * explicitly known for some service checks. For example, Postgres integration monitors are - * tagged by db, host, and port, and Network monitors - * by host, instance, and url. See Service Checks - * documentation for more information. + *
  • check name of the check, for example datadog.agent.up
  • + *
  • tags one or more quoted tags (comma-separated), or "*". for example: .over("env:prod", "role:db"); over cannot be blank.
  • + *
  • count must be at greater than or equal to your max threshold (defined in the options). It is limited to 100. + * For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, count should be at least 3.
  • + *
  • group must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. + * For example, Postgres integration monitors are tagged by db, host, and port, and Network monitors by host, instance, and url. See Service Checks documentation for more information.
  • *
- * - *

Event Alert Query - * - *

Example: - * events('sources:nagios status:error,warning priority:normal tags: "string query"').rollup("count").last("1h")" - * - * + *

Event Alert Query

+ *

Example: events('sources:nagios status:error,warning priority:normal tags: "string query"').rollup("count").last("1h")"

*
    - *
  • event, the event query string: - *
  • string_query free text query to match against event title and text. - *
  • sources event sources (comma-separated). - *
  • status event statuses (comma-separated). Valid options: error, warn, and - * info. - *
  • priority event priorities (comma-separated). Valid options: low, normal, - * all. - *
  • host event reporting host (comma-separated). - *
  • tags event tags (comma-separated). - *
  • excluded_tags excluded event tags (comma-separated). - *
  • rollup the stats roll-up method. count is the only supported - * method now. - *
  • last the timeframe to roll up the counts. Examples: 45m, 4h. Supported - * timeframes: m, h and d. This value should not exceed 48 hours. + *
  • event, the event query string:
  • + *
  • string_query free text query to match against event title and text.
  • + *
  • sources event sources (comma-separated).
  • + *
  • status event statuses (comma-separated). Valid options: error, warn, and info.
  • + *
  • priority event priorities (comma-separated). Valid options: low, normal, all.
  • + *
  • host event reporting host (comma-separated).
  • + *
  • tags event tags (comma-separated).
  • + *
  • excluded_tags excluded event tags (comma-separated).
  • + *
  • rollup the stats roll-up method. count is the only supported method now.
  • + *
  • last the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours.
  • *
- * - *

NOTE The Event Alert Query is being deprecated and replaced by the Event V2 - * Alert Query. For more information, see the Event - * Migration guide. - * - *

Event V2 Alert Query - * - *

Example: events(query).rollup(rollup_method[, measure]).last(time_window) operator # - * - * + *

NOTE The Event Alert Query is being deprecated and replaced by the Event V2 Alert Query. For more information, see the Event Migration guide.

+ *

Event V2 Alert Query

+ *

Example: events(query).rollup(rollup_method[, measure]).last(time_window) operator #

*
    - *
  • query The search query - following the Log search syntax. - *
  • rollup_method The stats roll-up method - supports count, - * avg and cardinality. - *
  • measure For avg and cardinality rollup_method - - * specify the measure or the facet name you want to use. - *
  • time_window #m (between 1 and 2880), #h (between 1 and 48). - *
  • operator <, <=, >, - * >=, ==, or !=. - *
  • # an integer or decimal number used to set the threshold. + *
  • query The search query - following the Log search syntax.
  • + *
  • rollup_method The stats roll-up method - supports count, avg and cardinality.
  • + *
  • measure For avg and cardinality rollup_method - specify the measure or the facet name you want to use.
  • + *
  • time_window #m (between 1 and 2880), #h (between 1 and 48).
  • + *
  • operator <, <=, >, >=, ==, or !=.
  • + *
  • # an integer or decimal number used to set the threshold.
  • *
- * - *

Process Alert Query - * - *

Example: processes(search).over(tags).rollup('count').last(timeframe) operator # - * - * + *

Process Alert Query

+ *

Example: processes(search).over(tags).rollup('count').last(timeframe) operator #

*
    - *
  • search free text search string for querying processes. Matching processes - * match results on the Live - * Processes page. - *
  • tags one or more tags (comma-separated) - *
  • timeframe the timeframe to roll up the counts. Examples: 10m, 4h. Supported - * timeframes: s, m, h and d - *
  • operator <, <=, >, >=, ==, or != - *
  • # an integer or decimal number used to set the threshold + *
  • search free text search string for querying processes. + * Matching processes match results on the Live Processes page.
  • + *
  • tags one or more tags (comma-separated)
  • + *
  • timeframe the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d
  • + *
  • operator <, <=, >, >=, ==, or !=
  • + *
  • # an integer or decimal number used to set the threshold
  • *
- * - *

Logs Alert Query - * - *

Example: - * logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator # - * - * + *

Logs Alert Query

+ *

Example: logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #

*
    - *
  • query The search query - following the Log search syntax. - *
  • index_name For multi-index organizations, the log index in which the request - * is performed. - *
  • rollup_method The stats roll-up method - supports count, - * avg and cardinality. - *
  • measure For avg and cardinality rollup_method - - * specify the measure or the facet name you want to use. - *
  • time_window #m (between 1 and 2880), #h (between 1 and 48). - *
  • operator <, <=, >, - * >=, ==, or !=. - *
  • # an integer or decimal number used to set the threshold. + *
  • query The search query - following the Log search syntax.
  • + *
  • index_name For multi-index organizations, the log index in which the request is performed.
  • + *
  • rollup_method The stats roll-up method - supports count, avg and cardinality.
  • + *
  • measure For avg and cardinality rollup_method - specify the measure or the facet name you want to use.
  • + *
  • time_window #m (between 1 and 2880), #h (between 1 and 48).
  • + *
  • operator <, <=, >, >=, ==, or !=.
  • + *
  • # an integer or decimal number used to set the threshold.
  • *
- * - *

Composite Query - * - *

Example: 12345 && 67890, where 12345 and 67890 - * are the IDs of non-composite monitors - * + *

Composite Query

+ *

Example: 12345 && 67890, where 12345 and 67890 are the IDs of non-composite monitors

*
    - *
  • name [required, default = dynamic, based on - * query]: The name of the alert. - *
  • message [required, default = dynamic, based on - * query]: A message to include with notifications for this monitor. Email - * notifications can be sent to specific users by using the same '@username' notation as - * events. - *
  • tags [optional, default = empty list]: A - * list of tags to associate with your monitor. When getting all monitor details via the - * API, use the monitor_tags argument to filter results by these tags. It is - * only available via the API and isn't visible or editable in the Datadog UI. + *
  • name [required, default = dynamic, based on query]: The name of the alert.
  • + *
  • message [required, default = dynamic, based on query]: A message to include with notifications for this monitor. + * Email notifications can be sent to specific users by using the same '@username' notation as events.
  • + *
  • tags [optional, default = empty list]: A list of tags to associate with your monitor. + * When getting all monitor details via the API, use the monitor_tags argument to filter results by these tags. + * It is only available via the API and isn't visible or editable in the Datadog UI.
  • *
- * - *

SLO Alert Query - * - *

Example: error_budget("slo_id").over("time_window") operator # - * + *

SLO Alert Query

+ *

Example: error_budget("slo_id").over("time_window") operator #

*
    - *
  • slo_id: The alphanumeric SLO ID of the SLO you are configuring the alert - * for. - *
  • time_window: The time window of the SLO target you wish to alert on. Valid - * options: 7d, 30d, 90d. - *
  • operator: >= or > + *
  • slo_id: The alphanumeric SLO ID of the SLO you are configuring the alert for.
  • + *
  • time_window: The time window of the SLO target you wish to alert on. Valid options: 7d, 30d, 90d.
  • + *
  • operator: >= or >
  • *
- * - *

Audit Alert Query - * - *

Example: audits(query).rollup(rollup_method[, measure]).last(time_window) operator # - * - * + *

Audit Alert Query

+ *

Example: audits(query).rollup(rollup_method[, measure]).last(time_window) operator #

*
    - *
  • query The search query - following the Log search syntax. - *
  • rollup_method The stats roll-up method - supports count, - * avg and cardinality. - *
  • measure For avg and cardinality rollup_method - - * specify the measure or the facet name you want to use. - *
  • time_window #m (between 1 and 2880), #h (between 1 and 48). - *
  • operator <, <=, >, - * >=, ==, or !=. - *
  • # an integer or decimal number used to set the threshold. + *
  • query The search query - following the Log search syntax.
  • + *
  • rollup_method The stats roll-up method - supports count, avg and cardinality.
  • + *
  • measure For avg and cardinality rollup_method - specify the measure or the facet name you want to use.
  • + *
  • time_window #m (between 1 and 2880), #h (between 1 and 48).
  • + *
  • operator <, <=, >, >=, ==, or !=.
  • + *
  • # an integer or decimal number used to set the threshold.
  • *
- * - *

NOTE Only available on US1-FED and in closed beta on US1, EU, US3, and US5. - * - *

CI Pipelines Alert Query - * - *

Example: - * ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) operator # - * + *

NOTE Only available on US1-FED and in closed beta on US1, EU, US3, and US5.

+ *

CI Pipelines Alert Query

+ *

Example: ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) operator #

*
    - *
  • query The search query - following the Log search syntax. - *
  • rollup_method The stats roll-up method - supports count, - * avg, and cardinality. - *
  • measure For avg and cardinality rollup_method - - * specify the measure or the facet name you want to use. - *
  • time_window #m (between 1 and 2880), #h (between 1 and 48). - *
  • operator <, <=, >, - * >=, ==, or !=. - *
  • # an integer or decimal number used to set the threshold. + *
  • query The search query - following the Log search syntax.
  • + *
  • rollup_method The stats roll-up method - supports count, avg, and cardinality.
  • + *
  • measure For avg and cardinality rollup_method - specify the measure or the facet name you want to use.
  • + *
  • time_window #m (between 1 and 2880), #h (between 1 and 48).
  • + *
  • operator <, <=, >, >=, ==, or !=.
  • + *
  • # an integer or decimal number used to set the threshold.
  • *
- * - *

NOTE CI Pipeline monitors are in alpha on US1, EU, US3 and US5. - * - *

CI Tests Alert Query - * - *

Example: ci-tests(query).rollup(rollup_method[, measure]).last(time_window) operator # - * - * + *

NOTE CI Pipeline monitors are in alpha on US1, EU, US3 and US5.

+ *

CI Tests Alert Query

+ *

Example: ci-tests(query).rollup(rollup_method[, measure]).last(time_window) operator #

*
    - *
  • query The search query - following the Log search syntax. - *
  • rollup_method The stats roll-up method - supports count, - * avg, and cardinality. - *
  • measure For avg and cardinality rollup_method - - * specify the measure or the facet name you want to use. - *
  • time_window #m (between 1 and 2880), #h (between 1 and 48). - *
  • operator <, <=, >, - * >=, ==, or !=. - *
  • # an integer or decimal number used to set the threshold. + *
  • query The search query - following the Log search syntax.
  • + *
  • rollup_method The stats roll-up method - supports count, avg, and cardinality.
  • + *
  • measure For avg and cardinality rollup_method - specify the measure or the facet name you want to use.
  • + *
  • time_window #m (between 1 and 2880), #h (between 1 and 48).
  • + *
  • operator <, <=, >, >=, ==, or !=.
  • + *
  • # an integer or decimal number used to set the threshold.
  • *
- * - *

NOTE CI Test monitors are available only in closed beta on US1, EU, US3 and - * US5. - * - *

Error Tracking Alert Query - * - *

Example(RUM): - * error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator # - * Example(APM Traces): - * error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator # - * - * + *

NOTE CI Test monitors are available only in closed beta on US1, EU, US3 and US5.

+ *

Error Tracking Alert Query

+ *

Example(RUM): error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator # + * Example(APM Traces): error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator #

*
    - *
  • query The search query - following the Log search syntax. - *
  • rollup_method The stats roll-up method - supports count, - * avg, and cardinality. - *
  • measure For avg and cardinality rollup_method - - * specify the measure or the facet name you want to use. - *
  • time_window #m (between 1 and 2880), #h (between 1 and 48). - *
  • operator <, <=, >, - * >=, ==, or !=. - *
  • # an integer or decimal number used to set the threshold. + *
  • query The search query - following the Log search syntax.
  • + *
  • rollup_method The stats roll-up method - supports count, avg, and cardinality.
  • + *
  • measure For avg and cardinality rollup_method - specify the measure or the facet name you want to use.
  • + *
  • time_window #m (between 1 and 2880), #h (between 1 and 48).
  • + *
  • operator <, <=, >, >=, ==, or !=.
  • + *
  • # an integer or decimal number used to set the threshold.
  • *
* * @param body Create a monitor request body. (required) * @return ApiResponse<Monitor> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -525,38 +371,23 @@ public ApiResponse createMonitorWithHttpInfo(Monitor body) throws ApiEx // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createMonitor"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createMonitor"); } // create path and map variables String localVarPath = "/api/v1/monitor"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.createMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.createMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a monitor. * - *

See {@link #createMonitorWithHttpInfo}. + * See {@link #createMonitorWithHttpInfo}. * * @param body Create a monitor request body. (required) * @return CompletableFuture<ApiResponse<Monitor>> @@ -566,53 +397,37 @@ public CompletableFuture> createMonitorWithHttpInfoAsync(Mo // 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 createMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createMonitor")); + return result; } // create path and map variables String localVarPath = "/api/v1/monitor"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.createMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.createMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to deleteMonitor. */ + /** + * Manage optional parameters to deleteMonitor. + */ public static class DeleteMonitorOptionalParameters { private String force; /** * Set force. - * - * @param force Delete the monitor even if it's referenced by other resources (for example SLO, - * composite monitor). (optional) + * @param force Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). (optional) * @return DeleteMonitorOptionalParameters */ public DeleteMonitorOptionalParameters force(String force) { @@ -622,76 +437,71 @@ public DeleteMonitorOptionalParameters force(String force) { } /** - * Delete a monitor. - * - *

See {@link #deleteMonitorWithHttpInfo}. - * - * @param monitorId The ID of the monitor. (required) - * @return DeletedMonitor - * @throws ApiException if fails to make API call - */ - public DeletedMonitor deleteMonitor(Long monitorId) throws ApiException { - return deleteMonitorWithHttpInfo(monitorId, new DeleteMonitorOptionalParameters()).getData(); + * Delete a monitor. + * + * See {@link #deleteMonitorWithHttpInfo}. + * + * @param monitorId The ID of the monitor. (required) + * @return DeletedMonitor + * @throws ApiException if fails to make API call + */ + public DeletedMonitor deleteMonitor (Long monitorId) throws ApiException { + return deleteMonitorWithHttpInfo( monitorId, new DeleteMonitorOptionalParameters()).getData(); } /** - * Delete a monitor. - * - *

See {@link #deleteMonitorWithHttpInfoAsync}. - * - * @param monitorId The ID of the monitor. (required) - * @return CompletableFuture<DeletedMonitor> - */ - public CompletableFuture deleteMonitorAsync(Long monitorId) { - return deleteMonitorWithHttpInfoAsync(monitorId, new DeleteMonitorOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a monitor. + * + * See {@link #deleteMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the monitor. (required) + * @return CompletableFuture<DeletedMonitor> + */ + public CompletableFuturedeleteMonitorAsync(Long monitorId) { + return deleteMonitorWithHttpInfoAsync(monitorId, new DeleteMonitorOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Delete a monitor. - * - *

See {@link #deleteMonitorWithHttpInfo}. - * - * @param monitorId The ID of the monitor. (required) - * @param parameters Optional parameters for the request. - * @return DeletedMonitor - * @throws ApiException if fails to make API call - */ - public DeletedMonitor deleteMonitor(Long monitorId, DeleteMonitorOptionalParameters parameters) - throws ApiException { + * Delete a monitor. + * + * See {@link #deleteMonitorWithHttpInfo}. + * + * @param monitorId The ID of the monitor. (required) + * @param parameters Optional parameters for the request. + * @return DeletedMonitor + * @throws ApiException if fails to make API call + */ + public DeletedMonitor deleteMonitor(Long monitorId, DeleteMonitorOptionalParameters parameters) throws ApiException { return deleteMonitorWithHttpInfo(monitorId, parameters).getData(); } /** - * Delete a monitor. - * - *

See {@link #deleteMonitorWithHttpInfoAsync}. - * - * @param monitorId The ID of the monitor. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<DeletedMonitor> - */ - public CompletableFuture deleteMonitorAsync( - Long monitorId, DeleteMonitorOptionalParameters parameters) { - return deleteMonitorWithHttpInfoAsync(monitorId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a monitor. + * + * See {@link #deleteMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the monitor. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<DeletedMonitor> + */ + public CompletableFuturedeleteMonitorAsync( Long monitorId, DeleteMonitorOptionalParameters parameters) { + return deleteMonitorWithHttpInfoAsync(monitorId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete the specified monitor + *

Delete the specified monitor

* * @param monitorId The ID of the monitor. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<DeletedMonitor> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -702,73 +512,52 @@ public CompletableFuture deleteMonitorAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteMonitorWithHttpInfo( - Long monitorId, DeleteMonitorOptionalParameters parameters) throws ApiException { + public ApiResponse deleteMonitorWithHttpInfo(Long monitorId, DeleteMonitorOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'monitorId' is set if (monitorId == null) { - throw new ApiException( - 400, "Missing the required parameter 'monitorId' when calling deleteMonitor"); + throw new ApiException(400, "Missing the required parameter 'monitorId' when calling deleteMonitor"); } String force = parameters.force; // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.deleteMonitor", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.deleteMonitor", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete a monitor. * - *

See {@link #deleteMonitorWithHttpInfo}. + * See {@link #deleteMonitorWithHttpInfo}. * * @param monitorId The ID of the monitor. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<DeletedMonitor>> */ - public CompletableFuture> deleteMonitorWithHttpInfoAsync( - Long monitorId, DeleteMonitorOptionalParameters parameters) { + public CompletableFuture> deleteMonitorWithHttpInfoAsync(Long monitorId, DeleteMonitorOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'monitorId' is set if (monitorId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'monitorId' when calling deleteMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'monitorId' when calling deleteMonitor")); + return result; } String force = parameters.force; // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -776,41 +565,24 @@ public CompletableFuture> deleteMonitorWithHttpInfoA Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.deleteMonitor", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.deleteMonitor", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getMonitor. */ + /** + * Manage optional parameters to getMonitor. + */ public static class GetMonitorOptionalParameters { private String groupStates; /** * Set groupStates. - * - * @param groupStates When specified, shows additional information about the group states. - * Choose one or more from all, alert, warn, and - * no data. (optional) + * @param groupStates When specified, shows additional information about the group states. Choose one or more from all, alert, warn, and no data. (optional) * @return GetMonitorOptionalParameters */ public GetMonitorOptionalParameters groupStates(String groupStates) { @@ -820,76 +592,71 @@ public GetMonitorOptionalParameters groupStates(String groupStates) { } /** - * Get a monitor's details. - * - *

See {@link #getMonitorWithHttpInfo}. - * - * @param monitorId The ID of the monitor (required) - * @return Monitor - * @throws ApiException if fails to make API call - */ - public Monitor getMonitor(Long monitorId) throws ApiException { - return getMonitorWithHttpInfo(monitorId, new GetMonitorOptionalParameters()).getData(); + * Get a monitor's details. + * + * See {@link #getMonitorWithHttpInfo}. + * + * @param monitorId The ID of the monitor (required) + * @return Monitor + * @throws ApiException if fails to make API call + */ + public Monitor getMonitor (Long monitorId) throws ApiException { + return getMonitorWithHttpInfo( monitorId, new GetMonitorOptionalParameters()).getData(); } /** - * Get a monitor's details. - * - *

See {@link #getMonitorWithHttpInfoAsync}. - * - * @param monitorId The ID of the monitor (required) - * @return CompletableFuture<Monitor> - */ - public CompletableFuture getMonitorAsync(Long monitorId) { - return getMonitorWithHttpInfoAsync(monitorId, new GetMonitorOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a monitor's details. + * + * See {@link #getMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the monitor (required) + * @return CompletableFuture<Monitor> + */ + public CompletableFuturegetMonitorAsync(Long monitorId) { + return getMonitorWithHttpInfoAsync(monitorId, new GetMonitorOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a monitor's details. - * - *

See {@link #getMonitorWithHttpInfo}. - * - * @param monitorId The ID of the monitor (required) - * @param parameters Optional parameters for the request. - * @return Monitor - * @throws ApiException if fails to make API call - */ - public Monitor getMonitor(Long monitorId, GetMonitorOptionalParameters parameters) - throws ApiException { + * Get a monitor's details. + * + * See {@link #getMonitorWithHttpInfo}. + * + * @param monitorId The ID of the monitor (required) + * @param parameters Optional parameters for the request. + * @return Monitor + * @throws ApiException if fails to make API call + */ + public Monitor getMonitor(Long monitorId, GetMonitorOptionalParameters parameters) throws ApiException { return getMonitorWithHttpInfo(monitorId, parameters).getData(); } /** - * Get a monitor's details. - * - *

See {@link #getMonitorWithHttpInfoAsync}. - * - * @param monitorId The ID of the monitor (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<Monitor> - */ - public CompletableFuture getMonitorAsync( - Long monitorId, GetMonitorOptionalParameters parameters) { - return getMonitorWithHttpInfoAsync(monitorId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a monitor's details. + * + * See {@link #getMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the monitor (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Monitor> + */ + public CompletableFuturegetMonitorAsync( Long monitorId, GetMonitorOptionalParameters parameters) { + return getMonitorWithHttpInfoAsync(monitorId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get details about the specified monitor from your organization. + *

Get details about the specified monitor from your organization.

* * @param monitorId The ID of the monitor (required) * @param parameters Optional parameters for the request. * @return ApiResponse<Monitor> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -899,73 +666,52 @@ public CompletableFuture getMonitorAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getMonitorWithHttpInfo( - Long monitorId, GetMonitorOptionalParameters parameters) throws ApiException { + public ApiResponse getMonitorWithHttpInfo(Long monitorId, GetMonitorOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'monitorId' is set if (monitorId == null) { - throw new ApiException( - 400, "Missing the required parameter 'monitorId' when calling getMonitor"); + throw new ApiException(400, "Missing the required parameter 'monitorId' when calling getMonitor"); } String groupStates = parameters.groupStates; // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "group_states", groupStates)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.getMonitor", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.getMonitor", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a monitor's details. * - *

See {@link #getMonitorWithHttpInfo}. + * See {@link #getMonitorWithHttpInfo}. * * @param monitorId The ID of the monitor (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<Monitor>> */ - public CompletableFuture> getMonitorWithHttpInfoAsync( - Long monitorId, GetMonitorOptionalParameters parameters) { + public CompletableFuture> getMonitorWithHttpInfoAsync(Long monitorId, GetMonitorOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'monitorId' is set if (monitorId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'monitorId' when calling getMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'monitorId' when calling getMonitor")); + return result; } String groupStates = parameters.groupStates; // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -973,32 +719,18 @@ public CompletableFuture> getMonitorWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.getMonitor", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.getMonitor", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listMonitors. */ + /** + * Manage optional parameters to listMonitors. + */ public static class ListMonitorsOptionalParameters { private String groupStates; private String name; @@ -1011,10 +743,7 @@ public static class ListMonitorsOptionalParameters { /** * Set groupStates. - * - * @param groupStates When specified, shows additional information about the group states. - * Choose one or more from all, alert, warn, and - * no data. (optional) + * @param groupStates When specified, shows additional information about the group states. Choose one or more from all, alert, warn, and no data. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters groupStates(String groupStates) { @@ -1024,7 +753,6 @@ public ListMonitorsOptionalParameters groupStates(String groupStates) { /** * Set name. - * * @param name A string to filter monitors by name. (optional) * @return ListMonitorsOptionalParameters */ @@ -1035,9 +763,7 @@ public ListMonitorsOptionalParameters name(String name) { /** * Set tags. - * - * @param tags A comma separated list indicating what tags, if any, should be used to filter the - * list of monitors by scope. For example, host:host0. (optional) + * @param tags A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. For example, host:host0. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters tags(String tags) { @@ -1047,11 +773,7 @@ public ListMonitorsOptionalParameters tags(String tags) { /** * Set monitorTags. - * - * @param monitorTags A comma separated list indicating what service and/or custom tags, if any, - * should be used to filter the list of monitors. Tags created in the Datadog UI - * automatically have the service key prepended. For example, service:my-app. - * (optional) + * @param monitorTags A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors. Tags created in the Datadog UI automatically have the service key prepended. For example, service:my-app. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters monitorTags(String monitorTags) { @@ -1061,9 +783,7 @@ public ListMonitorsOptionalParameters monitorTags(String monitorTags) { /** * Set withDowntimes. - * - * @param withDowntimes If this argument is set to true, then the returned data includes all - * current active downtimes for each monitor. (optional) + * @param withDowntimes If this argument is set to true, then the returned data includes all current active downtimes for each monitor. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters withDowntimes(Boolean withDowntimes) { @@ -1073,10 +793,7 @@ public ListMonitorsOptionalParameters withDowntimes(Boolean withDowntimes) { /** * Set idOffset. - * - * @param idOffset Use this parameter for paginating through large sets of monitors. Start with - * a value of zero, make a request, set the value to the last ID of result set, and then - * repeat until the response is empty. (optional) + * @param idOffset Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters idOffset(Long idOffset) { @@ -1086,9 +803,7 @@ public ListMonitorsOptionalParameters idOffset(Long idOffset) { /** * Set page. - * - * @param page The page to start paginating from. If this argument is not specified, the request - * returns all monitors without pagination. (optional) + * @param page The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters page(Long page) { @@ -1098,11 +813,7 @@ public ListMonitorsOptionalParameters page(Long page) { /** * Set pageSize. - * - * @param pageSize The number of monitors to return per page. If the page argument is not - * specified, the default behavior returns all monitors without a page_size - * limit. However, if page is specified and page_size is not, the argument - * defaults to 100. (optional) + * @param pageSize The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a page_size limit. However, if page is specified and page_size is not, the argument defaults to 100. (optional) * @return ListMonitorsOptionalParameters */ public ListMonitorsOptionalParameters pageSize(Integer pageSize) { @@ -1112,70 +823,66 @@ public ListMonitorsOptionalParameters pageSize(Integer pageSize) { } /** - * Get all monitor details. - * - *

See {@link #listMonitorsWithHttpInfo}. - * - * @return List<Monitor> - * @throws ApiException if fails to make API call - */ - public List listMonitors() throws ApiException { + * Get all monitor details. + * + * See {@link #listMonitorsWithHttpInfo}. + * + * @return List<Monitor> + * @throws ApiException if fails to make API call + */ + public List listMonitors () throws ApiException { return listMonitorsWithHttpInfo(new ListMonitorsOptionalParameters()).getData(); } /** - * Get all monitor details. - * - *

See {@link #listMonitorsWithHttpInfoAsync}. - * - * @return CompletableFuture<List<Monitor>> - */ - public CompletableFuture> listMonitorsAsync() { - return listMonitorsWithHttpInfoAsync(new ListMonitorsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all monitor details. + * + * See {@link #listMonitorsWithHttpInfoAsync}. + * + * @return CompletableFuture<List<Monitor>> + */ + public CompletableFuture>listMonitorsAsync() { + return listMonitorsWithHttpInfoAsync(new ListMonitorsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all monitor details. - * - *

See {@link #listMonitorsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return List<Monitor> - * @throws ApiException if fails to make API call - */ + * Get all monitor details. + * + * See {@link #listMonitorsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return List<Monitor> + * @throws ApiException if fails to make API call + */ public List listMonitors(ListMonitorsOptionalParameters parameters) throws ApiException { return listMonitorsWithHttpInfo(parameters).getData(); } /** - * Get all monitor details. - * - *

See {@link #listMonitorsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<List<Monitor>> - */ - public CompletableFuture> listMonitorsAsync( - ListMonitorsOptionalParameters parameters) { - return listMonitorsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all monitor details. + * + * See {@link #listMonitorsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<List<Monitor>> + */ + public CompletableFuture>listMonitorsAsync(ListMonitorsOptionalParameters parameters) { + return listMonitorsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get details about the specified monitor from your organization. + *

Get details about the specified monitor from your organization.

* * @param parameters Optional parameters for the request. * @return ApiResponse<List<Monitor>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1184,8 +891,7 @@ public CompletableFuture> listMonitorsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse> listMonitorsWithHttpInfo( - ListMonitorsOptionalParameters parameters) throws ApiException { + public ApiResponse> listMonitorsWithHttpInfo(ListMonitorsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String groupStates = parameters.groupStates; String name = parameters.name; @@ -1198,6 +904,7 @@ public ApiResponse> listMonitorsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/monitor"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1210,36 +917,19 @@ public ApiResponse> listMonitorsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.listMonitors", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.listMonitors", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * Get all monitor details. * - *

See {@link #listMonitorsWithHttpInfo}. + * See {@link #listMonitorsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<List<Monitor>>> */ - public CompletableFuture>> listMonitorsWithHttpInfoAsync( - ListMonitorsOptionalParameters parameters) { + public CompletableFuture>> listMonitorsWithHttpInfoAsync(ListMonitorsOptionalParameters parameters) { Object localVarPostBody = null; String groupStates = parameters.groupStates; String name = parameters.name; @@ -1252,6 +942,7 @@ public CompletableFuture>> listMonitorsWithHttpInfoAsy // create path and map variables String localVarPath = "/api/v1/monitor"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1266,32 +957,18 @@ public CompletableFuture>> listMonitorsWithHttpInfoAsy Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.listMonitors", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.listMonitors", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } - /** Manage optional parameters to searchMonitorGroups. */ + /** + * Manage optional parameters to searchMonitorGroups. + */ public static class SearchMonitorGroupsOptionalParameters { private String query; private Long page; @@ -1300,13 +977,7 @@ public static class SearchMonitorGroupsOptionalParameters { /** * Set query. - * - * @param query After entering a search query in your Manage Monitor page use the query - * parameter value in the URL of the page as value for this parameter. Consult the dedicated - * manage monitor documentation page to - * learn more. The query can contain any number of space-separated monitor attributes, for - * instance query="type:metric status:alert". (optional) + * @param query After entering a search query in your Manage Monitor page use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated manage monitor documentation page to learn more. The query can contain any number of space-separated monitor attributes, for instance query="type:metric status:alert". (optional) * @return SearchMonitorGroupsOptionalParameters */ public SearchMonitorGroupsOptionalParameters query(String query) { @@ -1316,7 +987,6 @@ public SearchMonitorGroupsOptionalParameters query(String query) { /** * Set page. - * * @param page Page to start paginating from. (optional, default to 0) * @return SearchMonitorGroupsOptionalParameters */ @@ -1327,7 +997,6 @@ public SearchMonitorGroupsOptionalParameters page(Long page) { /** * Set perPage. - * * @param perPage Number of monitors to return per page. (optional, default to 30) * @return SearchMonitorGroupsOptionalParameters */ @@ -1338,16 +1007,7 @@ public SearchMonitorGroupsOptionalParameters perPage(Long perPage) { /** * Set sort. - * - * @param sort String for sort order, composed of field and sort order separate by a comma, for - * example name,asc. Supported sort directions: asc, desc - * . Supported fields: - *

    - *
  • name - *
  • status - *
  • tags - *
- * (optional) + * @param sort String for sort order, composed of field and sort order separate by a comma, for example name,asc. Supported sort directions: asc, desc. Supported fields:
  • name
  • status
  • tags
(optional) * @return SearchMonitorGroupsOptionalParameters */ public SearchMonitorGroupsOptionalParameters sort(String sort) { @@ -1357,71 +1017,66 @@ public SearchMonitorGroupsOptionalParameters sort(String sort) { } /** - * Monitors group search. - * - *

See {@link #searchMonitorGroupsWithHttpInfo}. - * - * @return MonitorGroupSearchResponse - * @throws ApiException if fails to make API call - */ - public MonitorGroupSearchResponse searchMonitorGroups() throws ApiException { + * Monitors group search. + * + * See {@link #searchMonitorGroupsWithHttpInfo}. + * + * @return MonitorGroupSearchResponse + * @throws ApiException if fails to make API call + */ + public MonitorGroupSearchResponse searchMonitorGroups () throws ApiException { return searchMonitorGroupsWithHttpInfo(new SearchMonitorGroupsOptionalParameters()).getData(); } /** - * Monitors group search. - * - *

See {@link #searchMonitorGroupsWithHttpInfoAsync}. - * - * @return CompletableFuture<MonitorGroupSearchResponse> - */ - public CompletableFuture searchMonitorGroupsAsync() { - return searchMonitorGroupsWithHttpInfoAsync(new SearchMonitorGroupsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Monitors group search. + * + * See {@link #searchMonitorGroupsWithHttpInfoAsync}. + * + * @return CompletableFuture<MonitorGroupSearchResponse> + */ + public CompletableFuturesearchMonitorGroupsAsync() { + return searchMonitorGroupsWithHttpInfoAsync(new SearchMonitorGroupsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Monitors group search. - * - *

See {@link #searchMonitorGroupsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return MonitorGroupSearchResponse - * @throws ApiException if fails to make API call - */ - public MonitorGroupSearchResponse searchMonitorGroups( - SearchMonitorGroupsOptionalParameters parameters) throws ApiException { + * Monitors group search. + * + * See {@link #searchMonitorGroupsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return MonitorGroupSearchResponse + * @throws ApiException if fails to make API call + */ + public MonitorGroupSearchResponse searchMonitorGroups(SearchMonitorGroupsOptionalParameters parameters) throws ApiException { return searchMonitorGroupsWithHttpInfo(parameters).getData(); } /** - * Monitors group search. - * - *

See {@link #searchMonitorGroupsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MonitorGroupSearchResponse> - */ - public CompletableFuture searchMonitorGroupsAsync( - SearchMonitorGroupsOptionalParameters parameters) { - return searchMonitorGroupsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Monitors group search. + * + * See {@link #searchMonitorGroupsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MonitorGroupSearchResponse> + */ + public CompletableFuturesearchMonitorGroupsAsync(SearchMonitorGroupsOptionalParameters parameters) { + return searchMonitorGroupsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Search and filter your monitor groups details. + *

Search and filter your monitor groups details.

* * @param parameters Optional parameters for the request. * @return ApiResponse<MonitorGroupSearchResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1430,8 +1085,7 @@ public CompletableFuture searchMonitorGroupsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchMonitorGroupsWithHttpInfo( - SearchMonitorGroupsOptionalParameters parameters) throws ApiException { + public ApiResponse searchMonitorGroupsWithHttpInfo(SearchMonitorGroupsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String query = parameters.query; Long page = parameters.page; @@ -1440,6 +1094,7 @@ public ApiResponse searchMonitorGroupsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/monitor/groups/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1448,36 +1103,19 @@ public ApiResponse searchMonitorGroupsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "per_page", perPage)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.searchMonitorGroups", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.searchMonitorGroups", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Monitors group search. * - *

See {@link #searchMonitorGroupsWithHttpInfo}. + * See {@link #searchMonitorGroupsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MonitorGroupSearchResponse>> */ - public CompletableFuture> - searchMonitorGroupsWithHttpInfoAsync(SearchMonitorGroupsOptionalParameters parameters) { + public CompletableFuture> searchMonitorGroupsWithHttpInfoAsync(SearchMonitorGroupsOptionalParameters parameters) { Object localVarPostBody = null; String query = parameters.query; Long page = parameters.page; @@ -1486,6 +1124,7 @@ public ApiResponse searchMonitorGroupsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/monitor/groups/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1496,32 +1135,18 @@ public ApiResponse searchMonitorGroupsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.searchMonitorGroups", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.searchMonitorGroups", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchMonitors. */ + /** + * Manage optional parameters to searchMonitors. + */ public static class SearchMonitorsOptionalParameters { private String query; private Long page; @@ -1530,13 +1155,7 @@ public static class SearchMonitorsOptionalParameters { /** * Set query. - * - * @param query After entering a search query in your Manage Monitor page use the query - * parameter value in the URL of the page as value for this parameter. Consult the dedicated - * manage monitor documentation page to - * learn more. The query can contain any number of space-separated monitor attributes, for - * instance query="type:metric status:alert". (optional) + * @param query After entering a search query in your Manage Monitor page use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated manage monitor documentation page to learn more. The query can contain any number of space-separated monitor attributes, for instance query="type:metric status:alert". (optional) * @return SearchMonitorsOptionalParameters */ public SearchMonitorsOptionalParameters query(String query) { @@ -1546,7 +1165,6 @@ public SearchMonitorsOptionalParameters query(String query) { /** * Set page. - * * @param page Page to start paginating from. (optional, default to 0) * @return SearchMonitorsOptionalParameters */ @@ -1557,7 +1175,6 @@ public SearchMonitorsOptionalParameters page(Long page) { /** * Set perPage. - * * @param perPage Number of monitors to return per page. (optional, default to 30) * @return SearchMonitorsOptionalParameters */ @@ -1568,16 +1185,7 @@ public SearchMonitorsOptionalParameters perPage(Long perPage) { /** * Set sort. - * - * @param sort String for sort order, composed of field and sort order separate by a comma, for - * example name,asc. Supported sort directions: asc, desc - * . Supported fields: - *

    - *
  • name - *
  • status - *
  • tags - *
- * (optional) + * @param sort String for sort order, composed of field and sort order separate by a comma, for example name,asc. Supported sort directions: asc, desc. Supported fields:
  • name
  • status
  • tags
(optional) * @return SearchMonitorsOptionalParameters */ public SearchMonitorsOptionalParameters sort(String sort) { @@ -1587,71 +1195,66 @@ public SearchMonitorsOptionalParameters sort(String sort) { } /** - * Monitors search. - * - *

See {@link #searchMonitorsWithHttpInfo}. - * - * @return MonitorSearchResponse - * @throws ApiException if fails to make API call - */ - public MonitorSearchResponse searchMonitors() throws ApiException { + * Monitors search. + * + * See {@link #searchMonitorsWithHttpInfo}. + * + * @return MonitorSearchResponse + * @throws ApiException if fails to make API call + */ + public MonitorSearchResponse searchMonitors () throws ApiException { return searchMonitorsWithHttpInfo(new SearchMonitorsOptionalParameters()).getData(); } /** - * Monitors search. - * - *

See {@link #searchMonitorsWithHttpInfoAsync}. - * - * @return CompletableFuture<MonitorSearchResponse> - */ - public CompletableFuture searchMonitorsAsync() { - return searchMonitorsWithHttpInfoAsync(new SearchMonitorsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Monitors search. + * + * See {@link #searchMonitorsWithHttpInfoAsync}. + * + * @return CompletableFuture<MonitorSearchResponse> + */ + public CompletableFuturesearchMonitorsAsync() { + return searchMonitorsWithHttpInfoAsync(new SearchMonitorsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Monitors search. - * - *

See {@link #searchMonitorsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return MonitorSearchResponse - * @throws ApiException if fails to make API call - */ - public MonitorSearchResponse searchMonitors(SearchMonitorsOptionalParameters parameters) - throws ApiException { + * Monitors search. + * + * See {@link #searchMonitorsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return MonitorSearchResponse + * @throws ApiException if fails to make API call + */ + public MonitorSearchResponse searchMonitors(SearchMonitorsOptionalParameters parameters) throws ApiException { return searchMonitorsWithHttpInfo(parameters).getData(); } /** - * Monitors search. - * - *

See {@link #searchMonitorsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MonitorSearchResponse> - */ - public CompletableFuture searchMonitorsAsync( - SearchMonitorsOptionalParameters parameters) { - return searchMonitorsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Monitors search. + * + * See {@link #searchMonitorsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MonitorSearchResponse> + */ + public CompletableFuturesearchMonitorsAsync(SearchMonitorsOptionalParameters parameters) { + return searchMonitorsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Search and filter your monitors details. + *

Search and filter your monitors details.

* * @param parameters Optional parameters for the request. * @return ApiResponse<MonitorSearchResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1660,8 +1263,7 @@ public CompletableFuture searchMonitorsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchMonitorsWithHttpInfo( - SearchMonitorsOptionalParameters parameters) throws ApiException { + public ApiResponse searchMonitorsWithHttpInfo(SearchMonitorsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String query = parameters.query; Long page = parameters.page; @@ -1670,6 +1272,7 @@ public ApiResponse searchMonitorsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/monitor/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1678,36 +1281,19 @@ public ApiResponse searchMonitorsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "per_page", perPage)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.searchMonitors", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.searchMonitors", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Monitors search. * - *

See {@link #searchMonitorsWithHttpInfo}. + * See {@link #searchMonitorsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MonitorSearchResponse>> */ - public CompletableFuture> searchMonitorsWithHttpInfoAsync( - SearchMonitorsOptionalParameters parameters) { + public CompletableFuture> searchMonitorsWithHttpInfoAsync(SearchMonitorsOptionalParameters parameters) { Object localVarPostBody = null; String query = parameters.query; Long page = parameters.page; @@ -1716,6 +1302,7 @@ public CompletableFuture> searchMonitorsWithH // create path and map variables String localVarPath = "/api/v1/monitor/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1726,71 +1313,54 @@ public CompletableFuture> searchMonitorsWithH Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.searchMonitors", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.searchMonitors", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit a monitor. - * - *

See {@link #updateMonitorWithHttpInfo}. - * - * @param monitorId The ID of the monitor. (required) - * @param body Edit a monitor request body. (required) - * @return Monitor - * @throws ApiException if fails to make API call - */ - public Monitor updateMonitor(Long monitorId, MonitorUpdateRequest body) throws ApiException { + * Edit a monitor. + * + * See {@link #updateMonitorWithHttpInfo}. + * + * @param monitorId The ID of the monitor. (required) + * @param body Edit a monitor request body. (required) + * @return Monitor + * @throws ApiException if fails to make API call + */ + public Monitor updateMonitor(Long monitorId, MonitorUpdateRequest body) throws ApiException { return updateMonitorWithHttpInfo(monitorId, body).getData(); } /** - * Edit a monitor. - * - *

See {@link #updateMonitorWithHttpInfoAsync}. - * - * @param monitorId The ID of the monitor. (required) - * @param body Edit a monitor request body. (required) - * @return CompletableFuture<Monitor> - */ - public CompletableFuture updateMonitorAsync(Long monitorId, MonitorUpdateRequest body) { - return updateMonitorWithHttpInfoAsync(monitorId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit a monitor. + * + * See {@link #updateMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the monitor. (required) + * @param body Edit a monitor request body. (required) + * @return CompletableFuture<Monitor> + */ + public CompletableFutureupdateMonitorAsync(Long monitorId, MonitorUpdateRequest body) { + return updateMonitorWithHttpInfoAsync(monitorId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit the specified monitor. + *

Edit the specified monitor.

* * @param monitorId The ID of the monitor. (required) * @param body Edit a monitor request body. (required) * @return ApiResponse<Monitor> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1801,152 +1371,113 @@ public CompletableFuture updateMonitorAsync(Long monitorId, MonitorUpda * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateMonitorWithHttpInfo(Long monitorId, MonitorUpdateRequest body) - throws ApiException { + public ApiResponse updateMonitorWithHttpInfo(Long monitorId, MonitorUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'monitorId' is set if (monitorId == null) { - throw new ApiException( - 400, "Missing the required parameter 'monitorId' when calling updateMonitor"); + throw new ApiException(400, "Missing the required parameter 'monitorId' when calling updateMonitor"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateMonitor"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateMonitor"); } // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.updateMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.updateMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit a monitor. * - *

See {@link #updateMonitorWithHttpInfo}. + * See {@link #updateMonitorWithHttpInfo}. * * @param monitorId The ID of the monitor. (required) * @param body Edit a monitor request body. (required) * @return CompletableFuture<ApiResponse<Monitor>> */ - public CompletableFuture> updateMonitorWithHttpInfoAsync( - Long monitorId, MonitorUpdateRequest body) { + public CompletableFuture> updateMonitorWithHttpInfoAsync(Long monitorId, MonitorUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'monitorId' is set if (monitorId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'monitorId' when calling updateMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'monitorId' when calling updateMonitor")); + 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 updateMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateMonitor")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.updateMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.updateMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Validate an existing monitor. - * - *

See {@link #validateExistingMonitorWithHttpInfo}. - * - * @param monitorId The ID of the monitor (required) - * @param body Monitor request object (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object validateExistingMonitor(Long monitorId, Monitor body) throws ApiException { + * Validate an existing monitor. + * + * See {@link #validateExistingMonitorWithHttpInfo}. + * + * @param monitorId The ID of the monitor (required) + * @param body Monitor request object (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object validateExistingMonitor(Long monitorId, Monitor body) throws ApiException { return validateExistingMonitorWithHttpInfo(monitorId, body).getData(); } /** - * Validate an existing monitor. - * - *

See {@link #validateExistingMonitorWithHttpInfoAsync}. - * - * @param monitorId The ID of the monitor (required) - * @param body Monitor request object (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture validateExistingMonitorAsync(Long monitorId, Monitor body) { - return validateExistingMonitorWithHttpInfoAsync(monitorId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Validate an existing monitor. + * + * See {@link #validateExistingMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the monitor (required) + * @param body Monitor request object (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturevalidateExistingMonitorAsync(Long monitorId, Monitor body) { + return validateExistingMonitorWithHttpInfoAsync(monitorId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Validate the monitor provided in the request. + *

Validate the monitor provided in the request.

* * @param monitorId The ID of the monitor (required) * @param body Monitor request object (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1955,150 +1486,110 @@ public CompletableFuture validateExistingMonitorAsync(Long monitorId, Mo * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse validateExistingMonitorWithHttpInfo(Long monitorId, Monitor body) - throws ApiException { + public ApiResponse validateExistingMonitorWithHttpInfo(Long monitorId, Monitor body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'monitorId' is set if (monitorId == null) { - throw new ApiException( - 400, "Missing the required parameter 'monitorId' when calling validateExistingMonitor"); + throw new ApiException(400, "Missing the required parameter 'monitorId' when calling validateExistingMonitor"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling validateExistingMonitor"); + throw new ApiException(400, "Missing the required parameter 'body' when calling validateExistingMonitor"); } // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}/validate" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}/validate" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.validateExistingMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.validateExistingMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Validate an existing monitor. * - *

See {@link #validateExistingMonitorWithHttpInfo}. + * See {@link #validateExistingMonitorWithHttpInfo}. * * @param monitorId The ID of the monitor (required) * @param body Monitor request object (required) * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> validateExistingMonitorWithHttpInfoAsync( - Long monitorId, Monitor body) { + public CompletableFuture> validateExistingMonitorWithHttpInfoAsync(Long monitorId, Monitor body) { Object localVarPostBody = body; // verify the required parameter 'monitorId' is set if (monitorId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'monitorId' when calling validateExistingMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'monitorId' when calling validateExistingMonitor")); + 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 validateExistingMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling validateExistingMonitor")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/monitor/{monitor_id}/validate" - .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + String localVarPath = "/api/v1/monitor/{monitor_id}/validate" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.validateExistingMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.validateExistingMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Validate a monitor. - * - *

See {@link #validateMonitorWithHttpInfo}. - * - * @param body Monitor request object (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object validateMonitor(Monitor body) throws ApiException { + * Validate a monitor. + * + * See {@link #validateMonitorWithHttpInfo}. + * + * @param body Monitor request object (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object validateMonitor(Monitor body) throws ApiException { return validateMonitorWithHttpInfo(body).getData(); } /** - * Validate a monitor. - * - *

See {@link #validateMonitorWithHttpInfoAsync}. - * - * @param body Monitor request object (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture validateMonitorAsync(Monitor body) { - return validateMonitorWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Validate a monitor. + * + * See {@link #validateMonitorWithHttpInfoAsync}. + * + * @param body Monitor request object (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturevalidateMonitorAsync(Monitor body) { + return validateMonitorWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Validate the monitor provided in the request. + *

Validate the monitor provided in the request.

* * @param body Monitor request object (required) * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2112,38 +1603,23 @@ public ApiResponse validateMonitorWithHttpInfo(Monitor body) throws ApiE // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling validateMonitor"); + throw new ApiException(400, "Missing the required parameter 'body' when calling validateMonitor"); } // create path and map variables String localVarPath = "/api/v1/monitor/validate"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.MonitorsApi.validateMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.MonitorsApi.validateMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Validate a monitor. * - *

See {@link #validateMonitorWithHttpInfo}. + * See {@link #validateMonitorWithHttpInfo}. * * @param body Monitor request object (required) * @return CompletableFuture<ApiResponse<Object>> @@ -2153,41 +1629,25 @@ public CompletableFuture> validateMonitorWithHttpInfoAsync(M // 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 validateMonitor")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling validateMonitor")); + return result; } // create path and map variables String localVarPath = "/api/v1/monitor/validate"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.MonitorsApi.validateMonitor", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.MonitorsApi.validateMonitor", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/NotebooksApi.java b/src/main/java/com/datadog/api/client/v1/api/NotebooksApi.java index ae4942f9c13..77246bac7a3 100644 --- a/src/main/java/com/datadog/api/client/v1/api/NotebooksApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/NotebooksApi.java @@ -1,26 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.NotebookCreateRequest; -import com.datadog.api.client.v1.model.NotebookResponse; -import com.datadog.api.client.v1.model.NotebookUpdateRequest; -import com.datadog.api.client.v1.model.NotebooksResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.NotebooksResponse; +import com.datadog.api.client.v1.model.NotebookResponse; +import com.datadog.api.client.v1.model.NotebookCreateRequest; +import com.datadog.api.client.v1.model.NotebookUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebooksApi { private ApiClient apiClient; - public NotebooksApi() { this(ApiClient.getDefaultApiClient()); } @@ -48,42 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a notebook. - * - *

See {@link #createNotebookWithHttpInfo}. - * - * @param body The JSON description of the notebook you want to create. (required) - * @return NotebookResponse - * @throws ApiException if fails to make API call - */ - public NotebookResponse createNotebook(NotebookCreateRequest body) throws ApiException { + * Create a notebook. + * + * See {@link #createNotebookWithHttpInfo}. + * + * @param body The JSON description of the notebook you want to create. (required) + * @return NotebookResponse + * @throws ApiException if fails to make API call + */ + public NotebookResponse createNotebook(NotebookCreateRequest body) throws ApiException { return createNotebookWithHttpInfo(body).getData(); } /** - * Create a notebook. - * - *

See {@link #createNotebookWithHttpInfoAsync}. - * - * @param body The JSON description of the notebook you want to create. (required) - * @return CompletableFuture<NotebookResponse> - */ - public CompletableFuture createNotebookAsync(NotebookCreateRequest body) { - return createNotebookWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a notebook. + * + * See {@link #createNotebookWithHttpInfoAsync}. + * + * @param body The JSON description of the notebook you want to create. (required) + * @return CompletableFuture<NotebookResponse> + */ + public CompletableFuturecreateNotebookAsync(NotebookCreateRequest body) { + return createNotebookWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a notebook using the specified options. + *

Create a notebook using the specified options.

* * @param body The JSON description of the notebook you want to create. (required) * @return ApiResponse<NotebookResponse> * @throws ApiException if fails to make API call * @http.response.details - *

Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -92,128 +98,94 @@ public CompletableFuture createNotebookAsync(NotebookCreateReq * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createNotebookWithHttpInfo(NotebookCreateRequest body) - throws ApiException { + public ApiResponse createNotebookWithHttpInfo(NotebookCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createNotebook"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createNotebook"); } // create path and map variables String localVarPath = "/api/v1/notebooks"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.NotebooksApi.createNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.NotebooksApi.createNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a notebook. * - *

See {@link #createNotebookWithHttpInfo}. + * See {@link #createNotebookWithHttpInfo}. * * @param body The JSON description of the notebook you want to create. (required) * @return CompletableFuture<ApiResponse<NotebookResponse>> */ - public CompletableFuture> createNotebookWithHttpInfoAsync( - NotebookCreateRequest body) { + public CompletableFuture> createNotebookWithHttpInfoAsync(NotebookCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createNotebook")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createNotebook")); + return result; } // create path and map variables String localVarPath = "/api/v1/notebooks"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.NotebooksApi.createNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.NotebooksApi.createNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a notebook. - * - *

See {@link #deleteNotebookWithHttpInfo}. - * - * @param notebookId Unique ID, assigned when you create the notebook. (required) - * @throws ApiException if fails to make API call - */ - public void deleteNotebook(Long notebookId) throws ApiException { + * Delete a notebook. + * + * See {@link #deleteNotebookWithHttpInfo}. + * + * @param notebookId Unique ID, assigned when you create the notebook. (required) + * @throws ApiException if fails to make API call + */ + public void deleteNotebook(Long notebookId) throws ApiException { deleteNotebookWithHttpInfo(notebookId); } /** - * Delete a notebook. - * - *

See {@link #deleteNotebookWithHttpInfoAsync}. - * - * @param notebookId Unique ID, assigned when you create the notebook. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteNotebookAsync(Long notebookId) { - return deleteNotebookWithHttpInfoAsync(notebookId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a notebook. + * + * See {@link #deleteNotebookWithHttpInfoAsync}. + * + * @param notebookId Unique ID, assigned when you create the notebook. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteNotebookAsync(Long notebookId) { + return deleteNotebookWithHttpInfoAsync(notebookId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a notebook using the specified ID. + *

Delete a notebook using the specified ID.

* * @param notebookId Unique ID, assigned when you create the notebook. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -228,41 +200,24 @@ public ApiResponse deleteNotebookWithHttpInfo(Long notebookId) throws ApiE // verify the required parameter 'notebookId' is set if (notebookId == null) { - throw new ApiException( - 400, "Missing the required parameter 'notebookId' when calling deleteNotebook"); + throw new ApiException(400, "Missing the required parameter 'notebookId' when calling deleteNotebook"); } // create path and map variables - String localVarPath = - "/api/v1/notebooks/{notebook_id}" - .replaceAll( - "\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + String localVarPath = "/api/v1/notebooks/{notebook_id}" + .replaceAll("\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.NotebooksApi.deleteNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.NotebooksApi.deleteNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a notebook. * - *

See {@link #deleteNotebookWithHttpInfo}. + * See {@link #deleteNotebookWithHttpInfo}. * * @param notebookId Unique ID, assigned when you create the notebook. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -272,84 +227,65 @@ public CompletableFuture> deleteNotebookWithHttpInfoAsync(Long // verify the required parameter 'notebookId' is set if (notebookId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'notebookId' when calling deleteNotebook")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'notebookId' when calling deleteNotebook")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/notebooks/{notebook_id}" - .replaceAll( - "\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + String localVarPath = "/api/v1/notebooks/{notebook_id}" + .replaceAll("\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.NotebooksApi.deleteNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.NotebooksApi.deleteNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a notebook. - * - *

See {@link #getNotebookWithHttpInfo}. - * - * @param notebookId Unique ID, assigned when you create the notebook. (required) - * @return NotebookResponse - * @throws ApiException if fails to make API call - */ - public NotebookResponse getNotebook(Long notebookId) throws ApiException { + * Get a notebook. + * + * See {@link #getNotebookWithHttpInfo}. + * + * @param notebookId Unique ID, assigned when you create the notebook. (required) + * @return NotebookResponse + * @throws ApiException if fails to make API call + */ + public NotebookResponse getNotebook(Long notebookId) throws ApiException { return getNotebookWithHttpInfo(notebookId).getData(); } /** - * Get a notebook. - * - *

See {@link #getNotebookWithHttpInfoAsync}. - * - * @param notebookId Unique ID, assigned when you create the notebook. (required) - * @return CompletableFuture<NotebookResponse> - */ - public CompletableFuture getNotebookAsync(Long notebookId) { - return getNotebookWithHttpInfoAsync(notebookId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a notebook. + * + * See {@link #getNotebookWithHttpInfoAsync}. + * + * @param notebookId Unique ID, assigned when you create the notebook. (required) + * @return CompletableFuture<NotebookResponse> + */ + public CompletableFuturegetNotebookAsync(Long notebookId) { + return getNotebookWithHttpInfoAsync(notebookId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a notebook using the specified notebook ID. + *

Get a notebook using the specified notebook ID.

* * @param notebookId Unique ID, assigned when you create the notebook. (required) * @return ApiResponse<NotebookResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -359,99 +295,64 @@ public CompletableFuture getNotebookAsync(Long notebookId) { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getNotebookWithHttpInfo(Long notebookId) - throws ApiException { + public ApiResponse getNotebookWithHttpInfo(Long notebookId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'notebookId' is set if (notebookId == null) { - throw new ApiException( - 400, "Missing the required parameter 'notebookId' when calling getNotebook"); + throw new ApiException(400, "Missing the required parameter 'notebookId' when calling getNotebook"); } // create path and map variables - String localVarPath = - "/api/v1/notebooks/{notebook_id}" - .replaceAll( - "\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + String localVarPath = "/api/v1/notebooks/{notebook_id}" + .replaceAll("\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.NotebooksApi.getNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.NotebooksApi.getNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a notebook. * - *

See {@link #getNotebookWithHttpInfo}. + * See {@link #getNotebookWithHttpInfo}. * * @param notebookId Unique ID, assigned when you create the notebook. (required) * @return CompletableFuture<ApiResponse<NotebookResponse>> */ - public CompletableFuture> getNotebookWithHttpInfoAsync( - Long notebookId) { + public CompletableFuture> getNotebookWithHttpInfoAsync(Long notebookId) { Object localVarPostBody = null; // verify the required parameter 'notebookId' is set if (notebookId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'notebookId' when calling getNotebook")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'notebookId' when calling getNotebook")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/notebooks/{notebook_id}" - .replaceAll( - "\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + String localVarPath = "/api/v1/notebooks/{notebook_id}" + .replaceAll("\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.NotebooksApi.getNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.NotebooksApi.getNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listNotebooks. */ + /** + * Manage optional parameters to listNotebooks. + */ public static class ListNotebooksOptionalParameters { private String authorHandle; private String excludeAuthorHandle; @@ -466,9 +367,7 @@ public static class ListNotebooksOptionalParameters { /** * Set authorHandle. - * - * @param authorHandle Return notebooks created by the given author_handle. - * (optional) + * @param authorHandle Return notebooks created by the given author_handle. (optional) * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters authorHandle(String authorHandle) { @@ -478,9 +377,7 @@ public ListNotebooksOptionalParameters authorHandle(String authorHandle) { /** * Set excludeAuthorHandle. - * - * @param excludeAuthorHandle Return notebooks not created by the given author_handle - * . (optional) + * @param excludeAuthorHandle Return notebooks not created by the given author_handle. (optional) * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters excludeAuthorHandle(String excludeAuthorHandle) { @@ -490,7 +387,6 @@ public ListNotebooksOptionalParameters excludeAuthorHandle(String excludeAuthorH /** * Set start. - * * @param start The index of the first notebook you want returned. (optional) * @return ListNotebooksOptionalParameters */ @@ -501,7 +397,6 @@ public ListNotebooksOptionalParameters start(Long start) { /** * Set count. - * * @param count The number of notebooks to be returned. (optional) * @return ListNotebooksOptionalParameters */ @@ -512,9 +407,7 @@ public ListNotebooksOptionalParameters count(Long count) { /** * Set sortField. - * - * @param sortField Sort by field modified, name, or created - * . (optional, default to "modified") + * @param sortField Sort by field modified, name, or created. (optional, default to "modified") * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters sortField(String sortField) { @@ -524,9 +417,7 @@ public ListNotebooksOptionalParameters sortField(String sortField) { /** * Set sortDir. - * - * @param sortDir Sort by direction asc or desc. (optional, default to - * "desc") + * @param sortDir Sort by direction asc or desc. (optional, default to "desc") * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters sortDir(String sortDir) { @@ -536,9 +427,7 @@ public ListNotebooksOptionalParameters sortDir(String sortDir) { /** * Set query. - * - * @param query Return only notebooks with query string in notebook name or author - * handle. (optional) + * @param query Return only notebooks with query string in notebook name or author handle. (optional) * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters query(String query) { @@ -548,9 +437,7 @@ public ListNotebooksOptionalParameters query(String query) { /** * Set includeCells. - * - * @param includeCells Value of false excludes the cells and global - * time for each notebook. (optional, default to true) + * @param includeCells Value of false excludes the cells and global time for each notebook. (optional, default to true) * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters includeCells(Boolean includeCells) { @@ -560,9 +447,7 @@ public ListNotebooksOptionalParameters includeCells(Boolean includeCells) { /** * Set isTemplate. - * - * @param isTemplate True value returns only template notebooks. Default is false (returns only - * non-template notebooks). (optional, default to false) + * @param isTemplate True value returns only template notebooks. Default is false (returns only non-template notebooks). (optional, default to false) * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters isTemplate(Boolean isTemplate) { @@ -572,9 +457,7 @@ public ListNotebooksOptionalParameters isTemplate(Boolean isTemplate) { /** * Set type. - * - * @param type If type is provided, returns only notebooks with that metadata type. Default does - * not have type filtering. (optional) + * @param type If type is provided, returns only notebooks with that metadata type. Default does not have type filtering. (optional) * @return ListNotebooksOptionalParameters */ public ListNotebooksOptionalParameters type(String type) { @@ -584,72 +467,67 @@ public ListNotebooksOptionalParameters type(String type) { } /** - * Get all notebooks. - * - *

See {@link #listNotebooksWithHttpInfo}. - * - * @return NotebooksResponse - * @throws ApiException if fails to make API call - */ - public NotebooksResponse listNotebooks() throws ApiException { + * Get all notebooks. + * + * See {@link #listNotebooksWithHttpInfo}. + * + * @return NotebooksResponse + * @throws ApiException if fails to make API call + */ + public NotebooksResponse listNotebooks () throws ApiException { return listNotebooksWithHttpInfo(new ListNotebooksOptionalParameters()).getData(); } /** - * Get all notebooks. - * - *

See {@link #listNotebooksWithHttpInfoAsync}. - * - * @return CompletableFuture<NotebooksResponse> - */ - public CompletableFuture listNotebooksAsync() { - return listNotebooksWithHttpInfoAsync(new ListNotebooksOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all notebooks. + * + * See {@link #listNotebooksWithHttpInfoAsync}. + * + * @return CompletableFuture<NotebooksResponse> + */ + public CompletableFuturelistNotebooksAsync() { + return listNotebooksWithHttpInfoAsync(new ListNotebooksOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all notebooks. - * - *

See {@link #listNotebooksWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return NotebooksResponse - * @throws ApiException if fails to make API call - */ - public NotebooksResponse listNotebooks(ListNotebooksOptionalParameters parameters) - throws ApiException { + * Get all notebooks. + * + * See {@link #listNotebooksWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return NotebooksResponse + * @throws ApiException if fails to make API call + */ + public NotebooksResponse listNotebooks(ListNotebooksOptionalParameters parameters) throws ApiException { return listNotebooksWithHttpInfo(parameters).getData(); } /** - * Get all notebooks. - * - *

See {@link #listNotebooksWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<NotebooksResponse> - */ - public CompletableFuture listNotebooksAsync( - ListNotebooksOptionalParameters parameters) { - return listNotebooksWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all notebooks. + * + * See {@link #listNotebooksWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<NotebooksResponse> + */ + public CompletableFuturelistNotebooksAsync(ListNotebooksOptionalParameters parameters) { + return listNotebooksWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all notebooks. This can also be used to search for notebooks with a particular query - * in the notebook name or author handle. + *

Get all notebooks. This can also be used to search for notebooks with a particular query in the notebook + * name or author handle.

* * @param parameters Optional parameters for the request. * @return ApiResponse<NotebooksResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -658,8 +536,7 @@ public CompletableFuture listNotebooksAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listNotebooksWithHttpInfo( - ListNotebooksOptionalParameters parameters) throws ApiException { + public ApiResponse listNotebooksWithHttpInfo(ListNotebooksOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String authorHandle = parameters.authorHandle; String excludeAuthorHandle = parameters.excludeAuthorHandle; @@ -674,12 +551,12 @@ public ApiResponse listNotebooksWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/notebooks"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "author_handle", authorHandle)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "exclude_author_handle", excludeAuthorHandle)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "exclude_author_handle", excludeAuthorHandle)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_field", sortField)); @@ -689,36 +566,19 @@ public ApiResponse listNotebooksWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "is_template", isTemplate)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.NotebooksApi.listNotebooks", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.NotebooksApi.listNotebooks", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all notebooks. * - *

See {@link #listNotebooksWithHttpInfo}. + * See {@link #listNotebooksWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<NotebooksResponse>> */ - public CompletableFuture> listNotebooksWithHttpInfoAsync( - ListNotebooksOptionalParameters parameters) { + public CompletableFuture> listNotebooksWithHttpInfoAsync(ListNotebooksOptionalParameters parameters) { Object localVarPostBody = null; String authorHandle = parameters.authorHandle; String excludeAuthorHandle = parameters.excludeAuthorHandle; @@ -733,12 +593,12 @@ public CompletableFuture> listNotebooksWithHttpIn // create path and map variables String localVarPath = "/api/v1/notebooks"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "author_handle", authorHandle)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "exclude_author_handle", excludeAuthorHandle)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "exclude_author_handle", excludeAuthorHandle)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_field", sortField)); @@ -750,73 +610,54 @@ public CompletableFuture> listNotebooksWithHttpIn Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.NotebooksApi.listNotebooks", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.NotebooksApi.listNotebooks", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a notebook. - * - *

See {@link #updateNotebookWithHttpInfo}. - * - * @param notebookId Unique ID, assigned when you create the notebook. (required) - * @param body Update notebook request body. (required) - * @return NotebookResponse - * @throws ApiException if fails to make API call - */ - public NotebookResponse updateNotebook(Long notebookId, NotebookUpdateRequest body) - throws ApiException { + * Update a notebook. + * + * See {@link #updateNotebookWithHttpInfo}. + * + * @param notebookId Unique ID, assigned when you create the notebook. (required) + * @param body Update notebook request body. (required) + * @return NotebookResponse + * @throws ApiException if fails to make API call + */ + public NotebookResponse updateNotebook(Long notebookId, NotebookUpdateRequest body) throws ApiException { return updateNotebookWithHttpInfo(notebookId, body).getData(); } /** - * Update a notebook. - * - *

See {@link #updateNotebookWithHttpInfoAsync}. - * - * @param notebookId Unique ID, assigned when you create the notebook. (required) - * @param body Update notebook request body. (required) - * @return CompletableFuture<NotebookResponse> - */ - public CompletableFuture updateNotebookAsync( - Long notebookId, NotebookUpdateRequest body) { - return updateNotebookWithHttpInfoAsync(notebookId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a notebook. + * + * See {@link #updateNotebookWithHttpInfoAsync}. + * + * @param notebookId Unique ID, assigned when you create the notebook. (required) + * @param body Update notebook request body. (required) + * @return CompletableFuture<NotebookResponse> + */ + public CompletableFutureupdateNotebookAsync(Long notebookId, NotebookUpdateRequest body) { + return updateNotebookWithHttpInfoAsync(notebookId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a notebook using the specified ID. + *

Update a notebook using the specified ID.

* * @param notebookId Unique ID, assigned when you create the notebook. (required) * @param body Update notebook request body. (required) * @return ApiResponse<NotebookResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -827,111 +668,71 @@ public CompletableFuture updateNotebookAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateNotebookWithHttpInfo( - Long notebookId, NotebookUpdateRequest body) throws ApiException { + public ApiResponse updateNotebookWithHttpInfo(Long notebookId, NotebookUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'notebookId' is set if (notebookId == null) { - throw new ApiException( - 400, "Missing the required parameter 'notebookId' when calling updateNotebook"); + throw new ApiException(400, "Missing the required parameter 'notebookId' when calling updateNotebook"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateNotebook"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateNotebook"); } // create path and map variables - String localVarPath = - "/api/v1/notebooks/{notebook_id}" - .replaceAll( - "\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + String localVarPath = "/api/v1/notebooks/{notebook_id}" + .replaceAll("\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.NotebooksApi.updateNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.NotebooksApi.updateNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a notebook. * - *

See {@link #updateNotebookWithHttpInfo}. + * See {@link #updateNotebookWithHttpInfo}. * * @param notebookId Unique ID, assigned when you create the notebook. (required) * @param body Update notebook request body. (required) * @return CompletableFuture<ApiResponse<NotebookResponse>> */ - public CompletableFuture> updateNotebookWithHttpInfoAsync( - Long notebookId, NotebookUpdateRequest body) { + public CompletableFuture> updateNotebookWithHttpInfoAsync(Long notebookId, NotebookUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'notebookId' is set if (notebookId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'notebookId' when calling updateNotebook")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'notebookId' when calling updateNotebook")); + 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 updateNotebook")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateNotebook")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/notebooks/{notebook_id}" - .replaceAll( - "\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + String localVarPath = "/api/v1/notebooks/{notebook_id}" + .replaceAll("\\{" + "notebook_id" + "\\}", apiClient.escapeString(notebookId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.NotebooksApi.updateNotebook", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.NotebooksApi.updateNotebook", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/OrganizationsApi.java b/src/main/java/com/datadog/api/client/v1/api/OrganizationsApi.java index 42509aaf62e..fc8cb3f1a6e 100644 --- a/src/main/java/com/datadog/api/client/v1/api/OrganizationsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/OrganizationsApi.java @@ -1,29 +1,37 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.IdpResponse; -import com.datadog.api.client.v1.model.OrgDowngradedResponse; -import com.datadog.api.client.v1.model.Organization; -import com.datadog.api.client.v1.model.OrganizationCreateBody; -import com.datadog.api.client.v1.model.OrganizationCreateResponse; -import com.datadog.api.client.v1.model.OrganizationListResponse; -import com.datadog.api.client.v1.model.OrganizationResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.OrganizationListResponse; +import com.datadog.api.client.v1.model.OrganizationCreateResponse; +import com.datadog.api.client.v1.model.OrganizationCreateBody; +import com.datadog.api.client.v1.model.OrganizationResponse; +import com.datadog.api.client.v1.model.Organization; +import com.datadog.api.client.v1.model.OrgDowngradedResponse; +import com.datadog.api.client.v1.model.IdpResponse; +import com.datadog.api.client.v1.model.IdpFormData; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationsApi { private ApiClient apiClient; - public OrganizationsApi() { this(ApiClient.getDefaultApiClient()); } @@ -51,53 +59,48 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a child organization. - * - *

See {@link #createChildOrgWithHttpInfo}. - * - * @param body Organization object that needs to be created (required) - * @return OrganizationCreateResponse - * @throws ApiException if fails to make API call - */ - public OrganizationCreateResponse createChildOrg(OrganizationCreateBody body) - throws ApiException { + * Create a child organization. + * + * See {@link #createChildOrgWithHttpInfo}. + * + * @param body Organization object that needs to be created (required) + * @return OrganizationCreateResponse + * @throws ApiException if fails to make API call + */ + public OrganizationCreateResponse createChildOrg(OrganizationCreateBody body) throws ApiException { return createChildOrgWithHttpInfo(body).getData(); } /** - * Create a child organization. - * - *

See {@link #createChildOrgWithHttpInfoAsync}. - * - * @param body Organization object that needs to be created (required) - * @return CompletableFuture<OrganizationCreateResponse> - */ - public CompletableFuture createChildOrgAsync( - OrganizationCreateBody body) { - return createChildOrgWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a child organization. + * + * See {@link #createChildOrgWithHttpInfoAsync}. + * + * @param body Organization object that needs to be created (required) + * @return CompletableFuture<OrganizationCreateResponse> + */ + public CompletableFuturecreateChildOrgAsync(OrganizationCreateBody body) { + return createChildOrgWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a child organization. - * - *

This endpoint requires the multi-organization - * account feature and must be enabled by contacting support. - * - *

Once a new child organization is created, you can interact with it by using the - * org.public_id, api_key.key, and application_key.hash provided - * in the response. + *

Create a child organization.

+ *

This endpoint requires the + * multi-organization account + * feature and must be enabled by + * contacting support.

+ *

Once a new child organization is created, you can interact with it + * by using the org.public_id, api_key.key, and + * application_key.hash provided in the response.

* * @param body Organization object that needs to be created (required) * @return ApiResponse<OrganizationCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -106,133 +109,95 @@ public CompletableFuture createChildOrgAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createChildOrgWithHttpInfo( - OrganizationCreateBody body) throws ApiException { + public ApiResponse createChildOrgWithHttpInfo(OrganizationCreateBody body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createChildOrg"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createChildOrg"); } // create path and map variables String localVarPath = "/api/v1/org"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.OrganizationsApi.createChildOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.OrganizationsApi.createChildOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a child organization. * - *

See {@link #createChildOrgWithHttpInfo}. + * See {@link #createChildOrgWithHttpInfo}. * * @param body Organization object that needs to be created (required) * @return CompletableFuture<ApiResponse<OrganizationCreateResponse>> */ - public CompletableFuture> createChildOrgWithHttpInfoAsync( - OrganizationCreateBody body) { + public CompletableFuture> createChildOrgWithHttpInfoAsync(OrganizationCreateBody body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createChildOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createChildOrg")); + return result; } // create path and map variables String localVarPath = "/api/v1/org"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.OrganizationsApi.createChildOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.OrganizationsApi.createChildOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Spin-off Child Organization. - * - *

See {@link #downgradeOrgWithHttpInfo}. - * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @return OrgDowngradedResponse - * @throws ApiException if fails to make API call - */ - public OrgDowngradedResponse downgradeOrg(String publicId) throws ApiException { + * Spin-off Child Organization. + * + * See {@link #downgradeOrgWithHttpInfo}. + * + * @param publicId The public_id of the organization you are operating within. (required) + * @return OrgDowngradedResponse + * @throws ApiException if fails to make API call + */ + public OrgDowngradedResponse downgradeOrg(String publicId) throws ApiException { return downgradeOrgWithHttpInfo(publicId).getData(); } /** - * Spin-off Child Organization. - * - *

See {@link #downgradeOrgWithHttpInfoAsync}. - * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @return CompletableFuture<OrgDowngradedResponse> - */ - public CompletableFuture downgradeOrgAsync(String publicId) { - return downgradeOrgWithHttpInfoAsync(publicId) - .thenApply( - response -> { - return response.getData(); - }); + * Spin-off Child Organization. + * + * See {@link #downgradeOrgWithHttpInfoAsync}. + * + * @param publicId The public_id of the organization you are operating within. (required) + * @return CompletableFuture<OrgDowngradedResponse> + */ + public CompletableFuturedowngradeOrgAsync(String publicId) { + return downgradeOrgWithHttpInfoAsync(publicId).thenApply(response -> { + return response.getData(); + }); } + /** - * Only available for MSP customers. Removes a child organization from the hierarchy of the master - * organization and places the child organization on a 30-day trial. + *

Only available for MSP customers. Removes a child organization from the hierarchy of the master organization and places the child organization on a 30-day trial.

* - * @param publicId The public_id of the organization you are operating within. - * (required) + * @param publicId The public_id of the organization you are operating within. (required) * @return ApiResponse<OrgDowngradedResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -241,137 +206,97 @@ public CompletableFuture downgradeOrgAsync(String publicI * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse downgradeOrgWithHttpInfo(String publicId) - throws ApiException { + public ApiResponse downgradeOrgWithHttpInfo(String publicId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling downgradeOrg"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling downgradeOrg"); } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}/downgrade" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}/downgrade" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.OrganizationsApi.downgradeOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.OrganizationsApi.downgradeOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Spin-off Child Organization. * - *

See {@link #downgradeOrgWithHttpInfo}. + * See {@link #downgradeOrgWithHttpInfo}. * - * @param publicId The public_id of the organization you are operating within. - * (required) + * @param publicId The public_id of the organization you are operating within. (required) * @return CompletableFuture<ApiResponse<OrgDowngradedResponse>> */ - public CompletableFuture> downgradeOrgWithHttpInfoAsync( - String publicId) { + public CompletableFuture> downgradeOrgWithHttpInfoAsync(String publicId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling downgradeOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling downgradeOrg")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}/downgrade" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}/downgrade" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.OrganizationsApi.downgradeOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.OrganizationsApi.downgradeOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get organization information. - * - *

See {@link #getOrgWithHttpInfo}. - * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @return OrganizationResponse - * @throws ApiException if fails to make API call - */ - public OrganizationResponse getOrg(String publicId) throws ApiException { + * Get organization information. + * + * See {@link #getOrgWithHttpInfo}. + * + * @param publicId The public_id of the organization you are operating within. (required) + * @return OrganizationResponse + * @throws ApiException if fails to make API call + */ + public OrganizationResponse getOrg(String publicId) throws ApiException { return getOrgWithHttpInfo(publicId).getData(); } /** - * Get organization information. - * - *

See {@link #getOrgWithHttpInfoAsync}. - * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @return CompletableFuture<OrganizationResponse> - */ - public CompletableFuture getOrgAsync(String publicId) { - return getOrgWithHttpInfoAsync(publicId) - .thenApply( - response -> { - return response.getData(); - }); + * Get organization information. + * + * See {@link #getOrgWithHttpInfoAsync}. + * + * @param publicId The public_id of the organization you are operating within. (required) + * @return CompletableFuture<OrganizationResponse> + */ + public CompletableFuturegetOrgAsync(String publicId) { + return getOrgWithHttpInfoAsync(publicId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get organization information. + *

Get organization information.

* - * @param publicId The public_id of the organization you are operating within. - * (required) + * @param publicId The public_id of the organization you are operating within. (required) * @return ApiResponse<OrganizationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -388,120 +313,86 @@ public ApiResponse getOrgWithHttpInfo(String publicId) thr throw new ApiException(400, "Missing the required parameter 'publicId' when calling getOrg"); } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.OrganizationsApi.getOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.OrganizationsApi.getOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get organization information. * - *

See {@link #getOrgWithHttpInfo}. + * See {@link #getOrgWithHttpInfo}. * - * @param publicId The public_id of the organization you are operating within. - * (required) + * @param publicId The public_id of the organization you are operating within. (required) * @return CompletableFuture<ApiResponse<OrganizationResponse>> */ - public CompletableFuture> getOrgWithHttpInfoAsync( - String publicId) { + public CompletableFuture> getOrgWithHttpInfoAsync(String publicId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'publicId' when calling getOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getOrg")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.OrganizationsApi.getOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.OrganizationsApi.getOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List your managed organizations. - * - *

See {@link #listOrgsWithHttpInfo}. - * - * @return OrganizationListResponse - * @throws ApiException if fails to make API call - */ - public OrganizationListResponse listOrgs() throws ApiException { + * List your managed organizations. + * + * See {@link #listOrgsWithHttpInfo}. + * + * @return OrganizationListResponse + * @throws ApiException if fails to make API call + */ + public OrganizationListResponse listOrgs() throws ApiException { return listOrgsWithHttpInfo().getData(); } /** - * List your managed organizations. - * - *

See {@link #listOrgsWithHttpInfoAsync}. - * - * @return CompletableFuture<OrganizationListResponse> - */ - public CompletableFuture listOrgsAsync() { - return listOrgsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List your managed organizations. + * + * See {@link #listOrgsWithHttpInfoAsync}. + * + * @return CompletableFuture<OrganizationListResponse> + */ + public CompletableFuturelistOrgsAsync() { + return listOrgsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint returns data on your top-level organization. + *

This endpoint returns data on your top-level organization.

* * @return ApiResponse<OrganizationListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -514,32 +405,18 @@ public ApiResponse listOrgsWithHttpInfo() throws ApiEx // create path and map variables String localVarPath = "/api/v1/org"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.OrganizationsApi.listOrgs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.OrganizationsApi.listOrgs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List your managed organizations. * - *

See {@link #listOrgsWithHttpInfo}. + * See {@link #listOrgsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<OrganizationListResponse>> */ @@ -548,79 +425,60 @@ public CompletableFuture> listOrgsWithHttp // create path and map variables String localVarPath = "/api/v1/org"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.OrganizationsApi.listOrgs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.OrganizationsApi.listOrgs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update your organization. - * - *

See {@link #updateOrgWithHttpInfo}. - * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @param body (required) - * @return OrganizationResponse - * @throws ApiException if fails to make API call - */ - public OrganizationResponse updateOrg(String publicId, Organization body) throws ApiException { + * Update your organization. + * + * See {@link #updateOrgWithHttpInfo}. + * + * @param publicId The public_id of the organization you are operating within. (required) + * @param body (required) + * @return OrganizationResponse + * @throws ApiException if fails to make API call + */ + public OrganizationResponse updateOrg(String publicId, Organization body) throws ApiException { return updateOrgWithHttpInfo(publicId, body).getData(); } /** - * Update your organization. - * - *

See {@link #updateOrgWithHttpInfoAsync}. - * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @param body (required) - * @return CompletableFuture<OrganizationResponse> - */ - public CompletableFuture updateOrgAsync( - String publicId, Organization body) { - return updateOrgWithHttpInfoAsync(publicId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update your organization. + * + * See {@link #updateOrgWithHttpInfoAsync}. + * + * @param publicId The public_id of the organization you are operating within. (required) + * @param body (required) + * @return CompletableFuture<OrganizationResponse> + */ + public CompletableFutureupdateOrgAsync(String publicId, Organization body) { + return updateOrgWithHttpInfoAsync(publicId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update your organization. + *

Update your organization.

* - * @param publicId The public_id of the organization you are operating within. - * (required) - * @param body (required) + * @param publicId The public_id of the organization you are operating within. (required) + * @param body (required) * @return ApiResponse<OrganizationResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -629,14 +487,12 @@ public CompletableFuture updateOrgAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateOrgWithHttpInfo(String publicId, Organization body) - throws ApiException { + public ApiResponse updateOrgWithHttpInfo(String publicId, Organization body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateOrg"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling updateOrg"); } // verify the required parameter 'body' is set @@ -644,147 +500,109 @@ public ApiResponse updateOrgWithHttpInfo(String publicId, throw new ApiException(400, "Missing the required parameter 'body' when calling updateOrg"); } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.OrganizationsApi.updateOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.OrganizationsApi.updateOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update your organization. * - *

See {@link #updateOrgWithHttpInfo}. + * See {@link #updateOrgWithHttpInfo}. * - * @param publicId The public_id of the organization you are operating within. - * (required) - * @param body (required) + * @param publicId The public_id of the organization you are operating within. (required) + * @param body (required) * @return CompletableFuture<ApiResponse<OrganizationResponse>> */ - public CompletableFuture> updateOrgWithHttpInfoAsync( - String publicId, Organization body) { + public CompletableFuture> updateOrgWithHttpInfoAsync(String publicId, Organization body) { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling updateOrg")); + 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 updateOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateOrg")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.OrganizationsApi.updateOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.OrganizationsApi.updateOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Upload IdP metadata. - * - *

See {@link #uploadIdPForOrgWithHttpInfo}. - * - * @param publicId The public_id of the organization you are operating with - * (required) - * @param idpFile The path to the XML metadata file you wish to upload. (required) - * @return IdpResponse - * @throws ApiException if fails to make API call - */ - public IdpResponse uploadIdPForOrg(String publicId, File idpFile) throws ApiException { + * Upload IdP metadata. + * + * See {@link #uploadIdPForOrgWithHttpInfo}. + * + * @param publicId The public_id of the organization you are operating with (required) + * @param idpFile The path to the XML metadata file you wish to upload. (required) + * @return IdpResponse + * @throws ApiException if fails to make API call + */ + public IdpResponse uploadIdPForOrg(String publicId, File idpFile) throws ApiException { return uploadIdPForOrgWithHttpInfo(publicId, idpFile).getData(); } /** - * Upload IdP metadata. - * - *

See {@link #uploadIdPForOrgWithHttpInfoAsync}. - * - * @param publicId The public_id of the organization you are operating with - * (required) - * @param idpFile The path to the XML metadata file you wish to upload. (required) - * @return CompletableFuture<IdpResponse> - */ - public CompletableFuture uploadIdPForOrgAsync(String publicId, File idpFile) { - return uploadIdPForOrgWithHttpInfoAsync(publicId, idpFile) - .thenApply( - response -> { - return response.getData(); - }); + * Upload IdP metadata. + * + * See {@link #uploadIdPForOrgWithHttpInfoAsync}. + * + * @param publicId The public_id of the organization you are operating with (required) + * @param idpFile The path to the XML metadata file you wish to upload. (required) + * @return CompletableFuture<IdpResponse> + */ + public CompletableFutureuploadIdPForOrgAsync(String publicId, File idpFile) { + return uploadIdPForOrgWithHttpInfoAsync(publicId, idpFile).thenApply(response -> { + return response.getData(); + }); } + /** - * There are a couple of options for updating the Identity Provider (IdP) metadata from your SAML - * IdP. - * + *

There are a couple of options for updating the Identity Provider (IdP) + * metadata from your SAML IdP.

*
    - *
  • - *

    Multipart Form-Data: Post the IdP metadata file using a form post. - *

  • - *

    XML Body: Post the IdP metadata file as the body of the request. + *

  • + *

    Multipart Form-Data: Post the IdP metadata file using a form post.

    + *
  • + *
  • + *

    XML Body: Post the IdP metadata file as the body of the request.

    + *
  • *
* - * @param publicId The public_id of the organization you are operating with - * (required) + * @param publicId The public_id of the organization you are operating with (required) * @param idpFile The path to the XML metadata file you wish to upload. (required) * @return ApiResponse<IdpResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -794,116 +612,76 @@ public CompletableFuture uploadIdPForOrgAsync(String publicId, File * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse uploadIdPForOrgWithHttpInfo(String publicId, File idpFile) - throws ApiException { + public ApiResponse uploadIdPForOrgWithHttpInfo(String publicId, File idpFile) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling uploadIdPForOrg"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling uploadIdPForOrg"); } // verify the required parameter 'idpFile' is set if (idpFile == null) { - throw new ApiException( - 400, "Missing the required parameter 'idpFile' when calling uploadIdPForOrg"); + throw new ApiException(400, "Missing the required parameter 'idpFile' when calling uploadIdPForOrg"); } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}/idp_metadata" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}/idp_metadata" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (idpFile != null) localVarFormParams.put("idp_file", idpFile); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.OrganizationsApi.uploadIdPForOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"multipart/form-data"}, - localVarPostBody, - localVarFormParams, - false, - new GenericType() {}); + if (idpFile != null) localVarFormParams.put("idp_file", idpFile); + + Invocation.Builder builder = apiClient.createBuilder("v1.OrganizationsApi.uploadIdPForOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"multipart/form-data" }, localVarPostBody,localVarFormParams , false, new GenericType() {}); } /** * Upload IdP metadata. * - *

See {@link #uploadIdPForOrgWithHttpInfo}. + * See {@link #uploadIdPForOrgWithHttpInfo}. * - * @param publicId The public_id of the organization you are operating with - * (required) + * @param publicId The public_id of the organization you are operating with (required) * @param idpFile The path to the XML metadata file you wish to upload. (required) * @return CompletableFuture<ApiResponse<IdpResponse>> */ - public CompletableFuture> uploadIdPForOrgWithHttpInfoAsync( - String publicId, File idpFile) { + public CompletableFuture> uploadIdPForOrgWithHttpInfoAsync(String publicId, File idpFile) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling uploadIdPForOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling uploadIdPForOrg")); + return result; } // verify the required parameter 'idpFile' is set if (idpFile == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'idpFile' when calling uploadIdPForOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'idpFile' when calling uploadIdPForOrg")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/org/{public_id}/idp_metadata" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/org/{public_id}/idp_metadata" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (idpFile != null) localVarFormParams.put("idp_file", idpFile); + if (idpFile != null) localVarFormParams.put("idp_file", idpFile); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.OrganizationsApi.uploadIdPForOrg", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.OrganizationsApi.uploadIdPForOrg", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"multipart/form-data"}, - localVarPostBody, - localVarFormParams, - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"multipart/form-data" }, localVarPostBody,localVarFormParams , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/PagerDutyIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/PagerDutyIntegrationApi.java index d8ffaa3f24f..13df5e41af9 100644 --- a/src/main/java/com/datadog/api/client/v1/api/PagerDutyIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/PagerDutyIntegrationApi.java @@ -1,24 +1,32 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.PagerDutyService; -import com.datadog.api.client.v1.model.PagerDutyServiceKey; -import com.datadog.api.client.v1.model.PagerDutyServiceName; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.PagerDutyServiceName; +import com.datadog.api.client.v1.model.PagerDutyService; +import com.datadog.api.client.v1.model.PagerDutyServiceKey; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PagerDutyIntegrationApi { private ApiClient apiClient; - public PagerDutyIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -46,44 +54,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a new service object. - * - *

See {@link #createPagerDutyIntegrationServiceWithHttpInfo}. - * - * @param body Create a new service object request body. (required) - * @return PagerDutyServiceName - * @throws ApiException if fails to make API call - */ - public PagerDutyServiceName createPagerDutyIntegrationService(PagerDutyService body) - throws ApiException { + * Create a new service object. + * + * See {@link #createPagerDutyIntegrationServiceWithHttpInfo}. + * + * @param body Create a new service object request body. (required) + * @return PagerDutyServiceName + * @throws ApiException if fails to make API call + */ + public PagerDutyServiceName createPagerDutyIntegrationService(PagerDutyService body) throws ApiException { return createPagerDutyIntegrationServiceWithHttpInfo(body).getData(); } /** - * Create a new service object. - * - *

See {@link #createPagerDutyIntegrationServiceWithHttpInfoAsync}. - * - * @param body Create a new service object request body. (required) - * @return CompletableFuture<PagerDutyServiceName> - */ - public CompletableFuture createPagerDutyIntegrationServiceAsync( - PagerDutyService body) { - return createPagerDutyIntegrationServiceWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new service object. + * + * See {@link #createPagerDutyIntegrationServiceWithHttpInfoAsync}. + * + * @param body Create a new service object request body. (required) + * @return CompletableFuture<PagerDutyServiceName> + */ + public CompletableFuturecreatePagerDutyIntegrationServiceAsync(PagerDutyService body) { + return createPagerDutyIntegrationServiceWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a new service object in the PagerDuty integration. + *

Create a new service object in the PagerDuty integration.

* * @param body Create a new service object request body. (required) * @return ApiResponse<PagerDutyServiceName> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -92,131 +97,94 @@ public CompletableFuture createPagerDutyIntegrationService * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse createPagerDutyIntegrationServiceWithHttpInfo( - PagerDutyService body) throws ApiException { + public ApiResponse createPagerDutyIntegrationServiceWithHttpInfo(PagerDutyService body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createPagerDutyIntegrationService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createPagerDutyIntegrationService"); } // create path and map variables String localVarPath = "/api/v1/integration/pagerduty/configuration/services"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.createPagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.createPagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new service object. * - *

See {@link #createPagerDutyIntegrationServiceWithHttpInfo}. + * See {@link #createPagerDutyIntegrationServiceWithHttpInfo}. * * @param body Create a new service object request body. (required) * @return CompletableFuture<ApiResponse<PagerDutyServiceName>> */ - public CompletableFuture> - createPagerDutyIntegrationServiceWithHttpInfoAsync(PagerDutyService body) { + public CompletableFuture> createPagerDutyIntegrationServiceWithHttpInfoAsync(PagerDutyService body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createPagerDutyIntegrationService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createPagerDutyIntegrationService")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/pagerduty/configuration/services"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.createPagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.createPagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a single service object. - * - *

See {@link #deletePagerDutyIntegrationServiceWithHttpInfo}. - * - * @param serviceName The service name (required) - * @throws ApiException if fails to make API call - */ - public void deletePagerDutyIntegrationService(String serviceName) throws ApiException { + * Delete a single service object. + * + * See {@link #deletePagerDutyIntegrationServiceWithHttpInfo}. + * + * @param serviceName The service name (required) + * @throws ApiException if fails to make API call + */ + public void deletePagerDutyIntegrationService(String serviceName) throws ApiException { deletePagerDutyIntegrationServiceWithHttpInfo(serviceName); } /** - * Delete a single service object. - * - *

See {@link #deletePagerDutyIntegrationServiceWithHttpInfoAsync}. - * - * @param serviceName The service name (required) - * @return CompletableFuture - */ - public CompletableFuture deletePagerDutyIntegrationServiceAsync(String serviceName) { - return deletePagerDutyIntegrationServiceWithHttpInfoAsync(serviceName) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a single service object. + * + * See {@link #deletePagerDutyIntegrationServiceWithHttpInfoAsync}. + * + * @param serviceName The service name (required) + * @return CompletableFuture + */ + public CompletableFuturedeletePagerDutyIntegrationServiceAsync(String serviceName) { + return deletePagerDutyIntegrationServiceWithHttpInfoAsync(serviceName).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a single service object in the Datadog-PagerDuty integration. + *

Delete a single service object in the Datadog-PagerDuty integration.

* * @param serviceName The service name (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -225,141 +193,97 @@ public CompletableFuture deletePagerDutyIntegrationServiceAsync(String ser * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
*/ - public ApiResponse deletePagerDutyIntegrationServiceWithHttpInfo(String serviceName) - throws ApiException { + public ApiResponse deletePagerDutyIntegrationServiceWithHttpInfo(String serviceName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling" - + " deletePagerDutyIntegrationService"); + throw new ApiException(400, "Missing the required parameter 'serviceName' when calling deletePagerDutyIntegrationService"); } // create path and map variables - String localVarPath = - "/api/v1/integration/pagerduty/configuration/services/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v1/integration/pagerduty/configuration/services/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.deletePagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.deletePagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a single service object. * - *

See {@link #deletePagerDutyIntegrationServiceWithHttpInfo}. + * See {@link #deletePagerDutyIntegrationServiceWithHttpInfo}. * * @param serviceName The service name (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deletePagerDutyIntegrationServiceWithHttpInfoAsync( - String serviceName) { + public CompletableFuture> deletePagerDutyIntegrationServiceWithHttpInfoAsync(String serviceName) { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling" - + " deletePagerDutyIntegrationService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceName' when calling deletePagerDutyIntegrationService")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/pagerduty/configuration/services/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v1/integration/pagerduty/configuration/services/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.deletePagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.deletePagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a single service object. - * - *

See {@link #getPagerDutyIntegrationServiceWithHttpInfo}. - * - * @param serviceName The service name. (required) - * @return PagerDutyServiceName - * @throws ApiException if fails to make API call - */ - public PagerDutyServiceName getPagerDutyIntegrationService(String serviceName) - throws ApiException { + * Get a single service object. + * + * See {@link #getPagerDutyIntegrationServiceWithHttpInfo}. + * + * @param serviceName The service name. (required) + * @return PagerDutyServiceName + * @throws ApiException if fails to make API call + */ + public PagerDutyServiceName getPagerDutyIntegrationService(String serviceName) throws ApiException { return getPagerDutyIntegrationServiceWithHttpInfo(serviceName).getData(); } /** - * Get a single service object. - * - *

See {@link #getPagerDutyIntegrationServiceWithHttpInfoAsync}. - * - * @param serviceName The service name. (required) - * @return CompletableFuture<PagerDutyServiceName> - */ - public CompletableFuture getPagerDutyIntegrationServiceAsync( - String serviceName) { - return getPagerDutyIntegrationServiceWithHttpInfoAsync(serviceName) - .thenApply( - response -> { - return response.getData(); - }); + * Get a single service object. + * + * See {@link #getPagerDutyIntegrationServiceWithHttpInfoAsync}. + * + * @param serviceName The service name. (required) + * @return CompletableFuture<PagerDutyServiceName> + */ + public CompletableFuturegetPagerDutyIntegrationServiceAsync(String serviceName) { + return getPagerDutyIntegrationServiceWithHttpInfoAsync(serviceName).thenApply(response -> { + return response.getData(); + }); } + /** - * Get service name in the Datadog-PagerDuty integration. + *

Get service name in the Datadog-PagerDuty integration.

* * @param serviceName The service name. (required) * @return ApiResponse<PagerDutyServiceName> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -368,143 +292,99 @@ public CompletableFuture getPagerDutyIntegrationServiceAsy * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getPagerDutyIntegrationServiceWithHttpInfo( - String serviceName) throws ApiException { + public ApiResponse getPagerDutyIntegrationServiceWithHttpInfo(String serviceName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling" - + " getPagerDutyIntegrationService"); + throw new ApiException(400, "Missing the required parameter 'serviceName' when calling getPagerDutyIntegrationService"); } // create path and map variables - String localVarPath = - "/api/v1/integration/pagerduty/configuration/services/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v1/integration/pagerduty/configuration/services/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.getPagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.getPagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a single service object. * - *

See {@link #getPagerDutyIntegrationServiceWithHttpInfo}. + * See {@link #getPagerDutyIntegrationServiceWithHttpInfo}. * * @param serviceName The service name. (required) * @return CompletableFuture<ApiResponse<PagerDutyServiceName>> */ - public CompletableFuture> - getPagerDutyIntegrationServiceWithHttpInfoAsync(String serviceName) { + public CompletableFuture> getPagerDutyIntegrationServiceWithHttpInfoAsync(String serviceName) { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling" - + " getPagerDutyIntegrationService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceName' when calling getPagerDutyIntegrationService")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/pagerduty/configuration/services/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v1/integration/pagerduty/configuration/services/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.getPagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.getPagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a single service object. - * - *

See {@link #updatePagerDutyIntegrationServiceWithHttpInfo}. - * - * @param serviceName The service name (required) - * @param body Update an existing service object request body. (required) - * @throws ApiException if fails to make API call - */ - public void updatePagerDutyIntegrationService(String serviceName, PagerDutyServiceKey body) - throws ApiException { + * Update a single service object. + * + * See {@link #updatePagerDutyIntegrationServiceWithHttpInfo}. + * + * @param serviceName The service name (required) + * @param body Update an existing service object request body. (required) + * @throws ApiException if fails to make API call + */ + public void updatePagerDutyIntegrationService(String serviceName, PagerDutyServiceKey body) throws ApiException { updatePagerDutyIntegrationServiceWithHttpInfo(serviceName, body); } /** - * Update a single service object. - * - *

See {@link #updatePagerDutyIntegrationServiceWithHttpInfoAsync}. - * - * @param serviceName The service name (required) - * @param body Update an existing service object request body. (required) - * @return CompletableFuture - */ - public CompletableFuture updatePagerDutyIntegrationServiceAsync( - String serviceName, PagerDutyServiceKey body) { - return updatePagerDutyIntegrationServiceWithHttpInfoAsync(serviceName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a single service object. + * + * See {@link #updatePagerDutyIntegrationServiceWithHttpInfoAsync}. + * + * @param serviceName The service name (required) + * @param body Update an existing service object request body. (required) + * @return CompletableFuture + */ + public CompletableFutureupdatePagerDutyIntegrationServiceAsync(String serviceName, PagerDutyServiceKey body) { + return updatePagerDutyIntegrationServiceWithHttpInfoAsync(serviceName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a single service object in the Datadog-PagerDuty integration. + *

Update a single service object in the Datadog-PagerDuty integration.

* * @param serviceName The service name (required) * @param body Update an existing service object request body. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -514,118 +394,71 @@ public CompletableFuture updatePagerDutyIntegrationServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updatePagerDutyIntegrationServiceWithHttpInfo( - String serviceName, PagerDutyServiceKey body) throws ApiException { + public ApiResponse updatePagerDutyIntegrationServiceWithHttpInfo(String serviceName, PagerDutyServiceKey body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'serviceName' is set if (serviceName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling" - + " updatePagerDutyIntegrationService"); + throw new ApiException(400, "Missing the required parameter 'serviceName' when calling updatePagerDutyIntegrationService"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling updatePagerDutyIntegrationService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updatePagerDutyIntegrationService"); } // create path and map variables - String localVarPath = - "/api/v1/integration/pagerduty/configuration/services/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v1/integration/pagerduty/configuration/services/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.updatePagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.updatePagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** * Update a single service object. * - *

See {@link #updatePagerDutyIntegrationServiceWithHttpInfo}. + * See {@link #updatePagerDutyIntegrationServiceWithHttpInfo}. * * @param serviceName The service name (required) * @param body Update an existing service object request body. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> updatePagerDutyIntegrationServiceWithHttpInfoAsync( - String serviceName, PagerDutyServiceKey body) { + public CompletableFuture> updatePagerDutyIntegrationServiceWithHttpInfoAsync(String serviceName, PagerDutyServiceKey body) { Object localVarPostBody = body; // verify the required parameter 'serviceName' is set if (serviceName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling" - + " updatePagerDutyIntegrationService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceName' when calling updatePagerDutyIntegrationService")); + 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" - + " updatePagerDutyIntegrationService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updatePagerDutyIntegrationService")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/pagerduty/configuration/services/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v1/integration/pagerduty/configuration/services/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.PagerDutyIntegrationApi.updatePagerDutyIntegrationService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.PagerDutyIntegrationApi.updatePagerDutyIntegrationService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v1/api/SecurityMonitoringApi.java index 3f3d7629027..f9d78d03591 100644 --- a/src/main/java/com/datadog/api/client/v1/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/SecurityMonitoringApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.AddSignalToIncidentRequest; -import com.datadog.api.client.v1.model.SignalAssigneeUpdateRequest; -import com.datadog.api.client.v1.model.SignalStateUpdateRequest; -import com.datadog.api.client.v1.model.SuccessfulSignalUpdateResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.SuccessfulSignalUpdateResponse; +import com.datadog.api.client.v1.model.AddSignalToIncidentRequest; +import com.datadog.api.client.v1.model.SignalAssigneeUpdateRequest; +import com.datadog.api.client.v1.model.SignalStateUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringApi { private ApiClient apiClient; - public SecurityMonitoringApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,48 +55,44 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add a security signal to an incident. - * - *

See {@link #addSecurityMonitoringSignalToIncidentWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SuccessfulSignalUpdateResponse - * @throws ApiException if fails to make API call - */ - public SuccessfulSignalUpdateResponse addSecurityMonitoringSignalToIncident( - String signalId, AddSignalToIncidentRequest body) throws ApiException { + * Add a security signal to an incident. + * + * See {@link #addSecurityMonitoringSignalToIncidentWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SuccessfulSignalUpdateResponse + * @throws ApiException if fails to make API call + */ + public SuccessfulSignalUpdateResponse addSecurityMonitoringSignalToIncident(String signalId, AddSignalToIncidentRequest body) throws ApiException { return addSecurityMonitoringSignalToIncidentWithHttpInfo(signalId, body).getData(); } /** - * Add a security signal to an incident. - * - *

See {@link #addSecurityMonitoringSignalToIncidentWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SuccessfulSignalUpdateResponse> - */ - public CompletableFuture - addSecurityMonitoringSignalToIncidentAsync(String signalId, AddSignalToIncidentRequest body) { - return addSecurityMonitoringSignalToIncidentWithHttpInfoAsync(signalId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Add a security signal to an incident. + * + * See {@link #addSecurityMonitoringSignalToIncidentWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SuccessfulSignalUpdateResponse> + */ + public CompletableFutureaddSecurityMonitoringSignalToIncidentAsync(String signalId, AddSignalToIncidentRequest body) { + return addSecurityMonitoringSignalToIncidentWithHttpInfoAsync(signalId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Add a security signal to an incident. This makes it possible to search for signals by incident - * within the signal explorer and to view the signals on the incident timeline. + *

Add a security signal to an incident. This makes it possible to search for signals by incident within the signal explorer and to view the signals on the incident timeline.

* * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return ApiResponse<SuccessfulSignalUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -98,167 +102,113 @@ public SuccessfulSignalUpdateResponse addSecurityMonitoringSignalToIncident( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - addSecurityMonitoringSignalToIncidentWithHttpInfo( - String signalId, AddSignalToIncidentRequest body) throws ApiException { + public ApiResponse addSecurityMonitoringSignalToIncidentWithHttpInfo(String signalId, AddSignalToIncidentRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " addSecurityMonitoringSignalToIncident"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling addSecurityMonitoringSignalToIncident"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " addSecurityMonitoringSignalToIncident"); + throw new ApiException(400, "Missing the required parameter 'body' when calling addSecurityMonitoringSignalToIncident"); } // create path and map variables - String localVarPath = - "/api/v1/security_analytics/signals/{signal_id}/add_to_incident" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v1/security_analytics/signals/{signal_id}/add_to_incident" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SecurityMonitoringApi.addSecurityMonitoringSignalToIncident", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SecurityMonitoringApi.addSecurityMonitoringSignalToIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add a security signal to an incident. * - *

See {@link #addSecurityMonitoringSignalToIncidentWithHttpInfo}. + * See {@link #addSecurityMonitoringSignalToIncidentWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return CompletableFuture<ApiResponse<SuccessfulSignalUpdateResponse>> */ - public CompletableFuture> - addSecurityMonitoringSignalToIncidentWithHttpInfoAsync( - String signalId, AddSignalToIncidentRequest body) { + public CompletableFuture> addSecurityMonitoringSignalToIncidentWithHttpInfoAsync(String signalId, AddSignalToIncidentRequest body) { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " addSecurityMonitoringSignalToIncident")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling addSecurityMonitoringSignalToIncident")); + 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" - + " addSecurityMonitoringSignalToIncident")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling addSecurityMonitoringSignalToIncident")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/security_analytics/signals/{signal_id}/add_to_incident" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v1/security_analytics/signals/{signal_id}/add_to_incident" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SecurityMonitoringApi.addSecurityMonitoringSignalToIncident", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SecurityMonitoringApi.addSecurityMonitoringSignalToIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Modify the triage assignee of a security signal. - * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SuccessfulSignalUpdateResponse - * @throws ApiException if fails to make API call - */ - public SuccessfulSignalUpdateResponse editSecurityMonitoringSignalAssignee( - String signalId, SignalAssigneeUpdateRequest body) throws ApiException { + * Modify the triage assignee of a security signal. + * + * See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SuccessfulSignalUpdateResponse + * @throws ApiException if fails to make API call + */ + public SuccessfulSignalUpdateResponse editSecurityMonitoringSignalAssignee(String signalId, SignalAssigneeUpdateRequest body) throws ApiException { return editSecurityMonitoringSignalAssigneeWithHttpInfo(signalId, body).getData(); } /** - * Modify the triage assignee of a security signal. - * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SuccessfulSignalUpdateResponse> - */ - public CompletableFuture - editSecurityMonitoringSignalAssigneeAsync(String signalId, SignalAssigneeUpdateRequest body) { - return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Modify the triage assignee of a security signal. + * + * See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SuccessfulSignalUpdateResponse> + */ + public CompletableFutureeditSecurityMonitoringSignalAssigneeAsync(String signalId, SignalAssigneeUpdateRequest body) { + return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Modify the triage assignee of a security signal. + *

Modify the triage assignee of a security signal.

* * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return ApiResponse<SuccessfulSignalUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -268,167 +218,113 @@ public SuccessfulSignalUpdateResponse editSecurityMonitoringSignalAssignee( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalAssigneeWithHttpInfo( - String signalId, SignalAssigneeUpdateRequest body) throws ApiException { + public ApiResponse editSecurityMonitoringSignalAssigneeWithHttpInfo(String signalId, SignalAssigneeUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalAssignee"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalAssignee"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalAssignee"); + throw new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalAssignee"); } // create path and map variables - String localVarPath = - "/api/v1/security_analytics/signals/{signal_id}/assignee" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v1/security_analytics/signals/{signal_id}/assignee" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Modify the triage assignee of a security signal. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + * See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return CompletableFuture<ApiResponse<SuccessfulSignalUpdateResponse>> */ - public CompletableFuture> - editSecurityMonitoringSignalAssigneeWithHttpInfoAsync( - String signalId, SignalAssigneeUpdateRequest body) { + public CompletableFuture> editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(String signalId, SignalAssigneeUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalAssignee")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalAssignee")); + 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" - + " editSecurityMonitoringSignalAssignee")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalAssignee")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/security_analytics/signals/{signal_id}/assignee" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v1/security_analytics/signals/{signal_id}/assignee" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Change the triage state of a security signal. - * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SuccessfulSignalUpdateResponse - * @throws ApiException if fails to make API call - */ - public SuccessfulSignalUpdateResponse editSecurityMonitoringSignalState( - String signalId, SignalStateUpdateRequest body) throws ApiException { + * Change the triage state of a security signal. + * + * See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SuccessfulSignalUpdateResponse + * @throws ApiException if fails to make API call + */ + public SuccessfulSignalUpdateResponse editSecurityMonitoringSignalState(String signalId, SignalStateUpdateRequest body) throws ApiException { return editSecurityMonitoringSignalStateWithHttpInfo(signalId, body).getData(); } /** - * Change the triage state of a security signal. - * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SuccessfulSignalUpdateResponse> - */ - public CompletableFuture editSecurityMonitoringSignalStateAsync( - String signalId, SignalStateUpdateRequest body) { - return editSecurityMonitoringSignalStateWithHttpInfoAsync(signalId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Change the triage state of a security signal. + * + * See {@link #editSecurityMonitoringSignalStateWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SuccessfulSignalUpdateResponse> + */ + public CompletableFutureeditSecurityMonitoringSignalStateAsync(String signalId, SignalStateUpdateRequest body) { + return editSecurityMonitoringSignalStateWithHttpInfoAsync(signalId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Change the triage state of a security signal. + *

Change the triage state of a security signal.

* * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return ApiResponse<SuccessfulSignalUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -438,120 +334,71 @@ public CompletableFuture editSecurityMonitoringS * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse editSecurityMonitoringSignalStateWithHttpInfo( - String signalId, SignalStateUpdateRequest body) throws ApiException { + public ApiResponse editSecurityMonitoringSignalStateWithHttpInfo(String signalId, SignalStateUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalState"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalState"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState"); + throw new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState"); } // create path and map variables - String localVarPath = - "/api/v1/security_analytics/signals/{signal_id}/state" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v1/security_analytics/signals/{signal_id}/state" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SecurityMonitoringApi.editSecurityMonitoringSignalState", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SecurityMonitoringApi.editSecurityMonitoringSignalState", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Change the triage state of a security signal. * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. + * See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return CompletableFuture<ApiResponse<SuccessfulSignalUpdateResponse>> */ - public CompletableFuture> - editSecurityMonitoringSignalStateWithHttpInfoAsync( - String signalId, SignalStateUpdateRequest body) { + public CompletableFuture> editSecurityMonitoringSignalStateWithHttpInfoAsync(String signalId, SignalStateUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalState")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalState")); + 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" - + " editSecurityMonitoringSignalState")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/security_analytics/signals/{signal_id}/state" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v1/security_analytics/signals/{signal_id}/state" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SecurityMonitoringApi.editSecurityMonitoringSignalState", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SecurityMonitoringApi.editSecurityMonitoringSignalState", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/ServiceChecksApi.java b/src/main/java/com/datadog/api/client/v1/api/ServiceChecksApi.java index d2ec642169a..5418ea234d8 100644 --- a/src/main/java/com/datadog/api/client/v1/api/ServiceChecksApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/ServiceChecksApi.java @@ -1,24 +1,31 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.IntakePayloadAccepted; -import com.datadog.api.client.v1.model.ServiceCheck; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.IntakePayloadAccepted; +import com.datadog.api.client.v1.model.ServiceCheck; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceChecksApi { private ApiClient apiClient; - public ServiceChecksApi() { this(ApiClient.getDefaultApiClient()); } @@ -46,45 +53,44 @@ public void setApiClient(ApiClient apiClient) { } /** - * Submit a Service Check. - * - *

See {@link #submitServiceCheckWithHttpInfo}. - * - * @param body Service Check request body. (required) - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitServiceCheck(List body) throws ApiException { + * Submit a Service Check. + * + * See {@link #submitServiceCheckWithHttpInfo}. + * + * @param body Service Check request body. (required) + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitServiceCheck(List body) throws ApiException { return submitServiceCheckWithHttpInfo(body).getData(); } /** - * Submit a Service Check. - * - *

See {@link #submitServiceCheckWithHttpInfoAsync}. - * - * @param body Service Check request body. (required) - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitServiceCheckAsync(List body) { - return submitServiceCheckWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Submit a Service Check. + * + * See {@link #submitServiceCheckWithHttpInfoAsync}. + * + * @param body Service Check request body. (required) + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitServiceCheckAsync(List body) { + return submitServiceCheckWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Submit a list of Service Checks. - * - *

Notes: - A valid API key is required. - Service checks can be submitted up - * to 10 minutes in the past. + *

Submit a list of Service Checks.

+ *

Notes: + * - A valid API key is required. + * - Service checks can be submitted up to 10 minutes in the past.

* * @param body Service Check request body. (required) * @return ApiResponse<IntakePayloadAccepted> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -95,89 +101,56 @@ public CompletableFuture submitServiceCheckAsync(List *
Response details
Status Code Description Response Headers
202 Payload accepted -
429 Too many requests -
*/ - public ApiResponse submitServiceCheckWithHttpInfo(List body) - throws ApiException { + public ApiResponse submitServiceCheckWithHttpInfo(List body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling submitServiceCheck"); + throw new ApiException(400, "Missing the required parameter 'body' when calling submitServiceCheck"); } // create path and map variables String localVarPath = "/api/v1/check_run"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceChecksApi.submitServiceCheck", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"text/json", "application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceChecksApi.submitServiceCheck", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"text/json", "application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Submit a Service Check. * - *

See {@link #submitServiceCheckWithHttpInfo}. + * See {@link #submitServiceCheckWithHttpInfo}. * * @param body Service Check request body. (required) * @return CompletableFuture<ApiResponse<IntakePayloadAccepted>> */ - public CompletableFuture> submitServiceCheckWithHttpInfoAsync( - List body) { + public CompletableFuture> submitServiceCheckWithHttpInfoAsync(List body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling submitServiceCheck")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling submitServiceCheck")); + return result; } // create path and map variables String localVarPath = "/api/v1/check_run"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceChecksApi.submitServiceCheck", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"text/json", "application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceChecksApi.submitServiceCheck", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"text/json", "application/json" }, new String[] { "apiKeyAuth" }); } 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectiveCorrectionsApi.java b/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectiveCorrectionsApi.java index 54739be70b4..ecbf21db8a3 100644 --- a/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectiveCorrectionsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectiveCorrectionsApi.java @@ -1,26 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.SLOCorrectionCreateRequest; -import com.datadog.api.client.v1.model.SLOCorrectionListResponse; -import com.datadog.api.client.v1.model.SLOCorrectionResponse; -import com.datadog.api.client.v1.model.SLOCorrectionUpdateRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.SLOCorrectionListResponse; +import com.datadog.api.client.v1.model.SLOCorrectionResponse; +import com.datadog.api.client.v1.model.SLOCorrectionCreateRequest; +import com.datadog.api.client.v1.model.SLOCorrectionUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceLevelObjectiveCorrectionsApi { private ApiClient apiClient; - public ServiceLevelObjectiveCorrectionsApi() { this(ApiClient.getDefaultApiClient()); } @@ -48,44 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an SLO correction. - * - *

See {@link #createSLOCorrectionWithHttpInfo}. - * - * @param body Create an SLO Correction (required) - * @return SLOCorrectionResponse - * @throws ApiException if fails to make API call - */ - public SLOCorrectionResponse createSLOCorrection(SLOCorrectionCreateRequest body) - throws ApiException { + * Create an SLO correction. + * + * See {@link #createSLOCorrectionWithHttpInfo}. + * + * @param body Create an SLO Correction (required) + * @return SLOCorrectionResponse + * @throws ApiException if fails to make API call + */ + public SLOCorrectionResponse createSLOCorrection(SLOCorrectionCreateRequest body) throws ApiException { return createSLOCorrectionWithHttpInfo(body).getData(); } /** - * Create an SLO correction. - * - *

See {@link #createSLOCorrectionWithHttpInfoAsync}. - * - * @param body Create an SLO Correction (required) - * @return CompletableFuture<SLOCorrectionResponse> - */ - public CompletableFuture createSLOCorrectionAsync( - SLOCorrectionCreateRequest body) { - return createSLOCorrectionWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an SLO correction. + * + * See {@link #createSLOCorrectionWithHttpInfoAsync}. + * + * @param body Create an SLO Correction (required) + * @return CompletableFuture<SLOCorrectionResponse> + */ + public CompletableFuturecreateSLOCorrectionAsync(SLOCorrectionCreateRequest body) { + return createSLOCorrectionWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an SLO Correction. + *

Create an SLO Correction.

* * @param body Create an SLO Correction (required) * @return ApiResponse<SLOCorrectionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -95,128 +99,94 @@ public CompletableFuture createSLOCorrectionAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createSLOCorrectionWithHttpInfo( - SLOCorrectionCreateRequest body) throws ApiException { + public ApiResponse createSLOCorrectionWithHttpInfo(SLOCorrectionCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSLOCorrection"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createSLOCorrection"); } // create path and map variables String localVarPath = "/api/v1/slo/correction"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.createSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.createSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an SLO correction. * - *

See {@link #createSLOCorrectionWithHttpInfo}. + * See {@link #createSLOCorrectionWithHttpInfo}. * * @param body Create an SLO Correction (required) * @return CompletableFuture<ApiResponse<SLOCorrectionResponse>> */ - public CompletableFuture> createSLOCorrectionWithHttpInfoAsync( - SLOCorrectionCreateRequest body) { + public CompletableFuture> createSLOCorrectionWithHttpInfoAsync(SLOCorrectionCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createSLOCorrection")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSLOCorrection")); + return result; } // create path and map variables String localVarPath = "/api/v1/slo/correction"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.createSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.createSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an SLO correction. - * - *

See {@link #deleteSLOCorrectionWithHttpInfo}. - * - * @param sloCorrectionId The ID of the SLO correction object. (required) - * @throws ApiException if fails to make API call - */ - public void deleteSLOCorrection(String sloCorrectionId) throws ApiException { + * Delete an SLO correction. + * + * See {@link #deleteSLOCorrectionWithHttpInfo}. + * + * @param sloCorrectionId The ID of the SLO correction object. (required) + * @throws ApiException if fails to make API call + */ + public void deleteSLOCorrection(String sloCorrectionId) throws ApiException { deleteSLOCorrectionWithHttpInfo(sloCorrectionId); } /** - * Delete an SLO correction. - * - *

See {@link #deleteSLOCorrectionWithHttpInfoAsync}. - * - * @param sloCorrectionId The ID of the SLO correction object. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteSLOCorrectionAsync(String sloCorrectionId) { - return deleteSLOCorrectionWithHttpInfoAsync(sloCorrectionId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an SLO correction. + * + * See {@link #deleteSLOCorrectionWithHttpInfoAsync}. + * + * @param sloCorrectionId The ID of the SLO correction object. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteSLOCorrectionAsync(String sloCorrectionId) { + return deleteSLOCorrectionWithHttpInfoAsync(sloCorrectionId).thenApply(response -> { + return response.getData(); + }); } + /** - * Permanently delete the specified SLO correction object. + *

Permanently delete the specified SLO correction object.

* * @param sloCorrectionId The ID of the SLO correction object. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -225,138 +195,97 @@ public CompletableFuture deleteSLOCorrectionAsync(String sloCorrectionId) * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteSLOCorrectionWithHttpInfo(String sloCorrectionId) - throws ApiException { + public ApiResponse deleteSLOCorrectionWithHttpInfo(String sloCorrectionId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sloCorrectionId' is set if (sloCorrectionId == null) { - throw new ApiException( - 400, "Missing the required parameter 'sloCorrectionId' when calling deleteSLOCorrection"); + throw new ApiException(400, "Missing the required parameter 'sloCorrectionId' when calling deleteSLOCorrection"); } // create path and map variables - String localVarPath = - "/api/v1/slo/correction/{slo_correction_id}" - .replaceAll( - "\\{" + "slo_correction_id" + "\\}", - apiClient.escapeString(sloCorrectionId.toString())); + String localVarPath = "/api/v1/slo/correction/{slo_correction_id}" + .replaceAll("\\{" + "slo_correction_id" + "\\}", apiClient.escapeString(sloCorrectionId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.deleteSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.deleteSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an SLO correction. * - *

See {@link #deleteSLOCorrectionWithHttpInfo}. + * See {@link #deleteSLOCorrectionWithHttpInfo}. * * @param sloCorrectionId The ID of the SLO correction object. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSLOCorrectionWithHttpInfoAsync( - String sloCorrectionId) { + public CompletableFuture> deleteSLOCorrectionWithHttpInfoAsync(String sloCorrectionId) { Object localVarPostBody = null; // verify the required parameter 'sloCorrectionId' is set if (sloCorrectionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sloCorrectionId' when calling deleteSLOCorrection")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloCorrectionId' when calling deleteSLOCorrection")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/slo/correction/{slo_correction_id}" - .replaceAll( - "\\{" + "slo_correction_id" + "\\}", - apiClient.escapeString(sloCorrectionId.toString())); + String localVarPath = "/api/v1/slo/correction/{slo_correction_id}" + .replaceAll("\\{" + "slo_correction_id" + "\\}", apiClient.escapeString(sloCorrectionId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.deleteSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.deleteSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get an SLO correction for an SLO. - * - *

See {@link #getSLOCorrectionWithHttpInfo}. - * - * @param sloCorrectionId The ID of the SLO correction object. (required) - * @return SLOCorrectionResponse - * @throws ApiException if fails to make API call - */ - public SLOCorrectionResponse getSLOCorrection(String sloCorrectionId) throws ApiException { + * Get an SLO correction for an SLO. + * + * See {@link #getSLOCorrectionWithHttpInfo}. + * + * @param sloCorrectionId The ID of the SLO correction object. (required) + * @return SLOCorrectionResponse + * @throws ApiException if fails to make API call + */ + public SLOCorrectionResponse getSLOCorrection(String sloCorrectionId) throws ApiException { return getSLOCorrectionWithHttpInfo(sloCorrectionId).getData(); } /** - * Get an SLO correction for an SLO. - * - *

See {@link #getSLOCorrectionWithHttpInfoAsync}. - * - * @param sloCorrectionId The ID of the SLO correction object. (required) - * @return CompletableFuture<SLOCorrectionResponse> - */ - public CompletableFuture getSLOCorrectionAsync(String sloCorrectionId) { - return getSLOCorrectionWithHttpInfoAsync(sloCorrectionId) - .thenApply( - response -> { - return response.getData(); - }); + * Get an SLO correction for an SLO. + * + * See {@link #getSLOCorrectionWithHttpInfoAsync}. + * + * @param sloCorrectionId The ID of the SLO correction object. (required) + * @return CompletableFuture<SLOCorrectionResponse> + */ + public CompletableFuturegetSLOCorrectionAsync(String sloCorrectionId) { + return getSLOCorrectionWithHttpInfoAsync(sloCorrectionId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get an SLO correction. + *

Get an SLO correction.

* * @param sloCorrectionId The ID of the SLO correction object. (required) * @return ApiResponse<SLOCorrectionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -365,111 +294,71 @@ public CompletableFuture getSLOCorrectionAsync(String slo * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSLOCorrectionWithHttpInfo(String sloCorrectionId) - throws ApiException { + public ApiResponse getSLOCorrectionWithHttpInfo(String sloCorrectionId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sloCorrectionId' is set if (sloCorrectionId == null) { - throw new ApiException( - 400, "Missing the required parameter 'sloCorrectionId' when calling getSLOCorrection"); + throw new ApiException(400, "Missing the required parameter 'sloCorrectionId' when calling getSLOCorrection"); } // create path and map variables - String localVarPath = - "/api/v1/slo/correction/{slo_correction_id}" - .replaceAll( - "\\{" + "slo_correction_id" + "\\}", - apiClient.escapeString(sloCorrectionId.toString())); + String localVarPath = "/api/v1/slo/correction/{slo_correction_id}" + .replaceAll("\\{" + "slo_correction_id" + "\\}", apiClient.escapeString(sloCorrectionId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.getSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.getSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an SLO correction for an SLO. * - *

See {@link #getSLOCorrectionWithHttpInfo}. + * See {@link #getSLOCorrectionWithHttpInfo}. * * @param sloCorrectionId The ID of the SLO correction object. (required) * @return CompletableFuture<ApiResponse<SLOCorrectionResponse>> */ - public CompletableFuture> getSLOCorrectionWithHttpInfoAsync( - String sloCorrectionId) { + public CompletableFuture> getSLOCorrectionWithHttpInfoAsync(String sloCorrectionId) { Object localVarPostBody = null; // verify the required parameter 'sloCorrectionId' is set if (sloCorrectionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sloCorrectionId' when calling getSLOCorrection")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloCorrectionId' when calling getSLOCorrection")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/slo/correction/{slo_correction_id}" - .replaceAll( - "\\{" + "slo_correction_id" + "\\}", - apiClient.escapeString(sloCorrectionId.toString())); + String localVarPath = "/api/v1/slo/correction/{slo_correction_id}" + .replaceAll("\\{" + "slo_correction_id" + "\\}", apiClient.escapeString(sloCorrectionId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.getSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.getSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listSLOCorrection. */ + /** + * Manage optional parameters to listSLOCorrection. + */ public static class ListSLOCorrectionOptionalParameters { private Long offset; private Long limit; /** * Set offset. - * - * @param offset The specific offset to use as the beginning of the returned response. - * (optional) + * @param offset The specific offset to use as the beginning of the returned response. (optional) * @return ListSLOCorrectionOptionalParameters */ public ListSLOCorrectionOptionalParameters offset(Long offset) { @@ -479,9 +368,7 @@ public ListSLOCorrectionOptionalParameters offset(Long offset) { /** * Set limit. - * - * @param limit The number of SLO corrections to return in the response. Default is 25. - * (optional) + * @param limit The number of SLO corrections to return in the response. Default is 25. (optional) * @return ListSLOCorrectionOptionalParameters */ public ListSLOCorrectionOptionalParameters limit(Long limit) { @@ -491,71 +378,66 @@ public ListSLOCorrectionOptionalParameters limit(Long limit) { } /** - * Get all SLO corrections. - * - *

See {@link #listSLOCorrectionWithHttpInfo}. - * - * @return SLOCorrectionListResponse - * @throws ApiException if fails to make API call - */ - public SLOCorrectionListResponse listSLOCorrection() throws ApiException { + * Get all SLO corrections. + * + * See {@link #listSLOCorrectionWithHttpInfo}. + * + * @return SLOCorrectionListResponse + * @throws ApiException if fails to make API call + */ + public SLOCorrectionListResponse listSLOCorrection () throws ApiException { return listSLOCorrectionWithHttpInfo(new ListSLOCorrectionOptionalParameters()).getData(); } /** - * Get all SLO corrections. - * - *

See {@link #listSLOCorrectionWithHttpInfoAsync}. - * - * @return CompletableFuture<SLOCorrectionListResponse> - */ - public CompletableFuture listSLOCorrectionAsync() { - return listSLOCorrectionWithHttpInfoAsync(new ListSLOCorrectionOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all SLO corrections. + * + * See {@link #listSLOCorrectionWithHttpInfoAsync}. + * + * @return CompletableFuture<SLOCorrectionListResponse> + */ + public CompletableFuturelistSLOCorrectionAsync() { + return listSLOCorrectionWithHttpInfoAsync(new ListSLOCorrectionOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all SLO corrections. - * - *

See {@link #listSLOCorrectionWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SLOCorrectionListResponse - * @throws ApiException if fails to make API call - */ - public SLOCorrectionListResponse listSLOCorrection(ListSLOCorrectionOptionalParameters parameters) - throws ApiException { + * Get all SLO corrections. + * + * See {@link #listSLOCorrectionWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SLOCorrectionListResponse + * @throws ApiException if fails to make API call + */ + public SLOCorrectionListResponse listSLOCorrection(ListSLOCorrectionOptionalParameters parameters) throws ApiException { return listSLOCorrectionWithHttpInfo(parameters).getData(); } /** - * Get all SLO corrections. - * - *

See {@link #listSLOCorrectionWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SLOCorrectionListResponse> - */ - public CompletableFuture listSLOCorrectionAsync( - ListSLOCorrectionOptionalParameters parameters) { - return listSLOCorrectionWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all SLO corrections. + * + * See {@link #listSLOCorrectionWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SLOCorrectionListResponse> + */ + public CompletableFuturelistSLOCorrectionAsync(ListSLOCorrectionOptionalParameters parameters) { + return listSLOCorrectionWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all Service Level Objective corrections. + *

Get all Service Level Objective corrections.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SLOCorrectionListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -563,56 +445,40 @@ public CompletableFuture listSLOCorrectionAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listSLOCorrectionWithHttpInfo( - ListSLOCorrectionOptionalParameters parameters) throws ApiException { + public ApiResponse listSLOCorrectionWithHttpInfo(ListSLOCorrectionOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long offset = parameters.offset; Long limit = parameters.limit; // create path and map variables String localVarPath = "/api/v1/slo/correction"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.listSLOCorrection", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.listSLOCorrection", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all SLO corrections. * - *

See {@link #listSLOCorrectionWithHttpInfo}. + * See {@link #listSLOCorrectionWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SLOCorrectionListResponse>> */ - public CompletableFuture> - listSLOCorrectionWithHttpInfoAsync(ListSLOCorrectionOptionalParameters parameters) { + public CompletableFuture> listSLOCorrectionWithHttpInfoAsync(ListSLOCorrectionOptionalParameters parameters) { Object localVarPostBody = null; Long offset = parameters.offset; Long limit = parameters.limit; // create path and map variables String localVarPath = "/api/v1/slo/correction"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -621,73 +487,54 @@ public ApiResponse listSLOCorrectionWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.listSLOCorrection", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.listSLOCorrection", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an SLO correction. - * - *

See {@link #updateSLOCorrectionWithHttpInfo}. - * - * @param sloCorrectionId The ID of the SLO correction object. (required) - * @param body The edited SLO correction object. (required) - * @return SLOCorrectionResponse - * @throws ApiException if fails to make API call - */ - public SLOCorrectionResponse updateSLOCorrection( - String sloCorrectionId, SLOCorrectionUpdateRequest body) throws ApiException { + * Update an SLO correction. + * + * See {@link #updateSLOCorrectionWithHttpInfo}. + * + * @param sloCorrectionId The ID of the SLO correction object. (required) + * @param body The edited SLO correction object. (required) + * @return SLOCorrectionResponse + * @throws ApiException if fails to make API call + */ + public SLOCorrectionResponse updateSLOCorrection(String sloCorrectionId, SLOCorrectionUpdateRequest body) throws ApiException { return updateSLOCorrectionWithHttpInfo(sloCorrectionId, body).getData(); } /** - * Update an SLO correction. - * - *

See {@link #updateSLOCorrectionWithHttpInfoAsync}. - * - * @param sloCorrectionId The ID of the SLO correction object. (required) - * @param body The edited SLO correction object. (required) - * @return CompletableFuture<SLOCorrectionResponse> - */ - public CompletableFuture updateSLOCorrectionAsync( - String sloCorrectionId, SLOCorrectionUpdateRequest body) { - return updateSLOCorrectionWithHttpInfoAsync(sloCorrectionId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an SLO correction. + * + * See {@link #updateSLOCorrectionWithHttpInfoAsync}. + * + * @param sloCorrectionId The ID of the SLO correction object. (required) + * @param body The edited SLO correction object. (required) + * @return CompletableFuture<SLOCorrectionResponse> + */ + public CompletableFutureupdateSLOCorrectionAsync(String sloCorrectionId, SLOCorrectionUpdateRequest body) { + return updateSLOCorrectionWithHttpInfoAsync(sloCorrectionId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the specified SLO correction object. + *

Update the specified SLO correction object.

* * @param sloCorrectionId The ID of the SLO correction object. (required) * @param body The edited SLO correction object. (required) * @return ApiResponse<SLOCorrectionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -697,114 +544,71 @@ public CompletableFuture updateSLOCorrectionAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateSLOCorrectionWithHttpInfo( - String sloCorrectionId, SLOCorrectionUpdateRequest body) throws ApiException { + public ApiResponse updateSLOCorrectionWithHttpInfo(String sloCorrectionId, SLOCorrectionUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'sloCorrectionId' is set if (sloCorrectionId == null) { - throw new ApiException( - 400, "Missing the required parameter 'sloCorrectionId' when calling updateSLOCorrection"); + throw new ApiException(400, "Missing the required parameter 'sloCorrectionId' when calling updateSLOCorrection"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateSLOCorrection"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateSLOCorrection"); } // create path and map variables - String localVarPath = - "/api/v1/slo/correction/{slo_correction_id}" - .replaceAll( - "\\{" + "slo_correction_id" + "\\}", - apiClient.escapeString(sloCorrectionId.toString())); + String localVarPath = "/api/v1/slo/correction/{slo_correction_id}" + .replaceAll("\\{" + "slo_correction_id" + "\\}", apiClient.escapeString(sloCorrectionId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.updateSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.updateSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an SLO correction. * - *

See {@link #updateSLOCorrectionWithHttpInfo}. + * See {@link #updateSLOCorrectionWithHttpInfo}. * * @param sloCorrectionId The ID of the SLO correction object. (required) * @param body The edited SLO correction object. (required) * @return CompletableFuture<ApiResponse<SLOCorrectionResponse>> */ - public CompletableFuture> updateSLOCorrectionWithHttpInfoAsync( - String sloCorrectionId, SLOCorrectionUpdateRequest body) { + public CompletableFuture> updateSLOCorrectionWithHttpInfoAsync(String sloCorrectionId, SLOCorrectionUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'sloCorrectionId' is set if (sloCorrectionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sloCorrectionId' when calling updateSLOCorrection")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloCorrectionId' when calling updateSLOCorrection")); + 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 updateSLOCorrection")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateSLOCorrection")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/slo/correction/{slo_correction_id}" - .replaceAll( - "\\{" + "slo_correction_id" + "\\}", - apiClient.escapeString(sloCorrectionId.toString())); + String localVarPath = "/api/v1/slo/correction/{slo_correction_id}" + .replaceAll("\\{" + "slo_correction_id" + "\\}", apiClient.escapeString(sloCorrectionId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectiveCorrectionsApi.updateSLOCorrection", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectiveCorrectionsApi.updateSLOCorrection", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectivesApi.java b/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectivesApi.java index 0a916042b8a..98c25de25e5 100644 --- a/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectivesApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/ServiceLevelObjectivesApi.java @@ -1,33 +1,40 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.CheckCanDeleteSLOResponse; -import com.datadog.api.client.v1.model.SLOBulkDeleteResponse; -import com.datadog.api.client.v1.model.SLOCorrectionListResponse; -import com.datadog.api.client.v1.model.SLODeleteResponse; -import com.datadog.api.client.v1.model.SLOHistoryResponse; -import com.datadog.api.client.v1.model.SLOListResponse; -import com.datadog.api.client.v1.model.SLOResponse; -import com.datadog.api.client.v1.model.SLOTimeframe; -import com.datadog.api.client.v1.model.SearchSLOResponse; -import com.datadog.api.client.v1.model.ServiceLevelObjective; -import com.datadog.api.client.v1.model.ServiceLevelObjectiveRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.SLOListResponse; +import com.datadog.api.client.v1.model.ServiceLevelObjectiveRequest; +import com.datadog.api.client.v1.model.SLOBulkDeleteResponse; +import com.datadog.api.client.v1.model.SLOTimeframe; +import com.datadog.api.client.v1.model.CheckCanDeleteSLOResponse; +import com.datadog.api.client.v1.model.SearchSLOResponse; +import com.datadog.api.client.v1.model.SLODeleteResponse; +import com.datadog.api.client.v1.model.SLOResponse; +import com.datadog.api.client.v1.model.ServiceLevelObjective; +import com.datadog.api.client.v1.model.SLOCorrectionListResponse; +import com.datadog.api.client.v1.model.SLOHistoryResponse; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceLevelObjectivesApi { private ApiClient apiClient; - public ServiceLevelObjectivesApi() { this(ApiClient.getDefaultApiClient()); } @@ -55,46 +62,42 @@ public void setApiClient(ApiClient apiClient) { } /** - * Check if SLOs can be safely deleted. - * - *

See {@link #checkCanDeleteSLOWithHttpInfo}. - * - * @param ids A comma separated list of the IDs of the service level objectives objects. - * (required) - * @return CheckCanDeleteSLOResponse - * @throws ApiException if fails to make API call - */ - public CheckCanDeleteSLOResponse checkCanDeleteSLO(String ids) throws ApiException { + * Check if SLOs can be safely deleted. + * + * See {@link #checkCanDeleteSLOWithHttpInfo}. + * + * @param ids A comma separated list of the IDs of the service level objectives objects. (required) + * @return CheckCanDeleteSLOResponse + * @throws ApiException if fails to make API call + */ + public CheckCanDeleteSLOResponse checkCanDeleteSLO(String ids) throws ApiException { return checkCanDeleteSLOWithHttpInfo(ids).getData(); } /** - * Check if SLOs can be safely deleted. - * - *

See {@link #checkCanDeleteSLOWithHttpInfoAsync}. - * - * @param ids A comma separated list of the IDs of the service level objectives objects. - * (required) - * @return CompletableFuture<CheckCanDeleteSLOResponse> - */ - public CompletableFuture checkCanDeleteSLOAsync(String ids) { - return checkCanDeleteSLOWithHttpInfoAsync(ids) - .thenApply( - response -> { - return response.getData(); - }); + * Check if SLOs can be safely deleted. + * + * See {@link #checkCanDeleteSLOWithHttpInfoAsync}. + * + * @param ids A comma separated list of the IDs of the service level objectives objects. (required) + * @return CompletableFuture<CheckCanDeleteSLOResponse> + */ + public CompletableFuturecheckCanDeleteSLOAsync(String ids) { + return checkCanDeleteSLOWithHttpInfoAsync(ids).thenApply(response -> { + return response.getData(); + }); } + /** - * Check if an SLO can be safely deleted. For example, assure an SLO can be deleted without - * disrupting a dashboard. + *

Check if an SLO can be safely deleted. For example, + * assure an SLO can be deleted without disrupting a dashboard.

* - * @param ids A comma separated list of the IDs of the service level objectives objects. - * (required) + * @param ids A comma separated list of the IDs of the service level objectives objects. (required) * @return ApiResponse<CheckCanDeleteSLOResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -104,67 +107,47 @@ public CompletableFuture checkCanDeleteSLOAsync(Strin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse checkCanDeleteSLOWithHttpInfo(String ids) - throws ApiException { + public ApiResponse checkCanDeleteSLOWithHttpInfo(String ids) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'ids' is set if (ids == null) { - throw new ApiException( - 400, "Missing the required parameter 'ids' when calling checkCanDeleteSLO"); + throw new ApiException(400, "Missing the required parameter 'ids' when calling checkCanDeleteSLO"); } // create path and map variables String localVarPath = "/api/v1/slo/can_delete"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "ids", ids)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.checkCanDeleteSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.checkCanDeleteSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Check if SLOs can be safely deleted. * - *

See {@link #checkCanDeleteSLOWithHttpInfo}. + * See {@link #checkCanDeleteSLOWithHttpInfo}. * - * @param ids A comma separated list of the IDs of the service level objectives objects. - * (required) + * @param ids A comma separated list of the IDs of the service level objectives objects. (required) * @return CompletableFuture<ApiResponse<CheckCanDeleteSLOResponse>> */ - public CompletableFuture> - checkCanDeleteSLOWithHttpInfoAsync(String ids) { + public CompletableFuture> checkCanDeleteSLOWithHttpInfoAsync(String ids) { Object localVarPostBody = null; // verify the required parameter 'ids' is set if (ids == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'ids' when calling checkCanDeleteSLO")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'ids' when calling checkCanDeleteSLO")); + return result; } // create path and map variables String localVarPath = "/api/v1/slo/can_delete"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -172,68 +155,51 @@ public ApiResponse checkCanDeleteSLOWithHttpInfo(Stri Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.checkCanDeleteSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.checkCanDeleteSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create an SLO object. - * - *

See {@link #createSLOWithHttpInfo}. - * - * @param body Service level objective request object. (required) - * @return SLOListResponse - * @throws ApiException if fails to make API call - */ - public SLOListResponse createSLO(ServiceLevelObjectiveRequest body) throws ApiException { + * Create an SLO object. + * + * See {@link #createSLOWithHttpInfo}. + * + * @param body Service level objective request object. (required) + * @return SLOListResponse + * @throws ApiException if fails to make API call + */ + public SLOListResponse createSLO(ServiceLevelObjectiveRequest body) throws ApiException { return createSLOWithHttpInfo(body).getData(); } /** - * Create an SLO object. - * - *

See {@link #createSLOWithHttpInfoAsync}. - * - * @param body Service level objective request object. (required) - * @return CompletableFuture<SLOListResponse> - */ - public CompletableFuture createSLOAsync(ServiceLevelObjectiveRequest body) { - return createSLOWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an SLO object. + * + * See {@link #createSLOWithHttpInfoAsync}. + * + * @param body Service level objective request object. (required) + * @return CompletableFuture<SLOListResponse> + */ + public CompletableFuturecreateSLOAsync(ServiceLevelObjectiveRequest body) { + return createSLOWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a service level objective object. + *

Create a service level objective object.

* * @param body Service level objective request object. (required) * @return ApiResponse<SLOListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -242,8 +208,7 @@ public CompletableFuture createSLOAsync(ServiceLevelObjectiveRe * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createSLOWithHttpInfo(ServiceLevelObjectiveRequest body) - throws ApiException { + public ApiResponse createSLOWithHttpInfo(ServiceLevelObjectiveRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -253,88 +218,58 @@ public ApiResponse createSLOWithHttpInfo(ServiceLevelObjectiveR // create path and map variables String localVarPath = "/api/v1/slo"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.createSLO", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.createSLO", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an SLO object. * - *

See {@link #createSLOWithHttpInfo}. + * See {@link #createSLOWithHttpInfo}. * * @param body Service level objective request object. (required) * @return CompletableFuture<ApiResponse<SLOListResponse>> */ - public CompletableFuture> createSLOWithHttpInfoAsync( - ServiceLevelObjectiveRequest body) { + public CompletableFuture> createSLOWithHttpInfoAsync(ServiceLevelObjectiveRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling createSLO")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSLO")); + return result; } // create path and map variables String localVarPath = "/api/v1/slo"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.createSLO", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.createSLO", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to deleteSLO. */ + /** + * Manage optional parameters to deleteSLO. + */ public static class DeleteSLOOptionalParameters { private String force; /** * Set force. - * - * @param force Delete the monitor even if it's referenced by other resources (for example SLO, - * composite monitor). (optional) + * @param force Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). (optional) * @return DeleteSLOOptionalParameters */ public DeleteSLOOptionalParameters force(String force) { @@ -344,79 +279,73 @@ public DeleteSLOOptionalParameters force(String force) { } /** - * Delete an SLO. - * - *

See {@link #deleteSLOWithHttpInfo}. - * - * @param sloId The ID of the service level objective. (required) - * @return SLODeleteResponse - * @throws ApiException if fails to make API call - */ - public SLODeleteResponse deleteSLO(String sloId) throws ApiException { - return deleteSLOWithHttpInfo(sloId, new DeleteSLOOptionalParameters()).getData(); + * Delete an SLO. + * + * See {@link #deleteSLOWithHttpInfo}. + * + * @param sloId The ID of the service level objective. (required) + * @return SLODeleteResponse + * @throws ApiException if fails to make API call + */ + public SLODeleteResponse deleteSLO (String sloId) throws ApiException { + return deleteSLOWithHttpInfo( sloId, new DeleteSLOOptionalParameters()).getData(); } /** - * Delete an SLO. - * - *

See {@link #deleteSLOWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective. (required) - * @return CompletableFuture<SLODeleteResponse> - */ - public CompletableFuture deleteSLOAsync(String sloId) { - return deleteSLOWithHttpInfoAsync(sloId, new DeleteSLOOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an SLO. + * + * See {@link #deleteSLOWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective. (required) + * @return CompletableFuture<SLODeleteResponse> + */ + public CompletableFuturedeleteSLOAsync(String sloId) { + return deleteSLOWithHttpInfoAsync(sloId, new DeleteSLOOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Delete an SLO. - * - *

See {@link #deleteSLOWithHttpInfo}. - * - * @param sloId The ID of the service level objective. (required) - * @param parameters Optional parameters for the request. - * @return SLODeleteResponse - * @throws ApiException if fails to make API call - */ - public SLODeleteResponse deleteSLO(String sloId, DeleteSLOOptionalParameters parameters) - throws ApiException { + * Delete an SLO. + * + * See {@link #deleteSLOWithHttpInfo}. + * + * @param sloId The ID of the service level objective. (required) + * @param parameters Optional parameters for the request. + * @return SLODeleteResponse + * @throws ApiException if fails to make API call + */ + public SLODeleteResponse deleteSLO(String sloId, DeleteSLOOptionalParameters parameters) throws ApiException { return deleteSLOWithHttpInfo(sloId, parameters).getData(); } /** - * Delete an SLO. - * - *

See {@link #deleteSLOWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SLODeleteResponse> - */ - public CompletableFuture deleteSLOAsync( - String sloId, DeleteSLOOptionalParameters parameters) { - return deleteSLOWithHttpInfoAsync(sloId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an SLO. + * + * See {@link #deleteSLOWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SLODeleteResponse> + */ + public CompletableFuturedeleteSLOAsync( String sloId, DeleteSLOOptionalParameters parameters) { + return deleteSLOWithHttpInfoAsync(sloId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Permanently delete the specified service level objective object. - * - *

If an SLO is used in a dashboard, the DELETE /v1/slo/ endpoint returns a 409 - * conflict error because the SLO is referenced in a dashboard. + *

Permanently delete the specified service level objective object.

+ *

If an SLO is used in a dashboard, the DELETE /v1/slo/ endpoint returns + * a 409 conflict error because the SLO is referenced in a dashboard.

* * @param sloId The ID of the service level objective. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<SLODeleteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -426,8 +355,7 @@ public CompletableFuture deleteSLOAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteSLOWithHttpInfo( - String sloId, DeleteSLOOptionalParameters parameters) throws ApiException { + public ApiResponse deleteSLOWithHttpInfo(String sloId, DeleteSLOOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sloId' is set @@ -436,61 +364,43 @@ public ApiResponse deleteSLOWithHttpInfo( } String force = parameters.force; // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.deleteSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.deleteSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete an SLO. * - *

See {@link #deleteSLOWithHttpInfo}. + * See {@link #deleteSLOWithHttpInfo}. * * @param sloId The ID of the service level objective. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SLODeleteResponse>> */ - public CompletableFuture> deleteSLOWithHttpInfoAsync( - String sloId, DeleteSLOOptionalParameters parameters) { + public CompletableFuture> deleteSLOWithHttpInfoAsync(String sloId, DeleteSLOOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'sloId' is set if (sloId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'sloId' when calling deleteSLO")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloId' when calling deleteSLO")); + return result; } String force = parameters.force; // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -498,74 +408,54 @@ public CompletableFuture> deleteSLOWithHttpInfoAs Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.deleteSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.deleteSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Bulk Delete SLO Timeframes. - * - *

See {@link #deleteSLOTimeframeInBulkWithHttpInfo}. - * - * @param body Delete multiple service level objective objects request body. (required) - * @return SLOBulkDeleteResponse - * @throws ApiException if fails to make API call - */ - public SLOBulkDeleteResponse deleteSLOTimeframeInBulk(Map> body) - throws ApiException { + * Bulk Delete SLO Timeframes. + * + * See {@link #deleteSLOTimeframeInBulkWithHttpInfo}. + * + * @param body Delete multiple service level objective objects request body. (required) + * @return SLOBulkDeleteResponse + * @throws ApiException if fails to make API call + */ + public SLOBulkDeleteResponse deleteSLOTimeframeInBulk(Map> body) throws ApiException { return deleteSLOTimeframeInBulkWithHttpInfo(body).getData(); } /** - * Bulk Delete SLO Timeframes. - * - *

See {@link #deleteSLOTimeframeInBulkWithHttpInfoAsync}. - * - * @param body Delete multiple service level objective objects request body. (required) - * @return CompletableFuture<SLOBulkDeleteResponse> - */ - public CompletableFuture deleteSLOTimeframeInBulkAsync( - Map> body) { - return deleteSLOTimeframeInBulkWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Bulk Delete SLO Timeframes. + * + * See {@link #deleteSLOTimeframeInBulkWithHttpInfoAsync}. + * + * @param body Delete multiple service level objective objects request body. (required) + * @return CompletableFuture<SLOBulkDeleteResponse> + */ + public CompletableFuturedeleteSLOTimeframeInBulkAsync(Map> body) { + return deleteSLOTimeframeInBulkWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete (or partially delete) multiple service level objective objects. - * - *

This endpoint facilitates deletion of one or more thresholds for one or more service level - * objective objects. If all thresholds are deleted, the service level objective object is deleted - * as well. + *

Delete (or partially delete) multiple service level objective objects.

+ *

This endpoint facilitates deletion of one or more thresholds for one or more + * service level objective objects. If all thresholds are deleted, the service level + * objective object is deleted as well.

* * @param body Delete multiple service level objective objects request body. (required) * @return ApiResponse<SLOBulkDeleteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -574,99 +464,67 @@ public CompletableFuture deleteSLOTimeframeInBulkAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteSLOTimeframeInBulkWithHttpInfo( - Map> body) throws ApiException { + public ApiResponse deleteSLOTimeframeInBulkWithHttpInfo(Map> body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteSLOTimeframeInBulk"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteSLOTimeframeInBulk"); } // create path and map variables String localVarPath = "/api/v1/slo/bulk_delete"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.deleteSLOTimeframeInBulk", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.deleteSLOTimeframeInBulk", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Bulk Delete SLO Timeframes. * - *

See {@link #deleteSLOTimeframeInBulkWithHttpInfo}. + * See {@link #deleteSLOTimeframeInBulkWithHttpInfo}. * * @param body Delete multiple service level objective objects request body. (required) * @return CompletableFuture<ApiResponse<SLOBulkDeleteResponse>> */ - public CompletableFuture> - deleteSLOTimeframeInBulkWithHttpInfoAsync(Map> body) { + public CompletableFuture> deleteSLOTimeframeInBulkWithHttpInfoAsync(Map> body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling deleteSLOTimeframeInBulk")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteSLOTimeframeInBulk")); + return result; } // create path and map variables String localVarPath = "/api/v1/slo/bulk_delete"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.deleteSLOTimeframeInBulk", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.deleteSLOTimeframeInBulk", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getSLO. */ + /** + * Manage optional parameters to getSLO. + */ public static class GetSLOOptionalParameters { private Boolean withConfiguredAlertIds; /** * Set withConfiguredAlertIds. - * * @param withConfiguredAlertIds Get the IDs of SLO monitors that reference this SLO. (optional) * @return GetSLOOptionalParameters */ @@ -677,75 +535,71 @@ public GetSLOOptionalParameters withConfiguredAlertIds(Boolean withConfiguredAle } /** - * Get an SLO's details. - * - *

See {@link #getSLOWithHttpInfo}. - * - * @param sloId The ID of the service level objective object. (required) - * @return SLOResponse - * @throws ApiException if fails to make API call - */ - public SLOResponse getSLO(String sloId) throws ApiException { - return getSLOWithHttpInfo(sloId, new GetSLOOptionalParameters()).getData(); + * Get an SLO's details. + * + * See {@link #getSLOWithHttpInfo}. + * + * @param sloId The ID of the service level objective object. (required) + * @return SLOResponse + * @throws ApiException if fails to make API call + */ + public SLOResponse getSLO (String sloId) throws ApiException { + return getSLOWithHttpInfo( sloId, new GetSLOOptionalParameters()).getData(); } /** - * Get an SLO's details. - * - *

See {@link #getSLOWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective object. (required) - * @return CompletableFuture<SLOResponse> - */ - public CompletableFuture getSLOAsync(String sloId) { - return getSLOWithHttpInfoAsync(sloId, new GetSLOOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get an SLO's details. + * + * See {@link #getSLOWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective object. (required) + * @return CompletableFuture<SLOResponse> + */ + public CompletableFuturegetSLOAsync(String sloId) { + return getSLOWithHttpInfoAsync(sloId, new GetSLOOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get an SLO's details. - * - *

See {@link #getSLOWithHttpInfo}. - * - * @param sloId The ID of the service level objective object. (required) - * @param parameters Optional parameters for the request. - * @return SLOResponse - * @throws ApiException if fails to make API call - */ + * Get an SLO's details. + * + * See {@link #getSLOWithHttpInfo}. + * + * @param sloId The ID of the service level objective object. (required) + * @param parameters Optional parameters for the request. + * @return SLOResponse + * @throws ApiException if fails to make API call + */ public SLOResponse getSLO(String sloId, GetSLOOptionalParameters parameters) throws ApiException { return getSLOWithHttpInfo(sloId, parameters).getData(); } /** - * Get an SLO's details. - * - *

See {@link #getSLOWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective object. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SLOResponse> - */ - public CompletableFuture getSLOAsync( - String sloId, GetSLOOptionalParameters parameters) { - return getSLOWithHttpInfoAsync(sloId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get an SLO's details. + * + * See {@link #getSLOWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective object. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SLOResponse> + */ + public CompletableFuturegetSLOAsync( String sloId, GetSLOOptionalParameters parameters) { + return getSLOWithHttpInfoAsync(sloId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a service level objective object. + *

Get a service level objective object.

* * @param sloId The ID of the service level objective object. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<SLOResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -754,8 +608,7 @@ public CompletableFuture getSLOAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSLOWithHttpInfo( - String sloId, GetSLOOptionalParameters parameters) throws ApiException { + public ApiResponse getSLOWithHttpInfo(String sloId, GetSLOOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sloId' is set @@ -764,132 +617,95 @@ public ApiResponse getSLOWithHttpInfo( } Boolean withConfiguredAlertIds = parameters.withConfiguredAlertIds; // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "with_configured_alert_ids", withConfiguredAlertIds)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.getSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "with_configured_alert_ids", withConfiguredAlertIds)); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.getSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an SLO's details. * - *

See {@link #getSLOWithHttpInfo}. + * See {@link #getSLOWithHttpInfo}. * * @param sloId The ID of the service level objective object. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SLOResponse>> */ - public CompletableFuture> getSLOWithHttpInfoAsync( - String sloId, GetSLOOptionalParameters parameters) { + public CompletableFuture> getSLOWithHttpInfoAsync(String sloId, GetSLOOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'sloId' is set if (sloId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'sloId' when calling getSLO")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloId' when calling getSLO")); + return result; } Boolean withConfiguredAlertIds = parameters.withConfiguredAlertIds; // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "with_configured_alert_ids", withConfiguredAlertIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "with_configured_alert_ids", withConfiguredAlertIds)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.getSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.getSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get Corrections For an SLO. - * - *

See {@link #getSLOCorrectionsWithHttpInfo}. - * - * @param sloId The ID of the service level objective object. (required) - * @return SLOCorrectionListResponse - * @throws ApiException if fails to make API call - */ - public SLOCorrectionListResponse getSLOCorrections(String sloId) throws ApiException { + * Get Corrections For an SLO. + * + * See {@link #getSLOCorrectionsWithHttpInfo}. + * + * @param sloId The ID of the service level objective object. (required) + * @return SLOCorrectionListResponse + * @throws ApiException if fails to make API call + */ + public SLOCorrectionListResponse getSLOCorrections(String sloId) throws ApiException { return getSLOCorrectionsWithHttpInfo(sloId).getData(); } /** - * Get Corrections For an SLO. - * - *

See {@link #getSLOCorrectionsWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective object. (required) - * @return CompletableFuture<SLOCorrectionListResponse> - */ - public CompletableFuture getSLOCorrectionsAsync(String sloId) { - return getSLOCorrectionsWithHttpInfoAsync(sloId) - .thenApply( - response -> { - return response.getData(); - }); + * Get Corrections For an SLO. + * + * See {@link #getSLOCorrectionsWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective object. (required) + * @return CompletableFuture<SLOCorrectionListResponse> + */ + public CompletableFuturegetSLOCorrectionsAsync(String sloId) { + return getSLOCorrectionsWithHttpInfoAsync(sloId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get corrections applied to an SLO + *

Get corrections applied to an SLO

* * @param sloId The ID of the service level objective object. (required) * @return ApiResponse<SLOCorrectionListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -899,106 +715,71 @@ public CompletableFuture getSLOCorrectionsAsync(Strin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSLOCorrectionsWithHttpInfo(String sloId) - throws ApiException { + public ApiResponse getSLOCorrectionsWithHttpInfo(String sloId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sloId' is set if (sloId == null) { - throw new ApiException( - 400, "Missing the required parameter 'sloId' when calling getSLOCorrections"); + throw new ApiException(400, "Missing the required parameter 'sloId' when calling getSLOCorrections"); } // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}/corrections" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}/corrections" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.getSLOCorrections", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.getSLOCorrections", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get Corrections For an SLO. * - *

See {@link #getSLOCorrectionsWithHttpInfo}. + * See {@link #getSLOCorrectionsWithHttpInfo}. * * @param sloId The ID of the service level objective object. (required) * @return CompletableFuture<ApiResponse<SLOCorrectionListResponse>> */ - public CompletableFuture> - getSLOCorrectionsWithHttpInfoAsync(String sloId) { + public CompletableFuture> getSLOCorrectionsWithHttpInfoAsync(String sloId) { Object localVarPostBody = null; // verify the required parameter 'sloId' is set if (sloId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'sloId' when calling getSLOCorrections")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloId' when calling getSLOCorrections")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}/corrections" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}/corrections" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.getSLOCorrections", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.getSLOCorrections", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getSLOHistory. */ + /** + * Manage optional parameters to getSLOHistory. + */ public static class GetSLOHistoryOptionalParameters { private Double target; private Boolean applyCorrection; /** * Set target. - * - * @param target The SLO target. If target is passed in, the response will include - * the remaining error budget and a timeframe value of custom. (optional) + * @param target The SLO target. If target is passed in, the response will include the remaining error budget and a timeframe value of custom. (optional) * @return GetSLOHistoryOptionalParameters */ public GetSLOHistoryOptionalParameters target(Double target) { @@ -1008,10 +789,7 @@ public GetSLOHistoryOptionalParameters target(Double target) { /** * Set applyCorrection. - * - * @param applyCorrection Defaults to true. If any SLO corrections are applied and - * this parameter is set to false, then the corrections will not be applied and - * the SLI values will not be affected. (optional) + * @param applyCorrection Defaults to true. If any SLO corrections are applied and this parameter is set to false, then the corrections will not be applied and the SLI values will not be affected. (optional) * @return GetSLOHistoryOptionalParameters */ public GetSLOHistoryOptionalParameters applyCorrection(Boolean applyCorrection) { @@ -1021,89 +799,77 @@ public GetSLOHistoryOptionalParameters applyCorrection(Boolean applyCorrection) } /** - * Get an SLO's history. - * - *

See {@link #getSLOHistoryWithHttpInfo}. - * - * @param sloId The ID of the service level objective object. (required) - * @param fromTs The from timestamp for the query window in epoch seconds. (required) - * @param toTs The to timestamp for the query window in epoch seconds. (required) - * @return SLOHistoryResponse - * @throws ApiException if fails to make API call - */ - public SLOHistoryResponse getSLOHistory(String sloId, Long fromTs, Long toTs) - throws ApiException { - return getSLOHistoryWithHttpInfo(sloId, fromTs, toTs, new GetSLOHistoryOptionalParameters()) - .getData(); + * Get an SLO's history. + * + * See {@link #getSLOHistoryWithHttpInfo}. + * + * @param sloId The ID of the service level objective object. (required) + * @param fromTs The from timestamp for the query window in epoch seconds. (required) + * @param toTs The to timestamp for the query window in epoch seconds. (required) + * @return SLOHistoryResponse + * @throws ApiException if fails to make API call + */ + public SLOHistoryResponse getSLOHistory (String sloId, Long fromTs, Long toTs) throws ApiException { + return getSLOHistoryWithHttpInfo( sloId, fromTs, toTs, new GetSLOHistoryOptionalParameters()).getData(); } /** - * Get an SLO's history. - * - *

See {@link #getSLOHistoryWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective object. (required) - * @param fromTs The from timestamp for the query window in epoch seconds. (required) - * @param toTs The to timestamp for the query window in epoch seconds. (required) - * @return CompletableFuture<SLOHistoryResponse> - */ - public CompletableFuture getSLOHistoryAsync( - String sloId, Long fromTs, Long toTs) { - return getSLOHistoryWithHttpInfoAsync( - sloId, fromTs, toTs, new GetSLOHistoryOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get an SLO's history. + * + * See {@link #getSLOHistoryWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective object. (required) + * @param fromTs The from timestamp for the query window in epoch seconds. (required) + * @param toTs The to timestamp for the query window in epoch seconds. (required) + * @return CompletableFuture<SLOHistoryResponse> + */ + public CompletableFuturegetSLOHistoryAsync(String sloId, Long fromTs, Long toTs) { + return getSLOHistoryWithHttpInfoAsync(sloId, fromTs, toTs, new GetSLOHistoryOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get an SLO's history. - * - *

See {@link #getSLOHistoryWithHttpInfo}. - * - * @param sloId The ID of the service level objective object. (required) - * @param fromTs The from timestamp for the query window in epoch seconds. (required) - * @param toTs The to timestamp for the query window in epoch seconds. (required) - * @param parameters Optional parameters for the request. - * @return SLOHistoryResponse - * @throws ApiException if fails to make API call - */ - public SLOHistoryResponse getSLOHistory( - String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) - throws ApiException { + * Get an SLO's history. + * + * See {@link #getSLOHistoryWithHttpInfo}. + * + * @param sloId The ID of the service level objective object. (required) + * @param fromTs The from timestamp for the query window in epoch seconds. (required) + * @param toTs The to timestamp for the query window in epoch seconds. (required) + * @param parameters Optional parameters for the request. + * @return SLOHistoryResponse + * @throws ApiException if fails to make API call + */ + public SLOHistoryResponse getSLOHistory(String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) throws ApiException { return getSLOHistoryWithHttpInfo(sloId, fromTs, toTs, parameters).getData(); } /** - * Get an SLO's history. - * - *

See {@link #getSLOHistoryWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective object. (required) - * @param fromTs The from timestamp for the query window in epoch seconds. (required) - * @param toTs The to timestamp for the query window in epoch seconds. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SLOHistoryResponse> - */ - public CompletableFuture getSLOHistoryAsync( - String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) { - return getSLOHistoryWithHttpInfoAsync(sloId, fromTs, toTs, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get an SLO's history. + * + * See {@link #getSLOHistoryWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective object. (required) + * @param fromTs The from timestamp for the query window in epoch seconds. (required) + * @param toTs The to timestamp for the query window in epoch seconds. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SLOHistoryResponse> + */ + public CompletableFuturegetSLOHistoryAsync( String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) { + return getSLOHistoryWithHttpInfoAsync(sloId, fromTs, toTs, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a specific SLO’s history, regardless of its SLO type. - * - *

The detailed history data is structured according to the source data type. For example, - * metric data is included for event SLOs that use the metric source, and monitor SLO types - * include the monitor transition history. - * - *

Note: There are different response formats for event based and time based - * SLOs. Examples of both are shown. + *

Get a specific SLO’s history, regardless of its SLO type.

+ *

The detailed history data is structured according to the source data type. + * For example, metric data is included for event SLOs that use + * the metric source, and monitor SLO types include the monitor transition history.

+ *

Note: There are different response formats for event based and time based SLOs. + * Examples of both are shown.

* * @param sloId The ID of the service level objective object. (required) * @param fromTs The from timestamp for the query window in epoch seconds. (required) @@ -1112,7 +878,7 @@ public CompletableFuture getSLOHistoryAsync( * @return ApiResponse<SLOHistoryResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1122,35 +888,30 @@ public CompletableFuture getSLOHistoryAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSLOHistoryWithHttpInfo( - String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) - throws ApiException { + public ApiResponse getSLOHistoryWithHttpInfo(String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sloId' is set if (sloId == null) { - throw new ApiException( - 400, "Missing the required parameter 'sloId' when calling getSLOHistory"); + throw new ApiException(400, "Missing the required parameter 'sloId' when calling getSLOHistory"); } // verify the required parameter 'fromTs' is set if (fromTs == null) { - throw new ApiException( - 400, "Missing the required parameter 'fromTs' when calling getSLOHistory"); + throw new ApiException(400, "Missing the required parameter 'fromTs' when calling getSLOHistory"); } // verify the required parameter 'toTs' is set if (toTs == null) { - throw new ApiException( - 400, "Missing the required parameter 'toTs' when calling getSLOHistory"); + throw new ApiException(400, "Missing the required parameter 'toTs' when calling getSLOHistory"); } Double target = parameters.target; Boolean applyCorrection = parameters.applyCorrection; // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}/history" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}/history" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1159,30 +920,14 @@ public ApiResponse getSLOHistoryWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "target", target)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "apply_correction", applyCorrection)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.getSLOHistory", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.getSLOHistory", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an SLO's history. * - *

See {@link #getSLOHistoryWithHttpInfo}. + * See {@link #getSLOHistoryWithHttpInfo}. * * @param sloId The ID of the service level objective object. (required) * @param fromTs The from timestamp for the query window in epoch seconds. (required) @@ -1190,43 +935,36 @@ public ApiResponse getSLOHistoryWithHttpInfo( * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SLOHistoryResponse>> */ - public CompletableFuture> getSLOHistoryWithHttpInfoAsync( - String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) { + public CompletableFuture> getSLOHistoryWithHttpInfoAsync(String sloId, Long fromTs, Long toTs, GetSLOHistoryOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'sloId' is set if (sloId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'sloId' when calling getSLOHistory")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloId' when calling getSLOHistory")); + return result; } // verify the required parameter 'fromTs' is set if (fromTs == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'fromTs' when calling getSLOHistory")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'fromTs' when calling getSLOHistory")); + return result; } // verify the required parameter 'toTs' is set if (toTs == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'toTs' when calling getSLOHistory")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'toTs' when calling getSLOHistory")); + return result; } Double target = parameters.target; Boolean applyCorrection = parameters.applyCorrection; // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}/history" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}/history" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1237,32 +975,18 @@ public CompletableFuture> getSLOHistoryWithHttpI Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.getSLOHistory", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.getSLOHistory", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listSLOs. */ + /** + * Manage optional parameters to listSLOs. + */ public static class ListSLOsOptionalParameters { private String ids; private String query; @@ -1273,9 +997,7 @@ public static class ListSLOsOptionalParameters { /** * Set ids. - * - * @param ids A comma separated list of the IDs of the service level objectives objects. - * (optional) + * @param ids A comma separated list of the IDs of the service level objectives objects. (optional) * @return ListSLOsOptionalParameters */ public ListSLOsOptionalParameters ids(String ids) { @@ -1285,7 +1007,6 @@ public ListSLOsOptionalParameters ids(String ids) { /** * Set query. - * * @param query The query string to filter results based on SLO names. (optional) * @return ListSLOsOptionalParameters */ @@ -1296,7 +1017,6 @@ public ListSLOsOptionalParameters query(String query) { /** * Set tagsQuery. - * * @param tagsQuery The query string to filter results based on a single SLO tag. (optional) * @return ListSLOsOptionalParameters */ @@ -1307,9 +1027,7 @@ public ListSLOsOptionalParameters tagsQuery(String tagsQuery) { /** * Set metricsQuery. - * - * @param metricsQuery The query string to filter results based on SLO numerator and - * denominator. (optional) + * @param metricsQuery The query string to filter results based on SLO numerator and denominator. (optional) * @return ListSLOsOptionalParameters */ public ListSLOsOptionalParameters metricsQuery(String metricsQuery) { @@ -1319,7 +1037,6 @@ public ListSLOsOptionalParameters metricsQuery(String metricsQuery) { /** * Set limit. - * * @param limit The number of SLOs to return in the response. (optional) * @return ListSLOsOptionalParameters */ @@ -1330,9 +1047,7 @@ public ListSLOsOptionalParameters limit(Long limit) { /** * Set offset. - * - * @param offset The specific offset to use as the beginning of the returned response. - * (optional) + * @param offset The specific offset to use as the beginning of the returned response. (optional) * @return ListSLOsOptionalParameters */ public ListSLOsOptionalParameters offset(Long offset) { @@ -1342,69 +1057,66 @@ public ListSLOsOptionalParameters offset(Long offset) { } /** - * Get all SLOs. - * - *

See {@link #listSLOsWithHttpInfo}. - * - * @return SLOListResponse - * @throws ApiException if fails to make API call - */ - public SLOListResponse listSLOs() throws ApiException { + * Get all SLOs. + * + * See {@link #listSLOsWithHttpInfo}. + * + * @return SLOListResponse + * @throws ApiException if fails to make API call + */ + public SLOListResponse listSLOs () throws ApiException { return listSLOsWithHttpInfo(new ListSLOsOptionalParameters()).getData(); } /** - * Get all SLOs. - * - *

See {@link #listSLOsWithHttpInfoAsync}. - * - * @return CompletableFuture<SLOListResponse> - */ - public CompletableFuture listSLOsAsync() { - return listSLOsWithHttpInfoAsync(new ListSLOsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all SLOs. + * + * See {@link #listSLOsWithHttpInfoAsync}. + * + * @return CompletableFuture<SLOListResponse> + */ + public CompletableFuturelistSLOsAsync() { + return listSLOsWithHttpInfoAsync(new ListSLOsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all SLOs. - * - *

See {@link #listSLOsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SLOListResponse - * @throws ApiException if fails to make API call - */ + * Get all SLOs. + * + * See {@link #listSLOsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SLOListResponse + * @throws ApiException if fails to make API call + */ public SLOListResponse listSLOs(ListSLOsOptionalParameters parameters) throws ApiException { return listSLOsWithHttpInfo(parameters).getData(); } /** - * Get all SLOs. - * - *

See {@link #listSLOsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SLOListResponse> - */ - public CompletableFuture listSLOsAsync(ListSLOsOptionalParameters parameters) { - return listSLOsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all SLOs. + * + * See {@link #listSLOsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SLOListResponse> + */ + public CompletableFuturelistSLOsAsync(ListSLOsOptionalParameters parameters) { + return listSLOsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a list of service level objective objects for your organization. + *

Get a list of service level objective objects for your organization.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SLOListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1414,8 +1126,7 @@ public CompletableFuture listSLOsAsync(ListSLOsOptionalParamete * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listSLOsWithHttpInfo(ListSLOsOptionalParameters parameters) - throws ApiException { + public ApiResponse listSLOsWithHttpInfo(ListSLOsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String ids = parameters.ids; String query = parameters.query; @@ -1426,6 +1137,7 @@ public ApiResponse listSLOsWithHttpInfo(ListSLOsOptionalParamet // create path and map variables String localVarPath = "/api/v1/slo"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1436,36 +1148,19 @@ public ApiResponse listSLOsWithHttpInfo(ListSLOsOptionalParamet localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.listSLOs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.listSLOs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all SLOs. * - *

See {@link #listSLOsWithHttpInfo}. + * See {@link #listSLOsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SLOListResponse>> */ - public CompletableFuture> listSLOsWithHttpInfoAsync( - ListSLOsOptionalParameters parameters) { + public CompletableFuture> listSLOsWithHttpInfoAsync(ListSLOsOptionalParameters parameters) { Object localVarPostBody = null; String ids = parameters.ids; String query = parameters.query; @@ -1476,6 +1171,7 @@ public CompletableFuture> listSLOsWithHttpInfoAsync // create path and map variables String localVarPath = "/api/v1/slo"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1488,32 +1184,18 @@ public CompletableFuture> listSLOsWithHttpInfoAsync Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.listSLOs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.listSLOs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchSLO. */ + /** + * Manage optional parameters to searchSLO. + */ public static class SearchSLOOptionalParameters { private String query; private Long pageSize; @@ -1522,10 +1204,7 @@ public static class SearchSLOOptionalParameters { /** * Set query. - * - * @param query The query string to filter results based on SLO names. Some examples of queries - * include service:<service-name> and <slo-name>. - * (optional) + * @param query The query string to filter results based on SLO names. Some examples of queries include service:<service-name> and <slo-name>. (optional) * @return SearchSLOOptionalParameters */ public SearchSLOOptionalParameters query(String query) { @@ -1535,9 +1214,7 @@ public SearchSLOOptionalParameters query(String query) { /** * Set pageSize. - * - * @param pageSize The number of files to return in the response [default=10]. - * (optional) + * @param pageSize The number of files to return in the response [default=10]. (optional) * @return SearchSLOOptionalParameters */ public SearchSLOOptionalParameters pageSize(Long pageSize) { @@ -1547,9 +1224,7 @@ public SearchSLOOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * - * @param pageNumber The identifier of the first page to return. This parameter is used for the - * pagination feature [default=0]. (optional) + * @param pageNumber The identifier of the first page to return. This parameter is used for the pagination feature [default=0]. (optional) * @return SearchSLOOptionalParameters */ public SearchSLOOptionalParameters pageNumber(Long pageNumber) { @@ -1559,9 +1234,7 @@ public SearchSLOOptionalParameters pageNumber(Long pageNumber) { /** * Set includeFacets. - * - * @param includeFacets Whether or not to return facet information in the response - * [default=false]. (optional) + * @param includeFacets Whether or not to return facet information in the response [default=false]. (optional) * @return SearchSLOOptionalParameters */ public SearchSLOOptionalParameters includeFacets(Boolean includeFacets) { @@ -1571,70 +1244,66 @@ public SearchSLOOptionalParameters includeFacets(Boolean includeFacets) { } /** - * Search for SLOs. - * - *

See {@link #searchSLOWithHttpInfo}. - * - * @return SearchSLOResponse - * @throws ApiException if fails to make API call - */ - public SearchSLOResponse searchSLO() throws ApiException { + * Search for SLOs. + * + * See {@link #searchSLOWithHttpInfo}. + * + * @return SearchSLOResponse + * @throws ApiException if fails to make API call + */ + public SearchSLOResponse searchSLO () throws ApiException { return searchSLOWithHttpInfo(new SearchSLOOptionalParameters()).getData(); } /** - * Search for SLOs. - * - *

See {@link #searchSLOWithHttpInfoAsync}. - * - * @return CompletableFuture<SearchSLOResponse> - */ - public CompletableFuture searchSLOAsync() { - return searchSLOWithHttpInfoAsync(new SearchSLOOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search for SLOs. + * + * See {@link #searchSLOWithHttpInfoAsync}. + * + * @return CompletableFuture<SearchSLOResponse> + */ + public CompletableFuturesearchSLOAsync() { + return searchSLOWithHttpInfoAsync(new SearchSLOOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search for SLOs. - * - *

See {@link #searchSLOWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SearchSLOResponse - * @throws ApiException if fails to make API call - */ + * Search for SLOs. + * + * See {@link #searchSLOWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SearchSLOResponse + * @throws ApiException if fails to make API call + */ public SearchSLOResponse searchSLO(SearchSLOOptionalParameters parameters) throws ApiException { return searchSLOWithHttpInfo(parameters).getData(); } /** - * Search for SLOs. - * - *

See {@link #searchSLOWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SearchSLOResponse> - */ - public CompletableFuture searchSLOAsync( - SearchSLOOptionalParameters parameters) { - return searchSLOWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search for SLOs. + * + * See {@link #searchSLOWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SearchSLOResponse> + */ + public CompletableFuturesearchSLOAsync(SearchSLOOptionalParameters parameters) { + return searchSLOWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a list of service level objective objects for your organization. + *

Get a list of service level objective objects for your organization.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SearchSLOResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1643,8 +1312,7 @@ public CompletableFuture searchSLOAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchSLOWithHttpInfo( - SearchSLOOptionalParameters parameters) throws ApiException { + public ApiResponse searchSLOWithHttpInfo(SearchSLOOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String query = parameters.query; Long pageSize = parameters.pageSize; @@ -1653,6 +1321,7 @@ public ApiResponse searchSLOWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/slo/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1661,36 +1330,19 @@ public ApiResponse searchSLOWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_facets", includeFacets)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.searchSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.searchSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search for SLOs. * - *

See {@link #searchSLOWithHttpInfo}. + * See {@link #searchSLOWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SearchSLOResponse>> */ - public CompletableFuture> searchSLOWithHttpInfoAsync( - SearchSLOOptionalParameters parameters) { + public CompletableFuture> searchSLOWithHttpInfoAsync(SearchSLOOptionalParameters parameters) { Object localVarPostBody = null; String query = parameters.query; Long pageSize = parameters.pageSize; @@ -1699,6 +1351,7 @@ public CompletableFuture> searchSLOWithHttpInfoAs // create path and map variables String localVarPath = "/api/v1/slo/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1709,72 +1362,54 @@ public CompletableFuture> searchSLOWithHttpInfoAs Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.searchSLO", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.searchSLO", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an SLO. - * - *

See {@link #updateSLOWithHttpInfo}. - * - * @param sloId The ID of the service level objective object. (required) - * @param body The edited service level objective request object. (required) - * @return SLOListResponse - * @throws ApiException if fails to make API call - */ - public SLOListResponse updateSLO(String sloId, ServiceLevelObjective body) throws ApiException { + * Update an SLO. + * + * See {@link #updateSLOWithHttpInfo}. + * + * @param sloId The ID of the service level objective object. (required) + * @param body The edited service level objective request object. (required) + * @return SLOListResponse + * @throws ApiException if fails to make API call + */ + public SLOListResponse updateSLO(String sloId, ServiceLevelObjective body) throws ApiException { return updateSLOWithHttpInfo(sloId, body).getData(); } /** - * Update an SLO. - * - *

See {@link #updateSLOWithHttpInfoAsync}. - * - * @param sloId The ID of the service level objective object. (required) - * @param body The edited service level objective request object. (required) - * @return CompletableFuture<SLOListResponse> - */ - public CompletableFuture updateSLOAsync( - String sloId, ServiceLevelObjective body) { - return updateSLOWithHttpInfoAsync(sloId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an SLO. + * + * See {@link #updateSLOWithHttpInfoAsync}. + * + * @param sloId The ID of the service level objective object. (required) + * @param body The edited service level objective request object. (required) + * @return CompletableFuture<SLOListResponse> + */ + public CompletableFutureupdateSLOAsync(String sloId, ServiceLevelObjective body) { + return updateSLOWithHttpInfoAsync(sloId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the specified service level objective object. + *

Update the specified service level objective object.

* * @param sloId The ID of the service level objective object. (required) * @param body The edited service level objective request object. (required) * @return ApiResponse<SLOListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1784,8 +1419,7 @@ public CompletableFuture updateSLOAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateSLOWithHttpInfo( - String sloId, ServiceLevelObjective body) throws ApiException { + public ApiResponse updateSLOWithHttpInfo(String sloId, ServiceLevelObjective body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'sloId' is set @@ -1798,91 +1432,58 @@ public ApiResponse updateSLOWithHttpInfo( throw new ApiException(400, "Missing the required parameter 'body' when calling updateSLO"); } // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.updateSLO", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.updateSLO", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an SLO. * - *

See {@link #updateSLOWithHttpInfo}. + * See {@link #updateSLOWithHttpInfo}. * * @param sloId The ID of the service level objective object. (required) * @param body The edited service level objective request object. (required) * @return CompletableFuture<ApiResponse<SLOListResponse>> */ - public CompletableFuture> updateSLOWithHttpInfoAsync( - String sloId, ServiceLevelObjective body) { + public CompletableFuture> updateSLOWithHttpInfoAsync(String sloId, ServiceLevelObjective body) { Object localVarPostBody = body; // verify the required parameter 'sloId' is set if (sloId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'sloId' when calling updateSLO")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'sloId' when calling updateSLO")); + 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 updateSLO")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateSLO")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/slo/{slo_id}" - .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + String localVarPath = "/api/v1/slo/{slo_id}" + .replaceAll("\\{" + "slo_id" + "\\}", apiClient.escapeString(sloId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.ServiceLevelObjectivesApi.updateSLO", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.ServiceLevelObjectivesApi.updateSLO", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/SlackIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/SlackIntegrationApi.java index a9957f7695d..2b621c85645 100644 --- a/src/main/java/com/datadog/api/client/v1/api/SlackIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/SlackIntegrationApi.java @@ -1,23 +1,30 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.SlackIntegrationChannel; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.SlackIntegrationChannel; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SlackIntegrationApi { private ApiClient apiClient; - public SlackIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,47 +52,44 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a Slack integration channel. - * - *

See {@link #createSlackIntegrationChannelWithHttpInfo}. - * - * @param accountName Your Slack account name. (required) - * @param body Payload describing Slack channel to be created (required) - * @return SlackIntegrationChannel - * @throws ApiException if fails to make API call - */ - public SlackIntegrationChannel createSlackIntegrationChannel( - String accountName, SlackIntegrationChannel body) throws ApiException { + * Create a Slack integration channel. + * + * See {@link #createSlackIntegrationChannelWithHttpInfo}. + * + * @param accountName Your Slack account name. (required) + * @param body Payload describing Slack channel to be created (required) + * @return SlackIntegrationChannel + * @throws ApiException if fails to make API call + */ + public SlackIntegrationChannel createSlackIntegrationChannel(String accountName, SlackIntegrationChannel body) throws ApiException { return createSlackIntegrationChannelWithHttpInfo(accountName, body).getData(); } /** - * Create a Slack integration channel. - * - *

See {@link #createSlackIntegrationChannelWithHttpInfoAsync}. - * - * @param accountName Your Slack account name. (required) - * @param body Payload describing Slack channel to be created (required) - * @return CompletableFuture<SlackIntegrationChannel> - */ - public CompletableFuture createSlackIntegrationChannelAsync( - String accountName, SlackIntegrationChannel body) { - return createSlackIntegrationChannelWithHttpInfoAsync(accountName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a Slack integration channel. + * + * See {@link #createSlackIntegrationChannelWithHttpInfoAsync}. + * + * @param accountName Your Slack account name. (required) + * @param body Payload describing Slack channel to be created (required) + * @return CompletableFuture<SlackIntegrationChannel> + */ + public CompletableFuturecreateSlackIntegrationChannelAsync(String accountName, SlackIntegrationChannel body) { + return createSlackIntegrationChannelWithHttpInfoAsync(accountName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Add a channel to your Datadog-Slack integration. + *

Add a channel to your Datadog-Slack integration.

* * @param accountName Your Slack account name. (required) * @param body Payload describing Slack channel to be created (required) * @return ApiResponse<SlackIntegrationChannel> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -95,162 +99,113 @@ public CompletableFuture createSlackIntegrationChannelA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createSlackIntegrationChannelWithHttpInfo( - String accountName, SlackIntegrationChannel body) throws ApiException { + public ApiResponse createSlackIntegrationChannelWithHttpInfo(String accountName, SlackIntegrationChannel body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountName' is set if (accountName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " createSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'accountName' when calling createSlackIntegrationChannel"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createSlackIntegrationChannel"); } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.createSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SlackIntegrationApi.createSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a Slack integration channel. * - *

See {@link #createSlackIntegrationChannelWithHttpInfo}. + * See {@link #createSlackIntegrationChannelWithHttpInfo}. * * @param accountName Your Slack account name. (required) * @param body Payload describing Slack channel to be created (required) * @return CompletableFuture<ApiResponse<SlackIntegrationChannel>> */ - public CompletableFuture> - createSlackIntegrationChannelWithHttpInfoAsync( - String accountName, SlackIntegrationChannel body) { + public CompletableFuture> createSlackIntegrationChannelWithHttpInfoAsync(String accountName, SlackIntegrationChannel body) { Object localVarPostBody = body; // verify the required parameter 'accountName' is set if (accountName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " createSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountName' when calling createSlackIntegrationChannel")); + 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 createSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSlackIntegrationChannel")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.createSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SlackIntegrationApi.createSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a Slack integration channel. - * - *

See {@link #getSlackIntegrationChannelWithHttpInfo}. - * - * @param accountName Your Slack account name. (required) - * @param channelName The name of the Slack channel being operated on. (required) - * @return SlackIntegrationChannel - * @throws ApiException if fails to make API call - */ - public SlackIntegrationChannel getSlackIntegrationChannel(String accountName, String channelName) - throws ApiException { + * Get a Slack integration channel. + * + * See {@link #getSlackIntegrationChannelWithHttpInfo}. + * + * @param accountName Your Slack account name. (required) + * @param channelName The name of the Slack channel being operated on. (required) + * @return SlackIntegrationChannel + * @throws ApiException if fails to make API call + */ + public SlackIntegrationChannel getSlackIntegrationChannel(String accountName, String channelName) throws ApiException { return getSlackIntegrationChannelWithHttpInfo(accountName, channelName).getData(); } /** - * Get a Slack integration channel. - * - *

See {@link #getSlackIntegrationChannelWithHttpInfoAsync}. - * - * @param accountName Your Slack account name. (required) - * @param channelName The name of the Slack channel being operated on. (required) - * @return CompletableFuture<SlackIntegrationChannel> - */ - public CompletableFuture getSlackIntegrationChannelAsync( - String accountName, String channelName) { - return getSlackIntegrationChannelWithHttpInfoAsync(accountName, channelName) - .thenApply( - response -> { - return response.getData(); - }); + * Get a Slack integration channel. + * + * See {@link #getSlackIntegrationChannelWithHttpInfoAsync}. + * + * @param accountName Your Slack account name. (required) + * @param channelName The name of the Slack channel being operated on. (required) + * @return CompletableFuture<SlackIntegrationChannel> + */ + public CompletableFuturegetSlackIntegrationChannelAsync(String accountName, String channelName) { + return getSlackIntegrationChannelWithHttpInfoAsync(accountName, channelName).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a channel configured for your Datadog-Slack integration. + *

Get a channel configured for your Datadog-Slack integration.

* * @param accountName Your Slack account name. (required) * @param channelName The name of the Slack channel being operated on. (required) * @return ApiResponse<SlackIntegrationChannel> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -260,163 +215,112 @@ public CompletableFuture getSlackIntegrationChannelAsyn * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSlackIntegrationChannelWithHttpInfo( - String accountName, String channelName) throws ApiException { + public ApiResponse getSlackIntegrationChannelWithHttpInfo(String accountName, String channelName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountName' is set if (accountName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountName' when calling getSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'accountName' when calling getSlackIntegrationChannel"); } // verify the required parameter 'channelName' is set if (channelName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'channelName' when calling getSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'channelName' when calling getSlackIntegrationChannel"); } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) - .replaceAll( - "\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) + .replaceAll("\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.getSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SlackIntegrationApi.getSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a Slack integration channel. * - *

See {@link #getSlackIntegrationChannelWithHttpInfo}. + * See {@link #getSlackIntegrationChannelWithHttpInfo}. * * @param accountName Your Slack account name. (required) * @param channelName The name of the Slack channel being operated on. (required) * @return CompletableFuture<ApiResponse<SlackIntegrationChannel>> */ - public CompletableFuture> - getSlackIntegrationChannelWithHttpInfoAsync(String accountName, String channelName) { + public CompletableFuture> getSlackIntegrationChannelWithHttpInfoAsync(String accountName, String channelName) { Object localVarPostBody = null; // verify the required parameter 'accountName' is set if (accountName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " getSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountName' when calling getSlackIntegrationChannel")); + return result; } // verify the required parameter 'channelName' is set if (channelName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'channelName' when calling" - + " getSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'channelName' when calling getSlackIntegrationChannel")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) - .replaceAll( - "\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) + .replaceAll("\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.getSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SlackIntegrationApi.getSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all channels in a Slack integration. - * - *

See {@link #getSlackIntegrationChannelsWithHttpInfo}. - * - * @param accountName Your Slack account name. (required) - * @return List<SlackIntegrationChannel> - * @throws ApiException if fails to make API call - */ - public List getSlackIntegrationChannels(String accountName) - throws ApiException { + * Get all channels in a Slack integration. + * + * See {@link #getSlackIntegrationChannelsWithHttpInfo}. + * + * @param accountName Your Slack account name. (required) + * @return List<SlackIntegrationChannel> + * @throws ApiException if fails to make API call + */ + public List getSlackIntegrationChannels(String accountName) throws ApiException { return getSlackIntegrationChannelsWithHttpInfo(accountName).getData(); } /** - * Get all channels in a Slack integration. - * - *

See {@link #getSlackIntegrationChannelsWithHttpInfoAsync}. - * - * @param accountName Your Slack account name. (required) - * @return CompletableFuture<List<SlackIntegrationChannel>> - */ - public CompletableFuture> getSlackIntegrationChannelsAsync( - String accountName) { - return getSlackIntegrationChannelsWithHttpInfoAsync(accountName) - .thenApply( - response -> { - return response.getData(); - }); + * Get all channels in a Slack integration. + * + * See {@link #getSlackIntegrationChannelsWithHttpInfoAsync}. + * + * @param accountName Your Slack account name. (required) + * @return CompletableFuture<List<SlackIntegrationChannel>> + */ + public CompletableFuture>getSlackIntegrationChannelsAsync(String accountName) { + return getSlackIntegrationChannelsWithHttpInfoAsync(accountName).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a list of all channels configured for your Datadog-Slack integration. + *

Get a list of all channels configured for your Datadog-Slack integration.

* * @param accountName Your Slack account name. (required) * @return ApiResponse<List<SlackIntegrationChannel>> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -426,144 +330,99 @@ public CompletableFuture> getSlackIntegrationChann * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse> getSlackIntegrationChannelsWithHttpInfo( - String accountName) throws ApiException { + public ApiResponse> getSlackIntegrationChannelsWithHttpInfo(String accountName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountName' is set if (accountName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountName' when calling getSlackIntegrationChannels"); + throw new ApiException(400, "Missing the required parameter 'accountName' when calling getSlackIntegrationChannels"); } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.getSlackIntegrationChannels", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SlackIntegrationApi.getSlackIntegrationChannels", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** * Get all channels in a Slack integration. * - *

See {@link #getSlackIntegrationChannelsWithHttpInfo}. + * See {@link #getSlackIntegrationChannelsWithHttpInfo}. * * @param accountName Your Slack account name. (required) * @return CompletableFuture<ApiResponse<List<SlackIntegrationChannel>>> */ - public CompletableFuture>> - getSlackIntegrationChannelsWithHttpInfoAsync(String accountName) { + public CompletableFuture>> getSlackIntegrationChannelsWithHttpInfoAsync(String accountName) { Object localVarPostBody = null; // verify the required parameter 'accountName' is set if (accountName == null) { - CompletableFuture>> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " getSlackIntegrationChannels")); - return result; + CompletableFuture>> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountName' when calling getSlackIntegrationChannels")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.getSlackIntegrationChannels", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SlackIntegrationApi.getSlackIntegrationChannels", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture>> result = - new CompletableFuture<>(); + CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType>() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType>() {}); } /** - * Remove a Slack integration channel. - * - *

See {@link #removeSlackIntegrationChannelWithHttpInfo}. - * - * @param accountName Your Slack account name. (required) - * @param channelName The name of the Slack channel being operated on. (required) - * @throws ApiException if fails to make API call - */ - public void removeSlackIntegrationChannel(String accountName, String channelName) - throws ApiException { + * Remove a Slack integration channel. + * + * See {@link #removeSlackIntegrationChannelWithHttpInfo}. + * + * @param accountName Your Slack account name. (required) + * @param channelName The name of the Slack channel being operated on. (required) + * @throws ApiException if fails to make API call + */ + public void removeSlackIntegrationChannel(String accountName, String channelName) throws ApiException { removeSlackIntegrationChannelWithHttpInfo(accountName, channelName); } /** - * Remove a Slack integration channel. - * - *

See {@link #removeSlackIntegrationChannelWithHttpInfoAsync}. - * - * @param accountName Your Slack account name. (required) - * @param channelName The name of the Slack channel being operated on. (required) - * @return CompletableFuture - */ - public CompletableFuture removeSlackIntegrationChannelAsync( - String accountName, String channelName) { - return removeSlackIntegrationChannelWithHttpInfoAsync(accountName, channelName) - .thenApply( - response -> { - return response.getData(); - }); + * Remove a Slack integration channel. + * + * See {@link #removeSlackIntegrationChannelWithHttpInfoAsync}. + * + * @param accountName Your Slack account name. (required) + * @param channelName The name of the Slack channel being operated on. (required) + * @return CompletableFuture + */ + public CompletableFutureremoveSlackIntegrationChannelAsync(String accountName, String channelName) { + return removeSlackIntegrationChannelWithHttpInfoAsync(accountName, channelName).thenApply(response -> { + return response.getData(); + }); } + /** - * Remove a channel from your Datadog-Slack integration. + *

Remove a channel from your Datadog-Slack integration.

* * @param accountName Your Slack account name. (required) * @param channelName The name of the Slack channel being operated on. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -573,163 +432,110 @@ public CompletableFuture removeSlackIntegrationChannelAsync( * *
Response details
Status Code Description Response Headers
204 The channel was removed successfully. -
429 Too many requests -
*/ - public ApiResponse removeSlackIntegrationChannelWithHttpInfo( - String accountName, String channelName) throws ApiException { + public ApiResponse removeSlackIntegrationChannelWithHttpInfo(String accountName, String channelName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountName' is set if (accountName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " removeSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'accountName' when calling removeSlackIntegrationChannel"); } // verify the required parameter 'channelName' is set if (channelName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'channelName' when calling" - + " removeSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'channelName' when calling removeSlackIntegrationChannel"); } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) - .replaceAll( - "\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) + .replaceAll("\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.removeSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.SlackIntegrationApi.removeSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Remove a Slack integration channel. * - *

See {@link #removeSlackIntegrationChannelWithHttpInfo}. + * See {@link #removeSlackIntegrationChannelWithHttpInfo}. * * @param accountName Your Slack account name. (required) * @param channelName The name of the Slack channel being operated on. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> removeSlackIntegrationChannelWithHttpInfoAsync( - String accountName, String channelName) { + public CompletableFuture> removeSlackIntegrationChannelWithHttpInfoAsync(String accountName, String channelName) { Object localVarPostBody = null; // verify the required parameter 'accountName' is set if (accountName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " removeSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountName' when calling removeSlackIntegrationChannel")); + return result; } // verify the required parameter 'channelName' is set if (channelName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'channelName' when calling" - + " removeSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'channelName' when calling removeSlackIntegrationChannel")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) - .replaceAll( - "\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) + .replaceAll("\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.removeSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SlackIntegrationApi.removeSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Update a Slack integration channel. - * - *

See {@link #updateSlackIntegrationChannelWithHttpInfo}. - * - * @param accountName Your Slack account name. (required) - * @param channelName The name of the Slack channel being operated on. (required) - * @param body Payload describing fields and values to be updated. (required) - * @return SlackIntegrationChannel - * @throws ApiException if fails to make API call - */ - public SlackIntegrationChannel updateSlackIntegrationChannel( - String accountName, String channelName, SlackIntegrationChannel body) throws ApiException { + * Update a Slack integration channel. + * + * See {@link #updateSlackIntegrationChannelWithHttpInfo}. + * + * @param accountName Your Slack account name. (required) + * @param channelName The name of the Slack channel being operated on. (required) + * @param body Payload describing fields and values to be updated. (required) + * @return SlackIntegrationChannel + * @throws ApiException if fails to make API call + */ + public SlackIntegrationChannel updateSlackIntegrationChannel(String accountName, String channelName, SlackIntegrationChannel body) throws ApiException { return updateSlackIntegrationChannelWithHttpInfo(accountName, channelName, body).getData(); } /** - * Update a Slack integration channel. - * - *

See {@link #updateSlackIntegrationChannelWithHttpInfoAsync}. - * - * @param accountName Your Slack account name. (required) - * @param channelName The name of the Slack channel being operated on. (required) - * @param body Payload describing fields and values to be updated. (required) - * @return CompletableFuture<SlackIntegrationChannel> - */ - public CompletableFuture updateSlackIntegrationChannelAsync( - String accountName, String channelName, SlackIntegrationChannel body) { - return updateSlackIntegrationChannelWithHttpInfoAsync(accountName, channelName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a Slack integration channel. + * + * See {@link #updateSlackIntegrationChannelWithHttpInfoAsync}. + * + * @param accountName Your Slack account name. (required) + * @param channelName The name of the Slack channel being operated on. (required) + * @param body Payload describing fields and values to be updated. (required) + * @return CompletableFuture<SlackIntegrationChannel> + */ + public CompletableFutureupdateSlackIntegrationChannelAsync(String accountName, String channelName, SlackIntegrationChannel body) { + return updateSlackIntegrationChannelWithHttpInfoAsync(accountName, channelName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a channel used in your Datadog-Slack integration. + *

Update a channel used in your Datadog-Slack integration.

* * @param accountName Your Slack account name. (required) * @param channelName The name of the Slack channel being operated on. (required) @@ -737,7 +543,7 @@ public CompletableFuture updateSlackIntegrationChannelA * @return ApiResponse<SlackIntegrationChannel> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -747,141 +553,86 @@ public CompletableFuture updateSlackIntegrationChannelA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateSlackIntegrationChannelWithHttpInfo( - String accountName, String channelName, SlackIntegrationChannel body) throws ApiException { + public ApiResponse updateSlackIntegrationChannelWithHttpInfo(String accountName, String channelName, SlackIntegrationChannel body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountName' is set if (accountName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " updateSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'accountName' when calling updateSlackIntegrationChannel"); } // verify the required parameter 'channelName' is set if (channelName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'channelName' when calling" - + " updateSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'channelName' when calling updateSlackIntegrationChannel"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateSlackIntegrationChannel"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateSlackIntegrationChannel"); } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) - .replaceAll( - "\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) + .replaceAll("\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.updateSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SlackIntegrationApi.updateSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a Slack integration channel. * - *

See {@link #updateSlackIntegrationChannelWithHttpInfo}. + * See {@link #updateSlackIntegrationChannelWithHttpInfo}. * * @param accountName Your Slack account name. (required) * @param channelName The name of the Slack channel being operated on. (required) * @param body Payload describing fields and values to be updated. (required) * @return CompletableFuture<ApiResponse<SlackIntegrationChannel>> */ - public CompletableFuture> - updateSlackIntegrationChannelWithHttpInfoAsync( - String accountName, String channelName, SlackIntegrationChannel body) { + public CompletableFuture> updateSlackIntegrationChannelWithHttpInfoAsync(String accountName, String channelName, SlackIntegrationChannel body) { Object localVarPostBody = body; // verify the required parameter 'accountName' is set if (accountName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountName' when calling" - + " updateSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountName' when calling updateSlackIntegrationChannel")); + return result; } // verify the required parameter 'channelName' is set if (channelName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'channelName' when calling" - + " updateSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'channelName' when calling updateSlackIntegrationChannel")); + 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 updateSlackIntegrationChannel")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateSlackIntegrationChannel")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" - .replaceAll( - "\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) - .replaceAll( - "\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + String localVarPath = "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}" + .replaceAll("\\{" + "account_name" + "\\}", apiClient.escapeString(accountName.toString())) + .replaceAll("\\{" + "channel_name" + "\\}", apiClient.escapeString(channelName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SlackIntegrationApi.updateSlackIntegrationChannel", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SlackIntegrationApi.updateSlackIntegrationChannel", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/SnapshotsApi.java b/src/main/java/com/datadog/api/client/v1/api/SnapshotsApi.java index 2448e8775df..79fb9ec6fa1 100644 --- a/src/main/java/com/datadog/api/client/v1/api/SnapshotsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/SnapshotsApi.java @@ -1,23 +1,30 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.GraphSnapshot; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.GraphSnapshot; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SnapshotsApi { private ApiClient apiClient; - public SnapshotsApi() { this(ApiClient.getDefaultApiClient()); } @@ -44,7 +51,9 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to getGraphSnapshot. */ + /** + * Manage optional parameters to getGraphSnapshot. + */ public static class GetGraphSnapshotOptionalParameters { private String metricQuery; private String eventQuery; @@ -55,7 +64,6 @@ public static class GetGraphSnapshotOptionalParameters { /** * Set metricQuery. - * * @param metricQuery The metric query. (optional) * @return GetGraphSnapshotOptionalParameters */ @@ -66,7 +74,6 @@ public GetGraphSnapshotOptionalParameters metricQuery(String metricQuery) { /** * Set eventQuery. - * * @param eventQuery A query that adds event bands to the graph. (optional) * @return GetGraphSnapshotOptionalParameters */ @@ -77,11 +84,7 @@ public GetGraphSnapshotOptionalParameters eventQuery(String eventQuery) { /** * Set graphDef. - * - * @param graphDef A JSON document defining the graph. graph_def can be used - * instead of metric_query. The JSON document uses the grammar defined - * here and should be formatted to a single line then URL encoded. (optional) + * @param graphDef A JSON document defining the graph. graph_def can be used instead of metric_query. The JSON document uses the grammar defined here and should be formatted to a single line then URL encoded. (optional) * @return GetGraphSnapshotOptionalParameters */ public GetGraphSnapshotOptionalParameters graphDef(String graphDef) { @@ -91,9 +94,7 @@ public GetGraphSnapshotOptionalParameters graphDef(String graphDef) { /** * Set title. - * - * @param title A title for the graph. If no title is specified, the graph does not have a - * title. (optional) + * @param title A title for the graph. If no title is specified, the graph does not have a title. (optional) * @return GetGraphSnapshotOptionalParameters */ public GetGraphSnapshotOptionalParameters title(String title) { @@ -103,9 +104,7 @@ public GetGraphSnapshotOptionalParameters title(String title) { /** * Set height. - * - * @param height The height of the graph. If no height is specified, the graph's original height - * is used. (optional) + * @param height The height of the graph. If no height is specified, the graph's original height is used. (optional) * @return GetGraphSnapshotOptionalParameters */ public GetGraphSnapshotOptionalParameters height(Long height) { @@ -115,9 +114,7 @@ public GetGraphSnapshotOptionalParameters height(Long height) { /** * Set width. - * - * @param width The width of the graph. If no width is specified, the graph's original width is - * used. (optional) + * @param width The width of the graph. If no width is specified, the graph's original width is used. (optional) * @return GetGraphSnapshotOptionalParameters */ public GetGraphSnapshotOptionalParameters width(Long width) { @@ -127,75 +124,69 @@ public GetGraphSnapshotOptionalParameters width(Long width) { } /** - * Take graph snapshots. - * - *

See {@link #getGraphSnapshotWithHttpInfo}. - * - * @param start The POSIX timestamp of the start of the query. (required) - * @param end The POSIX timestamp of the end of the query. (required) - * @return GraphSnapshot - * @throws ApiException if fails to make API call - */ - public GraphSnapshot getGraphSnapshot(Long start, Long end) throws ApiException { - return getGraphSnapshotWithHttpInfo(start, end, new GetGraphSnapshotOptionalParameters()) - .getData(); + * Take graph snapshots. + * + * See {@link #getGraphSnapshotWithHttpInfo}. + * + * @param start The POSIX timestamp of the start of the query. (required) + * @param end The POSIX timestamp of the end of the query. (required) + * @return GraphSnapshot + * @throws ApiException if fails to make API call + */ + public GraphSnapshot getGraphSnapshot (Long start, Long end) throws ApiException { + return getGraphSnapshotWithHttpInfo( start, end, new GetGraphSnapshotOptionalParameters()).getData(); } /** - * Take graph snapshots. - * - *

See {@link #getGraphSnapshotWithHttpInfoAsync}. - * - * @param start The POSIX timestamp of the start of the query. (required) - * @param end The POSIX timestamp of the end of the query. (required) - * @return CompletableFuture<GraphSnapshot> - */ - public CompletableFuture getGraphSnapshotAsync(Long start, Long end) { - return getGraphSnapshotWithHttpInfoAsync(start, end, new GetGraphSnapshotOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Take graph snapshots. + * + * See {@link #getGraphSnapshotWithHttpInfoAsync}. + * + * @param start The POSIX timestamp of the start of the query. (required) + * @param end The POSIX timestamp of the end of the query. (required) + * @return CompletableFuture<GraphSnapshot> + */ + public CompletableFuturegetGraphSnapshotAsync(Long start, Long end) { + return getGraphSnapshotWithHttpInfoAsync(start, end, new GetGraphSnapshotOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Take graph snapshots. - * - *

See {@link #getGraphSnapshotWithHttpInfo}. - * - * @param start The POSIX timestamp of the start of the query. (required) - * @param end The POSIX timestamp of the end of the query. (required) - * @param parameters Optional parameters for the request. - * @return GraphSnapshot - * @throws ApiException if fails to make API call - */ - public GraphSnapshot getGraphSnapshot( - Long start, Long end, GetGraphSnapshotOptionalParameters parameters) throws ApiException { + * Take graph snapshots. + * + * See {@link #getGraphSnapshotWithHttpInfo}. + * + * @param start The POSIX timestamp of the start of the query. (required) + * @param end The POSIX timestamp of the end of the query. (required) + * @param parameters Optional parameters for the request. + * @return GraphSnapshot + * @throws ApiException if fails to make API call + */ + public GraphSnapshot getGraphSnapshot(Long start, Long end, GetGraphSnapshotOptionalParameters parameters) throws ApiException { return getGraphSnapshotWithHttpInfo(start, end, parameters).getData(); } /** - * Take graph snapshots. - * - *

See {@link #getGraphSnapshotWithHttpInfoAsync}. - * - * @param start The POSIX timestamp of the start of the query. (required) - * @param end The POSIX timestamp of the end of the query. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<GraphSnapshot> - */ - public CompletableFuture getGraphSnapshotAsync( - Long start, Long end, GetGraphSnapshotOptionalParameters parameters) { - return getGraphSnapshotWithHttpInfoAsync(start, end, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Take graph snapshots. + * + * See {@link #getGraphSnapshotWithHttpInfoAsync}. + * + * @param start The POSIX timestamp of the start of the query. (required) + * @param end The POSIX timestamp of the end of the query. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GraphSnapshot> + */ + public CompletableFuturegetGraphSnapshotAsync( Long start, Long end, GetGraphSnapshotOptionalParameters parameters) { + return getGraphSnapshotWithHttpInfoAsync(start, end, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Take graph snapshots. Note: When a snapshot is created, there is some delay - * before it is available. + *

Take graph snapshots. + * Note: When a snapshot is created, there is some delay before it is available.

* * @param start The POSIX timestamp of the start of the query. (required) * @param end The POSIX timestamp of the end of the query. (required) @@ -203,7 +194,7 @@ public CompletableFuture getGraphSnapshotAsync( * @return ApiResponse<GraphSnapshot> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -212,20 +203,17 @@ public CompletableFuture getGraphSnapshotAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getGraphSnapshotWithHttpInfo( - Long start, Long end, GetGraphSnapshotOptionalParameters parameters) throws ApiException { + public ApiResponse getGraphSnapshotWithHttpInfo(Long start, Long end, GetGraphSnapshotOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'start' is set if (start == null) { - throw new ApiException( - 400, "Missing the required parameter 'start' when calling getGraphSnapshot"); + throw new ApiException(400, "Missing the required parameter 'start' when calling getGraphSnapshot"); } // verify the required parameter 'end' is set if (end == null) { - throw new ApiException( - 400, "Missing the required parameter 'end' when calling getGraphSnapshot"); + throw new ApiException(400, "Missing the required parameter 'end' when calling getGraphSnapshot"); } String metricQuery = parameters.metricQuery; String eventQuery = parameters.eventQuery; @@ -236,6 +224,7 @@ public ApiResponse getGraphSnapshotWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/graph/snapshot"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -248,56 +237,35 @@ public ApiResponse getGraphSnapshotWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "height", height)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "width", width)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SnapshotsApi.getGraphSnapshot", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.SnapshotsApi.getGraphSnapshot", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Take graph snapshots. * - *

See {@link #getGraphSnapshotWithHttpInfo}. + * See {@link #getGraphSnapshotWithHttpInfo}. * * @param start The POSIX timestamp of the start of the query. (required) * @param end The POSIX timestamp of the end of the query. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<GraphSnapshot>> */ - public CompletableFuture> getGraphSnapshotWithHttpInfoAsync( - Long start, Long end, GetGraphSnapshotOptionalParameters parameters) { + public CompletableFuture> getGraphSnapshotWithHttpInfoAsync(Long start, Long end, GetGraphSnapshotOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'start' is set if (start == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'start' when calling getGraphSnapshot")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'start' when calling getGraphSnapshot")); + return result; } // verify the required parameter 'end' is set if (end == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'end' when calling getGraphSnapshot")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'end' when calling getGraphSnapshot")); + return result; } String metricQuery = parameters.metricQuery; String eventQuery = parameters.eventQuery; @@ -308,6 +276,7 @@ public CompletableFuture> getGraphSnapshotWithHttpInf // create path and map variables String localVarPath = "/api/v1/graph/snapshot"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -322,28 +291,12 @@ public CompletableFuture> getGraphSnapshotWithHttpInf Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SnapshotsApi.getGraphSnapshot", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SnapshotsApi.getGraphSnapshot", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/SyntheticsApi.java b/src/main/java/com/datadog/api/client/v1/api/SyntheticsApi.java index 306a337cf64..6dce5d14a67 100644 --- a/src/main/java/com/datadog/api/client/v1/api/SyntheticsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/SyntheticsApi.java @@ -1,42 +1,49 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.SyntheticsAPITest; -import com.datadog.api.client.v1.model.SyntheticsAPITestResultFull; -import com.datadog.api.client.v1.model.SyntheticsBatchDetails; -import com.datadog.api.client.v1.model.SyntheticsBrowserTest; -import com.datadog.api.client.v1.model.SyntheticsBrowserTestResultFull; -import com.datadog.api.client.v1.model.SyntheticsCITestBody; -import com.datadog.api.client.v1.model.SyntheticsDeleteTestsPayload; -import com.datadog.api.client.v1.model.SyntheticsDeleteTestsResponse; -import com.datadog.api.client.v1.model.SyntheticsGetAPITestLatestResultsResponse; -import com.datadog.api.client.v1.model.SyntheticsGetBrowserTestLatestResultsResponse; -import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; -import com.datadog.api.client.v1.model.SyntheticsListGlobalVariablesResponse; -import com.datadog.api.client.v1.model.SyntheticsListTestsResponse; -import com.datadog.api.client.v1.model.SyntheticsLocations; -import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; -import com.datadog.api.client.v1.model.SyntheticsPrivateLocationCreationResponse; -import com.datadog.api.client.v1.model.SyntheticsTestDetails; -import com.datadog.api.client.v1.model.SyntheticsTriggerBody; -import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse; -import com.datadog.api.client.v1.model.SyntheticsUpdateTestPauseStatusPayload; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.SyntheticsBatchDetails; +import com.datadog.api.client.v1.model.SyntheticsLocations; +import com.datadog.api.client.v1.model.SyntheticsPrivateLocationCreationResponse; +import com.datadog.api.client.v1.model.SyntheticsPrivateLocation; +import com.datadog.api.client.v1.model.SyntheticsListTestsResponse; +import com.datadog.api.client.v1.model.SyntheticsAPITest; +import com.datadog.api.client.v1.model.SyntheticsBrowserTest; +import com.datadog.api.client.v1.model.SyntheticsGetBrowserTestLatestResultsResponse; +import com.datadog.api.client.v1.model.SyntheticsBrowserTestResultFull; +import com.datadog.api.client.v1.model.SyntheticsDeleteTestsResponse; +import com.datadog.api.client.v1.model.SyntheticsDeleteTestsPayload; +import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse; +import com.datadog.api.client.v1.model.SyntheticsTriggerBody; +import com.datadog.api.client.v1.model.SyntheticsCITestBody; +import com.datadog.api.client.v1.model.SyntheticsTestDetails; +import com.datadog.api.client.v1.model.SyntheticsGetAPITestLatestResultsResponse; +import com.datadog.api.client.v1.model.SyntheticsAPITestResultFull; +import com.datadog.api.client.v1.model.SyntheticsUpdateTestPauseStatusPayload; +import com.datadog.api.client.v1.model.SyntheticsListGlobalVariablesResponse; +import com.datadog.api.client.v1.model.SyntheticsGlobalVariable; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsApi { private ApiClient apiClient; - public SyntheticsApi() { this(ApiClient.getDefaultApiClient()); } @@ -64,44 +71,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a global variable. - * - *

See {@link #createGlobalVariableWithHttpInfo}. - * - * @param body Details of the global variable to create. (required) - * @return SyntheticsGlobalVariable - * @throws ApiException if fails to make API call - */ - public SyntheticsGlobalVariable createGlobalVariable(SyntheticsGlobalVariable body) - throws ApiException { + * Create a global variable. + * + * See {@link #createGlobalVariableWithHttpInfo}. + * + * @param body Details of the global variable to create. (required) + * @return SyntheticsGlobalVariable + * @throws ApiException if fails to make API call + */ + public SyntheticsGlobalVariable createGlobalVariable(SyntheticsGlobalVariable body) throws ApiException { return createGlobalVariableWithHttpInfo(body).getData(); } /** - * Create a global variable. - * - *

See {@link #createGlobalVariableWithHttpInfoAsync}. - * - * @param body Details of the global variable to create. (required) - * @return CompletableFuture<SyntheticsGlobalVariable> - */ - public CompletableFuture createGlobalVariableAsync( - SyntheticsGlobalVariable body) { - return createGlobalVariableWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a global variable. + * + * See {@link #createGlobalVariableWithHttpInfoAsync}. + * + * @param body Details of the global variable to create. (required) + * @return CompletableFuture<SyntheticsGlobalVariable> + */ + public CompletableFuturecreateGlobalVariableAsync(SyntheticsGlobalVariable body) { + return createGlobalVariableWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Synthetics global variable. + *

Create a Synthetics global variable.

* * @param body Details of the global variable to create. (required) * @return ApiResponse<SyntheticsGlobalVariable> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -110,131 +114,95 @@ public CompletableFuture createGlobalVariableAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createGlobalVariableWithHttpInfo( - SyntheticsGlobalVariable body) throws ApiException { + public ApiResponse createGlobalVariableWithHttpInfo(SyntheticsGlobalVariable body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createGlobalVariable"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createGlobalVariable"); } // create path and map variables String localVarPath = "/api/v1/synthetics/variables"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.createGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a global variable. * - *

See {@link #createGlobalVariableWithHttpInfo}. + * See {@link #createGlobalVariableWithHttpInfo}. * * @param body Details of the global variable to create. (required) * @return CompletableFuture<ApiResponse<SyntheticsGlobalVariable>> */ - public CompletableFuture> - createGlobalVariableWithHttpInfoAsync(SyntheticsGlobalVariable body) { + public CompletableFuture> createGlobalVariableWithHttpInfoAsync(SyntheticsGlobalVariable body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createGlobalVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createGlobalVariable")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/variables"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.createGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a private location. - * - *

See {@link #createPrivateLocationWithHttpInfo}. - * - * @param body Details of the private location to create. (required) - * @return SyntheticsPrivateLocationCreationResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsPrivateLocationCreationResponse createPrivateLocation( - SyntheticsPrivateLocation body) throws ApiException { + * Create a private location. + * + * See {@link #createPrivateLocationWithHttpInfo}. + * + * @param body Details of the private location to create. (required) + * @return SyntheticsPrivateLocationCreationResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsPrivateLocationCreationResponse createPrivateLocation(SyntheticsPrivateLocation body) throws ApiException { return createPrivateLocationWithHttpInfo(body).getData(); } /** - * Create a private location. - * - *

See {@link #createPrivateLocationWithHttpInfoAsync}. - * - * @param body Details of the private location to create. (required) - * @return CompletableFuture<SyntheticsPrivateLocationCreationResponse> - */ - public CompletableFuture createPrivateLocationAsync( - SyntheticsPrivateLocation body) { - return createPrivateLocationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a private location. + * + * See {@link #createPrivateLocationWithHttpInfoAsync}. + * + * @param body Details of the private location to create. (required) + * @return CompletableFuture<SyntheticsPrivateLocationCreationResponse> + */ + public CompletableFuturecreatePrivateLocationAsync(SyntheticsPrivateLocation body) { + return createPrivateLocationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a new Synthetics private location. + *

Create a new Synthetics private location.

* * @param body Details of the private location to create. (required) * @return ApiResponse<SyntheticsPrivateLocationCreationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -243,131 +211,95 @@ public CompletableFuture createPrivat * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createPrivateLocationWithHttpInfo( - SyntheticsPrivateLocation body) throws ApiException { + public ApiResponse createPrivateLocationWithHttpInfo(SyntheticsPrivateLocation body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createPrivateLocation"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createPrivateLocation"); } // create path and map variables String localVarPath = "/api/v1/synthetics/private-locations"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createPrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.createPrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a private location. * - *

See {@link #createPrivateLocationWithHttpInfo}. + * See {@link #createPrivateLocationWithHttpInfo}. * * @param body Details of the private location to create. (required) * @return CompletableFuture<ApiResponse<SyntheticsPrivateLocationCreationResponse>> */ - public CompletableFuture> - createPrivateLocationWithHttpInfoAsync(SyntheticsPrivateLocation body) { + public CompletableFuture> createPrivateLocationWithHttpInfoAsync(SyntheticsPrivateLocation body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createPrivateLocation")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createPrivateLocation")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/private-locations"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createPrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.createPrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create an API test. - * - *

See {@link #createSyntheticsAPITestWithHttpInfo}. - * - * @param body Details of the test to create. (required) - * @return SyntheticsAPITest - * @throws ApiException if fails to make API call - */ - public SyntheticsAPITest createSyntheticsAPITest(SyntheticsAPITest body) throws ApiException { + * Create an API test. + * + * See {@link #createSyntheticsAPITestWithHttpInfo}. + * + * @param body Details of the test to create. (required) + * @return SyntheticsAPITest + * @throws ApiException if fails to make API call + */ + public SyntheticsAPITest createSyntheticsAPITest(SyntheticsAPITest body) throws ApiException { return createSyntheticsAPITestWithHttpInfo(body).getData(); } /** - * Create an API test. - * - *

See {@link #createSyntheticsAPITestWithHttpInfoAsync}. - * - * @param body Details of the test to create. (required) - * @return CompletableFuture<SyntheticsAPITest> - */ - public CompletableFuture createSyntheticsAPITestAsync(SyntheticsAPITest body) { - return createSyntheticsAPITestWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an API test. + * + * See {@link #createSyntheticsAPITestWithHttpInfoAsync}. + * + * @param body Details of the test to create. (required) + * @return CompletableFuture<SyntheticsAPITest> + */ + public CompletableFuturecreateSyntheticsAPITestAsync(SyntheticsAPITest body) { + return createSyntheticsAPITestWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Synthetic API test. + *

Create a Synthetic API test.

* * @param body Details of the test to create. (required) * @return ApiResponse<SyntheticsAPITest> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -377,131 +309,95 @@ public CompletableFuture createSyntheticsAPITestAsync(Synthet * *
Response details
Status Code Description Response Headers
200 OK - Returns the created test details. -
429 Too many requests -
*/ - public ApiResponse createSyntheticsAPITestWithHttpInfo(SyntheticsAPITest body) - throws ApiException { + public ApiResponse createSyntheticsAPITestWithHttpInfo(SyntheticsAPITest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSyntheticsAPITest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createSyntheticsAPITest"); } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/api"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createSyntheticsAPITest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.createSyntheticsAPITest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an API test. * - *

See {@link #createSyntheticsAPITestWithHttpInfo}. + * See {@link #createSyntheticsAPITestWithHttpInfo}. * * @param body Details of the test to create. (required) * @return CompletableFuture<ApiResponse<SyntheticsAPITest>> */ - public CompletableFuture> createSyntheticsAPITestWithHttpInfoAsync( - SyntheticsAPITest body) { + public CompletableFuture> createSyntheticsAPITestWithHttpInfoAsync(SyntheticsAPITest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createSyntheticsAPITest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSyntheticsAPITest")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/api"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createSyntheticsAPITest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.createSyntheticsAPITest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a browser test. - * - *

See {@link #createSyntheticsBrowserTestWithHttpInfo}. - * - * @param body Details of the test to create. (required) - * @return SyntheticsBrowserTest - * @throws ApiException if fails to make API call - */ - public SyntheticsBrowserTest createSyntheticsBrowserTest(SyntheticsBrowserTest body) - throws ApiException { + * Create a browser test. + * + * See {@link #createSyntheticsBrowserTestWithHttpInfo}. + * + * @param body Details of the test to create. (required) + * @return SyntheticsBrowserTest + * @throws ApiException if fails to make API call + */ + public SyntheticsBrowserTest createSyntheticsBrowserTest(SyntheticsBrowserTest body) throws ApiException { return createSyntheticsBrowserTestWithHttpInfo(body).getData(); } /** - * Create a browser test. - * - *

See {@link #createSyntheticsBrowserTestWithHttpInfoAsync}. - * - * @param body Details of the test to create. (required) - * @return CompletableFuture<SyntheticsBrowserTest> - */ - public CompletableFuture createSyntheticsBrowserTestAsync( - SyntheticsBrowserTest body) { - return createSyntheticsBrowserTestWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a browser test. + * + * See {@link #createSyntheticsBrowserTestWithHttpInfoAsync}. + * + * @param body Details of the test to create. (required) + * @return CompletableFuture<SyntheticsBrowserTest> + */ + public CompletableFuturecreateSyntheticsBrowserTestAsync(SyntheticsBrowserTest body) { + return createSyntheticsBrowserTestWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Synthetic browser test. + *

Create a Synthetic browser test.

* * @param body Details of the test to create. (required) * @return ApiResponse<SyntheticsBrowserTest> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -511,129 +407,94 @@ public CompletableFuture createSyntheticsBrowserTestAsync * *
Response details
Status Code Description Response Headers
200 OK - Returns the created test details. -
429 Too many requests -
*/ - public ApiResponse createSyntheticsBrowserTestWithHttpInfo( - SyntheticsBrowserTest body) throws ApiException { + public ApiResponse createSyntheticsBrowserTestWithHttpInfo(SyntheticsBrowserTest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSyntheticsBrowserTest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createSyntheticsBrowserTest"); } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/browser"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createSyntheticsBrowserTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.createSyntheticsBrowserTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a browser test. * - *

See {@link #createSyntheticsBrowserTestWithHttpInfo}. + * See {@link #createSyntheticsBrowserTestWithHttpInfo}. * * @param body Details of the test to create. (required) * @return CompletableFuture<ApiResponse<SyntheticsBrowserTest>> */ - public CompletableFuture> - createSyntheticsBrowserTestWithHttpInfoAsync(SyntheticsBrowserTest body) { + public CompletableFuture> createSyntheticsBrowserTestWithHttpInfoAsync(SyntheticsBrowserTest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling createSyntheticsBrowserTest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSyntheticsBrowserTest")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/browser"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.createSyntheticsBrowserTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.createSyntheticsBrowserTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a global variable. - * - *

See {@link #deleteGlobalVariableWithHttpInfo}. - * - * @param variableId The ID of the global variable. (required) - * @throws ApiException if fails to make API call - */ - public void deleteGlobalVariable(String variableId) throws ApiException { + * Delete a global variable. + * + * See {@link #deleteGlobalVariableWithHttpInfo}. + * + * @param variableId The ID of the global variable. (required) + * @throws ApiException if fails to make API call + */ + public void deleteGlobalVariable(String variableId) throws ApiException { deleteGlobalVariableWithHttpInfo(variableId); } /** - * Delete a global variable. - * - *

See {@link #deleteGlobalVariableWithHttpInfoAsync}. - * - * @param variableId The ID of the global variable. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteGlobalVariableAsync(String variableId) { - return deleteGlobalVariableWithHttpInfoAsync(variableId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a global variable. + * + * See {@link #deleteGlobalVariableWithHttpInfoAsync}. + * + * @param variableId The ID of the global variable. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteGlobalVariableAsync(String variableId) { + return deleteGlobalVariableWithHttpInfoAsync(variableId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Synthetics global variable. + *

Delete a Synthetics global variable.

* * @param variableId The ID of the global variable. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -648,129 +509,91 @@ public ApiResponse deleteGlobalVariableWithHttpInfo(String variableId) thr // verify the required parameter 'variableId' is set if (variableId == null) { - throw new ApiException( - 400, "Missing the required parameter 'variableId' when calling deleteGlobalVariable"); + throw new ApiException(400, "Missing the required parameter 'variableId' when calling deleteGlobalVariable"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/variables/{variable_id}" - .replaceAll( - "\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + String localVarPath = "/api/v1/synthetics/variables/{variable_id}" + .replaceAll("\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.deleteGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.deleteGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a global variable. * - *

See {@link #deleteGlobalVariableWithHttpInfo}. + * See {@link #deleteGlobalVariableWithHttpInfo}. * * @param variableId The ID of the global variable. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteGlobalVariableWithHttpInfoAsync( - String variableId) { + public CompletableFuture> deleteGlobalVariableWithHttpInfoAsync(String variableId) { Object localVarPostBody = null; // verify the required parameter 'variableId' is set if (variableId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'variableId' when calling deleteGlobalVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'variableId' when calling deleteGlobalVariable")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/variables/{variable_id}" - .replaceAll( - "\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + String localVarPath = "/api/v1/synthetics/variables/{variable_id}" + .replaceAll("\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.deleteGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.deleteGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete a private location. - * - *

See {@link #deletePrivateLocationWithHttpInfo}. - * - * @param locationId The ID of the private location. (required) - * @throws ApiException if fails to make API call - */ - public void deletePrivateLocation(String locationId) throws ApiException { + * Delete a private location. + * + * See {@link #deletePrivateLocationWithHttpInfo}. + * + * @param locationId The ID of the private location. (required) + * @throws ApiException if fails to make API call + */ + public void deletePrivateLocation(String locationId) throws ApiException { deletePrivateLocationWithHttpInfo(locationId); } /** - * Delete a private location. - * - *

See {@link #deletePrivateLocationWithHttpInfoAsync}. - * - * @param locationId The ID of the private location. (required) - * @return CompletableFuture - */ - public CompletableFuture deletePrivateLocationAsync(String locationId) { - return deletePrivateLocationWithHttpInfoAsync(locationId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a private location. + * + * See {@link #deletePrivateLocationWithHttpInfoAsync}. + * + * @param locationId The ID of the private location. (required) + * @return CompletableFuture + */ + public CompletableFuturedeletePrivateLocationAsync(String locationId) { + return deletePrivateLocationWithHttpInfoAsync(locationId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Synthetics private location. + *

Delete a Synthetics private location.

* * @param locationId The ID of the private location. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -778,138 +601,97 @@ public CompletableFuture deletePrivateLocationAsync(String locationId) { * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deletePrivateLocationWithHttpInfo(String locationId) - throws ApiException { + public ApiResponse deletePrivateLocationWithHttpInfo(String locationId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'locationId' is set if (locationId == null) { - throw new ApiException( - 400, "Missing the required parameter 'locationId' when calling deletePrivateLocation"); + throw new ApiException(400, "Missing the required parameter 'locationId' when calling deletePrivateLocation"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/private-locations/{location_id}" - .replaceAll( - "\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + String localVarPath = "/api/v1/synthetics/private-locations/{location_id}" + .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.deletePrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.deletePrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a private location. * - *

See {@link #deletePrivateLocationWithHttpInfo}. + * See {@link #deletePrivateLocationWithHttpInfo}. * * @param locationId The ID of the private location. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deletePrivateLocationWithHttpInfoAsync( - String locationId) { + public CompletableFuture> deletePrivateLocationWithHttpInfoAsync(String locationId) { Object localVarPostBody = null; // verify the required parameter 'locationId' is set if (locationId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'locationId' when calling deletePrivateLocation")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'locationId' when calling deletePrivateLocation")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/private-locations/{location_id}" - .replaceAll( - "\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + String localVarPath = "/api/v1/synthetics/private-locations/{location_id}" + .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.deletePrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.deletePrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete tests. - * - *

See {@link #deleteTestsWithHttpInfo}. - * - * @param body Public ID list of the Synthetic tests to be deleted. (required) - * @return SyntheticsDeleteTestsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsDeleteTestsResponse deleteTests(SyntheticsDeleteTestsPayload body) - throws ApiException { + * Delete tests. + * + * See {@link #deleteTestsWithHttpInfo}. + * + * @param body Public ID list of the Synthetic tests to be deleted. (required) + * @return SyntheticsDeleteTestsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsDeleteTestsResponse deleteTests(SyntheticsDeleteTestsPayload body) throws ApiException { return deleteTestsWithHttpInfo(body).getData(); } /** - * Delete tests. - * - *

See {@link #deleteTestsWithHttpInfoAsync}. - * - * @param body Public ID list of the Synthetic tests to be deleted. (required) - * @return CompletableFuture<SyntheticsDeleteTestsResponse> - */ - public CompletableFuture deleteTestsAsync( - SyntheticsDeleteTestsPayload body) { - return deleteTestsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete tests. + * + * See {@link #deleteTestsWithHttpInfoAsync}. + * + * @param body Public ID list of the Synthetic tests to be deleted. (required) + * @return CompletableFuture<SyntheticsDeleteTestsResponse> + */ + public CompletableFuturedeleteTestsAsync(SyntheticsDeleteTestsPayload body) { + return deleteTestsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete multiple Synthetic tests by ID. + *

Delete multiple Synthetic tests by ID.

* * @param body Public ID list of the Synthetic tests to be deleted. (required) * @return ApiResponse<SyntheticsDeleteTestsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -919,8 +701,7 @@ public CompletableFuture deleteTestsAsync( * *
Response details
Status Code Description Response Headers
200 OK. -
429 Too many requests -
*/ - public ApiResponse deleteTestsWithHttpInfo( - SyntheticsDeleteTestsPayload body) throws ApiException { + public ApiResponse deleteTestsWithHttpInfo(SyntheticsDeleteTestsPayload body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -930,123 +711,88 @@ public ApiResponse deleteTestsWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/synthetics/tests/delete"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.deleteTests", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.deleteTests", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete tests. * - *

See {@link #deleteTestsWithHttpInfo}. + * See {@link #deleteTestsWithHttpInfo}. * * @param body Public ID list of the Synthetic tests to be deleted. (required) * @return CompletableFuture<ApiResponse<SyntheticsDeleteTestsResponse>> */ - public CompletableFuture> deleteTestsWithHttpInfoAsync( - SyntheticsDeleteTestsPayload body) { + public CompletableFuture> deleteTestsWithHttpInfoAsync(SyntheticsDeleteTestsPayload body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling deleteTests")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteTests")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/delete"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.deleteTests", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.deleteTests", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit a global variable. - * - *

See {@link #editGlobalVariableWithHttpInfo}. - * - * @param variableId The ID of the global variable. (required) - * @param body Details of the global variable to update. (required) - * @return SyntheticsGlobalVariable - * @throws ApiException if fails to make API call - */ - public SyntheticsGlobalVariable editGlobalVariable( - String variableId, SyntheticsGlobalVariable body) throws ApiException { + * Edit a global variable. + * + * See {@link #editGlobalVariableWithHttpInfo}. + * + * @param variableId The ID of the global variable. (required) + * @param body Details of the global variable to update. (required) + * @return SyntheticsGlobalVariable + * @throws ApiException if fails to make API call + */ + public SyntheticsGlobalVariable editGlobalVariable(String variableId, SyntheticsGlobalVariable body) throws ApiException { return editGlobalVariableWithHttpInfo(variableId, body).getData(); } /** - * Edit a global variable. - * - *

See {@link #editGlobalVariableWithHttpInfoAsync}. - * - * @param variableId The ID of the global variable. (required) - * @param body Details of the global variable to update. (required) - * @return CompletableFuture<SyntheticsGlobalVariable> - */ - public CompletableFuture editGlobalVariableAsync( - String variableId, SyntheticsGlobalVariable body) { - return editGlobalVariableWithHttpInfoAsync(variableId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit a global variable. + * + * See {@link #editGlobalVariableWithHttpInfoAsync}. + * + * @param variableId The ID of the global variable. (required) + * @param body Details of the global variable to update. (required) + * @return CompletableFuture<SyntheticsGlobalVariable> + */ + public CompletableFutureeditGlobalVariableAsync(String variableId, SyntheticsGlobalVariable body) { + return editGlobalVariableWithHttpInfoAsync(variableId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit a Synthetics global variable. + *

Edit a Synthetics global variable.

* * @param variableId The ID of the global variable. (required) * @param body Details of the global variable to update. (required) * @return ApiResponse<SyntheticsGlobalVariable> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1055,151 +801,111 @@ public CompletableFuture editGlobalVariableAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse editGlobalVariableWithHttpInfo( - String variableId, SyntheticsGlobalVariable body) throws ApiException { + public ApiResponse editGlobalVariableWithHttpInfo(String variableId, SyntheticsGlobalVariable body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'variableId' is set if (variableId == null) { - throw new ApiException( - 400, "Missing the required parameter 'variableId' when calling editGlobalVariable"); + throw new ApiException(400, "Missing the required parameter 'variableId' when calling editGlobalVariable"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling editGlobalVariable"); + throw new ApiException(400, "Missing the required parameter 'body' when calling editGlobalVariable"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/variables/{variable_id}" - .replaceAll( - "\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + String localVarPath = "/api/v1/synthetics/variables/{variable_id}" + .replaceAll("\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.editGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.editGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit a global variable. * - *

See {@link #editGlobalVariableWithHttpInfo}. + * See {@link #editGlobalVariableWithHttpInfo}. * * @param variableId The ID of the global variable. (required) * @param body Details of the global variable to update. (required) * @return CompletableFuture<ApiResponse<SyntheticsGlobalVariable>> */ - public CompletableFuture> - editGlobalVariableWithHttpInfoAsync(String variableId, SyntheticsGlobalVariable body) { + public CompletableFuture> editGlobalVariableWithHttpInfoAsync(String variableId, SyntheticsGlobalVariable body) { Object localVarPostBody = body; // verify the required parameter 'variableId' is set if (variableId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'variableId' when calling editGlobalVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'variableId' when calling editGlobalVariable")); + 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 editGlobalVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling editGlobalVariable")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/variables/{variable_id}" - .replaceAll( - "\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + String localVarPath = "/api/v1/synthetics/variables/{variable_id}" + .replaceAll("\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.editGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.editGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get an API test. - * - *

See {@link #getAPITestWithHttpInfo}. - * - * @param publicId The public ID of the test to get details from. (required) - * @return SyntheticsAPITest - * @throws ApiException if fails to make API call - */ - public SyntheticsAPITest getAPITest(String publicId) throws ApiException { + * Get an API test. + * + * See {@link #getAPITestWithHttpInfo}. + * + * @param publicId The public ID of the test to get details from. (required) + * @return SyntheticsAPITest + * @throws ApiException if fails to make API call + */ + public SyntheticsAPITest getAPITest(String publicId) throws ApiException { return getAPITestWithHttpInfo(publicId).getData(); } /** - * Get an API test. - * - *

See {@link #getAPITestWithHttpInfoAsync}. - * - * @param publicId The public ID of the test to get details from. (required) - * @return CompletableFuture<SyntheticsAPITest> - */ - public CompletableFuture getAPITestAsync(String publicId) { - return getAPITestWithHttpInfoAsync(publicId) - .thenApply( - response -> { - return response.getData(); - }); + * Get an API test. + * + * See {@link #getAPITestWithHttpInfoAsync}. + * + * @param publicId The public ID of the test to get details from. (required) + * @return CompletableFuture<SyntheticsAPITest> + */ + public CompletableFuturegetAPITestAsync(String publicId) { + return getAPITestWithHttpInfoAsync(publicId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the detailed configuration associated with a Synthetic API test. + *

Get the detailed configuration associated with + * a Synthetic API test.

* * @param publicId The public ID of the test to get details from. (required) * @return ApiResponse<SyntheticsAPITest> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1208,97 +914,64 @@ public CompletableFuture getAPITestAsync(String publicId) { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getAPITestWithHttpInfo(String publicId) - throws ApiException { + public ApiResponse getAPITestWithHttpInfo(String publicId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling getAPITest"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling getAPITest"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/api/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/api/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getAPITest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getAPITest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an API test. * - *

See {@link #getAPITestWithHttpInfo}. + * See {@link #getAPITestWithHttpInfo}. * * @param publicId The public ID of the test to get details from. (required) * @return CompletableFuture<ApiResponse<SyntheticsAPITest>> */ - public CompletableFuture> getAPITestWithHttpInfoAsync( - String publicId) { + public CompletableFuture> getAPITestWithHttpInfoAsync(String publicId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling getAPITest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getAPITest")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/api/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/api/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getAPITest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getAPITest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getAPITestLatestResults. */ + /** + * Manage optional parameters to getAPITestLatestResults. + */ public static class GetAPITestLatestResultsOptionalParameters { private Long fromTs; private Long toTs; @@ -1306,7 +979,6 @@ public static class GetAPITestLatestResultsOptionalParameters { /** * Set fromTs. - * * @param fromTs Timestamp in milliseconds from which to start querying results. (optional) * @return GetAPITestLatestResultsOptionalParameters */ @@ -1317,7 +989,6 @@ public GetAPITestLatestResultsOptionalParameters fromTs(Long fromTs) { /** * Set toTs. - * * @param toTs Timestamp in milliseconds up to which to query results. (optional) * @return GetAPITestLatestResultsOptionalParameters */ @@ -1328,7 +999,6 @@ public GetAPITestLatestResultsOptionalParameters toTs(Long toTs) { /** * Set probeDc. - * * @param probeDc Locations for which to query results. (optional) * @return GetAPITestLatestResultsOptionalParameters */ @@ -1339,81 +1009,71 @@ public GetAPITestLatestResultsOptionalParameters probeDc(List probeDc) { } /** - * Get an API test's latest results summaries. - * - *

See {@link #getAPITestLatestResultsWithHttpInfo}. - * - * @param publicId The public ID of the test for which to search results for. (required) - * @return SyntheticsGetAPITestLatestResultsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsGetAPITestLatestResultsResponse getAPITestLatestResults(String publicId) - throws ApiException { - return getAPITestLatestResultsWithHttpInfo( - publicId, new GetAPITestLatestResultsOptionalParameters()) - .getData(); + * Get an API test's latest results summaries. + * + * See {@link #getAPITestLatestResultsWithHttpInfo}. + * + * @param publicId The public ID of the test for which to search results for. (required) + * @return SyntheticsGetAPITestLatestResultsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsGetAPITestLatestResultsResponse getAPITestLatestResults (String publicId) throws ApiException { + return getAPITestLatestResultsWithHttpInfo( publicId, new GetAPITestLatestResultsOptionalParameters()).getData(); } /** - * Get an API test's latest results summaries. - * - *

See {@link #getAPITestLatestResultsWithHttpInfoAsync}. - * - * @param publicId The public ID of the test for which to search results for. (required) - * @return CompletableFuture<SyntheticsGetAPITestLatestResultsResponse> - */ - public CompletableFuture getAPITestLatestResultsAsync( - String publicId) { - return getAPITestLatestResultsWithHttpInfoAsync( - publicId, new GetAPITestLatestResultsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get an API test's latest results summaries. + * + * See {@link #getAPITestLatestResultsWithHttpInfoAsync}. + * + * @param publicId The public ID of the test for which to search results for. (required) + * @return CompletableFuture<SyntheticsGetAPITestLatestResultsResponse> + */ + public CompletableFuturegetAPITestLatestResultsAsync(String publicId) { + return getAPITestLatestResultsWithHttpInfoAsync(publicId, new GetAPITestLatestResultsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get an API test's latest results summaries. - * - *

See {@link #getAPITestLatestResultsWithHttpInfo}. - * - * @param publicId The public ID of the test for which to search results for. (required) - * @param parameters Optional parameters for the request. - * @return SyntheticsGetAPITestLatestResultsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsGetAPITestLatestResultsResponse getAPITestLatestResults( - String publicId, GetAPITestLatestResultsOptionalParameters parameters) throws ApiException { + * Get an API test's latest results summaries. + * + * See {@link #getAPITestLatestResultsWithHttpInfo}. + * + * @param publicId The public ID of the test for which to search results for. (required) + * @param parameters Optional parameters for the request. + * @return SyntheticsGetAPITestLatestResultsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsGetAPITestLatestResultsResponse getAPITestLatestResults(String publicId, GetAPITestLatestResultsOptionalParameters parameters) throws ApiException { return getAPITestLatestResultsWithHttpInfo(publicId, parameters).getData(); } /** - * Get an API test's latest results summaries. - * - *

See {@link #getAPITestLatestResultsWithHttpInfoAsync}. - * - * @param publicId The public ID of the test for which to search results for. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SyntheticsGetAPITestLatestResultsResponse> - */ - public CompletableFuture getAPITestLatestResultsAsync( - String publicId, GetAPITestLatestResultsOptionalParameters parameters) { - return getAPITestLatestResultsWithHttpInfoAsync(publicId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get an API test's latest results summaries. + * + * See {@link #getAPITestLatestResultsWithHttpInfoAsync}. + * + * @param publicId The public ID of the test for which to search results for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SyntheticsGetAPITestLatestResultsResponse> + */ + public CompletableFuturegetAPITestLatestResultsAsync( String publicId, GetAPITestLatestResultsOptionalParameters parameters) { + return getAPITestLatestResultsWithHttpInfoAsync(publicId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the last 50 test results summaries for a given Synthetics API test. + *

Get the last 50 test results summaries for a given Synthetics API test.

* * @param publicId The public ID of the test for which to search results for. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<SyntheticsGetAPITestLatestResultsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1422,23 +1082,21 @@ public CompletableFuture getAPITestLa * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getAPITestLatestResultsWithHttpInfo( - String publicId, GetAPITestLatestResultsOptionalParameters parameters) throws ApiException { + public ApiResponse getAPITestLatestResultsWithHttpInfo(String publicId, GetAPITestLatestResultsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling getAPITestLatestResults"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling getAPITestLatestResults"); } Long fromTs = parameters.fromTs; Long toTs = parameters.toTs; List probeDc = parameters.probeDc; // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}/results" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}/results" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1446,58 +1104,36 @@ public ApiResponse getAPITestLatestRe localVarQueryParams.addAll(apiClient.parameterToPairs("", "to_ts", toTs)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "probe_dc", probeDc)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getAPITestLatestResults", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getAPITestLatestResults", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an API test's latest results summaries. * - *

See {@link #getAPITestLatestResultsWithHttpInfo}. + * See {@link #getAPITestLatestResultsWithHttpInfo}. * * @param publicId The public ID of the test for which to search results for. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SyntheticsGetAPITestLatestResultsResponse>> */ - public CompletableFuture> - getAPITestLatestResultsWithHttpInfoAsync( - String publicId, GetAPITestLatestResultsOptionalParameters parameters) { + public CompletableFuture> getAPITestLatestResultsWithHttpInfoAsync(String publicId, GetAPITestLatestResultsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'publicId' when calling getAPITestLatestResults")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getAPITestLatestResults")); + return result; } Long fromTs = parameters.fromTs; Long toTs = parameters.toTs; List probeDc = parameters.probeDc; // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}/results" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}/results" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1507,74 +1143,54 @@ public ApiResponse getAPITestLatestRe Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getAPITestLatestResults", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getAPITestLatestResults", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get an API test result. - * - *

See {@link #getAPITestResultWithHttpInfo}. - * - * @param publicId The public ID of the API test to which the target result belongs. (required) - * @param resultId The ID of the result to get. (required) - * @return SyntheticsAPITestResultFull - * @throws ApiException if fails to make API call - */ - public SyntheticsAPITestResultFull getAPITestResult(String publicId, String resultId) - throws ApiException { + * Get an API test result. + * + * See {@link #getAPITestResultWithHttpInfo}. + * + * @param publicId The public ID of the API test to which the target result belongs. (required) + * @param resultId The ID of the result to get. (required) + * @return SyntheticsAPITestResultFull + * @throws ApiException if fails to make API call + */ + public SyntheticsAPITestResultFull getAPITestResult(String publicId, String resultId) throws ApiException { return getAPITestResultWithHttpInfo(publicId, resultId).getData(); } /** - * Get an API test result. - * - *

See {@link #getAPITestResultWithHttpInfoAsync}. - * - * @param publicId The public ID of the API test to which the target result belongs. (required) - * @param resultId The ID of the result to get. (required) - * @return CompletableFuture<SyntheticsAPITestResultFull> - */ - public CompletableFuture getAPITestResultAsync( - String publicId, String resultId) { - return getAPITestResultWithHttpInfoAsync(publicId, resultId) - .thenApply( - response -> { - return response.getData(); - }); + * Get an API test result. + * + * See {@link #getAPITestResultWithHttpInfoAsync}. + * + * @param publicId The public ID of the API test to which the target result belongs. (required) + * @param resultId The ID of the result to get. (required) + * @return CompletableFuture<SyntheticsAPITestResultFull> + */ + public CompletableFuturegetAPITestResultAsync(String publicId, String resultId) { + return getAPITestResultWithHttpInfoAsync(publicId, resultId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a specific full result from a given (API) Synthetic test. + *

Get a specific full result from a given (API) Synthetic test.

* * @param publicId The public ID of the API test to which the target result belongs. (required) * @param resultId The ID of the result to get. (required) * @return ApiResponse<SyntheticsAPITestResultFull> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1583,154 +1199,113 @@ public CompletableFuture getAPITestResultAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getAPITestResultWithHttpInfo( - String publicId, String resultId) throws ApiException { + public ApiResponse getAPITestResultWithHttpInfo(String publicId, String resultId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling getAPITestResult"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling getAPITestResult"); } // verify the required parameter 'resultId' is set if (resultId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resultId' when calling getAPITestResult"); + throw new ApiException(400, "Missing the required parameter 'resultId' when calling getAPITestResult"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}/results/{result_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) - .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}/results/{result_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) + .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getAPITestResult", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getAPITestResult", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an API test result. * - *

See {@link #getAPITestResultWithHttpInfo}. + * See {@link #getAPITestResultWithHttpInfo}. * * @param publicId The public ID of the API test to which the target result belongs. (required) * @param resultId The ID of the result to get. (required) * @return CompletableFuture<ApiResponse<SyntheticsAPITestResultFull>> */ - public CompletableFuture> - getAPITestResultWithHttpInfoAsync(String publicId, String resultId) { + public CompletableFuture> getAPITestResultWithHttpInfoAsync(String publicId, String resultId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling getAPITestResult")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getAPITestResult")); + return result; } // verify the required parameter 'resultId' is set if (resultId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'resultId' when calling getAPITestResult")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resultId' when calling getAPITestResult")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}/results/{result_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) - .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}/results/{result_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) + .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getAPITestResult", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getAPITestResult", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a browser test. - * - *

See {@link #getBrowserTestWithHttpInfo}. - * - * @param publicId The public ID of the test to get details from. (required) - * @return SyntheticsBrowserTest - * @throws ApiException if fails to make API call - */ - public SyntheticsBrowserTest getBrowserTest(String publicId) throws ApiException { + * Get a browser test. + * + * See {@link #getBrowserTestWithHttpInfo}. + * + * @param publicId The public ID of the test to get details from. (required) + * @return SyntheticsBrowserTest + * @throws ApiException if fails to make API call + */ + public SyntheticsBrowserTest getBrowserTest(String publicId) throws ApiException { return getBrowserTestWithHttpInfo(publicId).getData(); } /** - * Get a browser test. - * - *

See {@link #getBrowserTestWithHttpInfoAsync}. - * - * @param publicId The public ID of the test to get details from. (required) - * @return CompletableFuture<SyntheticsBrowserTest> - */ - public CompletableFuture getBrowserTestAsync(String publicId) { - return getBrowserTestWithHttpInfoAsync(publicId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a browser test. + * + * See {@link #getBrowserTestWithHttpInfoAsync}. + * + * @param publicId The public ID of the test to get details from. (required) + * @return CompletableFuture<SyntheticsBrowserTest> + */ + public CompletableFuturegetBrowserTestAsync(String publicId) { + return getBrowserTestWithHttpInfoAsync(publicId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the detailed configuration (including steps) associated with a Synthetic browser test. + *

Get the detailed configuration (including steps) associated with + * a Synthetic browser test.

* * @param publicId The public ID of the test to get details from. (required) * @return ApiResponse<SyntheticsBrowserTest> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1739,97 +1314,64 @@ public CompletableFuture getBrowserTestAsync(String publi * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getBrowserTestWithHttpInfo(String publicId) - throws ApiException { + public ApiResponse getBrowserTestWithHttpInfo(String publicId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling getBrowserTest"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling getBrowserTest"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getBrowserTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getBrowserTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a browser test. * - *

See {@link #getBrowserTestWithHttpInfo}. + * See {@link #getBrowserTestWithHttpInfo}. * * @param publicId The public ID of the test to get details from. (required) * @return CompletableFuture<ApiResponse<SyntheticsBrowserTest>> */ - public CompletableFuture> getBrowserTestWithHttpInfoAsync( - String publicId) { + public CompletableFuture> getBrowserTestWithHttpInfoAsync(String publicId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling getBrowserTest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getBrowserTest")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getBrowserTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getBrowserTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getBrowserTestLatestResults. */ + /** + * Manage optional parameters to getBrowserTestLatestResults. + */ public static class GetBrowserTestLatestResultsOptionalParameters { private Long fromTs; private Long toTs; @@ -1837,7 +1379,6 @@ public static class GetBrowserTestLatestResultsOptionalParameters { /** * Set fromTs. - * * @param fromTs Timestamp in milliseconds from which to start querying results. (optional) * @return GetBrowserTestLatestResultsOptionalParameters */ @@ -1848,7 +1389,6 @@ public GetBrowserTestLatestResultsOptionalParameters fromTs(Long fromTs) { /** * Set toTs. - * * @param toTs Timestamp in milliseconds up to which to query results. (optional) * @return GetBrowserTestLatestResultsOptionalParameters */ @@ -1859,7 +1399,6 @@ public GetBrowserTestLatestResultsOptionalParameters toTs(Long toTs) { /** * Set probeDc. - * * @param probeDc Locations for which to query results. (optional) * @return GetBrowserTestLatestResultsOptionalParameters */ @@ -1870,83 +1409,71 @@ public GetBrowserTestLatestResultsOptionalParameters probeDc(List probeD } /** - * Get a browser test's latest results summaries. - * - *

See {@link #getBrowserTestLatestResultsWithHttpInfo}. - * - * @param publicId The public ID of the browser test for which to search results for. (required) - * @return SyntheticsGetBrowserTestLatestResultsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults(String publicId) - throws ApiException { - return getBrowserTestLatestResultsWithHttpInfo( - publicId, new GetBrowserTestLatestResultsOptionalParameters()) - .getData(); + * Get a browser test's latest results summaries. + * + * See {@link #getBrowserTestLatestResultsWithHttpInfo}. + * + * @param publicId The public ID of the browser test for which to search results for. (required) + * @return SyntheticsGetBrowserTestLatestResultsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults (String publicId) throws ApiException { + return getBrowserTestLatestResultsWithHttpInfo( publicId, new GetBrowserTestLatestResultsOptionalParameters()).getData(); } - - /** - * Get a browser test's latest results summaries. - * - *

See {@link #getBrowserTestLatestResultsWithHttpInfoAsync}. - * - * @param publicId The public ID of the browser test for which to search results for. (required) - * @return CompletableFuture<SyntheticsGetBrowserTestLatestResultsResponse> - */ - public CompletableFuture - getBrowserTestLatestResultsAsync(String publicId) { - return getBrowserTestLatestResultsWithHttpInfoAsync( - publicId, new GetBrowserTestLatestResultsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + + /** + * Get a browser test's latest results summaries. + * + * See {@link #getBrowserTestLatestResultsWithHttpInfoAsync}. + * + * @param publicId The public ID of the browser test for which to search results for. (required) + * @return CompletableFuture<SyntheticsGetBrowserTestLatestResultsResponse> + */ + public CompletableFuturegetBrowserTestLatestResultsAsync(String publicId) { + return getBrowserTestLatestResultsWithHttpInfoAsync(publicId, new GetBrowserTestLatestResultsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a browser test's latest results summaries. - * - *

See {@link #getBrowserTestLatestResultsWithHttpInfo}. - * - * @param publicId The public ID of the browser test for which to search results for. (required) - * @param parameters Optional parameters for the request. - * @return SyntheticsGetBrowserTestLatestResultsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults( - String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) - throws ApiException { + * Get a browser test's latest results summaries. + * + * See {@link #getBrowserTestLatestResultsWithHttpInfo}. + * + * @param publicId The public ID of the browser test for which to search results for. (required) + * @param parameters Optional parameters for the request. + * @return SyntheticsGetBrowserTestLatestResultsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults(String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) throws ApiException { return getBrowserTestLatestResultsWithHttpInfo(publicId, parameters).getData(); } /** - * Get a browser test's latest results summaries. - * - *

See {@link #getBrowserTestLatestResultsWithHttpInfoAsync}. - * - * @param publicId The public ID of the browser test for which to search results for. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SyntheticsGetBrowserTestLatestResultsResponse> - */ - public CompletableFuture - getBrowserTestLatestResultsAsync( - String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) { - return getBrowserTestLatestResultsWithHttpInfoAsync(publicId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a browser test's latest results summaries. + * + * See {@link #getBrowserTestLatestResultsWithHttpInfoAsync}. + * + * @param publicId The public ID of the browser test for which to search results for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SyntheticsGetBrowserTestLatestResultsResponse> + */ + public CompletableFuturegetBrowserTestLatestResultsAsync( String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) { + return getBrowserTestLatestResultsWithHttpInfoAsync(publicId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the last 50 test results summaries for a given Synthetics Browser test. + *

Get the last 50 test results summaries for a given Synthetics Browser test.

* * @param publicId The public ID of the browser test for which to search results for. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<SyntheticsGetBrowserTestLatestResultsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1955,26 +1482,21 @@ public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getBrowserTestLatestResultsWithHttpInfo( - String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) - throws ApiException { + public ApiResponse getBrowserTestLatestResultsWithHttpInfo(String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'publicId' when calling getBrowserTestLatestResults"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling getBrowserTestLatestResults"); } Long fromTs = parameters.fromTs; Long toTs = parameters.toTs; List probeDc = parameters.probeDc; // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}/results" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}/results" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1982,60 +1504,36 @@ public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults localVarQueryParams.addAll(apiClient.parameterToPairs("", "to_ts", toTs)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "probe_dc", probeDc)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getBrowserTestLatestResults", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getBrowserTestLatestResults", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a browser test's latest results summaries. * - *

See {@link #getBrowserTestLatestResultsWithHttpInfo}. + * See {@link #getBrowserTestLatestResultsWithHttpInfo}. * * @param publicId The public ID of the browser test for which to search results for. (required) * @param parameters Optional parameters for the request. - * @return - * CompletableFuture<ApiResponse<SyntheticsGetBrowserTestLatestResultsResponse>> + * @return CompletableFuture<ApiResponse<SyntheticsGetBrowserTestLatestResultsResponse>> */ - public CompletableFuture> - getBrowserTestLatestResultsWithHttpInfoAsync( - String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) { + public CompletableFuture> getBrowserTestLatestResultsWithHttpInfoAsync(String publicId, GetBrowserTestLatestResultsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'publicId' when calling" - + " getBrowserTestLatestResults")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getBrowserTestLatestResults")); + return result; } Long fromTs = parameters.fromTs; Long toTs = parameters.toTs; List probeDc = parameters.probeDc; // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}/results" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}/results" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2045,77 +1543,54 @@ public SyntheticsGetBrowserTestLatestResultsResponse getBrowserTestLatestResults Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getBrowserTestLatestResults", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getBrowserTestLatestResults", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a browser test result. - * - *

See {@link #getBrowserTestResultWithHttpInfo}. - * - * @param publicId The public ID of the browser test to which the target result belongs. - * (required) - * @param resultId The ID of the result to get. (required) - * @return SyntheticsBrowserTestResultFull - * @throws ApiException if fails to make API call - */ - public SyntheticsBrowserTestResultFull getBrowserTestResult(String publicId, String resultId) - throws ApiException { + * Get a browser test result. + * + * See {@link #getBrowserTestResultWithHttpInfo}. + * + * @param publicId The public ID of the browser test to which the target result belongs. (required) + * @param resultId The ID of the result to get. (required) + * @return SyntheticsBrowserTestResultFull + * @throws ApiException if fails to make API call + */ + public SyntheticsBrowserTestResultFull getBrowserTestResult(String publicId, String resultId) throws ApiException { return getBrowserTestResultWithHttpInfo(publicId, resultId).getData(); } /** - * Get a browser test result. - * - *

See {@link #getBrowserTestResultWithHttpInfoAsync}. - * - * @param publicId The public ID of the browser test to which the target result belongs. - * (required) - * @param resultId The ID of the result to get. (required) - * @return CompletableFuture<SyntheticsBrowserTestResultFull> - */ - public CompletableFuture getBrowserTestResultAsync( - String publicId, String resultId) { - return getBrowserTestResultWithHttpInfoAsync(publicId, resultId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a browser test result. + * + * See {@link #getBrowserTestResultWithHttpInfoAsync}. + * + * @param publicId The public ID of the browser test to which the target result belongs. (required) + * @param resultId The ID of the result to get. (required) + * @return CompletableFuture<SyntheticsBrowserTestResultFull> + */ + public CompletableFuturegetBrowserTestResultAsync(String publicId, String resultId) { + return getBrowserTestResultWithHttpInfoAsync(publicId, resultId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a specific full result from a given (browser) Synthetic test. + *

Get a specific full result from a given (browser) Synthetic test.

* - * @param publicId The public ID of the browser test to which the target result belongs. - * (required) + * @param publicId The public ID of the browser test to which the target result belongs. (required) * @param resultId The ID of the result to get. (required) * @return ApiResponse<SyntheticsBrowserTestResultFull> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2124,155 +1599,112 @@ public CompletableFuture getBrowserTestResultAs * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getBrowserTestResultWithHttpInfo( - String publicId, String resultId) throws ApiException { + public ApiResponse getBrowserTestResultWithHttpInfo(String publicId, String resultId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling getBrowserTestResult"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling getBrowserTestResult"); } // verify the required parameter 'resultId' is set if (resultId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resultId' when calling getBrowserTestResult"); + throw new ApiException(400, "Missing the required parameter 'resultId' when calling getBrowserTestResult"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) - .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) + .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getBrowserTestResult", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getBrowserTestResult", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a browser test result. * - *

See {@link #getBrowserTestResultWithHttpInfo}. + * See {@link #getBrowserTestResultWithHttpInfo}. * - * @param publicId The public ID of the browser test to which the target result belongs. - * (required) + * @param publicId The public ID of the browser test to which the target result belongs. (required) * @param resultId The ID of the result to get. (required) * @return CompletableFuture<ApiResponse<SyntheticsBrowserTestResultFull>> */ - public CompletableFuture> - getBrowserTestResultWithHttpInfoAsync(String publicId, String resultId) { + public CompletableFuture> getBrowserTestResultWithHttpInfoAsync(String publicId, String resultId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling getBrowserTestResult")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getBrowserTestResult")); + return result; } // verify the required parameter 'resultId' is set if (resultId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'resultId' when calling getBrowserTestResult")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resultId' when calling getBrowserTestResult")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) - .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())) + .replaceAll("\\{" + "result_id" + "\\}", apiClient.escapeString(resultId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getBrowserTestResult", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getBrowserTestResult", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a global variable. - * - *

See {@link #getGlobalVariableWithHttpInfo}. - * - * @param variableId The ID of the global variable. (required) - * @return SyntheticsGlobalVariable - * @throws ApiException if fails to make API call - */ - public SyntheticsGlobalVariable getGlobalVariable(String variableId) throws ApiException { + * Get a global variable. + * + * See {@link #getGlobalVariableWithHttpInfo}. + * + * @param variableId The ID of the global variable. (required) + * @return SyntheticsGlobalVariable + * @throws ApiException if fails to make API call + */ + public SyntheticsGlobalVariable getGlobalVariable(String variableId) throws ApiException { return getGlobalVariableWithHttpInfo(variableId).getData(); } /** - * Get a global variable. - * - *

See {@link #getGlobalVariableWithHttpInfoAsync}. - * - * @param variableId The ID of the global variable. (required) - * @return CompletableFuture<SyntheticsGlobalVariable> - */ - public CompletableFuture getGlobalVariableAsync(String variableId) { - return getGlobalVariableWithHttpInfoAsync(variableId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a global variable. + * + * See {@link #getGlobalVariableWithHttpInfoAsync}. + * + * @param variableId The ID of the global variable. (required) + * @return CompletableFuture<SyntheticsGlobalVariable> + */ + public CompletableFuturegetGlobalVariableAsync(String variableId) { + return getGlobalVariableWithHttpInfoAsync(variableId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the detailed configuration of a global variable. + *

Get the detailed configuration of a global variable.

* * @param variableId The ID of the global variable. (required) * @return ApiResponse<SyntheticsGlobalVariable> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2281,135 +1713,97 @@ public CompletableFuture getGlobalVariableAsync(String * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getGlobalVariableWithHttpInfo(String variableId) - throws ApiException { + public ApiResponse getGlobalVariableWithHttpInfo(String variableId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'variableId' is set if (variableId == null) { - throw new ApiException( - 400, "Missing the required parameter 'variableId' when calling getGlobalVariable"); + throw new ApiException(400, "Missing the required parameter 'variableId' when calling getGlobalVariable"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/variables/{variable_id}" - .replaceAll( - "\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + String localVarPath = "/api/v1/synthetics/variables/{variable_id}" + .replaceAll("\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a global variable. * - *

See {@link #getGlobalVariableWithHttpInfo}. + * See {@link #getGlobalVariableWithHttpInfo}. * * @param variableId The ID of the global variable. (required) * @return CompletableFuture<ApiResponse<SyntheticsGlobalVariable>> */ - public CompletableFuture> - getGlobalVariableWithHttpInfoAsync(String variableId) { + public CompletableFuture> getGlobalVariableWithHttpInfoAsync(String variableId) { Object localVarPostBody = null; // verify the required parameter 'variableId' is set if (variableId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'variableId' when calling getGlobalVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'variableId' when calling getGlobalVariable")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/variables/{variable_id}" - .replaceAll( - "\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + String localVarPath = "/api/v1/synthetics/variables/{variable_id}" + .replaceAll("\\{" + "variable_id" + "\\}", apiClient.escapeString(variableId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getGlobalVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getGlobalVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a private location. - * - *

See {@link #getPrivateLocationWithHttpInfo}. - * - * @param locationId The ID of the private location. (required) - * @return SyntheticsPrivateLocation - * @throws ApiException if fails to make API call - */ - public SyntheticsPrivateLocation getPrivateLocation(String locationId) throws ApiException { + * Get a private location. + * + * See {@link #getPrivateLocationWithHttpInfo}. + * + * @param locationId The ID of the private location. (required) + * @return SyntheticsPrivateLocation + * @throws ApiException if fails to make API call + */ + public SyntheticsPrivateLocation getPrivateLocation(String locationId) throws ApiException { return getPrivateLocationWithHttpInfo(locationId).getData(); } /** - * Get a private location. - * - *

See {@link #getPrivateLocationWithHttpInfoAsync}. - * - * @param locationId The ID of the private location. (required) - * @return CompletableFuture<SyntheticsPrivateLocation> - */ - public CompletableFuture getPrivateLocationAsync(String locationId) { - return getPrivateLocationWithHttpInfoAsync(locationId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a private location. + * + * See {@link #getPrivateLocationWithHttpInfoAsync}. + * + * @param locationId The ID of the private location. (required) + * @return CompletableFuture<SyntheticsPrivateLocation> + */ + public CompletableFuturegetPrivateLocationAsync(String locationId) { + return getPrivateLocationWithHttpInfoAsync(locationId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a Synthetics private location. + *

Get a Synthetics private location.

* * @param locationId The ID of the private location. (required) * @return ApiResponse<SyntheticsPrivateLocation> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2417,135 +1811,97 @@ public CompletableFuture getPrivateLocationAsync(Stri * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getPrivateLocationWithHttpInfo(String locationId) - throws ApiException { + public ApiResponse getPrivateLocationWithHttpInfo(String locationId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'locationId' is set if (locationId == null) { - throw new ApiException( - 400, "Missing the required parameter 'locationId' when calling getPrivateLocation"); + throw new ApiException(400, "Missing the required parameter 'locationId' when calling getPrivateLocation"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/private-locations/{location_id}" - .replaceAll( - "\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + String localVarPath = "/api/v1/synthetics/private-locations/{location_id}" + .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getPrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getPrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a private location. * - *

See {@link #getPrivateLocationWithHttpInfo}. + * See {@link #getPrivateLocationWithHttpInfo}. * * @param locationId The ID of the private location. (required) * @return CompletableFuture<ApiResponse<SyntheticsPrivateLocation>> */ - public CompletableFuture> - getPrivateLocationWithHttpInfoAsync(String locationId) { + public CompletableFuture> getPrivateLocationWithHttpInfoAsync(String locationId) { Object localVarPostBody = null; // verify the required parameter 'locationId' is set if (locationId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'locationId' when calling getPrivateLocation")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'locationId' when calling getPrivateLocation")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/private-locations/{location_id}" - .replaceAll( - "\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + String localVarPath = "/api/v1/synthetics/private-locations/{location_id}" + .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getPrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getPrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get details of batch. - * - *

See {@link #getSyntheticsCIBatchWithHttpInfo}. - * - * @param batchId The ID of the batch. (required) - * @return SyntheticsBatchDetails - * @throws ApiException if fails to make API call - */ - public SyntheticsBatchDetails getSyntheticsCIBatch(String batchId) throws ApiException { + * Get details of batch. + * + * See {@link #getSyntheticsCIBatchWithHttpInfo}. + * + * @param batchId The ID of the batch. (required) + * @return SyntheticsBatchDetails + * @throws ApiException if fails to make API call + */ + public SyntheticsBatchDetails getSyntheticsCIBatch(String batchId) throws ApiException { return getSyntheticsCIBatchWithHttpInfo(batchId).getData(); } /** - * Get details of batch. - * - *

See {@link #getSyntheticsCIBatchWithHttpInfoAsync}. - * - * @param batchId The ID of the batch. (required) - * @return CompletableFuture<SyntheticsBatchDetails> - */ - public CompletableFuture getSyntheticsCIBatchAsync(String batchId) { - return getSyntheticsCIBatchWithHttpInfoAsync(batchId) - .thenApply( - response -> { - return response.getData(); - }); + * Get details of batch. + * + * See {@link #getSyntheticsCIBatchWithHttpInfoAsync}. + * + * @param batchId The ID of the batch. (required) + * @return CompletableFuture<SyntheticsBatchDetails> + */ + public CompletableFuturegetSyntheticsCIBatchAsync(String batchId) { + return getSyntheticsCIBatchWithHttpInfoAsync(batchId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a batch's updated details. + *

Get a batch's updated details.

* * @param batchId The ID of the batch. (required) * @return ApiResponse<SyntheticsBatchDetails> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2553,133 +1909,97 @@ public CompletableFuture getSyntheticsCIBatchAsync(Strin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSyntheticsCIBatchWithHttpInfo(String batchId) - throws ApiException { + public ApiResponse getSyntheticsCIBatchWithHttpInfo(String batchId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'batchId' is set if (batchId == null) { - throw new ApiException( - 400, "Missing the required parameter 'batchId' when calling getSyntheticsCIBatch"); + throw new ApiException(400, "Missing the required parameter 'batchId' when calling getSyntheticsCIBatch"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/ci/batch/{batch_id}" - .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); + String localVarPath = "/api/v1/synthetics/ci/batch/{batch_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getSyntheticsCIBatch", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getSyntheticsCIBatch", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get details of batch. * - *

See {@link #getSyntheticsCIBatchWithHttpInfo}. + * See {@link #getSyntheticsCIBatchWithHttpInfo}. * * @param batchId The ID of the batch. (required) * @return CompletableFuture<ApiResponse<SyntheticsBatchDetails>> */ - public CompletableFuture> - getSyntheticsCIBatchWithHttpInfoAsync(String batchId) { + public CompletableFuture> getSyntheticsCIBatchWithHttpInfoAsync(String batchId) { Object localVarPostBody = null; // verify the required parameter 'batchId' is set if (batchId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'batchId' when calling getSyntheticsCIBatch")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'batchId' when calling getSyntheticsCIBatch")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/ci/batch/{batch_id}" - .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); + String localVarPath = "/api/v1/synthetics/ci/batch/{batch_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getSyntheticsCIBatch", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getSyntheticsCIBatch", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a test configuration. - * - *

See {@link #getTestWithHttpInfo}. - * - * @param publicId The public ID of the test to get details from. (required) - * @return SyntheticsTestDetails - * @throws ApiException if fails to make API call - */ - public SyntheticsTestDetails getTest(String publicId) throws ApiException { + * Get a test configuration. + * + * See {@link #getTestWithHttpInfo}. + * + * @param publicId The public ID of the test to get details from. (required) + * @return SyntheticsTestDetails + * @throws ApiException if fails to make API call + */ + public SyntheticsTestDetails getTest(String publicId) throws ApiException { return getTestWithHttpInfo(publicId).getData(); } /** - * Get a test configuration. - * - *

See {@link #getTestWithHttpInfoAsync}. - * - * @param publicId The public ID of the test to get details from. (required) - * @return CompletableFuture<SyntheticsTestDetails> - */ - public CompletableFuture getTestAsync(String publicId) { - return getTestWithHttpInfoAsync(publicId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a test configuration. + * + * See {@link #getTestWithHttpInfoAsync}. + * + * @param publicId The public ID of the test to get details from. (required) + * @return CompletableFuture<SyntheticsTestDetails> + */ + public CompletableFuturegetTestAsync(String publicId) { + return getTestWithHttpInfoAsync(publicId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the detailed configuration associated with a Synthetics test. + *

Get the detailed configuration associated with a Synthetics test.

* * @param publicId The public ID of the test to get details from. (required) * @return ApiResponse<SyntheticsTestDetails> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2688,8 +2008,7 @@ public CompletableFuture getTestAsync(String publicId) { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getTestWithHttpInfo(String publicId) - throws ApiException { + public ApiResponse getTestWithHttpInfo(String publicId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'publicId' is set @@ -2697,119 +2016,86 @@ public ApiResponse getTestWithHttpInfo(String publicId) throw new ApiException(400, "Missing the required parameter 'publicId' when calling getTest"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.getTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a test configuration. * - *

See {@link #getTestWithHttpInfo}. + * See {@link #getTestWithHttpInfo}. * * @param publicId The public ID of the test to get details from. (required) * @return CompletableFuture<ApiResponse<SyntheticsTestDetails>> */ - public CompletableFuture> getTestWithHttpInfoAsync( - String publicId) { + public CompletableFuture> getTestWithHttpInfoAsync(String publicId) { Object localVarPostBody = null; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'publicId' when calling getTest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling getTest")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.getTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.getTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all global variables. - * - *

See {@link #listGlobalVariablesWithHttpInfo}. - * - * @return SyntheticsListGlobalVariablesResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsListGlobalVariablesResponse listGlobalVariables() throws ApiException { + * Get all global variables. + * + * See {@link #listGlobalVariablesWithHttpInfo}. + * + * @return SyntheticsListGlobalVariablesResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsListGlobalVariablesResponse listGlobalVariables() throws ApiException { return listGlobalVariablesWithHttpInfo().getData(); } /** - * Get all global variables. - * - *

See {@link #listGlobalVariablesWithHttpInfoAsync}. - * - * @return CompletableFuture<SyntheticsListGlobalVariablesResponse> - */ - public CompletableFuture listGlobalVariablesAsync() { - return listGlobalVariablesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all global variables. + * + * See {@link #listGlobalVariablesWithHttpInfoAsync}. + * + * @return CompletableFuture<SyntheticsListGlobalVariablesResponse> + */ + public CompletableFuturelistGlobalVariablesAsync() { + return listGlobalVariablesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of all Synthetics global variables. + *

Get the list of all Synthetics global variables.

* * @return ApiResponse<SyntheticsListGlobalVariablesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2817,112 +2103,80 @@ public CompletableFuture listGlobalVariab * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listGlobalVariablesWithHttpInfo() - throws ApiException { + public ApiResponse listGlobalVariablesWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/synthetics/variables"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.listGlobalVariables", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.listGlobalVariables", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all global variables. * - *

See {@link #listGlobalVariablesWithHttpInfo}. + * See {@link #listGlobalVariablesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<SyntheticsListGlobalVariablesResponse>> */ - public CompletableFuture> - listGlobalVariablesWithHttpInfoAsync() { + public CompletableFuture> listGlobalVariablesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/synthetics/variables"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.listGlobalVariables", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.listGlobalVariables", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all locations (public and private). - * - *

See {@link #listLocationsWithHttpInfo}. - * - * @return SyntheticsLocations - * @throws ApiException if fails to make API call - */ - public SyntheticsLocations listLocations() throws ApiException { + * Get all locations (public and private). + * + * See {@link #listLocationsWithHttpInfo}. + * + * @return SyntheticsLocations + * @throws ApiException if fails to make API call + */ + public SyntheticsLocations listLocations() throws ApiException { return listLocationsWithHttpInfo().getData(); } /** - * Get all locations (public and private). - * - *

See {@link #listLocationsWithHttpInfoAsync}. - * - * @return CompletableFuture<SyntheticsLocations> - */ - public CompletableFuture listLocationsAsync() { - return listLocationsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all locations (public and private). + * + * See {@link #listLocationsWithHttpInfoAsync}. + * + * @return CompletableFuture<SyntheticsLocations> + */ + public CompletableFuturelistLocationsAsync() { + return listLocationsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of public and private locations available for Synthetic tests. No arguments - * required. + *

Get the list of public and private locations available for Synthetic + * tests. No arguments required.

* * @return ApiResponse<SyntheticsLocations> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2934,32 +2188,18 @@ public ApiResponse listLocationsWithHttpInfo() throws ApiEx // create path and map variables String localVarPath = "/api/v1/synthetics/locations"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.listLocations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.listLocations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all locations (public and private). * - *

See {@link #listLocationsWithHttpInfo}. + * See {@link #listLocationsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<SyntheticsLocations>> */ @@ -2968,43 +2208,30 @@ public CompletableFuture> listLocationsWithHttp // create path and map variables String localVarPath = "/api/v1/synthetics/locations"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.listLocations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.listLocations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listTests. */ + /** + * Manage optional parameters to listTests. + */ public static class ListTestsOptionalParameters { private String pageSize; private String pageNumber; /** * Set pageSize. - * * @param pageSize Used for pagination. The number of tests returned in the page. (optional) * @return ListTestsOptionalParameters */ @@ -3015,9 +2242,7 @@ public ListTestsOptionalParameters pageSize(String pageSize) { /** * Set pageNumber. - * - * @param pageNumber Used for pagination. Which page you want to retrieve. Starts at zero. - * (optional) + * @param pageNumber Used for pagination. Which page you want to retrieve. Starts at zero. (optional) * @return ListTestsOptionalParameters */ public ListTestsOptionalParameters pageNumber(String pageNumber) { @@ -3027,71 +2252,66 @@ public ListTestsOptionalParameters pageNumber(String pageNumber) { } /** - * Get the list of all Synthetic tests. - * - *

See {@link #listTestsWithHttpInfo}. - * - * @return SyntheticsListTestsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsListTestsResponse listTests() throws ApiException { + * Get the list of all Synthetic tests. + * + * See {@link #listTestsWithHttpInfo}. + * + * @return SyntheticsListTestsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsListTestsResponse listTests () throws ApiException { return listTestsWithHttpInfo(new ListTestsOptionalParameters()).getData(); } /** - * Get the list of all Synthetic tests. - * - *

See {@link #listTestsWithHttpInfoAsync}. - * - * @return CompletableFuture<SyntheticsListTestsResponse> - */ - public CompletableFuture listTestsAsync() { - return listTestsWithHttpInfoAsync(new ListTestsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get the list of all Synthetic tests. + * + * See {@link #listTestsWithHttpInfoAsync}. + * + * @return CompletableFuture<SyntheticsListTestsResponse> + */ + public CompletableFuturelistTestsAsync() { + return listTestsWithHttpInfoAsync(new ListTestsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get the list of all Synthetic tests. - * - *

See {@link #listTestsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SyntheticsListTestsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsListTestsResponse listTests(ListTestsOptionalParameters parameters) - throws ApiException { + * Get the list of all Synthetic tests. + * + * See {@link #listTestsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SyntheticsListTestsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsListTestsResponse listTests(ListTestsOptionalParameters parameters) throws ApiException { return listTestsWithHttpInfo(parameters).getData(); } /** - * Get the list of all Synthetic tests. - * - *

See {@link #listTestsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SyntheticsListTestsResponse> - */ - public CompletableFuture listTestsAsync( - ListTestsOptionalParameters parameters) { - return listTestsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get the list of all Synthetic tests. + * + * See {@link #listTestsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SyntheticsListTestsResponse> + */ + public CompletableFuturelistTestsAsync(ListTestsOptionalParameters parameters) { + return listTestsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of all Synthetic tests. + *

Get the list of all Synthetic tests.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SyntheticsListTestsResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -3100,56 +2320,40 @@ public CompletableFuture listTestsAsync( * *
Response details
Status Code Description Response Headers
200 OK - Returns the list of all Synthetic tests. -
429 Too many requests -
*/ - public ApiResponse listTestsWithHttpInfo( - ListTestsOptionalParameters parameters) throws ApiException { + public ApiResponse listTestsWithHttpInfo(ListTestsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String pageSize = parameters.pageSize; String pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v1/synthetics/tests"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.listTests", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.listTests", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the list of all Synthetic tests. * - *

See {@link #listTestsWithHttpInfo}. + * See {@link #listTestsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SyntheticsListTestsResponse>> */ - public CompletableFuture> listTestsWithHttpInfoAsync( - ListTestsOptionalParameters parameters) { + public CompletableFuture> listTestsWithHttpInfoAsync(ListTestsOptionalParameters parameters) { Object localVarPostBody = null; String pageSize = parameters.pageSize; String pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v1/synthetics/tests"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3158,71 +2362,51 @@ public CompletableFuture> listTestsWith Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.listTests", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.listTests", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Trigger tests from CI/CD pipelines. - * - *

See {@link #triggerCITestsWithHttpInfo}. - * - * @param body Details of the test to trigger. (required) - * @return SyntheticsTriggerCITestsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsTriggerCITestsResponse triggerCITests(SyntheticsCITestBody body) - throws ApiException { + * Trigger tests from CI/CD pipelines. + * + * See {@link #triggerCITestsWithHttpInfo}. + * + * @param body Details of the test to trigger. (required) + * @return SyntheticsTriggerCITestsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsTriggerCITestsResponse triggerCITests(SyntheticsCITestBody body) throws ApiException { return triggerCITestsWithHttpInfo(body).getData(); } /** - * Trigger tests from CI/CD pipelines. - * - *

See {@link #triggerCITestsWithHttpInfoAsync}. - * - * @param body Details of the test to trigger. (required) - * @return CompletableFuture<SyntheticsTriggerCITestsResponse> - */ - public CompletableFuture triggerCITestsAsync( - SyntheticsCITestBody body) { - return triggerCITestsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Trigger tests from CI/CD pipelines. + * + * See {@link #triggerCITestsWithHttpInfoAsync}. + * + * @param body Details of the test to trigger. (required) + * @return CompletableFuture<SyntheticsTriggerCITestsResponse> + */ + public CompletableFuturetriggerCITestsAsync(SyntheticsCITestBody body) { + return triggerCITestsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Trigger a set of Synthetics tests for continuous integration. + *

Trigger a set of Synthetics tests for continuous integration.

* * @param body Details of the test to trigger. (required) * @return ApiResponse<SyntheticsTriggerCITestsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3230,133 +2414,95 @@ public CompletableFuture triggerCITestsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse triggerCITestsWithHttpInfo( - SyntheticsCITestBody body) throws ApiException { + public ApiResponse triggerCITestsWithHttpInfo(SyntheticsCITestBody body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling triggerCITests"); + throw new ApiException(400, "Missing the required parameter 'body' when calling triggerCITests"); } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/trigger/ci"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.triggerCITests", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.triggerCITests", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Trigger tests from CI/CD pipelines. * - *

See {@link #triggerCITestsWithHttpInfo}. + * See {@link #triggerCITestsWithHttpInfo}. * * @param body Details of the test to trigger. (required) * @return CompletableFuture<ApiResponse<SyntheticsTriggerCITestsResponse>> */ - public CompletableFuture> - triggerCITestsWithHttpInfoAsync(SyntheticsCITestBody body) { + public CompletableFuture> triggerCITestsWithHttpInfoAsync(SyntheticsCITestBody body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling triggerCITests")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling triggerCITests")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/trigger/ci"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.triggerCITests", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.triggerCITests", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Trigger Synthetics tests. - * - *

See {@link #triggerTestsWithHttpInfo}. - * - * @param body The identifiers of the tests to trigger. (required) - * @return SyntheticsTriggerCITestsResponse - * @throws ApiException if fails to make API call - */ - public SyntheticsTriggerCITestsResponse triggerTests(SyntheticsTriggerBody body) - throws ApiException { + * Trigger Synthetics tests. + * + * See {@link #triggerTestsWithHttpInfo}. + * + * @param body The identifiers of the tests to trigger. (required) + * @return SyntheticsTriggerCITestsResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsTriggerCITestsResponse triggerTests(SyntheticsTriggerBody body) throws ApiException { return triggerTestsWithHttpInfo(body).getData(); } /** - * Trigger Synthetics tests. - * - *

See {@link #triggerTestsWithHttpInfoAsync}. - * - * @param body The identifiers of the tests to trigger. (required) - * @return CompletableFuture<SyntheticsTriggerCITestsResponse> - */ - public CompletableFuture triggerTestsAsync( - SyntheticsTriggerBody body) { - return triggerTestsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Trigger Synthetics tests. + * + * See {@link #triggerTestsWithHttpInfoAsync}. + * + * @param body The identifiers of the tests to trigger. (required) + * @return CompletableFuture<SyntheticsTriggerCITestsResponse> + */ + public CompletableFuturetriggerTestsAsync(SyntheticsTriggerBody body) { + return triggerTestsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Trigger a set of Synthetics tests. + *

Trigger a set of Synthetics tests.

* * @param body The identifiers of the tests to trigger. (required) * @return ApiResponse<SyntheticsTriggerCITestsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3364,135 +2510,98 @@ public CompletableFuture triggerTestsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse triggerTestsWithHttpInfo( - SyntheticsTriggerBody body) throws ApiException { + public ApiResponse triggerTestsWithHttpInfo(SyntheticsTriggerBody body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling triggerTests"); + throw new ApiException(400, "Missing the required parameter 'body' when calling triggerTests"); } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/trigger"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.triggerTests", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.triggerTests", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Trigger Synthetics tests. * - *

See {@link #triggerTestsWithHttpInfo}. + * See {@link #triggerTestsWithHttpInfo}. * * @param body The identifiers of the tests to trigger. (required) * @return CompletableFuture<ApiResponse<SyntheticsTriggerCITestsResponse>> */ - public CompletableFuture> - triggerTestsWithHttpInfoAsync(SyntheticsTriggerBody body) { + public CompletableFuture> triggerTestsWithHttpInfoAsync(SyntheticsTriggerBody body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling triggerTests")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling triggerTests")); + return result; } // create path and map variables String localVarPath = "/api/v1/synthetics/tests/trigger"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.triggerTests", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.triggerTests", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an API test. - * - *

See {@link #updateAPITestWithHttpInfo}. - * - * @param publicId The public ID of the test to get details from. (required) - * @param body New test details to be saved. (required) - * @return SyntheticsAPITest - * @throws ApiException if fails to make API call - */ - public SyntheticsAPITest updateAPITest(String publicId, SyntheticsAPITest body) - throws ApiException { + * Edit an API test. + * + * See {@link #updateAPITestWithHttpInfo}. + * + * @param publicId The public ID of the test to get details from. (required) + * @param body New test details to be saved. (required) + * @return SyntheticsAPITest + * @throws ApiException if fails to make API call + */ + public SyntheticsAPITest updateAPITest(String publicId, SyntheticsAPITest body) throws ApiException { return updateAPITestWithHttpInfo(publicId, body).getData(); } /** - * Edit an API test. - * - *

See {@link #updateAPITestWithHttpInfoAsync}. - * - * @param publicId The public ID of the test to get details from. (required) - * @param body New test details to be saved. (required) - * @return CompletableFuture<SyntheticsAPITest> - */ - public CompletableFuture updateAPITestAsync( - String publicId, SyntheticsAPITest body) { - return updateAPITestWithHttpInfoAsync(publicId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an API test. + * + * See {@link #updateAPITestWithHttpInfoAsync}. + * + * @param publicId The public ID of the test to get details from. (required) + * @param body New test details to be saved. (required) + * @return CompletableFuture<SyntheticsAPITest> + */ + public CompletableFutureupdateAPITestAsync(String publicId, SyntheticsAPITest body) { + return updateAPITestWithHttpInfoAsync(publicId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit the configuration of a Synthetic API test. + *

Edit the configuration of a Synthetic API test.

* * @param publicId The public ID of the test to get details from. (required) * @param body New test details to be saved. (required) * @return ApiResponse<SyntheticsAPITest> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3502,154 +2611,113 @@ public CompletableFuture updateAPITestAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAPITestWithHttpInfo( - String publicId, SyntheticsAPITest body) throws ApiException { + public ApiResponse updateAPITestWithHttpInfo(String publicId, SyntheticsAPITest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateAPITest"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling updateAPITest"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAPITest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAPITest"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/api/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/api/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updateAPITest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.updateAPITest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an API test. * - *

See {@link #updateAPITestWithHttpInfo}. + * See {@link #updateAPITestWithHttpInfo}. * * @param publicId The public ID of the test to get details from. (required) * @param body New test details to be saved. (required) * @return CompletableFuture<ApiResponse<SyntheticsAPITest>> */ - public CompletableFuture> updateAPITestWithHttpInfoAsync( - String publicId, SyntheticsAPITest body) { + public CompletableFuture> updateAPITestWithHttpInfoAsync(String publicId, SyntheticsAPITest body) { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateAPITest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling updateAPITest")); + 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 updateAPITest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAPITest")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/api/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/api/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updateAPITest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.updateAPITest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit a browser test. - * - *

See {@link #updateBrowserTestWithHttpInfo}. - * - * @param publicId The public ID of the test to get details from. (required) - * @param body New test details to be saved. (required) - * @return SyntheticsBrowserTest - * @throws ApiException if fails to make API call - */ - public SyntheticsBrowserTest updateBrowserTest(String publicId, SyntheticsBrowserTest body) - throws ApiException { + * Edit a browser test. + * + * See {@link #updateBrowserTestWithHttpInfo}. + * + * @param publicId The public ID of the test to get details from. (required) + * @param body New test details to be saved. (required) + * @return SyntheticsBrowserTest + * @throws ApiException if fails to make API call + */ + public SyntheticsBrowserTest updateBrowserTest(String publicId, SyntheticsBrowserTest body) throws ApiException { return updateBrowserTestWithHttpInfo(publicId, body).getData(); } /** - * Edit a browser test. - * - *

See {@link #updateBrowserTestWithHttpInfoAsync}. - * - * @param publicId The public ID of the test to get details from. (required) - * @param body New test details to be saved. (required) - * @return CompletableFuture<SyntheticsBrowserTest> - */ - public CompletableFuture updateBrowserTestAsync( - String publicId, SyntheticsBrowserTest body) { - return updateBrowserTestWithHttpInfoAsync(publicId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit a browser test. + * + * See {@link #updateBrowserTestWithHttpInfoAsync}. + * + * @param publicId The public ID of the test to get details from. (required) + * @param body New test details to be saved. (required) + * @return CompletableFuture<SyntheticsBrowserTest> + */ + public CompletableFutureupdateBrowserTestAsync(String publicId, SyntheticsBrowserTest body) { + return updateBrowserTestWithHttpInfoAsync(publicId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit the configuration of a Synthetic browser test. + *

Edit the configuration of a Synthetic browser test.

* * @param publicId The public ID of the test to get details from. (required) * @param body New test details to be saved. (required) * @return ApiResponse<SyntheticsBrowserTest> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3659,154 +2727,113 @@ public CompletableFuture updateBrowserTestAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateBrowserTestWithHttpInfo( - String publicId, SyntheticsBrowserTest body) throws ApiException { + public ApiResponse updateBrowserTestWithHttpInfo(String publicId, SyntheticsBrowserTest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateBrowserTest"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling updateBrowserTest"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateBrowserTest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateBrowserTest"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updateBrowserTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.updateBrowserTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit a browser test. * - *

See {@link #updateBrowserTestWithHttpInfo}. + * See {@link #updateBrowserTestWithHttpInfo}. * * @param publicId The public ID of the test to get details from. (required) * @param body New test details to be saved. (required) * @return CompletableFuture<ApiResponse<SyntheticsBrowserTest>> */ - public CompletableFuture> updateBrowserTestWithHttpInfoAsync( - String publicId, SyntheticsBrowserTest body) { + public CompletableFuture> updateBrowserTestWithHttpInfoAsync(String publicId, SyntheticsBrowserTest body) { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateBrowserTest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling updateBrowserTest")); + 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 updateBrowserTest")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateBrowserTest")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/browser/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updateBrowserTest", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.updateBrowserTest", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit a private location. - * - *

See {@link #updatePrivateLocationWithHttpInfo}. - * - * @param locationId The ID of the private location. (required) - * @param body Details of the private location to be updated. (required) - * @return SyntheticsPrivateLocation - * @throws ApiException if fails to make API call - */ - public SyntheticsPrivateLocation updatePrivateLocation( - String locationId, SyntheticsPrivateLocation body) throws ApiException { + * Edit a private location. + * + * See {@link #updatePrivateLocationWithHttpInfo}. + * + * @param locationId The ID of the private location. (required) + * @param body Details of the private location to be updated. (required) + * @return SyntheticsPrivateLocation + * @throws ApiException if fails to make API call + */ + public SyntheticsPrivateLocation updatePrivateLocation(String locationId, SyntheticsPrivateLocation body) throws ApiException { return updatePrivateLocationWithHttpInfo(locationId, body).getData(); } /** - * Edit a private location. - * - *

See {@link #updatePrivateLocationWithHttpInfoAsync}. - * - * @param locationId The ID of the private location. (required) - * @param body Details of the private location to be updated. (required) - * @return CompletableFuture<SyntheticsPrivateLocation> - */ - public CompletableFuture updatePrivateLocationAsync( - String locationId, SyntheticsPrivateLocation body) { - return updatePrivateLocationWithHttpInfoAsync(locationId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit a private location. + * + * See {@link #updatePrivateLocationWithHttpInfoAsync}. + * + * @param locationId The ID of the private location. (required) + * @param body Details of the private location to be updated. (required) + * @return CompletableFuture<SyntheticsPrivateLocation> + */ + public CompletableFutureupdatePrivateLocationAsync(String locationId, SyntheticsPrivateLocation body) { + return updatePrivateLocationWithHttpInfoAsync(locationId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit a Synthetics private location. + *

Edit a Synthetics private location.

* * @param locationId The ID of the private location. (required) * @param body Details of the private location to be updated. (required) * @return ApiResponse<SyntheticsPrivateLocation> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3814,157 +2841,113 @@ public CompletableFuture updatePrivateLocationAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updatePrivateLocationWithHttpInfo( - String locationId, SyntheticsPrivateLocation body) throws ApiException { + public ApiResponse updatePrivateLocationWithHttpInfo(String locationId, SyntheticsPrivateLocation body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'locationId' is set if (locationId == null) { - throw new ApiException( - 400, "Missing the required parameter 'locationId' when calling updatePrivateLocation"); + throw new ApiException(400, "Missing the required parameter 'locationId' when calling updatePrivateLocation"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updatePrivateLocation"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updatePrivateLocation"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/private-locations/{location_id}" - .replaceAll( - "\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + String localVarPath = "/api/v1/synthetics/private-locations/{location_id}" + .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updatePrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.updatePrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit a private location. * - *

See {@link #updatePrivateLocationWithHttpInfo}. + * See {@link #updatePrivateLocationWithHttpInfo}. * * @param locationId The ID of the private location. (required) * @param body Details of the private location to be updated. (required) * @return CompletableFuture<ApiResponse<SyntheticsPrivateLocation>> */ - public CompletableFuture> - updatePrivateLocationWithHttpInfoAsync(String locationId, SyntheticsPrivateLocation body) { + public CompletableFuture> updatePrivateLocationWithHttpInfoAsync(String locationId, SyntheticsPrivateLocation body) { Object localVarPostBody = body; // verify the required parameter 'locationId' is set if (locationId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'locationId' when calling updatePrivateLocation")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'locationId' when calling updatePrivateLocation")); + 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 updatePrivateLocation")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updatePrivateLocation")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/private-locations/{location_id}" - .replaceAll( - "\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + String localVarPath = "/api/v1/synthetics/private-locations/{location_id}" + .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updatePrivateLocation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.updatePrivateLocation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Pause or start a test. - * - *

See {@link #updateTestPauseStatusWithHttpInfo}. - * - * @param publicId The public ID of the Synthetic test to update. (required) - * @param body Status to set the given Synthetic test to. (required) - * @return Boolean - * @throws ApiException if fails to make API call - */ - public Boolean updateTestPauseStatus(String publicId, SyntheticsUpdateTestPauseStatusPayload body) - throws ApiException { + * Pause or start a test. + * + * See {@link #updateTestPauseStatusWithHttpInfo}. + * + * @param publicId The public ID of the Synthetic test to update. (required) + * @param body Status to set the given Synthetic test to. (required) + * @return Boolean + * @throws ApiException if fails to make API call + */ + public Boolean updateTestPauseStatus(String publicId, SyntheticsUpdateTestPauseStatusPayload body) throws ApiException { return updateTestPauseStatusWithHttpInfo(publicId, body).getData(); } /** - * Pause or start a test. - * - *

See {@link #updateTestPauseStatusWithHttpInfoAsync}. - * - * @param publicId The public ID of the Synthetic test to update. (required) - * @param body Status to set the given Synthetic test to. (required) - * @return CompletableFuture<Boolean> - */ - public CompletableFuture updateTestPauseStatusAsync( - String publicId, SyntheticsUpdateTestPauseStatusPayload body) { - return updateTestPauseStatusWithHttpInfoAsync(publicId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Pause or start a test. + * + * See {@link #updateTestPauseStatusWithHttpInfoAsync}. + * + * @param publicId The public ID of the Synthetic test to update. (required) + * @param body Status to set the given Synthetic test to. (required) + * @return CompletableFuture<Boolean> + */ + public CompletableFutureupdateTestPauseStatusAsync(String publicId, SyntheticsUpdateTestPauseStatusPayload body) { + return updateTestPauseStatusWithHttpInfoAsync(publicId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Pause or start a Synthetics test by changing the status. + *

Pause or start a Synthetics test by changing the status.

* * @param publicId The public ID of the Synthetic test to update. (required) * @param body Status to set the given Synthetic test to. (required) * @return ApiResponse<Boolean> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3974,109 +2957,71 @@ public CompletableFuture updateTestPauseStatusAsync( * *
Response details
Status Code Description Response Headers
200 OK - Returns a boolean indicating if the update was successful. -
429 Too many requests -
*/ - public ApiResponse updateTestPauseStatusWithHttpInfo( - String publicId, SyntheticsUpdateTestPauseStatusPayload body) throws ApiException { + public ApiResponse updateTestPauseStatusWithHttpInfo(String publicId, SyntheticsUpdateTestPauseStatusPayload body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - throw new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateTestPauseStatus"); + throw new ApiException(400, "Missing the required parameter 'publicId' when calling updateTestPauseStatus"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateTestPauseStatus"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateTestPauseStatus"); } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}/status" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}/status" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updateTestPauseStatus", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.SyntheticsApi.updateTestPauseStatus", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Pause or start a test. * - *

See {@link #updateTestPauseStatusWithHttpInfo}. + * See {@link #updateTestPauseStatusWithHttpInfo}. * * @param publicId The public ID of the Synthetic test to update. (required) * @param body Status to set the given Synthetic test to. (required) * @return CompletableFuture<ApiResponse<Boolean>> */ - public CompletableFuture> updateTestPauseStatusWithHttpInfoAsync( - String publicId, SyntheticsUpdateTestPauseStatusPayload body) { + public CompletableFuture> updateTestPauseStatusWithHttpInfoAsync(String publicId, SyntheticsUpdateTestPauseStatusPayload body) { Object localVarPostBody = body; // verify the required parameter 'publicId' is set if (publicId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'publicId' when calling updateTestPauseStatus")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'publicId' when calling updateTestPauseStatus")); + 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 updateTestPauseStatus")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateTestPauseStatus")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/synthetics/tests/{public_id}/status" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + String localVarPath = "/api/v1/synthetics/tests/{public_id}/status" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.SyntheticsApi.updateTestPauseStatus", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.SyntheticsApi.updateTestPauseStatus", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/TagsApi.java b/src/main/java/com/datadog/api/client/v1/api/TagsApi.java index c0f3fec0162..0ebc905b97a 100644 --- a/src/main/java/com/datadog/api/client/v1/api/TagsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/TagsApi.java @@ -1,24 +1,31 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.HostTags; -import com.datadog.api.client.v1.model.TagToHosts; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.TagToHosts; +import com.datadog.api.client.v1.model.HostTags; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TagsApi { private ApiClient apiClient; - public TagsApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,16 +52,15 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to createHostTags. */ + /** + * Manage optional parameters to createHostTags. + */ public static class CreateHostTagsOptionalParameters { private String source; /** * Set source. - * - * @param source The source of the tags. Complete - * list of source attribute values. (optional) + * @param source The source of the tags. Complete list of source attribute values. (optional) * @return CreateHostTagsOptionalParameters */ public CreateHostTagsOptionalParameters source(String source) { @@ -64,89 +70,77 @@ public CreateHostTagsOptionalParameters source(String source) { } /** - * Add tags to a host. - * - *

See {@link #createHostTagsWithHttpInfo}. - * - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) - * @param body Update host tags request body. (required) - * @return HostTags - * @throws ApiException if fails to make API call - */ - public HostTags createHostTags(String hostName, HostTags body) throws ApiException { - return createHostTagsWithHttpInfo(hostName, body, new CreateHostTagsOptionalParameters()) - .getData(); - } - - /** - * Add tags to a host. - * - *

See {@link #createHostTagsWithHttpInfoAsync}. - * - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) - * @param body Update host tags request body. (required) - * @return CompletableFuture<HostTags> - */ - public CompletableFuture createHostTagsAsync(String hostName, HostTags body) { - return createHostTagsWithHttpInfoAsync(hostName, body, new CreateHostTagsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Add tags to a host. - * - *

See {@link #createHostTagsWithHttpInfo}. - * - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) - * @param body Update host tags request body. (required) - * @param parameters Optional parameters for the request. - * @return HostTags - * @throws ApiException if fails to make API call - */ - public HostTags createHostTags( - String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) - throws ApiException { + * Add tags to a host. + * + * See {@link #createHostTagsWithHttpInfo}. + * + * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. (required) + * @param body Update host tags request body. (required) + * @return HostTags + * @throws ApiException if fails to make API call + */ + public HostTags createHostTags (String hostName, HostTags body) throws ApiException { + return createHostTagsWithHttpInfo( hostName, body, new CreateHostTagsOptionalParameters()).getData(); + } + + /** + * Add tags to a host. + * + * See {@link #createHostTagsWithHttpInfoAsync}. + * + * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. (required) + * @param body Update host tags request body. (required) + * @return CompletableFuture<HostTags> + */ + public CompletableFuturecreateHostTagsAsync(String hostName, HostTags body) { + return createHostTagsWithHttpInfoAsync(hostName, body, new CreateHostTagsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Add tags to a host. + * + * See {@link #createHostTagsWithHttpInfo}. + * + * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. (required) + * @param body Update host tags request body. (required) + * @param parameters Optional parameters for the request. + * @return HostTags + * @throws ApiException if fails to make API call + */ + public HostTags createHostTags(String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) throws ApiException { return createHostTagsWithHttpInfo(hostName, body, parameters).getData(); } /** - * Add tags to a host. - * - *

See {@link #createHostTagsWithHttpInfoAsync}. - * - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) - * @param body Update host tags request body. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HostTags> - */ - public CompletableFuture createHostTagsAsync( - String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) { - return createHostTagsWithHttpInfoAsync(hostName, body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Add tags to a host. + * + * See {@link #createHostTagsWithHttpInfoAsync}. + * + * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. (required) + * @param body Update host tags request body. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HostTags> + */ + public CompletableFuturecreateHostTagsAsync( String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) { + return createHostTagsWithHttpInfoAsync(hostName, body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint allows you to add new tags to a host, optionally specifying where these tags come - * from. + *

This endpoint allows you to add new tags to a host, + * optionally specifying where these tags come from.

* - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) + * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. (required) * @param body Update host tags request body. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<HostTags> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -155,91 +149,65 @@ public CompletableFuture createHostTagsAsync( * *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
*/ - public ApiResponse createHostTagsWithHttpInfo( - String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) - throws ApiException { + public ApiResponse createHostTagsWithHttpInfo(String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'hostName' is set if (hostName == null) { - throw new ApiException( - 400, "Missing the required parameter 'hostName' when calling createHostTags"); + throw new ApiException(400, "Missing the required parameter 'hostName' when calling createHostTags"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createHostTags"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createHostTags"); } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.TagsApi.createHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.TagsApi.createHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add tags to a host. * - *

See {@link #createHostTagsWithHttpInfo}. + * See {@link #createHostTagsWithHttpInfo}. * - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) + * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. (required) * @param body Update host tags request body. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HostTags>> */ - public CompletableFuture> createHostTagsWithHttpInfoAsync( - String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) { + public CompletableFuture> createHostTagsWithHttpInfoAsync(String hostName, HostTags body, CreateHostTagsOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'hostName' is set if (hostName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'hostName' when calling createHostTags")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'hostName' when calling createHostTags")); + 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 createHostTags")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createHostTags")); + return result; } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -247,41 +215,24 @@ public CompletableFuture> createHostTagsWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.TagsApi.createHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.TagsApi.createHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to deleteHostTags. */ + /** + * Manage optional parameters to deleteHostTags. + */ public static class DeleteHostTagsOptionalParameters { private String source; /** * Set source. - * - * @param source The source of the tags (for example chef, puppet). Complete - * list of source attribute values. (optional) + * @param source The source of the tags (for example chef, puppet). Complete list of source attribute values. (optional) * @return DeleteHostTagsOptionalParameters */ public DeleteHostTagsOptionalParameters source(String source) { @@ -291,79 +242,70 @@ public DeleteHostTagsOptionalParameters source(String source) { } /** - * Remove host tags. - * - *

See {@link #deleteHostTagsWithHttpInfo}. - * - * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. - * (required) - * @throws ApiException if fails to make API call - */ - public void deleteHostTags(String hostName) throws ApiException { - deleteHostTagsWithHttpInfo(hostName, new DeleteHostTagsOptionalParameters()); + * Remove host tags. + * + * See {@link #deleteHostTagsWithHttpInfo}. + * + * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. (required) + * @throws ApiException if fails to make API call + */ + public void deleteHostTags (String hostName) throws ApiException { + deleteHostTagsWithHttpInfo( hostName, new DeleteHostTagsOptionalParameters()); } /** - * Remove host tags. - * - *

See {@link #deleteHostTagsWithHttpInfoAsync}. - * - * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. - * (required) - * @return CompletableFuture - */ - public CompletableFuture deleteHostTagsAsync(String hostName) { - return deleteHostTagsWithHttpInfoAsync(hostName, new DeleteHostTagsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Remove host tags. + * + * See {@link #deleteHostTagsWithHttpInfoAsync}. + * + * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteHostTagsAsync(String hostName) { + return deleteHostTagsWithHttpInfoAsync(hostName, new DeleteHostTagsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Remove host tags. - * - *

See {@link #deleteHostTagsWithHttpInfo}. - * - * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. - * (required) - * @param parameters Optional parameters for the request. - * @throws ApiException if fails to make API call - */ - public void deleteHostTags(String hostName, DeleteHostTagsOptionalParameters parameters) - throws ApiException { - deleteHostTagsWithHttpInfo(hostName, parameters); + * Remove host tags. + * + * See {@link #deleteHostTagsWithHttpInfo}. + * + * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. (required) + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void deleteHostTags(String hostName, DeleteHostTagsOptionalParameters parameters) throws ApiException { + deleteHostTagsWithHttpInfo(hostName, parameters); } /** - * Remove host tags. - * - *

See {@link #deleteHostTagsWithHttpInfoAsync}. - * - * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. - * (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture - */ - public CompletableFuture deleteHostTagsAsync( - String hostName, DeleteHostTagsOptionalParameters parameters) { - return deleteHostTagsWithHttpInfoAsync(hostName, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Remove host tags. + * + * See {@link #deleteHostTagsWithHttpInfoAsync}. + * + * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFuturedeleteHostTagsAsync( String hostName, DeleteHostTagsOptionalParameters parameters) { + return deleteHostTagsWithHttpInfoAsync(hostName, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint allows you to remove all user-assigned tags for a single host. + *

This endpoint allows you to remove all user-assigned tags + * for a single host.

* - * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. - * (required) + * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -372,74 +314,52 @@ public CompletableFuture deleteHostTagsAsync( * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteHostTagsWithHttpInfo( - String hostName, DeleteHostTagsOptionalParameters parameters) throws ApiException { + public ApiResponse deleteHostTagsWithHttpInfo(String hostName, DeleteHostTagsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'hostName' is set if (hostName == null) { - throw new ApiException( - 400, "Missing the required parameter 'hostName' when calling deleteHostTags"); + throw new ApiException(400, "Missing the required parameter 'hostName' when calling deleteHostTags"); } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.TagsApi.deleteHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + Invocation.Builder builder = apiClient.createBuilder("v1.TagsApi.deleteHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Remove host tags. * - *

See {@link #deleteHostTagsWithHttpInfo}. + * See {@link #deleteHostTagsWithHttpInfo}. * - * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. - * (required) + * @param hostName This endpoint allows you to remove all user-assigned tags for a single host. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteHostTagsWithHttpInfoAsync( - String hostName, DeleteHostTagsOptionalParameters parameters) { + public CompletableFuture> deleteHostTagsWithHttpInfoAsync(String hostName, DeleteHostTagsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'hostName' is set if (hostName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'hostName' when calling deleteHostTags")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'hostName' when calling deleteHostTags")); + return result; } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -447,38 +367,23 @@ public CompletableFuture> deleteHostTagsWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.TagsApi.deleteHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.TagsApi.deleteHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } - /** Manage optional parameters to getHostTags. */ + /** + * Manage optional parameters to getHostTags. + */ public static class GetHostTagsOptionalParameters { private String source; /** * Set source. - * * @param source Source to filter. (optional) * @return GetHostTagsOptionalParameters */ @@ -489,81 +394,71 @@ public GetHostTagsOptionalParameters source(String source) { } /** - * Get host tags. - * - *

See {@link #getHostTagsWithHttpInfo}. - * - * @param hostName When specified, filters list of tags to those tags with the specified source. - * (required) - * @return HostTags - * @throws ApiException if fails to make API call - */ - public HostTags getHostTags(String hostName) throws ApiException { - return getHostTagsWithHttpInfo(hostName, new GetHostTagsOptionalParameters()).getData(); - } - - /** - * Get host tags. - * - *

See {@link #getHostTagsWithHttpInfoAsync}. - * - * @param hostName When specified, filters list of tags to those tags with the specified source. - * (required) - * @return CompletableFuture<HostTags> - */ - public CompletableFuture getHostTagsAsync(String hostName) { - return getHostTagsWithHttpInfoAsync(hostName, new GetHostTagsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get host tags. - * - *

See {@link #getHostTagsWithHttpInfo}. - * - * @param hostName When specified, filters list of tags to those tags with the specified source. - * (required) - * @param parameters Optional parameters for the request. - * @return HostTags - * @throws ApiException if fails to make API call - */ - public HostTags getHostTags(String hostName, GetHostTagsOptionalParameters parameters) - throws ApiException { + * Get host tags. + * + * See {@link #getHostTagsWithHttpInfo}. + * + * @param hostName When specified, filters list of tags to those tags with the specified source. (required) + * @return HostTags + * @throws ApiException if fails to make API call + */ + public HostTags getHostTags (String hostName) throws ApiException { + return getHostTagsWithHttpInfo( hostName, new GetHostTagsOptionalParameters()).getData(); + } + + /** + * Get host tags. + * + * See {@link #getHostTagsWithHttpInfoAsync}. + * + * @param hostName When specified, filters list of tags to those tags with the specified source. (required) + * @return CompletableFuture<HostTags> + */ + public CompletableFuturegetHostTagsAsync(String hostName) { + return getHostTagsWithHttpInfoAsync(hostName, new GetHostTagsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get host tags. + * + * See {@link #getHostTagsWithHttpInfo}. + * + * @param hostName When specified, filters list of tags to those tags with the specified source. (required) + * @param parameters Optional parameters for the request. + * @return HostTags + * @throws ApiException if fails to make API call + */ + public HostTags getHostTags(String hostName, GetHostTagsOptionalParameters parameters) throws ApiException { return getHostTagsWithHttpInfo(hostName, parameters).getData(); } /** - * Get host tags. - * - *

See {@link #getHostTagsWithHttpInfoAsync}. - * - * @param hostName When specified, filters list of tags to those tags with the specified source. - * (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HostTags> - */ - public CompletableFuture getHostTagsAsync( - String hostName, GetHostTagsOptionalParameters parameters) { - return getHostTagsWithHttpInfoAsync(hostName, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get host tags. + * + * See {@link #getHostTagsWithHttpInfoAsync}. + * + * @param hostName When specified, filters list of tags to those tags with the specified source. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HostTags> + */ + public CompletableFuturegetHostTagsAsync( String hostName, GetHostTagsOptionalParameters parameters) { + return getHostTagsWithHttpInfoAsync(hostName, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Return the list of tags that apply to a given host. + *

Return the list of tags that apply to a given host.

* - * @param hostName When specified, filters list of tags to those tags with the specified source. - * (required) + * @param hostName When specified, filters list of tags to those tags with the specified source. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<HostTags> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -572,74 +467,52 @@ public CompletableFuture getHostTagsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getHostTagsWithHttpInfo( - String hostName, GetHostTagsOptionalParameters parameters) throws ApiException { + public ApiResponse getHostTagsWithHttpInfo(String hostName, GetHostTagsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'hostName' is set if (hostName == null) { - throw new ApiException( - 400, "Missing the required parameter 'hostName' when calling getHostTags"); + throw new ApiException(400, "Missing the required parameter 'hostName' when calling getHostTags"); } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.TagsApi.getHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.TagsApi.getHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get host tags. * - *

See {@link #getHostTagsWithHttpInfo}. + * See {@link #getHostTagsWithHttpInfo}. * - * @param hostName When specified, filters list of tags to those tags with the specified source. - * (required) + * @param hostName When specified, filters list of tags to those tags with the specified source. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HostTags>> */ - public CompletableFuture> getHostTagsWithHttpInfoAsync( - String hostName, GetHostTagsOptionalParameters parameters) { + public CompletableFuture> getHostTagsWithHttpInfoAsync(String hostName, GetHostTagsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'hostName' is set if (hostName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'hostName' when calling getHostTags")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'hostName' when calling getHostTags")); + return result; } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -647,40 +520,24 @@ public CompletableFuture> getHostTagsWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.TagsApi.getHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.TagsApi.getHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listHostTags. */ + /** + * Manage optional parameters to listHostTags. + */ public static class ListHostTagsOptionalParameters { private String source; /** * Set source. - * - * @param source When specified, filters host list to those tags with the specified source. - * (optional) + * @param source When specified, filters host list to those tags with the specified source. (optional) * @return ListHostTagsOptionalParameters */ public ListHostTagsOptionalParameters source(String source) { @@ -690,70 +547,66 @@ public ListHostTagsOptionalParameters source(String source) { } /** - * Get Tags. - * - *

See {@link #listHostTagsWithHttpInfo}. - * - * @return TagToHosts - * @throws ApiException if fails to make API call - */ - public TagToHosts listHostTags() throws ApiException { + * Get Tags. + * + * See {@link #listHostTagsWithHttpInfo}. + * + * @return TagToHosts + * @throws ApiException if fails to make API call + */ + public TagToHosts listHostTags () throws ApiException { return listHostTagsWithHttpInfo(new ListHostTagsOptionalParameters()).getData(); } /** - * Get Tags. - * - *

See {@link #listHostTagsWithHttpInfoAsync}. - * - * @return CompletableFuture<TagToHosts> - */ - public CompletableFuture listHostTagsAsync() { - return listHostTagsWithHttpInfoAsync(new ListHostTagsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get Tags. + * + * See {@link #listHostTagsWithHttpInfoAsync}. + * + * @return CompletableFuture<TagToHosts> + */ + public CompletableFuturelistHostTagsAsync() { + return listHostTagsWithHttpInfoAsync(new ListHostTagsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get Tags. - * - *

See {@link #listHostTagsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return TagToHosts - * @throws ApiException if fails to make API call - */ + * Get Tags. + * + * See {@link #listHostTagsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return TagToHosts + * @throws ApiException if fails to make API call + */ public TagToHosts listHostTags(ListHostTagsOptionalParameters parameters) throws ApiException { return listHostTagsWithHttpInfo(parameters).getData(); } /** - * Get Tags. - * - *

See {@link #listHostTagsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<TagToHosts> - */ - public CompletableFuture listHostTagsAsync( - ListHostTagsOptionalParameters parameters) { - return listHostTagsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get Tags. + * + * See {@link #listHostTagsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<TagToHosts> + */ + public CompletableFuturelistHostTagsAsync(ListHostTagsOptionalParameters parameters) { + return listHostTagsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Return a mapping of tags to hosts for your whole infrastructure. + *

Return a mapping of tags to hosts for your whole infrastructure.

* * @param parameters Optional parameters for the request. * @return ApiResponse<TagToHosts> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -762,53 +615,37 @@ public CompletableFuture listHostTagsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listHostTagsWithHttpInfo(ListHostTagsOptionalParameters parameters) - throws ApiException { + public ApiResponse listHostTagsWithHttpInfo(ListHostTagsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String source = parameters.source; // create path and map variables String localVarPath = "/api/v1/tags/hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.TagsApi.listHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.TagsApi.listHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get Tags. * - *

See {@link #listHostTagsWithHttpInfo}. + * See {@link #listHostTagsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<TagToHosts>> */ - public CompletableFuture> listHostTagsWithHttpInfoAsync( - ListHostTagsOptionalParameters parameters) { + public CompletableFuture> listHostTagsWithHttpInfoAsync(ListHostTagsOptionalParameters parameters) { Object localVarPostBody = null; String source = parameters.source; // create path and map variables String localVarPath = "/api/v1/tags/hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -816,41 +653,24 @@ public CompletableFuture> listHostTagsWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.TagsApi.listHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.TagsApi.listHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to updateHostTags. */ + /** + * Manage optional parameters to updateHostTags. + */ public static class UpdateHostTagsOptionalParameters { private String source; /** * Set source. - * - * @param source The source of the tags (for example chef, puppet). Complete - * list of source attribute values (optional) + * @param source The source of the tags (for example chef, puppet). Complete list of source attribute values (optional) * @return UpdateHostTagsOptionalParameters */ public UpdateHostTagsOptionalParameters source(String source) { @@ -860,89 +680,77 @@ public UpdateHostTagsOptionalParameters source(String source) { } /** - * Update host tags. - * - *

See {@link #updateHostTagsWithHttpInfo}. - * - * @param hostName This endpoint allows you to update/replace all in an integration source with - * those supplied in the request. (required) - * @param body Add tags to host (required) - * @return HostTags - * @throws ApiException if fails to make API call - */ - public HostTags updateHostTags(String hostName, HostTags body) throws ApiException { - return updateHostTagsWithHttpInfo(hostName, body, new UpdateHostTagsOptionalParameters()) - .getData(); - } - - /** - * Update host tags. - * - *

See {@link #updateHostTagsWithHttpInfoAsync}. - * - * @param hostName This endpoint allows you to update/replace all in an integration source with - * those supplied in the request. (required) - * @param body Add tags to host (required) - * @return CompletableFuture<HostTags> - */ - public CompletableFuture updateHostTagsAsync(String hostName, HostTags body) { - return updateHostTagsWithHttpInfoAsync(hostName, body, new UpdateHostTagsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Update host tags. - * - *

See {@link #updateHostTagsWithHttpInfo}. - * - * @param hostName This endpoint allows you to update/replace all in an integration source with - * those supplied in the request. (required) - * @param body Add tags to host (required) - * @param parameters Optional parameters for the request. - * @return HostTags - * @throws ApiException if fails to make API call - */ - public HostTags updateHostTags( - String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) - throws ApiException { + * Update host tags. + * + * See {@link #updateHostTagsWithHttpInfo}. + * + * @param hostName This endpoint allows you to update/replace all in an integration source with those supplied in the request. (required) + * @param body Add tags to host (required) + * @return HostTags + * @throws ApiException if fails to make API call + */ + public HostTags updateHostTags (String hostName, HostTags body) throws ApiException { + return updateHostTagsWithHttpInfo( hostName, body, new UpdateHostTagsOptionalParameters()).getData(); + } + + /** + * Update host tags. + * + * See {@link #updateHostTagsWithHttpInfoAsync}. + * + * @param hostName This endpoint allows you to update/replace all in an integration source with those supplied in the request. (required) + * @param body Add tags to host (required) + * @return CompletableFuture<HostTags> + */ + public CompletableFutureupdateHostTagsAsync(String hostName, HostTags body) { + return updateHostTagsWithHttpInfoAsync(hostName, body, new UpdateHostTagsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Update host tags. + * + * See {@link #updateHostTagsWithHttpInfo}. + * + * @param hostName This endpoint allows you to update/replace all in an integration source with those supplied in the request. (required) + * @param body Add tags to host (required) + * @param parameters Optional parameters for the request. + * @return HostTags + * @throws ApiException if fails to make API call + */ + public HostTags updateHostTags(String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) throws ApiException { return updateHostTagsWithHttpInfo(hostName, body, parameters).getData(); } /** - * Update host tags. - * - *

See {@link #updateHostTagsWithHttpInfoAsync}. - * - * @param hostName This endpoint allows you to update/replace all in an integration source with - * those supplied in the request. (required) - * @param body Add tags to host (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HostTags> - */ - public CompletableFuture updateHostTagsAsync( - String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) { - return updateHostTagsWithHttpInfoAsync(hostName, body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Update host tags. + * + * See {@link #updateHostTagsWithHttpInfoAsync}. + * + * @param hostName This endpoint allows you to update/replace all in an integration source with those supplied in the request. (required) + * @param body Add tags to host (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HostTags> + */ + public CompletableFutureupdateHostTagsAsync( String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) { + return updateHostTagsWithHttpInfoAsync(hostName, body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * This endpoint allows you to update/replace all tags in an integration source with those - * supplied in the request. + *

This endpoint allows you to update/replace all tags in + * an integration source with those supplied in the request.

* - * @param hostName This endpoint allows you to update/replace all in an integration source with - * those supplied in the request. (required) + * @param hostName This endpoint allows you to update/replace all in an integration source with those supplied in the request. (required) * @param body Add tags to host (required) * @param parameters Optional parameters for the request. * @return ApiResponse<HostTags> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -951,91 +759,65 @@ public CompletableFuture updateHostTagsAsync( * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse updateHostTagsWithHttpInfo( - String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) - throws ApiException { + public ApiResponse updateHostTagsWithHttpInfo(String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'hostName' is set if (hostName == null) { - throw new ApiException( - 400, "Missing the required parameter 'hostName' when calling updateHostTags"); + throw new ApiException(400, "Missing the required parameter 'hostName' when calling updateHostTags"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateHostTags"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateHostTags"); } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.TagsApi.updateHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.TagsApi.updateHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update host tags. * - *

See {@link #updateHostTagsWithHttpInfo}. + * See {@link #updateHostTagsWithHttpInfo}. * - * @param hostName This endpoint allows you to update/replace all in an integration source with - * those supplied in the request. (required) + * @param hostName This endpoint allows you to update/replace all in an integration source with those supplied in the request. (required) * @param body Add tags to host (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HostTags>> */ - public CompletableFuture> updateHostTagsWithHttpInfoAsync( - String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) { + public CompletableFuture> updateHostTagsWithHttpInfoAsync(String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'hostName' is set if (hostName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'hostName' when calling updateHostTags")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'hostName' when calling updateHostTags")); + 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 updateHostTags")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateHostTags")); + return result; } String source = parameters.source; // create path and map variables - String localVarPath = - "/api/v1/tags/hosts/{host_name}" - .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + String localVarPath = "/api/v1/tags/hosts/{host_name}" + .replaceAll("\\{" + "host_name" + "\\}", apiClient.escapeString(hostName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1043,28 +825,12 @@ public CompletableFuture> updateHostTagsWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.TagsApi.updateHostTags", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.TagsApi.updateHostTags", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/UsageMeteringApi.java b/src/main/java/com/datadog/api/client/v1/api/UsageMeteringApi.java index 26913d6244f..8de048aad31 100644 --- a/src/main/java/com/datadog/api/client/v1/api/UsageMeteringApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/UsageMeteringApi.java @@ -1,65 +1,71 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.HourlyUsageAttributionResponse; -import com.datadog.api.client.v1.model.HourlyUsageAttributionUsageType; -import com.datadog.api.client.v1.model.MonthlyUsageAttributionResponse; -import com.datadog.api.client.v1.model.MonthlyUsageAttributionSupportedMetrics; +import com.datadog.api.client.PaginationIterable; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.LinkedHashMap; +import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.UsageCustomReportsResponse; +import com.datadog.api.client.v1.model.UsageSortDirection; +import com.datadog.api.client.v1.model.UsageSort; +import com.datadog.api.client.v1.model.UsageSpecifiedCustomReportsResponse; import com.datadog.api.client.v1.model.UsageAnalyzedLogsResponse; import com.datadog.api.client.v1.model.UsageAttributionResponse; -import com.datadog.api.client.v1.model.UsageAttributionSort; import com.datadog.api.client.v1.model.UsageAttributionSupportedMetrics; +import com.datadog.api.client.v1.model.UsageAttributionSort; import com.datadog.api.client.v1.model.UsageAuditLogsResponse; +import com.datadog.api.client.v1.model.UsageLambdaResponse; import com.datadog.api.client.v1.model.UsageBillableSummaryResponse; import com.datadog.api.client.v1.model.UsageCIVisibilityResponse; -import com.datadog.api.client.v1.model.UsageCWSResponse; import com.datadog.api.client.v1.model.UsageCloudSecurityPostureManagementResponse; -import com.datadog.api.client.v1.model.UsageCustomReportsResponse; +import com.datadog.api.client.v1.model.UsageCWSResponse; import com.datadog.api.client.v1.model.UsageDBMResponse; import com.datadog.api.client.v1.model.UsageFargateResponse; import com.datadog.api.client.v1.model.UsageHostsResponse; +import com.datadog.api.client.v1.model.HourlyUsageAttributionResponse; +import com.datadog.api.client.v1.model.HourlyUsageAttributionUsageType; import com.datadog.api.client.v1.model.UsageIncidentManagementResponse; import com.datadog.api.client.v1.model.UsageIndexedSpansResponse; import com.datadog.api.client.v1.model.UsageIngestedSpansResponse; import com.datadog.api.client.v1.model.UsageIoTResponse; -import com.datadog.api.client.v1.model.UsageLambdaResponse; -import com.datadog.api.client.v1.model.UsageLogsByIndexResponse; -import com.datadog.api.client.v1.model.UsageLogsByRetentionResponse; import com.datadog.api.client.v1.model.UsageLogsResponse; +import com.datadog.api.client.v1.model.UsageLogsByRetentionResponse; +import com.datadog.api.client.v1.model.UsageLogsByIndexResponse; +import com.datadog.api.client.v1.model.MonthlyUsageAttributionResponse; +import com.datadog.api.client.v1.model.MonthlyUsageAttributionSupportedMetrics; import com.datadog.api.client.v1.model.UsageNetworkFlowsResponse; import com.datadog.api.client.v1.model.UsageNetworkHostsResponse; import com.datadog.api.client.v1.model.UsageOnlineArchiveResponse; import com.datadog.api.client.v1.model.UsageProfilingResponse; -import com.datadog.api.client.v1.model.UsageRumSessionsResponse; import com.datadog.api.client.v1.model.UsageRumUnitsResponse; +import com.datadog.api.client.v1.model.UsageRumSessionsResponse; import com.datadog.api.client.v1.model.UsageSDSResponse; import com.datadog.api.client.v1.model.UsageSNMPResponse; -import com.datadog.api.client.v1.model.UsageSort; -import com.datadog.api.client.v1.model.UsageSortDirection; -import com.datadog.api.client.v1.model.UsageSpecifiedCustomReportsResponse; import com.datadog.api.client.v1.model.UsageSummaryResponse; +import com.datadog.api.client.v1.model.UsageSyntheticsResponse; import com.datadog.api.client.v1.model.UsageSyntheticsAPIResponse; import com.datadog.api.client.v1.model.UsageSyntheticsBrowserResponse; -import com.datadog.api.client.v1.model.UsageSyntheticsResponse; import com.datadog.api.client.v1.model.UsageTimeseriesResponse; import com.datadog.api.client.v1.model.UsageTopAvgMetricsResponse; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageMeteringApi { private ApiClient apiClient; - public UsageMeteringApi() { this(ApiClient.getDefaultApiClient()); } @@ -86,7 +92,9 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to getDailyCustomReports. */ + /** + * Manage optional parameters to getDailyCustomReports. + */ public static class GetDailyCustomReportsOptionalParameters { private Long pageSize; private Long pageNumber; @@ -95,9 +103,7 @@ public static class GetDailyCustomReportsOptionalParameters { /** * Set pageSize. - * - * @param pageSize The number of files to return in the response. [default=60]. - * (optional) + * @param pageSize The number of files to return in the response. [default=60]. (optional) * @return GetDailyCustomReportsOptionalParameters */ public GetDailyCustomReportsOptionalParameters pageSize(Long pageSize) { @@ -107,9 +113,7 @@ public GetDailyCustomReportsOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * - * @param pageNumber The identifier of the first page to return. This parameter is used for the - * pagination feature [default=0]. (optional) + * @param pageNumber The identifier of the first page to return. This parameter is used for the pagination feature [default=0]. (optional) * @return GetDailyCustomReportsOptionalParameters */ public GetDailyCustomReportsOptionalParameters pageNumber(Long pageNumber) { @@ -119,9 +123,7 @@ public GetDailyCustomReportsOptionalParameters pageNumber(Long pageNumber) { /** * Set sortDir. - * - * @param sortDir The direction to sort by: [desc, asc]. (optional, default to - * "desc") + * @param sortDir The direction to sort by: [desc, asc]. (optional, default to "desc") * @return GetDailyCustomReportsOptionalParameters */ public GetDailyCustomReportsOptionalParameters sortDir(UsageSortDirection sortDir) { @@ -131,9 +133,7 @@ public GetDailyCustomReportsOptionalParameters sortDir(UsageSortDirection sortDi /** * Set sort. - * - * @param sort The field to sort by: [computed_on, size, start_date, end_date]. - * (optional, default to "start_date") + * @param sort The field to sort by: [computed_on, size, start_date, end_date]. (optional, default to "start_date") * @return GetDailyCustomReportsOptionalParameters */ public GetDailyCustomReportsOptionalParameters sort(UsageSort sort) { @@ -143,95 +143,86 @@ public GetDailyCustomReportsOptionalParameters sort(UsageSort sort) { } /** - * Get the list of available daily custom reports. - * - *

See {@link #getDailyCustomReportsWithHttpInfo}. - * - * @return UsageCustomReportsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageCustomReportsResponse getDailyCustomReports() throws ApiException { - return getDailyCustomReportsWithHttpInfo(new GetDailyCustomReportsOptionalParameters()) - .getData(); - } - - /** - * Get the list of available daily custom reports. - * - *

See {@link #getDailyCustomReportsWithHttpInfoAsync}. - * - * @return CompletableFuture<UsageCustomReportsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getDailyCustomReportsAsync() { - return getDailyCustomReportsWithHttpInfoAsync(new GetDailyCustomReportsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get the list of available daily custom reports. - * - *

See {@link #getDailyCustomReportsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return UsageCustomReportsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageCustomReportsResponse getDailyCustomReports( - GetDailyCustomReportsOptionalParameters parameters) throws ApiException { + * Get the list of available daily custom reports. + * + * See {@link #getDailyCustomReportsWithHttpInfo}. + * + * @return UsageCustomReportsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageCustomReportsResponse getDailyCustomReports () throws ApiException { + return getDailyCustomReportsWithHttpInfo(new GetDailyCustomReportsOptionalParameters()).getData(); + } + + /** + * Get the list of available daily custom reports. + * + * See {@link #getDailyCustomReportsWithHttpInfoAsync}. + * + * @return CompletableFuture<UsageCustomReportsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetDailyCustomReportsAsync() { + return getDailyCustomReportsWithHttpInfoAsync(new GetDailyCustomReportsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get the list of available daily custom reports. + * + * See {@link #getDailyCustomReportsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return UsageCustomReportsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageCustomReportsResponse getDailyCustomReports(GetDailyCustomReportsOptionalParameters parameters) throws ApiException { return getDailyCustomReportsWithHttpInfo(parameters).getData(); } /** - * Get the list of available daily custom reports. - * - *

See {@link #getDailyCustomReportsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageCustomReportsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getDailyCustomReportsAsync( - GetDailyCustomReportsOptionalParameters parameters) { - return getDailyCustomReportsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get the list of available daily custom reports. + * + * See {@link #getDailyCustomReportsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageCustomReportsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetDailyCustomReportsAsync(GetDailyCustomReportsOptionalParameters parameters) { + return getDailyCustomReportsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get daily custom reports. Note: This endpoint will be fully deprecated on - * December 1, 2022. Refer to Migrating - * from v1 to v2 of the Usage Attribution API for the associated migration guide. + *

Get daily custom reports. + * Note: This endpoint will be fully deprecated on December 1, 2022. + * Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.

* * @param parameters Optional parameters for the request. * @return ApiResponse<UsageCustomReportsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden - User is not authorized -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse getDailyCustomReportsWithHttpInfo( - GetDailyCustomReportsOptionalParameters parameters) throws ApiException { + public ApiResponse getDailyCustomReportsWithHttpInfo(GetDailyCustomReportsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -240,6 +231,7 @@ public ApiResponse getDailyCustomReportsWithHttpInfo // create path and map variables String localVarPath = "/api/v1/daily_custom_reports"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -248,38 +240,21 @@ public ApiResponse getDailyCustomReportsWithHttpInfo localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_dir", sortDir)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getDailyCustomReports", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getDailyCustomReports", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the list of available daily custom reports. * - *

See {@link #getDailyCustomReportsWithHttpInfo}. + * See {@link #getDailyCustomReportsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageCustomReportsResponse>> * @deprecated */ @Deprecated - public CompletableFuture> - getDailyCustomReportsWithHttpInfoAsync(GetDailyCustomReportsOptionalParameters parameters) { + public CompletableFuture> getDailyCustomReportsWithHttpInfoAsync(GetDailyCustomReportsOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -288,6 +263,7 @@ public ApiResponse getDailyCustomReportsWithHttpInfo // create path and map variables String localVarPath = "/api/v1/daily_custom_reports"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -298,32 +274,18 @@ public ApiResponse getDailyCustomReportsWithHttpInfo Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getDailyCustomReports", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getDailyCustomReports", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getHourlyUsageAttribution. */ + /** + * Manage optional parameters to getHourlyUsageAttribution. + */ public static class GetHourlyUsageAttributionOptionalParameters { private OffsetDateTime endHr; private String nextRecordId; @@ -332,9 +294,7 @@ public static class GetHourlyUsageAttributionOptionalParameters { /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetHourlyUsageAttributionOptionalParameters */ public GetHourlyUsageAttributionOptionalParameters endHr(OffsetDateTime endHr) { @@ -344,9 +304,7 @@ public GetHourlyUsageAttributionOptionalParameters endHr(OffsetDateTime endHr) { /** * Set nextRecordId. - * - * @param nextRecordId List following results with a next_record_id provided in the previous - * query. (optional) + * @param nextRecordId List following results with a next_record_id provided in the previous query. (optional) * @return GetHourlyUsageAttributionOptionalParameters */ public GetHourlyUsageAttributionOptionalParameters nextRecordId(String nextRecordId) { @@ -356,10 +314,7 @@ public GetHourlyUsageAttributionOptionalParameters nextRecordId(String nextRecor /** * Set tagBreakdownKeys. - * - * @param tagBreakdownKeys Comma separated list of tags used to group usage. If no value is - * provided the usage will not be broken down by tags. To see which tags are available, look - * for the value of tag_config_source in the API response. (optional) + * @param tagBreakdownKeys Comma separated list of tags used to group usage. If no value is provided the usage will not be broken down by tags. To see which tags are available, look for the value of tag_config_source in the API response. (optional) * @return GetHourlyUsageAttributionOptionalParameters */ public GetHourlyUsageAttributionOptionalParameters tagBreakdownKeys(String tagBreakdownKeys) { @@ -369,121 +324,96 @@ public GetHourlyUsageAttributionOptionalParameters tagBreakdownKeys(String tagBr /** * Set includeDescendants. - * - * @param includeDescendants Include child org usage in the response. Defaults to true - * . (optional, default to true) + * @param includeDescendants Include child org usage in the response. Defaults to true. (optional, default to true) * @return GetHourlyUsageAttributionOptionalParameters */ - public GetHourlyUsageAttributionOptionalParameters includeDescendants( - Boolean includeDescendants) { + public GetHourlyUsageAttributionOptionalParameters includeDescendants(Boolean includeDescendants) { this.includeDescendants = includeDescendants; return this; } } /** - * Get hourly usage attribution. - * - *

See {@link #getHourlyUsageAttributionWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param usageType Usage type to retrieve. (required) - * @return HourlyUsageAttributionResponse - * @throws ApiException if fails to make API call - */ - public HourlyUsageAttributionResponse getHourlyUsageAttribution( - OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType) throws ApiException { - return getHourlyUsageAttributionWithHttpInfo( - startHr, usageType, new GetHourlyUsageAttributionOptionalParameters()) - .getData(); - } - - /** - * Get hourly usage attribution. - * - *

See {@link #getHourlyUsageAttributionWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param usageType Usage type to retrieve. (required) - * @return CompletableFuture<HourlyUsageAttributionResponse> - */ - public CompletableFuture getHourlyUsageAttributionAsync( - OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType) { - return getHourlyUsageAttributionWithHttpInfoAsync( - startHr, usageType, new GetHourlyUsageAttributionOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage attribution. - * - *

See {@link #getHourlyUsageAttributionWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param usageType Usage type to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return HourlyUsageAttributionResponse - * @throws ApiException if fails to make API call - */ - public HourlyUsageAttributionResponse getHourlyUsageAttribution( - OffsetDateTime startHr, - HourlyUsageAttributionUsageType usageType, - GetHourlyUsageAttributionOptionalParameters parameters) - throws ApiException { + * Get hourly usage attribution. + * + * See {@link #getHourlyUsageAttributionWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param usageType Usage type to retrieve. (required) + * @return HourlyUsageAttributionResponse + * @throws ApiException if fails to make API call + */ + public HourlyUsageAttributionResponse getHourlyUsageAttribution (OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType) throws ApiException { + return getHourlyUsageAttributionWithHttpInfo( startHr, usageType, new GetHourlyUsageAttributionOptionalParameters()).getData(); + } + + /** + * Get hourly usage attribution. + * + * See {@link #getHourlyUsageAttributionWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param usageType Usage type to retrieve. (required) + * @return CompletableFuture<HourlyUsageAttributionResponse> + */ + public CompletableFuturegetHourlyUsageAttributionAsync(OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType) { + return getHourlyUsageAttributionWithHttpInfoAsync(startHr, usageType, new GetHourlyUsageAttributionOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get hourly usage attribution. + * + * See {@link #getHourlyUsageAttributionWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param usageType Usage type to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return HourlyUsageAttributionResponse + * @throws ApiException if fails to make API call + */ + public HourlyUsageAttributionResponse getHourlyUsageAttribution(OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType, GetHourlyUsageAttributionOptionalParameters parameters) throws ApiException { return getHourlyUsageAttributionWithHttpInfo(startHr, usageType, parameters).getData(); } /** - * Get hourly usage attribution. - * - *

See {@link #getHourlyUsageAttributionWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param usageType Usage type to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HourlyUsageAttributionResponse> - */ - public CompletableFuture getHourlyUsageAttributionAsync( - OffsetDateTime startHr, - HourlyUsageAttributionUsageType usageType, - GetHourlyUsageAttributionOptionalParameters parameters) { - return getHourlyUsageAttributionWithHttpInfoAsync(startHr, usageType, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage attribution. + * + * See {@link #getHourlyUsageAttributionWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param usageType Usage type to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HourlyUsageAttributionResponse> + */ + public CompletableFuturegetHourlyUsageAttributionAsync( OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType, GetHourlyUsageAttributionOptionalParameters parameters) { + return getHourlyUsageAttributionWithHttpInfoAsync(startHr, usageType, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get hourly usage attribution. - * - *

This API endpoint is paginated. To make sure you receive all records, check if the value of - * next_record_id is set in the response. If it is, make another request and pass - * next_record_id as a parameter. Pseudo code example: - * + *

Get hourly usage attribution.

+ *

This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id is + * set in the response. If it is, make another request and pass next_record_id as a parameter. + * Pseudo code example:

*

response := GetHourlyUsageAttribution(start_month) * cursor := response.metadata.pagination.next_record_id * WHILE cursor != null BEGIN * sleep(5 seconds) # Avoid running into rate limit * response := GetHourlyUsageAttribution(start_month, next_record_id=cursor) * cursor := response.metadata.pagination.next_record_id - * END + * END

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param usageType Usage type to retrieve. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<HourlyUsageAttributionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -491,23 +421,17 @@ public CompletableFuture getHourlyUsageAttributi * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getHourlyUsageAttributionWithHttpInfo( - OffsetDateTime startHr, - HourlyUsageAttributionUsageType usageType, - GetHourlyUsageAttributionOptionalParameters parameters) - throws ApiException { + public ApiResponse getHourlyUsageAttributionWithHttpInfo(OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType, GetHourlyUsageAttributionOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getHourlyUsageAttribution"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getHourlyUsageAttribution"); } // verify the required parameter 'usageType' is set if (usageType == null) { - throw new ApiException( - 400, "Missing the required parameter 'usageType' when calling getHourlyUsageAttribution"); + throw new ApiException(400, "Missing the required parameter 'usageType' when calling getHourlyUsageAttribution"); } OffsetDateTime endHr = parameters.endHr; String nextRecordId = parameters.nextRecordId; @@ -516,6 +440,7 @@ public ApiResponse getHourlyUsageAttributionWith // create path and map variables String localVarPath = "/api/v1/usage/hourly-attribution"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -523,69 +448,38 @@ public ApiResponse getHourlyUsageAttributionWith localVarQueryParams.addAll(apiClient.parameterToPairs("", "usage_type", usageType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "next_record_id", nextRecordId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_descendants", includeDescendants)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getHourlyUsageAttribution", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_descendants", includeDescendants)); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getHourlyUsageAttribution", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage attribution. * - *

See {@link #getHourlyUsageAttributionWithHttpInfo}. + * See {@link #getHourlyUsageAttributionWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param usageType Usage type to retrieve. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HourlyUsageAttributionResponse>> */ - public CompletableFuture> - getHourlyUsageAttributionWithHttpInfoAsync( - OffsetDateTime startHr, - HourlyUsageAttributionUsageType usageType, - GetHourlyUsageAttributionOptionalParameters parameters) { + public CompletableFuture> getHourlyUsageAttributionWithHttpInfoAsync(OffsetDateTime startHr, HourlyUsageAttributionUsageType usageType, GetHourlyUsageAttributionOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling getHourlyUsageAttribution")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getHourlyUsageAttribution")); + return result; } // verify the required parameter 'usageType' is set if (usageType == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'usageType' when calling getHourlyUsageAttribution")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'usageType' when calling getHourlyUsageAttribution")); + return result; } OffsetDateTime endHr = parameters.endHr; String nextRecordId = parameters.nextRecordId; @@ -594,6 +488,7 @@ public ApiResponse getHourlyUsageAttributionWith // create path and map variables String localVarPath = "/api/v1/usage/hourly-attribution"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -601,48 +496,29 @@ public ApiResponse getHourlyUsageAttributionWith localVarQueryParams.addAll(apiClient.parameterToPairs("", "usage_type", usageType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "next_record_id", nextRecordId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_descendants", includeDescendants)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_descendants", includeDescendants)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getHourlyUsageAttribution", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getHourlyUsageAttribution", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getIncidentManagement. */ + /** + * Manage optional parameters to getIncidentManagement. + */ public static class GetIncidentManagementOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetIncidentManagementOptionalParameters */ public GetIncidentManagementOptionalParameters endHr(OffsetDateTime endHr) { @@ -652,91 +528,72 @@ public GetIncidentManagementOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for incident management. - * - *

See {@link #getIncidentManagementWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageIncidentManagementResponse - * @throws ApiException if fails to make API call - */ - public UsageIncidentManagementResponse getIncidentManagement(OffsetDateTime startHr) - throws ApiException { - return getIncidentManagementWithHttpInfo(startHr, new GetIncidentManagementOptionalParameters()) - .getData(); + * Get hourly usage for incident management. + * + * See {@link #getIncidentManagementWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageIncidentManagementResponse + * @throws ApiException if fails to make API call + */ + public UsageIncidentManagementResponse getIncidentManagement (OffsetDateTime startHr) throws ApiException { + return getIncidentManagementWithHttpInfo( startHr, new GetIncidentManagementOptionalParameters()).getData(); } /** - * Get hourly usage for incident management. - * - *

See {@link #getIncidentManagementWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageIncidentManagementResponse> - */ - public CompletableFuture getIncidentManagementAsync( - OffsetDateTime startHr) { - return getIncidentManagementWithHttpInfoAsync( - startHr, new GetIncidentManagementOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for incident management. + * + * See {@link #getIncidentManagementWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageIncidentManagementResponse> + */ + public CompletableFuturegetIncidentManagementAsync(OffsetDateTime startHr) { + return getIncidentManagementWithHttpInfoAsync(startHr, new GetIncidentManagementOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for incident management. - * - *

See {@link #getIncidentManagementWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageIncidentManagementResponse - * @throws ApiException if fails to make API call - */ - public UsageIncidentManagementResponse getIncidentManagement( - OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) - throws ApiException { + * Get hourly usage for incident management. + * + * See {@link #getIncidentManagementWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageIncidentManagementResponse + * @throws ApiException if fails to make API call + */ + public UsageIncidentManagementResponse getIncidentManagement(OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) throws ApiException { return getIncidentManagementWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for incident management. - * - *

See {@link #getIncidentManagementWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageIncidentManagementResponse> - */ - public CompletableFuture getIncidentManagementAsync( - OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) { - return getIncidentManagementWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for incident management. Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for incident management. + * + * See {@link #getIncidentManagementWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageIncidentManagementResponse> + */ + public CompletableFuturegetIncidentManagementAsync( OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) { + return getIncidentManagementWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for incident management. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageIncidentManagementResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -745,74 +602,51 @@ public CompletableFuture getIncidentManagementA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getIncidentManagementWithHttpInfo( - OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) - throws ApiException { + public ApiResponse getIncidentManagementWithHttpInfo(OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getIncidentManagement"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getIncidentManagement"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/incident-management"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getIncidentManagement", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getIncidentManagement", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for incident management. * - *

See {@link #getIncidentManagementWithHttpInfo}. + * See {@link #getIncidentManagementWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageIncidentManagementResponse>> */ - public CompletableFuture> - getIncidentManagementWithHttpInfoAsync( - OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) { + public CompletableFuture> getIncidentManagementWithHttpInfoAsync(OffsetDateTime startHr, GetIncidentManagementOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getIncidentManagement")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getIncidentManagement")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/incident-management"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -821,41 +655,24 @@ public ApiResponse getIncidentManagementWithHtt Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getIncidentManagement", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getIncidentManagement", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getIngestedSpans. */ + /** + * Manage optional parameters to getIngestedSpans. + */ public static class GetIngestedSpansOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetIngestedSpansOptionalParameters */ public GetIngestedSpansOptionalParameters endHr(OffsetDateTime endHr) { @@ -865,88 +682,72 @@ public GetIngestedSpansOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for ingested spans. - * - *

See {@link #getIngestedSpansWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageIngestedSpansResponse - * @throws ApiException if fails to make API call - */ - public UsageIngestedSpansResponse getIngestedSpans(OffsetDateTime startHr) throws ApiException { - return getIngestedSpansWithHttpInfo(startHr, new GetIngestedSpansOptionalParameters()) - .getData(); + * Get hourly usage for ingested spans. + * + * See {@link #getIngestedSpansWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageIngestedSpansResponse + * @throws ApiException if fails to make API call + */ + public UsageIngestedSpansResponse getIngestedSpans (OffsetDateTime startHr) throws ApiException { + return getIngestedSpansWithHttpInfo( startHr, new GetIngestedSpansOptionalParameters()).getData(); } /** - * Get hourly usage for ingested spans. - * - *

See {@link #getIngestedSpansWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageIngestedSpansResponse> - */ - public CompletableFuture getIngestedSpansAsync( - OffsetDateTime startHr) { - return getIngestedSpansWithHttpInfoAsync(startHr, new GetIngestedSpansOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for ingested spans. + * + * See {@link #getIngestedSpansWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageIngestedSpansResponse> + */ + public CompletableFuturegetIngestedSpansAsync(OffsetDateTime startHr) { + return getIngestedSpansWithHttpInfoAsync(startHr, new GetIngestedSpansOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for ingested spans. - * - *

See {@link #getIngestedSpansWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageIngestedSpansResponse - * @throws ApiException if fails to make API call - */ - public UsageIngestedSpansResponse getIngestedSpans( - OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) throws ApiException { + * Get hourly usage for ingested spans. + * + * See {@link #getIngestedSpansWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageIngestedSpansResponse + * @throws ApiException if fails to make API call + */ + public UsageIngestedSpansResponse getIngestedSpans(OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) throws ApiException { return getIngestedSpansWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for ingested spans. - * - *

See {@link #getIngestedSpansWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageIngestedSpansResponse> - */ - public CompletableFuture getIngestedSpansAsync( - OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) { - return getIngestedSpansWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for ingested spans. Note: hourly usage data for all products - * is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for ingested spans. + * + * See {@link #getIngestedSpansWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageIngestedSpansResponse> + */ + public CompletableFuturegetIngestedSpansAsync( OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) { + return getIngestedSpansWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for ingested spans. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageIngestedSpansResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -955,72 +756,51 @@ public CompletableFuture getIngestedSpansAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getIngestedSpansWithHttpInfo( - OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) throws ApiException { + public ApiResponse getIngestedSpansWithHttpInfo(OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getIngestedSpans"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getIngestedSpans"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/ingested-spans"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getIngestedSpans", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getIngestedSpans", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for ingested spans. * - *

See {@link #getIngestedSpansWithHttpInfo}. + * See {@link #getIngestedSpansWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageIngestedSpansResponse>> */ - public CompletableFuture> - getIngestedSpansWithHttpInfoAsync( - OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) { + public CompletableFuture> getIngestedSpansWithHttpInfoAsync(OffsetDateTime startHr, GetIngestedSpansOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getIngestedSpans")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getIngestedSpans")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/ingested-spans"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1029,32 +809,18 @@ public ApiResponse getIngestedSpansWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getIngestedSpans", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getIngestedSpans", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getMonthlyCustomReports. */ + /** + * Manage optional parameters to getMonthlyCustomReports. + */ public static class GetMonthlyCustomReportsOptionalParameters { private Long pageSize; private Long pageNumber; @@ -1063,9 +829,7 @@ public static class GetMonthlyCustomReportsOptionalParameters { /** * Set pageSize. - * - * @param pageSize The number of files to return in the response [default=60]. - * (optional) + * @param pageSize The number of files to return in the response [default=60]. (optional) * @return GetMonthlyCustomReportsOptionalParameters */ public GetMonthlyCustomReportsOptionalParameters pageSize(Long pageSize) { @@ -1075,9 +839,7 @@ public GetMonthlyCustomReportsOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * - * @param pageNumber The identifier of the first page to return. This parameter is used for the - * pagination feature [default=0]. (optional) + * @param pageNumber The identifier of the first page to return. This parameter is used for the pagination feature [default=0]. (optional) * @return GetMonthlyCustomReportsOptionalParameters */ public GetMonthlyCustomReportsOptionalParameters pageNumber(Long pageNumber) { @@ -1087,9 +849,7 @@ public GetMonthlyCustomReportsOptionalParameters pageNumber(Long pageNumber) { /** * Set sortDir. - * - * @param sortDir The direction to sort by: [desc, asc]. (optional, default to - * "desc") + * @param sortDir The direction to sort by: [desc, asc]. (optional, default to "desc") * @return GetMonthlyCustomReportsOptionalParameters */ public GetMonthlyCustomReportsOptionalParameters sortDir(UsageSortDirection sortDir) { @@ -1099,9 +859,7 @@ public GetMonthlyCustomReportsOptionalParameters sortDir(UsageSortDirection sort /** * Set sort. - * - * @param sort The field to sort by: [computed_on, size, start_date, end_date]. - * (optional, default to "start_date") + * @param sort The field to sort by: [computed_on, size, start_date, end_date]. (optional, default to "start_date") * @return GetMonthlyCustomReportsOptionalParameters */ public GetMonthlyCustomReportsOptionalParameters sort(UsageSort sort) { @@ -1111,95 +869,86 @@ public GetMonthlyCustomReportsOptionalParameters sort(UsageSort sort) { } /** - * Get the list of available monthly custom reports. - * - *

See {@link #getMonthlyCustomReportsWithHttpInfo}. - * - * @return UsageCustomReportsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageCustomReportsResponse getMonthlyCustomReports() throws ApiException { - return getMonthlyCustomReportsWithHttpInfo(new GetMonthlyCustomReportsOptionalParameters()) - .getData(); - } - - /** - * Get the list of available monthly custom reports. - * - *

See {@link #getMonthlyCustomReportsWithHttpInfoAsync}. - * - * @return CompletableFuture<UsageCustomReportsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getMonthlyCustomReportsAsync() { - return getMonthlyCustomReportsWithHttpInfoAsync(new GetMonthlyCustomReportsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get the list of available monthly custom reports. - * - *

See {@link #getMonthlyCustomReportsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return UsageCustomReportsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageCustomReportsResponse getMonthlyCustomReports( - GetMonthlyCustomReportsOptionalParameters parameters) throws ApiException { + * Get the list of available monthly custom reports. + * + * See {@link #getMonthlyCustomReportsWithHttpInfo}. + * + * @return UsageCustomReportsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageCustomReportsResponse getMonthlyCustomReports () throws ApiException { + return getMonthlyCustomReportsWithHttpInfo(new GetMonthlyCustomReportsOptionalParameters()).getData(); + } + + /** + * Get the list of available monthly custom reports. + * + * See {@link #getMonthlyCustomReportsWithHttpInfoAsync}. + * + * @return CompletableFuture<UsageCustomReportsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetMonthlyCustomReportsAsync() { + return getMonthlyCustomReportsWithHttpInfoAsync(new GetMonthlyCustomReportsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get the list of available monthly custom reports. + * + * See {@link #getMonthlyCustomReportsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return UsageCustomReportsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageCustomReportsResponse getMonthlyCustomReports(GetMonthlyCustomReportsOptionalParameters parameters) throws ApiException { return getMonthlyCustomReportsWithHttpInfo(parameters).getData(); } /** - * Get the list of available monthly custom reports. - * - *

See {@link #getMonthlyCustomReportsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageCustomReportsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getMonthlyCustomReportsAsync( - GetMonthlyCustomReportsOptionalParameters parameters) { - return getMonthlyCustomReportsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get the list of available monthly custom reports. + * + * See {@link #getMonthlyCustomReportsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageCustomReportsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetMonthlyCustomReportsAsync(GetMonthlyCustomReportsOptionalParameters parameters) { + return getMonthlyCustomReportsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get monthly custom reports. Note: This endpoint will be fully deprecated on - * December 1, 2022. Refer to Migrating - * from v1 to v2 of the Usage Attribution API for the associated migration guide. + *

Get monthly custom reports. + * Note: This endpoint will be fully deprecated on December 1, 2022. + * Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.

* * @param parameters Optional parameters for the request. * @return ApiResponse<UsageCustomReportsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden - User is not authorized -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse getMonthlyCustomReportsWithHttpInfo( - GetMonthlyCustomReportsOptionalParameters parameters) throws ApiException { + public ApiResponse getMonthlyCustomReportsWithHttpInfo(GetMonthlyCustomReportsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1208,6 +957,7 @@ public ApiResponse getMonthlyCustomReportsWithHttpIn // create path and map variables String localVarPath = "/api/v1/monthly_custom_reports"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1216,39 +966,21 @@ public ApiResponse getMonthlyCustomReportsWithHttpIn localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_dir", sortDir)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getMonthlyCustomReports", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getMonthlyCustomReports", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the list of available monthly custom reports. * - *

See {@link #getMonthlyCustomReportsWithHttpInfo}. + * See {@link #getMonthlyCustomReportsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageCustomReportsResponse>> * @deprecated */ @Deprecated - public CompletableFuture> - getMonthlyCustomReportsWithHttpInfoAsync( - GetMonthlyCustomReportsOptionalParameters parameters) { + public CompletableFuture> getMonthlyCustomReportsWithHttpInfoAsync(GetMonthlyCustomReportsOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1257,6 +989,7 @@ public ApiResponse getMonthlyCustomReportsWithHttpIn // create path and map variables String localVarPath = "/api/v1/monthly_custom_reports"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1267,32 +1000,18 @@ public ApiResponse getMonthlyCustomReportsWithHttpIn Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getMonthlyCustomReports", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getMonthlyCustomReports", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getMonthlyUsageAttribution. */ + /** + * Manage optional parameters to getMonthlyUsageAttribution. + */ public static class GetMonthlyUsageAttributionOptionalParameters { private OffsetDateTime endMonth; private UsageSortDirection sortDirection; @@ -1303,9 +1022,7 @@ public static class GetMonthlyUsageAttributionOptionalParameters { /** * Set endMonth. - * - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage ending this month. (optional) + * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month. (optional) * @return GetMonthlyUsageAttributionOptionalParameters */ public GetMonthlyUsageAttributionOptionalParameters endMonth(OffsetDateTime endMonth) { @@ -1315,35 +1032,27 @@ public GetMonthlyUsageAttributionOptionalParameters endMonth(OffsetDateTime endM /** * Set sortDirection. - * - * @param sortDirection The direction to sort by: [desc, asc]. (optional, default - * to "desc") + * @param sortDirection The direction to sort by: [desc, asc]. (optional, default to "desc") * @return GetMonthlyUsageAttributionOptionalParameters */ - public GetMonthlyUsageAttributionOptionalParameters sortDirection( - UsageSortDirection sortDirection) { + public GetMonthlyUsageAttributionOptionalParameters sortDirection(UsageSortDirection sortDirection) { this.sortDirection = sortDirection; return this; } /** * Set sortName. - * * @param sortName The field to sort by. (optional) * @return GetMonthlyUsageAttributionOptionalParameters */ - public GetMonthlyUsageAttributionOptionalParameters sortName( - MonthlyUsageAttributionSupportedMetrics sortName) { + public GetMonthlyUsageAttributionOptionalParameters sortName(MonthlyUsageAttributionSupportedMetrics sortName) { this.sortName = sortName; return this; } /** * Set tagBreakdownKeys. - * - * @param tagBreakdownKeys Comma separated list of tag keys used to group usage. If no value is - * provided the usage will not be broken down by tags. To see which tags are available, look - * for the value of tag_config_source in the API response. (optional) + * @param tagBreakdownKeys Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags. To see which tags are available, look for the value of tag_config_source in the API response. (optional) * @return GetMonthlyUsageAttributionOptionalParameters */ public GetMonthlyUsageAttributionOptionalParameters tagBreakdownKeys(String tagBreakdownKeys) { @@ -1353,9 +1062,7 @@ public GetMonthlyUsageAttributionOptionalParameters tagBreakdownKeys(String tagB /** * Set nextRecordId. - * - * @param nextRecordId List following results with a next_record_id provided in the previous - * query. (optional) + * @param nextRecordId List following results with a next_record_id provided in the previous query. (optional) * @return GetMonthlyUsageAttributionOptionalParameters */ public GetMonthlyUsageAttributionOptionalParameters nextRecordId(String nextRecordId) { @@ -1365,127 +1072,96 @@ public GetMonthlyUsageAttributionOptionalParameters nextRecordId(String nextReco /** * Set includeDescendants. - * - * @param includeDescendants Include child org usage in the response. Defaults to true - * . (optional, default to true) + * @param includeDescendants Include child org usage in the response. Defaults to true. (optional, default to true) * @return GetMonthlyUsageAttributionOptionalParameters */ - public GetMonthlyUsageAttributionOptionalParameters includeDescendants( - Boolean includeDescendants) { + public GetMonthlyUsageAttributionOptionalParameters includeDescendants(Boolean includeDescendants) { this.includeDescendants = includeDescendants; return this; } } /** - * Get monthly usage attribution. - * - *

See {@link #getMonthlyUsageAttributionWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @return MonthlyUsageAttributionResponse - * @throws ApiException if fails to make API call - */ - public MonthlyUsageAttributionResponse getMonthlyUsageAttribution( - OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields) - throws ApiException { - return getMonthlyUsageAttributionWithHttpInfo( - startMonth, fields, new GetMonthlyUsageAttributionOptionalParameters()) - .getData(); - } - - /** - * Get monthly usage attribution. - * - *

See {@link #getMonthlyUsageAttributionWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @return CompletableFuture<MonthlyUsageAttributionResponse> - */ - public CompletableFuture getMonthlyUsageAttributionAsync( - OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields) { - return getMonthlyUsageAttributionWithHttpInfoAsync( - startMonth, fields, new GetMonthlyUsageAttributionOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get monthly usage attribution. - * - *

See {@link #getMonthlyUsageAttributionWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @param parameters Optional parameters for the request. - * @return MonthlyUsageAttributionResponse - * @throws ApiException if fails to make API call - */ - public MonthlyUsageAttributionResponse getMonthlyUsageAttribution( - OffsetDateTime startMonth, - MonthlyUsageAttributionSupportedMetrics fields, - GetMonthlyUsageAttributionOptionalParameters parameters) - throws ApiException { + * Get monthly usage attribution. + * + * See {@link #getMonthlyUsageAttributionWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @return MonthlyUsageAttributionResponse + * @throws ApiException if fails to make API call + */ + public MonthlyUsageAttributionResponse getMonthlyUsageAttribution (OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields) throws ApiException { + return getMonthlyUsageAttributionWithHttpInfo( startMonth, fields, new GetMonthlyUsageAttributionOptionalParameters()).getData(); + } + + /** + * Get monthly usage attribution. + * + * See {@link #getMonthlyUsageAttributionWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @return CompletableFuture<MonthlyUsageAttributionResponse> + */ + public CompletableFuturegetMonthlyUsageAttributionAsync(OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields) { + return getMonthlyUsageAttributionWithHttpInfoAsync(startMonth, fields, new GetMonthlyUsageAttributionOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get monthly usage attribution. + * + * See {@link #getMonthlyUsageAttributionWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @param parameters Optional parameters for the request. + * @return MonthlyUsageAttributionResponse + * @throws ApiException if fails to make API call + */ + public MonthlyUsageAttributionResponse getMonthlyUsageAttribution(OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields, GetMonthlyUsageAttributionOptionalParameters parameters) throws ApiException { return getMonthlyUsageAttributionWithHttpInfo(startMonth, fields, parameters).getData(); } /** - * Get monthly usage attribution. - * - *

See {@link #getMonthlyUsageAttributionWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MonthlyUsageAttributionResponse> - */ - public CompletableFuture getMonthlyUsageAttributionAsync( - OffsetDateTime startMonth, - MonthlyUsageAttributionSupportedMetrics fields, - GetMonthlyUsageAttributionOptionalParameters parameters) { - return getMonthlyUsageAttributionWithHttpInfoAsync(startMonth, fields, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get monthly usage attribution. + * + * See {@link #getMonthlyUsageAttributionWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MonthlyUsageAttributionResponse> + */ + public CompletableFuturegetMonthlyUsageAttributionAsync( OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields, GetMonthlyUsageAttributionOptionalParameters parameters) { + return getMonthlyUsageAttributionWithHttpInfoAsync(startMonth, fields, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get monthly usage attribution. - * - *

This API endpoint is paginated. To make sure you receive all records, check if the value of - * next_record_id is set in the response. If it is, make another request and pass - * next_record_id as a parameter. Pseudo code example: - * + *

Get monthly usage attribution.

+ *

This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id is + * set in the response. If it is, make another request and pass next_record_id as a parameter. + * Pseudo code example:

*

response := GetMonthlyUsageAttribution(start_month) * cursor := response.metadata.pagination.next_record_id * WHILE cursor != null BEGIN * sleep(5 seconds) # Avoid running into rate limit * response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor) * cursor := response.metadata.pagination.next_record_id - * END + * END

* - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<MonthlyUsageAttributionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1493,24 +1169,17 @@ public CompletableFuture getMonthlyUsageAttribu * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getMonthlyUsageAttributionWithHttpInfo( - OffsetDateTime startMonth, - MonthlyUsageAttributionSupportedMetrics fields, - GetMonthlyUsageAttributionOptionalParameters parameters) - throws ApiException { + public ApiResponse getMonthlyUsageAttributionWithHttpInfo(OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields, GetMonthlyUsageAttributionOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - throw new ApiException( - 400, - "Missing the required parameter 'startMonth' when calling getMonthlyUsageAttribution"); + throw new ApiException(400, "Missing the required parameter 'startMonth' when calling getMonthlyUsageAttribution"); } // verify the required parameter 'fields' is set if (fields == null) { - throw new ApiException( - 400, "Missing the required parameter 'fields' when calling getMonthlyUsageAttribution"); + throw new ApiException(400, "Missing the required parameter 'fields' when calling getMonthlyUsageAttribution"); } OffsetDateTime endMonth = parameters.endMonth; UsageSortDirection sortDirection = parameters.sortDirection; @@ -1521,6 +1190,7 @@ public ApiResponse getMonthlyUsageAttributionWi // create path and map variables String localVarPath = "/api/v1/usage/monthly-attribution"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1529,72 +1199,39 @@ public ApiResponse getMonthlyUsageAttributionWi localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_direction", sortDirection)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_name", sortName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "next_record_id", nextRecordId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_descendants", includeDescendants)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getMonthlyUsageAttribution", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_descendants", includeDescendants)); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getMonthlyUsageAttribution", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get monthly usage attribution. * - *

See {@link #getMonthlyUsageAttributionWithHttpInfo}. + * See {@link #getMonthlyUsageAttributionWithHttpInfo}. * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MonthlyUsageAttributionResponse>> */ - public CompletableFuture> - getMonthlyUsageAttributionWithHttpInfoAsync( - OffsetDateTime startMonth, - MonthlyUsageAttributionSupportedMetrics fields, - GetMonthlyUsageAttributionOptionalParameters parameters) { + public CompletableFuture> getMonthlyUsageAttributionWithHttpInfoAsync(OffsetDateTime startMonth, MonthlyUsageAttributionSupportedMetrics fields, GetMonthlyUsageAttributionOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startMonth' when calling" - + " getMonthlyUsageAttribution")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startMonth' when calling getMonthlyUsageAttribution")); + return result; } // verify the required parameter 'fields' is set if (fields == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'fields' when calling getMonthlyUsageAttribution")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'fields' when calling getMonthlyUsageAttribution")); + return result; } OffsetDateTime endMonth = parameters.endMonth; UsageSortDirection sortDirection = parameters.sortDirection; @@ -1605,6 +1242,7 @@ public ApiResponse getMonthlyUsageAttributionWi // create path and map variables String localVarPath = "/api/v1/usage/monthly-attribution"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1613,86 +1251,63 @@ public ApiResponse getMonthlyUsageAttributionWi localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_direction", sortDirection)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_name", sortName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tag_breakdown_keys", tagBreakdownKeys)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "next_record_id", nextRecordId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_descendants", includeDescendants)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_descendants", includeDescendants)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getMonthlyUsageAttribution", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getMonthlyUsageAttribution", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get specified daily custom reports. - * - *

See {@link #getSpecifiedDailyCustomReportsWithHttpInfo}. - * - * @param reportId Date of the report in the format YYYY-MM-DD. (required) - * @return UsageSpecifiedCustomReportsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageSpecifiedCustomReportsResponse getSpecifiedDailyCustomReports(String reportId) - throws ApiException { + * Get specified daily custom reports. + * + * See {@link #getSpecifiedDailyCustomReportsWithHttpInfo}. + * + * @param reportId Date of the report in the format YYYY-MM-DD. (required) + * @return UsageSpecifiedCustomReportsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageSpecifiedCustomReportsResponse getSpecifiedDailyCustomReports(String reportId) throws ApiException { return getSpecifiedDailyCustomReportsWithHttpInfo(reportId).getData(); } /** - * Get specified daily custom reports. - * - *

See {@link #getSpecifiedDailyCustomReportsWithHttpInfoAsync}. - * - * @param reportId Date of the report in the format YYYY-MM-DD. (required) - * @return CompletableFuture<UsageSpecifiedCustomReportsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getSpecifiedDailyCustomReportsAsync( - String reportId) { - return getSpecifiedDailyCustomReportsWithHttpInfoAsync(reportId) - .thenApply( - response -> { - return response.getData(); - }); + * Get specified daily custom reports. + * + * See {@link #getSpecifiedDailyCustomReportsWithHttpInfoAsync}. + * + * @param reportId Date of the report in the format YYYY-MM-DD. (required) + * @return CompletableFuture<UsageSpecifiedCustomReportsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetSpecifiedDailyCustomReportsAsync(String reportId) { + return getSpecifiedDailyCustomReportsWithHttpInfoAsync(reportId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get specified daily custom reports. Note: This endpoint will be fully - * deprecated on December 1, 2022. Refer to Migrating - * from v1 to v2 of the Usage Attribution API for the associated migration guide. + *

Get specified daily custom reports. + * Note: This endpoint will be fully deprecated on December 1, 2022. + * Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.

* * @param reportId Date of the report in the format YYYY-MM-DD. (required) * @return ApiResponse<UsageSpecifiedCustomReportsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1700,153 +1315,108 @@ public CompletableFuture getSpecifiedDailyC * * *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse - getSpecifiedDailyCustomReportsWithHttpInfo(String reportId) throws ApiException { + public ApiResponse getSpecifiedDailyCustomReportsWithHttpInfo(String reportId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'reportId' is set if (reportId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'reportId' when calling getSpecifiedDailyCustomReports"); + throw new ApiException(400, "Missing the required parameter 'reportId' when calling getSpecifiedDailyCustomReports"); } // create path and map variables - String localVarPath = - "/api/v1/daily_custom_reports/{report_id}" - .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + String localVarPath = "/api/v1/daily_custom_reports/{report_id}" + .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getSpecifiedDailyCustomReports", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getSpecifiedDailyCustomReports", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get specified daily custom reports. * - *

See {@link #getSpecifiedDailyCustomReportsWithHttpInfo}. + * See {@link #getSpecifiedDailyCustomReportsWithHttpInfo}. * * @param reportId Date of the report in the format YYYY-MM-DD. (required) * @return CompletableFuture<ApiResponse<UsageSpecifiedCustomReportsResponse>> * @deprecated */ @Deprecated - public CompletableFuture> - getSpecifiedDailyCustomReportsWithHttpInfoAsync(String reportId) { + public CompletableFuture> getSpecifiedDailyCustomReportsWithHttpInfoAsync(String reportId) { Object localVarPostBody = null; // verify the required parameter 'reportId' is set if (reportId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'reportId' when calling" - + " getSpecifiedDailyCustomReports")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'reportId' when calling getSpecifiedDailyCustomReports")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/daily_custom_reports/{report_id}" - .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + String localVarPath = "/api/v1/daily_custom_reports/{report_id}" + .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getSpecifiedDailyCustomReports", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getSpecifiedDailyCustomReports", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get specified monthly custom reports. - * - *

See {@link #getSpecifiedMonthlyCustomReportsWithHttpInfo}. - * - * @param reportId Date of the report in the format YYYY-MM-DD. (required) - * @return UsageSpecifiedCustomReportsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageSpecifiedCustomReportsResponse getSpecifiedMonthlyCustomReports(String reportId) - throws ApiException { + * Get specified monthly custom reports. + * + * See {@link #getSpecifiedMonthlyCustomReportsWithHttpInfo}. + * + * @param reportId Date of the report in the format YYYY-MM-DD. (required) + * @return UsageSpecifiedCustomReportsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageSpecifiedCustomReportsResponse getSpecifiedMonthlyCustomReports(String reportId) throws ApiException { return getSpecifiedMonthlyCustomReportsWithHttpInfo(reportId).getData(); } /** - * Get specified monthly custom reports. - * - *

See {@link #getSpecifiedMonthlyCustomReportsWithHttpInfoAsync}. - * - * @param reportId Date of the report in the format YYYY-MM-DD. (required) - * @return CompletableFuture<UsageSpecifiedCustomReportsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture - getSpecifiedMonthlyCustomReportsAsync(String reportId) { - return getSpecifiedMonthlyCustomReportsWithHttpInfoAsync(reportId) - .thenApply( - response -> { - return response.getData(); - }); + * Get specified monthly custom reports. + * + * See {@link #getSpecifiedMonthlyCustomReportsWithHttpInfoAsync}. + * + * @param reportId Date of the report in the format YYYY-MM-DD. (required) + * @return CompletableFuture<UsageSpecifiedCustomReportsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetSpecifiedMonthlyCustomReportsAsync(String reportId) { + return getSpecifiedMonthlyCustomReportsWithHttpInfoAsync(reportId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get specified monthly custom reports. Note: This endpoint will be fully - * deprecated on December 1, 2022. Refer to Migrating - * from v1 to v2 of the Usage Attribution API for the associated migration guide. + *

Get specified monthly custom reports. + * Note: This endpoint will be fully deprecated on December 1, 2022. + * Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.

* * @param reportId Date of the report in the format YYYY-MM-DD. (required) * @return ApiResponse<UsageSpecifiedCustomReportsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1855,117 +1425,75 @@ public UsageSpecifiedCustomReportsResponse getSpecifiedMonthlyCustomReports(Stri * * *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse - getSpecifiedMonthlyCustomReportsWithHttpInfo(String reportId) throws ApiException { + public ApiResponse getSpecifiedMonthlyCustomReportsWithHttpInfo(String reportId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'reportId' is set if (reportId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'reportId' when calling" - + " getSpecifiedMonthlyCustomReports"); + throw new ApiException(400, "Missing the required parameter 'reportId' when calling getSpecifiedMonthlyCustomReports"); } // create path and map variables - String localVarPath = - "/api/v1/monthly_custom_reports/{report_id}" - .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + String localVarPath = "/api/v1/monthly_custom_reports/{report_id}" + .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getSpecifiedMonthlyCustomReports", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getSpecifiedMonthlyCustomReports", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get specified monthly custom reports. * - *

See {@link #getSpecifiedMonthlyCustomReportsWithHttpInfo}. + * See {@link #getSpecifiedMonthlyCustomReportsWithHttpInfo}. * * @param reportId Date of the report in the format YYYY-MM-DD. (required) * @return CompletableFuture<ApiResponse<UsageSpecifiedCustomReportsResponse>> * @deprecated */ @Deprecated - public CompletableFuture> - getSpecifiedMonthlyCustomReportsWithHttpInfoAsync(String reportId) { + public CompletableFuture> getSpecifiedMonthlyCustomReportsWithHttpInfoAsync(String reportId) { Object localVarPostBody = null; // verify the required parameter 'reportId' is set if (reportId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'reportId' when calling" - + " getSpecifiedMonthlyCustomReports")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'reportId' when calling getSpecifiedMonthlyCustomReports")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/monthly_custom_reports/{report_id}" - .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + String localVarPath = "/api/v1/monthly_custom_reports/{report_id}" + .replaceAll("\\{" + "report_id" + "\\}", apiClient.escapeString(reportId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getSpecifiedMonthlyCustomReports", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getSpecifiedMonthlyCustomReports", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageAnalyzedLogs. */ + /** + * Manage optional parameters to getUsageAnalyzedLogs. + */ public static class GetUsageAnalyzedLogsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageAnalyzedLogsOptionalParameters */ public GetUsageAnalyzedLogsOptionalParameters endHr(OffsetDateTime endHr) { @@ -1975,91 +1503,72 @@ public GetUsageAnalyzedLogsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for analyzed logs. - * - *

See {@link #getUsageAnalyzedLogsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageAnalyzedLogsResponse - * @throws ApiException if fails to make API call - */ - public UsageAnalyzedLogsResponse getUsageAnalyzedLogs(OffsetDateTime startHr) - throws ApiException { - return getUsageAnalyzedLogsWithHttpInfo(startHr, new GetUsageAnalyzedLogsOptionalParameters()) - .getData(); + * Get hourly usage for analyzed logs. + * + * See {@link #getUsageAnalyzedLogsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageAnalyzedLogsResponse + * @throws ApiException if fails to make API call + */ + public UsageAnalyzedLogsResponse getUsageAnalyzedLogs (OffsetDateTime startHr) throws ApiException { + return getUsageAnalyzedLogsWithHttpInfo( startHr, new GetUsageAnalyzedLogsOptionalParameters()).getData(); } /** - * Get hourly usage for analyzed logs. - * - *

See {@link #getUsageAnalyzedLogsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageAnalyzedLogsResponse> - */ - public CompletableFuture getUsageAnalyzedLogsAsync( - OffsetDateTime startHr) { - return getUsageAnalyzedLogsWithHttpInfoAsync( - startHr, new GetUsageAnalyzedLogsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for analyzed logs. + * + * See {@link #getUsageAnalyzedLogsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageAnalyzedLogsResponse> + */ + public CompletableFuturegetUsageAnalyzedLogsAsync(OffsetDateTime startHr) { + return getUsageAnalyzedLogsWithHttpInfoAsync(startHr, new GetUsageAnalyzedLogsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for analyzed logs. - * - *

See {@link #getUsageAnalyzedLogsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageAnalyzedLogsResponse - * @throws ApiException if fails to make API call - */ - public UsageAnalyzedLogsResponse getUsageAnalyzedLogs( - OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) - throws ApiException { + * Get hourly usage for analyzed logs. + * + * See {@link #getUsageAnalyzedLogsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageAnalyzedLogsResponse + * @throws ApiException if fails to make API call + */ + public UsageAnalyzedLogsResponse getUsageAnalyzedLogs(OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) throws ApiException { return getUsageAnalyzedLogsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for analyzed logs. - * - *

See {@link #getUsageAnalyzedLogsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageAnalyzedLogsResponse> - */ - public CompletableFuture getUsageAnalyzedLogsAsync( - OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) { - return getUsageAnalyzedLogsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for analyzed logs (Security Monitoring). Note: hourly usage - * data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for analyzed logs. + * + * See {@link #getUsageAnalyzedLogsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageAnalyzedLogsResponse> + */ + public CompletableFuturegetUsageAnalyzedLogsAsync( OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) { + return getUsageAnalyzedLogsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for analyzed logs (Security Monitoring). + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageAnalyzedLogsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2068,73 +1577,51 @@ public CompletableFuture getUsageAnalyzedLogsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageAnalyzedLogsWithHttpInfo( - OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageAnalyzedLogsWithHttpInfo(OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageAnalyzedLogs"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageAnalyzedLogs"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/analyzed_logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageAnalyzedLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageAnalyzedLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for analyzed logs. * - *

See {@link #getUsageAnalyzedLogsWithHttpInfo}. + * See {@link #getUsageAnalyzedLogsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageAnalyzedLogsResponse>> */ - public CompletableFuture> - getUsageAnalyzedLogsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) { + public CompletableFuture> getUsageAnalyzedLogsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageAnalyzedLogsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageAnalyzedLogs")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageAnalyzedLogs")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/analyzed_logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2143,32 +1630,18 @@ public ApiResponse getUsageAnalyzedLogsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageAnalyzedLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageAnalyzedLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageAttribution. */ + /** + * Manage optional parameters to getUsageAttribution. + */ public static class GetUsageAttributionOptionalParameters { private OffsetDateTime endMonth; private UsageSortDirection sortDirection; @@ -2179,9 +1652,7 @@ public static class GetUsageAttributionOptionalParameters { /** * Set endMonth. - * - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage ending this month. (optional) + * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month. (optional) * @return GetUsageAttributionOptionalParameters */ public GetUsageAttributionOptionalParameters endMonth(OffsetDateTime endMonth) { @@ -2191,9 +1662,7 @@ public GetUsageAttributionOptionalParameters endMonth(OffsetDateTime endMonth) { /** * Set sortDirection. - * - * @param sortDirection The direction to sort by: [desc, asc]. (optional, default - * to "desc") + * @param sortDirection The direction to sort by: [desc, asc]. (optional, default to "desc") * @return GetUsageAttributionOptionalParameters */ public GetUsageAttributionOptionalParameters sortDirection(UsageSortDirection sortDirection) { @@ -2203,7 +1672,6 @@ public GetUsageAttributionOptionalParameters sortDirection(UsageSortDirection so /** * Set sortName. - * * @param sortName The field to sort by. (optional, default to "custom_timeseries_usage") * @return GetUsageAttributionOptionalParameters */ @@ -2214,9 +1682,7 @@ public GetUsageAttributionOptionalParameters sortName(UsageAttributionSort sortN /** * Set includeDescendants. - * - * @param includeDescendants Include child org usage in the response. Defaults to false. - * (optional, default to false) + * @param includeDescendants Include child org usage in the response. Defaults to false. (optional, default to false) * @return GetUsageAttributionOptionalParameters */ public GetUsageAttributionOptionalParameters includeDescendants(Boolean includeDescendants) { @@ -2226,7 +1692,6 @@ public GetUsageAttributionOptionalParameters includeDescendants(Boolean includeD /** * Set offset. - * * @param offset Number of records to skip before beginning to return. (optional, default to 0) * @return GetUsageAttributionOptionalParameters */ @@ -2237,7 +1702,6 @@ public GetUsageAttributionOptionalParameters offset(Long offset) { /** * Set limit. - * * @param limit Maximum number of records to be returned. (optional, default to 5000) * @return GetUsageAttributionOptionalParameters */ @@ -2248,139 +1712,106 @@ public GetUsageAttributionOptionalParameters limit(Long limit) { } /** - * Get usage attribution. - * - *

See {@link #getUsageAttributionWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @return UsageAttributionResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageAttributionResponse getUsageAttribution( - OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields) throws ApiException { - return getUsageAttributionWithHttpInfo( - startMonth, fields, new GetUsageAttributionOptionalParameters()) - .getData(); + * Get usage attribution. + * + * See {@link #getUsageAttributionWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @return UsageAttributionResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageAttributionResponse getUsageAttribution (OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields) throws ApiException { + return getUsageAttributionWithHttpInfo( startMonth, fields, new GetUsageAttributionOptionalParameters()).getData(); + } + + /** + * Get usage attribution. + * + * See {@link #getUsageAttributionWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @return CompletableFuture<UsageAttributionResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetUsageAttributionAsync(OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields) { + return getUsageAttributionWithHttpInfoAsync(startMonth, fields, new GetUsageAttributionOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get usage attribution. + * + * See {@link #getUsageAttributionWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @param parameters Optional parameters for the request. + * @return UsageAttributionResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageAttributionResponse getUsageAttribution(OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields, GetUsageAttributionOptionalParameters parameters) throws ApiException { + return getUsageAttributionWithHttpInfo(startMonth, fields, parameters).getData(); } /** - * Get usage attribution. - * - *

See {@link #getUsageAttributionWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @return CompletableFuture<UsageAttributionResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getUsageAttributionAsync( - OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields) { - return getUsageAttributionWithHttpInfoAsync( - startMonth, fields, new GetUsageAttributionOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get usage attribution. + * + * See {@link #getUsageAttributionWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageAttributionResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetUsageAttributionAsync( OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields, GetUsageAttributionOptionalParameters parameters) { + return getUsageAttributionWithHttpInfoAsync(startMonth, fields, parameters).thenApply(response -> { + return response.getData(); + }); } - /** - * Get usage attribution. - * - *

See {@link #getUsageAttributionWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @param parameters Optional parameters for the request. - * @return UsageAttributionResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageAttributionResponse getUsageAttribution( - OffsetDateTime startMonth, - UsageAttributionSupportedMetrics fields, - GetUsageAttributionOptionalParameters parameters) - throws ApiException { - return getUsageAttributionWithHttpInfo(startMonth, fields, parameters).getData(); - } /** - * Get usage attribution. + *

Get usage attribution. + * Note: This endpoint will be fully deprecated on December 1, 2022. + * Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.

* - *

See {@link #getUsageAttributionWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageAttributionResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getUsageAttributionAsync( - OffsetDateTime startMonth, - UsageAttributionSupportedMetrics fields, - GetUsageAttributionOptionalParameters parameters) { - return getUsageAttributionWithHttpInfoAsync(startMonth, fields, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get usage attribution. Note: This endpoint will be fully deprecated on - * December 1, 2022. Refer to Migrating - * from v1 to v2 of the Usage Attribution API for the associated migration guide. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageAttributionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden - User is not authorized -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse getUsageAttributionWithHttpInfo( - OffsetDateTime startMonth, - UsageAttributionSupportedMetrics fields, - GetUsageAttributionOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageAttributionWithHttpInfo(OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields, GetUsageAttributionOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - throw new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getUsageAttribution"); + throw new ApiException(400, "Missing the required parameter 'startMonth' when calling getUsageAttribution"); } // verify the required parameter 'fields' is set if (fields == null) { - throw new ApiException( - 400, "Missing the required parameter 'fields' when calling getUsageAttribution"); + throw new ApiException(400, "Missing the required parameter 'fields' when calling getUsageAttribution"); } OffsetDateTime endMonth = parameters.endMonth; UsageSortDirection sortDirection = parameters.sortDirection; @@ -2391,6 +1822,7 @@ public ApiResponse getUsageAttributionWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/usage/attribution"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2399,68 +1831,41 @@ public ApiResponse getUsageAttributionWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_direction", sortDirection)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_name", sortName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_descendants", includeDescendants)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_descendants", includeDescendants)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageAttribution", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageAttribution", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get usage attribution. * - *

See {@link #getUsageAttributionWithHttpInfo}. + * See {@link #getUsageAttributionWithHttpInfo}. * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param fields Comma-separated list of usage types to return, or * for all usage - * types. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param fields Comma-separated list of usage types to return, or * for all usage types. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageAttributionResponse>> * @deprecated */ @Deprecated - public CompletableFuture> - getUsageAttributionWithHttpInfoAsync( - OffsetDateTime startMonth, - UsageAttributionSupportedMetrics fields, - GetUsageAttributionOptionalParameters parameters) { + public CompletableFuture> getUsageAttributionWithHttpInfoAsync(OffsetDateTime startMonth, UsageAttributionSupportedMetrics fields, GetUsageAttributionOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getUsageAttribution")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startMonth' when calling getUsageAttribution")); + return result; } // verify the required parameter 'fields' is set if (fields == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'fields' when calling getUsageAttribution")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'fields' when calling getUsageAttribution")); + return result; } OffsetDateTime endMonth = parameters.endMonth; UsageSortDirection sortDirection = parameters.sortDirection; @@ -2471,6 +1876,7 @@ public ApiResponse getUsageAttributionWithHttpInfo( // create path and map variables String localVarPath = "/api/v1/usage/attribution"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2479,47 +1885,30 @@ public ApiResponse getUsageAttributionWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_direction", sortDirection)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_name", sortName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_descendants", includeDescendants)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_descendants", includeDescendants)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageAttribution", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageAttribution", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageAuditLogs. */ + /** + * Manage optional parameters to getUsageAuditLogs. + */ public static class GetUsageAuditLogsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageAuditLogsOptionalParameters */ public GetUsageAuditLogsOptionalParameters endHr(OffsetDateTime endHr) { @@ -2529,87 +1918,72 @@ public GetUsageAuditLogsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for audit logs. - * - *

See {@link #getUsageAuditLogsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageAuditLogsResponse - * @throws ApiException if fails to make API call - */ - public UsageAuditLogsResponse getUsageAuditLogs(OffsetDateTime startHr) throws ApiException { - return getUsageAuditLogsWithHttpInfo(startHr, new GetUsageAuditLogsOptionalParameters()) - .getData(); + * Get hourly usage for audit logs. + * + * See {@link #getUsageAuditLogsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageAuditLogsResponse + * @throws ApiException if fails to make API call + */ + public UsageAuditLogsResponse getUsageAuditLogs (OffsetDateTime startHr) throws ApiException { + return getUsageAuditLogsWithHttpInfo( startHr, new GetUsageAuditLogsOptionalParameters()).getData(); } - /** - * Get hourly usage for audit logs. - * - *

See {@link #getUsageAuditLogsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageAuditLogsResponse> - */ - public CompletableFuture getUsageAuditLogsAsync(OffsetDateTime startHr) { - return getUsageAuditLogsWithHttpInfoAsync(startHr, new GetUsageAuditLogsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + /** + * Get hourly usage for audit logs. + * + * See {@link #getUsageAuditLogsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageAuditLogsResponse> + */ + public CompletableFuturegetUsageAuditLogsAsync(OffsetDateTime startHr) { + return getUsageAuditLogsWithHttpInfoAsync(startHr, new GetUsageAuditLogsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for audit logs. - * - *

See {@link #getUsageAuditLogsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageAuditLogsResponse - * @throws ApiException if fails to make API call - */ - public UsageAuditLogsResponse getUsageAuditLogs( - OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) throws ApiException { + * Get hourly usage for audit logs. + * + * See {@link #getUsageAuditLogsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageAuditLogsResponse + * @throws ApiException if fails to make API call + */ + public UsageAuditLogsResponse getUsageAuditLogs(OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) throws ApiException { return getUsageAuditLogsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for audit logs. - * - *

See {@link #getUsageAuditLogsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageAuditLogsResponse> - */ - public CompletableFuture getUsageAuditLogsAsync( - OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) { - return getUsageAuditLogsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for audit logs. Note: hourly usage data for all products is - * now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for audit logs. + * + * See {@link #getUsageAuditLogsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageAuditLogsResponse> + */ + public CompletableFuturegetUsageAuditLogsAsync( OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) { + return getUsageAuditLogsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for audit logs. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageAuditLogsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2618,71 +1992,51 @@ public CompletableFuture getUsageAuditLogsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageAuditLogsWithHttpInfo( - OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageAuditLogsWithHttpInfo(OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageAuditLogs"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageAuditLogs"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/audit_logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageAuditLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageAuditLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for audit logs. * - *

See {@link #getUsageAuditLogsWithHttpInfo}. + * See {@link #getUsageAuditLogsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageAuditLogsResponse>> */ - public CompletableFuture> getUsageAuditLogsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) { + public CompletableFuture> getUsageAuditLogsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageAuditLogsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageAuditLogs")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageAuditLogs")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/audit_logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2691,40 +2045,24 @@ public CompletableFuture> getUsageAuditLogsW Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageAuditLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageAuditLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageBillableSummary. */ + /** + * Manage optional parameters to getUsageBillableSummary. + */ public static class GetUsageBillableSummaryOptionalParameters { private OffsetDateTime month; /** * Set month. - * - * @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for - * usage starting this month. (optional) + * @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage starting this month. (optional) * @return GetUsageBillableSummaryOptionalParameters */ public GetUsageBillableSummaryOptionalParameters month(OffsetDateTime month) { @@ -2734,72 +2072,66 @@ public GetUsageBillableSummaryOptionalParameters month(OffsetDateTime month) { } /** - * Get billable usage across your account. - * - *

See {@link #getUsageBillableSummaryWithHttpInfo}. - * - * @return UsageBillableSummaryResponse - * @throws ApiException if fails to make API call - */ - public UsageBillableSummaryResponse getUsageBillableSummary() throws ApiException { - return getUsageBillableSummaryWithHttpInfo(new GetUsageBillableSummaryOptionalParameters()) - .getData(); + * Get billable usage across your account. + * + * See {@link #getUsageBillableSummaryWithHttpInfo}. + * + * @return UsageBillableSummaryResponse + * @throws ApiException if fails to make API call + */ + public UsageBillableSummaryResponse getUsageBillableSummary () throws ApiException { + return getUsageBillableSummaryWithHttpInfo(new GetUsageBillableSummaryOptionalParameters()).getData(); } /** - * Get billable usage across your account. - * - *

See {@link #getUsageBillableSummaryWithHttpInfoAsync}. - * - * @return CompletableFuture<UsageBillableSummaryResponse> - */ - public CompletableFuture getUsageBillableSummaryAsync() { - return getUsageBillableSummaryWithHttpInfoAsync(new GetUsageBillableSummaryOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get billable usage across your account. + * + * See {@link #getUsageBillableSummaryWithHttpInfoAsync}. + * + * @return CompletableFuture<UsageBillableSummaryResponse> + */ + public CompletableFuturegetUsageBillableSummaryAsync() { + return getUsageBillableSummaryWithHttpInfoAsync(new GetUsageBillableSummaryOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get billable usage across your account. - * - *

See {@link #getUsageBillableSummaryWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return UsageBillableSummaryResponse - * @throws ApiException if fails to make API call - */ - public UsageBillableSummaryResponse getUsageBillableSummary( - GetUsageBillableSummaryOptionalParameters parameters) throws ApiException { + * Get billable usage across your account. + * + * See {@link #getUsageBillableSummaryWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return UsageBillableSummaryResponse + * @throws ApiException if fails to make API call + */ + public UsageBillableSummaryResponse getUsageBillableSummary(GetUsageBillableSummaryOptionalParameters parameters) throws ApiException { return getUsageBillableSummaryWithHttpInfo(parameters).getData(); } /** - * Get billable usage across your account. - * - *

See {@link #getUsageBillableSummaryWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageBillableSummaryResponse> - */ - public CompletableFuture getUsageBillableSummaryAsync( - GetUsageBillableSummaryOptionalParameters parameters) { - return getUsageBillableSummaryWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get billable usage across your account. + * + * See {@link #getUsageBillableSummaryWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageBillableSummaryResponse> + */ + public CompletableFuturegetUsageBillableSummaryAsync(GetUsageBillableSummaryOptionalParameters parameters) { + return getUsageBillableSummaryWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get billable usage across your account. + *

Get billable usage across your account.

* * @param parameters Optional parameters for the request. * @return ApiResponse<UsageBillableSummaryResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2808,54 +2140,37 @@ public CompletableFuture getUsageBillableSummaryAs * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageBillableSummaryWithHttpInfo( - GetUsageBillableSummaryOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageBillableSummaryWithHttpInfo(GetUsageBillableSummaryOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; OffsetDateTime month = parameters.month; // create path and map variables String localVarPath = "/api/v1/usage/billable-summary"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "month", month)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageBillableSummary", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageBillableSummary", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get billable usage across your account. * - *

See {@link #getUsageBillableSummaryWithHttpInfo}. + * See {@link #getUsageBillableSummaryWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageBillableSummaryResponse>> */ - public CompletableFuture> - getUsageBillableSummaryWithHttpInfoAsync( - GetUsageBillableSummaryOptionalParameters parameters) { + public CompletableFuture> getUsageBillableSummaryWithHttpInfoAsync(GetUsageBillableSummaryOptionalParameters parameters) { Object localVarPostBody = null; OffsetDateTime month = parameters.month; // create path and map variables String localVarPath = "/api/v1/usage/billable-summary"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2863,41 +2178,24 @@ public ApiResponse getUsageBillableSummaryWithHttp Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageBillableSummary", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageBillableSummary", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageCIApp. */ + /** + * Manage optional parameters to getUsageCIApp. + */ public static class GetUsageCIAppOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageCIAppOptionalParameters */ public GetUsageCIAppOptionalParameters endHr(OffsetDateTime endHr) { @@ -2907,86 +2205,72 @@ public GetUsageCIAppOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for CI visibility. - * - *

See {@link #getUsageCIAppWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageCIVisibilityResponse - * @throws ApiException if fails to make API call - */ - public UsageCIVisibilityResponse getUsageCIApp(OffsetDateTime startHr) throws ApiException { - return getUsageCIAppWithHttpInfo(startHr, new GetUsageCIAppOptionalParameters()).getData(); + * Get hourly usage for CI visibility. + * + * See {@link #getUsageCIAppWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageCIVisibilityResponse + * @throws ApiException if fails to make API call + */ + public UsageCIVisibilityResponse getUsageCIApp (OffsetDateTime startHr) throws ApiException { + return getUsageCIAppWithHttpInfo( startHr, new GetUsageCIAppOptionalParameters()).getData(); } /** - * Get hourly usage for CI visibility. - * - *

See {@link #getUsageCIAppWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageCIVisibilityResponse> - */ - public CompletableFuture getUsageCIAppAsync(OffsetDateTime startHr) { - return getUsageCIAppWithHttpInfoAsync(startHr, new GetUsageCIAppOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for CI visibility. + * + * See {@link #getUsageCIAppWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageCIVisibilityResponse> + */ + public CompletableFuturegetUsageCIAppAsync(OffsetDateTime startHr) { + return getUsageCIAppWithHttpInfoAsync(startHr, new GetUsageCIAppOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for CI visibility. - * - *

See {@link #getUsageCIAppWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageCIVisibilityResponse - * @throws ApiException if fails to make API call - */ - public UsageCIVisibilityResponse getUsageCIApp( - OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) throws ApiException { + * Get hourly usage for CI visibility. + * + * See {@link #getUsageCIAppWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageCIVisibilityResponse + * @throws ApiException if fails to make API call + */ + public UsageCIVisibilityResponse getUsageCIApp(OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) throws ApiException { return getUsageCIAppWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for CI visibility. - * - *

See {@link #getUsageCIAppWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageCIVisibilityResponse> - */ - public CompletableFuture getUsageCIAppAsync( - OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) { - return getUsageCIAppWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for CI visibility (tests, pipeline, and spans). Note: hourly - * usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for CI visibility. + * + * See {@link #getUsageCIAppWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageCIVisibilityResponse> + */ + public CompletableFuturegetUsageCIAppAsync( OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) { + return getUsageCIAppWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for CI visibility (tests, pipeline, and spans). + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageCIVisibilityResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2995,71 +2279,51 @@ public CompletableFuture getUsageCIAppAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageCIAppWithHttpInfo( - OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageCIAppWithHttpInfo(OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageCIApp"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageCIApp"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/ci-app"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageCIApp", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageCIApp", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for CI visibility. * - *

See {@link #getUsageCIAppWithHttpInfo}. + * See {@link #getUsageCIAppWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageCIVisibilityResponse>> */ - public CompletableFuture> getUsageCIAppWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) { + public CompletableFuture> getUsageCIAppWithHttpInfoAsync(OffsetDateTime startHr, GetUsageCIAppOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageCIApp")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageCIApp")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/ci-app"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3068,40 +2332,24 @@ public CompletableFuture> getUsageCIAppWi Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageCIApp", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageCIApp", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageCloudSecurityPostureManagement. */ + /** + * Manage optional parameters to getUsageCloudSecurityPostureManagement. + */ public static class GetUsageCloudSecurityPostureManagementOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageCloudSecurityPostureManagementOptionalParameters */ public GetUsageCloudSecurityPostureManagementOptionalParameters endHr(OffsetDateTime endHr) { @@ -3111,94 +2359,72 @@ public GetUsageCloudSecurityPostureManagementOptionalParameters endHr(OffsetDate } /** - * Get hourly usage for CSPM. - * - *

See {@link #getUsageCloudSecurityPostureManagementWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageCloudSecurityPostureManagementResponse - * @throws ApiException if fails to make API call - */ - public UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureManagement( - OffsetDateTime startHr) throws ApiException { - return getUsageCloudSecurityPostureManagementWithHttpInfo( - startHr, new GetUsageCloudSecurityPostureManagementOptionalParameters()) - .getData(); + * Get hourly usage for CSPM. + * + * See {@link #getUsageCloudSecurityPostureManagementWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageCloudSecurityPostureManagementResponse + * @throws ApiException if fails to make API call + */ + public UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureManagement (OffsetDateTime startHr) throws ApiException { + return getUsageCloudSecurityPostureManagementWithHttpInfo( startHr, new GetUsageCloudSecurityPostureManagementOptionalParameters()).getData(); } /** - * Get hourly usage for CSPM. - * - *

See {@link #getUsageCloudSecurityPostureManagementWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageCloudSecurityPostureManagementResponse> - */ - public CompletableFuture - getUsageCloudSecurityPostureManagementAsync(OffsetDateTime startHr) { - return getUsageCloudSecurityPostureManagementWithHttpInfoAsync( - startHr, new GetUsageCloudSecurityPostureManagementOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for CSPM. + * + * See {@link #getUsageCloudSecurityPostureManagementWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageCloudSecurityPostureManagementResponse> + */ + public CompletableFuturegetUsageCloudSecurityPostureManagementAsync(OffsetDateTime startHr) { + return getUsageCloudSecurityPostureManagementWithHttpInfoAsync(startHr, new GetUsageCloudSecurityPostureManagementOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for CSPM. - * - *

See {@link #getUsageCloudSecurityPostureManagementWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageCloudSecurityPostureManagementResponse - * @throws ApiException if fails to make API call - */ - public UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureManagement( - OffsetDateTime startHr, GetUsageCloudSecurityPostureManagementOptionalParameters parameters) - throws ApiException { + * Get hourly usage for CSPM. + * + * See {@link #getUsageCloudSecurityPostureManagementWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageCloudSecurityPostureManagementResponse + * @throws ApiException if fails to make API call + */ + public UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureManagement(OffsetDateTime startHr, GetUsageCloudSecurityPostureManagementOptionalParameters parameters) throws ApiException { return getUsageCloudSecurityPostureManagementWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for CSPM. - * - *

See {@link #getUsageCloudSecurityPostureManagementWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageCloudSecurityPostureManagementResponse> - */ - public CompletableFuture - getUsageCloudSecurityPostureManagementAsync( - OffsetDateTime startHr, - GetUsageCloudSecurityPostureManagementOptionalParameters parameters) { - return getUsageCloudSecurityPostureManagementWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for cloud security posture management (CSPM). Note: hourly - * usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for CSPM. + * + * See {@link #getUsageCloudSecurityPostureManagementWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageCloudSecurityPostureManagementResponse> + */ + public CompletableFuturegetUsageCloudSecurityPostureManagementAsync( OffsetDateTime startHr, GetUsageCloudSecurityPostureManagementOptionalParameters parameters) { + return getUsageCloudSecurityPostureManagementWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for cloud security posture management (CSPM). + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageCloudSecurityPostureManagementResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3207,81 +2433,51 @@ public UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureM * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getUsageCloudSecurityPostureManagementWithHttpInfo( - OffsetDateTime startHr, - GetUsageCloudSecurityPostureManagementOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageCloudSecurityPostureManagementWithHttpInfo(OffsetDateTime startHr, GetUsageCloudSecurityPostureManagementOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, - "Missing the required parameter 'startHr' when calling" - + " getUsageCloudSecurityPostureManagement"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageCloudSecurityPostureManagement"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/cspm"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageCloudSecurityPostureManagement", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageCloudSecurityPostureManagement", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for CSPM. * - *

See {@link #getUsageCloudSecurityPostureManagementWithHttpInfo}. + * See {@link #getUsageCloudSecurityPostureManagementWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageCloudSecurityPostureManagementResponse>> */ - public CompletableFuture> - getUsageCloudSecurityPostureManagementWithHttpInfoAsync( - OffsetDateTime startHr, - GetUsageCloudSecurityPostureManagementOptionalParameters parameters) { + public CompletableFuture> getUsageCloudSecurityPostureManagementWithHttpInfoAsync(OffsetDateTime startHr, GetUsageCloudSecurityPostureManagementOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling" - + " getUsageCloudSecurityPostureManagement")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageCloudSecurityPostureManagement")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/cspm"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3290,41 +2486,24 @@ public UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureM Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageCloudSecurityPostureManagement", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageCloudSecurityPostureManagement", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageCWS. */ + /** + * Manage optional parameters to getUsageCWS. + */ public static class GetUsageCWSOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageCWSOptionalParameters */ public GetUsageCWSOptionalParameters endHr(OffsetDateTime endHr) { @@ -3334,86 +2513,72 @@ public GetUsageCWSOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for cloud workload security. - * - *

See {@link #getUsageCWSWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageCWSResponse - * @throws ApiException if fails to make API call - */ - public UsageCWSResponse getUsageCWS(OffsetDateTime startHr) throws ApiException { - return getUsageCWSWithHttpInfo(startHr, new GetUsageCWSOptionalParameters()).getData(); + * Get hourly usage for cloud workload security. + * + * See {@link #getUsageCWSWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageCWSResponse + * @throws ApiException if fails to make API call + */ + public UsageCWSResponse getUsageCWS (OffsetDateTime startHr) throws ApiException { + return getUsageCWSWithHttpInfo( startHr, new GetUsageCWSOptionalParameters()).getData(); } /** - * Get hourly usage for cloud workload security. - * - *

See {@link #getUsageCWSWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageCWSResponse> - */ - public CompletableFuture getUsageCWSAsync(OffsetDateTime startHr) { - return getUsageCWSWithHttpInfoAsync(startHr, new GetUsageCWSOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for cloud workload security. + * + * See {@link #getUsageCWSWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageCWSResponse> + */ + public CompletableFuturegetUsageCWSAsync(OffsetDateTime startHr) { + return getUsageCWSWithHttpInfoAsync(startHr, new GetUsageCWSOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for cloud workload security. - * - *

See {@link #getUsageCWSWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageCWSResponse - * @throws ApiException if fails to make API call - */ - public UsageCWSResponse getUsageCWS( - OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) throws ApiException { + * Get hourly usage for cloud workload security. + * + * See {@link #getUsageCWSWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageCWSResponse + * @throws ApiException if fails to make API call + */ + public UsageCWSResponse getUsageCWS(OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) throws ApiException { return getUsageCWSWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for cloud workload security. - * - *

See {@link #getUsageCWSWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageCWSResponse> - */ - public CompletableFuture getUsageCWSAsync( - OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) { - return getUsageCWSWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for cloud workload security. Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for cloud workload security. + * + * See {@link #getUsageCWSWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageCWSResponse> + */ + public CompletableFuturegetUsageCWSAsync( OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) { + return getUsageCWSWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for cloud workload security. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageCWSResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3422,71 +2587,51 @@ public CompletableFuture getUsageCWSAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageCWSWithHttpInfo( - OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageCWSWithHttpInfo(OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageCWS"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageCWS"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/cws"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageCWS", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageCWS", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for cloud workload security. * - *

See {@link #getUsageCWSWithHttpInfo}. + * See {@link #getUsageCWSWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageCWSResponse>> */ - public CompletableFuture> getUsageCWSWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) { + public CompletableFuture> getUsageCWSWithHttpInfoAsync(OffsetDateTime startHr, GetUsageCWSOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageCWS")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageCWS")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/cws"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3495,40 +2640,24 @@ public CompletableFuture> getUsageCWSWithHttpInfoA Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageCWS", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageCWS", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageDBM. */ + /** + * Manage optional parameters to getUsageDBM. + */ public static class GetUsageDBMOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageDBMOptionalParameters */ public GetUsageDBMOptionalParameters endHr(OffsetDateTime endHr) { @@ -3538,86 +2667,72 @@ public GetUsageDBMOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for database monitoring. - * - *

See {@link #getUsageDBMWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageDBMResponse - * @throws ApiException if fails to make API call - */ - public UsageDBMResponse getUsageDBM(OffsetDateTime startHr) throws ApiException { - return getUsageDBMWithHttpInfo(startHr, new GetUsageDBMOptionalParameters()).getData(); + * Get hourly usage for database monitoring. + * + * See {@link #getUsageDBMWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageDBMResponse + * @throws ApiException if fails to make API call + */ + public UsageDBMResponse getUsageDBM (OffsetDateTime startHr) throws ApiException { + return getUsageDBMWithHttpInfo( startHr, new GetUsageDBMOptionalParameters()).getData(); } /** - * Get hourly usage for database monitoring. - * - *

See {@link #getUsageDBMWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageDBMResponse> - */ - public CompletableFuture getUsageDBMAsync(OffsetDateTime startHr) { - return getUsageDBMWithHttpInfoAsync(startHr, new GetUsageDBMOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for database monitoring. + * + * See {@link #getUsageDBMWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageDBMResponse> + */ + public CompletableFuturegetUsageDBMAsync(OffsetDateTime startHr) { + return getUsageDBMWithHttpInfoAsync(startHr, new GetUsageDBMOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for database monitoring. - * - *

See {@link #getUsageDBMWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageDBMResponse - * @throws ApiException if fails to make API call - */ - public UsageDBMResponse getUsageDBM( - OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) throws ApiException { + * Get hourly usage for database monitoring. + * + * See {@link #getUsageDBMWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageDBMResponse + * @throws ApiException if fails to make API call + */ + public UsageDBMResponse getUsageDBM(OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) throws ApiException { return getUsageDBMWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for database monitoring. - * - *

See {@link #getUsageDBMWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageDBMResponse> - */ - public CompletableFuture getUsageDBMAsync( - OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) { - return getUsageDBMWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for database monitoring Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for database monitoring. + * + * See {@link #getUsageDBMWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageDBMResponse> + */ + public CompletableFuturegetUsageDBMAsync( OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) { + return getUsageDBMWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for database monitoring + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageDBMResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3626,71 +2741,51 @@ public CompletableFuture getUsageDBMAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageDBMWithHttpInfo( - OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageDBMWithHttpInfo(OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageDBM"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageDBM"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/dbm"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageDBM", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageDBM", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for database monitoring. * - *

See {@link #getUsageDBMWithHttpInfo}. + * See {@link #getUsageDBMWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageDBMResponse>> */ - public CompletableFuture> getUsageDBMWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) { + public CompletableFuture> getUsageDBMWithHttpInfoAsync(OffsetDateTime startHr, GetUsageDBMOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageDBM")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageDBM")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/dbm"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3699,40 +2794,24 @@ public CompletableFuture> getUsageDBMWithHttpInfoA Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageDBM", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageDBM", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageFargate. */ + /** + * Manage optional parameters to getUsageFargate. + */ public static class GetUsageFargateOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageFargateOptionalParameters */ public GetUsageFargateOptionalParameters endHr(OffsetDateTime endHr) { @@ -3742,87 +2821,72 @@ public GetUsageFargateOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for Fargate. - * - *

See {@link #getUsageFargateWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageFargateResponse - * @throws ApiException if fails to make API call - */ - public UsageFargateResponse getUsageFargate(OffsetDateTime startHr) throws ApiException { - return getUsageFargateWithHttpInfo(startHr, new GetUsageFargateOptionalParameters()).getData(); + * Get hourly usage for Fargate. + * + * See {@link #getUsageFargateWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageFargateResponse + * @throws ApiException if fails to make API call + */ + public UsageFargateResponse getUsageFargate (OffsetDateTime startHr) throws ApiException { + return getUsageFargateWithHttpInfo( startHr, new GetUsageFargateOptionalParameters()).getData(); } /** - * Get hourly usage for Fargate. - * - *

See {@link #getUsageFargateWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageFargateResponse> - */ - public CompletableFuture getUsageFargateAsync(OffsetDateTime startHr) { - return getUsageFargateWithHttpInfoAsync(startHr, new GetUsageFargateOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for Fargate. + * + * See {@link #getUsageFargateWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageFargateResponse> + */ + public CompletableFuturegetUsageFargateAsync(OffsetDateTime startHr) { + return getUsageFargateWithHttpInfoAsync(startHr, new GetUsageFargateOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for Fargate. - * - *

See {@link #getUsageFargateWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageFargateResponse - * @throws ApiException if fails to make API call - */ - public UsageFargateResponse getUsageFargate( - OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) throws ApiException { + * Get hourly usage for Fargate. + * + * See {@link #getUsageFargateWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageFargateResponse + * @throws ApiException if fails to make API call + */ + public UsageFargateResponse getUsageFargate(OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) throws ApiException { return getUsageFargateWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for Fargate. - * - *

See {@link #getUsageFargateWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageFargateResponse> - */ - public CompletableFuture getUsageFargateAsync( - OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) { - return getUsageFargateWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for Fargate. Note: - * hourly usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for Fargate. + * + * See {@link #getUsageFargateWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageFargateResponse> + */ + public CompletableFuturegetUsageFargateAsync( OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) { + return getUsageFargateWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for Fargate. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageFargateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -3831,71 +2895,51 @@ public CompletableFuture getUsageFargateAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageFargateWithHttpInfo( - OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageFargateWithHttpInfo(OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageFargate"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageFargate"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/fargate"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageFargate", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageFargate", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for Fargate. * - *

See {@link #getUsageFargateWithHttpInfo}. + * See {@link #getUsageFargateWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageFargateResponse>> */ - public CompletableFuture> getUsageFargateWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) { + public CompletableFuture> getUsageFargateWithHttpInfoAsync(OffsetDateTime startHr, GetUsageFargateOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageFargate")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageFargate")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/fargate"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -3904,40 +2948,24 @@ public CompletableFuture> getUsageFargateWithH Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageFargate", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageFargate", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageHosts. */ + /** + * Manage optional parameters to getUsageHosts. + */ public static class GetUsageHostsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageHostsOptionalParameters */ public GetUsageHostsOptionalParameters endHr(OffsetDateTime endHr) { @@ -3947,86 +2975,72 @@ public GetUsageHostsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for hosts and containers. - * - *

See {@link #getUsageHostsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageHostsResponse - * @throws ApiException if fails to make API call - */ - public UsageHostsResponse getUsageHosts(OffsetDateTime startHr) throws ApiException { - return getUsageHostsWithHttpInfo(startHr, new GetUsageHostsOptionalParameters()).getData(); + * Get hourly usage for hosts and containers. + * + * See {@link #getUsageHostsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageHostsResponse + * @throws ApiException if fails to make API call + */ + public UsageHostsResponse getUsageHosts (OffsetDateTime startHr) throws ApiException { + return getUsageHostsWithHttpInfo( startHr, new GetUsageHostsOptionalParameters()).getData(); } /** - * Get hourly usage for hosts and containers. - * - *

See {@link #getUsageHostsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageHostsResponse> - */ - public CompletableFuture getUsageHostsAsync(OffsetDateTime startHr) { - return getUsageHostsWithHttpInfoAsync(startHr, new GetUsageHostsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for hosts and containers. + * + * See {@link #getUsageHostsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageHostsResponse> + */ + public CompletableFuturegetUsageHostsAsync(OffsetDateTime startHr) { + return getUsageHostsWithHttpInfoAsync(startHr, new GetUsageHostsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for hosts and containers. - * - *

See {@link #getUsageHostsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageHostsResponse - * @throws ApiException if fails to make API call - */ - public UsageHostsResponse getUsageHosts( - OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) throws ApiException { + * Get hourly usage for hosts and containers. + * + * See {@link #getUsageHostsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageHostsResponse + * @throws ApiException if fails to make API call + */ + public UsageHostsResponse getUsageHosts(OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) throws ApiException { return getUsageHostsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for hosts and containers. - * - *

See {@link #getUsageHostsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageHostsResponse> - */ - public CompletableFuture getUsageHostsAsync( - OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) { - return getUsageHostsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for hosts and containers. Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for hosts and containers. + * + * See {@link #getUsageHostsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageHostsResponse> + */ + public CompletableFuturegetUsageHostsAsync( OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) { + return getUsageHostsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for hosts and containers. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageHostsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -4035,71 +3049,51 @@ public CompletableFuture getUsageHostsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageHostsWithHttpInfo( - OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageHostsWithHttpInfo(OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageHosts"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageHosts"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageHosts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageHosts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for hosts and containers. * - *

See {@link #getUsageHostsWithHttpInfo}. + * See {@link #getUsageHostsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageHostsResponse>> */ - public CompletableFuture> getUsageHostsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) { + public CompletableFuture> getUsageHostsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageHostsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageHosts")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageHosts")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -4108,40 +3102,24 @@ public CompletableFuture> getUsageHostsWithHttpI Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageHosts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageHosts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageIndexedSpans. */ + /** + * Manage optional parameters to getUsageIndexedSpans. + */ public static class GetUsageIndexedSpansOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageIndexedSpansOptionalParameters */ public GetUsageIndexedSpansOptionalParameters endHr(OffsetDateTime endHr) { @@ -4151,91 +3129,72 @@ public GetUsageIndexedSpansOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for indexed spans. - * - *

See {@link #getUsageIndexedSpansWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageIndexedSpansResponse - * @throws ApiException if fails to make API call - */ - public UsageIndexedSpansResponse getUsageIndexedSpans(OffsetDateTime startHr) - throws ApiException { - return getUsageIndexedSpansWithHttpInfo(startHr, new GetUsageIndexedSpansOptionalParameters()) - .getData(); + * Get hourly usage for indexed spans. + * + * See {@link #getUsageIndexedSpansWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageIndexedSpansResponse + * @throws ApiException if fails to make API call + */ + public UsageIndexedSpansResponse getUsageIndexedSpans (OffsetDateTime startHr) throws ApiException { + return getUsageIndexedSpansWithHttpInfo( startHr, new GetUsageIndexedSpansOptionalParameters()).getData(); } /** - * Get hourly usage for indexed spans. - * - *

See {@link #getUsageIndexedSpansWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageIndexedSpansResponse> - */ - public CompletableFuture getUsageIndexedSpansAsync( - OffsetDateTime startHr) { - return getUsageIndexedSpansWithHttpInfoAsync( - startHr, new GetUsageIndexedSpansOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for indexed spans. + * + * See {@link #getUsageIndexedSpansWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageIndexedSpansResponse> + */ + public CompletableFuturegetUsageIndexedSpansAsync(OffsetDateTime startHr) { + return getUsageIndexedSpansWithHttpInfoAsync(startHr, new GetUsageIndexedSpansOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for indexed spans. - * - *

See {@link #getUsageIndexedSpansWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageIndexedSpansResponse - * @throws ApiException if fails to make API call - */ - public UsageIndexedSpansResponse getUsageIndexedSpans( - OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) - throws ApiException { + * Get hourly usage for indexed spans. + * + * See {@link #getUsageIndexedSpansWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageIndexedSpansResponse + * @throws ApiException if fails to make API call + */ + public UsageIndexedSpansResponse getUsageIndexedSpans(OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) throws ApiException { return getUsageIndexedSpansWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for indexed spans. - * - *

See {@link #getUsageIndexedSpansWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageIndexedSpansResponse> - */ - public CompletableFuture getUsageIndexedSpansAsync( - OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) { - return getUsageIndexedSpansWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for indexed spans. Note: hourly usage data for all products - * is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for indexed spans. + * + * See {@link #getUsageIndexedSpansWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageIndexedSpansResponse> + */ + public CompletableFuturegetUsageIndexedSpansAsync( OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) { + return getUsageIndexedSpansWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for indexed spans. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageIndexedSpansResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -4244,73 +3203,51 @@ public CompletableFuture getUsageIndexedSpansAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageIndexedSpansWithHttpInfo( - OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageIndexedSpansWithHttpInfo(OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageIndexedSpans"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageIndexedSpans"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/indexed-spans"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageIndexedSpans", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageIndexedSpans", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for indexed spans. * - *

See {@link #getUsageIndexedSpansWithHttpInfo}. + * See {@link #getUsageIndexedSpansWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageIndexedSpansResponse>> */ - public CompletableFuture> - getUsageIndexedSpansWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) { + public CompletableFuture> getUsageIndexedSpansWithHttpInfoAsync(OffsetDateTime startHr, GetUsageIndexedSpansOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageIndexedSpans")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageIndexedSpans")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/indexed-spans"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -4319,40 +3256,24 @@ public ApiResponse getUsageIndexedSpansWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageIndexedSpans", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageIndexedSpans", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageInternetOfThings. */ + /** + * Manage optional parameters to getUsageInternetOfThings. + */ public static class GetUsageInternetOfThingsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageInternetOfThingsOptionalParameters */ public GetUsageInternetOfThingsOptionalParameters endHr(OffsetDateTime endHr) { @@ -4362,90 +3283,72 @@ public GetUsageInternetOfThingsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for IoT. - * - *

See {@link #getUsageInternetOfThingsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageIoTResponse - * @throws ApiException if fails to make API call - */ - public UsageIoTResponse getUsageInternetOfThings(OffsetDateTime startHr) throws ApiException { - return getUsageInternetOfThingsWithHttpInfo( - startHr, new GetUsageInternetOfThingsOptionalParameters()) - .getData(); + * Get hourly usage for IoT. + * + * See {@link #getUsageInternetOfThingsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageIoTResponse + * @throws ApiException if fails to make API call + */ + public UsageIoTResponse getUsageInternetOfThings (OffsetDateTime startHr) throws ApiException { + return getUsageInternetOfThingsWithHttpInfo( startHr, new GetUsageInternetOfThingsOptionalParameters()).getData(); } /** - * Get hourly usage for IoT. - * - *

See {@link #getUsageInternetOfThingsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageIoTResponse> - */ - public CompletableFuture getUsageInternetOfThingsAsync(OffsetDateTime startHr) { - return getUsageInternetOfThingsWithHttpInfoAsync( - startHr, new GetUsageInternetOfThingsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for IoT. + * + * See {@link #getUsageInternetOfThingsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageIoTResponse> + */ + public CompletableFuturegetUsageInternetOfThingsAsync(OffsetDateTime startHr) { + return getUsageInternetOfThingsWithHttpInfoAsync(startHr, new GetUsageInternetOfThingsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for IoT. - * - *

See {@link #getUsageInternetOfThingsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageIoTResponse - * @throws ApiException if fails to make API call - */ - public UsageIoTResponse getUsageInternetOfThings( - OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) - throws ApiException { + * Get hourly usage for IoT. + * + * See {@link #getUsageInternetOfThingsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageIoTResponse + * @throws ApiException if fails to make API call + */ + public UsageIoTResponse getUsageInternetOfThings(OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) throws ApiException { return getUsageInternetOfThingsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for IoT. - * - *

See {@link #getUsageInternetOfThingsWithHttpInfoAsync}. + * Get hourly usage for IoT. + * + * See {@link #getUsageInternetOfThingsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageIoTResponse> + */ + public CompletableFuturegetUsageInternetOfThingsAsync( OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) { + return getUsageInternetOfThingsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for IoT. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageIoTResponse> - */ - public CompletableFuture getUsageInternetOfThingsAsync( - OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) { - return getUsageInternetOfThingsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for IoT. Note: hourly usage data for all products is now - * available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageIoTResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -4454,73 +3357,51 @@ public CompletableFuture getUsageInternetOfThingsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageInternetOfThingsWithHttpInfo( - OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageInternetOfThingsWithHttpInfo(OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageInternetOfThings"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageInternetOfThings"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/iot"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageInternetOfThings", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageInternetOfThings", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for IoT. * - *

See {@link #getUsageInternetOfThingsWithHttpInfo}. + * See {@link #getUsageInternetOfThingsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageIoTResponse>> */ - public CompletableFuture> getUsageInternetOfThingsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) { + public CompletableFuture> getUsageInternetOfThingsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageInternetOfThingsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling getUsageInternetOfThings")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageInternetOfThings")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/iot"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -4529,40 +3410,24 @@ public CompletableFuture> getUsageInternetOfThings Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageInternetOfThings", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageInternetOfThings", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageLambda. */ + /** + * Manage optional parameters to getUsageLambda. + */ public static class GetUsageLambdaOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageLambdaOptionalParameters */ public GetUsageLambdaOptionalParameters endHr(OffsetDateTime endHr) { @@ -4572,86 +3437,72 @@ public GetUsageLambdaOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for lambda. - * - *

See {@link #getUsageLambdaWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageLambdaResponse - * @throws ApiException if fails to make API call - */ - public UsageLambdaResponse getUsageLambda(OffsetDateTime startHr) throws ApiException { - return getUsageLambdaWithHttpInfo(startHr, new GetUsageLambdaOptionalParameters()).getData(); + * Get hourly usage for lambda. + * + * See {@link #getUsageLambdaWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageLambdaResponse + * @throws ApiException if fails to make API call + */ + public UsageLambdaResponse getUsageLambda (OffsetDateTime startHr) throws ApiException { + return getUsageLambdaWithHttpInfo( startHr, new GetUsageLambdaOptionalParameters()).getData(); } /** - * Get hourly usage for lambda. - * - *

See {@link #getUsageLambdaWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageLambdaResponse> - */ - public CompletableFuture getUsageLambdaAsync(OffsetDateTime startHr) { - return getUsageLambdaWithHttpInfoAsync(startHr, new GetUsageLambdaOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for lambda. + * + * See {@link #getUsageLambdaWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageLambdaResponse> + */ + public CompletableFuturegetUsageLambdaAsync(OffsetDateTime startHr) { + return getUsageLambdaWithHttpInfoAsync(startHr, new GetUsageLambdaOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for lambda. - * - *

See {@link #getUsageLambdaWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageLambdaResponse - * @throws ApiException if fails to make API call - */ - public UsageLambdaResponse getUsageLambda( - OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) throws ApiException { + * Get hourly usage for lambda. + * + * See {@link #getUsageLambdaWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageLambdaResponse + * @throws ApiException if fails to make API call + */ + public UsageLambdaResponse getUsageLambda(OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) throws ApiException { return getUsageLambdaWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for lambda. - * - *

See {@link #getUsageLambdaWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageLambdaResponse> - */ - public CompletableFuture getUsageLambdaAsync( - OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) { - return getUsageLambdaWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for lambda. Note: hourly usage data for all products is now - * available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for lambda. + * + * See {@link #getUsageLambdaWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageLambdaResponse> + */ + public CompletableFuturegetUsageLambdaAsync( OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) { + return getUsageLambdaWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for lambda. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageLambdaResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -4660,71 +3511,51 @@ public CompletableFuture getUsageLambdaAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageLambdaWithHttpInfo( - OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageLambdaWithHttpInfo(OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLambda"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLambda"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/aws_lambda"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLambda", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLambda", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for lambda. * - *

See {@link #getUsageLambdaWithHttpInfo}. + * See {@link #getUsageLambdaWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageLambdaResponse>> */ - public CompletableFuture> getUsageLambdaWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) { + public CompletableFuture> getUsageLambdaWithHttpInfoAsync(OffsetDateTime startHr, GetUsageLambdaOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLambda")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLambda")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/aws_lambda"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -4733,40 +3564,24 @@ public CompletableFuture> getUsageLambdaWithHtt Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLambda", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLambda", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageLogs. */ + /** + * Manage optional parameters to getUsageLogs. + */ public static class GetUsageLogsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageLogsOptionalParameters */ public GetUsageLogsOptionalParameters endHr(OffsetDateTime endHr) { @@ -4776,86 +3591,72 @@ public GetUsageLogsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for logs. - * - *

See {@link #getUsageLogsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageLogsResponse - * @throws ApiException if fails to make API call - */ - public UsageLogsResponse getUsageLogs(OffsetDateTime startHr) throws ApiException { - return getUsageLogsWithHttpInfo(startHr, new GetUsageLogsOptionalParameters()).getData(); + * Get hourly usage for logs. + * + * See {@link #getUsageLogsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageLogsResponse + * @throws ApiException if fails to make API call + */ + public UsageLogsResponse getUsageLogs (OffsetDateTime startHr) throws ApiException { + return getUsageLogsWithHttpInfo( startHr, new GetUsageLogsOptionalParameters()).getData(); } /** - * Get hourly usage for logs. - * - *

See {@link #getUsageLogsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageLogsResponse> - */ - public CompletableFuture getUsageLogsAsync(OffsetDateTime startHr) { - return getUsageLogsWithHttpInfoAsync(startHr, new GetUsageLogsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for logs. + * + * See {@link #getUsageLogsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageLogsResponse> + */ + public CompletableFuturegetUsageLogsAsync(OffsetDateTime startHr) { + return getUsageLogsWithHttpInfoAsync(startHr, new GetUsageLogsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for logs. - * - *

See {@link #getUsageLogsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageLogsResponse - * @throws ApiException if fails to make API call - */ - public UsageLogsResponse getUsageLogs( - OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) throws ApiException { + * Get hourly usage for logs. + * + * See {@link #getUsageLogsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageLogsResponse + * @throws ApiException if fails to make API call + */ + public UsageLogsResponse getUsageLogs(OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) throws ApiException { return getUsageLogsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for logs. - * - *

See {@link #getUsageLogsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageLogsResponse> - */ - public CompletableFuture getUsageLogsAsync( - OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) { - return getUsageLogsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for logs. Note: hourly usage data for all products is now - * available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for logs. + * + * See {@link #getUsageLogsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageLogsResponse> + */ + public CompletableFuturegetUsageLogsAsync( OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) { + return getUsageLogsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for logs. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageLogsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -4864,71 +3665,51 @@ public CompletableFuture getUsageLogsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageLogsWithHttpInfo( - OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageLogsWithHttpInfo(OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLogs"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogs"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for logs. * - *

See {@link #getUsageLogsWithHttpInfo}. + * See {@link #getUsageLogsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageLogsResponse>> */ - public CompletableFuture> getUsageLogsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) { + public CompletableFuture> getUsageLogsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageLogsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLogs")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogs")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -4937,41 +3718,25 @@ public CompletableFuture> getUsageLogsWithHttpInf Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageLogsByIndex. */ + /** + * Manage optional parameters to getUsageLogsByIndex. + */ public static class GetUsageLogsByIndexOptionalParameters { private OffsetDateTime endHr; private List indexName; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageLogsByIndexOptionalParameters */ public GetUsageLogsByIndexOptionalParameters endHr(OffsetDateTime endHr) { @@ -4981,7 +3746,6 @@ public GetUsageLogsByIndexOptionalParameters endHr(OffsetDateTime endHr) { /** * Set indexName. - * * @param indexName Comma-separated list of log index names. (optional) * @return GetUsageLogsByIndexOptionalParameters */ @@ -4992,85 +3756,71 @@ public GetUsageLogsByIndexOptionalParameters indexName(List indexName) { } /** - * Get hourly usage for logs by index. - * - *

See {@link #getUsageLogsByIndexWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageLogsByIndexResponse - * @throws ApiException if fails to make API call - */ - public UsageLogsByIndexResponse getUsageLogsByIndex(OffsetDateTime startHr) throws ApiException { - return getUsageLogsByIndexWithHttpInfo(startHr, new GetUsageLogsByIndexOptionalParameters()) - .getData(); + * Get hourly usage for logs by index. + * + * See {@link #getUsageLogsByIndexWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageLogsByIndexResponse + * @throws ApiException if fails to make API call + */ + public UsageLogsByIndexResponse getUsageLogsByIndex (OffsetDateTime startHr) throws ApiException { + return getUsageLogsByIndexWithHttpInfo( startHr, new GetUsageLogsByIndexOptionalParameters()).getData(); } /** - * Get hourly usage for logs by index. - * - *

See {@link #getUsageLogsByIndexWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageLogsByIndexResponse> - */ - public CompletableFuture getUsageLogsByIndexAsync( - OffsetDateTime startHr) { - return getUsageLogsByIndexWithHttpInfoAsync( - startHr, new GetUsageLogsByIndexOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for logs by index. + * + * See {@link #getUsageLogsByIndexWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageLogsByIndexResponse> + */ + public CompletableFuturegetUsageLogsByIndexAsync(OffsetDateTime startHr) { + return getUsageLogsByIndexWithHttpInfoAsync(startHr, new GetUsageLogsByIndexOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for logs by index. - * - *

See {@link #getUsageLogsByIndexWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageLogsByIndexResponse - * @throws ApiException if fails to make API call - */ - public UsageLogsByIndexResponse getUsageLogsByIndex( - OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) - throws ApiException { + * Get hourly usage for logs by index. + * + * See {@link #getUsageLogsByIndexWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageLogsByIndexResponse + * @throws ApiException if fails to make API call + */ + public UsageLogsByIndexResponse getUsageLogsByIndex(OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) throws ApiException { return getUsageLogsByIndexWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for logs by index. - * - *

See {@link #getUsageLogsByIndexWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageLogsByIndexResponse> - */ - public CompletableFuture getUsageLogsByIndexAsync( - OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) { - return getUsageLogsByIndexWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for logs by index. + * + * See {@link #getUsageLogsByIndexWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageLogsByIndexResponse> + */ + public CompletableFuturegetUsageLogsByIndexAsync( OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) { + return getUsageLogsByIndexWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get hourly usage for logs by index. + *

Get hourly usage for logs by index.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageLogsByIndexResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -5079,21 +3829,19 @@ public CompletableFuture getUsageLogsByIndexAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageLogsByIndexWithHttpInfo( - OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageLogsByIndexWithHttpInfo(OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLogsByIndex"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogsByIndex"); } OffsetDateTime endHr = parameters.endHr; List indexName = parameters.indexName; // create path and map variables String localVarPath = "/api/v1/usage/logs_by_index"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -5101,54 +3849,34 @@ public ApiResponse getUsageLogsByIndexWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "index_name", indexName)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLogsByIndex", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLogsByIndex", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for logs by index. * - *

See {@link #getUsageLogsByIndexWithHttpInfo}. + * See {@link #getUsageLogsByIndexWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageLogsByIndexResponse>> */ - public CompletableFuture> - getUsageLogsByIndexWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) { + public CompletableFuture> getUsageLogsByIndexWithHttpInfoAsync(OffsetDateTime startHr, GetUsageLogsByIndexOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLogsByIndex")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogsByIndex")); + return result; } OffsetDateTime endHr = parameters.endHr; List indexName = parameters.indexName; // create path and map variables String localVarPath = "/api/v1/usage/logs_by_index"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -5158,40 +3886,24 @@ public ApiResponse getUsageLogsByIndexWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLogsByIndex", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLogsByIndex", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageLogsByRetention. */ + /** + * Manage optional parameters to getUsageLogsByRetention. + */ public static class GetUsageLogsByRetentionOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageLogsByRetentionOptionalParameters */ public GetUsageLogsByRetentionOptionalParameters endHr(OffsetDateTime endHr) { @@ -5201,92 +3913,72 @@ public GetUsageLogsByRetentionOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly logs usage by retention. - * - *

See {@link #getUsageLogsByRetentionWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageLogsByRetentionResponse - * @throws ApiException if fails to make API call - */ - public UsageLogsByRetentionResponse getUsageLogsByRetention(OffsetDateTime startHr) - throws ApiException { - return getUsageLogsByRetentionWithHttpInfo( - startHr, new GetUsageLogsByRetentionOptionalParameters()) - .getData(); + * Get hourly logs usage by retention. + * + * See {@link #getUsageLogsByRetentionWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageLogsByRetentionResponse + * @throws ApiException if fails to make API call + */ + public UsageLogsByRetentionResponse getUsageLogsByRetention (OffsetDateTime startHr) throws ApiException { + return getUsageLogsByRetentionWithHttpInfo( startHr, new GetUsageLogsByRetentionOptionalParameters()).getData(); } /** - * Get hourly logs usage by retention. - * - *

See {@link #getUsageLogsByRetentionWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageLogsByRetentionResponse> - */ - public CompletableFuture getUsageLogsByRetentionAsync( - OffsetDateTime startHr) { - return getUsageLogsByRetentionWithHttpInfoAsync( - startHr, new GetUsageLogsByRetentionOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly logs usage by retention. + * + * See {@link #getUsageLogsByRetentionWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageLogsByRetentionResponse> + */ + public CompletableFuturegetUsageLogsByRetentionAsync(OffsetDateTime startHr) { + return getUsageLogsByRetentionWithHttpInfoAsync(startHr, new GetUsageLogsByRetentionOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly logs usage by retention. - * - *

See {@link #getUsageLogsByRetentionWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageLogsByRetentionResponse - * @throws ApiException if fails to make API call - */ - public UsageLogsByRetentionResponse getUsageLogsByRetention( - OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) - throws ApiException { + * Get hourly logs usage by retention. + * + * See {@link #getUsageLogsByRetentionWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageLogsByRetentionResponse + * @throws ApiException if fails to make API call + */ + public UsageLogsByRetentionResponse getUsageLogsByRetention(OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) throws ApiException { return getUsageLogsByRetentionWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly logs usage by retention. - * - *

See {@link #getUsageLogsByRetentionWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageLogsByRetentionResponse> - */ - public CompletableFuture getUsageLogsByRetentionAsync( - OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) { - return getUsageLogsByRetentionWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for indexed logs by retention period. Note: hourly usage data - * for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly logs usage by retention. + * + * See {@link #getUsageLogsByRetentionWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageLogsByRetentionResponse> + */ + public CompletableFuturegetUsageLogsByRetentionAsync( OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) { + return getUsageLogsByRetentionWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for indexed logs by retention period. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageLogsByRetentionResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -5295,75 +3987,51 @@ public CompletableFuture getUsageLogsByRetentionAs * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageLogsByRetentionWithHttpInfo( - OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageLogsByRetentionWithHttpInfo(OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageLogsByRetention"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogsByRetention"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/logs-by-retention"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLogsByRetention", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLogsByRetention", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly logs usage by retention. * - *

See {@link #getUsageLogsByRetentionWithHttpInfo}. + * See {@link #getUsageLogsByRetentionWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageLogsByRetentionResponse>> */ - public CompletableFuture> - getUsageLogsByRetentionWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) { + public CompletableFuture> getUsageLogsByRetentionWithHttpInfoAsync(OffsetDateTime startHr, GetUsageLogsByRetentionOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling getUsageLogsByRetention")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogsByRetention")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/logs-by-retention"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -5372,41 +4040,24 @@ public ApiResponse getUsageLogsByRetentionWithHttp Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageLogsByRetention", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageLogsByRetention", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageNetworkFlows. */ + /** + * Manage optional parameters to getUsageNetworkFlows. + */ public static class GetUsageNetworkFlowsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageNetworkFlowsOptionalParameters */ public GetUsageNetworkFlowsOptionalParameters endHr(OffsetDateTime endHr) { @@ -5416,91 +4067,72 @@ public GetUsageNetworkFlowsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * get hourly usage for network flows. - * - *

See {@link #getUsageNetworkFlowsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageNetworkFlowsResponse - * @throws ApiException if fails to make API call - */ - public UsageNetworkFlowsResponse getUsageNetworkFlows(OffsetDateTime startHr) - throws ApiException { - return getUsageNetworkFlowsWithHttpInfo(startHr, new GetUsageNetworkFlowsOptionalParameters()) - .getData(); + * get hourly usage for network flows. + * + * See {@link #getUsageNetworkFlowsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageNetworkFlowsResponse + * @throws ApiException if fails to make API call + */ + public UsageNetworkFlowsResponse getUsageNetworkFlows (OffsetDateTime startHr) throws ApiException { + return getUsageNetworkFlowsWithHttpInfo( startHr, new GetUsageNetworkFlowsOptionalParameters()).getData(); } /** - * get hourly usage for network flows. - * - *

See {@link #getUsageNetworkFlowsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageNetworkFlowsResponse> - */ - public CompletableFuture getUsageNetworkFlowsAsync( - OffsetDateTime startHr) { - return getUsageNetworkFlowsWithHttpInfoAsync( - startHr, new GetUsageNetworkFlowsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * get hourly usage for network flows. + * + * See {@link #getUsageNetworkFlowsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageNetworkFlowsResponse> + */ + public CompletableFuturegetUsageNetworkFlowsAsync(OffsetDateTime startHr) { + return getUsageNetworkFlowsWithHttpInfoAsync(startHr, new GetUsageNetworkFlowsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * get hourly usage for network flows. - * - *

See {@link #getUsageNetworkFlowsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageNetworkFlowsResponse - * @throws ApiException if fails to make API call - */ - public UsageNetworkFlowsResponse getUsageNetworkFlows( - OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) - throws ApiException { + * get hourly usage for network flows. + * + * See {@link #getUsageNetworkFlowsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageNetworkFlowsResponse + * @throws ApiException if fails to make API call + */ + public UsageNetworkFlowsResponse getUsageNetworkFlows(OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) throws ApiException { return getUsageNetworkFlowsWithHttpInfo(startHr, parameters).getData(); } /** - * get hourly usage for network flows. - * - *

See {@link #getUsageNetworkFlowsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageNetworkFlowsResponse> - */ - public CompletableFuture getUsageNetworkFlowsAsync( - OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) { - return getUsageNetworkFlowsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for network flows. Note: hourly usage data for all products - * is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * get hourly usage for network flows. + * + * See {@link #getUsageNetworkFlowsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageNetworkFlowsResponse> + */ + public CompletableFuturegetUsageNetworkFlowsAsync( OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) { + return getUsageNetworkFlowsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for network flows. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageNetworkFlowsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -5509,73 +4141,51 @@ public CompletableFuture getUsageNetworkFlowsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageNetworkFlowsWithHttpInfo( - OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageNetworkFlowsWithHttpInfo(OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageNetworkFlows"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageNetworkFlows"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/network_flows"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageNetworkFlows", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageNetworkFlows", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * get hourly usage for network flows. * - *

See {@link #getUsageNetworkFlowsWithHttpInfo}. + * See {@link #getUsageNetworkFlowsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageNetworkFlowsResponse>> */ - public CompletableFuture> - getUsageNetworkFlowsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) { + public CompletableFuture> getUsageNetworkFlowsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageNetworkFlowsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageNetworkFlows")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageNetworkFlows")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/network_flows"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -5584,40 +4194,24 @@ public ApiResponse getUsageNetworkFlowsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageNetworkFlows", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageNetworkFlows", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageNetworkHosts. */ + /** + * Manage optional parameters to getUsageNetworkHosts. + */ public static class GetUsageNetworkHostsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageNetworkHostsOptionalParameters */ public GetUsageNetworkHostsOptionalParameters endHr(OffsetDateTime endHr) { @@ -5627,91 +4221,72 @@ public GetUsageNetworkHostsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for network hosts. - * - *

See {@link #getUsageNetworkHostsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageNetworkHostsResponse - * @throws ApiException if fails to make API call - */ - public UsageNetworkHostsResponse getUsageNetworkHosts(OffsetDateTime startHr) - throws ApiException { - return getUsageNetworkHostsWithHttpInfo(startHr, new GetUsageNetworkHostsOptionalParameters()) - .getData(); + * Get hourly usage for network hosts. + * + * See {@link #getUsageNetworkHostsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageNetworkHostsResponse + * @throws ApiException if fails to make API call + */ + public UsageNetworkHostsResponse getUsageNetworkHosts (OffsetDateTime startHr) throws ApiException { + return getUsageNetworkHostsWithHttpInfo( startHr, new GetUsageNetworkHostsOptionalParameters()).getData(); } /** - * Get hourly usage for network hosts. - * - *

See {@link #getUsageNetworkHostsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageNetworkHostsResponse> - */ - public CompletableFuture getUsageNetworkHostsAsync( - OffsetDateTime startHr) { - return getUsageNetworkHostsWithHttpInfoAsync( - startHr, new GetUsageNetworkHostsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for network hosts. + * + * See {@link #getUsageNetworkHostsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageNetworkHostsResponse> + */ + public CompletableFuturegetUsageNetworkHostsAsync(OffsetDateTime startHr) { + return getUsageNetworkHostsWithHttpInfoAsync(startHr, new GetUsageNetworkHostsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for network hosts. - * - *

See {@link #getUsageNetworkHostsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageNetworkHostsResponse - * @throws ApiException if fails to make API call - */ - public UsageNetworkHostsResponse getUsageNetworkHosts( - OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) - throws ApiException { + * Get hourly usage for network hosts. + * + * See {@link #getUsageNetworkHostsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageNetworkHostsResponse + * @throws ApiException if fails to make API call + */ + public UsageNetworkHostsResponse getUsageNetworkHosts(OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) throws ApiException { return getUsageNetworkHostsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for network hosts. - * - *

See {@link #getUsageNetworkHostsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageNetworkHostsResponse> - */ - public CompletableFuture getUsageNetworkHostsAsync( - OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) { - return getUsageNetworkHostsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for network hosts. Note: hourly usage data for all products - * is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for network hosts. + * + * See {@link #getUsageNetworkHostsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageNetworkHostsResponse> + */ + public CompletableFuturegetUsageNetworkHostsAsync( OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) { + return getUsageNetworkHostsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for network hosts. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageNetworkHostsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -5720,73 +4295,51 @@ public CompletableFuture getUsageNetworkHostsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageNetworkHostsWithHttpInfo( - OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageNetworkHostsWithHttpInfo(OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageNetworkHosts"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageNetworkHosts"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/network_hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageNetworkHosts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageNetworkHosts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for network hosts. * - *

See {@link #getUsageNetworkHostsWithHttpInfo}. + * See {@link #getUsageNetworkHostsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageNetworkHostsResponse>> */ - public CompletableFuture> - getUsageNetworkHostsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) { + public CompletableFuture> getUsageNetworkHostsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageNetworkHostsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageNetworkHosts")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageNetworkHosts")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/network_hosts"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -5795,40 +4348,24 @@ public ApiResponse getUsageNetworkHostsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageNetworkHosts", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageNetworkHosts", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageOnlineArchive. */ + /** + * Manage optional parameters to getUsageOnlineArchive. + */ public static class GetUsageOnlineArchiveOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageOnlineArchiveOptionalParameters */ public GetUsageOnlineArchiveOptionalParameters endHr(OffsetDateTime endHr) { @@ -5838,91 +4375,72 @@ public GetUsageOnlineArchiveOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for online archive. - * - *

See {@link #getUsageOnlineArchiveWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageOnlineArchiveResponse - * @throws ApiException if fails to make API call - */ - public UsageOnlineArchiveResponse getUsageOnlineArchive(OffsetDateTime startHr) - throws ApiException { - return getUsageOnlineArchiveWithHttpInfo(startHr, new GetUsageOnlineArchiveOptionalParameters()) - .getData(); + * Get hourly usage for online archive. + * + * See {@link #getUsageOnlineArchiveWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageOnlineArchiveResponse + * @throws ApiException if fails to make API call + */ + public UsageOnlineArchiveResponse getUsageOnlineArchive (OffsetDateTime startHr) throws ApiException { + return getUsageOnlineArchiveWithHttpInfo( startHr, new GetUsageOnlineArchiveOptionalParameters()).getData(); } /** - * Get hourly usage for online archive. - * - *

See {@link #getUsageOnlineArchiveWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageOnlineArchiveResponse> - */ - public CompletableFuture getUsageOnlineArchiveAsync( - OffsetDateTime startHr) { - return getUsageOnlineArchiveWithHttpInfoAsync( - startHr, new GetUsageOnlineArchiveOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for online archive. + * + * See {@link #getUsageOnlineArchiveWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageOnlineArchiveResponse> + */ + public CompletableFuturegetUsageOnlineArchiveAsync(OffsetDateTime startHr) { + return getUsageOnlineArchiveWithHttpInfoAsync(startHr, new GetUsageOnlineArchiveOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for online archive. - * - *

See {@link #getUsageOnlineArchiveWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageOnlineArchiveResponse - * @throws ApiException if fails to make API call - */ - public UsageOnlineArchiveResponse getUsageOnlineArchive( - OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) - throws ApiException { + * Get hourly usage for online archive. + * + * See {@link #getUsageOnlineArchiveWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageOnlineArchiveResponse + * @throws ApiException if fails to make API call + */ + public UsageOnlineArchiveResponse getUsageOnlineArchive(OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) throws ApiException { return getUsageOnlineArchiveWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for online archive. - * - *

See {@link #getUsageOnlineArchiveWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageOnlineArchiveResponse> - */ - public CompletableFuture getUsageOnlineArchiveAsync( - OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) { - return getUsageOnlineArchiveWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for online archive. Note: hourly usage data for all products - * is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for online archive. + * + * See {@link #getUsageOnlineArchiveWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageOnlineArchiveResponse> + */ + public CompletableFuturegetUsageOnlineArchiveAsync( OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) { + return getUsageOnlineArchiveWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for online archive. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageOnlineArchiveResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -5931,73 +4449,51 @@ public CompletableFuture getUsageOnlineArchiveAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageOnlineArchiveWithHttpInfo( - OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageOnlineArchiveWithHttpInfo(OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageOnlineArchive"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageOnlineArchive"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/online-archive"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageOnlineArchive", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageOnlineArchive", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for online archive. * - *

See {@link #getUsageOnlineArchiveWithHttpInfo}. + * See {@link #getUsageOnlineArchiveWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageOnlineArchiveResponse>> */ - public CompletableFuture> - getUsageOnlineArchiveWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) { + public CompletableFuture> getUsageOnlineArchiveWithHttpInfoAsync(OffsetDateTime startHr, GetUsageOnlineArchiveOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageOnlineArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageOnlineArchive")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/online-archive"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -6006,40 +4502,24 @@ public ApiResponse getUsageOnlineArchiveWithHttpInfo Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageOnlineArchive", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageOnlineArchive", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageProfiling. */ + /** + * Manage optional parameters to getUsageProfiling. + */ public static class GetUsageProfilingOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageProfilingOptionalParameters */ public GetUsageProfilingOptionalParameters endHr(OffsetDateTime endHr) { @@ -6049,87 +4529,72 @@ public GetUsageProfilingOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for profiled hosts. - * - *

See {@link #getUsageProfilingWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageProfilingResponse - * @throws ApiException if fails to make API call - */ - public UsageProfilingResponse getUsageProfiling(OffsetDateTime startHr) throws ApiException { - return getUsageProfilingWithHttpInfo(startHr, new GetUsageProfilingOptionalParameters()) - .getData(); + * Get hourly usage for profiled hosts. + * + * See {@link #getUsageProfilingWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageProfilingResponse + * @throws ApiException if fails to make API call + */ + public UsageProfilingResponse getUsageProfiling (OffsetDateTime startHr) throws ApiException { + return getUsageProfilingWithHttpInfo( startHr, new GetUsageProfilingOptionalParameters()).getData(); } /** - * Get hourly usage for profiled hosts. - * - *

See {@link #getUsageProfilingWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageProfilingResponse> - */ - public CompletableFuture getUsageProfilingAsync(OffsetDateTime startHr) { - return getUsageProfilingWithHttpInfoAsync(startHr, new GetUsageProfilingOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for profiled hosts. + * + * See {@link #getUsageProfilingWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageProfilingResponse> + */ + public CompletableFuturegetUsageProfilingAsync(OffsetDateTime startHr) { + return getUsageProfilingWithHttpInfoAsync(startHr, new GetUsageProfilingOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for profiled hosts. - * - *

See {@link #getUsageProfilingWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageProfilingResponse - * @throws ApiException if fails to make API call - */ - public UsageProfilingResponse getUsageProfiling( - OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) throws ApiException { + * Get hourly usage for profiled hosts. + * + * See {@link #getUsageProfilingWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageProfilingResponse + * @throws ApiException if fails to make API call + */ + public UsageProfilingResponse getUsageProfiling(OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) throws ApiException { return getUsageProfilingWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for profiled hosts. - * - *

See {@link #getUsageProfilingWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageProfilingResponse> - */ - public CompletableFuture getUsageProfilingAsync( - OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) { - return getUsageProfilingWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for profiled hosts. Note: hourly usage data for all products - * is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for profiled hosts. + * + * See {@link #getUsageProfilingWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageProfilingResponse> + */ + public CompletableFuturegetUsageProfilingAsync( OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) { + return getUsageProfilingWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for profiled hosts. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageProfilingResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -6138,71 +4603,51 @@ public CompletableFuture getUsageProfilingAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageProfilingWithHttpInfo( - OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageProfilingWithHttpInfo(OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageProfiling"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageProfiling"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/profiling"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageProfiling", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageProfiling", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for profiled hosts. * - *

See {@link #getUsageProfilingWithHttpInfo}. + * See {@link #getUsageProfilingWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageProfilingResponse>> */ - public CompletableFuture> getUsageProfilingWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) { + public CompletableFuture> getUsageProfilingWithHttpInfoAsync(OffsetDateTime startHr, GetUsageProfilingOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageProfiling")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageProfiling")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/profiling"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -6211,41 +4656,25 @@ public CompletableFuture> getUsageProfilingW Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageProfiling", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageProfiling", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageRumSessions. */ + /** + * Manage optional parameters to getUsageRumSessions. + */ public static class GetUsageRumSessionsOptionalParameters { private OffsetDateTime endHr; private String type; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageRumSessionsOptionalParameters */ public GetUsageRumSessionsOptionalParameters endHr(OffsetDateTime endHr) { @@ -6255,9 +4684,7 @@ public GetUsageRumSessionsOptionalParameters endHr(OffsetDateTime endHr) { /** * Set type. - * - * @param type RUM type: [browser, mobile]. Defaults to browser. - * (optional) + * @param type RUM type: [browser, mobile]. Defaults to browser. (optional) * @return GetUsageRumSessionsOptionalParameters */ public GetUsageRumSessionsOptionalParameters type(String type) { @@ -6267,90 +4694,72 @@ public GetUsageRumSessionsOptionalParameters type(String type) { } /** - * Get hourly usage for RUM sessions. - * - *

See {@link #getUsageRumSessionsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageRumSessionsResponse - * @throws ApiException if fails to make API call - */ - public UsageRumSessionsResponse getUsageRumSessions(OffsetDateTime startHr) throws ApiException { - return getUsageRumSessionsWithHttpInfo(startHr, new GetUsageRumSessionsOptionalParameters()) - .getData(); + * Get hourly usage for RUM sessions. + * + * See {@link #getUsageRumSessionsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageRumSessionsResponse + * @throws ApiException if fails to make API call + */ + public UsageRumSessionsResponse getUsageRumSessions (OffsetDateTime startHr) throws ApiException { + return getUsageRumSessionsWithHttpInfo( startHr, new GetUsageRumSessionsOptionalParameters()).getData(); } /** - * Get hourly usage for RUM sessions. - * - *

See {@link #getUsageRumSessionsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageRumSessionsResponse> - */ - public CompletableFuture getUsageRumSessionsAsync( - OffsetDateTime startHr) { - return getUsageRumSessionsWithHttpInfoAsync( - startHr, new GetUsageRumSessionsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for RUM sessions. + * + * See {@link #getUsageRumSessionsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageRumSessionsResponse> + */ + public CompletableFuturegetUsageRumSessionsAsync(OffsetDateTime startHr) { + return getUsageRumSessionsWithHttpInfoAsync(startHr, new GetUsageRumSessionsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for RUM sessions. - * - *

See {@link #getUsageRumSessionsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageRumSessionsResponse - * @throws ApiException if fails to make API call - */ - public UsageRumSessionsResponse getUsageRumSessions( - OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) - throws ApiException { + * Get hourly usage for RUM sessions. + * + * See {@link #getUsageRumSessionsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageRumSessionsResponse + * @throws ApiException if fails to make API call + */ + public UsageRumSessionsResponse getUsageRumSessions(OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) throws ApiException { return getUsageRumSessionsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for RUM sessions. - * - *

See {@link #getUsageRumSessionsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageRumSessionsResponse> - */ - public CompletableFuture getUsageRumSessionsAsync( - OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) { - return getUsageRumSessionsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for RUM - * Sessions. Note: hourly usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for RUM sessions. + * + * See {@link #getUsageRumSessionsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageRumSessionsResponse> + */ + public CompletableFuturegetUsageRumSessionsAsync( OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) { + return getUsageRumSessionsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for RUM Sessions. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageRumSessionsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -6359,21 +4768,19 @@ public CompletableFuture getUsageRumSessionsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageRumSessionsWithHttpInfo( - OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageRumSessionsWithHttpInfo(OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageRumSessions"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageRumSessions"); } OffsetDateTime endHr = parameters.endHr; String type = parameters.type; // create path and map variables String localVarPath = "/api/v1/usage/rum_sessions"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -6381,54 +4788,34 @@ public ApiResponse getUsageRumSessionsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageRumSessions", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageRumSessions", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for RUM sessions. * - *

See {@link #getUsageRumSessionsWithHttpInfo}. + * See {@link #getUsageRumSessionsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageRumSessionsResponse>> */ - public CompletableFuture> - getUsageRumSessionsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) { + public CompletableFuture> getUsageRumSessionsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageRumSessionsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageRumSessions")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageRumSessions")); + return result; } OffsetDateTime endHr = parameters.endHr; String type = parameters.type; // create path and map variables String localVarPath = "/api/v1/usage/rum_sessions"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -6438,40 +4825,24 @@ public ApiResponse getUsageRumSessionsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageRumSessions", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageRumSessions", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageRumUnits. */ + /** + * Manage optional parameters to getUsageRumUnits. + */ public static class GetUsageRumUnitsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageRumUnitsOptionalParameters */ public GetUsageRumUnitsOptionalParameters endHr(OffsetDateTime endHr) { @@ -6481,87 +4852,72 @@ public GetUsageRumUnitsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for RUM units. - * - *

See {@link #getUsageRumUnitsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageRumUnitsResponse - * @throws ApiException if fails to make API call - */ - public UsageRumUnitsResponse getUsageRumUnits(OffsetDateTime startHr) throws ApiException { - return getUsageRumUnitsWithHttpInfo(startHr, new GetUsageRumUnitsOptionalParameters()) - .getData(); + * Get hourly usage for RUM units. + * + * See {@link #getUsageRumUnitsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageRumUnitsResponse + * @throws ApiException if fails to make API call + */ + public UsageRumUnitsResponse getUsageRumUnits (OffsetDateTime startHr) throws ApiException { + return getUsageRumUnitsWithHttpInfo( startHr, new GetUsageRumUnitsOptionalParameters()).getData(); } /** - * Get hourly usage for RUM units. - * - *

See {@link #getUsageRumUnitsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageRumUnitsResponse> - */ - public CompletableFuture getUsageRumUnitsAsync(OffsetDateTime startHr) { - return getUsageRumUnitsWithHttpInfoAsync(startHr, new GetUsageRumUnitsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for RUM units. + * + * See {@link #getUsageRumUnitsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageRumUnitsResponse> + */ + public CompletableFuturegetUsageRumUnitsAsync(OffsetDateTime startHr) { + return getUsageRumUnitsWithHttpInfoAsync(startHr, new GetUsageRumUnitsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for RUM units. - * - *

See {@link #getUsageRumUnitsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageRumUnitsResponse - * @throws ApiException if fails to make API call - */ - public UsageRumUnitsResponse getUsageRumUnits( - OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) throws ApiException { + * Get hourly usage for RUM units. + * + * See {@link #getUsageRumUnitsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageRumUnitsResponse + * @throws ApiException if fails to make API call + */ + public UsageRumUnitsResponse getUsageRumUnits(OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) throws ApiException { return getUsageRumUnitsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for RUM units. - * - *

See {@link #getUsageRumUnitsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageRumUnitsResponse> - */ - public CompletableFuture getUsageRumUnitsAsync( - OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) { - return getUsageRumUnitsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for RUM Units. - * Note: hourly usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for RUM units. + * + * See {@link #getUsageRumUnitsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageRumUnitsResponse> + */ + public CompletableFuturegetUsageRumUnitsAsync( OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) { + return getUsageRumUnitsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for RUM Units. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageRumUnitsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -6570,71 +4926,51 @@ public CompletableFuture getUsageRumUnitsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageRumUnitsWithHttpInfo( - OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageRumUnitsWithHttpInfo(OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageRumUnits"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageRumUnits"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/rum"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageRumUnits", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageRumUnits", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for RUM units. * - *

See {@link #getUsageRumUnitsWithHttpInfo}. + * See {@link #getUsageRumUnitsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageRumUnitsResponse>> */ - public CompletableFuture> getUsageRumUnitsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) { + public CompletableFuture> getUsageRumUnitsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageRumUnitsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageRumUnits")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageRumUnits")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/rum"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -6643,40 +4979,24 @@ public CompletableFuture> getUsageRumUnitsWit Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageRumUnits", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageRumUnits", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageSDS. */ + /** + * Manage optional parameters to getUsageSDS. + */ public static class GetUsageSDSOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageSDSOptionalParameters */ public GetUsageSDSOptionalParameters endHr(OffsetDateTime endHr) { @@ -6686,86 +5006,72 @@ public GetUsageSDSOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for sensitive data scanner. - * - *

See {@link #getUsageSDSWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageSDSResponse - * @throws ApiException if fails to make API call - */ - public UsageSDSResponse getUsageSDS(OffsetDateTime startHr) throws ApiException { - return getUsageSDSWithHttpInfo(startHr, new GetUsageSDSOptionalParameters()).getData(); + * Get hourly usage for sensitive data scanner. + * + * See {@link #getUsageSDSWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageSDSResponse + * @throws ApiException if fails to make API call + */ + public UsageSDSResponse getUsageSDS (OffsetDateTime startHr) throws ApiException { + return getUsageSDSWithHttpInfo( startHr, new GetUsageSDSOptionalParameters()).getData(); } /** - * Get hourly usage for sensitive data scanner. - * - *

See {@link #getUsageSDSWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageSDSResponse> - */ - public CompletableFuture getUsageSDSAsync(OffsetDateTime startHr) { - return getUsageSDSWithHttpInfoAsync(startHr, new GetUsageSDSOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for sensitive data scanner. + * + * See {@link #getUsageSDSWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageSDSResponse> + */ + public CompletableFuturegetUsageSDSAsync(OffsetDateTime startHr) { + return getUsageSDSWithHttpInfoAsync(startHr, new GetUsageSDSOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for sensitive data scanner. - * - *

See {@link #getUsageSDSWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageSDSResponse - * @throws ApiException if fails to make API call - */ - public UsageSDSResponse getUsageSDS( - OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) throws ApiException { + * Get hourly usage for sensitive data scanner. + * + * See {@link #getUsageSDSWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageSDSResponse + * @throws ApiException if fails to make API call + */ + public UsageSDSResponse getUsageSDS(OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) throws ApiException { return getUsageSDSWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for sensitive data scanner. - * - *

See {@link #getUsageSDSWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageSDSResponse> - */ - public CompletableFuture getUsageSDSAsync( - OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) { - return getUsageSDSWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for sensitive data scanner. Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for sensitive data scanner. + * + * See {@link #getUsageSDSWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageSDSResponse> + */ + public CompletableFuturegetUsageSDSAsync( OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) { + return getUsageSDSWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for sensitive data scanner. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageSDSResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -6774,71 +5080,51 @@ public CompletableFuture getUsageSDSAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageSDSWithHttpInfo( - OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageSDSWithHttpInfo(OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSDS"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSDS"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/sds"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSDS", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSDS", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for sensitive data scanner. * - *

See {@link #getUsageSDSWithHttpInfo}. + * See {@link #getUsageSDSWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageSDSResponse>> */ - public CompletableFuture> getUsageSDSWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) { + public CompletableFuture> getUsageSDSWithHttpInfoAsync(OffsetDateTime startHr, GetUsageSDSOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSDS")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSDS")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/sds"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -6847,40 +5133,24 @@ public CompletableFuture> getUsageSDSWithHttpInfoA Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSDS", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSDS", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageSNMP. */ + /** + * Manage optional parameters to getUsageSNMP. + */ public static class GetUsageSNMPOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageSNMPOptionalParameters */ public GetUsageSNMPOptionalParameters endHr(OffsetDateTime endHr) { @@ -6890,86 +5160,72 @@ public GetUsageSNMPOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for SNMP devices. - * - *

See {@link #getUsageSNMPWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageSNMPResponse - * @throws ApiException if fails to make API call - */ - public UsageSNMPResponse getUsageSNMP(OffsetDateTime startHr) throws ApiException { - return getUsageSNMPWithHttpInfo(startHr, new GetUsageSNMPOptionalParameters()).getData(); + * Get hourly usage for SNMP devices. + * + * See {@link #getUsageSNMPWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageSNMPResponse + * @throws ApiException if fails to make API call + */ + public UsageSNMPResponse getUsageSNMP (OffsetDateTime startHr) throws ApiException { + return getUsageSNMPWithHttpInfo( startHr, new GetUsageSNMPOptionalParameters()).getData(); } /** - * Get hourly usage for SNMP devices. - * - *

See {@link #getUsageSNMPWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageSNMPResponse> - */ - public CompletableFuture getUsageSNMPAsync(OffsetDateTime startHr) { - return getUsageSNMPWithHttpInfoAsync(startHr, new GetUsageSNMPOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for SNMP devices. + * + * See {@link #getUsageSNMPWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageSNMPResponse> + */ + public CompletableFuturegetUsageSNMPAsync(OffsetDateTime startHr) { + return getUsageSNMPWithHttpInfoAsync(startHr, new GetUsageSNMPOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for SNMP devices. - * - *

See {@link #getUsageSNMPWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageSNMPResponse - * @throws ApiException if fails to make API call - */ - public UsageSNMPResponse getUsageSNMP( - OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) throws ApiException { + * Get hourly usage for SNMP devices. + * + * See {@link #getUsageSNMPWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageSNMPResponse + * @throws ApiException if fails to make API call + */ + public UsageSNMPResponse getUsageSNMP(OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) throws ApiException { return getUsageSNMPWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for SNMP devices. - * - *

See {@link #getUsageSNMPWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageSNMPResponse> - */ - public CompletableFuture getUsageSNMPAsync( - OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) { - return getUsageSNMPWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for SNMP devices. Note: hourly usage data for all products is - * now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for SNMP devices. + * + * See {@link #getUsageSNMPWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageSNMPResponse> + */ + public CompletableFuturegetUsageSNMPAsync( OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) { + return getUsageSNMPWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for SNMP devices. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageSNMPResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -6978,71 +5234,51 @@ public CompletableFuture getUsageSNMPAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageSNMPWithHttpInfo( - OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageSNMPWithHttpInfo(OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSNMP"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSNMP"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/snmp"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSNMP", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSNMP", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for SNMP devices. * - *

See {@link #getUsageSNMPWithHttpInfo}. + * See {@link #getUsageSNMPWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageSNMPResponse>> */ - public CompletableFuture> getUsageSNMPWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) { + public CompletableFuture> getUsageSNMPWithHttpInfoAsync(OffsetDateTime startHr, GetUsageSNMPOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSNMP")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSNMP")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/snmp"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -7051,41 +5287,25 @@ public CompletableFuture> getUsageSNMPWithHttpInf Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSNMP", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSNMP", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageSummary. */ + /** + * Manage optional parameters to getUsageSummary. + */ public static class GetUsageSummaryOptionalParameters { private OffsetDateTime endMonth; private Boolean includeOrgDetails; /** * Set endMonth. - * - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage ending this month. (optional) + * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month. (optional) * @return GetUsageSummaryOptionalParameters */ public GetUsageSummaryOptionalParameters endMonth(OffsetDateTime endMonth) { @@ -7095,7 +5315,6 @@ public GetUsageSummaryOptionalParameters endMonth(OffsetDateTime endMonth) { /** * Set includeOrgDetails. - * * @param includeOrgDetails Include usage summaries for each sub-org. (optional) * @return GetUsageSummaryOptionalParameters */ @@ -7106,82 +5325,71 @@ public GetUsageSummaryOptionalParameters includeOrgDetails(Boolean includeOrgDet } /** - * Get usage across your account. - * - *

See {@link #getUsageSummaryWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @return UsageSummaryResponse - * @throws ApiException if fails to make API call - */ - public UsageSummaryResponse getUsageSummary(OffsetDateTime startMonth) throws ApiException { - return getUsageSummaryWithHttpInfo(startMonth, new GetUsageSummaryOptionalParameters()) - .getData(); + * Get usage across your account. + * + * See {@link #getUsageSummaryWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @return UsageSummaryResponse + * @throws ApiException if fails to make API call + */ + public UsageSummaryResponse getUsageSummary (OffsetDateTime startMonth) throws ApiException { + return getUsageSummaryWithHttpInfo( startMonth, new GetUsageSummaryOptionalParameters()).getData(); } /** - * Get usage across your account. - * - *

See {@link #getUsageSummaryWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @return CompletableFuture<UsageSummaryResponse> - */ - public CompletableFuture getUsageSummaryAsync(OffsetDateTime startMonth) { - return getUsageSummaryWithHttpInfoAsync(startMonth, new GetUsageSummaryOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get usage across your account. + * + * See {@link #getUsageSummaryWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @return CompletableFuture<UsageSummaryResponse> + */ + public CompletableFuturegetUsageSummaryAsync(OffsetDateTime startMonth) { + return getUsageSummaryWithHttpInfoAsync(startMonth, new GetUsageSummaryOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get usage across your account. - * - *

See {@link #getUsageSummaryWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param parameters Optional parameters for the request. - * @return UsageSummaryResponse - * @throws ApiException if fails to make API call - */ - public UsageSummaryResponse getUsageSummary( - OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) throws ApiException { + * Get usage across your account. + * + * See {@link #getUsageSummaryWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param parameters Optional parameters for the request. + * @return UsageSummaryResponse + * @throws ApiException if fails to make API call + */ + public UsageSummaryResponse getUsageSummary(OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) throws ApiException { return getUsageSummaryWithHttpInfo(startMonth, parameters).getData(); } /** - * Get usage across your account. - * - *

See {@link #getUsageSummaryWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageSummaryResponse> - */ - public CompletableFuture getUsageSummaryAsync( - OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) { - return getUsageSummaryWithHttpInfoAsync(startMonth, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get usage across your account. + * + * See {@link #getUsageSummaryWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageSummaryResponse> + */ + public CompletableFuturegetUsageSummaryAsync( OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) { + return getUsageSummaryWithHttpInfoAsync(startMonth, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all usage across your account. + *

Get all usage across your account.

* - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageSummaryResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -7190,119 +5398,81 @@ public CompletableFuture getUsageSummaryAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageSummaryWithHttpInfo( - OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageSummaryWithHttpInfo(OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - throw new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getUsageSummary"); + throw new ApiException(400, "Missing the required parameter 'startMonth' when calling getUsageSummary"); } OffsetDateTime endMonth = parameters.endMonth; Boolean includeOrgDetails = parameters.includeOrgDetails; // create path and map variables String localVarPath = "/api/v1/usage/summary"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_month", startMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_org_details", includeOrgDetails)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSummary", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_org_details", includeOrgDetails)); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSummary", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get usage across your account. * - *

See {@link #getUsageSummaryWithHttpInfo}. + * See {@link #getUsageSummaryWithHttpInfo}. * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for usage beginning in this month. Maximum of 15 months ago. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageSummaryResponse>> */ - public CompletableFuture> getUsageSummaryWithHttpInfoAsync( - OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) { + public CompletableFuture> getUsageSummaryWithHttpInfoAsync(OffsetDateTime startMonth, GetUsageSummaryOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getUsageSummary")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startMonth' when calling getUsageSummary")); + return result; } OffsetDateTime endMonth = parameters.endMonth; Boolean includeOrgDetails = parameters.includeOrgDetails; // create path and map variables String localVarPath = "/api/v1/usage/summary"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_month", startMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_org_details", includeOrgDetails)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_org_details", includeOrgDetails)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSummary", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSummary", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageSynthetics. */ + /** + * Manage optional parameters to getUsageSynthetics. + */ public static class GetUsageSyntheticsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageSyntheticsOptionalParameters */ public GetUsageSyntheticsOptionalParameters endHr(OffsetDateTime endHr) { @@ -7312,96 +5482,80 @@ public GetUsageSyntheticsOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for synthetics checks. - * - *

See {@link #getUsageSyntheticsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageSyntheticsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageSyntheticsResponse getUsageSynthetics(OffsetDateTime startHr) throws ApiException { - return getUsageSyntheticsWithHttpInfo(startHr, new GetUsageSyntheticsOptionalParameters()) - .getData(); + * Get hourly usage for synthetics checks. + * + * See {@link #getUsageSyntheticsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageSyntheticsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageSyntheticsResponse getUsageSynthetics (OffsetDateTime startHr) throws ApiException { + return getUsageSyntheticsWithHttpInfo( startHr, new GetUsageSyntheticsOptionalParameters()).getData(); + } + + /** + * Get hourly usage for synthetics checks. + * + * See {@link #getUsageSyntheticsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageSyntheticsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetUsageSyntheticsAsync(OffsetDateTime startHr) { + return getUsageSyntheticsWithHttpInfoAsync(startHr, new GetUsageSyntheticsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get hourly usage for synthetics checks. + * + * See {@link #getUsageSyntheticsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageSyntheticsResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public UsageSyntheticsResponse getUsageSynthetics(OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) throws ApiException { + return getUsageSyntheticsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for synthetics checks. - * - *

See {@link #getUsageSyntheticsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageSyntheticsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getUsageSyntheticsAsync( - OffsetDateTime startHr) { - return getUsageSyntheticsWithHttpInfoAsync(startHr, new GetUsageSyntheticsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for synthetics checks. + * + * See {@link #getUsageSyntheticsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageSyntheticsResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetUsageSyntheticsAsync( OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) { + return getUsageSyntheticsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); } - /** - * Get hourly usage for synthetics checks. - * - *

See {@link #getUsageSyntheticsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageSyntheticsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public UsageSyntheticsResponse getUsageSynthetics( - OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) throws ApiException { - return getUsageSyntheticsWithHttpInfo(startHr, parameters).getData(); - } /** - * Get hourly usage for synthetics checks. - * - *

See {@link #getUsageSyntheticsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageSyntheticsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getUsageSyntheticsAsync( - OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) { - return getUsageSyntheticsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for synthetics checks. - * Note: hourly usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + *

Get hourly usage for synthetics checks. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageSyntheticsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -7409,78 +5563,56 @@ public CompletableFuture getUsageSyntheticsAsync( * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden - User is not authorized -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse getUsageSyntheticsWithHttpInfo( - OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageSyntheticsWithHttpInfo(OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSynthetics"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSynthetics"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/synthetics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSynthetics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSynthetics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for synthetics checks. * - *

See {@link #getUsageSyntheticsWithHttpInfo}. + * See {@link #getUsageSyntheticsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageSyntheticsResponse>> * @deprecated */ @Deprecated - public CompletableFuture> - getUsageSyntheticsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) { + public CompletableFuture> getUsageSyntheticsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageSyntheticsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSynthetics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSynthetics")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/synthetics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -7489,40 +5621,24 @@ public ApiResponse getUsageSyntheticsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSynthetics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSynthetics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageSyntheticsAPI. */ + /** + * Manage optional parameters to getUsageSyntheticsAPI. + */ public static class GetUsageSyntheticsAPIOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageSyntheticsAPIOptionalParameters */ public GetUsageSyntheticsAPIOptionalParameters endHr(OffsetDateTime endHr) { @@ -7532,92 +5648,72 @@ public GetUsageSyntheticsAPIOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for synthetics API checks. - * - *

See {@link #getUsageSyntheticsAPIWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageSyntheticsAPIResponse - * @throws ApiException if fails to make API call - */ - public UsageSyntheticsAPIResponse getUsageSyntheticsAPI(OffsetDateTime startHr) - throws ApiException { - return getUsageSyntheticsAPIWithHttpInfo(startHr, new GetUsageSyntheticsAPIOptionalParameters()) - .getData(); + * Get hourly usage for synthetics API checks. + * + * See {@link #getUsageSyntheticsAPIWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageSyntheticsAPIResponse + * @throws ApiException if fails to make API call + */ + public UsageSyntheticsAPIResponse getUsageSyntheticsAPI (OffsetDateTime startHr) throws ApiException { + return getUsageSyntheticsAPIWithHttpInfo( startHr, new GetUsageSyntheticsAPIOptionalParameters()).getData(); } /** - * Get hourly usage for synthetics API checks. - * - *

See {@link #getUsageSyntheticsAPIWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageSyntheticsAPIResponse> - */ - public CompletableFuture getUsageSyntheticsAPIAsync( - OffsetDateTime startHr) { - return getUsageSyntheticsAPIWithHttpInfoAsync( - startHr, new GetUsageSyntheticsAPIOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for synthetics API checks. + * + * See {@link #getUsageSyntheticsAPIWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageSyntheticsAPIResponse> + */ + public CompletableFuturegetUsageSyntheticsAPIAsync(OffsetDateTime startHr) { + return getUsageSyntheticsAPIWithHttpInfoAsync(startHr, new GetUsageSyntheticsAPIOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for synthetics API checks. - * - *

See {@link #getUsageSyntheticsAPIWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageSyntheticsAPIResponse - * @throws ApiException if fails to make API call - */ - public UsageSyntheticsAPIResponse getUsageSyntheticsAPI( - OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) - throws ApiException { + * Get hourly usage for synthetics API checks. + * + * See {@link #getUsageSyntheticsAPIWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageSyntheticsAPIResponse + * @throws ApiException if fails to make API call + */ + public UsageSyntheticsAPIResponse getUsageSyntheticsAPI(OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) throws ApiException { return getUsageSyntheticsAPIWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for synthetics API checks. - * - *

See {@link #getUsageSyntheticsAPIWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageSyntheticsAPIResponse> - */ - public CompletableFuture getUsageSyntheticsAPIAsync( - OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) { - return getUsageSyntheticsAPIWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for synthetics API - * checks. Note: hourly usage data for all products is now available in the - * Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for synthetics API checks. + * + * See {@link #getUsageSyntheticsAPIWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageSyntheticsAPIResponse> + */ + public CompletableFuturegetUsageSyntheticsAPIAsync( OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) { + return getUsageSyntheticsAPIWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for synthetics API checks. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageSyntheticsAPIResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -7626,73 +5722,51 @@ public CompletableFuture getUsageSyntheticsAPIAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageSyntheticsAPIWithHttpInfo( - OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageSyntheticsAPIWithHttpInfo(OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsAPI"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsAPI"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/synthetics_api"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSyntheticsAPI", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSyntheticsAPI", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for synthetics API checks. * - *

See {@link #getUsageSyntheticsAPIWithHttpInfo}. + * See {@link #getUsageSyntheticsAPIWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageSyntheticsAPIResponse>> */ - public CompletableFuture> - getUsageSyntheticsAPIWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) { + public CompletableFuture> getUsageSyntheticsAPIWithHttpInfoAsync(OffsetDateTime startHr, GetUsageSyntheticsAPIOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsAPI")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsAPI")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/synthetics_api"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -7701,40 +5775,24 @@ public ApiResponse getUsageSyntheticsAPIWithHttpInfo Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSyntheticsAPI", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSyntheticsAPI", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageSyntheticsBrowser. */ + /** + * Manage optional parameters to getUsageSyntheticsBrowser. + */ public static class GetUsageSyntheticsBrowserOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageSyntheticsBrowserOptionalParameters */ public GetUsageSyntheticsBrowserOptionalParameters endHr(OffsetDateTime endHr) { @@ -7744,92 +5802,72 @@ public GetUsageSyntheticsBrowserOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for synthetics browser checks. - * - *

See {@link #getUsageSyntheticsBrowserWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageSyntheticsBrowserResponse - * @throws ApiException if fails to make API call - */ - public UsageSyntheticsBrowserResponse getUsageSyntheticsBrowser(OffsetDateTime startHr) - throws ApiException { - return getUsageSyntheticsBrowserWithHttpInfo( - startHr, new GetUsageSyntheticsBrowserOptionalParameters()) - .getData(); + * Get hourly usage for synthetics browser checks. + * + * See {@link #getUsageSyntheticsBrowserWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageSyntheticsBrowserResponse + * @throws ApiException if fails to make API call + */ + public UsageSyntheticsBrowserResponse getUsageSyntheticsBrowser (OffsetDateTime startHr) throws ApiException { + return getUsageSyntheticsBrowserWithHttpInfo( startHr, new GetUsageSyntheticsBrowserOptionalParameters()).getData(); } /** - * Get hourly usage for synthetics browser checks. - * - *

See {@link #getUsageSyntheticsBrowserWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageSyntheticsBrowserResponse> - */ - public CompletableFuture getUsageSyntheticsBrowserAsync( - OffsetDateTime startHr) { - return getUsageSyntheticsBrowserWithHttpInfoAsync( - startHr, new GetUsageSyntheticsBrowserOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for synthetics browser checks. + * + * See {@link #getUsageSyntheticsBrowserWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageSyntheticsBrowserResponse> + */ + public CompletableFuturegetUsageSyntheticsBrowserAsync(OffsetDateTime startHr) { + return getUsageSyntheticsBrowserWithHttpInfoAsync(startHr, new GetUsageSyntheticsBrowserOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for synthetics browser checks. - * - *

See {@link #getUsageSyntheticsBrowserWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageSyntheticsBrowserResponse - * @throws ApiException if fails to make API call - */ - public UsageSyntheticsBrowserResponse getUsageSyntheticsBrowser( - OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) - throws ApiException { + * Get hourly usage for synthetics browser checks. + * + * See {@link #getUsageSyntheticsBrowserWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageSyntheticsBrowserResponse + * @throws ApiException if fails to make API call + */ + public UsageSyntheticsBrowserResponse getUsageSyntheticsBrowser(OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) throws ApiException { return getUsageSyntheticsBrowserWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for synthetics browser checks. - * - *

See {@link #getUsageSyntheticsBrowserWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageSyntheticsBrowserResponse> - */ - public CompletableFuture getUsageSyntheticsBrowserAsync( - OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) { - return getUsageSyntheticsBrowserWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for synthetics browser checks. Note: hourly usage data for - * all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for synthetics browser checks. + * + * See {@link #getUsageSyntheticsBrowserWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageSyntheticsBrowserResponse> + */ + public CompletableFuturegetUsageSyntheticsBrowserAsync( OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) { + return getUsageSyntheticsBrowserWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for synthetics browser checks. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageSyntheticsBrowserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -7838,75 +5876,51 @@ public CompletableFuture getUsageSyntheticsBrows * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageSyntheticsBrowserWithHttpInfo( - OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageSyntheticsBrowserWithHttpInfo(OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsBrowser"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsBrowser"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/synthetics_browser"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSyntheticsBrowser", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSyntheticsBrowser", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for synthetics browser checks. * - *

See {@link #getUsageSyntheticsBrowserWithHttpInfo}. + * See {@link #getUsageSyntheticsBrowserWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageSyntheticsBrowserResponse>> */ - public CompletableFuture> - getUsageSyntheticsBrowserWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) { + public CompletableFuture> getUsageSyntheticsBrowserWithHttpInfoAsync(OffsetDateTime startHr, GetUsageSyntheticsBrowserOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling getUsageSyntheticsBrowser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSyntheticsBrowser")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/synthetics_browser"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -7915,41 +5929,24 @@ public ApiResponse getUsageSyntheticsBrowserWith Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageSyntheticsBrowser", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageSyntheticsBrowser", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageTimeseries. */ + /** + * Manage optional parameters to getUsageTimeseries. + */ public static class GetUsageTimeseriesOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageTimeseriesOptionalParameters */ public GetUsageTimeseriesOptionalParameters endHr(OffsetDateTime endHr) { @@ -7959,89 +5956,72 @@ public GetUsageTimeseriesOptionalParameters endHr(OffsetDateTime endHr) { } /** - * Get hourly usage for custom metrics. - * - *

See {@link #getUsageTimeseriesWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return UsageTimeseriesResponse - * @throws ApiException if fails to make API call - */ - public UsageTimeseriesResponse getUsageTimeseries(OffsetDateTime startHr) throws ApiException { - return getUsageTimeseriesWithHttpInfo(startHr, new GetUsageTimeseriesOptionalParameters()) - .getData(); + * Get hourly usage for custom metrics. + * + * See {@link #getUsageTimeseriesWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageTimeseriesResponse + * @throws ApiException if fails to make API call + */ + public UsageTimeseriesResponse getUsageTimeseries (OffsetDateTime startHr) throws ApiException { + return getUsageTimeseriesWithHttpInfo( startHr, new GetUsageTimeseriesOptionalParameters()).getData(); } /** - * Get hourly usage for custom metrics. - * - *

See {@link #getUsageTimeseriesWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @return CompletableFuture<UsageTimeseriesResponse> - */ - public CompletableFuture getUsageTimeseriesAsync( - OffsetDateTime startHr) { - return getUsageTimeseriesWithHttpInfoAsync(startHr, new GetUsageTimeseriesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for custom metrics. + * + * See {@link #getUsageTimeseriesWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageTimeseriesResponse> + */ + public CompletableFuturegetUsageTimeseriesAsync(OffsetDateTime startHr) { + return getUsageTimeseriesWithHttpInfoAsync(startHr, new GetUsageTimeseriesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for custom metrics. - * - *

See {@link #getUsageTimeseriesWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageTimeseriesResponse - * @throws ApiException if fails to make API call - */ - public UsageTimeseriesResponse getUsageTimeseries( - OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) throws ApiException { + * Get hourly usage for custom metrics. + * + * See {@link #getUsageTimeseriesWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageTimeseriesResponse + * @throws ApiException if fails to make API call + */ + public UsageTimeseriesResponse getUsageTimeseries(OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) throws ApiException { return getUsageTimeseriesWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for custom metrics. - * - *

See {@link #getUsageTimeseriesWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageTimeseriesResponse> - */ - public CompletableFuture getUsageTimeseriesAsync( - OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) { - return getUsageTimeseriesWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get hourly usage for custom metrics. - * Note: hourly usage data for all products is now available in the Get - * hourly usage by product family API. Refer to Migrating - * from the V1 Hourly Usage APIs to V2 for the associated migration guide. + * Get hourly usage for custom metrics. + * + * See {@link #getUsageTimeseriesWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageTimeseriesResponse> + */ + public CompletableFuturegetUsageTimeseriesAsync( OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) { + return getUsageTimeseriesWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get hourly usage for custom metrics. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageTimeseriesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -8050,72 +6030,51 @@ public CompletableFuture getUsageTimeseriesAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageTimeseriesWithHttpInfo( - OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageTimeseriesWithHttpInfo(OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageTimeseries"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageTimeseries"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/timeseries"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageTimeseries", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageTimeseries", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for custom metrics. * - *

See {@link #getUsageTimeseriesWithHttpInfo}. + * See {@link #getUsageTimeseriesWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage - * beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageTimeseriesResponse>> */ - public CompletableFuture> - getUsageTimeseriesWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) { + public CompletableFuture> getUsageTimeseriesWithHttpInfoAsync(OffsetDateTime startHr, GetUsageTimeseriesOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startHr' when calling getUsageTimeseries")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageTimeseries")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v1/usage/timeseries"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -8124,32 +6083,18 @@ public ApiResponse getUsageTimeseriesWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageTimeseries", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageTimeseries", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageTopAvgMetrics. */ + /** + * Manage optional parameters to getUsageTopAvgMetrics. + */ public static class GetUsageTopAvgMetricsOptionalParameters { private OffsetDateTime month; private OffsetDateTime day; @@ -8159,10 +6104,7 @@ public static class GetUsageTopAvgMetricsOptionalParameters { /** * Set month. - * - * @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage - * beginning at this hour. (Either month or day should be specified, but not both) - * (optional) + * @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) (optional) * @return GetUsageTopAvgMetricsOptionalParameters */ public GetUsageTopAvgMetricsOptionalParameters month(OffsetDateTime month) { @@ -8172,9 +6114,7 @@ public GetUsageTopAvgMetricsOptionalParameters month(OffsetDateTime month) { /** * Set day. - * - * @param day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning - * at this hour. (Either month or day should be specified, but not both) (optional) + * @param day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both) (optional) * @return GetUsageTopAvgMetricsOptionalParameters */ public GetUsageTopAvgMetricsOptionalParameters day(OffsetDateTime day) { @@ -8184,7 +6124,6 @@ public GetUsageTopAvgMetricsOptionalParameters day(OffsetDateTime day) { /** * Set names. - * * @param names Comma-separated list of metric names. (optional) * @return GetUsageTopAvgMetricsOptionalParameters */ @@ -8195,9 +6134,7 @@ public GetUsageTopAvgMetricsOptionalParameters names(List names) { /** * Set limit. - * - * @param limit Maximum number of results to return (between 1 and 5000) - defaults to 500 - * results if limit not specified. (optional, default to 500) + * @param limit Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. (optional, default to 500) * @return GetUsageTopAvgMetricsOptionalParameters */ public GetUsageTopAvgMetricsOptionalParameters limit(Integer limit) { @@ -8207,9 +6144,7 @@ public GetUsageTopAvgMetricsOptionalParameters limit(Integer limit) { /** * Set nextRecordId. - * - * @param nextRecordId List following results with a next_record_id provided in the previous - * query. (optional) + * @param nextRecordId List following results with a next_record_id provided in the previous query. (optional) * @return GetUsageTopAvgMetricsOptionalParameters */ public GetUsageTopAvgMetricsOptionalParameters nextRecordId(String nextRecordId) { @@ -8219,75 +6154,66 @@ public GetUsageTopAvgMetricsOptionalParameters nextRecordId(String nextRecordId) } /** - * Get all custom metrics by hourly average. - * - *

See {@link #getUsageTopAvgMetricsWithHttpInfo}. - * - * @return UsageTopAvgMetricsResponse - * @throws ApiException if fails to make API call - */ - public UsageTopAvgMetricsResponse getUsageTopAvgMetrics() throws ApiException { - return getUsageTopAvgMetricsWithHttpInfo(new GetUsageTopAvgMetricsOptionalParameters()) - .getData(); + * Get all custom metrics by hourly average. + * + * See {@link #getUsageTopAvgMetricsWithHttpInfo}. + * + * @return UsageTopAvgMetricsResponse + * @throws ApiException if fails to make API call + */ + public UsageTopAvgMetricsResponse getUsageTopAvgMetrics () throws ApiException { + return getUsageTopAvgMetricsWithHttpInfo(new GetUsageTopAvgMetricsOptionalParameters()).getData(); } /** - * Get all custom metrics by hourly average. - * - *

See {@link #getUsageTopAvgMetricsWithHttpInfoAsync}. - * - * @return CompletableFuture<UsageTopAvgMetricsResponse> - */ - public CompletableFuture getUsageTopAvgMetricsAsync() { - return getUsageTopAvgMetricsWithHttpInfoAsync(new GetUsageTopAvgMetricsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all custom metrics by hourly average. + * + * See {@link #getUsageTopAvgMetricsWithHttpInfoAsync}. + * + * @return CompletableFuture<UsageTopAvgMetricsResponse> + */ + public CompletableFuturegetUsageTopAvgMetricsAsync() { + return getUsageTopAvgMetricsWithHttpInfoAsync(new GetUsageTopAvgMetricsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all custom metrics by hourly average. - * - *

See {@link #getUsageTopAvgMetricsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return UsageTopAvgMetricsResponse - * @throws ApiException if fails to make API call - */ - public UsageTopAvgMetricsResponse getUsageTopAvgMetrics( - GetUsageTopAvgMetricsOptionalParameters parameters) throws ApiException { + * Get all custom metrics by hourly average. + * + * See {@link #getUsageTopAvgMetricsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return UsageTopAvgMetricsResponse + * @throws ApiException if fails to make API call + */ + public UsageTopAvgMetricsResponse getUsageTopAvgMetrics(GetUsageTopAvgMetricsOptionalParameters parameters) throws ApiException { return getUsageTopAvgMetricsWithHttpInfo(parameters).getData(); } /** - * Get all custom metrics by hourly average. - * - *

See {@link #getUsageTopAvgMetricsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageTopAvgMetricsResponse> - */ - public CompletableFuture getUsageTopAvgMetricsAsync( - GetUsageTopAvgMetricsOptionalParameters parameters) { - return getUsageTopAvgMetricsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all custom metrics by hourly average. + * + * See {@link #getUsageTopAvgMetricsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageTopAvgMetricsResponse> + */ + public CompletableFuturegetUsageTopAvgMetricsAsync(GetUsageTopAvgMetricsOptionalParameters parameters) { + return getUsageTopAvgMetricsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all custom - * metrics by hourly average. Use the month parameter to get a month-to-date data resolution - * or use the day parameter to get a daily resolution. One of the two is required, and only one of - * the two is allowed. + *

Get all custom metrics by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.

* * @param parameters Optional parameters for the request. * @return ApiResponse<UsageTopAvgMetricsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -8296,8 +6222,7 @@ public CompletableFuture getUsageTopAvgMetricsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getUsageTopAvgMetricsWithHttpInfo( - GetUsageTopAvgMetricsOptionalParameters parameters) throws ApiException { + public ApiResponse getUsageTopAvgMetricsWithHttpInfo(GetUsageTopAvgMetricsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; OffsetDateTime month = parameters.month; OffsetDateTime day = parameters.day; @@ -8307,6 +6232,7 @@ public ApiResponse getUsageTopAvgMetricsWithHttpInfo // create path and map variables String localVarPath = "/api/v1/usage/top_avg_metrics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -8316,36 +6242,19 @@ public ApiResponse getUsageTopAvgMetricsWithHttpInfo localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "next_record_id", nextRecordId)); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageTopAvgMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageTopAvgMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all custom metrics by hourly average. * - *

See {@link #getUsageTopAvgMetricsWithHttpInfo}. + * See {@link #getUsageTopAvgMetricsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageTopAvgMetricsResponse>> */ - public CompletableFuture> - getUsageTopAvgMetricsWithHttpInfoAsync(GetUsageTopAvgMetricsOptionalParameters parameters) { + public CompletableFuture> getUsageTopAvgMetricsWithHttpInfoAsync(GetUsageTopAvgMetricsOptionalParameters parameters) { Object localVarPostBody = null; OffsetDateTime month = parameters.month; OffsetDateTime day = parameters.day; @@ -8355,6 +6264,7 @@ public ApiResponse getUsageTopAvgMetricsWithHttpInfo // create path and map variables String localVarPath = "/api/v1/usage/top_avg_metrics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -8366,28 +6276,12 @@ public ApiResponse getUsageTopAvgMetricsWithHttpInfo Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsageMeteringApi.getUsageTopAvgMetrics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsageMeteringApi.getUsageTopAvgMetrics", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/UsersApi.java b/src/main/java/com/datadog/api/client/v1/api/UsersApi.java index ce176baa987..e8b814438eb 100644 --- a/src/main/java/com/datadog/api/client/v1/api/UsersApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/UsersApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.User; -import com.datadog.api.client.v1.model.UserDisableResponse; -import com.datadog.api.client.v1.model.UserListResponse; -import com.datadog.api.client.v1.model.UserResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.UserListResponse; +import com.datadog.api.client.v1.model.UserResponse; +import com.datadog.api.client.v1.model.User; +import com.datadog.api.client.v1.model.UserDisableResponse; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsersApi { private ApiClient apiClient; - public UsersApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,45 +55,43 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a user. - * - *

See {@link #createUserWithHttpInfo}. - * - * @param body User object that needs to be created. (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse createUser(User body) throws ApiException { + * Create a user. + * + * See {@link #createUserWithHttpInfo}. + * + * @param body User object that needs to be created. (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse createUser(User body) throws ApiException { return createUserWithHttpInfo(body).getData(); } /** - * Create a user. - * - *

See {@link #createUserWithHttpInfoAsync}. - * - * @param body User object that needs to be created. (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture createUserAsync(User body) { - return createUserWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a user. + * + * See {@link #createUserWithHttpInfoAsync}. + * + * @param body User object that needs to be created. (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFuturecreateUserAsync(User body) { + return createUserWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a user for your organization. - * - *

Note: Users can only be created with the admin access role if application - * keys belong to administrators. + *

Create a user for your organization.

+ *

Note: Users can only be created with the admin access role + * if application keys belong to administrators.

* * @param body User object that needs to be created. (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -105,32 +111,18 @@ public ApiResponse createUserWithHttpInfo(User body) throws ApiExc // create path and map variables String localVarPath = "/api/v1/user"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsersApi.createUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsersApi.createUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a user. * - *

See {@link #createUserWithHttpInfo}. + * See {@link #createUserWithHttpInfo}. * * @param body User object that needs to be created. (required) * @return CompletableFuture<ApiResponse<UserResponse>> @@ -140,83 +132,66 @@ public CompletableFuture> createUserWithHttpInfoAsync( // 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 createUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createUser")); + return result; } // create path and map variables String localVarPath = "/api/v1/user"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsersApi.createUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsersApi.createUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Disable a user. - * - *

See {@link #disableUserWithHttpInfo}. - * - * @param userHandle The handle of the user. (required) - * @return UserDisableResponse - * @throws ApiException if fails to make API call - */ - public UserDisableResponse disableUser(String userHandle) throws ApiException { + * Disable a user. + * + * See {@link #disableUserWithHttpInfo}. + * + * @param userHandle The handle of the user. (required) + * @return UserDisableResponse + * @throws ApiException if fails to make API call + */ + public UserDisableResponse disableUser(String userHandle) throws ApiException { return disableUserWithHttpInfo(userHandle).getData(); } /** - * Disable a user. - * - *

See {@link #disableUserWithHttpInfoAsync}. - * - * @param userHandle The handle of the user. (required) - * @return CompletableFuture<UserDisableResponse> - */ - public CompletableFuture disableUserAsync(String userHandle) { - return disableUserWithHttpInfoAsync(userHandle) - .thenApply( - response -> { - return response.getData(); - }); + * Disable a user. + * + * See {@link #disableUserWithHttpInfoAsync}. + * + * @param userHandle The handle of the user. (required) + * @return CompletableFuture<UserDisableResponse> + */ + public CompletableFuturedisableUserAsync(String userHandle) { + return disableUserWithHttpInfoAsync(userHandle).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a user from an organization. - * + *

Delete a user from an organization.

*

Note: This endpoint can only be used with application keys belonging to - * administrators. + * administrators.

* * @param userHandle The handle of the user. (required) * @return ApiResponse<UserDisableResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 User created -
+ *
* * * @@ -226,135 +201,97 @@ public CompletableFuture disableUserAsync(String userHandle * *
Response details
Status Code Description Response Headers
200 User disabled -
429 Too many requests -
*/ - public ApiResponse disableUserWithHttpInfo(String userHandle) - throws ApiException { + public ApiResponse disableUserWithHttpInfo(String userHandle) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'userHandle' is set if (userHandle == null) { - throw new ApiException( - 400, "Missing the required parameter 'userHandle' when calling disableUser"); + throw new ApiException(400, "Missing the required parameter 'userHandle' when calling disableUser"); } // create path and map variables - String localVarPath = - "/api/v1/user/{user_handle}" - .replaceAll( - "\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + String localVarPath = "/api/v1/user/{user_handle}" + .replaceAll("\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsersApi.disableUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsersApi.disableUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Disable a user. * - *

See {@link #disableUserWithHttpInfo}. + * See {@link #disableUserWithHttpInfo}. * * @param userHandle The handle of the user. (required) * @return CompletableFuture<ApiResponse<UserDisableResponse>> */ - public CompletableFuture> disableUserWithHttpInfoAsync( - String userHandle) { + public CompletableFuture> disableUserWithHttpInfoAsync(String userHandle) { Object localVarPostBody = null; // verify the required parameter 'userHandle' is set if (userHandle == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'userHandle' when calling disableUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userHandle' when calling disableUser")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/user/{user_handle}" - .replaceAll( - "\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + String localVarPath = "/api/v1/user/{user_handle}" + .replaceAll("\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsersApi.disableUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsersApi.disableUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get user details. - * - *

See {@link #getUserWithHttpInfo}. - * - * @param userHandle The ID of the user. (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse getUser(String userHandle) throws ApiException { + * Get user details. + * + * See {@link #getUserWithHttpInfo}. + * + * @param userHandle The ID of the user. (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse getUser(String userHandle) throws ApiException { return getUserWithHttpInfo(userHandle).getData(); } /** - * Get user details. - * - *

See {@link #getUserWithHttpInfoAsync}. - * - * @param userHandle The ID of the user. (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture getUserAsync(String userHandle) { - return getUserWithHttpInfoAsync(userHandle) - .thenApply( - response -> { - return response.getData(); - }); + * Get user details. + * + * See {@link #getUserWithHttpInfoAsync}. + * + * @param userHandle The ID of the user. (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFuturegetUserAsync(String userHandle) { + return getUserWithHttpInfoAsync(userHandle).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a user's details. + *

Get a user's details.

* * @param userHandle The ID of the user. (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -368,41 +305,24 @@ public ApiResponse getUserWithHttpInfo(String userHandle) throws A // verify the required parameter 'userHandle' is set if (userHandle == null) { - throw new ApiException( - 400, "Missing the required parameter 'userHandle' when calling getUser"); + throw new ApiException(400, "Missing the required parameter 'userHandle' when calling getUser"); } // create path and map variables - String localVarPath = - "/api/v1/user/{user_handle}" - .replaceAll( - "\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + String localVarPath = "/api/v1/user/{user_handle}" + .replaceAll("\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsersApi.getUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsersApi.getUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get user details. * - *

See {@link #getUserWithHttpInfo}. + * See {@link #getUserWithHttpInfo}. * * @param userHandle The ID of the user. (required) * @return CompletableFuture<ApiResponse<UserResponse>> @@ -412,81 +332,62 @@ public CompletableFuture> getUserWithHttpInfoAsync(Str // verify the required parameter 'userHandle' is set if (userHandle == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'userHandle' when calling getUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userHandle' when calling getUser")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/user/{user_handle}" - .replaceAll( - "\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + String localVarPath = "/api/v1/user/{user_handle}" + .replaceAll("\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsersApi.getUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsersApi.getUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List all users. - * - *

See {@link #listUsersWithHttpInfo}. - * - * @return UserListResponse - * @throws ApiException if fails to make API call - */ - public UserListResponse listUsers() throws ApiException { + * List all users. + * + * See {@link #listUsersWithHttpInfo}. + * + * @return UserListResponse + * @throws ApiException if fails to make API call + */ + public UserListResponse listUsers() throws ApiException { return listUsersWithHttpInfo().getData(); } /** - * List all users. - * - *

See {@link #listUsersWithHttpInfoAsync}. - * - * @return CompletableFuture<UserListResponse> - */ - public CompletableFuture listUsersAsync() { - return listUsersWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List all users. + * + * See {@link #listUsersWithHttpInfoAsync}. + * + * @return CompletableFuture<UserListResponse> + */ + public CompletableFuturelistUsersAsync() { + return listUsersWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all users for your organization. + *

List all users for your organization.

* * @return ApiResponse<UserListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK for get user -
+ *
* * * @@ -499,32 +400,18 @@ public ApiResponse listUsersWithHttpInfo() throws ApiException // create path and map variables String localVarPath = "/api/v1/user"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsersApi.listUsers", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsersApi.listUsers", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List all users. * - *

See {@link #listUsersWithHttpInfo}. + * See {@link #listUsersWithHttpInfo}. * * @return CompletableFuture<ApiResponse<UserListResponse>> */ @@ -533,78 +420,61 @@ public CompletableFuture> listUsersWithHttpInfoAsy // create path and map variables String localVarPath = "/api/v1/user"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsersApi.listUsers", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsersApi.listUsers", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a user. - * - *

See {@link #updateUserWithHttpInfo}. - * - * @param userHandle The ID of the user. (required) - * @param body Description of the update. (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse updateUser(String userHandle, User body) throws ApiException { + * Update a user. + * + * See {@link #updateUserWithHttpInfo}. + * + * @param userHandle The ID of the user. (required) + * @param body Description of the update. (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse updateUser(String userHandle, User body) throws ApiException { return updateUserWithHttpInfo(userHandle, body).getData(); } /** - * Update a user. - * - *

See {@link #updateUserWithHttpInfoAsync}. - * - * @param userHandle The ID of the user. (required) - * @param body Description of the update. (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture updateUserAsync(String userHandle, User body) { - return updateUserWithHttpInfoAsync(userHandle, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a user. + * + * See {@link #updateUserWithHttpInfoAsync}. + * + * @param userHandle The ID of the user. (required) + * @param body Description of the update. (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFutureupdateUserAsync(String userHandle, User body) { + return updateUserWithHttpInfoAsync(userHandle, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a user information. - * - *

Note: It can only be used with application keys belonging to - * administrators. + *

Update a user information.

+ *

Note: It can only be used with application keys belonging to administrators.

* * @param userHandle The ID of the user. (required) * @param body Description of the update. (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -614,14 +484,12 @@ public CompletableFuture updateUserAsync(String userHandle, User b * *
Response details
Status Code Description Response Headers
200 User updated -
429 Too many requests -
*/ - public ApiResponse updateUserWithHttpInfo(String userHandle, User body) - throws ApiException { + public ApiResponse updateUserWithHttpInfo(String userHandle, User body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'userHandle' is set if (userHandle == null) { - throw new ApiException( - 400, "Missing the required parameter 'userHandle' when calling updateUser"); + throw new ApiException(400, "Missing the required parameter 'userHandle' when calling updateUser"); } // verify the required parameter 'body' is set @@ -629,94 +497,58 @@ public ApiResponse updateUserWithHttpInfo(String userHandle, User throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); } // create path and map variables - String localVarPath = - "/api/v1/user/{user_handle}" - .replaceAll( - "\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + String localVarPath = "/api/v1/user/{user_handle}" + .replaceAll("\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.UsersApi.updateUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.UsersApi.updateUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a user. * - *

See {@link #updateUserWithHttpInfo}. + * See {@link #updateUserWithHttpInfo}. * * @param userHandle The ID of the user. (required) * @param body Description of the update. (required) * @return CompletableFuture<ApiResponse<UserResponse>> */ - public CompletableFuture> updateUserWithHttpInfoAsync( - String userHandle, User body) { + public CompletableFuture> updateUserWithHttpInfoAsync(String userHandle, User body) { Object localVarPostBody = body; // verify the required parameter 'userHandle' is set if (userHandle == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'userHandle' when calling updateUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userHandle' when calling updateUser")); + 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 updateUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateUser")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/user/{user_handle}" - .replaceAll( - "\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + String localVarPath = "/api/v1/user/{user_handle}" + .replaceAll("\\{" + "user_handle" + "\\}", apiClient.escapeString(userHandle.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.UsersApi.updateUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.UsersApi.updateUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/api/WebhooksIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/WebhooksIntegrationApi.java index 2ffdea0ca40..1064339cb53 100644 --- a/src/main/java/com/datadog/api/client/v1/api/WebhooksIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/WebhooksIntegrationApi.java @@ -1,26 +1,34 @@ + package com.datadog.api.client.v1.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.WebhooksIntegration; -import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariable; -import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableResponse; -import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableUpdateRequest; -import com.datadog.api.client.v1.model.WebhooksIntegrationUpdateRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableResponse; +import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariable; +import com.datadog.api.client.v1.model.WebhooksIntegrationCustomVariableUpdateRequest; +import com.datadog.api.client.v1.model.WebhooksIntegration; +import com.datadog.api.client.v1.model.WebhooksIntegrationUpdateRequest; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WebhooksIntegrationApi { private ApiClient apiClient; - public WebhooksIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -48,44 +56,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a webhooks integration. - * - *

See {@link #createWebhooksIntegrationWithHttpInfo}. - * - * @param body Create a webhooks integration request body. (required) - * @return WebhooksIntegration - * @throws ApiException if fails to make API call - */ - public WebhooksIntegration createWebhooksIntegration(WebhooksIntegration body) - throws ApiException { + * Create a webhooks integration. + * + * See {@link #createWebhooksIntegrationWithHttpInfo}. + * + * @param body Create a webhooks integration request body. (required) + * @return WebhooksIntegration + * @throws ApiException if fails to make API call + */ + public WebhooksIntegration createWebhooksIntegration(WebhooksIntegration body) throws ApiException { return createWebhooksIntegrationWithHttpInfo(body).getData(); } /** - * Create a webhooks integration. - * - *

See {@link #createWebhooksIntegrationWithHttpInfoAsync}. - * - * @param body Create a webhooks integration request body. (required) - * @return CompletableFuture<WebhooksIntegration> - */ - public CompletableFuture createWebhooksIntegrationAsync( - WebhooksIntegration body) { - return createWebhooksIntegrationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a webhooks integration. + * + * See {@link #createWebhooksIntegrationWithHttpInfoAsync}. + * + * @param body Create a webhooks integration request body. (required) + * @return CompletableFuture<WebhooksIntegration> + */ + public CompletableFuturecreateWebhooksIntegrationAsync(WebhooksIntegration body) { + return createWebhooksIntegrationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Creates an endpoint with the name <WEBHOOK_NAME>. + *

Creates an endpoint with the name <WEBHOOK_NAME>.

* * @param body Create a webhooks integration request body. (required) * @return ApiResponse<WebhooksIntegration> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -94,131 +99,95 @@ public CompletableFuture createWebhooksIntegrationAsync( * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse createWebhooksIntegrationWithHttpInfo( - WebhooksIntegration body) throws ApiException { + public ApiResponse createWebhooksIntegrationWithHttpInfo(WebhooksIntegration body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createWebhooksIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createWebhooksIntegration"); } // create path and map variables String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.createWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.createWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a webhooks integration. * - *

See {@link #createWebhooksIntegrationWithHttpInfo}. + * See {@link #createWebhooksIntegrationWithHttpInfo}. * * @param body Create a webhooks integration request body. (required) * @return CompletableFuture<ApiResponse<WebhooksIntegration>> */ - public CompletableFuture> - createWebhooksIntegrationWithHttpInfoAsync(WebhooksIntegration body) { + public CompletableFuture> createWebhooksIntegrationWithHttpInfoAsync(WebhooksIntegration body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createWebhooksIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createWebhooksIntegration")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.createWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.createWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a custom variable. - * - *

See {@link #createWebhooksIntegrationCustomVariableWithHttpInfo}. - * - * @param body Define a custom variable request body. (required) - * @return WebhooksIntegrationCustomVariableResponse - * @throws ApiException if fails to make API call - */ - public WebhooksIntegrationCustomVariableResponse createWebhooksIntegrationCustomVariable( - WebhooksIntegrationCustomVariable body) throws ApiException { + * Create a custom variable. + * + * See {@link #createWebhooksIntegrationCustomVariableWithHttpInfo}. + * + * @param body Define a custom variable request body. (required) + * @return WebhooksIntegrationCustomVariableResponse + * @throws ApiException if fails to make API call + */ + public WebhooksIntegrationCustomVariableResponse createWebhooksIntegrationCustomVariable(WebhooksIntegrationCustomVariable body) throws ApiException { return createWebhooksIntegrationCustomVariableWithHttpInfo(body).getData(); } /** - * Create a custom variable. - * - *

See {@link #createWebhooksIntegrationCustomVariableWithHttpInfoAsync}. - * - * @param body Define a custom variable request body. (required) - * @return CompletableFuture<WebhooksIntegrationCustomVariableResponse> - */ - public CompletableFuture - createWebhooksIntegrationCustomVariableAsync(WebhooksIntegrationCustomVariable body) { - return createWebhooksIntegrationCustomVariableWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a custom variable. + * + * See {@link #createWebhooksIntegrationCustomVariableWithHttpInfoAsync}. + * + * @param body Define a custom variable request body. (required) + * @return CompletableFuture<WebhooksIntegrationCustomVariableResponse> + */ + public CompletableFuturecreateWebhooksIntegrationCustomVariableAsync(WebhooksIntegrationCustomVariable body) { + return createWebhooksIntegrationCustomVariableWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Creates an endpoint with the name <CUSTOM_VARIABLE_NAME>. + *

Creates an endpoint with the name <CUSTOM_VARIABLE_NAME>.

* * @param body Define a custom variable request body. (required) * @return ApiResponse<WebhooksIntegrationCustomVariableResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -227,136 +196,94 @@ public WebhooksIntegrationCustomVariableResponse createWebhooksIntegrationCustom * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse - createWebhooksIntegrationCustomVariableWithHttpInfo(WebhooksIntegrationCustomVariable body) - throws ApiException { + public ApiResponse createWebhooksIntegrationCustomVariableWithHttpInfo(WebhooksIntegrationCustomVariable body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createWebhooksIntegrationCustomVariable"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createWebhooksIntegrationCustomVariable"); } // create path and map variables String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.createWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.createWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a custom variable. * - *

See {@link #createWebhooksIntegrationCustomVariableWithHttpInfo}. + * See {@link #createWebhooksIntegrationCustomVariableWithHttpInfo}. * * @param body Define a custom variable request body. (required) * @return CompletableFuture<ApiResponse<WebhooksIntegrationCustomVariableResponse>> */ - public CompletableFuture> - createWebhooksIntegrationCustomVariableWithHttpInfoAsync( - WebhooksIntegrationCustomVariable body) { + public CompletableFuture> createWebhooksIntegrationCustomVariableWithHttpInfoAsync(WebhooksIntegrationCustomVariable body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createWebhooksIntegrationCustomVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createWebhooksIntegrationCustomVariable")); + return result; } // create path and map variables String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.createWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.createWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a webhook. - * - *

See {@link #deleteWebhooksIntegrationWithHttpInfo}. - * - * @param webhookName The name of the webhook. (required) - * @throws ApiException if fails to make API call - */ - public void deleteWebhooksIntegration(String webhookName) throws ApiException { + * Delete a webhook. + * + * See {@link #deleteWebhooksIntegrationWithHttpInfo}. + * + * @param webhookName The name of the webhook. (required) + * @throws ApiException if fails to make API call + */ + public void deleteWebhooksIntegration(String webhookName) throws ApiException { deleteWebhooksIntegrationWithHttpInfo(webhookName); } /** - * Delete a webhook. - * - *

See {@link #deleteWebhooksIntegrationWithHttpInfoAsync}. - * - * @param webhookName The name of the webhook. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteWebhooksIntegrationAsync(String webhookName) { - return deleteWebhooksIntegrationWithHttpInfoAsync(webhookName) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a webhook. + * + * See {@link #deleteWebhooksIntegrationWithHttpInfoAsync}. + * + * @param webhookName The name of the webhook. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteWebhooksIntegrationAsync(String webhookName) { + return deleteWebhooksIntegrationWithHttpInfoAsync(webhookName).thenApply(response -> { + return response.getData(); + }); } + /** - * Deletes the endpoint with the name <WEBHOOK NAME>. + *

Deletes the endpoint with the name <WEBHOOK NAME>.

* * @param webhookName The name of the webhook. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -365,139 +292,96 @@ public CompletableFuture deleteWebhooksIntegrationAsync(String webhookName * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteWebhooksIntegrationWithHttpInfo(String webhookName) - throws ApiException { + public ApiResponse deleteWebhooksIntegrationWithHttpInfo(String webhookName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'webhookName' is set if (webhookName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'webhookName' when calling deleteWebhooksIntegration"); + throw new ApiException(400, "Missing the required parameter 'webhookName' when calling deleteWebhooksIntegration"); } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" - .replaceAll( - "\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" + .replaceAll("\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.deleteWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.deleteWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a webhook. * - *

See {@link #deleteWebhooksIntegrationWithHttpInfo}. + * See {@link #deleteWebhooksIntegrationWithHttpInfo}. * * @param webhookName The name of the webhook. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteWebhooksIntegrationWithHttpInfoAsync( - String webhookName) { + public CompletableFuture> deleteWebhooksIntegrationWithHttpInfoAsync(String webhookName) { Object localVarPostBody = null; // verify the required parameter 'webhookName' is set if (webhookName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'webhookName' when calling" - + " deleteWebhooksIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'webhookName' when calling deleteWebhooksIntegration")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" - .replaceAll( - "\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" + .replaceAll("\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.deleteWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.deleteWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete a custom variable. - * - *

See {@link #deleteWebhooksIntegrationCustomVariableWithHttpInfo}. - * - * @param customVariableName The name of the custom variable. (required) - * @throws ApiException if fails to make API call - */ - public void deleteWebhooksIntegrationCustomVariable(String customVariableName) - throws ApiException { + * Delete a custom variable. + * + * See {@link #deleteWebhooksIntegrationCustomVariableWithHttpInfo}. + * + * @param customVariableName The name of the custom variable. (required) + * @throws ApiException if fails to make API call + */ + public void deleteWebhooksIntegrationCustomVariable(String customVariableName) throws ApiException { deleteWebhooksIntegrationCustomVariableWithHttpInfo(customVariableName); } /** - * Delete a custom variable. - * - *

See {@link #deleteWebhooksIntegrationCustomVariableWithHttpInfoAsync}. - * - * @param customVariableName The name of the custom variable. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteWebhooksIntegrationCustomVariableAsync( - String customVariableName) { - return deleteWebhooksIntegrationCustomVariableWithHttpInfoAsync(customVariableName) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a custom variable. + * + * See {@link #deleteWebhooksIntegrationCustomVariableWithHttpInfoAsync}. + * + * @param customVariableName The name of the custom variable. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteWebhooksIntegrationCustomVariableAsync(String customVariableName) { + return deleteWebhooksIntegrationCustomVariableWithHttpInfoAsync(customVariableName).thenApply(response -> { + return response.getData(); + }); } + /** - * Deletes the endpoint with the name <CUSTOM_VARIABLE_NAME>. + *

Deletes the endpoint with the name <CUSTOM_VARIABLE_NAME>.

* * @param customVariableName The name of the custom variable. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -506,141 +390,97 @@ public CompletableFuture deleteWebhooksIntegrationCustomVariableAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteWebhooksIntegrationCustomVariableWithHttpInfo( - String customVariableName) throws ApiException { + public ApiResponse deleteWebhooksIntegrationCustomVariableWithHttpInfo(String customVariableName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'customVariableName' is set if (customVariableName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'customVariableName' when calling" - + " deleteWebhooksIntegrationCustomVariable"); + throw new ApiException(400, "Missing the required parameter 'customVariableName' when calling deleteWebhooksIntegrationCustomVariable"); } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" - .replaceAll( - "\\{" + "custom_variable_name" + "\\}", - apiClient.escapeString(customVariableName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" + .replaceAll("\\{" + "custom_variable_name" + "\\}", apiClient.escapeString(customVariableName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.deleteWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.deleteWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a custom variable. * - *

See {@link #deleteWebhooksIntegrationCustomVariableWithHttpInfo}. + * See {@link #deleteWebhooksIntegrationCustomVariableWithHttpInfo}. * * @param customVariableName The name of the custom variable. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - deleteWebhooksIntegrationCustomVariableWithHttpInfoAsync(String customVariableName) { + public CompletableFuture> deleteWebhooksIntegrationCustomVariableWithHttpInfoAsync(String customVariableName) { Object localVarPostBody = null; // verify the required parameter 'customVariableName' is set if (customVariableName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'customVariableName' when calling" - + " deleteWebhooksIntegrationCustomVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'customVariableName' when calling deleteWebhooksIntegrationCustomVariable")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" - .replaceAll( - "\\{" + "custom_variable_name" + "\\}", - apiClient.escapeString(customVariableName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" + .replaceAll("\\{" + "custom_variable_name" + "\\}", apiClient.escapeString(customVariableName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.deleteWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.deleteWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a webhook integration. - * - *

See {@link #getWebhooksIntegrationWithHttpInfo}. - * - * @param webhookName The name of the webhook. (required) - * @return WebhooksIntegration - * @throws ApiException if fails to make API call - */ - public WebhooksIntegration getWebhooksIntegration(String webhookName) throws ApiException { + * Get a webhook integration. + * + * See {@link #getWebhooksIntegrationWithHttpInfo}. + * + * @param webhookName The name of the webhook. (required) + * @return WebhooksIntegration + * @throws ApiException if fails to make API call + */ + public WebhooksIntegration getWebhooksIntegration(String webhookName) throws ApiException { return getWebhooksIntegrationWithHttpInfo(webhookName).getData(); } /** - * Get a webhook integration. - * - *

See {@link #getWebhooksIntegrationWithHttpInfoAsync}. - * - * @param webhookName The name of the webhook. (required) - * @return CompletableFuture<WebhooksIntegration> - */ - public CompletableFuture getWebhooksIntegrationAsync(String webhookName) { - return getWebhooksIntegrationWithHttpInfoAsync(webhookName) - .thenApply( - response -> { - return response.getData(); - }); + * Get a webhook integration. + * + * See {@link #getWebhooksIntegrationWithHttpInfoAsync}. + * + * @param webhookName The name of the webhook. (required) + * @return CompletableFuture<WebhooksIntegration> + */ + public CompletableFuturegetWebhooksIntegrationAsync(String webhookName) { + return getWebhooksIntegrationWithHttpInfoAsync(webhookName).thenApply(response -> { + return response.getData(); + }); } + /** - * Gets the content of the webhook with the name <WEBHOOK_NAME>. + *

Gets the content of the webhook with the name <WEBHOOK_NAME>.

* * @param webhookName The name of the webhook. (required) * @return ApiResponse<WebhooksIntegration> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -650,141 +490,99 @@ public CompletableFuture getWebhooksIntegrationAsync(String * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getWebhooksIntegrationWithHttpInfo(String webhookName) - throws ApiException { + public ApiResponse getWebhooksIntegrationWithHttpInfo(String webhookName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'webhookName' is set if (webhookName == null) { - throw new ApiException( - 400, "Missing the required parameter 'webhookName' when calling getWebhooksIntegration"); + throw new ApiException(400, "Missing the required parameter 'webhookName' when calling getWebhooksIntegration"); } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" - .replaceAll( - "\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" + .replaceAll("\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.getWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.getWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a webhook integration. * - *

See {@link #getWebhooksIntegrationWithHttpInfo}. + * See {@link #getWebhooksIntegrationWithHttpInfo}. * * @param webhookName The name of the webhook. (required) * @return CompletableFuture<ApiResponse<WebhooksIntegration>> */ - public CompletableFuture> - getWebhooksIntegrationWithHttpInfoAsync(String webhookName) { + public CompletableFuture> getWebhooksIntegrationWithHttpInfoAsync(String webhookName) { Object localVarPostBody = null; // verify the required parameter 'webhookName' is set if (webhookName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'webhookName' when calling getWebhooksIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'webhookName' when calling getWebhooksIntegration")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" - .replaceAll( - "\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" + .replaceAll("\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.getWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.getWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a custom variable. - * - *

See {@link #getWebhooksIntegrationCustomVariableWithHttpInfo}. - * - * @param customVariableName The name of the custom variable. (required) - * @return WebhooksIntegrationCustomVariableResponse - * @throws ApiException if fails to make API call - */ - public WebhooksIntegrationCustomVariableResponse getWebhooksIntegrationCustomVariable( - String customVariableName) throws ApiException { + * Get a custom variable. + * + * See {@link #getWebhooksIntegrationCustomVariableWithHttpInfo}. + * + * @param customVariableName The name of the custom variable. (required) + * @return WebhooksIntegrationCustomVariableResponse + * @throws ApiException if fails to make API call + */ + public WebhooksIntegrationCustomVariableResponse getWebhooksIntegrationCustomVariable(String customVariableName) throws ApiException { return getWebhooksIntegrationCustomVariableWithHttpInfo(customVariableName).getData(); } /** - * Get a custom variable. - * - *

See {@link #getWebhooksIntegrationCustomVariableWithHttpInfoAsync}. - * - * @param customVariableName The name of the custom variable. (required) - * @return CompletableFuture<WebhooksIntegrationCustomVariableResponse> - */ - public CompletableFuture - getWebhooksIntegrationCustomVariableAsync(String customVariableName) { - return getWebhooksIntegrationCustomVariableWithHttpInfoAsync(customVariableName) - .thenApply( - response -> { - return response.getData(); - }); + * Get a custom variable. + * + * See {@link #getWebhooksIntegrationCustomVariableWithHttpInfoAsync}. + * + * @param customVariableName The name of the custom variable. (required) + * @return CompletableFuture<WebhooksIntegrationCustomVariableResponse> + */ + public CompletableFuturegetWebhooksIntegrationCustomVariableAsync(String customVariableName) { + return getWebhooksIntegrationCustomVariableWithHttpInfoAsync(customVariableName).thenApply(response -> { + return response.getData(); + }); } + /** - * Shows the content of the custom variable with the name <CUSTOM_VARIABLE_NAME> - * . - * - *

If the custom variable is secret, the value does not return in the response payload. + *

Shows the content of the custom variable with the name <CUSTOM_VARIABLE_NAME>.

+ *

If the custom variable is secret, the value does not return in the + * response payload.

* * @param customVariableName The name of the custom variable. (required) * @return ApiResponse<WebhooksIntegrationCustomVariableResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -794,149 +592,100 @@ public WebhooksIntegrationCustomVariableResponse getWebhooksIntegrationCustomVar * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getWebhooksIntegrationCustomVariableWithHttpInfo(String customVariableName) - throws ApiException { + public ApiResponse getWebhooksIntegrationCustomVariableWithHttpInfo(String customVariableName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'customVariableName' is set if (customVariableName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'customVariableName' when calling" - + " getWebhooksIntegrationCustomVariable"); + throw new ApiException(400, "Missing the required parameter 'customVariableName' when calling getWebhooksIntegrationCustomVariable"); } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" - .replaceAll( - "\\{" + "custom_variable_name" + "\\}", - apiClient.escapeString(customVariableName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" + .replaceAll("\\{" + "custom_variable_name" + "\\}", apiClient.escapeString(customVariableName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.getWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.getWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a custom variable. * - *

See {@link #getWebhooksIntegrationCustomVariableWithHttpInfo}. + * See {@link #getWebhooksIntegrationCustomVariableWithHttpInfo}. * * @param customVariableName The name of the custom variable. (required) * @return CompletableFuture<ApiResponse<WebhooksIntegrationCustomVariableResponse>> */ - public CompletableFuture> - getWebhooksIntegrationCustomVariableWithHttpInfoAsync(String customVariableName) { + public CompletableFuture> getWebhooksIntegrationCustomVariableWithHttpInfoAsync(String customVariableName) { Object localVarPostBody = null; // verify the required parameter 'customVariableName' is set if (customVariableName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'customVariableName' when calling" - + " getWebhooksIntegrationCustomVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'customVariableName' when calling getWebhooksIntegrationCustomVariable")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" - .replaceAll( - "\\{" + "custom_variable_name" + "\\}", - apiClient.escapeString(customVariableName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" + .replaceAll("\\{" + "custom_variable_name" + "\\}", apiClient.escapeString(customVariableName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.getWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.getWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a webhook. - * - *

See {@link #updateWebhooksIntegrationWithHttpInfo}. - * - * @param webhookName The name of the webhook. (required) - * @param body Update an existing Datadog-Webhooks integration. (required) - * @return WebhooksIntegration - * @throws ApiException if fails to make API call - */ - public WebhooksIntegration updateWebhooksIntegration( - String webhookName, WebhooksIntegrationUpdateRequest body) throws ApiException { + * Update a webhook. + * + * See {@link #updateWebhooksIntegrationWithHttpInfo}. + * + * @param webhookName The name of the webhook. (required) + * @param body Update an existing Datadog-Webhooks integration. (required) + * @return WebhooksIntegration + * @throws ApiException if fails to make API call + */ + public WebhooksIntegration updateWebhooksIntegration(String webhookName, WebhooksIntegrationUpdateRequest body) throws ApiException { return updateWebhooksIntegrationWithHttpInfo(webhookName, body).getData(); } /** - * Update a webhook. - * - *

See {@link #updateWebhooksIntegrationWithHttpInfoAsync}. - * - * @param webhookName The name of the webhook. (required) - * @param body Update an existing Datadog-Webhooks integration. (required) - * @return CompletableFuture<WebhooksIntegration> - */ - public CompletableFuture updateWebhooksIntegrationAsync( - String webhookName, WebhooksIntegrationUpdateRequest body) { - return updateWebhooksIntegrationWithHttpInfoAsync(webhookName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a webhook. + * + * See {@link #updateWebhooksIntegrationWithHttpInfoAsync}. + * + * @param webhookName The name of the webhook. (required) + * @param body Update an existing Datadog-Webhooks integration. (required) + * @return CompletableFuture<WebhooksIntegration> + */ + public CompletableFutureupdateWebhooksIntegrationAsync(String webhookName, WebhooksIntegrationUpdateRequest body) { + return updateWebhooksIntegrationWithHttpInfoAsync(webhookName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Updates the endpoint with the name <WEBHOOK_NAME>. + *

Updates the endpoint with the name <WEBHOOK_NAME>.

* * @param webhookName The name of the webhook. (required) * @param body Update an existing Datadog-Webhooks integration. (required) * @return ApiResponse<WebhooksIntegration> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -946,162 +695,113 @@ public CompletableFuture updateWebhooksIntegrationAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateWebhooksIntegrationWithHttpInfo( - String webhookName, WebhooksIntegrationUpdateRequest body) throws ApiException { + public ApiResponse updateWebhooksIntegrationWithHttpInfo(String webhookName, WebhooksIntegrationUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'webhookName' is set if (webhookName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'webhookName' when calling updateWebhooksIntegration"); + throw new ApiException(400, "Missing the required parameter 'webhookName' when calling updateWebhooksIntegration"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateWebhooksIntegration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateWebhooksIntegration"); } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" - .replaceAll( - "\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" + .replaceAll("\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.updateWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.updateWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a webhook. * - *

See {@link #updateWebhooksIntegrationWithHttpInfo}. + * See {@link #updateWebhooksIntegrationWithHttpInfo}. * * @param webhookName The name of the webhook. (required) * @param body Update an existing Datadog-Webhooks integration. (required) * @return CompletableFuture<ApiResponse<WebhooksIntegration>> */ - public CompletableFuture> - updateWebhooksIntegrationWithHttpInfoAsync( - String webhookName, WebhooksIntegrationUpdateRequest body) { + public CompletableFuture> updateWebhooksIntegrationWithHttpInfoAsync(String webhookName, WebhooksIntegrationUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'webhookName' is set if (webhookName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'webhookName' when calling" - + " updateWebhooksIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'webhookName' when calling updateWebhooksIntegration")); + 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 updateWebhooksIntegration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateWebhooksIntegration")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" - .replaceAll( - "\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}" + .replaceAll("\\{" + "webhook_name" + "\\}", apiClient.escapeString(webhookName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.updateWebhooksIntegration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.updateWebhooksIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a custom variable. - * - *

See {@link #updateWebhooksIntegrationCustomVariableWithHttpInfo}. - * - * @param customVariableName The name of the custom variable. (required) - * @param body Update an existing custom variable request body. (required) - * @return WebhooksIntegrationCustomVariableResponse - * @throws ApiException if fails to make API call - */ - public WebhooksIntegrationCustomVariableResponse updateWebhooksIntegrationCustomVariable( - String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) - throws ApiException { + * Update a custom variable. + * + * See {@link #updateWebhooksIntegrationCustomVariableWithHttpInfo}. + * + * @param customVariableName The name of the custom variable. (required) + * @param body Update an existing custom variable request body. (required) + * @return WebhooksIntegrationCustomVariableResponse + * @throws ApiException if fails to make API call + */ + public WebhooksIntegrationCustomVariableResponse updateWebhooksIntegrationCustomVariable(String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) throws ApiException { return updateWebhooksIntegrationCustomVariableWithHttpInfo(customVariableName, body).getData(); } /** - * Update a custom variable. - * - *

See {@link #updateWebhooksIntegrationCustomVariableWithHttpInfoAsync}. - * - * @param customVariableName The name of the custom variable. (required) - * @param body Update an existing custom variable request body. (required) - * @return CompletableFuture<WebhooksIntegrationCustomVariableResponse> - */ - public CompletableFuture - updateWebhooksIntegrationCustomVariableAsync( - String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) { - return updateWebhooksIntegrationCustomVariableWithHttpInfoAsync(customVariableName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a custom variable. + * + * See {@link #updateWebhooksIntegrationCustomVariableWithHttpInfoAsync}. + * + * @param customVariableName The name of the custom variable. (required) + * @param body Update an existing custom variable request body. (required) + * @return CompletableFuture<WebhooksIntegrationCustomVariableResponse> + */ + public CompletableFutureupdateWebhooksIntegrationCustomVariableAsync(String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) { + return updateWebhooksIntegrationCustomVariableWithHttpInfoAsync(customVariableName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Updates the endpoint with the name <CUSTOM_VARIABLE_NAME>. + *

Updates the endpoint with the name <CUSTOM_VARIABLE_NAME>.

* * @param customVariableName The name of the custom variable. (required) * @param body Update an existing custom variable request body. (required) * @return ApiResponse<WebhooksIntegrationCustomVariableResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1111,127 +811,71 @@ public WebhooksIntegrationCustomVariableResponse updateWebhooksIntegrationCustom * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - updateWebhooksIntegrationCustomVariableWithHttpInfo( - String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) - throws ApiException { + public ApiResponse updateWebhooksIntegrationCustomVariableWithHttpInfo(String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'customVariableName' is set if (customVariableName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'customVariableName' when calling" - + " updateWebhooksIntegrationCustomVariable"); + throw new ApiException(400, "Missing the required parameter 'customVariableName' when calling updateWebhooksIntegrationCustomVariable"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " updateWebhooksIntegrationCustomVariable"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateWebhooksIntegrationCustomVariable"); } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" - .replaceAll( - "\\{" + "custom_variable_name" + "\\}", - apiClient.escapeString(customVariableName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" + .replaceAll("\\{" + "custom_variable_name" + "\\}", apiClient.escapeString(customVariableName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.updateWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.updateWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a custom variable. * - *

See {@link #updateWebhooksIntegrationCustomVariableWithHttpInfo}. + * See {@link #updateWebhooksIntegrationCustomVariableWithHttpInfo}. * * @param customVariableName The name of the custom variable. (required) * @param body Update an existing custom variable request body. (required) * @return CompletableFuture<ApiResponse<WebhooksIntegrationCustomVariableResponse>> */ - public CompletableFuture> - updateWebhooksIntegrationCustomVariableWithHttpInfoAsync( - String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) { + public CompletableFuture> updateWebhooksIntegrationCustomVariableWithHttpInfoAsync(String customVariableName, WebhooksIntegrationCustomVariableUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'customVariableName' is set if (customVariableName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'customVariableName' when calling" - + " updateWebhooksIntegrationCustomVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'customVariableName' when calling updateWebhooksIntegrationCustomVariable")); + 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" - + " updateWebhooksIntegrationCustomVariable")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateWebhooksIntegrationCustomVariable")); + return result; } // create path and map variables - String localVarPath = - "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" - .replaceAll( - "\\{" + "custom_variable_name" + "\\}", - apiClient.escapeString(customVariableName.toString())); + String localVarPath = "/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}" + .replaceAll("\\{" + "custom_variable_name" + "\\}", apiClient.escapeString(customVariableName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v1.WebhooksIntegrationApi.updateWebhooksIntegrationCustomVariable", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v1.WebhooksIntegrationApi.updateWebhooksIntegrationCustomVariable", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v1/model/APIErrorResponse.java b/src/main/java/com/datadog/api/client/v1/model/APIErrorResponse.java index 36c6bfa5146..a1989174195 100644 --- a/src/main/java/com/datadog/api/client/v1/model/APIErrorResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/APIErrorResponse.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Error response object. */ -@JsonPropertyOrder({APIErrorResponse.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Error response object.

+ */ +@JsonPropertyOrder({ + APIErrorResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIErrorResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERRORS = "errors"; private List errors = new ArrayList<>(); @@ -28,36 +47,35 @@ public APIErrorResponse() {} @JsonCreator public APIErrorResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_ERRORS) List errors) { - this.errors = errors; + @JsonProperty(required=true, value=JSON_PROPERTY_ERRORS)List errors) { + this.errors = errors; } - public APIErrorResponse errors(List errors) { this.errors = errors; return this; } - public APIErrorResponse addErrorsItem(String errorsItem) { this.errors.add(errorsItem); return this; } /** - * Array of errors returned by the API. - * + *

Array of errors returned by the API.

* @return errors - */ - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getErrors() { - return errors; - } - + **/ + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this APIErrorResponse object is equal to o. */ + /** + * Return true if this APIErrorResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -70,6 +88,7 @@ public boolean equals(Object o) { return Objects.equals(this.errors, apiErrorResponse.errors); } + @Override public int hashCode() { return Objects.hash(errors); @@ -85,7 +104,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSAccount.java b/src/main/java/com/datadog/api/client/v1/model/AWSAccount.java index 216254865c5..11f1b6b7859 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSAccount.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSAccount.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Returns the AWS account associated with this integration. */ + +/** + *

Returns the AWS account associated with this integration.

+ */ @JsonPropertyOrder({ AWSAccount.JSON_PROPERTY_ACCESS_KEY_ID, AWSAccount.JSON_PROPERTY_ACCOUNT_ID, @@ -30,22 +46,20 @@ AWSAccount.JSON_PROPERTY_ROLE_NAME, AWSAccount.JSON_PROPERTY_SECRET_ACCESS_KEY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSAccount { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCESS_KEY_ID = "access_key_id"; private String accessKeyId; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; - public static final String JSON_PROPERTY_ACCOUNT_SPECIFIC_NAMESPACE_RULES = - "account_specific_namespace_rules"; + public static final String JSON_PROPERTY_ACCOUNT_SPECIFIC_NAMESPACE_RULES = "account_specific_namespace_rules"; private Map accountSpecificNamespaceRules = null; - public static final String JSON_PROPERTY_CSPM_RESOURCE_COLLECTION_ENABLED = - "cspm_resource_collection_enabled"; + public static final String JSON_PROPERTY_CSPM_RESOURCE_COLLECTION_ENABLED = "cspm_resource_collection_enabled"; private Boolean cspmResourceCollectionEnabled = false; public static final String JSON_PROPERTY_EXCLUDED_REGIONS = "excluded_regions"; @@ -57,12 +71,10 @@ public class AWSAccount { public static final String JSON_PROPERTY_HOST_TAGS = "host_tags"; private List hostTags = null; - public static final String JSON_PROPERTY_METRICS_COLLECTION_ENABLED = - "metrics_collection_enabled"; + public static final String JSON_PROPERTY_METRICS_COLLECTION_ENABLED = "metrics_collection_enabled"; private Boolean metricsCollectionEnabled = true; - public static final String JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED = - "resource_collection_enabled"; + public static final String JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED = "resource_collection_enabled"; private Boolean resourceCollectionEnabled = false; public static final String JSON_PROPERTY_ROLE_NAME = "role_name"; @@ -77,50 +89,43 @@ public AWSAccount accessKeyId(String accessKeyId) { } /** - * Your AWS access key ID. Only required if your AWS account is a GovCloud or China account. - * + *

Your AWS access key ID. Only required if your AWS account is a GovCloud or China account.

* @return accessKeyId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCESS_KEY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccessKeyId() { - return accessKeyId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCESS_KEY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccessKeyId() { + return accessKeyId; + } public void setAccessKeyId(String accessKeyId) { this.accessKeyId = accessKeyId; } - public AWSAccount accountId(String accountId) { this.accountId = accountId; return this; } /** - * Your AWS Account ID without dashes. - * + *

Your AWS Account ID without dashes.

* @return accountId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - - public AWSAccount accountSpecificNamespaceRules( - Map accountSpecificNamespaceRules) { + public AWSAccount accountSpecificNamespaceRules(Map accountSpecificNamespaceRules) { this.accountSpecificNamespaceRules = accountSpecificNamespaceRules; return this; } - - public AWSAccount putAccountSpecificNamespaceRulesItem( - String key, Boolean accountSpecificNamespaceRulesItem) { + public AWSAccount putAccountSpecificNamespaceRulesItem(String key, Boolean accountSpecificNamespaceRulesItem) { if (this.accountSpecificNamespaceRules == null) { this.accountSpecificNamespaceRules = new HashMap<>(); } @@ -129,50 +134,44 @@ public AWSAccount putAccountSpecificNamespaceRulesItem( } /** - * An object, (in the form {"namespace1":true/false, "namespace2":true/false}), that - * enables or disables metric collection for specific AWS namespaces for this AWS account only. - * + *

An object, (in the form {"namespace1":true/false, "namespace2":true/false}), + * that enables or disables metric collection for specific AWS namespaces for this + * AWS account only.

* @return accountSpecificNamespaceRules - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_SPECIFIC_NAMESPACE_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAccountSpecificNamespaceRules() { - return accountSpecificNamespaceRules; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_SPECIFIC_NAMESPACE_RULES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAccountSpecificNamespaceRules() { + return accountSpecificNamespaceRules; + } public void setAccountSpecificNamespaceRules(Map accountSpecificNamespaceRules) { this.accountSpecificNamespaceRules = accountSpecificNamespaceRules; } - public AWSAccount cspmResourceCollectionEnabled(Boolean cspmResourceCollectionEnabled) { this.cspmResourceCollectionEnabled = cspmResourceCollectionEnabled; return this; } /** - * Whether Datadog collects cloud security posture management resources from your AWS account. - * This includes additional resources not covered under the general resource_collection - * . - * + *

Whether Datadog collects cloud security posture management resources from your AWS account. This includes additional resources not covered under the general resource_collection.

* @return cspmResourceCollectionEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_RESOURCE_COLLECTION_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCspmResourceCollectionEnabled() { - return cspmResourceCollectionEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_RESOURCE_COLLECTION_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCspmResourceCollectionEnabled() { + return cspmResourceCollectionEnabled; + } public void setCspmResourceCollectionEnabled(Boolean cspmResourceCollectionEnabled) { this.cspmResourceCollectionEnabled = cspmResourceCollectionEnabled; } - public AWSAccount excludedRegions(List excludedRegions) { this.excludedRegions = excludedRegions; return this; } - public AWSAccount addExcludedRegionsItem(String excludedRegionsItem) { if (this.excludedRegions == null) { this.excludedRegions = new ArrayList<>(); @@ -182,26 +181,23 @@ public AWSAccount addExcludedRegionsItem(String excludedRegionsItem) { } /** - * An array of AWS regions to exclude from metrics collection. - * + *

An array of AWS regions to exclude from metrics collection.

* @return excludedRegions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUDED_REGIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExcludedRegions() { - return excludedRegions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDED_REGIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExcludedRegions() { + return excludedRegions; + } public void setExcludedRegions(List excludedRegions) { this.excludedRegions = excludedRegions; } - public AWSAccount filterTags(List filterTags) { this.filterTags = filterTags; return this; } - public AWSAccount addFilterTagsItem(String filterTagsItem) { if (this.filterTags == null) { this.filterTags = new ArrayList<>(); @@ -211,31 +207,28 @@ public AWSAccount addFilterTagsItem(String filterTagsItem) { } /** - * The array of EC2 tags (in the form key:value) defines a filter that Datadog uses - * when collecting metrics from EC2. Wildcards, such as ? (for single characters) and - * * (for multiple characters) can also be used. Only hosts that match one of the - * defined tags will be imported into Datadog. The rest will be ignored. Host matching a given tag - * can also be excluded by adding ! before the tag. For example, - * env:production,instance-type:c1.*,!region:us-east-1 - * + *

The array of EC2 tags (in the form key:value) defines a filter that Datadog uses when collecting metrics from EC2. + * Wildcards, such as ? (for single characters) and * (for multiple characters) can also be used. + * Only hosts that match one of the defined tags + * will be imported into Datadog. The rest will be ignored. + * Host matching a given tag can also be excluded by adding ! before the tag. + * For example, env:production,instance-type:c1.*,!region:us-east-1

* @return filterTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilterTags() { - return filterTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilterTags() { + return filterTags; + } public void setFilterTags(List filterTags) { this.filterTags = filterTags; } - public AWSAccount hostTags(List hostTags) { this.hostTags = hostTags; return this; } - public AWSAccount addHostTagsItem(String hostTagsItem) { if (this.hostTags == null) { this.hostTags = new ArrayList<>(); @@ -245,107 +238,100 @@ public AWSAccount addHostTagsItem(String hostTagsItem) { } /** - * Array of tags (in the form key:value) to add to all hosts and metrics reporting - * through this integration. - * + *

Array of tags (in the form key:value) to add to all hosts + * and metrics reporting through this integration.

* @return hostTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getHostTags() { - return hostTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getHostTags() { + return hostTags; + } public void setHostTags(List hostTags) { this.hostTags = hostTags; } - public AWSAccount metricsCollectionEnabled(Boolean metricsCollectionEnabled) { this.metricsCollectionEnabled = metricsCollectionEnabled; return this; } /** - * Whether Datadog collects metrics for this AWS account. - * + *

Whether Datadog collects metrics for this AWS account.

* @return metricsCollectionEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS_COLLECTION_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMetricsCollectionEnabled() { - return metricsCollectionEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS_COLLECTION_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMetricsCollectionEnabled() { + return metricsCollectionEnabled; + } public void setMetricsCollectionEnabled(Boolean metricsCollectionEnabled) { this.metricsCollectionEnabled = metricsCollectionEnabled; } - public AWSAccount resourceCollectionEnabled(Boolean resourceCollectionEnabled) { this.resourceCollectionEnabled = resourceCollectionEnabled; return this; } /** - * Whether Datadog collects a standard set of resources from your AWS account. - * + *

Whether Datadog collects a standard set of resources from your AWS account.

* @return resourceCollectionEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getResourceCollectionEnabled() { - return resourceCollectionEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getResourceCollectionEnabled() { + return resourceCollectionEnabled; + } public void setResourceCollectionEnabled(Boolean resourceCollectionEnabled) { this.resourceCollectionEnabled = resourceCollectionEnabled; } - public AWSAccount roleName(String roleName) { this.roleName = roleName; return this; } /** - * Your Datadog role delegation name. - * + *

Your Datadog role delegation name.

* @return roleName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRoleName() { - return roleName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRoleName() { + return roleName; + } public void setRoleName(String roleName) { this.roleName = roleName; } - public AWSAccount secretAccessKey(String secretAccessKey) { this.secretAccessKey = secretAccessKey; return this; } /** - * Your AWS secret access key. Only required if your AWS account is a GovCloud or China account. - * + *

Your AWS secret access key. Only required if your AWS account is a GovCloud or China account.

* @return secretAccessKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECRET_ACCESS_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecretAccessKey() { - return secretAccessKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRET_ACCESS_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSecretAccessKey() { + return secretAccessKey; + } public void setSecretAccessKey(String secretAccessKey) { this.secretAccessKey = secretAccessKey; } - /** Return true if this AWSAccount object is equal to o. */ + /** + * Return true if this AWSAccount object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -355,35 +341,13 @@ public boolean equals(Object o) { return false; } AWSAccount awsAccount = (AWSAccount) o; - return Objects.equals(this.accessKeyId, awsAccount.accessKeyId) - && Objects.equals(this.accountId, awsAccount.accountId) - && Objects.equals( - this.accountSpecificNamespaceRules, awsAccount.accountSpecificNamespaceRules) - && Objects.equals( - this.cspmResourceCollectionEnabled, awsAccount.cspmResourceCollectionEnabled) - && Objects.equals(this.excludedRegions, awsAccount.excludedRegions) - && Objects.equals(this.filterTags, awsAccount.filterTags) - && Objects.equals(this.hostTags, awsAccount.hostTags) - && Objects.equals(this.metricsCollectionEnabled, awsAccount.metricsCollectionEnabled) - && Objects.equals(this.resourceCollectionEnabled, awsAccount.resourceCollectionEnabled) - && Objects.equals(this.roleName, awsAccount.roleName) - && Objects.equals(this.secretAccessKey, awsAccount.secretAccessKey); + return Objects.equals(this.accessKeyId, awsAccount.accessKeyId) && Objects.equals(this.accountId, awsAccount.accountId) && Objects.equals(this.accountSpecificNamespaceRules, awsAccount.accountSpecificNamespaceRules) && Objects.equals(this.cspmResourceCollectionEnabled, awsAccount.cspmResourceCollectionEnabled) && Objects.equals(this.excludedRegions, awsAccount.excludedRegions) && Objects.equals(this.filterTags, awsAccount.filterTags) && Objects.equals(this.hostTags, awsAccount.hostTags) && Objects.equals(this.metricsCollectionEnabled, awsAccount.metricsCollectionEnabled) && Objects.equals(this.resourceCollectionEnabled, awsAccount.resourceCollectionEnabled) && Objects.equals(this.roleName, awsAccount.roleName) && Objects.equals(this.secretAccessKey, awsAccount.secretAccessKey); } + @Override public int hashCode() { - return Objects.hash( - accessKeyId, - accountId, - accountSpecificNamespaceRules, - cspmResourceCollectionEnabled, - excludedRegions, - filterTags, - hostTags, - metricsCollectionEnabled, - resourceCollectionEnabled, - roleName, - secretAccessKey); + return Objects.hash(accessKeyId,accountId,accountSpecificNamespaceRules,cspmResourceCollectionEnabled,excludedRegions,filterTags,hostTags,metricsCollectionEnabled,resourceCollectionEnabled,roleName,secretAccessKey); } @Override @@ -392,21 +356,13 @@ public String toString() { sb.append("class AWSAccount {\n"); sb.append(" accessKeyId: ").append(toIndentedString(accessKeyId)).append("\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" accountSpecificNamespaceRules: ") - .append(toIndentedString(accountSpecificNamespaceRules)) - .append("\n"); - sb.append(" cspmResourceCollectionEnabled: ") - .append(toIndentedString(cspmResourceCollectionEnabled)) - .append("\n"); + sb.append(" accountSpecificNamespaceRules: ").append(toIndentedString(accountSpecificNamespaceRules)).append("\n"); + sb.append(" cspmResourceCollectionEnabled: ").append(toIndentedString(cspmResourceCollectionEnabled)).append("\n"); sb.append(" excludedRegions: ").append(toIndentedString(excludedRegions)).append("\n"); sb.append(" filterTags: ").append(toIndentedString(filterTags)).append("\n"); sb.append(" hostTags: ").append(toIndentedString(hostTags)).append("\n"); - sb.append(" metricsCollectionEnabled: ") - .append(toIndentedString(metricsCollectionEnabled)) - .append("\n"); - sb.append(" resourceCollectionEnabled: ") - .append(toIndentedString(resourceCollectionEnabled)) - .append("\n"); + sb.append(" metricsCollectionEnabled: ").append(toIndentedString(metricsCollectionEnabled)).append("\n"); + sb.append(" resourceCollectionEnabled: ").append(toIndentedString(resourceCollectionEnabled)).append("\n"); sb.append(" roleName: ").append(toIndentedString(roleName)).append("\n"); sb.append(" secretAccessKey: ").append(toIndentedString(secretAccessKey)).append("\n"); sb.append("}"); @@ -414,7 +370,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSAccountAndLambdaRequest.java b/src/main/java/com/datadog/api/client/v1/model/AWSAccountAndLambdaRequest.java index f3c828dc3b4..7d88d3c5d56 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSAccountAndLambdaRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSAccountAndLambdaRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** AWS account ID and Lambda ARN. */ + +/** + *

AWS account ID and Lambda ARN.

+ */ @JsonPropertyOrder({ AWSAccountAndLambdaRequest.JSON_PROPERTY_ACCOUNT_ID, AWSAccountAndLambdaRequest.JSON_PROPERTY_LAMBDA_ARN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSAccountAndLambdaRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; @@ -32,53 +51,51 @@ public AWSAccountAndLambdaRequest() {} @JsonCreator public AWSAccountAndLambdaRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, - @JsonProperty(required = true, value = JSON_PROPERTY_LAMBDA_ARN) String lambdaArn) { - this.accountId = accountId; - this.lambdaArn = lambdaArn; + @JsonProperty(required=true, value=JSON_PROPERTY_ACCOUNT_ID)String accountId, + @JsonProperty(required=true, value=JSON_PROPERTY_LAMBDA_ARN)String lambdaArn) { + this.accountId = accountId; + this.lambdaArn = lambdaArn; } - public AWSAccountAndLambdaRequest accountId(String accountId) { this.accountId = accountId; return this; } /** - * Your AWS Account ID without dashes. - * + *

Your AWS Account ID without dashes.

* @return accountId - */ - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccountId() { - return accountId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public AWSAccountAndLambdaRequest lambdaArn(String lambdaArn) { this.lambdaArn = lambdaArn; return this; } /** - * ARN of the Datadog Lambda created during the Datadog-Amazon Web services Log collection setup. - * + *

ARN of the Datadog Lambda created during the Datadog-Amazon Web services Log collection setup.

* @return lambdaArn - */ - @JsonProperty(JSON_PROPERTY_LAMBDA_ARN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getLambdaArn() { - return lambdaArn; - } - + **/ + @JsonProperty(JSON_PROPERTY_LAMBDA_ARN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getLambdaArn() { + return lambdaArn; + } public void setLambdaArn(String lambdaArn) { this.lambdaArn = lambdaArn; } - /** Return true if this AWSAccountAndLambdaRequest object is equal to o. */ + /** + * Return true if this AWSAccountAndLambdaRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } AWSAccountAndLambdaRequest awsAccountAndLambdaRequest = (AWSAccountAndLambdaRequest) o; - return Objects.equals(this.accountId, awsAccountAndLambdaRequest.accountId) - && Objects.equals(this.lambdaArn, awsAccountAndLambdaRequest.lambdaArn); + return Objects.equals(this.accountId, awsAccountAndLambdaRequest.accountId) && Objects.equals(this.lambdaArn, awsAccountAndLambdaRequest.lambdaArn); } + @Override public int hashCode() { - return Objects.hash(accountId, lambdaArn); + return Objects.hash(accountId,lambdaArn); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSAccountCreateResponse.java b/src/main/java/com/datadog/api/client/v1/model/AWSAccountCreateResponse.java index 57ca62c2694..cc0383d34bc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSAccountCreateResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSAccountCreateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The Response returned by the AWS Create Account call. */ -@JsonPropertyOrder({AWSAccountCreateResponse.JSON_PROPERTY_EXTERNAL_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The Response returned by the AWS Create Account call.

+ */ +@JsonPropertyOrder({ + AWSAccountCreateResponse.JSON_PROPERTY_EXTERNAL_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSAccountCreateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXTERNAL_ID = "external_id"; private String externalId; @@ -27,22 +49,23 @@ public AWSAccountCreateResponse externalId(String externalId) { } /** - * AWS external_id. - * + *

AWS external_id.

* @return externalId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExternalId() { - return externalId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExternalId() { + return externalId; + } public void setExternalId(String externalId) { this.externalId = externalId; } - /** Return true if this AWSAccountCreateResponse object is equal to o. */ + /** + * Return true if this AWSAccountCreateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.externalId, awsAccountCreateResponse.externalId); } + @Override public int hashCode() { return Objects.hash(externalId); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSAccountDeleteRequest.java b/src/main/java/com/datadog/api/client/v1/model/AWSAccountDeleteRequest.java index a49bf49b364..84c4c9d664b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSAccountDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSAccountDeleteRequest.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of AWS accounts to delete. */ + +/** + *

List of AWS accounts to delete.

+ */ @JsonPropertyOrder({ AWSAccountDeleteRequest.JSON_PROPERTY_ACCESS_KEY_ID, AWSAccountDeleteRequest.JSON_PROPERTY_ACCOUNT_ID, AWSAccountDeleteRequest.JSON_PROPERTY_ROLE_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSAccountDeleteRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCESS_KEY_ID = "access_key_id"; private String accessKeyId; @@ -37,64 +57,61 @@ public AWSAccountDeleteRequest accessKeyId(String accessKeyId) { } /** - * Your AWS access key ID. Only required if your AWS account is a GovCloud or China account. - * + *

Your AWS access key ID. Only required if your AWS account is a GovCloud or China account.

* @return accessKeyId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCESS_KEY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccessKeyId() { - return accessKeyId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCESS_KEY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccessKeyId() { + return accessKeyId; + } public void setAccessKeyId(String accessKeyId) { this.accessKeyId = accessKeyId; } - public AWSAccountDeleteRequest accountId(String accountId) { this.accountId = accountId; return this; } /** - * Your AWS Account ID without dashes. - * + *

Your AWS Account ID without dashes.

* @return accountId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public AWSAccountDeleteRequest roleName(String roleName) { this.roleName = roleName; return this; } /** - * Your Datadog role delegation name. - * + *

Your Datadog role delegation name.

* @return roleName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRoleName() { - return roleName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRoleName() { + return roleName; + } public void setRoleName(String roleName) { this.roleName = roleName; } - /** Return true if this AWSAccountDeleteRequest object is equal to o. */ + /** + * Return true if this AWSAccountDeleteRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } AWSAccountDeleteRequest awsAccountDeleteRequest = (AWSAccountDeleteRequest) o; - return Objects.equals(this.accessKeyId, awsAccountDeleteRequest.accessKeyId) - && Objects.equals(this.accountId, awsAccountDeleteRequest.accountId) - && Objects.equals(this.roleName, awsAccountDeleteRequest.roleName); + return Objects.equals(this.accessKeyId, awsAccountDeleteRequest.accessKeyId) && Objects.equals(this.accountId, awsAccountDeleteRequest.accountId) && Objects.equals(this.roleName, awsAccountDeleteRequest.roleName); } + @Override public int hashCode() { - return Objects.hash(accessKeyId, accountId, roleName); + return Objects.hash(accessKeyId,accountId,roleName); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSAccountListResponse.java b/src/main/java/com/datadog/api/client/v1/model/AWSAccountListResponse.java index d5708f546a5..a54cbdfa39e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSAccountListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSAccountListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List of enabled AWS accounts. */ -@JsonPropertyOrder({AWSAccountListResponse.JSON_PROPERTY_ACCOUNTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

List of enabled AWS accounts.

+ */ +@JsonPropertyOrder({ + AWSAccountListResponse.JSON_PROPERTY_ACCOUNTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSAccountListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; private List accounts = null; @@ -30,7 +50,6 @@ public AWSAccountListResponse accounts(List accounts) { } return this; } - public AWSAccountListResponse addAccountsItem(AWSAccount accountsItem) { if (this.accounts == null) { this.accounts = new ArrayList<>(); @@ -41,22 +60,23 @@ public AWSAccountListResponse addAccountsItem(AWSAccount accountsItem) { } /** - * List of enabled AWS accounts. - * + *

List of enabled AWS accounts.

* @return accounts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAccounts() { - return accounts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAccounts() { + return accounts; + } public void setAccounts(List accounts) { this.accounts = accounts; } - /** Return true if this AWSAccountListResponse object is equal to o. */ + /** + * Return true if this AWSAccountListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.accounts, awsAccountListResponse.accounts); } + @Override public int hashCode() { return Objects.hash(accounts); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncError.java b/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncError.java index 2b0190a3334..d98a293287d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncError.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncError.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Description of errors. */ -@JsonPropertyOrder({AWSLogsAsyncError.JSON_PROPERTY_CODE, AWSLogsAsyncError.JSON_PROPERTY_MESSAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Description of errors.

+ */ +@JsonPropertyOrder({ + AWSLogsAsyncError.JSON_PROPERTY_CODE, + AWSLogsAsyncError.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSLogsAsyncError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -30,43 +53,42 @@ public AWSLogsAsyncError code(String code) { } /** - * Code properties - * + *

Code properties

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public AWSLogsAsyncError message(String message) { this.message = message; return this; } /** - * Message content. - * + *

Message content.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this AWSLogsAsyncError object is equal to o. */ + /** + * Return true if this AWSLogsAsyncError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,13 +98,13 @@ public boolean equals(Object o) { return false; } AWSLogsAsyncError awsLogsAsyncError = (AWSLogsAsyncError) o; - return Objects.equals(this.code, awsLogsAsyncError.code) - && Objects.equals(this.message, awsLogsAsyncError.message); + return Objects.equals(this.code, awsLogsAsyncError.code) && Objects.equals(this.message, awsLogsAsyncError.message); } + @Override public int hashCode() { - return Objects.hash(code, message); + return Objects.hash(code,message); } @Override @@ -96,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncResponse.java b/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncResponse.java index c74e4966992..2c4c4c750eb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSLogsAsyncResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A list of all Datadog-AWS logs integrations available in your Datadog organization. */ +/** + *

A list of all Datadog-AWS logs integrations available in your Datadog organization.

+ */ @JsonPropertyOrder({ AWSLogsAsyncResponse.JSON_PROPERTY_ERRORS, AWSLogsAsyncResponse.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSLogsAsyncResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERRORS = "errors"; private List errors = null; @@ -36,7 +54,6 @@ public AWSLogsAsyncResponse errors(List errors) { } return this; } - public AWSLogsAsyncResponse addErrorsItem(AWSLogsAsyncError errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -47,43 +64,42 @@ public AWSLogsAsyncResponse addErrorsItem(AWSLogsAsyncError errorsItem) { } /** - * List of errors. - * + *

List of errors.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - public AWSLogsAsyncResponse status(String status) { this.status = status; return this; } /** - * Status of the properties. - * + *

Status of the properties.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this AWSLogsAsyncResponse object is equal to o. */ + /** + * Return true if this AWSLogsAsyncResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +109,13 @@ public boolean equals(Object o) { return false; } AWSLogsAsyncResponse awsLogsAsyncResponse = (AWSLogsAsyncResponse) o; - return Objects.equals(this.errors, awsLogsAsyncResponse.errors) - && Objects.equals(this.status, awsLogsAsyncResponse.status); + return Objects.equals(this.errors, awsLogsAsyncResponse.errors) && Objects.equals(this.status, awsLogsAsyncResponse.status); } + @Override public int hashCode() { - return Objects.hash(errors, status); + return Objects.hash(errors,status); } @Override @@ -113,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSLogsLambda.java b/src/main/java/com/datadog/api/client/v1/model/AWSLogsLambda.java index 5797078e84c..a7fc84b05cd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSLogsLambda.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSLogsLambda.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Description of the Lambdas. */ -@JsonPropertyOrder({AWSLogsLambda.JSON_PROPERTY_ARN}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Description of the Lambdas.

+ */ +@JsonPropertyOrder({ + AWSLogsLambda.JSON_PROPERTY_ARN +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSLogsLambda { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ARN = "arn"; private String arn; @@ -27,22 +49,23 @@ public AWSLogsLambda arn(String arn) { } /** - * Available ARN IDs. - * + *

Available ARN IDs.

* @return arn - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getArn() { - return arn; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getArn() { + return arn; + } public void setArn(String arn) { this.arn = arn; } - /** Return true if this AWSLogsLambda object is equal to o. */ + /** + * Return true if this AWSLogsLambda object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.arn, awsLogsLambda.arn); } + @Override public int hashCode() { return Objects.hash(arn); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSLogsListResponse.java b/src/main/java/com/datadog/api/client/v1/model/AWSLogsListResponse.java index 4fb7494d9c0..11641ab6583 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSLogsListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSLogsListResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A list of all Datadog-AWS logs integrations available in your Datadog organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A list of all Datadog-AWS logs integrations available in your Datadog organization.

+ */ @JsonPropertyOrder({ AWSLogsListResponse.JSON_PROPERTY_ACCOUNT_ID, AWSLogsListResponse.JSON_PROPERTY_LAMBDAS, AWSLogsListResponse.JSON_PROPERTY_SERVICES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSLogsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; @@ -39,21 +57,19 @@ public AWSLogsListResponse accountId(String accountId) { } /** - * Your AWS Account ID without dashes. - * + *

Your AWS Account ID without dashes.

* @return accountId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public AWSLogsListResponse lambdas(List lambdas) { this.lambdas = lambdas; for (AWSLogsLambda item : lambdas) { @@ -61,7 +77,6 @@ public AWSLogsListResponse lambdas(List lambdas) { } return this; } - public AWSLogsListResponse addLambdasItem(AWSLogsLambda lambdasItem) { if (this.lambdas == null) { this.lambdas = new ArrayList<>(); @@ -72,26 +87,23 @@ public AWSLogsListResponse addLambdasItem(AWSLogsLambda lambdasItem) { } /** - * List of ARNs configured in your Datadog account. - * + *

List of ARNs configured in your Datadog account.

* @return lambdas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLambdas() { - return lambdas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLambdas() { + return lambdas; + } public void setLambdas(List lambdas) { this.lambdas = lambdas; } - public AWSLogsListResponse services(List services) { this.services = services; return this; } - public AWSLogsListResponse addServicesItem(String servicesItem) { if (this.services == null) { this.services = new ArrayList<>(); @@ -101,22 +113,23 @@ public AWSLogsListResponse addServicesItem(String servicesItem) { } /** - * Array of services IDs. - * + *

Array of services IDs.

* @return services - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getServices() { - return services; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } public void setServices(List services) { this.services = services; } - /** Return true if this AWSLogsListResponse object is equal to o. */ + /** + * Return true if this AWSLogsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,14 +139,13 @@ public boolean equals(Object o) { return false; } AWSLogsListResponse awsLogsListResponse = (AWSLogsListResponse) o; - return Objects.equals(this.accountId, awsLogsListResponse.accountId) - && Objects.equals(this.lambdas, awsLogsListResponse.lambdas) - && Objects.equals(this.services, awsLogsListResponse.services); + return Objects.equals(this.accountId, awsLogsListResponse.accountId) && Objects.equals(this.lambdas, awsLogsListResponse.lambdas) && Objects.equals(this.services, awsLogsListResponse.services); } + @Override public int hashCode() { - return Objects.hash(accountId, lambdas, services); + return Objects.hash(accountId,lambdas,services); } @Override @@ -148,7 +160,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSLogsListServicesResponse.java b/src/main/java/com/datadog/api/client/v1/model/AWSLogsListServicesResponse.java index bd12c3d3e94..4347d8dd62b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSLogsListServicesResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSLogsListServicesResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The list of current AWS services for which Datadog offers automatic log collection. */ + +/** + *

The list of current AWS services for which Datadog offers automatic log collection.

+ */ @JsonPropertyOrder({ AWSLogsListServicesResponse.JSON_PROPERTY_ID, AWSLogsListServicesResponse.JSON_PROPERTY_LABEL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSLogsListServicesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -33,43 +53,42 @@ public AWSLogsListServicesResponse id(String id) { } /** - * Key value in returned object. - * + *

Key value in returned object.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public AWSLogsListServicesResponse label(String label) { this.label = label; return this; } /** - * Name of service available for configuration with Datadog logs. - * + *

Name of service available for configuration with Datadog logs.

* @return label - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLabel() { - return label; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLabel() { + return label; + } public void setLabel(String label) { this.label = label; } - /** Return true if this AWSLogsListServicesResponse object is equal to o. */ + /** + * Return true if this AWSLogsListServicesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } AWSLogsListServicesResponse awsLogsListServicesResponse = (AWSLogsListServicesResponse) o; - return Objects.equals(this.id, awsLogsListServicesResponse.id) - && Objects.equals(this.label, awsLogsListServicesResponse.label); + return Objects.equals(this.id, awsLogsListServicesResponse.id) && Objects.equals(this.label, awsLogsListServicesResponse.label); } + @Override public int hashCode() { - return Objects.hash(id, label); + return Objects.hash(id,label); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSLogsServicesRequest.java b/src/main/java/com/datadog/api/client/v1/model/AWSLogsServicesRequest.java index b0628e188b6..dae56501659 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSLogsServicesRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSLogsServicesRequest.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A list of current AWS services for which Datadog offers automatic log collection. */ +/** + *

A list of current AWS services for which Datadog offers automatic log collection.

+ */ @JsonPropertyOrder({ AWSLogsServicesRequest.JSON_PROPERTY_ACCOUNT_ID, AWSLogsServicesRequest.JSON_PROPERTY_SERVICES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSLogsServicesRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; @@ -34,59 +51,55 @@ public AWSLogsServicesRequest() {} @JsonCreator public AWSLogsServicesRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICES) List services) { - this.accountId = accountId; - this.services = services; + @JsonProperty(required=true, value=JSON_PROPERTY_ACCOUNT_ID)String accountId, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICES)List services) { + this.accountId = accountId; + this.services = services; } - public AWSLogsServicesRequest accountId(String accountId) { this.accountId = accountId; return this; } /** - * Your AWS Account ID without dashes. - * + *

Your AWS Account ID without dashes.

* @return accountId - */ - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccountId() { - return accountId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public AWSLogsServicesRequest services(List services) { this.services = services; return this; } - public AWSLogsServicesRequest addServicesItem(String servicesItem) { this.services.add(servicesItem); return this; } /** - * Array of services IDs set to enable automatic log collection. Discover the list of available - * services with the get list of AWS log ready services API endpoint. - * + *

Array of services IDs set to enable automatic log collection. Discover the list of available services with the get list of AWS log ready services API endpoint.

* @return services - */ - @JsonProperty(JSON_PROPERTY_SERVICES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getServices() { - return services; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getServices() { + return services; + } public void setServices(List services) { this.services = services; } - /** Return true if this AWSLogsServicesRequest object is equal to o. */ + /** + * Return true if this AWSLogsServicesRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +109,13 @@ public boolean equals(Object o) { return false; } AWSLogsServicesRequest awsLogsServicesRequest = (AWSLogsServicesRequest) o; - return Objects.equals(this.accountId, awsLogsServicesRequest.accountId) - && Objects.equals(this.services, awsLogsServicesRequest.services); + return Objects.equals(this.accountId, awsLogsServicesRequest.accountId) && Objects.equals(this.services, awsLogsServicesRequest.services); } + @Override public int hashCode() { - return Objects.hash(accountId, services); + return Objects.hash(accountId,services); } @Override @@ -116,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSNamespace.java b/src/main/java/com/datadog/api/client/v1/model/AWSNamespace.java index 336e211357c..ade7bd413c4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSNamespace.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSNamespace.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The namespace associated with the tag filter entry. */ +/** + *

The namespace associated with the tag filter entry.

+ */ @JsonSerialize(using = AWSNamespace.AWSNamespaceSerializer.class) public class AWSNamespace { @@ -31,9 +55,7 @@ public class AWSNamespace { public static final AWSNamespace NETWORK_ELB = new AWSNamespace("network_elb"); public static final AWSNamespace LAMBDA = new AWSNamespace("lambda"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("elb", "application_elb", "sqs", "rds", "custom", "network_elb", "lambda")); + private static final Set allowedValues = new HashSet(Arrays.asList("elb", "application_elb", "sqs", "rds", "custom", "network_elb", "lambda")); private String value; @@ -46,19 +68,18 @@ public boolean isValid() { } public static class AWSNamespaceSerializer extends StdSerializer { - public AWSNamespaceSerializer(Class t) { - super(t); - } - - public AWSNamespaceSerializer() { - this(null); - } - - @Override - public void serialize(AWSNamespace value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public AWSNamespaceSerializer(Class t) { + super(t); + } + + public AWSNamespaceSerializer() { + this(null); + } + + @Override + public void serialize(AWSNamespace value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +91,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AWSNamespace object is equal to o. */ + /** + * Return true if this AWSNamespace object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +107,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilter.java b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilter.java index 40c9dd948a9..698c4f12d61 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilter.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilter.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A tag filter. */ + +/** + *

A tag filter.

+ */ @JsonPropertyOrder({ AWSTagFilter.JSON_PROPERTY_NAMESPACE, AWSTagFilter.JSON_PROPERTY_TAG_FILTER_STR }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSTagFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAMESPACE = "namespace"; private AWSNamespace namespace; @@ -34,46 +54,45 @@ public AWSTagFilter namespace(AWSNamespace namespace) { } /** - * The namespace associated with the tag filter entry. - * + *

The namespace associated with the tag filter entry.

* @return namespace - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAMESPACE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AWSNamespace getNamespace() { - return namespace; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AWSNamespace getNamespace() { + return namespace; + } public void setNamespace(AWSNamespace namespace) { if (!namespace.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.namespace = namespace; } - public AWSTagFilter tagFilterStr(String tagFilterStr) { this.tagFilterStr = tagFilterStr; return this; } /** - * The tag filter string. - * + *

The tag filter string.

* @return tagFilterStr - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_FILTER_STR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagFilterStr() { - return tagFilterStr; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_FILTER_STR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagFilterStr() { + return tagFilterStr; + } public void setTagFilterStr(String tagFilterStr) { this.tagFilterStr = tagFilterStr; } - /** Return true if this AWSTagFilter object is equal to o. */ + /** + * Return true if this AWSTagFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +102,13 @@ public boolean equals(Object o) { return false; } AWSTagFilter awsTagFilter = (AWSTagFilter) o; - return Objects.equals(this.namespace, awsTagFilter.namespace) - && Objects.equals(this.tagFilterStr, awsTagFilter.tagFilterStr); + return Objects.equals(this.namespace, awsTagFilter.namespace) && Objects.equals(this.tagFilterStr, awsTagFilter.tagFilterStr); } + @Override public int hashCode() { - return Objects.hash(namespace, tagFilterStr); + return Objects.hash(namespace,tagFilterStr); } @Override @@ -103,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterCreateRequest.java b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterCreateRequest.java index 96eb6c97df8..33bcf89c7fb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterCreateRequest.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The objects used to set an AWS tag filter. */ + +/** + *

The objects used to set an AWS tag filter.

+ */ @JsonPropertyOrder({ AWSTagFilterCreateRequest.JSON_PROPERTY_ACCOUNT_ID, AWSTagFilterCreateRequest.JSON_PROPERTY_NAMESPACE, AWSTagFilterCreateRequest.JSON_PROPERTY_TAG_FILTER_STR }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSTagFilterCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; @@ -37,21 +57,19 @@ public AWSTagFilterCreateRequest accountId(String accountId) { } /** - * Your AWS Account ID without dashes. - * + *

Your AWS Account ID without dashes.

* @return accountId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public AWSTagFilterCreateRequest namespace(AWSNamespace namespace) { this.namespace = namespace; this.unparsed |= !namespace.isValid(); @@ -59,46 +77,45 @@ public AWSTagFilterCreateRequest namespace(AWSNamespace namespace) { } /** - * The namespace associated with the tag filter entry. - * + *

The namespace associated with the tag filter entry.

* @return namespace - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAMESPACE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AWSNamespace getNamespace() { - return namespace; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AWSNamespace getNamespace() { + return namespace; + } public void setNamespace(AWSNamespace namespace) { if (!namespace.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.namespace = namespace; } - public AWSTagFilterCreateRequest tagFilterStr(String tagFilterStr) { this.tagFilterStr = tagFilterStr; return this; } /** - * The tag filter string. - * + *

The tag filter string.

* @return tagFilterStr - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_FILTER_STR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagFilterStr() { - return tagFilterStr; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_FILTER_STR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagFilterStr() { + return tagFilterStr; + } public void setTagFilterStr(String tagFilterStr) { this.tagFilterStr = tagFilterStr; } - /** Return true if this AWSTagFilterCreateRequest object is equal to o. */ + /** + * Return true if this AWSTagFilterCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -108,14 +125,13 @@ public boolean equals(Object o) { return false; } AWSTagFilterCreateRequest awsTagFilterCreateRequest = (AWSTagFilterCreateRequest) o; - return Objects.equals(this.accountId, awsTagFilterCreateRequest.accountId) - && Objects.equals(this.namespace, awsTagFilterCreateRequest.namespace) - && Objects.equals(this.tagFilterStr, awsTagFilterCreateRequest.tagFilterStr); + return Objects.equals(this.accountId, awsTagFilterCreateRequest.accountId) && Objects.equals(this.namespace, awsTagFilterCreateRequest.namespace) && Objects.equals(this.tagFilterStr, awsTagFilterCreateRequest.tagFilterStr); } + @Override public int hashCode() { - return Objects.hash(accountId, namespace, tagFilterStr); + return Objects.hash(accountId,namespace,tagFilterStr); } @Override @@ -130,7 +146,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterDeleteRequest.java b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterDeleteRequest.java index 95ba04f53d7..72d5f22cae2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterDeleteRequest.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The objects used to delete an AWS tag filter entry. */ + +/** + *

The objects used to delete an AWS tag filter entry.

+ */ @JsonPropertyOrder({ AWSTagFilterDeleteRequest.JSON_PROPERTY_ACCOUNT_ID, AWSTagFilterDeleteRequest.JSON_PROPERTY_NAMESPACE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSTagFilterDeleteRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; @@ -33,21 +53,19 @@ public AWSTagFilterDeleteRequest accountId(String accountId) { } /** - * The unique identifier of your AWS account. - * + *

The unique identifier of your AWS account.

* @return accountId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public AWSTagFilterDeleteRequest namespace(AWSNamespace namespace) { this.namespace = namespace; this.unparsed |= !namespace.isValid(); @@ -55,25 +73,26 @@ public AWSTagFilterDeleteRequest namespace(AWSNamespace namespace) { } /** - * The namespace associated with the tag filter entry. - * + *

The namespace associated with the tag filter entry.

* @return namespace - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAMESPACE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AWSNamespace getNamespace() { - return namespace; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AWSNamespace getNamespace() { + return namespace; + } public void setNamespace(AWSNamespace namespace) { if (!namespace.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.namespace = namespace; } - /** Return true if this AWSTagFilterDeleteRequest object is equal to o. */ + /** + * Return true if this AWSTagFilterDeleteRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +102,13 @@ public boolean equals(Object o) { return false; } AWSTagFilterDeleteRequest awsTagFilterDeleteRequest = (AWSTagFilterDeleteRequest) o; - return Objects.equals(this.accountId, awsTagFilterDeleteRequest.accountId) - && Objects.equals(this.namespace, awsTagFilterDeleteRequest.namespace); + return Objects.equals(this.accountId, awsTagFilterDeleteRequest.accountId) && Objects.equals(this.namespace, awsTagFilterDeleteRequest.namespace); } + @Override public int hashCode() { - return Objects.hash(accountId, namespace); + return Objects.hash(accountId,namespace); } @Override @@ -103,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterListResponse.java b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterListResponse.java index d4c15fb8aa6..92cb19dfd21 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AWSTagFilterListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An array of tag filter rules by namespace and tag filter string. */ -@JsonPropertyOrder({AWSTagFilterListResponse.JSON_PROPERTY_FILTERS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

An array of tag filter rules by namespace and tag filter string.

+ */ +@JsonPropertyOrder({ + AWSTagFilterListResponse.JSON_PROPERTY_FILTERS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AWSTagFilterListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTERS = "filters"; private List filters = null; @@ -30,7 +50,6 @@ public AWSTagFilterListResponse filters(List filters) { } return this; } - public AWSTagFilterListResponse addFiltersItem(AWSTagFilter filtersItem) { if (this.filters == null) { this.filters = new ArrayList<>(); @@ -41,22 +60,23 @@ public AWSTagFilterListResponse addFiltersItem(AWSTagFilter filtersItem) { } /** - * An array of tag filters. - * + *

An array of tag filters.

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - /** Return true if this AWSTagFilterListResponse object is equal to o. */ + /** + * Return true if this AWSTagFilterListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.filters, awsTagFilterListResponse.filters); } + @Override public int hashCode() { return Objects.hash(filters); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AccessRole.java b/src/main/java/com/datadog/api/client/v1/model/AccessRole.java index d510c1a5bbd..86e237d1a8e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AccessRole.java +++ b/src/main/java/com/datadog/api/client/v1/model/AccessRole.java @@ -6,22 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The access role of the user. Options are st (standard user), - * adm (admin user), or ro (read-only user). + *

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).

*/ @JsonSerialize(using = AccessRole.AccessRoleSerializer.class) public class AccessRole { @@ -31,8 +52,7 @@ public class AccessRole { public static final AccessRole READ_ONLY = new AccessRole("ro"); public static final AccessRole ERROR = new AccessRole("ERROR"); - private static final Set allowedValues = - new HashSet(Arrays.asList("st", "adm", "ro", "ERROR")); + private static final Set allowedValues = new HashSet(Arrays.asList("st", "adm", "ro", "ERROR")); private String value; @@ -45,19 +65,18 @@ public boolean isValid() { } public static class AccessRoleSerializer extends StdSerializer { - public AccessRoleSerializer(Class t) { - super(t); - } - - public AccessRoleSerializer() { - this(null); - } - - @Override - public void serialize(AccessRole value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public AccessRoleSerializer(Class t) { + super(t); + } + + public AccessRoleSerializer() { + this(null); + } + + @Override + public void serialize(AccessRole value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AccessRole object is equal to o. */ + /** + * Return true if this AccessRole object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/AddSignalToIncidentRequest.java b/src/main/java/com/datadog/api/client/v1/model/AddSignalToIncidentRequest.java index 5f8a3e7031a..2a4fec578e4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AddSignalToIncidentRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/AddSignalToIncidentRequest.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes describing which incident to add the signal to. */ + +/** + *

Attributes describing which incident to add the signal to.

+ */ @JsonPropertyOrder({ AddSignalToIncidentRequest.JSON_PROPERTY_ADD_TO_SIGNAL_TIMELINE, AddSignalToIncidentRequest.JSON_PROPERTY_INCIDENT_ID, AddSignalToIncidentRequest.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AddSignalToIncidentRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ADD_TO_SIGNAL_TIMELINE = "add_to_signal_timeline"; private Boolean addToSignalTimeline; @@ -36,73 +55,69 @@ public AddSignalToIncidentRequest() {} @JsonCreator public AddSignalToIncidentRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_ID) Long incidentId) { - this.incidentId = incidentId; + @JsonProperty(required=true, value=JSON_PROPERTY_INCIDENT_ID)Long incidentId) { + this.incidentId = incidentId; } - public AddSignalToIncidentRequest addToSignalTimeline(Boolean addToSignalTimeline) { this.addToSignalTimeline = addToSignalTimeline; return this; } /** - * Whether to post the signal on the incident timeline. - * + *

Whether to post the signal on the incident timeline.

* @return addToSignalTimeline - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ADD_TO_SIGNAL_TIMELINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAddToSignalTimeline() { - return addToSignalTimeline; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADD_TO_SIGNAL_TIMELINE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAddToSignalTimeline() { + return addToSignalTimeline; + } public void setAddToSignalTimeline(Boolean addToSignalTimeline) { this.addToSignalTimeline = addToSignalTimeline; } - public AddSignalToIncidentRequest incidentId(Long incidentId) { this.incidentId = incidentId; return this; } /** - * Public ID attribute of the incident to which the signal will be added. - * + *

Public ID attribute of the incident to which the signal will be added.

* @return incidentId - */ - @JsonProperty(JSON_PROPERTY_INCIDENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getIncidentId() { - return incidentId; - } - + **/ + @JsonProperty(JSON_PROPERTY_INCIDENT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getIncidentId() { + return incidentId; + } public void setIncidentId(Long incidentId) { this.incidentId = incidentId; } - public AddSignalToIncidentRequest version(Long version) { this.version = version; return this; } /** - * Version of the updated signal. If server side version is higher, update will be rejected. - * + *

Version of the updated signal. If server side version is higher, update will be rejected.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this AddSignalToIncidentRequest object is equal to o. */ + /** + * Return true if this AddSignalToIncidentRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,23 +127,20 @@ public boolean equals(Object o) { return false; } AddSignalToIncidentRequest addSignalToIncidentRequest = (AddSignalToIncidentRequest) o; - return Objects.equals(this.addToSignalTimeline, addSignalToIncidentRequest.addToSignalTimeline) - && Objects.equals(this.incidentId, addSignalToIncidentRequest.incidentId) - && Objects.equals(this.version, addSignalToIncidentRequest.version); + return Objects.equals(this.addToSignalTimeline, addSignalToIncidentRequest.addToSignalTimeline) && Objects.equals(this.incidentId, addSignalToIncidentRequest.incidentId) && Objects.equals(this.version, addSignalToIncidentRequest.version); } + @Override public int hashCode() { - return Objects.hash(addToSignalTimeline, incidentId, version); + return Objects.hash(addToSignalTimeline,incidentId,version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddSignalToIncidentRequest {\n"); - sb.append(" addToSignalTimeline: ") - .append(toIndentedString(addToSignalTimeline)) - .append("\n"); + sb.append(" addToSignalTimeline: ").append(toIndentedString(addToSignalTimeline)).append("\n"); sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); @@ -136,7 +148,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinition.java index 0a55cedb871..4a08f30cfd5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Alert graphs are timeseries graphs showing the current status of any monitor defined on your - * system. + *

Alert graphs are timeseries graphs showing the current status of any monitor defined on your system.

*/ @JsonPropertyOrder({ AlertGraphWidgetDefinition.JSON_PROPERTY_ALERT_ID, @@ -26,10 +42,10 @@ AlertGraphWidgetDefinition.JSON_PROPERTY_TYPE, AlertGraphWidgetDefinition.JSON_PROPERTY_VIZ_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AlertGraphWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALERT_ID = "alert_id"; private String alertId; @@ -55,37 +71,33 @@ public AlertGraphWidgetDefinition() {} @JsonCreator public AlertGraphWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_ALERT_ID) String alertId, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - AlertGraphWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_VIZ_TYPE) WidgetVizType vizType) { - this.alertId = alertId; - this.type = type; - this.unparsed |= !type.isValid(); - this.vizType = vizType; - this.unparsed |= !vizType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ALERT_ID)String alertId, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)AlertGraphWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_VIZ_TYPE)WidgetVizType vizType) { + this.alertId = alertId; + this.type = type; + this.unparsed |= !type.isValid(); + this.vizType = vizType; + this.unparsed |= !vizType.isValid(); } - public AlertGraphWidgetDefinition alertId(String alertId) { this.alertId = alertId; return this; } /** - * ID of the alert to use in the widget. - * + *

ID of the alert to use in the widget.

* @return alertId - */ - @JsonProperty(JSON_PROPERTY_ALERT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAlertId() { - return alertId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ALERT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAlertId() { + return alertId; + } public void setAlertId(String alertId) { this.alertId = alertId; } - public AlertGraphWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -93,42 +105,38 @@ public AlertGraphWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public AlertGraphWidgetDefinition title(String title) { this.title = title; return this; } /** - * The title of the widget. - * + *

The title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public AlertGraphWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -136,45 +144,41 @@ public AlertGraphWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public AlertGraphWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public AlertGraphWidgetDefinition type(AlertGraphWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -182,23 +186,21 @@ public AlertGraphWidgetDefinition type(AlertGraphWidgetDefinitionType type) { } /** - * Type of the alert graph widget. - * + *

Type of the alert graph widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AlertGraphWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AlertGraphWidgetDefinitionType getType() { + return type; + } public void setType(AlertGraphWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public AlertGraphWidgetDefinition vizType(WidgetVizType vizType) { this.vizType = vizType; this.unparsed |= !vizType.isValid(); @@ -206,24 +208,25 @@ public AlertGraphWidgetDefinition vizType(WidgetVizType vizType) { } /** - * Whether to display the Alert Graph as a timeseries or a top list. - * + *

Whether to display the Alert Graph as a timeseries or a top list.

* @return vizType - */ - @JsonProperty(JSON_PROPERTY_VIZ_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetVizType getVizType() { - return vizType; - } - + **/ + @JsonProperty(JSON_PROPERTY_VIZ_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetVizType getVizType() { + return vizType; + } public void setVizType(WidgetVizType vizType) { if (!vizType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.vizType = vizType; } - /** Return true if this AlertGraphWidgetDefinition object is equal to o. */ + /** + * Return true if this AlertGraphWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -233,18 +236,13 @@ public boolean equals(Object o) { return false; } AlertGraphWidgetDefinition alertGraphWidgetDefinition = (AlertGraphWidgetDefinition) o; - return Objects.equals(this.alertId, alertGraphWidgetDefinition.alertId) - && Objects.equals(this.time, alertGraphWidgetDefinition.time) - && Objects.equals(this.title, alertGraphWidgetDefinition.title) - && Objects.equals(this.titleAlign, alertGraphWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, alertGraphWidgetDefinition.titleSize) - && Objects.equals(this.type, alertGraphWidgetDefinition.type) - && Objects.equals(this.vizType, alertGraphWidgetDefinition.vizType); + return Objects.equals(this.alertId, alertGraphWidgetDefinition.alertId) && Objects.equals(this.time, alertGraphWidgetDefinition.time) && Objects.equals(this.title, alertGraphWidgetDefinition.title) && Objects.equals(this.titleAlign, alertGraphWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, alertGraphWidgetDefinition.titleSize) && Objects.equals(this.type, alertGraphWidgetDefinition.type) && Objects.equals(this.vizType, alertGraphWidgetDefinition.vizType); } + @Override public int hashCode() { - return Objects.hash(alertId, time, title, titleAlign, titleSize, type, vizType); + return Objects.hash(alertId,time,title,titleAlign,titleSize,type,vizType); } @Override @@ -263,7 +261,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinitionType.java index ba91ca96471..80cfb1ed4af 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/AlertGraphWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the alert graph widget. */ -@JsonSerialize( - using = AlertGraphWidgetDefinitionType.AlertGraphWidgetDefinitionTypeSerializer.class) +/** + *

Type of the alert graph widget.

+ */ +@JsonSerialize(using = AlertGraphWidgetDefinitionType.AlertGraphWidgetDefinitionTypeSerializer.class) public class AlertGraphWidgetDefinitionType { - public static final AlertGraphWidgetDefinitionType ALERT_GRAPH = - new AlertGraphWidgetDefinitionType("alert_graph"); + public static final AlertGraphWidgetDefinitionType ALERT_GRAPH = new AlertGraphWidgetDefinitionType("alert_graph"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alert_graph")); + private static final Set allowedValues = new HashSet(Arrays.asList("alert_graph")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class AlertGraphWidgetDefinitionTypeSerializer - extends StdSerializer { - public AlertGraphWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class AlertGraphWidgetDefinitionTypeSerializer extends StdSerializer { + public AlertGraphWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public AlertGraphWidgetDefinitionTypeSerializer() { - this(null); - } + public AlertGraphWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - AlertGraphWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(AlertGraphWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AlertGraphWidgetDefinitionType object is equal to o. */ + /** + * Return true if this AlertGraphWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinition.java index 1cd4c3ed80e..a6c4ba265d5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Alert values are query values showing the current value of the metric in any monitor defined on - * your system. + *

Alert values are query values showing the current value of the metric in any monitor defined on your system.

*/ @JsonPropertyOrder({ AlertValueWidgetDefinition.JSON_PROPERTY_ALERT_ID, @@ -27,10 +43,10 @@ AlertValueWidgetDefinition.JSON_PROPERTY_TYPE, AlertValueWidgetDefinition.JSON_PROPERTY_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AlertValueWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALERT_ID = "alert_id"; private String alertId; @@ -59,55 +75,49 @@ public AlertValueWidgetDefinition() {} @JsonCreator public AlertValueWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_ALERT_ID) String alertId, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - AlertValueWidgetDefinitionType type) { - this.alertId = alertId; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ALERT_ID)String alertId, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)AlertValueWidgetDefinitionType type) { + this.alertId = alertId; + this.type = type; + this.unparsed |= !type.isValid(); } - public AlertValueWidgetDefinition alertId(String alertId) { this.alertId = alertId; return this; } /** - * ID of the alert to use in the widget. - * + *

ID of the alert to use in the widget.

* @return alertId - */ - @JsonProperty(JSON_PROPERTY_ALERT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAlertId() { - return alertId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ALERT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAlertId() { + return alertId; + } public void setAlertId(String alertId) { this.alertId = alertId; } - public AlertValueWidgetDefinition precision(Long precision) { this.precision = precision; return this; } /** - * Number of decimal to show. If not defined, will use the raw value. - * + *

Number of decimal to show. If not defined, will use the raw value.

* @return precision - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPrecision() { - return precision; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRECISION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPrecision() { + return precision; + } public void setPrecision(Long precision) { this.precision = precision; } - public AlertValueWidgetDefinition textAlign(WidgetTextAlign textAlign) { this.textAlign = textAlign; this.unparsed |= !textAlign.isValid(); @@ -115,45 +125,41 @@ public AlertValueWidgetDefinition textAlign(WidgetTextAlign textAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return textAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTextAlign() { - return textAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTextAlign() { + return textAlign; + } public void setTextAlign(WidgetTextAlign textAlign) { if (!textAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.textAlign = textAlign; } - public AlertValueWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public AlertValueWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -161,45 +167,41 @@ public AlertValueWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public AlertValueWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of value in the widget. - * + *

Size of value in the widget.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public AlertValueWidgetDefinition type(AlertValueWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -207,45 +209,44 @@ public AlertValueWidgetDefinition type(AlertValueWidgetDefinitionType type) { } /** - * Type of the alert value widget. - * + *

Type of the alert value widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AlertValueWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AlertValueWidgetDefinitionType getType() { + return type; + } public void setType(AlertValueWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public AlertValueWidgetDefinition unit(String unit) { this.unit = unit; return this; } /** - * Unit to display with the value. - * + *

Unit to display with the value.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUnit() { - return unit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUnit() { + return unit; + } public void setUnit(String unit) { this.unit = unit; } - /** Return true if this AlertValueWidgetDefinition object is equal to o. */ + /** + * Return true if this AlertValueWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -255,19 +256,13 @@ public boolean equals(Object o) { return false; } AlertValueWidgetDefinition alertValueWidgetDefinition = (AlertValueWidgetDefinition) o; - return Objects.equals(this.alertId, alertValueWidgetDefinition.alertId) - && Objects.equals(this.precision, alertValueWidgetDefinition.precision) - && Objects.equals(this.textAlign, alertValueWidgetDefinition.textAlign) - && Objects.equals(this.title, alertValueWidgetDefinition.title) - && Objects.equals(this.titleAlign, alertValueWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, alertValueWidgetDefinition.titleSize) - && Objects.equals(this.type, alertValueWidgetDefinition.type) - && Objects.equals(this.unit, alertValueWidgetDefinition.unit); + return Objects.equals(this.alertId, alertValueWidgetDefinition.alertId) && Objects.equals(this.precision, alertValueWidgetDefinition.precision) && Objects.equals(this.textAlign, alertValueWidgetDefinition.textAlign) && Objects.equals(this.title, alertValueWidgetDefinition.title) && Objects.equals(this.titleAlign, alertValueWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, alertValueWidgetDefinition.titleSize) && Objects.equals(this.type, alertValueWidgetDefinition.type) && Objects.equals(this.unit, alertValueWidgetDefinition.unit); } + @Override public int hashCode() { - return Objects.hash(alertId, precision, textAlign, title, titleAlign, titleSize, type, unit); + return Objects.hash(alertId,precision,textAlign,title,titleAlign,titleSize,type,unit); } @Override @@ -287,7 +282,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinitionType.java index 46472317889..2367d15c5f1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/AlertValueWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the alert value widget. */ -@JsonSerialize( - using = AlertValueWidgetDefinitionType.AlertValueWidgetDefinitionTypeSerializer.class) +/** + *

Type of the alert value widget.

+ */ +@JsonSerialize(using = AlertValueWidgetDefinitionType.AlertValueWidgetDefinitionTypeSerializer.class) public class AlertValueWidgetDefinitionType { - public static final AlertValueWidgetDefinitionType ALERT_VALUE = - new AlertValueWidgetDefinitionType("alert_value"); + public static final AlertValueWidgetDefinitionType ALERT_VALUE = new AlertValueWidgetDefinitionType("alert_value"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alert_value")); + private static final Set allowedValues = new HashSet(Arrays.asList("alert_value")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class AlertValueWidgetDefinitionTypeSerializer - extends StdSerializer { - public AlertValueWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class AlertValueWidgetDefinitionTypeSerializer extends StdSerializer { + public AlertValueWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public AlertValueWidgetDefinitionTypeSerializer() { - this(null); - } + public AlertValueWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - AlertValueWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(AlertValueWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AlertValueWidgetDefinitionType object is equal to o. */ + /** + * Return true if this AlertValueWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ApiKey.java b/src/main/java/com/datadog/api/client/v1/model/ApiKey.java index eca037aff2f..e7eb1c0af34 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApiKey.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApiKey.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Datadog API key. */ + +/** + *

Datadog API key.

+ */ @JsonPropertyOrder({ ApiKey.JSON_PROPERTY_CREATED, ApiKey.JSON_PROPERTY_CREATED_BY, ApiKey.JSON_PROPERTY_KEY, ApiKey.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; private String created; @@ -35,64 +55,65 @@ public class ApiKey { public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * Date of creation of the API key. - * + *

Date of creation of the API key.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreated() { + return created; + } /** - * Datadog user handle that created the API key. - * + *

Datadog user handle that created the API key.

* @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedBy() { - return createdBy; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedBy() { + return createdBy; + } /** - * API key. - * + *

API key.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } public ApiKey name(String name) { this.name = name; return this; } /** - * Name of your API key. - * + *

Name of your API key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this ApiKey object is equal to o. */ + /** + * Return true if this ApiKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,15 +123,13 @@ public boolean equals(Object o) { return false; } ApiKey apiKey = (ApiKey) o; - return Objects.equals(this.created, apiKey.created) - && Objects.equals(this.createdBy, apiKey.createdBy) - && Objects.equals(this.key, apiKey.key) - && Objects.equals(this.name, apiKey.name); + return Objects.equals(this.created, apiKey.created) && Objects.equals(this.createdBy, apiKey.createdBy) && Objects.equals(this.key, apiKey.key) && Objects.equals(this.name, apiKey.name); } + @Override public int hashCode() { - return Objects.hash(created, createdBy, key, name); + return Objects.hash(created,createdBy,key,name); } @Override @@ -126,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApiKeyListResponse.java b/src/main/java/com/datadog/api/client/v1/model/ApiKeyListResponse.java index 542a9f92439..a9fa773fa15 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApiKeyListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApiKeyListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List of API and application keys available for a given organization. */ -@JsonPropertyOrder({ApiKeyListResponse.JSON_PROPERTY_API_KEYS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

List of API and application keys available for a given organization.

+ */ +@JsonPropertyOrder({ + ApiKeyListResponse.JSON_PROPERTY_API_KEYS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiKeyListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEYS = "api_keys"; private List apiKeys = null; @@ -30,7 +50,6 @@ public ApiKeyListResponse apiKeys(List apiKeys) { } return this; } - public ApiKeyListResponse addApiKeysItem(ApiKey apiKeysItem) { if (this.apiKeys == null) { this.apiKeys = new ArrayList<>(); @@ -41,22 +60,23 @@ public ApiKeyListResponse addApiKeysItem(ApiKey apiKeysItem) { } /** - * Array of API keys. - * + *

Array of API keys.

* @return apiKeys - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_KEYS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getApiKeys() { - return apiKeys; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEYS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getApiKeys() { + return apiKeys; + } public void setApiKeys(List apiKeys) { this.apiKeys = apiKeys; } - /** Return true if this ApiKeyListResponse object is equal to o. */ + /** + * Return true if this ApiKeyListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.apiKeys, apiKeyListResponse.apiKeys); } + @Override public int hashCode() { return Objects.hash(apiKeys); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApiKeyResponse.java b/src/main/java/com/datadog/api/client/v1/model/ApiKeyResponse.java index f24d4fa7f9d..1cc5152e687 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApiKeyResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApiKeyResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** An API key with its associated metadata. */ -@JsonPropertyOrder({ApiKeyResponse.JSON_PROPERTY_API_KEY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

An API key with its associated metadata.

+ */ +@JsonPropertyOrder({ + ApiKeyResponse.JSON_PROPERTY_API_KEY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApiKeyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private ApiKey apiKey; @@ -28,22 +50,23 @@ public ApiKeyResponse apiKey(ApiKey apiKey) { } /** - * Datadog API key. - * + *

Datadog API key.

* @return apiKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApiKey getApiKey() { - return apiKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApiKey getApiKey() { + return apiKey; + } public void setApiKey(ApiKey apiKey) { this.apiKey = apiKey; } - /** Return true if this ApiKeyResponse object is equal to o. */ + /** + * Return true if this ApiKeyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.apiKey, apiKeyResponse.apiKey); } + @Override public int hashCode() { return Objects.hash(apiKey); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryColumnType.java b/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryColumnType.java index 481488bf652..359e8d1d93a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryColumnType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryColumnType.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Column properties. */ +/** + *

Column properties.

+ */ @JsonPropertyOrder({ ApmStatsQueryColumnType.JSON_PROPERTY_ALIAS, ApmStatsQueryColumnType.JSON_PROPERTY_CELL_DISPLAY_MODE, ApmStatsQueryColumnType.JSON_PROPERTY_NAME, ApmStatsQueryColumnType.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApmStatsQueryColumnType { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALIAS = "alias"; private String alias; @@ -40,31 +59,28 @@ public ApmStatsQueryColumnType() {} @JsonCreator public ApmStatsQueryColumnType( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public ApmStatsQueryColumnType alias(String alias) { this.alias = alias; return this; } /** - * A user-assigned alias for the column. - * + *

A user-assigned alias for the column.

* @return alias - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlias() { - return alias; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAlias() { + return alias; + } public void setAlias(String alias) { this.alias = alias; } - public ApmStatsQueryColumnType cellDisplayMode(TableWidgetCellDisplayMode cellDisplayMode) { this.cellDisplayMode = cellDisplayMode; this.unparsed |= !cellDisplayMode.isValid(); @@ -72,44 +88,40 @@ public ApmStatsQueryColumnType cellDisplayMode(TableWidgetCellDisplayMode cellDi } /** - * Define a display mode for the table cell. - * + *

Define a display mode for the table cell.

* @return cellDisplayMode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CELL_DISPLAY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TableWidgetCellDisplayMode getCellDisplayMode() { - return cellDisplayMode; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_DISPLAY_MODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TableWidgetCellDisplayMode getCellDisplayMode() { + return cellDisplayMode; + } public void setCellDisplayMode(TableWidgetCellDisplayMode cellDisplayMode) { if (!cellDisplayMode.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.cellDisplayMode = cellDisplayMode; } - public ApmStatsQueryColumnType name(String name) { this.name = name; return this; } /** - * Column name. - * + *

Column name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ApmStatsQueryColumnType order(WidgetSort order) { this.order = order; this.unparsed |= !order.isValid(); @@ -117,25 +129,26 @@ public ApmStatsQueryColumnType order(WidgetSort order) { } /** - * Widget sorting methods. - * + *

Widget sorting methods.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetSort getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetSort getOrder() { + return order; + } public void setOrder(WidgetSort order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this ApmStatsQueryColumnType object is equal to o. */ + /** + * Return true if this ApmStatsQueryColumnType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +158,13 @@ public boolean equals(Object o) { return false; } ApmStatsQueryColumnType apmStatsQueryColumnType = (ApmStatsQueryColumnType) o; - return Objects.equals(this.alias, apmStatsQueryColumnType.alias) - && Objects.equals(this.cellDisplayMode, apmStatsQueryColumnType.cellDisplayMode) - && Objects.equals(this.name, apmStatsQueryColumnType.name) - && Objects.equals(this.order, apmStatsQueryColumnType.order); + return Objects.equals(this.alias, apmStatsQueryColumnType.alias) && Objects.equals(this.cellDisplayMode, apmStatsQueryColumnType.cellDisplayMode) && Objects.equals(this.name, apmStatsQueryColumnType.name) && Objects.equals(this.order, apmStatsQueryColumnType.order); } + @Override public int hashCode() { - return Objects.hash(alias, cellDisplayMode, name, order); + return Objects.hash(alias,cellDisplayMode,name,order); } @Override @@ -169,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryDefinition.java index e848c41edc3..7fa8630b9ab 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The APM stats query for table and distributions widgets. */ +/** + *

The APM stats query for table and distributions widgets.

+ */ @JsonPropertyOrder({ ApmStatsQueryDefinition.JSON_PROPERTY_COLUMNS, ApmStatsQueryDefinition.JSON_PROPERTY_ENV, @@ -25,10 +42,10 @@ ApmStatsQueryDefinition.JSON_PROPERTY_ROW_TYPE, ApmStatsQueryDefinition.JSON_PROPERTY_SERVICE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApmStatsQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLUMNS = "columns"; private List columns = null; @@ -54,19 +71,18 @@ public ApmStatsQueryDefinition() {} @JsonCreator public ApmStatsQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_ENV) String env, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_PRIMARY_TAG) String primaryTag, - @JsonProperty(required = true, value = JSON_PROPERTY_ROW_TYPE) ApmStatsQueryRowType rowType, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service) { - this.env = env; - this.name = name; - this.primaryTag = primaryTag; - this.rowType = rowType; - this.unparsed |= !rowType.isValid(); - this.service = service; + @JsonProperty(required=true, value=JSON_PROPERTY_ENV)String env, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_PRIMARY_TAG)String primaryTag, + @JsonProperty(required=true, value=JSON_PROPERTY_ROW_TYPE)ApmStatsQueryRowType rowType, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE)String service) { + this.env = env; + this.name = name; + this.primaryTag = primaryTag; + this.rowType = rowType; + this.unparsed |= !rowType.isValid(); + this.service = service; } - public ApmStatsQueryDefinition columns(List columns) { this.columns = columns; for (ApmStatsQueryColumnType item : columns) { @@ -74,7 +90,6 @@ public ApmStatsQueryDefinition columns(List columns) { } return this; } - public ApmStatsQueryDefinition addColumnsItem(ApmStatsQueryColumnType columnsItem) { if (this.columns == null) { this.columns = new ArrayList<>(); @@ -85,102 +100,92 @@ public ApmStatsQueryDefinition addColumnsItem(ApmStatsQueryColumnType columnsIte } /** - * Column properties used by the front end for display. - * + *

Column properties used by the front end for display.

* @return columns - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLUMNS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getColumns() { - return columns; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } public void setColumns(List columns) { this.columns = columns; } - public ApmStatsQueryDefinition env(String env) { this.env = env; return this; } /** - * Environment name. - * + *

Environment name.

* @return env - */ - @JsonProperty(JSON_PROPERTY_ENV) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEnv() { - return env; - } - + **/ + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getEnv() { + return env; + } public void setEnv(String env) { this.env = env; } - public ApmStatsQueryDefinition name(String name) { this.name = name; return this; } /** - * Operation name associated with service. - * + *

Operation name associated with service.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ApmStatsQueryDefinition primaryTag(String primaryTag) { this.primaryTag = primaryTag; return this; } /** - * The organization's host group name and value. - * + *

The organization's host group name and value.

* @return primaryTag - */ - @JsonProperty(JSON_PROPERTY_PRIMARY_TAG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPrimaryTag() { - return primaryTag; - } - + **/ + @JsonProperty(JSON_PROPERTY_PRIMARY_TAG) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPrimaryTag() { + return primaryTag; + } public void setPrimaryTag(String primaryTag) { this.primaryTag = primaryTag; } - public ApmStatsQueryDefinition resource(String resource) { this.resource = resource; return this; } /** - * Resource name. - * + *

Resource name.

* @return resource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResource() { - return resource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResource() { + return resource; + } public void setResource(String resource) { this.resource = resource; } - public ApmStatsQueryDefinition rowType(ApmStatsQueryRowType rowType) { this.rowType = rowType; this.unparsed |= !rowType.isValid(); @@ -188,44 +193,43 @@ public ApmStatsQueryDefinition rowType(ApmStatsQueryRowType rowType) { } /** - * The level of detail for the request. - * + *

The level of detail for the request.

* @return rowType - */ - @JsonProperty(JSON_PROPERTY_ROW_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApmStatsQueryRowType getRowType() { - return rowType; - } - + **/ + @JsonProperty(JSON_PROPERTY_ROW_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApmStatsQueryRowType getRowType() { + return rowType; + } public void setRowType(ApmStatsQueryRowType rowType) { if (!rowType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.rowType = rowType; } - public ApmStatsQueryDefinition service(String service) { this.service = service; return this; } /** - * Service name. - * + *

Service name.

* @return service - */ - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getService() { - return service; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - /** Return true if this ApmStatsQueryDefinition object is equal to o. */ + /** + * Return true if this ApmStatsQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -235,18 +239,13 @@ public boolean equals(Object o) { return false; } ApmStatsQueryDefinition apmStatsQueryDefinition = (ApmStatsQueryDefinition) o; - return Objects.equals(this.columns, apmStatsQueryDefinition.columns) - && Objects.equals(this.env, apmStatsQueryDefinition.env) - && Objects.equals(this.name, apmStatsQueryDefinition.name) - && Objects.equals(this.primaryTag, apmStatsQueryDefinition.primaryTag) - && Objects.equals(this.resource, apmStatsQueryDefinition.resource) - && Objects.equals(this.rowType, apmStatsQueryDefinition.rowType) - && Objects.equals(this.service, apmStatsQueryDefinition.service); + return Objects.equals(this.columns, apmStatsQueryDefinition.columns) && Objects.equals(this.env, apmStatsQueryDefinition.env) && Objects.equals(this.name, apmStatsQueryDefinition.name) && Objects.equals(this.primaryTag, apmStatsQueryDefinition.primaryTag) && Objects.equals(this.resource, apmStatsQueryDefinition.resource) && Objects.equals(this.rowType, apmStatsQueryDefinition.rowType) && Objects.equals(this.service, apmStatsQueryDefinition.service); } + @Override public int hashCode() { - return Objects.hash(columns, env, name, primaryTag, resource, rowType, service); + return Objects.hash(columns,env,name,primaryTag,resource,rowType,service); } @Override @@ -265,7 +264,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryRowType.java b/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryRowType.java index 0fcd3d0b18f..ebff172dc54 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryRowType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApmStatsQueryRowType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The level of detail for the request. */ +/** + *

The level of detail for the request.

+ */ @JsonSerialize(using = ApmStatsQueryRowType.ApmStatsQueryRowTypeSerializer.class) public class ApmStatsQueryRowType { @@ -27,8 +51,7 @@ public class ApmStatsQueryRowType { public static final ApmStatsQueryRowType RESOURCE = new ApmStatsQueryRowType("resource"); public static final ApmStatsQueryRowType SPAN = new ApmStatsQueryRowType("span"); - private static final Set allowedValues = - new HashSet(Arrays.asList("service", "resource", "span")); + private static final Set allowedValues = new HashSet(Arrays.asList("service", "resource", "span")); private String value; @@ -41,20 +64,18 @@ public boolean isValid() { } public static class ApmStatsQueryRowTypeSerializer extends StdSerializer { - public ApmStatsQueryRowTypeSerializer(Class t) { - super(t); - } - - public ApmStatsQueryRowTypeSerializer() { - this(null); - } - - @Override - public void serialize( - ApmStatsQueryRowType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ApmStatsQueryRowTypeSerializer(Class t) { + super(t); + } + + public ApmStatsQueryRowTypeSerializer() { + this(null); + } + + @Override + public void serialize(ApmStatsQueryRowType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ApmStatsQueryRowType object is equal to o. */ + /** + * Return true if this ApmStatsQueryRowType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ApplicationKey.java b/src/main/java/com/datadog/api/client/v1/model/ApplicationKey.java index 6727d6be976..7ccc069f2ca 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApplicationKey.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApplicationKey.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An application key with its associated metadata. */ +/** + *

An application key with its associated metadata.

+ */ @JsonPropertyOrder({ ApplicationKey.JSON_PROPERTY_HASH, ApplicationKey.JSON_PROPERTY_NAME, ApplicationKey.JSON_PROPERTY_OWNER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HASH = "hash"; private String hash; @@ -31,52 +51,53 @@ public class ApplicationKey { public static final String JSON_PROPERTY_OWNER = "owner"; private String owner; + /** - * Hash of an application key. - * + *

Hash of an application key.

* @return hash - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HASH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHash() { - return hash; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHash() { + return hash; + } public ApplicationKey name(String name) { this.name = name; return this; } /** - * Name of an application key. - * + *

Name of an application key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } /** - * Owner of an application key. - * + *

Owner of an application key.

* @return owner - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OWNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOwner() { - return owner; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOwner() { + return owner; + } - /** Return true if this ApplicationKey object is equal to o. */ + /** + * Return true if this ApplicationKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,14 +107,13 @@ public boolean equals(Object o) { return false; } ApplicationKey applicationKey = (ApplicationKey) o; - return Objects.equals(this.hash, applicationKey.hash) - && Objects.equals(this.name, applicationKey.name) - && Objects.equals(this.owner, applicationKey.owner); + return Objects.equals(this.hash, applicationKey.hash) && Objects.equals(this.name, applicationKey.name) && Objects.equals(this.owner, applicationKey.owner); } + @Override public int hashCode() { - return Objects.hash(hash, name, owner); + return Objects.hash(hash,name,owner); } @Override @@ -108,7 +128,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyListResponse.java b/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyListResponse.java index 509cb54f380..2a47fcea016 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An application key response. */ -@JsonPropertyOrder({ApplicationKeyListResponse.JSON_PROPERTY_APPLICATION_KEYS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

An application key response.

+ */ +@JsonPropertyOrder({ + ApplicationKeyListResponse.JSON_PROPERTY_APPLICATION_KEYS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APPLICATION_KEYS = "application_keys"; private List applicationKeys = null; @@ -30,7 +50,6 @@ public ApplicationKeyListResponse applicationKeys(List applicati } return this; } - public ApplicationKeyListResponse addApplicationKeysItem(ApplicationKey applicationKeysItem) { if (this.applicationKeys == null) { this.applicationKeys = new ArrayList<>(); @@ -41,22 +60,23 @@ public ApplicationKeyListResponse addApplicationKeysItem(ApplicationKey applicat } /** - * Array of application keys. - * + *

Array of application keys.

* @return applicationKeys - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_KEYS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getApplicationKeys() { - return applicationKeys; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_KEYS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getApplicationKeys() { + return applicationKeys; + } public void setApplicationKeys(List applicationKeys) { this.applicationKeys = applicationKeys; } - /** Return true if this ApplicationKeyListResponse object is equal to o. */ + /** + * Return true if this ApplicationKeyListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.applicationKeys, applicationKeyListResponse.applicationKeys); } + @Override public int hashCode() { return Objects.hash(applicationKeys); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyResponse.java b/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyResponse.java index c61b0e9a148..c3bcbee4a67 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/ApplicationKeyResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** An application key response. */ -@JsonPropertyOrder({ApplicationKeyResponse.JSON_PROPERTY_APPLICATION_KEY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

An application key response.

+ */ +@JsonPropertyOrder({ + ApplicationKeyResponse.JSON_PROPERTY_APPLICATION_KEY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APPLICATION_KEY = "application_key"; private ApplicationKey applicationKey; @@ -28,22 +50,23 @@ public ApplicationKeyResponse applicationKey(ApplicationKey applicationKey) { } /** - * An application key with its associated metadata. - * + *

An application key with its associated metadata.

* @return applicationKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApplicationKey getApplicationKey() { - return applicationKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApplicationKey getApplicationKey() { + return applicationKey; + } public void setApplicationKey(ApplicationKey applicationKey) { this.applicationKey = applicationKey; } - /** Return true if this ApplicationKeyResponse object is equal to o. */ + /** + * Return true if this ApplicationKeyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.applicationKey, applicationKeyResponse.applicationKey); } + @Override public int hashCode() { return Objects.hash(applicationKey); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AuthenticationValidationResponse.java b/src/main/java/com/datadog/api/client/v1/model/AuthenticationValidationResponse.java index 4144d8d710e..fc7d3373b12 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AuthenticationValidationResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/AuthenticationValidationResponse.java @@ -6,34 +6,59 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Represent validation endpoint responses. */ -@JsonPropertyOrder({AuthenticationValidationResponse.JSON_PROPERTY_VALID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Represent validation endpoint responses.

+ */ +@JsonPropertyOrder({ + AuthenticationValidationResponse.JSON_PROPERTY_VALID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthenticationValidationResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_VALID = "valid"; private Boolean valid; + /** - * Return true if the authentication response is valid. - * + *

Return true if the authentication response is valid.

* @return valid - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getValid() { - return valid; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getValid() { + return valid; + } - /** Return true if this AuthenticationValidationResponse object is equal to o. */ + /** + * Return true if this AuthenticationValidationResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -42,11 +67,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AuthenticationValidationResponse authenticationValidationResponse = - (AuthenticationValidationResponse) o; + AuthenticationValidationResponse authenticationValidationResponse = (AuthenticationValidationResponse) o; return Objects.equals(this.valid, authenticationValidationResponse.valid); } + @Override public int hashCode() { return Objects.hash(valid); @@ -62,7 +87,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java b/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java index bcfe1cda45c..e33cb60c94d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java +++ b/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Datadog-Azure integrations configured for your organization. */ +/** + *

Datadog-Azure integrations configured for your organization.

+ */ @JsonPropertyOrder({ AzureAccount.JSON_PROPERTY_AUTOMUTE, AzureAccount.JSON_PROPERTY_CLIENT_ID, @@ -25,10 +43,10 @@ AzureAccount.JSON_PROPERTY_NEW_TENANT_NAME, AzureAccount.JSON_PROPERTY_TENANT_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AzureAccount { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTOMUTE = "automute"; private Boolean automute; @@ -59,68 +77,61 @@ public AzureAccount automute(Boolean automute) { } /** - * Silence monitors for expected Azure VM shutdowns. - * + *

Silence monitors for expected Azure VM shutdowns.

* @return automute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTOMUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAutomute() { - return automute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTOMUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutomute() { + return automute; + } public void setAutomute(Boolean automute) { this.automute = automute; } - public AzureAccount clientId(String clientId) { this.clientId = clientId; return this; } /** - * Your Azure web application ID. - * + *

Your Azure web application ID.

* @return clientId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } public void setClientId(String clientId) { this.clientId = clientId; } - public AzureAccount clientSecret(String clientSecret) { this.clientSecret = clientSecret; return this; } /** - * Your Azure web application secret key. - * + *

Your Azure web application secret key.

* @return clientSecret - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientSecret() { - return clientSecret; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientSecret() { + return clientSecret; + } public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } - public AzureAccount errors(List errors) { this.errors = errors; return this; } - public AzureAccount addErrorsItem(String errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -130,107 +141,100 @@ public AzureAccount addErrorsItem(String errorsItem) { } /** - * Errors in your configuration. - * + *

Errors in your configuration.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - public AzureAccount hostFilters(String hostFilters) { this.hostFilters = hostFilters; return this; } /** - * Limit the Azure instances that are pulled into Datadog by using tags. Only hosts that match one - * of the defined tags are imported into Datadog. - * + *

Limit the Azure instances that are pulled into Datadog by using tags. + * Only hosts that match one of the defined tags are imported into Datadog.

* @return hostFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostFilters() { - return hostFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostFilters() { + return hostFilters; + } public void setHostFilters(String hostFilters) { this.hostFilters = hostFilters; } - public AzureAccount newClientId(String newClientId) { this.newClientId = newClientId; return this; } /** - * Your New Azure web application ID. - * + *

Your New Azure web application ID.

* @return newClientId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEW_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNewClientId() { - return newClientId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_CLIENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNewClientId() { + return newClientId; + } public void setNewClientId(String newClientId) { this.newClientId = newClientId; } - public AzureAccount newTenantName(String newTenantName) { this.newTenantName = newTenantName; return this; } /** - * Your New Azure Active Directory ID. - * + *

Your New Azure Active Directory ID.

* @return newTenantName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEW_TENANT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNewTenantName() { - return newTenantName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_TENANT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNewTenantName() { + return newTenantName; + } public void setNewTenantName(String newTenantName) { this.newTenantName = newTenantName; } - public AzureAccount tenantName(String tenantName) { this.tenantName = tenantName; return this; } /** - * Your Azure Active Directory ID. - * + *

Your Azure Active Directory ID.

* @return tenantName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TENANT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTenantName() { - return tenantName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TENANT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTenantName() { + return tenantName; + } public void setTenantName(String tenantName) { this.tenantName = tenantName; } - /** Return true if this AzureAccount object is equal to o. */ + /** + * Return true if this AzureAccount object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -240,27 +244,13 @@ public boolean equals(Object o) { return false; } AzureAccount azureAccount = (AzureAccount) o; - return Objects.equals(this.automute, azureAccount.automute) - && Objects.equals(this.clientId, azureAccount.clientId) - && Objects.equals(this.clientSecret, azureAccount.clientSecret) - && Objects.equals(this.errors, azureAccount.errors) - && Objects.equals(this.hostFilters, azureAccount.hostFilters) - && Objects.equals(this.newClientId, azureAccount.newClientId) - && Objects.equals(this.newTenantName, azureAccount.newTenantName) - && Objects.equals(this.tenantName, azureAccount.tenantName); + return Objects.equals(this.automute, azureAccount.automute) && Objects.equals(this.clientId, azureAccount.clientId) && Objects.equals(this.clientSecret, azureAccount.clientSecret) && Objects.equals(this.errors, azureAccount.errors) && Objects.equals(this.hostFilters, azureAccount.hostFilters) && Objects.equals(this.newClientId, azureAccount.newClientId) && Objects.equals(this.newTenantName, azureAccount.newTenantName) && Objects.equals(this.tenantName, azureAccount.tenantName); } + @Override public int hashCode() { - return Objects.hash( - automute, - clientId, - clientSecret, - errors, - hostFilters, - newClientId, - newTenantName, - tenantName); + return Objects.hash(automute,clientId,clientSecret,errors,hostFilters,newClientId,newTenantName,tenantName); } @Override @@ -280,7 +270,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CancelDowntimesByScopeRequest.java b/src/main/java/com/datadog/api/client/v1/model/CancelDowntimesByScopeRequest.java index 53f0a999e62..34e9431a9b8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CancelDowntimesByScopeRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/CancelDowntimesByScopeRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Cancel downtimes according to scope. */ -@JsonPropertyOrder({CancelDowntimesByScopeRequest.JSON_PROPERTY_SCOPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Cancel downtimes according to scope.

+ */ +@JsonPropertyOrder({ + CancelDowntimesByScopeRequest.JSON_PROPERTY_SCOPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CancelDowntimesByScopeRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SCOPE = "scope"; private String scope; @@ -26,34 +47,33 @@ public CancelDowntimesByScopeRequest() {} @JsonCreator public CancelDowntimesByScopeRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope) { - this.scope = scope; + @JsonProperty(required=true, value=JSON_PROPERTY_SCOPE)String scope) { + this.scope = scope; } - public CancelDowntimesByScopeRequest scope(String scope) { this.scope = scope; return this; } /** - * The scope(s) to which the downtime applies. For example, host:app2. Provide - * multiple scopes as a comma-separated list like env:dev,env:prod. The resulting - * downtime applies to sources that matches ALL provided scopes (env:dev - * AND env:prod). - * + *

The scope(s) to which the downtime applies. For example, host:app2. + * Provide multiple scopes as a comma-separated list like env:dev,env:prod. + * The resulting downtime applies to sources that matches ALL provided scopes (env:dev AND env:prod).

* @return scope - */ - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getScope() { - return scope; - } - + **/ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } public void setScope(String scope) { this.scope = scope; } - /** Return true if this CancelDowntimesByScopeRequest object is equal to o. */ + /** + * Return true if this CancelDowntimesByScopeRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.scope, cancelDowntimesByScopeRequest.scope); } + @Override public int hashCode() { return Objects.hash(scope); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CanceledDowntimesIds.java b/src/main/java/com/datadog/api/client/v1/model/CanceledDowntimesIds.java index d8f87fdbeed..bf05cea6dfa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CanceledDowntimesIds.java +++ b/src/main/java/com/datadog/api/client/v1/model/CanceledDowntimesIds.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing array of IDs of canceled downtimes. */ -@JsonPropertyOrder({CanceledDowntimesIds.JSON_PROPERTY_CANCELLED_IDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object containing array of IDs of canceled downtimes.

+ */ +@JsonPropertyOrder({ + CanceledDowntimesIds.JSON_PROPERTY_CANCELLED_IDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CanceledDowntimesIds { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CANCELLED_IDS = "cancelled_ids"; private List cancelledIds = null; @@ -27,7 +47,6 @@ public CanceledDowntimesIds cancelledIds(List cancelledIds) { this.cancelledIds = cancelledIds; return this; } - public CanceledDowntimesIds addCancelledIdsItem(Long cancelledIdsItem) { if (this.cancelledIds == null) { this.cancelledIds = new ArrayList<>(); @@ -37,22 +56,23 @@ public CanceledDowntimesIds addCancelledIdsItem(Long cancelledIdsItem) { } /** - * ID of downtimes that were canceled. - * + *

ID of downtimes that were canceled.

* @return cancelledIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CANCELLED_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCancelledIds() { - return cancelledIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CANCELLED_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCancelledIds() { + return cancelledIds; + } public void setCancelledIds(List cancelledIds) { this.cancelledIds = cancelledIds; } - /** Return true if this CanceledDowntimesIds object is equal to o. */ + /** + * Return true if this CanceledDowntimesIds object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.cancelledIds, canceledDowntimesIds.cancelledIds); } + @Override public int hashCode() { return Objects.hash(cancelledIds); @@ -80,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinition.java index ba3a15073f1..06448a2d818 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The Change graph shows you the change in a value over the time period chosen. */ +/** + *

The Change graph shows you the change in a value over the time period chosen.

+ */ @JsonPropertyOrder({ ChangeWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, ChangeWidgetDefinition.JSON_PROPERTY_REQUESTS, @@ -25,10 +42,10 @@ ChangeWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, ChangeWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ChangeWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -54,14 +71,12 @@ public ChangeWidgetDefinition() {} @JsonCreator public ChangeWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ChangeWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ChangeWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public ChangeWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -69,7 +84,6 @@ public ChangeWidgetDefinition customLinks(List customLinks) { } return this; } - public ChangeWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -80,21 +94,19 @@ public ChangeWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksIte } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public ChangeWidgetDefinition requests(List requests) { this.requests = requests; for (ChangeWidgetRequest item : requests) { @@ -102,7 +114,6 @@ public ChangeWidgetDefinition requests(List requests) { } return this; } - public ChangeWidgetDefinition addRequestsItem(ChangeWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -110,24 +121,20 @@ public ChangeWidgetDefinition addRequestsItem(ChangeWidgetRequest requestsItem) } /** - * Array of one request object to display in the widget. - * - *

See the dedicated Request JSON schema - * documentation to learn how to build the REQUEST_SCHEMA. - * + *

Array of one request object to display in the widget.

+ *

See the dedicated Request JSON schema documentation + * to learn how to build the REQUEST_SCHEMA.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public ChangeWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -135,42 +142,38 @@ public ChangeWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public ChangeWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public ChangeWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -178,45 +181,41 @@ public ChangeWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public ChangeWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public ChangeWidgetDefinition type(ChangeWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -224,24 +223,25 @@ public ChangeWidgetDefinition type(ChangeWidgetDefinitionType type) { } /** - * Type of the change widget. - * + *

Type of the change widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ChangeWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ChangeWidgetDefinitionType getType() { + return type; + } public void setType(ChangeWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ChangeWidgetDefinition object is equal to o. */ + /** + * Return true if this ChangeWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -251,18 +251,13 @@ public boolean equals(Object o) { return false; } ChangeWidgetDefinition changeWidgetDefinition = (ChangeWidgetDefinition) o; - return Objects.equals(this.customLinks, changeWidgetDefinition.customLinks) - && Objects.equals(this.requests, changeWidgetDefinition.requests) - && Objects.equals(this.time, changeWidgetDefinition.time) - && Objects.equals(this.title, changeWidgetDefinition.title) - && Objects.equals(this.titleAlign, changeWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, changeWidgetDefinition.titleSize) - && Objects.equals(this.type, changeWidgetDefinition.type); + return Objects.equals(this.customLinks, changeWidgetDefinition.customLinks) && Objects.equals(this.requests, changeWidgetDefinition.requests) && Objects.equals(this.time, changeWidgetDefinition.time) && Objects.equals(this.title, changeWidgetDefinition.title) && Objects.equals(this.titleAlign, changeWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, changeWidgetDefinition.titleSize) && Objects.equals(this.type, changeWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(customLinks, requests, time, title, titleAlign, titleSize, type); + return Objects.hash(customLinks,requests,time,title,titleAlign,titleSize,type); } @Override @@ -281,7 +276,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinitionType.java index 7c15606fc2c..1d5e81907aa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the change widget. */ +/** + *

Type of the change widget.

+ */ @JsonSerialize(using = ChangeWidgetDefinitionType.ChangeWidgetDefinitionTypeSerializer.class) public class ChangeWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ChangeWidgetDefinitionTypeSerializer - extends StdSerializer { - public ChangeWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class ChangeWidgetDefinitionTypeSerializer extends StdSerializer { + public ChangeWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ChangeWidgetDefinitionTypeSerializer() { - this(null); - } + public ChangeWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ChangeWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ChangeWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ChangeWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ChangeWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java index 6c9fbed6b4b..c49ad7b6ee5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Updated change widget. */ +/** + *

Updated change widget.

+ */ @JsonPropertyOrder({ ChangeWidgetRequest.JSON_PROPERTY_APM_QUERY, ChangeWidgetRequest.JSON_PROPERTY_CHANGE_TYPE, @@ -35,10 +53,10 @@ ChangeWidgetRequest.JSON_PROPERTY_SECURITY_QUERY, ChangeWidgetRequest.JSON_PROPERTY_SHOW_PRESENT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ChangeWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -100,21 +118,19 @@ public ChangeWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public ChangeWidgetRequest changeType(WidgetChangeType changeType) { this.changeType = changeType; this.unparsed |= !changeType.isValid(); @@ -122,24 +138,22 @@ public ChangeWidgetRequest changeType(WidgetChangeType changeType) { } /** - * Show the absolute or the relative change. - * + *

Show the absolute or the relative change.

* @return changeType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHANGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetChangeType getChangeType() { - return changeType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHANGE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetChangeType getChangeType() { + return changeType; + } public void setChangeType(WidgetChangeType changeType) { if (!changeType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.changeType = changeType; } - public ChangeWidgetRequest compareTo(WidgetCompareTo compareTo) { this.compareTo = compareTo; this.unparsed |= !compareTo.isValid(); @@ -147,24 +161,22 @@ public ChangeWidgetRequest compareTo(WidgetCompareTo compareTo) { } /** - * Timeframe used for the change comparison. - * + *

Timeframe used for the change comparison.

* @return compareTo - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPARE_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetCompareTo getCompareTo() { - return compareTo; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPARE_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetCompareTo getCompareTo() { + return compareTo; + } public void setCompareTo(WidgetCompareTo compareTo) { if (!compareTo.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.compareTo = compareTo; } - public ChangeWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -172,21 +184,19 @@ public ChangeWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public ChangeWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -194,7 +204,6 @@ public ChangeWidgetRequest formulas(List formulas) { } return this; } - public ChangeWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -205,42 +214,38 @@ public ChangeWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public ChangeWidgetRequest increaseGood(Boolean increaseGood) { this.increaseGood = increaseGood; return this; } /** - * Whether to show increase as good. - * + *

Whether to show increase as good.

* @return increaseGood - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCREASE_GOOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncreaseGood() { - return increaseGood; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCREASE_GOOD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncreaseGood() { + return increaseGood; + } public void setIncreaseGood(Boolean increaseGood) { this.increaseGood = increaseGood; } - public ChangeWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -248,21 +253,19 @@ public ChangeWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public ChangeWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -270,21 +273,19 @@ public ChangeWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public ChangeWidgetRequest orderBy(WidgetOrderBy orderBy) { this.orderBy = orderBy; this.unparsed |= !orderBy.isValid(); @@ -292,24 +293,22 @@ public ChangeWidgetRequest orderBy(WidgetOrderBy orderBy) { } /** - * What to order by. - * + *

What to order by.

* @return orderBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetOrderBy getOrderBy() { - return orderBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetOrderBy getOrderBy() { + return orderBy; + } public void setOrderBy(WidgetOrderBy orderBy) { if (!orderBy.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.orderBy = orderBy; } - public ChangeWidgetRequest orderDir(WidgetSort orderDir) { this.orderDir = orderDir; this.unparsed |= !orderDir.isValid(); @@ -317,24 +316,22 @@ public ChangeWidgetRequest orderDir(WidgetSort orderDir) { } /** - * Widget sorting methods. - * + *

Widget sorting methods.

* @return orderDir - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER_DIR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetSort getOrderDir() { - return orderDir; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER_DIR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetSort getOrderDir() { + return orderDir; + } public void setOrderDir(WidgetSort orderDir) { if (!orderDir.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.orderDir = orderDir; } - public ChangeWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -342,21 +339,19 @@ public ChangeWidgetRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public ChangeWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -364,42 +359,38 @@ public ChangeWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetrics } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public ChangeWidgetRequest q(String q) { this.q = q; return this; } /** - * Query definition. - * + *

Query definition.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public ChangeWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -407,7 +398,6 @@ public ChangeWidgetRequest queries(List queri } return this; } - public ChangeWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -418,21 +408,19 @@ public ChangeWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition quer } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public ChangeWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -440,24 +428,22 @@ public ChangeWidgetRequest responseFormat(FormulaAndFunctionResponseFormat respo } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public ChangeWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -465,21 +451,19 @@ public ChangeWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public ChangeWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -487,43 +471,42 @@ public ChangeWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - public ChangeWidgetRequest showPresent(Boolean showPresent) { this.showPresent = showPresent; return this; } /** - * Whether to show the present value. - * + *

Whether to show the present value.

* @return showPresent - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_PRESENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPresent() { - return showPresent; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_PRESENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowPresent() { + return showPresent; + } public void setShowPresent(Boolean showPresent) { this.showPresent = showPresent; } - /** Return true if this ChangeWidgetRequest object is equal to o. */ + /** + * Return true if this ChangeWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -533,47 +516,13 @@ public boolean equals(Object o) { return false; } ChangeWidgetRequest changeWidgetRequest = (ChangeWidgetRequest) o; - return Objects.equals(this.apmQuery, changeWidgetRequest.apmQuery) - && Objects.equals(this.changeType, changeWidgetRequest.changeType) - && Objects.equals(this.compareTo, changeWidgetRequest.compareTo) - && Objects.equals(this.eventQuery, changeWidgetRequest.eventQuery) - && Objects.equals(this.formulas, changeWidgetRequest.formulas) - && Objects.equals(this.increaseGood, changeWidgetRequest.increaseGood) - && Objects.equals(this.logQuery, changeWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, changeWidgetRequest.networkQuery) - && Objects.equals(this.orderBy, changeWidgetRequest.orderBy) - && Objects.equals(this.orderDir, changeWidgetRequest.orderDir) - && Objects.equals(this.processQuery, changeWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, changeWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, changeWidgetRequest.q) - && Objects.equals(this.queries, changeWidgetRequest.queries) - && Objects.equals(this.responseFormat, changeWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, changeWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, changeWidgetRequest.securityQuery) - && Objects.equals(this.showPresent, changeWidgetRequest.showPresent); + return Objects.equals(this.apmQuery, changeWidgetRequest.apmQuery) && Objects.equals(this.changeType, changeWidgetRequest.changeType) && Objects.equals(this.compareTo, changeWidgetRequest.compareTo) && Objects.equals(this.eventQuery, changeWidgetRequest.eventQuery) && Objects.equals(this.formulas, changeWidgetRequest.formulas) && Objects.equals(this.increaseGood, changeWidgetRequest.increaseGood) && Objects.equals(this.logQuery, changeWidgetRequest.logQuery) && Objects.equals(this.networkQuery, changeWidgetRequest.networkQuery) && Objects.equals(this.orderBy, changeWidgetRequest.orderBy) && Objects.equals(this.orderDir, changeWidgetRequest.orderDir) && Objects.equals(this.processQuery, changeWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, changeWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, changeWidgetRequest.q) && Objects.equals(this.queries, changeWidgetRequest.queries) && Objects.equals(this.responseFormat, changeWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, changeWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, changeWidgetRequest.securityQuery) && Objects.equals(this.showPresent, changeWidgetRequest.showPresent); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - changeType, - compareTo, - eventQuery, - formulas, - increaseGood, - logQuery, - networkQuery, - orderBy, - orderDir, - processQuery, - profileMetricsQuery, - q, - queries, - responseFormat, - rumQuery, - securityQuery, - showPresent); + return Objects.hash(apmQuery,changeType,compareTo,eventQuery,formulas,increaseGood,logQuery,networkQuery,orderBy,orderDir,processQuery,profileMetricsQuery,q,queries,responseFormat,rumQuery,securityQuery,showPresent); } @Override @@ -591,9 +540,7 @@ public String toString() { sb.append(" orderBy: ").append(toIndentedString(orderBy)).append("\n"); sb.append(" orderDir: ").append(toIndentedString(orderDir)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); @@ -605,7 +552,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponse.java b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponse.java index 2c153a75438..05b11a42592 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponse.java @@ -6,25 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Map; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response of monitor IDs that can or can't be safely deleted. */ + +/** + *

Response of monitor IDs that can or can't be safely deleted.

+ */ @JsonPropertyOrder({ CheckCanDeleteMonitorResponse.JSON_PROPERTY_DATA, CheckCanDeleteMonitorResponse.JSON_PROPERTY_ERRORS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CheckCanDeleteMonitorResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CheckCanDeleteMonitorResponseData data; @@ -35,12 +51,10 @@ public CheckCanDeleteMonitorResponse() {} @JsonCreator public CheckCanDeleteMonitorResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - CheckCanDeleteMonitorResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)CheckCanDeleteMonitorResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public CheckCanDeleteMonitorResponse data(CheckCanDeleteMonitorResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -48,25 +62,22 @@ public CheckCanDeleteMonitorResponse data(CheckCanDeleteMonitorResponseData data } /** - * Wrapper object with the list of monitor IDs. - * + *

Wrapper object with the list of monitor IDs.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CheckCanDeleteMonitorResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CheckCanDeleteMonitorResponseData getData() { + return data; + } public void setData(CheckCanDeleteMonitorResponseData data) { this.data = data; } - public CheckCanDeleteMonitorResponse errors(Map> errors) { this.errors = errors; return this; } - public CheckCanDeleteMonitorResponse putErrorsItem(String key, List errorsItem) { if (this.errors == null) { this.errors = new HashMap<>(); @@ -76,22 +87,23 @@ public CheckCanDeleteMonitorResponse putErrorsItem(String key, List erro } /** - * A mapping of Monitor ID to strings denoting where it's used. - * + *

A mapping of Monitor ID to strings denoting where it's used.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getErrors() { + return errors; + } public void setErrors(Map> errors) { this.errors = errors; } - /** Return true if this CheckCanDeleteMonitorResponse object is equal to o. */ + /** + * Return true if this CheckCanDeleteMonitorResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -101,13 +113,13 @@ public boolean equals(Object o) { return false; } CheckCanDeleteMonitorResponse checkCanDeleteMonitorResponse = (CheckCanDeleteMonitorResponse) o; - return Objects.equals(this.data, checkCanDeleteMonitorResponse.data) - && Objects.equals(this.errors, checkCanDeleteMonitorResponse.errors); + return Objects.equals(this.data, checkCanDeleteMonitorResponse.data) && Objects.equals(this.errors, checkCanDeleteMonitorResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -121,7 +133,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponseData.java b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponseData.java index d88cbd3ce99..691c4356124 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteMonitorResponseData.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Wrapper object with the list of monitor IDs. */ -@JsonPropertyOrder({CheckCanDeleteMonitorResponseData.JSON_PROPERTY_OK}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Wrapper object with the list of monitor IDs.

+ */ +@JsonPropertyOrder({ + CheckCanDeleteMonitorResponseData.JSON_PROPERTY_OK +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CheckCanDeleteMonitorResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OK = "ok"; private List ok = null; @@ -27,7 +47,6 @@ public CheckCanDeleteMonitorResponseData ok(List ok) { this.ok = ok; return this; } - public CheckCanDeleteMonitorResponseData addOkItem(Long okItem) { if (this.ok == null) { this.ok = new ArrayList<>(); @@ -37,22 +56,23 @@ public CheckCanDeleteMonitorResponseData addOkItem(Long okItem) { } /** - * An array of of Monitor IDs that can be safely deleted. - * + *

An array of of Monitor IDs that can be safely deleted.

* @return ok - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOk() { - return ok; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getOk() { + return ok; + } public void setOk(List ok) { this.ok = ok; } - /** Return true if this CheckCanDeleteMonitorResponseData object is equal to o. */ + /** + * Return true if this CheckCanDeleteMonitorResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +81,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CheckCanDeleteMonitorResponseData checkCanDeleteMonitorResponseData = - (CheckCanDeleteMonitorResponseData) o; + CheckCanDeleteMonitorResponseData checkCanDeleteMonitorResponseData = (CheckCanDeleteMonitorResponseData) o; return Objects.equals(this.ok, checkCanDeleteMonitorResponseData.ok); } + @Override public int hashCode() { return Objects.hash(ok); @@ -81,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponse.java b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponse.java index f3ee747184a..87faa047a79 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A service level objective response containing the requested object. */ +/** + *

A service level objective response containing the requested object.

+ */ @JsonPropertyOrder({ CheckCanDeleteSLOResponse.JSON_PROPERTY_DATA, CheckCanDeleteSLOResponse.JSON_PROPERTY_ERRORS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CheckCanDeleteSLOResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CheckCanDeleteSLOResponseData data; @@ -36,26 +54,23 @@ public CheckCanDeleteSLOResponse data(CheckCanDeleteSLOResponseData data) { } /** - * An array of service level objective objects. - * + *

An array of service level objective objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CheckCanDeleteSLOResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CheckCanDeleteSLOResponseData getData() { + return data; + } public void setData(CheckCanDeleteSLOResponseData data) { this.data = data; } - public CheckCanDeleteSLOResponse errors(Map errors) { this.errors = errors; return this; } - public CheckCanDeleteSLOResponse putErrorsItem(String key, String errorsItem) { if (this.errors == null) { this.errors = new HashMap<>(); @@ -65,22 +80,23 @@ public CheckCanDeleteSLOResponse putErrorsItem(String key, String errorsItem) { } /** - * A mapping of SLO id to it's current usages. - * + *

A mapping of SLO id to it's current usages.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrors() { + return errors; + } public void setErrors(Map errors) { this.errors = errors; } - /** Return true if this CheckCanDeleteSLOResponse object is equal to o. */ + /** + * Return true if this CheckCanDeleteSLOResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,13 +106,13 @@ public boolean equals(Object o) { return false; } CheckCanDeleteSLOResponse checkCanDeleteSloResponse = (CheckCanDeleteSLOResponse) o; - return Objects.equals(this.data, checkCanDeleteSloResponse.data) - && Objects.equals(this.errors, checkCanDeleteSloResponse.errors); + return Objects.equals(this.data, checkCanDeleteSloResponse.data) && Objects.equals(this.errors, checkCanDeleteSloResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -110,7 +126,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponseData.java b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponseData.java index a3c8178d4aa..dbca54a43c3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/CheckCanDeleteSLOResponseData.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An array of service level objective objects. */ -@JsonPropertyOrder({CheckCanDeleteSLOResponseData.JSON_PROPERTY_OK}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

An array of service level objective objects.

+ */ +@JsonPropertyOrder({ + CheckCanDeleteSLOResponseData.JSON_PROPERTY_OK +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CheckCanDeleteSLOResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OK = "ok"; private List ok = null; @@ -27,7 +47,6 @@ public CheckCanDeleteSLOResponseData ok(List ok) { this.ok = ok; return this; } - public CheckCanDeleteSLOResponseData addOkItem(String okItem) { if (this.ok == null) { this.ok = new ArrayList<>(); @@ -37,22 +56,23 @@ public CheckCanDeleteSLOResponseData addOkItem(String okItem) { } /** - * An array of of SLO IDs that can be safely deleted. - * + *

An array of of SLO IDs that can be safely deleted.

* @return ok - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOk() { - return ok; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getOk() { + return ok; + } public void setOk(List ok) { this.ok = ok; } - /** Return true if this CheckCanDeleteSLOResponseData object is equal to o. */ + /** + * Return true if this CheckCanDeleteSLOResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.ok, checkCanDeleteSloResponseData.ok); } + @Override public int hashCode() { return Objects.hash(ok); @@ -80,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinition.java index 8ce09a9e043..e85a1de6b64 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Check status shows the current status or number of results for any check performed. */ + +/** + *

Check status shows the current status or number of results for any check performed.

+ */ @JsonPropertyOrder({ CheckStatusWidgetDefinition.JSON_PROPERTY_CHECK, CheckStatusWidgetDefinition.JSON_PROPERTY_GROUP, @@ -28,10 +45,10 @@ CheckStatusWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, CheckStatusWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CheckStatusWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK = "check"; private String check; @@ -66,63 +83,56 @@ public CheckStatusWidgetDefinition() {} @JsonCreator public CheckStatusWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_CHECK) String check, - @JsonProperty(required = true, value = JSON_PROPERTY_GROUPING) WidgetGrouping grouping, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - CheckStatusWidgetDefinitionType type) { - this.check = check; - this.grouping = grouping; - this.unparsed |= !grouping.isValid(); - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CHECK)String check, + @JsonProperty(required=true, value=JSON_PROPERTY_GROUPING)WidgetGrouping grouping, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)CheckStatusWidgetDefinitionType type) { + this.check = check; + this.grouping = grouping; + this.unparsed |= !grouping.isValid(); + this.type = type; + this.unparsed |= !type.isValid(); } - public CheckStatusWidgetDefinition check(String check) { this.check = check; return this; } /** - * Name of the check to use in the widget. - * + *

Name of the check to use in the widget.

* @return check - */ - @JsonProperty(JSON_PROPERTY_CHECK) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCheck() { - return check; - } - + **/ + @JsonProperty(JSON_PROPERTY_CHECK) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getCheck() { + return check; + } public void setCheck(String check) { this.check = check; } - public CheckStatusWidgetDefinition group(String group) { this.group = group; return this; } /** - * Group reporting a single check. - * + *

Group reporting a single check.

* @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } public void setGroup(String group) { this.group = group; } - public CheckStatusWidgetDefinition groupBy(List groupBy) { this.groupBy = groupBy; return this; } - public CheckStatusWidgetDefinition addGroupByItem(String groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -132,21 +142,19 @@ public CheckStatusWidgetDefinition addGroupByItem(String groupByItem) { } /** - * List of tag prefixes to group by in the case of a cluster check. - * + *

List of tag prefixes to group by in the case of a cluster check.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public CheckStatusWidgetDefinition grouping(WidgetGrouping grouping) { this.grouping = grouping; this.unparsed |= !grouping.isValid(); @@ -154,28 +162,25 @@ public CheckStatusWidgetDefinition grouping(WidgetGrouping grouping) { } /** - * The kind of grouping to use. - * + *

The kind of grouping to use.

* @return grouping - */ - @JsonProperty(JSON_PROPERTY_GROUPING) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetGrouping getGrouping() { - return grouping; - } - + **/ + @JsonProperty(JSON_PROPERTY_GROUPING) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetGrouping getGrouping() { + return grouping; + } public void setGrouping(WidgetGrouping grouping) { if (!grouping.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.grouping = grouping; } - public CheckStatusWidgetDefinition tags(List tags) { this.tags = tags; return this; } - public CheckStatusWidgetDefinition addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -185,21 +190,19 @@ public CheckStatusWidgetDefinition addTagsItem(String tagsItem) { } /** - * List of tags used to filter the groups reporting a cluster check. - * + *

List of tags used to filter the groups reporting a cluster check.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public CheckStatusWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -207,42 +210,38 @@ public CheckStatusWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public CheckStatusWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public CheckStatusWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -250,45 +249,41 @@ public CheckStatusWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public CheckStatusWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public CheckStatusWidgetDefinition type(CheckStatusWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -296,24 +291,25 @@ public CheckStatusWidgetDefinition type(CheckStatusWidgetDefinitionType type) { } /** - * Type of the check status widget. - * + *

Type of the check status widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CheckStatusWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CheckStatusWidgetDefinitionType getType() { + return type; + } public void setType(CheckStatusWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CheckStatusWidgetDefinition object is equal to o. */ + /** + * Return true if this CheckStatusWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -323,22 +319,13 @@ public boolean equals(Object o) { return false; } CheckStatusWidgetDefinition checkStatusWidgetDefinition = (CheckStatusWidgetDefinition) o; - return Objects.equals(this.check, checkStatusWidgetDefinition.check) - && Objects.equals(this.group, checkStatusWidgetDefinition.group) - && Objects.equals(this.groupBy, checkStatusWidgetDefinition.groupBy) - && Objects.equals(this.grouping, checkStatusWidgetDefinition.grouping) - && Objects.equals(this.tags, checkStatusWidgetDefinition.tags) - && Objects.equals(this.time, checkStatusWidgetDefinition.time) - && Objects.equals(this.title, checkStatusWidgetDefinition.title) - && Objects.equals(this.titleAlign, checkStatusWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, checkStatusWidgetDefinition.titleSize) - && Objects.equals(this.type, checkStatusWidgetDefinition.type); + return Objects.equals(this.check, checkStatusWidgetDefinition.check) && Objects.equals(this.group, checkStatusWidgetDefinition.group) && Objects.equals(this.groupBy, checkStatusWidgetDefinition.groupBy) && Objects.equals(this.grouping, checkStatusWidgetDefinition.grouping) && Objects.equals(this.tags, checkStatusWidgetDefinition.tags) && Objects.equals(this.time, checkStatusWidgetDefinition.time) && Objects.equals(this.title, checkStatusWidgetDefinition.title) && Objects.equals(this.titleAlign, checkStatusWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, checkStatusWidgetDefinition.titleSize) && Objects.equals(this.type, checkStatusWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - check, group, groupBy, grouping, tags, time, title, titleAlign, titleSize, type); + return Objects.hash(check,group,groupBy,grouping,tags,time,title,titleAlign,titleSize,type); } @Override @@ -360,7 +347,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinitionType.java index a1c6a8dbe22..2e9466b6acc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/CheckStatusWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the check status widget. */ -@JsonSerialize( - using = CheckStatusWidgetDefinitionType.CheckStatusWidgetDefinitionTypeSerializer.class) +/** + *

Type of the check status widget.

+ */ +@JsonSerialize(using = CheckStatusWidgetDefinitionType.CheckStatusWidgetDefinitionTypeSerializer.class) public class CheckStatusWidgetDefinitionType { - public static final CheckStatusWidgetDefinitionType CHECK_STATUS = - new CheckStatusWidgetDefinitionType("check_status"); + public static final CheckStatusWidgetDefinitionType CHECK_STATUS = new CheckStatusWidgetDefinitionType("check_status"); - private static final Set allowedValues = - new HashSet(Arrays.asList("check_status")); + private static final Set allowedValues = new HashSet(Arrays.asList("check_status")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class CheckStatusWidgetDefinitionTypeSerializer - extends StdSerializer { - public CheckStatusWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class CheckStatusWidgetDefinitionTypeSerializer extends StdSerializer { + public CheckStatusWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public CheckStatusWidgetDefinitionTypeSerializer() { - this(null); - } + public CheckStatusWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - CheckStatusWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CheckStatusWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CheckStatusWidgetDefinitionType object is equal to o. */ + /** + * Return true if this CheckStatusWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ContentEncoding.java b/src/main/java/com/datadog/api/client/v1/model/ContentEncoding.java index 1eb72a11d50..89f2fef9721 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ContentEncoding.java +++ b/src/main/java/com/datadog/api/client/v1/model/ContentEncoding.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** HTTP header used to compress the media-type. */ +/** + *

HTTP header used to compress the media-type.

+ */ @JsonSerialize(using = ContentEncoding.ContentEncodingSerializer.class) public class ContentEncoding { public static final ContentEncoding GZIP = new ContentEncoding("gzip"); public static final ContentEncoding DEFLATE = new ContentEncoding("deflate"); - private static final Set allowedValues = - new HashSet(Arrays.asList("gzip", "deflate")); + private static final Set allowedValues = new HashSet(Arrays.asList("gzip", "deflate")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class ContentEncodingSerializer extends StdSerializer { - public ContentEncodingSerializer(Class t) { - super(t); - } - - public ContentEncodingSerializer() { - this(null); - } - - @Override - public void serialize(ContentEncoding value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ContentEncodingSerializer(Class t) { + super(t); + } + + public ContentEncodingSerializer() { + this(null); + } + + @Override + public void serialize(ContentEncoding value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ContentEncoding object is equal to o. */ + /** + * Return true if this ContentEncoding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/Creator.java b/src/main/java/com/datadog/api/client/v1/model/Creator.java index bcb8812748a..d1263adac2e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Creator.java +++ b/src/main/java/com/datadog/api/client/v1/model/Creator.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing the creator of the shared element. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing the creator of the shared element.

+ */ @JsonPropertyOrder({ Creator.JSON_PROPERTY_EMAIL, Creator.JSON_PROPERTY_HANDLE, Creator.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Creator { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -38,74 +57,68 @@ public Creator email(String email) { } /** - * Email of the creator. - * + *

Email of the creator.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public Creator handle(String handle) { this.handle = handle; return this; } /** - * Handle of the creator. - * + *

Handle of the creator.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public Creator name(String name) { this.name = JsonNullable.of(name); return this; } /** - * Name of the creator. - * + *

Name of the creator.

* @return name - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getName() { - return name.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getName_JsonNullable() { return name; } - - @JsonProperty(JSON_PROPERTY_NAME) - public void setName_JsonNullable(JsonNullable name) { + @JsonProperty(JSON_PROPERTY_NAME)public void setName_JsonNullable(JsonNullable name) { this.name = name; } - public void setName(String name) { this.name = JsonNullable.of(name); } - /** Return true if this Creator object is equal to o. */ + /** + * Return true if this Creator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,14 +128,13 @@ public boolean equals(Object o) { return false; } Creator creator = (Creator) o; - return Objects.equals(this.email, creator.email) - && Objects.equals(this.handle, creator.handle) - && Objects.equals(this.name, creator.name); + return Objects.equals(this.email, creator.email) && Objects.equals(this.handle, creator.handle) && Objects.equals(this.name, creator.name); } + @Override public int hashCode() { - return Objects.hash(email, handle, name); + return Objects.hash(email,handle,name); } @Override @@ -137,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Dashboard.java b/src/main/java/com/datadog/api/client/v1/model/Dashboard.java index f5b454029dd..1d810257b3b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Dashboard.java +++ b/src/main/java/com/datadog/api/client/v1/model/Dashboard.java @@ -6,22 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A dashboard is Datadog’s tool for visually tracking, analyzing, and displaying key performance - * metrics, which enable you to monitor the health of your infrastructure. + *

A dashboard is Datadog’s tool for visually tracking, analyzing, and displaying + * key performance metrics, which enable you to monitor the health of your infrastructure.

*/ @JsonPropertyOrder({ Dashboard.JSON_PROPERTY_AUTHOR_HANDLE, @@ -41,10 +52,10 @@ Dashboard.JSON_PROPERTY_URL, Dashboard.JSON_PROPERTY_WIDGETS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Dashboard { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHOR_HANDLE = "author_handle"; private String authorHandle; @@ -52,7 +63,6 @@ public class Dashboard { private JsonNullable authorName = JsonNullable.undefined(); public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; @@ -69,7 +79,6 @@ public class Dashboard { private DashboardLayoutType layoutType; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -83,12 +92,10 @@ public class Dashboard { private List restrictedRoles = null; public static final String JSON_PROPERTY_TEMPLATE_VARIABLE_PRESETS = "template_variable_presets"; - private JsonNullable> templateVariablePresets = - JsonNullable.>undefined(); + private JsonNullable> templateVariablePresets = JsonNullable.>undefined(); public static final String JSON_PROPERTY_TEMPLATE_VARIABLES = "template_variables"; - private JsonNullable> templateVariables = - JsonNullable.>undefined(); + private JsonNullable> templateVariables = JsonNullable.>undefined(); public static final String JSON_PROPERTY_TITLE = "title"; private String title; @@ -103,134 +110,121 @@ public Dashboard() {} @JsonCreator public Dashboard( - @JsonProperty(required = true, value = JSON_PROPERTY_LAYOUT_TYPE) - DashboardLayoutType layoutType, - @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title, - @JsonProperty(required = true, value = JSON_PROPERTY_WIDGETS) List widgets) { - this.layoutType = layoutType; - this.unparsed |= !layoutType.isValid(); - this.title = title; - this.widgets = widgets; + @JsonProperty(required=true, value=JSON_PROPERTY_LAYOUT_TYPE)DashboardLayoutType layoutType, + @JsonProperty(required=true, value=JSON_PROPERTY_TITLE)String title, + @JsonProperty(required=true, value=JSON_PROPERTY_WIDGETS)List widgets) { + this.layoutType = layoutType; + this.unparsed |= !layoutType.isValid(); + this.title = title; + this.widgets = widgets; } /** - * Identifier of the dashboard author. - * + *

Identifier of the dashboard author.

* @return authorHandle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAuthorHandle() { - return authorHandle; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthorHandle() { + return authorHandle; + } /** - * Name of the dashboard author. - * + *

Name of the dashboard author.

* @return authorName - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getAuthorName() { - - if (authorName == null) { - authorName = JsonNullable.undefined(); - } - return authorName.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAuthorName() { + + if (authorName == null) { + authorName = JsonNullable.undefined(); + } + return authorName.orElse(null); + } @JsonProperty(JSON_PROPERTY_AUTHOR_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getAuthorName_JsonNullable() { return authorName; } - - @JsonProperty(JSON_PROPERTY_AUTHOR_NAME) - private void setAuthorName_JsonNullable(JsonNullable authorName) { + @JsonProperty(JSON_PROPERTY_AUTHOR_NAME)private void setAuthorName_JsonNullable(JsonNullable authorName) { this.authorName = authorName; } /** - * Creation date of the dashboard. - * + *

Creation date of the dashboard.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public Dashboard description(String description) { this.description = JsonNullable.of(description); return this; } /** - * Description of the dashboard. - * + *

Description of the dashboard.

* @return description - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getDescription() { - return description.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDescription_JsonNullable() { return description; } - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - public void setDescription_JsonNullable(JsonNullable description) { + @JsonProperty(JSON_PROPERTY_DESCRIPTION)public void setDescription_JsonNullable(JsonNullable description) { this.description = description; } - public void setDescription(String description) { this.description = JsonNullable.of(description); } /** - * ID of the dashboard. - * + *

ID of the dashboard.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public Dashboard isReadOnly(Boolean isReadOnly) { this.isReadOnly = isReadOnly; return this; } /** - * Whether this dashboard is read-only. If True, only the author and admins can make changes to - * it. Prefer using restricted_roles to manage write authorization. - * + *

Whether this dashboard is read-only. If True, only the author and admins can make changes to it. Prefer using restricted_roles to manage write authorization.

* @return isReadOnly * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsReadOnly() { - return isReadOnly; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsReadOnly() { + return isReadOnly; + } @Deprecated public void setIsReadOnly(Boolean isReadOnly) { this.isReadOnly = isReadOnly; } - public Dashboard layoutType(DashboardLayoutType layoutType) { this.layoutType = layoutType; this.unparsed |= !layoutType.isValid(); @@ -238,40 +232,37 @@ public Dashboard layoutType(DashboardLayoutType layoutType) { } /** - * Layout type of the dashboard. - * + *

Layout type of the dashboard.

* @return layoutType - */ - @JsonProperty(JSON_PROPERTY_LAYOUT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DashboardLayoutType getLayoutType() { - return layoutType; - } - + **/ + @JsonProperty(JSON_PROPERTY_LAYOUT_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DashboardLayoutType getLayoutType() { + return layoutType; + } public void setLayoutType(DashboardLayoutType layoutType) { if (!layoutType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.layoutType = layoutType; } /** - * Modification date of the dashboard. - * + *

Modification date of the dashboard.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public Dashboard notifyList(List notifyList) { this.notifyList = JsonNullable.>of(notifyList); return this; } - public Dashboard addNotifyListItem(String notifyListItem) { if (this.notifyList == null || !this.notifyList.isPresent()) { this.notifyList = JsonNullable.>of(new ArrayList<>()); @@ -285,31 +276,26 @@ public Dashboard addNotifyListItem(String notifyListItem) { } /** - * List of handles of users to notify when changes are made to this dashboard. - * + *

List of handles of users to notify when changes are made to this dashboard.

* @return notifyList - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getNotifyList() { - return notifyList.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getNotifyList() { + return notifyList.orElse(null); + } @JsonProperty(JSON_PROPERTY_NOTIFY_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getNotifyList_JsonNullable() { return notifyList; } - - @JsonProperty(JSON_PROPERTY_NOTIFY_LIST) - public void setNotifyList_JsonNullable(JsonNullable> notifyList) { + @JsonProperty(JSON_PROPERTY_NOTIFY_LIST)public void setNotifyList_JsonNullable(JsonNullable> notifyList) { this.notifyList = notifyList; } - public void setNotifyList(List notifyList) { this.notifyList = JsonNullable.>of(notifyList); } - public Dashboard reflowType(DashboardReflowType reflowType) { this.reflowType = reflowType; this.unparsed |= !reflowType.isValid(); @@ -317,31 +303,28 @@ public Dashboard reflowType(DashboardReflowType reflowType) { } /** - * Reflow type for a new dashboard layout dashboard. Set this only when layout - * type is 'ordered'. If set to 'fixed', the dashboard expects all widgets to have a layout, and - * if it's set to 'auto', widgets should not have layouts. - * + *

Reflow type for a new dashboard layout dashboard. Set this only when layout type is 'ordered'. + * If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto', + * widgets should not have layouts.

* @return reflowType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REFLOW_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardReflowType getReflowType() { - return reflowType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFLOW_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DashboardReflowType getReflowType() { + return reflowType; + } public void setReflowType(DashboardReflowType reflowType) { if (!reflowType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.reflowType = reflowType; } - public Dashboard restrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; return this; } - public Dashboard addRestrictedRolesItem(String restrictedRolesItem) { if (this.restrictedRoles == null) { this.restrictedRoles = new ArrayList<>(); @@ -351,34 +334,26 @@ public Dashboard addRestrictedRolesItem(String restrictedRolesItem) { } /** - * A list of role identifiers. Only the author and users associated with at least one of these - * roles can edit this dashboard. - * + *

A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard.

* @return restrictedRoles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRestrictedRoles() { - return restrictedRoles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRestrictedRoles() { + return restrictedRoles; + } public void setRestrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; } - - public Dashboard templateVariablePresets( - List templateVariablePresets) { - this.templateVariablePresets = - JsonNullable.>of(templateVariablePresets); + public Dashboard templateVariablePresets(List templateVariablePresets) { + this.templateVariablePresets = JsonNullable.>of(templateVariablePresets); return this; } - - public Dashboard addTemplateVariablePresetsItem( - DashboardTemplateVariablePreset templateVariablePresetsItem) { + public Dashboard addTemplateVariablePresetsItem(DashboardTemplateVariablePreset templateVariablePresetsItem) { if (this.templateVariablePresets == null || !this.templateVariablePresets.isPresent()) { - this.templateVariablePresets = - JsonNullable.>of(new ArrayList<>()); + this.templateVariablePresets = JsonNullable.>of(new ArrayList<>()); } try { this.templateVariablePresets.get().add(templateVariablePresetsItem); @@ -389,40 +364,30 @@ public Dashboard addTemplateVariablePresetsItem( } /** - * Array of template variables saved views. - * + *

Array of template variables saved views.

* @return templateVariablePresets - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getTemplateVariablePresets() { - return templateVariablePresets.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getTemplateVariablePresets() { + return templateVariablePresets.orElse(null); + } @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLE_PRESETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JsonNullable> - getTemplateVariablePresets_JsonNullable() { + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getTemplateVariablePresets_JsonNullable() { return templateVariablePresets; } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLE_PRESETS) - public void setTemplateVariablePresets_JsonNullable( - JsonNullable> templateVariablePresets) { + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLE_PRESETS)public void setTemplateVariablePresets_JsonNullable(JsonNullable> templateVariablePresets) { this.templateVariablePresets = templateVariablePresets; } - - public void setTemplateVariablePresets( - List templateVariablePresets) { - this.templateVariablePresets = - JsonNullable.>of(templateVariablePresets); + public void setTemplateVariablePresets(List templateVariablePresets) { + this.templateVariablePresets = JsonNullable.>of(templateVariablePresets); } - public Dashboard templateVariables(List templateVariables) { this.templateVariables = JsonNullable.>of(templateVariables); return this; } - public Dashboard addTemplateVariablesItem(DashboardTemplateVariable templateVariablesItem) { if (this.templateVariables == null || !this.templateVariables.isPresent()) { this.templateVariables = JsonNullable.>of(new ArrayList<>()); @@ -436,64 +401,56 @@ public Dashboard addTemplateVariablesItem(DashboardTemplateVariable templateVari } /** - * List of template variables for this dashboard. - * + *

List of template variables for this dashboard.

* @return templateVariables - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getTemplateVariables() { - return templateVariables.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getTemplateVariables() { + return templateVariables.orElse(null); + } @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getTemplateVariables_JsonNullable() { return templateVariables; } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) - public void setTemplateVariables_JsonNullable( - JsonNullable> templateVariables) { + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES)public void setTemplateVariables_JsonNullable(JsonNullable> templateVariables) { this.templateVariables = templateVariables; } - public void setTemplateVariables(List templateVariables) { this.templateVariables = JsonNullable.>of(templateVariables); } - public Dashboard title(String title) { this.title = title; return this; } /** - * Title of the dashboard. - * + *

Title of the dashboard.

* @return title - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - + **/ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } /** - * The URL of the dashboard. - * + *

The URL of the dashboard.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public Dashboard widgets(List widgets) { this.widgets = widgets; for (Widget item : widgets) { @@ -501,7 +458,6 @@ public Dashboard widgets(List widgets) { } return this; } - public Dashboard addWidgetsItem(Widget widgetsItem) { this.widgets.add(widgetsItem); this.unparsed |= widgetsItem.unparsed; @@ -509,21 +465,22 @@ public Dashboard addWidgetsItem(Widget widgetsItem) { } /** - * List of widgets to display on the dashboard. - * + *

List of widgets to display on the dashboard.

* @return widgets - */ - @JsonProperty(JSON_PROPERTY_WIDGETS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getWidgets() { - return widgets; - } - + **/ + @JsonProperty(JSON_PROPERTY_WIDGETS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getWidgets() { + return widgets; + } public void setWidgets(List widgets) { this.widgets = widgets; } - /** Return true if this Dashboard object is equal to o. */ + /** + * Return true if this Dashboard object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -533,43 +490,13 @@ public boolean equals(Object o) { return false; } Dashboard dashboard = (Dashboard) o; - return Objects.equals(this.authorHandle, dashboard.authorHandle) - && Objects.equals(this.authorName, dashboard.authorName) - && Objects.equals(this.createdAt, dashboard.createdAt) - && Objects.equals(this.description, dashboard.description) - && Objects.equals(this.id, dashboard.id) - && Objects.equals(this.isReadOnly, dashboard.isReadOnly) - && Objects.equals(this.layoutType, dashboard.layoutType) - && Objects.equals(this.modifiedAt, dashboard.modifiedAt) - && Objects.equals(this.notifyList, dashboard.notifyList) - && Objects.equals(this.reflowType, dashboard.reflowType) - && Objects.equals(this.restrictedRoles, dashboard.restrictedRoles) - && Objects.equals(this.templateVariablePresets, dashboard.templateVariablePresets) - && Objects.equals(this.templateVariables, dashboard.templateVariables) - && Objects.equals(this.title, dashboard.title) - && Objects.equals(this.url, dashboard.url) - && Objects.equals(this.widgets, dashboard.widgets); + return Objects.equals(this.authorHandle, dashboard.authorHandle) && Objects.equals(this.authorName, dashboard.authorName) && Objects.equals(this.createdAt, dashboard.createdAt) && Objects.equals(this.description, dashboard.description) && Objects.equals(this.id, dashboard.id) && Objects.equals(this.isReadOnly, dashboard.isReadOnly) && Objects.equals(this.layoutType, dashboard.layoutType) && Objects.equals(this.modifiedAt, dashboard.modifiedAt) && Objects.equals(this.notifyList, dashboard.notifyList) && Objects.equals(this.reflowType, dashboard.reflowType) && Objects.equals(this.restrictedRoles, dashboard.restrictedRoles) && Objects.equals(this.templateVariablePresets, dashboard.templateVariablePresets) && Objects.equals(this.templateVariables, dashboard.templateVariables) && Objects.equals(this.title, dashboard.title) && Objects.equals(this.url, dashboard.url) && Objects.equals(this.widgets, dashboard.widgets); } + @Override public int hashCode() { - return Objects.hash( - authorHandle, - authorName, - createdAt, - description, - id, - isReadOnly, - layoutType, - modifiedAt, - notifyList, - reflowType, - restrictedRoles, - templateVariablePresets, - templateVariables, - title, - url, - widgets); + return Objects.hash(authorHandle,authorName,createdAt,description,id,isReadOnly,layoutType,modifiedAt,notifyList,reflowType,restrictedRoles,templateVariablePresets,templateVariables,title,url,widgets); } @Override @@ -587,9 +514,7 @@ public String toString() { sb.append(" notifyList: ").append(toIndentedString(notifyList)).append("\n"); sb.append(" reflowType: ").append(toIndentedString(reflowType)).append("\n"); sb.append(" restrictedRoles: ").append(toIndentedString(restrictedRoles)).append("\n"); - sb.append(" templateVariablePresets: ") - .append(toIndentedString(templateVariablePresets)) - .append("\n"); + sb.append(" templateVariablePresets: ").append(toIndentedString(templateVariablePresets)).append("\n"); sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); @@ -599,7 +524,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardBulkActionData.java b/src/main/java/com/datadog/api/client/v1/model/DashboardBulkActionData.java index 09c1fd3a7c1..189f93d695e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardBulkActionData.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardBulkActionData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Dashboard bulk action request data. */ + +/** + *

Dashboard bulk action request data.

+ */ @JsonPropertyOrder({ DashboardBulkActionData.JSON_PROPERTY_ID, DashboardBulkActionData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardBulkActionData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public DashboardBulkActionData() {} @JsonCreator public DashboardBulkActionData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DashboardResourceType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)DashboardResourceType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public DashboardBulkActionData id(String id) { this.id = id; return this; } /** - * Dashboard resource ID. - * + *

Dashboard resource ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public DashboardBulkActionData type(DashboardResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public DashboardBulkActionData type(DashboardResourceType type) { } /** - * Dashboard resource type. - * + *

Dashboard resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DashboardResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DashboardResourceType getType() { + return type; + } public void setType(DashboardResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this DashboardBulkActionData object is equal to o. */ + /** + * Return true if this DashboardBulkActionData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +110,13 @@ public boolean equals(Object o) { return false; } DashboardBulkActionData dashboardBulkActionData = (DashboardBulkActionData) o; - return Objects.equals(this.id, dashboardBulkActionData.id) - && Objects.equals(this.type, dashboardBulkActionData.type); + return Objects.equals(this.id, dashboardBulkActionData.id) && Objects.equals(this.type, dashboardBulkActionData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -113,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardBulkDeleteRequest.java b/src/main/java/com/datadog/api/client/v1/model/DashboardBulkDeleteRequest.java index 057062fe138..2a0ebc5015f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardBulkDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardBulkDeleteRequest.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Dashboard bulk delete request body. */ -@JsonPropertyOrder({DashboardBulkDeleteRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Dashboard bulk delete request body.

+ */ +@JsonPropertyOrder({ + DashboardBulkDeleteRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardBulkDeleteRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public DashboardBulkDeleteRequest() {} @JsonCreator public DashboardBulkDeleteRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public DashboardBulkDeleteRequest data(List data) { this.data = data; for (DashboardBulkActionData item : data) { @@ -40,7 +57,6 @@ public DashboardBulkDeleteRequest data(List data) { } return this; } - public DashboardBulkDeleteRequest addDataItem(DashboardBulkActionData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -48,21 +64,22 @@ public DashboardBulkDeleteRequest addDataItem(DashboardBulkActionData dataItem) } /** - * List of dashboard bulk action request data objects. - * + *

List of dashboard bulk action request data objects.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this DashboardBulkDeleteRequest object is equal to o. */ + /** + * Return true if this DashboardBulkDeleteRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, dashboardBulkDeleteRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardDeleteResponse.java b/src/main/java/com/datadog/api/client/v1/model/DashboardDeleteResponse.java index 6885d83a139..7ec905c56b7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardDeleteResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardDeleteResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response from the delete dashboard call. */ -@JsonPropertyOrder({DashboardDeleteResponse.JSON_PROPERTY_DELETED_DASHBOARD_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response from the delete dashboard call.

+ */ +@JsonPropertyOrder({ + DashboardDeleteResponse.JSON_PROPERTY_DELETED_DASHBOARD_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardDeleteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DELETED_DASHBOARD_ID = "deleted_dashboard_id"; private String deletedDashboardId; @@ -27,22 +49,23 @@ public DashboardDeleteResponse deletedDashboardId(String deletedDashboardId) { } /** - * ID of the deleted dashboard. - * + *

ID of the deleted dashboard.

* @return deletedDashboardId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED_DASHBOARD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDeletedDashboardId() { - return deletedDashboardId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_DASHBOARD_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDeletedDashboardId() { + return deletedDashboardId; + } public void setDeletedDashboardId(String deletedDashboardId) { this.deletedDashboardId = deletedDashboardId; } - /** Return true if this DashboardDeleteResponse object is equal to o. */ + /** + * Return true if this DashboardDeleteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.deletedDashboardId, dashboardDeleteResponse.deletedDashboardId); } + @Override public int hashCode() { return Objects.hash(deletedDashboardId); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardLayoutType.java b/src/main/java/com/datadog/api/client/v1/model/DashboardLayoutType.java index cc67562b49c..c363378ac89 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardLayoutType.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardLayoutType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Layout type of the dashboard. */ +/** + *

Layout type of the dashboard.

+ */ @JsonSerialize(using = DashboardLayoutType.DashboardLayoutTypeSerializer.class) public class DashboardLayoutType { public static final DashboardLayoutType ORDERED = new DashboardLayoutType("ordered"); public static final DashboardLayoutType FREE = new DashboardLayoutType("free"); - private static final Set allowedValues = - new HashSet(Arrays.asList("ordered", "free")); + private static final Set allowedValues = new HashSet(Arrays.asList("ordered", "free")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class DashboardLayoutTypeSerializer extends StdSerializer { - public DashboardLayoutTypeSerializer(Class t) { - super(t); - } - - public DashboardLayoutTypeSerializer() { - this(null); - } - - @Override - public void serialize( - DashboardLayoutType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public DashboardLayoutTypeSerializer(Class t) { + super(t); + } + + public DashboardLayoutTypeSerializer() { + this(null); + } + + @Override + public void serialize(DashboardLayoutType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DashboardLayoutType object is equal to o. */ + /** + * Return true if this DashboardLayoutType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardList.java b/src/main/java/com/datadog/api/client/v1/model/DashboardList.java index 8003b5aba76..b5292de34d6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardList.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardList.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Your Datadog Dashboards. */ +/** + *

Your Datadog Dashboards.

+ */ @JsonPropertyOrder({ DashboardList.JSON_PROPERTY_AUTHOR, DashboardList.JSON_PROPERTY_CREATED, @@ -27,15 +43,14 @@ DashboardList.JSON_PROPERTY_NAME, DashboardList.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardList { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHOR = "author"; private Creator author; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -49,7 +64,6 @@ public class DashboardList { private Boolean isFavorite; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; @@ -62,115 +76,116 @@ public class DashboardList { public DashboardList() {} @JsonCreator - public DashboardList(@JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + public DashboardList( + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return author - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getAuthor() { - return author; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getAuthor() { + return author; + } /** - * Date of creation of the dashboard list. - * + *

Date of creation of the dashboard list.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * The number of dashboards in the list. - * + *

The number of dashboards in the list.

* @return dashboardCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARD_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDashboardCount() { - return dashboardCount; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARD_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDashboardCount() { + return dashboardCount; + } /** - * The ID of the dashboard list. - * + *

The ID of the dashboard list.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } /** - * Whether or not the list is in the favorites. - * + *

Whether or not the list is in the favorites.

* @return isFavorite - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_FAVORITE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsFavorite() { - return isFavorite; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsFavorite() { + return isFavorite; + } /** - * Date of last edition of the dashboard list. - * + *

Date of last edition of the dashboard list.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } public DashboardList name(String name) { this.name = name; return this; } /** - * The name of the dashboard list. - * + *

The name of the dashboard list.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } /** - * The type of dashboard list. - * + *

The type of dashboard list.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } - /** Return true if this DashboardList object is equal to o. */ + /** + * Return true if this DashboardList object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -180,19 +195,13 @@ public boolean equals(Object o) { return false; } DashboardList dashboardList = (DashboardList) o; - return Objects.equals(this.author, dashboardList.author) - && Objects.equals(this.created, dashboardList.created) - && Objects.equals(this.dashboardCount, dashboardList.dashboardCount) - && Objects.equals(this.id, dashboardList.id) - && Objects.equals(this.isFavorite, dashboardList.isFavorite) - && Objects.equals(this.modified, dashboardList.modified) - && Objects.equals(this.name, dashboardList.name) - && Objects.equals(this.type, dashboardList.type); + return Objects.equals(this.author, dashboardList.author) && Objects.equals(this.created, dashboardList.created) && Objects.equals(this.dashboardCount, dashboardList.dashboardCount) && Objects.equals(this.id, dashboardList.id) && Objects.equals(this.isFavorite, dashboardList.isFavorite) && Objects.equals(this.modified, dashboardList.modified) && Objects.equals(this.name, dashboardList.name) && Objects.equals(this.type, dashboardList.type); } + @Override public int hashCode() { - return Objects.hash(author, created, dashboardCount, id, isFavorite, modified, name, type); + return Objects.hash(author,created,dashboardCount,id,isFavorite,modified,name,type); } @Override @@ -212,7 +221,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardListDeleteResponse.java b/src/main/java/com/datadog/api/client/v1/model/DashboardListDeleteResponse.java index 81fe5c7a940..2b26dfec551 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardListDeleteResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardListDeleteResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Deleted dashboard details. */ -@JsonPropertyOrder({DashboardListDeleteResponse.JSON_PROPERTY_DELETED_DASHBOARD_LIST_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Deleted dashboard details.

+ */ +@JsonPropertyOrder({ + DashboardListDeleteResponse.JSON_PROPERTY_DELETED_DASHBOARD_LIST_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListDeleteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DELETED_DASHBOARD_LIST_ID = "deleted_dashboard_list_id"; private Long deletedDashboardListId; @@ -27,22 +49,23 @@ public DashboardListDeleteResponse deletedDashboardListId(Long deletedDashboardL } /** - * ID of the deleted dashboard list. - * + *

ID of the deleted dashboard list.

* @return deletedDashboardListId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED_DASHBOARD_LIST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDeletedDashboardListId() { - return deletedDashboardListId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_DASHBOARD_LIST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDeletedDashboardListId() { + return deletedDashboardListId; + } public void setDeletedDashboardListId(Long deletedDashboardListId) { this.deletedDashboardListId = deletedDashboardListId; } - /** Return true if this DashboardListDeleteResponse object is equal to o. */ + /** + * Return true if this DashboardListDeleteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,10 +75,10 @@ public boolean equals(Object o) { return false; } DashboardListDeleteResponse dashboardListDeleteResponse = (DashboardListDeleteResponse) o; - return Objects.equals( - this.deletedDashboardListId, dashboardListDeleteResponse.deletedDashboardListId); + return Objects.equals(this.deletedDashboardListId, dashboardListDeleteResponse.deletedDashboardListId); } + @Override public int hashCode() { return Objects.hash(deletedDashboardListId); @@ -65,15 +88,14 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardListDeleteResponse {\n"); - sb.append(" deletedDashboardListId: ") - .append(toIndentedString(deletedDashboardListId)) - .append("\n"); + sb.append(" deletedDashboardListId: ").append(toIndentedString(deletedDashboardListId)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardListListResponse.java b/src/main/java/com/datadog/api/client/v1/model/DashboardListListResponse.java index 2218607afaa..01c01c6a82c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardListListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardListListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Information on your dashboard lists. */ -@JsonPropertyOrder({DashboardListListResponse.JSON_PROPERTY_DASHBOARD_LISTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Information on your dashboard lists.

+ */ +@JsonPropertyOrder({ + DashboardListListResponse.JSON_PROPERTY_DASHBOARD_LISTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARD_LISTS = "dashboard_lists"; private List dashboardLists = null; @@ -30,7 +50,6 @@ public DashboardListListResponse dashboardLists(List dashboardLis } return this; } - public DashboardListListResponse addDashboardListsItem(DashboardList dashboardListsItem) { if (this.dashboardLists == null) { this.dashboardLists = new ArrayList<>(); @@ -41,22 +60,23 @@ public DashboardListListResponse addDashboardListsItem(DashboardList dashboardLi } /** - * List of all your dashboard lists. - * + *

List of all your dashboard lists.

* @return dashboardLists - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARD_LISTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDashboardLists() { - return dashboardLists; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARD_LISTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDashboardLists() { + return dashboardLists; + } public void setDashboardLists(List dashboardLists) { this.dashboardLists = dashboardLists; } - /** Return true if this DashboardListListResponse object is equal to o. */ + /** + * Return true if this DashboardListListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.dashboardLists, dashboardListListResponse.dashboardLists); } + @Override public int hashCode() { return Objects.hash(dashboardLists); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardReflowType.java b/src/main/java/com/datadog/api/client/v1/model/DashboardReflowType.java index 6ff9b1cb84a..26bfa60a1f7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardReflowType.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardReflowType.java @@ -6,23 +6,45 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Reflow type for a new dashboard layout dashboard. Set this only when layout type - * is 'ordered'. If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's - * set to 'auto', widgets should not have layouts. + *

Reflow type for a new dashboard layout dashboard. Set this only when layout type is 'ordered'. + * If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto', + * widgets should not have layouts.

*/ @JsonSerialize(using = DashboardReflowType.DashboardReflowTypeSerializer.class) public class DashboardReflowType { @@ -30,8 +52,7 @@ public class DashboardReflowType { public static final DashboardReflowType AUTO = new DashboardReflowType("auto"); public static final DashboardReflowType FIXED = new DashboardReflowType("fixed"); - private static final Set allowedValues = - new HashSet(Arrays.asList("auto", "fixed")); + private static final Set allowedValues = new HashSet(Arrays.asList("auto", "fixed")); private String value; @@ -44,20 +65,18 @@ public boolean isValid() { } public static class DashboardReflowTypeSerializer extends StdSerializer { - public DashboardReflowTypeSerializer(Class t) { - super(t); - } - - public DashboardReflowTypeSerializer() { - this(null); - } - - @Override - public void serialize( - DashboardReflowType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public DashboardReflowTypeSerializer(Class t) { + super(t); + } + + public DashboardReflowTypeSerializer() { + this(null); + } + + @Override + public void serialize(DashboardReflowType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DashboardReflowType object is equal to o. */ + /** + * Return true if this DashboardReflowType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardResourceType.java b/src/main/java/com/datadog/api/client/v1/model/DashboardResourceType.java index 8a9146ac5e3..2e9f9b59b2b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardResourceType.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardResourceType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Dashboard resource type. */ +/** + *

Dashboard resource type.

+ */ @JsonSerialize(using = DashboardResourceType.DashboardResourceTypeSerializer.class) public class DashboardResourceType { @@ -38,20 +62,18 @@ public boolean isValid() { } public static class DashboardResourceTypeSerializer extends StdSerializer { - public DashboardResourceTypeSerializer(Class t) { - super(t); - } - - public DashboardResourceTypeSerializer() { - this(null); - } - - @Override - public void serialize( - DashboardResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public DashboardResourceTypeSerializer(Class t) { + super(t); + } + + public DashboardResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize(DashboardResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DashboardResourceType object is equal to o. */ + /** + * Return true if this DashboardResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardRestoreRequest.java b/src/main/java/com/datadog/api/client/v1/model/DashboardRestoreRequest.java index a4f1474cbf9..1620654b0f7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardRestoreRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardRestoreRequest.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Dashboard restore request body. */ -@JsonPropertyOrder({DashboardRestoreRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Dashboard restore request body.

+ */ +@JsonPropertyOrder({ + DashboardRestoreRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardRestoreRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public DashboardRestoreRequest() {} @JsonCreator public DashboardRestoreRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public DashboardRestoreRequest data(List data) { this.data = data; for (DashboardBulkActionData item : data) { @@ -40,7 +57,6 @@ public DashboardRestoreRequest data(List data) { } return this; } - public DashboardRestoreRequest addDataItem(DashboardBulkActionData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -48,21 +64,22 @@ public DashboardRestoreRequest addDataItem(DashboardBulkActionData dataItem) { } /** - * List of dashboard bulk action request data objects. - * + *

List of dashboard bulk action request data objects.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this DashboardRestoreRequest object is equal to o. */ + /** + * Return true if this DashboardRestoreRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, dashboardRestoreRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardSummary.java b/src/main/java/com/datadog/api/client/v1/model/DashboardSummary.java index 24e95b34cac..ae3e53d8d58 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardSummary.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardSummary.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Dashboard summary response. */ -@JsonPropertyOrder({DashboardSummary.JSON_PROPERTY_DASHBOARDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Dashboard summary response.

+ */ +@JsonPropertyOrder({ + DashboardSummary.JSON_PROPERTY_DASHBOARDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardSummary { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARDS = "dashboards"; private List dashboards = null; @@ -30,7 +50,6 @@ public DashboardSummary dashboards(List dashboards) } return this; } - public DashboardSummary addDashboardsItem(DashboardSummaryDefinition dashboardsItem) { if (this.dashboards == null) { this.dashboards = new ArrayList<>(); @@ -41,22 +60,23 @@ public DashboardSummary addDashboardsItem(DashboardSummaryDefinition dashboardsI } /** - * List of dashboard definitions. - * + *

List of dashboard definitions.

* @return dashboards - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDashboards() { - return dashboards; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDashboards() { + return dashboards; + } public void setDashboards(List dashboards) { this.dashboards = dashboards; } - /** Return true if this DashboardSummary object is equal to o. */ + /** + * Return true if this DashboardSummary object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.dashboards, dashboardSummary.dashboards); } + @Override public int hashCode() { return Objects.hash(dashboards); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardSummaryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/DashboardSummaryDefinition.java index d5bf17df404..892fe52d2e3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardSummaryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardSummaryDefinition.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Dashboard definition. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Dashboard definition.

+ */ @JsonPropertyOrder({ DashboardSummaryDefinition.JSON_PROPERTY_AUTHOR_HANDLE, DashboardSummaryDefinition.JSON_PROPERTY_CREATED_AT, @@ -28,15 +44,14 @@ DashboardSummaryDefinition.JSON_PROPERTY_TITLE, DashboardSummaryDefinition.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardSummaryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHOR_HANDLE = "author_handle"; private String authorHandle; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; @@ -53,7 +68,6 @@ public class DashboardSummaryDefinition { private DashboardLayoutType layoutType; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -69,116 +83,102 @@ public DashboardSummaryDefinition authorHandle(String authorHandle) { } /** - * Identifier of the dashboard author. - * + *

Identifier of the dashboard author.

* @return authorHandle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAuthorHandle() { - return authorHandle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthorHandle() { + return authorHandle; + } public void setAuthorHandle(String authorHandle) { this.authorHandle = authorHandle; } - public DashboardSummaryDefinition createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } /** - * Creation date of the dashboard. - * + *

Creation date of the dashboard.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public DashboardSummaryDefinition description(String description) { this.description = JsonNullable.of(description); return this; } /** - * Description of the dashboard. - * + *

Description of the dashboard.

* @return description - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getDescription() { - return description.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDescription_JsonNullable() { return description; } - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - public void setDescription_JsonNullable(JsonNullable description) { + @JsonProperty(JSON_PROPERTY_DESCRIPTION)public void setDescription_JsonNullable(JsonNullable description) { this.description = description; } - public void setDescription(String description) { this.description = JsonNullable.of(description); } - public DashboardSummaryDefinition id(String id) { this.id = id; return this; } /** - * Dashboard identifier. - * + *

Dashboard identifier.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public DashboardSummaryDefinition isReadOnly(Boolean isReadOnly) { this.isReadOnly = isReadOnly; return this; } /** - * Whether this dashboard is read-only. If True, only the author and admins can make changes to - * it. - * + *

Whether this dashboard is read-only. If True, only the author and admins can make changes to it.

* @return isReadOnly - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsReadOnly() { - return isReadOnly; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsReadOnly() { + return isReadOnly; + } public void setIsReadOnly(Boolean isReadOnly) { this.isReadOnly = isReadOnly; } - public DashboardSummaryDefinition layoutType(DashboardLayoutType layoutType) { this.layoutType = layoutType; this.unparsed |= !layoutType.isValid(); @@ -186,88 +186,83 @@ public DashboardSummaryDefinition layoutType(DashboardLayoutType layoutType) { } /** - * Layout type of the dashboard. - * + *

Layout type of the dashboard.

* @return layoutType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAYOUT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardLayoutType getLayoutType() { - return layoutType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAYOUT_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DashboardLayoutType getLayoutType() { + return layoutType; + } public void setLayoutType(DashboardLayoutType layoutType) { if (!layoutType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.layoutType = layoutType; } - public DashboardSummaryDefinition modifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; return this; } /** - * Modification date of the dashboard. - * + *

Modification date of the dashboard.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public void setModifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; } - public DashboardSummaryDefinition title(String title) { this.title = title; return this; } /** - * Title of the dashboard. - * + *

Title of the dashboard.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public DashboardSummaryDefinition url(String url) { this.url = url; return this; } /** - * URL of the dashboard. - * + *

URL of the dashboard.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this DashboardSummaryDefinition object is equal to o. */ + /** + * Return true if this DashboardSummaryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -277,21 +272,13 @@ public boolean equals(Object o) { return false; } DashboardSummaryDefinition dashboardSummaryDefinition = (DashboardSummaryDefinition) o; - return Objects.equals(this.authorHandle, dashboardSummaryDefinition.authorHandle) - && Objects.equals(this.createdAt, dashboardSummaryDefinition.createdAt) - && Objects.equals(this.description, dashboardSummaryDefinition.description) - && Objects.equals(this.id, dashboardSummaryDefinition.id) - && Objects.equals(this.isReadOnly, dashboardSummaryDefinition.isReadOnly) - && Objects.equals(this.layoutType, dashboardSummaryDefinition.layoutType) - && Objects.equals(this.modifiedAt, dashboardSummaryDefinition.modifiedAt) - && Objects.equals(this.title, dashboardSummaryDefinition.title) - && Objects.equals(this.url, dashboardSummaryDefinition.url); + return Objects.equals(this.authorHandle, dashboardSummaryDefinition.authorHandle) && Objects.equals(this.createdAt, dashboardSummaryDefinition.createdAt) && Objects.equals(this.description, dashboardSummaryDefinition.description) && Objects.equals(this.id, dashboardSummaryDefinition.id) && Objects.equals(this.isReadOnly, dashboardSummaryDefinition.isReadOnly) && Objects.equals(this.layoutType, dashboardSummaryDefinition.layoutType) && Objects.equals(this.modifiedAt, dashboardSummaryDefinition.modifiedAt) && Objects.equals(this.title, dashboardSummaryDefinition.title) && Objects.equals(this.url, dashboardSummaryDefinition.url); } + @Override public int hashCode() { - return Objects.hash( - authorHandle, createdAt, description, id, isReadOnly, layoutType, modifiedAt, title, url); + return Objects.hash(authorHandle,createdAt,description,id,isReadOnly,layoutType,modifiedAt,title,url); } @Override @@ -312,7 +299,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariable.java b/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariable.java index b3364dea27b..d384d3a4cc0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariable.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariable.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Template variable. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Template variable.

+ */ @JsonPropertyOrder({ DashboardTemplateVariable.JSON_PROPERTY_AVAILABLE_VALUES, DashboardTemplateVariable.JSON_PROPERTY_DEFAULT, @@ -24,10 +40,10 @@ DashboardTemplateVariable.JSON_PROPERTY_NAME, DashboardTemplateVariable.JSON_PROPERTY_PREFIX }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardTemplateVariable { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AVAILABLE_VALUES = "available_values"; private JsonNullable> availableValues = JsonNullable.>undefined(); @@ -47,15 +63,13 @@ public DashboardTemplateVariable() {} @JsonCreator public DashboardTemplateVariable( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public DashboardTemplateVariable availableValues(List availableValues) { this.availableValues = JsonNullable.>of(availableValues); return this; } - public DashboardTemplateVariable addAvailableValuesItem(String availableValuesItem) { if (this.availableValues == null || !this.availableValues.isPresent()) { this.availableValues = JsonNullable.>of(new ArrayList<>()); @@ -69,71 +83,59 @@ public DashboardTemplateVariable addAvailableValuesItem(String availableValuesIt } /** - * The list of values that the template variable drop-down is limited to. - * + *

The list of values that the template variable drop-down is limited to.

* @return availableValues - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getAvailableValues() { - return availableValues.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getAvailableValues() { + return availableValues.orElse(null); + } @JsonProperty(JSON_PROPERTY_AVAILABLE_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getAvailableValues_JsonNullable() { return availableValues; } - - @JsonProperty(JSON_PROPERTY_AVAILABLE_VALUES) - public void setAvailableValues_JsonNullable(JsonNullable> availableValues) { + @JsonProperty(JSON_PROPERTY_AVAILABLE_VALUES)public void setAvailableValues_JsonNullable(JsonNullable> availableValues) { this.availableValues = availableValues; } - public void setAvailableValues(List availableValues) { this.availableValues = JsonNullable.>of(availableValues); } - public DashboardTemplateVariable _default(String _default) { this._default = JsonNullable.of(_default); return this; } /** - * (deprecated) The default value for the template variable on dashboard load. Cannot be used in - * conjunction with defaults. - * + *

(deprecated) The default value for the template variable on dashboard load. Cannot be used in conjunction with defaults.

* @return _default * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonIgnore - public String getDefault() { - return _default.orElse(null); - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + public String getDefault() { + return _default.orElse(null); + } @Deprecated @JsonProperty(JSON_PROPERTY_DEFAULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDefault_JsonNullable() { return _default; } - - @JsonProperty(JSON_PROPERTY_DEFAULT) - public void setDefault_JsonNullable(JsonNullable _default) { + @JsonProperty(JSON_PROPERTY_DEFAULT)public void setDefault_JsonNullable(JsonNullable _default) { this._default = _default; } - public void setDefault(String _default) { this._default = JsonNullable.of(_default); } - public DashboardTemplateVariable defaults(List defaults) { this.defaults = defaults; return this; } - public DashboardTemplateVariable addDefaultsItem(String defaultsItem) { if (this.defaults == null) { this.defaults = new ArrayList<>(); @@ -143,76 +145,67 @@ public DashboardTemplateVariable addDefaultsItem(String defaultsItem) { } /** - * One or many default values for template variables on load. If more than one default is - * specified, they will be unioned together with OR. Cannot be used in conjunction - * with default. - * + *

One or many default values for template variables on load. If more than one default is specified, they will be unioned together with OR. Cannot be used in conjunction with default.

* @return defaults - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEFAULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDefaults() { - return defaults; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDefaults() { + return defaults; + } public void setDefaults(List defaults) { this.defaults = defaults; } - public DashboardTemplateVariable name(String name) { this.name = name; return this; } /** - * The name of the variable. - * + *

The name of the variable.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public DashboardTemplateVariable prefix(String prefix) { this.prefix = JsonNullable.of(prefix); return this; } /** - * The tag prefix associated with the variable. Only tags with this prefix appear in the variable - * drop-down. - * + *

The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.

* @return prefix - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getPrefix() { - return prefix.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrefix() { + return prefix.orElse(null); + } @JsonProperty(JSON_PROPERTY_PREFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPrefix_JsonNullable() { return prefix; } - - @JsonProperty(JSON_PROPERTY_PREFIX) - public void setPrefix_JsonNullable(JsonNullable prefix) { + @JsonProperty(JSON_PROPERTY_PREFIX)public void setPrefix_JsonNullable(JsonNullable prefix) { this.prefix = prefix; } - public void setPrefix(String prefix) { this.prefix = JsonNullable.of(prefix); } - /** Return true if this DashboardTemplateVariable object is equal to o. */ + /** + * Return true if this DashboardTemplateVariable object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -222,16 +215,13 @@ public boolean equals(Object o) { return false; } DashboardTemplateVariable dashboardTemplateVariable = (DashboardTemplateVariable) o; - return Objects.equals(this.availableValues, dashboardTemplateVariable.availableValues) - && Objects.equals(this._default, dashboardTemplateVariable._default) - && Objects.equals(this.defaults, dashboardTemplateVariable.defaults) - && Objects.equals(this.name, dashboardTemplateVariable.name) - && Objects.equals(this.prefix, dashboardTemplateVariable.prefix); + return Objects.equals(this.availableValues, dashboardTemplateVariable.availableValues) && Objects.equals(this._default, dashboardTemplateVariable._default) && Objects.equals(this.defaults, dashboardTemplateVariable.defaults) && Objects.equals(this.name, dashboardTemplateVariable.name) && Objects.equals(this.prefix, dashboardTemplateVariable.prefix); } + @Override public int hashCode() { - return Objects.hash(availableValues, _default, defaults, name, prefix); + return Objects.hash(availableValues,_default,defaults,name,prefix); } @Override @@ -248,7 +238,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePreset.java b/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePreset.java index 030dc81a247..b84c4995ee1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePreset.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePreset.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Template variables saved views. */ +/** + *

Template variables saved views.

+ */ @JsonPropertyOrder({ DashboardTemplateVariablePreset.JSON_PROPERTY_NAME, DashboardTemplateVariablePreset.JSON_PROPERTY_TEMPLATE_VARIABLES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardTemplateVariablePreset { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -35,32 +53,27 @@ public DashboardTemplateVariablePreset name(String name) { } /** - * The name of the variable. - * + *

The name of the variable.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public DashboardTemplateVariablePreset templateVariables( - List templateVariables) { + public DashboardTemplateVariablePreset templateVariables(List templateVariables) { this.templateVariables = templateVariables; for (DashboardTemplateVariablePresetValue item : templateVariables) { this.unparsed |= item.unparsed; } return this; } - - public DashboardTemplateVariablePreset addTemplateVariablesItem( - DashboardTemplateVariablePresetValue templateVariablesItem) { + public DashboardTemplateVariablePreset addTemplateVariablesItem(DashboardTemplateVariablePresetValue templateVariablesItem) { if (this.templateVariables == null) { this.templateVariables = new ArrayList<>(); } @@ -70,22 +83,23 @@ public DashboardTemplateVariablePreset addTemplateVariablesItem( } /** - * List of variables. - * + *

List of variables.

* @return templateVariables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTemplateVariables() { - return templateVariables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTemplateVariables() { + return templateVariables; + } public void setTemplateVariables(List templateVariables) { this.templateVariables = templateVariables; } - /** Return true if this DashboardTemplateVariablePreset object is equal to o. */ + /** + * Return true if this DashboardTemplateVariablePreset object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,16 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardTemplateVariablePreset dashboardTemplateVariablePreset = - (DashboardTemplateVariablePreset) o; - return Objects.equals(this.name, dashboardTemplateVariablePreset.name) - && Objects.equals( - this.templateVariables, dashboardTemplateVariablePreset.templateVariables); + DashboardTemplateVariablePreset dashboardTemplateVariablePreset = (DashboardTemplateVariablePreset) o; + return Objects.equals(this.name, dashboardTemplateVariablePreset.name) && Objects.equals(this.templateVariables, dashboardTemplateVariablePreset.templateVariables); } + @Override public int hashCode() { - return Objects.hash(name, templateVariables); + return Objects.hash(name,templateVariables); } @Override @@ -117,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePresetValue.java b/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePresetValue.java index 9d4df1c23d5..2b43debdaa1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePresetValue.java +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardTemplateVariablePresetValue.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Template variables saved views. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Template variables saved views.

+ */ @JsonPropertyOrder({ DashboardTemplateVariablePresetValue.JSON_PROPERTY_NAME, DashboardTemplateVariablePresetValue.JSON_PROPERTY_VALUE, DashboardTemplateVariablePresetValue.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardTemplateVariablePresetValue { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -39,51 +57,45 @@ public DashboardTemplateVariablePresetValue name(String name) { } /** - * The name of the variable. - * + *

The name of the variable.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public DashboardTemplateVariablePresetValue value(String value) { this.value = value; return this; } /** - * (deprecated) The value of the template variable within the saved view. Cannot be used in - * conjunction with values. - * + *

(deprecated) The value of the template variable within the saved view. Cannot be used in conjunction with values.

* @return value * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } @Deprecated public void setValue(String value) { this.value = value; } - public DashboardTemplateVariablePresetValue values(List values) { this.values = values; return this; } - public DashboardTemplateVariablePresetValue addValuesItem(String valuesItem) { if (this.values == null) { this.values = new ArrayList<>(); @@ -93,24 +105,23 @@ public DashboardTemplateVariablePresetValue addValuesItem(String valuesItem) { } /** - * One or many template variable values within the saved view, which will be unioned together - * using OR if more than one is specified. Cannot be used in conjunction with - * value. - * + *

One or many template variable values within the saved view, which will be unioned together using OR if more than one is specified. Cannot be used in conjunction with value.

* @return values - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getValues() { - return values; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getValues() { + return values; + } public void setValues(List values) { this.values = values; } - /** Return true if this DashboardTemplateVariablePresetValue object is equal to o. */ + /** + * Return true if this DashboardTemplateVariablePresetValue object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,16 +130,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardTemplateVariablePresetValue dashboardTemplateVariablePresetValue = - (DashboardTemplateVariablePresetValue) o; - return Objects.equals(this.name, dashboardTemplateVariablePresetValue.name) - && Objects.equals(this.value, dashboardTemplateVariablePresetValue.value) - && Objects.equals(this.values, dashboardTemplateVariablePresetValue.values); + DashboardTemplateVariablePresetValue dashboardTemplateVariablePresetValue = (DashboardTemplateVariablePresetValue) o; + return Objects.equals(this.name, dashboardTemplateVariablePresetValue.name) && Objects.equals(this.value, dashboardTemplateVariablePresetValue.value) && Objects.equals(this.values, dashboardTemplateVariablePresetValue.values); } + @Override public int hashCode() { - return Objects.hash(name, value, values); + return Objects.hash(name,value,values); } @Override @@ -143,7 +152,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DeletedMonitor.java b/src/main/java/com/datadog/api/client/v1/model/DeletedMonitor.java index d9606218cee..f0e47f3088a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DeletedMonitor.java +++ b/src/main/java/com/datadog/api/client/v1/model/DeletedMonitor.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response from the delete monitor call. */ -@JsonPropertyOrder({DeletedMonitor.JSON_PROPERTY_DELETED_MONITOR_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response from the delete monitor call.

+ */ +@JsonPropertyOrder({ + DeletedMonitor.JSON_PROPERTY_DELETED_MONITOR_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DeletedMonitor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DELETED_MONITOR_ID = "deleted_monitor_id"; private Long deletedMonitorId; @@ -27,22 +49,23 @@ public DeletedMonitor deletedMonitorId(Long deletedMonitorId) { } /** - * ID of the deleted monitor. - * + *

ID of the deleted monitor.

* @return deletedMonitorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDeletedMonitorId() { - return deletedMonitorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_MONITOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDeletedMonitorId() { + return deletedMonitorId; + } public void setDeletedMonitorId(Long deletedMonitorId) { this.deletedMonitorId = deletedMonitorId; } - /** Return true if this DeletedMonitor object is equal to o. */ + /** + * Return true if this DeletedMonitor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.deletedMonitorId, deletedMonitor.deletedMonitorId); } + @Override public int hashCode() { return Objects.hash(deletedMonitorId); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionPointItem.java b/src/main/java/com/datadog/api/client/v1/model/DistributionPointItem.java index bf1a993de93..b6d7a7ee016 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionPointItem.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionPointItem.java @@ -6,265 +6,259 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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.List; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = DistributionPointItem.DistributionPointItemDeserializer.class) @JsonSerialize(using = DistributionPointItem.DistributionPointItemSerializer.class) public class DistributionPointItem extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(DistributionPointItem.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class DistributionPointItemSerializer extends StdSerializer { - public DistributionPointItemSerializer(Class t) { - super(t); - } + private static final Logger log = Logger.getLogger(DistributionPointItem.class.getName()); - public DistributionPointItemSerializer() { - this(null); - } + @JsonIgnore + public boolean unparsed = false; - @Override - public void serialize( - DistributionPointItem value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class DistributionPointItemSerializer extends StdSerializer { + public DistributionPointItemSerializer(Class t) { + super(t); + } - public static class DistributionPointItemDeserializer - extends StdDeserializer { - public DistributionPointItemDeserializer() { - this(DistributionPointItem.class); - } + public DistributionPointItemSerializer() { + this(null); + } - public DistributionPointItemDeserializer(Class vc) { - super(vc); + @Override + public void serialize(DistributionPointItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public DistributionPointItem 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 Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class DistributionPointItemDeserializer extends StdDeserializer { + public DistributionPointItemDeserializer() { + this(DistributionPointItem.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + public DistributionPointItemDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } - // deserialize List - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (List.class.equals(Integer.class) - || List.class.equals(Long.class) - || List.class.equals(Float.class) - || List.class.equals(Double.class) - || List.class.equals(Boolean.class) - || List.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((List.class.equals(Integer.class) || List.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((List.class.equals(Float.class) || List.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (List.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (List.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public DistributionPointItem 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 Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + // deserialize List + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (List.class.equals(Integer.class) || List.class.equals(Long.class) || List.class.equals(Float.class) || List.class.equals(Double.class) || List.class.equals(Boolean.class) || List.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((List.class.equals(Integer.class) || List.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((List.class.equals(Float.class) || List.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (List.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (List.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(List.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'List'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'List'", e); + } + + DistributionPointItem ret = new DistributionPointItem(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(List.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'List'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public DistributionPointItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "DistributionPointItem cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'List'", e); - } - - DistributionPointItem ret = new DistributionPointItem(); - 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 DistributionPointItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "DistributionPointItem cannot be null"); } - } - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - public DistributionPointItem() { - super("oneOf", Boolean.FALSE); - } - - public DistributionPointItem(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + public DistributionPointItem() { + super("oneOf", Boolean.FALSE); + } + public DistributionPointItem(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public DistributionPointItem(List o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - public DistributionPointItem(List o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("Double", new GenericType() { + }); + schemas.put("List", new GenericType>() { + }); + JSON.registerDescendants(DistributionPointItem.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("Double", new GenericType() {}); - schemas.put("List", new GenericType>() {}); - JSON.registerDescendants(DistributionPointItem.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return DistributionPointItem.schemas; + } - @Override - public Map getSchemas() { - return DistributionPointItem.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Double, List<Double> + * + * 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(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(List.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Double, List<Double> - * - *

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(Double.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(List.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 Double, List"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * Double, List<Double> + * + * @return The actual instance (Double, List<Double>) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be Double, List"); - } - - /** - * Get the actual instance, which can be the following: Double, List<Double> - * - * @return The actual instance (Double, List<Double>) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } - /** - * Get the actual instance of `List<Double>`. If the actual instance is not - * `List<Double>`, the ClassCastException will be thrown. - * - * @return The actual instance of `List<Double>` - * @throws ClassCastException if the instance is not `List<Double>` - */ - public List getList() throws ClassCastException { - return (List) super.getActualInstance(); - } + /** + * Get the actual instance of `List<Double>`. If the actual instance is not `List<Double>`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `List<Double>` + * @throws ClassCastException if the instance is not `List<Double>` + */ + public List getList() throws ClassCastException { + return (List)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsContentEncoding.java b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsContentEncoding.java index 52a18dad453..eabd86f275d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsContentEncoding.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsContentEncoding.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** HTTP header used to compress the media-type. */ -@JsonSerialize( - using = DistributionPointsContentEncoding.DistributionPointsContentEncodingSerializer.class) +/** + *

HTTP header used to compress the media-type.

+ */ +@JsonSerialize(using = DistributionPointsContentEncoding.DistributionPointsContentEncodingSerializer.class) public class DistributionPointsContentEncoding { - public static final DistributionPointsContentEncoding DEFLATE = - new DistributionPointsContentEncoding("deflate"); + public static final DistributionPointsContentEncoding DEFLATE = new DistributionPointsContentEncoding("deflate"); private static final Set allowedValues = new HashSet(Arrays.asList("deflate")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class DistributionPointsContentEncodingSerializer - extends StdSerializer { - public DistributionPointsContentEncodingSerializer(Class t) { - super(t); - } + public static class DistributionPointsContentEncodingSerializer extends StdSerializer { + public DistributionPointsContentEncodingSerializer(Class t) { + super(t); + } - public DistributionPointsContentEncodingSerializer() { - this(null); - } + public DistributionPointsContentEncodingSerializer() { + this(null); + } - @Override - public void serialize( - DistributionPointsContentEncoding value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(DistributionPointsContentEncoding value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DistributionPointsContentEncoding object is equal to o. */ + /** + * Return true if this DistributionPointsContentEncoding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsPayload.java b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsPayload.java index e23a2a2b2ae..e08fa0693e9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsPayload.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsPayload.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The distribution points payload. */ -@JsonPropertyOrder({DistributionPointsPayload.JSON_PROPERTY_SERIES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The distribution points payload.

+ */ +@JsonPropertyOrder({ + DistributionPointsPayload.JSON_PROPERTY_SERIES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DistributionPointsPayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERIES = "series"; private List series = new ArrayList<>(); @@ -28,11 +47,9 @@ public DistributionPointsPayload() {} @JsonCreator public DistributionPointsPayload( - @JsonProperty(required = true, value = JSON_PROPERTY_SERIES) - List series) { - this.series = series; + @JsonProperty(required=true, value=JSON_PROPERTY_SERIES)List series) { + this.series = series; } - public DistributionPointsPayload series(List series) { this.series = series; for (DistributionPointsSeries item : series) { @@ -40,7 +57,6 @@ public DistributionPointsPayload series(List series) { } return this; } - public DistributionPointsPayload addSeriesItem(DistributionPointsSeries seriesItem) { this.series.add(seriesItem); this.unparsed |= seriesItem.unparsed; @@ -48,21 +64,22 @@ public DistributionPointsPayload addSeriesItem(DistributionPointsSeries seriesIt } /** - * A list of distribution points series to submit to Datadog. - * + *

A list of distribution points series to submit to Datadog.

* @return series - */ - @JsonProperty(JSON_PROPERTY_SERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSeries() { - return series; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSeries() { + return series; + } public void setSeries(List series) { this.series = series; } - /** Return true if this DistributionPointsPayload object is equal to o. */ + /** + * Return true if this DistributionPointsPayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.series, distributionPointsPayload.series); } + @Override public int hashCode() { return Objects.hash(series); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsSeries.java b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsSeries.java index 0d4437d7c6b..c62dfd2a3db 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsSeries.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsSeries.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A distribution points metric to submit to Datadog. */ + +/** + *

A distribution points metric to submit to Datadog.

+ */ @JsonPropertyOrder({ DistributionPointsSeries.JSON_PROPERTY_HOST, DistributionPointsSeries.JSON_PROPERTY_METRIC, @@ -23,10 +40,10 @@ DistributionPointsSeries.JSON_PROPERTY_TAGS, DistributionPointsSeries.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DistributionPointsSeries { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOST = "host"; private String host; @@ -46,85 +63,74 @@ public DistributionPointsSeries() {} @JsonCreator public DistributionPointsSeries( - @JsonProperty(required = true, value = JSON_PROPERTY_METRIC) String metric, - @JsonProperty(required = true, value = JSON_PROPERTY_POINTS) - List> points) { - this.metric = metric; - this.points = points; + @JsonProperty(required=true, value=JSON_PROPERTY_METRIC)String metric, + @JsonProperty(required=true, value=JSON_PROPERTY_POINTS)List> points) { + this.metric = metric; + this.points = points; } - public DistributionPointsSeries host(String host) { this.host = host; return this; } /** - * The name of the host that produced the distribution point metric. - * + *

The name of the host that produced the distribution point metric.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public DistributionPointsSeries metric(String metric) { this.metric = metric; return this; } /** - * The name of the distribution points metric. - * + *

The name of the distribution points metric.

* @return metric - */ - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMetric() { - return metric; - } - + **/ + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public DistributionPointsSeries points(List> points) { this.points = points; return this; } - public DistributionPointsSeries addPointsItem(List pointsItem) { this.points.add(pointsItem); return this; } /** - * Points relating to the distribution point metric. All points must be tuples with timestamp and - * a list of values (cannot be a string). Timestamps should be in POSIX time in seconds. - * + *

Points relating to the distribution point metric. All points must be tuples with timestamp and a list of values (cannot be a string). Timestamps should be in POSIX time in seconds.

* @return points - */ - @JsonProperty(JSON_PROPERTY_POINTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List> getPoints() { - return points; - } - + **/ + @JsonProperty(JSON_PROPERTY_POINTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List> getPoints() { + return points; + } public void setPoints(List> points) { this.points = points; } - public DistributionPointsSeries tags(List tags) { this.tags = tags; return this; } - public DistributionPointsSeries addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -134,21 +140,19 @@ public DistributionPointsSeries addTagsItem(String tagsItem) { } /** - * A list of tags associated with the distribution point metric. - * + *

A list of tags associated with the distribution point metric.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public DistributionPointsSeries type(DistributionPointsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -156,25 +160,26 @@ public DistributionPointsSeries type(DistributionPointsType type) { } /** - * The type of the distribution point. - * + *

The type of the distribution point.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DistributionPointsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DistributionPointsType getType() { + return type; + } public void setType(DistributionPointsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this DistributionPointsSeries object is equal to o. */ + /** + * Return true if this DistributionPointsSeries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -184,16 +189,13 @@ public boolean equals(Object o) { return false; } DistributionPointsSeries distributionPointsSeries = (DistributionPointsSeries) o; - return Objects.equals(this.host, distributionPointsSeries.host) - && Objects.equals(this.metric, distributionPointsSeries.metric) - && Objects.equals(this.points, distributionPointsSeries.points) - && Objects.equals(this.tags, distributionPointsSeries.tags) - && Objects.equals(this.type, distributionPointsSeries.type); + return Objects.equals(this.host, distributionPointsSeries.host) && Objects.equals(this.metric, distributionPointsSeries.metric) && Objects.equals(this.points, distributionPointsSeries.points) && Objects.equals(this.tags, distributionPointsSeries.tags) && Objects.equals(this.type, distributionPointsSeries.type); } + @Override public int hashCode() { - return Objects.hash(host, metric, points, tags, type); + return Objects.hash(host,metric,points,tags,type); } @Override @@ -210,7 +212,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsType.java b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsType.java index 5b51e69cc18..295d54a49e5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionPointsType.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionPointsType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the distribution point. */ +/** + *

The type of the distribution point.

+ */ @JsonSerialize(using = DistributionPointsType.DistributionPointsTypeSerializer.class) public class DistributionPointsType { - public static final DistributionPointsType DISTRIBUTION = - new DistributionPointsType("distribution"); + public static final DistributionPointsType DISTRIBUTION = new DistributionPointsType("distribution"); - private static final Set allowedValues = - new HashSet(Arrays.asList("distribution")); + private static final Set allowedValues = new HashSet(Arrays.asList("distribution")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class DistributionPointsTypeSerializer - extends StdSerializer { - public DistributionPointsTypeSerializer(Class t) { - super(t); - } + public static class DistributionPointsTypeSerializer extends StdSerializer { + public DistributionPointsTypeSerializer(Class t) { + super(t); + } - public DistributionPointsTypeSerializer() { - this(null); - } + public DistributionPointsTypeSerializer() { + this(null); + } - @Override - public void serialize( - DistributionPointsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(DistributionPointsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DistributionPointsType object is equal to o. */ + /** + * Return true if this DistributionPointsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinition.java index bb8f7874bff..fc5113867c3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinition.java @@ -6,19 +6,34 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The Distribution visualization is another way of showing metrics aggregated across one or several - * tags, such as hosts. Unlike the heat map, a distribution graph’s x-axis is quantity rather than - * time. + *

The Distribution visualization is another way of showing metrics + * aggregated across one or several tags, such as hosts. + * Unlike the heat map, a distribution graph’s x-axis is quantity rather than time.

*/ @JsonPropertyOrder({ DistributionWidgetDefinition.JSON_PROPERTY_LEGEND_SIZE, @@ -33,10 +48,10 @@ DistributionWidgetDefinition.JSON_PROPERTY_XAXIS, DistributionWidgetDefinition.JSON_PROPERTY_YAXIS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DistributionWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LEGEND_SIZE = "legend_size"; private String legendSize; @@ -74,39 +89,34 @@ public DistributionWidgetDefinition() {} @JsonCreator public DistributionWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - DistributionWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)DistributionWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public DistributionWidgetDefinition legendSize(String legendSize) { this.legendSize = legendSize; return this; } /** - * (Deprecated) The widget legend was replaced by a tooltip and sidebar. - * + *

(Deprecated) The widget legend was replaced by a tooltip and sidebar.

* @return legendSize * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegendSize() { - return legendSize; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLegendSize() { + return legendSize; + } @Deprecated public void setLegendSize(String legendSize) { this.legendSize = legendSize; } - public DistributionWidgetDefinition markers(List markers) { this.markers = markers; for (WidgetMarker item : markers) { @@ -114,7 +124,6 @@ public DistributionWidgetDefinition markers(List markers) { } return this; } - public DistributionWidgetDefinition addMarkersItem(WidgetMarker markersItem) { if (this.markers == null) { this.markers = new ArrayList<>(); @@ -125,21 +134,19 @@ public DistributionWidgetDefinition addMarkersItem(WidgetMarker markersItem) { } /** - * List of markers. - * + *

List of markers.

* @return markers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MARKERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMarkers() { - return markers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MARKERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMarkers() { + return markers; + } public void setMarkers(List markers) { this.markers = markers; } - public DistributionWidgetDefinition requests(List requests) { this.requests = requests; for (DistributionWidgetRequest item : requests) { @@ -147,7 +154,6 @@ public DistributionWidgetDefinition requests(List req } return this; } - public DistributionWidgetDefinition addRequestsItem(DistributionWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -155,48 +161,42 @@ public DistributionWidgetDefinition addRequestsItem(DistributionWidgetRequest re } /** - * Array of one request object to display in the widget. - * - *

See the dedicated Request JSON schema - * documentation to learn how to build the REQUEST_SCHEMA. - * + *

Array of one request object to display in the widget.

+ *

See the dedicated Request JSON schema documentation + * to learn how to build the REQUEST_SCHEMA.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public DistributionWidgetDefinition showLegend(Boolean showLegend) { this.showLegend = showLegend; return this; } /** - * (Deprecated) The widget legend was replaced by a tooltip and sidebar. - * + *

(Deprecated) The widget legend was replaced by a tooltip and sidebar.

* @return showLegend * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowLegend() { - return showLegend; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowLegend() { + return showLegend; + } @Deprecated public void setShowLegend(Boolean showLegend) { this.showLegend = showLegend; } - public DistributionWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -204,42 +204,38 @@ public DistributionWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public DistributionWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public DistributionWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -247,45 +243,41 @@ public DistributionWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public DistributionWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public DistributionWidgetDefinition type(DistributionWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -293,23 +285,21 @@ public DistributionWidgetDefinition type(DistributionWidgetDefinitionType type) } /** - * Type of the distribution widget. - * + *

Type of the distribution widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DistributionWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DistributionWidgetDefinitionType getType() { + return type; + } public void setType(DistributionWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public DistributionWidgetDefinition xaxis(DistributionWidgetXAxis xaxis) { this.xaxis = xaxis; this.unparsed |= xaxis.unparsed; @@ -317,21 +307,19 @@ public DistributionWidgetDefinition xaxis(DistributionWidgetXAxis xaxis) { } /** - * X Axis controls for the distribution widget. - * + *

X Axis controls for the distribution widget.

* @return xaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_XAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DistributionWidgetXAxis getXaxis() { - return xaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_XAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DistributionWidgetXAxis getXaxis() { + return xaxis; + } public void setXaxis(DistributionWidgetXAxis xaxis) { this.xaxis = xaxis; } - public DistributionWidgetDefinition yaxis(DistributionWidgetYAxis yaxis) { this.yaxis = yaxis; this.unparsed |= yaxis.unparsed; @@ -339,22 +327,23 @@ public DistributionWidgetDefinition yaxis(DistributionWidgetYAxis yaxis) { } /** - * Y Axis controls for the distribution widget. - * + *

Y Axis controls for the distribution widget.

* @return yaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DistributionWidgetYAxis getYaxis() { - return yaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DistributionWidgetYAxis getYaxis() { + return yaxis; + } public void setYaxis(DistributionWidgetYAxis yaxis) { this.yaxis = yaxis; } - /** Return true if this DistributionWidgetDefinition object is equal to o. */ + /** + * Return true if this DistributionWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -364,33 +353,13 @@ public boolean equals(Object o) { return false; } DistributionWidgetDefinition distributionWidgetDefinition = (DistributionWidgetDefinition) o; - return Objects.equals(this.legendSize, distributionWidgetDefinition.legendSize) - && Objects.equals(this.markers, distributionWidgetDefinition.markers) - && Objects.equals(this.requests, distributionWidgetDefinition.requests) - && Objects.equals(this.showLegend, distributionWidgetDefinition.showLegend) - && Objects.equals(this.time, distributionWidgetDefinition.time) - && Objects.equals(this.title, distributionWidgetDefinition.title) - && Objects.equals(this.titleAlign, distributionWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, distributionWidgetDefinition.titleSize) - && Objects.equals(this.type, distributionWidgetDefinition.type) - && Objects.equals(this.xaxis, distributionWidgetDefinition.xaxis) - && Objects.equals(this.yaxis, distributionWidgetDefinition.yaxis); + return Objects.equals(this.legendSize, distributionWidgetDefinition.legendSize) && Objects.equals(this.markers, distributionWidgetDefinition.markers) && Objects.equals(this.requests, distributionWidgetDefinition.requests) && Objects.equals(this.showLegend, distributionWidgetDefinition.showLegend) && Objects.equals(this.time, distributionWidgetDefinition.time) && Objects.equals(this.title, distributionWidgetDefinition.title) && Objects.equals(this.titleAlign, distributionWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, distributionWidgetDefinition.titleSize) && Objects.equals(this.type, distributionWidgetDefinition.type) && Objects.equals(this.xaxis, distributionWidgetDefinition.xaxis) && Objects.equals(this.yaxis, distributionWidgetDefinition.yaxis); } + @Override public int hashCode() { - return Objects.hash( - legendSize, - markers, - requests, - showLegend, - time, - title, - titleAlign, - titleSize, - type, - xaxis, - yaxis); + return Objects.hash(legendSize,markers,requests,showLegend,time,title,titleAlign,titleSize,type,xaxis,yaxis); } @Override @@ -413,7 +382,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinitionType.java index b4cf58e949d..1694d910da7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the distribution widget. */ -@JsonSerialize( - using = DistributionWidgetDefinitionType.DistributionWidgetDefinitionTypeSerializer.class) +/** + *

Type of the distribution widget.

+ */ +@JsonSerialize(using = DistributionWidgetDefinitionType.DistributionWidgetDefinitionTypeSerializer.class) public class DistributionWidgetDefinitionType { - public static final DistributionWidgetDefinitionType DISTRIBUTION = - new DistributionWidgetDefinitionType("distribution"); + public static final DistributionWidgetDefinitionType DISTRIBUTION = new DistributionWidgetDefinitionType("distribution"); - private static final Set allowedValues = - new HashSet(Arrays.asList("distribution")); + private static final Set allowedValues = new HashSet(Arrays.asList("distribution")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class DistributionWidgetDefinitionTypeSerializer - extends StdSerializer { - public DistributionWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class DistributionWidgetDefinitionTypeSerializer extends StdSerializer { + public DistributionWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public DistributionWidgetDefinitionTypeSerializer() { - this(null); - } + public DistributionWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - DistributionWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(DistributionWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DistributionWidgetDefinitionType object is equal to o. */ + /** + * Return true if this DistributionWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestQuery.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestQuery.java index b72adfd5e5d..b0810db9e50 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestQuery.java @@ -6,396 +6,311 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - DistributionWidgetHistogramRequestQuery.DistributionWidgetHistogramRequestQueryDeserializer - .class) -@JsonSerialize( - using = - DistributionWidgetHistogramRequestQuery.DistributionWidgetHistogramRequestQuerySerializer - .class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = DistributionWidgetHistogramRequestQuery.DistributionWidgetHistogramRequestQueryDeserializer.class) +@JsonSerialize(using = DistributionWidgetHistogramRequestQuery.DistributionWidgetHistogramRequestQuerySerializer.class) public class DistributionWidgetHistogramRequestQuery extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(DistributionWidgetHistogramRequestQuery.class.getName()); + private static final Logger log = Logger.getLogger(DistributionWidgetHistogramRequestQuery.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; + + public static class DistributionWidgetHistogramRequestQuerySerializer extends StdSerializer { + public DistributionWidgetHistogramRequestQuerySerializer(Class t) { + super(t); + } - public static class DistributionWidgetHistogramRequestQuerySerializer - extends StdSerializer { - public DistributionWidgetHistogramRequestQuerySerializer( - Class t) { - super(t); + public DistributionWidgetHistogramRequestQuerySerializer() { + this(null); + } + + @Override + public void serialize(DistributionWidgetHistogramRequestQuery value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public DistributionWidgetHistogramRequestQuerySerializer() { - this(null); + public static class DistributionWidgetHistogramRequestQueryDeserializer extends StdDeserializer { + public DistributionWidgetHistogramRequestQueryDeserializer() { + this(DistributionWidgetHistogramRequestQuery.class); + } + + public DistributionWidgetHistogramRequestQueryDeserializer(Class vc) { + super(vc); + } + + @Override + public DistributionWidgetHistogramRequestQuery 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 FormulaAndFunctionMetricQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionMetricQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionMetricQueryDefinition.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 (!((FormulaAndFunctionMetricQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionMetricQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionMetricQueryDefinition'", e); + } + + // deserialize FormulaAndFunctionEventQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionEventQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionEventQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionEventQueryDefinition.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 (!((FormulaAndFunctionEventQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionEventQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionEventQueryDefinition'", e); + } + + // deserialize FormulaAndFunctionApmResourceStatsQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Long.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Double.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionApmResourceStatsQueryDefinition.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 (!((FormulaAndFunctionApmResourceStatsQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'", e); + } + + DistributionWidgetHistogramRequestQuery ret = new DistributionWidgetHistogramRequestQuery(); + 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 DistributionWidgetHistogramRequestQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "DistributionWidgetHistogramRequestQuery cannot be null"); + } } - @Override - public void serialize( - DistributionWidgetHistogramRequestQuery value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public DistributionWidgetHistogramRequestQuery() { + super("oneOf", Boolean.FALSE); + } + public DistributionWidgetHistogramRequestQuery(FormulaAndFunctionMetricQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public DistributionWidgetHistogramRequestQuery(FormulaAndFunctionEventQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public DistributionWidgetHistogramRequestQuery(FormulaAndFunctionApmResourceStatsQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class DistributionWidgetHistogramRequestQueryDeserializer - extends StdDeserializer { - public DistributionWidgetHistogramRequestQueryDeserializer() { - this(DistributionWidgetHistogramRequestQuery.class); + static { + schemas.put("FormulaAndFunctionMetricQueryDefinition", new GenericType() { + }); + schemas.put("FormulaAndFunctionEventQueryDefinition", new GenericType() { + }); + schemas.put("FormulaAndFunctionApmResourceStatsQueryDefinition", new GenericType() { + }); + JSON.registerDescendants(DistributionWidgetHistogramRequestQuery.class, Collections.unmodifiableMap(schemas)); } - public DistributionWidgetHistogramRequestQueryDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return DistributionWidgetHistogramRequestQuery.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public DistributionWidgetHistogramRequestQuery 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 FormulaAndFunctionMetricQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionMetricQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(FormulaAndFunctionMetricQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionMetricQueryDefinition.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 (!((FormulaAndFunctionMetricQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'FormulaAndFunctionMetricQueryDefinition'"); + if (JSON.isInstanceOf(FormulaAndFunctionEventQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionMetricQueryDefinition'", - e); - } - - // deserialize FormulaAndFunctionEventQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionEventQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(FormulaAndFunctionApmResourceStatsQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionEventQueryDefinition.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 (!((FormulaAndFunctionEventQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'FormulaAndFunctionEventQueryDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionEventQueryDefinition'", - e); - } - // deserialize FormulaAndFunctionApmResourceStatsQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals( - Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionApmResourceStatsQueryDefinition.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 (!((FormulaAndFunctionApmResourceStatsQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, - "Input data matches schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'", - e); - } - - DistributionWidgetHistogramRequestQuery ret = new DistributionWidgetHistogramRequestQuery(); - 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; + throw new RuntimeException("Invalid instance type. Must be FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition + * + * @return The actual instance (FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition) + */ @Override - public DistributionWidgetHistogramRequestQuery getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "DistributionWidgetHistogramRequestQuery cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public DistributionWidgetHistogramRequestQuery() { - super("oneOf", Boolean.FALSE); - } - - public DistributionWidgetHistogramRequestQuery(FormulaAndFunctionMetricQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public DistributionWidgetHistogramRequestQuery(FormulaAndFunctionEventQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public DistributionWidgetHistogramRequestQuery( - FormulaAndFunctionApmResourceStatsQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - static { - schemas.put( - "FormulaAndFunctionMetricQueryDefinition", - new GenericType() {}); - schemas.put( - "FormulaAndFunctionEventQueryDefinition", - new GenericType() {}); - schemas.put( - "FormulaAndFunctionApmResourceStatsQueryDefinition", - new GenericType() {}); - JSON.registerDescendants( - DistributionWidgetHistogramRequestQuery.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return DistributionWidgetHistogramRequestQuery.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: FormulaAndFunctionMetricQueryDefinition, - * FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition - * - *

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( - FormulaAndFunctionMetricQueryDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - FormulaAndFunctionEventQueryDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - FormulaAndFunctionApmResourceStatsQueryDefinition.class, - instance, - new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `FormulaAndFunctionMetricQueryDefinition`. If the actual instance is not `FormulaAndFunctionMetricQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionMetricQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionMetricQueryDefinition` + */ + public FormulaAndFunctionMetricQueryDefinition getFormulaAndFunctionMetricQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionMetricQueryDefinition)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `FormulaAndFunctionEventQueryDefinition`. If the actual instance is not `FormulaAndFunctionEventQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionEventQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionEventQueryDefinition` + */ + public FormulaAndFunctionEventQueryDefinition getFormulaAndFunctionEventQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionEventQueryDefinition)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be FormulaAndFunctionMetricQueryDefinition," - + " FormulaAndFunctionEventQueryDefinition," - + " FormulaAndFunctionApmResourceStatsQueryDefinition"); - } - /** - * Get the actual instance, which can be the following: FormulaAndFunctionMetricQueryDefinition, - * FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition - * - * @return The actual instance (FormulaAndFunctionMetricQueryDefinition, - * FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `FormulaAndFunctionMetricQueryDefinition`. If the actual instance is - * not `FormulaAndFunctionMetricQueryDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FormulaAndFunctionMetricQueryDefinition` - * @throws ClassCastException if the instance is not `FormulaAndFunctionMetricQueryDefinition` - */ - public FormulaAndFunctionMetricQueryDefinition getFormulaAndFunctionMetricQueryDefinition() - throws ClassCastException { - return (FormulaAndFunctionMetricQueryDefinition) super.getActualInstance(); - } - - /** - * Get the actual instance of `FormulaAndFunctionEventQueryDefinition`. If the actual instance is - * not `FormulaAndFunctionEventQueryDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FormulaAndFunctionEventQueryDefinition` - * @throws ClassCastException if the instance is not `FormulaAndFunctionEventQueryDefinition` - */ - public FormulaAndFunctionEventQueryDefinition getFormulaAndFunctionEventQueryDefinition() - throws ClassCastException { - return (FormulaAndFunctionEventQueryDefinition) super.getActualInstance(); - } - - /** - * Get the actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition`. If the actual - * instance is not `FormulaAndFunctionApmResourceStatsQueryDefinition`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition` - * @throws ClassCastException if the instance is not - * `FormulaAndFunctionApmResourceStatsQueryDefinition` - */ - public FormulaAndFunctionApmResourceStatsQueryDefinition - getFormulaAndFunctionApmResourceStatsQueryDefinition() throws ClassCastException { - return (FormulaAndFunctionApmResourceStatsQueryDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition`. If the actual instance is not `FormulaAndFunctionApmResourceStatsQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionApmResourceStatsQueryDefinition` + */ + public FormulaAndFunctionApmResourceStatsQueryDefinition getFormulaAndFunctionApmResourceStatsQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionApmResourceStatsQueryDefinition)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestType.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestType.java index d7862a7d118..9fead8b4d35 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetHistogramRequestType.java @@ -6,28 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Request type for the histogram request. */ -@JsonSerialize( - using = - DistributionWidgetHistogramRequestType.DistributionWidgetHistogramRequestTypeSerializer - .class) +/** + *

Request type for the histogram request.

+ */ +@JsonSerialize(using = DistributionWidgetHistogramRequestType.DistributionWidgetHistogramRequestTypeSerializer.class) public class DistributionWidgetHistogramRequestType { - public static final DistributionWidgetHistogramRequestType HISTOGRAM = - new DistributionWidgetHistogramRequestType("histogram"); + public static final DistributionWidgetHistogramRequestType HISTOGRAM = new DistributionWidgetHistogramRequestType("histogram"); private static final Set allowedValues = new HashSet(Arrays.asList("histogram")); @@ -41,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class DistributionWidgetHistogramRequestTypeSerializer - extends StdSerializer { - public DistributionWidgetHistogramRequestTypeSerializer( - Class t) { - super(t); - } + public static class DistributionWidgetHistogramRequestTypeSerializer extends StdSerializer { + public DistributionWidgetHistogramRequestTypeSerializer(Class t) { + super(t); + } - public DistributionWidgetHistogramRequestTypeSerializer() { - this(null); - } + public DistributionWidgetHistogramRequestTypeSerializer() { + this(null); + } - @Override - public void serialize( - DistributionWidgetHistogramRequestType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(DistributionWidgetHistogramRequestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DistributionWidgetHistogramRequestType object is equal to o. */ + /** + * Return true if this DistributionWidgetHistogramRequestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetRequest.java index 7768999d60e..1f089bb3eee 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetRequest.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Updated distribution widget. */ +/** + *

Updated distribution widget.

+ */ @JsonPropertyOrder({ DistributionWidgetRequest.JSON_PROPERTY_APM_QUERY, DistributionWidgetRequest.JSON_PROPERTY_APM_STATS_QUERY, @@ -28,10 +48,10 @@ DistributionWidgetRequest.JSON_PROPERTY_SECURITY_QUERY, DistributionWidgetRequest.JSON_PROPERTY_STYLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DistributionWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -78,21 +98,19 @@ public DistributionWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public DistributionWidgetRequest apmStatsQuery(ApmStatsQueryDefinition apmStatsQuery) { this.apmStatsQuery = apmStatsQuery; this.unparsed |= apmStatsQuery.unparsed; @@ -100,21 +118,19 @@ public DistributionWidgetRequest apmStatsQuery(ApmStatsQueryDefinition apmStatsQ } /** - * The APM stats query for table and distributions widgets. - * + *

The APM stats query for table and distributions widgets.

* @return apmStatsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_STATS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApmStatsQueryDefinition getApmStatsQuery() { - return apmStatsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_STATS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApmStatsQueryDefinition getApmStatsQuery() { + return apmStatsQuery; + } public void setApmStatsQuery(ApmStatsQueryDefinition apmStatsQuery) { this.apmStatsQuery = apmStatsQuery; } - public DistributionWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -122,21 +138,19 @@ public DistributionWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public DistributionWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -144,21 +158,19 @@ public DistributionWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public DistributionWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -166,21 +178,19 @@ public DistributionWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public DistributionWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -188,21 +198,19 @@ public DistributionWidgetRequest processQuery(ProcessQueryDefinition processQuer } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public DistributionWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -210,42 +218,38 @@ public DistributionWidgetRequest profileMetricsQuery(LogQueryDefinition profileM } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public DistributionWidgetRequest q(String q) { this.q = q; return this; } /** - * Widget query. - * + *

Widget query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public DistributionWidgetRequest query(DistributionWidgetHistogramRequestQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -253,21 +257,19 @@ public DistributionWidgetRequest query(DistributionWidgetHistogramRequestQuery q } /** - * Query definition for Distribution Widget Histogram Request - * + *

Query definition for Distribution Widget Histogram Request

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DistributionWidgetHistogramRequestQuery getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DistributionWidgetHistogramRequestQuery getQuery() { + return query; + } public void setQuery(DistributionWidgetHistogramRequestQuery query) { this.query = query; } - public DistributionWidgetRequest requestType(DistributionWidgetHistogramRequestType requestType) { this.requestType = requestType; this.unparsed |= !requestType.isValid(); @@ -275,24 +277,22 @@ public DistributionWidgetRequest requestType(DistributionWidgetHistogramRequestT } /** - * Request type for the histogram request. - * + *

Request type for the histogram request.

* @return requestType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DistributionWidgetHistogramRequestType getRequestType() { - return requestType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public DistributionWidgetHistogramRequestType getRequestType() { + return requestType; + } public void setRequestType(DistributionWidgetHistogramRequestType requestType) { if (!requestType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.requestType = requestType; } - public DistributionWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -300,21 +300,19 @@ public DistributionWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public DistributionWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -322,21 +320,19 @@ public DistributionWidgetRequest securityQuery(LogQueryDefinition securityQuery) } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - public DistributionWidgetRequest style(WidgetStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -344,22 +340,23 @@ public DistributionWidgetRequest style(WidgetStyle style) { } /** - * Widget style definition. - * + *

Widget style definition.

* @return style - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetStyle getStyle() { - return style; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetStyle getStyle() { + return style; + } public void setStyle(WidgetStyle style) { this.style = style; } - /** Return true if this DistributionWidgetRequest object is equal to o. */ + /** + * Return true if this DistributionWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -369,37 +366,13 @@ public boolean equals(Object o) { return false; } DistributionWidgetRequest distributionWidgetRequest = (DistributionWidgetRequest) o; - return Objects.equals(this.apmQuery, distributionWidgetRequest.apmQuery) - && Objects.equals(this.apmStatsQuery, distributionWidgetRequest.apmStatsQuery) - && Objects.equals(this.eventQuery, distributionWidgetRequest.eventQuery) - && Objects.equals(this.logQuery, distributionWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, distributionWidgetRequest.networkQuery) - && Objects.equals(this.processQuery, distributionWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, distributionWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, distributionWidgetRequest.q) - && Objects.equals(this.query, distributionWidgetRequest.query) - && Objects.equals(this.requestType, distributionWidgetRequest.requestType) - && Objects.equals(this.rumQuery, distributionWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, distributionWidgetRequest.securityQuery) - && Objects.equals(this.style, distributionWidgetRequest.style); + return Objects.equals(this.apmQuery, distributionWidgetRequest.apmQuery) && Objects.equals(this.apmStatsQuery, distributionWidgetRequest.apmStatsQuery) && Objects.equals(this.eventQuery, distributionWidgetRequest.eventQuery) && Objects.equals(this.logQuery, distributionWidgetRequest.logQuery) && Objects.equals(this.networkQuery, distributionWidgetRequest.networkQuery) && Objects.equals(this.processQuery, distributionWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, distributionWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, distributionWidgetRequest.q) && Objects.equals(this.query, distributionWidgetRequest.query) && Objects.equals(this.requestType, distributionWidgetRequest.requestType) && Objects.equals(this.rumQuery, distributionWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, distributionWidgetRequest.securityQuery) && Objects.equals(this.style, distributionWidgetRequest.style); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - apmStatsQuery, - eventQuery, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - query, - requestType, - rumQuery, - securityQuery, - style); + return Objects.hash(apmQuery,apmStatsQuery,eventQuery,logQuery,networkQuery,processQuery,profileMetricsQuery,q,query,requestType,rumQuery,securityQuery,style); } @Override @@ -412,9 +385,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" requestType: ").append(toIndentedString(requestType)).append("\n"); @@ -426,7 +397,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetXAxis.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetXAxis.java index 44ce4b3d575..2ba162432a4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetXAxis.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetXAxis.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** X Axis controls for the distribution widget. */ + +/** + *

X Axis controls for the distribution widget.

+ */ @JsonPropertyOrder({ DistributionWidgetXAxis.JSON_PROPERTY_INCLUDE_ZERO, DistributionWidgetXAxis.JSON_PROPERTY_MAX, DistributionWidgetXAxis.JSON_PROPERTY_MIN, DistributionWidgetXAxis.JSON_PROPERTY_SCALE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DistributionWidgetXAxis { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INCLUDE_ZERO = "include_zero"; private Boolean includeZero; @@ -41,87 +61,80 @@ public DistributionWidgetXAxis includeZero(Boolean includeZero) { } /** - * True includes zero. - * + *

True includes zero.

* @return includeZero - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_ZERO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeZero() { - return includeZero; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_ZERO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeZero() { + return includeZero; + } public void setIncludeZero(Boolean includeZero) { this.includeZero = includeZero; } - public DistributionWidgetXAxis max(String max) { this.max = max; return this; } /** - * Specifies maximum value to show on the x-axis. It takes a number, percentile (p90 === 90th - * percentile), or auto for default behavior. - * + *

Specifies maximum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior.

* @return max - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMax() { - return max; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMax() { + return max; + } public void setMax(String max) { this.max = max; } - public DistributionWidgetXAxis min(String min) { this.min = min; return this; } /** - * Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th - * percentile), or auto for default behavior. - * + *

Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior.

* @return min - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMin() { - return min; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMin() { + return min; + } public void setMin(String min) { this.min = min; } - public DistributionWidgetXAxis scale(String scale) { this.scale = scale; return this; } /** - * Specifies the scale type. Possible values are linear. - * + *

Specifies the scale type. Possible values are linear.

* @return scale - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScale() { - return scale; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCALE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScale() { + return scale; + } public void setScale(String scale) { this.scale = scale; } - /** Return true if this DistributionWidgetXAxis object is equal to o. */ + /** + * Return true if this DistributionWidgetXAxis object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -131,15 +144,13 @@ public boolean equals(Object o) { return false; } DistributionWidgetXAxis distributionWidgetXAxis = (DistributionWidgetXAxis) o; - return Objects.equals(this.includeZero, distributionWidgetXAxis.includeZero) - && Objects.equals(this.max, distributionWidgetXAxis.max) - && Objects.equals(this.min, distributionWidgetXAxis.min) - && Objects.equals(this.scale, distributionWidgetXAxis.scale); + return Objects.equals(this.includeZero, distributionWidgetXAxis.includeZero) && Objects.equals(this.max, distributionWidgetXAxis.max) && Objects.equals(this.min, distributionWidgetXAxis.min) && Objects.equals(this.scale, distributionWidgetXAxis.scale); } + @Override public int hashCode() { - return Objects.hash(includeZero, max, min, scale); + return Objects.hash(includeZero,max,min,scale); } @Override @@ -155,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetYAxis.java b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetYAxis.java index 9d3279013d7..9bcc8c88fcb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetYAxis.java +++ b/src/main/java/com/datadog/api/client/v1/model/DistributionWidgetYAxis.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Y Axis controls for the distribution widget. */ +/** + *

Y Axis controls for the distribution widget.

+ */ @JsonPropertyOrder({ DistributionWidgetYAxis.JSON_PROPERTY_INCLUDE_ZERO, DistributionWidgetYAxis.JSON_PROPERTY_LABEL, @@ -20,10 +40,10 @@ DistributionWidgetYAxis.JSON_PROPERTY_MIN, DistributionWidgetYAxis.JSON_PROPERTY_SCALE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DistributionWidgetYAxis { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INCLUDE_ZERO = "include_zero"; private Boolean includeZero; @@ -45,107 +65,99 @@ public DistributionWidgetYAxis includeZero(Boolean includeZero) { } /** - * True includes zero. - * + *

True includes zero.

* @return includeZero - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_ZERO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeZero() { - return includeZero; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_ZERO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeZero() { + return includeZero; + } public void setIncludeZero(Boolean includeZero) { this.includeZero = includeZero; } - public DistributionWidgetYAxis label(String label) { this.label = label; return this; } /** - * The label of the axis to display on the graph. - * + *

The label of the axis to display on the graph.

* @return label - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLabel() { - return label; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLabel() { + return label; + } public void setLabel(String label) { this.label = label; } - public DistributionWidgetYAxis max(String max) { this.max = max; return this; } /** - * Specifies the maximum value to show on the y-axis. It takes a number, or auto for default - * behavior. - * + *

Specifies the maximum value to show on the y-axis. It takes a number, or auto for default behavior.

* @return max - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMax() { - return max; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMax() { + return max; + } public void setMax(String max) { this.max = max; } - public DistributionWidgetYAxis min(String min) { this.min = min; return this; } /** - * Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior. - * + *

Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior.

* @return min - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMin() { - return min; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMin() { + return min; + } public void setMin(String min) { this.min = min; } - public DistributionWidgetYAxis scale(String scale) { this.scale = scale; return this; } /** - * Specifies the scale type. Possible values are linear or log. - * + *

Specifies the scale type. Possible values are linear or log.

* @return scale - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScale() { - return scale; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCALE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScale() { + return scale; + } public void setScale(String scale) { this.scale = scale; } - /** Return true if this DistributionWidgetYAxis object is equal to o. */ + /** + * Return true if this DistributionWidgetYAxis object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,16 +167,13 @@ public boolean equals(Object o) { return false; } DistributionWidgetYAxis distributionWidgetYAxis = (DistributionWidgetYAxis) o; - return Objects.equals(this.includeZero, distributionWidgetYAxis.includeZero) - && Objects.equals(this.label, distributionWidgetYAxis.label) - && Objects.equals(this.max, distributionWidgetYAxis.max) - && Objects.equals(this.min, distributionWidgetYAxis.min) - && Objects.equals(this.scale, distributionWidgetYAxis.scale); + return Objects.equals(this.includeZero, distributionWidgetYAxis.includeZero) && Objects.equals(this.label, distributionWidgetYAxis.label) && Objects.equals(this.max, distributionWidgetYAxis.max) && Objects.equals(this.min, distributionWidgetYAxis.min) && Objects.equals(this.scale, distributionWidgetYAxis.scale); } + @Override public int hashCode() { - return Objects.hash(includeZero, label, max, min, scale); + return Objects.hash(includeZero,label,max,min,scale); } @Override @@ -181,7 +190,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Downtime.java b/src/main/java/com/datadog/api/client/v1/model/Downtime.java index 57bcb96dac6..1b289d745dc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Downtime.java +++ b/src/main/java/com/datadog/api/client/v1/model/Downtime.java @@ -6,19 +6,35 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * Downtiming gives you greater control over monitor notifications by allowing you to globally - * exclude scopes from alerting. Downtime settings, which can be scheduled with start and end times, - * prevent all alerting related to specified Datadog tags. + *

Downtiming gives you greater control over monitor notifications by + * allowing you to globally exclude scopes from alerting. + * Downtime settings, which can be scheduled with start and end times, + * prevent all alerting related to specified Datadog tags.

*/ @JsonPropertyOrder({ Downtime.JSON_PROPERTY_ACTIVE, @@ -40,10 +56,10 @@ Downtime.JSON_PROPERTY_TIMEZONE, Downtime.JSON_PROPERTY_UPDATER_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Downtime { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACTIVE = "active"; private Boolean active; @@ -77,16 +93,14 @@ public class Downtime { public static final String JSON_PROPERTY_MONITOR_TAGS = "monitor_tags"; private List monitorTags = null; - public static final String JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION = - "mute_first_recovery_notification"; + public static final String JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION = "mute_first_recovery_notification"; private Boolean muteFirstRecoveryNotification; public static final String JSON_PROPERTY_PARENT_ID = "parent_id"; private JsonNullable parentId = JsonNullable.undefined(); public static final String JSON_PROPERTY_RECURRENCE = "recurrence"; - private JsonNullable recurrence = - JsonNullable.undefined(); + private JsonNullable recurrence = JsonNullable.undefined(); public static final String JSON_PROPERTY_SCOPE = "scope"; private List scope = null; @@ -100,221 +114,202 @@ public class Downtime { public static final String JSON_PROPERTY_UPDATER_ID = "updater_id"; private JsonNullable updaterId = JsonNullable.undefined(); + /** - * If a scheduled downtime currently exists. - * + *

If a scheduled downtime currently exists.

* @return active - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getActive() { - return active; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getActive() { + return active; + } /** - * The downtime object definition of the active child for the original parent recurring downtime. - * This field will only exist on recurring downtimes. - * + *

The downtime object definition of the active child for the original parent recurring downtime. This + * field will only exist on recurring downtimes.

* @return activeChild - */ - @jakarta.annotation.Nullable - @JsonIgnore - public DowntimeChild getActiveChild() { - - if (activeChild == null) { - activeChild = JsonNullable.undefined(); - } - return activeChild.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public DowntimeChild getActiveChild() { + + if (activeChild == null) { + activeChild = JsonNullable.undefined(); + } + return activeChild.orElse(null); + } @JsonProperty(JSON_PROPERTY_ACTIVE_CHILD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getActiveChild_JsonNullable() { return activeChild; } - - @JsonProperty(JSON_PROPERTY_ACTIVE_CHILD) - private void setActiveChild_JsonNullable(JsonNullable activeChild) { + @JsonProperty(JSON_PROPERTY_ACTIVE_CHILD)private void setActiveChild_JsonNullable(JsonNullable activeChild) { this.activeChild = activeChild; } /** - * If a scheduled downtime is canceled. - * + *

If a scheduled downtime is canceled.

* @return canceled - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getCanceled() { - - if (canceled == null) { - canceled = JsonNullable.undefined(); - } - return canceled.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getCanceled() { + + if (canceled == null) { + canceled = JsonNullable.undefined(); + } + return canceled.orElse(null); + } @JsonProperty(JSON_PROPERTY_CANCELED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCanceled_JsonNullable() { return canceled; } - - @JsonProperty(JSON_PROPERTY_CANCELED) - private void setCanceled_JsonNullable(JsonNullable canceled) { + @JsonProperty(JSON_PROPERTY_CANCELED)private void setCanceled_JsonNullable(JsonNullable canceled) { this.canceled = canceled; } /** - * User ID of the downtime creator. maximum: 2147483647 - * + *

User ID of the downtime creator.

+ * maximum: 2147483647 * @return creatorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatorId() { - return creatorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCreatorId() { + return creatorId; + } public Downtime disabled(Boolean disabled) { this.disabled = disabled; return this; } /** - * If a downtime has been disabled. - * + *

If a downtime has been disabled.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } /** - * 0 for a downtime applied on * or all, 1 when the - * downtime is only scoped to hosts, or 2 when the downtime is scoped to anything but - * hosts. maximum: 2147483647 - * + *

0 for a downtime applied on * or all, + * 1 when the downtime is only scoped to hosts, + * or 2 when the downtime is scoped to anything but hosts.

+ * maximum: 2147483647 * @return downtimeType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOWNTIME_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDowntimeType() { - return downtimeType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOWNTIME_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDowntimeType() { + return downtimeType; + } public Downtime end(Long end) { this.end = JsonNullable.of(end); return this; } /** - * POSIX timestamp to end the downtime. If not provided, the downtime is in effect indefinitely - * until you cancel it. - * + *

POSIX timestamp to end the downtime. If not provided, + * the downtime is in effect indefinitely until you cancel it.

* @return end - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getEnd() { - return end.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getEnd() { + return end.orElse(null); + } @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getEnd_JsonNullable() { return end; } - - @JsonProperty(JSON_PROPERTY_END) - public void setEnd_JsonNullable(JsonNullable end) { + @JsonProperty(JSON_PROPERTY_END)public void setEnd_JsonNullable(JsonNullable end) { this.end = end; } - public void setEnd(Long end) { this.end = JsonNullable.of(end); } /** - * The downtime ID. - * + *

The downtime ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public Downtime message(String message) { this.message = message; return this; } /** - * A message to include with notifications for this downtime. Email notifications can be sent to - * specific users by using the same @username notation as events. - * + *

A message to include with notifications for this downtime. + * Email notifications can be sent to specific users by using the same @username notation as events.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public Downtime monitorId(Long monitorId) { this.monitorId = JsonNullable.of(monitorId); return this; } /** - * A single monitor to which the downtime applies. If not provided, the downtime applies to all - * monitors. - * + *

A single monitor to which the downtime applies. + * If not provided, the downtime applies to all monitors.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getMonitorId() { - return monitorId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getMonitorId() { + return monitorId.orElse(null); + } @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMonitorId_JsonNullable() { return monitorId; } - - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - public void setMonitorId_JsonNullable(JsonNullable monitorId) { + @JsonProperty(JSON_PROPERTY_MONITOR_ID)public void setMonitorId_JsonNullable(JsonNullable monitorId) { this.monitorId = monitorId; } - public void setMonitorId(Long monitorId) { this.monitorId = JsonNullable.of(monitorId); } - public Downtime monitorTags(List monitorTags) { this.monitorTags = monitorTags; return this; } - public Downtime addMonitorTagsItem(String monitorTagsItem) { if (this.monitorTags == null) { this.monitorTags = new ArrayList<>(); @@ -324,113 +319,97 @@ public Downtime addMonitorTagsItem(String monitorTagsItem) { } /** - * A comma-separated list of monitor tags. For example, tags that are applied directly to - * monitors, not tags that are used in monitor queries (which are filtered by the scope - * parameter), to which the downtime applies. The resulting downtime applies to monitors that - * match ALL provided monitor tags. For example, service:postgres - * AND team:frontend. - * + *

A comma-separated list of monitor tags. For example, tags that are applied directly to monitors, + * not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. + * The resulting downtime applies to monitors that match ALL provided monitor tags. + * For example, service:postgres AND team:frontend.

* @return monitorTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorTags() { - return monitorTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorTags() { + return monitorTags; + } public void setMonitorTags(List monitorTags) { this.monitorTags = monitorTags; } - public Downtime muteFirstRecoveryNotification(Boolean muteFirstRecoveryNotification) { this.muteFirstRecoveryNotification = muteFirstRecoveryNotification; return this; } /** - * If the first recovery notification during a downtime should be muted. - * + *

If the first recovery notification during a downtime should be muted.

* @return muteFirstRecoveryNotification - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMuteFirstRecoveryNotification() { - return muteFirstRecoveryNotification; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMuteFirstRecoveryNotification() { + return muteFirstRecoveryNotification; + } public void setMuteFirstRecoveryNotification(Boolean muteFirstRecoveryNotification) { this.muteFirstRecoveryNotification = muteFirstRecoveryNotification; } - public Downtime parentId(Long parentId) { this.parentId = JsonNullable.of(parentId); return this; } /** - * ID of the parent Downtime. - * + *

ID of the parent Downtime.

* @return parentId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getParentId() { - return parentId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getParentId() { + return parentId.orElse(null); + } @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getParentId_JsonNullable() { return parentId; } - - @JsonProperty(JSON_PROPERTY_PARENT_ID) - public void setParentId_JsonNullable(JsonNullable parentId) { + @JsonProperty(JSON_PROPERTY_PARENT_ID)public void setParentId_JsonNullable(JsonNullable parentId) { this.parentId = parentId; } - public void setParentId(Long parentId) { this.parentId = JsonNullable.of(parentId); } - public Downtime recurrence(DowntimeRecurrence recurrence) { this.recurrence = JsonNullable.of(recurrence); return this; } /** - * An object defining the recurrence of the downtime. - * + *

An object defining the recurrence of the downtime.

* @return recurrence - */ - @jakarta.annotation.Nullable - @JsonIgnore - public DowntimeRecurrence getRecurrence() { - return recurrence.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public DowntimeRecurrence getRecurrence() { + return recurrence.orElse(null); + } @JsonProperty(JSON_PROPERTY_RECURRENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRecurrence_JsonNullable() { return recurrence; } - - @JsonProperty(JSON_PROPERTY_RECURRENCE) - public void setRecurrence_JsonNullable(JsonNullable recurrence) { + @JsonProperty(JSON_PROPERTY_RECURRENCE)public void setRecurrence_JsonNullable(JsonNullable recurrence) { this.recurrence = recurrence; } - public void setRecurrence(DowntimeRecurrence recurrence) { this.recurrence = JsonNullable.of(recurrence); } - public Downtime scope(List scope) { this.scope = scope; return this; } - public Downtime addScopeItem(String scopeItem) { if (this.scope == null) { this.scope = new ArrayList<>(); @@ -440,94 +419,88 @@ public Downtime addScopeItem(String scopeItem) { } /** - * The scope(s) to which the downtime applies. For example, host:app2. Provide - * multiple scopes as a comma-separated list like env:dev,env:prod. The resulting - * downtime applies to sources that matches ALL provided scopes (env:dev - * AND env:prod). - * + *

The scope(s) to which the downtime applies. For example, host:app2. + * Provide multiple scopes as a comma-separated list like env:dev,env:prod. + * The resulting downtime applies to sources that matches ALL provided scopes (env:dev AND env:prod).

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getScope() { - return scope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getScope() { + return scope; + } public void setScope(List scope) { this.scope = scope; } - public Downtime start(Long start) { this.start = start; return this; } /** - * POSIX timestamp to start the downtime. If not provided, the downtime starts the moment it is - * created. - * + *

POSIX timestamp to start the downtime. + * If not provided, the downtime starts the moment it is created.

* @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } public void setStart(Long start) { this.start = start; } - public Downtime timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone in which to display the downtime's start and end times in Datadog applications. - * + *

The timezone in which to display the downtime's start and end times in Datadog applications.

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } /** - * ID of the last user that updated the downtime. maximum: 2147483647 - * + *

ID of the last user that updated the downtime.

+ * maximum: 2147483647 * @return updaterId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Integer getUpdaterId() { - - if (updaterId == null) { - updaterId = JsonNullable.undefined(); - } - return updaterId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Integer getUpdaterId() { + + if (updaterId == null) { + updaterId = JsonNullable.undefined(); + } + return updaterId.orElse(null); + } @JsonProperty(JSON_PROPERTY_UPDATER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getUpdaterId_JsonNullable() { return updaterId; } - - @JsonProperty(JSON_PROPERTY_UPDATER_ID) - private void setUpdaterId_JsonNullable(JsonNullable updaterId) { + @JsonProperty(JSON_PROPERTY_UPDATER_ID)private void setUpdaterId_JsonNullable(JsonNullable updaterId) { this.updaterId = updaterId; } - /** Return true if this Downtime object is equal to o. */ + /** + * Return true if this Downtime object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -537,48 +510,13 @@ public boolean equals(Object o) { return false; } Downtime downtime = (Downtime) o; - return Objects.equals(this.active, downtime.active) - && Objects.equals(this.activeChild, downtime.activeChild) - && Objects.equals(this.canceled, downtime.canceled) - && Objects.equals(this.creatorId, downtime.creatorId) - && Objects.equals(this.disabled, downtime.disabled) - && Objects.equals(this.downtimeType, downtime.downtimeType) - && Objects.equals(this.end, downtime.end) - && Objects.equals(this.id, downtime.id) - && Objects.equals(this.message, downtime.message) - && Objects.equals(this.monitorId, downtime.monitorId) - && Objects.equals(this.monitorTags, downtime.monitorTags) - && Objects.equals( - this.muteFirstRecoveryNotification, downtime.muteFirstRecoveryNotification) - && Objects.equals(this.parentId, downtime.parentId) - && Objects.equals(this.recurrence, downtime.recurrence) - && Objects.equals(this.scope, downtime.scope) - && Objects.equals(this.start, downtime.start) - && Objects.equals(this.timezone, downtime.timezone) - && Objects.equals(this.updaterId, downtime.updaterId); + return Objects.equals(this.active, downtime.active) && Objects.equals(this.activeChild, downtime.activeChild) && Objects.equals(this.canceled, downtime.canceled) && Objects.equals(this.creatorId, downtime.creatorId) && Objects.equals(this.disabled, downtime.disabled) && Objects.equals(this.downtimeType, downtime.downtimeType) && Objects.equals(this.end, downtime.end) && Objects.equals(this.id, downtime.id) && Objects.equals(this.message, downtime.message) && Objects.equals(this.monitorId, downtime.monitorId) && Objects.equals(this.monitorTags, downtime.monitorTags) && Objects.equals(this.muteFirstRecoveryNotification, downtime.muteFirstRecoveryNotification) && Objects.equals(this.parentId, downtime.parentId) && Objects.equals(this.recurrence, downtime.recurrence) && Objects.equals(this.scope, downtime.scope) && Objects.equals(this.start, downtime.start) && Objects.equals(this.timezone, downtime.timezone) && Objects.equals(this.updaterId, downtime.updaterId); } + @Override public int hashCode() { - return Objects.hash( - active, - activeChild, - canceled, - creatorId, - disabled, - downtimeType, - end, - id, - message, - monitorId, - monitorTags, - muteFirstRecoveryNotification, - parentId, - recurrence, - scope, - start, - timezone, - updaterId); + return Objects.hash(active,activeChild,canceled,creatorId,disabled,downtimeType,end,id,message,monitorId,monitorTags,muteFirstRecoveryNotification,parentId,recurrence,scope,start,timezone,updaterId); } @Override @@ -596,9 +534,7 @@ public String toString() { sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); sb.append(" monitorTags: ").append(toIndentedString(monitorTags)).append("\n"); - sb.append(" muteFirstRecoveryNotification: ") - .append(toIndentedString(muteFirstRecoveryNotification)) - .append("\n"); + sb.append(" muteFirstRecoveryNotification: ").append(toIndentedString(muteFirstRecoveryNotification)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); sb.append(" recurrence: ").append(toIndentedString(recurrence)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); @@ -610,7 +546,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DowntimeChild.java b/src/main/java/com/datadog/api/client/v1/model/DowntimeChild.java index af3b3af9e0a..c02699066fc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DowntimeChild.java +++ b/src/main/java/com/datadog/api/client/v1/model/DowntimeChild.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * The downtime object definition of the active child for the original parent recurring downtime. - * This field will only exist on recurring downtimes. + *

The downtime object definition of the active child for the original parent recurring downtime. This + * field will only exist on recurring downtimes.

*/ @JsonPropertyOrder({ DowntimeChild.JSON_PROPERTY_ACTIVE, @@ -38,10 +53,10 @@ DowntimeChild.JSON_PROPERTY_TIMEZONE, DowntimeChild.JSON_PROPERTY_UPDATER_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DowntimeChild { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACTIVE = "active"; private Boolean active; @@ -72,16 +87,14 @@ public class DowntimeChild { public static final String JSON_PROPERTY_MONITOR_TAGS = "monitor_tags"; private List monitorTags = null; - public static final String JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION = - "mute_first_recovery_notification"; + public static final String JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION = "mute_first_recovery_notification"; private Boolean muteFirstRecoveryNotification; public static final String JSON_PROPERTY_PARENT_ID = "parent_id"; private JsonNullable parentId = JsonNullable.undefined(); public static final String JSON_PROPERTY_RECURRENCE = "recurrence"; - private JsonNullable recurrence = - JsonNullable.undefined(); + private JsonNullable recurrence = JsonNullable.undefined(); public static final String JSON_PROPERTY_SCOPE = "scope"; private List scope = null; @@ -95,194 +108,178 @@ public class DowntimeChild { public static final String JSON_PROPERTY_UPDATER_ID = "updater_id"; private JsonNullable updaterId = JsonNullable.undefined(); + /** - * If a scheduled downtime currently exists. - * + *

If a scheduled downtime currently exists.

* @return active - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getActive() { - return active; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getActive() { + return active; + } /** - * If a scheduled downtime is canceled. - * + *

If a scheduled downtime is canceled.

* @return canceled - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getCanceled() { - - if (canceled == null) { - canceled = JsonNullable.undefined(); - } - return canceled.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getCanceled() { + + if (canceled == null) { + canceled = JsonNullable.undefined(); + } + return canceled.orElse(null); + } @JsonProperty(JSON_PROPERTY_CANCELED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCanceled_JsonNullable() { return canceled; } - - @JsonProperty(JSON_PROPERTY_CANCELED) - private void setCanceled_JsonNullable(JsonNullable canceled) { + @JsonProperty(JSON_PROPERTY_CANCELED)private void setCanceled_JsonNullable(JsonNullable canceled) { this.canceled = canceled; } /** - * User ID of the downtime creator. maximum: 2147483647 - * + *

User ID of the downtime creator.

+ * maximum: 2147483647 * @return creatorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatorId() { - return creatorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCreatorId() { + return creatorId; + } public DowntimeChild disabled(Boolean disabled) { this.disabled = disabled; return this; } /** - * If a downtime has been disabled. - * + *

If a downtime has been disabled.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } /** - * 0 for a downtime applied on * or all, 1 when the - * downtime is only scoped to hosts, or 2 when the downtime is scoped to anything but - * hosts. maximum: 2147483647 - * + *

0 for a downtime applied on * or all, + * 1 when the downtime is only scoped to hosts, + * or 2 when the downtime is scoped to anything but hosts.

+ * maximum: 2147483647 * @return downtimeType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOWNTIME_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDowntimeType() { - return downtimeType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOWNTIME_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDowntimeType() { + return downtimeType; + } public DowntimeChild end(Long end) { this.end = JsonNullable.of(end); return this; } /** - * POSIX timestamp to end the downtime. If not provided, the downtime is in effect indefinitely - * until you cancel it. - * + *

POSIX timestamp to end the downtime. If not provided, + * the downtime is in effect indefinitely until you cancel it.

* @return end - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getEnd() { - return end.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getEnd() { + return end.orElse(null); + } @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getEnd_JsonNullable() { return end; } - - @JsonProperty(JSON_PROPERTY_END) - public void setEnd_JsonNullable(JsonNullable end) { + @JsonProperty(JSON_PROPERTY_END)public void setEnd_JsonNullable(JsonNullable end) { this.end = end; } - public void setEnd(Long end) { this.end = JsonNullable.of(end); } /** - * The downtime ID. - * + *

The downtime ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public DowntimeChild message(String message) { this.message = message; return this; } /** - * A message to include with notifications for this downtime. Email notifications can be sent to - * specific users by using the same @username notation as events. - * + *

A message to include with notifications for this downtime. + * Email notifications can be sent to specific users by using the same @username notation as events.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public DowntimeChild monitorId(Long monitorId) { this.monitorId = JsonNullable.of(monitorId); return this; } /** - * A single monitor to which the downtime applies. If not provided, the downtime applies to all - * monitors. - * + *

A single monitor to which the downtime applies. + * If not provided, the downtime applies to all monitors.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getMonitorId() { - return monitorId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getMonitorId() { + return monitorId.orElse(null); + } @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMonitorId_JsonNullable() { return monitorId; } - - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - public void setMonitorId_JsonNullable(JsonNullable monitorId) { + @JsonProperty(JSON_PROPERTY_MONITOR_ID)public void setMonitorId_JsonNullable(JsonNullable monitorId) { this.monitorId = monitorId; } - public void setMonitorId(Long monitorId) { this.monitorId = JsonNullable.of(monitorId); } - public DowntimeChild monitorTags(List monitorTags) { this.monitorTags = monitorTags; return this; } - public DowntimeChild addMonitorTagsItem(String monitorTagsItem) { if (this.monitorTags == null) { this.monitorTags = new ArrayList<>(); @@ -292,113 +289,97 @@ public DowntimeChild addMonitorTagsItem(String monitorTagsItem) { } /** - * A comma-separated list of monitor tags. For example, tags that are applied directly to - * monitors, not tags that are used in monitor queries (which are filtered by the scope - * parameter), to which the downtime applies. The resulting downtime applies to monitors that - * match ALL provided monitor tags. For example, service:postgres - * AND team:frontend. - * + *

A comma-separated list of monitor tags. For example, tags that are applied directly to monitors, + * not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. + * The resulting downtime applies to monitors that match ALL provided monitor tags. + * For example, service:postgres AND team:frontend.

* @return monitorTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorTags() { - return monitorTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorTags() { + return monitorTags; + } public void setMonitorTags(List monitorTags) { this.monitorTags = monitorTags; } - public DowntimeChild muteFirstRecoveryNotification(Boolean muteFirstRecoveryNotification) { this.muteFirstRecoveryNotification = muteFirstRecoveryNotification; return this; } /** - * If the first recovery notification during a downtime should be muted. - * + *

If the first recovery notification during a downtime should be muted.

* @return muteFirstRecoveryNotification - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMuteFirstRecoveryNotification() { - return muteFirstRecoveryNotification; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MUTE_FIRST_RECOVERY_NOTIFICATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMuteFirstRecoveryNotification() { + return muteFirstRecoveryNotification; + } public void setMuteFirstRecoveryNotification(Boolean muteFirstRecoveryNotification) { this.muteFirstRecoveryNotification = muteFirstRecoveryNotification; } - public DowntimeChild parentId(Long parentId) { this.parentId = JsonNullable.of(parentId); return this; } /** - * ID of the parent Downtime. - * + *

ID of the parent Downtime.

* @return parentId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getParentId() { - return parentId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getParentId() { + return parentId.orElse(null); + } @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getParentId_JsonNullable() { return parentId; } - - @JsonProperty(JSON_PROPERTY_PARENT_ID) - public void setParentId_JsonNullable(JsonNullable parentId) { + @JsonProperty(JSON_PROPERTY_PARENT_ID)public void setParentId_JsonNullable(JsonNullable parentId) { this.parentId = parentId; } - public void setParentId(Long parentId) { this.parentId = JsonNullable.of(parentId); } - public DowntimeChild recurrence(DowntimeRecurrence recurrence) { this.recurrence = JsonNullable.of(recurrence); return this; } /** - * An object defining the recurrence of the downtime. - * + *

An object defining the recurrence of the downtime.

* @return recurrence - */ - @jakarta.annotation.Nullable - @JsonIgnore - public DowntimeRecurrence getRecurrence() { - return recurrence.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public DowntimeRecurrence getRecurrence() { + return recurrence.orElse(null); + } @JsonProperty(JSON_PROPERTY_RECURRENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRecurrence_JsonNullable() { return recurrence; } - - @JsonProperty(JSON_PROPERTY_RECURRENCE) - public void setRecurrence_JsonNullable(JsonNullable recurrence) { + @JsonProperty(JSON_PROPERTY_RECURRENCE)public void setRecurrence_JsonNullable(JsonNullable recurrence) { this.recurrence = recurrence; } - public void setRecurrence(DowntimeRecurrence recurrence) { this.recurrence = JsonNullable.of(recurrence); } - public DowntimeChild scope(List scope) { this.scope = scope; return this; } - public DowntimeChild addScopeItem(String scopeItem) { if (this.scope == null) { this.scope = new ArrayList<>(); @@ -408,94 +389,88 @@ public DowntimeChild addScopeItem(String scopeItem) { } /** - * The scope(s) to which the downtime applies. For example, host:app2. Provide - * multiple scopes as a comma-separated list like env:dev,env:prod. The resulting - * downtime applies to sources that matches ALL provided scopes (env:dev - * AND env:prod). - * + *

The scope(s) to which the downtime applies. For example, host:app2. + * Provide multiple scopes as a comma-separated list like env:dev,env:prod. + * The resulting downtime applies to sources that matches ALL provided scopes (env:dev AND env:prod).

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getScope() { - return scope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getScope() { + return scope; + } public void setScope(List scope) { this.scope = scope; } - public DowntimeChild start(Long start) { this.start = start; return this; } /** - * POSIX timestamp to start the downtime. If not provided, the downtime starts the moment it is - * created. - * + *

POSIX timestamp to start the downtime. + * If not provided, the downtime starts the moment it is created.

* @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } public void setStart(Long start) { this.start = start; } - public DowntimeChild timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone in which to display the downtime's start and end times in Datadog applications. - * + *

The timezone in which to display the downtime's start and end times in Datadog applications.

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } /** - * ID of the last user that updated the downtime. maximum: 2147483647 - * + *

ID of the last user that updated the downtime.

+ * maximum: 2147483647 * @return updaterId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Integer getUpdaterId() { - - if (updaterId == null) { - updaterId = JsonNullable.undefined(); - } - return updaterId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Integer getUpdaterId() { + + if (updaterId == null) { + updaterId = JsonNullable.undefined(); + } + return updaterId.orElse(null); + } @JsonProperty(JSON_PROPERTY_UPDATER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getUpdaterId_JsonNullable() { return updaterId; } - - @JsonProperty(JSON_PROPERTY_UPDATER_ID) - private void setUpdaterId_JsonNullable(JsonNullable updaterId) { + @JsonProperty(JSON_PROPERTY_UPDATER_ID)private void setUpdaterId_JsonNullable(JsonNullable updaterId) { this.updaterId = updaterId; } - /** Return true if this DowntimeChild object is equal to o. */ + /** + * Return true if this DowntimeChild object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -505,46 +480,13 @@ public boolean equals(Object o) { return false; } DowntimeChild downtimeChild = (DowntimeChild) o; - return Objects.equals(this.active, downtimeChild.active) - && Objects.equals(this.canceled, downtimeChild.canceled) - && Objects.equals(this.creatorId, downtimeChild.creatorId) - && Objects.equals(this.disabled, downtimeChild.disabled) - && Objects.equals(this.downtimeType, downtimeChild.downtimeType) - && Objects.equals(this.end, downtimeChild.end) - && Objects.equals(this.id, downtimeChild.id) - && Objects.equals(this.message, downtimeChild.message) - && Objects.equals(this.monitorId, downtimeChild.monitorId) - && Objects.equals(this.monitorTags, downtimeChild.monitorTags) - && Objects.equals( - this.muteFirstRecoveryNotification, downtimeChild.muteFirstRecoveryNotification) - && Objects.equals(this.parentId, downtimeChild.parentId) - && Objects.equals(this.recurrence, downtimeChild.recurrence) - && Objects.equals(this.scope, downtimeChild.scope) - && Objects.equals(this.start, downtimeChild.start) - && Objects.equals(this.timezone, downtimeChild.timezone) - && Objects.equals(this.updaterId, downtimeChild.updaterId); + return Objects.equals(this.active, downtimeChild.active) && Objects.equals(this.canceled, downtimeChild.canceled) && Objects.equals(this.creatorId, downtimeChild.creatorId) && Objects.equals(this.disabled, downtimeChild.disabled) && Objects.equals(this.downtimeType, downtimeChild.downtimeType) && Objects.equals(this.end, downtimeChild.end) && Objects.equals(this.id, downtimeChild.id) && Objects.equals(this.message, downtimeChild.message) && Objects.equals(this.monitorId, downtimeChild.monitorId) && Objects.equals(this.monitorTags, downtimeChild.monitorTags) && Objects.equals(this.muteFirstRecoveryNotification, downtimeChild.muteFirstRecoveryNotification) && Objects.equals(this.parentId, downtimeChild.parentId) && Objects.equals(this.recurrence, downtimeChild.recurrence) && Objects.equals(this.scope, downtimeChild.scope) && Objects.equals(this.start, downtimeChild.start) && Objects.equals(this.timezone, downtimeChild.timezone) && Objects.equals(this.updaterId, downtimeChild.updaterId); } + @Override public int hashCode() { - return Objects.hash( - active, - canceled, - creatorId, - disabled, - downtimeType, - end, - id, - message, - monitorId, - monitorTags, - muteFirstRecoveryNotification, - parentId, - recurrence, - scope, - start, - timezone, - updaterId); + return Objects.hash(active,canceled,creatorId,disabled,downtimeType,end,id,message,monitorId,monitorTags,muteFirstRecoveryNotification,parentId,recurrence,scope,start,timezone,updaterId); } @Override @@ -561,9 +503,7 @@ public String toString() { sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" monitorId: ").append(toIndentedString(monitorId)).append("\n"); sb.append(" monitorTags: ").append(toIndentedString(monitorTags)).append("\n"); - sb.append(" muteFirstRecoveryNotification: ") - .append(toIndentedString(muteFirstRecoveryNotification)) - .append("\n"); + sb.append(" muteFirstRecoveryNotification: ").append(toIndentedString(muteFirstRecoveryNotification)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); sb.append(" recurrence: ").append(toIndentedString(recurrence)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); @@ -575,7 +515,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/DowntimeRecurrence.java b/src/main/java/com/datadog/api/client/v1/model/DowntimeRecurrence.java index 67d2b53bb78..8d7e61c7268 100644 --- a/src/main/java/com/datadog/api/client/v1/model/DowntimeRecurrence.java +++ b/src/main/java/com/datadog/api/client/v1/model/DowntimeRecurrence.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** An object defining the recurrence of the downtime. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

An object defining the recurrence of the downtime.

+ */ @JsonPropertyOrder({ DowntimeRecurrence.JSON_PROPERTY_PERIOD, DowntimeRecurrence.JSON_PROPERTY_RRULE, @@ -24,10 +41,10 @@ DowntimeRecurrence.JSON_PROPERTY_UNTIL_OCCURRENCES, DowntimeRecurrence.JSON_PROPERTY_WEEK_DAYS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DowntimeRecurrence { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PERIOD = "period"; private Integer period; @@ -52,144 +69,122 @@ public DowntimeRecurrence period(Integer period) { } /** - * How often to repeat as an integer. For example, to repeat every 3 days, select a type of - * days and a period of 3. maximum: 2147483647 - * + *

How often to repeat as an integer. + * For example, to repeat every 3 days, select a type of days and a period of 3.

+ * maximum: 2147483647 * @return period - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PERIOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPeriod() { - return period; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERIOD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPeriod() { + return period; + } public void setPeriod(Integer period) { this.period = period; } - public DowntimeRecurrence rrule(String rrule) { this.rrule = rrule; return this; } /** - * The RRULE standard for defining recurring events (requires to set "type" - * to rrule) For example, to have a recurring event on the first day of each month, set - * the type to rrule and set the FREQ to MONTHLY and - * BYMONTHDAY to 1. Most common rrule options from the iCalendar Spec are supported. - * - *

Note: Attributes specifying the duration in RRULE are not - * supported (for example, DTSTART, DTEND, DURATION). More - * examples available in this downtime - * guide - * + *

The RRULE standard for defining recurring events (requires to set "type" to rrule) + * For example, to have a recurring event on the first day of each month, set the type to rrule and set the FREQ to MONTHLY and BYMONTHDAY to 1. + * Most common rrule options from the iCalendar Spec are supported.

+ *

Note: Attributes specifying the duration in RRULE are not supported (for example, DTSTART, DTEND, DURATION). + * More examples available in this downtime guide

* @return rrule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RRULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRrule() { - return rrule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRrule() { + return rrule; + } public void setRrule(String rrule) { this.rrule = rrule; } - public DowntimeRecurrence type(String type) { this.type = type; return this; } /** - * The type of recurrence. Choose from days, weeks, months, - * years, rrule. - * + *

The type of recurrence. Choose from days, weeks, months, years, rrule.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - public DowntimeRecurrence untilDate(Long untilDate) { this.untilDate = JsonNullable.of(untilDate); return this; } /** - * The date at which the recurrence should end as a POSIX timestamp. until_occurences - * and until_date are mutually exclusive. - * + *

The date at which the recurrence should end as a POSIX timestamp. + * until_occurences and until_date are mutually exclusive.

* @return untilDate - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getUntilDate() { - return untilDate.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getUntilDate() { + return untilDate.orElse(null); + } @JsonProperty(JSON_PROPERTY_UNTIL_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getUntilDate_JsonNullable() { return untilDate; } - - @JsonProperty(JSON_PROPERTY_UNTIL_DATE) - public void setUntilDate_JsonNullable(JsonNullable untilDate) { + @JsonProperty(JSON_PROPERTY_UNTIL_DATE)public void setUntilDate_JsonNullable(JsonNullable untilDate) { this.untilDate = untilDate; } - public void setUntilDate(Long untilDate) { this.untilDate = JsonNullable.of(untilDate); } - public DowntimeRecurrence untilOccurrences(Integer untilOccurrences) { this.untilOccurrences = JsonNullable.of(untilOccurrences); return this; } /** - * How many times the downtime is rescheduled. until_occurences and until_date - * are mutually exclusive. maximum: 2147483647 - * + *

How many times the downtime is rescheduled. + * until_occurences and until_date are mutually exclusive.

+ * maximum: 2147483647 * @return untilOccurrences - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Integer getUntilOccurrences() { - return untilOccurrences.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Integer getUntilOccurrences() { + return untilOccurrences.orElse(null); + } @JsonProperty(JSON_PROPERTY_UNTIL_OCCURRENCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getUntilOccurrences_JsonNullable() { return untilOccurrences; } - - @JsonProperty(JSON_PROPERTY_UNTIL_OCCURRENCES) - public void setUntilOccurrences_JsonNullable(JsonNullable untilOccurrences) { + @JsonProperty(JSON_PROPERTY_UNTIL_OCCURRENCES)public void setUntilOccurrences_JsonNullable(JsonNullable untilOccurrences) { this.untilOccurrences = untilOccurrences; } - public void setUntilOccurrences(Integer untilOccurrences) { this.untilOccurrences = JsonNullable.of(untilOccurrences); } - public DowntimeRecurrence weekDays(List weekDays) { this.weekDays = JsonNullable.>of(weekDays); return this; } - public DowntimeRecurrence addWeekDaysItem(String weekDaysItem) { if (this.weekDays == null || !this.weekDays.isPresent()) { this.weekDays = JsonNullable.>of(new ArrayList<>()); @@ -203,34 +198,31 @@ public DowntimeRecurrence addWeekDaysItem(String weekDaysItem) { } /** - * A list of week days to repeat on. Choose from Mon, Tue, Wed - * , Thu, Fri, Sat or Sun. Only - * applicable when type is weeks. First letter must be capitalized. - * + *

A list of week days to repeat on. Choose from Mon, Tue, Wed, Thu, Fri, Sat or Sun. + * Only applicable when type is weeks. First letter must be capitalized.

* @return weekDays - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getWeekDays() { - return weekDays.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getWeekDays() { + return weekDays.orElse(null); + } @JsonProperty(JSON_PROPERTY_WEEK_DAYS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getWeekDays_JsonNullable() { return weekDays; } - - @JsonProperty(JSON_PROPERTY_WEEK_DAYS) - public void setWeekDays_JsonNullable(JsonNullable> weekDays) { + @JsonProperty(JSON_PROPERTY_WEEK_DAYS)public void setWeekDays_JsonNullable(JsonNullable> weekDays) { this.weekDays = weekDays; } - public void setWeekDays(List weekDays) { this.weekDays = JsonNullable.>of(weekDays); } - /** Return true if this DowntimeRecurrence object is equal to o. */ + /** + * Return true if this DowntimeRecurrence object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -240,17 +232,13 @@ public boolean equals(Object o) { return false; } DowntimeRecurrence downtimeRecurrence = (DowntimeRecurrence) o; - return Objects.equals(this.period, downtimeRecurrence.period) - && Objects.equals(this.rrule, downtimeRecurrence.rrule) - && Objects.equals(this.type, downtimeRecurrence.type) - && Objects.equals(this.untilDate, downtimeRecurrence.untilDate) - && Objects.equals(this.untilOccurrences, downtimeRecurrence.untilOccurrences) - && Objects.equals(this.weekDays, downtimeRecurrence.weekDays); + return Objects.equals(this.period, downtimeRecurrence.period) && Objects.equals(this.rrule, downtimeRecurrence.rrule) && Objects.equals(this.type, downtimeRecurrence.type) && Objects.equals(this.untilDate, downtimeRecurrence.untilDate) && Objects.equals(this.untilOccurrences, downtimeRecurrence.untilOccurrences) && Objects.equals(this.weekDays, downtimeRecurrence.weekDays); } + @Override public int hashCode() { - return Objects.hash(period, rrule, type, untilDate, untilOccurrences, weekDays); + return Objects.hash(period,rrule,type,untilDate,untilOccurrences,weekDays); } @Override @@ -268,7 +256,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Event.java b/src/main/java/com/datadog/api/client/v1/model/Event.java index 3791a569e9e..027ca0827b7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Event.java +++ b/src/main/java/com/datadog/api/client/v1/model/Event.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Object representing an event. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object representing an event.

+ */ @JsonPropertyOrder({ Event.JSON_PROPERTY_ALERT_TYPE, Event.JSON_PROPERTY_DATE_HAPPENED, @@ -31,10 +48,10 @@ Event.JSON_PROPERTY_TITLE, Event.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Event { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALERT_TYPE = "alert_type"; private EventAlertType alertType; @@ -81,191 +98,173 @@ public Event alertType(EventAlertType alertType) { } /** - * If an alert event is enabled, set its type. For example, error, warning - * , info, success, user_update, - * recommendation, and snapshot. - * + *

If an alert event is enabled, set its type. + * For example, error, warning, info, success, user_update, + * recommendation, and snapshot.

* @return alertType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALERT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventAlertType getAlertType() { - return alertType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERT_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventAlertType getAlertType() { + return alertType; + } public void setAlertType(EventAlertType alertType) { if (!alertType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.alertType = alertType; } - public Event dateHappened(Long dateHappened) { this.dateHappened = dateHappened; return this; } /** - * POSIX timestamp of the event. Must be sent as an integer (that is no quotes). Limited to events - * no older than 18 hours. - * + *

POSIX timestamp of the event. Must be sent as an integer (that is no quotes). + * Limited to events no older than 18 hours.

* @return dateHappened - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE_HAPPENED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDateHappened() { - return dateHappened; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_HAPPENED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDateHappened() { + return dateHappened; + } public void setDateHappened(Long dateHappened) { this.dateHappened = dateHappened; } - public Event deviceName(String deviceName) { this.deviceName = deviceName; return this; } /** - * A device name. - * + *

A device name.

* @return deviceName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDeviceName() { - return deviceName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDeviceName() { + return deviceName; + } public void setDeviceName(String deviceName) { this.deviceName = deviceName; } - public Event host(String host) { this.host = host; return this; } /** - * Host name to associate with the event. Any tags associated with the host are also applied to - * this event. - * + *

Host name to associate with the event. + * Any tags associated with the host are also applied to this event.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } /** - * Integer ID of the event. - * + *

Integer ID of the event.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } /** - * Handling IDs as large 64-bit numbers can cause loss of accuracy issues with some programming - * languages. Instead, use the string representation of the Event ID to avoid losing accuracy. - * + *

Handling IDs as large 64-bit numbers can cause loss of accuracy issues with some programming languages. + * Instead, use the string representation of the Event ID to avoid losing accuracy.

* @return idStr - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID_STR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIdStr() { - return idStr; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID_STR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIdStr() { + return idStr; + } /** - * Payload of the event. - * + *

Payload of the event.

* @return payload - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPayload() { - return payload; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPayload() { + return payload; + } public Event priority(EventPriority priority) { this.priority = JsonNullable.of(priority); return this; } /** - * The priority of the event. For example, normal or low. - * + *

The priority of the event. For example, normal or low.

* @return priority - */ - @jakarta.annotation.Nullable - @JsonIgnore - public EventPriority getPriority() { - return priority.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public EventPriority getPriority() { + return priority.orElse(null); + } @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPriority_JsonNullable() { return priority; } - - @JsonProperty(JSON_PROPERTY_PRIORITY) - public void setPriority_JsonNullable(JsonNullable priority) { + @JsonProperty(JSON_PROPERTY_PRIORITY)public void setPriority_JsonNullable(JsonNullable priority) { this.priority = priority; } - public void setPriority(EventPriority priority) { if (!priority.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.priority = JsonNullable.of(priority); } - public Event sourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; return this; } /** - * The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, - * puppet, git, bitbucket, etc. The list of standard source attribute values available - * here. - * + *

The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc. + * The list of standard source attribute values available here.

* @return sourceTypeName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceTypeName() { - return sourceTypeName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceTypeName() { + return sourceTypeName; + } public void setSourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; } - public Event tags(List tags) { this.tags = tags; return this; } - public Event addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -275,78 +274,75 @@ public Event addTagsItem(String tagsItem) { } /** - * A list of tags to apply to the event. - * + *

A list of tags to apply to the event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public Event text(String text) { this.text = text; return this; } /** - * The body of the event. Limited to 4000 characters. The text supports markdown. To use markdown - * in the event text, start the text block with %%% \n and end the text block with - * \n %%%. Use msg_text with the Datadog Ruby library. - * + *

The body of the event. Limited to 4000 characters. The text supports markdown. + * To use markdown in the event text, start the text block with %%% \n and end the text block with \n %%%. + * Use msg_text with the Datadog Ruby library.

* @return text - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getText() { - return text; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getText() { + return text; + } public void setText(String text) { this.text = text; } - public Event title(String title) { this.title = title; return this; } /** - * The event title. - * + *

The event title.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } /** - * URL of the event. - * + *

URL of the event.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } - /** Return true if this Event object is equal to o. */ + /** + * Return true if this Event object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -356,37 +352,13 @@ public boolean equals(Object o) { return false; } Event event = (Event) o; - return Objects.equals(this.alertType, event.alertType) - && Objects.equals(this.dateHappened, event.dateHappened) - && Objects.equals(this.deviceName, event.deviceName) - && Objects.equals(this.host, event.host) - && Objects.equals(this.id, event.id) - && Objects.equals(this.idStr, event.idStr) - && Objects.equals(this.payload, event.payload) - && Objects.equals(this.priority, event.priority) - && Objects.equals(this.sourceTypeName, event.sourceTypeName) - && Objects.equals(this.tags, event.tags) - && Objects.equals(this.text, event.text) - && Objects.equals(this.title, event.title) - && Objects.equals(this.url, event.url); + return Objects.equals(this.alertType, event.alertType) && Objects.equals(this.dateHappened, event.dateHappened) && Objects.equals(this.deviceName, event.deviceName) && Objects.equals(this.host, event.host) && Objects.equals(this.id, event.id) && Objects.equals(this.idStr, event.idStr) && Objects.equals(this.payload, event.payload) && Objects.equals(this.priority, event.priority) && Objects.equals(this.sourceTypeName, event.sourceTypeName) && Objects.equals(this.tags, event.tags) && Objects.equals(this.text, event.text) && Objects.equals(this.title, event.title) && Objects.equals(this.url, event.url); } + @Override public int hashCode() { - return Objects.hash( - alertType, - dateHappened, - deviceName, - host, - id, - idStr, - payload, - priority, - sourceTypeName, - tags, - text, - title, - url); + return Objects.hash(alertType,dateHappened,deviceName,host,id,idStr,payload,priority,sourceTypeName,tags,text,title,url); } @Override @@ -411,7 +383,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventAlertType.java b/src/main/java/com/datadog/api/client/v1/model/EventAlertType.java index 6b8d4dcd6f2..0283954e00b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventAlertType.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventAlertType.java @@ -6,23 +6,45 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * If an alert event is enabled, set its type. For example, error, warning - * , info, success, user_update, recommendation, - * and snapshot. + *

If an alert event is enabled, set its type. + * For example, error, warning, info, success, user_update, + * recommendation, and snapshot.

*/ @JsonSerialize(using = EventAlertType.EventAlertTypeSerializer.class) public class EventAlertType { @@ -35,10 +57,7 @@ public class EventAlertType { public static final EventAlertType RECOMMENDATION = new EventAlertType("recommendation"); public static final EventAlertType SNAPSHOT = new EventAlertType("snapshot"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "error", "warning", "info", "success", "user_update", "recommendation", "snapshot")); + private static final Set allowedValues = new HashSet(Arrays.asList("error", "warning", "info", "success", "user_update", "recommendation", "snapshot")); private String value; @@ -51,19 +70,18 @@ public boolean isValid() { } public static class EventAlertTypeSerializer extends StdSerializer { - public EventAlertTypeSerializer(Class t) { - super(t); - } - - public EventAlertTypeSerializer() { - this(null); - } - - @Override - public void serialize(EventAlertType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventAlertTypeSerializer(Class t) { + super(t); + } + + public EventAlertTypeSerializer() { + this(null); + } + + @Override + public void serialize(EventAlertType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -75,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventAlertType object is equal to o. */ + /** + * Return true if this EventAlertType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/EventCreateRequest.java b/src/main/java/com/datadog/api/client/v1/model/EventCreateRequest.java index b9f231dce4c..2fa18219184 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventCreateRequest.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Object representing an event. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object representing an event.

+ */ @JsonPropertyOrder({ EventCreateRequest.JSON_PROPERTY_AGGREGATION_KEY, EventCreateRequest.JSON_PROPERTY_ALERT_TYPE, @@ -30,10 +46,10 @@ EventCreateRequest.JSON_PROPERTY_TEXT, EventCreateRequest.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION_KEY = "aggregation_key"; private String aggregationKey; @@ -71,34 +87,31 @@ public EventCreateRequest() {} @JsonCreator public EventCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_TEXT) String text, - @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { - this.text = text; - this.title = title; + @JsonProperty(required=true, value=JSON_PROPERTY_TEXT)String text, + @JsonProperty(required=true, value=JSON_PROPERTY_TITLE)String title) { + this.text = text; + this.title = title; } - public EventCreateRequest aggregationKey(String aggregationKey) { this.aggregationKey = aggregationKey; return this; } /** - * An arbitrary string to use for aggregation. Limited to 100 characters. If you specify a key, - * all events using that key are grouped together in the Event Stream. - * + *

An arbitrary string to use for aggregation. Limited to 100 characters. + * If you specify a key, all events using that key are grouped together in the Event Stream.

* @return aggregationKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAggregationKey() { - return aggregationKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAggregationKey() { + return aggregationKey; + } public void setAggregationKey(String aggregationKey) { this.aggregationKey = aggregationKey; } - public EventCreateRequest alertType(EventAlertType alertType) { this.alertType = alertType; this.unparsed |= !alertType.isValid(); @@ -106,175 +119,155 @@ public EventCreateRequest alertType(EventAlertType alertType) { } /** - * If an alert event is enabled, set its type. For example, error, warning - * , info, success, user_update, - * recommendation, and snapshot. - * + *

If an alert event is enabled, set its type. + * For example, error, warning, info, success, user_update, + * recommendation, and snapshot.

* @return alertType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALERT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventAlertType getAlertType() { - return alertType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERT_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventAlertType getAlertType() { + return alertType; + } public void setAlertType(EventAlertType alertType) { if (!alertType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.alertType = alertType; } - public EventCreateRequest dateHappened(Long dateHappened) { this.dateHappened = dateHappened; return this; } /** - * POSIX timestamp of the event. Must be sent as an integer (that is no quotes). Limited to events - * no older than 18 hours - * + *

POSIX timestamp of the event. Must be sent as an integer (that is no quotes). + * Limited to events no older than 18 hours

* @return dateHappened - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE_HAPPENED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDateHappened() { - return dateHappened; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_HAPPENED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDateHappened() { + return dateHappened; + } public void setDateHappened(Long dateHappened) { this.dateHappened = dateHappened; } - public EventCreateRequest deviceName(String deviceName) { this.deviceName = deviceName; return this; } /** - * A device name. - * + *

A device name.

* @return deviceName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDeviceName() { - return deviceName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDeviceName() { + return deviceName; + } public void setDeviceName(String deviceName) { this.deviceName = deviceName; } - public EventCreateRequest host(String host) { this.host = host; return this; } /** - * Host name to associate with the event. Any tags associated with the host are also applied to - * this event. - * + *

Host name to associate with the event. + * Any tags associated with the host are also applied to this event.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public EventCreateRequest priority(EventPriority priority) { this.priority = JsonNullable.of(priority); return this; } /** - * The priority of the event. For example, normal or low. - * + *

The priority of the event. For example, normal or low.

* @return priority - */ - @jakarta.annotation.Nullable - @JsonIgnore - public EventPriority getPriority() { - return priority.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public EventPriority getPriority() { + return priority.orElse(null); + } @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPriority_JsonNullable() { return priority; } - - @JsonProperty(JSON_PROPERTY_PRIORITY) - public void setPriority_JsonNullable(JsonNullable priority) { + @JsonProperty(JSON_PROPERTY_PRIORITY)public void setPriority_JsonNullable(JsonNullable priority) { this.priority = priority; } - public void setPriority(EventPriority priority) { if (!priority.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.priority = JsonNullable.of(priority); } - public EventCreateRequest relatedEventId(Long relatedEventId) { this.relatedEventId = relatedEventId; return this; } /** - * ID of the parent event. Must be sent as an integer (that is no quotes). - * + *

ID of the parent event. Must be sent as an integer (that is no quotes).

* @return relatedEventId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATED_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRelatedEventId() { - return relatedEventId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATED_EVENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRelatedEventId() { + return relatedEventId; + } public void setRelatedEventId(Long relatedEventId) { this.relatedEventId = relatedEventId; } - public EventCreateRequest sourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; return this; } /** - * The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, - * puppet, git, bitbucket, etc. A complete list of source attribute values available - * here. - * + *

The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc. + * A complete list of source attribute values available here.

* @return sourceTypeName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceTypeName() { - return sourceTypeName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceTypeName() { + return sourceTypeName; + } public void setSourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; } - public EventCreateRequest tags(List tags) { this.tags = tags; return this; } - public EventCreateRequest addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -284,64 +277,61 @@ public EventCreateRequest addTagsItem(String tagsItem) { } /** - * A list of tags to apply to the event. - * + *

A list of tags to apply to the event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public EventCreateRequest text(String text) { this.text = text; return this; } /** - * The body of the event. Limited to 4000 characters. The text supports markdown. To use markdown - * in the event text, start the text block with %%% \n and end the text block with - * \n %%%. Use msg_text with the Datadog Ruby library. - * + *

The body of the event. Limited to 4000 characters. The text supports markdown. + * To use markdown in the event text, start the text block with %%% \n and end the text block with \n %%%. + * Use msg_text with the Datadog Ruby library.

* @return text - */ - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getText() { - return text; - } - + **/ + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getText() { + return text; + } public void setText(String text) { this.text = text; } - public EventCreateRequest title(String title) { this.title = title; return this; } /** - * The event title. - * + *

The event title.

* @return title - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - + **/ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this EventCreateRequest object is equal to o. */ + /** + * Return true if this EventCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -351,33 +341,13 @@ public boolean equals(Object o) { return false; } EventCreateRequest eventCreateRequest = (EventCreateRequest) o; - return Objects.equals(this.aggregationKey, eventCreateRequest.aggregationKey) - && Objects.equals(this.alertType, eventCreateRequest.alertType) - && Objects.equals(this.dateHappened, eventCreateRequest.dateHappened) - && Objects.equals(this.deviceName, eventCreateRequest.deviceName) - && Objects.equals(this.host, eventCreateRequest.host) - && Objects.equals(this.priority, eventCreateRequest.priority) - && Objects.equals(this.relatedEventId, eventCreateRequest.relatedEventId) - && Objects.equals(this.sourceTypeName, eventCreateRequest.sourceTypeName) - && Objects.equals(this.tags, eventCreateRequest.tags) - && Objects.equals(this.text, eventCreateRequest.text) - && Objects.equals(this.title, eventCreateRequest.title); + return Objects.equals(this.aggregationKey, eventCreateRequest.aggregationKey) && Objects.equals(this.alertType, eventCreateRequest.alertType) && Objects.equals(this.dateHappened, eventCreateRequest.dateHappened) && Objects.equals(this.deviceName, eventCreateRequest.deviceName) && Objects.equals(this.host, eventCreateRequest.host) && Objects.equals(this.priority, eventCreateRequest.priority) && Objects.equals(this.relatedEventId, eventCreateRequest.relatedEventId) && Objects.equals(this.sourceTypeName, eventCreateRequest.sourceTypeName) && Objects.equals(this.tags, eventCreateRequest.tags) && Objects.equals(this.text, eventCreateRequest.text) && Objects.equals(this.title, eventCreateRequest.title); } + @Override public int hashCode() { - return Objects.hash( - aggregationKey, - alertType, - dateHappened, - deviceName, - host, - priority, - relatedEventId, - sourceTypeName, - tags, - text, - title); + return Objects.hash(aggregationKey,alertType,dateHappened,deviceName,host,priority,relatedEventId,sourceTypeName,tags,text,title); } @Override @@ -400,7 +370,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventCreateResponse.java b/src/main/java/com/datadog/api/client/v1/model/EventCreateResponse.java index ba9658fd866..17dc18b042a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventCreateResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventCreateResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing an event response. */ + +/** + *

Object containing an event response.

+ */ @JsonPropertyOrder({ EventCreateResponse.JSON_PROPERTY_EVENT, EventCreateResponse.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventCreateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EVENT = "event"; private Event event; @@ -34,43 +54,42 @@ public EventCreateResponse event(Event event) { } /** - * Object representing an event. - * + *

Object representing an event.

* @return event - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Event getEvent() { - return event; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Event getEvent() { + return event; + } public void setEvent(Event event) { this.event = event; } - public EventCreateResponse status(String status) { this.status = status; return this; } /** - * A status. - * + *

A status.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this EventCreateResponse object is equal to o. */ + /** + * Return true if this EventCreateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +99,13 @@ public boolean equals(Object o) { return false; } EventCreateResponse eventCreateResponse = (EventCreateResponse) o; - return Objects.equals(this.event, eventCreateResponse.event) - && Objects.equals(this.status, eventCreateResponse.status); + return Objects.equals(this.event, eventCreateResponse.event) && Objects.equals(this.status, eventCreateResponse.status); } + @Override public int hashCode() { - return Objects.hash(event, status); + return Objects.hash(event,status); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventListResponse.java b/src/main/java/com/datadog/api/client/v1/model/EventListResponse.java index 0b260fd8a9f..6b17a102326 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventListResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An event list response. */ -@JsonPropertyOrder({EventListResponse.JSON_PROPERTY_EVENTS, EventListResponse.JSON_PROPERTY_STATUS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

An event list response.

+ */ +@JsonPropertyOrder({ + EventListResponse.JSON_PROPERTY_EVENTS, + EventListResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EVENTS = "events"; private List events = null; @@ -33,7 +54,6 @@ public EventListResponse events(List events) { } return this; } - public EventListResponse addEventsItem(Event eventsItem) { if (this.events == null) { this.events = new ArrayList<>(); @@ -44,43 +64,42 @@ public EventListResponse addEventsItem(Event eventsItem) { } /** - * An array of events. - * + *

An array of events.

* @return events - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEvents() { - return events; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } public void setEvents(List events) { this.events = events; } - public EventListResponse status(String status) { this.status = status; return this; } /** - * A status. - * + *

A status.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this EventListResponse object is equal to o. */ + /** + * Return true if this EventListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,13 +109,13 @@ public boolean equals(Object o) { return false; } EventListResponse eventListResponse = (EventListResponse) o; - return Objects.equals(this.events, eventListResponse.events) - && Objects.equals(this.status, eventListResponse.status); + return Objects.equals(this.events, eventListResponse.events) && Objects.equals(this.status, eventListResponse.status); } + @Override public int hashCode() { - return Objects.hash(events, status); + return Objects.hash(events,status); } @Override @@ -110,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventPriority.java b/src/main/java/com/datadog/api/client/v1/model/EventPriority.java index 1c611897dea..3402f981460 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventPriority.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventPriority.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The priority of the event. For example, normal or low. */ +/** + *

The priority of the event. For example, normal or low.

+ */ @JsonSerialize(using = EventPriority.EventPrioritySerializer.class) public class EventPriority { public static final EventPriority NORMAL = new EventPriority("normal"); public static final EventPriority LOW = new EventPriority("low"); - private static final Set allowedValues = - new HashSet(Arrays.asList("normal", "low")); + private static final Set allowedValues = new HashSet(Arrays.asList("normal", "low")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class EventPrioritySerializer extends StdSerializer { - public EventPrioritySerializer(Class t) { - super(t); - } - - public EventPrioritySerializer() { - this(null); - } - - @Override - public void serialize(EventPriority value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventPrioritySerializer(Class t) { + super(t); + } + + public EventPrioritySerializer() { + this(null); + } + + @Override + public void serialize(EventPriority value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventPriority object is equal to o. */ + /** + * Return true if this EventPriority object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/EventQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/EventQueryDefinition.java index b03e331f69d..24dc9d24fda 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventQueryDefinition.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The event query. */ + +/** + *

The event query.

+ */ @JsonPropertyOrder({ EventQueryDefinition.JSON_PROPERTY_SEARCH, EventQueryDefinition.JSON_PROPERTY_TAGS_EXECUTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SEARCH = "search"; private String search; @@ -32,53 +51,51 @@ public EventQueryDefinition() {} @JsonCreator public EventQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_SEARCH) String search, - @JsonProperty(required = true, value = JSON_PROPERTY_TAGS_EXECUTION) String tagsExecution) { - this.search = search; - this.tagsExecution = tagsExecution; + @JsonProperty(required=true, value=JSON_PROPERTY_SEARCH)String search, + @JsonProperty(required=true, value=JSON_PROPERTY_TAGS_EXECUTION)String tagsExecution) { + this.search = search; + this.tagsExecution = tagsExecution; } - public EventQueryDefinition search(String search) { this.search = search; return this; } /** - * The query being made on the event. - * + *

The query being made on the event.

* @return search - */ - @JsonProperty(JSON_PROPERTY_SEARCH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSearch() { - return search; - } - + **/ + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSearch() { + return search; + } public void setSearch(String search) { this.search = search; } - public EventQueryDefinition tagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; return this; } /** - * The execution method for multi-value filters. Can be either and or or. - * + *

The execution method for multi-value filters. Can be either and or or.

* @return tagsExecution - */ - @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTagsExecution() { - return tagsExecution; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTagsExecution() { + return tagsExecution; + } public void setTagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; } - /** Return true if this EventQueryDefinition object is equal to o. */ + /** + * Return true if this EventQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } EventQueryDefinition eventQueryDefinition = (EventQueryDefinition) o; - return Objects.equals(this.search, eventQueryDefinition.search) - && Objects.equals(this.tagsExecution, eventQueryDefinition.tagsExecution); + return Objects.equals(this.search, eventQueryDefinition.search) && Objects.equals(this.tagsExecution, eventQueryDefinition.tagsExecution); } + @Override public int hashCode() { - return Objects.hash(search, tagsExecution); + return Objects.hash(search,tagsExecution); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventResponse.java b/src/main/java/com/datadog/api/client/v1/model/EventResponse.java index 1397668cd7e..b4ce16b17e1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventResponse.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing an event response. */ -@JsonPropertyOrder({EventResponse.JSON_PROPERTY_EVENT, EventResponse.JSON_PROPERTY_STATUS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object containing an event response.

+ */ +@JsonPropertyOrder({ + EventResponse.JSON_PROPERTY_EVENT, + EventResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EVENT = "event"; private Event event; @@ -31,43 +54,42 @@ public EventResponse event(Event event) { } /** - * Object representing an event. - * + *

Object representing an event.

* @return event - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Event getEvent() { - return event; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Event getEvent() { + return event; + } public void setEvent(Event event) { this.event = event; } - public EventResponse status(String status) { this.status = status; return this; } /** - * A status. - * + *

A status.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this EventResponse object is equal to o. */ + /** + * Return true if this EventResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,13 +99,13 @@ public boolean equals(Object o) { return false; } EventResponse eventResponse = (EventResponse) o; - return Objects.equals(this.event, eventResponse.event) - && Objects.equals(this.status, eventResponse.status); + return Objects.equals(this.event, eventResponse.event) && Objects.equals(this.status, eventResponse.status); } + @Override public int hashCode() { - return Objects.hash(event, status); + return Objects.hash(event,status); } @Override @@ -97,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinition.java index e840f3f8004..372970f775c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The event stream is a widget version of the stream of events on the Event Stream view. Only - * available on FREE layout dashboards. + *

The event stream is a widget version of the stream of events + * on the Event Stream view. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ EventStreamWidgetDefinition.JSON_PROPERTY_EVENT_SIZE, @@ -27,10 +44,10 @@ EventStreamWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, EventStreamWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventStreamWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EVENT_SIZE = "event_size"; private WidgetEventSize eventSize; @@ -59,14 +76,12 @@ public EventStreamWidgetDefinition() {} @JsonCreator public EventStreamWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - EventStreamWidgetDefinitionType type) { - this.query = query; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)EventStreamWidgetDefinitionType type) { + this.query = query; + this.type = type; + this.unparsed |= !type.isValid(); } - public EventStreamWidgetDefinition eventSize(WidgetEventSize eventSize) { this.eventSize = eventSize; this.unparsed |= !eventSize.isValid(); @@ -74,65 +89,59 @@ public EventStreamWidgetDefinition eventSize(WidgetEventSize eventSize) { } /** - * Size to use to display an event. - * + *

Size to use to display an event.

* @return eventSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetEventSize getEventSize() { - return eventSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetEventSize getEventSize() { + return eventSize; + } public void setEventSize(WidgetEventSize eventSize) { if (!eventSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.eventSize = eventSize; } - public EventStreamWidgetDefinition query(String query) { this.query = query; return this; } /** - * Query to filter the event stream with. - * + *

Query to filter the event stream with.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public EventStreamWidgetDefinition tagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; return this; } /** - * The execution method for multi-value filters. Can be either and or or. - * + *

The execution method for multi-value filters. Can be either and or or.

* @return tagsExecution - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagsExecution() { - return tagsExecution; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagsExecution() { + return tagsExecution; + } public void setTagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; } - public EventStreamWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -140,42 +149,38 @@ public EventStreamWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public EventStreamWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public EventStreamWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -183,45 +188,41 @@ public EventStreamWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public EventStreamWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public EventStreamWidgetDefinition type(EventStreamWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -229,24 +230,25 @@ public EventStreamWidgetDefinition type(EventStreamWidgetDefinitionType type) { } /** - * Type of the event stream widget. - * + *

Type of the event stream widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventStreamWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventStreamWidgetDefinitionType getType() { + return type; + } public void setType(EventStreamWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this EventStreamWidgetDefinition object is equal to o. */ + /** + * Return true if this EventStreamWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -256,19 +258,13 @@ public boolean equals(Object o) { return false; } EventStreamWidgetDefinition eventStreamWidgetDefinition = (EventStreamWidgetDefinition) o; - return Objects.equals(this.eventSize, eventStreamWidgetDefinition.eventSize) - && Objects.equals(this.query, eventStreamWidgetDefinition.query) - && Objects.equals(this.tagsExecution, eventStreamWidgetDefinition.tagsExecution) - && Objects.equals(this.time, eventStreamWidgetDefinition.time) - && Objects.equals(this.title, eventStreamWidgetDefinition.title) - && Objects.equals(this.titleAlign, eventStreamWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, eventStreamWidgetDefinition.titleSize) - && Objects.equals(this.type, eventStreamWidgetDefinition.type); + return Objects.equals(this.eventSize, eventStreamWidgetDefinition.eventSize) && Objects.equals(this.query, eventStreamWidgetDefinition.query) && Objects.equals(this.tagsExecution, eventStreamWidgetDefinition.tagsExecution) && Objects.equals(this.time, eventStreamWidgetDefinition.time) && Objects.equals(this.title, eventStreamWidgetDefinition.title) && Objects.equals(this.titleAlign, eventStreamWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, eventStreamWidgetDefinition.titleSize) && Objects.equals(this.type, eventStreamWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(eventSize, query, tagsExecution, time, title, titleAlign, titleSize, type); + return Objects.hash(eventSize,query,tagsExecution,time,title,titleAlign,titleSize,type); } @Override @@ -288,7 +284,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinitionType.java index ae86d079f44..758b79a3cd3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventStreamWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event stream widget. */ -@JsonSerialize( - using = EventStreamWidgetDefinitionType.EventStreamWidgetDefinitionTypeSerializer.class) +/** + *

Type of the event stream widget.

+ */ +@JsonSerialize(using = EventStreamWidgetDefinitionType.EventStreamWidgetDefinitionTypeSerializer.class) public class EventStreamWidgetDefinitionType { - public static final EventStreamWidgetDefinitionType EVENT_STREAM = - new EventStreamWidgetDefinitionType("event_stream"); + public static final EventStreamWidgetDefinitionType EVENT_STREAM = new EventStreamWidgetDefinitionType("event_stream"); - private static final Set allowedValues = - new HashSet(Arrays.asList("event_stream")); + private static final Set allowedValues = new HashSet(Arrays.asList("event_stream")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class EventStreamWidgetDefinitionTypeSerializer - extends StdSerializer { - public EventStreamWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class EventStreamWidgetDefinitionTypeSerializer extends StdSerializer { + public EventStreamWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public EventStreamWidgetDefinitionTypeSerializer() { - this(null); - } + public EventStreamWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - EventStreamWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(EventStreamWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventStreamWidgetDefinitionType object is equal to o. */ + /** + * Return true if this EventStreamWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinition.java index 595c1022388..f0eaa6a953e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The event timeline is a widget version of the timeline that appears at the top of the Event - * Stream view. Only available on FREE layout dashboards. + *

The event timeline is a widget version of the timeline that appears at the top of the Event Stream view. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ EventTimelineWidgetDefinition.JSON_PROPERTY_QUERY, @@ -26,10 +42,10 @@ EventTimelineWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, EventTimelineWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventTimelineWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -55,55 +71,49 @@ public EventTimelineWidgetDefinition() {} @JsonCreator public EventTimelineWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - EventTimelineWidgetDefinitionType type) { - this.query = query; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)EventTimelineWidgetDefinitionType type) { + this.query = query; + this.type = type; + this.unparsed |= !type.isValid(); } - public EventTimelineWidgetDefinition query(String query) { this.query = query; return this; } /** - * Query to filter the event timeline with. - * + *

Query to filter the event timeline with.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public EventTimelineWidgetDefinition tagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; return this; } /** - * The execution method for multi-value filters. Can be either and or or. - * + *

The execution method for multi-value filters. Can be either and or or.

* @return tagsExecution - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagsExecution() { - return tagsExecution; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagsExecution() { + return tagsExecution; + } public void setTagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; } - public EventTimelineWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -111,42 +121,38 @@ public EventTimelineWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public EventTimelineWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public EventTimelineWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -154,45 +160,41 @@ public EventTimelineWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public EventTimelineWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public EventTimelineWidgetDefinition type(EventTimelineWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -200,24 +202,25 @@ public EventTimelineWidgetDefinition type(EventTimelineWidgetDefinitionType type } /** - * Type of the event timeline widget. - * + *

Type of the event timeline widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventTimelineWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventTimelineWidgetDefinitionType getType() { + return type; + } public void setType(EventTimelineWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this EventTimelineWidgetDefinition object is equal to o. */ + /** + * Return true if this EventTimelineWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -227,18 +230,13 @@ public boolean equals(Object o) { return false; } EventTimelineWidgetDefinition eventTimelineWidgetDefinition = (EventTimelineWidgetDefinition) o; - return Objects.equals(this.query, eventTimelineWidgetDefinition.query) - && Objects.equals(this.tagsExecution, eventTimelineWidgetDefinition.tagsExecution) - && Objects.equals(this.time, eventTimelineWidgetDefinition.time) - && Objects.equals(this.title, eventTimelineWidgetDefinition.title) - && Objects.equals(this.titleAlign, eventTimelineWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, eventTimelineWidgetDefinition.titleSize) - && Objects.equals(this.type, eventTimelineWidgetDefinition.type); + return Objects.equals(this.query, eventTimelineWidgetDefinition.query) && Objects.equals(this.tagsExecution, eventTimelineWidgetDefinition.tagsExecution) && Objects.equals(this.time, eventTimelineWidgetDefinition.time) && Objects.equals(this.title, eventTimelineWidgetDefinition.title) && Objects.equals(this.titleAlign, eventTimelineWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, eventTimelineWidgetDefinition.titleSize) && Objects.equals(this.type, eventTimelineWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(query, tagsExecution, time, title, titleAlign, titleSize, type); + return Objects.hash(query,tagsExecution,time,title,titleAlign,titleSize,type); } @Override @@ -257,7 +255,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinitionType.java index 9077c9152de..4f2ba696f48 100644 --- a/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/EventTimelineWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event timeline widget. */ -@JsonSerialize( - using = EventTimelineWidgetDefinitionType.EventTimelineWidgetDefinitionTypeSerializer.class) +/** + *

Type of the event timeline widget.

+ */ +@JsonSerialize(using = EventTimelineWidgetDefinitionType.EventTimelineWidgetDefinitionTypeSerializer.class) public class EventTimelineWidgetDefinitionType { - public static final EventTimelineWidgetDefinitionType EVENT_TIMELINE = - new EventTimelineWidgetDefinitionType("event_timeline"); + public static final EventTimelineWidgetDefinitionType EVENT_TIMELINE = new EventTimelineWidgetDefinitionType("event_timeline"); - private static final Set allowedValues = - new HashSet(Arrays.asList("event_timeline")); + private static final Set allowedValues = new HashSet(Arrays.asList("event_timeline")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class EventTimelineWidgetDefinitionTypeSerializer - extends StdSerializer { - public EventTimelineWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class EventTimelineWidgetDefinitionTypeSerializer extends StdSerializer { + public EventTimelineWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public EventTimelineWidgetDefinitionTypeSerializer() { - this(null); - } + public EventTimelineWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - EventTimelineWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(EventTimelineWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventTimelineWidgetDefinitionType object is equal to o. */ + /** + * Return true if this EventTimelineWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatName.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatName.java index a6a6be9c8c9..9d396cb9a22 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatName.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatName.java @@ -6,51 +6,56 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** APM statistic. */ -@JsonSerialize( - using = - FormulaAndFunctionApmDependencyStatName.FormulaAndFunctionApmDependencyStatNameSerializer - .class) +/** + *

APM statistic.

+ */ +@JsonSerialize(using = FormulaAndFunctionApmDependencyStatName.FormulaAndFunctionApmDependencyStatNameSerializer.class) public class FormulaAndFunctionApmDependencyStatName { - public static final FormulaAndFunctionApmDependencyStatName AVG_DURATION = - new FormulaAndFunctionApmDependencyStatName("avg_duration"); - public static final FormulaAndFunctionApmDependencyStatName AVG_ROOT_DURATION = - new FormulaAndFunctionApmDependencyStatName("avg_root_duration"); - public static final FormulaAndFunctionApmDependencyStatName AVG_SPANS_PER_TRACE = - new FormulaAndFunctionApmDependencyStatName("avg_spans_per_trace"); - public static final FormulaAndFunctionApmDependencyStatName ERROR_RATE = - new FormulaAndFunctionApmDependencyStatName("error_rate"); - public static final FormulaAndFunctionApmDependencyStatName PCT_EXEC_TIME = - new FormulaAndFunctionApmDependencyStatName("pct_exec_time"); - public static final FormulaAndFunctionApmDependencyStatName PCT_OF_TRACES = - new FormulaAndFunctionApmDependencyStatName("pct_of_traces"); - public static final FormulaAndFunctionApmDependencyStatName TOTAL_TRACES_COUNT = - new FormulaAndFunctionApmDependencyStatName("total_traces_count"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "avg_duration", - "avg_root_duration", - "avg_spans_per_trace", - "error_rate", - "pct_exec_time", - "pct_of_traces", - "total_traces_count")); + public static final FormulaAndFunctionApmDependencyStatName AVG_DURATION = new FormulaAndFunctionApmDependencyStatName("avg_duration"); + public static final FormulaAndFunctionApmDependencyStatName AVG_ROOT_DURATION = new FormulaAndFunctionApmDependencyStatName("avg_root_duration"); + public static final FormulaAndFunctionApmDependencyStatName AVG_SPANS_PER_TRACE = new FormulaAndFunctionApmDependencyStatName("avg_spans_per_trace"); + public static final FormulaAndFunctionApmDependencyStatName ERROR_RATE = new FormulaAndFunctionApmDependencyStatName("error_rate"); + public static final FormulaAndFunctionApmDependencyStatName PCT_EXEC_TIME = new FormulaAndFunctionApmDependencyStatName("pct_exec_time"); + public static final FormulaAndFunctionApmDependencyStatName PCT_OF_TRACES = new FormulaAndFunctionApmDependencyStatName("pct_of_traces"); + public static final FormulaAndFunctionApmDependencyStatName TOTAL_TRACES_COUNT = new FormulaAndFunctionApmDependencyStatName("total_traces_count"); + + private static final Set allowedValues = new HashSet(Arrays.asList("avg_duration", "avg_root_duration", "avg_spans_per_trace", "error_rate", "pct_exec_time", "pct_of_traces", "total_traces_count")); private String value; @@ -62,25 +67,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionApmDependencyStatNameSerializer - extends StdSerializer { - public FormulaAndFunctionApmDependencyStatNameSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionApmDependencyStatNameSerializer extends StdSerializer { + public FormulaAndFunctionApmDependencyStatNameSerializer(Class t) { + super(t); + } - public FormulaAndFunctionApmDependencyStatNameSerializer() { - this(null); - } + public FormulaAndFunctionApmDependencyStatNameSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionApmDependencyStatName value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionApmDependencyStatName value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -92,7 +91,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionApmDependencyStatName object is equal to o. */ + /** + * Return true if this FormulaAndFunctionApmDependencyStatName object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,7 +107,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsDataSource.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsDataSource.java index 6953dad5a30..1f925734c88 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsDataSource.java @@ -6,31 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Data source for APM dependency stats queries. */ -@JsonSerialize( - using = - FormulaAndFunctionApmDependencyStatsDataSource - .FormulaAndFunctionApmDependencyStatsDataSourceSerializer.class) +/** + *

Data source for APM dependency stats queries.

+ */ +@JsonSerialize(using = FormulaAndFunctionApmDependencyStatsDataSource.FormulaAndFunctionApmDependencyStatsDataSourceSerializer.class) public class FormulaAndFunctionApmDependencyStatsDataSource { - public static final FormulaAndFunctionApmDependencyStatsDataSource APM_DEPENDENCY_STATS = - new FormulaAndFunctionApmDependencyStatsDataSource("apm_dependency_stats"); + public static final FormulaAndFunctionApmDependencyStatsDataSource APM_DEPENDENCY_STATS = new FormulaAndFunctionApmDependencyStatsDataSource("apm_dependency_stats"); - private static final Set allowedValues = - new HashSet(Arrays.asList("apm_dependency_stats")); + private static final Set allowedValues = new HashSet(Arrays.asList("apm_dependency_stats")); private String value; @@ -42,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionApmDependencyStatsDataSourceSerializer - extends StdSerializer { - public FormulaAndFunctionApmDependencyStatsDataSourceSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionApmDependencyStatsDataSourceSerializer extends StdSerializer { + public FormulaAndFunctionApmDependencyStatsDataSourceSerializer(Class t) { + super(t); + } - public FormulaAndFunctionApmDependencyStatsDataSourceSerializer() { - this(null); - } + public FormulaAndFunctionApmDependencyStatsDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionApmDependencyStatsDataSource value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionApmDependencyStatsDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -72,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionApmDependencyStatsDataSource object is equal to o. */ + /** + * Return true if this FormulaAndFunctionApmDependencyStatsDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsQueryDefinition.java index 7d263e7b7af..cad06e5aa49 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmDependencyStatsQueryDefinition.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A formula and functions APM dependency stats query. */ +/** + *

A formula and functions APM dependency stats query.

+ */ @JsonPropertyOrder({ FormulaAndFunctionApmDependencyStatsQueryDefinition.JSON_PROPERTY_DATA_SOURCE, FormulaAndFunctionApmDependencyStatsQueryDefinition.JSON_PROPERTY_ENV, @@ -26,10 +45,10 @@ FormulaAndFunctionApmDependencyStatsQueryDefinition.JSON_PROPERTY_SERVICE, FormulaAndFunctionApmDependencyStatsQueryDefinition.JSON_PROPERTY_STAT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionApmDependencyStatsQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; private FormulaAndFunctionApmDependencyStatsDataSource dataSource; @@ -64,239 +83,211 @@ public FormulaAndFunctionApmDependencyStatsQueryDefinition() {} @JsonCreator public FormulaAndFunctionApmDependencyStatsQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - FormulaAndFunctionApmDependencyStatsDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_ENV) String env, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPERATION_NAME) String operationName, - @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_NAME) String resourceName, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, - @JsonProperty(required = true, value = JSON_PROPERTY_STAT) - FormulaAndFunctionApmDependencyStatName stat) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.env = env; - this.name = name; - this.operationName = operationName; - this.resourceName = resourceName; - this.service = service; - this.stat = stat; - this.unparsed |= !stat.isValid(); - } - - public FormulaAndFunctionApmDependencyStatsQueryDefinition dataSource( - FormulaAndFunctionApmDependencyStatsDataSource dataSource) { + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)FormulaAndFunctionApmDependencyStatsDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_ENV)String env, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPERATION_NAME)String operationName, + @JsonProperty(required=true, value=JSON_PROPERTY_RESOURCE_NAME)String resourceName, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE)String service, + @JsonProperty(required=true, value=JSON_PROPERTY_STAT)FormulaAndFunctionApmDependencyStatName stat) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.env = env; + this.name = name; + this.operationName = operationName; + this.resourceName = resourceName; + this.service = service; + this.stat = stat; + this.unparsed |= !stat.isValid(); + } + public FormulaAndFunctionApmDependencyStatsQueryDefinition dataSource(FormulaAndFunctionApmDependencyStatsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; } /** - * Data source for APM dependency stats queries. - * + *

Data source for APM dependency stats queries.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionApmDependencyStatsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionApmDependencyStatsDataSource getDataSource() { + return dataSource; + } public void setDataSource(FormulaAndFunctionApmDependencyStatsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition env(String env) { this.env = env; return this; } /** - * APM environment. - * + *

APM environment.

* @return env - */ - @JsonProperty(JSON_PROPERTY_ENV) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEnv() { - return env; - } - + **/ + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getEnv() { + return env; + } public void setEnv(String env) { this.env = env; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition isUpstream(Boolean isUpstream) { this.isUpstream = isUpstream; return this; } /** - * Determines whether stats for upstream or downstream dependencies should be queried. - * + *

Determines whether stats for upstream or downstream dependencies should be queried.

* @return isUpstream - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_UPSTREAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsUpstream() { - return isUpstream; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_UPSTREAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsUpstream() { + return isUpstream; + } public void setIsUpstream(Boolean isUpstream) { this.isUpstream = isUpstream; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition name(String name) { this.name = name; return this; } /** - * Name of query to use in formulas. - * + *

Name of query to use in formulas.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition operationName(String operationName) { this.operationName = operationName; return this; } /** - * Name of operation on service. - * + *

Name of operation on service.

* @return operationName - */ - @JsonProperty(JSON_PROPERTY_OPERATION_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOperationName() { - return operationName; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPERATION_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getOperationName() { + return operationName; + } public void setOperationName(String operationName) { this.operationName = operationName; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition primaryTagName(String primaryTagName) { this.primaryTagName = primaryTagName; return this; } /** - * The name of the second primary tag used within APM; required when primary_tag_value - * is specified. See - * https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog. - * + *

The name of the second primary tag used within APM; required when primary_tag_value is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog.

* @return primaryTagName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryTagName() { - return primaryTagName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPrimaryTagName() { + return primaryTagName; + } public void setPrimaryTagName(String primaryTagName) { this.primaryTagName = primaryTagName; } - - public FormulaAndFunctionApmDependencyStatsQueryDefinition primaryTagValue( - String primaryTagValue) { + public FormulaAndFunctionApmDependencyStatsQueryDefinition primaryTagValue(String primaryTagValue) { this.primaryTagValue = primaryTagValue; return this; } /** - * Filter APM data by the second primary tag. primary_tag_name must also be - * specified. - * + *

Filter APM data by the second primary tag. primary_tag_name must also be specified.

* @return primaryTagValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryTagValue() { - return primaryTagValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPrimaryTagValue() { + return primaryTagValue; + } public void setPrimaryTagValue(String primaryTagValue) { this.primaryTagValue = primaryTagValue; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition resourceName(String resourceName) { this.resourceName = resourceName; return this; } /** - * APM resource. - * + *

APM resource.

* @return resourceName - */ - @JsonProperty(JSON_PROPERTY_RESOURCE_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getResourceName() { - return resourceName; - } - + **/ + @JsonProperty(JSON_PROPERTY_RESOURCE_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getResourceName() { + return resourceName; + } public void setResourceName(String resourceName) { this.resourceName = resourceName; } - public FormulaAndFunctionApmDependencyStatsQueryDefinition service(String service) { this.service = service; return this; } /** - * APM service. - * + *

APM service.

* @return service - */ - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getService() { - return service; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - - public FormulaAndFunctionApmDependencyStatsQueryDefinition stat( - FormulaAndFunctionApmDependencyStatName stat) { + public FormulaAndFunctionApmDependencyStatsQueryDefinition stat(FormulaAndFunctionApmDependencyStatName stat) { this.stat = stat; this.unparsed |= !stat.isValid(); return this; } /** - * APM statistic. - * + *

APM statistic.

* @return stat - */ - @JsonProperty(JSON_PROPERTY_STAT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionApmDependencyStatName getStat() { - return stat; - } - + **/ + @JsonProperty(JSON_PROPERTY_STAT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionApmDependencyStatName getStat() { + return stat; + } public void setStat(FormulaAndFunctionApmDependencyStatName stat) { if (!stat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.stat = stat; } @@ -312,41 +303,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionApmDependencyStatsQueryDefinition - formulaAndFunctionApmDependencyStatsQueryDefinition = - (FormulaAndFunctionApmDependencyStatsQueryDefinition) o; - return Objects.equals( - this.dataSource, formulaAndFunctionApmDependencyStatsQueryDefinition.dataSource) - && Objects.equals(this.env, formulaAndFunctionApmDependencyStatsQueryDefinition.env) - && Objects.equals( - this.isUpstream, formulaAndFunctionApmDependencyStatsQueryDefinition.isUpstream) - && Objects.equals(this.name, formulaAndFunctionApmDependencyStatsQueryDefinition.name) - && Objects.equals( - this.operationName, formulaAndFunctionApmDependencyStatsQueryDefinition.operationName) - && Objects.equals( - this.primaryTagName, formulaAndFunctionApmDependencyStatsQueryDefinition.primaryTagName) - && Objects.equals( - this.primaryTagValue, - formulaAndFunctionApmDependencyStatsQueryDefinition.primaryTagValue) - && Objects.equals( - this.resourceName, formulaAndFunctionApmDependencyStatsQueryDefinition.resourceName) - && Objects.equals(this.service, formulaAndFunctionApmDependencyStatsQueryDefinition.service) - && Objects.equals(this.stat, formulaAndFunctionApmDependencyStatsQueryDefinition.stat); + FormulaAndFunctionApmDependencyStatsQueryDefinition formulaAndFunctionApmDependencyStatsQueryDefinition = (FormulaAndFunctionApmDependencyStatsQueryDefinition) o; + return Objects.equals(this.dataSource, formulaAndFunctionApmDependencyStatsQueryDefinition.dataSource) && Objects.equals(this.env, formulaAndFunctionApmDependencyStatsQueryDefinition.env) && Objects.equals(this.isUpstream, formulaAndFunctionApmDependencyStatsQueryDefinition.isUpstream) && Objects.equals(this.name, formulaAndFunctionApmDependencyStatsQueryDefinition.name) && Objects.equals(this.operationName, formulaAndFunctionApmDependencyStatsQueryDefinition.operationName) && Objects.equals(this.primaryTagName, formulaAndFunctionApmDependencyStatsQueryDefinition.primaryTagName) && Objects.equals(this.primaryTagValue, formulaAndFunctionApmDependencyStatsQueryDefinition.primaryTagValue) && Objects.equals(this.resourceName, formulaAndFunctionApmDependencyStatsQueryDefinition.resourceName) && Objects.equals(this.service, formulaAndFunctionApmDependencyStatsQueryDefinition.service) && Objects.equals(this.stat, formulaAndFunctionApmDependencyStatsQueryDefinition.stat); } + @Override public int hashCode() { - return Objects.hash( - dataSource, - env, - isUpstream, - name, - operationName, - primaryTagName, - primaryTagValue, - resourceName, - service, - stat); + return Objects.hash(dataSource,env,isUpstream,name,operationName,primaryTagName,primaryTagValue,resourceName,service,stat); } @Override @@ -368,7 +332,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatName.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatName.java index 7a4af1882ca..47ffbdcd153 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatName.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatName.java @@ -6,62 +6,60 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** APM resource stat name. */ -@JsonSerialize( - using = - FormulaAndFunctionApmResourceStatName.FormulaAndFunctionApmResourceStatNameSerializer.class) +/** + *

APM resource stat name.

+ */ +@JsonSerialize(using = FormulaAndFunctionApmResourceStatName.FormulaAndFunctionApmResourceStatNameSerializer.class) public class FormulaAndFunctionApmResourceStatName { - public static final FormulaAndFunctionApmResourceStatName ERRORS = - new FormulaAndFunctionApmResourceStatName("errors"); - public static final FormulaAndFunctionApmResourceStatName ERROR_RATE = - new FormulaAndFunctionApmResourceStatName("error_rate"); - public static final FormulaAndFunctionApmResourceStatName HITS = - new FormulaAndFunctionApmResourceStatName("hits"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_AVG = - new FormulaAndFunctionApmResourceStatName("latency_avg"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_DISTRIBUTION = - new FormulaAndFunctionApmResourceStatName("latency_distribution"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_MAX = - new FormulaAndFunctionApmResourceStatName("latency_max"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_P50 = - new FormulaAndFunctionApmResourceStatName("latency_p50"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_P75 = - new FormulaAndFunctionApmResourceStatName("latency_p75"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_P90 = - new FormulaAndFunctionApmResourceStatName("latency_p90"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_P95 = - new FormulaAndFunctionApmResourceStatName("latency_p95"); - public static final FormulaAndFunctionApmResourceStatName LATENCY_P99 = - new FormulaAndFunctionApmResourceStatName("latency_p99"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "errors", - "error_rate", - "hits", - "latency_avg", - "latency_distribution", - "latency_max", - "latency_p50", - "latency_p75", - "latency_p90", - "latency_p95", - "latency_p99")); + public static final FormulaAndFunctionApmResourceStatName ERRORS = new FormulaAndFunctionApmResourceStatName("errors"); + public static final FormulaAndFunctionApmResourceStatName ERROR_RATE = new FormulaAndFunctionApmResourceStatName("error_rate"); + public static final FormulaAndFunctionApmResourceStatName HITS = new FormulaAndFunctionApmResourceStatName("hits"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_AVG = new FormulaAndFunctionApmResourceStatName("latency_avg"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_DISTRIBUTION = new FormulaAndFunctionApmResourceStatName("latency_distribution"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_MAX = new FormulaAndFunctionApmResourceStatName("latency_max"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_P50 = new FormulaAndFunctionApmResourceStatName("latency_p50"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_P75 = new FormulaAndFunctionApmResourceStatName("latency_p75"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_P90 = new FormulaAndFunctionApmResourceStatName("latency_p90"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_P95 = new FormulaAndFunctionApmResourceStatName("latency_p95"); + public static final FormulaAndFunctionApmResourceStatName LATENCY_P99 = new FormulaAndFunctionApmResourceStatName("latency_p99"); + + private static final Set allowedValues = new HashSet(Arrays.asList("errors", "error_rate", "hits", "latency_avg", "latency_distribution", "latency_max", "latency_p50", "latency_p75", "latency_p90", "latency_p95", "latency_p99")); private String value; @@ -73,25 +71,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionApmResourceStatNameSerializer - extends StdSerializer { - public FormulaAndFunctionApmResourceStatNameSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionApmResourceStatNameSerializer extends StdSerializer { + public FormulaAndFunctionApmResourceStatNameSerializer(Class t) { + super(t); + } - public FormulaAndFunctionApmResourceStatNameSerializer() { - this(null); - } + public FormulaAndFunctionApmResourceStatNameSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionApmResourceStatName value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionApmResourceStatName value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -103,7 +95,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionApmResourceStatName object is equal to o. */ + /** + * Return true if this FormulaAndFunctionApmResourceStatName object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,7 +111,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsDataSource.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsDataSource.java index ff8a3b9fa8e..43b9ad5b0e1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsDataSource.java @@ -6,31 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Data source for APM resource stats queries. */ -@JsonSerialize( - using = - FormulaAndFunctionApmResourceStatsDataSource - .FormulaAndFunctionApmResourceStatsDataSourceSerializer.class) +/** + *

Data source for APM resource stats queries.

+ */ +@JsonSerialize(using = FormulaAndFunctionApmResourceStatsDataSource.FormulaAndFunctionApmResourceStatsDataSourceSerializer.class) public class FormulaAndFunctionApmResourceStatsDataSource { - public static final FormulaAndFunctionApmResourceStatsDataSource APM_RESOURCE_STATS = - new FormulaAndFunctionApmResourceStatsDataSource("apm_resource_stats"); + public static final FormulaAndFunctionApmResourceStatsDataSource APM_RESOURCE_STATS = new FormulaAndFunctionApmResourceStatsDataSource("apm_resource_stats"); - private static final Set allowedValues = - new HashSet(Arrays.asList("apm_resource_stats")); + private static final Set allowedValues = new HashSet(Arrays.asList("apm_resource_stats")); private String value; @@ -42,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionApmResourceStatsDataSourceSerializer - extends StdSerializer { - public FormulaAndFunctionApmResourceStatsDataSourceSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionApmResourceStatsDataSourceSerializer extends StdSerializer { + public FormulaAndFunctionApmResourceStatsDataSourceSerializer(Class t) { + super(t); + } - public FormulaAndFunctionApmResourceStatsDataSourceSerializer() { - this(null); - } + public FormulaAndFunctionApmResourceStatsDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionApmResourceStatsDataSource value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionApmResourceStatsDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -72,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionApmResourceStatsDataSource object is equal to o. */ + /** + * Return true if this FormulaAndFunctionApmResourceStatsDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsQueryDefinition.java index 41f63d35340..d714ab9e7a5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionApmResourceStatsQueryDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** APM resource stats query using formulas and functions. */ + +/** + *

APM resource stats query using formulas and functions.

+ */ @JsonPropertyOrder({ FormulaAndFunctionApmResourceStatsQueryDefinition.JSON_PROPERTY_DATA_SOURCE, FormulaAndFunctionApmResourceStatsQueryDefinition.JSON_PROPERTY_ENV, @@ -28,10 +45,10 @@ FormulaAndFunctionApmResourceStatsQueryDefinition.JSON_PROPERTY_SERVICE, FormulaAndFunctionApmResourceStatsQueryDefinition.JSON_PROPERTY_STAT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionApmResourceStatsQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; private FormulaAndFunctionApmResourceStatsDataSource dataSource; @@ -66,72 +83,63 @@ public FormulaAndFunctionApmResourceStatsQueryDefinition() {} @JsonCreator public FormulaAndFunctionApmResourceStatsQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - FormulaAndFunctionApmResourceStatsDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_ENV) String env, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, - @JsonProperty(required = true, value = JSON_PROPERTY_STAT) - FormulaAndFunctionApmResourceStatName stat) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.env = env; - this.name = name; - this.service = service; - this.stat = stat; - this.unparsed |= !stat.isValid(); - } - - public FormulaAndFunctionApmResourceStatsQueryDefinition dataSource( - FormulaAndFunctionApmResourceStatsDataSource dataSource) { + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)FormulaAndFunctionApmResourceStatsDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_ENV)String env, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE)String service, + @JsonProperty(required=true, value=JSON_PROPERTY_STAT)FormulaAndFunctionApmResourceStatName stat) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.env = env; + this.name = name; + this.service = service; + this.stat = stat; + this.unparsed |= !stat.isValid(); + } + public FormulaAndFunctionApmResourceStatsQueryDefinition dataSource(FormulaAndFunctionApmResourceStatsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; } /** - * Data source for APM resource stats queries. - * + *

Data source for APM resource stats queries.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionApmResourceStatsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionApmResourceStatsDataSource getDataSource() { + return dataSource; + } public void setDataSource(FormulaAndFunctionApmResourceStatsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public FormulaAndFunctionApmResourceStatsQueryDefinition env(String env) { this.env = env; return this; } /** - * APM environment. - * + *

APM environment.

* @return env - */ - @JsonProperty(JSON_PROPERTY_ENV) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEnv() { - return env; - } - + **/ + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getEnv() { + return env; + } public void setEnv(String env) { this.env = env; } - public FormulaAndFunctionApmResourceStatsQueryDefinition groupBy(List groupBy) { this.groupBy = groupBy; return this; } - public FormulaAndFunctionApmResourceStatsQueryDefinition addGroupByItem(String groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -141,174 +149,157 @@ public FormulaAndFunctionApmResourceStatsQueryDefinition addGroupByItem(String g } /** - * Array of fields to group results by. - * + *

Array of fields to group results by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public FormulaAndFunctionApmResourceStatsQueryDefinition name(String name) { this.name = name; return this; } /** - * Name of this query to use in formulas. - * + *

Name of this query to use in formulas.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FormulaAndFunctionApmResourceStatsQueryDefinition operationName(String operationName) { this.operationName = operationName; return this; } /** - * Name of operation on service. - * + *

Name of operation on service.

* @return operationName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPERATION_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOperationName() { - return operationName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATION_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOperationName() { + return operationName; + } public void setOperationName(String operationName) { this.operationName = operationName; } - public FormulaAndFunctionApmResourceStatsQueryDefinition primaryTagName(String primaryTagName) { this.primaryTagName = primaryTagName; return this; } /** - * Name of the second primary tag used within APM. Required when primary_tag_value is - * specified. See - * https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog - * + *

Name of the second primary tag used within APM. Required when primary_tag_value is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog

* @return primaryTagName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryTagName() { - return primaryTagName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPrimaryTagName() { + return primaryTagName; + } public void setPrimaryTagName(String primaryTagName) { this.primaryTagName = primaryTagName; } - public FormulaAndFunctionApmResourceStatsQueryDefinition primaryTagValue(String primaryTagValue) { this.primaryTagValue = primaryTagValue; return this; } /** - * Value of the second primary tag by which to filter APM data. primary_tag_name must - * also be specified. - * + *

Value of the second primary tag by which to filter APM data. primary_tag_name must also be specified.

* @return primaryTagValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryTagValue() { - return primaryTagValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIMARY_TAG_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPrimaryTagValue() { + return primaryTagValue; + } public void setPrimaryTagValue(String primaryTagValue) { this.primaryTagValue = primaryTagValue; } - public FormulaAndFunctionApmResourceStatsQueryDefinition resourceName(String resourceName) { this.resourceName = resourceName; return this; } /** - * APM resource name. - * + *

APM resource name.

* @return resourceName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResourceName() { - return resourceName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceName() { + return resourceName; + } public void setResourceName(String resourceName) { this.resourceName = resourceName; } - public FormulaAndFunctionApmResourceStatsQueryDefinition service(String service) { this.service = service; return this; } /** - * APM service name. - * + *

APM service name.

* @return service - */ - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getService() { - return service; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - - public FormulaAndFunctionApmResourceStatsQueryDefinition stat( - FormulaAndFunctionApmResourceStatName stat) { + public FormulaAndFunctionApmResourceStatsQueryDefinition stat(FormulaAndFunctionApmResourceStatName stat) { this.stat = stat; this.unparsed |= !stat.isValid(); return this; } /** - * APM resource stat name. - * + *

APM resource stat name.

* @return stat - */ - @JsonProperty(JSON_PROPERTY_STAT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionApmResourceStatName getStat() { - return stat; - } - + **/ + @JsonProperty(JSON_PROPERTY_STAT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionApmResourceStatName getStat() { + return stat; + } public void setStat(FormulaAndFunctionApmResourceStatName stat) { if (!stat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.stat = stat; } - /** Return true if this FormulaAndFunctionApmResourceStatsQueryDefinition object is equal to o. */ + /** + * Return true if this FormulaAndFunctionApmResourceStatsQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -317,39 +308,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionApmResourceStatsQueryDefinition - formulaAndFunctionApmResourceStatsQueryDefinition = - (FormulaAndFunctionApmResourceStatsQueryDefinition) o; - return Objects.equals( - this.dataSource, formulaAndFunctionApmResourceStatsQueryDefinition.dataSource) - && Objects.equals(this.env, formulaAndFunctionApmResourceStatsQueryDefinition.env) - && Objects.equals(this.groupBy, formulaAndFunctionApmResourceStatsQueryDefinition.groupBy) - && Objects.equals(this.name, formulaAndFunctionApmResourceStatsQueryDefinition.name) - && Objects.equals( - this.operationName, formulaAndFunctionApmResourceStatsQueryDefinition.operationName) - && Objects.equals( - this.primaryTagName, formulaAndFunctionApmResourceStatsQueryDefinition.primaryTagName) - && Objects.equals( - this.primaryTagValue, formulaAndFunctionApmResourceStatsQueryDefinition.primaryTagValue) - && Objects.equals( - this.resourceName, formulaAndFunctionApmResourceStatsQueryDefinition.resourceName) - && Objects.equals(this.service, formulaAndFunctionApmResourceStatsQueryDefinition.service) - && Objects.equals(this.stat, formulaAndFunctionApmResourceStatsQueryDefinition.stat); + FormulaAndFunctionApmResourceStatsQueryDefinition formulaAndFunctionApmResourceStatsQueryDefinition = (FormulaAndFunctionApmResourceStatsQueryDefinition) o; + return Objects.equals(this.dataSource, formulaAndFunctionApmResourceStatsQueryDefinition.dataSource) && Objects.equals(this.env, formulaAndFunctionApmResourceStatsQueryDefinition.env) && Objects.equals(this.groupBy, formulaAndFunctionApmResourceStatsQueryDefinition.groupBy) && Objects.equals(this.name, formulaAndFunctionApmResourceStatsQueryDefinition.name) && Objects.equals(this.operationName, formulaAndFunctionApmResourceStatsQueryDefinition.operationName) && Objects.equals(this.primaryTagName, formulaAndFunctionApmResourceStatsQueryDefinition.primaryTagName) && Objects.equals(this.primaryTagValue, formulaAndFunctionApmResourceStatsQueryDefinition.primaryTagValue) && Objects.equals(this.resourceName, formulaAndFunctionApmResourceStatsQueryDefinition.resourceName) && Objects.equals(this.service, formulaAndFunctionApmResourceStatsQueryDefinition.service) && Objects.equals(this.stat, formulaAndFunctionApmResourceStatsQueryDefinition.stat); } + @Override public int hashCode() { - return Objects.hash( - dataSource, - env, - groupBy, - name, - operationName, - primaryTagName, - primaryTagValue, - resourceName, - service, - stat); + return Objects.hash(dataSource,env,groupBy,name,operationName,primaryTagName,primaryTagValue,resourceName,service,stat); } @Override @@ -371,7 +337,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventAggregation.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventAggregation.java index 85387270754..720cd8eacc5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventAggregation.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventAggregation.java @@ -6,64 +6,61 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Aggregation methods for event platform queries. */ -@JsonSerialize( - using = FormulaAndFunctionEventAggregation.FormulaAndFunctionEventAggregationSerializer.class) +/** + *

Aggregation methods for event platform queries.

+ */ +@JsonSerialize(using = FormulaAndFunctionEventAggregation.FormulaAndFunctionEventAggregationSerializer.class) public class FormulaAndFunctionEventAggregation { - public static final FormulaAndFunctionEventAggregation COUNT = - new FormulaAndFunctionEventAggregation("count"); - public static final FormulaAndFunctionEventAggregation CARDINALITY = - new FormulaAndFunctionEventAggregation("cardinality"); - public static final FormulaAndFunctionEventAggregation MEDIAN = - new FormulaAndFunctionEventAggregation("median"); - public static final FormulaAndFunctionEventAggregation PC75 = - new FormulaAndFunctionEventAggregation("pc75"); - public static final FormulaAndFunctionEventAggregation PC90 = - new FormulaAndFunctionEventAggregation("pc90"); - public static final FormulaAndFunctionEventAggregation PC95 = - new FormulaAndFunctionEventAggregation("pc95"); - public static final FormulaAndFunctionEventAggregation PC98 = - new FormulaAndFunctionEventAggregation("pc98"); - public static final FormulaAndFunctionEventAggregation PC99 = - new FormulaAndFunctionEventAggregation("pc99"); - public static final FormulaAndFunctionEventAggregation SUM = - new FormulaAndFunctionEventAggregation("sum"); - public static final FormulaAndFunctionEventAggregation MIN = - new FormulaAndFunctionEventAggregation("min"); - public static final FormulaAndFunctionEventAggregation MAX = - new FormulaAndFunctionEventAggregation("max"); - public static final FormulaAndFunctionEventAggregation AVG = - new FormulaAndFunctionEventAggregation("avg"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "median", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg")); + public static final FormulaAndFunctionEventAggregation COUNT = new FormulaAndFunctionEventAggregation("count"); + public static final FormulaAndFunctionEventAggregation CARDINALITY = new FormulaAndFunctionEventAggregation("cardinality"); + public static final FormulaAndFunctionEventAggregation MEDIAN = new FormulaAndFunctionEventAggregation("median"); + public static final FormulaAndFunctionEventAggregation PC75 = new FormulaAndFunctionEventAggregation("pc75"); + public static final FormulaAndFunctionEventAggregation PC90 = new FormulaAndFunctionEventAggregation("pc90"); + public static final FormulaAndFunctionEventAggregation PC95 = new FormulaAndFunctionEventAggregation("pc95"); + public static final FormulaAndFunctionEventAggregation PC98 = new FormulaAndFunctionEventAggregation("pc98"); + public static final FormulaAndFunctionEventAggregation PC99 = new FormulaAndFunctionEventAggregation("pc99"); + public static final FormulaAndFunctionEventAggregation SUM = new FormulaAndFunctionEventAggregation("sum"); + public static final FormulaAndFunctionEventAggregation MIN = new FormulaAndFunctionEventAggregation("min"); + public static final FormulaAndFunctionEventAggregation MAX = new FormulaAndFunctionEventAggregation("max"); + public static final FormulaAndFunctionEventAggregation AVG = new FormulaAndFunctionEventAggregation("avg"); + + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "median", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg")); private String value; @@ -75,23 +72,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionEventAggregationSerializer - extends StdSerializer { - public FormulaAndFunctionEventAggregationSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionEventAggregationSerializer extends StdSerializer { + public FormulaAndFunctionEventAggregationSerializer(Class t) { + super(t); + } - public FormulaAndFunctionEventAggregationSerializer() { - this(null); - } + public FormulaAndFunctionEventAggregationSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionEventAggregation value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionEventAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -103,7 +96,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionEventAggregation object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,7 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java index 3a300aa9b02..3fbfe545817 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A formula and functions events query. */ +/** + *

A formula and functions events query.

+ */ @JsonPropertyOrder({ FormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_COMPUTE, FormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_DATA_SOURCE, @@ -25,10 +42,10 @@ FormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_SEARCH, FormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_STORAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionEventQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private FormulaAndFunctionEventQueryDefinitionCompute compute; @@ -54,76 +71,64 @@ public FormulaAndFunctionEventQueryDefinition() {} @JsonCreator public FormulaAndFunctionEventQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) - FormulaAndFunctionEventQueryDefinitionCompute compute, - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - FormulaAndFunctionEventsDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.compute = compute; - this.unparsed |= compute.unparsed; - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_COMPUTE)FormulaAndFunctionEventQueryDefinitionCompute compute, + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)FormulaAndFunctionEventsDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.compute = compute; + this.unparsed |= compute.unparsed; + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.name = name; } - - public FormulaAndFunctionEventQueryDefinition compute( - FormulaAndFunctionEventQueryDefinitionCompute compute) { + public FormulaAndFunctionEventQueryDefinition compute(FormulaAndFunctionEventQueryDefinitionCompute compute) { this.compute = compute; this.unparsed |= compute.unparsed; return this; } /** - * Compute options. - * + *

Compute options.

* @return compute - */ - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionEventQueryDefinitionCompute getCompute() { - return compute; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionEventQueryDefinitionCompute getCompute() { + return compute; + } public void setCompute(FormulaAndFunctionEventQueryDefinitionCompute compute) { this.compute = compute; } - - public FormulaAndFunctionEventQueryDefinition dataSource( - FormulaAndFunctionEventsDataSource dataSource) { + public FormulaAndFunctionEventQueryDefinition dataSource(FormulaAndFunctionEventsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; } /** - * Data source for event platform-based queries. - * + *

Data source for event platform-based queries.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionEventsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionEventsDataSource getDataSource() { + return dataSource; + } public void setDataSource(FormulaAndFunctionEventsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - - public FormulaAndFunctionEventQueryDefinition groupBy( - List groupBy) { + public FormulaAndFunctionEventQueryDefinition groupBy(List groupBy) { this.groupBy = groupBy; for (FormulaAndFunctionEventQueryGroupBy item : groupBy) { this.unparsed |= item.unparsed; } return this; } - - public FormulaAndFunctionEventQueryDefinition addGroupByItem( - FormulaAndFunctionEventQueryGroupBy groupByItem) { + public FormulaAndFunctionEventQueryDefinition addGroupByItem(FormulaAndFunctionEventQueryGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); } @@ -133,26 +138,23 @@ public FormulaAndFunctionEventQueryDefinition addGroupByItem( } /** - * Group by options. - * + *

Group by options.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public FormulaAndFunctionEventQueryDefinition indexes(List indexes) { this.indexes = indexes; return this; } - public FormulaAndFunctionEventQueryDefinition addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -162,87 +164,80 @@ public FormulaAndFunctionEventQueryDefinition addIndexesItem(String indexesItem) } /** - * An array of index names to query in the stream. Omit or use [] to query all - * indexes at once. - * + *

An array of index names to query in the stream. Omit or use [] to query all indexes at once.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public FormulaAndFunctionEventQueryDefinition name(String name) { this.name = name; return this; } /** - * Name of the query for use in formulas. - * + *

Name of the query for use in formulas.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public FormulaAndFunctionEventQueryDefinition search( - FormulaAndFunctionEventQueryDefinitionSearch search) { + public FormulaAndFunctionEventQueryDefinition search(FormulaAndFunctionEventQueryDefinitionSearch search) { this.search = search; this.unparsed |= search.unparsed; return this; } /** - * Search options. - * + *

Search options.

* @return search - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEARCH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionEventQueryDefinitionSearch getSearch() { - return search; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionEventQueryDefinitionSearch getSearch() { + return search; + } public void setSearch(FormulaAndFunctionEventQueryDefinitionSearch search) { this.search = search; } - public FormulaAndFunctionEventQueryDefinition storage(String storage) { this.storage = storage; return this; } /** - * Option for storage location. Feature in Private Beta. - * + *

Option for storage location. Feature in Private Beta.

* @return storage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STORAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStorage() { - return storage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STORAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStorage() { + return storage; + } public void setStorage(String storage) { this.storage = storage; } - /** Return true if this FormulaAndFunctionEventQueryDefinition object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -251,20 +246,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionEventQueryDefinition formulaAndFunctionEventQueryDefinition = - (FormulaAndFunctionEventQueryDefinition) o; - return Objects.equals(this.compute, formulaAndFunctionEventQueryDefinition.compute) - && Objects.equals(this.dataSource, formulaAndFunctionEventQueryDefinition.dataSource) - && Objects.equals(this.groupBy, formulaAndFunctionEventQueryDefinition.groupBy) - && Objects.equals(this.indexes, formulaAndFunctionEventQueryDefinition.indexes) - && Objects.equals(this.name, formulaAndFunctionEventQueryDefinition.name) - && Objects.equals(this.search, formulaAndFunctionEventQueryDefinition.search) - && Objects.equals(this.storage, formulaAndFunctionEventQueryDefinition.storage); + FormulaAndFunctionEventQueryDefinition formulaAndFunctionEventQueryDefinition = (FormulaAndFunctionEventQueryDefinition) o; + return Objects.equals(this.compute, formulaAndFunctionEventQueryDefinition.compute) && Objects.equals(this.dataSource, formulaAndFunctionEventQueryDefinition.dataSource) && Objects.equals(this.groupBy, formulaAndFunctionEventQueryDefinition.groupBy) && Objects.equals(this.indexes, formulaAndFunctionEventQueryDefinition.indexes) && Objects.equals(this.name, formulaAndFunctionEventQueryDefinition.name) && Objects.equals(this.search, formulaAndFunctionEventQueryDefinition.search) && Objects.equals(this.storage, formulaAndFunctionEventQueryDefinition.storage); } + @Override public int hashCode() { - return Objects.hash(compute, dataSource, groupBy, indexes, name, search, storage); + return Objects.hash(compute,dataSource,groupBy,indexes,name,search,storage); } @Override @@ -283,7 +272,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionCompute.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionCompute.java index ef404da3e6f..138233c0ee3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionCompute.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionCompute.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Compute options. */ + +/** + *

Compute options.

+ */ @JsonPropertyOrder({ FormulaAndFunctionEventQueryDefinitionCompute.JSON_PROPERTY_AGGREGATION, FormulaAndFunctionEventQueryDefinitionCompute.JSON_PROPERTY_INTERVAL, FormulaAndFunctionEventQueryDefinitionCompute.JSON_PROPERTY_METRIC }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionEventQueryDefinitionCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private FormulaAndFunctionEventAggregation aggregation; @@ -36,80 +55,74 @@ public FormulaAndFunctionEventQueryDefinitionCompute() {} @JsonCreator public FormulaAndFunctionEventQueryDefinitionCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - FormulaAndFunctionEventAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)FormulaAndFunctionEventAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - - public FormulaAndFunctionEventQueryDefinitionCompute aggregation( - FormulaAndFunctionEventAggregation aggregation) { + public FormulaAndFunctionEventQueryDefinitionCompute aggregation(FormulaAndFunctionEventAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * Aggregation methods for event platform queries. - * + *

Aggregation methods for event platform queries.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionEventAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionEventAggregation getAggregation() { + return aggregation; + } public void setAggregation(FormulaAndFunctionEventAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public FormulaAndFunctionEventQueryDefinitionCompute interval(Long interval) { this.interval = interval; return this; } /** - * A time interval in milliseconds. - * + *

A time interval in milliseconds.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - public FormulaAndFunctionEventQueryDefinitionCompute metric(String metric) { this.metric = metric; return this; } /** - * Measurable attribute to compute. - * + *

Measurable attribute to compute.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - /** Return true if this FormulaAndFunctionEventQueryDefinitionCompute object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventQueryDefinitionCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,17 +131,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionEventQueryDefinitionCompute formulaAndFunctionEventQueryDefinitionCompute = - (FormulaAndFunctionEventQueryDefinitionCompute) o; - return Objects.equals( - this.aggregation, formulaAndFunctionEventQueryDefinitionCompute.aggregation) - && Objects.equals(this.interval, formulaAndFunctionEventQueryDefinitionCompute.interval) - && Objects.equals(this.metric, formulaAndFunctionEventQueryDefinitionCompute.metric); + FormulaAndFunctionEventQueryDefinitionCompute formulaAndFunctionEventQueryDefinitionCompute = (FormulaAndFunctionEventQueryDefinitionCompute) o; + return Objects.equals(this.aggregation, formulaAndFunctionEventQueryDefinitionCompute.aggregation) && Objects.equals(this.interval, formulaAndFunctionEventQueryDefinitionCompute.interval) && Objects.equals(this.metric, formulaAndFunctionEventQueryDefinitionCompute.metric); } + @Override public int hashCode() { - return Objects.hash(aggregation, interval, metric); + return Objects.hash(aggregation,interval,metric); } @Override @@ -143,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionSearch.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionSearch.java index 8b87d1ac380..6dbc30f0649 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionSearch.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinitionSearch.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Search options. */ -@JsonPropertyOrder({FormulaAndFunctionEventQueryDefinitionSearch.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Search options.

+ */ +@JsonPropertyOrder({ + FormulaAndFunctionEventQueryDefinitionSearch.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionEventQueryDefinitionSearch { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -26,31 +47,31 @@ public FormulaAndFunctionEventQueryDefinitionSearch() {} @JsonCreator public FormulaAndFunctionEventQueryDefinitionSearch( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.query = query; } - public FormulaAndFunctionEventQueryDefinitionSearch query(String query) { this.query = query; return this; } /** - * Events search string. - * + *

Events search string.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this FormulaAndFunctionEventQueryDefinitionSearch object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventQueryDefinitionSearch object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -59,11 +80,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionEventQueryDefinitionSearch formulaAndFunctionEventQueryDefinitionSearch = - (FormulaAndFunctionEventQueryDefinitionSearch) o; + FormulaAndFunctionEventQueryDefinitionSearch formulaAndFunctionEventQueryDefinitionSearch = (FormulaAndFunctionEventQueryDefinitionSearch) o; return Objects.equals(this.query, formulaAndFunctionEventQueryDefinitionSearch.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -79,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBy.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBy.java index b7f2d726df7..4b1460807fa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBy.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of objects used to group by. */ + +/** + *

List of objects used to group by.

+ */ @JsonPropertyOrder({ FormulaAndFunctionEventQueryGroupBy.JSON_PROPERTY_FACET, FormulaAndFunctionEventQueryGroupBy.JSON_PROPERTY_LIMIT, FormulaAndFunctionEventQueryGroupBy.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionEventQueryGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -36,51 +55,46 @@ public FormulaAndFunctionEventQueryGroupBy() {} @JsonCreator public FormulaAndFunctionEventQueryGroupBy( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public FormulaAndFunctionEventQueryGroupBy facet(String facet) { this.facet = facet; return this; } /** - * Event facet. - * + *

Event facet.

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public FormulaAndFunctionEventQueryGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * Number of groups to return. - * + *

Number of groups to return.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public FormulaAndFunctionEventQueryGroupBy sort(FormulaAndFunctionEventQueryGroupBySort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -88,22 +102,23 @@ public FormulaAndFunctionEventQueryGroupBy sort(FormulaAndFunctionEventQueryGrou } /** - * Options for sorting group by results. - * + *

Options for sorting group by results.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionEventQueryGroupBySort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionEventQueryGroupBySort getSort() { + return sort; + } public void setSort(FormulaAndFunctionEventQueryGroupBySort sort) { this.sort = sort; } - /** Return true if this FormulaAndFunctionEventQueryGroupBy object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventQueryGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,16 +127,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionEventQueryGroupBy formulaAndFunctionEventQueryGroupBy = - (FormulaAndFunctionEventQueryGroupBy) o; - return Objects.equals(this.facet, formulaAndFunctionEventQueryGroupBy.facet) - && Objects.equals(this.limit, formulaAndFunctionEventQueryGroupBy.limit) - && Objects.equals(this.sort, formulaAndFunctionEventQueryGroupBy.sort); + FormulaAndFunctionEventQueryGroupBy formulaAndFunctionEventQueryGroupBy = (FormulaAndFunctionEventQueryGroupBy) o; + return Objects.equals(this.facet, formulaAndFunctionEventQueryGroupBy.facet) && Objects.equals(this.limit, formulaAndFunctionEventQueryGroupBy.limit) && Objects.equals(this.sort, formulaAndFunctionEventQueryGroupBy.sort); } + @Override public int hashCode() { - return Objects.hash(facet, limit, sort); + return Objects.hash(facet,limit,sort); } @Override @@ -136,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBySort.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBySort.java index aa2da3a9ea2..2678ec7e346 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBySort.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupBySort.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Options for sorting group by results. */ + +/** + *

Options for sorting group by results.

+ */ @JsonPropertyOrder({ FormulaAndFunctionEventQueryGroupBySort.JSON_PROPERTY_AGGREGATION, FormulaAndFunctionEventQueryGroupBySort.JSON_PROPERTY_METRIC, FormulaAndFunctionEventQueryGroupBySort.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionEventQueryGroupBySort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private FormulaAndFunctionEventAggregation aggregation; @@ -36,58 +55,51 @@ public FormulaAndFunctionEventQueryGroupBySort() {} @JsonCreator public FormulaAndFunctionEventQueryGroupBySort( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - FormulaAndFunctionEventAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)FormulaAndFunctionEventAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - - public FormulaAndFunctionEventQueryGroupBySort aggregation( - FormulaAndFunctionEventAggregation aggregation) { + public FormulaAndFunctionEventQueryGroupBySort aggregation(FormulaAndFunctionEventAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * Aggregation methods for event platform queries. - * + *

Aggregation methods for event platform queries.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionEventAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionEventAggregation getAggregation() { + return aggregation; + } public void setAggregation(FormulaAndFunctionEventAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public FormulaAndFunctionEventQueryGroupBySort metric(String metric) { this.metric = metric; return this; } /** - * Metric used for sorting group by results. - * + *

Metric used for sorting group by results.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public FormulaAndFunctionEventQueryGroupBySort order(QuerySortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -95,25 +107,26 @@ public FormulaAndFunctionEventQueryGroupBySort order(QuerySortOrder order) { } /** - * Direction of sort. - * + *

Direction of sort.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public QuerySortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public QuerySortOrder getOrder() { + return order; + } public void setOrder(QuerySortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this FormulaAndFunctionEventQueryGroupBySort object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventQueryGroupBySort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,16 +135,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionEventQueryGroupBySort formulaAndFunctionEventQueryGroupBySort = - (FormulaAndFunctionEventQueryGroupBySort) o; - return Objects.equals(this.aggregation, formulaAndFunctionEventQueryGroupBySort.aggregation) - && Objects.equals(this.metric, formulaAndFunctionEventQueryGroupBySort.metric) - && Objects.equals(this.order, formulaAndFunctionEventQueryGroupBySort.order); + FormulaAndFunctionEventQueryGroupBySort formulaAndFunctionEventQueryGroupBySort = (FormulaAndFunctionEventQueryGroupBySort) o; + return Objects.equals(this.aggregation, formulaAndFunctionEventQueryGroupBySort.aggregation) && Objects.equals(this.metric, formulaAndFunctionEventQueryGroupBySort.metric) && Objects.equals(this.order, formulaAndFunctionEventQueryGroupBySort.order); } + @Override public int hashCode() { - return Objects.hash(aggregation, metric, order); + return Objects.hash(aggregation,metric,order); } @Override @@ -146,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventsDataSource.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventsDataSource.java index 4b7a69d8932..a17f45b92d4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventsDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventsDataSource.java @@ -6,55 +6,58 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Data source for event platform-based queries. */ -@JsonSerialize( - using = FormulaAndFunctionEventsDataSource.FormulaAndFunctionEventsDataSourceSerializer.class) +/** + *

Data source for event platform-based queries.

+ */ +@JsonSerialize(using = FormulaAndFunctionEventsDataSource.FormulaAndFunctionEventsDataSourceSerializer.class) public class FormulaAndFunctionEventsDataSource { - public static final FormulaAndFunctionEventsDataSource LOGS = - new FormulaAndFunctionEventsDataSource("logs"); - public static final FormulaAndFunctionEventsDataSource SPANS = - new FormulaAndFunctionEventsDataSource("spans"); - public static final FormulaAndFunctionEventsDataSource NETWORK = - new FormulaAndFunctionEventsDataSource("network"); - public static final FormulaAndFunctionEventsDataSource RUM = - new FormulaAndFunctionEventsDataSource("rum"); - public static final FormulaAndFunctionEventsDataSource SECURITY_SIGNALS = - new FormulaAndFunctionEventsDataSource("security_signals"); - public static final FormulaAndFunctionEventsDataSource PROFILES = - new FormulaAndFunctionEventsDataSource("profiles"); - public static final FormulaAndFunctionEventsDataSource AUDIT = - new FormulaAndFunctionEventsDataSource("audit"); - public static final FormulaAndFunctionEventsDataSource EVENTS = - new FormulaAndFunctionEventsDataSource("events"); - public static final FormulaAndFunctionEventsDataSource CI_TESTS = - new FormulaAndFunctionEventsDataSource("ci_tests"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "logs", - "spans", - "network", - "rum", - "security_signals", - "profiles", - "audit", - "events", - "ci_tests")); + public static final FormulaAndFunctionEventsDataSource LOGS = new FormulaAndFunctionEventsDataSource("logs"); + public static final FormulaAndFunctionEventsDataSource SPANS = new FormulaAndFunctionEventsDataSource("spans"); + public static final FormulaAndFunctionEventsDataSource NETWORK = new FormulaAndFunctionEventsDataSource("network"); + public static final FormulaAndFunctionEventsDataSource RUM = new FormulaAndFunctionEventsDataSource("rum"); + public static final FormulaAndFunctionEventsDataSource SECURITY_SIGNALS = new FormulaAndFunctionEventsDataSource("security_signals"); + public static final FormulaAndFunctionEventsDataSource PROFILES = new FormulaAndFunctionEventsDataSource("profiles"); + public static final FormulaAndFunctionEventsDataSource AUDIT = new FormulaAndFunctionEventsDataSource("audit"); + public static final FormulaAndFunctionEventsDataSource EVENTS = new FormulaAndFunctionEventsDataSource("events"); + public static final FormulaAndFunctionEventsDataSource CI_TESTS = new FormulaAndFunctionEventsDataSource("ci_tests"); + + private static final Set allowedValues = new HashSet(Arrays.asList("logs", "spans", "network", "rum", "security_signals", "profiles", "audit", "events", "ci_tests")); private String value; @@ -66,23 +69,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionEventsDataSourceSerializer - extends StdSerializer { - public FormulaAndFunctionEventsDataSourceSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionEventsDataSourceSerializer extends StdSerializer { + public FormulaAndFunctionEventsDataSourceSerializer(Class t) { + super(t); + } - public FormulaAndFunctionEventsDataSourceSerializer() { - this(null); - } + public FormulaAndFunctionEventsDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionEventsDataSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionEventsDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -94,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionEventsDataSource object is equal to o. */ + /** + * Return true if this FormulaAndFunctionEventsDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -108,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricAggregation.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricAggregation.java index 552a6dcda1f..96de2949b9b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricAggregation.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricAggregation.java @@ -6,44 +6,57 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The aggregation methods available for metrics queries. */ -@JsonSerialize( - using = FormulaAndFunctionMetricAggregation.FormulaAndFunctionMetricAggregationSerializer.class) +/** + *

The aggregation methods available for metrics queries.

+ */ +@JsonSerialize(using = FormulaAndFunctionMetricAggregation.FormulaAndFunctionMetricAggregationSerializer.class) public class FormulaAndFunctionMetricAggregation { - public static final FormulaAndFunctionMetricAggregation AVG = - new FormulaAndFunctionMetricAggregation("avg"); - public static final FormulaAndFunctionMetricAggregation MIN = - new FormulaAndFunctionMetricAggregation("min"); - public static final FormulaAndFunctionMetricAggregation MAX = - new FormulaAndFunctionMetricAggregation("max"); - public static final FormulaAndFunctionMetricAggregation SUM = - new FormulaAndFunctionMetricAggregation("sum"); - public static final FormulaAndFunctionMetricAggregation LAST = - new FormulaAndFunctionMetricAggregation("last"); - public static final FormulaAndFunctionMetricAggregation AREA = - new FormulaAndFunctionMetricAggregation("area"); - public static final FormulaAndFunctionMetricAggregation L2NORM = - new FormulaAndFunctionMetricAggregation("l2norm"); - public static final FormulaAndFunctionMetricAggregation PERCENTILE = - new FormulaAndFunctionMetricAggregation("percentile"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList("avg", "min", "max", "sum", "last", "area", "l2norm", "percentile")); + public static final FormulaAndFunctionMetricAggregation AVG = new FormulaAndFunctionMetricAggregation("avg"); + public static final FormulaAndFunctionMetricAggregation MIN = new FormulaAndFunctionMetricAggregation("min"); + public static final FormulaAndFunctionMetricAggregation MAX = new FormulaAndFunctionMetricAggregation("max"); + public static final FormulaAndFunctionMetricAggregation SUM = new FormulaAndFunctionMetricAggregation("sum"); + public static final FormulaAndFunctionMetricAggregation LAST = new FormulaAndFunctionMetricAggregation("last"); + public static final FormulaAndFunctionMetricAggregation AREA = new FormulaAndFunctionMetricAggregation("area"); + public static final FormulaAndFunctionMetricAggregation L2NORM = new FormulaAndFunctionMetricAggregation("l2norm"); + public static final FormulaAndFunctionMetricAggregation PERCENTILE = new FormulaAndFunctionMetricAggregation("percentile"); + + private static final Set allowedValues = new HashSet(Arrays.asList("avg", "min", "max", "sum", "last", "area", "l2norm", "percentile")); private String value; @@ -55,23 +68,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionMetricAggregationSerializer - extends StdSerializer { - public FormulaAndFunctionMetricAggregationSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionMetricAggregationSerializer extends StdSerializer { + public FormulaAndFunctionMetricAggregationSerializer(Class t) { + super(t); + } - public FormulaAndFunctionMetricAggregationSerializer() { - this(null); - } + public FormulaAndFunctionMetricAggregationSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionMetricAggregation value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionMetricAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -83,7 +92,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionMetricAggregation object is equal to o. */ + /** + * Return true if this FormulaAndFunctionMetricAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +108,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricDataSource.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricDataSource.java index 7395a4c55eb..fcabea9e2d9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricDataSource.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Data source for metrics queries. */ -@JsonSerialize( - using = FormulaAndFunctionMetricDataSource.FormulaAndFunctionMetricDataSourceSerializer.class) +/** + *

Data source for metrics queries.

+ */ +@JsonSerialize(using = FormulaAndFunctionMetricDataSource.FormulaAndFunctionMetricDataSourceSerializer.class) public class FormulaAndFunctionMetricDataSource { - public static final FormulaAndFunctionMetricDataSource METRICS = - new FormulaAndFunctionMetricDataSource("metrics"); + public static final FormulaAndFunctionMetricDataSource METRICS = new FormulaAndFunctionMetricDataSource("metrics"); private static final Set allowedValues = new HashSet(Arrays.asList("metrics")); @@ -39,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionMetricDataSourceSerializer - extends StdSerializer { - public FormulaAndFunctionMetricDataSourceSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionMetricDataSourceSerializer extends StdSerializer { + public FormulaAndFunctionMetricDataSourceSerializer(Class t) { + super(t); + } - public FormulaAndFunctionMetricDataSourceSerializer() { - this(null); - } + public FormulaAndFunctionMetricDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionMetricDataSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionMetricDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionMetricDataSource object is equal to o. */ + /** + * Return true if this FormulaAndFunctionMetricDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricQueryDefinition.java index eef7077eea3..b238e07d391 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionMetricQueryDefinition.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A formula and functions metrics query. */ +/** + *

A formula and functions metrics query.

+ */ @JsonPropertyOrder({ FormulaAndFunctionMetricQueryDefinition.JSON_PROPERTY_AGGREGATOR, FormulaAndFunctionMetricQueryDefinition.JSON_PROPERTY_DATA_SOURCE, FormulaAndFunctionMetricQueryDefinition.JSON_PROPERTY_NAME, FormulaAndFunctionMetricQueryDefinition.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionMetricQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATOR = "aggregator"; private FormulaAndFunctionMetricAggregation aggregator; @@ -40,108 +59,99 @@ public FormulaAndFunctionMetricQueryDefinition() {} @JsonCreator public FormulaAndFunctionMetricQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - FormulaAndFunctionMetricDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.name = name; - this.query = query; - } - - public FormulaAndFunctionMetricQueryDefinition aggregator( - FormulaAndFunctionMetricAggregation aggregator) { + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)FormulaAndFunctionMetricDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.name = name; + this.query = query; + } + public FormulaAndFunctionMetricQueryDefinition aggregator(FormulaAndFunctionMetricAggregation aggregator) { this.aggregator = aggregator; this.unparsed |= !aggregator.isValid(); return this; } /** - * The aggregation methods available for metrics queries. - * + *

The aggregation methods available for metrics queries.

* @return aggregator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionMetricAggregation getAggregator() { - return aggregator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionMetricAggregation getAggregator() { + return aggregator; + } public void setAggregator(FormulaAndFunctionMetricAggregation aggregator) { if (!aggregator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregator = aggregator; } - - public FormulaAndFunctionMetricQueryDefinition dataSource( - FormulaAndFunctionMetricDataSource dataSource) { + public FormulaAndFunctionMetricQueryDefinition dataSource(FormulaAndFunctionMetricDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; } /** - * Data source for metrics queries. - * + *

Data source for metrics queries.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionMetricDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionMetricDataSource getDataSource() { + return dataSource; + } public void setDataSource(FormulaAndFunctionMetricDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public FormulaAndFunctionMetricQueryDefinition name(String name) { this.name = name; return this; } /** - * Name of the query for use in formulas. - * + *

Name of the query for use in formulas.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FormulaAndFunctionMetricQueryDefinition query(String query) { this.query = query; return this; } /** - * Metrics query definition. - * + *

Metrics query definition.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this FormulaAndFunctionMetricQueryDefinition object is equal to o. */ + /** + * Return true if this FormulaAndFunctionMetricQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -150,17 +160,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionMetricQueryDefinition formulaAndFunctionMetricQueryDefinition = - (FormulaAndFunctionMetricQueryDefinition) o; - return Objects.equals(this.aggregator, formulaAndFunctionMetricQueryDefinition.aggregator) - && Objects.equals(this.dataSource, formulaAndFunctionMetricQueryDefinition.dataSource) - && Objects.equals(this.name, formulaAndFunctionMetricQueryDefinition.name) - && Objects.equals(this.query, formulaAndFunctionMetricQueryDefinition.query); + FormulaAndFunctionMetricQueryDefinition formulaAndFunctionMetricQueryDefinition = (FormulaAndFunctionMetricQueryDefinition) o; + return Objects.equals(this.aggregator, formulaAndFunctionMetricQueryDefinition.aggregator) && Objects.equals(this.dataSource, formulaAndFunctionMetricQueryDefinition.dataSource) && Objects.equals(this.name, formulaAndFunctionMetricQueryDefinition.name) && Objects.equals(this.query, formulaAndFunctionMetricQueryDefinition.query); } + @Override public int hashCode() { - return Objects.hash(aggregator, dataSource, name, query); + return Objects.hash(aggregator,dataSource,name,query); } @Override @@ -176,7 +183,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDataSource.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDataSource.java index 05936c1ff9f..02ade07b007 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDataSource.java @@ -6,33 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Data sources that rely on the process backend. */ -@JsonSerialize( - using = - FormulaAndFunctionProcessQueryDataSource.FormulaAndFunctionProcessQueryDataSourceSerializer - .class) +/** + *

Data sources that rely on the process backend.

+ */ +@JsonSerialize(using = FormulaAndFunctionProcessQueryDataSource.FormulaAndFunctionProcessQueryDataSourceSerializer.class) public class FormulaAndFunctionProcessQueryDataSource { - public static final FormulaAndFunctionProcessQueryDataSource PROCESS = - new FormulaAndFunctionProcessQueryDataSource("process"); - public static final FormulaAndFunctionProcessQueryDataSource CONTAINER = - new FormulaAndFunctionProcessQueryDataSource("container"); + public static final FormulaAndFunctionProcessQueryDataSource PROCESS = new FormulaAndFunctionProcessQueryDataSource("process"); + public static final FormulaAndFunctionProcessQueryDataSource CONTAINER = new FormulaAndFunctionProcessQueryDataSource("container"); - private static final Set allowedValues = - new HashSet(Arrays.asList("process", "container")); + private static final Set allowedValues = new HashSet(Arrays.asList("process", "container")); private String value; @@ -44,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionProcessQueryDataSourceSerializer - extends StdSerializer { - public FormulaAndFunctionProcessQueryDataSourceSerializer( - Class t) { - super(t); - } + public static class FormulaAndFunctionProcessQueryDataSourceSerializer extends StdSerializer { + public FormulaAndFunctionProcessQueryDataSourceSerializer(Class t) { + super(t); + } - public FormulaAndFunctionProcessQueryDataSourceSerializer() { - this(null); - } + public FormulaAndFunctionProcessQueryDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionProcessQueryDataSource value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionProcessQueryDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionProcessQueryDataSource object is equal to o. */ + /** + * Return true if this FormulaAndFunctionProcessQueryDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDefinition.java index 7c8aa42c81a..9c3aff4ab76 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionProcessQueryDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Process query using formulas and functions. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Process query using formulas and functions.

+ */ @JsonPropertyOrder({ FormulaAndFunctionProcessQueryDefinition.JSON_PROPERTY_AGGREGATOR, FormulaAndFunctionProcessQueryDefinition.JSON_PROPERTY_DATA_SOURCE, @@ -27,10 +44,10 @@ FormulaAndFunctionProcessQueryDefinition.JSON_PROPERTY_TAG_FILTERS, FormulaAndFunctionProcessQueryDefinition.JSON_PROPERTY_TEXT_FILTER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaAndFunctionProcessQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATOR = "aggregator"; private FormulaAndFunctionMetricAggregation aggregator; @@ -62,149 +79,133 @@ public FormulaAndFunctionProcessQueryDefinition() {} @JsonCreator public FormulaAndFunctionProcessQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - FormulaAndFunctionProcessQueryDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_METRIC) String metric, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.metric = metric; - this.name = name; - } - - public FormulaAndFunctionProcessQueryDefinition aggregator( - FormulaAndFunctionMetricAggregation aggregator) { + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)FormulaAndFunctionProcessQueryDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_METRIC)String metric, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.metric = metric; + this.name = name; + } + public FormulaAndFunctionProcessQueryDefinition aggregator(FormulaAndFunctionMetricAggregation aggregator) { this.aggregator = aggregator; this.unparsed |= !aggregator.isValid(); return this; } /** - * The aggregation methods available for metrics queries. - * + *

The aggregation methods available for metrics queries.

* @return aggregator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionMetricAggregation getAggregator() { - return aggregator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionMetricAggregation getAggregator() { + return aggregator; + } public void setAggregator(FormulaAndFunctionMetricAggregation aggregator) { if (!aggregator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregator = aggregator; } - - public FormulaAndFunctionProcessQueryDefinition dataSource( - FormulaAndFunctionProcessQueryDataSource dataSource) { + public FormulaAndFunctionProcessQueryDefinition dataSource(FormulaAndFunctionProcessQueryDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; } /** - * Data sources that rely on the process backend. - * + *

Data sources that rely on the process backend.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FormulaAndFunctionProcessQueryDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FormulaAndFunctionProcessQueryDataSource getDataSource() { + return dataSource; + } public void setDataSource(FormulaAndFunctionProcessQueryDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public FormulaAndFunctionProcessQueryDefinition isNormalizedCpu(Boolean isNormalizedCpu) { this.isNormalizedCpu = isNormalizedCpu; return this; } /** - * Whether to normalize the CPU percentages. - * + *

Whether to normalize the CPU percentages.

* @return isNormalizedCpu - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_NORMALIZED_CPU) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsNormalizedCpu() { - return isNormalizedCpu; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_NORMALIZED_CPU) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsNormalizedCpu() { + return isNormalizedCpu; + } public void setIsNormalizedCpu(Boolean isNormalizedCpu) { this.isNormalizedCpu = isNormalizedCpu; } - public FormulaAndFunctionProcessQueryDefinition limit(Long limit) { this.limit = limit; return this; } /** - * Number of hits to return. - * + *

Number of hits to return.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public FormulaAndFunctionProcessQueryDefinition metric(String metric) { this.metric = metric; return this; } /** - * Process metric name. - * + *

Process metric name.

* @return metric - */ - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMetric() { - return metric; - } - + **/ + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public FormulaAndFunctionProcessQueryDefinition name(String name) { this.name = name; return this; } /** - * Name of query for use in formulas. - * + *

Name of query for use in formulas.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FormulaAndFunctionProcessQueryDefinition sort(QuerySortOrder sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -212,29 +213,26 @@ public FormulaAndFunctionProcessQueryDefinition sort(QuerySortOrder sort) { } /** - * Direction of sort. - * + *

Direction of sort.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public QuerySortOrder getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public QuerySortOrder getSort() { + return sort; + } public void setSort(QuerySortOrder sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - public FormulaAndFunctionProcessQueryDefinition tagFilters(List tagFilters) { this.tagFilters = tagFilters; return this; } - public FormulaAndFunctionProcessQueryDefinition addTagFiltersItem(String tagFiltersItem) { if (this.tagFilters == null) { this.tagFilters = new ArrayList<>(); @@ -244,43 +242,42 @@ public FormulaAndFunctionProcessQueryDefinition addTagFiltersItem(String tagFilt } /** - * An array of tags to filter by. - * + *

An array of tags to filter by.

* @return tagFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTagFilters() { - return tagFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTagFilters() { + return tagFilters; + } public void setTagFilters(List tagFilters) { this.tagFilters = tagFilters; } - public FormulaAndFunctionProcessQueryDefinition textFilter(String textFilter) { this.textFilter = textFilter; return this; } /** - * Text to use as filter. - * + *

Text to use as filter.

* @return textFilter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTextFilter() { - return textFilter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTextFilter() { + return textFilter; + } public void setTextFilter(String textFilter) { this.textFilter = textFilter; } - /** Return true if this FormulaAndFunctionProcessQueryDefinition object is equal to o. */ + /** + * Return true if this FormulaAndFunctionProcessQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -289,24 +286,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FormulaAndFunctionProcessQueryDefinition formulaAndFunctionProcessQueryDefinition = - (FormulaAndFunctionProcessQueryDefinition) o; - return Objects.equals(this.aggregator, formulaAndFunctionProcessQueryDefinition.aggregator) - && Objects.equals(this.dataSource, formulaAndFunctionProcessQueryDefinition.dataSource) - && Objects.equals( - this.isNormalizedCpu, formulaAndFunctionProcessQueryDefinition.isNormalizedCpu) - && Objects.equals(this.limit, formulaAndFunctionProcessQueryDefinition.limit) - && Objects.equals(this.metric, formulaAndFunctionProcessQueryDefinition.metric) - && Objects.equals(this.name, formulaAndFunctionProcessQueryDefinition.name) - && Objects.equals(this.sort, formulaAndFunctionProcessQueryDefinition.sort) - && Objects.equals(this.tagFilters, formulaAndFunctionProcessQueryDefinition.tagFilters) - && Objects.equals(this.textFilter, formulaAndFunctionProcessQueryDefinition.textFilter); + FormulaAndFunctionProcessQueryDefinition formulaAndFunctionProcessQueryDefinition = (FormulaAndFunctionProcessQueryDefinition) o; + return Objects.equals(this.aggregator, formulaAndFunctionProcessQueryDefinition.aggregator) && Objects.equals(this.dataSource, formulaAndFunctionProcessQueryDefinition.dataSource) && Objects.equals(this.isNormalizedCpu, formulaAndFunctionProcessQueryDefinition.isNormalizedCpu) && Objects.equals(this.limit, formulaAndFunctionProcessQueryDefinition.limit) && Objects.equals(this.metric, formulaAndFunctionProcessQueryDefinition.metric) && Objects.equals(this.name, formulaAndFunctionProcessQueryDefinition.name) && Objects.equals(this.sort, formulaAndFunctionProcessQueryDefinition.sort) && Objects.equals(this.tagFilters, formulaAndFunctionProcessQueryDefinition.tagFilters) && Objects.equals(this.textFilter, formulaAndFunctionProcessQueryDefinition.textFilter); } + @Override public int hashCode() { - return Objects.hash( - aggregator, dataSource, isNormalizedCpu, limit, metric, name, sort, tagFilters, textFilter); + return Objects.hash(aggregator,dataSource,isNormalizedCpu,limit,metric,name,sort,tagFilters,textFilter); } @Override @@ -327,7 +314,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionQueryDefinition.java index 6066f947399..c81ad3166af 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionQueryDefinition.java @@ -6,555 +6,411 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = FormulaAndFunctionQueryDefinition.FormulaAndFunctionQueryDefinitionDeserializer.class) -@JsonSerialize( - using = FormulaAndFunctionQueryDefinition.FormulaAndFunctionQueryDefinitionSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = FormulaAndFunctionQueryDefinition.FormulaAndFunctionQueryDefinitionDeserializer.class) +@JsonSerialize(using = FormulaAndFunctionQueryDefinition.FormulaAndFunctionQueryDefinitionSerializer.class) public class FormulaAndFunctionQueryDefinition extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(FormulaAndFunctionQueryDefinition.class.getName()); + private static final Logger log = Logger.getLogger(FormulaAndFunctionQueryDefinition.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class FormulaAndFunctionQueryDefinitionSerializer - extends StdSerializer { - public FormulaAndFunctionQueryDefinitionSerializer(Class t) { - super(t); - } + public static class FormulaAndFunctionQueryDefinitionSerializer extends StdSerializer { + public FormulaAndFunctionQueryDefinitionSerializer(Class t) { + super(t); + } + + public FormulaAndFunctionQueryDefinitionSerializer() { + this(null); + } - public FormulaAndFunctionQueryDefinitionSerializer() { - this(null); + @Override + public void serialize(FormulaAndFunctionQueryDefinition value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public void serialize( - FormulaAndFunctionQueryDefinition value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + public static class FormulaAndFunctionQueryDefinitionDeserializer extends StdDeserializer { + public FormulaAndFunctionQueryDefinitionDeserializer() { + this(FormulaAndFunctionQueryDefinition.class); + } + + public FormulaAndFunctionQueryDefinitionDeserializer(Class vc) { + super(vc); + } + + @Override + public FormulaAndFunctionQueryDefinition 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 FormulaAndFunctionMetricQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionMetricQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionMetricQueryDefinition.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 (!((FormulaAndFunctionMetricQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionMetricQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionMetricQueryDefinition'", e); + } + + // deserialize FormulaAndFunctionEventQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionEventQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionEventQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionEventQueryDefinition.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 (!((FormulaAndFunctionEventQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionEventQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionEventQueryDefinition'", e); + } + + // deserialize FormulaAndFunctionProcessQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionProcessQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(Long.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(Float.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(Double.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionProcessQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionProcessQueryDefinition.class.equals(Float.class) || FormulaAndFunctionProcessQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionProcessQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionProcessQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionProcessQueryDefinition.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 (!((FormulaAndFunctionProcessQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionProcessQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionProcessQueryDefinition'", e); + } + + // deserialize FormulaAndFunctionApmDependencyStatsQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Long.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Float.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Double.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Float.class) || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionApmDependencyStatsQueryDefinition.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 (!((FormulaAndFunctionApmDependencyStatsQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionApmDependencyStatsQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionApmDependencyStatsQueryDefinition'", e); + } + + // deserialize FormulaAndFunctionApmResourceStatsQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Long.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Double.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FormulaAndFunctionApmResourceStatsQueryDefinition.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 (!((FormulaAndFunctionApmResourceStatsQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'", e); + } + + FormulaAndFunctionQueryDefinition ret = new FormulaAndFunctionQueryDefinition(); + 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 FormulaAndFunctionQueryDefinition getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "FormulaAndFunctionQueryDefinition cannot be null"); + } } - } - public static class FormulaAndFunctionQueryDefinitionDeserializer - extends StdDeserializer { - public FormulaAndFunctionQueryDefinitionDeserializer() { - this(FormulaAndFunctionQueryDefinition.class); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public FormulaAndFunctionQueryDefinition() { + super("oneOf", Boolean.FALSE); + } + public FormulaAndFunctionQueryDefinition(FormulaAndFunctionMetricQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FormulaAndFunctionQueryDefinition(FormulaAndFunctionEventQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FormulaAndFunctionQueryDefinition(FormulaAndFunctionProcessQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FormulaAndFunctionQueryDefinition(FormulaAndFunctionApmDependencyStatsQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FormulaAndFunctionQueryDefinition(FormulaAndFunctionApmResourceStatsQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public FormulaAndFunctionQueryDefinitionDeserializer(Class vc) { - super(vc); + static { + schemas.put("FormulaAndFunctionMetricQueryDefinition", new GenericType() { + }); + schemas.put("FormulaAndFunctionEventQueryDefinition", new GenericType() { + }); + schemas.put("FormulaAndFunctionProcessQueryDefinition", new GenericType() { + }); + schemas.put("FormulaAndFunctionApmDependencyStatsQueryDefinition", new GenericType() { + }); + schemas.put("FormulaAndFunctionApmResourceStatsQueryDefinition", new GenericType() { + }); + JSON.registerDescendants(FormulaAndFunctionQueryDefinition.class, Collections.unmodifiableMap(schemas)); } @Override - public FormulaAndFunctionQueryDefinition 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 FormulaAndFunctionMetricQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionMetricQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionMetricQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionMetricQueryDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionMetricQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionMetricQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionMetricQueryDefinition.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 (!((FormulaAndFunctionMetricQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'FormulaAndFunctionMetricQueryDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionMetricQueryDefinition'", - e); - } + public Map getSchemas() { + return FormulaAndFunctionQueryDefinition.schemas; + } - // deserialize FormulaAndFunctionEventQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionEventQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionEventQueryDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionEventQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionEventQueryDefinition.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 (!((FormulaAndFunctionEventQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'FormulaAndFunctionEventQueryDefinition'"); + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, FormulaAndFunctionApmDependencyStatsQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition + * + * 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(FormulaAndFunctionMetricQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionEventQueryDefinition'", - e); - } - - // deserialize FormulaAndFunctionProcessQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionProcessQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionProcessQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionProcessQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionProcessQueryDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionProcessQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionProcessQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(FormulaAndFunctionEventQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionProcessQueryDefinition.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 (!((FormulaAndFunctionProcessQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'FormulaAndFunctionProcessQueryDefinition'"); + if (JSON.isInstanceOf(FormulaAndFunctionProcessQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionProcessQueryDefinition'", - e); - } - - // deserialize FormulaAndFunctionApmDependencyStatsQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals( - Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionApmDependencyStatsQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(FormulaAndFunctionApmDependencyStatsQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionApmDependencyStatsQueryDefinition.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 (!((FormulaAndFunctionApmDependencyStatsQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, - "Input data matches schema 'FormulaAndFunctionApmDependencyStatsQueryDefinition'"); + if (JSON.isInstanceOf(FormulaAndFunctionApmResourceStatsQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema" - + " 'FormulaAndFunctionApmDependencyStatsQueryDefinition'", - e); - } - // deserialize FormulaAndFunctionApmResourceStatsQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Long.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Double.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Integer.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals( - Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Float.class) - || FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals( - Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FormulaAndFunctionApmResourceStatsQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(FormulaAndFunctionApmResourceStatsQueryDefinition.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 (!((FormulaAndFunctionApmResourceStatsQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, - "Input data matches schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'FormulaAndFunctionApmResourceStatsQueryDefinition'", - e); - } - - FormulaAndFunctionQueryDefinition ret = new FormulaAndFunctionQueryDefinition(); - 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; + throw new RuntimeException("Invalid instance type. Must be FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, FormulaAndFunctionApmDependencyStatsQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, FormulaAndFunctionApmDependencyStatsQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition + * + * @return The actual instance (FormulaAndFunctionMetricQueryDefinition, FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, FormulaAndFunctionApmDependencyStatsQueryDefinition, FormulaAndFunctionApmResourceStatsQueryDefinition) + */ @Override - public FormulaAndFunctionQueryDefinition getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "FormulaAndFunctionQueryDefinition cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public FormulaAndFunctionQueryDefinition() { - super("oneOf", Boolean.FALSE); - } - - public FormulaAndFunctionQueryDefinition(FormulaAndFunctionMetricQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FormulaAndFunctionQueryDefinition(FormulaAndFunctionEventQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FormulaAndFunctionQueryDefinition(FormulaAndFunctionProcessQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FormulaAndFunctionQueryDefinition(FormulaAndFunctionApmDependencyStatsQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FormulaAndFunctionQueryDefinition(FormulaAndFunctionApmResourceStatsQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "FormulaAndFunctionMetricQueryDefinition", - new GenericType() {}); - schemas.put( - "FormulaAndFunctionEventQueryDefinition", - new GenericType() {}); - schemas.put( - "FormulaAndFunctionProcessQueryDefinition", - new GenericType() {}); - schemas.put( - "FormulaAndFunctionApmDependencyStatsQueryDefinition", - new GenericType() {}); - schemas.put( - "FormulaAndFunctionApmResourceStatsQueryDefinition", - new GenericType() {}); - JSON.registerDescendants( - FormulaAndFunctionQueryDefinition.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return FormulaAndFunctionQueryDefinition.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: FormulaAndFunctionMetricQueryDefinition, - * FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, - * FormulaAndFunctionApmDependencyStatsQueryDefinition, - * FormulaAndFunctionApmResourceStatsQueryDefinition - * - *

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( - FormulaAndFunctionMetricQueryDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - FormulaAndFunctionEventQueryDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - FormulaAndFunctionProcessQueryDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - FormulaAndFunctionApmDependencyStatsQueryDefinition.class, - instance, - new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - FormulaAndFunctionApmResourceStatsQueryDefinition.class, - instance, - new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `FormulaAndFunctionMetricQueryDefinition`. If the actual instance is not `FormulaAndFunctionMetricQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionMetricQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionMetricQueryDefinition` + */ + public FormulaAndFunctionMetricQueryDefinition getFormulaAndFunctionMetricQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionMetricQueryDefinition)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `FormulaAndFunctionEventQueryDefinition`. If the actual instance is not `FormulaAndFunctionEventQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionEventQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionEventQueryDefinition` + */ + public FormulaAndFunctionEventQueryDefinition getFormulaAndFunctionEventQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionEventQueryDefinition)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be FormulaAndFunctionMetricQueryDefinition," - + " FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition," - + " FormulaAndFunctionApmDependencyStatsQueryDefinition," - + " FormulaAndFunctionApmResourceStatsQueryDefinition"); - } - - /** - * Get the actual instance, which can be the following: FormulaAndFunctionMetricQueryDefinition, - * FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, - * FormulaAndFunctionApmDependencyStatsQueryDefinition, - * FormulaAndFunctionApmResourceStatsQueryDefinition - * - * @return The actual instance (FormulaAndFunctionMetricQueryDefinition, - * FormulaAndFunctionEventQueryDefinition, FormulaAndFunctionProcessQueryDefinition, - * FormulaAndFunctionApmDependencyStatsQueryDefinition, - * FormulaAndFunctionApmResourceStatsQueryDefinition) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `FormulaAndFunctionMetricQueryDefinition`. If the actual instance is - * not `FormulaAndFunctionMetricQueryDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FormulaAndFunctionMetricQueryDefinition` - * @throws ClassCastException if the instance is not `FormulaAndFunctionMetricQueryDefinition` - */ - public FormulaAndFunctionMetricQueryDefinition getFormulaAndFunctionMetricQueryDefinition() - throws ClassCastException { - return (FormulaAndFunctionMetricQueryDefinition) super.getActualInstance(); - } - /** - * Get the actual instance of `FormulaAndFunctionEventQueryDefinition`. If the actual instance is - * not `FormulaAndFunctionEventQueryDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FormulaAndFunctionEventQueryDefinition` - * @throws ClassCastException if the instance is not `FormulaAndFunctionEventQueryDefinition` - */ - public FormulaAndFunctionEventQueryDefinition getFormulaAndFunctionEventQueryDefinition() - throws ClassCastException { - return (FormulaAndFunctionEventQueryDefinition) super.getActualInstance(); - } - - /** - * Get the actual instance of `FormulaAndFunctionProcessQueryDefinition`. If the actual instance - * is not `FormulaAndFunctionProcessQueryDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FormulaAndFunctionProcessQueryDefinition` - * @throws ClassCastException if the instance is not `FormulaAndFunctionProcessQueryDefinition` - */ - public FormulaAndFunctionProcessQueryDefinition getFormulaAndFunctionProcessQueryDefinition() - throws ClassCastException { - return (FormulaAndFunctionProcessQueryDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `FormulaAndFunctionProcessQueryDefinition`. If the actual instance is not `FormulaAndFunctionProcessQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionProcessQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionProcessQueryDefinition` + */ + public FormulaAndFunctionProcessQueryDefinition getFormulaAndFunctionProcessQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionProcessQueryDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `FormulaAndFunctionApmDependencyStatsQueryDefinition`. If the actual - * instance is not `FormulaAndFunctionApmDependencyStatsQueryDefinition`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `FormulaAndFunctionApmDependencyStatsQueryDefinition` - * @throws ClassCastException if the instance is not - * `FormulaAndFunctionApmDependencyStatsQueryDefinition` - */ - public FormulaAndFunctionApmDependencyStatsQueryDefinition - getFormulaAndFunctionApmDependencyStatsQueryDefinition() throws ClassCastException { - return (FormulaAndFunctionApmDependencyStatsQueryDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `FormulaAndFunctionApmDependencyStatsQueryDefinition`. If the actual instance is not `FormulaAndFunctionApmDependencyStatsQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionApmDependencyStatsQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionApmDependencyStatsQueryDefinition` + */ + public FormulaAndFunctionApmDependencyStatsQueryDefinition getFormulaAndFunctionApmDependencyStatsQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionApmDependencyStatsQueryDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition`. If the actual - * instance is not `FormulaAndFunctionApmResourceStatsQueryDefinition`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition` - * @throws ClassCastException if the instance is not - * `FormulaAndFunctionApmResourceStatsQueryDefinition` - */ - public FormulaAndFunctionApmResourceStatsQueryDefinition - getFormulaAndFunctionApmResourceStatsQueryDefinition() throws ClassCastException { - return (FormulaAndFunctionApmResourceStatsQueryDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition`. If the actual instance is not `FormulaAndFunctionApmResourceStatsQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionApmResourceStatsQueryDefinition` + * @throws ClassCastException if the instance is not `FormulaAndFunctionApmResourceStatsQueryDefinition` + */ + public FormulaAndFunctionApmResourceStatsQueryDefinition getFormulaAndFunctionApmResourceStatsQueryDefinition() throws ClassCastException { + return (FormulaAndFunctionApmResourceStatsQueryDefinition)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java index 3550da93a9f..c84486487c8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java @@ -6,31 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Timeseries or Scalar response. */ -@JsonSerialize( - using = FormulaAndFunctionResponseFormat.FormulaAndFunctionResponseFormatSerializer.class) +/** + *

Timeseries or Scalar response.

+ */ +@JsonSerialize(using = FormulaAndFunctionResponseFormat.FormulaAndFunctionResponseFormatSerializer.class) public class FormulaAndFunctionResponseFormat { - public static final FormulaAndFunctionResponseFormat TIMESERIES = - new FormulaAndFunctionResponseFormat("timeseries"); - public static final FormulaAndFunctionResponseFormat SCALAR = - new FormulaAndFunctionResponseFormat("scalar"); + public static final FormulaAndFunctionResponseFormat TIMESERIES = new FormulaAndFunctionResponseFormat("timeseries"); + public static final FormulaAndFunctionResponseFormat SCALAR = new FormulaAndFunctionResponseFormat("scalar"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries", "scalar")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries", "scalar")); private String value; @@ -42,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class FormulaAndFunctionResponseFormatSerializer - extends StdSerializer { - public FormulaAndFunctionResponseFormatSerializer(Class t) { - super(t); - } + public static class FormulaAndFunctionResponseFormatSerializer extends StdSerializer { + public FormulaAndFunctionResponseFormatSerializer(Class t) { + super(t); + } - public FormulaAndFunctionResponseFormatSerializer() { - this(null); - } + public FormulaAndFunctionResponseFormatSerializer() { + this(null); + } - @Override - public void serialize( - FormulaAndFunctionResponseFormat value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FormulaAndFunctionResponseFormat value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FormulaAndFunctionResponseFormat object is equal to o. */ + /** + * Return true if this FormulaAndFunctionResponseFormat object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinition.java index e3a2ac6ad76..6d4926a8ab3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Free text is a widget that allows you to add headings to your screenboard. Commonly used to state - * the overall purpose of the dashboard. Only available on FREE layout dashboards. + *

Free text is a widget that allows you to add headings to your screenboard. Commonly used to state the overall purpose of the dashboard. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ FreeTextWidgetDefinition.JSON_PROPERTY_COLOR, @@ -24,10 +40,10 @@ FreeTextWidgetDefinition.JSON_PROPERTY_TEXT_ALIGN, FreeTextWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FreeTextWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLOR = "color"; private String color; @@ -47,76 +63,68 @@ public FreeTextWidgetDefinition() {} @JsonCreator public FreeTextWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TEXT) String text, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - FreeTextWidgetDefinitionType type) { - this.text = text; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TEXT)String text, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)FreeTextWidgetDefinitionType type) { + this.text = text; + this.type = type; + this.unparsed |= !type.isValid(); } - public FreeTextWidgetDefinition color(String color) { this.color = color; return this; } /** - * Color of the text. - * + *

Color of the text.

* @return color - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getColor() { - return color; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getColor() { + return color; + } public void setColor(String color) { this.color = color; } - public FreeTextWidgetDefinition fontSize(String fontSize) { this.fontSize = fontSize; return this; } /** - * Size of the text. - * + *

Size of the text.

* @return fontSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFontSize() { - return fontSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FONT_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFontSize() { + return fontSize; + } public void setFontSize(String fontSize) { this.fontSize = fontSize; } - public FreeTextWidgetDefinition text(String text) { this.text = text; return this; } /** - * Text to display. - * + *

Text to display.

* @return text - */ - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getText() { - return text; - } - + **/ + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getText() { + return text; + } public void setText(String text) { this.text = text; } - public FreeTextWidgetDefinition textAlign(WidgetTextAlign textAlign) { this.textAlign = textAlign; this.unparsed |= !textAlign.isValid(); @@ -124,24 +132,22 @@ public FreeTextWidgetDefinition textAlign(WidgetTextAlign textAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return textAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTextAlign() { - return textAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTextAlign() { + return textAlign; + } public void setTextAlign(WidgetTextAlign textAlign) { if (!textAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.textAlign = textAlign; } - public FreeTextWidgetDefinition type(FreeTextWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -149,24 +155,25 @@ public FreeTextWidgetDefinition type(FreeTextWidgetDefinitionType type) { } /** - * Type of the free text widget. - * + *

Type of the free text widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FreeTextWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FreeTextWidgetDefinitionType getType() { + return type; + } public void setType(FreeTextWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FreeTextWidgetDefinition object is equal to o. */ + /** + * Return true if this FreeTextWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -176,16 +183,13 @@ public boolean equals(Object o) { return false; } FreeTextWidgetDefinition freeTextWidgetDefinition = (FreeTextWidgetDefinition) o; - return Objects.equals(this.color, freeTextWidgetDefinition.color) - && Objects.equals(this.fontSize, freeTextWidgetDefinition.fontSize) - && Objects.equals(this.text, freeTextWidgetDefinition.text) - && Objects.equals(this.textAlign, freeTextWidgetDefinition.textAlign) - && Objects.equals(this.type, freeTextWidgetDefinition.type); + return Objects.equals(this.color, freeTextWidgetDefinition.color) && Objects.equals(this.fontSize, freeTextWidgetDefinition.fontSize) && Objects.equals(this.text, freeTextWidgetDefinition.text) && Objects.equals(this.textAlign, freeTextWidgetDefinition.textAlign) && Objects.equals(this.type, freeTextWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(color, fontSize, text, textAlign, type); + return Objects.hash(color,fontSize,text,textAlign,type); } @Override @@ -202,7 +206,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinitionType.java index 31509b3a177..76bb287a3eb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/FreeTextWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the free text widget. */ +/** + *

Type of the free text widget.

+ */ @JsonSerialize(using = FreeTextWidgetDefinitionType.FreeTextWidgetDefinitionTypeSerializer.class) public class FreeTextWidgetDefinitionType { - public static final FreeTextWidgetDefinitionType FREE_TEXT = - new FreeTextWidgetDefinitionType("free_text"); + public static final FreeTextWidgetDefinitionType FREE_TEXT = new FreeTextWidgetDefinitionType("free_text"); private static final Set allowedValues = new HashSet(Arrays.asList("free_text")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class FreeTextWidgetDefinitionTypeSerializer - extends StdSerializer { - public FreeTextWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class FreeTextWidgetDefinitionTypeSerializer extends StdSerializer { + public FreeTextWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public FreeTextWidgetDefinitionTypeSerializer() { - this(null); - } + public FreeTextWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - FreeTextWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FreeTextWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FreeTextWidgetDefinitionType object is equal to o. */ + /** + * Return true if this FreeTextWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelQuery.java b/src/main/java/com/datadog/api/client/v1/model/FunnelQuery.java index 9723a4c4ddd..12629d7d089 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelQuery.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated funnel widget. */ + +/** + *

Updated funnel widget.

+ */ @JsonPropertyOrder({ FunnelQuery.JSON_PROPERTY_DATA_SOURCE, FunnelQuery.JSON_PROPERTY_QUERY_STRING, FunnelQuery.JSON_PROPERTY_STEPS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FunnelQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; private FunnelSource dataSource = FunnelSource.RUM; @@ -38,15 +55,14 @@ public FunnelQuery() {} @JsonCreator public FunnelQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) FunnelSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY_STRING) String queryString, - @JsonProperty(required = true, value = JSON_PROPERTY_STEPS) List steps) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.queryString = queryString; - this.steps = steps; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)FunnelSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY_STRING)String queryString, + @JsonProperty(required=true, value=JSON_PROPERTY_STEPS)List steps) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.queryString = queryString; + this.steps = steps; } - public FunnelQuery dataSource(FunnelSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); @@ -54,43 +70,39 @@ public FunnelQuery dataSource(FunnelSource dataSource) { } /** - * Source from which to query items to display in the funnel. - * + *

Source from which to query items to display in the funnel.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FunnelSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FunnelSource getDataSource() { + return dataSource; + } public void setDataSource(FunnelSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public FunnelQuery queryString(String queryString) { this.queryString = queryString; return this; } /** - * The widget query. - * + *

The widget query.

* @return queryString - */ - @JsonProperty(JSON_PROPERTY_QUERY_STRING) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQueryString() { - return queryString; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY_STRING) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQueryString() { + return queryString; + } public void setQueryString(String queryString) { this.queryString = queryString; } - public FunnelQuery steps(List steps) { this.steps = steps; for (FunnelStep item : steps) { @@ -98,7 +110,6 @@ public FunnelQuery steps(List steps) { } return this; } - public FunnelQuery addStepsItem(FunnelStep stepsItem) { this.steps.add(stepsItem); this.unparsed |= stepsItem.unparsed; @@ -106,21 +117,22 @@ public FunnelQuery addStepsItem(FunnelStep stepsItem) { } /** - * List of funnel steps. - * + *

List of funnel steps.

* @return steps - */ - @JsonProperty(JSON_PROPERTY_STEPS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSteps() { - return steps; - } - + **/ + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSteps() { + return steps; + } public void setSteps(List steps) { this.steps = steps; } - /** Return true if this FunnelQuery object is equal to o. */ + /** + * Return true if this FunnelQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -130,14 +142,13 @@ public boolean equals(Object o) { return false; } FunnelQuery funnelQuery = (FunnelQuery) o; - return Objects.equals(this.dataSource, funnelQuery.dataSource) - && Objects.equals(this.queryString, funnelQuery.queryString) - && Objects.equals(this.steps, funnelQuery.steps); + return Objects.equals(this.dataSource, funnelQuery.dataSource) && Objects.equals(this.queryString, funnelQuery.queryString) && Objects.equals(this.steps, funnelQuery.steps); } + @Override public int hashCode() { - return Objects.hash(dataSource, queryString, steps); + return Objects.hash(dataSource,queryString,steps); } @Override @@ -152,7 +163,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelRequestType.java b/src/main/java/com/datadog/api/client/v1/model/FunnelRequestType.java index 529e68f04dc..ed92560dcfe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelRequestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelRequestType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget request type. */ +/** + *

Widget request type.

+ */ @JsonSerialize(using = FunnelRequestType.FunnelRequestTypeSerializer.class) public class FunnelRequestType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class FunnelRequestTypeSerializer extends StdSerializer { - public FunnelRequestTypeSerializer(Class t) { - super(t); - } - - public FunnelRequestTypeSerializer() { - this(null); - } - - @Override - public void serialize(FunnelRequestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public FunnelRequestTypeSerializer(Class t) { + super(t); + } + + public FunnelRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize(FunnelRequestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FunnelRequestType object is equal to o. */ + /** + * Return true if this FunnelRequestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelSource.java b/src/main/java/com/datadog/api/client/v1/model/FunnelSource.java index fa94d1c713e..40e2a6bf738 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelSource.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Source from which to query items to display in the funnel. */ +/** + *

Source from which to query items to display in the funnel.

+ */ @JsonSerialize(using = FunnelSource.FunnelSourceSerializer.class) public class FunnelSource { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class FunnelSourceSerializer extends StdSerializer { - public FunnelSourceSerializer(Class t) { - super(t); - } - - public FunnelSourceSerializer() { - this(null); - } - - @Override - public void serialize(FunnelSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public FunnelSourceSerializer(Class t) { + super(t); + } + + public FunnelSourceSerializer() { + this(null); + } + + @Override + public void serialize(FunnelSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FunnelSource object is equal to o. */ + /** + * Return true if this FunnelSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelStep.java b/src/main/java/com/datadog/api/client/v1/model/FunnelStep.java index 5d85e10d09e..2a10462f75b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelStep.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelStep.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The funnel step. */ -@JsonPropertyOrder({FunnelStep.JSON_PROPERTY_FACET, FunnelStep.JSON_PROPERTY_VALUE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The funnel step.

+ */ +@JsonPropertyOrder({ + FunnelStep.JSON_PROPERTY_FACET, + FunnelStep.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FunnelStep { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -29,53 +51,51 @@ public FunnelStep() {} @JsonCreator public FunnelStep( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet, - @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { - this.facet = facet; - this.value = value; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet, + @JsonProperty(required=true, value=JSON_PROPERTY_VALUE)String value) { + this.facet = facet; + this.value = value; } - public FunnelStep facet(String facet) { this.facet = facet; return this; } /** - * The facet of the step. - * + *

The facet of the step.

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public FunnelStep value(String value) { this.value = value; return this; } /** - * The value of the step. - * + *

The value of the step.

* @return value - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getValue() { - return value; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this FunnelStep object is equal to o. */ + /** + * Return true if this FunnelStep object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,13 +105,13 @@ public boolean equals(Object o) { return false; } FunnelStep funnelStep = (FunnelStep) o; - return Objects.equals(this.facet, funnelStep.facet) - && Objects.equals(this.value, funnelStep.value); + return Objects.equals(this.facet, funnelStep.facet) && Objects.equals(this.value, funnelStep.value); } + @Override public int hashCode() { - return Objects.hash(facet, value); + return Objects.hash(facet,value); } @Override @@ -105,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinition.java index dd373dd6042..892ed1735cf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The funnel visualization displays a funnel of user sessions that maps a sequence of view - * navigation and user interaction in your application. + *

The funnel visualization displays a funnel of user sessions that maps a sequence of view navigation and user interaction in your application.

*/ @JsonPropertyOrder({ FunnelWidgetDefinition.JSON_PROPERTY_REQUESTS, @@ -27,10 +41,10 @@ FunnelWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, FunnelWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FunnelWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_REQUESTS = "requests"; private List requests = new ArrayList<>(); @@ -53,14 +67,12 @@ public FunnelWidgetDefinition() {} @JsonCreator public FunnelWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FunnelWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)FunnelWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public FunnelWidgetDefinition requests(List requests) { this.requests = requests; for (FunnelWidgetRequest item : requests) { @@ -68,7 +80,6 @@ public FunnelWidgetDefinition requests(List requests) { } return this; } - public FunnelWidgetDefinition addRequestsItem(FunnelWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -76,20 +87,18 @@ public FunnelWidgetDefinition addRequestsItem(FunnelWidgetRequest requestsItem) } /** - * Request payload used to query items. - * + *

Request payload used to query items.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public FunnelWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -97,42 +106,38 @@ public FunnelWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public FunnelWidgetDefinition title(String title) { this.title = title; return this; } /** - * The title of the widget. - * + *

The title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public FunnelWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -140,45 +145,41 @@ public FunnelWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public FunnelWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * The size of the title. - * + *

The size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public FunnelWidgetDefinition type(FunnelWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -186,24 +187,25 @@ public FunnelWidgetDefinition type(FunnelWidgetDefinitionType type) { } /** - * Type of funnel widget. - * + *

Type of funnel widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FunnelWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FunnelWidgetDefinitionType getType() { + return type; + } public void setType(FunnelWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FunnelWidgetDefinition object is equal to o. */ + /** + * Return true if this FunnelWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -213,17 +215,13 @@ public boolean equals(Object o) { return false; } FunnelWidgetDefinition funnelWidgetDefinition = (FunnelWidgetDefinition) o; - return Objects.equals(this.requests, funnelWidgetDefinition.requests) - && Objects.equals(this.time, funnelWidgetDefinition.time) - && Objects.equals(this.title, funnelWidgetDefinition.title) - && Objects.equals(this.titleAlign, funnelWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, funnelWidgetDefinition.titleSize) - && Objects.equals(this.type, funnelWidgetDefinition.type); + return Objects.equals(this.requests, funnelWidgetDefinition.requests) && Objects.equals(this.time, funnelWidgetDefinition.time) && Objects.equals(this.title, funnelWidgetDefinition.title) && Objects.equals(this.titleAlign, funnelWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, funnelWidgetDefinition.titleSize) && Objects.equals(this.type, funnelWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(requests, time, title, titleAlign, titleSize, type); + return Objects.hash(requests,time,title,titleAlign,titleSize,type); } @Override @@ -241,7 +239,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinitionType.java index e19cef1ac82..3ce10a0995b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of funnel widget. */ +/** + *

Type of funnel widget.

+ */ @JsonSerialize(using = FunnelWidgetDefinitionType.FunnelWidgetDefinitionTypeSerializer.class) public class FunnelWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class FunnelWidgetDefinitionTypeSerializer - extends StdSerializer { - public FunnelWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class FunnelWidgetDefinitionTypeSerializer extends StdSerializer { + public FunnelWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public FunnelWidgetDefinitionTypeSerializer() { - this(null); - } + public FunnelWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - FunnelWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(FunnelWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FunnelWidgetDefinitionType object is equal to o. */ + /** + * Return true if this FunnelWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetRequest.java index 32dc8b86605..e8351550c99 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/FunnelWidgetRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated funnel widget. */ + +/** + *

Updated funnel widget.

+ */ @JsonPropertyOrder({ FunnelWidgetRequest.JSON_PROPERTY_QUERY, FunnelWidgetRequest.JSON_PROPERTY_REQUEST_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FunnelWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private FunnelQuery query; @@ -32,15 +51,13 @@ public FunnelWidgetRequest() {} @JsonCreator public FunnelWidgetRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) FunnelQuery query, - @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST_TYPE) - FunnelRequestType requestType) { - this.query = query; - this.unparsed |= query.unparsed; - this.requestType = requestType; - this.unparsed |= !requestType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)FunnelQuery query, + @JsonProperty(required=true, value=JSON_PROPERTY_REQUEST_TYPE)FunnelRequestType requestType) { + this.query = query; + this.unparsed |= query.unparsed; + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); } - public FunnelWidgetRequest query(FunnelQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -48,20 +65,18 @@ public FunnelWidgetRequest query(FunnelQuery query) { } /** - * Updated funnel widget. - * + *

Updated funnel widget.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FunnelQuery getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FunnelQuery getQuery() { + return query; + } public void setQuery(FunnelQuery query) { this.query = query; } - public FunnelWidgetRequest requestType(FunnelRequestType requestType) { this.requestType = requestType; this.unparsed |= !requestType.isValid(); @@ -69,24 +84,25 @@ public FunnelWidgetRequest requestType(FunnelRequestType requestType) { } /** - * Widget request type. - * + *

Widget request type.

* @return requestType - */ - @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FunnelRequestType getRequestType() { - return requestType; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FunnelRequestType getRequestType() { + return requestType; + } public void setRequestType(FunnelRequestType requestType) { if (!requestType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.requestType = requestType; } - /** Return true if this FunnelWidgetRequest object is equal to o. */ + /** + * Return true if this FunnelWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } FunnelWidgetRequest funnelWidgetRequest = (FunnelWidgetRequest) o; - return Objects.equals(this.query, funnelWidgetRequest.query) - && Objects.equals(this.requestType, funnelWidgetRequest.requestType); + return Objects.equals(this.query, funnelWidgetRequest.query) && Objects.equals(this.requestType, funnelWidgetRequest.requestType); } + @Override public int hashCode() { - return Objects.hash(query, requestType); + return Objects.hash(query,requestType); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GCPAccount.java b/src/main/java/com/datadog/api/client/v1/model/GCPAccount.java index 51ffd059869..000c0a101e3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GCPAccount.java +++ b/src/main/java/com/datadog/api/client/v1/model/GCPAccount.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Your Google Cloud Platform Account. */ +/** + *

Your Google Cloud Platform Account.

+ */ @JsonPropertyOrder({ GCPAccount.JSON_PROPERTY_AUTH_PROVIDER_X509_CERT_URL, GCPAccount.JSON_PROPERTY_AUTH_URI, @@ -31,12 +49,11 @@ GCPAccount.JSON_PROPERTY_TOKEN_URI, GCPAccount.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GCPAccount { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_AUTH_PROVIDER_X509_CERT_URL = - "auth_provider_x509_cert_url"; + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_PROVIDER_X509_CERT_URL = "auth_provider_x509_cert_url"; private String authProviderX509CertUrl; public static final String JSON_PROPERTY_AUTH_URI = "auth_uri"; @@ -84,132 +101,119 @@ public GCPAccount authProviderX509CertUrl(String authProviderX509CertUrl) { } /** - * Should be https://www.googleapis.com/oauth2/v1/certs. - * + *

Should be https://www.googleapis.com/oauth2/v1/certs.

* @return authProviderX509CertUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTH_PROVIDER_X509_CERT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAuthProviderX509CertUrl() { - return authProviderX509CertUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTH_PROVIDER_X509_CERT_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthProviderX509CertUrl() { + return authProviderX509CertUrl; + } public void setAuthProviderX509CertUrl(String authProviderX509CertUrl) { this.authProviderX509CertUrl = authProviderX509CertUrl; } - public GCPAccount authUri(String authUri) { this.authUri = authUri; return this; } /** - * Should be https://accounts.google.com/o/oauth2/auth. - * + *

Should be https://accounts.google.com/o/oauth2/auth.

* @return authUri - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTH_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAuthUri() { - return authUri; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTH_URI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthUri() { + return authUri; + } public void setAuthUri(String authUri) { this.authUri = authUri; } - public GCPAccount automute(Boolean automute) { this.automute = automute; return this; } /** - * Silence monitors for expected GCE instance shutdowns. - * + *

Silence monitors for expected GCE instance shutdowns.

* @return automute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTOMUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAutomute() { - return automute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTOMUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutomute() { + return automute; + } public void setAutomute(Boolean automute) { this.automute = automute; } - public GCPAccount clientEmail(String clientEmail) { this.clientEmail = clientEmail; return this; } /** - * Your email found in your JSON service account key. - * + *

Your email found in your JSON service account key.

* @return clientEmail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientEmail() { - return clientEmail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientEmail() { + return clientEmail; + } public void setClientEmail(String clientEmail) { this.clientEmail = clientEmail; } - public GCPAccount clientId(String clientId) { this.clientId = clientId; return this; } /** - * Your ID found in your JSON service account key. - * + *

Your ID found in your JSON service account key.

* @return clientId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } public void setClientId(String clientId) { this.clientId = clientId; } - public GCPAccount clientX509CertUrl(String clientX509CertUrl) { this.clientX509CertUrl = clientX509CertUrl; return this; } /** - * Should be https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL where - * $CLIENT_EMAIL is the email found in your JSON service account key. - * + *

Should be https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL + * where $CLIENT_EMAIL is the email found in your JSON service account key.

* @return clientX509CertUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_X509_CERT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientX509CertUrl() { - return clientX509CertUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_X509_CERT_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientX509CertUrl() { + return clientX509CertUrl; + } public void setClientX509CertUrl(String clientX509CertUrl) { this.clientX509CertUrl = clientX509CertUrl; } - public GCPAccount errors(List errors) { this.errors = errors; return this; } - public GCPAccount addErrorsItem(String errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -219,171 +223,157 @@ public GCPAccount addErrorsItem(String errorsItem) { } /** - * An array of errors. - * + *

An array of errors.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - public GCPAccount hostFilters(String hostFilters) { this.hostFilters = hostFilters; return this; } /** - * Limit the GCE instances that are pulled into Datadog by using tags. Only hosts that match one - * of the defined tags are imported into Datadog. - * + *

Limit the GCE instances that are pulled into Datadog by using tags. + * Only hosts that match one of the defined tags are imported into Datadog.

* @return hostFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostFilters() { - return hostFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostFilters() { + return hostFilters; + } public void setHostFilters(String hostFilters) { this.hostFilters = hostFilters; } - public GCPAccount isCspmEnabled(Boolean isCspmEnabled) { this.isCspmEnabled = isCspmEnabled; return this; } /** - * When enabled, Datadog performs configuration checks across your Google Cloud environment by - * continuously scanning every resource. - * + *

When enabled, Datadog performs configuration checks across your Google Cloud environment by continuously scanning every resource.

* @return isCspmEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_CSPM_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsCspmEnabled() { - return isCspmEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_CSPM_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCspmEnabled() { + return isCspmEnabled; + } public void setIsCspmEnabled(Boolean isCspmEnabled) { this.isCspmEnabled = isCspmEnabled; } - public GCPAccount privateKey(String privateKey) { this.privateKey = privateKey; return this; } /** - * Your private key name found in your JSON service account key. - * + *

Your private key name found in your JSON service account key.

* @return privateKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIVATE_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrivateKey() { - return privateKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVATE_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPrivateKey() { + return privateKey; + } public void setPrivateKey(String privateKey) { this.privateKey = privateKey; } - public GCPAccount privateKeyId(String privateKeyId) { this.privateKeyId = privateKeyId; return this; } /** - * Your private key ID found in your JSON service account key. - * + *

Your private key ID found in your JSON service account key.

* @return privateKeyId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIVATE_KEY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrivateKeyId() { - return privateKeyId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVATE_KEY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPrivateKeyId() { + return privateKeyId; + } public void setPrivateKeyId(String privateKeyId) { this.privateKeyId = privateKeyId; } - public GCPAccount projectId(String projectId) { this.projectId = projectId; return this; } /** - * Your Google Cloud project ID found in your JSON service account key. - * + *

Your Google Cloud project ID found in your JSON service account key.

* @return projectId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROJECT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProjectId() { - return projectId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProjectId() { + return projectId; + } public void setProjectId(String projectId) { this.projectId = projectId; } - public GCPAccount tokenUri(String tokenUri) { this.tokenUri = tokenUri; return this; } /** - * Should be https://accounts.google.com/o/oauth2/token. - * + *

Should be https://accounts.google.com/o/oauth2/token.

* @return tokenUri - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOKEN_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTokenUri() { - return tokenUri; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN_URI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTokenUri() { + return tokenUri; + } public void setTokenUri(String tokenUri) { this.tokenUri = tokenUri; } - public GCPAccount type(String type) { this.type = type; return this; } /** - * The value for service_account found in your JSON service account key. - * + *

The value for service_account found in your JSON service account key.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this GCPAccount object is equal to o. */ + /** + * Return true if this GCPAccount object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -393,48 +383,20 @@ public boolean equals(Object o) { return false; } GCPAccount gcpAccount = (GCPAccount) o; - return Objects.equals(this.authProviderX509CertUrl, gcpAccount.authProviderX509CertUrl) - && Objects.equals(this.authUri, gcpAccount.authUri) - && Objects.equals(this.automute, gcpAccount.automute) - && Objects.equals(this.clientEmail, gcpAccount.clientEmail) - && Objects.equals(this.clientId, gcpAccount.clientId) - && Objects.equals(this.clientX509CertUrl, gcpAccount.clientX509CertUrl) - && Objects.equals(this.errors, gcpAccount.errors) - && Objects.equals(this.hostFilters, gcpAccount.hostFilters) - && Objects.equals(this.isCspmEnabled, gcpAccount.isCspmEnabled) - && Objects.equals(this.privateKey, gcpAccount.privateKey) - && Objects.equals(this.privateKeyId, gcpAccount.privateKeyId) - && Objects.equals(this.projectId, gcpAccount.projectId) - && Objects.equals(this.tokenUri, gcpAccount.tokenUri) - && Objects.equals(this.type, gcpAccount.type); + return Objects.equals(this.authProviderX509CertUrl, gcpAccount.authProviderX509CertUrl) && Objects.equals(this.authUri, gcpAccount.authUri) && Objects.equals(this.automute, gcpAccount.automute) && Objects.equals(this.clientEmail, gcpAccount.clientEmail) && Objects.equals(this.clientId, gcpAccount.clientId) && Objects.equals(this.clientX509CertUrl, gcpAccount.clientX509CertUrl) && Objects.equals(this.errors, gcpAccount.errors) && Objects.equals(this.hostFilters, gcpAccount.hostFilters) && Objects.equals(this.isCspmEnabled, gcpAccount.isCspmEnabled) && Objects.equals(this.privateKey, gcpAccount.privateKey) && Objects.equals(this.privateKeyId, gcpAccount.privateKeyId) && Objects.equals(this.projectId, gcpAccount.projectId) && Objects.equals(this.tokenUri, gcpAccount.tokenUri) && Objects.equals(this.type, gcpAccount.type); } + @Override public int hashCode() { - return Objects.hash( - authProviderX509CertUrl, - authUri, - automute, - clientEmail, - clientId, - clientX509CertUrl, - errors, - hostFilters, - isCspmEnabled, - privateKey, - privateKeyId, - projectId, - tokenUri, - type); + return Objects.hash(authProviderX509CertUrl,authUri,automute,clientEmail,clientId,clientX509CertUrl,errors,hostFilters,isCspmEnabled,privateKey,privateKeyId,projectId,tokenUri,type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GCPAccount {\n"); - sb.append(" authProviderX509CertUrl: ") - .append(toIndentedString(authProviderX509CertUrl)) - .append("\n"); + sb.append(" authProviderX509CertUrl: ").append(toIndentedString(authProviderX509CertUrl)).append("\n"); sb.append(" authUri: ").append(toIndentedString(authUri)).append("\n"); sb.append(" automute: ").append(toIndentedString(automute)).append("\n"); sb.append(" clientEmail: ").append(toIndentedString(clientEmail)).append("\n"); @@ -453,7 +415,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java index 229b3d54d3c..7c798f9d1ac 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** This visualization displays a series of values by country on a world map. */ + +/** + *

This visualization displays a series of values by country on a world map.

+ */ @JsonPropertyOrder({ GeomapWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, GeomapWidgetDefinition.JSON_PROPERTY_REQUESTS, @@ -27,10 +44,10 @@ GeomapWidgetDefinition.JSON_PROPERTY_TYPE, GeomapWidgetDefinition.JSON_PROPERTY_VIEW }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GeomapWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -62,20 +79,18 @@ public GeomapWidgetDefinition() {} @JsonCreator public GeomapWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_STYLE) GeomapWidgetDefinitionStyle style, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) GeomapWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_VIEW) GeomapWidgetDefinitionView view) { - this.requests = requests; - this.style = style; - this.unparsed |= style.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); - this.view = view; - this.unparsed |= view.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_STYLE)GeomapWidgetDefinitionStyle style, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)GeomapWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_VIEW)GeomapWidgetDefinitionView view) { + this.requests = requests; + this.style = style; + this.unparsed |= style.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + this.view = view; + this.unparsed |= view.unparsed; } - public GeomapWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -83,7 +98,6 @@ public GeomapWidgetDefinition customLinks(List customLinks) { } return this; } - public GeomapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -94,21 +108,19 @@ public GeomapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksIte } /** - * A list of custom links. - * + *

A list of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public GeomapWidgetDefinition requests(List requests) { this.requests = requests; for (GeomapWidgetRequest item : requests) { @@ -116,7 +128,6 @@ public GeomapWidgetDefinition requests(List requests) { } return this; } - public GeomapWidgetDefinition addRequestsItem(GeomapWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -124,24 +135,20 @@ public GeomapWidgetDefinition addRequestsItem(GeomapWidgetRequest requestsItem) } /** - * Array of one request object to display in the widget. The request must contain a group-by - * tag whose value is a country ISO code. - * - *

See the Request - * JSON schema documentation for information about building the REQUEST_SCHEMA. - * + *

Array of one request object to display in the widget. The request must contain a group-by tag whose value is a country ISO code.

+ *

See the Request JSON schema documentation + * for information about building the REQUEST_SCHEMA.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public GeomapWidgetDefinition style(GeomapWidgetDefinitionStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -149,20 +156,18 @@ public GeomapWidgetDefinition style(GeomapWidgetDefinitionStyle style) { } /** - * The style to apply to the widget. - * + *

The style to apply to the widget.

* @return style - */ - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public GeomapWidgetDefinitionStyle getStyle() { - return style; - } - + **/ + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public GeomapWidgetDefinitionStyle getStyle() { + return style; + } public void setStyle(GeomapWidgetDefinitionStyle style) { this.style = style; } - public GeomapWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -170,42 +175,38 @@ public GeomapWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public GeomapWidgetDefinition title(String title) { this.title = title; return this; } /** - * The title of your widget. - * + *

The title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public GeomapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -213,45 +214,41 @@ public GeomapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public GeomapWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * The size of the title. - * + *

The size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public GeomapWidgetDefinition type(GeomapWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -259,23 +256,21 @@ public GeomapWidgetDefinition type(GeomapWidgetDefinitionType type) { } /** - * Type of the geomap widget. - * + *

Type of the geomap widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public GeomapWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public GeomapWidgetDefinitionType getType() { + return type; + } public void setType(GeomapWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public GeomapWidgetDefinition view(GeomapWidgetDefinitionView view) { this.view = view; this.unparsed |= view.unparsed; @@ -283,21 +278,22 @@ public GeomapWidgetDefinition view(GeomapWidgetDefinitionView view) { } /** - * The view of the world that the map should render. - * + *

The view of the world that the map should render.

* @return view - */ - @JsonProperty(JSON_PROPERTY_VIEW) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public GeomapWidgetDefinitionView getView() { - return view; - } - + **/ + @JsonProperty(JSON_PROPERTY_VIEW) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public GeomapWidgetDefinitionView getView() { + return view; + } public void setView(GeomapWidgetDefinitionView view) { this.view = view; } - /** Return true if this GeomapWidgetDefinition object is equal to o. */ + /** + * Return true if this GeomapWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -307,21 +303,13 @@ public boolean equals(Object o) { return false; } GeomapWidgetDefinition geomapWidgetDefinition = (GeomapWidgetDefinition) o; - return Objects.equals(this.customLinks, geomapWidgetDefinition.customLinks) - && Objects.equals(this.requests, geomapWidgetDefinition.requests) - && Objects.equals(this.style, geomapWidgetDefinition.style) - && Objects.equals(this.time, geomapWidgetDefinition.time) - && Objects.equals(this.title, geomapWidgetDefinition.title) - && Objects.equals(this.titleAlign, geomapWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, geomapWidgetDefinition.titleSize) - && Objects.equals(this.type, geomapWidgetDefinition.type) - && Objects.equals(this.view, geomapWidgetDefinition.view); + return Objects.equals(this.customLinks, geomapWidgetDefinition.customLinks) && Objects.equals(this.requests, geomapWidgetDefinition.requests) && Objects.equals(this.style, geomapWidgetDefinition.style) && Objects.equals(this.time, geomapWidgetDefinition.time) && Objects.equals(this.title, geomapWidgetDefinition.title) && Objects.equals(this.titleAlign, geomapWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, geomapWidgetDefinition.titleSize) && Objects.equals(this.type, geomapWidgetDefinition.type) && Objects.equals(this.view, geomapWidgetDefinition.view); } + @Override public int hashCode() { - return Objects.hash( - customLinks, requests, style, time, title, titleAlign, titleSize, type, view); + return Objects.hash(customLinks,requests,style,time,title,titleAlign,titleSize,type,view); } @Override @@ -342,7 +330,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionStyle.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionStyle.java index 63761251067..36b93055e18 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionStyle.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionStyle.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The style to apply to the widget. */ + +/** + *

The style to apply to the widget.

+ */ @JsonPropertyOrder({ GeomapWidgetDefinitionStyle.JSON_PROPERTY_PALETTE, GeomapWidgetDefinitionStyle.JSON_PROPERTY_PALETTE_FLIP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GeomapWidgetDefinitionStyle { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PALETTE = "palette"; private String palette; @@ -32,53 +51,51 @@ public GeomapWidgetDefinitionStyle() {} @JsonCreator public GeomapWidgetDefinitionStyle( - @JsonProperty(required = true, value = JSON_PROPERTY_PALETTE) String palette, - @JsonProperty(required = true, value = JSON_PROPERTY_PALETTE_FLIP) Boolean paletteFlip) { - this.palette = palette; - this.paletteFlip = paletteFlip; + @JsonProperty(required=true, value=JSON_PROPERTY_PALETTE)String palette, + @JsonProperty(required=true, value=JSON_PROPERTY_PALETTE_FLIP)Boolean paletteFlip) { + this.palette = palette; + this.paletteFlip = paletteFlip; } - public GeomapWidgetDefinitionStyle palette(String palette) { this.palette = palette; return this; } /** - * The color palette to apply to the widget. - * + *

The color palette to apply to the widget.

* @return palette - */ - @JsonProperty(JSON_PROPERTY_PALETTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPalette() { - return palette; - } - + **/ + @JsonProperty(JSON_PROPERTY_PALETTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPalette() { + return palette; + } public void setPalette(String palette) { this.palette = palette; } - public GeomapWidgetDefinitionStyle paletteFlip(Boolean paletteFlip) { this.paletteFlip = paletteFlip; return this; } /** - * Whether to flip the palette tones. - * + *

Whether to flip the palette tones.

* @return paletteFlip - */ - @JsonProperty(JSON_PROPERTY_PALETTE_FLIP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getPaletteFlip() { - return paletteFlip; - } - + **/ + @JsonProperty(JSON_PROPERTY_PALETTE_FLIP) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getPaletteFlip() { + return paletteFlip; + } public void setPaletteFlip(Boolean paletteFlip) { this.paletteFlip = paletteFlip; } - /** Return true if this GeomapWidgetDefinitionStyle object is equal to o. */ + /** + * Return true if this GeomapWidgetDefinitionStyle object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } GeomapWidgetDefinitionStyle geomapWidgetDefinitionStyle = (GeomapWidgetDefinitionStyle) o; - return Objects.equals(this.palette, geomapWidgetDefinitionStyle.palette) - && Objects.equals(this.paletteFlip, geomapWidgetDefinitionStyle.paletteFlip); + return Objects.equals(this.palette, geomapWidgetDefinitionStyle.palette) && Objects.equals(this.paletteFlip, geomapWidgetDefinitionStyle.paletteFlip); } + @Override public int hashCode() { - return Objects.hash(palette, paletteFlip); + return Objects.hash(palette,paletteFlip); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionType.java index 61ddd3d2df4..8db0768cff1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the geomap widget. */ +/** + *

Type of the geomap widget.

+ */ @JsonSerialize(using = GeomapWidgetDefinitionType.GeomapWidgetDefinitionTypeSerializer.class) public class GeomapWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class GeomapWidgetDefinitionTypeSerializer - extends StdSerializer { - public GeomapWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class GeomapWidgetDefinitionTypeSerializer extends StdSerializer { + public GeomapWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public GeomapWidgetDefinitionTypeSerializer() { - this(null); - } + public GeomapWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - GeomapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(GeomapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this GeomapWidgetDefinitionType object is equal to o. */ + /** + * Return true if this GeomapWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java index 7bfa18e4f55..11ed6ebbbd8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The view of the world that the map should render. */ -@JsonPropertyOrder({GeomapWidgetDefinitionView.JSON_PROPERTY_FOCUS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The view of the world that the map should render.

+ */ +@JsonPropertyOrder({ + GeomapWidgetDefinitionView.JSON_PROPERTY_FOCUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GeomapWidgetDefinitionView { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FOCUS = "focus"; private String focus; @@ -26,31 +47,31 @@ public GeomapWidgetDefinitionView() {} @JsonCreator public GeomapWidgetDefinitionView( - @JsonProperty(required = true, value = JSON_PROPERTY_FOCUS) String focus) { - this.focus = focus; + @JsonProperty(required=true, value=JSON_PROPERTY_FOCUS)String focus) { + this.focus = focus; } - public GeomapWidgetDefinitionView focus(String focus) { this.focus = focus; return this; } /** - * The 2-letter ISO code of a country to focus the map on. Or WORLD. - * + *

The 2-letter ISO code of a country to focus the map on. Or WORLD.

* @return focus - */ - @JsonProperty(JSON_PROPERTY_FOCUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFocus() { - return focus; - } - + **/ + @JsonProperty(JSON_PROPERTY_FOCUS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFocus() { + return focus; + } public void setFocus(String focus) { this.focus = focus; } - /** Return true if this GeomapWidgetDefinitionView object is equal to o. */ + /** + * Return true if this GeomapWidgetDefinitionView object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.focus, geomapWidgetDefinitionView.focus); } + @Override public int hashCode() { return Objects.hash(focus); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java index 0def9ac930c..0bcaae04508 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An updated geomap widget. */ +/** + *

An updated geomap widget.

+ */ @JsonPropertyOrder({ GeomapWidgetRequest.JSON_PROPERTY_FORMULAS, GeomapWidgetRequest.JSON_PROPERTY_LOG_QUERY, @@ -24,10 +42,10 @@ GeomapWidgetRequest.JSON_PROPERTY_RUM_QUERY, GeomapWidgetRequest.JSON_PROPERTY_SECURITY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GeomapWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -56,7 +74,6 @@ public GeomapWidgetRequest formulas(List formulas) { } return this; } - public GeomapWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -67,21 +84,19 @@ public GeomapWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public GeomapWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -89,42 +104,38 @@ public GeomapWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public GeomapWidgetRequest q(String q) { this.q = q; return this; } /** - * The widget metrics query. - * + *

The widget metrics query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public GeomapWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -132,7 +143,6 @@ public GeomapWidgetRequest queries(List queri } return this; } - public GeomapWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -143,21 +153,19 @@ public GeomapWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition quer } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public GeomapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -165,24 +173,22 @@ public GeomapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat respo } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public GeomapWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -190,21 +196,19 @@ public GeomapWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public GeomapWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -212,22 +216,23 @@ public GeomapWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - /** Return true if this GeomapWidgetRequest object is equal to o. */ + /** + * Return true if this GeomapWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -237,18 +242,13 @@ public boolean equals(Object o) { return false; } GeomapWidgetRequest geomapWidgetRequest = (GeomapWidgetRequest) o; - return Objects.equals(this.formulas, geomapWidgetRequest.formulas) - && Objects.equals(this.logQuery, geomapWidgetRequest.logQuery) - && Objects.equals(this.q, geomapWidgetRequest.q) - && Objects.equals(this.queries, geomapWidgetRequest.queries) - && Objects.equals(this.responseFormat, geomapWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, geomapWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, geomapWidgetRequest.securityQuery); + return Objects.equals(this.formulas, geomapWidgetRequest.formulas) && Objects.equals(this.logQuery, geomapWidgetRequest.logQuery) && Objects.equals(this.q, geomapWidgetRequest.q) && Objects.equals(this.queries, geomapWidgetRequest.queries) && Objects.equals(this.responseFormat, geomapWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, geomapWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, geomapWidgetRequest.securityQuery); } + @Override public int hashCode() { - return Objects.hash(formulas, logQuery, q, queries, responseFormat, rumQuery, securityQuery); + return Objects.hash(formulas,logQuery,q,queries,responseFormat,rumQuery,securityQuery); } @Override @@ -267,7 +267,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GraphSnapshot.java b/src/main/java/com/datadog/api/client/v1/model/GraphSnapshot.java index 8c3ecd94d0a..58fe0c1ade5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GraphSnapshot.java +++ b/src/main/java/com/datadog/api/client/v1/model/GraphSnapshot.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object representing a graph snapshot. */ + +/** + *

Object representing a graph snapshot.

+ */ @JsonPropertyOrder({ GraphSnapshot.JSON_PROPERTY_GRAPH_DEF, GraphSnapshot.JSON_PROPERTY_METRIC_QUERY, GraphSnapshot.JSON_PROPERTY_SNAPSHOT_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GraphSnapshot { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GRAPH_DEF = "graph_def"; private String graphDef; @@ -37,67 +57,63 @@ public GraphSnapshot graphDef(String graphDef) { } /** - * A JSON document defining the graph. graph_def can be used instead of - * metric_query. The JSON document uses the grammar defined here and - * should be formatted to a single line then URL encoded. - * + *

A JSON document defining the graph. graph_def can be used instead of metric_query. + * The JSON document uses the grammar defined here + * and should be formatted to a single line then URL encoded.

* @return graphDef - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GRAPH_DEF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGraphDef() { - return graphDef; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH_DEF) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGraphDef() { + return graphDef; + } public void setGraphDef(String graphDef) { this.graphDef = graphDef; } - public GraphSnapshot metricQuery(String metricQuery) { this.metricQuery = metricQuery; return this; } /** - * The metric query. One of metric_query or graph_def is required. - * + *

The metric query. One of metric_query or graph_def is required.

* @return metricQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetricQuery() { - return metricQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetricQuery() { + return metricQuery; + } public void setMetricQuery(String metricQuery) { this.metricQuery = metricQuery; } - public GraphSnapshot snapshotUrl(String snapshotUrl) { this.snapshotUrl = snapshotUrl; return this; } /** - * URL of your graph snapshot. - * + *

URL of your graph snapshot.

* @return snapshotUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNAPSHOT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSnapshotUrl() { - return snapshotUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNAPSHOT_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSnapshotUrl() { + return snapshotUrl; + } public void setSnapshotUrl(String snapshotUrl) { this.snapshotUrl = snapshotUrl; } - /** Return true if this GraphSnapshot object is equal to o. */ + /** + * Return true if this GraphSnapshot object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,14 +123,13 @@ public boolean equals(Object o) { return false; } GraphSnapshot graphSnapshot = (GraphSnapshot) o; - return Objects.equals(this.graphDef, graphSnapshot.graphDef) - && Objects.equals(this.metricQuery, graphSnapshot.metricQuery) - && Objects.equals(this.snapshotUrl, graphSnapshot.snapshotUrl); + return Objects.equals(this.graphDef, graphSnapshot.graphDef) && Objects.equals(this.metricQuery, graphSnapshot.metricQuery) && Objects.equals(this.snapshotUrl, graphSnapshot.snapshotUrl); } + @Override public int hashCode() { - return Objects.hash(graphDef, metricQuery, snapshotUrl); + return Objects.hash(graphDef,metricQuery,snapshotUrl); } @Override @@ -129,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinition.java index 5999fd25719..bdeb19d94d4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The groups widget allows you to keep similar graphs together on your timeboard. Each group has a - * custom header, can hold one to many graphs, and is collapsible. + *

The groups widget allows you to keep similar graphs together on your timeboard. Each group has a custom header, can hold one to many graphs, and is collapsible.

*/ @JsonPropertyOrder({ GroupWidgetDefinition.JSON_PROPERTY_BACKGROUND_COLOR, @@ -29,10 +43,10 @@ GroupWidgetDefinition.JSON_PROPERTY_TYPE, GroupWidgetDefinition.JSON_PROPERTY_WIDGETS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GroupWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BACKGROUND_COLOR = "background_color"; private String backgroundColor; @@ -61,58 +75,53 @@ public GroupWidgetDefinition() {} @JsonCreator public GroupWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_LAYOUT_TYPE) WidgetLayoutType layoutType, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) GroupWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_WIDGETS) List widgets) { - this.layoutType = layoutType; - this.unparsed |= !layoutType.isValid(); - this.type = type; - this.unparsed |= !type.isValid(); - this.widgets = widgets; + @JsonProperty(required=true, value=JSON_PROPERTY_LAYOUT_TYPE)WidgetLayoutType layoutType, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)GroupWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_WIDGETS)List widgets) { + this.layoutType = layoutType; + this.unparsed |= !layoutType.isValid(); + this.type = type; + this.unparsed |= !type.isValid(); + this.widgets = widgets; } - public GroupWidgetDefinition backgroundColor(String backgroundColor) { this.backgroundColor = backgroundColor; return this; } /** - * Background color of the group title. - * + *

Background color of the group title.

* @return backgroundColor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBackgroundColor() { - return backgroundColor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BACKGROUND_COLOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBackgroundColor() { + return backgroundColor; + } public void setBackgroundColor(String backgroundColor) { this.backgroundColor = backgroundColor; } - public GroupWidgetDefinition bannerImg(String bannerImg) { this.bannerImg = bannerImg; return this; } /** - * URL of image to display as a banner for the group. - * + *

URL of image to display as a banner for the group.

* @return bannerImg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BANNER_IMG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBannerImg() { - return bannerImg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BANNER_IMG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBannerImg() { + return bannerImg; + } public void setBannerImg(String bannerImg) { this.bannerImg = bannerImg; } - public GroupWidgetDefinition layoutType(WidgetLayoutType layoutType) { this.layoutType = layoutType; this.unparsed |= !layoutType.isValid(); @@ -120,65 +129,59 @@ public GroupWidgetDefinition layoutType(WidgetLayoutType layoutType) { } /** - * Layout type of the group. - * + *

Layout type of the group.

* @return layoutType - */ - @JsonProperty(JSON_PROPERTY_LAYOUT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetLayoutType getLayoutType() { - return layoutType; - } - + **/ + @JsonProperty(JSON_PROPERTY_LAYOUT_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetLayoutType getLayoutType() { + return layoutType; + } public void setLayoutType(WidgetLayoutType layoutType) { if (!layoutType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.layoutType = layoutType; } - public GroupWidgetDefinition showTitle(Boolean showTitle) { this.showTitle = showTitle; return this; } /** - * Whether to show the title or not. - * + *

Whether to show the title or not.

* @return showTitle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTitle() { - return showTitle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowTitle() { + return showTitle; + } public void setShowTitle(Boolean showTitle) { this.showTitle = showTitle; } - public GroupWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public GroupWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -186,24 +189,22 @@ public GroupWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public GroupWidgetDefinition type(GroupWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -211,23 +212,21 @@ public GroupWidgetDefinition type(GroupWidgetDefinitionType type) { } /** - * Type of the group widget. - * + *

Type of the group widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public GroupWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public GroupWidgetDefinitionType getType() { + return type; + } public void setType(GroupWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public GroupWidgetDefinition widgets(List widgets) { this.widgets = widgets; for (Widget item : widgets) { @@ -235,7 +234,6 @@ public GroupWidgetDefinition widgets(List widgets) { } return this; } - public GroupWidgetDefinition addWidgetsItem(Widget widgetsItem) { this.widgets.add(widgetsItem); this.unparsed |= widgetsItem.unparsed; @@ -243,21 +241,22 @@ public GroupWidgetDefinition addWidgetsItem(Widget widgetsItem) { } /** - * List of widget groups. - * + *

List of widget groups.

* @return widgets - */ - @JsonProperty(JSON_PROPERTY_WIDGETS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getWidgets() { - return widgets; - } - + **/ + @JsonProperty(JSON_PROPERTY_WIDGETS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getWidgets() { + return widgets; + } public void setWidgets(List widgets) { this.widgets = widgets; } - /** Return true if this GroupWidgetDefinition object is equal to o. */ + /** + * Return true if this GroupWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -267,20 +266,13 @@ public boolean equals(Object o) { return false; } GroupWidgetDefinition groupWidgetDefinition = (GroupWidgetDefinition) o; - return Objects.equals(this.backgroundColor, groupWidgetDefinition.backgroundColor) - && Objects.equals(this.bannerImg, groupWidgetDefinition.bannerImg) - && Objects.equals(this.layoutType, groupWidgetDefinition.layoutType) - && Objects.equals(this.showTitle, groupWidgetDefinition.showTitle) - && Objects.equals(this.title, groupWidgetDefinition.title) - && Objects.equals(this.titleAlign, groupWidgetDefinition.titleAlign) - && Objects.equals(this.type, groupWidgetDefinition.type) - && Objects.equals(this.widgets, groupWidgetDefinition.widgets); + return Objects.equals(this.backgroundColor, groupWidgetDefinition.backgroundColor) && Objects.equals(this.bannerImg, groupWidgetDefinition.bannerImg) && Objects.equals(this.layoutType, groupWidgetDefinition.layoutType) && Objects.equals(this.showTitle, groupWidgetDefinition.showTitle) && Objects.equals(this.title, groupWidgetDefinition.title) && Objects.equals(this.titleAlign, groupWidgetDefinition.titleAlign) && Objects.equals(this.type, groupWidgetDefinition.type) && Objects.equals(this.widgets, groupWidgetDefinition.widgets); } + @Override public int hashCode() { - return Objects.hash( - backgroundColor, bannerImg, layoutType, showTitle, title, titleAlign, type, widgets); + return Objects.hash(backgroundColor,bannerImg,layoutType,showTitle,title,titleAlign,type,widgets); } @Override @@ -300,7 +292,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinitionType.java index 33c7dbfbbf4..f2980c7c535 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/GroupWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the group widget. */ +/** + *

Type of the group widget.

+ */ @JsonSerialize(using = GroupWidgetDefinitionType.GroupWidgetDefinitionTypeSerializer.class) public class GroupWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class GroupWidgetDefinitionTypeSerializer - extends StdSerializer { - public GroupWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class GroupWidgetDefinitionTypeSerializer extends StdSerializer { + public GroupWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public GroupWidgetDefinitionTypeSerializer() { - this(null); - } + public GroupWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - GroupWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(GroupWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this GroupWidgetDefinitionType object is equal to o. */ + /** + * Return true if this GroupWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/HTTPLogError.java b/src/main/java/com/datadog/api/client/v1/model/HTTPLogError.java index 7903fde8301..6bcae053994 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HTTPLogError.java +++ b/src/main/java/com/datadog/api/client/v1/model/HTTPLogError.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Invalid query performed. */ -@JsonPropertyOrder({HTTPLogError.JSON_PROPERTY_CODE, HTTPLogError.JSON_PROPERTY_MESSAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Invalid query performed.

+ */ +@JsonPropertyOrder({ + HTTPLogError.JSON_PROPERTY_CODE, + HTTPLogError.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HTTPLogError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private Integer code; @@ -29,53 +51,52 @@ public HTTPLogError() {} @JsonCreator public HTTPLogError( - @JsonProperty(required = true, value = JSON_PROPERTY_CODE) Integer code, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message) { - this.code = code; - this.message = message; + @JsonProperty(required=true, value=JSON_PROPERTY_CODE)Integer code, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message) { + this.code = code; + this.message = message; } - public HTTPLogError code(Integer code) { this.code = code; return this; } /** - * Error code. maximum: 2147483647 - * + *

Error code.

+ * maximum: 2147483647 * @return code - */ - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getCode() { - return code; - } - + **/ + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Integer getCode() { + return code; + } public void setCode(Integer code) { this.code = code; } - public HTTPLogError message(String message) { this.message = message; return this; } /** - * Error message. - * + *

Error message.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this HTTPLogError object is equal to o. */ + /** + * Return true if this HTTPLogError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,13 +106,13 @@ public boolean equals(Object o) { return false; } HTTPLogError httpLogError = (HTTPLogError) o; - return Objects.equals(this.code, httpLogError.code) - && Objects.equals(this.message, httpLogError.message); + return Objects.equals(this.code, httpLogError.code) && Objects.equals(this.message, httpLogError.message); } + @Override public int hashCode() { - return Objects.hash(code, message); + return Objects.hash(code,message); } @Override @@ -105,7 +126,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HTTPLogItem.java b/src/main/java/com/datadog/api/client/v1/model/HTTPLogItem.java index cf4d89db228..044db520706 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HTTPLogItem.java +++ b/src/main/java/com/datadog/api/client/v1/model/HTTPLogItem.java @@ -6,6 +6,17 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,11 +24,15 @@ 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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Logs that are sent over HTTP. */ + +/** + *

Logs that are sent over HTTP.

+ */ @JsonPropertyOrder({ HTTPLogItem.JSON_PROPERTY_DDSOURCE, HTTPLogItem.JSON_PROPERTY_DDTAGS, @@ -25,10 +40,10 @@ HTTPLogItem.JSON_PROPERTY_MESSAGE, HTTPLogItem.JSON_PROPERTY_SERVICE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HTTPLogItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DDSOURCE = "ddsource"; private String ddsource; @@ -47,134 +62,121 @@ public class HTTPLogItem { public HTTPLogItem() {} @JsonCreator - public HTTPLogItem(@JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message) { - this.message = message; + public HTTPLogItem( + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message) { + this.message = message; } - public HTTPLogItem ddsource(String ddsource) { this.ddsource = ddsource; return this; } /** - * The integration name associated with your log: the technology from which the log originated. - * When it matches an integration name, Datadog automatically installs the corresponding parsers - * and facets. See reserved - * attributes. - * + *

The integration name associated with your log: the technology from which the log originated. + * When it matches an integration name, Datadog automatically installs the corresponding parsers and facets. + * See reserved attributes.

* @return ddsource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DDSOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDdsource() { - return ddsource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DDSOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDdsource() { + return ddsource; + } public void setDdsource(String ddsource) { this.ddsource = ddsource; } - public HTTPLogItem ddtags(String ddtags) { this.ddtags = ddtags; return this; } /** - * Tags associated with your logs. - * + *

Tags associated with your logs.

* @return ddtags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DDTAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDdtags() { - return ddtags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DDTAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDdtags() { + return ddtags; + } public void setDdtags(String ddtags) { this.ddtags = ddtags; } - public HTTPLogItem hostname(String hostname) { this.hostname = hostname; return this; } /** - * The name of the originating host of the log. - * + *

The name of the originating host of the log.

* @return hostname - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOSTNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostname() { - return hostname; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostname() { + return hostname; + } public void setHostname(String hostname) { this.hostname = hostname; } - public HTTPLogItem message(String message) { this.message = message; return this; } /** - * The message reserved - * attribute of your log. By default, Datadog ingests the value of the message attribute as - * the body of the log entry. That value is then highlighted and displayed in the Logstream, where - * it is indexed for full text search. - * + *

The message reserved attribute + * of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. + * That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public HTTPLogItem service(String service) { this.service = service; return this; } /** - * The name of the application or service generating the log events. It is used to switch from - * Logs to APM, so make sure you define the same value when you use both products. See reserved - * attributes. - * + *

The name of the application or service generating the log events. + * It is used to switch from Logs to APM, so make sure you define the same value when you use both products. + * See reserved attributes.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. + * 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. + * 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 @@ -183,7 +185,7 @@ public void setService(String service) { @JsonAnySetter public HTTPLogItem putAdditionalProperty(String key, String value) { if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + this.additionalProperties = new HashMap(); } this.additionalProperties.put(key, value); return this; @@ -207,12 +209,14 @@ public Map getAdditionalProperties() { */ public String getAdditionalProperty(String key) { if (this.additionalProperties == null) { - return null; + return null; } return this.additionalProperties.get(key); } - /** Return true if this HTTPLogItem object is equal to o. */ + /** + * Return true if this HTTPLogItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -222,17 +226,13 @@ public boolean equals(Object o) { return false; } HTTPLogItem httpLogItem = (HTTPLogItem) o; - return Objects.equals(this.ddsource, httpLogItem.ddsource) - && Objects.equals(this.ddtags, httpLogItem.ddtags) - && Objects.equals(this.hostname, httpLogItem.hostname) - && Objects.equals(this.message, httpLogItem.message) - && Objects.equals(this.service, httpLogItem.service) - && Objects.equals(this.additionalProperties, httpLogItem.additionalProperties); + return Objects.equals(this.ddsource, httpLogItem.ddsource) && Objects.equals(this.ddtags, httpLogItem.ddtags) && Objects.equals(this.hostname, httpLogItem.hostname) && Objects.equals(this.message, httpLogItem.message) && Objects.equals(this.service, httpLogItem.service) && Objects.equals(this.additionalProperties, httpLogItem.additionalProperties); } + @Override public int hashCode() { - return Objects.hash(ddsource, ddtags, hostname, message, service, additionalProperties); + return Objects.hash(ddsource,ddtags,hostname,message,service, additionalProperties); } @Override @@ -252,7 +252,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinition.java index 59e9ec1e3f3..3623e2d3304 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The heat map visualization shows metrics aggregated across many tags, such as hosts. The more - * hosts that have a particular value, the darker that square is. + *

The heat map visualization shows metrics aggregated across many tags, such as hosts. The more hosts that have a particular value, the darker that square is.

*/ @JsonPropertyOrder({ HeatMapWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -32,10 +46,10 @@ HeatMapWidgetDefinition.JSON_PROPERTY_TYPE, HeatMapWidgetDefinition.JSON_PROPERTY_YAXIS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HeatMapWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -73,14 +87,12 @@ public HeatMapWidgetDefinition() {} @JsonCreator public HeatMapWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) HeatMapWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)HeatMapWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public HeatMapWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -88,7 +100,6 @@ public HeatMapWidgetDefinition customLinks(List customLinks) { } return this; } - public HeatMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -99,21 +110,19 @@ public HeatMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksIt } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public HeatMapWidgetDefinition events(List events) { this.events = events; for (WidgetEvent item : events) { @@ -121,7 +130,6 @@ public HeatMapWidgetDefinition events(List events) { } return this; } - public HeatMapWidgetDefinition addEventsItem(WidgetEvent eventsItem) { if (this.events == null) { this.events = new ArrayList<>(); @@ -132,42 +140,38 @@ public HeatMapWidgetDefinition addEventsItem(WidgetEvent eventsItem) { } /** - * List of widget events. - * + *

List of widget events.

* @return events - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEvents() { - return events; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } public void setEvents(List events) { this.events = events; } - public HeatMapWidgetDefinition legendSize(String legendSize) { this.legendSize = legendSize; return this; } /** - * Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". - * + *

Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto".

* @return legendSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegendSize() { - return legendSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLegendSize() { + return legendSize; + } public void setLegendSize(String legendSize) { this.legendSize = legendSize; } - public HeatMapWidgetDefinition requests(List requests) { this.requests = requests; for (HeatMapWidgetRequest item : requests) { @@ -175,7 +179,6 @@ public HeatMapWidgetDefinition requests(List requests) { } return this; } - public HeatMapWidgetDefinition addRequestsItem(HeatMapWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -183,41 +186,37 @@ public HeatMapWidgetDefinition addRequestsItem(HeatMapWidgetRequest requestsItem } /** - * List of widget types. - * + *

List of widget types.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public HeatMapWidgetDefinition showLegend(Boolean showLegend) { this.showLegend = showLegend; return this; } /** - * Whether or not to display the legend on this widget. - * + *

Whether or not to display the legend on this widget.

* @return showLegend - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowLegend() { - return showLegend; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowLegend() { + return showLegend; + } public void setShowLegend(Boolean showLegend) { this.showLegend = showLegend; } - public HeatMapWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -225,42 +224,38 @@ public HeatMapWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public HeatMapWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public HeatMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -268,45 +263,41 @@ public HeatMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public HeatMapWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public HeatMapWidgetDefinition type(HeatMapWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -314,23 +305,21 @@ public HeatMapWidgetDefinition type(HeatMapWidgetDefinitionType type) { } /** - * Type of the heat map widget. - * + *

Type of the heat map widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public HeatMapWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public HeatMapWidgetDefinitionType getType() { + return type; + } public void setType(HeatMapWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public HeatMapWidgetDefinition yaxis(WidgetAxis yaxis) { this.yaxis = yaxis; this.unparsed |= yaxis.unparsed; @@ -338,22 +327,23 @@ public HeatMapWidgetDefinition yaxis(WidgetAxis yaxis) { } /** - * Axis controls for the widget. - * + *

Axis controls for the widget.

* @return yaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAxis getYaxis() { - return yaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAxis getYaxis() { + return yaxis; + } public void setYaxis(WidgetAxis yaxis) { this.yaxis = yaxis; } - /** Return true if this HeatMapWidgetDefinition object is equal to o. */ + /** + * Return true if this HeatMapWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -363,33 +353,13 @@ public boolean equals(Object o) { return false; } HeatMapWidgetDefinition heatMapWidgetDefinition = (HeatMapWidgetDefinition) o; - return Objects.equals(this.customLinks, heatMapWidgetDefinition.customLinks) - && Objects.equals(this.events, heatMapWidgetDefinition.events) - && Objects.equals(this.legendSize, heatMapWidgetDefinition.legendSize) - && Objects.equals(this.requests, heatMapWidgetDefinition.requests) - && Objects.equals(this.showLegend, heatMapWidgetDefinition.showLegend) - && Objects.equals(this.time, heatMapWidgetDefinition.time) - && Objects.equals(this.title, heatMapWidgetDefinition.title) - && Objects.equals(this.titleAlign, heatMapWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, heatMapWidgetDefinition.titleSize) - && Objects.equals(this.type, heatMapWidgetDefinition.type) - && Objects.equals(this.yaxis, heatMapWidgetDefinition.yaxis); + return Objects.equals(this.customLinks, heatMapWidgetDefinition.customLinks) && Objects.equals(this.events, heatMapWidgetDefinition.events) && Objects.equals(this.legendSize, heatMapWidgetDefinition.legendSize) && Objects.equals(this.requests, heatMapWidgetDefinition.requests) && Objects.equals(this.showLegend, heatMapWidgetDefinition.showLegend) && Objects.equals(this.time, heatMapWidgetDefinition.time) && Objects.equals(this.title, heatMapWidgetDefinition.title) && Objects.equals(this.titleAlign, heatMapWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, heatMapWidgetDefinition.titleSize) && Objects.equals(this.type, heatMapWidgetDefinition.type) && Objects.equals(this.yaxis, heatMapWidgetDefinition.yaxis); } + @Override public int hashCode() { - return Objects.hash( - customLinks, - events, - legendSize, - requests, - showLegend, - time, - title, - titleAlign, - titleSize, - type, - yaxis); + return Objects.hash(customLinks,events,legendSize,requests,showLegend,time,title,titleAlign,titleSize,type,yaxis); } @Override @@ -412,7 +382,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinitionType.java index dd037c0e858..6013434bdf1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the heat map widget. */ +/** + *

Type of the heat map widget.

+ */ @JsonSerialize(using = HeatMapWidgetDefinitionType.HeatMapWidgetDefinitionTypeSerializer.class) public class HeatMapWidgetDefinitionType { - public static final HeatMapWidgetDefinitionType HEATMAP = - new HeatMapWidgetDefinitionType("heatmap"); + public static final HeatMapWidgetDefinitionType HEATMAP = new HeatMapWidgetDefinitionType("heatmap"); private static final Set allowedValues = new HashSet(Arrays.asList("heatmap")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class HeatMapWidgetDefinitionTypeSerializer - extends StdSerializer { - public HeatMapWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class HeatMapWidgetDefinitionTypeSerializer extends StdSerializer { + public HeatMapWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public HeatMapWidgetDefinitionTypeSerializer() { - this(null); - } + public HeatMapWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - HeatMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(HeatMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this HeatMapWidgetDefinitionType object is equal to o. */ + /** + * Return true if this HeatMapWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetRequest.java index 3476901621d..573f9f3d605 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/HeatMapWidgetRequest.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated heat map widget. */ + +/** + *

Updated heat map widget.

+ */ @JsonPropertyOrder({ HeatMapWidgetRequest.JSON_PROPERTY_APM_QUERY, HeatMapWidgetRequest.JSON_PROPERTY_EVENT_QUERY, @@ -25,10 +45,10 @@ HeatMapWidgetRequest.JSON_PROPERTY_SECURITY_QUERY, HeatMapWidgetRequest.JSON_PROPERTY_STYLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HeatMapWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -66,21 +86,19 @@ public HeatMapWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public HeatMapWidgetRequest eventQuery(EventQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -88,21 +106,19 @@ public HeatMapWidgetRequest eventQuery(EventQueryDefinition eventQuery) { } /** - * The event query. - * + *

The event query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(EventQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public HeatMapWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -110,21 +126,19 @@ public HeatMapWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public HeatMapWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -132,21 +146,19 @@ public HeatMapWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public HeatMapWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -154,21 +166,19 @@ public HeatMapWidgetRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public HeatMapWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -176,42 +186,38 @@ public HeatMapWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetric } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public HeatMapWidgetRequest q(String q) { this.q = q; return this; } /** - * Widget query. - * + *

Widget query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public HeatMapWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -219,21 +225,19 @@ public HeatMapWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public HeatMapWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -241,21 +245,19 @@ public HeatMapWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - public HeatMapWidgetRequest style(WidgetStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -263,22 +265,23 @@ public HeatMapWidgetRequest style(WidgetStyle style) { } /** - * Widget style definition. - * + *

Widget style definition.

* @return style - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetStyle getStyle() { - return style; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetStyle getStyle() { + return style; + } public void setStyle(WidgetStyle style) { this.style = style; } - /** Return true if this HeatMapWidgetRequest object is equal to o. */ + /** + * Return true if this HeatMapWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -288,31 +291,13 @@ public boolean equals(Object o) { return false; } HeatMapWidgetRequest heatMapWidgetRequest = (HeatMapWidgetRequest) o; - return Objects.equals(this.apmQuery, heatMapWidgetRequest.apmQuery) - && Objects.equals(this.eventQuery, heatMapWidgetRequest.eventQuery) - && Objects.equals(this.logQuery, heatMapWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, heatMapWidgetRequest.networkQuery) - && Objects.equals(this.processQuery, heatMapWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, heatMapWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, heatMapWidgetRequest.q) - && Objects.equals(this.rumQuery, heatMapWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, heatMapWidgetRequest.securityQuery) - && Objects.equals(this.style, heatMapWidgetRequest.style); + return Objects.equals(this.apmQuery, heatMapWidgetRequest.apmQuery) && Objects.equals(this.eventQuery, heatMapWidgetRequest.eventQuery) && Objects.equals(this.logQuery, heatMapWidgetRequest.logQuery) && Objects.equals(this.networkQuery, heatMapWidgetRequest.networkQuery) && Objects.equals(this.processQuery, heatMapWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, heatMapWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, heatMapWidgetRequest.q) && Objects.equals(this.rumQuery, heatMapWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, heatMapWidgetRequest.securityQuery) && Objects.equals(this.style, heatMapWidgetRequest.style); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - eventQuery, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - rumQuery, - securityQuery, - style); + return Objects.hash(apmQuery,eventQuery,logQuery,networkQuery,processQuery,profileMetricsQuery,q,rumQuery,securityQuery,style); } @Override @@ -324,9 +309,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" rumQuery: ").append(toIndentedString(rumQuery)).append("\n"); sb.append(" securityQuery: ").append(toIndentedString(securityQuery)).append("\n"); @@ -336,7 +319,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Host.java b/src/main/java/com/datadog/api/client/v1/model/Host.java index 65b0dcf3b98..43d9006c0f0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Host.java +++ b/src/main/java/com/datadog/api/client/v1/model/Host.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object representing a host. */ +/** + *

Object representing a host.

+ */ @JsonPropertyOrder({ Host.JSON_PROPERTY_ALIASES, Host.JSON_PROPERTY_APPS, @@ -33,10 +49,10 @@ Host.JSON_PROPERTY_TAGS_BY_SOURCE, Host.JSON_PROPERTY_UP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Host { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALIASES = "aliases"; private List aliases = null; @@ -83,7 +99,6 @@ public Host aliases(List aliases) { this.aliases = aliases; return this; } - public Host addAliasesItem(String aliasesItem) { if (this.aliases == null) { this.aliases = new ArrayList<>(); @@ -93,26 +108,23 @@ public Host addAliasesItem(String aliasesItem) { } /** - * Host aliases collected by Datadog. - * + *

Host aliases collected by Datadog.

* @return aliases - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIASES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAliases() { - return aliases; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIASES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAliases() { + return aliases; + } public void setAliases(List aliases) { this.aliases = aliases; } - public Host apps(List apps) { this.apps = apps; return this; } - public Host addAppsItem(String appsItem) { if (this.apps == null) { this.apps = new ArrayList<>(); @@ -122,126 +134,114 @@ public Host addAppsItem(String appsItem) { } /** - * The Datadog integrations reporting metrics for the host. - * + *

The Datadog integrations reporting metrics for the host.

* @return apps - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getApps() { - return apps; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getApps() { + return apps; + } public void setApps(List apps) { this.apps = apps; } - public Host awsName(String awsName) { this.awsName = awsName; return this; } /** - * AWS name of your host. - * + *

AWS name of your host.

* @return awsName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAwsName() { - return awsName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAwsName() { + return awsName; + } public void setAwsName(String awsName) { this.awsName = awsName; } - public Host hostName(String hostName) { this.hostName = hostName; return this; } /** - * The host name. - * + *

The host name.

* @return hostName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostName() { - return hostName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostName() { + return hostName; + } public void setHostName(String hostName) { this.hostName = hostName; } - public Host id(Long id) { this.id = id; return this; } /** - * The host ID. - * + *

The host ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public Host isMuted(Boolean isMuted) { this.isMuted = isMuted; return this; } /** - * If a host is muted or unmuted. - * + *

If a host is muted or unmuted.

* @return isMuted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_MUTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsMuted() { - return isMuted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MUTED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMuted() { + return isMuted; + } public void setIsMuted(Boolean isMuted) { this.isMuted = isMuted; } - public Host lastReportedTime(Long lastReportedTime) { this.lastReportedTime = lastReportedTime; return this; } /** - * Last time the host reported a metric data point. - * + *

Last time the host reported a metric data point.

* @return lastReportedTime - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_REPORTED_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastReportedTime() { - return lastReportedTime; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_REPORTED_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastReportedTime() { + return lastReportedTime; + } public void setLastReportedTime(Long lastReportedTime) { this.lastReportedTime = lastReportedTime; } - public Host meta(HostMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -249,21 +249,19 @@ public Host meta(HostMeta meta) { } /** - * Metadata associated with your host. - * + *

Metadata associated with your host.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HostMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HostMeta getMeta() { + return meta; + } public void setMeta(HostMeta meta) { this.meta = meta; } - public Host metrics(HostMetrics metrics) { this.metrics = metrics; this.unparsed |= metrics.unparsed; @@ -271,68 +269,61 @@ public Host metrics(HostMetrics metrics) { } /** - * Host Metrics collected. - * + *

Host Metrics collected.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HostMetrics getMetrics() { - return metrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HostMetrics getMetrics() { + return metrics; + } public void setMetrics(HostMetrics metrics) { this.metrics = metrics; } - public Host muteTimeout(Long muteTimeout) { this.muteTimeout = muteTimeout; return this; } /** - * Timeout of the mute applied to your host. - * + *

Timeout of the mute applied to your host.

* @return muteTimeout - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MUTE_TIMEOUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMuteTimeout() { - return muteTimeout; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MUTE_TIMEOUT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMuteTimeout() { + return muteTimeout; + } public void setMuteTimeout(Long muteTimeout) { this.muteTimeout = muteTimeout; } - public Host name(String name) { this.name = name; return this; } /** - * The host name. - * + *

The host name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public Host sources(List sources) { this.sources = sources; return this; } - public Host addSourcesItem(String sourcesItem) { if (this.sources == null) { this.sources = new ArrayList<>(); @@ -342,26 +333,23 @@ public Host addSourcesItem(String sourcesItem) { } /** - * Source or cloud provider associated with your host. - * + *

Source or cloud provider associated with your host.

* @return sources - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSources() { - return sources; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public Host tagsBySource(Map> tagsBySource) { this.tagsBySource = tagsBySource; return this; } - public Host putTagsBySourceItem(String key, List tagsBySourceItem) { if (this.tagsBySource == null) { this.tagsBySource = new HashMap<>(); @@ -371,44 +359,42 @@ public Host putTagsBySourceItem(String key, List tagsBySourceItem) { } /** - * List of tags for each source (AWS, Datadog Agent, Chef..). - * + *

List of tags for each source (AWS, Datadog Agent, Chef..).

* @return tagsBySource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS_BY_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getTagsBySource() { - return tagsBySource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS_BY_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getTagsBySource() { + return tagsBySource; + } public void setTagsBySource(Map> tagsBySource) { this.tagsBySource = tagsBySource; } - public Host up(Boolean up) { this.up = up; return this; } /** - * Displays UP when the expected metrics are received and displays ??? if no metrics - * are received. - * + *

Displays UP when the expected metrics are received and displays ??? if no metrics are received.

* @return up - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUp() { - return up; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUp() { + return up; + } public void setUp(Boolean up) { this.up = up; } - /** Return true if this Host object is equal to o. */ + /** + * Return true if this Host object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -418,39 +404,13 @@ public boolean equals(Object o) { return false; } Host host = (Host) o; - return Objects.equals(this.aliases, host.aliases) - && Objects.equals(this.apps, host.apps) - && Objects.equals(this.awsName, host.awsName) - && Objects.equals(this.hostName, host.hostName) - && Objects.equals(this.id, host.id) - && Objects.equals(this.isMuted, host.isMuted) - && Objects.equals(this.lastReportedTime, host.lastReportedTime) - && Objects.equals(this.meta, host.meta) - && Objects.equals(this.metrics, host.metrics) - && Objects.equals(this.muteTimeout, host.muteTimeout) - && Objects.equals(this.name, host.name) - && Objects.equals(this.sources, host.sources) - && Objects.equals(this.tagsBySource, host.tagsBySource) - && Objects.equals(this.up, host.up); + return Objects.equals(this.aliases, host.aliases) && Objects.equals(this.apps, host.apps) && Objects.equals(this.awsName, host.awsName) && Objects.equals(this.hostName, host.hostName) && Objects.equals(this.id, host.id) && Objects.equals(this.isMuted, host.isMuted) && Objects.equals(this.lastReportedTime, host.lastReportedTime) && Objects.equals(this.meta, host.meta) && Objects.equals(this.metrics, host.metrics) && Objects.equals(this.muteTimeout, host.muteTimeout) && Objects.equals(this.name, host.name) && Objects.equals(this.sources, host.sources) && Objects.equals(this.tagsBySource, host.tagsBySource) && Objects.equals(this.up, host.up); } + @Override public int hashCode() { - return Objects.hash( - aliases, - apps, - awsName, - hostName, - id, - isMuted, - lastReportedTime, - meta, - metrics, - muteTimeout, - name, - sources, - tagsBySource, - up); + return Objects.hash(aliases,apps,awsName,hostName,id,isMuted,lastReportedTime,meta,metrics,muteTimeout,name,sources,tagsBySource,up); } @Override @@ -476,7 +436,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostListResponse.java b/src/main/java/com/datadog/api/client/v1/model/HostListResponse.java index c1e320ac7c0..26a9d38d51e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostListResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with Host information from Datadog. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with Host information from Datadog.

+ */ @JsonPropertyOrder({ HostListResponse.JSON_PROPERTY_HOST_LIST, HostListResponse.JSON_PROPERTY_TOTAL_MATCHING, HostListResponse.JSON_PROPERTY_TOTAL_RETURNED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOST_LIST = "host_list"; private List hostList = null; @@ -40,7 +58,6 @@ public HostListResponse hostList(List hostList) { } return this; } - public HostListResponse addHostListItem(Host hostListItem) { if (this.hostList == null) { this.hostList = new ArrayList<>(); @@ -51,64 +68,61 @@ public HostListResponse addHostListItem(Host hostListItem) { } /** - * Array of hosts. - * + *

Array of hosts.

* @return hostList - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getHostList() { - return hostList; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_LIST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getHostList() { + return hostList; + } public void setHostList(List hostList) { this.hostList = hostList; } - public HostListResponse totalMatching(Long totalMatching) { this.totalMatching = totalMatching; return this; } /** - * Number of host matching the query. - * + *

Number of host matching the query.

* @return totalMatching - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_MATCHING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalMatching() { - return totalMatching; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_MATCHING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalMatching() { + return totalMatching; + } public void setTotalMatching(Long totalMatching) { this.totalMatching = totalMatching; } - public HostListResponse totalReturned(Long totalReturned) { this.totalReturned = totalReturned; return this; } /** - * Number of host returned. - * + *

Number of host returned.

* @return totalReturned - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_RETURNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalReturned() { - return totalReturned; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_RETURNED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalReturned() { + return totalReturned; + } public void setTotalReturned(Long totalReturned) { this.totalReturned = totalReturned; } - /** Return true if this HostListResponse object is equal to o. */ + /** + * Return true if this HostListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +132,13 @@ public boolean equals(Object o) { return false; } HostListResponse hostListResponse = (HostListResponse) o; - return Objects.equals(this.hostList, hostListResponse.hostList) - && Objects.equals(this.totalMatching, hostListResponse.totalMatching) - && Objects.equals(this.totalReturned, hostListResponse.totalReturned); + return Objects.equals(this.hostList, hostListResponse.hostList) && Objects.equals(this.totalMatching, hostListResponse.totalMatching) && Objects.equals(this.totalReturned, hostListResponse.totalReturned); } + @Override public int hashCode() { - return Objects.hash(hostList, totalMatching, totalReturned); + return Objects.hash(hostList,totalMatching,totalReturned); } @Override @@ -140,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMapRequest.java b/src/main/java/com/datadog/api/client/v1/model/HostMapRequest.java index 1885b8cf9c9..44f1d081050 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMapRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMapRequest.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated host map. */ + +/** + *

Updated host map.

+ */ @JsonPropertyOrder({ HostMapRequest.JSON_PROPERTY_APM_QUERY, HostMapRequest.JSON_PROPERTY_EVENT_QUERY, @@ -24,10 +44,10 @@ HostMapRequest.JSON_PROPERTY_RUM_QUERY, HostMapRequest.JSON_PROPERTY_SECURITY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMapRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -62,21 +82,19 @@ public HostMapRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public HostMapRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -84,21 +102,19 @@ public HostMapRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public HostMapRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -106,21 +122,19 @@ public HostMapRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public HostMapRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -128,21 +142,19 @@ public HostMapRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public HostMapRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -150,21 +162,19 @@ public HostMapRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public HostMapRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -172,42 +182,38 @@ public HostMapRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public HostMapRequest q(String q) { this.q = q; return this; } /** - * Query definition. - * + *

Query definition.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public HostMapRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -215,21 +221,19 @@ public HostMapRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public HostMapRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -237,22 +241,23 @@ public HostMapRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - /** Return true if this HostMapRequest object is equal to o. */ + /** + * Return true if this HostMapRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -262,29 +267,13 @@ public boolean equals(Object o) { return false; } HostMapRequest hostMapRequest = (HostMapRequest) o; - return Objects.equals(this.apmQuery, hostMapRequest.apmQuery) - && Objects.equals(this.eventQuery, hostMapRequest.eventQuery) - && Objects.equals(this.logQuery, hostMapRequest.logQuery) - && Objects.equals(this.networkQuery, hostMapRequest.networkQuery) - && Objects.equals(this.processQuery, hostMapRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, hostMapRequest.profileMetricsQuery) - && Objects.equals(this.q, hostMapRequest.q) - && Objects.equals(this.rumQuery, hostMapRequest.rumQuery) - && Objects.equals(this.securityQuery, hostMapRequest.securityQuery); + return Objects.equals(this.apmQuery, hostMapRequest.apmQuery) && Objects.equals(this.eventQuery, hostMapRequest.eventQuery) && Objects.equals(this.logQuery, hostMapRequest.logQuery) && Objects.equals(this.networkQuery, hostMapRequest.networkQuery) && Objects.equals(this.processQuery, hostMapRequest.processQuery) && Objects.equals(this.profileMetricsQuery, hostMapRequest.profileMetricsQuery) && Objects.equals(this.q, hostMapRequest.q) && Objects.equals(this.rumQuery, hostMapRequest.rumQuery) && Objects.equals(this.securityQuery, hostMapRequest.securityQuery); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - eventQuery, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - rumQuery, - securityQuery); + return Objects.hash(apmQuery,eventQuery,logQuery,networkQuery,processQuery,profileMetricsQuery,q,rumQuery,securityQuery); } @Override @@ -296,9 +285,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" rumQuery: ").append(toIndentedString(rumQuery)).append("\n"); sb.append(" securityQuery: ").append(toIndentedString(securityQuery)).append("\n"); @@ -307,7 +294,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinition.java index eaa87724ff9..7f9bdb5bca0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The host map widget graphs any metric across your hosts using the same visualization available - * from the main Host Map page. + *

The host map widget graphs any metric across your hosts using the same visualization available from the main Host Map page.

*/ @JsonPropertyOrder({ HostMapWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -34,10 +48,10 @@ HostMapWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, HostMapWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMapWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -81,15 +95,13 @@ public HostMapWidgetDefinition() {} @JsonCreator public HostMapWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - HostMapWidgetDefinitionRequests requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) HostMapWidgetDefinitionType type) { - this.requests = requests; - this.unparsed |= requests.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)HostMapWidgetDefinitionRequests requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)HostMapWidgetDefinitionType type) { + this.requests = requests; + this.unparsed |= requests.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public HostMapWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -97,7 +109,6 @@ public HostMapWidgetDefinition customLinks(List customLinks) { } return this; } - public HostMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -108,26 +119,23 @@ public HostMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksIt } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public HostMapWidgetDefinition group(List group) { this.group = group; return this; } - public HostMapWidgetDefinition addGroupItem(String groupItem) { if (this.group == null) { this.group = new ArrayList<>(); @@ -137,63 +145,57 @@ public HostMapWidgetDefinition addGroupItem(String groupItem) { } /** - * List of tag prefixes to group by. - * + *

List of tag prefixes to group by.

* @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroup() { - return group; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroup() { + return group; + } public void setGroup(List group) { this.group = group; } - public HostMapWidgetDefinition noGroupHosts(Boolean noGroupHosts) { this.noGroupHosts = noGroupHosts; return this; } /** - * Whether to show the hosts that don’t fit in a group. - * + *

Whether to show the hosts that don’t fit in a group.

* @return noGroupHosts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NO_GROUP_HOSTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNoGroupHosts() { - return noGroupHosts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_GROUP_HOSTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoGroupHosts() { + return noGroupHosts; + } public void setNoGroupHosts(Boolean noGroupHosts) { this.noGroupHosts = noGroupHosts; } - public HostMapWidgetDefinition noMetricHosts(Boolean noMetricHosts) { this.noMetricHosts = noMetricHosts; return this; } /** - * Whether to show the hosts with no metrics. - * + *

Whether to show the hosts with no metrics.

* @return noMetricHosts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NO_METRIC_HOSTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNoMetricHosts() { - return noMetricHosts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_METRIC_HOSTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoMetricHosts() { + return noMetricHosts; + } public void setNoMetricHosts(Boolean noMetricHosts) { this.noMetricHosts = noMetricHosts; } - public HostMapWidgetDefinition nodeType(WidgetNodeType nodeType) { this.nodeType = nodeType; this.unparsed |= !nodeType.isValid(); @@ -201,45 +203,41 @@ public HostMapWidgetDefinition nodeType(WidgetNodeType nodeType) { } /** - * Which type of node to use in the map. - * + *

Which type of node to use in the map.

* @return nodeType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NODE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetNodeType getNodeType() { - return nodeType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NODE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetNodeType getNodeType() { + return nodeType; + } public void setNodeType(WidgetNodeType nodeType) { if (!nodeType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.nodeType = nodeType; } - public HostMapWidgetDefinition notes(String notes) { this.notes = notes; return this; } /** - * Notes on the title. - * + *

Notes on the title.

* @return notes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNotes() { - return notes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } public void setNotes(String notes) { this.notes = notes; } - public HostMapWidgetDefinition requests(HostMapWidgetDefinitionRequests requests) { this.requests = requests; this.unparsed |= requests.unparsed; @@ -247,25 +245,22 @@ public HostMapWidgetDefinition requests(HostMapWidgetDefinitionRequests requests } /** - * List of definitions. - * + *

List of definitions.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public HostMapWidgetDefinitionRequests getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public HostMapWidgetDefinitionRequests getRequests() { + return requests; + } public void setRequests(HostMapWidgetDefinitionRequests requests) { this.requests = requests; } - public HostMapWidgetDefinition scope(List scope) { this.scope = scope; return this; } - public HostMapWidgetDefinition addScopeItem(String scopeItem) { if (this.scope == null) { this.scope = new ArrayList<>(); @@ -275,21 +270,19 @@ public HostMapWidgetDefinition addScopeItem(String scopeItem) { } /** - * List of tags used to filter the map. - * + *

List of tags used to filter the map.

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getScope() { - return scope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getScope() { + return scope; + } public void setScope(List scope) { this.scope = scope; } - public HostMapWidgetDefinition style(HostMapWidgetDefinitionStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -297,42 +290,38 @@ public HostMapWidgetDefinition style(HostMapWidgetDefinitionStyle style) { } /** - * The style to apply to the widget. - * + *

The style to apply to the widget.

* @return style - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HostMapWidgetDefinitionStyle getStyle() { - return style; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HostMapWidgetDefinitionStyle getStyle() { + return style; + } public void setStyle(HostMapWidgetDefinitionStyle style) { this.style = style; } - public HostMapWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public HostMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -340,45 +329,41 @@ public HostMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public HostMapWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public HostMapWidgetDefinition type(HostMapWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -386,24 +371,25 @@ public HostMapWidgetDefinition type(HostMapWidgetDefinitionType type) { } /** - * Type of the host map widget. - * + *

Type of the host map widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public HostMapWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public HostMapWidgetDefinitionType getType() { + return type; + } public void setType(HostMapWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this HostMapWidgetDefinition object is equal to o. */ + /** + * Return true if this HostMapWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -413,37 +399,13 @@ public boolean equals(Object o) { return false; } HostMapWidgetDefinition hostMapWidgetDefinition = (HostMapWidgetDefinition) o; - return Objects.equals(this.customLinks, hostMapWidgetDefinition.customLinks) - && Objects.equals(this.group, hostMapWidgetDefinition.group) - && Objects.equals(this.noGroupHosts, hostMapWidgetDefinition.noGroupHosts) - && Objects.equals(this.noMetricHosts, hostMapWidgetDefinition.noMetricHosts) - && Objects.equals(this.nodeType, hostMapWidgetDefinition.nodeType) - && Objects.equals(this.notes, hostMapWidgetDefinition.notes) - && Objects.equals(this.requests, hostMapWidgetDefinition.requests) - && Objects.equals(this.scope, hostMapWidgetDefinition.scope) - && Objects.equals(this.style, hostMapWidgetDefinition.style) - && Objects.equals(this.title, hostMapWidgetDefinition.title) - && Objects.equals(this.titleAlign, hostMapWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, hostMapWidgetDefinition.titleSize) - && Objects.equals(this.type, hostMapWidgetDefinition.type); + return Objects.equals(this.customLinks, hostMapWidgetDefinition.customLinks) && Objects.equals(this.group, hostMapWidgetDefinition.group) && Objects.equals(this.noGroupHosts, hostMapWidgetDefinition.noGroupHosts) && Objects.equals(this.noMetricHosts, hostMapWidgetDefinition.noMetricHosts) && Objects.equals(this.nodeType, hostMapWidgetDefinition.nodeType) && Objects.equals(this.notes, hostMapWidgetDefinition.notes) && Objects.equals(this.requests, hostMapWidgetDefinition.requests) && Objects.equals(this.scope, hostMapWidgetDefinition.scope) && Objects.equals(this.style, hostMapWidgetDefinition.style) && Objects.equals(this.title, hostMapWidgetDefinition.title) && Objects.equals(this.titleAlign, hostMapWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, hostMapWidgetDefinition.titleSize) && Objects.equals(this.type, hostMapWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - customLinks, - group, - noGroupHosts, - noMetricHosts, - nodeType, - notes, - requests, - scope, - style, - title, - titleAlign, - titleSize, - type); + return Objects.hash(customLinks,group,noGroupHosts,noMetricHosts,nodeType,notes,requests,scope,style,title,titleAlign,titleSize,type); } @Override @@ -468,7 +430,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionRequests.java b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionRequests.java index 5d0ee2a0004..a862adaab7b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionRequests.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionRequests.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of definitions. */ + +/** + *

List of definitions.

+ */ @JsonPropertyOrder({ HostMapWidgetDefinitionRequests.JSON_PROPERTY_FILL, HostMapWidgetDefinitionRequests.JSON_PROPERTY_SIZE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMapWidgetDefinitionRequests { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILL = "fill"; private HostMapRequest fill; @@ -34,21 +54,19 @@ public HostMapWidgetDefinitionRequests fill(HostMapRequest fill) { } /** - * Updated host map. - * + *

Updated host map.

* @return fill - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HostMapRequest getFill() { - return fill; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HostMapRequest getFill() { + return fill; + } public void setFill(HostMapRequest fill) { this.fill = fill; } - public HostMapWidgetDefinitionRequests size(HostMapRequest size) { this.size = size; this.unparsed |= size.unparsed; @@ -56,22 +74,23 @@ public HostMapWidgetDefinitionRequests size(HostMapRequest size) { } /** - * Updated host map. - * + *

Updated host map.

* @return size - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HostMapRequest getSize() { - return size; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HostMapRequest getSize() { + return size; + } public void setSize(HostMapRequest size) { this.size = size; } - /** Return true if this HostMapWidgetDefinitionRequests object is equal to o. */ + /** + * Return true if this HostMapWidgetDefinitionRequests object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HostMapWidgetDefinitionRequests hostMapWidgetDefinitionRequests = - (HostMapWidgetDefinitionRequests) o; - return Objects.equals(this.fill, hostMapWidgetDefinitionRequests.fill) - && Objects.equals(this.size, hostMapWidgetDefinitionRequests.size); + HostMapWidgetDefinitionRequests hostMapWidgetDefinitionRequests = (HostMapWidgetDefinitionRequests) o; + return Objects.equals(this.fill, hostMapWidgetDefinitionRequests.fill) && Objects.equals(this.size, hostMapWidgetDefinitionRequests.size); } + @Override public int hashCode() { - return Objects.hash(fill, size); + return Objects.hash(fill,size); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionStyle.java b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionStyle.java index 033a377b86b..fd07912fbf3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionStyle.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionStyle.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The style to apply to the widget. */ + +/** + *

The style to apply to the widget.

+ */ @JsonPropertyOrder({ HostMapWidgetDefinitionStyle.JSON_PROPERTY_FILL_MAX, HostMapWidgetDefinitionStyle.JSON_PROPERTY_FILL_MIN, HostMapWidgetDefinitionStyle.JSON_PROPERTY_PALETTE, HostMapWidgetDefinitionStyle.JSON_PROPERTY_PALETTE_FLIP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMapWidgetDefinitionStyle { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILL_MAX = "fill_max"; private String fillMax; @@ -41,85 +61,80 @@ public HostMapWidgetDefinitionStyle fillMax(String fillMax) { } /** - * Max value to use to color the map. - * + *

Max value to use to color the map.

* @return fillMax - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILL_MAX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFillMax() { - return fillMax; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILL_MAX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFillMax() { + return fillMax; + } public void setFillMax(String fillMax) { this.fillMax = fillMax; } - public HostMapWidgetDefinitionStyle fillMin(String fillMin) { this.fillMin = fillMin; return this; } /** - * Min value to use to color the map. - * + *

Min value to use to color the map.

* @return fillMin - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILL_MIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFillMin() { - return fillMin; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILL_MIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFillMin() { + return fillMin; + } public void setFillMin(String fillMin) { this.fillMin = fillMin; } - public HostMapWidgetDefinitionStyle palette(String palette) { this.palette = palette; return this; } /** - * Color palette to apply to the widget. - * + *

Color palette to apply to the widget.

* @return palette - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PALETTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPalette() { - return palette; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PALETTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPalette() { + return palette; + } public void setPalette(String palette) { this.palette = palette; } - public HostMapWidgetDefinitionStyle paletteFlip(Boolean paletteFlip) { this.paletteFlip = paletteFlip; return this; } /** - * Whether to flip the palette tones. - * + *

Whether to flip the palette tones.

* @return paletteFlip - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PALETTE_FLIP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPaletteFlip() { - return paletteFlip; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PALETTE_FLIP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPaletteFlip() { + return paletteFlip; + } public void setPaletteFlip(Boolean paletteFlip) { this.paletteFlip = paletteFlip; } - /** Return true if this HostMapWidgetDefinitionStyle object is equal to o. */ + /** + * Return true if this HostMapWidgetDefinitionStyle object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -129,15 +144,13 @@ public boolean equals(Object o) { return false; } HostMapWidgetDefinitionStyle hostMapWidgetDefinitionStyle = (HostMapWidgetDefinitionStyle) o; - return Objects.equals(this.fillMax, hostMapWidgetDefinitionStyle.fillMax) - && Objects.equals(this.fillMin, hostMapWidgetDefinitionStyle.fillMin) - && Objects.equals(this.palette, hostMapWidgetDefinitionStyle.palette) - && Objects.equals(this.paletteFlip, hostMapWidgetDefinitionStyle.paletteFlip); + return Objects.equals(this.fillMax, hostMapWidgetDefinitionStyle.fillMax) && Objects.equals(this.fillMin, hostMapWidgetDefinitionStyle.fillMin) && Objects.equals(this.palette, hostMapWidgetDefinitionStyle.palette) && Objects.equals(this.paletteFlip, hostMapWidgetDefinitionStyle.paletteFlip); } + @Override public int hashCode() { - return Objects.hash(fillMax, fillMin, palette, paletteFlip); + return Objects.hash(fillMax,fillMin,palette,paletteFlip); } @Override @@ -153,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionType.java index 5c50e417f8c..ed8622d1061 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMapWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the host map widget. */ +/** + *

Type of the host map widget.

+ */ @JsonSerialize(using = HostMapWidgetDefinitionType.HostMapWidgetDefinitionTypeSerializer.class) public class HostMapWidgetDefinitionType { - public static final HostMapWidgetDefinitionType HOSTMAP = - new HostMapWidgetDefinitionType("hostmap"); + public static final HostMapWidgetDefinitionType HOSTMAP = new HostMapWidgetDefinitionType("hostmap"); private static final Set allowedValues = new HashSet(Arrays.asList("hostmap")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class HostMapWidgetDefinitionTypeSerializer - extends StdSerializer { - public HostMapWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class HostMapWidgetDefinitionTypeSerializer extends StdSerializer { + public HostMapWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public HostMapWidgetDefinitionTypeSerializer() { - this(null); - } + public HostMapWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - HostMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(HostMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this HostMapWidgetDefinitionType object is equal to o. */ + /** + * Return true if this HostMapWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMeta.java b/src/main/java/com/datadog/api/client/v1/model/HostMeta.java index 2b0271eef59..c355e81a9d3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMeta.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMeta.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Metadata associated with your host. */ + +/** + *

Metadata associated with your host.

+ */ @JsonPropertyOrder({ HostMeta.JSON_PROPERTY_AGENT_CHECKS, HostMeta.JSON_PROPERTY_AGENT_VERSION, @@ -32,10 +50,10 @@ HostMeta.JSON_PROPERTY_SOCKET_HOSTNAME, HostMeta.JSON_PROPERTY_WIN_V }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGENT_CHECKS = "agent_checks"; private List> agentChecks = null; @@ -85,7 +103,6 @@ public HostMeta agentChecks(List> agentChecks) { this.agentChecks = agentChecks; return this; } - public HostMeta addAgentChecksItem(List agentChecksItem) { if (this.agentChecks == null) { this.agentChecks = new ArrayList<>(); @@ -95,68 +112,61 @@ public HostMeta addAgentChecksItem(List agentChecksItem) { } /** - * A list of Agent checks running on the host. - * + *

A list of Agent checks running on the host.

* @return agentChecks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_CHECKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getAgentChecks() { - return agentChecks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_CHECKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List> getAgentChecks() { + return agentChecks; + } public void setAgentChecks(List> agentChecks) { this.agentChecks = agentChecks; } - public HostMeta agentVersion(String agentVersion) { this.agentVersion = agentVersion; return this; } /** - * The Datadog Agent version. - * + *

The Datadog Agent version.

* @return agentVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAgentVersion() { - return agentVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentVersion() { + return agentVersion; + } public void setAgentVersion(String agentVersion) { this.agentVersion = agentVersion; } - public HostMeta cpuCores(Long cpuCores) { this.cpuCores = cpuCores; return this; } /** - * The number of cores. - * + *

The number of cores.

* @return cpuCores - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CPU_CORES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCpuCores() { - return cpuCores; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CPU_CORES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCpuCores() { + return cpuCores; + } public void setCpuCores(Long cpuCores) { this.cpuCores = cpuCores; } - public HostMeta fbsdV(List fbsdV) { this.fbsdV = fbsdV; return this; } - public HostMeta addFbsdVItem(Object fbsdVItem) { if (this.fbsdV == null) { this.fbsdV = new ArrayList<>(); @@ -166,42 +176,38 @@ public HostMeta addFbsdVItem(Object fbsdVItem) { } /** - * An array of Mac versions. - * + *

An array of Mac versions.

* @return fbsdV - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FBSD_V) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFbsdV() { - return fbsdV; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FBSD_V) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFbsdV() { + return fbsdV; + } public void setFbsdV(List fbsdV) { this.fbsdV = fbsdV; } - public HostMeta gohai(String gohai) { this.gohai = gohai; return this; } /** - * JSON string containing system information. - * + *

JSON string containing system information.

* @return gohai - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GOHAI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGohai() { - return gohai; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GOHAI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGohai() { + return gohai; + } public void setGohai(String gohai) { this.gohai = gohai; } - public HostMeta installMethod(HostMetaInstallMethod installMethod) { this.installMethod = installMethod; this.unparsed |= installMethod.unparsed; @@ -209,26 +215,23 @@ public HostMeta installMethod(HostMetaInstallMethod installMethod) { } /** - * Agent install method. - * + *

Agent install method.

* @return installMethod - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INSTALL_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HostMetaInstallMethod getInstallMethod() { - return installMethod; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTALL_METHOD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HostMetaInstallMethod getInstallMethod() { + return installMethod; + } public void setInstallMethod(HostMetaInstallMethod installMethod) { this.installMethod = installMethod; } - public HostMeta macV(List macV) { this.macV = macV; return this; } - public HostMeta addMacVItem(Object macVItem) { if (this.macV == null) { this.macV = new ArrayList<>(); @@ -238,47 +241,42 @@ public HostMeta addMacVItem(Object macVItem) { } /** - * An array of Mac versions. - * + *

An array of Mac versions.

* @return macV - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAC_V) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMacV() { - return macV; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAC_V) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMacV() { + return macV; + } public void setMacV(List macV) { this.macV = macV; } - public HostMeta machine(String machine) { this.machine = machine; return this; } /** - * The machine architecture. - * + *

The machine architecture.

* @return machine - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MACHINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMachine() { - return machine; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MACHINE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMachine() { + return machine; + } public void setMachine(String machine) { this.machine = machine; } - public HostMeta nixV(List nixV) { this.nixV = nixV; return this; } - public HostMeta addNixVItem(Object nixVItem) { if (this.nixV == null) { this.nixV = new ArrayList<>(); @@ -288,131 +286,118 @@ public HostMeta addNixVItem(Object nixVItem) { } /** - * Array of Unix versions. - * + *

Array of Unix versions.

* @return nixV - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NIX_V) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNixV() { - return nixV; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NIX_V) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNixV() { + return nixV; + } public void setNixV(List nixV) { this.nixV = nixV; } - public HostMeta platform(String platform) { this.platform = platform; return this; } /** - * The OS platform. - * + *

The OS platform.

* @return platform - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PLATFORM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPlatform() { - return platform; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPlatform() { + return platform; + } public void setPlatform(String platform) { this.platform = platform; } - public HostMeta processor(String processor) { this.processor = processor; return this; } /** - * The processor. - * + *

The processor.

* @return processor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProcessor() { - return processor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessor() { + return processor; + } public void setProcessor(String processor) { this.processor = processor; } - public HostMeta pythonV(String pythonV) { this.pythonV = pythonV; return this; } /** - * The Python version. - * + *

The Python version.

* @return pythonV - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PYTHON_V) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPythonV() { - return pythonV; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PYTHON_V) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPythonV() { + return pythonV; + } public void setPythonV(String pythonV) { this.pythonV = pythonV; } - public HostMeta socketFqdn(String socketFqdn) { this.socketFqdn = socketFqdn; return this; } /** - * The socket fqdn. - * + *

The socket fqdn.

* @return socketFqdn - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOCKET_FQDN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSocketFqdn() { - return socketFqdn; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOCKET_FQDN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSocketFqdn() { + return socketFqdn; + } public void setSocketFqdn(String socketFqdn) { this.socketFqdn = socketFqdn; } - public HostMeta socketHostname(String socketHostname) { this.socketHostname = socketHostname; return this; } /** - * The socket hostname. - * + *

The socket hostname.

* @return socketHostname - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOCKET_HOSTNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSocketHostname() { - return socketHostname; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOCKET_HOSTNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSocketHostname() { + return socketHostname; + } public void setSocketHostname(String socketHostname) { this.socketHostname = socketHostname; } - public HostMeta winV(List winV) { this.winV = winV; return this; } - public HostMeta addWinVItem(Object winVItem) { if (this.winV == null) { this.winV = new ArrayList<>(); @@ -422,22 +407,23 @@ public HostMeta addWinVItem(Object winVItem) { } /** - * An array of Windows versions. - * + *

An array of Windows versions.

* @return winV - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WIN_V) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWinV() { - return winV; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WIN_V) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWinV() { + return winV; + } public void setWinV(List winV) { this.winV = winV; } - /** Return true if this HostMeta object is equal to o. */ + /** + * Return true if this HostMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -447,41 +433,13 @@ public boolean equals(Object o) { return false; } HostMeta hostMeta = (HostMeta) o; - return Objects.equals(this.agentChecks, hostMeta.agentChecks) - && Objects.equals(this.agentVersion, hostMeta.agentVersion) - && Objects.equals(this.cpuCores, hostMeta.cpuCores) - && Objects.equals(this.fbsdV, hostMeta.fbsdV) - && Objects.equals(this.gohai, hostMeta.gohai) - && Objects.equals(this.installMethod, hostMeta.installMethod) - && Objects.equals(this.macV, hostMeta.macV) - && Objects.equals(this.machine, hostMeta.machine) - && Objects.equals(this.nixV, hostMeta.nixV) - && Objects.equals(this.platform, hostMeta.platform) - && Objects.equals(this.processor, hostMeta.processor) - && Objects.equals(this.pythonV, hostMeta.pythonV) - && Objects.equals(this.socketFqdn, hostMeta.socketFqdn) - && Objects.equals(this.socketHostname, hostMeta.socketHostname) - && Objects.equals(this.winV, hostMeta.winV); + return Objects.equals(this.agentChecks, hostMeta.agentChecks) && Objects.equals(this.agentVersion, hostMeta.agentVersion) && Objects.equals(this.cpuCores, hostMeta.cpuCores) && Objects.equals(this.fbsdV, hostMeta.fbsdV) && Objects.equals(this.gohai, hostMeta.gohai) && Objects.equals(this.installMethod, hostMeta.installMethod) && Objects.equals(this.macV, hostMeta.macV) && Objects.equals(this.machine, hostMeta.machine) && Objects.equals(this.nixV, hostMeta.nixV) && Objects.equals(this.platform, hostMeta.platform) && Objects.equals(this.processor, hostMeta.processor) && Objects.equals(this.pythonV, hostMeta.pythonV) && Objects.equals(this.socketFqdn, hostMeta.socketFqdn) && Objects.equals(this.socketHostname, hostMeta.socketHostname) && Objects.equals(this.winV, hostMeta.winV); } + @Override public int hashCode() { - return Objects.hash( - agentChecks, - agentVersion, - cpuCores, - fbsdV, - gohai, - installMethod, - macV, - machine, - nixV, - platform, - processor, - pythonV, - socketFqdn, - socketHostname, - winV); + return Objects.hash(agentChecks,agentVersion,cpuCores,fbsdV,gohai,installMethod,macV,machine,nixV,platform,processor,pythonV,socketFqdn,socketHostname,winV); } @Override @@ -508,7 +466,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMetaInstallMethod.java b/src/main/java/com/datadog/api/client/v1/model/HostMetaInstallMethod.java index a30253a13c5..4419fb82a84 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMetaInstallMethod.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMetaInstallMethod.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Agent install method. */ + +/** + *

Agent install method.

+ */ @JsonPropertyOrder({ HostMetaInstallMethod.JSON_PROPERTY_INSTALLER_VERSION, HostMetaInstallMethod.JSON_PROPERTY_TOOL, HostMetaInstallMethod.JSON_PROPERTY_TOOL_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMetaInstallMethod { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INSTALLER_VERSION = "installer_version"; private String installerVersion; @@ -37,64 +57,61 @@ public HostMetaInstallMethod installerVersion(String installerVersion) { } /** - * The installer version. - * + *

The installer version.

* @return installerVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INSTALLER_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInstallerVersion() { - return installerVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTALLER_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getInstallerVersion() { + return installerVersion; + } public void setInstallerVersion(String installerVersion) { this.installerVersion = installerVersion; } - public HostMetaInstallMethod tool(String tool) { this.tool = tool; return this; } /** - * Tool used to install the agent. - * + *

Tool used to install the agent.

* @return tool - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTool() { - return tool; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOOL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTool() { + return tool; + } public void setTool(String tool) { this.tool = tool; } - public HostMetaInstallMethod toolVersion(String toolVersion) { this.toolVersion = toolVersion; return this; } /** - * The tool version. - * + *

The tool version.

* @return toolVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOOL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getToolVersion() { - return toolVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOOL_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getToolVersion() { + return toolVersion; + } public void setToolVersion(String toolVersion) { this.toolVersion = toolVersion; } - /** Return true if this HostMetaInstallMethod object is equal to o. */ + /** + * Return true if this HostMetaInstallMethod object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } HostMetaInstallMethod hostMetaInstallMethod = (HostMetaInstallMethod) o; - return Objects.equals(this.installerVersion, hostMetaInstallMethod.installerVersion) - && Objects.equals(this.tool, hostMetaInstallMethod.tool) - && Objects.equals(this.toolVersion, hostMetaInstallMethod.toolVersion); + return Objects.equals(this.installerVersion, hostMetaInstallMethod.installerVersion) && Objects.equals(this.tool, hostMetaInstallMethod.tool) && Objects.equals(this.toolVersion, hostMetaInstallMethod.toolVersion); } + @Override public int hashCode() { - return Objects.hash(installerVersion, tool, toolVersion); + return Objects.hash(installerVersion,tool,toolVersion); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMetrics.java b/src/main/java/com/datadog/api/client/v1/model/HostMetrics.java index f60fd3561ca..aed807be32a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMetrics.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMetrics.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Host Metrics collected. */ + +/** + *

Host Metrics collected.

+ */ @JsonPropertyOrder({ HostMetrics.JSON_PROPERTY_CPU, HostMetrics.JSON_PROPERTY_IOWAIT, HostMetrics.JSON_PROPERTY_LOAD }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMetrics { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CPU = "cpu"; private Double cpu; @@ -37,64 +57,61 @@ public HostMetrics cpu(Double cpu) { } /** - * The percent of CPU used (everything but idle). - * + *

The percent of CPU used (everything but idle).

* @return cpu - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CPU) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCpu() { - return cpu; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CPU) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCpu() { + return cpu; + } public void setCpu(Double cpu) { this.cpu = cpu; } - public HostMetrics iowait(Double iowait) { this.iowait = iowait; return this; } /** - * The percent of CPU spent waiting on the IO (not reported for all platforms). - * + *

The percent of CPU spent waiting on the IO (not reported for all platforms).

* @return iowait - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOWAIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getIowait() { - return iowait; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOWAIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getIowait() { + return iowait; + } public void setIowait(Double iowait) { this.iowait = iowait; } - public HostMetrics load(Double load) { this.load = load; return this; } /** - * The system load over the last 15 minutes. - * + *

The system load over the last 15 minutes.

* @return load - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getLoad() { - return load; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOAD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getLoad() { + return load; + } public void setLoad(Double load) { this.load = load; } - /** Return true if this HostMetrics object is equal to o. */ + /** + * Return true if this HostMetrics object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } HostMetrics hostMetrics = (HostMetrics) o; - return Objects.equals(this.cpu, hostMetrics.cpu) - && Objects.equals(this.iowait, hostMetrics.iowait) - && Objects.equals(this.load, hostMetrics.load); + return Objects.equals(this.cpu, hostMetrics.cpu) && Objects.equals(this.iowait, hostMetrics.iowait) && Objects.equals(this.load, hostMetrics.load); } + @Override public int hashCode() { - return Objects.hash(cpu, iowait, load); + return Objects.hash(cpu,iowait,load); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMuteResponse.java b/src/main/java/com/datadog/api/client/v1/model/HostMuteResponse.java index aa6ba818b17..3e8fb181329 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMuteResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMuteResponse.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response with the list of muted host for your organization. */ + +/** + *

Response with the list of muted host for your organization.

+ */ @JsonPropertyOrder({ HostMuteResponse.JSON_PROPERTY_ACTION, HostMuteResponse.JSON_PROPERTY_END, HostMuteResponse.JSON_PROPERTY_HOSTNAME, HostMuteResponse.JSON_PROPERTY_MESSAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMuteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACTION = "action"; private String action; @@ -41,85 +61,80 @@ public HostMuteResponse action(String action) { } /** - * Action applied to the hosts. - * + *

Action applied to the hosts.

* @return action - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAction() { - return action; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAction() { + return action; + } public void setAction(String action) { this.action = action; } - public HostMuteResponse end(Long end) { this.end = end; return this; } /** - * POSIX timestamp in seconds when the host is unmuted. - * + *

POSIX timestamp in seconds when the host is unmuted.

* @return end - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEnd() { - return end; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } public void setEnd(Long end) { this.end = end; } - public HostMuteResponse hostname(String hostname) { this.hostname = hostname; return this; } /** - * The host name. - * + *

The host name.

* @return hostname - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOSTNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostname() { - return hostname; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostname() { + return hostname; + } public void setHostname(String hostname) { this.hostname = hostname; } - public HostMuteResponse message(String message) { this.message = message; return this; } /** - * Message associated with the mute. - * + *

Message associated with the mute.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this HostMuteResponse object is equal to o. */ + /** + * Return true if this HostMuteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -129,15 +144,13 @@ public boolean equals(Object o) { return false; } HostMuteResponse hostMuteResponse = (HostMuteResponse) o; - return Objects.equals(this.action, hostMuteResponse.action) - && Objects.equals(this.end, hostMuteResponse.end) - && Objects.equals(this.hostname, hostMuteResponse.hostname) - && Objects.equals(this.message, hostMuteResponse.message); + return Objects.equals(this.action, hostMuteResponse.action) && Objects.equals(this.end, hostMuteResponse.end) && Objects.equals(this.hostname, hostMuteResponse.hostname) && Objects.equals(this.message, hostMuteResponse.message); } + @Override public int hashCode() { - return Objects.hash(action, end, hostname, message); + return Objects.hash(action,end,hostname,message); } @Override @@ -153,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostMuteSettings.java b/src/main/java/com/datadog/api/client/v1/model/HostMuteSettings.java index aeb377cfc71..52cfe58b35a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostMuteSettings.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostMuteSettings.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Combination of settings to mute a host. */ + +/** + *

Combination of settings to mute a host.

+ */ @JsonPropertyOrder({ HostMuteSettings.JSON_PROPERTY_END, HostMuteSettings.JSON_PROPERTY_MESSAGE, HostMuteSettings.JSON_PROPERTY_OVERRIDE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostMuteSettings { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_END = "end"; private Long end; @@ -37,65 +57,61 @@ public HostMuteSettings end(Long end) { } /** - * POSIX timestamp in seconds when the host is unmuted. If omitted, the host remains muted until - * explicitly unmuted. - * + *

POSIX timestamp in seconds when the host is unmuted. If omitted, the host remains muted until explicitly unmuted.

* @return end - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEnd() { - return end; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } public void setEnd(Long end) { this.end = end; } - public HostMuteSettings message(String message) { this.message = message; return this; } /** - * Message to associate with the muting of this host. - * + *

Message to associate with the muting of this host.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public HostMuteSettings override(Boolean override) { this.override = override; return this; } /** - * If true and the host is already muted, replaces existing host mute settings. - * + *

If true and the host is already muted, replaces existing host mute settings.

* @return override - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERRIDE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getOverride() { - return override; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERRIDE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOverride() { + return override; + } public void setOverride(Boolean override) { this.override = override; } - /** Return true if this HostMuteSettings object is equal to o. */ + /** + * Return true if this HostMuteSettings object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -105,14 +121,13 @@ public boolean equals(Object o) { return false; } HostMuteSettings hostMuteSettings = (HostMuteSettings) o; - return Objects.equals(this.end, hostMuteSettings.end) - && Objects.equals(this.message, hostMuteSettings.message) - && Objects.equals(this.override, hostMuteSettings.override); + return Objects.equals(this.end, hostMuteSettings.end) && Objects.equals(this.message, hostMuteSettings.message) && Objects.equals(this.override, hostMuteSettings.override); } + @Override public int hashCode() { - return Objects.hash(end, message, override); + return Objects.hash(end,message,override); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostTags.java b/src/main/java/com/datadog/api/client/v1/model/HostTags.java index 904b0d2f382..66793391820 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostTags.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostTags.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Set of tags to associate with your host. */ -@JsonPropertyOrder({HostTags.JSON_PROPERTY_HOST, HostTags.JSON_PROPERTY_TAGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Set of tags to associate with your host.

+ */ +@JsonPropertyOrder({ + HostTags.JSON_PROPERTY_HOST, + HostTags.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostTags { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOST = "host"; private String host; @@ -32,26 +53,23 @@ public HostTags host(String host) { } /** - * Your host name. - * + *

Your host name.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public HostTags tags(List tags) { this.tags = tags; return this; } - public HostTags addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -61,22 +79,23 @@ public HostTags addTagsItem(String tagsItem) { } /** - * A list of tags to apply to the host. - * + *

A list of tags to apply to the host.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this HostTags object is equal to o. */ + /** + * Return true if this HostTags object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,9 +108,10 @@ public boolean equals(Object o) { return Objects.equals(this.host, hostTags.host) && Objects.equals(this.tags, hostTags.tags); } + @Override public int hashCode() { - return Objects.hash(host, tags); + return Objects.hash(host,tags); } @Override @@ -105,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HostTotals.java b/src/main/java/com/datadog/api/client/v1/model/HostTotals.java index 8f0a081c9ba..4901affc366 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HostTotals.java +++ b/src/main/java/com/datadog/api/client/v1/model/HostTotals.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Total number of host currently monitored by Datadog. */ -@JsonPropertyOrder({HostTotals.JSON_PROPERTY_TOTAL_ACTIVE, HostTotals.JSON_PROPERTY_TOTAL_UP}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Total number of host currently monitored by Datadog.

+ */ +@JsonPropertyOrder({ + HostTotals.JSON_PROPERTY_TOTAL_ACTIVE, + HostTotals.JSON_PROPERTY_TOTAL_UP +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostTotals { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_ACTIVE = "total_active"; private Long totalActive; @@ -30,43 +53,42 @@ public HostTotals totalActive(Long totalActive) { } /** - * Total number of active host (UP and ???) reporting to Datadog. - * + *

Total number of active host (UP and ???) reporting to Datadog.

* @return totalActive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_ACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalActive() { - return totalActive; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_ACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalActive() { + return totalActive; + } public void setTotalActive(Long totalActive) { this.totalActive = totalActive; } - public HostTotals totalUp(Long totalUp) { this.totalUp = totalUp; return this; } /** - * Number of host that are UP and reporting to Datadog. - * + *

Number of host that are UP and reporting to Datadog.

* @return totalUp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_UP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalUp() { - return totalUp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_UP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalUp() { + return totalUp; + } public void setTotalUp(Long totalUp) { this.totalUp = totalUp; } - /** Return true if this HostTotals object is equal to o. */ + /** + * Return true if this HostTotals object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,13 +98,13 @@ public boolean equals(Object o) { return false; } HostTotals hostTotals = (HostTotals) o; - return Objects.equals(this.totalActive, hostTotals.totalActive) - && Objects.equals(this.totalUp, hostTotals.totalUp); + return Objects.equals(this.totalActive, hostTotals.totalActive) && Objects.equals(this.totalUp, hostTotals.totalUp); } + @Override public int hashCode() { - return Objects.hash(totalActive, totalUp); + return Objects.hash(totalActive,totalUp); } @Override @@ -96,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionBody.java b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionBody.java index 738f9cea7a8..13d62dc4b51 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionBody.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The usage for one set of tags for one hour. */ +/** + *

The usage for one set of tags for one hour.

+ */ @JsonPropertyOrder({ HourlyUsageAttributionBody.JSON_PROPERTY_HOUR, HourlyUsageAttributionBody.JSON_PROPERTY_ORG_NAME, @@ -29,12 +43,11 @@ HourlyUsageAttributionBody.JSON_PROPERTY_UPDATED_AT, HourlyUsageAttributionBody.JSON_PROPERTY_USAGE_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageAttributionBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -65,92 +78,80 @@ public HourlyUsageAttributionBody hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public HourlyUsageAttributionBody orgName(String orgName) { this.orgName = orgName; return this; } /** - * The name of the organization. - * + *

The name of the organization.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public HourlyUsageAttributionBody publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public HourlyUsageAttributionBody tagConfigSource(String tagConfigSource) { this.tagConfigSource = tagConfigSource; return this; } /** - * The source of the usage attribution tag configuration and the selected tags in the format of - * - * <source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3> - * . - * + *

The source of the usage attribution tag configuration and the selected tags in the format of <source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3>.

* @return tagConfigSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_CONFIG_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagConfigSource() { - return tagConfigSource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONFIG_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagConfigSource() { + return tagConfigSource; + } public void setTagConfigSource(String tagConfigSource) { this.tagConfigSource = tagConfigSource; } - public HourlyUsageAttributionBody tags(Map> tags) { this.tags = tags; return this; } - public HourlyUsageAttributionBody putTagsItem(String key, List tagsItem) { if (this.tags == null) { this.tags = new HashMap<>(); @@ -160,70 +161,60 @@ public HourlyUsageAttributionBody putTagsItem(String key, List tagsItem) } /** - * Tag keys and values. - * - *

A null value here means that the requested tag breakdown cannot be applied - * because it does not match the tags - * configured for usage attribution. In this scenario the API returns the total usage, not - * broken down by tags. - * + *

Tag keys and values.

+ *

A null value here means that the requested tag breakdown cannot be applied because it does not match the tags + * configured for usage attribution. + * In this scenario the API returns the total usage, not broken down by tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getTags() { + return tags; + } public void setTags(Map> tags) { this.tags = tags; } - public HourlyUsageAttributionBody totalUsageSum(Double totalUsageSum) { this.totalUsageSum = totalUsageSum; return this; } /** - * Total product usage for the given tags within the hour. - * + *

Total product usage for the given tags within the hour.

* @return totalUsageSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_USAGE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTotalUsageSum() { - return totalUsageSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_USAGE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTotalUsageSum() { + return totalUsageSum; + } public void setTotalUsageSum(Double totalUsageSum) { this.totalUsageSum = totalUsageSum; } - public HourlyUsageAttributionBody updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Shows the most recent hour in the current month for all organizations where usages are - * calculated. - * + *

Shows the most recent hour in the current month for all organizations where usages are calculated.

* @return updatedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUpdatedAt() { - return updatedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } - public HourlyUsageAttributionBody usageType(HourlyUsageAttributionUsageType usageType) { this.usageType = usageType; this.unparsed |= !usageType.isValid(); @@ -231,25 +222,26 @@ public HourlyUsageAttributionBody usageType(HourlyUsageAttributionUsageType usag } /** - * Supported products for hourly usage attribution requests. - * + *

Supported products for hourly usage attribution requests.

* @return usageType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsageAttributionUsageType getUsageType() { - return usageType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsageAttributionUsageType getUsageType() { + return usageType; + } public void setUsageType(HourlyUsageAttributionUsageType usageType) { if (!usageType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.usageType = usageType; } - /** Return true if this HourlyUsageAttributionBody object is equal to o. */ + /** + * Return true if this HourlyUsageAttributionBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -259,20 +251,13 @@ public boolean equals(Object o) { return false; } HourlyUsageAttributionBody hourlyUsageAttributionBody = (HourlyUsageAttributionBody) o; - return Objects.equals(this.hour, hourlyUsageAttributionBody.hour) - && Objects.equals(this.orgName, hourlyUsageAttributionBody.orgName) - && Objects.equals(this.publicId, hourlyUsageAttributionBody.publicId) - && Objects.equals(this.tagConfigSource, hourlyUsageAttributionBody.tagConfigSource) - && Objects.equals(this.tags, hourlyUsageAttributionBody.tags) - && Objects.equals(this.totalUsageSum, hourlyUsageAttributionBody.totalUsageSum) - && Objects.equals(this.updatedAt, hourlyUsageAttributionBody.updatedAt) - && Objects.equals(this.usageType, hourlyUsageAttributionBody.usageType); + return Objects.equals(this.hour, hourlyUsageAttributionBody.hour) && Objects.equals(this.orgName, hourlyUsageAttributionBody.orgName) && Objects.equals(this.publicId, hourlyUsageAttributionBody.publicId) && Objects.equals(this.tagConfigSource, hourlyUsageAttributionBody.tagConfigSource) && Objects.equals(this.tags, hourlyUsageAttributionBody.tags) && Objects.equals(this.totalUsageSum, hourlyUsageAttributionBody.totalUsageSum) && Objects.equals(this.updatedAt, hourlyUsageAttributionBody.updatedAt) && Objects.equals(this.usageType, hourlyUsageAttributionBody.usageType); } + @Override public int hashCode() { - return Objects.hash( - hour, orgName, publicId, tagConfigSource, tags, totalUsageSum, updatedAt, usageType); + return Objects.hash(hour,orgName,publicId,tagConfigSource,tags,totalUsageSum,updatedAt,usageType); } @Override @@ -292,7 +277,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionMetadata.java b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionMetadata.java index 01021f44217..3e9df825e48 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionMetadata.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing document metadata. */ -@JsonPropertyOrder({HourlyUsageAttributionMetadata.JSON_PROPERTY_PAGINATION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing document metadata.

+ */ +@JsonPropertyOrder({ + HourlyUsageAttributionMetadata.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageAttributionMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGINATION = "pagination"; private HourlyUsageAttributionPagination pagination; @@ -28,22 +50,23 @@ public HourlyUsageAttributionMetadata pagination(HourlyUsageAttributionPaginatio } /** - * The metadata for the current pagination. - * + *

The metadata for the current pagination.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsageAttributionPagination getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsageAttributionPagination getPagination() { + return pagination; + } public void setPagination(HourlyUsageAttributionPagination pagination) { this.pagination = pagination; } - /** Return true if this HourlyUsageAttributionMetadata object is equal to o. */ + /** + * Return true if this HourlyUsageAttributionMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HourlyUsageAttributionMetadata hourlyUsageAttributionMetadata = - (HourlyUsageAttributionMetadata) o; + HourlyUsageAttributionMetadata hourlyUsageAttributionMetadata = (HourlyUsageAttributionMetadata) o; return Objects.equals(this.pagination, hourlyUsageAttributionMetadata.pagination); } + @Override public int hashCode() { return Objects.hash(pagination); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionPagination.java b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionPagination.java index 4bad1249e0b..f375f2e0c2b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionPagination.java +++ b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionPagination.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The metadata for the current pagination. */ -@JsonPropertyOrder({HourlyUsageAttributionPagination.JSON_PROPERTY_NEXT_RECORD_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata for the current pagination.

+ */ +@JsonPropertyOrder({ + HourlyUsageAttributionPagination.JSON_PROPERTY_NEXT_RECORD_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageAttributionPagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT_RECORD_ID = "next_record_id"; private JsonNullable nextRecordId = JsonNullable.undefined(); @@ -28,33 +49,30 @@ public HourlyUsageAttributionPagination nextRecordId(String nextRecordId) { } /** - * The cursor to get the next results (if any). To make the next request, use the same parameters - * and add next_record_id. - * + *

The cursor to get the next results (if any). To make the next request, use the same parameters and add next_record_id.

* @return nextRecordId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getNextRecordId() { - return nextRecordId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextRecordId() { + return nextRecordId.orElse(null); + } @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNextRecordId_JsonNullable() { return nextRecordId; } - - @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { + @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID)public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { this.nextRecordId = nextRecordId; } - public void setNextRecordId(String nextRecordId) { this.nextRecordId = JsonNullable.of(nextRecordId); } - /** Return true if this HourlyUsageAttributionPagination object is equal to o. */ + /** + * Return true if this HourlyUsageAttributionPagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +81,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HourlyUsageAttributionPagination hourlyUsageAttributionPagination = - (HourlyUsageAttributionPagination) o; + HourlyUsageAttributionPagination hourlyUsageAttributionPagination = (HourlyUsageAttributionPagination) o; return Objects.equals(this.nextRecordId, hourlyUsageAttributionPagination.nextRecordId); } + @Override public int hashCode() { return Objects.hash(nextRecordId); @@ -83,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionResponse.java b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionResponse.java index b83468ea2c2..272599da8ea 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the hourly usage attribution by tag(s). */ +/** + *

Response containing the hourly usage attribution by tag(s).

+ */ @JsonPropertyOrder({ HourlyUsageAttributionResponse.JSON_PROPERTY_METADATA, HourlyUsageAttributionResponse.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageAttributionResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METADATA = "metadata"; private HourlyUsageAttributionMetadata metadata; @@ -36,21 +54,19 @@ public HourlyUsageAttributionResponse metadata(HourlyUsageAttributionMetadata me } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsageAttributionMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsageAttributionMetadata getMetadata() { + return metadata; + } public void setMetadata(HourlyUsageAttributionMetadata metadata) { this.metadata = metadata; } - public HourlyUsageAttributionResponse usage(List usage) { this.usage = usage; for (HourlyUsageAttributionBody item : usage) { @@ -58,7 +74,6 @@ public HourlyUsageAttributionResponse usage(List usa } return this; } - public HourlyUsageAttributionResponse addUsageItem(HourlyUsageAttributionBody usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -69,22 +84,23 @@ public HourlyUsageAttributionResponse addUsageItem(HourlyUsageAttributionBody us } /** - * Get the hourly usage attribution by tag(s). - * + *

Get the hourly usage attribution by tag(s).

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this HourlyUsageAttributionResponse object is equal to o. */ + /** + * Return true if this HourlyUsageAttributionResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - HourlyUsageAttributionResponse hourlyUsageAttributionResponse = - (HourlyUsageAttributionResponse) o; - return Objects.equals(this.metadata, hourlyUsageAttributionResponse.metadata) - && Objects.equals(this.usage, hourlyUsageAttributionResponse.usage); + HourlyUsageAttributionResponse hourlyUsageAttributionResponse = (HourlyUsageAttributionResponse) o; + return Objects.equals(this.metadata, hourlyUsageAttributionResponse.metadata) && Objects.equals(this.usage, hourlyUsageAttributionResponse.usage); } + @Override public int hashCode() { - return Objects.hash(metadata, usage); + return Objects.hash(metadata,usage); } @Override @@ -115,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java index c994ea13f9d..52f037c3251 100644 --- a/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java +++ b/src/main/java/com/datadog/api/client/v1/model/HourlyUsageAttributionUsageType.java @@ -6,115 +6,78 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Supported products for hourly usage attribution requests. */ -@JsonSerialize( - using = HourlyUsageAttributionUsageType.HourlyUsageAttributionUsageTypeSerializer.class) +/** + *

Supported products for hourly usage attribution requests.

+ */ +@JsonSerialize(using = HourlyUsageAttributionUsageType.HourlyUsageAttributionUsageTypeSerializer.class) public class HourlyUsageAttributionUsageType { - public static final HourlyUsageAttributionUsageType API_USAGE = - new HourlyUsageAttributionUsageType("api_usage"); - public static final HourlyUsageAttributionUsageType APM_FARGATE_USAGE = - new HourlyUsageAttributionUsageType("apm_fargate_usage"); - public static final HourlyUsageAttributionUsageType APM_HOST_USAGE = - new HourlyUsageAttributionUsageType("apm_host_usage"); - public static final HourlyUsageAttributionUsageType APPSEC_FARGATE_USAGE = - new HourlyUsageAttributionUsageType("appsec_fargate_usage"); - public static final HourlyUsageAttributionUsageType APPSEC_USAGE = - new HourlyUsageAttributionUsageType("appsec_usage"); - public static final HourlyUsageAttributionUsageType BROWSER_USAGE = - new HourlyUsageAttributionUsageType("browser_usage"); - public static final HourlyUsageAttributionUsageType CONTAINER_EXCL_AGENT_USAGE = - new HourlyUsageAttributionUsageType("container_excl_agent_usage"); - public static final HourlyUsageAttributionUsageType CONTAINER_USAGE = - new HourlyUsageAttributionUsageType("container_usage"); - public static final HourlyUsageAttributionUsageType CSPM_CONTAINERS_USAGE = - new HourlyUsageAttributionUsageType("cspm_containers_usage"); - public static final HourlyUsageAttributionUsageType CSPM_HOSTS_USAGE = - new HourlyUsageAttributionUsageType("cspm_hosts_usage"); - public static final HourlyUsageAttributionUsageType CUSTOM_TIMESERIES_USAGE = - new HourlyUsageAttributionUsageType("custom_timeseries_usage"); - public static final HourlyUsageAttributionUsageType CWS_CONTAINERS_USAGE = - new HourlyUsageAttributionUsageType("cws_containers_usage"); - public static final HourlyUsageAttributionUsageType CWS_HOSTS_USAGE = - new HourlyUsageAttributionUsageType("cws_hosts_usage"); - public static final HourlyUsageAttributionUsageType DBM_HOSTS_USAGE = - new HourlyUsageAttributionUsageType("dbm_hosts_usage"); - public static final HourlyUsageAttributionUsageType DBM_QUERIES_USAGE = - new HourlyUsageAttributionUsageType("dbm_queries_usage"); - public static final HourlyUsageAttributionUsageType ESTIMATED_INDEXED_LOGS_USAGE = - new HourlyUsageAttributionUsageType("estimated_indexed_logs_usage"); - public static final HourlyUsageAttributionUsageType ESTIMATED_INGESTED_LOGS_USAGE = - new HourlyUsageAttributionUsageType("estimated_ingested_logs_usage"); - public static final HourlyUsageAttributionUsageType ESTIMATED_INDEXED_SPANS_USAGE = - new HourlyUsageAttributionUsageType("estimated_indexed_spans_usage"); - public static final HourlyUsageAttributionUsageType ESTIMATED_INGESTED_SPANS_USAGE = - new HourlyUsageAttributionUsageType("estimated_ingested_spans_usage"); - public static final HourlyUsageAttributionUsageType FARGATE_USAGE = - new HourlyUsageAttributionUsageType("fargate_usage"); - public static final HourlyUsageAttributionUsageType FUNCTIONS_USAGE = - new HourlyUsageAttributionUsageType("functions_usage"); - public static final HourlyUsageAttributionUsageType INFRA_HOST_USAGE = - new HourlyUsageAttributionUsageType("infra_host_usage"); - public static final HourlyUsageAttributionUsageType INVOCATIONS_USAGE = - new HourlyUsageAttributionUsageType("invocations_usage"); - public static final HourlyUsageAttributionUsageType NPM_HOST_USAGE = - new HourlyUsageAttributionUsageType("npm_host_usage"); - public static final HourlyUsageAttributionUsageType PROFILED_CONTAINER_USAGE = - new HourlyUsageAttributionUsageType("profiled_container_usage"); - public static final HourlyUsageAttributionUsageType PROFILED_FARGATE_USAGE = - new HourlyUsageAttributionUsageType("profiled_fargate_usage"); - public static final HourlyUsageAttributionUsageType PROFILED_HOST_USAGE = - new HourlyUsageAttributionUsageType("profiled_host_usage"); - public static final HourlyUsageAttributionUsageType SNMP_USAGE = - new HourlyUsageAttributionUsageType("snmp_usage"); - public static final HourlyUsageAttributionUsageType ESTIMATED_RUM_SESSIONS_USAGE = - new HourlyUsageAttributionUsageType("estimated_rum_sessions_usage"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "api_usage", - "apm_fargate_usage", - "apm_host_usage", - "appsec_fargate_usage", - "appsec_usage", - "browser_usage", - "container_excl_agent_usage", - "container_usage", - "cspm_containers_usage", - "cspm_hosts_usage", - "custom_timeseries_usage", - "cws_containers_usage", - "cws_hosts_usage", - "dbm_hosts_usage", - "dbm_queries_usage", - "estimated_indexed_logs_usage", - "estimated_ingested_logs_usage", - "estimated_indexed_spans_usage", - "estimated_ingested_spans_usage", - "fargate_usage", - "functions_usage", - "infra_host_usage", - "invocations_usage", - "npm_host_usage", - "profiled_container_usage", - "profiled_fargate_usage", - "profiled_host_usage", - "snmp_usage", - "estimated_rum_sessions_usage")); + public static final HourlyUsageAttributionUsageType API_USAGE = new HourlyUsageAttributionUsageType("api_usage"); + public static final HourlyUsageAttributionUsageType APM_FARGATE_USAGE = new HourlyUsageAttributionUsageType("apm_fargate_usage"); + public static final HourlyUsageAttributionUsageType APM_HOST_USAGE = new HourlyUsageAttributionUsageType("apm_host_usage"); + public static final HourlyUsageAttributionUsageType APPSEC_FARGATE_USAGE = new HourlyUsageAttributionUsageType("appsec_fargate_usage"); + public static final HourlyUsageAttributionUsageType APPSEC_USAGE = new HourlyUsageAttributionUsageType("appsec_usage"); + public static final HourlyUsageAttributionUsageType BROWSER_USAGE = new HourlyUsageAttributionUsageType("browser_usage"); + public static final HourlyUsageAttributionUsageType CONTAINER_EXCL_AGENT_USAGE = new HourlyUsageAttributionUsageType("container_excl_agent_usage"); + public static final HourlyUsageAttributionUsageType CONTAINER_USAGE = new HourlyUsageAttributionUsageType("container_usage"); + public static final HourlyUsageAttributionUsageType CSPM_CONTAINERS_USAGE = new HourlyUsageAttributionUsageType("cspm_containers_usage"); + public static final HourlyUsageAttributionUsageType CSPM_HOSTS_USAGE = new HourlyUsageAttributionUsageType("cspm_hosts_usage"); + public static final HourlyUsageAttributionUsageType CUSTOM_TIMESERIES_USAGE = new HourlyUsageAttributionUsageType("custom_timeseries_usage"); + public static final HourlyUsageAttributionUsageType CWS_CONTAINERS_USAGE = new HourlyUsageAttributionUsageType("cws_containers_usage"); + public static final HourlyUsageAttributionUsageType CWS_HOSTS_USAGE = new HourlyUsageAttributionUsageType("cws_hosts_usage"); + public static final HourlyUsageAttributionUsageType DBM_HOSTS_USAGE = new HourlyUsageAttributionUsageType("dbm_hosts_usage"); + public static final HourlyUsageAttributionUsageType DBM_QUERIES_USAGE = new HourlyUsageAttributionUsageType("dbm_queries_usage"); + public static final HourlyUsageAttributionUsageType ESTIMATED_INDEXED_LOGS_USAGE = new HourlyUsageAttributionUsageType("estimated_indexed_logs_usage"); + public static final HourlyUsageAttributionUsageType ESTIMATED_INGESTED_LOGS_USAGE = new HourlyUsageAttributionUsageType("estimated_ingested_logs_usage"); + public static final HourlyUsageAttributionUsageType ESTIMATED_INDEXED_SPANS_USAGE = new HourlyUsageAttributionUsageType("estimated_indexed_spans_usage"); + public static final HourlyUsageAttributionUsageType ESTIMATED_INGESTED_SPANS_USAGE = new HourlyUsageAttributionUsageType("estimated_ingested_spans_usage"); + public static final HourlyUsageAttributionUsageType FARGATE_USAGE = new HourlyUsageAttributionUsageType("fargate_usage"); + public static final HourlyUsageAttributionUsageType FUNCTIONS_USAGE = new HourlyUsageAttributionUsageType("functions_usage"); + public static final HourlyUsageAttributionUsageType INFRA_HOST_USAGE = new HourlyUsageAttributionUsageType("infra_host_usage"); + public static final HourlyUsageAttributionUsageType INVOCATIONS_USAGE = new HourlyUsageAttributionUsageType("invocations_usage"); + public static final HourlyUsageAttributionUsageType NPM_HOST_USAGE = new HourlyUsageAttributionUsageType("npm_host_usage"); + public static final HourlyUsageAttributionUsageType PROFILED_CONTAINER_USAGE = new HourlyUsageAttributionUsageType("profiled_container_usage"); + public static final HourlyUsageAttributionUsageType PROFILED_FARGATE_USAGE = new HourlyUsageAttributionUsageType("profiled_fargate_usage"); + public static final HourlyUsageAttributionUsageType PROFILED_HOST_USAGE = new HourlyUsageAttributionUsageType("profiled_host_usage"); + public static final HourlyUsageAttributionUsageType SNMP_USAGE = new HourlyUsageAttributionUsageType("snmp_usage"); + public static final HourlyUsageAttributionUsageType ESTIMATED_RUM_SESSIONS_USAGE = new HourlyUsageAttributionUsageType("estimated_rum_sessions_usage"); + + private static final Set allowedValues = new HashSet(Arrays.asList("api_usage", "apm_fargate_usage", "apm_host_usage", "appsec_fargate_usage", "appsec_usage", "browser_usage", "container_excl_agent_usage", "container_usage", "cspm_containers_usage", "cspm_hosts_usage", "custom_timeseries_usage", "cws_containers_usage", "cws_hosts_usage", "dbm_hosts_usage", "dbm_queries_usage", "estimated_indexed_logs_usage", "estimated_ingested_logs_usage", "estimated_indexed_spans_usage", "estimated_ingested_spans_usage", "fargate_usage", "functions_usage", "infra_host_usage", "invocations_usage", "npm_host_usage", "profiled_container_usage", "profiled_fargate_usage", "profiled_host_usage", "snmp_usage", "estimated_rum_sessions_usage")); private String value; @@ -126,22 +89,19 @@ public boolean isValid() { this.value = value; } - public static class HourlyUsageAttributionUsageTypeSerializer - extends StdSerializer { - public HourlyUsageAttributionUsageTypeSerializer(Class t) { - super(t); - } + public static class HourlyUsageAttributionUsageTypeSerializer extends StdSerializer { + public HourlyUsageAttributionUsageTypeSerializer(Class t) { + super(t); + } - public HourlyUsageAttributionUsageTypeSerializer() { - this(null); - } + public HourlyUsageAttributionUsageTypeSerializer() { + this(null); + } - @Override - public void serialize( - HourlyUsageAttributionUsageType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(HourlyUsageAttributionUsageType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -153,7 +113,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this HourlyUsageAttributionUsageType object is equal to o. */ + /** + * Return true if this HourlyUsageAttributionUsageType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -167,7 +129,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinition.java index 39a28754844..7cd9c5a9f0b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinition.java @@ -6,25 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The iframe widget allows you to embed a portion of any other web page on your dashboard. Only - * available on FREE layout dashboards. + *

The iframe widget allows you to embed a portion of any other web page on your dashboard. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ IFrameWidgetDefinition.JSON_PROPERTY_TYPE, IFrameWidgetDefinition.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IFrameWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private IFrameWidgetDefinitionType type = IFrameWidgetDefinitionType.IFRAME; @@ -35,13 +51,12 @@ public IFrameWidgetDefinition() {} @JsonCreator public IFrameWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IFrameWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.type = type; - this.unparsed |= !type.isValid(); - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IFrameWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.type = type; + this.unparsed |= !type.isValid(); + this.url = url; } - public IFrameWidgetDefinition type(IFrameWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -49,44 +64,43 @@ public IFrameWidgetDefinition type(IFrameWidgetDefinitionType type) { } /** - * Type of the iframe widget. - * + *

Type of the iframe widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IFrameWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IFrameWidgetDefinitionType getType() { + return type; + } public void setType(IFrameWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public IFrameWidgetDefinition url(String url) { this.url = url; return this; } /** - * URL of the iframe. - * + *

URL of the iframe.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this IFrameWidgetDefinition object is equal to o. */ + /** + * Return true if this IFrameWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +110,13 @@ public boolean equals(Object o) { return false; } IFrameWidgetDefinition iFrameWidgetDefinition = (IFrameWidgetDefinition) o; - return Objects.equals(this.type, iFrameWidgetDefinition.type) - && Objects.equals(this.url, iFrameWidgetDefinition.url); + return Objects.equals(this.type, iFrameWidgetDefinition.type) && Objects.equals(this.url, iFrameWidgetDefinition.url); } + @Override public int hashCode() { - return Objects.hash(type, url); + return Objects.hash(type,url); } @Override @@ -116,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinitionType.java index 6e87ba37152..259a0945fd4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/IFrameWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the iframe widget. */ +/** + *

Type of the iframe widget.

+ */ @JsonSerialize(using = IFrameWidgetDefinitionType.IFrameWidgetDefinitionTypeSerializer.class) public class IFrameWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IFrameWidgetDefinitionTypeSerializer - extends StdSerializer { - public IFrameWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class IFrameWidgetDefinitionTypeSerializer extends StdSerializer { + public IFrameWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public IFrameWidgetDefinitionTypeSerializer() { - this(null); - } + public IFrameWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - IFrameWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IFrameWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IFrameWidgetDefinitionType object is equal to o. */ + /** + * Return true if this IFrameWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPI.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPI.java index a91c35c72fe..03da688c7c6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPI.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPI.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the API endpoints. */ +/** + *

Available prefix information for the API endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesAPI.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesAPI.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesAPI { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesAPI prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesAPI addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesAPI addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesAPI prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesAPI addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesAPI addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesAPI object is equal to o. */ + /** + * Return true if this IPPrefixesAPI object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesAPI ipPrefixesApi = (IPPrefixesAPI) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesApi.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesApi.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesApi.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesApi.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPM.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPM.java index 9ad8cc8e3e7..8003385e74b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPM.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAPM.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the APM endpoints. */ +/** + *

Available prefix information for the APM endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesAPM.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesAPM.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesAPM { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesAPM prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesAPM addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesAPM addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesAPM prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesAPM addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesAPM addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesAPM object is equal to o. */ + /** + * Return true if this IPPrefixesAPM object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesAPM ipPrefixesApm = (IPPrefixesAPM) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesApm.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesApm.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesApm.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesApm.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAgents.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAgents.java index b7bedd0de5e..97fab1e5378 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAgents.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesAgents.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the Agent endpoints. */ +/** + *

Available prefix information for the Agent endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesAgents.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesAgents.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesAgents { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesAgents prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesAgents addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesAgents addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesAgents prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesAgents addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesAgents addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesAgents object is equal to o. */ + /** + * Return true if this IPPrefixesAgents object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesAgents ipPrefixesAgents = (IPPrefixesAgents) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesAgents.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesAgents.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesAgents.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesAgents.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesLogs.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesLogs.java index b97c2c2d9f3..c705bddec04 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesLogs.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesLogs.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the Logs endpoints. */ +/** + *

Available prefix information for the Logs endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesLogs.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesLogs.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesLogs { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesLogs prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesLogs addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesLogs addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesLogs prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesLogs addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesLogs addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesLogs object is equal to o. */ + /** + * Return true if this IPPrefixesLogs object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesLogs ipPrefixesLogs = (IPPrefixesLogs) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesLogs.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesLogs.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesLogs.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesLogs.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesOrchestrator.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesOrchestrator.java index 1cf4be4cda1..b301a869e8e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesOrchestrator.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesOrchestrator.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the Orchestrator endpoints. */ +/** + *

Available prefix information for the Orchestrator endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesOrchestrator.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesOrchestrator.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesOrchestrator { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesOrchestrator prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesOrchestrator addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesOrchestrator addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesOrchestrator prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesOrchestrator addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesOrchestrator addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesOrchestrator object is equal to o. */ + /** + * Return true if this IPPrefixesOrchestrator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesOrchestrator ipPrefixesOrchestrator = (IPPrefixesOrchestrator) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesOrchestrator.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesOrchestrator.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesOrchestrator.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesOrchestrator.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesProcess.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesProcess.java index 83f451c01c4..652dc8b081c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesProcess.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesProcess.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the Process endpoints. */ +/** + *

Available prefix information for the Process endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesProcess.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesProcess.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesProcess { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesProcess prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesProcess addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesProcess addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesProcess prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesProcess addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesProcess addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesProcess object is equal to o. */ + /** + * Return true if this IPPrefixesProcess object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesProcess ipPrefixesProcess = (IPPrefixesProcess) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesProcess.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesProcess.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesProcess.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesProcess.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSynthetics.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSynthetics.java index 9a8cb16175a..a84670a68eb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSynthetics.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSynthetics.java @@ -6,27 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Available prefix information for the Synthetics endpoints. */ + +/** + *

Available prefix information for the Synthetics endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesSynthetics.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesSynthetics.JSON_PROPERTY_PREFIXES_IPV4_BY_LOCATION, IPPrefixesSynthetics.JSON_PROPERTY_PREFIXES_IPV6, IPPrefixesSynthetics.JSON_PROPERTY_PREFIXES_IPV6_BY_LOCATION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesSynthetics { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -43,7 +59,6 @@ public IPPrefixesSynthetics prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesSynthetics addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -53,29 +68,24 @@ public IPPrefixesSynthetics addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - - public IPPrefixesSynthetics prefixesIpv4ByLocation( - Map> prefixesIpv4ByLocation) { + public IPPrefixesSynthetics prefixesIpv4ByLocation(Map> prefixesIpv4ByLocation) { this.prefixesIpv4ByLocation = prefixesIpv4ByLocation; return this; } - - public IPPrefixesSynthetics putPrefixesIpv4ByLocationItem( - String key, List prefixesIpv4ByLocationItem) { + public IPPrefixesSynthetics putPrefixesIpv4ByLocationItem(String key, List prefixesIpv4ByLocationItem) { if (this.prefixesIpv4ByLocation == null) { this.prefixesIpv4ByLocation = new HashMap<>(); } @@ -84,26 +94,23 @@ public IPPrefixesSynthetics putPrefixesIpv4ByLocationItem( } /** - * List of IPv4 prefixes by location. - * + *

List of IPv4 prefixes by location.

* @return prefixesIpv4ByLocation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4_BY_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getPrefixesIpv4ByLocation() { - return prefixesIpv4ByLocation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4_BY_LOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getPrefixesIpv4ByLocation() { + return prefixesIpv4ByLocation; + } public void setPrefixesIpv4ByLocation(Map> prefixesIpv4ByLocation) { this.prefixesIpv4ByLocation = prefixesIpv4ByLocation; } - public IPPrefixesSynthetics prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesSynthetics addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -113,29 +120,24 @@ public IPPrefixesSynthetics addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - - public IPPrefixesSynthetics prefixesIpv6ByLocation( - Map> prefixesIpv6ByLocation) { + public IPPrefixesSynthetics prefixesIpv6ByLocation(Map> prefixesIpv6ByLocation) { this.prefixesIpv6ByLocation = prefixesIpv6ByLocation; return this; } - - public IPPrefixesSynthetics putPrefixesIpv6ByLocationItem( - String key, List prefixesIpv6ByLocationItem) { + public IPPrefixesSynthetics putPrefixesIpv6ByLocationItem(String key, List prefixesIpv6ByLocationItem) { if (this.prefixesIpv6ByLocation == null) { this.prefixesIpv6ByLocation = new HashMap<>(); } @@ -144,22 +146,23 @@ public IPPrefixesSynthetics putPrefixesIpv6ByLocationItem( } /** - * List of IPv6 prefixes by location. - * + *

List of IPv6 prefixes by location.

* @return prefixesIpv6ByLocation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6_BY_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getPrefixesIpv6ByLocation() { - return prefixesIpv6ByLocation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6_BY_LOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getPrefixesIpv6ByLocation() { + return prefixesIpv6ByLocation; + } public void setPrefixesIpv6ByLocation(Map> prefixesIpv6ByLocation) { this.prefixesIpv6ByLocation = prefixesIpv6ByLocation; } - /** Return true if this IPPrefixesSynthetics object is equal to o. */ + /** + * Return true if this IPPrefixesSynthetics object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -169,15 +172,13 @@ public boolean equals(Object o) { return false; } IPPrefixesSynthetics ipPrefixesSynthetics = (IPPrefixesSynthetics) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesSynthetics.prefixesIpv4) - && Objects.equals(this.prefixesIpv4ByLocation, ipPrefixesSynthetics.prefixesIpv4ByLocation) - && Objects.equals(this.prefixesIpv6, ipPrefixesSynthetics.prefixesIpv6) - && Objects.equals(this.prefixesIpv6ByLocation, ipPrefixesSynthetics.prefixesIpv6ByLocation); + return Objects.equals(this.prefixesIpv4, ipPrefixesSynthetics.prefixesIpv4) && Objects.equals(this.prefixesIpv4ByLocation, ipPrefixesSynthetics.prefixesIpv4ByLocation) && Objects.equals(this.prefixesIpv6, ipPrefixesSynthetics.prefixesIpv6) && Objects.equals(this.prefixesIpv6ByLocation, ipPrefixesSynthetics.prefixesIpv6ByLocation); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv4ByLocation, prefixesIpv6, prefixesIpv6ByLocation); + return Objects.hash(prefixesIpv4,prefixesIpv4ByLocation,prefixesIpv6,prefixesIpv6ByLocation); } @Override @@ -185,19 +186,16 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IPPrefixesSynthetics {\n"); sb.append(" prefixesIpv4: ").append(toIndentedString(prefixesIpv4)).append("\n"); - sb.append(" prefixesIpv4ByLocation: ") - .append(toIndentedString(prefixesIpv4ByLocation)) - .append("\n"); + sb.append(" prefixesIpv4ByLocation: ").append(toIndentedString(prefixesIpv4ByLocation)).append("\n"); sb.append(" prefixesIpv6: ").append(toIndentedString(prefixesIpv6)).append("\n"); - sb.append(" prefixesIpv6ByLocation: ") - .append(toIndentedString(prefixesIpv6ByLocation)) - .append("\n"); + sb.append(" prefixesIpv6ByLocation: ").append(toIndentedString(prefixesIpv6ByLocation)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSyntheticsPrivateLocations.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSyntheticsPrivateLocations.java index b06ed04ecd3..5704cf166ff 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSyntheticsPrivateLocations.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesSyntheticsPrivateLocations.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the Synthetics Private Locations endpoints. */ +/** + *

Available prefix information for the Synthetics Private Locations endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesSyntheticsPrivateLocations.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesSyntheticsPrivateLocations.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesSyntheticsPrivateLocations { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesSyntheticsPrivateLocations prefixesIpv4(List prefixesIp this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesSyntheticsPrivateLocations addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesSyntheticsPrivateLocations addPrefixesIpv4Item(String prefixesI } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesSyntheticsPrivateLocations prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesSyntheticsPrivateLocations addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesSyntheticsPrivateLocations addPrefixesIpv6Item(String prefixesI } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesSyntheticsPrivateLocations object is equal to o. */ + /** + * Return true if this IPPrefixesSyntheticsPrivateLocations object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IPPrefixesSyntheticsPrivateLocations ipPrefixesSyntheticsPrivateLocations = - (IPPrefixesSyntheticsPrivateLocations) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesSyntheticsPrivateLocations.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesSyntheticsPrivateLocations.prefixesIpv6); + IPPrefixesSyntheticsPrivateLocations ipPrefixesSyntheticsPrivateLocations = (IPPrefixesSyntheticsPrivateLocations) o; + return Objects.equals(this.prefixesIpv4, ipPrefixesSyntheticsPrivateLocations.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesSyntheticsPrivateLocations.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesWebhooks.java b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesWebhooks.java index da6baf42330..5e3e7eb8622 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPPrefixesWebhooks.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPPrefixesWebhooks.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Available prefix information for the Webhook endpoints. */ +/** + *

Available prefix information for the Webhook endpoints.

+ */ @JsonPropertyOrder({ IPPrefixesWebhooks.JSON_PROPERTY_PREFIXES_IPV4, IPPrefixesWebhooks.JSON_PROPERTY_PREFIXES_IPV6 }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPPrefixesWebhooks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PREFIXES_IPV4 = "prefixes_ipv4"; private List prefixesIpv4 = null; @@ -33,7 +51,6 @@ public IPPrefixesWebhooks prefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; return this; } - public IPPrefixesWebhooks addPrefixesIpv4Item(String prefixesIpv4Item) { if (this.prefixesIpv4 == null) { this.prefixesIpv4 = new ArrayList<>(); @@ -43,26 +60,23 @@ public IPPrefixesWebhooks addPrefixesIpv4Item(String prefixesIpv4Item) { } /** - * List of IPv4 prefixes. - * + *

List of IPv4 prefixes.

* @return prefixesIpv4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv4() { - return prefixesIpv4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv4() { + return prefixesIpv4; + } public void setPrefixesIpv4(List prefixesIpv4) { this.prefixesIpv4 = prefixesIpv4; } - public IPPrefixesWebhooks prefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; return this; } - public IPPrefixesWebhooks addPrefixesIpv6Item(String prefixesIpv6Item) { if (this.prefixesIpv6 == null) { this.prefixesIpv6 = new ArrayList<>(); @@ -72,22 +86,23 @@ public IPPrefixesWebhooks addPrefixesIpv6Item(String prefixesIpv6Item) { } /** - * List of IPv6 prefixes. - * + *

List of IPv6 prefixes.

* @return prefixesIpv6 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrefixesIpv6() { - return prefixesIpv6; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIXES_IPV6) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPrefixesIpv6() { + return prefixesIpv6; + } public void setPrefixesIpv6(List prefixesIpv6) { this.prefixesIpv6 = prefixesIpv6; } - /** Return true if this IPPrefixesWebhooks object is equal to o. */ + /** + * Return true if this IPPrefixesWebhooks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } IPPrefixesWebhooks ipPrefixesWebhooks = (IPPrefixesWebhooks) o; - return Objects.equals(this.prefixesIpv4, ipPrefixesWebhooks.prefixesIpv4) - && Objects.equals(this.prefixesIpv6, ipPrefixesWebhooks.prefixesIpv6); + return Objects.equals(this.prefixesIpv4, ipPrefixesWebhooks.prefixesIpv4) && Objects.equals(this.prefixesIpv6, ipPrefixesWebhooks.prefixesIpv6); } + @Override public int hashCode() { - return Objects.hash(prefixesIpv4, prefixesIpv6); + return Objects.hash(prefixesIpv4,prefixesIpv6); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IPRanges.java b/src/main/java/com/datadog/api/client/v1/model/IPRanges.java index 8620bac3e66..42db1372deb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IPRanges.java +++ b/src/main/java/com/datadog/api/client/v1/model/IPRanges.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** IP ranges. */ +/** + *

IP ranges.

+ */ @JsonPropertyOrder({ IPRanges.JSON_PROPERTY_AGENTS, IPRanges.JSON_PROPERTY_API, @@ -26,10 +46,10 @@ IPRanges.JSON_PROPERTY_VERSION, IPRanges.JSON_PROPERTY_WEBHOOKS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPRanges { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGENTS = "agents"; private IPPrefixesAgents agents; @@ -54,8 +74,7 @@ public class IPRanges { public static final String JSON_PROPERTY_SYNTHETICS = "synthetics"; private IPPrefixesSynthetics synthetics; - public static final String JSON_PROPERTY_SYNTHETICS_PRIVATE_LOCATIONS = - "synthetics-private-locations"; + public static final String JSON_PROPERTY_SYNTHETICS_PRIVATE_LOCATIONS = "synthetics-private-locations"; private IPPrefixesSyntheticsPrivateLocations syntheticsPrivateLocations; public static final String JSON_PROPERTY_VERSION = "version"; @@ -71,21 +90,19 @@ public IPRanges agents(IPPrefixesAgents agents) { } /** - * Available prefix information for the Agent endpoints. - * + *

Available prefix information for the Agent endpoints.

* @return agents - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesAgents getAgents() { - return agents; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesAgents getAgents() { + return agents; + } public void setAgents(IPPrefixesAgents agents) { this.agents = agents; } - public IPRanges api(IPPrefixesAPI api) { this.api = api; this.unparsed |= api.unparsed; @@ -93,21 +110,19 @@ public IPRanges api(IPPrefixesAPI api) { } /** - * Available prefix information for the API endpoints. - * + *

Available prefix information for the API endpoints.

* @return api - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesAPI getApi() { - return api; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesAPI getApi() { + return api; + } public void setApi(IPPrefixesAPI api) { this.api = api; } - public IPRanges apm(IPPrefixesAPM apm) { this.apm = apm; this.unparsed |= apm.unparsed; @@ -115,21 +130,19 @@ public IPRanges apm(IPPrefixesAPM apm) { } /** - * Available prefix information for the APM endpoints. - * + *

Available prefix information for the APM endpoints.

* @return apm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesAPM getApm() { - return apm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesAPM getApm() { + return apm; + } public void setApm(IPPrefixesAPM apm) { this.apm = apm; } - public IPRanges logs(IPPrefixesLogs logs) { this.logs = logs; this.unparsed |= logs.unparsed; @@ -137,42 +150,38 @@ public IPRanges logs(IPPrefixesLogs logs) { } /** - * Available prefix information for the Logs endpoints. - * + *

Available prefix information for the Logs endpoints.

* @return logs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesLogs getLogs() { - return logs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesLogs getLogs() { + return logs; + } public void setLogs(IPPrefixesLogs logs) { this.logs = logs; } - public IPRanges modified(String modified) { this.modified = modified; return this; } /** - * Date when last updated, in the form YYYY-MM-DD-hh-mm-ss. - * + *

Date when last updated, in the form YYYY-MM-DD-hh-mm-ss.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getModified() { + return modified; + } public void setModified(String modified) { this.modified = modified; } - public IPRanges orchestrator(IPPrefixesOrchestrator orchestrator) { this.orchestrator = orchestrator; this.unparsed |= orchestrator.unparsed; @@ -180,21 +189,19 @@ public IPRanges orchestrator(IPPrefixesOrchestrator orchestrator) { } /** - * Available prefix information for the Orchestrator endpoints. - * + *

Available prefix information for the Orchestrator endpoints.

* @return orchestrator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORCHESTRATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesOrchestrator getOrchestrator() { - return orchestrator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORCHESTRATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesOrchestrator getOrchestrator() { + return orchestrator; + } public void setOrchestrator(IPPrefixesOrchestrator orchestrator) { this.orchestrator = orchestrator; } - public IPRanges process(IPPrefixesProcess process) { this.process = process; this.unparsed |= process.unparsed; @@ -202,21 +209,19 @@ public IPRanges process(IPPrefixesProcess process) { } /** - * Available prefix information for the Process endpoints. - * + *

Available prefix information for the Process endpoints.

* @return process - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesProcess getProcess() { - return process; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesProcess getProcess() { + return process; + } public void setProcess(IPPrefixesProcess process) { this.process = process; } - public IPRanges synthetics(IPPrefixesSynthetics synthetics) { this.synthetics = synthetics; this.unparsed |= synthetics.unparsed; @@ -224,66 +229,58 @@ public IPRanges synthetics(IPPrefixesSynthetics synthetics) { } /** - * Available prefix information for the Synthetics endpoints. - * + *

Available prefix information for the Synthetics endpoints.

* @return synthetics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesSynthetics getSynthetics() { - return synthetics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesSynthetics getSynthetics() { + return synthetics; + } public void setSynthetics(IPPrefixesSynthetics synthetics) { this.synthetics = synthetics; } - - public IPRanges syntheticsPrivateLocations( - IPPrefixesSyntheticsPrivateLocations syntheticsPrivateLocations) { + public IPRanges syntheticsPrivateLocations(IPPrefixesSyntheticsPrivateLocations syntheticsPrivateLocations) { this.syntheticsPrivateLocations = syntheticsPrivateLocations; this.unparsed |= syntheticsPrivateLocations.unparsed; return this; } /** - * Available prefix information for the Synthetics Private Locations endpoints. - * + *

Available prefix information for the Synthetics Private Locations endpoints.

* @return syntheticsPrivateLocations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_PRIVATE_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesSyntheticsPrivateLocations getSyntheticsPrivateLocations() { - return syntheticsPrivateLocations; - } - - public void setSyntheticsPrivateLocations( - IPPrefixesSyntheticsPrivateLocations syntheticsPrivateLocations) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_PRIVATE_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesSyntheticsPrivateLocations getSyntheticsPrivateLocations() { + return syntheticsPrivateLocations; + } + public void setSyntheticsPrivateLocations(IPPrefixesSyntheticsPrivateLocations syntheticsPrivateLocations) { this.syntheticsPrivateLocations = syntheticsPrivateLocations; } - public IPRanges version(Long version) { this.version = version; return this; } /** - * Version of the IP list. - * + *

Version of the IP list.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - public IPRanges webhooks(IPPrefixesWebhooks webhooks) { this.webhooks = webhooks; this.unparsed |= webhooks.unparsed; @@ -291,22 +288,23 @@ public IPRanges webhooks(IPPrefixesWebhooks webhooks) { } /** - * Available prefix information for the Webhook endpoints. - * + *

Available prefix information for the Webhook endpoints.

* @return webhooks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WEBHOOKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPPrefixesWebhooks getWebhooks() { - return webhooks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBHOOKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPPrefixesWebhooks getWebhooks() { + return webhooks; + } public void setWebhooks(IPPrefixesWebhooks webhooks) { this.webhooks = webhooks; } - /** Return true if this IPRanges object is equal to o. */ + /** + * Return true if this IPRanges object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -316,33 +314,13 @@ public boolean equals(Object o) { return false; } IPRanges ipRanges = (IPRanges) o; - return Objects.equals(this.agents, ipRanges.agents) - && Objects.equals(this.api, ipRanges.api) - && Objects.equals(this.apm, ipRanges.apm) - && Objects.equals(this.logs, ipRanges.logs) - && Objects.equals(this.modified, ipRanges.modified) - && Objects.equals(this.orchestrator, ipRanges.orchestrator) - && Objects.equals(this.process, ipRanges.process) - && Objects.equals(this.synthetics, ipRanges.synthetics) - && Objects.equals(this.syntheticsPrivateLocations, ipRanges.syntheticsPrivateLocations) - && Objects.equals(this.version, ipRanges.version) - && Objects.equals(this.webhooks, ipRanges.webhooks); + return Objects.equals(this.agents, ipRanges.agents) && Objects.equals(this.api, ipRanges.api) && Objects.equals(this.apm, ipRanges.apm) && Objects.equals(this.logs, ipRanges.logs) && Objects.equals(this.modified, ipRanges.modified) && Objects.equals(this.orchestrator, ipRanges.orchestrator) && Objects.equals(this.process, ipRanges.process) && Objects.equals(this.synthetics, ipRanges.synthetics) && Objects.equals(this.syntheticsPrivateLocations, ipRanges.syntheticsPrivateLocations) && Objects.equals(this.version, ipRanges.version) && Objects.equals(this.webhooks, ipRanges.webhooks); } + @Override public int hashCode() { - return Objects.hash( - agents, - api, - apm, - logs, - modified, - orchestrator, - process, - synthetics, - syntheticsPrivateLocations, - version, - webhooks); + return Objects.hash(agents,api,apm,logs,modified,orchestrator,process,synthetics,syntheticsPrivateLocations,version,webhooks); } @Override @@ -357,9 +335,7 @@ public String toString() { sb.append(" orchestrator: ").append(toIndentedString(orchestrator)).append("\n"); sb.append(" process: ").append(toIndentedString(process)).append("\n"); sb.append(" synthetics: ").append(toIndentedString(synthetics)).append("\n"); - sb.append(" syntheticsPrivateLocations: ") - .append(toIndentedString(syntheticsPrivateLocations)) - .append("\n"); + sb.append(" syntheticsPrivateLocations: ").append(toIndentedString(syntheticsPrivateLocations)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" webhooks: ").append(toIndentedString(webhooks)).append("\n"); sb.append("}"); @@ -367,7 +343,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IdpFormData.java b/src/main/java/com/datadog/api/client/v1/model/IdpFormData.java index 5e88a9a8c8d..07164644b2c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IdpFormData.java +++ b/src/main/java/com/datadog/api/client/v1/model/IdpFormData.java @@ -6,51 +6,72 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.io.File; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the IdP configuration. */ -@JsonPropertyOrder({IdpFormData.JSON_PROPERTY_IDP_FILE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object describing the IdP configuration.

+ */ +@JsonPropertyOrder({ + IdpFormData.JSON_PROPERTY_IDP_FILE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IdpFormData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IDP_FILE = "idp_file"; private File idpFile; public IdpFormData() {} @JsonCreator - public IdpFormData(@JsonProperty(required = true, value = JSON_PROPERTY_IDP_FILE) File idpFile) { - this.idpFile = idpFile; + public IdpFormData( + @JsonProperty(required=true, value=JSON_PROPERTY_IDP_FILE)File idpFile) { + this.idpFile = idpFile; } - public IdpFormData idpFile(File idpFile) { this.idpFile = idpFile; return this; } /** - * The path to the XML metadata file you wish to upload. - * + *

The path to the XML metadata file you wish to upload.

* @return idpFile - */ - @JsonProperty(JSON_PROPERTY_IDP_FILE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public File getIdpFile() { - return idpFile; - } - + **/ + @JsonProperty(JSON_PROPERTY_IDP_FILE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public File getIdpFile() { + return idpFile; + } public void setIdpFile(File idpFile) { this.idpFile = idpFile; } - /** Return true if this IdpFormData object is equal to o. */ + /** + * Return true if this IdpFormData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.idpFile, idpFormData.idpFile); } + @Override public int hashCode() { return Objects.hash(idpFile); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/IdpResponse.java b/src/main/java/com/datadog/api/client/v1/model/IdpResponse.java index f0feffd2bfe..9ad4737ec95 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IdpResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/IdpResponse.java @@ -6,50 +6,72 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The IdP response object. */ -@JsonPropertyOrder({IdpResponse.JSON_PROPERTY_MESSAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The IdP response object.

+ */ +@JsonPropertyOrder({ + IdpResponse.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IdpResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; public IdpResponse() {} @JsonCreator - public IdpResponse(@JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message) { - this.message = message; + public IdpResponse( + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message) { + this.message = message; } - public IdpResponse message(String message) { this.message = message; return this; } /** - * Identity provider response. - * + *

Identity provider response.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this IdpResponse object is equal to o. */ + /** + * Return true if this IdpResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.message, idpResponse.message); } + @Override public int hashCode() { return Objects.hash(message); @@ -77,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinition.java index 6c3c06aab06..bc598d9efe0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The image widget allows you to embed an image on your dashboard. An image can be a PNG, JPG, or - * animated GIF. Only available on FREE layout dashboards. + *

The image widget allows you to embed an image on your dashboard. An image can be a PNG, JPG, or animated GIF. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ ImageWidgetDefinition.JSON_PROPERTY_HAS_BACKGROUND, @@ -28,10 +44,10 @@ ImageWidgetDefinition.JSON_PROPERTY_URL_DARK_THEME, ImageWidgetDefinition.JSON_PROPERTY_VERTICAL_ALIGN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ImageWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HAS_BACKGROUND = "has_background"; private Boolean hasBackground = true; @@ -63,55 +79,50 @@ public ImageWidgetDefinition() {} @JsonCreator public ImageWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ImageWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.type = type; - this.unparsed |= !type.isValid(); - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ImageWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.type = type; + this.unparsed |= !type.isValid(); + this.url = url; } - public ImageWidgetDefinition hasBackground(Boolean hasBackground) { this.hasBackground = hasBackground; return this; } /** - * Whether to display a background or not. - * + *

Whether to display a background or not.

* @return hasBackground - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_BACKGROUND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasBackground() { - return hasBackground; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_BACKGROUND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasBackground() { + return hasBackground; + } public void setHasBackground(Boolean hasBackground) { this.hasBackground = hasBackground; } - public ImageWidgetDefinition hasBorder(Boolean hasBorder) { this.hasBorder = hasBorder; return this; } /** - * Whether to display a border or not. - * + *

Whether to display a border or not.

* @return hasBorder - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_BORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasBorder() { - return hasBorder; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_BORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasBorder() { + return hasBorder; + } public void setHasBorder(Boolean hasBorder) { this.hasBorder = hasBorder; } - public ImageWidgetDefinition horizontalAlign(WidgetHorizontalAlign horizontalAlign) { this.horizontalAlign = horizontalAlign; this.unparsed |= !horizontalAlign.isValid(); @@ -119,24 +130,22 @@ public ImageWidgetDefinition horizontalAlign(WidgetHorizontalAlign horizontalAli } /** - * Horizontal alignment. - * + *

Horizontal alignment.

* @return horizontalAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HORIZONTAL_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetHorizontalAlign getHorizontalAlign() { - return horizontalAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HORIZONTAL_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetHorizontalAlign getHorizontalAlign() { + return horizontalAlign; + } public void setHorizontalAlign(WidgetHorizontalAlign horizontalAlign) { if (!horizontalAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.horizontalAlign = horizontalAlign; } - public ImageWidgetDefinition margin(WidgetMargin margin) { this.margin = margin; this.unparsed |= !margin.isValid(); @@ -144,25 +153,23 @@ public ImageWidgetDefinition margin(WidgetMargin margin) { } /** - * Size of the margins around the image. Note: small and large - * values are deprecated. - * + *

Size of the margins around the image. + * Note: small and large values are deprecated.

* @return margin - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MARGIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetMargin getMargin() { - return margin; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MARGIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetMargin getMargin() { + return margin; + } public void setMargin(WidgetMargin margin) { if (!margin.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.margin = margin; } - public ImageWidgetDefinition sizing(WidgetImageSizing sizing) { this.sizing = sizing; this.unparsed |= !sizing.isValid(); @@ -170,26 +177,23 @@ public ImageWidgetDefinition sizing(WidgetImageSizing sizing) { } /** - * How to size the image on the widget. The values are based on the image object-fit - * CSS properties. Note: zoom, fit and center - * values are deprecated. - * + *

How to size the image on the widget. The values are based on the image object-fit CSS properties. + * Note: zoom, fit and center values are deprecated.

* @return sizing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetImageSizing getSizing() { - return sizing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetImageSizing getSizing() { + return sizing; + } public void setSizing(WidgetImageSizing sizing) { if (!sizing.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sizing = sizing; } - public ImageWidgetDefinition type(ImageWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -197,64 +201,58 @@ public ImageWidgetDefinition type(ImageWidgetDefinitionType type) { } /** - * Type of the image widget. - * + *

Type of the image widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ImageWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ImageWidgetDefinitionType getType() { + return type; + } public void setType(ImageWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public ImageWidgetDefinition url(String url) { this.url = url; return this; } /** - * URL of the image. - * + *

URL of the image.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - public ImageWidgetDefinition urlDarkTheme(String urlDarkTheme) { this.urlDarkTheme = urlDarkTheme; return this; } /** - * URL of the image in dark mode. - * + *

URL of the image in dark mode.

* @return urlDarkTheme - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL_DARK_THEME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrlDarkTheme() { - return urlDarkTheme; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL_DARK_THEME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrlDarkTheme() { + return urlDarkTheme; + } public void setUrlDarkTheme(String urlDarkTheme) { this.urlDarkTheme = urlDarkTheme; } - public ImageWidgetDefinition verticalAlign(WidgetVerticalAlign verticalAlign) { this.verticalAlign = verticalAlign; this.unparsed |= !verticalAlign.isValid(); @@ -262,25 +260,26 @@ public ImageWidgetDefinition verticalAlign(WidgetVerticalAlign verticalAlign) { } /** - * Vertical alignment. - * + *

Vertical alignment.

* @return verticalAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERTICAL_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetVerticalAlign getVerticalAlign() { - return verticalAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERTICAL_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetVerticalAlign getVerticalAlign() { + return verticalAlign; + } public void setVerticalAlign(WidgetVerticalAlign verticalAlign) { if (!verticalAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.verticalAlign = verticalAlign; } - /** Return true if this ImageWidgetDefinition object is equal to o. */ + /** + * Return true if this ImageWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -290,29 +289,13 @@ public boolean equals(Object o) { return false; } ImageWidgetDefinition imageWidgetDefinition = (ImageWidgetDefinition) o; - return Objects.equals(this.hasBackground, imageWidgetDefinition.hasBackground) - && Objects.equals(this.hasBorder, imageWidgetDefinition.hasBorder) - && Objects.equals(this.horizontalAlign, imageWidgetDefinition.horizontalAlign) - && Objects.equals(this.margin, imageWidgetDefinition.margin) - && Objects.equals(this.sizing, imageWidgetDefinition.sizing) - && Objects.equals(this.type, imageWidgetDefinition.type) - && Objects.equals(this.url, imageWidgetDefinition.url) - && Objects.equals(this.urlDarkTheme, imageWidgetDefinition.urlDarkTheme) - && Objects.equals(this.verticalAlign, imageWidgetDefinition.verticalAlign); + return Objects.equals(this.hasBackground, imageWidgetDefinition.hasBackground) && Objects.equals(this.hasBorder, imageWidgetDefinition.hasBorder) && Objects.equals(this.horizontalAlign, imageWidgetDefinition.horizontalAlign) && Objects.equals(this.margin, imageWidgetDefinition.margin) && Objects.equals(this.sizing, imageWidgetDefinition.sizing) && Objects.equals(this.type, imageWidgetDefinition.type) && Objects.equals(this.url, imageWidgetDefinition.url) && Objects.equals(this.urlDarkTheme, imageWidgetDefinition.urlDarkTheme) && Objects.equals(this.verticalAlign, imageWidgetDefinition.verticalAlign); } + @Override public int hashCode() { - return Objects.hash( - hasBackground, - hasBorder, - horizontalAlign, - margin, - sizing, - type, - url, - urlDarkTheme, - verticalAlign); + return Objects.hash(hasBackground,hasBorder,horizontalAlign,margin,sizing,type,url,urlDarkTheme,verticalAlign); } @Override @@ -333,7 +316,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinitionType.java index efc920a2379..1d742a7601d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ImageWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the image widget. */ +/** + *

Type of the image widget.

+ */ @JsonSerialize(using = ImageWidgetDefinitionType.ImageWidgetDefinitionTypeSerializer.class) public class ImageWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ImageWidgetDefinitionTypeSerializer - extends StdSerializer { - public ImageWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class ImageWidgetDefinitionTypeSerializer extends StdSerializer { + public ImageWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ImageWidgetDefinitionTypeSerializer() { - this(null); - } + public ImageWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ImageWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ImageWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ImageWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ImageWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/IntakePayloadAccepted.java b/src/main/java/com/datadog/api/client/v1/model/IntakePayloadAccepted.java index fef814ccdca..f34f244703b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/IntakePayloadAccepted.java +++ b/src/main/java/com/datadog/api/client/v1/model/IntakePayloadAccepted.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The payload accepted for intake. */ -@JsonPropertyOrder({IntakePayloadAccepted.JSON_PROPERTY_STATUS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The payload accepted for intake.

+ */ +@JsonPropertyOrder({ + IntakePayloadAccepted.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IntakePayloadAccepted { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_STATUS = "status"; private String status; @@ -27,22 +49,23 @@ public IntakePayloadAccepted status(String status) { } /** - * The status of the intake payload. - * + *

The status of the intake payload.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this IntakePayloadAccepted object is equal to o. */ + /** + * Return true if this IntakePayloadAccepted object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.status, intakePayloadAccepted.status); } + @Override public int hashCode() { return Objects.hash(status); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamColumn.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamColumn.java index d1d82119951..0a98cc2be5c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamColumn.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamColumn.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Widget column. */ -@JsonPropertyOrder({ListStreamColumn.JSON_PROPERTY_FIELD, ListStreamColumn.JSON_PROPERTY_WIDTH}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Widget column.

+ */ +@JsonPropertyOrder({ + ListStreamColumn.JSON_PROPERTY_FIELD, + ListStreamColumn.JSON_PROPERTY_WIDTH +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamColumn { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FIELD = "field"; private String field; @@ -29,33 +51,30 @@ public ListStreamColumn() {} @JsonCreator public ListStreamColumn( - @JsonProperty(required = true, value = JSON_PROPERTY_FIELD) String field, - @JsonProperty(required = true, value = JSON_PROPERTY_WIDTH) ListStreamColumnWidth width) { - this.field = field; - this.width = width; - this.unparsed |= !width.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_FIELD)String field, + @JsonProperty(required=true, value=JSON_PROPERTY_WIDTH)ListStreamColumnWidth width) { + this.field = field; + this.width = width; + this.unparsed |= !width.isValid(); } - public ListStreamColumn field(String field) { this.field = field; return this; } /** - * Widget column field. - * + *

Widget column field.

* @return field - */ - @JsonProperty(JSON_PROPERTY_FIELD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getField() { - return field; - } - + **/ + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getField() { + return field; + } public void setField(String field) { this.field = field; } - public ListStreamColumn width(ListStreamColumnWidth width) { this.width = width; this.unparsed |= !width.isValid(); @@ -63,24 +82,25 @@ public ListStreamColumn width(ListStreamColumnWidth width) { } /** - * Widget column width. - * + *

Widget column width.

* @return width - */ - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListStreamColumnWidth getWidth() { - return width; - } - + **/ + @JsonProperty(JSON_PROPERTY_WIDTH) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ListStreamColumnWidth getWidth() { + return width; + } public void setWidth(ListStreamColumnWidth width) { if (!width.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.width = width; } - /** Return true if this ListStreamColumn object is equal to o. */ + /** + * Return true if this ListStreamColumn object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,13 +110,13 @@ public boolean equals(Object o) { return false; } ListStreamColumn listStreamColumn = (ListStreamColumn) o; - return Objects.equals(this.field, listStreamColumn.field) - && Objects.equals(this.width, listStreamColumn.width); + return Objects.equals(this.field, listStreamColumn.field) && Objects.equals(this.width, listStreamColumn.width); } + @Override public int hashCode() { - return Objects.hash(field, width); + return Objects.hash(field,width); } @Override @@ -110,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamColumnWidth.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamColumnWidth.java index e1cdb7ff6cb..2a27a510ad1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamColumnWidth.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamColumnWidth.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget column width. */ +/** + *

Widget column width.

+ */ @JsonSerialize(using = ListStreamColumnWidth.ListStreamColumnWidthSerializer.class) public class ListStreamColumnWidth { @@ -27,8 +51,7 @@ public class ListStreamColumnWidth { public static final ListStreamColumnWidth COMPACT = new ListStreamColumnWidth("compact"); public static final ListStreamColumnWidth FULL = new ListStreamColumnWidth("full"); - private static final Set allowedValues = - new HashSet(Arrays.asList("auto", "compact", "full")); + private static final Set allowedValues = new HashSet(Arrays.asList("auto", "compact", "full")); private String value; @@ -41,20 +64,18 @@ public boolean isValid() { } public static class ListStreamColumnWidthSerializer extends StdSerializer { - public ListStreamColumnWidthSerializer(Class t) { - super(t); - } - - public ListStreamColumnWidthSerializer() { - this(null); - } - - @Override - public void serialize( - ListStreamColumnWidth value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ListStreamColumnWidthSerializer(Class t) { + super(t); + } + + public ListStreamColumnWidthSerializer() { + this(null); + } + + @Override + public void serialize(ListStreamColumnWidth value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ListStreamColumnWidth object is equal to o. */ + /** + * Return true if this ListStreamColumnWidth object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeAggregation.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeAggregation.java index c761fa2788f..67fdfa7f96f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeAggregation.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeAggregation.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Aggregation value. */ +/** + *

Aggregation value.

+ */ @JsonSerialize(using = ListStreamComputeAggregation.ListStreamComputeAggregationSerializer.class) public class ListStreamComputeAggregation { - public static final ListStreamComputeAggregation COUNT = - new ListStreamComputeAggregation("count"); - public static final ListStreamComputeAggregation CARDINALITY = - new ListStreamComputeAggregation("cardinality"); - public static final ListStreamComputeAggregation MEDIAN = - new ListStreamComputeAggregation("median"); + public static final ListStreamComputeAggregation COUNT = new ListStreamComputeAggregation("count"); + public static final ListStreamComputeAggregation CARDINALITY = new ListStreamComputeAggregation("cardinality"); + public static final ListStreamComputeAggregation MEDIAN = new ListStreamComputeAggregation("median"); public static final ListStreamComputeAggregation PC75 = new ListStreamComputeAggregation("pc75"); public static final ListStreamComputeAggregation PC90 = new ListStreamComputeAggregation("pc90"); public static final ListStreamComputeAggregation PC95 = new ListStreamComputeAggregation("pc95"); @@ -38,31 +59,11 @@ public class ListStreamComputeAggregation { public static final ListStreamComputeAggregation MIN = new ListStreamComputeAggregation("min"); public static final ListStreamComputeAggregation MAX = new ListStreamComputeAggregation("max"); public static final ListStreamComputeAggregation AVG = new ListStreamComputeAggregation("avg"); - public static final ListStreamComputeAggregation EARLIEST = - new ListStreamComputeAggregation("earliest"); - public static final ListStreamComputeAggregation LATEST = - new ListStreamComputeAggregation("latest"); - public static final ListStreamComputeAggregation MOST_FREQUENT = - new ListStreamComputeAggregation("most_frequent"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "median", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg", - "earliest", - "latest", - "most_frequent")); + public static final ListStreamComputeAggregation EARLIEST = new ListStreamComputeAggregation("earliest"); + public static final ListStreamComputeAggregation LATEST = new ListStreamComputeAggregation("latest"); + public static final ListStreamComputeAggregation MOST_FREQUENT = new ListStreamComputeAggregation("most_frequent"); + + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "median", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "earliest", "latest", "most_frequent")); private String value; @@ -74,22 +75,19 @@ public boolean isValid() { this.value = value; } - public static class ListStreamComputeAggregationSerializer - extends StdSerializer { - public ListStreamComputeAggregationSerializer(Class t) { - super(t); - } + public static class ListStreamComputeAggregationSerializer extends StdSerializer { + public ListStreamComputeAggregationSerializer(Class t) { + super(t); + } - public ListStreamComputeAggregationSerializer() { - this(null); - } + public ListStreamComputeAggregationSerializer() { + this(null); + } - @Override - public void serialize( - ListStreamComputeAggregation value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ListStreamComputeAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -101,7 +99,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ListStreamComputeAggregation object is equal to o. */ + /** + * Return true if this ListStreamComputeAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,7 +115,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeItems.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeItems.java index 99b4f67a7f6..281cb23590b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeItems.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamComputeItems.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of facets and aggregations which to compute. */ + +/** + *

List of facets and aggregations which to compute.

+ */ @JsonPropertyOrder({ ListStreamComputeItems.JSON_PROPERTY_AGGREGATION, ListStreamComputeItems.JSON_PROPERTY_FACET }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamComputeItems { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private ListStreamComputeAggregation aggregation; @@ -32,12 +51,10 @@ public ListStreamComputeItems() {} @JsonCreator public ListStreamComputeItems( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - ListStreamComputeAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)ListStreamComputeAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - public ListStreamComputeItems aggregation(ListStreamComputeAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); @@ -45,45 +62,44 @@ public ListStreamComputeItems aggregation(ListStreamComputeAggregation aggregati } /** - * Aggregation value. - * + *

Aggregation value.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListStreamComputeAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ListStreamComputeAggregation getAggregation() { + return aggregation; + } public void setAggregation(ListStreamComputeAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public ListStreamComputeItems facet(String facet) { this.facet = facet; return this; } /** - * Facet name. - * + *

Facet name.

* @return facet - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFacet() { - return facet; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - /** Return true if this ListStreamComputeItems object is equal to o. */ + /** + * Return true if this ListStreamComputeItems object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +109,13 @@ public boolean equals(Object o) { return false; } ListStreamComputeItems listStreamComputeItems = (ListStreamComputeItems) o; - return Objects.equals(this.aggregation, listStreamComputeItems.aggregation) - && Objects.equals(this.facet, listStreamComputeItems.facet); + return Objects.equals(this.aggregation, listStreamComputeItems.aggregation) && Objects.equals(this.facet, listStreamComputeItems.facet); } + @Override public int hashCode() { - return Objects.hash(aggregation, facet); + return Objects.hash(aggregation,facet); } @Override @@ -113,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamGroupByItems.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamGroupByItems.java index 5542211b041..eb1afe66431 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamGroupByItems.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamGroupByItems.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of facets on which to group. */ -@JsonPropertyOrder({ListStreamGroupByItems.JSON_PROPERTY_FACET}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

List of facets on which to group.

+ */ +@JsonPropertyOrder({ + ListStreamGroupByItems.JSON_PROPERTY_FACET +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamGroupByItems { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -26,31 +47,31 @@ public ListStreamGroupByItems() {} @JsonCreator public ListStreamGroupByItems( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public ListStreamGroupByItems facet(String facet) { this.facet = facet; return this; } /** - * Facet name. - * + *

Facet name.

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - /** Return true if this ListStreamGroupByItems object is equal to o. */ + /** + * Return true if this ListStreamGroupByItems object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.facet, listStreamGroupByItems.facet); } + @Override public int hashCode() { return Objects.hash(facet); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamQuery.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamQuery.java index 0c11ff163ff..b2f4a8f0970 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamQuery.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Updated list stream widget. */ +/** + *

Updated list stream widget.

+ */ @JsonPropertyOrder({ ListStreamQuery.JSON_PROPERTY_COMPUTE, ListStreamQuery.JSON_PROPERTY_DATA_SOURCE, @@ -25,10 +42,10 @@ ListStreamQuery.JSON_PROPERTY_QUERY_STRING, ListStreamQuery.JSON_PROPERTY_STORAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private List compute = null; @@ -54,13 +71,12 @@ public ListStreamQuery() {} @JsonCreator public ListStreamQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) ListStreamSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY_STRING) String queryString) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.queryString = queryString; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)ListStreamSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY_STRING)String queryString) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.queryString = queryString; } - public ListStreamQuery compute(List compute) { this.compute = compute; for (ListStreamComputeItems item : compute) { @@ -68,7 +84,6 @@ public ListStreamQuery compute(List compute) { } return this; } - public ListStreamQuery addComputeItem(ListStreamComputeItems computeItem) { if (this.compute == null) { this.compute = new ArrayList<>(); @@ -79,22 +94,19 @@ public ListStreamQuery addComputeItem(ListStreamComputeItems computeItem) { } /** - * Compute configuration for the List Stream Widget. Compute can be used only with the - * logs_transaction_stream (from 1 to 5 items) list stream source. - * + *

Compute configuration for the List Stream Widget. Compute can be used only with the logs_transaction_stream (from 1 to 5 items) list stream source.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCompute() { + return compute; + } public void setCompute(List compute) { this.compute = compute; } - public ListStreamQuery dataSource(ListStreamSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); @@ -102,23 +114,21 @@ public ListStreamQuery dataSource(ListStreamSource dataSource) { } /** - * Source from which to query items to display in the stream. - * + *

Source from which to query items to display in the stream.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListStreamSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ListStreamSource getDataSource() { + return dataSource; + } public void setDataSource(ListStreamSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public ListStreamQuery eventSize(WidgetEventSize eventSize) { this.eventSize = eventSize; this.unparsed |= !eventSize.isValid(); @@ -126,24 +136,22 @@ public ListStreamQuery eventSize(WidgetEventSize eventSize) { } /** - * Size to use to display an event. - * + *

Size to use to display an event.

* @return eventSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetEventSize getEventSize() { - return eventSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetEventSize getEventSize() { + return eventSize; + } public void setEventSize(WidgetEventSize eventSize) { if (!eventSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.eventSize = eventSize; } - public ListStreamQuery groupBy(List groupBy) { this.groupBy = groupBy; for (ListStreamGroupByItems item : groupBy) { @@ -151,7 +159,6 @@ public ListStreamQuery groupBy(List groupBy) { } return this; } - public ListStreamQuery addGroupByItem(ListStreamGroupByItems groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -162,28 +169,23 @@ public ListStreamQuery addGroupByItem(ListStreamGroupByItems groupByItem) { } /** - * Group by configuration for the List Stream Widget. Group by can be used only with - * logs_pattern_stream (up to 3 items) or logs_transaction_stream (one group by item is required) - * list stream source. - * + *

Group by configuration for the List Stream Widget. Group by can be used only with logs_pattern_stream (up to 3 items) or logs_transaction_stream (one group by item is required) list stream source.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public ListStreamQuery indexes(List indexes) { this.indexes = indexes; return this; } - public ListStreamQuery addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -193,63 +195,60 @@ public ListStreamQuery addIndexesItem(String indexesItem) { } /** - * List of indexes. - * + *

List of indexes.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public ListStreamQuery queryString(String queryString) { this.queryString = queryString; return this; } /** - * Widget query. - * + *

Widget query.

* @return queryString - */ - @JsonProperty(JSON_PROPERTY_QUERY_STRING) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQueryString() { - return queryString; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY_STRING) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQueryString() { + return queryString; + } public void setQueryString(String queryString) { this.queryString = queryString; } - public ListStreamQuery storage(String storage) { this.storage = storage; return this; } /** - * Option for storage location. Feature in Private Beta. - * + *

Option for storage location. Feature in Private Beta.

* @return storage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STORAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStorage() { - return storage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STORAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStorage() { + return storage; + } public void setStorage(String storage) { this.storage = storage; } - /** Return true if this ListStreamQuery object is equal to o. */ + /** + * Return true if this ListStreamQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -259,18 +258,13 @@ public boolean equals(Object o) { return false; } ListStreamQuery listStreamQuery = (ListStreamQuery) o; - return Objects.equals(this.compute, listStreamQuery.compute) - && Objects.equals(this.dataSource, listStreamQuery.dataSource) - && Objects.equals(this.eventSize, listStreamQuery.eventSize) - && Objects.equals(this.groupBy, listStreamQuery.groupBy) - && Objects.equals(this.indexes, listStreamQuery.indexes) - && Objects.equals(this.queryString, listStreamQuery.queryString) - && Objects.equals(this.storage, listStreamQuery.storage); + return Objects.equals(this.compute, listStreamQuery.compute) && Objects.equals(this.dataSource, listStreamQuery.dataSource) && Objects.equals(this.eventSize, listStreamQuery.eventSize) && Objects.equals(this.groupBy, listStreamQuery.groupBy) && Objects.equals(this.indexes, listStreamQuery.indexes) && Objects.equals(this.queryString, listStreamQuery.queryString) && Objects.equals(this.storage, listStreamQuery.storage); } + @Override public int hashCode() { - return Objects.hash(compute, dataSource, eventSize, groupBy, indexes, queryString, storage); + return Objects.hash(compute,dataSource,eventSize,groupBy,indexes,queryString,storage); } @Override @@ -289,7 +283,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamResponseFormat.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamResponseFormat.java index 99b9b1c9c07..c678121b6cd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamResponseFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamResponseFormat.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget response format. */ +/** + *

Widget response format.

+ */ @JsonSerialize(using = ListStreamResponseFormat.ListStreamResponseFormatSerializer.class) public class ListStreamResponseFormat { - public static final ListStreamResponseFormat EVENT_LIST = - new ListStreamResponseFormat("event_list"); + public static final ListStreamResponseFormat EVENT_LIST = new ListStreamResponseFormat("event_list"); private static final Set allowedValues = new HashSet(Arrays.asList("event_list")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ListStreamResponseFormatSerializer - extends StdSerializer { - public ListStreamResponseFormatSerializer(Class t) { - super(t); - } + public static class ListStreamResponseFormatSerializer extends StdSerializer { + public ListStreamResponseFormatSerializer(Class t) { + super(t); + } - public ListStreamResponseFormatSerializer() { - this(null); - } + public ListStreamResponseFormatSerializer() { + this(null); + } - @Override - public void serialize( - ListStreamResponseFormat value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ListStreamResponseFormat value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ListStreamResponseFormat object is equal to o. */ + /** + * Return true if this ListStreamResponseFormat object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamSource.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamSource.java index 3b66ab13cab..a3cce219b7d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamSource.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Source from which to query items to display in the stream. */ +/** + *

Source from which to query items to display in the stream.

+ */ @JsonSerialize(using = ListStreamSource.ListStreamSourceSerializer.class) public class ListStreamSource { @@ -27,22 +51,11 @@ public class ListStreamSource { public static final ListStreamSource AUDIT_STREAM = new ListStreamSource("audit_stream"); public static final ListStreamSource RUM_ISSUE_STREAM = new ListStreamSource("rum_issue_stream"); public static final ListStreamSource APM_ISSUE_STREAM = new ListStreamSource("apm_issue_stream"); - public static final ListStreamSource LOGS_PATTERN_STREAM = - new ListStreamSource("logs_pattern_stream"); - public static final ListStreamSource LOGS_TRANSACTION_STREAM = - new ListStreamSource("logs_transaction_stream"); + public static final ListStreamSource LOGS_PATTERN_STREAM = new ListStreamSource("logs_pattern_stream"); + public static final ListStreamSource LOGS_TRANSACTION_STREAM = new ListStreamSource("logs_transaction_stream"); public static final ListStreamSource EVENT_STREAM = new ListStreamSource("event_stream"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "logs_stream", - "audit_stream", - "rum_issue_stream", - "apm_issue_stream", - "logs_pattern_stream", - "logs_transaction_stream", - "event_stream")); + private static final Set allowedValues = new HashSet(Arrays.asList("logs_stream", "audit_stream", "rum_issue_stream", "apm_issue_stream", "logs_pattern_stream", "logs_transaction_stream", "event_stream")); private String value; @@ -55,19 +68,18 @@ public boolean isValid() { } public static class ListStreamSourceSerializer extends StdSerializer { - public ListStreamSourceSerializer(Class t) { - super(t); - } - - public ListStreamSourceSerializer() { - this(null); - } - - @Override - public void serialize(ListStreamSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ListStreamSourceSerializer(Class t) { + super(t); + } + + public ListStreamSourceSerializer() { + this(null); + } + + @Override + public void serialize(ListStreamSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -79,7 +91,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ListStreamSource object is equal to o. */ + /** + * Return true if this ListStreamSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,7 +107,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinition.java index 9522a6c5980..b37e6574beb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinition.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The list stream visualization displays a table of recent events in your application that match a - * search criteria using user-defined columns. + *

The list stream visualization displays a table of recent events in your application that + * match a search criteria using user-defined columns.

*/ @JsonPropertyOrder({ ListStreamWidgetDefinition.JSON_PROPERTY_LEGEND_SIZE, @@ -29,10 +44,10 @@ ListStreamWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, ListStreamWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LEGEND_SIZE = "legend_size"; private String legendSize; @@ -61,36 +76,31 @@ public ListStreamWidgetDefinition() {} @JsonCreator public ListStreamWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ListStreamWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ListStreamWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public ListStreamWidgetDefinition legendSize(String legendSize) { this.legendSize = legendSize; return this; } /** - * Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". - * + *

Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto".

* @return legendSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegendSize() { - return legendSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLegendSize() { + return legendSize; + } public void setLegendSize(String legendSize) { this.legendSize = legendSize; } - public ListStreamWidgetDefinition requests(List requests) { this.requests = requests; for (ListStreamWidgetRequest item : requests) { @@ -98,7 +108,6 @@ public ListStreamWidgetDefinition requests(List request } return this; } - public ListStreamWidgetDefinition addRequestsItem(ListStreamWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -106,41 +115,37 @@ public ListStreamWidgetDefinition addRequestsItem(ListStreamWidgetRequest reques } /** - * Request payload used to query items. - * + *

Request payload used to query items.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public ListStreamWidgetDefinition showLegend(Boolean showLegend) { this.showLegend = showLegend; return this; } /** - * Whether or not to display the legend on this widget. - * + *

Whether or not to display the legend on this widget.

* @return showLegend - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowLegend() { - return showLegend; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowLegend() { + return showLegend; + } public void setShowLegend(Boolean showLegend) { this.showLegend = showLegend; } - public ListStreamWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -148,42 +153,38 @@ public ListStreamWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public ListStreamWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public ListStreamWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -191,45 +192,41 @@ public ListStreamWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public ListStreamWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public ListStreamWidgetDefinition type(ListStreamWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -237,24 +234,25 @@ public ListStreamWidgetDefinition type(ListStreamWidgetDefinitionType type) { } /** - * Type of the list stream widget. - * + *

Type of the list stream widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListStreamWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ListStreamWidgetDefinitionType getType() { + return type; + } public void setType(ListStreamWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ListStreamWidgetDefinition object is equal to o. */ + /** + * Return true if this ListStreamWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -264,19 +262,13 @@ public boolean equals(Object o) { return false; } ListStreamWidgetDefinition listStreamWidgetDefinition = (ListStreamWidgetDefinition) o; - return Objects.equals(this.legendSize, listStreamWidgetDefinition.legendSize) - && Objects.equals(this.requests, listStreamWidgetDefinition.requests) - && Objects.equals(this.showLegend, listStreamWidgetDefinition.showLegend) - && Objects.equals(this.time, listStreamWidgetDefinition.time) - && Objects.equals(this.title, listStreamWidgetDefinition.title) - && Objects.equals(this.titleAlign, listStreamWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, listStreamWidgetDefinition.titleSize) - && Objects.equals(this.type, listStreamWidgetDefinition.type); + return Objects.equals(this.legendSize, listStreamWidgetDefinition.legendSize) && Objects.equals(this.requests, listStreamWidgetDefinition.requests) && Objects.equals(this.showLegend, listStreamWidgetDefinition.showLegend) && Objects.equals(this.time, listStreamWidgetDefinition.time) && Objects.equals(this.title, listStreamWidgetDefinition.title) && Objects.equals(this.titleAlign, listStreamWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, listStreamWidgetDefinition.titleSize) && Objects.equals(this.type, listStreamWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(legendSize, requests, showLegend, time, title, titleAlign, titleSize, type); + return Objects.hash(legendSize,requests,showLegend,time,title,titleAlign,titleSize,type); } @Override @@ -296,7 +288,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinitionType.java index 33d3aaa1192..33708ae6789 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the list stream widget. */ -@JsonSerialize( - using = ListStreamWidgetDefinitionType.ListStreamWidgetDefinitionTypeSerializer.class) +/** + *

Type of the list stream widget.

+ */ +@JsonSerialize(using = ListStreamWidgetDefinitionType.ListStreamWidgetDefinitionTypeSerializer.class) public class ListStreamWidgetDefinitionType { - public static final ListStreamWidgetDefinitionType LIST_STREAM = - new ListStreamWidgetDefinitionType("list_stream"); + public static final ListStreamWidgetDefinitionType LIST_STREAM = new ListStreamWidgetDefinitionType("list_stream"); - private static final Set allowedValues = - new HashSet(Arrays.asList("list_stream")); + private static final Set allowedValues = new HashSet(Arrays.asList("list_stream")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ListStreamWidgetDefinitionTypeSerializer - extends StdSerializer { - public ListStreamWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class ListStreamWidgetDefinitionTypeSerializer extends StdSerializer { + public ListStreamWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ListStreamWidgetDefinitionTypeSerializer() { - this(null); - } + public ListStreamWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ListStreamWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ListStreamWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ListStreamWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ListStreamWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetRequest.java index a73b16237b9..00c1f130019 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamWidgetRequest.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated list stream widget. */ + +/** + *

Updated list stream widget.

+ */ @JsonPropertyOrder({ ListStreamWidgetRequest.JSON_PROPERTY_COLUMNS, ListStreamWidgetRequest.JSON_PROPERTY_QUERY, ListStreamWidgetRequest.JSON_PROPERTY_RESPONSE_FORMAT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLUMNS = "columns"; private List columns = new ArrayList<>(); @@ -38,17 +55,15 @@ public ListStreamWidgetRequest() {} @JsonCreator public ListStreamWidgetRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_COLUMNS) List columns, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) ListStreamQuery query, - @JsonProperty(required = true, value = JSON_PROPERTY_RESPONSE_FORMAT) - ListStreamResponseFormat responseFormat) { - this.columns = columns; - this.query = query; - this.unparsed |= query.unparsed; - this.responseFormat = responseFormat; - this.unparsed |= !responseFormat.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_COLUMNS)List columns, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)ListStreamQuery query, + @JsonProperty(required=true, value=JSON_PROPERTY_RESPONSE_FORMAT)ListStreamResponseFormat responseFormat) { + this.columns = columns; + this.query = query; + this.unparsed |= query.unparsed; + this.responseFormat = responseFormat; + this.unparsed |= !responseFormat.isValid(); } - public ListStreamWidgetRequest columns(List columns) { this.columns = columns; for (ListStreamColumn item : columns) { @@ -56,7 +71,6 @@ public ListStreamWidgetRequest columns(List columns) { } return this; } - public ListStreamWidgetRequest addColumnsItem(ListStreamColumn columnsItem) { this.columns.add(columnsItem); this.unparsed |= columnsItem.unparsed; @@ -64,20 +78,18 @@ public ListStreamWidgetRequest addColumnsItem(ListStreamColumn columnsItem) { } /** - * Widget columns. - * + *

Widget columns.

* @return columns - */ - @JsonProperty(JSON_PROPERTY_COLUMNS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getColumns() { - return columns; - } - + **/ + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } public void setColumns(List columns) { this.columns = columns; } - public ListStreamWidgetRequest query(ListStreamQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -85,20 +97,18 @@ public ListStreamWidgetRequest query(ListStreamQuery query) { } /** - * Updated list stream widget. - * + *

Updated list stream widget.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListStreamQuery getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ListStreamQuery getQuery() { + return query; + } public void setQuery(ListStreamQuery query) { this.query = query; } - public ListStreamWidgetRequest responseFormat(ListStreamResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -106,24 +116,25 @@ public ListStreamWidgetRequest responseFormat(ListStreamResponseFormat responseF } /** - * Widget response format. - * + *

Widget response format.

* @return responseFormat - */ - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListStreamResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ListStreamResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(ListStreamResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - /** Return true if this ListStreamWidgetRequest object is equal to o. */ + /** + * Return true if this ListStreamWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,14 +144,13 @@ public boolean equals(Object o) { return false; } ListStreamWidgetRequest listStreamWidgetRequest = (ListStreamWidgetRequest) o; - return Objects.equals(this.columns, listStreamWidgetRequest.columns) - && Objects.equals(this.query, listStreamWidgetRequest.query) - && Objects.equals(this.responseFormat, listStreamWidgetRequest.responseFormat); + return Objects.equals(this.columns, listStreamWidgetRequest.columns) && Objects.equals(this.query, listStreamWidgetRequest.query) && Objects.equals(this.responseFormat, listStreamWidgetRequest.responseFormat); } + @Override public int hashCode() { - return Objects.hash(columns, query, responseFormat); + return Objects.hash(columns,query,responseFormat); } @Override @@ -155,7 +165,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Log.java b/src/main/java/com/datadog/api/client/v1/model/Log.java index 8fc413ce0b4..21fc1ba1d62 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Log.java +++ b/src/main/java/com/datadog/api/client/v1/model/Log.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing a log after being processed and stored by Datadog. */ -@JsonPropertyOrder({Log.JSON_PROPERTY_CONTENT, Log.JSON_PROPERTY_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object describing a log after being processed and stored by Datadog.

+ */ +@JsonPropertyOrder({ + Log.JSON_PROPERTY_CONTENT, + Log.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Log { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTENT = "content"; private LogContent content; @@ -31,43 +54,42 @@ public Log content(LogContent content) { } /** - * JSON object containing all log attributes and their associated values. - * + *

JSON object containing all log attributes and their associated values.

* @return content - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogContent getContent() { - return content; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogContent getContent() { + return content; + } public void setContent(LogContent content) { this.content = content; } - public Log id(String id) { this.id = id; return this; } /** - * Unique ID of the Log. - * + *

Unique ID of the Log.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - /** Return true if this Log object is equal to o. */ + /** + * Return true if this Log object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,9 +102,10 @@ public boolean equals(Object o) { return Objects.equals(this.content, log.content) && Objects.equals(this.id, log.id); } + @Override public int hashCode() { - return Objects.hash(content, id); + return Objects.hash(content,id); } @Override @@ -96,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogContent.java b/src/main/java/com/datadog/api/client/v1/model/LogContent.java index 3a2576de241..a4ae87b85fe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogContent.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogContent.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** JSON object containing all log attributes and their associated values. */ +/** + *

JSON object containing all log attributes and their associated values.

+ */ @JsonPropertyOrder({ LogContent.JSON_PROPERTY_ATTRIBUTES, LogContent.JSON_PROPERTY_HOST, @@ -28,10 +41,10 @@ LogContent.JSON_PROPERTY_TAGS, LogContent.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogContent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private Map attributes = null; @@ -48,7 +61,6 @@ public class LogContent { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -56,7 +68,6 @@ public LogContent attributes(Map attributes) { this.attributes = attributes; return this; } - public LogContent putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); @@ -66,94 +77,84 @@ public LogContent putAttributesItem(String key, Object attributesItem) { } /** - * JSON object of attributes from your log. - * + *

JSON object of attributes from your log.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } public void setAttributes(Map attributes) { this.attributes = attributes; } - public LogContent host(String host) { this.host = host; return this; } /** - * Name of the machine from where the logs are being sent. - * + *

Name of the machine from where the logs are being sent.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public LogContent message(String message) { this.message = message; return this; } /** - * The message reserved - * attribute of your log. By default, Datadog ingests the value of the message attribute as - * the body of the log entry. That value is then highlighted and displayed in the Logstream, where - * it is indexed for full text search. - * + *

The message reserved attribute + * of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. + * That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public LogContent service(String service) { this.service = service; return this; } /** - * The name of the application or service generating the log events. It is used to switch from - * Logs to APM, so make sure you define the same value when you use both products. - * + *

The name of the application or service generating the log events. + * It is used to switch from Logs to APM, so make sure you define the same + * value when you use both products.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public LogContent tags(List tags) { this.tags = tags; return this; } - public LogContent addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -163,43 +164,42 @@ public LogContent addTagsItem(String tagsItem) { } /** - * Array of tags associated with your log. - * + *

Array of tags associated with your log.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public LogContent timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * Timestamp of your log. - * + *

Timestamp of your log.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this LogContent object is equal to o. */ + /** + * Return true if this LogContent object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -209,17 +209,13 @@ public boolean equals(Object o) { return false; } LogContent logContent = (LogContent) o; - return Objects.equals(this.attributes, logContent.attributes) - && Objects.equals(this.host, logContent.host) - && Objects.equals(this.message, logContent.message) - && Objects.equals(this.service, logContent.service) - && Objects.equals(this.tags, logContent.tags) - && Objects.equals(this.timestamp, logContent.timestamp); + return Objects.equals(this.attributes, logContent.attributes) && Objects.equals(this.host, logContent.host) && Objects.equals(this.message, logContent.message) && Objects.equals(this.service, logContent.service) && Objects.equals(this.tags, logContent.tags) && Objects.equals(this.timestamp, logContent.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, host, message, service, tags, timestamp); + return Objects.hash(attributes,host,message,service,tags,timestamp); } @Override @@ -237,7 +233,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinition.java index 560cd3f7e9a..a7e5c22f05e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinition.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The log query. */ +/** + *

The log query.

+ */ @JsonPropertyOrder({ LogQueryDefinition.JSON_PROPERTY_COMPUTE, LogQueryDefinition.JSON_PROPERTY_GROUP_BY, @@ -22,10 +40,10 @@ LogQueryDefinition.JSON_PROPERTY_MULTI_COMPUTE, LogQueryDefinition.JSON_PROPERTY_SEARCH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private LogsQueryCompute compute; @@ -48,21 +66,19 @@ public LogQueryDefinition compute(LogsQueryCompute compute) { } /** - * Define computation for a log query. - * + *

Define computation for a log query.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsQueryCompute getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsQueryCompute getCompute() { + return compute; + } public void setCompute(LogsQueryCompute compute) { this.compute = compute; } - public LogQueryDefinition groupBy(List groupBy) { this.groupBy = groupBy; for (LogQueryDefinitionGroupBy item : groupBy) { @@ -70,7 +86,6 @@ public LogQueryDefinition groupBy(List groupBy) { } return this; } - public LogQueryDefinition addGroupByItem(LogQueryDefinitionGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -81,43 +96,38 @@ public LogQueryDefinition addGroupByItem(LogQueryDefinitionGroupBy groupByItem) } /** - * List of tag prefixes to group by in the case of a cluster check. - * + *

List of tag prefixes to group by in the case of a cluster check.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public LogQueryDefinition index(String index) { this.index = index; return this; } /** - * A coma separated-list of index names. Use "*" query all indexes at once. Multiple Indexes - * + *

A coma separated-list of index names. Use "*" query all indexes at once. Multiple Indexes

* @return index - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIndex() { - return index; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIndex() { + return index; + } public void setIndex(String index) { this.index = index; } - public LogQueryDefinition multiCompute(List multiCompute) { this.multiCompute = multiCompute; for (LogsQueryCompute item : multiCompute) { @@ -125,7 +135,6 @@ public LogQueryDefinition multiCompute(List multiCompute) { } return this; } - public LogQueryDefinition addMultiComputeItem(LogsQueryCompute multiComputeItem) { if (this.multiCompute == null) { this.multiCompute = new ArrayList<>(); @@ -136,21 +145,19 @@ public LogQueryDefinition addMultiComputeItem(LogsQueryCompute multiComputeItem) } /** - * This field is mutually exclusive with compute. - * + *

This field is mutually exclusive with compute.

* @return multiCompute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MULTI_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMultiCompute() { - return multiCompute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTI_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMultiCompute() { + return multiCompute; + } public void setMultiCompute(List multiCompute) { this.multiCompute = multiCompute; } - public LogQueryDefinition search(LogQueryDefinitionSearch search) { this.search = search; this.unparsed |= search.unparsed; @@ -158,22 +165,23 @@ public LogQueryDefinition search(LogQueryDefinitionSearch search) { } /** - * The query being made on the logs. - * + *

The query being made on the logs.

* @return search - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEARCH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinitionSearch getSearch() { - return search; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinitionSearch getSearch() { + return search; + } public void setSearch(LogQueryDefinitionSearch search) { this.search = search; } - /** Return true if this LogQueryDefinition object is equal to o. */ + /** + * Return true if this LogQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,16 +191,13 @@ public boolean equals(Object o) { return false; } LogQueryDefinition logQueryDefinition = (LogQueryDefinition) o; - return Objects.equals(this.compute, logQueryDefinition.compute) - && Objects.equals(this.groupBy, logQueryDefinition.groupBy) - && Objects.equals(this.index, logQueryDefinition.index) - && Objects.equals(this.multiCompute, logQueryDefinition.multiCompute) - && Objects.equals(this.search, logQueryDefinition.search); + return Objects.equals(this.compute, logQueryDefinition.compute) && Objects.equals(this.groupBy, logQueryDefinition.groupBy) && Objects.equals(this.index, logQueryDefinition.index) && Objects.equals(this.multiCompute, logQueryDefinition.multiCompute) && Objects.equals(this.search, logQueryDefinition.search); } + @Override public int hashCode() { - return Objects.hash(compute, groupBy, index, multiCompute, search); + return Objects.hash(compute,groupBy,index,multiCompute,search); } @Override @@ -209,7 +214,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBy.java b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBy.java index d0ae6ebabe8..9d7f591c177 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBy.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Defined items in the group. */ + +/** + *

Defined items in the group.

+ */ @JsonPropertyOrder({ LogQueryDefinitionGroupBy.JSON_PROPERTY_FACET, LogQueryDefinitionGroupBy.JSON_PROPERTY_LIMIT, LogQueryDefinitionGroupBy.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogQueryDefinitionGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -36,51 +55,46 @@ public LogQueryDefinitionGroupBy() {} @JsonCreator public LogQueryDefinitionGroupBy( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public LogQueryDefinitionGroupBy facet(String facet) { this.facet = facet; return this; } /** - * Facet name. - * + *

Facet name.

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public LogQueryDefinitionGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * Maximum number of items in the group. - * + *

Maximum number of items in the group.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public LogQueryDefinitionGroupBy sort(LogQueryDefinitionGroupBySort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -88,22 +102,23 @@ public LogQueryDefinitionGroupBy sort(LogQueryDefinitionGroupBySort sort) { } /** - * Define a sorting method. - * + *

Define a sorting method.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinitionGroupBySort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinitionGroupBySort getSort() { + return sort; + } public void setSort(LogQueryDefinitionGroupBySort sort) { this.sort = sort; } - /** Return true if this LogQueryDefinitionGroupBy object is equal to o. */ + /** + * Return true if this LogQueryDefinitionGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,14 +128,13 @@ public boolean equals(Object o) { return false; } LogQueryDefinitionGroupBy logQueryDefinitionGroupBy = (LogQueryDefinitionGroupBy) o; - return Objects.equals(this.facet, logQueryDefinitionGroupBy.facet) - && Objects.equals(this.limit, logQueryDefinitionGroupBy.limit) - && Objects.equals(this.sort, logQueryDefinitionGroupBy.sort); + return Objects.equals(this.facet, logQueryDefinitionGroupBy.facet) && Objects.equals(this.limit, logQueryDefinitionGroupBy.limit) && Objects.equals(this.sort, logQueryDefinitionGroupBy.sort); } + @Override public int hashCode() { - return Objects.hash(facet, limit, sort); + return Objects.hash(facet,limit,sort); } @Override @@ -135,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBySort.java b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBySort.java index 96cd0b24993..75ab31ff993 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBySort.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionGroupBySort.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Define a sorting method. */ + +/** + *

Define a sorting method.

+ */ @JsonPropertyOrder({ LogQueryDefinitionGroupBySort.JSON_PROPERTY_AGGREGATION, LogQueryDefinitionGroupBySort.JSON_PROPERTY_FACET, LogQueryDefinitionGroupBySort.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogQueryDefinitionGroupBySort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private String aggregation; @@ -36,54 +55,49 @@ public LogQueryDefinitionGroupBySort() {} @JsonCreator public LogQueryDefinitionGroupBySort( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) String aggregation, - @JsonProperty(required = true, value = JSON_PROPERTY_ORDER) WidgetSort order) { - this.aggregation = aggregation; - this.order = order; - this.unparsed |= !order.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)String aggregation, + @JsonProperty(required=true, value=JSON_PROPERTY_ORDER)WidgetSort order) { + this.aggregation = aggregation; + this.order = order; + this.unparsed |= !order.isValid(); } - public LogQueryDefinitionGroupBySort aggregation(String aggregation) { this.aggregation = aggregation; return this; } /** - * The aggregation method. - * + *

The aggregation method.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAggregation() { + return aggregation; + } public void setAggregation(String aggregation) { this.aggregation = aggregation; } - public LogQueryDefinitionGroupBySort facet(String facet) { this.facet = facet; return this; } /** - * Facet name. - * + *

Facet name.

* @return facet - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFacet() { - return facet; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public LogQueryDefinitionGroupBySort order(WidgetSort order) { this.order = order; this.unparsed |= !order.isValid(); @@ -91,24 +105,25 @@ public LogQueryDefinitionGroupBySort order(WidgetSort order) { } /** - * Widget sorting methods. - * + *

Widget sorting methods.

* @return order - */ - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetSort getOrder() { - return order; - } - + **/ + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetSort getOrder() { + return order; + } public void setOrder(WidgetSort order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this LogQueryDefinitionGroupBySort object is equal to o. */ + /** + * Return true if this LogQueryDefinitionGroupBySort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +133,13 @@ public boolean equals(Object o) { return false; } LogQueryDefinitionGroupBySort logQueryDefinitionGroupBySort = (LogQueryDefinitionGroupBySort) o; - return Objects.equals(this.aggregation, logQueryDefinitionGroupBySort.aggregation) - && Objects.equals(this.facet, logQueryDefinitionGroupBySort.facet) - && Objects.equals(this.order, logQueryDefinitionGroupBySort.order); + return Objects.equals(this.aggregation, logQueryDefinitionGroupBySort.aggregation) && Objects.equals(this.facet, logQueryDefinitionGroupBySort.facet) && Objects.equals(this.order, logQueryDefinitionGroupBySort.order); } + @Override public int hashCode() { - return Objects.hash(aggregation, facet, order); + return Objects.hash(aggregation,facet,order); } @Override @@ -140,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionSearch.java b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionSearch.java index b5fb14a487b..24209d49b2f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionSearch.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogQueryDefinitionSearch.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The query being made on the logs. */ -@JsonPropertyOrder({LogQueryDefinitionSearch.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The query being made on the logs.

+ */ +@JsonPropertyOrder({ + LogQueryDefinitionSearch.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogQueryDefinitionSearch { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -26,31 +47,31 @@ public LogQueryDefinitionSearch() {} @JsonCreator public LogQueryDefinitionSearch( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.query = query; } - public LogQueryDefinitionSearch query(String query) { this.query = query; return this; } /** - * Search value to apply. - * + *

Search value to apply.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this LogQueryDefinitionSearch object is equal to o. */ + /** + * Return true if this LogQueryDefinitionSearch object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.query, logQueryDefinitionSearch.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinition.java index 253e1a26f27..8b38fbf3ecd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The Log Stream displays a log flow matching the defined query. Only available on FREE layout - * dashboards. + *

The Log Stream displays a log flow matching the defined query. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ LogStreamWidgetDefinition.JSON_PROPERTY_COLUMNS, @@ -34,10 +48,10 @@ LogStreamWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, LogStreamWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogStreamWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLUMNS = "columns"; private List columns = null; @@ -81,17 +95,14 @@ public LogStreamWidgetDefinition() {} @JsonCreator public LogStreamWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - LogStreamWidgetDefinitionType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogStreamWidgetDefinitionType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public LogStreamWidgetDefinition columns(List columns) { this.columns = columns; return this; } - public LogStreamWidgetDefinition addColumnsItem(String columnsItem) { if (this.columns == null) { this.columns = new ArrayList<>(); @@ -101,26 +112,23 @@ public LogStreamWidgetDefinition addColumnsItem(String columnsItem) { } /** - * Which columns to display on the widget. - * + *

Which columns to display on the widget.

* @return columns - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLUMNS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getColumns() { - return columns; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } public void setColumns(List columns) { this.columns = columns; } - public LogStreamWidgetDefinition indexes(List indexes) { this.indexes = indexes; return this; } - public LogStreamWidgetDefinition addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -130,45 +138,41 @@ public LogStreamWidgetDefinition addIndexesItem(String indexesItem) { } /** - * An array of index names to query in the stream. Use [] to query all indexes at once. - * + *

An array of index names to query in the stream. Use [] to query all indexes at once.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public LogStreamWidgetDefinition logset(String logset) { this.logset = logset; return this; } /** - * ID of the log set to use. - * + *

ID of the log set to use.

* @return logset * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLogset() { - return logset; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLogset() { + return logset; + } @Deprecated public void setLogset(String logset) { this.logset = logset; } - public LogStreamWidgetDefinition messageDisplay(WidgetMessageDisplay messageDisplay) { this.messageDisplay = messageDisplay; this.unparsed |= !messageDisplay.isValid(); @@ -176,87 +180,79 @@ public LogStreamWidgetDefinition messageDisplay(WidgetMessageDisplay messageDisp } /** - * Amount of log lines to display - * + *

Amount of log lines to display

* @return messageDisplay - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE_DISPLAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetMessageDisplay getMessageDisplay() { - return messageDisplay; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE_DISPLAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetMessageDisplay getMessageDisplay() { + return messageDisplay; + } public void setMessageDisplay(WidgetMessageDisplay messageDisplay) { if (!messageDisplay.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.messageDisplay = messageDisplay; } - public LogStreamWidgetDefinition query(String query) { this.query = query; return this; } /** - * Query to filter the log stream with. - * + *

Query to filter the log stream with.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public LogStreamWidgetDefinition showDateColumn(Boolean showDateColumn) { this.showDateColumn = showDateColumn; return this; } /** - * Whether to show the date column or not - * + *

Whether to show the date column or not

* @return showDateColumn - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_DATE_COLUMN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowDateColumn() { - return showDateColumn; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_DATE_COLUMN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowDateColumn() { + return showDateColumn; + } public void setShowDateColumn(Boolean showDateColumn) { this.showDateColumn = showDateColumn; } - public LogStreamWidgetDefinition showMessageColumn(Boolean showMessageColumn) { this.showMessageColumn = showMessageColumn; return this; } /** - * Whether to show the message column or not - * + *

Whether to show the message column or not

* @return showMessageColumn - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_MESSAGE_COLUMN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowMessageColumn() { - return showMessageColumn; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_MESSAGE_COLUMN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowMessageColumn() { + return showMessageColumn; + } public void setShowMessageColumn(Boolean showMessageColumn) { this.showMessageColumn = showMessageColumn; } - public LogStreamWidgetDefinition sort(WidgetFieldSort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -264,21 +260,19 @@ public LogStreamWidgetDefinition sort(WidgetFieldSort sort) { } /** - * Which column and order to sort by - * + *

Which column and order to sort by

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetFieldSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetFieldSort getSort() { + return sort; + } public void setSort(WidgetFieldSort sort) { this.sort = sort; } - public LogStreamWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -286,42 +280,38 @@ public LogStreamWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public LogStreamWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public LogStreamWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -329,45 +319,41 @@ public LogStreamWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public LogStreamWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public LogStreamWidgetDefinition type(LogStreamWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -375,24 +361,25 @@ public LogStreamWidgetDefinition type(LogStreamWidgetDefinitionType type) { } /** - * Type of the log stream widget. - * + *

Type of the log stream widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogStreamWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogStreamWidgetDefinitionType getType() { + return type; + } public void setType(LogStreamWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogStreamWidgetDefinition object is equal to o. */ + /** + * Return true if this LogStreamWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -402,37 +389,13 @@ public boolean equals(Object o) { return false; } LogStreamWidgetDefinition logStreamWidgetDefinition = (LogStreamWidgetDefinition) o; - return Objects.equals(this.columns, logStreamWidgetDefinition.columns) - && Objects.equals(this.indexes, logStreamWidgetDefinition.indexes) - && Objects.equals(this.logset, logStreamWidgetDefinition.logset) - && Objects.equals(this.messageDisplay, logStreamWidgetDefinition.messageDisplay) - && Objects.equals(this.query, logStreamWidgetDefinition.query) - && Objects.equals(this.showDateColumn, logStreamWidgetDefinition.showDateColumn) - && Objects.equals(this.showMessageColumn, logStreamWidgetDefinition.showMessageColumn) - && Objects.equals(this.sort, logStreamWidgetDefinition.sort) - && Objects.equals(this.time, logStreamWidgetDefinition.time) - && Objects.equals(this.title, logStreamWidgetDefinition.title) - && Objects.equals(this.titleAlign, logStreamWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, logStreamWidgetDefinition.titleSize) - && Objects.equals(this.type, logStreamWidgetDefinition.type); + return Objects.equals(this.columns, logStreamWidgetDefinition.columns) && Objects.equals(this.indexes, logStreamWidgetDefinition.indexes) && Objects.equals(this.logset, logStreamWidgetDefinition.logset) && Objects.equals(this.messageDisplay, logStreamWidgetDefinition.messageDisplay) && Objects.equals(this.query, logStreamWidgetDefinition.query) && Objects.equals(this.showDateColumn, logStreamWidgetDefinition.showDateColumn) && Objects.equals(this.showMessageColumn, logStreamWidgetDefinition.showMessageColumn) && Objects.equals(this.sort, logStreamWidgetDefinition.sort) && Objects.equals(this.time, logStreamWidgetDefinition.time) && Objects.equals(this.title, logStreamWidgetDefinition.title) && Objects.equals(this.titleAlign, logStreamWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, logStreamWidgetDefinition.titleSize) && Objects.equals(this.type, logStreamWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - columns, - indexes, - logset, - messageDisplay, - query, - showDateColumn, - showMessageColumn, - sort, - time, - title, - titleAlign, - titleSize, - type); + return Objects.hash(columns,indexes,logset,messageDisplay,query,showDateColumn,showMessageColumn,sort,time,title,titleAlign,titleSize,type); } @Override @@ -457,7 +420,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinitionType.java index e11590dc926..1495bbc0011 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogStreamWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the log stream widget. */ +/** + *

Type of the log stream widget.

+ */ @JsonSerialize(using = LogStreamWidgetDefinitionType.LogStreamWidgetDefinitionTypeSerializer.class) public class LogStreamWidgetDefinitionType { - public static final LogStreamWidgetDefinitionType LOG_STREAM = - new LogStreamWidgetDefinitionType("log_stream"); + public static final LogStreamWidgetDefinitionType LOG_STREAM = new LogStreamWidgetDefinitionType("log_stream"); private static final Set allowedValues = new HashSet(Arrays.asList("log_stream")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogStreamWidgetDefinitionTypeSerializer - extends StdSerializer { - public LogStreamWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class LogStreamWidgetDefinitionTypeSerializer extends StdSerializer { + public LogStreamWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public LogStreamWidgetDefinitionTypeSerializer() { - this(null); - } + public LogStreamWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogStreamWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogStreamWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogStreamWidgetDefinitionType object is equal to o. */ + /** + * Return true if this LogStreamWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsAPIError.java b/src/main/java/com/datadog/api/client/v1/model/LogsAPIError.java index 96fdd477a0a..fa7bdc9210c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsAPIError.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsAPIError.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Error returned by the Logs API */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Error returned by the Logs API

+ */ @JsonPropertyOrder({ LogsAPIError.JSON_PROPERTY_CODE, LogsAPIError.JSON_PROPERTY_DETAILS, LogsAPIError.JSON_PROPERTY_MESSAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAPIError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -39,21 +57,19 @@ public LogsAPIError code(String code) { } /** - * Code identifying the error - * + *

Code identifying the error

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public LogsAPIError details(List details) { this.details = details; for (LogsAPIError item : details) { @@ -61,7 +77,6 @@ public LogsAPIError details(List details) { } return this; } - public LogsAPIError addDetailsItem(LogsAPIError detailsItem) { if (this.details == null) { this.details = new ArrayList<>(); @@ -72,43 +87,42 @@ public LogsAPIError addDetailsItem(LogsAPIError detailsItem) { } /** - * Additional error details - * + *

Additional error details

* @return details - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDetails() { - return details; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDetails() { + return details; + } public void setDetails(List details) { this.details = details; } - public LogsAPIError message(String message) { this.message = message; return this; } /** - * Error message - * + *

Error message

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this LogsAPIError object is equal to o. */ + /** + * Return true if this LogsAPIError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +132,13 @@ public boolean equals(Object o) { return false; } LogsAPIError logsApiError = (LogsAPIError) o; - return Objects.equals(this.code, logsApiError.code) - && Objects.equals(this.details, logsApiError.details) - && Objects.equals(this.message, logsApiError.message); + return Objects.equals(this.code, logsApiError.code) && Objects.equals(this.details, logsApiError.details) && Objects.equals(this.message, logsApiError.message); } + @Override public int hashCode() { - return Objects.hash(code, details, message); + return Objects.hash(code,details,message); } @Override @@ -140,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsAPIErrorResponse.java b/src/main/java/com/datadog/api/client/v1/model/LogsAPIErrorResponse.java index fdad1e0b579..7e6968e509e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsAPIErrorResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsAPIErrorResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response returned by the Logs API when errors occur. */ -@JsonPropertyOrder({LogsAPIErrorResponse.JSON_PROPERTY_ERROR}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response returned by the Logs API when errors occur.

+ */ +@JsonPropertyOrder({ + LogsAPIErrorResponse.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAPIErrorResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR = "error"; private LogsAPIError error; @@ -28,22 +50,23 @@ public LogsAPIErrorResponse error(LogsAPIError error) { } /** - * Error returned by the Logs API - * + *

Error returned by the Logs API

* @return error - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAPIError getError() { - return error; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAPIError getError() { + return error; + } public void setError(LogsAPIError error) { this.error = error; } - /** Return true if this LogsAPIErrorResponse object is equal to o. */ + /** + * Return true if this LogsAPIErrorResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.error, logsApiErrorResponse.error); } + @Override public int hashCode() { return Objects.hash(error); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessor.java b/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessor.java index f7047043f52..3ccb37b2f12 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessor.java @@ -6,40 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use the Arithmetic Processor to add a new attribute (without spaces or special characters in the - * new attribute name) to a log with the result of the provided formula. This enables you to remap - * different time attributes with different units into a single attribute, or to compute operations - * on attributes within the same log. - * - *

The formula can use parentheses and the basic arithmetic operators -, + - * , *, /. - * - *

By default, the calculation is skipped if an attribute is missing. Select “Replace missing - * attribute by 0” to automatically populate missing attribute values with 0 to ensure that the - * calculation is done. An attribute is missing if it is not found in the log attributes, or if it - * cannot be converted to a number. - * - *

Notes: - * - *

    - *
  • The operator - needs to be space split in the formula as it can also be - * contained in attribute names. - *
  • If the target attribute already exists, it is overwritten by the result of the formula. - *
  • Results are rounded up to the 9th decimal. For example, if the result of the formula is - * 0.1234567891, the actual value stored for the attribute is 0.123456789 - * . - *
  • If you need to scale a unit of measure, see Scale - * Filter. - *
+ *

Use the Arithmetic Processor to add a new attribute (without spaces or special characters + * in the new attribute name) to a log with the result of the provided formula. + * This enables you to remap different time attributes with different units into a single attribute, + * or to compute operations on attributes within the same log.

+ *

The formula can use parentheses and the basic arithmetic operators -, +, *, /.

+ *

By default, the calculation is skipped if an attribute is missing. + * Select “Replace missing attribute by 0” to automatically populate + * missing attribute values with 0 to ensure that the calculation is done. + * An attribute is missing if it is not found in the log attributes, + * or if it cannot be converted to a number.

+ *

Notes:

+ *
    + *
  • The operator - needs to be space split in the formula as it can also be contained in attribute names.
  • + *
  • If the target attribute already exists, it is overwritten by the result of the formula.
  • + *
  • Results are rounded up to the 9th decimal. For example, if the result of the formula is 0.1234567891, + * the actual value stored for the attribute is 0.123456789.
  • + *
  • If you need to scale a unit of measure, + * see Scale Filter.
  • + *
*/ @JsonPropertyOrder({ LogsArithmeticProcessor.JSON_PROPERTY_EXPRESSION, @@ -49,10 +59,10 @@ LogsArithmeticProcessor.JSON_PROPERTY_TARGET, LogsArithmeticProcessor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArithmeticProcessor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXPRESSION = "expression"; private String expression; @@ -75,119 +85,108 @@ public LogsArithmeticProcessor() {} @JsonCreator public LogsArithmeticProcessor( - @JsonProperty(required = true, value = JSON_PROPERTY_EXPRESSION) String expression, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsArithmeticProcessorType type) { - this.expression = expression; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_EXPRESSION)String expression, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsArithmeticProcessorType type) { + this.expression = expression; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsArithmeticProcessor expression(String expression) { this.expression = expression; return this; } /** - * Arithmetic operation between one or more log attributes. - * + *

Arithmetic operation between one or more log attributes.

* @return expression - */ - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getExpression() { - return expression; - } - + **/ + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getExpression() { + return expression; + } public void setExpression(String expression) { this.expression = expression; } - public LogsArithmeticProcessor isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsArithmeticProcessor isReplaceMissing(Boolean isReplaceMissing) { this.isReplaceMissing = isReplaceMissing; return this; } /** - * If true, it replaces all missing attributes of expression by 0, - * false skip the operation if an attribute is missing. - * + *

If true, it replaces all missing attributes of expression by 0, false + * skip the operation if an attribute is missing.

* @return isReplaceMissing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_REPLACE_MISSING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsReplaceMissing() { - return isReplaceMissing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_REPLACE_MISSING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsReplaceMissing() { + return isReplaceMissing; + } public void setIsReplaceMissing(Boolean isReplaceMissing) { this.isReplaceMissing = isReplaceMissing; } - public LogsArithmeticProcessor name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsArithmeticProcessor target(String target) { this.target = target; return this; } /** - * Name of the attribute that contains the result of the arithmetic operation. - * + *

Name of the attribute that contains the result of the arithmetic operation.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsArithmeticProcessor type(LogsArithmeticProcessorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -195,24 +194,25 @@ public LogsArithmeticProcessor type(LogsArithmeticProcessorType type) { } /** - * Type of logs arithmetic processor. - * + *

Type of logs arithmetic processor.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArithmeticProcessorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArithmeticProcessorType getType() { + return type; + } public void setType(LogsArithmeticProcessorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsArithmeticProcessor object is equal to o. */ + /** + * Return true if this LogsArithmeticProcessor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -222,17 +222,13 @@ public boolean equals(Object o) { return false; } LogsArithmeticProcessor logsArithmeticProcessor = (LogsArithmeticProcessor) o; - return Objects.equals(this.expression, logsArithmeticProcessor.expression) - && Objects.equals(this.isEnabled, logsArithmeticProcessor.isEnabled) - && Objects.equals(this.isReplaceMissing, logsArithmeticProcessor.isReplaceMissing) - && Objects.equals(this.name, logsArithmeticProcessor.name) - && Objects.equals(this.target, logsArithmeticProcessor.target) - && Objects.equals(this.type, logsArithmeticProcessor.type); + return Objects.equals(this.expression, logsArithmeticProcessor.expression) && Objects.equals(this.isEnabled, logsArithmeticProcessor.isEnabled) && Objects.equals(this.isReplaceMissing, logsArithmeticProcessor.isReplaceMissing) && Objects.equals(this.name, logsArithmeticProcessor.name) && Objects.equals(this.target, logsArithmeticProcessor.target) && Objects.equals(this.type, logsArithmeticProcessor.type); } + @Override public int hashCode() { - return Objects.hash(expression, isEnabled, isReplaceMissing, name, target, type); + return Objects.hash(expression,isEnabled,isReplaceMissing,name,target,type); } @Override @@ -250,7 +246,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessorType.java b/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessorType.java index d8bfe5a6099..313265ee56f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsArithmeticProcessorType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs arithmetic processor. */ +/** + *

Type of logs arithmetic processor.

+ */ @JsonSerialize(using = LogsArithmeticProcessorType.LogsArithmeticProcessorTypeSerializer.class) public class LogsArithmeticProcessorType { - public static final LogsArithmeticProcessorType ARITHMETIC_PROCESSOR = - new LogsArithmeticProcessorType("arithmetic-processor"); + public static final LogsArithmeticProcessorType ARITHMETIC_PROCESSOR = new LogsArithmeticProcessorType("arithmetic-processor"); - private static final Set allowedValues = - new HashSet(Arrays.asList("arithmetic-processor")); + private static final Set allowedValues = new HashSet(Arrays.asList("arithmetic-processor")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsArithmeticProcessorTypeSerializer - extends StdSerializer { - public LogsArithmeticProcessorTypeSerializer(Class t) { - super(t); - } + public static class LogsArithmeticProcessorTypeSerializer extends StdSerializer { + public LogsArithmeticProcessorTypeSerializer(Class t) { + super(t); + } - public LogsArithmeticProcessorTypeSerializer() { - this(null); - } + public LogsArithmeticProcessorTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsArithmeticProcessorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsArithmeticProcessorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsArithmeticProcessorType object is equal to o. */ + /** + * Return true if this LogsArithmeticProcessorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapper.java b/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapper.java index c46fcfb42a0..c9a8762143d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapper.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapper.java @@ -6,21 +6,34 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The remapper processor remaps any source attribute(s) or tag to another target attribute or tag. - * Constraints on the tag/attribute name are explained in the Tag Best Practice - * documentation. Some additional constraints are applied as : or , - * are not allowed in the target tag/attribute name. + *

The remapper processor remaps any source attribute(s) or tag to another target attribute or tag. + * Constraints on the tag/attribute name are explained in the Tag Best Practice documentation. + * Some additional constraints are applied as : or , are not allowed in the target tag/attribute name.

*/ @JsonPropertyOrder({ LogsAttributeRemapper.JSON_PROPERTY_IS_ENABLED, @@ -34,10 +47,10 @@ LogsAttributeRemapper.JSON_PROPERTY_TARGET_TYPE, LogsAttributeRemapper.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAttributeRemapper { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -72,165 +85,149 @@ public LogsAttributeRemapper() {} @JsonCreator public LogsAttributeRemapper( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsAttributeRemapperType type) { - this.sources = sources; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsAttributeRemapperType type) { + this.sources = sources; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsAttributeRemapper isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsAttributeRemapper name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsAttributeRemapper overrideOnConflict(Boolean overrideOnConflict) { this.overrideOnConflict = overrideOnConflict; return this; } /** - * Override or not the target element if already set, - * + *

Override or not the target element if already set,

* @return overrideOnConflict - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERRIDE_ON_CONFLICT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getOverrideOnConflict() { - return overrideOnConflict; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERRIDE_ON_CONFLICT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOverrideOnConflict() { + return overrideOnConflict; + } public void setOverrideOnConflict(Boolean overrideOnConflict) { this.overrideOnConflict = overrideOnConflict; } - public LogsAttributeRemapper preserveSource(Boolean preserveSource) { this.preserveSource = preserveSource; return this; } /** - * Remove or preserve the remapped source element. - * + *

Remove or preserve the remapped source element.

* @return preserveSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRESERVE_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPreserveSource() { - return preserveSource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRESERVE_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPreserveSource() { + return preserveSource; + } public void setPreserveSource(Boolean preserveSource) { this.preserveSource = preserveSource; } - public LogsAttributeRemapper sourceType(String sourceType) { this.sourceType = sourceType; return this; } /** - * Defines if the sources are from log attribute or tag. - * + *

Defines if the sources are from log attribute or tag.

* @return sourceType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceType() { - return sourceType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceType() { + return sourceType; + } public void setSourceType(String sourceType) { this.sourceType = sourceType; } - public LogsAttributeRemapper sources(List sources) { this.sources = sources; return this; } - public LogsAttributeRemapper addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsAttributeRemapper target(String target) { this.target = target; return this; } /** - * Final attribute or tag name to remap the sources to. - * + *

Final attribute or tag name to remap the sources to.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsAttributeRemapper targetFormat(TargetFormatType targetFormat) { this.targetFormat = targetFormat; this.unparsed |= !targetFormat.isValid(); @@ -238,49 +235,43 @@ public LogsAttributeRemapper targetFormat(TargetFormatType targetFormat) { } /** - * If the target_type of the remapper is attribute, try to cast the - * value to a new specific type. If the cast is not possible, the original type is kept. - * string, integer, or double are the possible types. If the - * target_type is tag, this parameter may not be specified. - * + *

If the target_type of the remapper is attribute, try to cast the value to a new specific type. + * If the cast is not possible, the original type is kept. string, integer, or double are the possible types. + * If the target_type is tag, this parameter may not be specified.

* @return targetFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TargetFormatType getTargetFormat() { - return targetFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TargetFormatType getTargetFormat() { + return targetFormat; + } public void setTargetFormat(TargetFormatType targetFormat) { if (!targetFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.targetFormat = targetFormat; } - public LogsAttributeRemapper targetType(String targetType) { this.targetType = targetType; return this; } /** - * Defines if the final attribute or tag name is from log attribute or tag - * . - * + *

Defines if the final attribute or tag name is from log attribute or tag.

* @return targetType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTargetType() { - return targetType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTargetType() { + return targetType; + } public void setTargetType(String targetType) { this.targetType = targetType; } - public LogsAttributeRemapper type(LogsAttributeRemapperType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -288,24 +279,25 @@ public LogsAttributeRemapper type(LogsAttributeRemapperType type) { } /** - * Type of logs attribute remapper. - * + *

Type of logs attribute remapper.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsAttributeRemapperType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsAttributeRemapperType getType() { + return type; + } public void setType(LogsAttributeRemapperType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsAttributeRemapper object is equal to o. */ + /** + * Return true if this LogsAttributeRemapper object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -315,31 +307,13 @@ public boolean equals(Object o) { return false; } LogsAttributeRemapper logsAttributeRemapper = (LogsAttributeRemapper) o; - return Objects.equals(this.isEnabled, logsAttributeRemapper.isEnabled) - && Objects.equals(this.name, logsAttributeRemapper.name) - && Objects.equals(this.overrideOnConflict, logsAttributeRemapper.overrideOnConflict) - && Objects.equals(this.preserveSource, logsAttributeRemapper.preserveSource) - && Objects.equals(this.sourceType, logsAttributeRemapper.sourceType) - && Objects.equals(this.sources, logsAttributeRemapper.sources) - && Objects.equals(this.target, logsAttributeRemapper.target) - && Objects.equals(this.targetFormat, logsAttributeRemapper.targetFormat) - && Objects.equals(this.targetType, logsAttributeRemapper.targetType) - && Objects.equals(this.type, logsAttributeRemapper.type); + return Objects.equals(this.isEnabled, logsAttributeRemapper.isEnabled) && Objects.equals(this.name, logsAttributeRemapper.name) && Objects.equals(this.overrideOnConflict, logsAttributeRemapper.overrideOnConflict) && Objects.equals(this.preserveSource, logsAttributeRemapper.preserveSource) && Objects.equals(this.sourceType, logsAttributeRemapper.sourceType) && Objects.equals(this.sources, logsAttributeRemapper.sources) && Objects.equals(this.target, logsAttributeRemapper.target) && Objects.equals(this.targetFormat, logsAttributeRemapper.targetFormat) && Objects.equals(this.targetType, logsAttributeRemapper.targetType) && Objects.equals(this.type, logsAttributeRemapper.type); } + @Override public int hashCode() { - return Objects.hash( - isEnabled, - name, - overrideOnConflict, - preserveSource, - sourceType, - sources, - target, - targetFormat, - targetType, - type); + return Objects.hash(isEnabled,name,overrideOnConflict,preserveSource,sourceType,sources,target,targetFormat,targetType,type); } @Override @@ -361,7 +335,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapperType.java b/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapperType.java index 8cb6c39cb55..d81a402bb4a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapperType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsAttributeRemapperType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs attribute remapper. */ +/** + *

Type of logs attribute remapper.

+ */ @JsonSerialize(using = LogsAttributeRemapperType.LogsAttributeRemapperTypeSerializer.class) public class LogsAttributeRemapperType { - public static final LogsAttributeRemapperType ATTRIBUTE_REMAPPER = - new LogsAttributeRemapperType("attribute-remapper"); + public static final LogsAttributeRemapperType ATTRIBUTE_REMAPPER = new LogsAttributeRemapperType("attribute-remapper"); - private static final Set allowedValues = - new HashSet(Arrays.asList("attribute-remapper")); + private static final Set allowedValues = new HashSet(Arrays.asList("attribute-remapper")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsAttributeRemapperTypeSerializer - extends StdSerializer { - public LogsAttributeRemapperTypeSerializer(Class t) { - super(t); - } + public static class LogsAttributeRemapperTypeSerializer extends StdSerializer { + public LogsAttributeRemapperTypeSerializer(Class t) { + super(t); + } - public LogsAttributeRemapperTypeSerializer() { - this(null); - } + public LogsAttributeRemapperTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsAttributeRemapperType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsAttributeRemapperType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsAttributeRemapperType object is equal to o. */ + /** + * Return true if this LogsAttributeRemapperType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsByRetention.java b/src/main/java/com/datadog/api/client/v1/model/LogsByRetention.java index ab7e0dbade2..f50d9dc2a1c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsByRetention.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsByRetention.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing logs usage data broken down by retention period. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing logs usage data broken down by retention period.

+ */ @JsonPropertyOrder({ LogsByRetention.JSON_PROPERTY_ORGS, LogsByRetention.JSON_PROPERTY_USAGE, LogsByRetention.JSON_PROPERTY_USAGE_BY_MONTH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsByRetention { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ORGS = "orgs"; private LogsByRetentionOrgs orgs; @@ -40,21 +58,19 @@ public LogsByRetention orgs(LogsByRetentionOrgs orgs) { } /** - * Indexed logs usage summary for each organization for each retention period with usage. - * + *

Indexed logs usage summary for each organization for each retention period with usage.

* @return orgs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsByRetentionOrgs getOrgs() { - return orgs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsByRetentionOrgs getOrgs() { + return orgs; + } public void setOrgs(LogsByRetentionOrgs orgs) { this.orgs = orgs; } - public LogsByRetention usage(List usage) { this.usage = usage; for (LogsRetentionAggSumUsage item : usage) { @@ -62,7 +78,6 @@ public LogsByRetention usage(List usage) { } return this; } - public LogsByRetention addUsageItem(LogsRetentionAggSumUsage usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -73,21 +88,19 @@ public LogsByRetention addUsageItem(LogsRetentionAggSumUsage usageItem) { } /** - * Aggregated index logs usage for each retention period with usage. - * + *

Aggregated index logs usage for each retention period with usage.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - public LogsByRetention usageByMonth(LogsByRetentionMonthlyUsage usageByMonth) { this.usageByMonth = usageByMonth; this.unparsed |= usageByMonth.unparsed; @@ -95,22 +108,23 @@ public LogsByRetention usageByMonth(LogsByRetentionMonthlyUsage usageByMonth) { } /** - * Object containing a summary of indexed logs usage by retention period for a single month. - * + *

Object containing a summary of indexed logs usage by retention period for a single month.

* @return usageByMonth - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE_BY_MONTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsByRetentionMonthlyUsage getUsageByMonth() { - return usageByMonth; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE_BY_MONTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsByRetentionMonthlyUsage getUsageByMonth() { + return usageByMonth; + } public void setUsageByMonth(LogsByRetentionMonthlyUsage usageByMonth) { this.usageByMonth = usageByMonth; } - /** Return true if this LogsByRetention object is equal to o. */ + /** + * Return true if this LogsByRetention object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } LogsByRetention logsByRetention = (LogsByRetention) o; - return Objects.equals(this.orgs, logsByRetention.orgs) - && Objects.equals(this.usage, logsByRetention.usage) - && Objects.equals(this.usageByMonth, logsByRetention.usageByMonth); + return Objects.equals(this.orgs, logsByRetention.orgs) && Objects.equals(this.usage, logsByRetention.usage) && Objects.equals(this.usageByMonth, logsByRetention.usageByMonth); } + @Override public int hashCode() { - return Objects.hash(orgs, usage, usageByMonth); + return Objects.hash(orgs,usage,usageByMonth); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionMonthlyUsage.java b/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionMonthlyUsage.java index acc06a41649..d19f82e2c15 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionMonthlyUsage.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionMonthlyUsage.java @@ -6,28 +6,42 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing a summary of indexed logs usage by retention period for a single month. */ +/** + *

Object containing a summary of indexed logs usage by retention period for a single month.

+ */ @JsonPropertyOrder({ LogsByRetentionMonthlyUsage.JSON_PROPERTY_DATE, LogsByRetentionMonthlyUsage.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsByRetentionMonthlyUsage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATE = "date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime date; @@ -40,21 +54,19 @@ public LogsByRetentionMonthlyUsage date(OffsetDateTime date) { } /** - * The month for the usage. - * + *

The month for the usage.

* @return date - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getDate() { - return date; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDate() { + return date; + } public void setDate(OffsetDateTime date) { this.date = date; } - public LogsByRetentionMonthlyUsage usage(List usage) { this.usage = usage; for (LogsRetentionSumUsage item : usage) { @@ -62,7 +74,6 @@ public LogsByRetentionMonthlyUsage usage(List usage) { } return this; } - public LogsByRetentionMonthlyUsage addUsageItem(LogsRetentionSumUsage usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -73,22 +84,23 @@ public LogsByRetentionMonthlyUsage addUsageItem(LogsRetentionSumUsage usageItem) } /** - * Indexed logs usage for each active retention for the month. - * + *

Indexed logs usage for each active retention for the month.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this LogsByRetentionMonthlyUsage object is equal to o. */ + /** + * Return true if this LogsByRetentionMonthlyUsage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -98,13 +110,13 @@ public boolean equals(Object o) { return false; } LogsByRetentionMonthlyUsage logsByRetentionMonthlyUsage = (LogsByRetentionMonthlyUsage) o; - return Objects.equals(this.date, logsByRetentionMonthlyUsage.date) - && Objects.equals(this.usage, logsByRetentionMonthlyUsage.usage); + return Objects.equals(this.date, logsByRetentionMonthlyUsage.date) && Objects.equals(this.usage, logsByRetentionMonthlyUsage.usage); } + @Override public int hashCode() { - return Objects.hash(date, usage); + return Objects.hash(date,usage); } @Override @@ -118,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgUsage.java b/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgUsage.java index e1bb971effa..668f0f71f17 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgUsage.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgUsage.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Indexed logs usage by retention for a single organization. */ -@JsonPropertyOrder({LogsByRetentionOrgUsage.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Indexed logs usage by retention for a single organization.

+ */ +@JsonPropertyOrder({ + LogsByRetentionOrgUsage.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsByRetentionOrgUsage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public LogsByRetentionOrgUsage usage(List usage) { } return this; } - public LogsByRetentionOrgUsage addUsageItem(LogsRetentionSumUsage usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public LogsByRetentionOrgUsage addUsageItem(LogsRetentionSumUsage usageItem) { } /** - * Indexed logs usage for each active retention for the organization. - * + *

Indexed logs usage for each active retention for the organization.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this LogsByRetentionOrgUsage object is equal to o. */ + /** + * Return true if this LogsByRetentionOrgUsage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, logsByRetentionOrgUsage.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgs.java b/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgs.java index 156f1f27d36..b491b92727c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgs.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsByRetentionOrgs.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Indexed logs usage summary for each organization for each retention period with usage. */ -@JsonPropertyOrder({LogsByRetentionOrgs.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Indexed logs usage summary for each organization for each retention period with usage.

+ */ +@JsonPropertyOrder({ + LogsByRetentionOrgs.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsByRetentionOrgs { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public LogsByRetentionOrgs usage(List usage) { } return this; } - public LogsByRetentionOrgs addUsageItem(LogsByRetentionOrgUsage usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public LogsByRetentionOrgs addUsageItem(LogsByRetentionOrgUsage usageItem) { } /** - * Indexed logs usage summary for each organization. - * + *

Indexed logs usage summary for each organization.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this LogsByRetentionOrgs object is equal to o. */ + /** + * Return true if this LogsByRetentionOrgs object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, logsByRetentionOrgs.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessor.java b/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessor.java index 3e7230a4d70..7a464951baa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessor.java @@ -6,33 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use the Category Processor to add a new attribute (without spaces or special characters in the - * new attribute name) to a log matching a provided search query. Use categories to create groups - * for an analytical view. For example, URL groups, machine groups, environments, and response time - * buckets. - * - *

Notes: - * - *

    - *
  • The syntax of the query is the one of Logs Explorer search bar. The query can be done on - * any log attribute or tag, whether it is a facet or not. Wildcards can also be used inside - * your query. - *
  • Once the log has matched one of the Processor queries, it stops. Make sure they are - * properly ordered in case a log could match several queries. - *
  • The names of the categories must be unique. - *
  • Once defined in the Category Processor, you can map categories to log status using the Log - * Status Remapper. - *
+ *

Use the Category Processor to add a new attribute (without spaces or special characters in the new attribute name) + * to a log matching a provided search query. Use categories to create groups for an analytical view. + * For example, URL groups, machine groups, environments, and response time buckets.

+ *

Notes:

+ *
    + *
  • The syntax of the query is the one of Logs Explorer search bar. + * The query can be done on any log attribute or tag, whether it is a facet or not. + * Wildcards can also be used inside your query.
  • + *
  • Once the log has matched one of the Processor queries, it stops. + * Make sure they are properly ordered in case a log could match several queries.
  • + *
  • The names of the categories must be unique.
  • + *
  • Once defined in the Category Processor, you can map categories to log status using the Log Status Remapper.
  • + *
*/ @JsonPropertyOrder({ LogsCategoryProcessor.JSON_PROPERTY_CATEGORIES, @@ -41,10 +52,10 @@ LogsCategoryProcessor.JSON_PROPERTY_TARGET, LogsCategoryProcessor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsCategoryProcessor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CATEGORIES = "categories"; private List categories = new ArrayList<>(); @@ -64,16 +75,14 @@ public LogsCategoryProcessor() {} @JsonCreator public LogsCategoryProcessor( - @JsonProperty(required = true, value = JSON_PROPERTY_CATEGORIES) - List categories, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsCategoryProcessorType type) { - this.categories = categories; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CATEGORIES)List categories, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsCategoryProcessorType type) { + this.categories = categories; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsCategoryProcessor categories(List categories) { this.categories = categories; for (LogsCategoryProcessorCategory item : categories) { @@ -81,7 +90,6 @@ public LogsCategoryProcessor categories(List cate } return this; } - public LogsCategoryProcessor addCategoriesItem(LogsCategoryProcessorCategory categoriesItem) { this.categories.add(categoriesItem); this.unparsed |= categoriesItem.unparsed; @@ -89,83 +97,75 @@ public LogsCategoryProcessor addCategoriesItem(LogsCategoryProcessorCategory cat } /** - * Array of filters to match or not a log and their corresponding name to assign a - * custom value to the log. - * + *

Array of filters to match or not a log and their + * corresponding name to assign a custom value to the log.

* @return categories - */ - @JsonProperty(JSON_PROPERTY_CATEGORIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCategories() { - return categories; - } - + **/ + @JsonProperty(JSON_PROPERTY_CATEGORIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCategories() { + return categories; + } public void setCategories(List categories) { this.categories = categories; } - public LogsCategoryProcessor isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsCategoryProcessor name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsCategoryProcessor target(String target) { this.target = target; return this; } /** - * Name of the target attribute which value is defined by the matching category. - * + *

Name of the target attribute which value is defined by the matching category.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsCategoryProcessor type(LogsCategoryProcessorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -173,24 +173,25 @@ public LogsCategoryProcessor type(LogsCategoryProcessorType type) { } /** - * Type of logs category processor. - * + *

Type of logs category processor.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsCategoryProcessorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsCategoryProcessorType getType() { + return type; + } public void setType(LogsCategoryProcessorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsCategoryProcessor object is equal to o. */ + /** + * Return true if this LogsCategoryProcessor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -200,16 +201,13 @@ public boolean equals(Object o) { return false; } LogsCategoryProcessor logsCategoryProcessor = (LogsCategoryProcessor) o; - return Objects.equals(this.categories, logsCategoryProcessor.categories) - && Objects.equals(this.isEnabled, logsCategoryProcessor.isEnabled) - && Objects.equals(this.name, logsCategoryProcessor.name) - && Objects.equals(this.target, logsCategoryProcessor.target) - && Objects.equals(this.type, logsCategoryProcessor.type); + return Objects.equals(this.categories, logsCategoryProcessor.categories) && Objects.equals(this.isEnabled, logsCategoryProcessor.isEnabled) && Objects.equals(this.name, logsCategoryProcessor.name) && Objects.equals(this.target, logsCategoryProcessor.target) && Objects.equals(this.type, logsCategoryProcessor.type); } + @Override public int hashCode() { - return Objects.hash(categories, isEnabled, name, target, type); + return Objects.hash(categories,isEnabled,name,target,type); } @Override @@ -226,7 +224,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorCategory.java b/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorCategory.java index 2eac8bef9d0..676be4ea59f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorCategory.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorCategory.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the logs filter. */ + +/** + *

Object describing the logs filter.

+ */ @JsonPropertyOrder({ LogsCategoryProcessorCategory.JSON_PROPERTY_FILTER, LogsCategoryProcessorCategory.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsCategoryProcessorCategory { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private LogsFilter filter; @@ -34,43 +54,42 @@ public LogsCategoryProcessorCategory filter(LogsFilter filter) { } /** - * Filter for logs. - * + *

Filter for logs.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsFilter getFilter() { + return filter; + } public void setFilter(LogsFilter filter) { this.filter = filter; } - public LogsCategoryProcessorCategory name(String name) { this.name = name; return this; } /** - * Value to assign to the target attribute. - * + *

Value to assign to the target attribute.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this LogsCategoryProcessorCategory object is equal to o. */ + /** + * Return true if this LogsCategoryProcessorCategory object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +99,13 @@ public boolean equals(Object o) { return false; } LogsCategoryProcessorCategory logsCategoryProcessorCategory = (LogsCategoryProcessorCategory) o; - return Objects.equals(this.filter, logsCategoryProcessorCategory.filter) - && Objects.equals(this.name, logsCategoryProcessorCategory.name); + return Objects.equals(this.filter, logsCategoryProcessorCategory.filter) && Objects.equals(this.name, logsCategoryProcessorCategory.name); } + @Override public int hashCode() { - return Objects.hash(filter, name); + return Objects.hash(filter,name); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorType.java b/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorType.java index 9df15de7e24..717cb22830f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsCategoryProcessorType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs category processor. */ +/** + *

Type of logs category processor.

+ */ @JsonSerialize(using = LogsCategoryProcessorType.LogsCategoryProcessorTypeSerializer.class) public class LogsCategoryProcessorType { - public static final LogsCategoryProcessorType CATEGORY_PROCESSOR = - new LogsCategoryProcessorType("category-processor"); + public static final LogsCategoryProcessorType CATEGORY_PROCESSOR = new LogsCategoryProcessorType("category-processor"); - private static final Set allowedValues = - new HashSet(Arrays.asList("category-processor")); + private static final Set allowedValues = new HashSet(Arrays.asList("category-processor")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsCategoryProcessorTypeSerializer - extends StdSerializer { - public LogsCategoryProcessorTypeSerializer(Class t) { - super(t); - } + public static class LogsCategoryProcessorTypeSerializer extends StdSerializer { + public LogsCategoryProcessorTypeSerializer(Class t) { + super(t); + } - public LogsCategoryProcessorTypeSerializer() { - this(null); - } + public LogsCategoryProcessorTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsCategoryProcessorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsCategoryProcessorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsCategoryProcessorType object is equal to o. */ + /** + * Return true if this LogsCategoryProcessorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapper.java b/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapper.java index 662675d044c..e52ee3b96e5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapper.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapper.java @@ -6,38 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * As Datadog receives logs, it timestamps them using the value(s) from any of these default - * attributes. - * - *
    - *
  • timestamp - *
  • date - *
  • _timestamp - *
  • Timestamp - *
  • eventTime - *
  • published_date - *
- * - *

If your logs put their dates in an attribute not in this list, use the log date Remapper - * Processor to define their date attribute as the official log timestamp. The recognized date - * formats are ISO8601, UNIX (the milliseconds EPOCH format), and RFC3164. - * - *

Note: If your logs don’t contain any of the default attributes and you - * haven’t defined your own date attribute, Datadog timestamps the logs with the date it received - * them. - * - *

If multiple log date remapper processors can be applied to a given log, only the first one - * (according to the pipelines order) is taken into account. + *

As Datadog receives logs, it timestamps them using the value(s) from any of these default attributes.

+ *
    + *
  • timestamp
  • + *
  • date
  • + *
  • _timestamp
  • + *
  • Timestamp
  • + *
  • eventTime
  • + *
  • published_date
  • + *
+ *

If your logs put their dates in an attribute not in this list, + * use the log date Remapper Processor to define their date attribute as the official log timestamp. + * The recognized date formats are ISO8601, UNIX (the milliseconds EPOCH format), and RFC3164.

+ *

Note: If your logs don’t contain any of the default attributes + * and you haven’t defined your own date attribute, Datadog timestamps + * the logs with the date it received them.

+ *

If multiple log date remapper processors can be applied to a given log, + * only the first one (according to the pipelines order) is taken into account.

*/ @JsonPropertyOrder({ LogsDateRemapper.JSON_PROPERTY_IS_ENABLED, @@ -45,10 +55,10 @@ LogsDateRemapper.JSON_PROPERTY_SOURCES, LogsDateRemapper.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsDateRemapper { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -65,80 +75,72 @@ public LogsDateRemapper() {} @JsonCreator public LogsDateRemapper( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsDateRemapperType type) { - this.sources = sources; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsDateRemapperType type) { + this.sources = sources; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsDateRemapper isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsDateRemapper name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsDateRemapper sources(List sources) { this.sources = sources; return this; } - public LogsDateRemapper addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsDateRemapper type(LogsDateRemapperType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -146,24 +148,25 @@ public LogsDateRemapper type(LogsDateRemapperType type) { } /** - * Type of logs date remapper. - * + *

Type of logs date remapper.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsDateRemapperType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsDateRemapperType getType() { + return type; + } public void setType(LogsDateRemapperType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsDateRemapper object is equal to o. */ + /** + * Return true if this LogsDateRemapper object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -173,15 +176,13 @@ public boolean equals(Object o) { return false; } LogsDateRemapper logsDateRemapper = (LogsDateRemapper) o; - return Objects.equals(this.isEnabled, logsDateRemapper.isEnabled) - && Objects.equals(this.name, logsDateRemapper.name) - && Objects.equals(this.sources, logsDateRemapper.sources) - && Objects.equals(this.type, logsDateRemapper.type); + return Objects.equals(this.isEnabled, logsDateRemapper.isEnabled) && Objects.equals(this.name, logsDateRemapper.name) && Objects.equals(this.sources, logsDateRemapper.sources) && Objects.equals(this.type, logsDateRemapper.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, sources, type); + return Objects.hash(isEnabled,name,sources,type); } @Override @@ -197,7 +198,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapperType.java b/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapperType.java index 90c3645d52a..eb1d0081914 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapperType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsDateRemapperType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs date remapper. */ +/** + *

Type of logs date remapper.

+ */ @JsonSerialize(using = LogsDateRemapperType.LogsDateRemapperTypeSerializer.class) public class LogsDateRemapperType { - public static final LogsDateRemapperType DATE_REMAPPER = - new LogsDateRemapperType("date-remapper"); + public static final LogsDateRemapperType DATE_REMAPPER = new LogsDateRemapperType("date-remapper"); - private static final Set allowedValues = - new HashSet(Arrays.asList("date-remapper")); + private static final Set allowedValues = new HashSet(Arrays.asList("date-remapper")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class LogsDateRemapperTypeSerializer extends StdSerializer { - public LogsDateRemapperTypeSerializer(Class t) { - super(t); - } - - public LogsDateRemapperTypeSerializer() { - this(null); - } - - @Override - public void serialize( - LogsDateRemapperType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsDateRemapperTypeSerializer(Class t) { + super(t); + } + + public LogsDateRemapperTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsDateRemapperType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsDateRemapperType object is equal to o. */ + /** + * Return true if this LogsDateRemapperType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsExclusion.java b/src/main/java/com/datadog/api/client/v1/model/LogsExclusion.java index eadc5d5ca81..454645f0fdc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsExclusion.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsExclusion.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Represents the index exclusion filter object from configuration API. */ + +/** + *

Represents the index exclusion filter object from configuration API.

+ */ @JsonPropertyOrder({ LogsExclusion.JSON_PROPERTY_FILTER, LogsExclusion.JSON_PROPERTY_IS_ENABLED, LogsExclusion.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsExclusion { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private LogsExclusionFilter filter; @@ -35,10 +54,10 @@ public class LogsExclusion { public LogsExclusion() {} @JsonCreator - public LogsExclusion(@JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + public LogsExclusion( + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public LogsExclusion filter(LogsExclusionFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -46,63 +65,60 @@ public LogsExclusion filter(LogsExclusionFilter filter) { } /** - * Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle. - * + *

Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsExclusionFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsExclusionFilter getFilter() { + return filter; + } public void setFilter(LogsExclusionFilter filter) { this.filter = filter; } - public LogsExclusion isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the exclusion filter is active. - * + *

Whether or not the exclusion filter is active.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsExclusion name(String name) { this.name = name; return this; } /** - * Name of the index exclusion filter. - * + *

Name of the index exclusion filter.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this LogsExclusion object is equal to o. */ + /** + * Return true if this LogsExclusion object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,14 +128,13 @@ public boolean equals(Object o) { return false; } LogsExclusion logsExclusion = (LogsExclusion) o; - return Objects.equals(this.filter, logsExclusion.filter) - && Objects.equals(this.isEnabled, logsExclusion.isEnabled) - && Objects.equals(this.name, logsExclusion.name); + return Objects.equals(this.filter, logsExclusion.filter) && Objects.equals(this.isEnabled, logsExclusion.isEnabled) && Objects.equals(this.name, logsExclusion.name); } + @Override public int hashCode() { - return Objects.hash(filter, isEnabled, name); + return Objects.hash(filter,isEnabled,name); } @Override @@ -134,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsExclusionFilter.java b/src/main/java/com/datadog/api/client/v1/model/LogsExclusionFilter.java index 2cef000e386..f6f3dabb589 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsExclusionFilter.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsExclusionFilter.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle. */ + +/** + *

Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle.

+ */ @JsonPropertyOrder({ LogsExclusionFilter.JSON_PROPERTY_QUERY, LogsExclusionFilter.JSON_PROPERTY_SAMPLE_RATE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsExclusionFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -32,54 +51,52 @@ public LogsExclusionFilter() {} @JsonCreator public LogsExclusionFilter( - @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLE_RATE) Double sampleRate) { - this.sampleRate = sampleRate; + @JsonProperty(required=true, value=JSON_PROPERTY_SAMPLE_RATE)Double sampleRate) { + this.sampleRate = sampleRate; } - public LogsExclusionFilter query(String query) { this.query = query; return this; } /** - * Default query is *, meaning all logs flowing in the index would be excluded. Scope - * down exclusion filter to only a subset of logs with a log query. - * + *

Default query is *, meaning all logs flowing in the index would be excluded. + * Scope down exclusion filter to only a subset of logs with a log query.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public LogsExclusionFilter sampleRate(Double sampleRate) { this.sampleRate = sampleRate; return this; } /** - * Sample rate to apply to logs going through this exclusion filter, a value of 1.0 excludes all - * logs matching the query. - * + *

Sample rate to apply to logs going through this exclusion filter, + * a value of 1.0 excludes all logs matching the query.

* @return sampleRate - */ - @JsonProperty(JSON_PROPERTY_SAMPLE_RATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getSampleRate() { - return sampleRate; - } - + **/ + @JsonProperty(JSON_PROPERTY_SAMPLE_RATE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getSampleRate() { + return sampleRate; + } public void setSampleRate(Double sampleRate) { this.sampleRate = sampleRate; } - /** Return true if this LogsExclusionFilter object is equal to o. */ + /** + * Return true if this LogsExclusionFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,13 +106,13 @@ public boolean equals(Object o) { return false; } LogsExclusionFilter logsExclusionFilter = (LogsExclusionFilter) o; - return Objects.equals(this.query, logsExclusionFilter.query) - && Objects.equals(this.sampleRate, logsExclusionFilter.sampleRate); + return Objects.equals(this.query, logsExclusionFilter.query) && Objects.equals(this.sampleRate, logsExclusionFilter.sampleRate); } + @Override public int hashCode() { - return Objects.hash(query, sampleRate); + return Objects.hash(query,sampleRate); } @Override @@ -109,7 +126,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsFilter.java b/src/main/java/com/datadog/api/client/v1/model/LogsFilter.java index 694512a7340..8c9e77e9658 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsFilter.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsFilter.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Filter for logs. */ -@JsonPropertyOrder({LogsFilter.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Filter for logs.

+ */ +@JsonPropertyOrder({ + LogsFilter.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -27,22 +49,23 @@ public LogsFilter query(String query) { } /** - * The filter query. - * + *

The filter query.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this LogsFilter object is equal to o. */ + /** + * Return true if this LogsFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.query, logsFilter.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParser.java b/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParser.java index 1532e63a898..8c5fe3e1446 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParser.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParser.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The GeoIP parser takes an IP address attribute and extracts if available the Continent, Country, - * Subdivision, and City information in the target attribute path. + *

The GeoIP parser takes an IP address attribute and extracts if available + * the Continent, Country, Subdivision, and City information in the target attribute path.

*/ @JsonPropertyOrder({ LogsGeoIPParser.JSON_PROPERTY_IS_ENABLED, @@ -26,10 +41,10 @@ LogsGeoIPParser.JSON_PROPERTY_TARGET, LogsGeoIPParser.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsGeoIPParser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -49,103 +64,92 @@ public LogsGeoIPParser() {} @JsonCreator public LogsGeoIPParser( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsGeoIPParserType type) { - this.sources = sources; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsGeoIPParserType type) { + this.sources = sources; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsGeoIPParser isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsGeoIPParser name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsGeoIPParser sources(List sources) { this.sources = sources; return this; } - public LogsGeoIPParser addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsGeoIPParser target(String target) { this.target = target; return this; } /** - * Name of the parent attribute that contains all the extracted details from the sources - * . - * + *

Name of the parent attribute that contains all the extracted details from the sources.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsGeoIPParser type(LogsGeoIPParserType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -153,24 +157,25 @@ public LogsGeoIPParser type(LogsGeoIPParserType type) { } /** - * Type of GeoIP parser. - * + *

Type of GeoIP parser.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsGeoIPParserType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsGeoIPParserType getType() { + return type; + } public void setType(LogsGeoIPParserType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsGeoIPParser object is equal to o. */ + /** + * Return true if this LogsGeoIPParser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -180,16 +185,13 @@ public boolean equals(Object o) { return false; } LogsGeoIPParser logsGeoIpParser = (LogsGeoIPParser) o; - return Objects.equals(this.isEnabled, logsGeoIpParser.isEnabled) - && Objects.equals(this.name, logsGeoIpParser.name) - && Objects.equals(this.sources, logsGeoIpParser.sources) - && Objects.equals(this.target, logsGeoIpParser.target) - && Objects.equals(this.type, logsGeoIpParser.type); + return Objects.equals(this.isEnabled, logsGeoIpParser.isEnabled) && Objects.equals(this.name, logsGeoIpParser.name) && Objects.equals(this.sources, logsGeoIpParser.sources) && Objects.equals(this.target, logsGeoIpParser.target) && Objects.equals(this.type, logsGeoIpParser.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, sources, target, type); + return Objects.hash(isEnabled,name,sources,target,type); } @Override @@ -206,7 +208,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParserType.java b/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParserType.java index 49ade54ebed..b1a2c74125a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParserType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsGeoIPParserType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of GeoIP parser. */ +/** + *

Type of GeoIP parser.

+ */ @JsonSerialize(using = LogsGeoIPParserType.LogsGeoIPParserTypeSerializer.class) public class LogsGeoIPParserType { public static final LogsGeoIPParserType GEO_IP_PARSER = new LogsGeoIPParserType("geo-ip-parser"); - private static final Set allowedValues = - new HashSet(Arrays.asList("geo-ip-parser")); + private static final Set allowedValues = new HashSet(Arrays.asList("geo-ip-parser")); private String value; @@ -39,20 +62,18 @@ public boolean isValid() { } public static class LogsGeoIPParserTypeSerializer extends StdSerializer { - public LogsGeoIPParserTypeSerializer(Class t) { - super(t); - } - - public LogsGeoIPParserTypeSerializer() { - this(null); - } - - @Override - public void serialize( - LogsGeoIPParserType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsGeoIPParserTypeSerializer(Class t) { + super(t); + } + + public LogsGeoIPParserTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsGeoIPParserType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsGeoIPParserType object is equal to o. */ + /** + * Return true if this LogsGeoIPParserType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsGrokParser.java b/src/main/java/com/datadog/api/client/v1/model/LogsGrokParser.java index 0b8a061e341..7094fd28359 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsGrokParser.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsGrokParser.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Create custom grok rules to parse the full message or a specific - * attribute of your raw event. For more information, see the parsing section. + *

Create custom grok rules to parse the full message or a specific attribute of your raw event. + * For more information, see the parsing section.

*/ @JsonPropertyOrder({ LogsGrokParser.JSON_PROPERTY_GROK, @@ -29,10 +42,10 @@ LogsGrokParser.JSON_PROPERTY_SOURCE, LogsGrokParser.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsGrokParser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROK = "grok"; private LogsGrokParserRules grok; @@ -55,16 +68,15 @@ public LogsGrokParser() {} @JsonCreator public LogsGrokParser( - @JsonProperty(required = true, value = JSON_PROPERTY_GROK) LogsGrokParserRules grok, - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsGrokParserType type) { - this.grok = grok; - this.unparsed |= grok.unparsed; - this.source = source; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_GROK)LogsGrokParserRules grok, + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCE)String source, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsGrokParserType type) { + this.grok = grok; + this.unparsed |= grok.unparsed; + this.source = source; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsGrokParser grok(LogsGrokParserRules grok) { this.grok = grok; this.unparsed |= grok.unparsed; @@ -72,67 +84,60 @@ public LogsGrokParser grok(LogsGrokParserRules grok) { } /** - * Set of rules for the grok parser. - * + *

Set of rules for the grok parser.

* @return grok - */ - @JsonProperty(JSON_PROPERTY_GROK) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsGrokParserRules getGrok() { - return grok; - } - + **/ + @JsonProperty(JSON_PROPERTY_GROK) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsGrokParserRules getGrok() { + return grok; + } public void setGrok(LogsGrokParserRules grok) { this.grok = grok; } - public LogsGrokParser isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsGrokParser name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsGrokParser samples(List samples) { this.samples = samples; return this; } - public LogsGrokParser addSamplesItem(String samplesItem) { if (this.samples == null) { this.samples = new ArrayList<>(); @@ -142,41 +147,37 @@ public LogsGrokParser addSamplesItem(String samplesItem) { } /** - * List of sample logs to test this grok parser. - * + *

List of sample logs to test this grok parser.

* @return samples - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAMPLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSamples() { - return samples; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAMPLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSamples() { + return samples; + } public void setSamples(List samples) { this.samples = samples; } - public LogsGrokParser source(String source) { this.source = source; return this; } /** - * Name of the log attribute to parse. - * + *

Name of the log attribute to parse.

* @return source - */ - @JsonProperty(JSON_PROPERTY_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSource() { - return source; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } public void setSource(String source) { this.source = source; } - public LogsGrokParser type(LogsGrokParserType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -184,24 +185,25 @@ public LogsGrokParser type(LogsGrokParserType type) { } /** - * Type of logs grok parser. - * + *

Type of logs grok parser.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsGrokParserType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsGrokParserType getType() { + return type; + } public void setType(LogsGrokParserType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsGrokParser object is equal to o. */ + /** + * Return true if this LogsGrokParser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -211,17 +213,13 @@ public boolean equals(Object o) { return false; } LogsGrokParser logsGrokParser = (LogsGrokParser) o; - return Objects.equals(this.grok, logsGrokParser.grok) - && Objects.equals(this.isEnabled, logsGrokParser.isEnabled) - && Objects.equals(this.name, logsGrokParser.name) - && Objects.equals(this.samples, logsGrokParser.samples) - && Objects.equals(this.source, logsGrokParser.source) - && Objects.equals(this.type, logsGrokParser.type); + return Objects.equals(this.grok, logsGrokParser.grok) && Objects.equals(this.isEnabled, logsGrokParser.isEnabled) && Objects.equals(this.name, logsGrokParser.name) && Objects.equals(this.samples, logsGrokParser.samples) && Objects.equals(this.source, logsGrokParser.source) && Objects.equals(this.type, logsGrokParser.type); } + @Override public int hashCode() { - return Objects.hash(grok, isEnabled, name, samples, source, type); + return Objects.hash(grok,isEnabled,name,samples,source,type); } @Override @@ -239,7 +237,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserRules.java b/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserRules.java index 60385137075..b58c6efe405 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserRules.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserRules.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Set of rules for the grok parser. */ + +/** + *

Set of rules for the grok parser.

+ */ @JsonPropertyOrder({ LogsGrokParserRules.JSON_PROPERTY_MATCH_RULES, LogsGrokParserRules.JSON_PROPERTY_SUPPORT_RULES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsGrokParserRules { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MATCH_RULES = "match_rules"; private String matchRules; @@ -32,52 +51,50 @@ public LogsGrokParserRules() {} @JsonCreator public LogsGrokParserRules( - @JsonProperty(required = true, value = JSON_PROPERTY_MATCH_RULES) String matchRules) { - this.matchRules = matchRules; + @JsonProperty(required=true, value=JSON_PROPERTY_MATCH_RULES)String matchRules) { + this.matchRules = matchRules; } - public LogsGrokParserRules matchRules(String matchRules) { this.matchRules = matchRules; return this; } /** - * List of match rules for the grok parser, separated by a new line. - * + *

List of match rules for the grok parser, separated by a new line.

* @return matchRules - */ - @JsonProperty(JSON_PROPERTY_MATCH_RULES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMatchRules() { - return matchRules; - } - + **/ + @JsonProperty(JSON_PROPERTY_MATCH_RULES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMatchRules() { + return matchRules; + } public void setMatchRules(String matchRules) { this.matchRules = matchRules; } - public LogsGrokParserRules supportRules(String supportRules) { this.supportRules = supportRules; return this; } /** - * List of support rules for the grok parser, separated by a new line. - * + *

List of support rules for the grok parser, separated by a new line.

* @return supportRules - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUPPORT_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSupportRules() { - return supportRules; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUPPORT_RULES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSupportRules() { + return supportRules; + } public void setSupportRules(String supportRules) { this.supportRules = supportRules; } - /** Return true if this LogsGrokParserRules object is equal to o. */ + /** + * Return true if this LogsGrokParserRules object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,13 +104,13 @@ public boolean equals(Object o) { return false; } LogsGrokParserRules logsGrokParserRules = (LogsGrokParserRules) o; - return Objects.equals(this.matchRules, logsGrokParserRules.matchRules) - && Objects.equals(this.supportRules, logsGrokParserRules.supportRules); + return Objects.equals(this.matchRules, logsGrokParserRules.matchRules) && Objects.equals(this.supportRules, logsGrokParserRules.supportRules); } + @Override public int hashCode() { - return Objects.hash(matchRules, supportRules); + return Objects.hash(matchRules,supportRules); } @Override @@ -107,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserType.java b/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserType.java index d0c09d6b357..2e2da7bcce7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsGrokParserType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs grok parser. */ +/** + *

Type of logs grok parser.

+ */ @JsonSerialize(using = LogsGrokParserType.LogsGrokParserTypeSerializer.class) public class LogsGrokParserType { public static final LogsGrokParserType GROK_PARSER = new LogsGrokParserType("grok-parser"); - private static final Set allowedValues = - new HashSet(Arrays.asList("grok-parser")); + private static final Set allowedValues = new HashSet(Arrays.asList("grok-parser")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class LogsGrokParserTypeSerializer extends StdSerializer { - public LogsGrokParserTypeSerializer(Class t) { - super(t); - } - - public LogsGrokParserTypeSerializer() { - this(null); - } - - @Override - public void serialize(LogsGrokParserType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsGrokParserTypeSerializer(Class t) { + super(t); + } + + public LogsGrokParserTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsGrokParserType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsGrokParserType object is equal to o. */ + /** + * Return true if this LogsGrokParserType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsIndex.java b/src/main/java/com/datadog/api/client/v1/model/LogsIndex.java index 72a325046a1..de66c622c84 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsIndex.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsIndex.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing a Datadog Log index. */ + +/** + *

Object describing a Datadog Log index.

+ */ @JsonPropertyOrder({ LogsIndex.JSON_PROPERTY_DAILY_LIMIT, LogsIndex.JSON_PROPERTY_EXCLUSION_FILTERS, @@ -24,10 +41,10 @@ LogsIndex.JSON_PROPERTY_NAME, LogsIndex.JSON_PROPERTY_NUM_RETENTION_DAYS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsIndex { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DAILY_LIMIT = "daily_limit"; private Long dailyLimit; @@ -50,34 +67,31 @@ public LogsIndex() {} @JsonCreator public LogsIndex( - @JsonProperty(required = true, value = JSON_PROPERTY_FILTER) LogsFilter filter, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.filter = filter; - this.unparsed |= filter.unparsed; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_FILTER)LogsFilter filter, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.filter = filter; + this.unparsed |= filter.unparsed; + this.name = name; } - public LogsIndex dailyLimit(Long dailyLimit) { this.dailyLimit = dailyLimit; return this; } /** - * The number of log events you can send in this index per day before you are rate-limited. - * + *

The number of log events you can send in this index per day before you are rate-limited.

* @return dailyLimit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DAILY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDailyLimit() { - return dailyLimit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDailyLimit() { + return dailyLimit; + } public void setDailyLimit(Long dailyLimit) { this.dailyLimit = dailyLimit; } - public LogsIndex exclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; for (LogsExclusion item : exclusionFilters) { @@ -85,7 +99,6 @@ public LogsIndex exclusionFilters(List exclusionFilters) { } return this; } - public LogsIndex addExclusionFiltersItem(LogsExclusion exclusionFiltersItem) { if (this.exclusionFilters == null) { this.exclusionFilters = new ArrayList<>(); @@ -96,23 +109,21 @@ public LogsIndex addExclusionFiltersItem(LogsExclusion exclusionFiltersItem) { } /** - * An array of exclusion objects. The logs are tested against the query of each filter, following - * the order of the array. Only the first matching active exclusion matters, others (if any) are - * ignored. - * + *

An array of exclusion objects. The logs are tested against the query of each filter, + * following the order of the array. Only the first matching active exclusion matters, + * others (if any) are ignored.

* @return exclusionFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExclusionFilters() { - return exclusionFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExclusionFilters() { + return exclusionFilters; + } public void setExclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; } - public LogsIndex filter(LogsFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -120,76 +131,73 @@ public LogsIndex filter(LogsFilter filter) { } /** - * Filter for logs. - * + *

Filter for logs.

* @return filter - */ - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsFilter getFilter() { - return filter; - } - + **/ + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsFilter getFilter() { + return filter; + } public void setFilter(LogsFilter filter) { this.filter = filter; } /** - * A boolean stating if the index is rate limited, meaning more logs than the daily limit have - * been sent. Rate limit is reset every-day at 2pm UTC. - * + *

A boolean stating if the index is rate limited, meaning more logs than the daily limit have been sent. + * Rate limit is reset every-day at 2pm UTC.

* @return isRateLimited - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_RATE_LIMITED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsRateLimited() { - return isRateLimited; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_RATE_LIMITED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsRateLimited() { + return isRateLimited; + } public LogsIndex name(String name) { this.name = name; return this; } /** - * The name of the index. - * + *

The name of the index.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsIndex numRetentionDays(Long numRetentionDays) { this.numRetentionDays = numRetentionDays; return this; } /** - * The number of days before logs are deleted from this index. Available values depend on - * retention plans specified in your organization's contract/subscriptions. - * + *

The number of days before logs are deleted from this index. Available values depend on + * retention plans specified in your organization's contract/subscriptions.

* @return numRetentionDays - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUM_RETENTION_DAYS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumRetentionDays() { - return numRetentionDays; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_RETENTION_DAYS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumRetentionDays() { + return numRetentionDays; + } public void setNumRetentionDays(Long numRetentionDays) { this.numRetentionDays = numRetentionDays; } - /** Return true if this LogsIndex object is equal to o. */ + /** + * Return true if this LogsIndex object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -199,18 +207,13 @@ public boolean equals(Object o) { return false; } LogsIndex logsIndex = (LogsIndex) o; - return Objects.equals(this.dailyLimit, logsIndex.dailyLimit) - && Objects.equals(this.exclusionFilters, logsIndex.exclusionFilters) - && Objects.equals(this.filter, logsIndex.filter) - && Objects.equals(this.isRateLimited, logsIndex.isRateLimited) - && Objects.equals(this.name, logsIndex.name) - && Objects.equals(this.numRetentionDays, logsIndex.numRetentionDays); + return Objects.equals(this.dailyLimit, logsIndex.dailyLimit) && Objects.equals(this.exclusionFilters, logsIndex.exclusionFilters) && Objects.equals(this.filter, logsIndex.filter) && Objects.equals(this.isRateLimited, logsIndex.isRateLimited) && Objects.equals(this.name, logsIndex.name) && Objects.equals(this.numRetentionDays, logsIndex.numRetentionDays); } + @Override public int hashCode() { - return Objects.hash( - dailyLimit, exclusionFilters, filter, isRateLimited, name, numRetentionDays); + return Objects.hash(dailyLimit,exclusionFilters,filter,isRateLimited,name,numRetentionDays); } @Override @@ -228,7 +231,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsIndexListResponse.java b/src/main/java/com/datadog/api/client/v1/model/LogsIndexListResponse.java index 4e6c6e3e3da..4093cb6be25 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsIndexListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsIndexListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object with all Index configurations for a given organization. */ -@JsonPropertyOrder({LogsIndexListResponse.JSON_PROPERTY_INDEXES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object with all Index configurations for a given organization.

+ */ +@JsonPropertyOrder({ + LogsIndexListResponse.JSON_PROPERTY_INDEXES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsIndexListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INDEXES = "indexes"; private List indexes = null; @@ -30,7 +50,6 @@ public LogsIndexListResponse indexes(List indexes) { } return this; } - public LogsIndexListResponse addIndexesItem(LogsIndex indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -41,22 +60,23 @@ public LogsIndexListResponse addIndexesItem(LogsIndex indexesItem) { } /** - * Array of Log index configurations. - * + *

Array of Log index configurations.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - /** Return true if this LogsIndexListResponse object is equal to o. */ + /** + * Return true if this LogsIndexListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.indexes, logsIndexListResponse.indexes); } + @Override public int hashCode() { return Objects.hash(indexes); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsIndexUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/LogsIndexUpdateRequest.java index f44fd87b976..60de1844428 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsIndexUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsIndexUpdateRequest.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object for updating a Datadog Log index. */ +/** + *

Object for updating a Datadog Log index.

+ */ @JsonPropertyOrder({ LogsIndexUpdateRequest.JSON_PROPERTY_DAILY_LIMIT, LogsIndexUpdateRequest.JSON_PROPERTY_DISABLE_DAILY_LIMIT, @@ -23,10 +40,10 @@ LogsIndexUpdateRequest.JSON_PROPERTY_FILTER, LogsIndexUpdateRequest.JSON_PROPERTY_NUM_RETENTION_DAYS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsIndexUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DAILY_LIMIT = "daily_limit"; private Long dailyLimit; @@ -46,55 +63,50 @@ public LogsIndexUpdateRequest() {} @JsonCreator public LogsIndexUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_FILTER) LogsFilter filter) { - this.filter = filter; - this.unparsed |= filter.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_FILTER)LogsFilter filter) { + this.filter = filter; + this.unparsed |= filter.unparsed; } - public LogsIndexUpdateRequest dailyLimit(Long dailyLimit) { this.dailyLimit = dailyLimit; return this; } /** - * The number of log events you can send in this index per day before you are rate-limited. - * + *

The number of log events you can send in this index per day before you are rate-limited.

* @return dailyLimit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DAILY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDailyLimit() { - return dailyLimit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDailyLimit() { + return dailyLimit; + } public void setDailyLimit(Long dailyLimit) { this.dailyLimit = dailyLimit; } - public LogsIndexUpdateRequest disableDailyLimit(Boolean disableDailyLimit) { this.disableDailyLimit = disableDailyLimit; return this; } /** - * If true, sets the daily_limit value to null and the index is not limited on a - * daily basis (any specified daily_limit value in the request is ignored). If false - * or omitted, the index's current daily_limit is maintained. - * + *

If true, sets the daily_limit value to null and the index is not limited on a daily basis (any + * specified daily_limit value in the request is ignored). If false or omitted, the index's current + * daily_limit is maintained.

* @return disableDailyLimit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLE_DAILY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisableDailyLimit() { - return disableDailyLimit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLE_DAILY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisableDailyLimit() { + return disableDailyLimit; + } public void setDisableDailyLimit(Boolean disableDailyLimit) { this.disableDailyLimit = disableDailyLimit; } - public LogsIndexUpdateRequest exclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; for (LogsExclusion item : exclusionFilters) { @@ -102,7 +114,6 @@ public LogsIndexUpdateRequest exclusionFilters(List exclusionFilt } return this; } - public LogsIndexUpdateRequest addExclusionFiltersItem(LogsExclusion exclusionFiltersItem) { if (this.exclusionFilters == null) { this.exclusionFilters = new ArrayList<>(); @@ -113,23 +124,21 @@ public LogsIndexUpdateRequest addExclusionFiltersItem(LogsExclusion exclusionFil } /** - * An array of exclusion objects. The logs are tested against the query of each filter, following - * the order of the array. Only the first matching active exclusion matters, others (if any) are - * ignored. - * + *

An array of exclusion objects. The logs are tested against the query of each filter, + * following the order of the array. Only the first matching active exclusion matters, + * others (if any) are ignored.

* @return exclusionFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExclusionFilters() { - return exclusionFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExclusionFilters() { + return exclusionFilters; + } public void setExclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; } - public LogsIndexUpdateRequest filter(LogsFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -137,46 +146,44 @@ public LogsIndexUpdateRequest filter(LogsFilter filter) { } /** - * Filter for logs. - * + *

Filter for logs.

* @return filter - */ - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsFilter getFilter() { - return filter; - } - + **/ + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsFilter getFilter() { + return filter; + } public void setFilter(LogsFilter filter) { this.filter = filter; } - public LogsIndexUpdateRequest numRetentionDays(Long numRetentionDays) { this.numRetentionDays = numRetentionDays; return this; } /** - * The number of days before logs are deleted from this index. Available values depend on - * retention plans specified in your organization's contract/subscriptions. - * - *

Note: Changing the retention for an index adjusts the length of retention - * for all logs already in this index. It may also affect billing. - * + *

The number of days before logs are deleted from this index. Available values depend on + * retention plans specified in your organization's contract/subscriptions.

+ *

Note: Changing the retention for an index adjusts the length of retention for all logs + * already in this index. It may also affect billing.

* @return numRetentionDays - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUM_RETENTION_DAYS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumRetentionDays() { - return numRetentionDays; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_RETENTION_DAYS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumRetentionDays() { + return numRetentionDays; + } public void setNumRetentionDays(Long numRetentionDays) { this.numRetentionDays = numRetentionDays; } - /** Return true if this LogsIndexUpdateRequest object is equal to o. */ + /** + * Return true if this LogsIndexUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -186,16 +193,13 @@ public boolean equals(Object o) { return false; } LogsIndexUpdateRequest logsIndexUpdateRequest = (LogsIndexUpdateRequest) o; - return Objects.equals(this.dailyLimit, logsIndexUpdateRequest.dailyLimit) - && Objects.equals(this.disableDailyLimit, logsIndexUpdateRequest.disableDailyLimit) - && Objects.equals(this.exclusionFilters, logsIndexUpdateRequest.exclusionFilters) - && Objects.equals(this.filter, logsIndexUpdateRequest.filter) - && Objects.equals(this.numRetentionDays, logsIndexUpdateRequest.numRetentionDays); + return Objects.equals(this.dailyLimit, logsIndexUpdateRequest.dailyLimit) && Objects.equals(this.disableDailyLimit, logsIndexUpdateRequest.disableDailyLimit) && Objects.equals(this.exclusionFilters, logsIndexUpdateRequest.exclusionFilters) && Objects.equals(this.filter, logsIndexUpdateRequest.filter) && Objects.equals(this.numRetentionDays, logsIndexUpdateRequest.numRetentionDays); } + @Override public int hashCode() { - return Objects.hash(dailyLimit, disableDailyLimit, exclusionFilters, filter, numRetentionDays); + return Objects.hash(dailyLimit,disableDailyLimit,exclusionFilters,filter,numRetentionDays); } @Override @@ -212,7 +216,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsIndexesOrder.java b/src/main/java/com/datadog/api/client/v1/model/LogsIndexesOrder.java index eaf7ce7c62b..7ed8f3babe7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsIndexesOrder.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsIndexesOrder.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing the ordered list of log index names. */ -@JsonPropertyOrder({LogsIndexesOrder.JSON_PROPERTY_INDEX_NAMES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object containing the ordered list of log index names.

+ */ +@JsonPropertyOrder({ + LogsIndexesOrder.JSON_PROPERTY_INDEX_NAMES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsIndexesOrder { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INDEX_NAMES = "index_names"; private List indexNames = new ArrayList<>(); @@ -28,38 +47,37 @@ public LogsIndexesOrder() {} @JsonCreator public LogsIndexesOrder( - @JsonProperty(required = true, value = JSON_PROPERTY_INDEX_NAMES) List indexNames) { - this.indexNames = indexNames; + @JsonProperty(required=true, value=JSON_PROPERTY_INDEX_NAMES)List indexNames) { + this.indexNames = indexNames; } - public LogsIndexesOrder indexNames(List indexNames) { this.indexNames = indexNames; return this; } - public LogsIndexesOrder addIndexNamesItem(String indexNamesItem) { this.indexNames.add(indexNamesItem); return this; } /** - * Array of strings identifying by their name(s) the index(es) of your organization. Logs are - * tested against the query filter of each index one by one, following the order of the array. - * Logs are eventually stored in the first matching index. - * + *

Array of strings identifying by their name(s) the index(es) of your organization. + * Logs are tested against the query filter of each index one by one, following the order of the array. + * Logs are eventually stored in the first matching index.

* @return indexNames - */ - @JsonProperty(JSON_PROPERTY_INDEX_NAMES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getIndexNames() { - return indexNames; - } - + **/ + @JsonProperty(JSON_PROPERTY_INDEX_NAMES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getIndexNames() { + return indexNames; + } public void setIndexNames(List indexNames) { this.indexNames = indexNames; } - /** Return true if this LogsIndexesOrder object is equal to o. */ + /** + * Return true if this LogsIndexesOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,6 +90,7 @@ public boolean equals(Object o) { return Objects.equals(this.indexNames, logsIndexesOrder.indexNames); } + @Override public int hashCode() { return Objects.hash(indexNames); @@ -87,7 +106,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsListRequest.java b/src/main/java/com/datadog/api/client/v1/model/LogsListRequest.java index a787d09a577..1d6a98b3a51 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsListRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsListRequest.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to send with the request to retrieve a list of logs from your Organization. */ + +/** + *

Object to send with the request to retrieve a list of logs from your Organization.

+ */ @JsonPropertyOrder({ LogsListRequest.JSON_PROPERTY_INDEX, LogsListRequest.JSON_PROPERTY_LIMIT, @@ -22,10 +41,10 @@ LogsListRequest.JSON_PROPERTY_START_AT, LogsListRequest.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INDEX = "index"; private String index; @@ -48,75 +67,69 @@ public LogsListRequest() {} @JsonCreator public LogsListRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_TIME) LogsListRequestTime time) { - this.time = time; - this.unparsed |= time.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_TIME)LogsListRequestTime time) { + this.time = time; + this.unparsed |= time.unparsed; } - public LogsListRequest index(String index) { this.index = index; return this; } /** - * The log index on which the request is performed. For multi-index organizations, the default is - * all live indexes. Historical indexes of rehydrated logs must be specified. - * + *

The log index on which the request is performed. For multi-index organizations, + * the default is all live indexes. Historical indexes of rehydrated logs must be specified.

* @return index - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIndex() { - return index; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIndex() { + return index; + } public void setIndex(String index) { this.index = index; } - public LogsListRequest limit(Integer limit) { this.limit = limit; return this; } /** - * Number of logs return in the response. maximum: 1000 - * + *

Number of logs return in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - public LogsListRequest query(String query) { this.query = query; return this; } /** - * The search query - following the log search syntax. - * + *

The search query - following the log search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public LogsListRequest sort(LogsSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -124,49 +137,44 @@ public LogsListRequest sort(LogsSort sort) { } /** - * Time-ascending asc or time-descending desc results. - * + *

Time-ascending asc or time-descending desc results.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsSort getSort() { + return sort; + } public void setSort(LogsSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - public LogsListRequest startAt(String startAt) { this.startAt = startAt; return this; } /** - * Hash identifier of the first log to return in the list, available in a log id - * attribute. This parameter is used for the pagination feature. - * - *

Note: This parameter is ignored if the corresponding log is out of the - * scope of the specified time window. - * + *

Hash identifier of the first log to return in the list, available in a log id attribute. + * This parameter is used for the pagination feature.

+ *

Note: This parameter is ignored if the corresponding log + * is out of the scope of the specified time window.

* @return startAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStartAt() { - return startAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStartAt() { + return startAt; + } public void setStartAt(String startAt) { this.startAt = startAt; } - public LogsListRequest time(LogsListRequestTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -174,21 +182,22 @@ public LogsListRequest time(LogsListRequestTime time) { } /** - * Timeframe to retrieve the log from. - * + *

Timeframe to retrieve the log from.

* @return time - */ - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsListRequestTime getTime() { - return time; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsListRequestTime getTime() { + return time; + } public void setTime(LogsListRequestTime time) { this.time = time; } - /** Return true if this LogsListRequest object is equal to o. */ + /** + * Return true if this LogsListRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -198,17 +207,13 @@ public boolean equals(Object o) { return false; } LogsListRequest logsListRequest = (LogsListRequest) o; - return Objects.equals(this.index, logsListRequest.index) - && Objects.equals(this.limit, logsListRequest.limit) - && Objects.equals(this.query, logsListRequest.query) - && Objects.equals(this.sort, logsListRequest.sort) - && Objects.equals(this.startAt, logsListRequest.startAt) - && Objects.equals(this.time, logsListRequest.time); + return Objects.equals(this.index, logsListRequest.index) && Objects.equals(this.limit, logsListRequest.limit) && Objects.equals(this.query, logsListRequest.query) && Objects.equals(this.sort, logsListRequest.sort) && Objects.equals(this.startAt, logsListRequest.startAt) && Objects.equals(this.time, logsListRequest.time); } + @Override public int hashCode() { - return Objects.hash(index, limit, query, sort, startAt, time); + return Objects.hash(index,limit,query,sort,startAt,time); } @Override @@ -226,7 +231,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsListRequestTime.java b/src/main/java/com/datadog/api/client/v1/model/LogsListRequestTime.java index c4467b1ebd4..7fbed6843af 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsListRequestTime.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsListRequestTime.java @@ -6,28 +6,43 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Timeframe to retrieve the log from. */ + +/** + *

Timeframe to retrieve the log from.

+ */ @JsonPropertyOrder({ LogsListRequestTime.JSON_PROPERTY_FROM, LogsListRequestTime.JSON_PROPERTY_TIMEZONE, LogsListRequestTime.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListRequestTime { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime from; @@ -35,7 +50,6 @@ public class LogsListRequestTime { private String timezone; public static final String JSON_PROPERTY_TO = "to"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime to; @@ -43,75 +57,71 @@ public LogsListRequestTime() {} @JsonCreator public LogsListRequestTime( - @JsonProperty(required = true, value = JSON_PROPERTY_FROM) OffsetDateTime from, - @JsonProperty(required = true, value = JSON_PROPERTY_TO) OffsetDateTime to) { - this.from = from; - this.to = to; + @JsonProperty(required=true, value=JSON_PROPERTY_FROM)OffsetDateTime from, + @JsonProperty(required=true, value=JSON_PROPERTY_TO)OffsetDateTime to) { + this.from = from; + this.to = to; } - public LogsListRequestTime from(OffsetDateTime from) { this.from = from; return this; } /** - * Minimum timestamp for requested logs. - * + *

Minimum timestamp for requested logs.

* @return from - */ - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getFrom() { - return from; - } - + **/ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFrom() { + return from; + } public void setFrom(OffsetDateTime from) { this.from = from; } - public LogsListRequestTime timezone(String timezone) { this.timezone = timezone; return this; } /** - * Timezone can be specified both as an offset (for example "UTC+03:00") or a regional zone (for - * example "Europe/Paris"). - * + *

Timezone can be specified both as an offset (for example "UTC+03:00") + * or a regional zone (for example "Europe/Paris").

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - public LogsListRequestTime to(OffsetDateTime to) { this.to = to; return this; } /** - * Maximum timestamp for requested logs. - * + *

Maximum timestamp for requested logs.

* @return to - */ - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getTo() { - return to; - } - + **/ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTo() { + return to; + } public void setTo(OffsetDateTime to) { this.to = to; } - /** Return true if this LogsListRequestTime object is equal to o. */ + /** + * Return true if this LogsListRequestTime object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -121,14 +131,13 @@ public boolean equals(Object o) { return false; } LogsListRequestTime logsListRequestTime = (LogsListRequestTime) o; - return Objects.equals(this.from, logsListRequestTime.from) - && Objects.equals(this.timezone, logsListRequestTime.timezone) - && Objects.equals(this.to, logsListRequestTime.to); + return Objects.equals(this.from, logsListRequestTime.from) && Objects.equals(this.timezone, logsListRequestTime.timezone) && Objects.equals(this.to, logsListRequestTime.to); } + @Override public int hashCode() { - return Objects.hash(from, timezone, to); + return Objects.hash(from,timezone,to); } @Override @@ -143,7 +152,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsListResponse.java b/src/main/java/com/datadog/api/client/v1/model/LogsListResponse.java index 6f79c029768..77d63472016 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsListResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object with all logs matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object with all logs matching the request and pagination information.

+ */ @JsonPropertyOrder({ LogsListResponse.JSON_PROPERTY_LOGS, LogsListResponse.JSON_PROPERTY_NEXT_LOG_ID, LogsListResponse.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LOGS = "logs"; private List logs = null; @@ -40,7 +58,6 @@ public LogsListResponse logs(List logs) { } return this; } - public LogsListResponse addLogsItem(Log logsItem) { if (this.logs == null) { this.logs = new ArrayList<>(); @@ -51,65 +68,62 @@ public LogsListResponse addLogsItem(Log logsItem) { } /** - * Array of logs matching the request and the nextLogId if sent. - * + *

Array of logs matching the request and the nextLogId if sent.

* @return logs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLogs() { - return logs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLogs() { + return logs; + } public void setLogs(List logs) { this.logs = logs; } - public LogsListResponse nextLogId(String nextLogId) { this.nextLogId = nextLogId; return this; } /** - * Hash identifier of the next log to return in the list. This parameter is used for the - * pagination feature. - * + *

Hash identifier of the next log to return in the list. + * This parameter is used for the pagination feature.

* @return nextLogId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT_LOG_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNextLogId() { - return nextLogId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_LOG_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNextLogId() { + return nextLogId; + } public void setNextLogId(String nextLogId) { this.nextLogId = nextLogId; } - public LogsListResponse status(String status) { this.status = status; return this; } /** - * Status of the response. - * + *

Status of the response.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this LogsListResponse object is equal to o. */ + /** + * Return true if this LogsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +133,13 @@ public boolean equals(Object o) { return false; } LogsListResponse logsListResponse = (LogsListResponse) o; - return Objects.equals(this.logs, logsListResponse.logs) - && Objects.equals(this.nextLogId, logsListResponse.nextLogId) - && Objects.equals(this.status, logsListResponse.status); + return Objects.equals(this.logs, logsListResponse.logs) && Objects.equals(this.nextLogId, logsListResponse.nextLogId) && Objects.equals(this.status, logsListResponse.status); } + @Override public int hashCode() { - return Objects.hash(logs, nextLogId, status); + return Objects.hash(logs,nextLogId,status); } @Override @@ -141,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessor.java b/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessor.java index 9bb17df820a..e0d906743f8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessor.java @@ -6,21 +6,37 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use the Lookup Processor to define a mapping between a log attribute and a human readable value - * saved in the processors mapping table. For example, you can use the Lookup Processor to map an - * internal service ID into a human readable service name. Alternatively, you could also use it to - * check if the MAC address that just attempted to connect to the production environment belongs to - * your list of stolen machines. + *

Use the Lookup Processor to define a mapping between a log attribute + * and a human readable value saved in the processors mapping table. + * For example, you can use the Lookup Processor to map an internal service ID + * into a human readable service name. Alternatively, you could also use it to check + * if the MAC address that just attempted to connect to the production + * environment belongs to your list of stolen machines.

*/ @JsonPropertyOrder({ LogsLookupProcessor.JSON_PROPERTY_DEFAULT_LOOKUP, @@ -31,10 +47,10 @@ LogsLookupProcessor.JSON_PROPERTY_TARGET, LogsLookupProcessor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsLookupProcessor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFAULT_LOOKUP = "default_lookup"; private String defaultLookup; @@ -60,147 +76,133 @@ public LogsLookupProcessor() {} @JsonCreator public LogsLookupProcessor( - @JsonProperty(required = true, value = JSON_PROPERTY_LOOKUP_TABLE) List lookupTable, - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsLookupProcessorType type) { - this.lookupTable = lookupTable; - this.source = source; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_LOOKUP_TABLE)List lookupTable, + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCE)String source, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsLookupProcessorType type) { + this.lookupTable = lookupTable; + this.source = source; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsLookupProcessor defaultLookup(String defaultLookup) { this.defaultLookup = defaultLookup; return this; } /** - * Value to set the target attribute if the source value is not found in the list. - * + *

Value to set the target attribute if the source value is not found in the list.

* @return defaultLookup - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEFAULT_LOOKUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDefaultLookup() { - return defaultLookup; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_LOOKUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDefaultLookup() { + return defaultLookup; + } public void setDefaultLookup(String defaultLookup) { this.defaultLookup = defaultLookup; } - public LogsLookupProcessor isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsLookupProcessor lookupTable(List lookupTable) { this.lookupTable = lookupTable; return this; } - public LogsLookupProcessor addLookupTableItem(String lookupTableItem) { this.lookupTable.add(lookupTableItem); return this; } /** - * Mapping table of values for the source attribute and their associated target attribute values, - * formatted as ["source_key1,target_value1", "source_key2,target_value2"] - * + *

Mapping table of values for the source attribute and their associated target attribute values, + * formatted as ["source_key1,target_value1", "source_key2,target_value2"]

* @return lookupTable - */ - @JsonProperty(JSON_PROPERTY_LOOKUP_TABLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getLookupTable() { - return lookupTable; - } - + **/ + @JsonProperty(JSON_PROPERTY_LOOKUP_TABLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getLookupTable() { + return lookupTable; + } public void setLookupTable(List lookupTable) { this.lookupTable = lookupTable; } - public LogsLookupProcessor name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsLookupProcessor source(String source) { this.source = source; return this; } /** - * Source attribute used to perform the lookup. - * + *

Source attribute used to perform the lookup.

* @return source - */ - @JsonProperty(JSON_PROPERTY_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSource() { - return source; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } public void setSource(String source) { this.source = source; } - public LogsLookupProcessor target(String target) { this.target = target; return this; } /** - * Name of the attribute that contains the corresponding value in the mapping list or the - * default_lookup if not found in the mapping list. - * + *

Name of the attribute that contains the corresponding value in the mapping list + * or the default_lookup if not found in the mapping list.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsLookupProcessor type(LogsLookupProcessorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -208,24 +210,25 @@ public LogsLookupProcessor type(LogsLookupProcessorType type) { } /** - * Type of logs lookup processor. - * + *

Type of logs lookup processor.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsLookupProcessorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsLookupProcessorType getType() { + return type; + } public void setType(LogsLookupProcessorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsLookupProcessor object is equal to o. */ + /** + * Return true if this LogsLookupProcessor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -235,18 +238,13 @@ public boolean equals(Object o) { return false; } LogsLookupProcessor logsLookupProcessor = (LogsLookupProcessor) o; - return Objects.equals(this.defaultLookup, logsLookupProcessor.defaultLookup) - && Objects.equals(this.isEnabled, logsLookupProcessor.isEnabled) - && Objects.equals(this.lookupTable, logsLookupProcessor.lookupTable) - && Objects.equals(this.name, logsLookupProcessor.name) - && Objects.equals(this.source, logsLookupProcessor.source) - && Objects.equals(this.target, logsLookupProcessor.target) - && Objects.equals(this.type, logsLookupProcessor.type); + return Objects.equals(this.defaultLookup, logsLookupProcessor.defaultLookup) && Objects.equals(this.isEnabled, logsLookupProcessor.isEnabled) && Objects.equals(this.lookupTable, logsLookupProcessor.lookupTable) && Objects.equals(this.name, logsLookupProcessor.name) && Objects.equals(this.source, logsLookupProcessor.source) && Objects.equals(this.target, logsLookupProcessor.target) && Objects.equals(this.type, logsLookupProcessor.type); } + @Override public int hashCode() { - return Objects.hash(defaultLookup, isEnabled, lookupTable, name, source, target, type); + return Objects.hash(defaultLookup,isEnabled,lookupTable,name,source,target,type); } @Override @@ -265,7 +263,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessorType.java b/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessorType.java index 7a58746b036..45deab1837e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsLookupProcessorType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs lookup processor. */ +/** + *

Type of logs lookup processor.

+ */ @JsonSerialize(using = LogsLookupProcessorType.LogsLookupProcessorTypeSerializer.class) public class LogsLookupProcessorType { - public static final LogsLookupProcessorType LOOKUP_PROCESSOR = - new LogsLookupProcessorType("lookup-processor"); + public static final LogsLookupProcessorType LOOKUP_PROCESSOR = new LogsLookupProcessorType("lookup-processor"); - private static final Set allowedValues = - new HashSet(Arrays.asList("lookup-processor")); + private static final Set allowedValues = new HashSet(Arrays.asList("lookup-processor")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsLookupProcessorTypeSerializer - extends StdSerializer { - public LogsLookupProcessorTypeSerializer(Class t) { - super(t); - } + public static class LogsLookupProcessorTypeSerializer extends StdSerializer { + public LogsLookupProcessorTypeSerializer(Class t) { + super(t); + } - public LogsLookupProcessorTypeSerializer() { - this(null); - } + public LogsLookupProcessorTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsLookupProcessorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsLookupProcessorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsLookupProcessorType object is equal to o. */ + /** + * Return true if this LogsLookupProcessorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapper.java b/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapper.java index 9651f2513bf..8aa093b4a8e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapper.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapper.java @@ -6,22 +6,36 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The message is a key attribute in Datadog. It is displayed in the message column of the Log - * Explorer and you can do full string search on it. Use this Processor to define one or more - * attributes as the official log message. - * - *

Note: If multiple log message remapper processors can be applied to a given - * log, only the first one (according to the pipeline order) is taken into account. + *

The message is a key attribute in Datadog. + * It is displayed in the message column of the Log Explorer and you can do full string search on it. + * Use this Processor to define one or more attributes as the official log message.

+ *

Note: If multiple log message remapper processors can be applied to a given log, + * only the first one (according to the pipeline order) is taken into account.

*/ @JsonPropertyOrder({ LogsMessageRemapper.JSON_PROPERTY_IS_ENABLED, @@ -29,10 +43,10 @@ LogsMessageRemapper.JSON_PROPERTY_SOURCES, LogsMessageRemapper.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMessageRemapper { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -49,80 +63,72 @@ public LogsMessageRemapper() {} @JsonCreator public LogsMessageRemapper( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsMessageRemapperType type) { - this.sources = sources; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsMessageRemapperType type) { + this.sources = sources; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsMessageRemapper isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsMessageRemapper name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsMessageRemapper sources(List sources) { this.sources = sources; return this; } - public LogsMessageRemapper addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsMessageRemapper type(LogsMessageRemapperType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -130,24 +136,25 @@ public LogsMessageRemapper type(LogsMessageRemapperType type) { } /** - * Type of logs message remapper. - * + *

Type of logs message remapper.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMessageRemapperType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMessageRemapperType getType() { + return type; + } public void setType(LogsMessageRemapperType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsMessageRemapper object is equal to o. */ + /** + * Return true if this LogsMessageRemapper object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -157,15 +164,13 @@ public boolean equals(Object o) { return false; } LogsMessageRemapper logsMessageRemapper = (LogsMessageRemapper) o; - return Objects.equals(this.isEnabled, logsMessageRemapper.isEnabled) - && Objects.equals(this.name, logsMessageRemapper.name) - && Objects.equals(this.sources, logsMessageRemapper.sources) - && Objects.equals(this.type, logsMessageRemapper.type); + return Objects.equals(this.isEnabled, logsMessageRemapper.isEnabled) && Objects.equals(this.name, logsMessageRemapper.name) && Objects.equals(this.sources, logsMessageRemapper.sources) && Objects.equals(this.type, logsMessageRemapper.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, sources, type); + return Objects.hash(isEnabled,name,sources,type); } @Override @@ -181,7 +186,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapperType.java b/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapperType.java index 772830db835..1bcd1af2500 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapperType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsMessageRemapperType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs message remapper. */ +/** + *

Type of logs message remapper.

+ */ @JsonSerialize(using = LogsMessageRemapperType.LogsMessageRemapperTypeSerializer.class) public class LogsMessageRemapperType { - public static final LogsMessageRemapperType MESSAGE_REMAPPER = - new LogsMessageRemapperType("message-remapper"); + public static final LogsMessageRemapperType MESSAGE_REMAPPER = new LogsMessageRemapperType("message-remapper"); - private static final Set allowedValues = - new HashSet(Arrays.asList("message-remapper")); + private static final Set allowedValues = new HashSet(Arrays.asList("message-remapper")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsMessageRemapperTypeSerializer - extends StdSerializer { - public LogsMessageRemapperTypeSerializer(Class t) { - super(t); - } + public static class LogsMessageRemapperTypeSerializer extends StdSerializer { + public LogsMessageRemapperTypeSerializer(Class t) { + super(t); + } - public LogsMessageRemapperTypeSerializer() { - this(null); - } + public LogsMessageRemapperTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsMessageRemapperType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsMessageRemapperType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsMessageRemapperType object is equal to o. */ + /** + * Return true if this LogsMessageRemapperType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsPipeline.java b/src/main/java/com/datadog/api/client/v1/model/LogsPipeline.java index 16642505c19..6eb98a78f61 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsPipeline.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsPipeline.java @@ -6,21 +6,35 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Pipelines and processors operate on incoming logs, parsing and transforming them into structured - * attributes for easier querying. - * - *

Note: These endpoints are only available for admin users. Make sure to use an - * application key created by an admin. + *

Pipelines and processors operate on incoming logs, + * parsing and transforming them into structured attributes for easier querying.

+ *

Note: These endpoints are only available for admin users. + * Make sure to use an application key created by an admin.

*/ @JsonPropertyOrder({ LogsPipeline.JSON_PROPERTY_FILTER, @@ -31,10 +45,10 @@ LogsPipeline.JSON_PROPERTY_PROCESSORS, LogsPipeline.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsPipeline { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private LogsFilter filter; @@ -59,10 +73,10 @@ public class LogsPipeline { public LogsPipeline() {} @JsonCreator - public LogsPipeline(@JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + public LogsPipeline( + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public LogsPipeline filter(LogsFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -70,86 +84,80 @@ public LogsPipeline filter(LogsFilter filter) { } /** - * Filter for logs. - * + *

Filter for logs.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsFilter getFilter() { + return filter; + } public void setFilter(LogsFilter filter) { this.filter = filter; } /** - * ID of the pipeline. - * + *

ID of the pipeline.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public LogsPipeline isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the pipeline is enabled. - * + *

Whether or not the pipeline is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } /** - * Whether or not the pipeline can be edited. - * + *

Whether or not the pipeline can be edited.

* @return isReadOnly - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsReadOnly() { - return isReadOnly; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsReadOnly() { + return isReadOnly; + } public LogsPipeline name(String name) { this.name = name; return this; } /** - * Name of the pipeline. - * + *

Name of the pipeline.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsPipeline processors(List processors) { this.processors = processors; for (LogsProcessor item : processors) { @@ -157,7 +165,6 @@ public LogsPipeline processors(List processors) { } return this; } - public LogsPipeline addProcessorsItem(LogsProcessor processorsItem) { if (this.processors == null) { this.processors = new ArrayList<>(); @@ -168,34 +175,35 @@ public LogsPipeline addProcessorsItem(LogsProcessor processorsItem) { } /** - * Ordered list of processors in this pipeline. - * + *

Ordered list of processors in this pipeline.

* @return processors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESSORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getProcessors() { - return processors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getProcessors() { + return processors; + } public void setProcessors(List processors) { this.processors = processors; } /** - * Type of pipeline. - * + *

Type of pipeline.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } - /** Return true if this LogsPipeline object is equal to o. */ + /** + * Return true if this LogsPipeline object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -205,18 +213,13 @@ public boolean equals(Object o) { return false; } LogsPipeline logsPipeline = (LogsPipeline) o; - return Objects.equals(this.filter, logsPipeline.filter) - && Objects.equals(this.id, logsPipeline.id) - && Objects.equals(this.isEnabled, logsPipeline.isEnabled) - && Objects.equals(this.isReadOnly, logsPipeline.isReadOnly) - && Objects.equals(this.name, logsPipeline.name) - && Objects.equals(this.processors, logsPipeline.processors) - && Objects.equals(this.type, logsPipeline.type); + return Objects.equals(this.filter, logsPipeline.filter) && Objects.equals(this.id, logsPipeline.id) && Objects.equals(this.isEnabled, logsPipeline.isEnabled) && Objects.equals(this.isReadOnly, logsPipeline.isReadOnly) && Objects.equals(this.name, logsPipeline.name) && Objects.equals(this.processors, logsPipeline.processors) && Objects.equals(this.type, logsPipeline.type); } + @Override public int hashCode() { - return Objects.hash(filter, id, isEnabled, isReadOnly, name, processors, type); + return Objects.hash(filter,id,isEnabled,isReadOnly,name,processors,type); } @Override @@ -235,7 +238,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessor.java b/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessor.java index e946c6a889e..06ab1f9483e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessor.java @@ -6,22 +6,35 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Nested Pipelines are pipelines within a pipeline. Use Nested Pipelines to split the processing - * into two steps. For example, first use a high-level filtering such as team and then a second - * level of filtering based on the integration, service, or any other tag or attribute. - * - *

A pipeline can contain Nested Pipelines and Processors whereas a Nested Pipeline can only - * contain Processors. + *

Nested Pipelines are pipelines within a pipeline. Use Nested Pipelines to split the processing into two steps. + * For example, first use a high-level filtering such as team and then a second level of filtering based on the + * integration, service, or any other tag or attribute.

+ *

A pipeline can contain Nested Pipelines and Processors whereas a Nested Pipeline can only contain Processors.

*/ @JsonPropertyOrder({ LogsPipelineProcessor.JSON_PROPERTY_FILTER, @@ -30,10 +43,10 @@ LogsPipelineProcessor.JSON_PROPERTY_PROCESSORS, LogsPipelineProcessor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsPipelineProcessor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private LogsFilter filter; @@ -53,11 +66,10 @@ public LogsPipelineProcessor() {} @JsonCreator public LogsPipelineProcessor( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsPipelineProcessorType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsPipelineProcessorType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsPipelineProcessor filter(LogsFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -65,63 +77,57 @@ public LogsPipelineProcessor filter(LogsFilter filter) { } /** - * Filter for logs. - * + *

Filter for logs.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsFilter getFilter() { + return filter; + } public void setFilter(LogsFilter filter) { this.filter = filter; } - public LogsPipelineProcessor isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsPipelineProcessor name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsPipelineProcessor processors(List processors) { this.processors = processors; for (LogsProcessor item : processors) { @@ -129,7 +135,6 @@ public LogsPipelineProcessor processors(List processors) { } return this; } - public LogsPipelineProcessor addProcessorsItem(LogsProcessor processorsItem) { if (this.processors == null) { this.processors = new ArrayList<>(); @@ -140,21 +145,19 @@ public LogsPipelineProcessor addProcessorsItem(LogsProcessor processorsItem) { } /** - * Ordered list of processors in this pipeline. - * + *

Ordered list of processors in this pipeline.

* @return processors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESSORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getProcessors() { - return processors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getProcessors() { + return processors; + } public void setProcessors(List processors) { this.processors = processors; } - public LogsPipelineProcessor type(LogsPipelineProcessorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -162,24 +165,25 @@ public LogsPipelineProcessor type(LogsPipelineProcessorType type) { } /** - * Type of logs pipeline processor. - * + *

Type of logs pipeline processor.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsPipelineProcessorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsPipelineProcessorType getType() { + return type; + } public void setType(LogsPipelineProcessorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsPipelineProcessor object is equal to o. */ + /** + * Return true if this LogsPipelineProcessor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -189,16 +193,13 @@ public boolean equals(Object o) { return false; } LogsPipelineProcessor logsPipelineProcessor = (LogsPipelineProcessor) o; - return Objects.equals(this.filter, logsPipelineProcessor.filter) - && Objects.equals(this.isEnabled, logsPipelineProcessor.isEnabled) - && Objects.equals(this.name, logsPipelineProcessor.name) - && Objects.equals(this.processors, logsPipelineProcessor.processors) - && Objects.equals(this.type, logsPipelineProcessor.type); + return Objects.equals(this.filter, logsPipelineProcessor.filter) && Objects.equals(this.isEnabled, logsPipelineProcessor.isEnabled) && Objects.equals(this.name, logsPipelineProcessor.name) && Objects.equals(this.processors, logsPipelineProcessor.processors) && Objects.equals(this.type, logsPipelineProcessor.type); } + @Override public int hashCode() { - return Objects.hash(filter, isEnabled, name, processors, type); + return Objects.hash(filter,isEnabled,name,processors,type); } @Override @@ -215,7 +216,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessorType.java b/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessorType.java index 16a91004895..70678515c57 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsPipelineProcessorType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs pipeline processor. */ +/** + *

Type of logs pipeline processor.

+ */ @JsonSerialize(using = LogsPipelineProcessorType.LogsPipelineProcessorTypeSerializer.class) public class LogsPipelineProcessorType { - public static final LogsPipelineProcessorType PIPELINE = - new LogsPipelineProcessorType("pipeline"); + public static final LogsPipelineProcessorType PIPELINE = new LogsPipelineProcessorType("pipeline"); private static final Set allowedValues = new HashSet(Arrays.asList("pipeline")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsPipelineProcessorTypeSerializer - extends StdSerializer { - public LogsPipelineProcessorTypeSerializer(Class t) { - super(t); - } + public static class LogsPipelineProcessorTypeSerializer extends StdSerializer { + public LogsPipelineProcessorTypeSerializer(Class t) { + super(t); + } - public LogsPipelineProcessorTypeSerializer() { - this(null); - } + public LogsPipelineProcessorTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsPipelineProcessorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsPipelineProcessorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsPipelineProcessorType object is equal to o. */ + /** + * Return true if this LogsPipelineProcessorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsPipelinesOrder.java b/src/main/java/com/datadog/api/client/v1/model/LogsPipelinesOrder.java index 01d95c9619f..b236f2bc44c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsPipelinesOrder.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsPipelinesOrder.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing the ordered list of pipeline IDs. */ -@JsonPropertyOrder({LogsPipelinesOrder.JSON_PROPERTY_PIPELINE_IDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object containing the ordered list of pipeline IDs.

+ */ +@JsonPropertyOrder({ + LogsPipelinesOrder.JSON_PROPERTY_PIPELINE_IDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsPipelinesOrder { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PIPELINE_IDS = "pipeline_ids"; private List pipelineIds = new ArrayList<>(); @@ -28,37 +47,36 @@ public LogsPipelinesOrder() {} @JsonCreator public LogsPipelinesOrder( - @JsonProperty(required = true, value = JSON_PROPERTY_PIPELINE_IDS) List pipelineIds) { - this.pipelineIds = pipelineIds; + @JsonProperty(required=true, value=JSON_PROPERTY_PIPELINE_IDS)List pipelineIds) { + this.pipelineIds = pipelineIds; } - public LogsPipelinesOrder pipelineIds(List pipelineIds) { this.pipelineIds = pipelineIds; return this; } - public LogsPipelinesOrder addPipelineIdsItem(String pipelineIdsItem) { this.pipelineIds.add(pipelineIdsItem); return this; } /** - * Ordered Array of <PIPELINE_ID> strings, the order of pipeline IDs in the - * array define the overall Pipelines order for Datadog. - * + *

Ordered Array of <PIPELINE_ID> strings, the order of pipeline IDs in the array + * define the overall Pipelines order for Datadog.

* @return pipelineIds - */ - @JsonProperty(JSON_PROPERTY_PIPELINE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPipelineIds() { - return pipelineIds; - } - + **/ + @JsonProperty(JSON_PROPERTY_PIPELINE_IDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getPipelineIds() { + return pipelineIds; + } public void setPipelineIds(List pipelineIds) { this.pipelineIds = pipelineIds; } - /** Return true if this LogsPipelinesOrder object is equal to o. */ + /** + * Return true if this LogsPipelinesOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -71,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.pipelineIds, logsPipelinesOrder.pipelineIds); } + @Override public int hashCode() { return Objects.hash(pipelineIds); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsProcessor.java b/src/main/java/com/datadog/api/client/v1/model/LogsProcessor.java index 590cdf8d8da..f6ebfcd1d1a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsProcessor.java @@ -6,1206 +6,961 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = LogsProcessor.LogsProcessorDeserializer.class) @JsonSerialize(using = LogsProcessor.LogsProcessorSerializer.class) public class LogsProcessor extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(LogsProcessor.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class LogsProcessorSerializer extends StdSerializer { - public LogsProcessorSerializer(Class t) { - super(t); - } + private static final Logger log = Logger.getLogger(LogsProcessor.class.getName()); - public LogsProcessorSerializer() { - this(null); - } + @JsonIgnore + public boolean unparsed = false; - @Override - public void serialize(LogsProcessor value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class LogsProcessorDeserializer extends StdDeserializer { - public LogsProcessorDeserializer() { - this(LogsProcessor.class); - } - - public LogsProcessorDeserializer(Class vc) { - super(vc); - } - - @Override - public LogsProcessor 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 LogsGrokParser - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsGrokParser.class.equals(Integer.class) - || LogsGrokParser.class.equals(Long.class) - || LogsGrokParser.class.equals(Float.class) - || LogsGrokParser.class.equals(Double.class) - || LogsGrokParser.class.equals(Boolean.class) - || LogsGrokParser.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsGrokParser.class.equals(Integer.class) - || LogsGrokParser.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsGrokParser.class.equals(Float.class) - || LogsGrokParser.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsGrokParser.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsGrokParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class LogsProcessorSerializer extends StdSerializer { + public LogsProcessorSerializer(Class t) { + super(t); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsGrokParser.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 (!((LogsGrokParser) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsGrokParser'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsGrokParser'", e); - } - // deserialize LogsDateRemapper - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsDateRemapper.class.equals(Integer.class) - || LogsDateRemapper.class.equals(Long.class) - || LogsDateRemapper.class.equals(Float.class) - || LogsDateRemapper.class.equals(Double.class) - || LogsDateRemapper.class.equals(Boolean.class) - || LogsDateRemapper.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsDateRemapper.class.equals(Integer.class) - || LogsDateRemapper.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsDateRemapper.class.equals(Float.class) - || LogsDateRemapper.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsDateRemapper.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsDateRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsDateRemapper.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 (!((LogsDateRemapper) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsDateRemapper'"); + public LogsProcessorSerializer() { + this(null); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsDateRemapper'", e); - } - // deserialize LogsStatusRemapper - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsStatusRemapper.class.equals(Integer.class) - || LogsStatusRemapper.class.equals(Long.class) - || LogsStatusRemapper.class.equals(Float.class) - || LogsStatusRemapper.class.equals(Double.class) - || LogsStatusRemapper.class.equals(Boolean.class) - || LogsStatusRemapper.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsStatusRemapper.class.equals(Integer.class) - || LogsStatusRemapper.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsStatusRemapper.class.equals(Float.class) - || LogsStatusRemapper.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsStatusRemapper.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsStatusRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsStatusRemapper.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 (!((LogsStatusRemapper) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsStatusRemapper'"); + @Override + public void serialize(LogsProcessor value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsStatusRemapper'", e); - } + } - // deserialize LogsServiceRemapper - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsServiceRemapper.class.equals(Integer.class) - || LogsServiceRemapper.class.equals(Long.class) - || LogsServiceRemapper.class.equals(Float.class) - || LogsServiceRemapper.class.equals(Double.class) - || LogsServiceRemapper.class.equals(Boolean.class) - || LogsServiceRemapper.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsServiceRemapper.class.equals(Integer.class) - || LogsServiceRemapper.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsServiceRemapper.class.equals(Float.class) - || LogsServiceRemapper.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsServiceRemapper.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsServiceRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsServiceRemapper.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 (!((LogsServiceRemapper) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsServiceRemapper'"); + public static class LogsProcessorDeserializer extends StdDeserializer { + public LogsProcessorDeserializer() { + this(LogsProcessor.class); + } + + public LogsProcessorDeserializer(Class vc) { + super(vc); + } + + @Override + public LogsProcessor 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 LogsGrokParser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsGrokParser.class.equals(Integer.class) || LogsGrokParser.class.equals(Long.class) || LogsGrokParser.class.equals(Float.class) || LogsGrokParser.class.equals(Double.class) || LogsGrokParser.class.equals(Boolean.class) || LogsGrokParser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsGrokParser.class.equals(Integer.class) || LogsGrokParser.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsGrokParser.class.equals(Float.class) || LogsGrokParser.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsGrokParser.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsGrokParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsGrokParser.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 (!((LogsGrokParser)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsGrokParser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsGrokParser'", e); + } + + // deserialize LogsDateRemapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsDateRemapper.class.equals(Integer.class) || LogsDateRemapper.class.equals(Long.class) || LogsDateRemapper.class.equals(Float.class) || LogsDateRemapper.class.equals(Double.class) || LogsDateRemapper.class.equals(Boolean.class) || LogsDateRemapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsDateRemapper.class.equals(Integer.class) || LogsDateRemapper.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsDateRemapper.class.equals(Float.class) || LogsDateRemapper.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsDateRemapper.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsDateRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsDateRemapper.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 (!((LogsDateRemapper)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsDateRemapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsDateRemapper'", e); + } + + // deserialize LogsStatusRemapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsStatusRemapper.class.equals(Integer.class) || LogsStatusRemapper.class.equals(Long.class) || LogsStatusRemapper.class.equals(Float.class) || LogsStatusRemapper.class.equals(Double.class) || LogsStatusRemapper.class.equals(Boolean.class) || LogsStatusRemapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsStatusRemapper.class.equals(Integer.class) || LogsStatusRemapper.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsStatusRemapper.class.equals(Float.class) || LogsStatusRemapper.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsStatusRemapper.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsStatusRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsStatusRemapper.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 (!((LogsStatusRemapper)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsStatusRemapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsStatusRemapper'", e); + } + + // deserialize LogsServiceRemapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsServiceRemapper.class.equals(Integer.class) || LogsServiceRemapper.class.equals(Long.class) || LogsServiceRemapper.class.equals(Float.class) || LogsServiceRemapper.class.equals(Double.class) || LogsServiceRemapper.class.equals(Boolean.class) || LogsServiceRemapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsServiceRemapper.class.equals(Integer.class) || LogsServiceRemapper.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsServiceRemapper.class.equals(Float.class) || LogsServiceRemapper.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsServiceRemapper.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsServiceRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsServiceRemapper.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 (!((LogsServiceRemapper)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsServiceRemapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsServiceRemapper'", e); + } + + // deserialize LogsMessageRemapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsMessageRemapper.class.equals(Integer.class) || LogsMessageRemapper.class.equals(Long.class) || LogsMessageRemapper.class.equals(Float.class) || LogsMessageRemapper.class.equals(Double.class) || LogsMessageRemapper.class.equals(Boolean.class) || LogsMessageRemapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsMessageRemapper.class.equals(Integer.class) || LogsMessageRemapper.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsMessageRemapper.class.equals(Float.class) || LogsMessageRemapper.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsMessageRemapper.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsMessageRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsMessageRemapper.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 (!((LogsMessageRemapper)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsMessageRemapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsMessageRemapper'", e); + } + + // deserialize LogsAttributeRemapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsAttributeRemapper.class.equals(Integer.class) || LogsAttributeRemapper.class.equals(Long.class) || LogsAttributeRemapper.class.equals(Float.class) || LogsAttributeRemapper.class.equals(Double.class) || LogsAttributeRemapper.class.equals(Boolean.class) || LogsAttributeRemapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsAttributeRemapper.class.equals(Integer.class) || LogsAttributeRemapper.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsAttributeRemapper.class.equals(Float.class) || LogsAttributeRemapper.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsAttributeRemapper.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsAttributeRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsAttributeRemapper.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 (!((LogsAttributeRemapper)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsAttributeRemapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsAttributeRemapper'", e); + } + + // deserialize LogsURLParser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsURLParser.class.equals(Integer.class) || LogsURLParser.class.equals(Long.class) || LogsURLParser.class.equals(Float.class) || LogsURLParser.class.equals(Double.class) || LogsURLParser.class.equals(Boolean.class) || LogsURLParser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsURLParser.class.equals(Integer.class) || LogsURLParser.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsURLParser.class.equals(Float.class) || LogsURLParser.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsURLParser.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsURLParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsURLParser.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 (!((LogsURLParser)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsURLParser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsURLParser'", e); + } + + // deserialize LogsUserAgentParser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsUserAgentParser.class.equals(Integer.class) || LogsUserAgentParser.class.equals(Long.class) || LogsUserAgentParser.class.equals(Float.class) || LogsUserAgentParser.class.equals(Double.class) || LogsUserAgentParser.class.equals(Boolean.class) || LogsUserAgentParser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsUserAgentParser.class.equals(Integer.class) || LogsUserAgentParser.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsUserAgentParser.class.equals(Float.class) || LogsUserAgentParser.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsUserAgentParser.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsUserAgentParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsUserAgentParser.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 (!((LogsUserAgentParser)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsUserAgentParser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsUserAgentParser'", e); + } + + // deserialize LogsCategoryProcessor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsCategoryProcessor.class.equals(Integer.class) || LogsCategoryProcessor.class.equals(Long.class) || LogsCategoryProcessor.class.equals(Float.class) || LogsCategoryProcessor.class.equals(Double.class) || LogsCategoryProcessor.class.equals(Boolean.class) || LogsCategoryProcessor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsCategoryProcessor.class.equals(Integer.class) || LogsCategoryProcessor.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsCategoryProcessor.class.equals(Float.class) || LogsCategoryProcessor.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsCategoryProcessor.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsCategoryProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsCategoryProcessor.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 (!((LogsCategoryProcessor)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsCategoryProcessor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsCategoryProcessor'", e); + } + + // deserialize LogsArithmeticProcessor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArithmeticProcessor.class.equals(Integer.class) || LogsArithmeticProcessor.class.equals(Long.class) || LogsArithmeticProcessor.class.equals(Float.class) || LogsArithmeticProcessor.class.equals(Double.class) || LogsArithmeticProcessor.class.equals(Boolean.class) || LogsArithmeticProcessor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArithmeticProcessor.class.equals(Integer.class) || LogsArithmeticProcessor.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArithmeticProcessor.class.equals(Float.class) || LogsArithmeticProcessor.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArithmeticProcessor.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArithmeticProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArithmeticProcessor.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 (!((LogsArithmeticProcessor)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArithmeticProcessor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArithmeticProcessor'", e); + } + + // deserialize LogsStringBuilderProcessor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsStringBuilderProcessor.class.equals(Integer.class) || LogsStringBuilderProcessor.class.equals(Long.class) || LogsStringBuilderProcessor.class.equals(Float.class) || LogsStringBuilderProcessor.class.equals(Double.class) || LogsStringBuilderProcessor.class.equals(Boolean.class) || LogsStringBuilderProcessor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsStringBuilderProcessor.class.equals(Integer.class) || LogsStringBuilderProcessor.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsStringBuilderProcessor.class.equals(Float.class) || LogsStringBuilderProcessor.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsStringBuilderProcessor.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsStringBuilderProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsStringBuilderProcessor.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 (!((LogsStringBuilderProcessor)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsStringBuilderProcessor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsStringBuilderProcessor'", e); + } + + // deserialize LogsPipelineProcessor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsPipelineProcessor.class.equals(Integer.class) || LogsPipelineProcessor.class.equals(Long.class) || LogsPipelineProcessor.class.equals(Float.class) || LogsPipelineProcessor.class.equals(Double.class) || LogsPipelineProcessor.class.equals(Boolean.class) || LogsPipelineProcessor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsPipelineProcessor.class.equals(Integer.class) || LogsPipelineProcessor.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsPipelineProcessor.class.equals(Float.class) || LogsPipelineProcessor.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsPipelineProcessor.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsPipelineProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsPipelineProcessor.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 (!((LogsPipelineProcessor)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsPipelineProcessor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsPipelineProcessor'", e); + } + + // deserialize LogsGeoIPParser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsGeoIPParser.class.equals(Integer.class) || LogsGeoIPParser.class.equals(Long.class) || LogsGeoIPParser.class.equals(Float.class) || LogsGeoIPParser.class.equals(Double.class) || LogsGeoIPParser.class.equals(Boolean.class) || LogsGeoIPParser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsGeoIPParser.class.equals(Integer.class) || LogsGeoIPParser.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsGeoIPParser.class.equals(Float.class) || LogsGeoIPParser.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsGeoIPParser.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsGeoIPParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsGeoIPParser.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 (!((LogsGeoIPParser)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsGeoIPParser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsGeoIPParser'", e); + } + + // deserialize LogsLookupProcessor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsLookupProcessor.class.equals(Integer.class) || LogsLookupProcessor.class.equals(Long.class) || LogsLookupProcessor.class.equals(Float.class) || LogsLookupProcessor.class.equals(Double.class) || LogsLookupProcessor.class.equals(Boolean.class) || LogsLookupProcessor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsLookupProcessor.class.equals(Integer.class) || LogsLookupProcessor.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsLookupProcessor.class.equals(Float.class) || LogsLookupProcessor.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsLookupProcessor.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsLookupProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsLookupProcessor.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 (!((LogsLookupProcessor)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsLookupProcessor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsLookupProcessor'", e); + } + + // deserialize ReferenceTableLogsLookupProcessor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReferenceTableLogsLookupProcessor.class.equals(Integer.class) || ReferenceTableLogsLookupProcessor.class.equals(Long.class) || ReferenceTableLogsLookupProcessor.class.equals(Float.class) || ReferenceTableLogsLookupProcessor.class.equals(Double.class) || ReferenceTableLogsLookupProcessor.class.equals(Boolean.class) || ReferenceTableLogsLookupProcessor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ReferenceTableLogsLookupProcessor.class.equals(Integer.class) || ReferenceTableLogsLookupProcessor.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ReferenceTableLogsLookupProcessor.class.equals(Float.class) || ReferenceTableLogsLookupProcessor.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ReferenceTableLogsLookupProcessor.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ReferenceTableLogsLookupProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ReferenceTableLogsLookupProcessor.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 (!((ReferenceTableLogsLookupProcessor)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ReferenceTableLogsLookupProcessor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReferenceTableLogsLookupProcessor'", e); + } + + // deserialize LogsTraceRemapper + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsTraceRemapper.class.equals(Integer.class) || LogsTraceRemapper.class.equals(Long.class) || LogsTraceRemapper.class.equals(Float.class) || LogsTraceRemapper.class.equals(Double.class) || LogsTraceRemapper.class.equals(Boolean.class) || LogsTraceRemapper.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsTraceRemapper.class.equals(Integer.class) || LogsTraceRemapper.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsTraceRemapper.class.equals(Float.class) || LogsTraceRemapper.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsTraceRemapper.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsTraceRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsTraceRemapper.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 (!((LogsTraceRemapper)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsTraceRemapper'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsTraceRemapper'", e); + } + + LogsProcessor ret = new LogsProcessor(); + 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 LogsProcessor getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "LogsProcessor cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsServiceRemapper'", e); - } + } - // deserialize LogsMessageRemapper - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsMessageRemapper.class.equals(Integer.class) - || LogsMessageRemapper.class.equals(Long.class) - || LogsMessageRemapper.class.equals(Float.class) - || LogsMessageRemapper.class.equals(Double.class) - || LogsMessageRemapper.class.equals(Boolean.class) - || LogsMessageRemapper.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsMessageRemapper.class.equals(Integer.class) - || LogsMessageRemapper.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsMessageRemapper.class.equals(Float.class) - || LogsMessageRemapper.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsMessageRemapper.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsMessageRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsMessageRemapper.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 (!((LogsMessageRemapper) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsMessageRemapper'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsMessageRemapper'", e); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - // deserialize LogsAttributeRemapper - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsAttributeRemapper.class.equals(Integer.class) - || LogsAttributeRemapper.class.equals(Long.class) - || LogsAttributeRemapper.class.equals(Float.class) - || LogsAttributeRemapper.class.equals(Double.class) - || LogsAttributeRemapper.class.equals(Boolean.class) - || LogsAttributeRemapper.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsAttributeRemapper.class.equals(Integer.class) - || LogsAttributeRemapper.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsAttributeRemapper.class.equals(Float.class) - || LogsAttributeRemapper.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsAttributeRemapper.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsAttributeRemapper.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsAttributeRemapper.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 (!((LogsAttributeRemapper) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsAttributeRemapper'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsAttributeRemapper'", e); - } + public LogsProcessor() { + super("oneOf", Boolean.FALSE); + } + public LogsProcessor(LogsGrokParser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsDateRemapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsStatusRemapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsServiceRemapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsMessageRemapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsAttributeRemapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsURLParser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsUserAgentParser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsCategoryProcessor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsArithmeticProcessor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsStringBuilderProcessor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsPipelineProcessor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsGeoIPParser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsLookupProcessor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(ReferenceTableLogsLookupProcessor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsProcessor(LogsTraceRemapper o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - // deserialize LogsURLParser - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsURLParser.class.equals(Integer.class) - || LogsURLParser.class.equals(Long.class) - || LogsURLParser.class.equals(Float.class) - || LogsURLParser.class.equals(Double.class) - || LogsURLParser.class.equals(Boolean.class) - || LogsURLParser.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsURLParser.class.equals(Integer.class) - || LogsURLParser.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsURLParser.class.equals(Float.class) - || LogsURLParser.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsURLParser.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsURLParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsURLParser.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 (!((LogsURLParser) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsURLParser'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsURLParser'", e); - } + static { + schemas.put("LogsGrokParser", new GenericType() { + }); + schemas.put("LogsDateRemapper", new GenericType() { + }); + schemas.put("LogsStatusRemapper", new GenericType() { + }); + schemas.put("LogsServiceRemapper", new GenericType() { + }); + schemas.put("LogsMessageRemapper", new GenericType() { + }); + schemas.put("LogsAttributeRemapper", new GenericType() { + }); + schemas.put("LogsURLParser", new GenericType() { + }); + schemas.put("LogsUserAgentParser", new GenericType() { + }); + schemas.put("LogsCategoryProcessor", new GenericType() { + }); + schemas.put("LogsArithmeticProcessor", new GenericType() { + }); + schemas.put("LogsStringBuilderProcessor", new GenericType() { + }); + schemas.put("LogsPipelineProcessor", new GenericType() { + }); + schemas.put("LogsGeoIPParser", new GenericType() { + }); + schemas.put("LogsLookupProcessor", new GenericType() { + }); + schemas.put("ReferenceTableLogsLookupProcessor", new GenericType() { + }); + schemas.put("LogsTraceRemapper", new GenericType() { + }); + JSON.registerDescendants(LogsProcessor.class, Collections.unmodifiableMap(schemas)); + } - // deserialize LogsUserAgentParser - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsUserAgentParser.class.equals(Integer.class) - || LogsUserAgentParser.class.equals(Long.class) - || LogsUserAgentParser.class.equals(Float.class) - || LogsUserAgentParser.class.equals(Double.class) - || LogsUserAgentParser.class.equals(Boolean.class) - || LogsUserAgentParser.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsUserAgentParser.class.equals(Integer.class) - || LogsUserAgentParser.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsUserAgentParser.class.equals(Float.class) - || LogsUserAgentParser.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsUserAgentParser.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsUserAgentParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsUserAgentParser.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 (!((LogsUserAgentParser) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsUserAgentParser'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsUserAgentParser'", e); - } + @Override + public Map getSchemas() { + return LogsProcessor.schemas; + } - // deserialize LogsCategoryProcessor - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsCategoryProcessor.class.equals(Integer.class) - || LogsCategoryProcessor.class.equals(Long.class) - || LogsCategoryProcessor.class.equals(Float.class) - || LogsCategoryProcessor.class.equals(Double.class) - || LogsCategoryProcessor.class.equals(Boolean.class) - || LogsCategoryProcessor.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsCategoryProcessor.class.equals(Integer.class) - || LogsCategoryProcessor.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsCategoryProcessor.class.equals(Float.class) - || LogsCategoryProcessor.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsCategoryProcessor.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsCategoryProcessor.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * LogsGrokParser, LogsDateRemapper, LogsStatusRemapper, LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser, LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, ReferenceTableLogsLookupProcessor, LogsTraceRemapper + * + * 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(LogsGrokParser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsCategoryProcessor.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 (!((LogsCategoryProcessor) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsCategoryProcessor'"); + if (JSON.isInstanceOf(LogsDateRemapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsCategoryProcessor'", e); - } - - // deserialize LogsArithmeticProcessor - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArithmeticProcessor.class.equals(Integer.class) - || LogsArithmeticProcessor.class.equals(Long.class) - || LogsArithmeticProcessor.class.equals(Float.class) - || LogsArithmeticProcessor.class.equals(Double.class) - || LogsArithmeticProcessor.class.equals(Boolean.class) - || LogsArithmeticProcessor.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArithmeticProcessor.class.equals(Integer.class) - || LogsArithmeticProcessor.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArithmeticProcessor.class.equals(Float.class) - || LogsArithmeticProcessor.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArithmeticProcessor.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArithmeticProcessor.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsStatusRemapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArithmeticProcessor.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 (!((LogsArithmeticProcessor) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArithmeticProcessor'"); + if (JSON.isInstanceOf(LogsServiceRemapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArithmeticProcessor'", e); - } - - // deserialize LogsStringBuilderProcessor - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsStringBuilderProcessor.class.equals(Integer.class) - || LogsStringBuilderProcessor.class.equals(Long.class) - || LogsStringBuilderProcessor.class.equals(Float.class) - || LogsStringBuilderProcessor.class.equals(Double.class) - || LogsStringBuilderProcessor.class.equals(Boolean.class) - || LogsStringBuilderProcessor.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsStringBuilderProcessor.class.equals(Integer.class) - || LogsStringBuilderProcessor.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsStringBuilderProcessor.class.equals(Float.class) - || LogsStringBuilderProcessor.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsStringBuilderProcessor.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsStringBuilderProcessor.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsMessageRemapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsStringBuilderProcessor.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 (!((LogsStringBuilderProcessor) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsStringBuilderProcessor'"); + if (JSON.isInstanceOf(LogsAttributeRemapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsStringBuilderProcessor'", e); - } - - // deserialize LogsPipelineProcessor - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsPipelineProcessor.class.equals(Integer.class) - || LogsPipelineProcessor.class.equals(Long.class) - || LogsPipelineProcessor.class.equals(Float.class) - || LogsPipelineProcessor.class.equals(Double.class) - || LogsPipelineProcessor.class.equals(Boolean.class) - || LogsPipelineProcessor.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsPipelineProcessor.class.equals(Integer.class) - || LogsPipelineProcessor.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsPipelineProcessor.class.equals(Float.class) - || LogsPipelineProcessor.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsPipelineProcessor.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsPipelineProcessor.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsURLParser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsPipelineProcessor.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 (!((LogsPipelineProcessor) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsPipelineProcessor'"); + if (JSON.isInstanceOf(LogsUserAgentParser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsPipelineProcessor'", e); - } - - // deserialize LogsGeoIPParser - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsGeoIPParser.class.equals(Integer.class) - || LogsGeoIPParser.class.equals(Long.class) - || LogsGeoIPParser.class.equals(Float.class) - || LogsGeoIPParser.class.equals(Double.class) - || LogsGeoIPParser.class.equals(Boolean.class) - || LogsGeoIPParser.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsGeoIPParser.class.equals(Integer.class) - || LogsGeoIPParser.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsGeoIPParser.class.equals(Float.class) - || LogsGeoIPParser.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsGeoIPParser.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsGeoIPParser.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsCategoryProcessor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsGeoIPParser.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 (!((LogsGeoIPParser) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsGeoIPParser'"); + if (JSON.isInstanceOf(LogsArithmeticProcessor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsGeoIPParser'", e); - } - - // deserialize LogsLookupProcessor - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsLookupProcessor.class.equals(Integer.class) - || LogsLookupProcessor.class.equals(Long.class) - || LogsLookupProcessor.class.equals(Float.class) - || LogsLookupProcessor.class.equals(Double.class) - || LogsLookupProcessor.class.equals(Boolean.class) - || LogsLookupProcessor.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsLookupProcessor.class.equals(Integer.class) - || LogsLookupProcessor.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsLookupProcessor.class.equals(Float.class) - || LogsLookupProcessor.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsLookupProcessor.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsLookupProcessor.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsStringBuilderProcessor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsLookupProcessor.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 (!((LogsLookupProcessor) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsLookupProcessor'"); + if (JSON.isInstanceOf(LogsPipelineProcessor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsLookupProcessor'", e); - } - - // deserialize ReferenceTableLogsLookupProcessor - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ReferenceTableLogsLookupProcessor.class.equals(Integer.class) - || ReferenceTableLogsLookupProcessor.class.equals(Long.class) - || ReferenceTableLogsLookupProcessor.class.equals(Float.class) - || ReferenceTableLogsLookupProcessor.class.equals(Double.class) - || ReferenceTableLogsLookupProcessor.class.equals(Boolean.class) - || ReferenceTableLogsLookupProcessor.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ReferenceTableLogsLookupProcessor.class.equals(Integer.class) - || ReferenceTableLogsLookupProcessor.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ReferenceTableLogsLookupProcessor.class.equals(Float.class) - || ReferenceTableLogsLookupProcessor.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ReferenceTableLogsLookupProcessor.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ReferenceTableLogsLookupProcessor.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsGeoIPParser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ReferenceTableLogsLookupProcessor.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 (!((ReferenceTableLogsLookupProcessor) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ReferenceTableLogsLookupProcessor'"); + if (JSON.isInstanceOf(LogsLookupProcessor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'ReferenceTableLogsLookupProcessor'", e); - } - - // deserialize LogsTraceRemapper - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsTraceRemapper.class.equals(Integer.class) - || LogsTraceRemapper.class.equals(Long.class) - || LogsTraceRemapper.class.equals(Float.class) - || LogsTraceRemapper.class.equals(Double.class) - || LogsTraceRemapper.class.equals(Boolean.class) - || LogsTraceRemapper.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsTraceRemapper.class.equals(Integer.class) - || LogsTraceRemapper.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsTraceRemapper.class.equals(Float.class) - || LogsTraceRemapper.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsTraceRemapper.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsTraceRemapper.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(ReferenceTableLogsLookupProcessor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsTraceRemapper.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 (!((LogsTraceRemapper) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsTraceRemapper'"); + if (JSON.isInstanceOf(LogsTraceRemapper.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsTraceRemapper'", e); - } - LogsProcessor ret = new LogsProcessor(); - 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; + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be LogsGrokParser, LogsDateRemapper, LogsStatusRemapper, LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser, LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, ReferenceTableLogsLookupProcessor, LogsTraceRemapper"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * LogsGrokParser, LogsDateRemapper, LogsStatusRemapper, LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser, LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, ReferenceTableLogsLookupProcessor, LogsTraceRemapper + * + * @return The actual instance (LogsGrokParser, LogsDateRemapper, LogsStatusRemapper, LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser, LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, ReferenceTableLogsLookupProcessor, LogsTraceRemapper) + */ @Override - public LogsProcessor getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "LogsProcessor cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public LogsProcessor() { - super("oneOf", Boolean.FALSE); - } - - public LogsProcessor(LogsGrokParser o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsDateRemapper o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsStatusRemapper o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsServiceRemapper o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsMessageRemapper o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsAttributeRemapper o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsURLParser o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsUserAgentParser o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsCategoryProcessor o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsArithmeticProcessor o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsStringBuilderProcessor o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsPipelineProcessor o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsGeoIPParser o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsLookupProcessor o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(ReferenceTableLogsLookupProcessor o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsProcessor(LogsTraceRemapper o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - static { - schemas.put("LogsGrokParser", new GenericType() {}); - schemas.put("LogsDateRemapper", new GenericType() {}); - schemas.put("LogsStatusRemapper", new GenericType() {}); - schemas.put("LogsServiceRemapper", new GenericType() {}); - schemas.put("LogsMessageRemapper", new GenericType() {}); - schemas.put("LogsAttributeRemapper", new GenericType() {}); - schemas.put("LogsURLParser", new GenericType() {}); - schemas.put("LogsUserAgentParser", new GenericType() {}); - schemas.put("LogsCategoryProcessor", new GenericType() {}); - schemas.put("LogsArithmeticProcessor", new GenericType() {}); - schemas.put("LogsStringBuilderProcessor", new GenericType() {}); - schemas.put("LogsPipelineProcessor", new GenericType() {}); - schemas.put("LogsGeoIPParser", new GenericType() {}); - schemas.put("LogsLookupProcessor", new GenericType() {}); - schemas.put( - "ReferenceTableLogsLookupProcessor", - new GenericType() {}); - schemas.put("LogsTraceRemapper", new GenericType() {}); - JSON.registerDescendants(LogsProcessor.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return LogsProcessor.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: LogsGrokParser, LogsDateRemapper, LogsStatusRemapper, - * LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser, - * LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, - * LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, - * ReferenceTableLogsLookupProcessor, LogsTraceRemapper - * - *

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(LogsGrokParser.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsDateRemapper.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsStatusRemapper.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsServiceRemapper.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsMessageRemapper.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsAttributeRemapper.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsURLParser.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsUserAgentParser.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsCategoryProcessor.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsArithmeticProcessor.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsStringBuilderProcessor.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsPipelineProcessor.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsGeoIPParser.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsLookupProcessor.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - ReferenceTableLogsLookupProcessor.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsTraceRemapper.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsGrokParser`. If the actual instance is not `LogsGrokParser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsGrokParser` + * @throws ClassCastException if the instance is not `LogsGrokParser` + */ + public LogsGrokParser getLogsGrokParser() throws ClassCastException { + return (LogsGrokParser)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsDateRemapper`. If the actual instance is not `LogsDateRemapper`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsDateRemapper` + * @throws ClassCastException if the instance is not `LogsDateRemapper` + */ + public LogsDateRemapper getLogsDateRemapper() throws ClassCastException { + return (LogsDateRemapper)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be LogsGrokParser, LogsDateRemapper, LogsStatusRemapper," - + " LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser," - + " LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor," - + " LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser," - + " LogsLookupProcessor, ReferenceTableLogsLookupProcessor, LogsTraceRemapper"); - } - /** - * Get the actual instance, which can be the following: LogsGrokParser, LogsDateRemapper, - * LogsStatusRemapper, LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, - * LogsURLParser, LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, - * LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, - * ReferenceTableLogsLookupProcessor, LogsTraceRemapper - * - * @return The actual instance (LogsGrokParser, LogsDateRemapper, LogsStatusRemapper, - * LogsServiceRemapper, LogsMessageRemapper, LogsAttributeRemapper, LogsURLParser, - * LogsUserAgentParser, LogsCategoryProcessor, LogsArithmeticProcessor, - * LogsStringBuilderProcessor, LogsPipelineProcessor, LogsGeoIPParser, LogsLookupProcessor, - * ReferenceTableLogsLookupProcessor, LogsTraceRemapper) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsGrokParser`. If the actual instance is not `LogsGrokParser`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `LogsGrokParser` - * @throws ClassCastException if the instance is not `LogsGrokParser` - */ - public LogsGrokParser getLogsGrokParser() throws ClassCastException { - return (LogsGrokParser) super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsDateRemapper`. If the actual instance is not - * `LogsDateRemapper`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsDateRemapper` - * @throws ClassCastException if the instance is not `LogsDateRemapper` - */ - public LogsDateRemapper getLogsDateRemapper() throws ClassCastException { - return (LogsDateRemapper) super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsStatusRemapper`. If the actual instance is not - * `LogsStatusRemapper`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsStatusRemapper` - * @throws ClassCastException if the instance is not `LogsStatusRemapper` - */ - public LogsStatusRemapper getLogsStatusRemapper() throws ClassCastException { - return (LogsStatusRemapper) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsStatusRemapper`. If the actual instance is not `LogsStatusRemapper`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsStatusRemapper` + * @throws ClassCastException if the instance is not `LogsStatusRemapper` + */ + public LogsStatusRemapper getLogsStatusRemapper() throws ClassCastException { + return (LogsStatusRemapper)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsServiceRemapper`. If the actual instance is not - * `LogsServiceRemapper`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsServiceRemapper` - * @throws ClassCastException if the instance is not `LogsServiceRemapper` - */ - public LogsServiceRemapper getLogsServiceRemapper() throws ClassCastException { - return (LogsServiceRemapper) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsServiceRemapper`. If the actual instance is not `LogsServiceRemapper`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsServiceRemapper` + * @throws ClassCastException if the instance is not `LogsServiceRemapper` + */ + public LogsServiceRemapper getLogsServiceRemapper() throws ClassCastException { + return (LogsServiceRemapper)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsMessageRemapper`. If the actual instance is not - * `LogsMessageRemapper`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsMessageRemapper` - * @throws ClassCastException if the instance is not `LogsMessageRemapper` - */ - public LogsMessageRemapper getLogsMessageRemapper() throws ClassCastException { - return (LogsMessageRemapper) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsMessageRemapper`. If the actual instance is not `LogsMessageRemapper`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsMessageRemapper` + * @throws ClassCastException if the instance is not `LogsMessageRemapper` + */ + public LogsMessageRemapper getLogsMessageRemapper() throws ClassCastException { + return (LogsMessageRemapper)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsAttributeRemapper`. If the actual instance is not - * `LogsAttributeRemapper`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsAttributeRemapper` - * @throws ClassCastException if the instance is not `LogsAttributeRemapper` - */ - public LogsAttributeRemapper getLogsAttributeRemapper() throws ClassCastException { - return (LogsAttributeRemapper) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsAttributeRemapper`. If the actual instance is not `LogsAttributeRemapper`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsAttributeRemapper` + * @throws ClassCastException if the instance is not `LogsAttributeRemapper` + */ + public LogsAttributeRemapper getLogsAttributeRemapper() throws ClassCastException { + return (LogsAttributeRemapper)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsURLParser`. If the actual instance is not `LogsURLParser`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `LogsURLParser` - * @throws ClassCastException if the instance is not `LogsURLParser` - */ - public LogsURLParser getLogsURLParser() throws ClassCastException { - return (LogsURLParser) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsURLParser`. If the actual instance is not `LogsURLParser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsURLParser` + * @throws ClassCastException if the instance is not `LogsURLParser` + */ + public LogsURLParser getLogsURLParser() throws ClassCastException { + return (LogsURLParser)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsUserAgentParser`. If the actual instance is not - * `LogsUserAgentParser`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsUserAgentParser` - * @throws ClassCastException if the instance is not `LogsUserAgentParser` - */ - public LogsUserAgentParser getLogsUserAgentParser() throws ClassCastException { - return (LogsUserAgentParser) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsUserAgentParser`. If the actual instance is not `LogsUserAgentParser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsUserAgentParser` + * @throws ClassCastException if the instance is not `LogsUserAgentParser` + */ + public LogsUserAgentParser getLogsUserAgentParser() throws ClassCastException { + return (LogsUserAgentParser)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsCategoryProcessor`. If the actual instance is not - * `LogsCategoryProcessor`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsCategoryProcessor` - * @throws ClassCastException if the instance is not `LogsCategoryProcessor` - */ - public LogsCategoryProcessor getLogsCategoryProcessor() throws ClassCastException { - return (LogsCategoryProcessor) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsCategoryProcessor`. If the actual instance is not `LogsCategoryProcessor`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsCategoryProcessor` + * @throws ClassCastException if the instance is not `LogsCategoryProcessor` + */ + public LogsCategoryProcessor getLogsCategoryProcessor() throws ClassCastException { + return (LogsCategoryProcessor)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsArithmeticProcessor`. If the actual instance is not - * `LogsArithmeticProcessor`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArithmeticProcessor` - * @throws ClassCastException if the instance is not `LogsArithmeticProcessor` - */ - public LogsArithmeticProcessor getLogsArithmeticProcessor() throws ClassCastException { - return (LogsArithmeticProcessor) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsArithmeticProcessor`. If the actual instance is not `LogsArithmeticProcessor`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArithmeticProcessor` + * @throws ClassCastException if the instance is not `LogsArithmeticProcessor` + */ + public LogsArithmeticProcessor getLogsArithmeticProcessor() throws ClassCastException { + return (LogsArithmeticProcessor)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsStringBuilderProcessor`. If the actual instance is not - * `LogsStringBuilderProcessor`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsStringBuilderProcessor` - * @throws ClassCastException if the instance is not `LogsStringBuilderProcessor` - */ - public LogsStringBuilderProcessor getLogsStringBuilderProcessor() throws ClassCastException { - return (LogsStringBuilderProcessor) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsStringBuilderProcessor`. If the actual instance is not `LogsStringBuilderProcessor`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsStringBuilderProcessor` + * @throws ClassCastException if the instance is not `LogsStringBuilderProcessor` + */ + public LogsStringBuilderProcessor getLogsStringBuilderProcessor() throws ClassCastException { + return (LogsStringBuilderProcessor)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsPipelineProcessor`. If the actual instance is not - * `LogsPipelineProcessor`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsPipelineProcessor` - * @throws ClassCastException if the instance is not `LogsPipelineProcessor` - */ - public LogsPipelineProcessor getLogsPipelineProcessor() throws ClassCastException { - return (LogsPipelineProcessor) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsPipelineProcessor`. If the actual instance is not `LogsPipelineProcessor`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsPipelineProcessor` + * @throws ClassCastException if the instance is not `LogsPipelineProcessor` + */ + public LogsPipelineProcessor getLogsPipelineProcessor() throws ClassCastException { + return (LogsPipelineProcessor)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsGeoIPParser`. If the actual instance is not `LogsGeoIPParser`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `LogsGeoIPParser` - * @throws ClassCastException if the instance is not `LogsGeoIPParser` - */ - public LogsGeoIPParser getLogsGeoIPParser() throws ClassCastException { - return (LogsGeoIPParser) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsGeoIPParser`. If the actual instance is not `LogsGeoIPParser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsGeoIPParser` + * @throws ClassCastException if the instance is not `LogsGeoIPParser` + */ + public LogsGeoIPParser getLogsGeoIPParser() throws ClassCastException { + return (LogsGeoIPParser)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsLookupProcessor`. If the actual instance is not - * `LogsLookupProcessor`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsLookupProcessor` - * @throws ClassCastException if the instance is not `LogsLookupProcessor` - */ - public LogsLookupProcessor getLogsLookupProcessor() throws ClassCastException { - return (LogsLookupProcessor) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsLookupProcessor`. If the actual instance is not `LogsLookupProcessor`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsLookupProcessor` + * @throws ClassCastException if the instance is not `LogsLookupProcessor` + */ + public LogsLookupProcessor getLogsLookupProcessor() throws ClassCastException { + return (LogsLookupProcessor)super.getActualInstance(); + } - /** - * Get the actual instance of `ReferenceTableLogsLookupProcessor`. If the actual instance is not - * `ReferenceTableLogsLookupProcessor`, the ClassCastException will be thrown. - * - * @return The actual instance of `ReferenceTableLogsLookupProcessor` - * @throws ClassCastException if the instance is not `ReferenceTableLogsLookupProcessor` - */ - public ReferenceTableLogsLookupProcessor getReferenceTableLogsLookupProcessor() - throws ClassCastException { - return (ReferenceTableLogsLookupProcessor) super.getActualInstance(); - } + /** + * Get the actual instance of `ReferenceTableLogsLookupProcessor`. If the actual instance is not `ReferenceTableLogsLookupProcessor`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ReferenceTableLogsLookupProcessor` + * @throws ClassCastException if the instance is not `ReferenceTableLogsLookupProcessor` + */ + public ReferenceTableLogsLookupProcessor getReferenceTableLogsLookupProcessor() throws ClassCastException { + return (ReferenceTableLogsLookupProcessor)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsTraceRemapper`. If the actual instance is not - * `LogsTraceRemapper`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsTraceRemapper` - * @throws ClassCastException if the instance is not `LogsTraceRemapper` - */ - public LogsTraceRemapper getLogsTraceRemapper() throws ClassCastException { - return (LogsTraceRemapper) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsTraceRemapper`. If the actual instance is not `LogsTraceRemapper`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsTraceRemapper` + * @throws ClassCastException if the instance is not `LogsTraceRemapper` + */ + public LogsTraceRemapper getLogsTraceRemapper() throws ClassCastException { + return (LogsTraceRemapper)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsQueryCompute.java b/src/main/java/com/datadog/api/client/v1/model/LogsQueryCompute.java index 5a6a1499dd7..720af2d58ae 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsQueryCompute.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsQueryCompute.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Define computation for a log query. */ + +/** + *

Define computation for a log query.

+ */ @JsonPropertyOrder({ LogsQueryCompute.JSON_PROPERTY_AGGREGATION, LogsQueryCompute.JSON_PROPERTY_FACET, LogsQueryCompute.JSON_PROPERTY_INTERVAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsQueryCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private String aggregation; @@ -36,73 +55,69 @@ public LogsQueryCompute() {} @JsonCreator public LogsQueryCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) String aggregation) { - this.aggregation = aggregation; + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)String aggregation) { + this.aggregation = aggregation; } - public LogsQueryCompute aggregation(String aggregation) { this.aggregation = aggregation; return this; } /** - * The aggregation method. - * + *

The aggregation method.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAggregation() { + return aggregation; + } public void setAggregation(String aggregation) { this.aggregation = aggregation; } - public LogsQueryCompute facet(String facet) { this.facet = facet; return this; } /** - * Facet name. - * + *

Facet name.

* @return facet - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFacet() { - return facet; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public LogsQueryCompute interval(Long interval) { this.interval = interval; return this; } /** - * Define a time interval in seconds. - * + *

Define a time interval in seconds.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - /** Return true if this LogsQueryCompute object is equal to o. */ + /** + * Return true if this LogsQueryCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,14 +127,13 @@ public boolean equals(Object o) { return false; } LogsQueryCompute logsQueryCompute = (LogsQueryCompute) o; - return Objects.equals(this.aggregation, logsQueryCompute.aggregation) - && Objects.equals(this.facet, logsQueryCompute.facet) - && Objects.equals(this.interval, logsQueryCompute.interval); + return Objects.equals(this.aggregation, logsQueryCompute.aggregation) && Objects.equals(this.facet, logsQueryCompute.facet) && Objects.equals(this.interval, logsQueryCompute.interval); } + @Override public int hashCode() { - return Objects.hash(aggregation, facet, interval); + return Objects.hash(aggregation,facet,interval); } @Override @@ -134,7 +148,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsRetentionAggSumUsage.java b/src/main/java/com/datadog/api/client/v1/model/LogsRetentionAggSumUsage.java index 94b71053319..732da22df22 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsRetentionAggSumUsage.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsRetentionAggSumUsage.java @@ -6,15 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Object containing indexed logs usage aggregated across organizations and months for a retention - * period. + *

Object containing indexed logs usage aggregated across organizations and months for a retention period.

*/ @JsonPropertyOrder({ LogsRetentionAggSumUsage.JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_AGG_SUM, @@ -22,20 +39,17 @@ LogsRetentionAggSumUsage.JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_AGG_SUM, LogsRetentionAggSumUsage.JSON_PROPERTY_RETENTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsRetentionAggSumUsage { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_AGG_SUM = - "logs_indexed_logs_usage_agg_sum"; + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_AGG_SUM = "logs_indexed_logs_usage_agg_sum"; private Long logsIndexedLogsUsageAggSum; - public static final String JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_AGG_SUM = - "logs_live_indexed_logs_usage_agg_sum"; + public static final String JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_AGG_SUM = "logs_live_indexed_logs_usage_agg_sum"; private Long logsLiveIndexedLogsUsageAggSum; - public static final String JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_AGG_SUM = - "logs_rehydrated_indexed_logs_usage_agg_sum"; + public static final String JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_AGG_SUM = "logs_rehydrated_indexed_logs_usage_agg_sum"; private Long logsRehydratedIndexedLogsUsageAggSum; public static final String JSON_PROPERTY_RETENTION = "retention"; @@ -47,87 +61,80 @@ public LogsRetentionAggSumUsage logsIndexedLogsUsageAggSum(Long logsIndexedLogsU } /** - * Total indexed logs for this retention period. - * + *

Total indexed logs for this retention period.

* @return logsIndexedLogsUsageAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsIndexedLogsUsageAggSum() { - return logsIndexedLogsUsageAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsIndexedLogsUsageAggSum() { + return logsIndexedLogsUsageAggSum; + } public void setLogsIndexedLogsUsageAggSum(Long logsIndexedLogsUsageAggSum) { this.logsIndexedLogsUsageAggSum = logsIndexedLogsUsageAggSum; } - - public LogsRetentionAggSumUsage logsLiveIndexedLogsUsageAggSum( - Long logsLiveIndexedLogsUsageAggSum) { + public LogsRetentionAggSumUsage logsLiveIndexedLogsUsageAggSum(Long logsLiveIndexedLogsUsageAggSum) { this.logsLiveIndexedLogsUsageAggSum = logsLiveIndexedLogsUsageAggSum; return this; } /** - * Live indexed logs for this retention period. - * + *

Live indexed logs for this retention period.

* @return logsLiveIndexedLogsUsageAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsLiveIndexedLogsUsageAggSum() { - return logsLiveIndexedLogsUsageAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsLiveIndexedLogsUsageAggSum() { + return logsLiveIndexedLogsUsageAggSum; + } public void setLogsLiveIndexedLogsUsageAggSum(Long logsLiveIndexedLogsUsageAggSum) { this.logsLiveIndexedLogsUsageAggSum = logsLiveIndexedLogsUsageAggSum; } - - public LogsRetentionAggSumUsage logsRehydratedIndexedLogsUsageAggSum( - Long logsRehydratedIndexedLogsUsageAggSum) { + public LogsRetentionAggSumUsage logsRehydratedIndexedLogsUsageAggSum(Long logsRehydratedIndexedLogsUsageAggSum) { this.logsRehydratedIndexedLogsUsageAggSum = logsRehydratedIndexedLogsUsageAggSum; return this; } /** - * Rehydrated indexed logs for this retention period. - * + *

Rehydrated indexed logs for this retention period.

* @return logsRehydratedIndexedLogsUsageAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsRehydratedIndexedLogsUsageAggSum() { - return logsRehydratedIndexedLogsUsageAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsRehydratedIndexedLogsUsageAggSum() { + return logsRehydratedIndexedLogsUsageAggSum; + } public void setLogsRehydratedIndexedLogsUsageAggSum(Long logsRehydratedIndexedLogsUsageAggSum) { this.logsRehydratedIndexedLogsUsageAggSum = logsRehydratedIndexedLogsUsageAggSum; } - public LogsRetentionAggSumUsage retention(String retention) { this.retention = retention; return this; } /** - * The retention period in days or "custom" for all custom retention periods. - * + *

The retention period in days or "custom" for all custom retention periods.

* @return retention - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETENTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRetention() { - return retention; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRetention() { + return retention; + } public void setRetention(String retention) { this.retention = retention; } - /** Return true if this LogsRetentionAggSumUsage object is equal to o. */ + /** + * Return true if this LogsRetentionAggSumUsage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,46 +144,30 @@ public boolean equals(Object o) { return false; } LogsRetentionAggSumUsage logsRetentionAggSumUsage = (LogsRetentionAggSumUsage) o; - return Objects.equals( - this.logsIndexedLogsUsageAggSum, logsRetentionAggSumUsage.logsIndexedLogsUsageAggSum) - && Objects.equals( - this.logsLiveIndexedLogsUsageAggSum, - logsRetentionAggSumUsage.logsLiveIndexedLogsUsageAggSum) - && Objects.equals( - this.logsRehydratedIndexedLogsUsageAggSum, - logsRetentionAggSumUsage.logsRehydratedIndexedLogsUsageAggSum) - && Objects.equals(this.retention, logsRetentionAggSumUsage.retention); + return Objects.equals(this.logsIndexedLogsUsageAggSum, logsRetentionAggSumUsage.logsIndexedLogsUsageAggSum) && Objects.equals(this.logsLiveIndexedLogsUsageAggSum, logsRetentionAggSumUsage.logsLiveIndexedLogsUsageAggSum) && Objects.equals(this.logsRehydratedIndexedLogsUsageAggSum, logsRetentionAggSumUsage.logsRehydratedIndexedLogsUsageAggSum) && Objects.equals(this.retention, logsRetentionAggSumUsage.retention); } + @Override public int hashCode() { - return Objects.hash( - logsIndexedLogsUsageAggSum, - logsLiveIndexedLogsUsageAggSum, - logsRehydratedIndexedLogsUsageAggSum, - retention); + return Objects.hash(logsIndexedLogsUsageAggSum,logsLiveIndexedLogsUsageAggSum,logsRehydratedIndexedLogsUsageAggSum,retention); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LogsRetentionAggSumUsage {\n"); - sb.append(" logsIndexedLogsUsageAggSum: ") - .append(toIndentedString(logsIndexedLogsUsageAggSum)) - .append("\n"); - sb.append(" logsLiveIndexedLogsUsageAggSum: ") - .append(toIndentedString(logsLiveIndexedLogsUsageAggSum)) - .append("\n"); - sb.append(" logsRehydratedIndexedLogsUsageAggSum: ") - .append(toIndentedString(logsRehydratedIndexedLogsUsageAggSum)) - .append("\n"); + sb.append(" logsIndexedLogsUsageAggSum: ").append(toIndentedString(logsIndexedLogsUsageAggSum)).append("\n"); + sb.append(" logsLiveIndexedLogsUsageAggSum: ").append(toIndentedString(logsLiveIndexedLogsUsageAggSum)).append("\n"); + sb.append(" logsRehydratedIndexedLogsUsageAggSum: ").append(toIndentedString(logsRehydratedIndexedLogsUsageAggSum)).append("\n"); sb.append(" retention: ").append(toIndentedString(retention)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsRetentionSumUsage.java b/src/main/java/com/datadog/api/client/v1/model/LogsRetentionSumUsage.java index 3e08ba9b479..086ae557895 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsRetentionSumUsage.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsRetentionSumUsage.java @@ -6,33 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing indexed logs usage grouped by retention period and summed. */ + +/** + *

Object containing indexed logs usage grouped by retention period and summed.

+ */ @JsonPropertyOrder({ LogsRetentionSumUsage.JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_SUM, LogsRetentionSumUsage.JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_SUM, LogsRetentionSumUsage.JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_SUM, LogsRetentionSumUsage.JSON_PROPERTY_RETENTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsRetentionSumUsage { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_SUM = - "logs_indexed_logs_usage_sum"; + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_SUM = "logs_indexed_logs_usage_sum"; private Long logsIndexedLogsUsageSum; - public static final String JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_SUM = - "logs_live_indexed_logs_usage_sum"; + public static final String JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_SUM = "logs_live_indexed_logs_usage_sum"; private Long logsLiveIndexedLogsUsageSum; - public static final String JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_SUM = - "logs_rehydrated_indexed_logs_usage_sum"; + public static final String JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_SUM = "logs_rehydrated_indexed_logs_usage_sum"; private Long logsRehydratedIndexedLogsUsageSum; public static final String JSON_PROPERTY_RETENTION = "retention"; @@ -44,86 +61,80 @@ public LogsRetentionSumUsage logsIndexedLogsUsageSum(Long logsIndexedLogsUsageSu } /** - * Total indexed logs for this retention period. - * + *

Total indexed logs for this retention period.

* @return logsIndexedLogsUsageSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsIndexedLogsUsageSum() { - return logsIndexedLogsUsageSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_LOGS_USAGE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsIndexedLogsUsageSum() { + return logsIndexedLogsUsageSum; + } public void setLogsIndexedLogsUsageSum(Long logsIndexedLogsUsageSum) { this.logsIndexedLogsUsageSum = logsIndexedLogsUsageSum; } - public LogsRetentionSumUsage logsLiveIndexedLogsUsageSum(Long logsLiveIndexedLogsUsageSum) { this.logsLiveIndexedLogsUsageSum = logsLiveIndexedLogsUsageSum; return this; } /** - * Live indexed logs for this retention period. - * + *

Live indexed logs for this retention period.

* @return logsLiveIndexedLogsUsageSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsLiveIndexedLogsUsageSum() { - return logsLiveIndexedLogsUsageSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INDEXED_LOGS_USAGE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsLiveIndexedLogsUsageSum() { + return logsLiveIndexedLogsUsageSum; + } public void setLogsLiveIndexedLogsUsageSum(Long logsLiveIndexedLogsUsageSum) { this.logsLiveIndexedLogsUsageSum = logsLiveIndexedLogsUsageSum; } - - public LogsRetentionSumUsage logsRehydratedIndexedLogsUsageSum( - Long logsRehydratedIndexedLogsUsageSum) { + public LogsRetentionSumUsage logsRehydratedIndexedLogsUsageSum(Long logsRehydratedIndexedLogsUsageSum) { this.logsRehydratedIndexedLogsUsageSum = logsRehydratedIndexedLogsUsageSum; return this; } /** - * Rehydrated indexed logs for this retention period. - * + *

Rehydrated indexed logs for this retention period.

* @return logsRehydratedIndexedLogsUsageSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsRehydratedIndexedLogsUsageSum() { - return logsRehydratedIndexedLogsUsageSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_LOGS_USAGE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsRehydratedIndexedLogsUsageSum() { + return logsRehydratedIndexedLogsUsageSum; + } public void setLogsRehydratedIndexedLogsUsageSum(Long logsRehydratedIndexedLogsUsageSum) { this.logsRehydratedIndexedLogsUsageSum = logsRehydratedIndexedLogsUsageSum; } - public LogsRetentionSumUsage retention(String retention) { this.retention = retention; return this; } /** - * The retention period in days or "custom" for all custom retention periods. - * + *

The retention period in days or "custom" for all custom retention periods.

* @return retention - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETENTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRetention() { - return retention; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRetention() { + return retention; + } public void setRetention(String retention) { this.retention = retention; } - /** Return true if this LogsRetentionSumUsage object is equal to o. */ + /** + * Return true if this LogsRetentionSumUsage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,45 +144,30 @@ public boolean equals(Object o) { return false; } LogsRetentionSumUsage logsRetentionSumUsage = (LogsRetentionSumUsage) o; - return Objects.equals( - this.logsIndexedLogsUsageSum, logsRetentionSumUsage.logsIndexedLogsUsageSum) - && Objects.equals( - this.logsLiveIndexedLogsUsageSum, logsRetentionSumUsage.logsLiveIndexedLogsUsageSum) - && Objects.equals( - this.logsRehydratedIndexedLogsUsageSum, - logsRetentionSumUsage.logsRehydratedIndexedLogsUsageSum) - && Objects.equals(this.retention, logsRetentionSumUsage.retention); + return Objects.equals(this.logsIndexedLogsUsageSum, logsRetentionSumUsage.logsIndexedLogsUsageSum) && Objects.equals(this.logsLiveIndexedLogsUsageSum, logsRetentionSumUsage.logsLiveIndexedLogsUsageSum) && Objects.equals(this.logsRehydratedIndexedLogsUsageSum, logsRetentionSumUsage.logsRehydratedIndexedLogsUsageSum) && Objects.equals(this.retention, logsRetentionSumUsage.retention); } + @Override public int hashCode() { - return Objects.hash( - logsIndexedLogsUsageSum, - logsLiveIndexedLogsUsageSum, - logsRehydratedIndexedLogsUsageSum, - retention); + return Objects.hash(logsIndexedLogsUsageSum,logsLiveIndexedLogsUsageSum,logsRehydratedIndexedLogsUsageSum,retention); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LogsRetentionSumUsage {\n"); - sb.append(" logsIndexedLogsUsageSum: ") - .append(toIndentedString(logsIndexedLogsUsageSum)) - .append("\n"); - sb.append(" logsLiveIndexedLogsUsageSum: ") - .append(toIndentedString(logsLiveIndexedLogsUsageSum)) - .append("\n"); - sb.append(" logsRehydratedIndexedLogsUsageSum: ") - .append(toIndentedString(logsRehydratedIndexedLogsUsageSum)) - .append("\n"); + sb.append(" logsIndexedLogsUsageSum: ").append(toIndentedString(logsIndexedLogsUsageSum)).append("\n"); + sb.append(" logsLiveIndexedLogsUsageSum: ").append(toIndentedString(logsLiveIndexedLogsUsageSum)).append("\n"); + sb.append(" logsRehydratedIndexedLogsUsageSum: ").append(toIndentedString(logsRehydratedIndexedLogsUsageSum)).append("\n"); sb.append(" retention: ").append(toIndentedString(retention)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapper.java b/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapper.java index 393f093651a..496c7ca73de 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapper.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapper.java @@ -6,20 +6,34 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use this processor if you want to assign one or more attributes as the official service. - * - *

Note: If multiple service remapper processors can be applied to a given log, - * only the first one (according to the pipeline order) is taken into account. + *

Use this processor if you want to assign one or more attributes as the official service.

+ *

Note: If multiple service remapper processors can be applied to a given log, + * only the first one (according to the pipeline order) is taken into account.

*/ @JsonPropertyOrder({ LogsServiceRemapper.JSON_PROPERTY_IS_ENABLED, @@ -27,10 +41,10 @@ LogsServiceRemapper.JSON_PROPERTY_SOURCES, LogsServiceRemapper.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsServiceRemapper { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -47,80 +61,72 @@ public LogsServiceRemapper() {} @JsonCreator public LogsServiceRemapper( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsServiceRemapperType type) { - this.sources = sources; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsServiceRemapperType type) { + this.sources = sources; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsServiceRemapper isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsServiceRemapper name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsServiceRemapper sources(List sources) { this.sources = sources; return this; } - public LogsServiceRemapper addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsServiceRemapper type(LogsServiceRemapperType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -128,24 +134,25 @@ public LogsServiceRemapper type(LogsServiceRemapperType type) { } /** - * Type of logs service remapper. - * + *

Type of logs service remapper.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsServiceRemapperType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsServiceRemapperType getType() { + return type; + } public void setType(LogsServiceRemapperType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsServiceRemapper object is equal to o. */ + /** + * Return true if this LogsServiceRemapper object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,15 +162,13 @@ public boolean equals(Object o) { return false; } LogsServiceRemapper logsServiceRemapper = (LogsServiceRemapper) o; - return Objects.equals(this.isEnabled, logsServiceRemapper.isEnabled) - && Objects.equals(this.name, logsServiceRemapper.name) - && Objects.equals(this.sources, logsServiceRemapper.sources) - && Objects.equals(this.type, logsServiceRemapper.type); + return Objects.equals(this.isEnabled, logsServiceRemapper.isEnabled) && Objects.equals(this.name, logsServiceRemapper.name) && Objects.equals(this.sources, logsServiceRemapper.sources) && Objects.equals(this.type, logsServiceRemapper.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, sources, type); + return Objects.hash(isEnabled,name,sources,type); } @Override @@ -179,7 +184,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapperType.java b/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapperType.java index 83207d26412..41c2948f09a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapperType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsServiceRemapperType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs service remapper. */ +/** + *

Type of logs service remapper.

+ */ @JsonSerialize(using = LogsServiceRemapperType.LogsServiceRemapperTypeSerializer.class) public class LogsServiceRemapperType { - public static final LogsServiceRemapperType SERVICE_REMAPPER = - new LogsServiceRemapperType("service-remapper"); + public static final LogsServiceRemapperType SERVICE_REMAPPER = new LogsServiceRemapperType("service-remapper"); - private static final Set allowedValues = - new HashSet(Arrays.asList("service-remapper")); + private static final Set allowedValues = new HashSet(Arrays.asList("service-remapper")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsServiceRemapperTypeSerializer - extends StdSerializer { - public LogsServiceRemapperTypeSerializer(Class t) { - super(t); - } + public static class LogsServiceRemapperTypeSerializer extends StdSerializer { + public LogsServiceRemapperTypeSerializer(Class t) { + super(t); + } - public LogsServiceRemapperTypeSerializer() { - this(null); - } + public LogsServiceRemapperTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsServiceRemapperType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsServiceRemapperType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsServiceRemapperType object is equal to o. */ + /** + * Return true if this LogsServiceRemapperType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsSort.java b/src/main/java/com/datadog/api/client/v1/model/LogsSort.java index 4501b961585..1cc64ba9557 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsSort.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Time-ascending asc or time-descending desc results. */ +/** + *

Time-ascending asc or time-descending desc results.

+ */ @JsonSerialize(using = LogsSort.LogsSortSerializer.class) public class LogsSort { public static final LogsSort TIME_ASCENDING = new LogsSort("asc"); public static final LogsSort TIME_DESCENDING = new LogsSort("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class LogsSortSerializer extends StdSerializer { - public LogsSortSerializer(Class t) { - super(t); - } - - public LogsSortSerializer() { - this(null); - } - - @Override - public void serialize(LogsSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsSortSerializer(Class t) { + super(t); + } + + public LogsSortSerializer() { + this(null); + } + + @Override + public void serialize(LogsSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsSort object is equal to o. */ + /** + * Return true if this LogsSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapper.java b/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapper.java index fe1b399a97a..471dab0cefd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapper.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapper.java @@ -6,39 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use this Processor if you want to assign some attributes as the official status. - * - *

Each incoming status value is mapped as follows. - * - *

    - *
  • Integers from 0 to 7 map to the Syslog severity standards - *
  • Strings beginning with emerg or f (case-insensitive) map to emerg - * (0) - *
  • Strings beginning with a (case-insensitive) map to alert (1) - *
  • Strings beginning with c (case-insensitive) map to critical (2) - *
  • Strings beginning with err (case-insensitive) map to error (3) - *
  • Strings beginning with w (case-insensitive) map to warning (4) - *
  • Strings beginning with n (case-insensitive) map to notice (5) - *
  • Strings beginning with i (case-insensitive) map to info (6) - *
  • Strings beginning with d, trace or verbose - * (case-insensitive) map to debug (7) - *
  • Strings beginning with o or matching OK or Success - * (case-insensitive) map to OK - *
  • All others map to info (6) - *
- * - *

Note: If multiple log status remapper processors can be applied to a given - * log, only the first one (according to the pipelines order) is taken into account. + *

Use this Processor if you want to assign some attributes as the official status.

+ *

Each incoming status value is mapped as follows.

+ *
    + *
  • Integers from 0 to 7 map to the Syslog severity standards
  • + *
  • Strings beginning with emerg or f (case-insensitive) map to emerg (0)
  • + *
  • Strings beginning with a (case-insensitive) map to alert (1)
  • + *
  • Strings beginning with c (case-insensitive) map to critical (2)
  • + *
  • Strings beginning with err (case-insensitive) map to error (3)
  • + *
  • Strings beginning with w (case-insensitive) map to warning (4)
  • + *
  • Strings beginning with n (case-insensitive) map to notice (5)
  • + *
  • Strings beginning with i (case-insensitive) map to info (6)
  • + *
  • Strings beginning with d, trace or verbose (case-insensitive) map to debug (7)
  • + *
  • Strings beginning with o or matching OK or Success (case-insensitive) map to OK
  • + *
  • All others map to info (6)
  • + *
+ *

Note: If multiple log status remapper processors can be applied to a given log, + * only the first one (according to the pipelines order) is taken into account.

*/ @JsonPropertyOrder({ LogsStatusRemapper.JSON_PROPERTY_IS_ENABLED, @@ -46,10 +55,10 @@ LogsStatusRemapper.JSON_PROPERTY_SOURCES, LogsStatusRemapper.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsStatusRemapper { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -66,80 +75,72 @@ public LogsStatusRemapper() {} @JsonCreator public LogsStatusRemapper( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsStatusRemapperType type) { - this.sources = sources; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsStatusRemapperType type) { + this.sources = sources; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsStatusRemapper isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsStatusRemapper name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsStatusRemapper sources(List sources) { this.sources = sources; return this; } - public LogsStatusRemapper addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsStatusRemapper type(LogsStatusRemapperType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -147,24 +148,25 @@ public LogsStatusRemapper type(LogsStatusRemapperType type) { } /** - * Type of logs status remapper. - * + *

Type of logs status remapper.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsStatusRemapperType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsStatusRemapperType getType() { + return type; + } public void setType(LogsStatusRemapperType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsStatusRemapper object is equal to o. */ + /** + * Return true if this LogsStatusRemapper object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -174,15 +176,13 @@ public boolean equals(Object o) { return false; } LogsStatusRemapper logsStatusRemapper = (LogsStatusRemapper) o; - return Objects.equals(this.isEnabled, logsStatusRemapper.isEnabled) - && Objects.equals(this.name, logsStatusRemapper.name) - && Objects.equals(this.sources, logsStatusRemapper.sources) - && Objects.equals(this.type, logsStatusRemapper.type); + return Objects.equals(this.isEnabled, logsStatusRemapper.isEnabled) && Objects.equals(this.name, logsStatusRemapper.name) && Objects.equals(this.sources, logsStatusRemapper.sources) && Objects.equals(this.type, logsStatusRemapper.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, sources, type); + return Objects.hash(isEnabled,name,sources,type); } @Override @@ -198,7 +198,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapperType.java b/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapperType.java index 72758804cdd..d4d5857ea70 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapperType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsStatusRemapperType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs status remapper. */ +/** + *

Type of logs status remapper.

+ */ @JsonSerialize(using = LogsStatusRemapperType.LogsStatusRemapperTypeSerializer.class) public class LogsStatusRemapperType { - public static final LogsStatusRemapperType STATUS_REMAPPER = - new LogsStatusRemapperType("status-remapper"); + public static final LogsStatusRemapperType STATUS_REMAPPER = new LogsStatusRemapperType("status-remapper"); - private static final Set allowedValues = - new HashSet(Arrays.asList("status-remapper")); + private static final Set allowedValues = new HashSet(Arrays.asList("status-remapper")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsStatusRemapperTypeSerializer - extends StdSerializer { - public LogsStatusRemapperTypeSerializer(Class t) { - super(t); - } + public static class LogsStatusRemapperTypeSerializer extends StdSerializer { + public LogsStatusRemapperTypeSerializer(Class t) { + super(t); + } - public LogsStatusRemapperTypeSerializer() { - this(null); - } + public LogsStatusRemapperTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsStatusRemapperType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsStatusRemapperType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsStatusRemapperType object is equal to o. */ + /** + * Return true if this LogsStatusRemapperType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessor.java b/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessor.java index abfc698ee2b..c67dd65508b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessor.java @@ -6,30 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use the string builder processor to add a new attribute (without spaces or special characters) to - * a log with the result of the provided template. This enables aggregation of different attributes - * or raw strings into a single attribute. - * - *

The template is defined by both raw text and blocks with the syntax %{attribute_path} - * . - * - *

Notes: - * - *

    - *
  • The processor only accepts attributes with values or an array of values in the blocks. - *
  • If an attribute cannot be used (object or array of object), it is replaced by an empty - * string or the entire operation is skipped depending on your selection. - *
  • If the target attribute already exists, it is overwritten by the result of the template. - *
  • Results of the template cannot exceed 256 characters. - *
+ *

Use the string builder processor to add a new attribute (without spaces or special characters) + * to a log with the result of the provided template. + * This enables aggregation of different attributes or raw strings into a single attribute.

+ *

The template is defined by both raw text and blocks with the syntax %{attribute_path}.

+ *

Notes:

+ *
    + *
  • The processor only accepts attributes with values or an array of values in the blocks.
  • + *
  • If an attribute cannot be used (object or array of object), + * it is replaced by an empty string or the entire operation is skipped depending on your selection.
  • + *
  • If the target attribute already exists, it is overwritten by the result of the template.
  • + *
  • Results of the template cannot exceed 256 characters.
  • + *
*/ @JsonPropertyOrder({ LogsStringBuilderProcessor.JSON_PROPERTY_IS_ENABLED, @@ -39,10 +52,10 @@ LogsStringBuilderProcessor.JSON_PROPERTY_TEMPLATE, LogsStringBuilderProcessor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsStringBuilderProcessor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -59,127 +72,114 @@ public class LogsStringBuilderProcessor { private String template; public static final String JSON_PROPERTY_TYPE = "type"; - private LogsStringBuilderProcessorType type = - LogsStringBuilderProcessorType.STRING_BUILDER_PROCESSOR; + private LogsStringBuilderProcessorType type = LogsStringBuilderProcessorType.STRING_BUILDER_PROCESSOR; public LogsStringBuilderProcessor() {} @JsonCreator public LogsStringBuilderProcessor( - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE) String template, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - LogsStringBuilderProcessorType type) { - this.target = target; - this.template = template; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TEMPLATE)String template, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsStringBuilderProcessorType type) { + this.target = target; + this.template = template; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsStringBuilderProcessor isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsStringBuilderProcessor isReplaceMissing(Boolean isReplaceMissing) { this.isReplaceMissing = isReplaceMissing; return this; } /** - * If true, it replaces all missing attributes of template by an empty string. If - * false (default), skips the operation for missing attributes. - * + *

If true, it replaces all missing attributes of template by an empty string. + * If false (default), skips the operation for missing attributes.

* @return isReplaceMissing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_REPLACE_MISSING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsReplaceMissing() { - return isReplaceMissing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_REPLACE_MISSING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsReplaceMissing() { + return isReplaceMissing; + } public void setIsReplaceMissing(Boolean isReplaceMissing) { this.isReplaceMissing = isReplaceMissing; } - public LogsStringBuilderProcessor name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsStringBuilderProcessor target(String target) { this.target = target; return this; } /** - * The name of the attribute that contains the result of the template. - * + *

The name of the attribute that contains the result of the template.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsStringBuilderProcessor template(String template) { this.template = template; return this; } /** - * A formula with one or more attributes and raw text. - * + *

A formula with one or more attributes and raw text.

* @return template - */ - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTemplate() { - return template; - } - + **/ + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTemplate() { + return template; + } public void setTemplate(String template) { this.template = template; } - public LogsStringBuilderProcessor type(LogsStringBuilderProcessorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -187,24 +187,25 @@ public LogsStringBuilderProcessor type(LogsStringBuilderProcessorType type) { } /** - * Type of logs string builder processor. - * + *

Type of logs string builder processor.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsStringBuilderProcessorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsStringBuilderProcessorType getType() { + return type; + } public void setType(LogsStringBuilderProcessorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsStringBuilderProcessor object is equal to o. */ + /** + * Return true if this LogsStringBuilderProcessor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -214,17 +215,13 @@ public boolean equals(Object o) { return false; } LogsStringBuilderProcessor logsStringBuilderProcessor = (LogsStringBuilderProcessor) o; - return Objects.equals(this.isEnabled, logsStringBuilderProcessor.isEnabled) - && Objects.equals(this.isReplaceMissing, logsStringBuilderProcessor.isReplaceMissing) - && Objects.equals(this.name, logsStringBuilderProcessor.name) - && Objects.equals(this.target, logsStringBuilderProcessor.target) - && Objects.equals(this.template, logsStringBuilderProcessor.template) - && Objects.equals(this.type, logsStringBuilderProcessor.type); + return Objects.equals(this.isEnabled, logsStringBuilderProcessor.isEnabled) && Objects.equals(this.isReplaceMissing, logsStringBuilderProcessor.isReplaceMissing) && Objects.equals(this.name, logsStringBuilderProcessor.name) && Objects.equals(this.target, logsStringBuilderProcessor.target) && Objects.equals(this.template, logsStringBuilderProcessor.template) && Objects.equals(this.type, logsStringBuilderProcessor.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, isReplaceMissing, name, target, template, type); + return Objects.hash(isEnabled,isReplaceMissing,name,target,template,type); } @Override @@ -242,7 +239,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessorType.java b/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessorType.java index e7660c457cf..27045f892a9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsStringBuilderProcessorType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs string builder processor. */ -@JsonSerialize( - using = LogsStringBuilderProcessorType.LogsStringBuilderProcessorTypeSerializer.class) +/** + *

Type of logs string builder processor.

+ */ +@JsonSerialize(using = LogsStringBuilderProcessorType.LogsStringBuilderProcessorTypeSerializer.class) public class LogsStringBuilderProcessorType { - public static final LogsStringBuilderProcessorType STRING_BUILDER_PROCESSOR = - new LogsStringBuilderProcessorType("string-builder-processor"); + public static final LogsStringBuilderProcessorType STRING_BUILDER_PROCESSOR = new LogsStringBuilderProcessorType("string-builder-processor"); - private static final Set allowedValues = - new HashSet(Arrays.asList("string-builder-processor")); + private static final Set allowedValues = new HashSet(Arrays.asList("string-builder-processor")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsStringBuilderProcessorTypeSerializer - extends StdSerializer { - public LogsStringBuilderProcessorTypeSerializer(Class t) { - super(t); - } + public static class LogsStringBuilderProcessorTypeSerializer extends StdSerializer { + public LogsStringBuilderProcessorTypeSerializer(Class t) { + super(t); + } - public LogsStringBuilderProcessorTypeSerializer() { - this(null); - } + public LogsStringBuilderProcessorTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsStringBuilderProcessorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsStringBuilderProcessorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsStringBuilderProcessorType object is equal to o. */ + /** + * Return true if this LogsStringBuilderProcessorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapper.java b/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapper.java index c71fdb26f53..f7573b74376 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapper.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapper.java @@ -6,27 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * There are two ways to improve correlation between application traces and logs. - * - *
    - *
  1. - *

    Follow the documentation on how to inject a trace ID - * in the application logs and by default log integrations take care of all the rest of - * the setup. - *

  2. - *

    Use the Trace remapper processor to define a log attribute as its associated trace ID. - *

+ *

There are two ways to improve correlation between application traces and logs.

+ *
    + *
  1. + *

    Follow the documentation on how to inject a trace ID in the application logs + * and by default log integrations take care of all the rest of the setup.

    + *
  2. + *
  3. + *

    Use the Trace remapper processor to define a log attribute as its associated trace ID.

    + *
  4. + *
*/ @JsonPropertyOrder({ LogsTraceRemapper.JSON_PROPERTY_IS_ENABLED, @@ -34,10 +48,10 @@ LogsTraceRemapper.JSON_PROPERTY_SOURCES, LogsTraceRemapper.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsTraceRemapper { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -54,58 +68,52 @@ public LogsTraceRemapper() {} @JsonCreator public LogsTraceRemapper( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsTraceRemapperType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsTraceRemapperType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsTraceRemapper isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsTraceRemapper name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsTraceRemapper sources(List sources) { this.sources = sources; return this; } - public LogsTraceRemapper addSourcesItem(String sourcesItem) { if (this.sources == null) { this.sources = new ArrayList<>(); @@ -115,21 +123,19 @@ public LogsTraceRemapper addSourcesItem(String sourcesItem) { } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSources() { - return sources; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsTraceRemapper type(LogsTraceRemapperType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -137,24 +143,25 @@ public LogsTraceRemapper type(LogsTraceRemapperType type) { } /** - * Type of logs trace remapper. - * + *

Type of logs trace remapper.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsTraceRemapperType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsTraceRemapperType getType() { + return type; + } public void setType(LogsTraceRemapperType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsTraceRemapper object is equal to o. */ + /** + * Return true if this LogsTraceRemapper object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -164,15 +171,13 @@ public boolean equals(Object o) { return false; } LogsTraceRemapper logsTraceRemapper = (LogsTraceRemapper) o; - return Objects.equals(this.isEnabled, logsTraceRemapper.isEnabled) - && Objects.equals(this.name, logsTraceRemapper.name) - && Objects.equals(this.sources, logsTraceRemapper.sources) - && Objects.equals(this.type, logsTraceRemapper.type); + return Objects.equals(this.isEnabled, logsTraceRemapper.isEnabled) && Objects.equals(this.name, logsTraceRemapper.name) && Objects.equals(this.sources, logsTraceRemapper.sources) && Objects.equals(this.type, logsTraceRemapper.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, sources, type); + return Objects.hash(isEnabled,name,sources,type); } @Override @@ -188,7 +193,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapperType.java b/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapperType.java index 541bfd14e95..d620c6fcc3d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapperType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsTraceRemapperType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs trace remapper. */ +/** + *

Type of logs trace remapper.

+ */ @JsonSerialize(using = LogsTraceRemapperType.LogsTraceRemapperTypeSerializer.class) public class LogsTraceRemapperType { - public static final LogsTraceRemapperType TRACE_ID_REMAPPER = - new LogsTraceRemapperType("trace-id-remapper"); + public static final LogsTraceRemapperType TRACE_ID_REMAPPER = new LogsTraceRemapperType("trace-id-remapper"); - private static final Set allowedValues = - new HashSet(Arrays.asList("trace-id-remapper")); + private static final Set allowedValues = new HashSet(Arrays.asList("trace-id-remapper")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class LogsTraceRemapperTypeSerializer extends StdSerializer { - public LogsTraceRemapperTypeSerializer(Class t) { - super(t); - } - - public LogsTraceRemapperTypeSerializer() { - this(null); - } - - @Override - public void serialize( - LogsTraceRemapperType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsTraceRemapperTypeSerializer(Class t) { + super(t); + } + + public LogsTraceRemapperTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsTraceRemapperType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsTraceRemapperType object is equal to o. */ + /** + * Return true if this LogsTraceRemapperType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsURLParser.java b/src/main/java/com/datadog/api/client/v1/model/LogsURLParser.java index fea4769742e..d1e0bc84549 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsURLParser.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsURLParser.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** This processor extracts query parameters and other important parameters from a URL. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

This processor extracts query parameters and other important parameters from a URL.

+ */ @JsonPropertyOrder({ LogsURLParser.JSON_PROPERTY_IS_ENABLED, LogsURLParser.JSON_PROPERTY_NAME, @@ -25,10 +41,10 @@ LogsURLParser.JSON_PROPERTY_TARGET, LogsURLParser.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsURLParser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -51,134 +67,118 @@ public LogsURLParser() {} @JsonCreator public LogsURLParser( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsURLParserType type) { - this.sources = sources; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsURLParserType type) { + this.sources = sources; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsURLParser isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsURLParser name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsURLParser normalizeEndingSlashes(Boolean normalizeEndingSlashes) { this.normalizeEndingSlashes = JsonNullable.of(normalizeEndingSlashes); return this; } /** - * Normalize the ending slashes or not. - * + *

Normalize the ending slashes or not.

* @return normalizeEndingSlashes - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Boolean getNormalizeEndingSlashes() { - return normalizeEndingSlashes.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getNormalizeEndingSlashes() { + return normalizeEndingSlashes.orElse(null); + } @JsonProperty(JSON_PROPERTY_NORMALIZE_ENDING_SLASHES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNormalizeEndingSlashes_JsonNullable() { return normalizeEndingSlashes; } - - @JsonProperty(JSON_PROPERTY_NORMALIZE_ENDING_SLASHES) - public void setNormalizeEndingSlashes_JsonNullable(JsonNullable normalizeEndingSlashes) { + @JsonProperty(JSON_PROPERTY_NORMALIZE_ENDING_SLASHES)public void setNormalizeEndingSlashes_JsonNullable(JsonNullable normalizeEndingSlashes) { this.normalizeEndingSlashes = normalizeEndingSlashes; } - public void setNormalizeEndingSlashes(Boolean normalizeEndingSlashes) { this.normalizeEndingSlashes = JsonNullable.of(normalizeEndingSlashes); } - public LogsURLParser sources(List sources) { this.sources = sources; return this; } - public LogsURLParser addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsURLParser target(String target) { this.target = target; return this; } /** - * Name of the parent attribute that contains all the extracted details from the sources - * . - * + *

Name of the parent attribute that contains all the extracted details from the sources.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsURLParser type(LogsURLParserType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -186,24 +186,25 @@ public LogsURLParser type(LogsURLParserType type) { } /** - * Type of logs URL parser. - * + *

Type of logs URL parser.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsURLParserType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsURLParserType getType() { + return type; + } public void setType(LogsURLParserType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsURLParser object is equal to o. */ + /** + * Return true if this LogsURLParser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -213,17 +214,13 @@ public boolean equals(Object o) { return false; } LogsURLParser logsUrlParser = (LogsURLParser) o; - return Objects.equals(this.isEnabled, logsUrlParser.isEnabled) - && Objects.equals(this.name, logsUrlParser.name) - && Objects.equals(this.normalizeEndingSlashes, logsUrlParser.normalizeEndingSlashes) - && Objects.equals(this.sources, logsUrlParser.sources) - && Objects.equals(this.target, logsUrlParser.target) - && Objects.equals(this.type, logsUrlParser.type); + return Objects.equals(this.isEnabled, logsUrlParser.isEnabled) && Objects.equals(this.name, logsUrlParser.name) && Objects.equals(this.normalizeEndingSlashes, logsUrlParser.normalizeEndingSlashes) && Objects.equals(this.sources, logsUrlParser.sources) && Objects.equals(this.target, logsUrlParser.target) && Objects.equals(this.type, logsUrlParser.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, name, normalizeEndingSlashes, sources, target, type); + return Objects.hash(isEnabled,name,normalizeEndingSlashes,sources,target,type); } @Override @@ -232,9 +229,7 @@ public String toString() { sb.append("class LogsURLParser {\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" normalizeEndingSlashes: ") - .append(toIndentedString(normalizeEndingSlashes)) - .append("\n"); + sb.append(" normalizeEndingSlashes: ").append(toIndentedString(normalizeEndingSlashes)).append("\n"); sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); sb.append(" target: ").append(toIndentedString(target)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); @@ -243,7 +238,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsURLParserType.java b/src/main/java/com/datadog/api/client/v1/model/LogsURLParserType.java index 39277bd3b27..aad169f4cda 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsURLParserType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsURLParserType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs URL parser. */ +/** + *

Type of logs URL parser.

+ */ @JsonSerialize(using = LogsURLParserType.LogsURLParserTypeSerializer.class) public class LogsURLParserType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class LogsURLParserTypeSerializer extends StdSerializer { - public LogsURLParserTypeSerializer(Class t) { - super(t); - } - - public LogsURLParserTypeSerializer() { - this(null); - } - - @Override - public void serialize(LogsURLParserType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsURLParserTypeSerializer(Class t) { + super(t); + } + + public LogsURLParserTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsURLParserType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsURLParserType object is equal to o. */ + /** + * Return true if this LogsURLParserType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParser.java b/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParser.java index 444dc50ee25..a951a1ff3e5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParser.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParser.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The User-Agent parser takes a User-Agent attribute and extracts the OS, browser, device, and - * other user data. It recognizes major bots like the Google Bot, Yahoo Slurp, and Bing. + *

The User-Agent parser takes a User-Agent attribute and extracts the OS, browser, device, and other user data. + * It recognizes major bots like the Google Bot, Yahoo Slurp, and Bing.

*/ @JsonPropertyOrder({ LogsUserAgentParser.JSON_PROPERTY_IS_ENABLED, @@ -27,10 +42,10 @@ LogsUserAgentParser.JSON_PROPERTY_TARGET, LogsUserAgentParser.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsUserAgentParser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -53,124 +68,111 @@ public LogsUserAgentParser() {} @JsonCreator public LogsUserAgentParser( - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsUserAgentParserType type) { - this.sources = sources; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCES)List sources, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsUserAgentParserType type) { + this.sources = sources; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsUserAgentParser isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public LogsUserAgentParser isEncoded(Boolean isEncoded) { this.isEncoded = isEncoded; return this; } /** - * Define if the source attribute is URL encoded or not. - * + *

Define if the source attribute is URL encoded or not.

* @return isEncoded - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENCODED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEncoded() { - return isEncoded; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENCODED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEncoded() { + return isEncoded; + } public void setIsEncoded(Boolean isEncoded) { this.isEncoded = isEncoded; } - public LogsUserAgentParser name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsUserAgentParser sources(List sources) { this.sources = sources; return this; } - public LogsUserAgentParser addSourcesItem(String sourcesItem) { this.sources.add(sourcesItem); return this; } /** - * Array of source attributes. - * + *

Array of source attributes.

* @return sources - */ - @JsonProperty(JSON_PROPERTY_SOURCES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSources() { - return sources; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSources() { + return sources; + } public void setSources(List sources) { this.sources = sources; } - public LogsUserAgentParser target(String target) { this.target = target; return this; } /** - * Name of the parent attribute that contains all the extracted details from the sources - * . - * + *

Name of the parent attribute that contains all the extracted details from the sources.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public LogsUserAgentParser type(LogsUserAgentParserType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -178,24 +180,25 @@ public LogsUserAgentParser type(LogsUserAgentParserType type) { } /** - * Type of logs User-Agent parser. - * + *

Type of logs User-Agent parser.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsUserAgentParserType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsUserAgentParserType getType() { + return type; + } public void setType(LogsUserAgentParserType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsUserAgentParser object is equal to o. */ + /** + * Return true if this LogsUserAgentParser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -205,17 +208,13 @@ public boolean equals(Object o) { return false; } LogsUserAgentParser logsUserAgentParser = (LogsUserAgentParser) o; - return Objects.equals(this.isEnabled, logsUserAgentParser.isEnabled) - && Objects.equals(this.isEncoded, logsUserAgentParser.isEncoded) - && Objects.equals(this.name, logsUserAgentParser.name) - && Objects.equals(this.sources, logsUserAgentParser.sources) - && Objects.equals(this.target, logsUserAgentParser.target) - && Objects.equals(this.type, logsUserAgentParser.type); + return Objects.equals(this.isEnabled, logsUserAgentParser.isEnabled) && Objects.equals(this.isEncoded, logsUserAgentParser.isEncoded) && Objects.equals(this.name, logsUserAgentParser.name) && Objects.equals(this.sources, logsUserAgentParser.sources) && Objects.equals(this.target, logsUserAgentParser.target) && Objects.equals(this.type, logsUserAgentParser.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, isEncoded, name, sources, target, type); + return Objects.hash(isEnabled,isEncoded,name,sources,target,type); } @Override @@ -233,7 +232,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParserType.java b/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParserType.java index 9c988ae6a0d..a3aa81075d7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParserType.java +++ b/src/main/java/com/datadog/api/client/v1/model/LogsUserAgentParserType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of logs User-Agent parser. */ +/** + *

Type of logs User-Agent parser.

+ */ @JsonSerialize(using = LogsUserAgentParserType.LogsUserAgentParserTypeSerializer.class) public class LogsUserAgentParserType { - public static final LogsUserAgentParserType USER_AGENT_PARSER = - new LogsUserAgentParserType("user-agent-parser"); + public static final LogsUserAgentParserType USER_AGENT_PARSER = new LogsUserAgentParserType("user-agent-parser"); - private static final Set allowedValues = - new HashSet(Arrays.asList("user-agent-parser")); + private static final Set allowedValues = new HashSet(Arrays.asList("user-agent-parser")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsUserAgentParserTypeSerializer - extends StdSerializer { - public LogsUserAgentParserTypeSerializer(Class t) { - super(t); - } + public static class LogsUserAgentParserTypeSerializer extends StdSerializer { + public LogsUserAgentParserTypeSerializer(Class t) { + super(t); + } - public LogsUserAgentParserTypeSerializer() { - this(null); - } + public LogsUserAgentParserTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsUserAgentParserType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsUserAgentParserType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsUserAgentParserType object is equal to o. */ + /** + * Return true if this LogsUserAgentParserType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricContentEncoding.java b/src/main/java/com/datadog/api/client/v1/model/MetricContentEncoding.java index e67804ff914..a9e60c2f6bd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricContentEncoding.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricContentEncoding.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** HTTP header used to compress the media-type. */ +/** + *

HTTP header used to compress the media-type.

+ */ @JsonSerialize(using = MetricContentEncoding.MetricContentEncodingSerializer.class) public class MetricContentEncoding { public static final MetricContentEncoding DEFLATE = new MetricContentEncoding("deflate"); public static final MetricContentEncoding GZIP = new MetricContentEncoding("gzip"); - private static final Set allowedValues = - new HashSet(Arrays.asList("deflate", "gzip")); + private static final Set allowedValues = new HashSet(Arrays.asList("deflate", "gzip")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class MetricContentEncodingSerializer extends StdSerializer { - public MetricContentEncodingSerializer(Class t) { - super(t); - } - - public MetricContentEncodingSerializer() { - this(null); - } - - @Override - public void serialize( - MetricContentEncoding value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricContentEncodingSerializer(Class t) { + super(t); + } + + public MetricContentEncodingSerializer() { + this(null); + } + + @Override + public void serialize(MetricContentEncoding value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricContentEncoding object is equal to o. */ + /** + * Return true if this MetricContentEncoding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricMetadata.java b/src/main/java/com/datadog/api/client/v1/model/MetricMetadata.java index e0e50bb8582..11b785f8953 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricMetadata.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object with all metric related metadata. */ + +/** + *

Object with all metric related metadata.

+ */ @JsonPropertyOrder({ MetricMetadata.JSON_PROPERTY_DESCRIPTION, MetricMetadata.JSON_PROPERTY_INTEGRATION, @@ -22,10 +42,10 @@ MetricMetadata.JSON_PROPERTY_TYPE, MetricMetadata.JSON_PROPERTY_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -53,139 +73,130 @@ public MetricMetadata description(String description) { } /** - * Metric description. - * + *

Metric description.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } /** - * Name of the integration that sent the metric if applicable. - * + *

Name of the integration that sent the metric if applicable.

* @return integration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGRATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIntegration() { - return integration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegration() { + return integration; + } public MetricMetadata perUnit(String perUnit) { this.perUnit = perUnit; return this; } /** - * Per unit of the metric such as second in bytes per second. - * + *

Per unit of the metric such as second in bytes per second.

* @return perUnit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PER_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPerUnit() { - return perUnit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PER_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPerUnit() { + return perUnit; + } public void setPerUnit(String perUnit) { this.perUnit = perUnit; } - public MetricMetadata shortName(String shortName) { this.shortName = shortName; return this; } /** - * A more human-readable and abbreviated version of the metric name. - * + *

A more human-readable and abbreviated version of the metric name.

* @return shortName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHORT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getShortName() { - return shortName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHORT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getShortName() { + return shortName; + } public void setShortName(String shortName) { this.shortName = shortName; } - public MetricMetadata statsdInterval(Long statsdInterval) { this.statsdInterval = statsdInterval; return this; } /** - * StatsD flush interval of the metric in seconds if applicable. - * + *

StatsD flush interval of the metric in seconds if applicable.

* @return statsdInterval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATSD_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStatsdInterval() { - return statsdInterval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATSD_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStatsdInterval() { + return statsdInterval; + } public void setStatsdInterval(Long statsdInterval) { this.statsdInterval = statsdInterval; } - public MetricMetadata type(String type) { this.type = type; return this; } /** - * Metric type such as gauge or rate. - * + *

Metric type such as gauge or rate.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - public MetricMetadata unit(String unit) { this.unit = unit; return this; } /** - * Primary unit of the metric such as byte or operation. - * + *

Primary unit of the metric such as byte or operation.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUnit() { - return unit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUnit() { + return unit; + } public void setUnit(String unit) { this.unit = unit; } - /** Return true if this MetricMetadata object is equal to o. */ + /** + * Return true if this MetricMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -195,18 +206,13 @@ public boolean equals(Object o) { return false; } MetricMetadata metricMetadata = (MetricMetadata) o; - return Objects.equals(this.description, metricMetadata.description) - && Objects.equals(this.integration, metricMetadata.integration) - && Objects.equals(this.perUnit, metricMetadata.perUnit) - && Objects.equals(this.shortName, metricMetadata.shortName) - && Objects.equals(this.statsdInterval, metricMetadata.statsdInterval) - && Objects.equals(this.type, metricMetadata.type) - && Objects.equals(this.unit, metricMetadata.unit); + return Objects.equals(this.description, metricMetadata.description) && Objects.equals(this.integration, metricMetadata.integration) && Objects.equals(this.perUnit, metricMetadata.perUnit) && Objects.equals(this.shortName, metricMetadata.shortName) && Objects.equals(this.statsdInterval, metricMetadata.statsdInterval) && Objects.equals(this.type, metricMetadata.type) && Objects.equals(this.unit, metricMetadata.unit); } + @Override public int hashCode() { - return Objects.hash(description, integration, perUnit, shortName, statsdInterval, type, unit); + return Objects.hash(description,integration,perUnit,shortName,statsdInterval,type,unit); } @Override @@ -225,7 +231,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponse.java b/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponse.java index 7ebadbf7989..58c2cb2d528 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing the list of metrics matching the search query. */ -@JsonPropertyOrder({MetricSearchResponse.JSON_PROPERTY_RESULTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing the list of metrics matching the search query.

+ */ +@JsonPropertyOrder({ + MetricSearchResponse.JSON_PROPERTY_RESULTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricSearchResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RESULTS = "results"; private MetricSearchResponseResults results; @@ -28,22 +50,23 @@ public MetricSearchResponse results(MetricSearchResponseResults results) { } /** - * Search result. - * + *

Search result.

* @return results - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricSearchResponseResults getResults() { - return results; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricSearchResponseResults getResults() { + return results; + } public void setResults(MetricSearchResponseResults results) { this.results = results; } - /** Return true if this MetricSearchResponse object is equal to o. */ + /** + * Return true if this MetricSearchResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.results, metricSearchResponse.results); } + @Override public int hashCode() { return Objects.hash(results); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponseResults.java b/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponseResults.java index 7574b394c08..d78b96cf6c3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponseResults.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricSearchResponseResults.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Search result. */ -@JsonPropertyOrder({MetricSearchResponseResults.JSON_PROPERTY_METRICS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Search result.

+ */ +@JsonPropertyOrder({ + MetricSearchResponseResults.JSON_PROPERTY_METRICS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricSearchResponseResults { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METRICS = "metrics"; private List metrics = null; @@ -27,7 +47,6 @@ public MetricSearchResponseResults metrics(List metrics) { this.metrics = metrics; return this; } - public MetricSearchResponseResults addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); @@ -37,22 +56,23 @@ public MetricSearchResponseResults addMetricsItem(String metricsItem) { } /** - * List of metrics that match the search query. - * + *

List of metrics that match the search query.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetrics() { - return metrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetrics() { + return metrics; + } public void setMetrics(List metrics) { this.metrics = metrics; } - /** Return true if this MetricSearchResponseResults object is equal to o. */ + /** + * Return true if this MetricSearchResponseResults object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.metrics, metricSearchResponseResults.metrics); } + @Override public int hashCode() { return Objects.hash(metrics); @@ -80,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricsListResponse.java b/src/main/java/com/datadog/api/client/v1/model/MetricsListResponse.java index fe50692d810..497b9312e90 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricsListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricsListResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object listing all metric names stored by Datadog since a given time. */ +/** + *

Object listing all metric names stored by Datadog since a given time.

+ */ @JsonPropertyOrder({ MetricsListResponse.JSON_PROPERTY_FROM, MetricsListResponse.JSON_PROPERTY_METRICS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from; @@ -35,26 +53,23 @@ public MetricsListResponse from(String from) { } /** - * Time when the metrics were active, seconds since the Unix epoch. - * + *

Time when the metrics were active, seconds since the Unix epoch.

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public MetricsListResponse metrics(List metrics) { this.metrics = metrics; return this; } - public MetricsListResponse addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); @@ -64,22 +79,23 @@ public MetricsListResponse addMetricsItem(String metricsItem) { } /** - * List of metric names. - * + *

List of metric names.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetrics() { - return metrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetrics() { + return metrics; + } public void setMetrics(List metrics) { this.metrics = metrics; } - /** Return true if this MetricsListResponse object is equal to o. */ + /** + * Return true if this MetricsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,13 +105,13 @@ public boolean equals(Object o) { return false; } MetricsListResponse metricsListResponse = (MetricsListResponse) o; - return Objects.equals(this.from, metricsListResponse.from) - && Objects.equals(this.metrics, metricsListResponse.metrics); + return Objects.equals(this.from, metricsListResponse.from) && Objects.equals(this.metrics, metricsListResponse.metrics); } + @Override public int hashCode() { - return Objects.hash(from, metrics); + return Objects.hash(from,metrics); } @Override @@ -109,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricsPayload.java b/src/main/java/com/datadog/api/client/v1/model/MetricsPayload.java index 8aeb09dd781..a294ae933c4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricsPayload.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricsPayload.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The metrics' payload. */ -@JsonPropertyOrder({MetricsPayload.JSON_PROPERTY_SERIES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The metrics' payload.

+ */ +@JsonPropertyOrder({ + MetricsPayload.JSON_PROPERTY_SERIES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsPayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERIES = "series"; private List series = new ArrayList<>(); @@ -28,10 +47,9 @@ public MetricsPayload() {} @JsonCreator public MetricsPayload( - @JsonProperty(required = true, value = JSON_PROPERTY_SERIES) List series) { - this.series = series; + @JsonProperty(required=true, value=JSON_PROPERTY_SERIES)List series) { + this.series = series; } - public MetricsPayload series(List series) { this.series = series; for (Series item : series) { @@ -39,7 +57,6 @@ public MetricsPayload series(List series) { } return this; } - public MetricsPayload addSeriesItem(Series seriesItem) { this.series.add(seriesItem); this.unparsed |= seriesItem.unparsed; @@ -47,21 +64,22 @@ public MetricsPayload addSeriesItem(Series seriesItem) { } /** - * A list of time series to submit to Datadog. - * + *

A list of time series to submit to Datadog.

* @return series - */ - @JsonProperty(JSON_PROPERTY_SERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSeries() { - return series; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSeries() { + return series; + } public void setSeries(List series) { this.series = series; } - /** Return true if this MetricsPayload object is equal to o. */ + /** + * Return true if this MetricsPayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -74,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.series, metricsPayload.series); } + @Override public int hashCode() { return Objects.hash(series); @@ -89,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricsQueryMetadata.java b/src/main/java/com/datadog/api/client/v1/model/MetricsQueryMetadata.java index 7d80539c501..bb8bc3ee5fa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricsQueryMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricsQueryMetadata.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing all metric names returned and their associated metadata. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing all metric names returned and their associated metadata.

+ */ @JsonPropertyOrder({ MetricsQueryMetadata.JSON_PROPERTY_AGGR, MetricsQueryMetadata.JSON_PROPERTY_DISPLAY_NAME, @@ -30,10 +48,10 @@ MetricsQueryMetadata.JSON_PROPERTY_TAG_SET, MetricsQueryMetadata.JSON_PROPERTY_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsQueryMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGR = "aggr"; private JsonNullable aggr = JsonNullable.undefined(); @@ -73,180 +91,180 @@ public class MetricsQueryMetadata { public static final String JSON_PROPERTY_UNIT = "unit"; private List unit = null; + /** - * Aggregation type. - * + *

Aggregation type.

* @return aggr - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getAggr() { - - if (aggr == null) { - aggr = JsonNullable.undefined(); - } - return aggr.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAggr() { + + if (aggr == null) { + aggr = JsonNullable.undefined(); + } + return aggr.orElse(null); + } @JsonProperty(JSON_PROPERTY_AGGR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getAggr_JsonNullable() { return aggr; } - - @JsonProperty(JSON_PROPERTY_AGGR) - private void setAggr_JsonNullable(JsonNullable aggr) { + @JsonProperty(JSON_PROPERTY_AGGR)private void setAggr_JsonNullable(JsonNullable aggr) { this.aggr = aggr; } /** - * Display name of the metric. - * + *

Display name of the metric.

* @return displayName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDisplayName() { - return displayName; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } /** - * End of the time window, milliseconds since Unix epoch. - * + *

End of the time window, milliseconds since Unix epoch.

* @return end - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEnd() { - return end; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } /** - * Metric expression. - * + *

Metric expression.

* @return expression - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExpression() { - return expression; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExpression() { + return expression; + } /** - * Number of seconds between data samples. - * + *

Number of seconds between data samples.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } /** - * Number of data samples. - * + *

Number of data samples.

* @return length - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLength() { - return length; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LENGTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLength() { + return length; + } /** - * Metric name. - * + *

Metric name.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } /** - * List of points of the time series. - * + *

List of points of the time series.

* @return pointlist - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POINTLIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getPointlist() { - return pointlist; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POINTLIST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List> getPointlist() { + return pointlist; + } /** - * The index of the series' query within the request. - * + *

The index of the series' query within the request.

* @return queryIndex - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getQueryIndex() { - return queryIndex; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getQueryIndex() { + return queryIndex; + } /** - * Metric scope, comma separated list of tags. - * + *

Metric scope, comma separated list of tags.

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScope() { - return scope; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } /** - * Start of the time window, milliseconds since Unix epoch. - * + *

Start of the time window, milliseconds since Unix epoch.

* @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } /** - * Unique tags identifying this series. - * + *

Unique tags identifying this series.

* @return tagSet - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_SET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTagSet() { - return tagSet; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_SET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTagSet() { + return tagSet; + } /** - * Detailed information about the metric unit. The first element describes the "primary unit" (for - * example, bytes in bytes per second). The second element describes the - * "per unit" (for example, second in bytes per second). If the second - * element is not present, the API returns null. - * + *

Detailed information about the metric unit. + * The first element describes the "primary unit" (for example, bytes in bytes per second). + * The second element describes the "per unit" (for example, second in bytes per second). + * If the second element is not present, the API returns null.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUnit() { - return unit; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUnit() { + return unit; + } - /** Return true if this MetricsQueryMetadata object is equal to o. */ + /** + * Return true if this MetricsQueryMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -256,37 +274,13 @@ public boolean equals(Object o) { return false; } MetricsQueryMetadata metricsQueryMetadata = (MetricsQueryMetadata) o; - return Objects.equals(this.aggr, metricsQueryMetadata.aggr) - && Objects.equals(this.displayName, metricsQueryMetadata.displayName) - && Objects.equals(this.end, metricsQueryMetadata.end) - && Objects.equals(this.expression, metricsQueryMetadata.expression) - && Objects.equals(this.interval, metricsQueryMetadata.interval) - && Objects.equals(this.length, metricsQueryMetadata.length) - && Objects.equals(this.metric, metricsQueryMetadata.metric) - && Objects.equals(this.pointlist, metricsQueryMetadata.pointlist) - && Objects.equals(this.queryIndex, metricsQueryMetadata.queryIndex) - && Objects.equals(this.scope, metricsQueryMetadata.scope) - && Objects.equals(this.start, metricsQueryMetadata.start) - && Objects.equals(this.tagSet, metricsQueryMetadata.tagSet) - && Objects.equals(this.unit, metricsQueryMetadata.unit); + return Objects.equals(this.aggr, metricsQueryMetadata.aggr) && Objects.equals(this.displayName, metricsQueryMetadata.displayName) && Objects.equals(this.end, metricsQueryMetadata.end) && Objects.equals(this.expression, metricsQueryMetadata.expression) && Objects.equals(this.interval, metricsQueryMetadata.interval) && Objects.equals(this.length, metricsQueryMetadata.length) && Objects.equals(this.metric, metricsQueryMetadata.metric) && Objects.equals(this.pointlist, metricsQueryMetadata.pointlist) && Objects.equals(this.queryIndex, metricsQueryMetadata.queryIndex) && Objects.equals(this.scope, metricsQueryMetadata.scope) && Objects.equals(this.start, metricsQueryMetadata.start) && Objects.equals(this.tagSet, metricsQueryMetadata.tagSet) && Objects.equals(this.unit, metricsQueryMetadata.unit); } + @Override public int hashCode() { - return Objects.hash( - aggr, - displayName, - end, - expression, - interval, - length, - metric, - pointlist, - queryIndex, - scope, - start, - tagSet, - unit); + return Objects.hash(aggr,displayName,end,expression,interval,length,metric,pointlist,queryIndex,scope,start,tagSet,unit); } @Override @@ -311,7 +305,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricsQueryResponse.java b/src/main/java/com/datadog/api/client/v1/model/MetricsQueryResponse.java index 5bbcd1c44d6..44c192741d5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricsQueryResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricsQueryResponse.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response Object that includes your query and the list of metrics retrieved. */ + +/** + *

Response Object that includes your query and the list of metrics retrieved.

+ */ @JsonPropertyOrder({ MetricsQueryResponse.JSON_PROPERTY_ERROR, MetricsQueryResponse.JSON_PROPERTY_FROM_DATE, @@ -25,10 +44,10 @@ MetricsQueryResponse.JSON_PROPERTY_STATUS, MetricsQueryResponse.JSON_PROPERTY_TO_DATE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsQueryResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR = "error"; private String error; @@ -56,115 +75,118 @@ public class MetricsQueryResponse { public static final String JSON_PROPERTY_TO_DATE = "to_date"; private Long toDate; + /** - * Message indicating the errors if status is not ok. - * + *

Message indicating the errors if status is not ok.

* @return error - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getError() { - return error; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } /** - * Start of requested time window, milliseconds since Unix epoch. - * + *

Start of requested time window, milliseconds since Unix epoch.

* @return fromDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFromDate() { - return fromDate; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFromDate() { + return fromDate; + } /** - * List of tag keys on which to group. - * + *

List of tag keys on which to group.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } /** - * Message indicating success if status is ok. - * + *

Message indicating success if status is ok.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } /** - * Query string - * + *

Query string

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } /** - * Type of response. - * + *

Type of response.

* @return resType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RES_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResType() { - return resType; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RES_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResType() { + return resType; + } /** - * List of timeseries queried. - * + *

List of timeseries queried.

* @return series - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSeries() { - return series; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSeries() { + return series; + } /** - * Status of the query. - * + *

Status of the query.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } /** - * End of requested time window, milliseconds since Unix epoch. - * + *

End of requested time window, milliseconds since Unix epoch.

* @return toDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getToDate() { - return toDate; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getToDate() { + return toDate; + } - /** Return true if this MetricsQueryResponse object is equal to o. */ + /** + * Return true if this MetricsQueryResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -174,20 +196,13 @@ public boolean equals(Object o) { return false; } MetricsQueryResponse metricsQueryResponse = (MetricsQueryResponse) o; - return Objects.equals(this.error, metricsQueryResponse.error) - && Objects.equals(this.fromDate, metricsQueryResponse.fromDate) - && Objects.equals(this.groupBy, metricsQueryResponse.groupBy) - && Objects.equals(this.message, metricsQueryResponse.message) - && Objects.equals(this.query, metricsQueryResponse.query) - && Objects.equals(this.resType, metricsQueryResponse.resType) - && Objects.equals(this.series, metricsQueryResponse.series) - && Objects.equals(this.status, metricsQueryResponse.status) - && Objects.equals(this.toDate, metricsQueryResponse.toDate); + return Objects.equals(this.error, metricsQueryResponse.error) && Objects.equals(this.fromDate, metricsQueryResponse.fromDate) && Objects.equals(this.groupBy, metricsQueryResponse.groupBy) && Objects.equals(this.message, metricsQueryResponse.message) && Objects.equals(this.query, metricsQueryResponse.query) && Objects.equals(this.resType, metricsQueryResponse.resType) && Objects.equals(this.series, metricsQueryResponse.series) && Objects.equals(this.status, metricsQueryResponse.status) && Objects.equals(this.toDate, metricsQueryResponse.toDate); } + @Override public int hashCode() { - return Objects.hash(error, fromDate, groupBy, message, query, resType, series, status, toDate); + return Objects.hash(error,fromDate,groupBy,message,query,resType,series,status,toDate); } @Override @@ -208,7 +223,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MetricsQueryUnit.java b/src/main/java/com/datadog/api/client/v1/model/MetricsQueryUnit.java index 17abde7a9da..f57a84b530e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MetricsQueryUnit.java +++ b/src/main/java/com/datadog/api/client/v1/model/MetricsQueryUnit.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing the metric unit family, scale factor, name, and short name. */ + +/** + *

Object containing the metric unit family, scale factor, name, and short name.

+ */ @JsonPropertyOrder({ MetricsQueryUnit.JSON_PROPERTY_FAMILY, MetricsQueryUnit.JSON_PROPERTY_NAME, @@ -20,10 +40,10 @@ MetricsQueryUnit.JSON_PROPERTY_SCALE_FACTOR, MetricsQueryUnit.JSON_PROPERTY_SHORT_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsQueryUnit { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FAMILY = "family"; private String family; @@ -39,67 +59,70 @@ public class MetricsQueryUnit { public static final String JSON_PROPERTY_SHORT_NAME = "short_name"; private String shortName; + /** - * Unit family, allows for conversion between units of the same family, for scaling. - * + *

Unit family, allows for conversion between units of the same family, for scaling.

* @return family - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFamily() { - return family; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAMILY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFamily() { + return family; + } /** - * Unit name - * + *

Unit name

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } /** - * Plural form of the unit name. - * + *

Plural form of the unit name.

* @return plural - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PLURAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPlural() { - return plural; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLURAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPlural() { + return plural; + } /** - * Factor for scaling between units of the same family. - * + *

Factor for scaling between units of the same family.

* @return scaleFactor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCALE_FACTOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getScaleFactor() { - return scaleFactor; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCALE_FACTOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getScaleFactor() { + return scaleFactor; + } /** - * Abbreviation of the unit. - * + *

Abbreviation of the unit.

* @return shortName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHORT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getShortName() { - return shortName; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHORT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getShortName() { + return shortName; + } - /** Return true if this MetricsQueryUnit object is equal to o. */ + /** + * Return true if this MetricsQueryUnit object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,16 +132,13 @@ public boolean equals(Object o) { return false; } MetricsQueryUnit metricsQueryUnit = (MetricsQueryUnit) o; - return Objects.equals(this.family, metricsQueryUnit.family) - && Objects.equals(this.name, metricsQueryUnit.name) - && Objects.equals(this.plural, metricsQueryUnit.plural) - && Objects.equals(this.scaleFactor, metricsQueryUnit.scaleFactor) - && Objects.equals(this.shortName, metricsQueryUnit.shortName); + return Objects.equals(this.family, metricsQueryUnit.family) && Objects.equals(this.name, metricsQueryUnit.name) && Objects.equals(this.plural, metricsQueryUnit.plural) && Objects.equals(this.scaleFactor, metricsQueryUnit.scaleFactor) && Objects.equals(this.shortName, metricsQueryUnit.shortName); } + @Override public int hashCode() { - return Objects.hash(family, name, plural, scaleFactor, shortName); + return Objects.hash(family,name,plural,scaleFactor,shortName); } @Override @@ -135,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Monitor.java b/src/main/java/com/datadog/api/client/v1/model/Monitor.java index 1f7fddc6ee0..a1846e2a6b4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Monitor.java +++ b/src/main/java/com/datadog/api/client/v1/model/Monitor.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing a monitor. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing a monitor.

+ */ @JsonPropertyOrder({ Monitor.JSON_PROPERTY_CREATED, Monitor.JSON_PROPERTY_CREATOR, @@ -38,12 +51,11 @@ Monitor.JSON_PROPERTY_TAGS, Monitor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Monitor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -51,7 +63,6 @@ public class Monitor { private Creator creator; public static final String JSON_PROPERTY_DELETED = "deleted"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable deleted = JsonNullable.undefined(); @@ -62,7 +73,6 @@ public class Monitor { private String message; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; @@ -100,141 +110,133 @@ public Monitor() {} @JsonCreator public Monitor( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MonitorType type) { - this.query = query; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MonitorType type) { + this.query = query; + this.type = type; + this.unparsed |= !type.isValid(); } /** - * Timestamp of the monitor creation. - * + *

Timestamp of the monitor creation.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } /** - * Whether or not the monitor is deleted. (Always null) - * + *

Whether or not the monitor is deleted. (Always null)

* @return deleted - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getDeleted() { - - if (deleted == null) { - deleted = JsonNullable.undefined(); - } - return deleted.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeleted() { + + if (deleted == null) { + deleted = JsonNullable.undefined(); + } + return deleted.orElse(null); + } @JsonProperty(JSON_PROPERTY_DELETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDeleted_JsonNullable() { return deleted; } - - @JsonProperty(JSON_PROPERTY_DELETED) - private void setDeleted_JsonNullable(JsonNullable deleted) { + @JsonProperty(JSON_PROPERTY_DELETED)private void setDeleted_JsonNullable(JsonNullable deleted) { this.deleted = deleted; } /** - * ID of this monitor. - * + *

ID of this monitor.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public Monitor message(String message) { this.message = message; return this; } /** - * A message to include with notifications for this monitor. - * + *

A message to include with notifications for this monitor.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } /** - * Last timestamp when the monitor was edited. - * + *

Last timestamp when the monitor was edited.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } /** - * Whether or not the monitor is broken down on different groups. - * + *

Whether or not the monitor is broken down on different groups.

* @return multi - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MULTI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMulti() { - return multi; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMulti() { + return multi; + } public Monitor name(String name) { this.name = name; return this; } /** - * The monitor name. - * + *

The monitor name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public Monitor options(MonitorOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -242,89 +244,81 @@ public Monitor options(MonitorOptions options) { } /** - * List of options associated with your monitor. - * + *

List of options associated with your monitor.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOptions getOptions() { + return options; + } public void setOptions(MonitorOptions options) { this.options = options; } /** - * The different states your monitor can be in. - * + *

The different states your monitor can be in.

* @return overallState - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERALL_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOverallStates getOverallState() { - return overallState; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOverallStates getOverallState() { + return overallState; + } public Monitor priority(Long priority) { this.priority = JsonNullable.of(priority); return this; } /** - * Integer from 1 (high) to 5 (low) indicating alert severity. minimum: 1 maximum: 5 - * + *

Integer from 1 (high) to 5 (low) indicating alert severity.

+ * minimum: 1 + * maximum: 5 * @return priority - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getPriority() { - return priority.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getPriority() { + return priority.orElse(null); + } @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPriority_JsonNullable() { return priority; } - - @JsonProperty(JSON_PROPERTY_PRIORITY) - public void setPriority_JsonNullable(JsonNullable priority) { + @JsonProperty(JSON_PROPERTY_PRIORITY)public void setPriority_JsonNullable(JsonNullable priority) { this.priority = priority; } - public void setPriority(Long priority) { this.priority = JsonNullable.of(priority); } - public Monitor query(String query) { this.query = query; return this; } /** - * The monitor query. - * + *

The monitor query.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public Monitor restrictedRoles(List restrictedRoles) { this.restrictedRoles = JsonNullable.>of(restrictedRoles); return this; } - public Monitor addRestrictedRolesItem(String restrictedRolesItem) { if (this.restrictedRoles == null || !this.restrictedRoles.isPresent()) { this.restrictedRoles = JsonNullable.>of(new ArrayList<>()); @@ -338,56 +332,42 @@ public Monitor addRestrictedRolesItem(String restrictedRolesItem) { } /** - * A list of unique role identifiers to define which roles are allowed to edit the monitor. The - * unique identifiers for all roles can be pulled from the Roles API and are located in - * the data.id field. Editing a monitor includes any updates to the monitor - * configuration, monitor deletion, and muting of the monitor for any amount of time. - * restricted_roles is the successor of locked. For more information about - * locked and restricted_roles, see the monitor - * options docs. - * + *

A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the Roles API and are located in the data.id field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. restricted_roles is the successor of locked. For more information about locked and restricted_roles, see the monitor options docs.

* @return restrictedRoles - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getRestrictedRoles() { - return restrictedRoles.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getRestrictedRoles() { + return restrictedRoles.orElse(null); + } @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getRestrictedRoles_JsonNullable() { return restrictedRoles; } - - @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - public void setRestrictedRoles_JsonNullable(JsonNullable> restrictedRoles) { + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES)public void setRestrictedRoles_JsonNullable(JsonNullable> restrictedRoles) { this.restrictedRoles = restrictedRoles; } - public void setRestrictedRoles(List restrictedRoles) { this.restrictedRoles = JsonNullable.>of(restrictedRoles); } /** - * Wrapper object with the different monitor states. - * + *

Wrapper object with the different monitor states.

* @return state - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorState getState() { - return state; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorState getState() { + return state; + } public Monitor tags(List tags) { this.tags = tags; return this; } - public Monitor addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -397,21 +377,19 @@ public Monitor addTagsItem(String tagsItem) { } /** - * Tags associated to your monitor. - * + *

Tags associated to your monitor.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public Monitor type(MonitorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -419,25 +397,25 @@ public Monitor type(MonitorType type) { } /** - * The type of the monitor. For more information about type, see the monitor options docs. - * + *

The type of the monitor. For more information about type, see the monitor options docs.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorType getType() { + return type; + } public void setType(MonitorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this Monitor object is equal to o. */ + /** + * Return true if this Monitor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -447,43 +425,13 @@ public boolean equals(Object o) { return false; } Monitor monitor = (Monitor) o; - return Objects.equals(this.created, monitor.created) - && Objects.equals(this.creator, monitor.creator) - && Objects.equals(this.deleted, monitor.deleted) - && Objects.equals(this.id, monitor.id) - && Objects.equals(this.message, monitor.message) - && Objects.equals(this.modified, monitor.modified) - && Objects.equals(this.multi, monitor.multi) - && Objects.equals(this.name, monitor.name) - && Objects.equals(this.options, monitor.options) - && Objects.equals(this.overallState, monitor.overallState) - && Objects.equals(this.priority, monitor.priority) - && Objects.equals(this.query, monitor.query) - && Objects.equals(this.restrictedRoles, monitor.restrictedRoles) - && Objects.equals(this.state, monitor.state) - && Objects.equals(this.tags, monitor.tags) - && Objects.equals(this.type, monitor.type); + return Objects.equals(this.created, monitor.created) && Objects.equals(this.creator, monitor.creator) && Objects.equals(this.deleted, monitor.deleted) && Objects.equals(this.id, monitor.id) && Objects.equals(this.message, monitor.message) && Objects.equals(this.modified, monitor.modified) && Objects.equals(this.multi, monitor.multi) && Objects.equals(this.name, monitor.name) && Objects.equals(this.options, monitor.options) && Objects.equals(this.overallState, monitor.overallState) && Objects.equals(this.priority, monitor.priority) && Objects.equals(this.query, monitor.query) && Objects.equals(this.restrictedRoles, monitor.restrictedRoles) && Objects.equals(this.state, monitor.state) && Objects.equals(this.tags, monitor.tags) && Objects.equals(this.type, monitor.type); } + @Override public int hashCode() { - return Objects.hash( - created, - creator, - deleted, - id, - message, - modified, - multi, - name, - options, - overallState, - priority, - query, - restrictedRoles, - state, - tags, - type); + return Objects.hash(created,creator,deleted,id,message,modified,multi,name,options,overallState,priority,query,restrictedRoles,state,tags,type); } @Override @@ -511,7 +459,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorDeviceID.java b/src/main/java/com/datadog/api/client/v1/model/MonitorDeviceID.java index e85fa0039f8..848ac22b810 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorDeviceID.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorDeviceID.java @@ -6,21 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * ID of the device the Synthetics monitor is running on. Same as SyntheticsDeviceID. + *

ID of the device the Synthetics monitor is running on. Same as SyntheticsDeviceID.

*/ @JsonSerialize(using = MonitorDeviceID.MonitorDeviceIDSerializer.class) public class MonitorDeviceID { @@ -28,29 +50,14 @@ public class MonitorDeviceID { public static final MonitorDeviceID LAPTOP_LARGE = new MonitorDeviceID("laptop_large"); public static final MonitorDeviceID TABLET = new MonitorDeviceID("tablet"); public static final MonitorDeviceID MOBILE_SMALL = new MonitorDeviceID("mobile_small"); - public static final MonitorDeviceID CHROME_LAPTOP_LARGE = - new MonitorDeviceID("chrome.laptop_large"); + public static final MonitorDeviceID CHROME_LAPTOP_LARGE = new MonitorDeviceID("chrome.laptop_large"); public static final MonitorDeviceID CHROME_TABLET = new MonitorDeviceID("chrome.tablet"); - public static final MonitorDeviceID CHROME_MOBILE_SMALL = - new MonitorDeviceID("chrome.mobile_small"); - public static final MonitorDeviceID FIREFOX_LAPTOP_LARGE = - new MonitorDeviceID("firefox.laptop_large"); + public static final MonitorDeviceID CHROME_MOBILE_SMALL = new MonitorDeviceID("chrome.mobile_small"); + public static final MonitorDeviceID FIREFOX_LAPTOP_LARGE = new MonitorDeviceID("firefox.laptop_large"); public static final MonitorDeviceID FIREFOX_TABLET = new MonitorDeviceID("firefox.tablet"); - public static final MonitorDeviceID FIREFOX_MOBILE_SMALL = - new MonitorDeviceID("firefox.mobile_small"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "laptop_large", - "tablet", - "mobile_small", - "chrome.laptop_large", - "chrome.tablet", - "chrome.mobile_small", - "firefox.laptop_large", - "firefox.tablet", - "firefox.mobile_small")); + public static final MonitorDeviceID FIREFOX_MOBILE_SMALL = new MonitorDeviceID("firefox.mobile_small"); + + private static final Set allowedValues = new HashSet(Arrays.asList("laptop_large", "tablet", "mobile_small", "chrome.laptop_large", "chrome.tablet", "chrome.mobile_small", "firefox.laptop_large", "firefox.tablet", "firefox.mobile_small")); private String value; @@ -63,19 +70,18 @@ public boolean isValid() { } public static class MonitorDeviceIDSerializer extends StdSerializer { - public MonitorDeviceIDSerializer(Class t) { - super(t); - } - - public MonitorDeviceIDSerializer() { - this(null); - } - - @Override - public void serialize(MonitorDeviceID value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MonitorDeviceIDSerializer(Class t) { + super(t); + } + + public MonitorDeviceIDSerializer() { + this(null); + } + + @Override + public void serialize(MonitorDeviceID value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -87,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorDeviceID object is equal to o. */ + /** + * Return true if this MonitorDeviceID object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventAggregation.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventAggregation.java index 54dbe5240ca..bd3911aedb6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventAggregation.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventAggregation.java @@ -6,66 +6,61 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Aggregation methods for event platform queries. */ -@JsonSerialize( - using = - MonitorFormulaAndFunctionEventAggregation - .MonitorFormulaAndFunctionEventAggregationSerializer.class) +/** + *

Aggregation methods for event platform queries.

+ */ +@JsonSerialize(using = MonitorFormulaAndFunctionEventAggregation.MonitorFormulaAndFunctionEventAggregationSerializer.class) public class MonitorFormulaAndFunctionEventAggregation { - public static final MonitorFormulaAndFunctionEventAggregation COUNT = - new MonitorFormulaAndFunctionEventAggregation("count"); - public static final MonitorFormulaAndFunctionEventAggregation CARDINALITY = - new MonitorFormulaAndFunctionEventAggregation("cardinality"); - public static final MonitorFormulaAndFunctionEventAggregation MEDIAN = - new MonitorFormulaAndFunctionEventAggregation("median"); - public static final MonitorFormulaAndFunctionEventAggregation PC75 = - new MonitorFormulaAndFunctionEventAggregation("pc75"); - public static final MonitorFormulaAndFunctionEventAggregation PC90 = - new MonitorFormulaAndFunctionEventAggregation("pc90"); - public static final MonitorFormulaAndFunctionEventAggregation PC95 = - new MonitorFormulaAndFunctionEventAggregation("pc95"); - public static final MonitorFormulaAndFunctionEventAggregation PC98 = - new MonitorFormulaAndFunctionEventAggregation("pc98"); - public static final MonitorFormulaAndFunctionEventAggregation PC99 = - new MonitorFormulaAndFunctionEventAggregation("pc99"); - public static final MonitorFormulaAndFunctionEventAggregation SUM = - new MonitorFormulaAndFunctionEventAggregation("sum"); - public static final MonitorFormulaAndFunctionEventAggregation MIN = - new MonitorFormulaAndFunctionEventAggregation("min"); - public static final MonitorFormulaAndFunctionEventAggregation MAX = - new MonitorFormulaAndFunctionEventAggregation("max"); - public static final MonitorFormulaAndFunctionEventAggregation AVG = - new MonitorFormulaAndFunctionEventAggregation("avg"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "median", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg")); + public static final MonitorFormulaAndFunctionEventAggregation COUNT = new MonitorFormulaAndFunctionEventAggregation("count"); + public static final MonitorFormulaAndFunctionEventAggregation CARDINALITY = new MonitorFormulaAndFunctionEventAggregation("cardinality"); + public static final MonitorFormulaAndFunctionEventAggregation MEDIAN = new MonitorFormulaAndFunctionEventAggregation("median"); + public static final MonitorFormulaAndFunctionEventAggregation PC75 = new MonitorFormulaAndFunctionEventAggregation("pc75"); + public static final MonitorFormulaAndFunctionEventAggregation PC90 = new MonitorFormulaAndFunctionEventAggregation("pc90"); + public static final MonitorFormulaAndFunctionEventAggregation PC95 = new MonitorFormulaAndFunctionEventAggregation("pc95"); + public static final MonitorFormulaAndFunctionEventAggregation PC98 = new MonitorFormulaAndFunctionEventAggregation("pc98"); + public static final MonitorFormulaAndFunctionEventAggregation PC99 = new MonitorFormulaAndFunctionEventAggregation("pc99"); + public static final MonitorFormulaAndFunctionEventAggregation SUM = new MonitorFormulaAndFunctionEventAggregation("sum"); + public static final MonitorFormulaAndFunctionEventAggregation MIN = new MonitorFormulaAndFunctionEventAggregation("min"); + public static final MonitorFormulaAndFunctionEventAggregation MAX = new MonitorFormulaAndFunctionEventAggregation("max"); + public static final MonitorFormulaAndFunctionEventAggregation AVG = new MonitorFormulaAndFunctionEventAggregation("avg"); + + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "median", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg")); private String value; @@ -77,25 +72,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorFormulaAndFunctionEventAggregationSerializer - extends StdSerializer { - public MonitorFormulaAndFunctionEventAggregationSerializer( - Class t) { - super(t); - } + public static class MonitorFormulaAndFunctionEventAggregationSerializer extends StdSerializer { + public MonitorFormulaAndFunctionEventAggregationSerializer(Class t) { + super(t); + } - public MonitorFormulaAndFunctionEventAggregationSerializer() { - this(null); - } + public MonitorFormulaAndFunctionEventAggregationSerializer() { + this(null); + } - @Override - public void serialize( - MonitorFormulaAndFunctionEventAggregation value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorFormulaAndFunctionEventAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -107,7 +96,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorFormulaAndFunctionEventAggregation object is equal to o. */ + /** + * Return true if this MonitorFormulaAndFunctionEventAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -121,7 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinition.java index 074436a5355..cb0f2710e9f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A formula and functions events query. */ +/** + *

A formula and functions events query.

+ */ @JsonPropertyOrder({ MonitorFormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_COMPUTE, MonitorFormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_DATA_SOURCE, @@ -24,10 +41,10 @@ MonitorFormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_NAME, MonitorFormulaAndFunctionEventQueryDefinition.JSON_PROPERTY_SEARCH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorFormulaAndFunctionEventQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private MonitorFormulaAndFunctionEventQueryDefinitionCompute compute; @@ -50,76 +67,64 @@ public MonitorFormulaAndFunctionEventQueryDefinition() {} @JsonCreator public MonitorFormulaAndFunctionEventQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) - MonitorFormulaAndFunctionEventQueryDefinitionCompute compute, - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - MonitorFormulaAndFunctionEventsDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.compute = compute; - this.unparsed |= compute.unparsed; - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_COMPUTE)MonitorFormulaAndFunctionEventQueryDefinitionCompute compute, + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)MonitorFormulaAndFunctionEventsDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.compute = compute; + this.unparsed |= compute.unparsed; + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.name = name; } - - public MonitorFormulaAndFunctionEventQueryDefinition compute( - MonitorFormulaAndFunctionEventQueryDefinitionCompute compute) { + public MonitorFormulaAndFunctionEventQueryDefinition compute(MonitorFormulaAndFunctionEventQueryDefinitionCompute compute) { this.compute = compute; this.unparsed |= compute.unparsed; return this; } /** - * Compute options. - * + *

Compute options.

* @return compute - */ - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorFormulaAndFunctionEventQueryDefinitionCompute getCompute() { - return compute; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorFormulaAndFunctionEventQueryDefinitionCompute getCompute() { + return compute; + } public void setCompute(MonitorFormulaAndFunctionEventQueryDefinitionCompute compute) { this.compute = compute; } - - public MonitorFormulaAndFunctionEventQueryDefinition dataSource( - MonitorFormulaAndFunctionEventsDataSource dataSource) { + public MonitorFormulaAndFunctionEventQueryDefinition dataSource(MonitorFormulaAndFunctionEventsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); return this; } /** - * Data source for event platform-based queries. - * + *

Data source for event platform-based queries.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorFormulaAndFunctionEventsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorFormulaAndFunctionEventsDataSource getDataSource() { + return dataSource; + } public void setDataSource(MonitorFormulaAndFunctionEventsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - - public MonitorFormulaAndFunctionEventQueryDefinition groupBy( - List groupBy) { + public MonitorFormulaAndFunctionEventQueryDefinition groupBy(List groupBy) { this.groupBy = groupBy; for (MonitorFormulaAndFunctionEventQueryGroupBy item : groupBy) { this.unparsed |= item.unparsed; } return this; } - - public MonitorFormulaAndFunctionEventQueryDefinition addGroupByItem( - MonitorFormulaAndFunctionEventQueryGroupBy groupByItem) { + public MonitorFormulaAndFunctionEventQueryDefinition addGroupByItem(MonitorFormulaAndFunctionEventQueryGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); } @@ -129,26 +134,23 @@ public MonitorFormulaAndFunctionEventQueryDefinition addGroupByItem( } /** - * Group by options. - * + *

Group by options.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public MonitorFormulaAndFunctionEventQueryDefinition indexes(List indexes) { this.indexes = indexes; return this; } - public MonitorFormulaAndFunctionEventQueryDefinition addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -158,66 +160,61 @@ public MonitorFormulaAndFunctionEventQueryDefinition addIndexesItem(String index } /** - * An array of index names to query in the stream. Omit or use [] to query all - * indexes at once. - * + *

An array of index names to query in the stream. Omit or use [] to query all indexes at once.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public MonitorFormulaAndFunctionEventQueryDefinition name(String name) { this.name = name; return this; } /** - * Name of the query for use in formulas. - * + *

Name of the query for use in formulas.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public MonitorFormulaAndFunctionEventQueryDefinition search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch search) { + public MonitorFormulaAndFunctionEventQueryDefinition search(MonitorFormulaAndFunctionEventQueryDefinitionSearch search) { this.search = search; this.unparsed |= search.unparsed; return this; } /** - * Search options. - * + *

Search options.

* @return search - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEARCH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorFormulaAndFunctionEventQueryDefinitionSearch getSearch() { - return search; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorFormulaAndFunctionEventQueryDefinitionSearch getSearch() { + return search; + } public void setSearch(MonitorFormulaAndFunctionEventQueryDefinitionSearch search) { this.search = search; } - /** Return true if this MonitorFormulaAndFunctionEventQueryDefinition object is equal to o. */ + /** + * Return true if this MonitorFormulaAndFunctionEventQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -226,19 +223,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorFormulaAndFunctionEventQueryDefinition monitorFormulaAndFunctionEventQueryDefinition = - (MonitorFormulaAndFunctionEventQueryDefinition) o; - return Objects.equals(this.compute, monitorFormulaAndFunctionEventQueryDefinition.compute) - && Objects.equals(this.dataSource, monitorFormulaAndFunctionEventQueryDefinition.dataSource) - && Objects.equals(this.groupBy, monitorFormulaAndFunctionEventQueryDefinition.groupBy) - && Objects.equals(this.indexes, monitorFormulaAndFunctionEventQueryDefinition.indexes) - && Objects.equals(this.name, monitorFormulaAndFunctionEventQueryDefinition.name) - && Objects.equals(this.search, monitorFormulaAndFunctionEventQueryDefinition.search); + MonitorFormulaAndFunctionEventQueryDefinition monitorFormulaAndFunctionEventQueryDefinition = (MonitorFormulaAndFunctionEventQueryDefinition) o; + return Objects.equals(this.compute, monitorFormulaAndFunctionEventQueryDefinition.compute) && Objects.equals(this.dataSource, monitorFormulaAndFunctionEventQueryDefinition.dataSource) && Objects.equals(this.groupBy, monitorFormulaAndFunctionEventQueryDefinition.groupBy) && Objects.equals(this.indexes, monitorFormulaAndFunctionEventQueryDefinition.indexes) && Objects.equals(this.name, monitorFormulaAndFunctionEventQueryDefinition.name) && Objects.equals(this.search, monitorFormulaAndFunctionEventQueryDefinition.search); } + @Override public int hashCode() { - return Objects.hash(compute, dataSource, groupBy, indexes, name, search); + return Objects.hash(compute,dataSource,groupBy,indexes,name,search); } @Override @@ -256,7 +248,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionCompute.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionCompute.java index 5fd3d3104a6..4505b2d8237 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionCompute.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionCompute.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Compute options. */ + +/** + *

Compute options.

+ */ @JsonPropertyOrder({ MonitorFormulaAndFunctionEventQueryDefinitionCompute.JSON_PROPERTY_AGGREGATION, MonitorFormulaAndFunctionEventQueryDefinitionCompute.JSON_PROPERTY_INTERVAL, MonitorFormulaAndFunctionEventQueryDefinitionCompute.JSON_PROPERTY_METRIC }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorFormulaAndFunctionEventQueryDefinitionCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private MonitorFormulaAndFunctionEventAggregation aggregation; @@ -36,75 +55,67 @@ public MonitorFormulaAndFunctionEventQueryDefinitionCompute() {} @JsonCreator public MonitorFormulaAndFunctionEventQueryDefinitionCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - MonitorFormulaAndFunctionEventAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)MonitorFormulaAndFunctionEventAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - - public MonitorFormulaAndFunctionEventQueryDefinitionCompute aggregation( - MonitorFormulaAndFunctionEventAggregation aggregation) { + public MonitorFormulaAndFunctionEventQueryDefinitionCompute aggregation(MonitorFormulaAndFunctionEventAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * Aggregation methods for event platform queries. - * + *

Aggregation methods for event platform queries.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorFormulaAndFunctionEventAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorFormulaAndFunctionEventAggregation getAggregation() { + return aggregation; + } public void setAggregation(MonitorFormulaAndFunctionEventAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public MonitorFormulaAndFunctionEventQueryDefinitionCompute interval(Long interval) { this.interval = interval; return this; } /** - * A time interval in milliseconds. - * + *

A time interval in milliseconds.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - public MonitorFormulaAndFunctionEventQueryDefinitionCompute metric(String metric) { this.metric = metric; return this; } /** - * Measurable attribute to compute. - * + *

Measurable attribute to compute.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } @@ -120,19 +131,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorFormulaAndFunctionEventQueryDefinitionCompute - monitorFormulaAndFunctionEventQueryDefinitionCompute = - (MonitorFormulaAndFunctionEventQueryDefinitionCompute) o; - return Objects.equals( - this.aggregation, monitorFormulaAndFunctionEventQueryDefinitionCompute.aggregation) - && Objects.equals( - this.interval, monitorFormulaAndFunctionEventQueryDefinitionCompute.interval) - && Objects.equals(this.metric, monitorFormulaAndFunctionEventQueryDefinitionCompute.metric); + MonitorFormulaAndFunctionEventQueryDefinitionCompute monitorFormulaAndFunctionEventQueryDefinitionCompute = (MonitorFormulaAndFunctionEventQueryDefinitionCompute) o; + return Objects.equals(this.aggregation, monitorFormulaAndFunctionEventQueryDefinitionCompute.aggregation) && Objects.equals(this.interval, monitorFormulaAndFunctionEventQueryDefinitionCompute.interval) && Objects.equals(this.metric, monitorFormulaAndFunctionEventQueryDefinitionCompute.metric); } + @Override public int hashCode() { - return Objects.hash(aggregation, interval, metric); + return Objects.hash(aggregation,interval,metric); } @Override @@ -147,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionSearch.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionSearch.java index 5d0cd6c652d..be0e41e5baa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionSearch.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryDefinitionSearch.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Search options. */ -@JsonPropertyOrder({MonitorFormulaAndFunctionEventQueryDefinitionSearch.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Search options.

+ */ +@JsonPropertyOrder({ + MonitorFormulaAndFunctionEventQueryDefinitionSearch.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorFormulaAndFunctionEventQueryDefinitionSearch { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -26,26 +47,24 @@ public MonitorFormulaAndFunctionEventQueryDefinitionSearch() {} @JsonCreator public MonitorFormulaAndFunctionEventQueryDefinitionSearch( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.query = query; } - public MonitorFormulaAndFunctionEventQueryDefinitionSearch query(String query) { this.query = query; return this; } /** - * Events search string. - * + *

Events search string.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } @@ -61,12 +80,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorFormulaAndFunctionEventQueryDefinitionSearch - monitorFormulaAndFunctionEventQueryDefinitionSearch = - (MonitorFormulaAndFunctionEventQueryDefinitionSearch) o; + MonitorFormulaAndFunctionEventQueryDefinitionSearch monitorFormulaAndFunctionEventQueryDefinitionSearch = (MonitorFormulaAndFunctionEventQueryDefinitionSearch) o; return Objects.equals(this.query, monitorFormulaAndFunctionEventQueryDefinitionSearch.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -82,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBy.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBy.java index a71ee263ffb..204bbf5a966 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBy.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of objects used to group by. */ + +/** + *

List of objects used to group by.

+ */ @JsonPropertyOrder({ MonitorFormulaAndFunctionEventQueryGroupBy.JSON_PROPERTY_FACET, MonitorFormulaAndFunctionEventQueryGroupBy.JSON_PROPERTY_LIMIT, MonitorFormulaAndFunctionEventQueryGroupBy.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorFormulaAndFunctionEventQueryGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -36,75 +55,70 @@ public MonitorFormulaAndFunctionEventQueryGroupBy() {} @JsonCreator public MonitorFormulaAndFunctionEventQueryGroupBy( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public MonitorFormulaAndFunctionEventQueryGroupBy facet(String facet) { this.facet = facet; return this; } /** - * Event facet. - * + *

Event facet.

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public MonitorFormulaAndFunctionEventQueryGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * Number of groups to return. - * + *

Number of groups to return.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - - public MonitorFormulaAndFunctionEventQueryGroupBy sort( - MonitorFormulaAndFunctionEventQueryGroupBySort sort) { + public MonitorFormulaAndFunctionEventQueryGroupBy sort(MonitorFormulaAndFunctionEventQueryGroupBySort sort) { this.sort = sort; this.unparsed |= sort.unparsed; return this; } /** - * Options for sorting group by results. - * + *

Options for sorting group by results.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorFormulaAndFunctionEventQueryGroupBySort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorFormulaAndFunctionEventQueryGroupBySort getSort() { + return sort; + } public void setSort(MonitorFormulaAndFunctionEventQueryGroupBySort sort) { this.sort = sort; } - /** Return true if this MonitorFormulaAndFunctionEventQueryGroupBy object is equal to o. */ + /** + * Return true if this MonitorFormulaAndFunctionEventQueryGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,16 +127,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorFormulaAndFunctionEventQueryGroupBy monitorFormulaAndFunctionEventQueryGroupBy = - (MonitorFormulaAndFunctionEventQueryGroupBy) o; - return Objects.equals(this.facet, monitorFormulaAndFunctionEventQueryGroupBy.facet) - && Objects.equals(this.limit, monitorFormulaAndFunctionEventQueryGroupBy.limit) - && Objects.equals(this.sort, monitorFormulaAndFunctionEventQueryGroupBy.sort); + MonitorFormulaAndFunctionEventQueryGroupBy monitorFormulaAndFunctionEventQueryGroupBy = (MonitorFormulaAndFunctionEventQueryGroupBy) o; + return Objects.equals(this.facet, monitorFormulaAndFunctionEventQueryGroupBy.facet) && Objects.equals(this.limit, monitorFormulaAndFunctionEventQueryGroupBy.limit) && Objects.equals(this.sort, monitorFormulaAndFunctionEventQueryGroupBy.sort); } + @Override public int hashCode() { - return Objects.hash(facet, limit, sort); + return Objects.hash(facet,limit,sort); } @Override @@ -137,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBySort.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBySort.java index c1bcc7fb19e..10f472d09e6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBySort.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventQueryGroupBySort.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Options for sorting group by results. */ + +/** + *

Options for sorting group by results.

+ */ @JsonPropertyOrder({ MonitorFormulaAndFunctionEventQueryGroupBySort.JSON_PROPERTY_AGGREGATION, MonitorFormulaAndFunctionEventQueryGroupBySort.JSON_PROPERTY_METRIC, MonitorFormulaAndFunctionEventQueryGroupBySort.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorFormulaAndFunctionEventQueryGroupBySort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private MonitorFormulaAndFunctionEventAggregation aggregation; @@ -36,58 +55,51 @@ public MonitorFormulaAndFunctionEventQueryGroupBySort() {} @JsonCreator public MonitorFormulaAndFunctionEventQueryGroupBySort( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - MonitorFormulaAndFunctionEventAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)MonitorFormulaAndFunctionEventAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - - public MonitorFormulaAndFunctionEventQueryGroupBySort aggregation( - MonitorFormulaAndFunctionEventAggregation aggregation) { + public MonitorFormulaAndFunctionEventQueryGroupBySort aggregation(MonitorFormulaAndFunctionEventAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * Aggregation methods for event platform queries. - * + *

Aggregation methods for event platform queries.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorFormulaAndFunctionEventAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorFormulaAndFunctionEventAggregation getAggregation() { + return aggregation; + } public void setAggregation(MonitorFormulaAndFunctionEventAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public MonitorFormulaAndFunctionEventQueryGroupBySort metric(String metric) { this.metric = metric; return this; } /** - * Metric used for sorting group by results. - * + *

Metric used for sorting group by results.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public MonitorFormulaAndFunctionEventQueryGroupBySort order(QuerySortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -95,25 +107,26 @@ public MonitorFormulaAndFunctionEventQueryGroupBySort order(QuerySortOrder order } /** - * Direction of sort. - * + *

Direction of sort.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public QuerySortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public QuerySortOrder getOrder() { + return order; + } public void setOrder(QuerySortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this MonitorFormulaAndFunctionEventQueryGroupBySort object is equal to o. */ + /** + * Return true if this MonitorFormulaAndFunctionEventQueryGroupBySort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,17 +135,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorFormulaAndFunctionEventQueryGroupBySort monitorFormulaAndFunctionEventQueryGroupBySort = - (MonitorFormulaAndFunctionEventQueryGroupBySort) o; - return Objects.equals( - this.aggregation, monitorFormulaAndFunctionEventQueryGroupBySort.aggregation) - && Objects.equals(this.metric, monitorFormulaAndFunctionEventQueryGroupBySort.metric) - && Objects.equals(this.order, monitorFormulaAndFunctionEventQueryGroupBySort.order); + MonitorFormulaAndFunctionEventQueryGroupBySort monitorFormulaAndFunctionEventQueryGroupBySort = (MonitorFormulaAndFunctionEventQueryGroupBySort) o; + return Objects.equals(this.aggregation, monitorFormulaAndFunctionEventQueryGroupBySort.aggregation) && Objects.equals(this.metric, monitorFormulaAndFunctionEventQueryGroupBySort.metric) && Objects.equals(this.order, monitorFormulaAndFunctionEventQueryGroupBySort.order); } + @Override public int hashCode() { - return Objects.hash(aggregation, metric, order); + return Objects.hash(aggregation,metric,order); } @Override @@ -147,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventsDataSource.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventsDataSource.java index 050f7878b87..5a33a51038b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventsDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionEventsDataSource.java @@ -6,44 +6,56 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Data source for event platform-based queries. */ -@JsonSerialize( - using = - MonitorFormulaAndFunctionEventsDataSource - .MonitorFormulaAndFunctionEventsDataSourceSerializer.class) +/** + *

Data source for event platform-based queries.

+ */ +@JsonSerialize(using = MonitorFormulaAndFunctionEventsDataSource.MonitorFormulaAndFunctionEventsDataSourceSerializer.class) public class MonitorFormulaAndFunctionEventsDataSource { - public static final MonitorFormulaAndFunctionEventsDataSource RUM = - new MonitorFormulaAndFunctionEventsDataSource("rum"); - public static final MonitorFormulaAndFunctionEventsDataSource CI_PIPELINES = - new MonitorFormulaAndFunctionEventsDataSource("ci_pipelines"); - public static final MonitorFormulaAndFunctionEventsDataSource CI_TESTS = - new MonitorFormulaAndFunctionEventsDataSource("ci_tests"); - public static final MonitorFormulaAndFunctionEventsDataSource AUDIT = - new MonitorFormulaAndFunctionEventsDataSource("audit"); - public static final MonitorFormulaAndFunctionEventsDataSource EVENTS = - new MonitorFormulaAndFunctionEventsDataSource("events"); - public static final MonitorFormulaAndFunctionEventsDataSource LOGS = - new MonitorFormulaAndFunctionEventsDataSource("logs"); - public static final MonitorFormulaAndFunctionEventsDataSource SPANS = - new MonitorFormulaAndFunctionEventsDataSource("spans"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList("rum", "ci_pipelines", "ci_tests", "audit", "events", "logs", "spans")); + public static final MonitorFormulaAndFunctionEventsDataSource RUM = new MonitorFormulaAndFunctionEventsDataSource("rum"); + public static final MonitorFormulaAndFunctionEventsDataSource CI_PIPELINES = new MonitorFormulaAndFunctionEventsDataSource("ci_pipelines"); + public static final MonitorFormulaAndFunctionEventsDataSource CI_TESTS = new MonitorFormulaAndFunctionEventsDataSource("ci_tests"); + public static final MonitorFormulaAndFunctionEventsDataSource AUDIT = new MonitorFormulaAndFunctionEventsDataSource("audit"); + public static final MonitorFormulaAndFunctionEventsDataSource EVENTS = new MonitorFormulaAndFunctionEventsDataSource("events"); + public static final MonitorFormulaAndFunctionEventsDataSource LOGS = new MonitorFormulaAndFunctionEventsDataSource("logs"); + public static final MonitorFormulaAndFunctionEventsDataSource SPANS = new MonitorFormulaAndFunctionEventsDataSource("spans"); + + private static final Set allowedValues = new HashSet(Arrays.asList("rum", "ci_pipelines", "ci_tests", "audit", "events", "logs", "spans")); private String value; @@ -55,25 +67,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorFormulaAndFunctionEventsDataSourceSerializer - extends StdSerializer { - public MonitorFormulaAndFunctionEventsDataSourceSerializer( - Class t) { - super(t); - } + public static class MonitorFormulaAndFunctionEventsDataSourceSerializer extends StdSerializer { + public MonitorFormulaAndFunctionEventsDataSourceSerializer(Class t) { + super(t); + } - public MonitorFormulaAndFunctionEventsDataSourceSerializer() { - this(null); - } + public MonitorFormulaAndFunctionEventsDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - MonitorFormulaAndFunctionEventsDataSource value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorFormulaAndFunctionEventsDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -85,7 +91,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorFormulaAndFunctionEventsDataSource object is equal to o. */ + /** + * Return true if this MonitorFormulaAndFunctionEventsDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,7 +107,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionQueryDefinition.java index f9593320b43..73fcc1d3899 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorFormulaAndFunctionQueryDefinition.java @@ -6,235 +6,211 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - MonitorFormulaAndFunctionQueryDefinition - .MonitorFormulaAndFunctionQueryDefinitionDeserializer.class) -@JsonSerialize( - using = - MonitorFormulaAndFunctionQueryDefinition.MonitorFormulaAndFunctionQueryDefinitionSerializer - .class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = MonitorFormulaAndFunctionQueryDefinition.MonitorFormulaAndFunctionQueryDefinitionDeserializer.class) +@JsonSerialize(using = MonitorFormulaAndFunctionQueryDefinition.MonitorFormulaAndFunctionQueryDefinitionSerializer.class) public class MonitorFormulaAndFunctionQueryDefinition extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(MonitorFormulaAndFunctionQueryDefinition.class.getName()); + private static final Logger log = Logger.getLogger(MonitorFormulaAndFunctionQueryDefinition.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class MonitorFormulaAndFunctionQueryDefinitionSerializer - extends StdSerializer { - public MonitorFormulaAndFunctionQueryDefinitionSerializer( - Class t) { - super(t); + public static class MonitorFormulaAndFunctionQueryDefinitionSerializer extends StdSerializer { + public MonitorFormulaAndFunctionQueryDefinitionSerializer(Class t) { + super(t); + } + + public MonitorFormulaAndFunctionQueryDefinitionSerializer() { + this(null); + } + + @Override + public void serialize(MonitorFormulaAndFunctionQueryDefinition value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public MonitorFormulaAndFunctionQueryDefinitionSerializer() { - this(null); + public static class MonitorFormulaAndFunctionQueryDefinitionDeserializer extends StdDeserializer { + public MonitorFormulaAndFunctionQueryDefinitionDeserializer() { + this(MonitorFormulaAndFunctionQueryDefinition.class); + } + + public MonitorFormulaAndFunctionQueryDefinitionDeserializer(Class vc) { + super(vc); + } + + @Override + public MonitorFormulaAndFunctionQueryDefinition 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 MonitorFormulaAndFunctionEventQueryDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Long.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Float.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Double.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Float.class) || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MonitorFormulaAndFunctionEventQueryDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MonitorFormulaAndFunctionEventQueryDefinition.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 (!((MonitorFormulaAndFunctionEventQueryDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MonitorFormulaAndFunctionEventQueryDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MonitorFormulaAndFunctionEventQueryDefinition'", e); + } + + MonitorFormulaAndFunctionQueryDefinition ret = new MonitorFormulaAndFunctionQueryDefinition(); + 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 MonitorFormulaAndFunctionQueryDefinition getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "MonitorFormulaAndFunctionQueryDefinition cannot be null"); + } } - @Override - public void serialize( - MonitorFormulaAndFunctionQueryDefinition value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public MonitorFormulaAndFunctionQueryDefinition() { + super("oneOf", Boolean.FALSE); + } + public MonitorFormulaAndFunctionQueryDefinition(MonitorFormulaAndFunctionEventQueryDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class MonitorFormulaAndFunctionQueryDefinitionDeserializer - extends StdDeserializer { - public MonitorFormulaAndFunctionQueryDefinitionDeserializer() { - this(MonitorFormulaAndFunctionQueryDefinition.class); + static { + schemas.put("MonitorFormulaAndFunctionEventQueryDefinition", new GenericType() { + }); + JSON.registerDescendants(MonitorFormulaAndFunctionQueryDefinition.class, Collections.unmodifiableMap(schemas)); } - public MonitorFormulaAndFunctionQueryDefinitionDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return MonitorFormulaAndFunctionQueryDefinition.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MonitorFormulaAndFunctionEventQueryDefinition + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public MonitorFormulaAndFunctionQueryDefinition 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 MonitorFormulaAndFunctionEventQueryDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Long.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Float.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Double.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Integer.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Float.class) - || MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MonitorFormulaAndFunctionEventQueryDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MonitorFormulaAndFunctionEventQueryDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MonitorFormulaAndFunctionEventQueryDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(MonitorFormulaAndFunctionEventQueryDefinition.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 (!((MonitorFormulaAndFunctionEventQueryDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, - "Input data matches schema 'MonitorFormulaAndFunctionEventQueryDefinition'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'MonitorFormulaAndFunctionEventQueryDefinition'", - e); - } - - MonitorFormulaAndFunctionQueryDefinition ret = new MonitorFormulaAndFunctionQueryDefinition(); - 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; + throw new RuntimeException("Invalid instance type. Must be MonitorFormulaAndFunctionEventQueryDefinition"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * MonitorFormulaAndFunctionEventQueryDefinition + * + * @return The actual instance (MonitorFormulaAndFunctionEventQueryDefinition) + */ @Override - public MonitorFormulaAndFunctionQueryDefinition getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "MonitorFormulaAndFunctionQueryDefinition cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public MonitorFormulaAndFunctionQueryDefinition() { - super("oneOf", Boolean.FALSE); - } - - public MonitorFormulaAndFunctionQueryDefinition(MonitorFormulaAndFunctionEventQueryDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "MonitorFormulaAndFunctionEventQueryDefinition", - new GenericType() {}); - JSON.registerDescendants( - MonitorFormulaAndFunctionQueryDefinition.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return MonitorFormulaAndFunctionQueryDefinition.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MonitorFormulaAndFunctionEventQueryDefinition - * - *

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( - MonitorFormulaAndFunctionEventQueryDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MonitorFormulaAndFunctionEventQueryDefinition`. If the actual instance is not `MonitorFormulaAndFunctionEventQueryDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MonitorFormulaAndFunctionEventQueryDefinition` + * @throws ClassCastException if the instance is not `MonitorFormulaAndFunctionEventQueryDefinition` + */ + public MonitorFormulaAndFunctionEventQueryDefinition getMonitorFormulaAndFunctionEventQueryDefinition() throws ClassCastException { + return (MonitorFormulaAndFunctionEventQueryDefinition)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be MonitorFormulaAndFunctionEventQueryDefinition"); - } - - /** - * Get the actual instance, which can be the following: - * MonitorFormulaAndFunctionEventQueryDefinition - * - * @return The actual instance (MonitorFormulaAndFunctionEventQueryDefinition) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MonitorFormulaAndFunctionEventQueryDefinition`. If the actual - * instance is not `MonitorFormulaAndFunctionEventQueryDefinition`, the ClassCastException will be - * thrown. - * - * @return The actual instance of `MonitorFormulaAndFunctionEventQueryDefinition` - * @throws ClassCastException if the instance is not - * `MonitorFormulaAndFunctionEventQueryDefinition` - */ - public MonitorFormulaAndFunctionEventQueryDefinition - getMonitorFormulaAndFunctionEventQueryDefinition() throws ClassCastException { - return (MonitorFormulaAndFunctionEventQueryDefinition) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponse.java b/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponse.java index ca726934335..abe344b6d99 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponse.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The response of a monitor group search. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The response of a monitor group search.

+ */ @JsonPropertyOrder({ MonitorGroupSearchResponse.JSON_PROPERTY_COUNTS, MonitorGroupSearchResponse.JSON_PROPERTY_GROUPS, MonitorGroupSearchResponse.JSON_PROPERTY_METADATA }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorGroupSearchResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNTS = "counts"; private MonitorGroupSearchResponseCounts counts; @@ -32,30 +51,30 @@ public class MonitorGroupSearchResponse { public static final String JSON_PROPERTY_METADATA = "metadata"; private MonitorSearchResponseMetadata metadata; + /** - * The counts of monitor groups per different criteria. - * + *

The counts of monitor groups per different criteria.

* @return counts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorGroupSearchResponseCounts getCounts() { - return counts; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorGroupSearchResponseCounts getCounts() { + return counts; + } /** - * The list of found monitor groups. - * + *

The list of found monitor groups.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } public MonitorGroupSearchResponse metadata(MonitorSearchResponseMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -63,22 +82,23 @@ public MonitorGroupSearchResponse metadata(MonitorSearchResponseMetadata metadat } /** - * Metadata about the response. - * + *

Metadata about the response.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorSearchResponseMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorSearchResponseMetadata getMetadata() { + return metadata; + } public void setMetadata(MonitorSearchResponseMetadata metadata) { this.metadata = metadata; } - /** Return true if this MonitorGroupSearchResponse object is equal to o. */ + /** + * Return true if this MonitorGroupSearchResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,14 +108,13 @@ public boolean equals(Object o) { return false; } MonitorGroupSearchResponse monitorGroupSearchResponse = (MonitorGroupSearchResponse) o; - return Objects.equals(this.counts, monitorGroupSearchResponse.counts) - && Objects.equals(this.groups, monitorGroupSearchResponse.groups) - && Objects.equals(this.metadata, monitorGroupSearchResponse.metadata); + return Objects.equals(this.counts, monitorGroupSearchResponse.counts) && Objects.equals(this.groups, monitorGroupSearchResponse.groups) && Objects.equals(this.metadata, monitorGroupSearchResponse.metadata); } + @Override public int hashCode() { - return Objects.hash(counts, groups, metadata); + return Objects.hash(counts,groups,metadata); } @Override @@ -110,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponseCounts.java b/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponseCounts.java index a299af3be5a..e9c685ac662 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponseCounts.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResponseCounts.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The counts of monitor groups per different criteria. */ +/** + *

The counts of monitor groups per different criteria.

+ */ @JsonPropertyOrder({ MonitorGroupSearchResponseCounts.JSON_PROPERTY_STATUS, MonitorGroupSearchResponseCounts.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorGroupSearchResponseCounts { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_STATUS = "status"; private List status = null; @@ -36,7 +54,6 @@ public MonitorGroupSearchResponseCounts status(List stat } return this; } - public MonitorGroupSearchResponseCounts addStatusItem(MonitorSearchCountItem statusItem) { if (this.status == null) { this.status = new ArrayList<>(); @@ -47,21 +64,19 @@ public MonitorGroupSearchResponseCounts addStatusItem(MonitorSearchCountItem sta } /** - * Search facets. - * + *

Search facets.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getStatus() { + return status; + } public void setStatus(List status) { this.status = status; } - public MonitorGroupSearchResponseCounts type(List type) { this.type = type; for (MonitorSearchCountItem item : type) { @@ -69,7 +84,6 @@ public MonitorGroupSearchResponseCounts type(List type) } return this; } - public MonitorGroupSearchResponseCounts addTypeItem(MonitorSearchCountItem typeItem) { if (this.type == null) { this.type = new ArrayList<>(); @@ -80,22 +94,23 @@ public MonitorGroupSearchResponseCounts addTypeItem(MonitorSearchCountItem typeI } /** - * Search facets. - * + *

Search facets.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getType() { + return type; + } public void setType(List type) { this.type = type; } - /** Return true if this MonitorGroupSearchResponseCounts object is equal to o. */ + /** + * Return true if this MonitorGroupSearchResponseCounts object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,15 +119,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorGroupSearchResponseCounts monitorGroupSearchResponseCounts = - (MonitorGroupSearchResponseCounts) o; - return Objects.equals(this.status, monitorGroupSearchResponseCounts.status) - && Objects.equals(this.type, monitorGroupSearchResponseCounts.type); + MonitorGroupSearchResponseCounts monitorGroupSearchResponseCounts = (MonitorGroupSearchResponseCounts) o; + return Objects.equals(this.status, monitorGroupSearchResponseCounts.status) && Objects.equals(this.type, monitorGroupSearchResponseCounts.type); } + @Override public int hashCode() { - return Objects.hash(status, type); + return Objects.hash(status,type); } @Override @@ -126,7 +140,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResult.java b/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResult.java index 10815a26c52..de5219f2327 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResult.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorGroupSearchResult.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** A single monitor group search result. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A single monitor group search result.

+ */ @JsonPropertyOrder({ MonitorGroupSearchResult.JSON_PROPERTY_GROUP, MonitorGroupSearchResult.JSON_PROPERTY_GROUP_TAGS, @@ -24,10 +42,10 @@ MonitorGroupSearchResult.JSON_PROPERTY_MONITOR_NAME, MonitorGroupSearchResult.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorGroupSearchResult { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROUP = "group"; private String group; @@ -49,105 +67,105 @@ public class MonitorGroupSearchResult { public static final String JSON_PROPERTY_STATUS = "status"; private MonitorOverallStates status; + /** - * The name of the group. - * + *

The name of the group.

* @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } /** - * The list of tags of the monitor group. - * + *

The list of tags of the monitor group.

* @return groupTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupTags() { - return groupTags; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupTags() { + return groupTags; + } /** - * Latest timestamp the monitor group was in NO_DATA state. - * + *

Latest timestamp the monitor group was in NO_DATA state.

* @return lastNodataTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_NODATA_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastNodataTs() { - return lastNodataTs; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_NODATA_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastNodataTs() { + return lastNodataTs; + } /** - * Latest timestamp the monitor group triggered. - * + *

Latest timestamp the monitor group triggered.

* @return lastTriggeredTs - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getLastTriggeredTs() { - - if (lastTriggeredTs == null) { - lastTriggeredTs = JsonNullable.undefined(); - } - return lastTriggeredTs.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getLastTriggeredTs() { + + if (lastTriggeredTs == null) { + lastTriggeredTs = JsonNullable.undefined(); + } + return lastTriggeredTs.orElse(null); + } @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getLastTriggeredTs_JsonNullable() { return lastTriggeredTs; } - - @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS) - private void setLastTriggeredTs_JsonNullable(JsonNullable lastTriggeredTs) { + @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS)private void setLastTriggeredTs_JsonNullable(JsonNullable lastTriggeredTs) { this.lastTriggeredTs = lastTriggeredTs; } /** - * The ID of the monitor. - * + *

The ID of the monitor.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonitorId() { - return monitorId; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorId() { + return monitorId; + } /** - * The name of the monitor. - * + *

The name of the monitor.

* @return monitorName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMonitorName() { - return monitorName; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMonitorName() { + return monitorName; + } /** - * The different states your monitor can be in. - * + *

The different states your monitor can be in.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOverallStates getStatus() { - return status; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOverallStates getStatus() { + return status; + } - /** Return true if this MonitorGroupSearchResult object is equal to o. */ + /** + * Return true if this MonitorGroupSearchResult object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -157,19 +175,13 @@ public boolean equals(Object o) { return false; } MonitorGroupSearchResult monitorGroupSearchResult = (MonitorGroupSearchResult) o; - return Objects.equals(this.group, monitorGroupSearchResult.group) - && Objects.equals(this.groupTags, monitorGroupSearchResult.groupTags) - && Objects.equals(this.lastNodataTs, monitorGroupSearchResult.lastNodataTs) - && Objects.equals(this.lastTriggeredTs, monitorGroupSearchResult.lastTriggeredTs) - && Objects.equals(this.monitorId, monitorGroupSearchResult.monitorId) - && Objects.equals(this.monitorName, monitorGroupSearchResult.monitorName) - && Objects.equals(this.status, monitorGroupSearchResult.status); + return Objects.equals(this.group, monitorGroupSearchResult.group) && Objects.equals(this.groupTags, monitorGroupSearchResult.groupTags) && Objects.equals(this.lastNodataTs, monitorGroupSearchResult.lastNodataTs) && Objects.equals(this.lastTriggeredTs, monitorGroupSearchResult.lastTriggeredTs) && Objects.equals(this.monitorId, monitorGroupSearchResult.monitorId) && Objects.equals(this.monitorName, monitorGroupSearchResult.monitorName) && Objects.equals(this.status, monitorGroupSearchResult.status); } + @Override public int hashCode() { - return Objects.hash( - group, groupTags, lastNodataTs, lastTriggeredTs, monitorId, monitorName, status); + return Objects.hash(group,groupTags,lastNodataTs,lastTriggeredTs,monitorId,monitorName,status); } @Override @@ -188,7 +200,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorOptions.java b/src/main/java/com/datadog/api/client/v1/model/MonitorOptions.java index 8d936ff77da..dc59add4b08 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorOptions.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** List of options associated with your monitor. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

List of options associated with your monitor.

+ */ @JsonPropertyOrder({ MonitorOptions.JSON_PROPERTY_AGGREGATION, MonitorOptions.JSON_PROPERTY_DEVICE_IDS, @@ -51,10 +66,10 @@ MonitorOptions.JSON_PROPERTY_TIMEOUT_H, MonitorOptions.JSON_PROPERTY_VARIABLES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private MonitorOptionsAggregation aggregation; @@ -101,8 +116,7 @@ public class MonitorOptions { private JsonNullable noDataTimeframe = JsonNullable.undefined(); public static final String JSON_PROPERTY_NOTIFICATION_PRESET_NAME = "notification_preset_name"; - private MonitorOptionsNotificationPresets notificationPresetName = - MonitorOptionsNotificationPresets.SHOW_ALL; + private MonitorOptionsNotificationPresets notificationPresetName = MonitorOptionsNotificationPresets.SHOW_ALL; public static final String JSON_PROPERTY_NOTIFY_AUDIT = "notify_audit"; private Boolean notifyAudit = false; @@ -123,8 +137,7 @@ public class MonitorOptions { private JsonNullable renotifyOccurrences = JsonNullable.undefined(); public static final String JSON_PROPERTY_RENOTIFY_STATUSES = "renotify_statuses"; - private JsonNullable> renotifyStatuses = - JsonNullable.>undefined(); + private JsonNullable> renotifyStatuses = JsonNullable.>undefined(); public static final String JSON_PROPERTY_REQUIRE_FULL_WINDOW = "require_full_window"; private Boolean requireFullWindow; @@ -150,32 +163,32 @@ public class MonitorOptions { public static final String JSON_PROPERTY_VARIABLES = "variables"; private List variables = null; + /** - * Type of aggregation performed in the monitor query. - * + *

Type of aggregation performed in the monitor query.

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOptionsAggregation getAggregation() { - return aggregation; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOptionsAggregation getAggregation() { + return aggregation; + } /** - * IDs of the device the Synthetics monitor is running on. - * + *

IDs of the device the Synthetics monitor is running on.

* @return deviceIds * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDeviceIds() { - return deviceIds; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDeviceIds() { + return deviceIds; + } @Deprecated public MonitorOptions enableLogsSample(Boolean enableLogsSample) { this.enableLogsSample = enableLogsSample; @@ -183,422 +196,363 @@ public MonitorOptions enableLogsSample(Boolean enableLogsSample) { } /** - * Whether or not to send a log sample when the log monitor triggers. - * + *

Whether or not to send a log sample when the log monitor triggers.

* @return enableLogsSample - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLE_LOGS_SAMPLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnableLogsSample() { - return enableLogsSample; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_LOGS_SAMPLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableLogsSample() { + return enableLogsSample; + } public void setEnableLogsSample(Boolean enableLogsSample) { this.enableLogsSample = enableLogsSample; } - public MonitorOptions enableSamples(Boolean enableSamples) { this.enableSamples = enableSamples; return this; } /** - * Whether or not to send a list of samples when the monitor triggers. This is only used by CI - * Test and Pipeline monitors. - * + *

Whether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors.

* @return enableSamples - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLE_SAMPLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnableSamples() { - return enableSamples; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_SAMPLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableSamples() { + return enableSamples; + } public void setEnableSamples(Boolean enableSamples) { this.enableSamples = enableSamples; } - public MonitorOptions escalationMessage(String escalationMessage) { this.escalationMessage = escalationMessage; return this; } /** - * We recommend using the is_renotify, block - * in the original message instead. A message to include with a re-notification. Supports the - * @username notification we allow elsewhere. Not applicable if - * renotify_interval is None. - * + *

We recommend using the is_renotify, + * block in the original message instead. + * A message to include with a re-notification. Supports the @username notification we allow elsewhere. + * Not applicable if renotify_interval is None.

* @return escalationMessage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESCALATION_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEscalationMessage() { - return escalationMessage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESCALATION_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEscalationMessage() { + return escalationMessage; + } public void setEscalationMessage(String escalationMessage) { this.escalationMessage = escalationMessage; } - public MonitorOptions evaluationDelay(Long evaluationDelay) { this.evaluationDelay = JsonNullable.of(evaluationDelay); return this; } /** - * Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is - * set to 300 (5min), the timeframe is set to last_5m and the time is - * 7:00, the monitor evaluates data from 6:50 to 6:55. This is useful for AWS CloudWatch and other - * backfilled metrics to ensure the monitor always has data during evaluation. - * + *

Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), + * the timeframe is set to last_5m and the time is 7:00, the monitor evaluates data from 6:50 to 6:55. + * This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.

* @return evaluationDelay - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getEvaluationDelay() { - return evaluationDelay.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getEvaluationDelay() { + return evaluationDelay.orElse(null); + } @JsonProperty(JSON_PROPERTY_EVALUATION_DELAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getEvaluationDelay_JsonNullable() { return evaluationDelay; } - - @JsonProperty(JSON_PROPERTY_EVALUATION_DELAY) - public void setEvaluationDelay_JsonNullable(JsonNullable evaluationDelay) { + @JsonProperty(JSON_PROPERTY_EVALUATION_DELAY)public void setEvaluationDelay_JsonNullable(JsonNullable evaluationDelay) { this.evaluationDelay = evaluationDelay; } - public void setEvaluationDelay(Long evaluationDelay) { this.evaluationDelay = JsonNullable.of(evaluationDelay); } - public MonitorOptions groupRetentionDuration(String groupRetentionDuration) { this.groupRetentionDuration = groupRetentionDuration; return this; } /** - * The time span after which groups with missing data are dropped from the monitor state. The - * minimum value is one hour, and the maximum value is 72 hours. Example values are: "60m", "1h", - * and "2d". This option is only available for APM Trace Analytics, Audit Trail, CI, Error - * Tracking, Event, Logs, and RUM monitors. - * + *

The time span after which groups with missing data are dropped from the monitor state. + * The minimum value is one hour, and the maximum value is 72 hours. + * Example values are: "60m", "1h", and "2d". + * This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

* @return groupRetentionDuration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_RETENTION_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroupRetentionDuration() { - return groupRetentionDuration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_RETENTION_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroupRetentionDuration() { + return groupRetentionDuration; + } public void setGroupRetentionDuration(String groupRetentionDuration) { this.groupRetentionDuration = groupRetentionDuration; } - public MonitorOptions groupbySimpleMonitor(Boolean groupbySimpleMonitor) { this.groupbySimpleMonitor = groupbySimpleMonitor; return this; } /** - * Whether the log alert monitor triggers a single alert or multiple alerts when any group - * breaches a threshold. - * + *

Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold.

* @return groupbySimpleMonitor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPBY_SIMPLE_MONITOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getGroupbySimpleMonitor() { - return groupbySimpleMonitor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPBY_SIMPLE_MONITOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getGroupbySimpleMonitor() { + return groupbySimpleMonitor; + } public void setGroupbySimpleMonitor(Boolean groupbySimpleMonitor) { this.groupbySimpleMonitor = groupbySimpleMonitor; } - public MonitorOptions includeTags(Boolean includeTags) { this.includeTags = includeTags; return this; } /** - * A Boolean indicating whether notifications from this monitor automatically inserts its - * triggering tags into the title. - * - *

Examples - If True, - * [Triggered on {host:h1}] Monitor Title - If False, - * [Triggered] Monitor Title - * + *

A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title.

+ *

Examples + * - If True, [Triggered on {host:h1}] Monitor Title + * - If False, [Triggered] Monitor Title

* @return includeTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeTags() { - return includeTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeTags() { + return includeTags; + } public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } - public MonitorOptions locked(Boolean locked) { this.locked = locked; return this; } /** - * Whether or not the monitor is locked (only editable by creator and admins). Use - * restricted_roles instead. - * + *

Whether or not the monitor is locked (only editable by creator and admins). Use restricted_roles instead.

* @return locked * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getLocked() { - return locked; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCKED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getLocked() { + return locked; + } @Deprecated public void setLocked(Boolean locked) { this.locked = locked; } - public MonitorOptions minFailureDuration(Long minFailureDuration) { this.minFailureDuration = JsonNullable.of(minFailureDuration); return this; } /** - * How long the test should be in failure before alerting (integer, number of seconds, max 7200). - * minimum: 0 maximum: 7200 - * + *

How long the test should be in failure before alerting (integer, number of seconds, max 7200).

+ * minimum: 0 + * maximum: 7200 * @return minFailureDuration - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getMinFailureDuration() { - return minFailureDuration.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getMinFailureDuration() { + return minFailureDuration.orElse(null); + } @JsonProperty(JSON_PROPERTY_MIN_FAILURE_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMinFailureDuration_JsonNullable() { return minFailureDuration; } - - @JsonProperty(JSON_PROPERTY_MIN_FAILURE_DURATION) - public void setMinFailureDuration_JsonNullable(JsonNullable minFailureDuration) { + @JsonProperty(JSON_PROPERTY_MIN_FAILURE_DURATION)public void setMinFailureDuration_JsonNullable(JsonNullable minFailureDuration) { this.minFailureDuration = minFailureDuration; } - public void setMinFailureDuration(Long minFailureDuration) { this.minFailureDuration = JsonNullable.of(minFailureDuration); } - public MonitorOptions minLocationFailed(Long minLocationFailed) { this.minLocationFailed = JsonNullable.of(minLocationFailed); return this; } /** - * The minimum number of locations in failure at the same time during at least one moment in the - * min_failure_duration period (min_location_failed and - * min_failure_duration are part of the advanced alerting rules - integer, >= 1). - * + *

The minimum number of locations in failure at the same time during + * at least one moment in the min_failure_duration period (min_location_failed and min_failure_duration + * are part of the advanced alerting rules - integer, >= 1).

* @return minLocationFailed - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getMinLocationFailed() { - return minLocationFailed.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getMinLocationFailed() { + return minLocationFailed.orElse(null); + } @JsonProperty(JSON_PROPERTY_MIN_LOCATION_FAILED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMinLocationFailed_JsonNullable() { return minLocationFailed; } - - @JsonProperty(JSON_PROPERTY_MIN_LOCATION_FAILED) - public void setMinLocationFailed_JsonNullable(JsonNullable minLocationFailed) { + @JsonProperty(JSON_PROPERTY_MIN_LOCATION_FAILED)public void setMinLocationFailed_JsonNullable(JsonNullable minLocationFailed) { this.minLocationFailed = minLocationFailed; } - public void setMinLocationFailed(Long minLocationFailed) { this.minLocationFailed = JsonNullable.of(minLocationFailed); } - public MonitorOptions newGroupDelay(Long newGroupDelay) { this.newGroupDelay = JsonNullable.of(newGroupDelay); return this; } /** - * Time (in seconds) to skip evaluations for new groups. - * - *

For example, this option can be used to skip evaluations for new hosts while they - * initialize. - * - *

Must be a non negative integer. - * + *

Time (in seconds) to skip evaluations for new groups.

+ *

For example, this option can be used to skip evaluations for new hosts while they initialize.

+ *

Must be a non negative integer.

* @return newGroupDelay - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getNewGroupDelay() { - return newGroupDelay.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getNewGroupDelay() { + return newGroupDelay.orElse(null); + } @JsonProperty(JSON_PROPERTY_NEW_GROUP_DELAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNewGroupDelay_JsonNullable() { return newGroupDelay; } - - @JsonProperty(JSON_PROPERTY_NEW_GROUP_DELAY) - public void setNewGroupDelay_JsonNullable(JsonNullable newGroupDelay) { + @JsonProperty(JSON_PROPERTY_NEW_GROUP_DELAY)public void setNewGroupDelay_JsonNullable(JsonNullable newGroupDelay) { this.newGroupDelay = newGroupDelay; } - public void setNewGroupDelay(Long newGroupDelay) { this.newGroupDelay = JsonNullable.of(newGroupDelay); } - public MonitorOptions newHostDelay(Long newHostDelay) { this.newHostDelay = JsonNullable.of(newHostDelay); return this; } /** - * Time (in seconds) to allow a host to boot and applications to fully start before starting the - * evaluation of monitor results. Should be a non negative integer. - * - *

Use new_group_delay instead. - * + *

Time (in seconds) to allow a host to boot and applications + * to fully start before starting the evaluation of monitor results. + * Should be a non negative integer.

+ *

Use new_group_delay instead.

* @return newHostDelay * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonIgnore - public Long getNewHostDelay() { - return newHostDelay.orElse(null); - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + public Long getNewHostDelay() { + return newHostDelay.orElse(null); + } @Deprecated @JsonProperty(JSON_PROPERTY_NEW_HOST_DELAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNewHostDelay_JsonNullable() { return newHostDelay; } - - @JsonProperty(JSON_PROPERTY_NEW_HOST_DELAY) - public void setNewHostDelay_JsonNullable(JsonNullable newHostDelay) { + @JsonProperty(JSON_PROPERTY_NEW_HOST_DELAY)public void setNewHostDelay_JsonNullable(JsonNullable newHostDelay) { this.newHostDelay = newHostDelay; } - public void setNewHostDelay(Long newHostDelay) { this.newHostDelay = JsonNullable.of(newHostDelay); } - public MonitorOptions noDataTimeframe(Long noDataTimeframe) { this.noDataTimeframe = JsonNullable.of(noDataTimeframe); return this; } /** - * The number of minutes before a monitor notifies after data stops reporting. Datadog recommends - * at least 2x the monitor timeframe for query alerts or 2 minutes for service checks. If omitted, - * 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks. - * + *

The number of minutes before a monitor notifies after data stops reporting. + * Datadog recommends at least 2x the monitor timeframe for query alerts or 2 minutes for service checks. + * If omitted, 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks.

* @return noDataTimeframe - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getNoDataTimeframe() { - return noDataTimeframe.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getNoDataTimeframe() { + return noDataTimeframe.orElse(null); + } @JsonProperty(JSON_PROPERTY_NO_DATA_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNoDataTimeframe_JsonNullable() { return noDataTimeframe; } - - @JsonProperty(JSON_PROPERTY_NO_DATA_TIMEFRAME) - public void setNoDataTimeframe_JsonNullable(JsonNullable noDataTimeframe) { + @JsonProperty(JSON_PROPERTY_NO_DATA_TIMEFRAME)public void setNoDataTimeframe_JsonNullable(JsonNullable noDataTimeframe) { this.noDataTimeframe = noDataTimeframe; } - public void setNoDataTimeframe(Long noDataTimeframe) { this.noDataTimeframe = JsonNullable.of(noDataTimeframe); } - - public MonitorOptions notificationPresetName( - MonitorOptionsNotificationPresets notificationPresetName) { + public MonitorOptions notificationPresetName(MonitorOptionsNotificationPresets notificationPresetName) { this.notificationPresetName = notificationPresetName; this.unparsed |= !notificationPresetName.isValid(); return this; } /** - * Toggles the display of additional content sent in the monitor notification. - * + *

Toggles the display of additional content sent in the monitor notification.

* @return notificationPresetName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATION_PRESET_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOptionsNotificationPresets getNotificationPresetName() { - return notificationPresetName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATION_PRESET_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOptionsNotificationPresets getNotificationPresetName() { + return notificationPresetName; + } public void setNotificationPresetName(MonitorOptionsNotificationPresets notificationPresetName) { if (!notificationPresetName.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.notificationPresetName = notificationPresetName; } - public MonitorOptions notifyAudit(Boolean notifyAudit) { this.notifyAudit = notifyAudit; return this; } /** - * A Boolean indicating whether tagged users is notified on changes to this monitor. - * + *

A Boolean indicating whether tagged users is notified on changes to this monitor.

* @return notifyAudit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFY_AUDIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNotifyAudit() { - return notifyAudit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFY_AUDIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotifyAudit() { + return notifyAudit; + } public void setNotifyAudit(Boolean notifyAudit) { this.notifyAudit = notifyAudit; } - public MonitorOptions notifyBy(List notifyBy) { this.notifyBy = notifyBy; return this; } - public MonitorOptions addNotifyByItem(String notifyByItem) { if (this.notifyBy == null) { this.notifyBy = new ArrayList<>(); @@ -608,49 +562,43 @@ public MonitorOptions addNotifyByItem(String notifyByItem) { } /** - * Controls what granularity a monitor alerts on. Only available for monitors with groupings. For - * instance, a monitor grouped by cluster, namespace, and pod - * can be configured to only notify on each new cluster violating the alert - * conditions by setting notify_by to ["cluster"]. Tags mentioned in - * notify_by must be a subset of the grouping tags in the query. For example, a query - * grouped by cluster and namespace cannot notify on region - * . Setting notify_by to [*] configures the monitor to notify as a - * simple-alert. - * + *

Controls what granularity a monitor alerts on. Only available for monitors with groupings. + * For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each + * new cluster violating the alert conditions by setting notify_by to ["cluster"]. Tags mentioned + * in notify_by must be a subset of the grouping tags in the query. + * For example, a query grouped by cluster and namespace cannot notify on region. + * Setting notify_by to [*] configures the monitor to notify as a simple-alert.

* @return notifyBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFY_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotifyBy() { - return notifyBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFY_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotifyBy() { + return notifyBy; + } public void setNotifyBy(List notifyBy) { this.notifyBy = notifyBy; } - public MonitorOptions notifyNoData(Boolean notifyNoData) { this.notifyNoData = notifyNoData; return this; } /** - * A Boolean indicating whether this monitor notifies when data stops reporting. - * + *

A Boolean indicating whether this monitor notifies when data stops reporting.

* @return notifyNoData - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFY_NO_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNotifyNoData() { - return notifyNoData; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFY_NO_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotifyNoData() { + return notifyNoData; + } public void setNotifyNoData(Boolean notifyNoData) { this.notifyNoData = notifyNoData; } - public MonitorOptions onMissingData(OnMissingDataOption onMissingData) { this.onMissingData = onMissingData; this.unparsed |= !onMissingData.isValid(); @@ -658,98 +606,83 @@ public MonitorOptions onMissingData(OnMissingDataOption onMissingData) { } /** - * Controls how groups or monitors are treated if an evaluation does not return any data points. - * The default option results in different behavior depending on the monitor query type. For - * monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to - * the threshold conditions. For monitors using any query type other than Count, for example - * Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available - * for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. - * + *

Controls how groups or monitors are treated if an evaluation does not return any data points. + * The default option results in different behavior depending on the monitor query type. + * For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. + * For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. + * This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

* @return onMissingData - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ON_MISSING_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OnMissingDataOption getOnMissingData() { - return onMissingData; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ON_MISSING_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OnMissingDataOption getOnMissingData() { + return onMissingData; + } public void setOnMissingData(OnMissingDataOption onMissingData) { if (!onMissingData.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.onMissingData = onMissingData; } - public MonitorOptions renotifyInterval(Long renotifyInterval) { this.renotifyInterval = JsonNullable.of(renotifyInterval); return this; } /** - * The number of minutes after the last notification before a monitor re-notifies on the current - * status. It only re-notifies if it’s not resolved. - * + *

The number of minutes after the last notification before a monitor re-notifies on the current status. + * It only re-notifies if it’s not resolved.

* @return renotifyInterval - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getRenotifyInterval() { - return renotifyInterval.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRenotifyInterval() { + return renotifyInterval.orElse(null); + } @JsonProperty(JSON_PROPERTY_RENOTIFY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRenotifyInterval_JsonNullable() { return renotifyInterval; } - - @JsonProperty(JSON_PROPERTY_RENOTIFY_INTERVAL) - public void setRenotifyInterval_JsonNullable(JsonNullable renotifyInterval) { + @JsonProperty(JSON_PROPERTY_RENOTIFY_INTERVAL)public void setRenotifyInterval_JsonNullable(JsonNullable renotifyInterval) { this.renotifyInterval = renotifyInterval; } - public void setRenotifyInterval(Long renotifyInterval) { this.renotifyInterval = JsonNullable.of(renotifyInterval); } - public MonitorOptions renotifyOccurrences(Long renotifyOccurrences) { this.renotifyOccurrences = JsonNullable.of(renotifyOccurrences); return this; } /** - * The number of times re-notification messages should be sent on the current status at the - * provided re-notification interval. - * + *

The number of times re-notification messages should be sent on the current status at the provided re-notification interval.

* @return renotifyOccurrences - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getRenotifyOccurrences() { - return renotifyOccurrences.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRenotifyOccurrences() { + return renotifyOccurrences.orElse(null); + } @JsonProperty(JSON_PROPERTY_RENOTIFY_OCCURRENCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRenotifyOccurrences_JsonNullable() { return renotifyOccurrences; } - - @JsonProperty(JSON_PROPERTY_RENOTIFY_OCCURRENCES) - public void setRenotifyOccurrences_JsonNullable(JsonNullable renotifyOccurrences) { + @JsonProperty(JSON_PROPERTY_RENOTIFY_OCCURRENCES)public void setRenotifyOccurrences_JsonNullable(JsonNullable renotifyOccurrences) { this.renotifyOccurrences = renotifyOccurrences; } - public void setRenotifyOccurrences(Long renotifyOccurrences) { this.renotifyOccurrences = JsonNullable.of(renotifyOccurrences); } - public MonitorOptions renotifyStatuses(List renotifyStatuses) { this.renotifyStatuses = JsonNullable.>of(renotifyStatuses); return this; } - public MonitorOptions addRenotifyStatusesItem(MonitorRenotifyStatusType renotifyStatusesItem) { if (this.renotifyStatuses == null || !this.renotifyStatuses.isPresent()) { this.renotifyStatuses = JsonNullable.>of(new ArrayList<>()); @@ -763,55 +696,47 @@ public MonitorOptions addRenotifyStatusesItem(MonitorRenotifyStatusType renotify } /** - * The types of monitor statuses for which re-notification messages are sent. - * + *

The types of monitor statuses for which re-notification messages are sent.

* @return renotifyStatuses - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getRenotifyStatuses() { - return renotifyStatuses.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getRenotifyStatuses() { + return renotifyStatuses.orElse(null); + } @JsonProperty(JSON_PROPERTY_RENOTIFY_STATUSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getRenotifyStatuses_JsonNullable() { return renotifyStatuses; } - - @JsonProperty(JSON_PROPERTY_RENOTIFY_STATUSES) - public void setRenotifyStatuses_JsonNullable( - JsonNullable> renotifyStatuses) { + @JsonProperty(JSON_PROPERTY_RENOTIFY_STATUSES)public void setRenotifyStatuses_JsonNullable(JsonNullable> renotifyStatuses) { this.renotifyStatuses = renotifyStatuses; } - public void setRenotifyStatuses(List renotifyStatuses) { this.renotifyStatuses = JsonNullable.>of(renotifyStatuses); } - public MonitorOptions requireFullWindow(Boolean requireFullWindow) { this.requireFullWindow = requireFullWindow; return this; } /** - * A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We - * highly recommend you set this to false for sparse metrics, otherwise some - * evaluations are skipped. Default is false. - * + *

A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. + * We highly recommend you set this to false for sparse metrics, + * otherwise some evaluations are skipped. Default is false.

* @return requireFullWindow - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUIRE_FULL_WINDOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequireFullWindow() { - return requireFullWindow; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRE_FULL_WINDOW) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequireFullWindow() { + return requireFullWindow; + } public void setRequireFullWindow(Boolean requireFullWindow) { this.requireFullWindow = requireFullWindow; } - public MonitorOptions schedulingOptions(MonitorOptionsSchedulingOptions schedulingOptions) { this.schedulingOptions = schedulingOptions; this.unparsed |= schedulingOptions.unparsed; @@ -819,26 +744,23 @@ public MonitorOptions schedulingOptions(MonitorOptionsSchedulingOptions scheduli } /** - * Configuration options for scheduling. - * + *

Configuration options for scheduling.

* @return schedulingOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCHEDULING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOptionsSchedulingOptions getSchedulingOptions() { - return schedulingOptions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCHEDULING_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOptionsSchedulingOptions getSchedulingOptions() { + return schedulingOptions; + } public void setSchedulingOptions(MonitorOptionsSchedulingOptions schedulingOptions) { this.schedulingOptions = schedulingOptions; } - public MonitorOptions silenced(Map silenced) { this.silenced = silenced; return this; } - public MonitorOptions putSilencedItem(String key, Long silencedItem) { if (this.silenced == null) { this.silenced = new HashMap<>(); @@ -848,58 +770,51 @@ public MonitorOptions putSilencedItem(String key, Long silencedItem) { } /** - * Information about the downtime applied to the monitor. - * + *

Information about the downtime applied to the monitor.

* @return silenced * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SILENCED) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getSilenced() { - return silenced; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SILENCED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, + value = JsonInclude.Include.USE_DEFAULTS) + public Map getSilenced() { + return silenced; + } @Deprecated public void setSilenced(Map silenced) { this.silenced = silenced; } - public MonitorOptions syntheticsCheckId(String syntheticsCheckId) { this.syntheticsCheckId = JsonNullable.of(syntheticsCheckId); return this; } /** - * ID of the corresponding Synthetic check. - * + *

ID of the corresponding Synthetic check.

* @return syntheticsCheckId * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonIgnore - public String getSyntheticsCheckId() { - return syntheticsCheckId.orElse(null); - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + public String getSyntheticsCheckId() { + return syntheticsCheckId.orElse(null); + } @Deprecated @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSyntheticsCheckId_JsonNullable() { return syntheticsCheckId; } - - @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_ID) - public void setSyntheticsCheckId_JsonNullable(JsonNullable syntheticsCheckId) { + @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_ID)public void setSyntheticsCheckId_JsonNullable(JsonNullable syntheticsCheckId) { this.syntheticsCheckId = syntheticsCheckId; } - public void setSyntheticsCheckId(String syntheticsCheckId) { this.syntheticsCheckId = JsonNullable.of(syntheticsCheckId); } - public MonitorOptions thresholdWindows(MonitorThresholdWindowOptions thresholdWindows) { this.thresholdWindows = thresholdWindows; this.unparsed |= thresholdWindows.unparsed; @@ -907,21 +822,19 @@ public MonitorOptions thresholdWindows(MonitorThresholdWindowOptions thresholdWi } /** - * Alerting time window options. - * + *

Alerting time window options.

* @return thresholdWindows - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_THRESHOLD_WINDOWS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorThresholdWindowOptions getThresholdWindows() { - return thresholdWindows; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THRESHOLD_WINDOWS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorThresholdWindowOptions getThresholdWindows() { + return thresholdWindows; + } public void setThresholdWindows(MonitorThresholdWindowOptions thresholdWindows) { this.thresholdWindows = thresholdWindows; } - public MonitorOptions thresholds(MonitorThresholds thresholds) { this.thresholds = thresholds; this.unparsed |= thresholds.unparsed; @@ -929,53 +842,45 @@ public MonitorOptions thresholds(MonitorThresholds thresholds) { } /** - * List of the different monitor threshold available. - * + *

List of the different monitor threshold available.

* @return thresholds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_THRESHOLDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorThresholds getThresholds() { - return thresholds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THRESHOLDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorThresholds getThresholds() { + return thresholds; + } public void setThresholds(MonitorThresholds thresholds) { this.thresholds = thresholds; } - public MonitorOptions timeoutH(Long timeoutH) { this.timeoutH = JsonNullable.of(timeoutH); return this; } /** - * The number of hours of the monitor not reporting data before it automatically resolves from a - * triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours. - * + *

The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

* @return timeoutH - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getTimeoutH() { - return timeoutH.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getTimeoutH() { + return timeoutH.orElse(null); + } @JsonProperty(JSON_PROPERTY_TIMEOUT_H) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTimeoutH_JsonNullable() { return timeoutH; } - - @JsonProperty(JSON_PROPERTY_TIMEOUT_H) - public void setTimeoutH_JsonNullable(JsonNullable timeoutH) { + @JsonProperty(JSON_PROPERTY_TIMEOUT_H)public void setTimeoutH_JsonNullable(JsonNullable timeoutH) { this.timeoutH = timeoutH; } - public void setTimeoutH(Long timeoutH) { this.timeoutH = JsonNullable.of(timeoutH); } - public MonitorOptions variables(List variables) { this.variables = variables; for (MonitorFormulaAndFunctionQueryDefinition item : variables) { @@ -983,7 +888,6 @@ public MonitorOptions variables(List v } return this; } - public MonitorOptions addVariablesItem(MonitorFormulaAndFunctionQueryDefinition variablesItem) { if (this.variables == null) { this.variables = new ArrayList<>(); @@ -994,23 +898,23 @@ public MonitorOptions addVariablesItem(MonitorFormulaAndFunctionQueryDefinition } /** - * List of requests that can be used in the monitor query. This feature is currently in - * beta. - * + *

List of requests that can be used in the monitor query. This feature is currently in beta.

* @return variables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getVariables() { - return variables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getVariables() { + return variables; + } public void setVariables(List variables) { this.variables = variables; } - /** Return true if this MonitorOptions object is equal to o. */ + /** + * Return true if this MonitorOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -1020,73 +924,13 @@ public boolean equals(Object o) { return false; } MonitorOptions monitorOptions = (MonitorOptions) o; - return Objects.equals(this.aggregation, monitorOptions.aggregation) - && Objects.equals(this.deviceIds, monitorOptions.deviceIds) - && Objects.equals(this.enableLogsSample, monitorOptions.enableLogsSample) - && Objects.equals(this.enableSamples, monitorOptions.enableSamples) - && Objects.equals(this.escalationMessage, monitorOptions.escalationMessage) - && Objects.equals(this.evaluationDelay, monitorOptions.evaluationDelay) - && Objects.equals(this.groupRetentionDuration, monitorOptions.groupRetentionDuration) - && Objects.equals(this.groupbySimpleMonitor, monitorOptions.groupbySimpleMonitor) - && Objects.equals(this.includeTags, monitorOptions.includeTags) - && Objects.equals(this.locked, monitorOptions.locked) - && Objects.equals(this.minFailureDuration, monitorOptions.minFailureDuration) - && Objects.equals(this.minLocationFailed, monitorOptions.minLocationFailed) - && Objects.equals(this.newGroupDelay, monitorOptions.newGroupDelay) - && Objects.equals(this.newHostDelay, monitorOptions.newHostDelay) - && Objects.equals(this.noDataTimeframe, monitorOptions.noDataTimeframe) - && Objects.equals(this.notificationPresetName, monitorOptions.notificationPresetName) - && Objects.equals(this.notifyAudit, monitorOptions.notifyAudit) - && Objects.equals(this.notifyBy, monitorOptions.notifyBy) - && Objects.equals(this.notifyNoData, monitorOptions.notifyNoData) - && Objects.equals(this.onMissingData, monitorOptions.onMissingData) - && Objects.equals(this.renotifyInterval, monitorOptions.renotifyInterval) - && Objects.equals(this.renotifyOccurrences, monitorOptions.renotifyOccurrences) - && Objects.equals(this.renotifyStatuses, monitorOptions.renotifyStatuses) - && Objects.equals(this.requireFullWindow, monitorOptions.requireFullWindow) - && Objects.equals(this.schedulingOptions, monitorOptions.schedulingOptions) - && Objects.equals(this.silenced, monitorOptions.silenced) - && Objects.equals(this.syntheticsCheckId, monitorOptions.syntheticsCheckId) - && Objects.equals(this.thresholdWindows, monitorOptions.thresholdWindows) - && Objects.equals(this.thresholds, monitorOptions.thresholds) - && Objects.equals(this.timeoutH, monitorOptions.timeoutH) - && Objects.equals(this.variables, monitorOptions.variables); + return Objects.equals(this.aggregation, monitorOptions.aggregation) && Objects.equals(this.deviceIds, monitorOptions.deviceIds) && Objects.equals(this.enableLogsSample, monitorOptions.enableLogsSample) && Objects.equals(this.enableSamples, monitorOptions.enableSamples) && Objects.equals(this.escalationMessage, monitorOptions.escalationMessage) && Objects.equals(this.evaluationDelay, monitorOptions.evaluationDelay) && Objects.equals(this.groupRetentionDuration, monitorOptions.groupRetentionDuration) && Objects.equals(this.groupbySimpleMonitor, monitorOptions.groupbySimpleMonitor) && Objects.equals(this.includeTags, monitorOptions.includeTags) && Objects.equals(this.locked, monitorOptions.locked) && Objects.equals(this.minFailureDuration, monitorOptions.minFailureDuration) && Objects.equals(this.minLocationFailed, monitorOptions.minLocationFailed) && Objects.equals(this.newGroupDelay, monitorOptions.newGroupDelay) && Objects.equals(this.newHostDelay, monitorOptions.newHostDelay) && Objects.equals(this.noDataTimeframe, monitorOptions.noDataTimeframe) && Objects.equals(this.notificationPresetName, monitorOptions.notificationPresetName) && Objects.equals(this.notifyAudit, monitorOptions.notifyAudit) && Objects.equals(this.notifyBy, monitorOptions.notifyBy) && Objects.equals(this.notifyNoData, monitorOptions.notifyNoData) && Objects.equals(this.onMissingData, monitorOptions.onMissingData) && Objects.equals(this.renotifyInterval, monitorOptions.renotifyInterval) && Objects.equals(this.renotifyOccurrences, monitorOptions.renotifyOccurrences) && Objects.equals(this.renotifyStatuses, monitorOptions.renotifyStatuses) && Objects.equals(this.requireFullWindow, monitorOptions.requireFullWindow) && Objects.equals(this.schedulingOptions, monitorOptions.schedulingOptions) && Objects.equals(this.silenced, monitorOptions.silenced) && Objects.equals(this.syntheticsCheckId, monitorOptions.syntheticsCheckId) && Objects.equals(this.thresholdWindows, monitorOptions.thresholdWindows) && Objects.equals(this.thresholds, monitorOptions.thresholds) && Objects.equals(this.timeoutH, monitorOptions.timeoutH) && Objects.equals(this.variables, monitorOptions.variables); } + @Override public int hashCode() { - return Objects.hash( - aggregation, - deviceIds, - enableLogsSample, - enableSamples, - escalationMessage, - evaluationDelay, - groupRetentionDuration, - groupbySimpleMonitor, - includeTags, - locked, - minFailureDuration, - minLocationFailed, - newGroupDelay, - newHostDelay, - noDataTimeframe, - notificationPresetName, - notifyAudit, - notifyBy, - notifyNoData, - onMissingData, - renotifyInterval, - renotifyOccurrences, - renotifyStatuses, - requireFullWindow, - schedulingOptions, - silenced, - syntheticsCheckId, - thresholdWindows, - thresholds, - timeoutH, - variables); + return Objects.hash(aggregation,deviceIds,enableLogsSample,enableSamples,escalationMessage,evaluationDelay,groupRetentionDuration,groupbySimpleMonitor,includeTags,locked,minFailureDuration,minLocationFailed,newGroupDelay,newHostDelay,noDataTimeframe,notificationPresetName,notifyAudit,notifyBy,notifyNoData,onMissingData,renotifyInterval,renotifyOccurrences,renotifyStatuses,requireFullWindow,schedulingOptions,silenced,syntheticsCheckId,thresholdWindows,thresholds,timeoutH,variables); } @Override @@ -1099,12 +943,8 @@ public String toString() { sb.append(" enableSamples: ").append(toIndentedString(enableSamples)).append("\n"); sb.append(" escalationMessage: ").append(toIndentedString(escalationMessage)).append("\n"); sb.append(" evaluationDelay: ").append(toIndentedString(evaluationDelay)).append("\n"); - sb.append(" groupRetentionDuration: ") - .append(toIndentedString(groupRetentionDuration)) - .append("\n"); - sb.append(" groupbySimpleMonitor: ") - .append(toIndentedString(groupbySimpleMonitor)) - .append("\n"); + sb.append(" groupRetentionDuration: ").append(toIndentedString(groupRetentionDuration)).append("\n"); + sb.append(" groupbySimpleMonitor: ").append(toIndentedString(groupbySimpleMonitor)).append("\n"); sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); sb.append(" minFailureDuration: ").append(toIndentedString(minFailureDuration)).append("\n"); @@ -1112,17 +952,13 @@ public String toString() { sb.append(" newGroupDelay: ").append(toIndentedString(newGroupDelay)).append("\n"); sb.append(" newHostDelay: ").append(toIndentedString(newHostDelay)).append("\n"); sb.append(" noDataTimeframe: ").append(toIndentedString(noDataTimeframe)).append("\n"); - sb.append(" notificationPresetName: ") - .append(toIndentedString(notificationPresetName)) - .append("\n"); + sb.append(" notificationPresetName: ").append(toIndentedString(notificationPresetName)).append("\n"); sb.append(" notifyAudit: ").append(toIndentedString(notifyAudit)).append("\n"); sb.append(" notifyBy: ").append(toIndentedString(notifyBy)).append("\n"); sb.append(" notifyNoData: ").append(toIndentedString(notifyNoData)).append("\n"); sb.append(" onMissingData: ").append(toIndentedString(onMissingData)).append("\n"); sb.append(" renotifyInterval: ").append(toIndentedString(renotifyInterval)).append("\n"); - sb.append(" renotifyOccurrences: ") - .append(toIndentedString(renotifyOccurrences)) - .append("\n"); + sb.append(" renotifyOccurrences: ").append(toIndentedString(renotifyOccurrences)).append("\n"); sb.append(" renotifyStatuses: ").append(toIndentedString(renotifyStatuses)).append("\n"); sb.append(" requireFullWindow: ").append(toIndentedString(requireFullWindow)).append("\n"); sb.append(" schedulingOptions: ").append(toIndentedString(schedulingOptions)).append("\n"); @@ -1137,7 +973,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsAggregation.java b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsAggregation.java index 5e5d44b3185..001da600d4a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsAggregation.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsAggregation.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Type of aggregation performed in the monitor query. */ + +/** + *

Type of aggregation performed in the monitor query.

+ */ @JsonPropertyOrder({ MonitorOptionsAggregation.JSON_PROPERTY_GROUP_BY, MonitorOptionsAggregation.JSON_PROPERTY_METRIC, MonitorOptionsAggregation.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorOptionsAggregation { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROUP_BY = "group_by"; private String groupBy; @@ -37,64 +57,61 @@ public MonitorOptionsAggregation groupBy(String groupBy) { } /** - * Group to break down the monitor on. - * + *

Group to break down the monitor on.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroupBy() { + return groupBy; + } public void setGroupBy(String groupBy) { this.groupBy = groupBy; } - public MonitorOptionsAggregation metric(String metric) { this.metric = metric; return this; } /** - * Metric name used in the monitor. - * + *

Metric name used in the monitor.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public MonitorOptionsAggregation type(String type) { this.type = type; return this; } /** - * Metric type used in the monitor. - * + *

Metric type used in the monitor.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this MonitorOptionsAggregation object is equal to o. */ + /** + * Return true if this MonitorOptionsAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } MonitorOptionsAggregation monitorOptionsAggregation = (MonitorOptionsAggregation) o; - return Objects.equals(this.groupBy, monitorOptionsAggregation.groupBy) - && Objects.equals(this.metric, monitorOptionsAggregation.metric) - && Objects.equals(this.type, monitorOptionsAggregation.type); + return Objects.equals(this.groupBy, monitorOptionsAggregation.groupBy) && Objects.equals(this.metric, monitorOptionsAggregation.metric) && Objects.equals(this.type, monitorOptionsAggregation.type); } + @Override public int hashCode() { - return Objects.hash(groupBy, metric, type); + return Objects.hash(groupBy,metric,type); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsNotificationPresets.java b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsNotificationPresets.java index 11825843e5d..6f05941036e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsNotificationPresets.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsNotificationPresets.java @@ -6,35 +6,53 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Toggles the display of additional content sent in the monitor notification. */ -@JsonSerialize( - using = MonitorOptionsNotificationPresets.MonitorOptionsNotificationPresetsSerializer.class) +/** + *

Toggles the display of additional content sent in the monitor notification.

+ */ +@JsonSerialize(using = MonitorOptionsNotificationPresets.MonitorOptionsNotificationPresetsSerializer.class) public class MonitorOptionsNotificationPresets { - public static final MonitorOptionsNotificationPresets SHOW_ALL = - new MonitorOptionsNotificationPresets("show_all"); - public static final MonitorOptionsNotificationPresets HIDE_QUERY = - new MonitorOptionsNotificationPresets("hide_query"); - public static final MonitorOptionsNotificationPresets HIDE_HANDLES = - new MonitorOptionsNotificationPresets("hide_handles"); - public static final MonitorOptionsNotificationPresets HIDE_ALL = - new MonitorOptionsNotificationPresets("hide_all"); + public static final MonitorOptionsNotificationPresets SHOW_ALL = new MonitorOptionsNotificationPresets("show_all"); + public static final MonitorOptionsNotificationPresets HIDE_QUERY = new MonitorOptionsNotificationPresets("hide_query"); + public static final MonitorOptionsNotificationPresets HIDE_HANDLES = new MonitorOptionsNotificationPresets("hide_handles"); + public static final MonitorOptionsNotificationPresets HIDE_ALL = new MonitorOptionsNotificationPresets("hide_all"); - private static final Set allowedValues = - new HashSet(Arrays.asList("show_all", "hide_query", "hide_handles", "hide_all")); + private static final Set allowedValues = new HashSet(Arrays.asList("show_all", "hide_query", "hide_handles", "hide_all")); private String value; @@ -46,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorOptionsNotificationPresetsSerializer - extends StdSerializer { - public MonitorOptionsNotificationPresetsSerializer(Class t) { - super(t); - } + public static class MonitorOptionsNotificationPresetsSerializer extends StdSerializer { + public MonitorOptionsNotificationPresetsSerializer(Class t) { + super(t); + } - public MonitorOptionsNotificationPresetsSerializer() { - this(null); - } + public MonitorOptionsNotificationPresetsSerializer() { + this(null); + } - @Override - public void serialize( - MonitorOptionsNotificationPresets value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorOptionsNotificationPresets value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -73,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorOptionsNotificationPresets object is equal to o. */ + /** + * Return true if this MonitorOptionsNotificationPresets object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptions.java b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptions.java index d64c26ad41b..9c64270d51d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptions.java @@ -6,48 +6,67 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Configuration options for scheduling. */ -@JsonPropertyOrder({MonitorOptionsSchedulingOptions.JSON_PROPERTY_EVALUATION_WINDOW}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Configuration options for scheduling.

+ */ +@JsonPropertyOrder({ + MonitorOptionsSchedulingOptions.JSON_PROPERTY_EVALUATION_WINDOW +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorOptionsSchedulingOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EVALUATION_WINDOW = "evaluation_window"; private MonitorOptionsSchedulingOptionsEvaluationWindow evaluationWindow; - public MonitorOptionsSchedulingOptions evaluationWindow( - MonitorOptionsSchedulingOptionsEvaluationWindow evaluationWindow) { + public MonitorOptionsSchedulingOptions evaluationWindow(MonitorOptionsSchedulingOptionsEvaluationWindow evaluationWindow) { this.evaluationWindow = evaluationWindow; this.unparsed |= evaluationWindow.unparsed; return this; } /** - * Configuration options for the evaluation window. If hour_starts is set, no other - * fields may be set. Otherwise, day_starts and month_starts must be set - * together. - * + *

Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

* @return evaluationWindow - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVALUATION_WINDOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOptionsSchedulingOptionsEvaluationWindow getEvaluationWindow() { - return evaluationWindow; - } - - public void setEvaluationWindow( - MonitorOptionsSchedulingOptionsEvaluationWindow evaluationWindow) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_WINDOW) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOptionsSchedulingOptionsEvaluationWindow getEvaluationWindow() { + return evaluationWindow; + } + public void setEvaluationWindow(MonitorOptionsSchedulingOptionsEvaluationWindow evaluationWindow) { this.evaluationWindow = evaluationWindow; } - /** Return true if this MonitorOptionsSchedulingOptions object is equal to o. */ + /** + * Return true if this MonitorOptionsSchedulingOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorOptionsSchedulingOptions monitorOptionsSchedulingOptions = - (MonitorOptionsSchedulingOptions) o; + MonitorOptionsSchedulingOptions monitorOptionsSchedulingOptions = (MonitorOptionsSchedulingOptions) o; return Objects.equals(this.evaluationWindow, monitorOptionsSchedulingOptions.evaluationWindow); } + @Override public int hashCode() { return Objects.hash(evaluationWindow); @@ -76,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptionsEvaluationWindow.java b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptionsEvaluationWindow.java index 6b65c1f36c8..bc8ac3b80cd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptionsEvaluationWindow.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorOptionsSchedulingOptionsEvaluationWindow.java @@ -6,26 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Configuration options for the evaluation window. If hour_starts is set, no other - * fields may be set. Otherwise, day_starts and month_starts must be set - * together. + *

Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

*/ @JsonPropertyOrder({ MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_DAY_STARTS, MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_HOUR_STARTS, MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_MONTH_STARTS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorOptionsSchedulingOptionsEvaluationWindow { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DAY_STARTS = "day_starts"; private String dayStarts; @@ -41,67 +57,65 @@ public MonitorOptionsSchedulingOptionsEvaluationWindow dayStarts(String dayStart } /** - * The time of the day at which a one day cumulative evaluation window starts. Must be defined in - * UTC time in HH:mm format. - * + *

The time of the day at which a one day cumulative evaluation window starts. Must be defined in UTC time in HH:mm format.

* @return dayStarts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DAY_STARTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDayStarts() { - return dayStarts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAY_STARTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDayStarts() { + return dayStarts; + } public void setDayStarts(String dayStarts) { this.dayStarts = dayStarts; } - public MonitorOptionsSchedulingOptionsEvaluationWindow hourStarts(Integer hourStarts) { this.hourStarts = hourStarts; return this; } /** - * The minute of the hour at which a one hour cumulative evaluation window starts. minimum: 0 + *

The minute of the hour at which a one hour cumulative evaluation window starts.

+ * minimum: 0 * maximum: 59 - * * @return hourStarts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR_STARTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getHourStarts() { - return hourStarts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR_STARTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHourStarts() { + return hourStarts; + } public void setHourStarts(Integer hourStarts) { this.hourStarts = hourStarts; } - public MonitorOptionsSchedulingOptionsEvaluationWindow monthStarts(Integer monthStarts) { this.monthStarts = monthStarts; return this; } /** - * The day of the month at which a one month cumulative evaluation window starts. minimum: 1 + *

The day of the month at which a one month cumulative evaluation window starts.

+ * minimum: 1 * maximum: 1 - * * @return monthStarts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONTH_STARTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMonthStarts() { - return monthStarts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTH_STARTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMonthStarts() { + return monthStarts; + } public void setMonthStarts(Integer monthStarts) { this.monthStarts = monthStarts; } - /** Return true if this MonitorOptionsSchedulingOptionsEvaluationWindow object is equal to o. */ + /** + * Return true if this MonitorOptionsSchedulingOptionsEvaluationWindow object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,19 +124,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorOptionsSchedulingOptionsEvaluationWindow - monitorOptionsSchedulingOptionsEvaluationWindow = - (MonitorOptionsSchedulingOptionsEvaluationWindow) o; - return Objects.equals(this.dayStarts, monitorOptionsSchedulingOptionsEvaluationWindow.dayStarts) - && Objects.equals( - this.hourStarts, monitorOptionsSchedulingOptionsEvaluationWindow.hourStarts) - && Objects.equals( - this.monthStarts, monitorOptionsSchedulingOptionsEvaluationWindow.monthStarts); + MonitorOptionsSchedulingOptionsEvaluationWindow monitorOptionsSchedulingOptionsEvaluationWindow = (MonitorOptionsSchedulingOptionsEvaluationWindow) o; + return Objects.equals(this.dayStarts, monitorOptionsSchedulingOptionsEvaluationWindow.dayStarts) && Objects.equals(this.hourStarts, monitorOptionsSchedulingOptionsEvaluationWindow.hourStarts) && Objects.equals(this.monthStarts, monitorOptionsSchedulingOptionsEvaluationWindow.monthStarts); } + @Override public int hashCode() { - return Objects.hash(dayStarts, hourStarts, monthStarts); + return Objects.hash(dayStarts,hourStarts,monthStarts); } @Override @@ -137,7 +146,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorOverallStates.java b/src/main/java/com/datadog/api/client/v1/model/MonitorOverallStates.java index 36e74fd9b19..bb97926cae7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorOverallStates.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorOverallStates.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The different states your monitor can be in. */ +/** + *

The different states your monitor can be in.

+ */ @JsonSerialize(using = MonitorOverallStates.MonitorOverallStatesSerializer.class) public class MonitorOverallStates { @@ -31,9 +55,7 @@ public class MonitorOverallStates { public static final MonitorOverallStates UNKNOWN = new MonitorOverallStates("Unknown"); public static final MonitorOverallStates WARN = new MonitorOverallStates("Warn"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("Alert", "Ignored", "No Data", "OK", "Skipped", "Unknown", "Warn")); + private static final Set allowedValues = new HashSet(Arrays.asList("Alert", "Ignored", "No Data", "OK", "Skipped", "Unknown", "Warn")); private String value; @@ -46,20 +68,18 @@ public boolean isValid() { } public static class MonitorOverallStatesSerializer extends StdSerializer { - public MonitorOverallStatesSerializer(Class t) { - super(t); - } - - public MonitorOverallStatesSerializer() { - this(null); - } - - @Override - public void serialize( - MonitorOverallStates value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MonitorOverallStatesSerializer(Class t) { + super(t); + } + + public MonitorOverallStatesSerializer() { + this(null); + } + + @Override + public void serialize(MonitorOverallStates value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +91,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorOverallStates object is equal to o. */ + /** + * Return true if this MonitorOverallStates object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +107,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorRenotifyStatusType.java b/src/main/java/com/datadog/api/client/v1/model/MonitorRenotifyStatusType.java index 149161e5b7a..ecd67528420 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorRenotifyStatusType.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorRenotifyStatusType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The different statuses for which renotification is supported. */ +/** + *

The different statuses for which renotification is supported.

+ */ @JsonSerialize(using = MonitorRenotifyStatusType.MonitorRenotifyStatusTypeSerializer.class) public class MonitorRenotifyStatusType { @@ -27,8 +51,7 @@ public class MonitorRenotifyStatusType { public static final MonitorRenotifyStatusType WARN = new MonitorRenotifyStatusType("warn"); public static final MonitorRenotifyStatusType NO_DATA = new MonitorRenotifyStatusType("no data"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alert", "warn", "no data")); + private static final Set allowedValues = new HashSet(Arrays.asList("alert", "warn", "no data")); private String value; @@ -40,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorRenotifyStatusTypeSerializer - extends StdSerializer { - public MonitorRenotifyStatusTypeSerializer(Class t) { - super(t); - } + public static class MonitorRenotifyStatusTypeSerializer extends StdSerializer { + public MonitorRenotifyStatusTypeSerializer(Class t) { + super(t); + } - public MonitorRenotifyStatusTypeSerializer() { - this(null); - } + public MonitorRenotifyStatusTypeSerializer() { + this(null); + } - @Override - public void serialize( - MonitorRenotifyStatusType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorRenotifyStatusType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorRenotifyStatusType object is equal to o. */ + /** + * Return true if this MonitorRenotifyStatusType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchCountItem.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchCountItem.java index 747273cc2b6..019058666f2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchCountItem.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchCountItem.java @@ -6,52 +6,75 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A facet item. */ + +/** + *

A facet item.

+ */ @JsonPropertyOrder({ MonitorSearchCountItem.JSON_PROPERTY_COUNT, MonitorSearchCountItem.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSearchCountItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Long count; public static final String JSON_PROPERTY_NAME = "name"; private Object name = null; + /** - * The number of found monitors with the listed value. - * + *

The number of found monitors with the listed value.

* @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCount() { - return count; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } /** - * The facet value. - * + *

The facet value.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getName() { - return name; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getName() { + return name; + } - /** Return true if this MonitorSearchCountItem object is equal to o. */ + /** + * Return true if this MonitorSearchCountItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,13 +84,13 @@ public boolean equals(Object o) { return false; } MonitorSearchCountItem monitorSearchCountItem = (MonitorSearchCountItem) o; - return Objects.equals(this.count, monitorSearchCountItem.count) - && Objects.equals(this.name, monitorSearchCountItem.name); + return Objects.equals(this.count, monitorSearchCountItem.count) && Objects.equals(this.name, monitorSearchCountItem.name); } + @Override public int hashCode() { - return Objects.hash(count, name); + return Objects.hash(count,name); } @Override @@ -81,7 +104,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponse.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponse.java index 25724b8acae..fcf2102ea79 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponse.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The response form a monitor search. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The response form a monitor search.

+ */ @JsonPropertyOrder({ MonitorSearchResponse.JSON_PROPERTY_COUNTS, MonitorSearchResponse.JSON_PROPERTY_METADATA, MonitorSearchResponse.JSON_PROPERTY_MONITORS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSearchResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNTS = "counts"; private MonitorSearchResponseCounts counts; @@ -32,18 +51,18 @@ public class MonitorSearchResponse { public static final String JSON_PROPERTY_MONITORS = "monitors"; private List monitors = null; + /** - * The counts of monitors per different criteria. - * + *

The counts of monitors per different criteria.

* @return counts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorSearchResponseCounts getCounts() { - return counts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorSearchResponseCounts getCounts() { + return counts; + } public MonitorSearchResponse metadata(MonitorSearchResponseMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -51,34 +70,35 @@ public MonitorSearchResponse metadata(MonitorSearchResponseMetadata metadata) { } /** - * Metadata about the response. - * + *

Metadata about the response.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorSearchResponseMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorSearchResponseMetadata getMetadata() { + return metadata; + } public void setMetadata(MonitorSearchResponseMetadata metadata) { this.metadata = metadata; } /** - * The list of found monitors. - * + *

The list of found monitors.

* @return monitors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitors() { - return monitors; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitors() { + return monitors; + } - /** Return true if this MonitorSearchResponse object is equal to o. */ + /** + * Return true if this MonitorSearchResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,14 +108,13 @@ public boolean equals(Object o) { return false; } MonitorSearchResponse monitorSearchResponse = (MonitorSearchResponse) o; - return Objects.equals(this.counts, monitorSearchResponse.counts) - && Objects.equals(this.metadata, monitorSearchResponse.metadata) - && Objects.equals(this.monitors, monitorSearchResponse.monitors); + return Objects.equals(this.counts, monitorSearchResponse.counts) && Objects.equals(this.metadata, monitorSearchResponse.metadata) && Objects.equals(this.monitors, monitorSearchResponse.monitors); } + @Override public int hashCode() { - return Objects.hash(counts, metadata, monitors); + return Objects.hash(counts,metadata,monitors); } @Override @@ -110,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseCounts.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseCounts.java index 0b54877da2b..99e8836f1f0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseCounts.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseCounts.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The counts of monitors per different criteria. */ + +/** + *

The counts of monitors per different criteria.

+ */ @JsonPropertyOrder({ MonitorSearchResponseCounts.JSON_PROPERTY_MUTED, MonitorSearchResponseCounts.JSON_PROPERTY_STATUS, MonitorSearchResponseCounts.JSON_PROPERTY_TAG, MonitorSearchResponseCounts.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSearchResponseCounts { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MUTED = "muted"; private List muted = null; @@ -44,7 +62,6 @@ public MonitorSearchResponseCounts muted(List muted) { } return this; } - public MonitorSearchResponseCounts addMutedItem(MonitorSearchCountItem mutedItem) { if (this.muted == null) { this.muted = new ArrayList<>(); @@ -55,21 +72,19 @@ public MonitorSearchResponseCounts addMutedItem(MonitorSearchCountItem mutedItem } /** - * Search facets. - * + *

Search facets.

* @return muted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MUTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMuted() { - return muted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MUTED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMuted() { + return muted; + } public void setMuted(List muted) { this.muted = muted; } - public MonitorSearchResponseCounts status(List status) { this.status = status; for (MonitorSearchCountItem item : status) { @@ -77,7 +92,6 @@ public MonitorSearchResponseCounts status(List status) { } return this; } - public MonitorSearchResponseCounts addStatusItem(MonitorSearchCountItem statusItem) { if (this.status == null) { this.status = new ArrayList<>(); @@ -88,21 +102,19 @@ public MonitorSearchResponseCounts addStatusItem(MonitorSearchCountItem statusIt } /** - * Search facets. - * + *

Search facets.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getStatus() { + return status; + } public void setStatus(List status) { this.status = status; } - public MonitorSearchResponseCounts tag(List tag) { this.tag = tag; for (MonitorSearchCountItem item : tag) { @@ -110,7 +122,6 @@ public MonitorSearchResponseCounts tag(List tag) { } return this; } - public MonitorSearchResponseCounts addTagItem(MonitorSearchCountItem tagItem) { if (this.tag == null) { this.tag = new ArrayList<>(); @@ -121,21 +132,19 @@ public MonitorSearchResponseCounts addTagItem(MonitorSearchCountItem tagItem) { } /** - * Search facets. - * + *

Search facets.

* @return tag - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTag() { - return tag; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTag() { + return tag; + } public void setTag(List tag) { this.tag = tag; } - public MonitorSearchResponseCounts type(List type) { this.type = type; for (MonitorSearchCountItem item : type) { @@ -143,7 +152,6 @@ public MonitorSearchResponseCounts type(List type) { } return this; } - public MonitorSearchResponseCounts addTypeItem(MonitorSearchCountItem typeItem) { if (this.type == null) { this.type = new ArrayList<>(); @@ -154,22 +162,23 @@ public MonitorSearchResponseCounts addTypeItem(MonitorSearchCountItem typeItem) } /** - * Search facets. - * + *

Search facets.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getType() { + return type; + } public void setType(List type) { this.type = type; } - /** Return true if this MonitorSearchResponseCounts object is equal to o. */ + /** + * Return true if this MonitorSearchResponseCounts object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -179,15 +188,13 @@ public boolean equals(Object o) { return false; } MonitorSearchResponseCounts monitorSearchResponseCounts = (MonitorSearchResponseCounts) o; - return Objects.equals(this.muted, monitorSearchResponseCounts.muted) - && Objects.equals(this.status, monitorSearchResponseCounts.status) - && Objects.equals(this.tag, monitorSearchResponseCounts.tag) - && Objects.equals(this.type, monitorSearchResponseCounts.type); + return Objects.equals(this.muted, monitorSearchResponseCounts.muted) && Objects.equals(this.status, monitorSearchResponseCounts.status) && Objects.equals(this.tag, monitorSearchResponseCounts.tag) && Objects.equals(this.type, monitorSearchResponseCounts.type); } + @Override public int hashCode() { - return Objects.hash(muted, status, tag, type); + return Objects.hash(muted,status,tag,type); } @Override @@ -203,7 +210,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseMetadata.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseMetadata.java index 6ec553a3b22..d9423196292 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResponseMetadata.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Metadata about the response. */ +/** + *

Metadata about the response.

+ */ @JsonPropertyOrder({ MonitorSearchResponseMetadata.JSON_PROPERTY_PAGE, MonitorSearchResponseMetadata.JSON_PROPERTY_PAGE_COUNT, MonitorSearchResponseMetadata.JSON_PROPERTY_PER_PAGE, MonitorSearchResponseMetadata.JSON_PROPERTY_TOTAL_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSearchResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private Long page; @@ -35,55 +55,58 @@ public class MonitorSearchResponseMetadata { public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; + /** - * The page to start paginating from. - * + *

The page to start paginating from.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPage() { - return page; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPage() { + return page; + } /** - * The number of pages. - * + *

The number of pages.

* @return pageCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPageCount() { - return pageCount; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPageCount() { + return pageCount; + } /** - * The number of monitors to return per page. - * + *

The number of monitors to return per page.

* @return perPage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PER_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPerPage() { - return perPage; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PER_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPerPage() { + return perPage; + } /** - * The total number of monitors. - * + *

The total number of monitors.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } - /** Return true if this MonitorSearchResponseMetadata object is equal to o. */ + /** + * Return true if this MonitorSearchResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +116,13 @@ public boolean equals(Object o) { return false; } MonitorSearchResponseMetadata monitorSearchResponseMetadata = (MonitorSearchResponseMetadata) o; - return Objects.equals(this.page, monitorSearchResponseMetadata.page) - && Objects.equals(this.pageCount, monitorSearchResponseMetadata.pageCount) - && Objects.equals(this.perPage, monitorSearchResponseMetadata.perPage) - && Objects.equals(this.totalCount, monitorSearchResponseMetadata.totalCount); + return Objects.equals(this.page, monitorSearchResponseMetadata.page) && Objects.equals(this.pageCount, monitorSearchResponseMetadata.pageCount) && Objects.equals(this.perPage, monitorSearchResponseMetadata.perPage) && Objects.equals(this.totalCount, monitorSearchResponseMetadata.totalCount); } + @Override public int hashCode() { - return Objects.hash(page, pageCount, perPage, totalCount); + return Objects.hash(page,pageCount,perPage,totalCount); } @Override @@ -117,7 +138,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResult.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResult.java index aff3d2b281d..808ba4620b0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResult.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResult.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Holds search results. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Holds search results.

+ */ @JsonPropertyOrder({ MonitorSearchResult.JSON_PROPERTY_CLASSIFICATION, MonitorSearchResult.JSON_PROPERTY_CREATOR, @@ -31,10 +48,10 @@ MonitorSearchResult.JSON_PROPERTY_TAGS, MonitorSearchResult.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSearchResult { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CLASSIFICATION = "classification"; private String classification; @@ -74,142 +91,136 @@ public class MonitorSearchResult { public static final String JSON_PROPERTY_TYPE = "type"; private MonitorType type; + /** - * Classification of the monitor. - * + *

Classification of the monitor.

* @return classification - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLASSIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClassification() { - return classification; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLASSIFICATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClassification() { + return classification; + } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } /** - * ID of the monitor. - * + *

ID of the monitor.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } /** - * Latest timestamp the monitor triggered. - * + *

Latest timestamp the monitor triggered.

* @return lastTriggeredTs - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getLastTriggeredTs() { - - if (lastTriggeredTs == null) { - lastTriggeredTs = JsonNullable.undefined(); - } - return lastTriggeredTs.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getLastTriggeredTs() { + + if (lastTriggeredTs == null) { + lastTriggeredTs = JsonNullable.undefined(); + } + return lastTriggeredTs.orElse(null); + } @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getLastTriggeredTs_JsonNullable() { return lastTriggeredTs; } - - @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS) - private void setLastTriggeredTs_JsonNullable(JsonNullable lastTriggeredTs) { + @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS)private void setLastTriggeredTs_JsonNullable(JsonNullable lastTriggeredTs) { this.lastTriggeredTs = lastTriggeredTs; } /** - * Metrics used by the monitor. - * + *

Metrics used by the monitor.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetrics() { - return metrics; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetrics() { + return metrics; + } /** - * The monitor name. - * + *

The monitor name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } /** - * The notification triggered by the monitor. - * + *

The notification triggered by the monitor.

* @return notifications - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotifications() { - return notifications; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotifications() { + return notifications; + } /** - * The ID of the organization. - * + *

The ID of the organization.

* @return orgId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOrgId() { - return orgId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrgId() { + return orgId; + } public MonitorSearchResult query(String query) { this.query = query; return this; } /** - * The monitor query. - * + *

The monitor query.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public MonitorSearchResult scopes(List scopes) { this.scopes = scopes; return this; } - public MonitorSearchResult addScopesItem(String scopesItem) { if (this.scopes == null) { this.scopes = new ArrayList<>(); @@ -219,48 +230,46 @@ public MonitorSearchResult addScopesItem(String scopesItem) { } /** - * The scope(s) to which the downtime applies, for example host:app2. Provide - * multiple scopes as a comma-separated list, for example env:dev,env:prod. The - * resulting downtime applies to sources that matches ALL provided scopes (that is - * env:dev AND env:prod), NOT any of them. - * + *

The scope(s) to which the downtime applies, for example host:app2. + * Provide multiple scopes as a comma-separated list, for example env:dev,env:prod. + * The resulting downtime applies to sources that matches ALL provided scopes + * (that is env:dev AND env:prod), NOT any of them.

* @return scopes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getScopes() { - return scopes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getScopes() { + return scopes; + } public void setScopes(List scopes) { this.scopes = scopes; } /** - * The different states your monitor can be in. - * + *

The different states your monitor can be in.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOverallStates getStatus() { - return status; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOverallStates getStatus() { + return status; + } /** - * Tags associated with the monitor. - * + *

Tags associated with the monitor.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public MonitorSearchResult type(MonitorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -268,26 +277,26 @@ public MonitorSearchResult type(MonitorType type) { } /** - * The type of the monitor. For more information about type, see the monitor options docs. - * + *

The type of the monitor. For more information about type, see the monitor options docs.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorType getType() { + return type; + } public void setType(MonitorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MonitorSearchResult object is equal to o. */ + /** + * Return true if this MonitorSearchResult object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -297,37 +306,13 @@ public boolean equals(Object o) { return false; } MonitorSearchResult monitorSearchResult = (MonitorSearchResult) o; - return Objects.equals(this.classification, monitorSearchResult.classification) - && Objects.equals(this.creator, monitorSearchResult.creator) - && Objects.equals(this.id, monitorSearchResult.id) - && Objects.equals(this.lastTriggeredTs, monitorSearchResult.lastTriggeredTs) - && Objects.equals(this.metrics, monitorSearchResult.metrics) - && Objects.equals(this.name, monitorSearchResult.name) - && Objects.equals(this.notifications, monitorSearchResult.notifications) - && Objects.equals(this.orgId, monitorSearchResult.orgId) - && Objects.equals(this.query, monitorSearchResult.query) - && Objects.equals(this.scopes, monitorSearchResult.scopes) - && Objects.equals(this.status, monitorSearchResult.status) - && Objects.equals(this.tags, monitorSearchResult.tags) - && Objects.equals(this.type, monitorSearchResult.type); + return Objects.equals(this.classification, monitorSearchResult.classification) && Objects.equals(this.creator, monitorSearchResult.creator) && Objects.equals(this.id, monitorSearchResult.id) && Objects.equals(this.lastTriggeredTs, monitorSearchResult.lastTriggeredTs) && Objects.equals(this.metrics, monitorSearchResult.metrics) && Objects.equals(this.name, monitorSearchResult.name) && Objects.equals(this.notifications, monitorSearchResult.notifications) && Objects.equals(this.orgId, monitorSearchResult.orgId) && Objects.equals(this.query, monitorSearchResult.query) && Objects.equals(this.scopes, monitorSearchResult.scopes) && Objects.equals(this.status, monitorSearchResult.status) && Objects.equals(this.tags, monitorSearchResult.tags) && Objects.equals(this.type, monitorSearchResult.type); } + @Override public int hashCode() { - return Objects.hash( - classification, - creator, - id, - lastTriggeredTs, - metrics, - name, - notifications, - orgId, - query, - scopes, - status, - tags, - type); + return Objects.hash(classification,creator,id,lastTriggeredTs,metrics,name,notifications,orgId,query,scopes,status,tags,type); } @Override @@ -352,7 +337,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResultNotification.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResultNotification.java index eaa7764f456..17edefab6f5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResultNotification.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSearchResultNotification.java @@ -6,52 +6,75 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A notification triggered by the monitor. */ + +/** + *

A notification triggered by the monitor.

+ */ @JsonPropertyOrder({ MonitorSearchResultNotification.JSON_PROPERTY_HANDLE, MonitorSearchResultNotification.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSearchResultNotification { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HANDLE = "handle"; private String handle; public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * The email address that received the notification. - * + *

The email address that received the notification.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } /** - * The username receiving the notification - * + *

The username receiving the notification

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } - /** Return true if this MonitorSearchResultNotification object is equal to o. */ + /** + * Return true if this MonitorSearchResultNotification object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -60,15 +83,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorSearchResultNotification monitorSearchResultNotification = - (MonitorSearchResultNotification) o; - return Objects.equals(this.handle, monitorSearchResultNotification.handle) - && Objects.equals(this.name, monitorSearchResultNotification.name); + MonitorSearchResultNotification monitorSearchResultNotification = (MonitorSearchResultNotification) o; + return Objects.equals(this.handle, monitorSearchResultNotification.handle) && Objects.equals(this.name, monitorSearchResultNotification.name); } + @Override public int hashCode() { - return Objects.hash(handle, name); + return Objects.hash(handle,name); } @Override @@ -82,7 +104,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorState.java b/src/main/java/com/datadog/api/client/v1/model/MonitorState.java index 3cf45fe5fc5..fc9cc3c8716 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorState.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorState.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Wrapper object with the different monitor states. */ -@JsonPropertyOrder({MonitorState.JSON_PROPERTY_GROUPS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Wrapper object with the different monitor states.

+ */ +@JsonPropertyOrder({ + MonitorState.JSON_PROPERTY_GROUPS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorState { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROUPS = "groups"; private Map groups = null; @@ -27,7 +47,6 @@ public MonitorState groups(Map groups) { this.groups = groups; return this; } - public MonitorState putGroupsItem(String key, MonitorStateGroup groupsItem) { if (this.groups == null) { this.groups = new HashMap<>(); @@ -37,23 +56,24 @@ public MonitorState putGroupsItem(String key, MonitorStateGroup groupsItem) { } /** - * Dictionary where the keys are groups (comma separated lists of tags) and the values are the - * list of groups your monitor is broken down on. - * + *

Dictionary where the keys are groups (comma separated lists of tags) and the values are + * the list of groups your monitor is broken down on.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getGroups() { + return groups; + } public void setGroups(Map groups) { this.groups = groups; } - /** Return true if this MonitorState object is equal to o. */ + /** + * Return true if this MonitorState object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.groups, monitorState.groups); } + @Override public int hashCode() { return Objects.hash(groups); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorStateGroup.java b/src/main/java/com/datadog/api/client/v1/model/MonitorStateGroup.java index 52aeece8a40..6975ee17d54 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorStateGroup.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorStateGroup.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Monitor state for a single group. */ +/** + *

Monitor state for a single group.

+ */ @JsonPropertyOrder({ MonitorStateGroup.JSON_PROPERTY_LAST_NODATA_TS, MonitorStateGroup.JSON_PROPERTY_LAST_NOTIFIED_TS, @@ -21,10 +41,10 @@ MonitorStateGroup.JSON_PROPERTY_NAME, MonitorStateGroup.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorStateGroup { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LAST_NODATA_TS = "last_nodata_ts"; private Long lastNodataTs; @@ -49,118 +69,111 @@ public MonitorStateGroup lastNodataTs(Long lastNodataTs) { } /** - * Latest timestamp the monitor was in NO_DATA state. - * + *

Latest timestamp the monitor was in NO_DATA state.

* @return lastNodataTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_NODATA_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastNodataTs() { - return lastNodataTs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_NODATA_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastNodataTs() { + return lastNodataTs; + } public void setLastNodataTs(Long lastNodataTs) { this.lastNodataTs = lastNodataTs; } - public MonitorStateGroup lastNotifiedTs(Long lastNotifiedTs) { this.lastNotifiedTs = lastNotifiedTs; return this; } /** - * Latest timestamp of the notification sent for this monitor group. - * + *

Latest timestamp of the notification sent for this monitor group.

* @return lastNotifiedTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_NOTIFIED_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastNotifiedTs() { - return lastNotifiedTs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_NOTIFIED_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastNotifiedTs() { + return lastNotifiedTs; + } public void setLastNotifiedTs(Long lastNotifiedTs) { this.lastNotifiedTs = lastNotifiedTs; } - public MonitorStateGroup lastResolvedTs(Long lastResolvedTs) { this.lastResolvedTs = lastResolvedTs; return this; } /** - * Latest timestamp the monitor group was resolved. - * + *

Latest timestamp the monitor group was resolved.

* @return lastResolvedTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_RESOLVED_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastResolvedTs() { - return lastResolvedTs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_RESOLVED_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastResolvedTs() { + return lastResolvedTs; + } public void setLastResolvedTs(Long lastResolvedTs) { this.lastResolvedTs = lastResolvedTs; } - public MonitorStateGroup lastTriggeredTs(Long lastTriggeredTs) { this.lastTriggeredTs = lastTriggeredTs; return this; } /** - * Latest timestamp the monitor group triggered. - * + *

Latest timestamp the monitor group triggered.

* @return lastTriggeredTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastTriggeredTs() { - return lastTriggeredTs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastTriggeredTs() { + return lastTriggeredTs; + } public void setLastTriggeredTs(Long lastTriggeredTs) { this.lastTriggeredTs = lastTriggeredTs; } - public MonitorStateGroup name(String name) { this.name = name; return this; } /** - * The name of the monitor. - * + *

The name of the monitor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } /** - * The different states your monitor can be in. - * + *

The different states your monitor can be in.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOverallStates getStatus() { - return status; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOverallStates getStatus() { + return status; + } - /** Return true if this MonitorStateGroup object is equal to o. */ + /** + * Return true if this MonitorStateGroup object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -170,18 +183,13 @@ public boolean equals(Object o) { return false; } MonitorStateGroup monitorStateGroup = (MonitorStateGroup) o; - return Objects.equals(this.lastNodataTs, monitorStateGroup.lastNodataTs) - && Objects.equals(this.lastNotifiedTs, monitorStateGroup.lastNotifiedTs) - && Objects.equals(this.lastResolvedTs, monitorStateGroup.lastResolvedTs) - && Objects.equals(this.lastTriggeredTs, monitorStateGroup.lastTriggeredTs) - && Objects.equals(this.name, monitorStateGroup.name) - && Objects.equals(this.status, monitorStateGroup.status); + return Objects.equals(this.lastNodataTs, monitorStateGroup.lastNodataTs) && Objects.equals(this.lastNotifiedTs, monitorStateGroup.lastNotifiedTs) && Objects.equals(this.lastResolvedTs, monitorStateGroup.lastResolvedTs) && Objects.equals(this.lastTriggeredTs, monitorStateGroup.lastTriggeredTs) && Objects.equals(this.name, monitorStateGroup.name) && Objects.equals(this.status, monitorStateGroup.status); } + @Override public int hashCode() { - return Objects.hash( - lastNodataTs, lastNotifiedTs, lastResolvedTs, lastTriggeredTs, name, status); + return Objects.hash(lastNodataTs,lastNotifiedTs,lastResolvedTs,lastTriggeredTs,name,status); } @Override @@ -199,7 +207,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinition.java index 0a8bce2e83c..f42228dfe17 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The monitor summary widget displays a summary view of all your Datadog monitors, or a subset - * based on a query. Only available on FREE layout dashboards. + *

The monitor summary widget displays a summary view of all your Datadog monitors, or a subset based on a query. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ MonitorSummaryWidgetDefinition.JSON_PROPERTY_COLOR_PREFERENCE, @@ -33,10 +49,10 @@ MonitorSummaryWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, MonitorSummaryWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorSummaryWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLOR_PREFERENCE = "color_preference"; private WidgetColorPreference colorPreference; @@ -77,21 +93,18 @@ public class MonitorSummaryWidgetDefinition { private String titleSize; public static final String JSON_PROPERTY_TYPE = "type"; - private MonitorSummaryWidgetDefinitionType type = - MonitorSummaryWidgetDefinitionType.MANAGE_STATUS; + private MonitorSummaryWidgetDefinitionType type = MonitorSummaryWidgetDefinitionType.MANAGE_STATUS; public MonitorSummaryWidgetDefinition() {} @JsonCreator public MonitorSummaryWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - MonitorSummaryWidgetDefinitionType type) { - this.query = query; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MonitorSummaryWidgetDefinitionType type) { + this.query = query; + this.type = type; + this.unparsed |= !type.isValid(); } - public MonitorSummaryWidgetDefinition colorPreference(WidgetColorPreference colorPreference) { this.colorPreference = colorPreference; this.unparsed |= !colorPreference.isValid(); @@ -99,157 +112,142 @@ public MonitorSummaryWidgetDefinition colorPreference(WidgetColorPreference colo } /** - * Which color to use on the widget. - * + *

Which color to use on the widget.

* @return colorPreference - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLOR_PREFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetColorPreference getColorPreference() { - return colorPreference; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR_PREFERENCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetColorPreference getColorPreference() { + return colorPreference; + } public void setColorPreference(WidgetColorPreference colorPreference) { if (!colorPreference.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.colorPreference = colorPreference; } - public MonitorSummaryWidgetDefinition count(Long count) { this.count = count; return this; } /** - * The number of monitors to display. - * + *

The number of monitors to display.

* @return count * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCount() { - return count; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } @Deprecated public void setCount(Long count) { this.count = count; } - - public MonitorSummaryWidgetDefinition displayFormat( - WidgetMonitorSummaryDisplayFormat displayFormat) { + public MonitorSummaryWidgetDefinition displayFormat(WidgetMonitorSummaryDisplayFormat displayFormat) { this.displayFormat = displayFormat; this.unparsed |= !displayFormat.isValid(); return this; } /** - * What to display on the widget. - * + *

What to display on the widget.

* @return displayFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetMonitorSummaryDisplayFormat getDisplayFormat() { - return displayFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetMonitorSummaryDisplayFormat getDisplayFormat() { + return displayFormat; + } public void setDisplayFormat(WidgetMonitorSummaryDisplayFormat displayFormat) { if (!displayFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.displayFormat = displayFormat; } - public MonitorSummaryWidgetDefinition hideZeroCounts(Boolean hideZeroCounts) { this.hideZeroCounts = hideZeroCounts; return this; } /** - * Whether to show counts of 0 or not. - * + *

Whether to show counts of 0 or not.

* @return hideZeroCounts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HIDE_ZERO_COUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideZeroCounts() { - return hideZeroCounts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_ZERO_COUNTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideZeroCounts() { + return hideZeroCounts; + } public void setHideZeroCounts(Boolean hideZeroCounts) { this.hideZeroCounts = hideZeroCounts; } - public MonitorSummaryWidgetDefinition query(String query) { this.query = query; return this; } /** - * Query to filter the monitors with. - * + *

Query to filter the monitors with.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public MonitorSummaryWidgetDefinition showLastTriggered(Boolean showLastTriggered) { this.showLastTriggered = showLastTriggered; return this; } /** - * Whether to show the time that has elapsed since the monitor/group triggered. - * + *

Whether to show the time that has elapsed since the monitor/group triggered.

* @return showLastTriggered - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_LAST_TRIGGERED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowLastTriggered() { - return showLastTriggered; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_LAST_TRIGGERED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowLastTriggered() { + return showLastTriggered; + } public void setShowLastTriggered(Boolean showLastTriggered) { this.showLastTriggered = showLastTriggered; } - public MonitorSummaryWidgetDefinition showPriority(Boolean showPriority) { this.showPriority = showPriority; return this; } /** - * Whether to show the priorities column. - * + *

Whether to show the priorities column.

* @return showPriority - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPriority() { - return showPriority; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_PRIORITY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowPriority() { + return showPriority; + } public void setShowPriority(Boolean showPriority) { this.showPriority = showPriority; } - public MonitorSummaryWidgetDefinition sort(WidgetMonitorSummarySort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -257,48 +255,44 @@ public MonitorSummaryWidgetDefinition sort(WidgetMonitorSummarySort sort) { } /** - * Widget sorting methods. - * + *

Widget sorting methods.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetMonitorSummarySort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetMonitorSummarySort getSort() { + return sort; + } public void setSort(WidgetMonitorSummarySort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - public MonitorSummaryWidgetDefinition start(Long start) { this.start = start; return this; } /** - * The start of the list. Typically 0. - * + *

The start of the list. Typically 0.

* @return start * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } @Deprecated public void setStart(Long start) { this.start = start; } - public MonitorSummaryWidgetDefinition summaryType(WidgetSummaryType summaryType) { this.summaryType = summaryType; this.unparsed |= !summaryType.isValid(); @@ -306,45 +300,41 @@ public MonitorSummaryWidgetDefinition summaryType(WidgetSummaryType summaryType) } /** - * Which summary type should be used. - * + *

Which summary type should be used.

* @return summaryType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUMMARY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetSummaryType getSummaryType() { - return summaryType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUMMARY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetSummaryType getSummaryType() { + return summaryType; + } public void setSummaryType(WidgetSummaryType summaryType) { if (!summaryType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.summaryType = summaryType; } - public MonitorSummaryWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public MonitorSummaryWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -352,45 +342,41 @@ public MonitorSummaryWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public MonitorSummaryWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public MonitorSummaryWidgetDefinition type(MonitorSummaryWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -398,24 +384,25 @@ public MonitorSummaryWidgetDefinition type(MonitorSummaryWidgetDefinitionType ty } /** - * Type of the monitor summary widget. - * + *

Type of the monitor summary widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorSummaryWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorSummaryWidgetDefinitionType getType() { + return type; + } public void setType(MonitorSummaryWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MonitorSummaryWidgetDefinition object is equal to o. */ + /** + * Return true if this MonitorSummaryWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -424,41 +411,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorSummaryWidgetDefinition monitorSummaryWidgetDefinition = - (MonitorSummaryWidgetDefinition) o; - return Objects.equals(this.colorPreference, monitorSummaryWidgetDefinition.colorPreference) - && Objects.equals(this.count, monitorSummaryWidgetDefinition.count) - && Objects.equals(this.displayFormat, monitorSummaryWidgetDefinition.displayFormat) - && Objects.equals(this.hideZeroCounts, monitorSummaryWidgetDefinition.hideZeroCounts) - && Objects.equals(this.query, monitorSummaryWidgetDefinition.query) - && Objects.equals(this.showLastTriggered, monitorSummaryWidgetDefinition.showLastTriggered) - && Objects.equals(this.showPriority, monitorSummaryWidgetDefinition.showPriority) - && Objects.equals(this.sort, monitorSummaryWidgetDefinition.sort) - && Objects.equals(this.start, monitorSummaryWidgetDefinition.start) - && Objects.equals(this.summaryType, monitorSummaryWidgetDefinition.summaryType) - && Objects.equals(this.title, monitorSummaryWidgetDefinition.title) - && Objects.equals(this.titleAlign, monitorSummaryWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, monitorSummaryWidgetDefinition.titleSize) - && Objects.equals(this.type, monitorSummaryWidgetDefinition.type); + MonitorSummaryWidgetDefinition monitorSummaryWidgetDefinition = (MonitorSummaryWidgetDefinition) o; + return Objects.equals(this.colorPreference, monitorSummaryWidgetDefinition.colorPreference) && Objects.equals(this.count, monitorSummaryWidgetDefinition.count) && Objects.equals(this.displayFormat, monitorSummaryWidgetDefinition.displayFormat) && Objects.equals(this.hideZeroCounts, monitorSummaryWidgetDefinition.hideZeroCounts) && Objects.equals(this.query, monitorSummaryWidgetDefinition.query) && Objects.equals(this.showLastTriggered, monitorSummaryWidgetDefinition.showLastTriggered) && Objects.equals(this.showPriority, monitorSummaryWidgetDefinition.showPriority) && Objects.equals(this.sort, monitorSummaryWidgetDefinition.sort) && Objects.equals(this.start, monitorSummaryWidgetDefinition.start) && Objects.equals(this.summaryType, monitorSummaryWidgetDefinition.summaryType) && Objects.equals(this.title, monitorSummaryWidgetDefinition.title) && Objects.equals(this.titleAlign, monitorSummaryWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, monitorSummaryWidgetDefinition.titleSize) && Objects.equals(this.type, monitorSummaryWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - colorPreference, - count, - displayFormat, - hideZeroCounts, - query, - showLastTriggered, - showPriority, - sort, - start, - summaryType, - title, - titleAlign, - titleSize, - type); + return Objects.hash(colorPreference,count,displayFormat,hideZeroCounts,query,showLastTriggered,showPriority,sort,start,summaryType,title,titleAlign,titleSize,type); } @Override @@ -484,7 +444,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinitionType.java index b4786d7b278..52f7866d1e2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorSummaryWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the monitor summary widget. */ -@JsonSerialize( - using = MonitorSummaryWidgetDefinitionType.MonitorSummaryWidgetDefinitionTypeSerializer.class) +/** + *

Type of the monitor summary widget.

+ */ +@JsonSerialize(using = MonitorSummaryWidgetDefinitionType.MonitorSummaryWidgetDefinitionTypeSerializer.class) public class MonitorSummaryWidgetDefinitionType { - public static final MonitorSummaryWidgetDefinitionType MANAGE_STATUS = - new MonitorSummaryWidgetDefinitionType("manage_status"); + public static final MonitorSummaryWidgetDefinitionType MANAGE_STATUS = new MonitorSummaryWidgetDefinitionType("manage_status"); - private static final Set allowedValues = - new HashSet(Arrays.asList("manage_status")); + private static final Set allowedValues = new HashSet(Arrays.asList("manage_status")); private String value; @@ -40,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorSummaryWidgetDefinitionTypeSerializer - extends StdSerializer { - public MonitorSummaryWidgetDefinitionTypeSerializer( - Class t) { - super(t); - } + public static class MonitorSummaryWidgetDefinitionTypeSerializer extends StdSerializer { + public MonitorSummaryWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public MonitorSummaryWidgetDefinitionTypeSerializer() { - this(null); - } + public MonitorSummaryWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - MonitorSummaryWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorSummaryWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorSummaryWidgetDefinitionType object is equal to o. */ + /** + * Return true if this MonitorSummaryWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorThresholdWindowOptions.java b/src/main/java/com/datadog/api/client/v1/model/MonitorThresholdWindowOptions.java index 5927d2ca9e0..2132be47473 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorThresholdWindowOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorThresholdWindowOptions.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Alerting time window options. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Alerting time window options.

+ */ @JsonPropertyOrder({ MonitorThresholdWindowOptions.JSON_PROPERTY_RECOVERY_WINDOW, MonitorThresholdWindowOptions.JSON_PROPERTY_TRIGGER_WINDOW }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorThresholdWindowOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RECOVERY_WINDOW = "recovery_window"; private JsonNullable recoveryWindow = JsonNullable.undefined(); @@ -34,63 +53,56 @@ public MonitorThresholdWindowOptions recoveryWindow(String recoveryWindow) { } /** - * Describes how long an anomalous metric must be normal before the alert recovers. - * + *

Describes how long an anomalous metric must be normal before the alert recovers.

* @return recoveryWindow - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getRecoveryWindow() { - return recoveryWindow.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getRecoveryWindow() { + return recoveryWindow.orElse(null); + } @JsonProperty(JSON_PROPERTY_RECOVERY_WINDOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRecoveryWindow_JsonNullable() { return recoveryWindow; } - - @JsonProperty(JSON_PROPERTY_RECOVERY_WINDOW) - public void setRecoveryWindow_JsonNullable(JsonNullable recoveryWindow) { + @JsonProperty(JSON_PROPERTY_RECOVERY_WINDOW)public void setRecoveryWindow_JsonNullable(JsonNullable recoveryWindow) { this.recoveryWindow = recoveryWindow; } - public void setRecoveryWindow(String recoveryWindow) { this.recoveryWindow = JsonNullable.of(recoveryWindow); } - public MonitorThresholdWindowOptions triggerWindow(String triggerWindow) { this.triggerWindow = JsonNullable.of(triggerWindow); return this; } /** - * Describes how long a metric must be anomalous before an alert triggers. - * + *

Describes how long a metric must be anomalous before an alert triggers.

* @return triggerWindow - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getTriggerWindow() { - return triggerWindow.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTriggerWindow() { + return triggerWindow.orElse(null); + } @JsonProperty(JSON_PROPERTY_TRIGGER_WINDOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTriggerWindow_JsonNullable() { return triggerWindow; } - - @JsonProperty(JSON_PROPERTY_TRIGGER_WINDOW) - public void setTriggerWindow_JsonNullable(JsonNullable triggerWindow) { + @JsonProperty(JSON_PROPERTY_TRIGGER_WINDOW)public void setTriggerWindow_JsonNullable(JsonNullable triggerWindow) { this.triggerWindow = triggerWindow; } - public void setTriggerWindow(String triggerWindow) { this.triggerWindow = JsonNullable.of(triggerWindow); } - /** Return true if this MonitorThresholdWindowOptions object is equal to o. */ + /** + * Return true if this MonitorThresholdWindowOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -100,13 +112,13 @@ public boolean equals(Object o) { return false; } MonitorThresholdWindowOptions monitorThresholdWindowOptions = (MonitorThresholdWindowOptions) o; - return Objects.equals(this.recoveryWindow, monitorThresholdWindowOptions.recoveryWindow) - && Objects.equals(this.triggerWindow, monitorThresholdWindowOptions.triggerWindow); + return Objects.equals(this.recoveryWindow, monitorThresholdWindowOptions.recoveryWindow) && Objects.equals(this.triggerWindow, monitorThresholdWindowOptions.triggerWindow); } + @Override public int hashCode() { - return Objects.hash(recoveryWindow, triggerWindow); + return Objects.hash(recoveryWindow,triggerWindow); } @Override @@ -120,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorThresholds.java b/src/main/java/com/datadog/api/client/v1/model/MonitorThresholds.java index 0af797da084..d75c77d31e2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorThresholds.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorThresholds.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** List of the different monitor threshold available. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

List of the different monitor threshold available.

+ */ @JsonPropertyOrder({ MonitorThresholds.JSON_PROPERTY_CRITICAL, MonitorThresholds.JSON_PROPERTY_CRITICAL_RECOVERY, @@ -22,10 +41,10 @@ MonitorThresholds.JSON_PROPERTY_WARNING, MonitorThresholds.JSON_PROPERTY_WARNING_RECOVERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorThresholds { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CRITICAL = "critical"; private Double critical; @@ -50,177 +69,153 @@ public MonitorThresholds critical(Double critical) { } /** - * The monitor CRITICAL threshold. - * + *

The monitor CRITICAL threshold.

* @return critical - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CRITICAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCritical() { - return critical; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CRITICAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCritical() { + return critical; + } public void setCritical(Double critical) { this.critical = critical; } - public MonitorThresholds criticalRecovery(Double criticalRecovery) { this.criticalRecovery = JsonNullable.of(criticalRecovery); return this; } /** - * The monitor CRITICAL recovery threshold. - * + *

The monitor CRITICAL recovery threshold.

* @return criticalRecovery - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getCriticalRecovery() { - return criticalRecovery.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getCriticalRecovery() { + return criticalRecovery.orElse(null); + } @JsonProperty(JSON_PROPERTY_CRITICAL_RECOVERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCriticalRecovery_JsonNullable() { return criticalRecovery; } - - @JsonProperty(JSON_PROPERTY_CRITICAL_RECOVERY) - public void setCriticalRecovery_JsonNullable(JsonNullable criticalRecovery) { + @JsonProperty(JSON_PROPERTY_CRITICAL_RECOVERY)public void setCriticalRecovery_JsonNullable(JsonNullable criticalRecovery) { this.criticalRecovery = criticalRecovery; } - public void setCriticalRecovery(Double criticalRecovery) { this.criticalRecovery = JsonNullable.of(criticalRecovery); } - public MonitorThresholds ok(Double ok) { this.ok = JsonNullable.of(ok); return this; } /** - * The monitor OK threshold. - * + *

The monitor OK threshold.

* @return ok - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getOk() { - return ok.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getOk() { + return ok.orElse(null); + } @JsonProperty(JSON_PROPERTY_OK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getOk_JsonNullable() { return ok; } - - @JsonProperty(JSON_PROPERTY_OK) - public void setOk_JsonNullable(JsonNullable ok) { + @JsonProperty(JSON_PROPERTY_OK)public void setOk_JsonNullable(JsonNullable ok) { this.ok = ok; } - public void setOk(Double ok) { this.ok = JsonNullable.of(ok); } - public MonitorThresholds unknown(Double unknown) { this.unknown = JsonNullable.of(unknown); return this; } /** - * The monitor UNKNOWN threshold. - * + *

The monitor UNKNOWN threshold.

* @return unknown - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getUnknown() { - return unknown.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getUnknown() { + return unknown.orElse(null); + } @JsonProperty(JSON_PROPERTY_UNKNOWN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getUnknown_JsonNullable() { return unknown; } - - @JsonProperty(JSON_PROPERTY_UNKNOWN) - public void setUnknown_JsonNullable(JsonNullable unknown) { + @JsonProperty(JSON_PROPERTY_UNKNOWN)public void setUnknown_JsonNullable(JsonNullable unknown) { this.unknown = unknown; } - public void setUnknown(Double unknown) { this.unknown = JsonNullable.of(unknown); } - public MonitorThresholds warning(Double warning) { this.warning = JsonNullable.of(warning); return this; } /** - * The monitor WARNING threshold. - * + *

The monitor WARNING threshold.

* @return warning - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getWarning() { - return warning.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getWarning() { + return warning.orElse(null); + } @JsonProperty(JSON_PROPERTY_WARNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getWarning_JsonNullable() { return warning; } - - @JsonProperty(JSON_PROPERTY_WARNING) - public void setWarning_JsonNullable(JsonNullable warning) { + @JsonProperty(JSON_PROPERTY_WARNING)public void setWarning_JsonNullable(JsonNullable warning) { this.warning = warning; } - public void setWarning(Double warning) { this.warning = JsonNullable.of(warning); } - public MonitorThresholds warningRecovery(Double warningRecovery) { this.warningRecovery = JsonNullable.of(warningRecovery); return this; } /** - * The monitor WARNING recovery threshold. - * + *

The monitor WARNING recovery threshold.

* @return warningRecovery - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getWarningRecovery() { - return warningRecovery.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getWarningRecovery() { + return warningRecovery.orElse(null); + } @JsonProperty(JSON_PROPERTY_WARNING_RECOVERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getWarningRecovery_JsonNullable() { return warningRecovery; } - - @JsonProperty(JSON_PROPERTY_WARNING_RECOVERY) - public void setWarningRecovery_JsonNullable(JsonNullable warningRecovery) { + @JsonProperty(JSON_PROPERTY_WARNING_RECOVERY)public void setWarningRecovery_JsonNullable(JsonNullable warningRecovery) { this.warningRecovery = warningRecovery; } - public void setWarningRecovery(Double warningRecovery) { this.warningRecovery = JsonNullable.of(warningRecovery); } - /** Return true if this MonitorThresholds object is equal to o. */ + /** + * Return true if this MonitorThresholds object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -230,17 +225,13 @@ public boolean equals(Object o) { return false; } MonitorThresholds monitorThresholds = (MonitorThresholds) o; - return Objects.equals(this.critical, monitorThresholds.critical) - && Objects.equals(this.criticalRecovery, monitorThresholds.criticalRecovery) - && Objects.equals(this.ok, monitorThresholds.ok) - && Objects.equals(this.unknown, monitorThresholds.unknown) - && Objects.equals(this.warning, monitorThresholds.warning) - && Objects.equals(this.warningRecovery, monitorThresholds.warningRecovery); + return Objects.equals(this.critical, monitorThresholds.critical) && Objects.equals(this.criticalRecovery, monitorThresholds.criticalRecovery) && Objects.equals(this.ok, monitorThresholds.ok) && Objects.equals(this.unknown, monitorThresholds.unknown) && Objects.equals(this.warning, monitorThresholds.warning) && Objects.equals(this.warningRecovery, monitorThresholds.warningRecovery); } + @Override public int hashCode() { - return Objects.hash(critical, criticalRecovery, ok, unknown, warning, warningRecovery); + return Objects.hash(critical,criticalRecovery,ok,unknown,warning,warningRecovery); } @Override @@ -258,7 +249,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorType.java b/src/main/java/com/datadog/api/client/v1/model/MonitorType.java index 3ab74bd1145..f7d8dbef6f3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorType.java @@ -6,22 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The type of the monitor. For more information about type, see the monitor options docs. + *

The type of the monitor. For more information about type, see the monitor options docs.

*/ @JsonSerialize(using = MonitorType.MonitorTypeSerializer.class) public class MonitorType { @@ -43,25 +64,7 @@ public class MonitorType { public static final MonitorType CI_TESTS_ALERT = new MonitorType("ci-tests alert"); public static final MonitorType ERROR_TRACKING_ALERT = new MonitorType("error-tracking alert"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "composite", - "event alert", - "log alert", - "metric alert", - "process alert", - "query alert", - "rum alert", - "service check", - "synthetics alert", - "trace-analytics alert", - "slo alert", - "event-v2 alert", - "audit alert", - "ci-pipelines alert", - "ci-tests alert", - "error-tracking alert")); + private static final Set allowedValues = new HashSet(Arrays.asList("composite", "event alert", "log alert", "metric alert", "process alert", "query alert", "rum alert", "service check", "synthetics alert", "trace-analytics alert", "slo alert", "event-v2 alert", "audit alert", "ci-pipelines alert", "ci-tests alert", "error-tracking alert")); private String value; @@ -74,19 +77,18 @@ public boolean isValid() { } public static class MonitorTypeSerializer extends StdSerializer { - public MonitorTypeSerializer(Class t) { - super(t); - } - - public MonitorTypeSerializer() { - this(null); - } - - @Override - public void serialize(MonitorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MonitorTypeSerializer(Class t) { + super(t); + } + + public MonitorTypeSerializer() { + this(null); + } + + @Override + public void serialize(MonitorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -98,7 +100,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorType object is equal to o. */ + /** + * Return true if this MonitorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +116,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java index 90dba57826f..ad39d8dd488 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonitorUpdateRequest.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing a monitor update request. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing a monitor update request.

+ */ @JsonPropertyOrder({ MonitorUpdateRequest.JSON_PROPERTY_CREATED, MonitorUpdateRequest.JSON_PROPERTY_CREATOR, @@ -37,12 +51,11 @@ MonitorUpdateRequest.JSON_PROPERTY_TAGS, MonitorUpdateRequest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -50,7 +63,6 @@ public class MonitorUpdateRequest { private Creator creator; public static final String JSON_PROPERTY_DELETED = "deleted"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable deleted = JsonNullable.undefined(); @@ -61,7 +73,6 @@ public class MonitorUpdateRequest { private String message; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; @@ -95,134 +106,127 @@ public class MonitorUpdateRequest { public static final String JSON_PROPERTY_TYPE = "type"; private MonitorType type; + /** - * Timestamp of the monitor creation. - * + *

Timestamp of the monitor creation.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } /** - * Whether or not the monitor is deleted. (Always null) - * + *

Whether or not the monitor is deleted. (Always null)

* @return deleted - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getDeleted() { - - if (deleted == null) { - deleted = JsonNullable.undefined(); - } - return deleted.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeleted() { + + if (deleted == null) { + deleted = JsonNullable.undefined(); + } + return deleted.orElse(null); + } @JsonProperty(JSON_PROPERTY_DELETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDeleted_JsonNullable() { return deleted; } - - @JsonProperty(JSON_PROPERTY_DELETED) - private void setDeleted_JsonNullable(JsonNullable deleted) { + @JsonProperty(JSON_PROPERTY_DELETED)private void setDeleted_JsonNullable(JsonNullable deleted) { this.deleted = deleted; } /** - * ID of this monitor. - * + *

ID of this monitor.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public MonitorUpdateRequest message(String message) { this.message = message; return this; } /** - * A message to include with notifications for this monitor. - * + *

A message to include with notifications for this monitor.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } /** - * Last timestamp when the monitor was edited. - * + *

Last timestamp when the monitor was edited.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } /** - * Whether or not the monitor is broken down on different groups. - * + *

Whether or not the monitor is broken down on different groups.

* @return multi - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MULTI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMulti() { - return multi; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMulti() { + return multi; + } public MonitorUpdateRequest name(String name) { this.name = name; return this; } /** - * The monitor name. - * + *

The monitor name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public MonitorUpdateRequest options(MonitorOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -230,80 +234,75 @@ public MonitorUpdateRequest options(MonitorOptions options) { } /** - * List of options associated with your monitor. - * + *

List of options associated with your monitor.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOptions getOptions() { + return options; + } public void setOptions(MonitorOptions options) { this.options = options; } /** - * The different states your monitor can be in. - * + *

The different states your monitor can be in.

* @return overallState - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERALL_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorOverallStates getOverallState() { - return overallState; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorOverallStates getOverallState() { + return overallState; + } public MonitorUpdateRequest priority(Long priority) { this.priority = priority; return this; } /** - * Integer from 1 (high) to 5 (low) indicating alert severity. minimum: 1 maximum: 5 - * + *

Integer from 1 (high) to 5 (low) indicating alert severity.

+ * minimum: 1 + * maximum: 5 * @return priority - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPriority() { - return priority; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPriority() { + return priority; + } public void setPriority(Long priority) { this.priority = priority; } - public MonitorUpdateRequest query(String query) { this.query = query; return this; } /** - * The monitor query. - * + *

The monitor query.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public MonitorUpdateRequest restrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; return this; } - public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) { if (this.restrictedRoles == null) { this.restrictedRoles = new ArrayList<>(); @@ -313,46 +312,35 @@ public MonitorUpdateRequest addRestrictedRolesItem(String restrictedRolesItem) { } /** - * A list of unique role identifiers to define which roles are allowed to edit the monitor. The - * unique identifiers for all roles can be pulled from the Roles API and are located in - * the data.id field. Editing a monitor includes any updates to the monitor - * configuration, monitor deletion, and muting of the monitor for any amount of time. - * restricted_roles is the successor of locked. For more information about - * locked and restricted_roles, see the monitor - * options docs. - * + *

A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the Roles API and are located in the data.id field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. restricted_roles is the successor of locked. For more information about locked and restricted_roles, see the monitor options docs.

* @return restrictedRoles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRestrictedRoles() { - return restrictedRoles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRestrictedRoles() { + return restrictedRoles; + } public void setRestrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; } /** - * Wrapper object with the different monitor states. - * + *

Wrapper object with the different monitor states.

* @return state - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorState getState() { - return state; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorState getState() { + return state; + } public MonitorUpdateRequest tags(List tags) { this.tags = tags; return this; } - public MonitorUpdateRequest addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -362,21 +350,19 @@ public MonitorUpdateRequest addTagsItem(String tagsItem) { } /** - * Tags associated to your monitor. - * + *

Tags associated to your monitor.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public MonitorUpdateRequest type(MonitorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -384,26 +370,26 @@ public MonitorUpdateRequest type(MonitorType type) { } /** - * The type of the monitor. For more information about type, see the monitor options docs. - * + *

The type of the monitor. For more information about type, see the monitor options docs.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorType getType() { + return type; + } public void setType(MonitorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MonitorUpdateRequest object is equal to o. */ + /** + * Return true if this MonitorUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -413,43 +399,13 @@ public boolean equals(Object o) { return false; } MonitorUpdateRequest monitorUpdateRequest = (MonitorUpdateRequest) o; - return Objects.equals(this.created, monitorUpdateRequest.created) - && Objects.equals(this.creator, monitorUpdateRequest.creator) - && Objects.equals(this.deleted, monitorUpdateRequest.deleted) - && Objects.equals(this.id, monitorUpdateRequest.id) - && Objects.equals(this.message, monitorUpdateRequest.message) - && Objects.equals(this.modified, monitorUpdateRequest.modified) - && Objects.equals(this.multi, monitorUpdateRequest.multi) - && Objects.equals(this.name, monitorUpdateRequest.name) - && Objects.equals(this.options, monitorUpdateRequest.options) - && Objects.equals(this.overallState, monitorUpdateRequest.overallState) - && Objects.equals(this.priority, monitorUpdateRequest.priority) - && Objects.equals(this.query, monitorUpdateRequest.query) - && Objects.equals(this.restrictedRoles, monitorUpdateRequest.restrictedRoles) - && Objects.equals(this.state, monitorUpdateRequest.state) - && Objects.equals(this.tags, monitorUpdateRequest.tags) - && Objects.equals(this.type, monitorUpdateRequest.type); + return Objects.equals(this.created, monitorUpdateRequest.created) && Objects.equals(this.creator, monitorUpdateRequest.creator) && Objects.equals(this.deleted, monitorUpdateRequest.deleted) && Objects.equals(this.id, monitorUpdateRequest.id) && Objects.equals(this.message, monitorUpdateRequest.message) && Objects.equals(this.modified, monitorUpdateRequest.modified) && Objects.equals(this.multi, monitorUpdateRequest.multi) && Objects.equals(this.name, monitorUpdateRequest.name) && Objects.equals(this.options, monitorUpdateRequest.options) && Objects.equals(this.overallState, monitorUpdateRequest.overallState) && Objects.equals(this.priority, monitorUpdateRequest.priority) && Objects.equals(this.query, monitorUpdateRequest.query) && Objects.equals(this.restrictedRoles, monitorUpdateRequest.restrictedRoles) && Objects.equals(this.state, monitorUpdateRequest.state) && Objects.equals(this.tags, monitorUpdateRequest.tags) && Objects.equals(this.type, monitorUpdateRequest.type); } + @Override public int hashCode() { - return Objects.hash( - created, - creator, - deleted, - id, - message, - modified, - multi, - name, - options, - overallState, - priority, - query, - restrictedRoles, - state, - tags, - type); + return Objects.hash(created,creator,deleted,id,message,modified,multi,name,options,overallState,priority,query,restrictedRoles,state,tags,type); } @Override @@ -477,7 +433,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionBody.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionBody.java index 078394b286f..6024a2a0976 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionBody.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Usage Summary by tag for a given organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Usage Summary by tag for a given organization.

+ */ @JsonPropertyOrder({ MonthlyUsageAttributionBody.JSON_PROPERTY_MONTH, MonthlyUsageAttributionBody.JSON_PROPERTY_ORG_NAME, @@ -28,12 +42,11 @@ MonthlyUsageAttributionBody.JSON_PROPERTY_UPDATED_AT, MonthlyUsageAttributionBody.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonthlyUsageAttributionBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MONTH = "month"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime month; @@ -50,7 +63,6 @@ public class MonthlyUsageAttributionBody { private Map> tags = null; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime updatedAt; @@ -63,92 +75,80 @@ public MonthlyUsageAttributionBody month(OffsetDateTime month) { } /** - * Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]. - * + *

Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].

* @return month - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getMonth() { - return month; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getMonth() { + return month; + } public void setMonth(OffsetDateTime month) { this.month = month; } - public MonthlyUsageAttributionBody orgName(String orgName) { this.orgName = orgName; return this; } /** - * The name of the organization. - * + *

The name of the organization.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public MonthlyUsageAttributionBody publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public MonthlyUsageAttributionBody tagConfigSource(String tagConfigSource) { this.tagConfigSource = tagConfigSource; return this; } /** - * The source of the usage attribution tag configuration and the selected tags in the format - * - * <source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3> - * . - * + *

The source of the usage attribution tag configuration and the selected tags in the format <source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3>.

* @return tagConfigSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_CONFIG_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagConfigSource() { - return tagConfigSource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONFIG_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagConfigSource() { + return tagConfigSource; + } public void setTagConfigSource(String tagConfigSource) { this.tagConfigSource = tagConfigSource; } - public MonthlyUsageAttributionBody tags(Map> tags) { this.tags = tags; return this; } - public MonthlyUsageAttributionBody putTagsItem(String key, List tagsItem) { if (this.tags == null) { this.tags = new HashMap<>(); @@ -158,48 +158,41 @@ public MonthlyUsageAttributionBody putTagsItem(String key, List tagsItem } /** - * Tag keys and values. - * - *

A null value here means that the requested tag breakdown cannot be applied - * because it does not match the tags - * configured for usage attribution. In this scenario the API returns the total usage, not - * broken down by tags. - * + *

Tag keys and values.

+ *

A null value here means that the requested tag breakdown cannot be applied because it does not match the tags + * configured for usage attribution. + * In this scenario the API returns the total usage, not broken down by tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getTags() { + return tags; + } public void setTags(Map> tags) { this.tags = tags; } - public MonthlyUsageAttributionBody updatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Datetime of the most recent update to the usage values. - * + *

Datetime of the most recent update to the usage values.

* @return updatedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public MonthlyUsageAttributionBody values(MonthlyUsageAttributionValues values) { this.values = values; this.unparsed |= values.unparsed; @@ -207,22 +200,23 @@ public MonthlyUsageAttributionBody values(MonthlyUsageAttributionValues values) } /** - * Fields in Usage Summary by tag(s). - * + *

Fields in Usage Summary by tag(s).

* @return values - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonthlyUsageAttributionValues getValues() { - return values; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonthlyUsageAttributionValues getValues() { + return values; + } public void setValues(MonthlyUsageAttributionValues values) { this.values = values; } - /** Return true if this MonthlyUsageAttributionBody object is equal to o. */ + /** + * Return true if this MonthlyUsageAttributionBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -232,18 +226,13 @@ public boolean equals(Object o) { return false; } MonthlyUsageAttributionBody monthlyUsageAttributionBody = (MonthlyUsageAttributionBody) o; - return Objects.equals(this.month, monthlyUsageAttributionBody.month) - && Objects.equals(this.orgName, monthlyUsageAttributionBody.orgName) - && Objects.equals(this.publicId, monthlyUsageAttributionBody.publicId) - && Objects.equals(this.tagConfigSource, monthlyUsageAttributionBody.tagConfigSource) - && Objects.equals(this.tags, monthlyUsageAttributionBody.tags) - && Objects.equals(this.updatedAt, monthlyUsageAttributionBody.updatedAt) - && Objects.equals(this.values, monthlyUsageAttributionBody.values); + return Objects.equals(this.month, monthlyUsageAttributionBody.month) && Objects.equals(this.orgName, monthlyUsageAttributionBody.orgName) && Objects.equals(this.publicId, monthlyUsageAttributionBody.publicId) && Objects.equals(this.tagConfigSource, monthlyUsageAttributionBody.tagConfigSource) && Objects.equals(this.tags, monthlyUsageAttributionBody.tags) && Objects.equals(this.updatedAt, monthlyUsageAttributionBody.updatedAt) && Objects.equals(this.values, monthlyUsageAttributionBody.values); } + @Override public int hashCode() { - return Objects.hash(month, orgName, publicId, tagConfigSource, tags, updatedAt, values); + return Objects.hash(month,orgName,publicId,tagConfigSource,tags,updatedAt,values); } @Override @@ -262,7 +251,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionMetadata.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionMetadata.java index 90621e99e54..b60adf97359 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionMetadata.java @@ -6,40 +6,55 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object containing document metadata. */ +/** + *

The object containing document metadata.

+ */ @JsonPropertyOrder({ MonthlyUsageAttributionMetadata.JSON_PROPERTY_AGGREGATES, MonthlyUsageAttributionMetadata.JSON_PROPERTY_PAGINATION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonthlyUsageAttributionMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATES = "aggregates"; private List aggregates = null; public static final String JSON_PROPERTY_PAGINATION = "pagination"; private MonthlyUsageAttributionPagination pagination; - public MonthlyUsageAttributionMetadata aggregates( - List aggregates) { + public MonthlyUsageAttributionMetadata aggregates(List aggregates) { this.aggregates = aggregates; for (UsageAttributionAggregatesBody item : aggregates) { this.unparsed |= item.unparsed; } return this; } - - public MonthlyUsageAttributionMetadata addAggregatesItem( - UsageAttributionAggregatesBody aggregatesItem) { + public MonthlyUsageAttributionMetadata addAggregatesItem(UsageAttributionAggregatesBody aggregatesItem) { if (this.aggregates == null) { this.aggregates = new ArrayList<>(); } @@ -49,21 +64,19 @@ public MonthlyUsageAttributionMetadata addAggregatesItem( } /** - * An array of available aggregates. - * + *

An array of available aggregates.

* @return aggregates - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAggregates() { - return aggregates; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAggregates() { + return aggregates; + } public void setAggregates(List aggregates) { this.aggregates = aggregates; } - public MonthlyUsageAttributionMetadata pagination(MonthlyUsageAttributionPagination pagination) { this.pagination = pagination; this.unparsed |= pagination.unparsed; @@ -71,22 +84,23 @@ public MonthlyUsageAttributionMetadata pagination(MonthlyUsageAttributionPaginat } /** - * The metadata for the current pagination. - * + *

The metadata for the current pagination.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonthlyUsageAttributionPagination getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonthlyUsageAttributionPagination getPagination() { + return pagination; + } public void setPagination(MonthlyUsageAttributionPagination pagination) { this.pagination = pagination; } - /** Return true if this MonthlyUsageAttributionMetadata object is equal to o. */ + /** + * Return true if this MonthlyUsageAttributionMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -95,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonthlyUsageAttributionMetadata monthlyUsageAttributionMetadata = - (MonthlyUsageAttributionMetadata) o; - return Objects.equals(this.aggregates, monthlyUsageAttributionMetadata.aggregates) - && Objects.equals(this.pagination, monthlyUsageAttributionMetadata.pagination); + MonthlyUsageAttributionMetadata monthlyUsageAttributionMetadata = (MonthlyUsageAttributionMetadata) o; + return Objects.equals(this.aggregates, monthlyUsageAttributionMetadata.aggregates) && Objects.equals(this.pagination, monthlyUsageAttributionMetadata.pagination); } + @Override public int hashCode() { - return Objects.hash(aggregates, pagination); + return Objects.hash(aggregates,pagination); } @Override @@ -117,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionPagination.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionPagination.java index bfed90e4895..c53fb917173 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionPagination.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionPagination.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The metadata for the current pagination. */ -@JsonPropertyOrder({MonthlyUsageAttributionPagination.JSON_PROPERTY_NEXT_RECORD_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata for the current pagination.

+ */ +@JsonPropertyOrder({ + MonthlyUsageAttributionPagination.JSON_PROPERTY_NEXT_RECORD_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonthlyUsageAttributionPagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT_RECORD_ID = "next_record_id"; private JsonNullable nextRecordId = JsonNullable.undefined(); @@ -28,33 +49,30 @@ public MonthlyUsageAttributionPagination nextRecordId(String nextRecordId) { } /** - * The cursor to use to get the next results, if any. To make the next request, use the same - * parameters with the addition of the next_record_id. - * + *

The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of the next_record_id.

* @return nextRecordId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getNextRecordId() { - return nextRecordId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextRecordId() { + return nextRecordId.orElse(null); + } @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNextRecordId_JsonNullable() { return nextRecordId; } - - @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { + @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID)public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { this.nextRecordId = nextRecordId; } - public void setNextRecordId(String nextRecordId) { this.nextRecordId = JsonNullable.of(nextRecordId); } - /** Return true if this MonthlyUsageAttributionPagination object is equal to o. */ + /** + * Return true if this MonthlyUsageAttributionPagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +81,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonthlyUsageAttributionPagination monthlyUsageAttributionPagination = - (MonthlyUsageAttributionPagination) o; + MonthlyUsageAttributionPagination monthlyUsageAttributionPagination = (MonthlyUsageAttributionPagination) o; return Objects.equals(this.nextRecordId, monthlyUsageAttributionPagination.nextRecordId); } + @Override public int hashCode() { return Objects.hash(nextRecordId); @@ -83,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionResponse.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionResponse.java index ffeef1dc127..126c8212e58 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the monthly Usage Summary by tag(s). */ +/** + *

Response containing the monthly Usage Summary by tag(s).

+ */ @JsonPropertyOrder({ MonthlyUsageAttributionResponse.JSON_PROPERTY_METADATA, MonthlyUsageAttributionResponse.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonthlyUsageAttributionResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METADATA = "metadata"; private MonthlyUsageAttributionMetadata metadata; @@ -36,21 +54,19 @@ public MonthlyUsageAttributionResponse metadata(MonthlyUsageAttributionMetadata } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonthlyUsageAttributionMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonthlyUsageAttributionMetadata getMetadata() { + return metadata; + } public void setMetadata(MonthlyUsageAttributionMetadata metadata) { this.metadata = metadata; } - public MonthlyUsageAttributionResponse usage(List usage) { this.usage = usage; for (MonthlyUsageAttributionBody item : usage) { @@ -58,7 +74,6 @@ public MonthlyUsageAttributionResponse usage(List u } return this; } - public MonthlyUsageAttributionResponse addUsageItem(MonthlyUsageAttributionBody usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -69,22 +84,23 @@ public MonthlyUsageAttributionResponse addUsageItem(MonthlyUsageAttributionBody } /** - * Get usage summary by tag(s). - * + *

Get usage summary by tag(s).

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this MonthlyUsageAttributionResponse object is equal to o. */ + /** + * Return true if this MonthlyUsageAttributionResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonthlyUsageAttributionResponse monthlyUsageAttributionResponse = - (MonthlyUsageAttributionResponse) o; - return Objects.equals(this.metadata, monthlyUsageAttributionResponse.metadata) - && Objects.equals(this.usage, monthlyUsageAttributionResponse.usage); + MonthlyUsageAttributionResponse monthlyUsageAttributionResponse = (MonthlyUsageAttributionResponse) o; + return Objects.equals(this.metadata, monthlyUsageAttributionResponse.metadata) && Objects.equals(this.usage, monthlyUsageAttributionResponse.usage); } + @Override public int hashCode() { - return Objects.hash(metadata, usage); + return Objects.hash(metadata,usage); } @Override @@ -115,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java index 6d247e94ccc..88c4e7662fe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionSupportedMetrics.java @@ -6,207 +6,108 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Supported metrics for monthly usage attribution requests. */ -@JsonSerialize( - using = - MonthlyUsageAttributionSupportedMetrics.MonthlyUsageAttributionSupportedMetricsSerializer - .class) +/** + *

Supported metrics for monthly usage attribution requests.

+ */ +@JsonSerialize(using = MonthlyUsageAttributionSupportedMetrics.MonthlyUsageAttributionSupportedMetricsSerializer.class) public class MonthlyUsageAttributionSupportedMetrics { - public static final MonthlyUsageAttributionSupportedMetrics API_USAGE = - new MonthlyUsageAttributionSupportedMetrics("api_usage"); - public static final MonthlyUsageAttributionSupportedMetrics API_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("api_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics APM_FARGATE_USAGE = - new MonthlyUsageAttributionSupportedMetrics("apm_fargate_usage"); - public static final MonthlyUsageAttributionSupportedMetrics APM_FARGATE_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("apm_fargate_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics APPSEC_FARGATE_USAGE = - new MonthlyUsageAttributionSupportedMetrics("appsec_fargate_usage"); - public static final MonthlyUsageAttributionSupportedMetrics APPSEC_FARGATE_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("appsec_fargate_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics APM_HOST_USAGE = - new MonthlyUsageAttributionSupportedMetrics("apm_host_usage"); - public static final MonthlyUsageAttributionSupportedMetrics APM_HOST_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("apm_host_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics APPSEC_USAGE = - new MonthlyUsageAttributionSupportedMetrics("appsec_usage"); - public static final MonthlyUsageAttributionSupportedMetrics APPSEC_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("appsec_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics BROWSER_USAGE = - new MonthlyUsageAttributionSupportedMetrics("browser_usage"); - public static final MonthlyUsageAttributionSupportedMetrics BROWSER_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("browser_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_EXCL_AGENT_USAGE = - new MonthlyUsageAttributionSupportedMetrics("container_excl_agent_usage"); - public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_EXCL_AGENT_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("container_excl_agent_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_USAGE = - new MonthlyUsageAttributionSupportedMetrics("container_usage"); - public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("container_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CSPM_CONTAINERS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("cspm_containers_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CSPM_CONTAINERS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("cspm_containers_usage"); - public static final MonthlyUsageAttributionSupportedMetrics CSPM_HOSTS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("cspm_hosts_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CSPM_HOSTS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("cspm_hosts_usage"); - public static final MonthlyUsageAttributionSupportedMetrics CUSTOM_TIMESERIES_USAGE = - new MonthlyUsageAttributionSupportedMetrics("custom_timeseries_usage"); - public static final MonthlyUsageAttributionSupportedMetrics CUSTOM_TIMESERIES_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("custom_timeseries_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CWS_CONTAINERS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("cws_containers_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CWS_CONTAINERS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("cws_containers_usage"); - public static final MonthlyUsageAttributionSupportedMetrics CWS_HOSTS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("cws_hosts_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics CWS_HOSTS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("cws_hosts_usage"); - public static final MonthlyUsageAttributionSupportedMetrics DBM_HOSTS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("dbm_hosts_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics DBM_HOSTS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("dbm_hosts_usage"); - public static final MonthlyUsageAttributionSupportedMetrics DBM_QUERIES_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("dbm_queries_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics DBM_QUERIES_USAGE = - new MonthlyUsageAttributionSupportedMetrics("dbm_queries_usage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_logs_usage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_logs_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_logs_usage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_logs_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_spans_usage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_spans_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_spans_usage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_spans_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics FARGATE_USAGE = - new MonthlyUsageAttributionSupportedMetrics("fargate_usage"); - public static final MonthlyUsageAttributionSupportedMetrics FARGATE_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("fargate_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics FUNCTIONS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("functions_usage"); - public static final MonthlyUsageAttributionSupportedMetrics FUNCTIONS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("functions_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics INFRA_HOST_USAGE = - new MonthlyUsageAttributionSupportedMetrics("infra_host_usage"); - public static final MonthlyUsageAttributionSupportedMetrics INFRA_HOST_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("infra_host_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics INVOCATIONS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("invocations_usage"); - public static final MonthlyUsageAttributionSupportedMetrics INVOCATIONS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("invocations_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics NPM_HOST_USAGE = - new MonthlyUsageAttributionSupportedMetrics("npm_host_usage"); - public static final MonthlyUsageAttributionSupportedMetrics NPM_HOST_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("npm_host_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics PROFILED_CONTAINER_USAGE = - new MonthlyUsageAttributionSupportedMetrics("profiled_container_usage"); - public static final MonthlyUsageAttributionSupportedMetrics PROFILED_CONTAINER_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("profiled_container_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics PROFILED_FARGATE_USAGE = - new MonthlyUsageAttributionSupportedMetrics("profiled_fargate_usage"); - public static final MonthlyUsageAttributionSupportedMetrics PROFILED_FARGATE_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("profiled_fargate_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics PROFILED_HOST_USAGE = - new MonthlyUsageAttributionSupportedMetrics("profiled_host_usage"); - public static final MonthlyUsageAttributionSupportedMetrics PROFILED_HOST_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("profiled_host_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics SNMP_USAGE = - new MonthlyUsageAttributionSupportedMetrics("snmp_usage"); - public static final MonthlyUsageAttributionSupportedMetrics SNMP_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("snmp_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_RUM_SESSIONS_USAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_rum_sessions_usage"); - public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_RUM_SESSIONS_PERCENTAGE = - new MonthlyUsageAttributionSupportedMetrics("estimated_rum_sessions_percentage"); - public static final MonthlyUsageAttributionSupportedMetrics ALL = - new MonthlyUsageAttributionSupportedMetrics("*"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "api_usage", - "api_percentage", - "apm_fargate_usage", - "apm_fargate_percentage", - "appsec_fargate_usage", - "appsec_fargate_percentage", - "apm_host_usage", - "apm_host_percentage", - "appsec_usage", - "appsec_percentage", - "browser_usage", - "browser_percentage", - "container_excl_agent_usage", - "container_excl_agent_percentage", - "container_usage", - "container_percentage", - "cspm_containers_percentage", - "cspm_containers_usage", - "cspm_hosts_percentage", - "cspm_hosts_usage", - "custom_timeseries_usage", - "custom_timeseries_percentage", - "cws_containers_percentage", - "cws_containers_usage", - "cws_hosts_percentage", - "cws_hosts_usage", - "dbm_hosts_percentage", - "dbm_hosts_usage", - "dbm_queries_percentage", - "dbm_queries_usage", - "estimated_indexed_logs_usage", - "estimated_indexed_logs_percentage", - "estimated_ingested_logs_usage", - "estimated_ingested_logs_percentage", - "estimated_indexed_spans_usage", - "estimated_indexed_spans_percentage", - "estimated_ingested_spans_usage", - "estimated_ingested_spans_percentage", - "fargate_usage", - "fargate_percentage", - "functions_usage", - "functions_percentage", - "infra_host_usage", - "infra_host_percentage", - "invocations_usage", - "invocations_percentage", - "npm_host_usage", - "npm_host_percentage", - "profiled_container_usage", - "profiled_container_percentage", - "profiled_fargate_usage", - "profiled_fargate_percentage", - "profiled_host_usage", - "profiled_host_percentage", - "snmp_usage", - "snmp_percentage", - "estimated_rum_sessions_usage", - "estimated_rum_sessions_percentage", - "*")); + public static final MonthlyUsageAttributionSupportedMetrics API_USAGE = new MonthlyUsageAttributionSupportedMetrics("api_usage"); + public static final MonthlyUsageAttributionSupportedMetrics API_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("api_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics APM_FARGATE_USAGE = new MonthlyUsageAttributionSupportedMetrics("apm_fargate_usage"); + public static final MonthlyUsageAttributionSupportedMetrics APM_FARGATE_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("apm_fargate_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics APPSEC_FARGATE_USAGE = new MonthlyUsageAttributionSupportedMetrics("appsec_fargate_usage"); + public static final MonthlyUsageAttributionSupportedMetrics APPSEC_FARGATE_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("appsec_fargate_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics APM_HOST_USAGE = new MonthlyUsageAttributionSupportedMetrics("apm_host_usage"); + public static final MonthlyUsageAttributionSupportedMetrics APM_HOST_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("apm_host_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics APPSEC_USAGE = new MonthlyUsageAttributionSupportedMetrics("appsec_usage"); + public static final MonthlyUsageAttributionSupportedMetrics APPSEC_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("appsec_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics BROWSER_USAGE = new MonthlyUsageAttributionSupportedMetrics("browser_usage"); + public static final MonthlyUsageAttributionSupportedMetrics BROWSER_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("browser_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_EXCL_AGENT_USAGE = new MonthlyUsageAttributionSupportedMetrics("container_excl_agent_usage"); + public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_EXCL_AGENT_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("container_excl_agent_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_USAGE = new MonthlyUsageAttributionSupportedMetrics("container_usage"); + public static final MonthlyUsageAttributionSupportedMetrics CONTAINER_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("container_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CSPM_CONTAINERS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("cspm_containers_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CSPM_CONTAINERS_USAGE = new MonthlyUsageAttributionSupportedMetrics("cspm_containers_usage"); + public static final MonthlyUsageAttributionSupportedMetrics CSPM_HOSTS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("cspm_hosts_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CSPM_HOSTS_USAGE = new MonthlyUsageAttributionSupportedMetrics("cspm_hosts_usage"); + public static final MonthlyUsageAttributionSupportedMetrics CUSTOM_TIMESERIES_USAGE = new MonthlyUsageAttributionSupportedMetrics("custom_timeseries_usage"); + public static final MonthlyUsageAttributionSupportedMetrics CUSTOM_TIMESERIES_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("custom_timeseries_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CWS_CONTAINERS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("cws_containers_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CWS_CONTAINERS_USAGE = new MonthlyUsageAttributionSupportedMetrics("cws_containers_usage"); + public static final MonthlyUsageAttributionSupportedMetrics CWS_HOSTS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("cws_hosts_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics CWS_HOSTS_USAGE = new MonthlyUsageAttributionSupportedMetrics("cws_hosts_usage"); + public static final MonthlyUsageAttributionSupportedMetrics DBM_HOSTS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("dbm_hosts_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics DBM_HOSTS_USAGE = new MonthlyUsageAttributionSupportedMetrics("dbm_hosts_usage"); + public static final MonthlyUsageAttributionSupportedMetrics DBM_QUERIES_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("dbm_queries_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics DBM_QUERIES_USAGE = new MonthlyUsageAttributionSupportedMetrics("dbm_queries_usage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_USAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_logs_usage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_logs_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_USAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_logs_usage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_logs_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_USAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_spans_usage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_indexed_spans_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_USAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_spans_usage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_ingested_spans_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics FARGATE_USAGE = new MonthlyUsageAttributionSupportedMetrics("fargate_usage"); + public static final MonthlyUsageAttributionSupportedMetrics FARGATE_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("fargate_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics FUNCTIONS_USAGE = new MonthlyUsageAttributionSupportedMetrics("functions_usage"); + public static final MonthlyUsageAttributionSupportedMetrics FUNCTIONS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("functions_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics INFRA_HOST_USAGE = new MonthlyUsageAttributionSupportedMetrics("infra_host_usage"); + public static final MonthlyUsageAttributionSupportedMetrics INFRA_HOST_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("infra_host_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics INVOCATIONS_USAGE = new MonthlyUsageAttributionSupportedMetrics("invocations_usage"); + public static final MonthlyUsageAttributionSupportedMetrics INVOCATIONS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("invocations_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics NPM_HOST_USAGE = new MonthlyUsageAttributionSupportedMetrics("npm_host_usage"); + public static final MonthlyUsageAttributionSupportedMetrics NPM_HOST_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("npm_host_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics PROFILED_CONTAINER_USAGE = new MonthlyUsageAttributionSupportedMetrics("profiled_container_usage"); + public static final MonthlyUsageAttributionSupportedMetrics PROFILED_CONTAINER_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("profiled_container_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics PROFILED_FARGATE_USAGE = new MonthlyUsageAttributionSupportedMetrics("profiled_fargate_usage"); + public static final MonthlyUsageAttributionSupportedMetrics PROFILED_FARGATE_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("profiled_fargate_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics PROFILED_HOST_USAGE = new MonthlyUsageAttributionSupportedMetrics("profiled_host_usage"); + public static final MonthlyUsageAttributionSupportedMetrics PROFILED_HOST_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("profiled_host_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics SNMP_USAGE = new MonthlyUsageAttributionSupportedMetrics("snmp_usage"); + public static final MonthlyUsageAttributionSupportedMetrics SNMP_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("snmp_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_RUM_SESSIONS_USAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_rum_sessions_usage"); + public static final MonthlyUsageAttributionSupportedMetrics ESTIMATED_RUM_SESSIONS_PERCENTAGE = new MonthlyUsageAttributionSupportedMetrics("estimated_rum_sessions_percentage"); + public static final MonthlyUsageAttributionSupportedMetrics ALL = new MonthlyUsageAttributionSupportedMetrics("*"); + + private static final Set allowedValues = new HashSet(Arrays.asList("api_usage", "api_percentage", "apm_fargate_usage", "apm_fargate_percentage", "appsec_fargate_usage", "appsec_fargate_percentage", "apm_host_usage", "apm_host_percentage", "appsec_usage", "appsec_percentage", "browser_usage", "browser_percentage", "container_excl_agent_usage", "container_excl_agent_percentage", "container_usage", "container_percentage", "cspm_containers_percentage", "cspm_containers_usage", "cspm_hosts_percentage", "cspm_hosts_usage", "custom_timeseries_usage", "custom_timeseries_percentage", "cws_containers_percentage", "cws_containers_usage", "cws_hosts_percentage", "cws_hosts_usage", "dbm_hosts_percentage", "dbm_hosts_usage", "dbm_queries_percentage", "dbm_queries_usage", "estimated_indexed_logs_usage", "estimated_indexed_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_logs_percentage", "estimated_indexed_spans_usage", "estimated_indexed_spans_percentage", "estimated_ingested_spans_usage", "estimated_ingested_spans_percentage", "fargate_usage", "fargate_percentage", "functions_usage", "functions_percentage", "infra_host_usage", "infra_host_percentage", "invocations_usage", "invocations_percentage", "npm_host_usage", "npm_host_percentage", "profiled_container_usage", "profiled_container_percentage", "profiled_fargate_usage", "profiled_fargate_percentage", "profiled_host_usage", "profiled_host_percentage", "snmp_usage", "snmp_percentage", "estimated_rum_sessions_usage", "estimated_rum_sessions_percentage", "*")); private String value; @@ -218,25 +119,19 @@ public boolean isValid() { this.value = value; } - public static class MonthlyUsageAttributionSupportedMetricsSerializer - extends StdSerializer { - public MonthlyUsageAttributionSupportedMetricsSerializer( - Class t) { - super(t); - } + public static class MonthlyUsageAttributionSupportedMetricsSerializer extends StdSerializer { + public MonthlyUsageAttributionSupportedMetricsSerializer(Class t) { + super(t); + } - public MonthlyUsageAttributionSupportedMetricsSerializer() { - this(null); - } + public MonthlyUsageAttributionSupportedMetricsSerializer() { + this(null); + } - @Override - public void serialize( - MonthlyUsageAttributionSupportedMetrics value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonthlyUsageAttributionSupportedMetrics value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -248,7 +143,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonthlyUsageAttributionSupportedMetrics object is equal to o. */ + /** + * Return true if this MonthlyUsageAttributionSupportedMetrics object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -262,7 +159,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java index 0f8e3208d90..7bf8ef8a8a8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java +++ b/src/main/java/com/datadog/api/client/v1/model/MonthlyUsageAttributionValues.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Fields in Usage Summary by tag(s). */ +/** + *

Fields in Usage Summary by tag(s).

+ */ @JsonPropertyOrder({ MonthlyUsageAttributionValues.JSON_PROPERTY_API_PERCENTAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_API_USAGE, @@ -73,10 +93,10 @@ MonthlyUsageAttributionValues.JSON_PROPERTY_SNMP_PERCENTAGE, MonthlyUsageAttributionValues.JSON_PROPERTY_SNMP_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonthlyUsageAttributionValues { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_PERCENTAGE = "api_percentage"; private Double apiPercentage; @@ -113,12 +133,10 @@ public class MonthlyUsageAttributionValues { public static final String JSON_PROPERTY_BROWSER_USAGE = "browser_usage"; private Double browserUsage; - public static final String JSON_PROPERTY_CONTAINER_EXCL_AGENT_PERCENTAGE = - "container_excl_agent_percentage"; + public static final String JSON_PROPERTY_CONTAINER_EXCL_AGENT_PERCENTAGE = "container_excl_agent_percentage"; private Double containerExclAgentPercentage; - public static final String JSON_PROPERTY_CONTAINER_EXCL_AGENT_USAGE = - "container_excl_agent_usage"; + public static final String JSON_PROPERTY_CONTAINER_EXCL_AGENT_USAGE = "container_excl_agent_usage"; private Double containerExclAgentUsage; public static final String JSON_PROPERTY_CONTAINER_PERCENTAGE = "container_percentage"; @@ -127,8 +145,7 @@ public class MonthlyUsageAttributionValues { public static final String JSON_PROPERTY_CONTAINER_USAGE = "container_usage"; private Double containerUsage; - public static final String JSON_PROPERTY_CSPM_CONTAINERS_PERCENTAGE = - "cspm_containers_percentage"; + public static final String JSON_PROPERTY_CSPM_CONTAINERS_PERCENTAGE = "cspm_containers_percentage"; private Double cspmContainersPercentage; public static final String JSON_PROPERTY_CSPM_CONTAINERS_USAGE = "cspm_containers_usage"; @@ -140,8 +157,7 @@ public class MonthlyUsageAttributionValues { public static final String JSON_PROPERTY_CSPM_HOSTS_USAGE = "cspm_hosts_usage"; private Double cspmHostsUsage; - public static final String JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE = - "custom_timeseries_percentage"; + public static final String JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE = "custom_timeseries_percentage"; private Double customTimeseriesPercentage; public static final String JSON_PROPERTY_CUSTOM_TIMESERIES_USAGE = "custom_timeseries_usage"; @@ -171,44 +187,34 @@ public class MonthlyUsageAttributionValues { public static final String JSON_PROPERTY_DBM_QUERIES_USAGE = "dbm_queries_usage"; private Double dbmQueriesUsage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE = - "estimated_indexed_logs_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE = "estimated_indexed_logs_percentage"; private Double estimatedIndexedLogsPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE = - "estimated_indexed_logs_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE = "estimated_indexed_logs_usage"; private Double estimatedIndexedLogsUsage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE = - "estimated_indexed_spans_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE = "estimated_indexed_spans_percentage"; private Double estimatedIndexedSpansPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE = - "estimated_indexed_spans_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE = "estimated_indexed_spans_usage"; private Double estimatedIndexedSpansUsage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE = - "estimated_ingested_logs_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE = "estimated_ingested_logs_percentage"; private Double estimatedIngestedLogsPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE = - "estimated_ingested_logs_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE = "estimated_ingested_logs_usage"; private Double estimatedIngestedLogsUsage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE = - "estimated_ingested_spans_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE = "estimated_ingested_spans_percentage"; private Double estimatedIngestedSpansPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE = - "estimated_ingested_spans_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE = "estimated_ingested_spans_usage"; private Double estimatedIngestedSpansUsage; - public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE = - "estimated_rum_sessions_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE = "estimated_rum_sessions_percentage"; private Double estimatedRumSessionsPercentage; - public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE = - "estimated_rum_sessions_usage"; + public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE = "estimated_rum_sessions_usage"; private Double estimatedRumSessionsUsage; public static final String JSON_PROPERTY_FARGATE_PERCENTAGE = "fargate_percentage"; @@ -241,15 +247,13 @@ public class MonthlyUsageAttributionValues { public static final String JSON_PROPERTY_NPM_HOST_USAGE = "npm_host_usage"; private Double npmHostUsage; - public static final String JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE = - "profiled_container_percentage"; + public static final String JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE = "profiled_container_percentage"; private Double profiledContainerPercentage; public static final String JSON_PROPERTY_PROFILED_CONTAINER_USAGE = "profiled_container_usage"; private Double profiledContainerUsage; - public static final String JSON_PROPERTY_PROFILED_FARGATE_PERCENTAGE = - "profiled_fargate_percentage"; + public static final String JSON_PROPERTY_PROFILED_FARGATE_PERCENTAGE = "profiled_fargate_percentage"; private Double profiledFargatePercentage; public static final String JSON_PROPERTY_PROFILED_FARGATE_USAGE = "profiled_fargate_usage"; @@ -273,1230 +277,1106 @@ public MonthlyUsageAttributionValues apiPercentage(Double apiPercentage) { } /** - * The percentage of synthetic API test usage by tag(s). - * + *

The percentage of synthetic API test usage by tag(s).

* @return apiPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApiPercentage() { - return apiPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApiPercentage() { + return apiPercentage; + } public void setApiPercentage(Double apiPercentage) { this.apiPercentage = apiPercentage; } - public MonthlyUsageAttributionValues apiUsage(Double apiUsage) { this.apiUsage = apiUsage; return this; } /** - * The synthetic API test usage by tag(s). - * + *

The synthetic API test usage by tag(s).

* @return apiUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApiUsage() { - return apiUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApiUsage() { + return apiUsage; + } public void setApiUsage(Double apiUsage) { this.apiUsage = apiUsage; } - public MonthlyUsageAttributionValues apmFargatePercentage(Double apmFargatePercentage) { this.apmFargatePercentage = apmFargatePercentage; return this; } /** - * The percentage of APM ECS Fargate task usage by tag(s). - * + *

The percentage of APM ECS Fargate task usage by tag(s).

* @return apmFargatePercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmFargatePercentage() { - return apmFargatePercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmFargatePercentage() { + return apmFargatePercentage; + } public void setApmFargatePercentage(Double apmFargatePercentage) { this.apmFargatePercentage = apmFargatePercentage; } - public MonthlyUsageAttributionValues apmFargateUsage(Double apmFargateUsage) { this.apmFargateUsage = apmFargateUsage; return this; } /** - * The APM ECS Fargate task usage by tag(s). - * + *

The APM ECS Fargate task usage by tag(s).

* @return apmFargateUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmFargateUsage() { - return apmFargateUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmFargateUsage() { + return apmFargateUsage; + } public void setApmFargateUsage(Double apmFargateUsage) { this.apmFargateUsage = apmFargateUsage; } - public MonthlyUsageAttributionValues apmHostPercentage(Double apmHostPercentage) { this.apmHostPercentage = apmHostPercentage; return this; } /** - * The percentage of APM host usage by tag(s). - * + *

The percentage of APM host usage by tag(s).

* @return apmHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmHostPercentage() { - return apmHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmHostPercentage() { + return apmHostPercentage; + } public void setApmHostPercentage(Double apmHostPercentage) { this.apmHostPercentage = apmHostPercentage; } - public MonthlyUsageAttributionValues apmHostUsage(Double apmHostUsage) { this.apmHostUsage = apmHostUsage; return this; } /** - * The APM host usage by tag(s). - * + *

The APM host usage by tag(s).

* @return apmHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmHostUsage() { - return apmHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmHostUsage() { + return apmHostUsage; + } public void setApmHostUsage(Double apmHostUsage) { this.apmHostUsage = apmHostUsage; } - public MonthlyUsageAttributionValues appsecFargatePercentage(Double appsecFargatePercentage) { this.appsecFargatePercentage = appsecFargatePercentage; return this; } /** - * The percentage of Application Security Monitoring ECS Fargate task usage by tag(s). - * + *

The percentage of Application Security Monitoring ECS Fargate task usage by tag(s).

* @return appsecFargatePercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecFargatePercentage() { - return appsecFargatePercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecFargatePercentage() { + return appsecFargatePercentage; + } public void setAppsecFargatePercentage(Double appsecFargatePercentage) { this.appsecFargatePercentage = appsecFargatePercentage; } - public MonthlyUsageAttributionValues appsecFargateUsage(Double appsecFargateUsage) { this.appsecFargateUsage = appsecFargateUsage; return this; } /** - * The Application Security Monitoring ECS Fargate task usage by tag(s). - * + *

The Application Security Monitoring ECS Fargate task usage by tag(s).

* @return appsecFargateUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecFargateUsage() { - return appsecFargateUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecFargateUsage() { + return appsecFargateUsage; + } public void setAppsecFargateUsage(Double appsecFargateUsage) { this.appsecFargateUsage = appsecFargateUsage; } - public MonthlyUsageAttributionValues appsecPercentage(Double appsecPercentage) { this.appsecPercentage = appsecPercentage; return this; } /** - * The percentage of Application Security Monitoring host usage by tag(s). - * + *

The percentage of Application Security Monitoring host usage by tag(s).

* @return appsecPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecPercentage() { - return appsecPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecPercentage() { + return appsecPercentage; + } public void setAppsecPercentage(Double appsecPercentage) { this.appsecPercentage = appsecPercentage; } - public MonthlyUsageAttributionValues appsecUsage(Double appsecUsage) { this.appsecUsage = appsecUsage; return this; } /** - * The Application Security Monitoring host usage by tag(s). - * + *

The Application Security Monitoring host usage by tag(s).

* @return appsecUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecUsage() { - return appsecUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecUsage() { + return appsecUsage; + } public void setAppsecUsage(Double appsecUsage) { this.appsecUsage = appsecUsage; } - public MonthlyUsageAttributionValues browserPercentage(Double browserPercentage) { this.browserPercentage = browserPercentage; return this; } /** - * The percentage of synthetic browser test usage by tag(s). - * + *

The percentage of synthetic browser test usage by tag(s).

* @return browserPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getBrowserPercentage() { - return browserPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getBrowserPercentage() { + return browserPercentage; + } public void setBrowserPercentage(Double browserPercentage) { this.browserPercentage = browserPercentage; } - public MonthlyUsageAttributionValues browserUsage(Double browserUsage) { this.browserUsage = browserUsage; return this; } /** - * The synthetic browser test usage by tag(s). - * + *

The synthetic browser test usage by tag(s).

* @return browserUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getBrowserUsage() { - return browserUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getBrowserUsage() { + return browserUsage; + } public void setBrowserUsage(Double browserUsage) { this.browserUsage = browserUsage; } - - public MonthlyUsageAttributionValues containerExclAgentPercentage( - Double containerExclAgentPercentage) { + public MonthlyUsageAttributionValues containerExclAgentPercentage(Double containerExclAgentPercentage) { this.containerExclAgentPercentage = containerExclAgentPercentage; return this; } /** - * The percentage of container usage without the Datadog Agent by tag(s). - * + *

The percentage of container usage without the Datadog Agent by tag(s).

* @return containerExclAgentPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getContainerExclAgentPercentage() { - return containerExclAgentPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getContainerExclAgentPercentage() { + return containerExclAgentPercentage; + } public void setContainerExclAgentPercentage(Double containerExclAgentPercentage) { this.containerExclAgentPercentage = containerExclAgentPercentage; } - public MonthlyUsageAttributionValues containerExclAgentUsage(Double containerExclAgentUsage) { this.containerExclAgentUsage = containerExclAgentUsage; return this; } /** - * The container usage without the Datadog Agent by tag(s). - * + *

The container usage without the Datadog Agent by tag(s).

* @return containerExclAgentUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getContainerExclAgentUsage() { - return containerExclAgentUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getContainerExclAgentUsage() { + return containerExclAgentUsage; + } public void setContainerExclAgentUsage(Double containerExclAgentUsage) { this.containerExclAgentUsage = containerExclAgentUsage; } - public MonthlyUsageAttributionValues containerPercentage(Double containerPercentage) { this.containerPercentage = containerPercentage; return this; } /** - * The percentage of container usage by tag(s). - * + *

The percentage of container usage by tag(s).

* @return containerPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getContainerPercentage() { - return containerPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getContainerPercentage() { + return containerPercentage; + } public void setContainerPercentage(Double containerPercentage) { this.containerPercentage = containerPercentage; } - public MonthlyUsageAttributionValues containerUsage(Double containerUsage) { this.containerUsage = containerUsage; return this; } /** - * The container usage by tag(s). - * + *

The container usage by tag(s).

* @return containerUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getContainerUsage() { - return containerUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getContainerUsage() { + return containerUsage; + } public void setContainerUsage(Double containerUsage) { this.containerUsage = containerUsage; } - public MonthlyUsageAttributionValues cspmContainersPercentage(Double cspmContainersPercentage) { this.cspmContainersPercentage = cspmContainersPercentage; return this; } /** - * The percentage of CSPM container usage by tag(s). - * + *

The percentage of CSPM container usage by tag(s).

* @return cspmContainersPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINERS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmContainersPercentage() { - return cspmContainersPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINERS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmContainersPercentage() { + return cspmContainersPercentage; + } public void setCspmContainersPercentage(Double cspmContainersPercentage) { this.cspmContainersPercentage = cspmContainersPercentage; } - public MonthlyUsageAttributionValues cspmContainersUsage(Double cspmContainersUsage) { this.cspmContainersUsage = cspmContainersUsage; return this; } /** - * The CSPM container usage by tag(s). - * + *

The CSPM container usage by tag(s).

* @return cspmContainersUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINERS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmContainersUsage() { - return cspmContainersUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINERS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmContainersUsage() { + return cspmContainersUsage; + } public void setCspmContainersUsage(Double cspmContainersUsage) { this.cspmContainersUsage = cspmContainersUsage; } - public MonthlyUsageAttributionValues cspmHostsPercentage(Double cspmHostsPercentage) { this.cspmHostsPercentage = cspmHostsPercentage; return this; } /** - * The percentage of CSPM host usage by by tag(s). - * + *

The percentage of CSPM host usage by by tag(s).

* @return cspmHostsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOSTS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmHostsPercentage() { - return cspmHostsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOSTS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmHostsPercentage() { + return cspmHostsPercentage; + } public void setCspmHostsPercentage(Double cspmHostsPercentage) { this.cspmHostsPercentage = cspmHostsPercentage; } - public MonthlyUsageAttributionValues cspmHostsUsage(Double cspmHostsUsage) { this.cspmHostsUsage = cspmHostsUsage; return this; } /** - * The CSPM host usage by tag(s). - * + *

The CSPM host usage by tag(s).

* @return cspmHostsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOSTS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmHostsUsage() { - return cspmHostsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOSTS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmHostsUsage() { + return cspmHostsUsage; + } public void setCspmHostsUsage(Double cspmHostsUsage) { this.cspmHostsUsage = cspmHostsUsage; } - - public MonthlyUsageAttributionValues customTimeseriesPercentage( - Double customTimeseriesPercentage) { + public MonthlyUsageAttributionValues customTimeseriesPercentage(Double customTimeseriesPercentage) { this.customTimeseriesPercentage = customTimeseriesPercentage; return this; } /** - * The percentage of custom metrics usage by tag(s). - * + *

The percentage of custom metrics usage by tag(s).

* @return customTimeseriesPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCustomTimeseriesPercentage() { - return customTimeseriesPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCustomTimeseriesPercentage() { + return customTimeseriesPercentage; + } public void setCustomTimeseriesPercentage(Double customTimeseriesPercentage) { this.customTimeseriesPercentage = customTimeseriesPercentage; } - public MonthlyUsageAttributionValues customTimeseriesUsage(Double customTimeseriesUsage) { this.customTimeseriesUsage = customTimeseriesUsage; return this; } /** - * The custom metrics usage by tag(s). - * + *

The custom metrics usage by tag(s).

* @return customTimeseriesUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCustomTimeseriesUsage() { - return customTimeseriesUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCustomTimeseriesUsage() { + return customTimeseriesUsage; + } public void setCustomTimeseriesUsage(Double customTimeseriesUsage) { this.customTimeseriesUsage = customTimeseriesUsage; } - public MonthlyUsageAttributionValues cwsContainersPercentage(Double cwsContainersPercentage) { this.cwsContainersPercentage = cwsContainersPercentage; return this; } /** - * The percentage of Cloud Workload Security container usage by tag(s). - * + *

The percentage of Cloud Workload Security container usage by tag(s).

* @return cwsContainersPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINERS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsContainersPercentage() { - return cwsContainersPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINERS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsContainersPercentage() { + return cwsContainersPercentage; + } public void setCwsContainersPercentage(Double cwsContainersPercentage) { this.cwsContainersPercentage = cwsContainersPercentage; } - public MonthlyUsageAttributionValues cwsContainersUsage(Double cwsContainersUsage) { this.cwsContainersUsage = cwsContainersUsage; return this; } /** - * The Cloud Workload Security container usage by tag(s). - * + *

The Cloud Workload Security container usage by tag(s).

* @return cwsContainersUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINERS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsContainersUsage() { - return cwsContainersUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINERS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsContainersUsage() { + return cwsContainersUsage; + } public void setCwsContainersUsage(Double cwsContainersUsage) { this.cwsContainersUsage = cwsContainersUsage; } - public MonthlyUsageAttributionValues cwsHostsPercentage(Double cwsHostsPercentage) { this.cwsHostsPercentage = cwsHostsPercentage; return this; } /** - * The percentage of Cloud Workload Security host usage by tag(s). - * + *

The percentage of Cloud Workload Security host usage by tag(s).

* @return cwsHostsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOSTS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsHostsPercentage() { - return cwsHostsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOSTS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsHostsPercentage() { + return cwsHostsPercentage; + } public void setCwsHostsPercentage(Double cwsHostsPercentage) { this.cwsHostsPercentage = cwsHostsPercentage; } - public MonthlyUsageAttributionValues cwsHostsUsage(Double cwsHostsUsage) { this.cwsHostsUsage = cwsHostsUsage; return this; } /** - * The Cloud Workload Security host usage by tag(s). - * + *

The Cloud Workload Security host usage by tag(s).

* @return cwsHostsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOSTS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsHostsUsage() { - return cwsHostsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOSTS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsHostsUsage() { + return cwsHostsUsage; + } public void setCwsHostsUsage(Double cwsHostsUsage) { this.cwsHostsUsage = cwsHostsUsage; } - public MonthlyUsageAttributionValues dbmHostsPercentage(Double dbmHostsPercentage) { this.dbmHostsPercentage = dbmHostsPercentage; return this; } /** - * The percentage of Database Monitoring host usage by tag(s). - * + *

The percentage of Database Monitoring host usage by tag(s).

* @return dbmHostsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOSTS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmHostsPercentage() { - return dbmHostsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOSTS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmHostsPercentage() { + return dbmHostsPercentage; + } public void setDbmHostsPercentage(Double dbmHostsPercentage) { this.dbmHostsPercentage = dbmHostsPercentage; } - public MonthlyUsageAttributionValues dbmHostsUsage(Double dbmHostsUsage) { this.dbmHostsUsage = dbmHostsUsage; return this; } /** - * The Database Monitoring host usage by tag(s). - * + *

The Database Monitoring host usage by tag(s).

* @return dbmHostsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOSTS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmHostsUsage() { - return dbmHostsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOSTS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmHostsUsage() { + return dbmHostsUsage; + } public void setDbmHostsUsage(Double dbmHostsUsage) { this.dbmHostsUsage = dbmHostsUsage; } - public MonthlyUsageAttributionValues dbmQueriesPercentage(Double dbmQueriesPercentage) { this.dbmQueriesPercentage = dbmQueriesPercentage; return this; } /** - * The percentage of Database Monitoring queries usage by tag(s). - * + *

The percentage of Database Monitoring queries usage by tag(s).

* @return dbmQueriesPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmQueriesPercentage() { - return dbmQueriesPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmQueriesPercentage() { + return dbmQueriesPercentage; + } public void setDbmQueriesPercentage(Double dbmQueriesPercentage) { this.dbmQueriesPercentage = dbmQueriesPercentage; } - public MonthlyUsageAttributionValues dbmQueriesUsage(Double dbmQueriesUsage) { this.dbmQueriesUsage = dbmQueriesUsage; return this; } /** - * The Database Monitoring queries usage by tag(s). - * + *

The Database Monitoring queries usage by tag(s).

* @return dbmQueriesUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmQueriesUsage() { - return dbmQueriesUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmQueriesUsage() { + return dbmQueriesUsage; + } public void setDbmQueriesUsage(Double dbmQueriesUsage) { this.dbmQueriesUsage = dbmQueriesUsage; } - - public MonthlyUsageAttributionValues estimatedIndexedLogsPercentage( - Double estimatedIndexedLogsPercentage) { + public MonthlyUsageAttributionValues estimatedIndexedLogsPercentage(Double estimatedIndexedLogsPercentage) { this.estimatedIndexedLogsPercentage = estimatedIndexedLogsPercentage; return this; } /** - * The percentage of estimated live indexed logs usage by tag(s). - * + *

The percentage of estimated live indexed logs usage by tag(s).

* @return estimatedIndexedLogsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedLogsPercentage() { - return estimatedIndexedLogsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedLogsPercentage() { + return estimatedIndexedLogsPercentage; + } public void setEstimatedIndexedLogsPercentage(Double estimatedIndexedLogsPercentage) { this.estimatedIndexedLogsPercentage = estimatedIndexedLogsPercentage; } - public MonthlyUsageAttributionValues estimatedIndexedLogsUsage(Double estimatedIndexedLogsUsage) { this.estimatedIndexedLogsUsage = estimatedIndexedLogsUsage; return this; } /** - * The estimated live indexed logs usage by tag(s). - * + *

The estimated live indexed logs usage by tag(s).

* @return estimatedIndexedLogsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedLogsUsage() { - return estimatedIndexedLogsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedLogsUsage() { + return estimatedIndexedLogsUsage; + } public void setEstimatedIndexedLogsUsage(Double estimatedIndexedLogsUsage) { this.estimatedIndexedLogsUsage = estimatedIndexedLogsUsage; } - - public MonthlyUsageAttributionValues estimatedIndexedSpansPercentage( - Double estimatedIndexedSpansPercentage) { + public MonthlyUsageAttributionValues estimatedIndexedSpansPercentage(Double estimatedIndexedSpansPercentage) { this.estimatedIndexedSpansPercentage = estimatedIndexedSpansPercentage; return this; } /** - * The percentage of estimated indexed spans usage by tag(s). - * + *

The percentage of estimated indexed spans usage by tag(s).

* @return estimatedIndexedSpansPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedSpansPercentage() { - return estimatedIndexedSpansPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedSpansPercentage() { + return estimatedIndexedSpansPercentage; + } public void setEstimatedIndexedSpansPercentage(Double estimatedIndexedSpansPercentage) { this.estimatedIndexedSpansPercentage = estimatedIndexedSpansPercentage; } - - public MonthlyUsageAttributionValues estimatedIndexedSpansUsage( - Double estimatedIndexedSpansUsage) { + public MonthlyUsageAttributionValues estimatedIndexedSpansUsage(Double estimatedIndexedSpansUsage) { this.estimatedIndexedSpansUsage = estimatedIndexedSpansUsage; return this; } /** - * The estimated indexed spans usage by tag(s). - * + *

The estimated indexed spans usage by tag(s).

* @return estimatedIndexedSpansUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedSpansUsage() { - return estimatedIndexedSpansUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedSpansUsage() { + return estimatedIndexedSpansUsage; + } public void setEstimatedIndexedSpansUsage(Double estimatedIndexedSpansUsage) { this.estimatedIndexedSpansUsage = estimatedIndexedSpansUsage; } - - public MonthlyUsageAttributionValues estimatedIngestedLogsPercentage( - Double estimatedIngestedLogsPercentage) { + public MonthlyUsageAttributionValues estimatedIngestedLogsPercentage(Double estimatedIngestedLogsPercentage) { this.estimatedIngestedLogsPercentage = estimatedIngestedLogsPercentage; return this; } /** - * The percentage of estimated live ingested logs usage by tag(s). - * + *

The percentage of estimated live ingested logs usage by tag(s).

* @return estimatedIngestedLogsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedLogsPercentage() { - return estimatedIngestedLogsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedLogsPercentage() { + return estimatedIngestedLogsPercentage; + } public void setEstimatedIngestedLogsPercentage(Double estimatedIngestedLogsPercentage) { this.estimatedIngestedLogsPercentage = estimatedIngestedLogsPercentage; } - - public MonthlyUsageAttributionValues estimatedIngestedLogsUsage( - Double estimatedIngestedLogsUsage) { + public MonthlyUsageAttributionValues estimatedIngestedLogsUsage(Double estimatedIngestedLogsUsage) { this.estimatedIngestedLogsUsage = estimatedIngestedLogsUsage; return this; } /** - * The estimated live ingested logs usage by tag(s). - * + *

The estimated live ingested logs usage by tag(s).

* @return estimatedIngestedLogsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedLogsUsage() { - return estimatedIngestedLogsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedLogsUsage() { + return estimatedIngestedLogsUsage; + } public void setEstimatedIngestedLogsUsage(Double estimatedIngestedLogsUsage) { this.estimatedIngestedLogsUsage = estimatedIngestedLogsUsage; } - - public MonthlyUsageAttributionValues estimatedIngestedSpansPercentage( - Double estimatedIngestedSpansPercentage) { + public MonthlyUsageAttributionValues estimatedIngestedSpansPercentage(Double estimatedIngestedSpansPercentage) { this.estimatedIngestedSpansPercentage = estimatedIngestedSpansPercentage; return this; } /** - * The percentage of estimated ingested spans usage by tag(s). - * + *

The percentage of estimated ingested spans usage by tag(s).

* @return estimatedIngestedSpansPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedSpansPercentage() { - return estimatedIngestedSpansPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedSpansPercentage() { + return estimatedIngestedSpansPercentage; + } public void setEstimatedIngestedSpansPercentage(Double estimatedIngestedSpansPercentage) { this.estimatedIngestedSpansPercentage = estimatedIngestedSpansPercentage; } - - public MonthlyUsageAttributionValues estimatedIngestedSpansUsage( - Double estimatedIngestedSpansUsage) { + public MonthlyUsageAttributionValues estimatedIngestedSpansUsage(Double estimatedIngestedSpansUsage) { this.estimatedIngestedSpansUsage = estimatedIngestedSpansUsage; return this; } /** - * The estimated ingested spans usage by tag(s). - * + *

The estimated ingested spans usage by tag(s).

* @return estimatedIngestedSpansUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedSpansUsage() { - return estimatedIngestedSpansUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedSpansUsage() { + return estimatedIngestedSpansUsage; + } public void setEstimatedIngestedSpansUsage(Double estimatedIngestedSpansUsage) { this.estimatedIngestedSpansUsage = estimatedIngestedSpansUsage; } - - public MonthlyUsageAttributionValues estimatedRumSessionsPercentage( - Double estimatedRumSessionsPercentage) { + public MonthlyUsageAttributionValues estimatedRumSessionsPercentage(Double estimatedRumSessionsPercentage) { this.estimatedRumSessionsPercentage = estimatedRumSessionsPercentage; return this; } /** - * The percentage of estimated rum sessions usage by tag(s). - * + *

The percentage of estimated rum sessions usage by tag(s).

* @return estimatedRumSessionsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedRumSessionsPercentage() { - return estimatedRumSessionsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedRumSessionsPercentage() { + return estimatedRumSessionsPercentage; + } public void setEstimatedRumSessionsPercentage(Double estimatedRumSessionsPercentage) { this.estimatedRumSessionsPercentage = estimatedRumSessionsPercentage; } - public MonthlyUsageAttributionValues estimatedRumSessionsUsage(Double estimatedRumSessionsUsage) { this.estimatedRumSessionsUsage = estimatedRumSessionsUsage; return this; } /** - * The estimated rum sessions usage by tag(s). - * + *

The estimated rum sessions usage by tag(s).

* @return estimatedRumSessionsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedRumSessionsUsage() { - return estimatedRumSessionsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedRumSessionsUsage() { + return estimatedRumSessionsUsage; + } public void setEstimatedRumSessionsUsage(Double estimatedRumSessionsUsage) { this.estimatedRumSessionsUsage = estimatedRumSessionsUsage; } - public MonthlyUsageAttributionValues fargatePercentage(Double fargatePercentage) { this.fargatePercentage = fargatePercentage; return this; } /** - * The percentage of Fargate usage by tags. - * + *

The percentage of Fargate usage by tags.

* @return fargatePercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getFargatePercentage() { - return fargatePercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getFargatePercentage() { + return fargatePercentage; + } public void setFargatePercentage(Double fargatePercentage) { this.fargatePercentage = fargatePercentage; } - public MonthlyUsageAttributionValues fargateUsage(Double fargateUsage) { this.fargateUsage = fargateUsage; return this; } /** - * The Fargate usage by tags. - * + *

The Fargate usage by tags.

* @return fargateUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getFargateUsage() { - return fargateUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getFargateUsage() { + return fargateUsage; + } public void setFargateUsage(Double fargateUsage) { this.fargateUsage = fargateUsage; } - public MonthlyUsageAttributionValues functionsPercentage(Double functionsPercentage) { this.functionsPercentage = functionsPercentage; return this; } /** - * The percentage of Lambda function usage by tag(s). - * + *

The percentage of Lambda function usage by tag(s).

* @return functionsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FUNCTIONS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getFunctionsPercentage() { - return functionsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNCTIONS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getFunctionsPercentage() { + return functionsPercentage; + } public void setFunctionsPercentage(Double functionsPercentage) { this.functionsPercentage = functionsPercentage; } - public MonthlyUsageAttributionValues functionsUsage(Double functionsUsage) { this.functionsUsage = functionsUsage; return this; } /** - * The Lambda function usage by tag(s). - * + *

The Lambda function usage by tag(s).

* @return functionsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FUNCTIONS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getFunctionsUsage() { - return functionsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNCTIONS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getFunctionsUsage() { + return functionsUsage; + } public void setFunctionsUsage(Double functionsUsage) { this.functionsUsage = functionsUsage; } - public MonthlyUsageAttributionValues infraHostPercentage(Double infraHostPercentage) { this.infraHostPercentage = infraHostPercentage; return this; } /** - * The percentage of infrastructure host usage by tag(s). - * + *

The percentage of infrastructure host usage by tag(s).

* @return infraHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInfraHostPercentage() { - return infraHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInfraHostPercentage() { + return infraHostPercentage; + } public void setInfraHostPercentage(Double infraHostPercentage) { this.infraHostPercentage = infraHostPercentage; } - public MonthlyUsageAttributionValues infraHostUsage(Double infraHostUsage) { this.infraHostUsage = infraHostUsage; return this; } /** - * The infrastructure host usage by tag(s). - * + *

The infrastructure host usage by tag(s).

* @return infraHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInfraHostUsage() { - return infraHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInfraHostUsage() { + return infraHostUsage; + } public void setInfraHostUsage(Double infraHostUsage) { this.infraHostUsage = infraHostUsage; } - public MonthlyUsageAttributionValues invocationsPercentage(Double invocationsPercentage) { this.invocationsPercentage = invocationsPercentage; return this; } /** - * The percentage of Lambda invocation usage by tag(s). - * + *

The percentage of Lambda invocation usage by tag(s).

* @return invocationsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INVOCATIONS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInvocationsPercentage() { - return invocationsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVOCATIONS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInvocationsPercentage() { + return invocationsPercentage; + } public void setInvocationsPercentage(Double invocationsPercentage) { this.invocationsPercentage = invocationsPercentage; } - public MonthlyUsageAttributionValues invocationsUsage(Double invocationsUsage) { this.invocationsUsage = invocationsUsage; return this; } /** - * The Lambda invocation usage by tag(s). - * + *

The Lambda invocation usage by tag(s).

* @return invocationsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INVOCATIONS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInvocationsUsage() { - return invocationsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVOCATIONS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInvocationsUsage() { + return invocationsUsage; + } public void setInvocationsUsage(Double invocationsUsage) { this.invocationsUsage = invocationsUsage; } - public MonthlyUsageAttributionValues npmHostPercentage(Double npmHostPercentage) { this.npmHostPercentage = npmHostPercentage; return this; } /** - * The percentage of network host usage by tag(s). - * + *

The percentage of network host usage by tag(s).

* @return npmHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getNpmHostPercentage() { - return npmHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getNpmHostPercentage() { + return npmHostPercentage; + } public void setNpmHostPercentage(Double npmHostPercentage) { this.npmHostPercentage = npmHostPercentage; } - public MonthlyUsageAttributionValues npmHostUsage(Double npmHostUsage) { this.npmHostUsage = npmHostUsage; return this; } /** - * The network host usage by tag(s). - * + *

The network host usage by tag(s).

* @return npmHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getNpmHostUsage() { - return npmHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getNpmHostUsage() { + return npmHostUsage; + } public void setNpmHostUsage(Double npmHostUsage) { this.npmHostUsage = npmHostUsage; } - - public MonthlyUsageAttributionValues profiledContainerPercentage( - Double profiledContainerPercentage) { + public MonthlyUsageAttributionValues profiledContainerPercentage(Double profiledContainerPercentage) { this.profiledContainerPercentage = profiledContainerPercentage; return this; } /** - * The percentage of profiled container usage by tag(s). - * + *

The percentage of profiled container usage by tag(s).

* @return profiledContainerPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledContainerPercentage() { - return profiledContainerPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledContainerPercentage() { + return profiledContainerPercentage; + } public void setProfiledContainerPercentage(Double profiledContainerPercentage) { this.profiledContainerPercentage = profiledContainerPercentage; } - public MonthlyUsageAttributionValues profiledContainerUsage(Double profiledContainerUsage) { this.profiledContainerUsage = profiledContainerUsage; return this; } /** - * The profiled container usage by tag(s). - * + *

The profiled container usage by tag(s).

* @return profiledContainerUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledContainerUsage() { - return profiledContainerUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledContainerUsage() { + return profiledContainerUsage; + } public void setProfiledContainerUsage(Double profiledContainerUsage) { this.profiledContainerUsage = profiledContainerUsage; } - public MonthlyUsageAttributionValues profiledFargatePercentage(Double profiledFargatePercentage) { this.profiledFargatePercentage = profiledFargatePercentage; return this; } /** - * The percentage of profiled Fargate task usage by tag(s). - * + *

The percentage of profiled Fargate task usage by tag(s).

* @return profiledFargatePercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_FARGATE_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledFargatePercentage() { - return profiledFargatePercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_FARGATE_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledFargatePercentage() { + return profiledFargatePercentage; + } public void setProfiledFargatePercentage(Double profiledFargatePercentage) { this.profiledFargatePercentage = profiledFargatePercentage; } - public MonthlyUsageAttributionValues profiledFargateUsage(Double profiledFargateUsage) { this.profiledFargateUsage = profiledFargateUsage; return this; } /** - * The profiled Fargate task usage by tag(s). - * + *

The profiled Fargate task usage by tag(s).

* @return profiledFargateUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_FARGATE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledFargateUsage() { - return profiledFargateUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_FARGATE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledFargateUsage() { + return profiledFargateUsage; + } public void setProfiledFargateUsage(Double profiledFargateUsage) { this.profiledFargateUsage = profiledFargateUsage; } - public MonthlyUsageAttributionValues profiledHostPercentage(Double profiledHostPercentage) { this.profiledHostPercentage = profiledHostPercentage; return this; } /** - * The percentage of profiled hosts usage by tag(s). - * + *

The percentage of profiled hosts usage by tag(s).

* @return profiledHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledHostPercentage() { - return profiledHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledHostPercentage() { + return profiledHostPercentage; + } public void setProfiledHostPercentage(Double profiledHostPercentage) { this.profiledHostPercentage = profiledHostPercentage; } - public MonthlyUsageAttributionValues profiledHostUsage(Double profiledHostUsage) { this.profiledHostUsage = profiledHostUsage; return this; } /** - * The profiled hosts usage by tag(s). - * + *

The profiled hosts usage by tag(s).

* @return profiledHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledHostUsage() { - return profiledHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledHostUsage() { + return profiledHostUsage; + } public void setProfiledHostUsage(Double profiledHostUsage) { this.profiledHostUsage = profiledHostUsage; } - public MonthlyUsageAttributionValues snmpPercentage(Double snmpPercentage) { this.snmpPercentage = snmpPercentage; return this; } /** - * The percentage of network device usage by tag(s). - * + *

The percentage of network device usage by tag(s).

* @return snmpPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNMP_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSnmpPercentage() { - return snmpPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSnmpPercentage() { + return snmpPercentage; + } public void setSnmpPercentage(Double snmpPercentage) { this.snmpPercentage = snmpPercentage; } - public MonthlyUsageAttributionValues snmpUsage(Double snmpUsage) { this.snmpUsage = snmpUsage; return this; } /** - * The network device usage by tag(s). - * + *

The network device usage by tag(s).

* @return snmpUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNMP_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSnmpUsage() { - return snmpUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSnmpUsage() { + return snmpUsage; + } public void setSnmpUsage(Double snmpUsage) { this.snmpUsage = snmpUsage; } - /** Return true if this MonthlyUsageAttributionValues object is equal to o. */ + /** + * Return true if this MonthlyUsageAttributionValues object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -1506,168 +1386,13 @@ public boolean equals(Object o) { return false; } MonthlyUsageAttributionValues monthlyUsageAttributionValues = (MonthlyUsageAttributionValues) o; - return Objects.equals(this.apiPercentage, monthlyUsageAttributionValues.apiPercentage) - && Objects.equals(this.apiUsage, monthlyUsageAttributionValues.apiUsage) - && Objects.equals( - this.apmFargatePercentage, monthlyUsageAttributionValues.apmFargatePercentage) - && Objects.equals(this.apmFargateUsage, monthlyUsageAttributionValues.apmFargateUsage) - && Objects.equals(this.apmHostPercentage, monthlyUsageAttributionValues.apmHostPercentage) - && Objects.equals(this.apmHostUsage, monthlyUsageAttributionValues.apmHostUsage) - && Objects.equals( - this.appsecFargatePercentage, monthlyUsageAttributionValues.appsecFargatePercentage) - && Objects.equals(this.appsecFargateUsage, monthlyUsageAttributionValues.appsecFargateUsage) - && Objects.equals(this.appsecPercentage, monthlyUsageAttributionValues.appsecPercentage) - && Objects.equals(this.appsecUsage, monthlyUsageAttributionValues.appsecUsage) - && Objects.equals(this.browserPercentage, monthlyUsageAttributionValues.browserPercentage) - && Objects.equals(this.browserUsage, monthlyUsageAttributionValues.browserUsage) - && Objects.equals( - this.containerExclAgentPercentage, - monthlyUsageAttributionValues.containerExclAgentPercentage) - && Objects.equals( - this.containerExclAgentUsage, monthlyUsageAttributionValues.containerExclAgentUsage) - && Objects.equals( - this.containerPercentage, monthlyUsageAttributionValues.containerPercentage) - && Objects.equals(this.containerUsage, monthlyUsageAttributionValues.containerUsage) - && Objects.equals( - this.cspmContainersPercentage, monthlyUsageAttributionValues.cspmContainersPercentage) - && Objects.equals( - this.cspmContainersUsage, monthlyUsageAttributionValues.cspmContainersUsage) - && Objects.equals( - this.cspmHostsPercentage, monthlyUsageAttributionValues.cspmHostsPercentage) - && Objects.equals(this.cspmHostsUsage, monthlyUsageAttributionValues.cspmHostsUsage) - && Objects.equals( - this.customTimeseriesPercentage, - monthlyUsageAttributionValues.customTimeseriesPercentage) - && Objects.equals( - this.customTimeseriesUsage, monthlyUsageAttributionValues.customTimeseriesUsage) - && Objects.equals( - this.cwsContainersPercentage, monthlyUsageAttributionValues.cwsContainersPercentage) - && Objects.equals(this.cwsContainersUsage, monthlyUsageAttributionValues.cwsContainersUsage) - && Objects.equals(this.cwsHostsPercentage, monthlyUsageAttributionValues.cwsHostsPercentage) - && Objects.equals(this.cwsHostsUsage, monthlyUsageAttributionValues.cwsHostsUsage) - && Objects.equals(this.dbmHostsPercentage, monthlyUsageAttributionValues.dbmHostsPercentage) - && Objects.equals(this.dbmHostsUsage, monthlyUsageAttributionValues.dbmHostsUsage) - && Objects.equals( - this.dbmQueriesPercentage, monthlyUsageAttributionValues.dbmQueriesPercentage) - && Objects.equals(this.dbmQueriesUsage, monthlyUsageAttributionValues.dbmQueriesUsage) - && Objects.equals( - this.estimatedIndexedLogsPercentage, - monthlyUsageAttributionValues.estimatedIndexedLogsPercentage) - && Objects.equals( - this.estimatedIndexedLogsUsage, monthlyUsageAttributionValues.estimatedIndexedLogsUsage) - && Objects.equals( - this.estimatedIndexedSpansPercentage, - monthlyUsageAttributionValues.estimatedIndexedSpansPercentage) - && Objects.equals( - this.estimatedIndexedSpansUsage, - monthlyUsageAttributionValues.estimatedIndexedSpansUsage) - && Objects.equals( - this.estimatedIngestedLogsPercentage, - monthlyUsageAttributionValues.estimatedIngestedLogsPercentage) - && Objects.equals( - this.estimatedIngestedLogsUsage, - monthlyUsageAttributionValues.estimatedIngestedLogsUsage) - && Objects.equals( - this.estimatedIngestedSpansPercentage, - monthlyUsageAttributionValues.estimatedIngestedSpansPercentage) - && Objects.equals( - this.estimatedIngestedSpansUsage, - monthlyUsageAttributionValues.estimatedIngestedSpansUsage) - && Objects.equals( - this.estimatedRumSessionsPercentage, - monthlyUsageAttributionValues.estimatedRumSessionsPercentage) - && Objects.equals( - this.estimatedRumSessionsUsage, monthlyUsageAttributionValues.estimatedRumSessionsUsage) - && Objects.equals(this.fargatePercentage, monthlyUsageAttributionValues.fargatePercentage) - && Objects.equals(this.fargateUsage, monthlyUsageAttributionValues.fargateUsage) - && Objects.equals( - this.functionsPercentage, monthlyUsageAttributionValues.functionsPercentage) - && Objects.equals(this.functionsUsage, monthlyUsageAttributionValues.functionsUsage) - && Objects.equals( - this.infraHostPercentage, monthlyUsageAttributionValues.infraHostPercentage) - && Objects.equals(this.infraHostUsage, monthlyUsageAttributionValues.infraHostUsage) - && Objects.equals( - this.invocationsPercentage, monthlyUsageAttributionValues.invocationsPercentage) - && Objects.equals(this.invocationsUsage, monthlyUsageAttributionValues.invocationsUsage) - && Objects.equals(this.npmHostPercentage, monthlyUsageAttributionValues.npmHostPercentage) - && Objects.equals(this.npmHostUsage, monthlyUsageAttributionValues.npmHostUsage) - && Objects.equals( - this.profiledContainerPercentage, - monthlyUsageAttributionValues.profiledContainerPercentage) - && Objects.equals( - this.profiledContainerUsage, monthlyUsageAttributionValues.profiledContainerUsage) - && Objects.equals( - this.profiledFargatePercentage, monthlyUsageAttributionValues.profiledFargatePercentage) - && Objects.equals( - this.profiledFargateUsage, monthlyUsageAttributionValues.profiledFargateUsage) - && Objects.equals( - this.profiledHostPercentage, monthlyUsageAttributionValues.profiledHostPercentage) - && Objects.equals(this.profiledHostUsage, monthlyUsageAttributionValues.profiledHostUsage) - && Objects.equals(this.snmpPercentage, monthlyUsageAttributionValues.snmpPercentage) - && Objects.equals(this.snmpUsage, monthlyUsageAttributionValues.snmpUsage); + return Objects.equals(this.apiPercentage, monthlyUsageAttributionValues.apiPercentage) && Objects.equals(this.apiUsage, monthlyUsageAttributionValues.apiUsage) && Objects.equals(this.apmFargatePercentage, monthlyUsageAttributionValues.apmFargatePercentage) && Objects.equals(this.apmFargateUsage, monthlyUsageAttributionValues.apmFargateUsage) && Objects.equals(this.apmHostPercentage, monthlyUsageAttributionValues.apmHostPercentage) && Objects.equals(this.apmHostUsage, monthlyUsageAttributionValues.apmHostUsage) && Objects.equals(this.appsecFargatePercentage, monthlyUsageAttributionValues.appsecFargatePercentage) && Objects.equals(this.appsecFargateUsage, monthlyUsageAttributionValues.appsecFargateUsage) && Objects.equals(this.appsecPercentage, monthlyUsageAttributionValues.appsecPercentage) && Objects.equals(this.appsecUsage, monthlyUsageAttributionValues.appsecUsage) && Objects.equals(this.browserPercentage, monthlyUsageAttributionValues.browserPercentage) && Objects.equals(this.browserUsage, monthlyUsageAttributionValues.browserUsage) && Objects.equals(this.containerExclAgentPercentage, monthlyUsageAttributionValues.containerExclAgentPercentage) && Objects.equals(this.containerExclAgentUsage, monthlyUsageAttributionValues.containerExclAgentUsage) && Objects.equals(this.containerPercentage, monthlyUsageAttributionValues.containerPercentage) && Objects.equals(this.containerUsage, monthlyUsageAttributionValues.containerUsage) && Objects.equals(this.cspmContainersPercentage, monthlyUsageAttributionValues.cspmContainersPercentage) && Objects.equals(this.cspmContainersUsage, monthlyUsageAttributionValues.cspmContainersUsage) && Objects.equals(this.cspmHostsPercentage, monthlyUsageAttributionValues.cspmHostsPercentage) && Objects.equals(this.cspmHostsUsage, monthlyUsageAttributionValues.cspmHostsUsage) && Objects.equals(this.customTimeseriesPercentage, monthlyUsageAttributionValues.customTimeseriesPercentage) && Objects.equals(this.customTimeseriesUsage, monthlyUsageAttributionValues.customTimeseriesUsage) && Objects.equals(this.cwsContainersPercentage, monthlyUsageAttributionValues.cwsContainersPercentage) && Objects.equals(this.cwsContainersUsage, monthlyUsageAttributionValues.cwsContainersUsage) && Objects.equals(this.cwsHostsPercentage, monthlyUsageAttributionValues.cwsHostsPercentage) && Objects.equals(this.cwsHostsUsage, monthlyUsageAttributionValues.cwsHostsUsage) && Objects.equals(this.dbmHostsPercentage, monthlyUsageAttributionValues.dbmHostsPercentage) && Objects.equals(this.dbmHostsUsage, monthlyUsageAttributionValues.dbmHostsUsage) && Objects.equals(this.dbmQueriesPercentage, monthlyUsageAttributionValues.dbmQueriesPercentage) && Objects.equals(this.dbmQueriesUsage, monthlyUsageAttributionValues.dbmQueriesUsage) && Objects.equals(this.estimatedIndexedLogsPercentage, monthlyUsageAttributionValues.estimatedIndexedLogsPercentage) && Objects.equals(this.estimatedIndexedLogsUsage, monthlyUsageAttributionValues.estimatedIndexedLogsUsage) && Objects.equals(this.estimatedIndexedSpansPercentage, monthlyUsageAttributionValues.estimatedIndexedSpansPercentage) && Objects.equals(this.estimatedIndexedSpansUsage, monthlyUsageAttributionValues.estimatedIndexedSpansUsage) && Objects.equals(this.estimatedIngestedLogsPercentage, monthlyUsageAttributionValues.estimatedIngestedLogsPercentage) && Objects.equals(this.estimatedIngestedLogsUsage, monthlyUsageAttributionValues.estimatedIngestedLogsUsage) && Objects.equals(this.estimatedIngestedSpansPercentage, monthlyUsageAttributionValues.estimatedIngestedSpansPercentage) && Objects.equals(this.estimatedIngestedSpansUsage, monthlyUsageAttributionValues.estimatedIngestedSpansUsage) && Objects.equals(this.estimatedRumSessionsPercentage, monthlyUsageAttributionValues.estimatedRumSessionsPercentage) && Objects.equals(this.estimatedRumSessionsUsage, monthlyUsageAttributionValues.estimatedRumSessionsUsage) && Objects.equals(this.fargatePercentage, monthlyUsageAttributionValues.fargatePercentage) && Objects.equals(this.fargateUsage, monthlyUsageAttributionValues.fargateUsage) && Objects.equals(this.functionsPercentage, monthlyUsageAttributionValues.functionsPercentage) && Objects.equals(this.functionsUsage, monthlyUsageAttributionValues.functionsUsage) && Objects.equals(this.infraHostPercentage, monthlyUsageAttributionValues.infraHostPercentage) && Objects.equals(this.infraHostUsage, monthlyUsageAttributionValues.infraHostUsage) && Objects.equals(this.invocationsPercentage, monthlyUsageAttributionValues.invocationsPercentage) && Objects.equals(this.invocationsUsage, monthlyUsageAttributionValues.invocationsUsage) && Objects.equals(this.npmHostPercentage, monthlyUsageAttributionValues.npmHostPercentage) && Objects.equals(this.npmHostUsage, monthlyUsageAttributionValues.npmHostUsage) && Objects.equals(this.profiledContainerPercentage, monthlyUsageAttributionValues.profiledContainerPercentage) && Objects.equals(this.profiledContainerUsage, monthlyUsageAttributionValues.profiledContainerUsage) && Objects.equals(this.profiledFargatePercentage, monthlyUsageAttributionValues.profiledFargatePercentage) && Objects.equals(this.profiledFargateUsage, monthlyUsageAttributionValues.profiledFargateUsage) && Objects.equals(this.profiledHostPercentage, monthlyUsageAttributionValues.profiledHostPercentage) && Objects.equals(this.profiledHostUsage, monthlyUsageAttributionValues.profiledHostUsage) && Objects.equals(this.snmpPercentage, monthlyUsageAttributionValues.snmpPercentage) && Objects.equals(this.snmpUsage, monthlyUsageAttributionValues.snmpUsage); } + @Override public int hashCode() { - return Objects.hash( - apiPercentage, - apiUsage, - apmFargatePercentage, - apmFargateUsage, - apmHostPercentage, - apmHostUsage, - appsecFargatePercentage, - appsecFargateUsage, - appsecPercentage, - appsecUsage, - browserPercentage, - browserUsage, - containerExclAgentPercentage, - containerExclAgentUsage, - containerPercentage, - containerUsage, - cspmContainersPercentage, - cspmContainersUsage, - cspmHostsPercentage, - cspmHostsUsage, - customTimeseriesPercentage, - customTimeseriesUsage, - cwsContainersPercentage, - cwsContainersUsage, - cwsHostsPercentage, - cwsHostsUsage, - dbmHostsPercentage, - dbmHostsUsage, - dbmQueriesPercentage, - dbmQueriesUsage, - estimatedIndexedLogsPercentage, - estimatedIndexedLogsUsage, - estimatedIndexedSpansPercentage, - estimatedIndexedSpansUsage, - estimatedIngestedLogsPercentage, - estimatedIngestedLogsUsage, - estimatedIngestedSpansPercentage, - estimatedIngestedSpansUsage, - estimatedRumSessionsPercentage, - estimatedRumSessionsUsage, - fargatePercentage, - fargateUsage, - functionsPercentage, - functionsUsage, - infraHostPercentage, - infraHostUsage, - invocationsPercentage, - invocationsUsage, - npmHostPercentage, - npmHostUsage, - profiledContainerPercentage, - profiledContainerUsage, - profiledFargatePercentage, - profiledFargateUsage, - profiledHostPercentage, - profiledHostUsage, - snmpPercentage, - snmpUsage); + return Objects.hash(apiPercentage,apiUsage,apmFargatePercentage,apmFargateUsage,apmHostPercentage,apmHostUsage,appsecFargatePercentage,appsecFargateUsage,appsecPercentage,appsecUsage,browserPercentage,browserUsage,containerExclAgentPercentage,containerExclAgentUsage,containerPercentage,containerUsage,cspmContainersPercentage,cspmContainersUsage,cspmHostsPercentage,cspmHostsUsage,customTimeseriesPercentage,customTimeseriesUsage,cwsContainersPercentage,cwsContainersUsage,cwsHostsPercentage,cwsHostsUsage,dbmHostsPercentage,dbmHostsUsage,dbmQueriesPercentage,dbmQueriesUsage,estimatedIndexedLogsPercentage,estimatedIndexedLogsUsage,estimatedIndexedSpansPercentage,estimatedIndexedSpansUsage,estimatedIngestedLogsPercentage,estimatedIngestedLogsUsage,estimatedIngestedSpansPercentage,estimatedIngestedSpansUsage,estimatedRumSessionsPercentage,estimatedRumSessionsUsage,fargatePercentage,fargateUsage,functionsPercentage,functionsUsage,infraHostPercentage,infraHostUsage,invocationsPercentage,invocationsUsage,npmHostPercentage,npmHostUsage,profiledContainerPercentage,profiledContainerUsage,profiledFargatePercentage,profiledFargateUsage,profiledHostPercentage,profiledHostUsage,snmpPercentage,snmpUsage); } @Override @@ -1676,119 +1401,59 @@ public String toString() { sb.append("class MonthlyUsageAttributionValues {\n"); sb.append(" apiPercentage: ").append(toIndentedString(apiPercentage)).append("\n"); sb.append(" apiUsage: ").append(toIndentedString(apiUsage)).append("\n"); - sb.append(" apmFargatePercentage: ") - .append(toIndentedString(apmFargatePercentage)) - .append("\n"); + sb.append(" apmFargatePercentage: ").append(toIndentedString(apmFargatePercentage)).append("\n"); sb.append(" apmFargateUsage: ").append(toIndentedString(apmFargateUsage)).append("\n"); sb.append(" apmHostPercentage: ").append(toIndentedString(apmHostPercentage)).append("\n"); sb.append(" apmHostUsage: ").append(toIndentedString(apmHostUsage)).append("\n"); - sb.append(" appsecFargatePercentage: ") - .append(toIndentedString(appsecFargatePercentage)) - .append("\n"); + sb.append(" appsecFargatePercentage: ").append(toIndentedString(appsecFargatePercentage)).append("\n"); sb.append(" appsecFargateUsage: ").append(toIndentedString(appsecFargateUsage)).append("\n"); sb.append(" appsecPercentage: ").append(toIndentedString(appsecPercentage)).append("\n"); sb.append(" appsecUsage: ").append(toIndentedString(appsecUsage)).append("\n"); sb.append(" browserPercentage: ").append(toIndentedString(browserPercentage)).append("\n"); sb.append(" browserUsage: ").append(toIndentedString(browserUsage)).append("\n"); - sb.append(" containerExclAgentPercentage: ") - .append(toIndentedString(containerExclAgentPercentage)) - .append("\n"); - sb.append(" containerExclAgentUsage: ") - .append(toIndentedString(containerExclAgentUsage)) - .append("\n"); - sb.append(" containerPercentage: ") - .append(toIndentedString(containerPercentage)) - .append("\n"); + sb.append(" containerExclAgentPercentage: ").append(toIndentedString(containerExclAgentPercentage)).append("\n"); + sb.append(" containerExclAgentUsage: ").append(toIndentedString(containerExclAgentUsage)).append("\n"); + sb.append(" containerPercentage: ").append(toIndentedString(containerPercentage)).append("\n"); sb.append(" containerUsage: ").append(toIndentedString(containerUsage)).append("\n"); - sb.append(" cspmContainersPercentage: ") - .append(toIndentedString(cspmContainersPercentage)) - .append("\n"); - sb.append(" cspmContainersUsage: ") - .append(toIndentedString(cspmContainersUsage)) - .append("\n"); - sb.append(" cspmHostsPercentage: ") - .append(toIndentedString(cspmHostsPercentage)) - .append("\n"); + sb.append(" cspmContainersPercentage: ").append(toIndentedString(cspmContainersPercentage)).append("\n"); + sb.append(" cspmContainersUsage: ").append(toIndentedString(cspmContainersUsage)).append("\n"); + sb.append(" cspmHostsPercentage: ").append(toIndentedString(cspmHostsPercentage)).append("\n"); sb.append(" cspmHostsUsage: ").append(toIndentedString(cspmHostsUsage)).append("\n"); - sb.append(" customTimeseriesPercentage: ") - .append(toIndentedString(customTimeseriesPercentage)) - .append("\n"); - sb.append(" customTimeseriesUsage: ") - .append(toIndentedString(customTimeseriesUsage)) - .append("\n"); - sb.append(" cwsContainersPercentage: ") - .append(toIndentedString(cwsContainersPercentage)) - .append("\n"); + sb.append(" customTimeseriesPercentage: ").append(toIndentedString(customTimeseriesPercentage)).append("\n"); + sb.append(" customTimeseriesUsage: ").append(toIndentedString(customTimeseriesUsage)).append("\n"); + sb.append(" cwsContainersPercentage: ").append(toIndentedString(cwsContainersPercentage)).append("\n"); sb.append(" cwsContainersUsage: ").append(toIndentedString(cwsContainersUsage)).append("\n"); sb.append(" cwsHostsPercentage: ").append(toIndentedString(cwsHostsPercentage)).append("\n"); sb.append(" cwsHostsUsage: ").append(toIndentedString(cwsHostsUsage)).append("\n"); sb.append(" dbmHostsPercentage: ").append(toIndentedString(dbmHostsPercentage)).append("\n"); sb.append(" dbmHostsUsage: ").append(toIndentedString(dbmHostsUsage)).append("\n"); - sb.append(" dbmQueriesPercentage: ") - .append(toIndentedString(dbmQueriesPercentage)) - .append("\n"); + sb.append(" dbmQueriesPercentage: ").append(toIndentedString(dbmQueriesPercentage)).append("\n"); sb.append(" dbmQueriesUsage: ").append(toIndentedString(dbmQueriesUsage)).append("\n"); - sb.append(" estimatedIndexedLogsPercentage: ") - .append(toIndentedString(estimatedIndexedLogsPercentage)) - .append("\n"); - sb.append(" estimatedIndexedLogsUsage: ") - .append(toIndentedString(estimatedIndexedLogsUsage)) - .append("\n"); - sb.append(" estimatedIndexedSpansPercentage: ") - .append(toIndentedString(estimatedIndexedSpansPercentage)) - .append("\n"); - sb.append(" estimatedIndexedSpansUsage: ") - .append(toIndentedString(estimatedIndexedSpansUsage)) - .append("\n"); - sb.append(" estimatedIngestedLogsPercentage: ") - .append(toIndentedString(estimatedIngestedLogsPercentage)) - .append("\n"); - sb.append(" estimatedIngestedLogsUsage: ") - .append(toIndentedString(estimatedIngestedLogsUsage)) - .append("\n"); - sb.append(" estimatedIngestedSpansPercentage: ") - .append(toIndentedString(estimatedIngestedSpansPercentage)) - .append("\n"); - sb.append(" estimatedIngestedSpansUsage: ") - .append(toIndentedString(estimatedIngestedSpansUsage)) - .append("\n"); - sb.append(" estimatedRumSessionsPercentage: ") - .append(toIndentedString(estimatedRumSessionsPercentage)) - .append("\n"); - sb.append(" estimatedRumSessionsUsage: ") - .append(toIndentedString(estimatedRumSessionsUsage)) - .append("\n"); + sb.append(" estimatedIndexedLogsPercentage: ").append(toIndentedString(estimatedIndexedLogsPercentage)).append("\n"); + sb.append(" estimatedIndexedLogsUsage: ").append(toIndentedString(estimatedIndexedLogsUsage)).append("\n"); + sb.append(" estimatedIndexedSpansPercentage: ").append(toIndentedString(estimatedIndexedSpansPercentage)).append("\n"); + sb.append(" estimatedIndexedSpansUsage: ").append(toIndentedString(estimatedIndexedSpansUsage)).append("\n"); + sb.append(" estimatedIngestedLogsPercentage: ").append(toIndentedString(estimatedIngestedLogsPercentage)).append("\n"); + sb.append(" estimatedIngestedLogsUsage: ").append(toIndentedString(estimatedIngestedLogsUsage)).append("\n"); + sb.append(" estimatedIngestedSpansPercentage: ").append(toIndentedString(estimatedIngestedSpansPercentage)).append("\n"); + sb.append(" estimatedIngestedSpansUsage: ").append(toIndentedString(estimatedIngestedSpansUsage)).append("\n"); + sb.append(" estimatedRumSessionsPercentage: ").append(toIndentedString(estimatedRumSessionsPercentage)).append("\n"); + sb.append(" estimatedRumSessionsUsage: ").append(toIndentedString(estimatedRumSessionsUsage)).append("\n"); sb.append(" fargatePercentage: ").append(toIndentedString(fargatePercentage)).append("\n"); sb.append(" fargateUsage: ").append(toIndentedString(fargateUsage)).append("\n"); - sb.append(" functionsPercentage: ") - .append(toIndentedString(functionsPercentage)) - .append("\n"); + sb.append(" functionsPercentage: ").append(toIndentedString(functionsPercentage)).append("\n"); sb.append(" functionsUsage: ").append(toIndentedString(functionsUsage)).append("\n"); - sb.append(" infraHostPercentage: ") - .append(toIndentedString(infraHostPercentage)) - .append("\n"); + sb.append(" infraHostPercentage: ").append(toIndentedString(infraHostPercentage)).append("\n"); sb.append(" infraHostUsage: ").append(toIndentedString(infraHostUsage)).append("\n"); - sb.append(" invocationsPercentage: ") - .append(toIndentedString(invocationsPercentage)) - .append("\n"); + sb.append(" invocationsPercentage: ").append(toIndentedString(invocationsPercentage)).append("\n"); sb.append(" invocationsUsage: ").append(toIndentedString(invocationsUsage)).append("\n"); sb.append(" npmHostPercentage: ").append(toIndentedString(npmHostPercentage)).append("\n"); sb.append(" npmHostUsage: ").append(toIndentedString(npmHostUsage)).append("\n"); - sb.append(" profiledContainerPercentage: ") - .append(toIndentedString(profiledContainerPercentage)) - .append("\n"); - sb.append(" profiledContainerUsage: ") - .append(toIndentedString(profiledContainerUsage)) - .append("\n"); - sb.append(" profiledFargatePercentage: ") - .append(toIndentedString(profiledFargatePercentage)) - .append("\n"); - sb.append(" profiledFargateUsage: ") - .append(toIndentedString(profiledFargateUsage)) - .append("\n"); - sb.append(" profiledHostPercentage: ") - .append(toIndentedString(profiledHostPercentage)) - .append("\n"); + sb.append(" profiledContainerPercentage: ").append(toIndentedString(profiledContainerPercentage)).append("\n"); + sb.append(" profiledContainerUsage: ").append(toIndentedString(profiledContainerUsage)).append("\n"); + sb.append(" profiledFargatePercentage: ").append(toIndentedString(profiledFargatePercentage)).append("\n"); + sb.append(" profiledFargateUsage: ").append(toIndentedString(profiledFargateUsage)).append("\n"); + sb.append(" profiledHostPercentage: ").append(toIndentedString(profiledHostPercentage)).append("\n"); sb.append(" profiledHostUsage: ").append(toIndentedString(profiledHostUsage)).append("\n"); sb.append(" snmpPercentage: ").append(toIndentedString(snmpPercentage)).append("\n"); sb.append(" snmpUsage: ").append(toIndentedString(snmpUsage)).append("\n"); @@ -1797,7 +1462,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinition.java index dff06ac1f2c..169ac1b38ad 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The notes and links widget is similar to free text widget, but allows for more formatting - * options. + *

The notes and links widget is similar to free text widget, but allows for more formatting options.

*/ @JsonPropertyOrder({ NoteWidgetDefinition.JSON_PROPERTY_BACKGROUND_COLOR, @@ -29,10 +45,10 @@ NoteWidgetDefinition.JSON_PROPERTY_TYPE, NoteWidgetDefinition.JSON_PROPERTY_VERTICAL_ALIGN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NoteWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BACKGROUND_COLOR = "background_color"; private String backgroundColor; @@ -67,117 +83,106 @@ public NoteWidgetDefinition() {} @JsonCreator public NoteWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) String content, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NoteWidgetDefinitionType type) { - this.content = content; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CONTENT)String content, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NoteWidgetDefinitionType type) { + this.content = content; + this.type = type; + this.unparsed |= !type.isValid(); } - public NoteWidgetDefinition backgroundColor(String backgroundColor) { this.backgroundColor = backgroundColor; return this; } /** - * Background color of the note. - * + *

Background color of the note.

* @return backgroundColor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBackgroundColor() { - return backgroundColor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BACKGROUND_COLOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBackgroundColor() { + return backgroundColor; + } public void setBackgroundColor(String backgroundColor) { this.backgroundColor = backgroundColor; } - public NoteWidgetDefinition content(String content) { this.content = content; return this; } /** - * Content of the note. - * + *

Content of the note.

* @return content - */ - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getContent() { - return content; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getContent() { + return content; + } public void setContent(String content) { this.content = content; } - public NoteWidgetDefinition fontSize(String fontSize) { this.fontSize = fontSize; return this; } /** - * Size of the text. - * + *

Size of the text.

* @return fontSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFontSize() { - return fontSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FONT_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFontSize() { + return fontSize; + } public void setFontSize(String fontSize) { this.fontSize = fontSize; } - public NoteWidgetDefinition hasPadding(Boolean hasPadding) { this.hasPadding = hasPadding; return this; } /** - * Whether to add padding or not. - * + *

Whether to add padding or not.

* @return hasPadding - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_PADDING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasPadding() { - return hasPadding; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_PADDING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasPadding() { + return hasPadding; + } public void setHasPadding(Boolean hasPadding) { this.hasPadding = hasPadding; } - public NoteWidgetDefinition showTick(Boolean showTick) { this.showTick = showTick; return this; } /** - * Whether to show a tick or not. - * + *

Whether to show a tick or not.

* @return showTick - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_TICK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowTick() { - return showTick; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_TICK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowTick() { + return showTick; + } public void setShowTick(Boolean showTick) { this.showTick = showTick; } - public NoteWidgetDefinition textAlign(WidgetTextAlign textAlign) { this.textAlign = textAlign; this.unparsed |= !textAlign.isValid(); @@ -185,24 +190,22 @@ public NoteWidgetDefinition textAlign(WidgetTextAlign textAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return textAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTextAlign() { - return textAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTextAlign() { + return textAlign; + } public void setTextAlign(WidgetTextAlign textAlign) { if (!textAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.textAlign = textAlign; } - public NoteWidgetDefinition tickEdge(WidgetTickEdge tickEdge) { this.tickEdge = tickEdge; this.unparsed |= !tickEdge.isValid(); @@ -210,45 +213,41 @@ public NoteWidgetDefinition tickEdge(WidgetTickEdge tickEdge) { } /** - * Define how you want to align the text on the widget. - * + *

Define how you want to align the text on the widget.

* @return tickEdge - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TICK_EDGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTickEdge getTickEdge() { - return tickEdge; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TICK_EDGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTickEdge getTickEdge() { + return tickEdge; + } public void setTickEdge(WidgetTickEdge tickEdge) { if (!tickEdge.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.tickEdge = tickEdge; } - public NoteWidgetDefinition tickPos(String tickPos) { this.tickPos = tickPos; return this; } /** - * Where to position the tick on an edge. - * + *

Where to position the tick on an edge.

* @return tickPos - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TICK_POS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTickPos() { - return tickPos; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TICK_POS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTickPos() { + return tickPos; + } public void setTickPos(String tickPos) { this.tickPos = tickPos; } - public NoteWidgetDefinition type(NoteWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -256,23 +255,21 @@ public NoteWidgetDefinition type(NoteWidgetDefinitionType type) { } /** - * Type of the note widget. - * + *

Type of the note widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NoteWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NoteWidgetDefinitionType getType() { + return type; + } public void setType(NoteWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public NoteWidgetDefinition verticalAlign(WidgetVerticalAlign verticalAlign) { this.verticalAlign = verticalAlign; this.unparsed |= !verticalAlign.isValid(); @@ -280,25 +277,26 @@ public NoteWidgetDefinition verticalAlign(WidgetVerticalAlign verticalAlign) { } /** - * Vertical alignment. - * + *

Vertical alignment.

* @return verticalAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERTICAL_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetVerticalAlign getVerticalAlign() { - return verticalAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERTICAL_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetVerticalAlign getVerticalAlign() { + return verticalAlign; + } public void setVerticalAlign(WidgetVerticalAlign verticalAlign) { if (!verticalAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.verticalAlign = verticalAlign; } - /** Return true if this NoteWidgetDefinition object is equal to o. */ + /** + * Return true if this NoteWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -308,31 +306,13 @@ public boolean equals(Object o) { return false; } NoteWidgetDefinition noteWidgetDefinition = (NoteWidgetDefinition) o; - return Objects.equals(this.backgroundColor, noteWidgetDefinition.backgroundColor) - && Objects.equals(this.content, noteWidgetDefinition.content) - && Objects.equals(this.fontSize, noteWidgetDefinition.fontSize) - && Objects.equals(this.hasPadding, noteWidgetDefinition.hasPadding) - && Objects.equals(this.showTick, noteWidgetDefinition.showTick) - && Objects.equals(this.textAlign, noteWidgetDefinition.textAlign) - && Objects.equals(this.tickEdge, noteWidgetDefinition.tickEdge) - && Objects.equals(this.tickPos, noteWidgetDefinition.tickPos) - && Objects.equals(this.type, noteWidgetDefinition.type) - && Objects.equals(this.verticalAlign, noteWidgetDefinition.verticalAlign); + return Objects.equals(this.backgroundColor, noteWidgetDefinition.backgroundColor) && Objects.equals(this.content, noteWidgetDefinition.content) && Objects.equals(this.fontSize, noteWidgetDefinition.fontSize) && Objects.equals(this.hasPadding, noteWidgetDefinition.hasPadding) && Objects.equals(this.showTick, noteWidgetDefinition.showTick) && Objects.equals(this.textAlign, noteWidgetDefinition.textAlign) && Objects.equals(this.tickEdge, noteWidgetDefinition.tickEdge) && Objects.equals(this.tickPos, noteWidgetDefinition.tickPos) && Objects.equals(this.type, noteWidgetDefinition.type) && Objects.equals(this.verticalAlign, noteWidgetDefinition.verticalAlign); } + @Override public int hashCode() { - return Objects.hash( - backgroundColor, - content, - fontSize, - hasPadding, - showTick, - textAlign, - tickEdge, - tickPos, - type, - verticalAlign); + return Objects.hash(backgroundColor,content,fontSize,hasPadding,showTick,textAlign,tickEdge,tickPos,type,verticalAlign); } @Override @@ -354,7 +334,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinitionType.java index 069ce69860a..3e7dcae2633 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/NoteWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the note widget. */ +/** + *

Type of the note widget.

+ */ @JsonSerialize(using = NoteWidgetDefinitionType.NoteWidgetDefinitionTypeSerializer.class) public class NoteWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class NoteWidgetDefinitionTypeSerializer - extends StdSerializer { - public NoteWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class NoteWidgetDefinitionTypeSerializer extends StdSerializer { + public NoteWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public NoteWidgetDefinitionTypeSerializer() { - this(null); - } + public NoteWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - NoteWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(NoteWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NoteWidgetDefinitionType object is equal to o. */ + /** + * Return true if this NoteWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookAbsoluteTime.java b/src/main/java/com/datadog/api/client/v1/model/NotebookAbsoluteTime.java index 3bc8c379fa9..6c96c096255 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookAbsoluteTime.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookAbsoluteTime.java @@ -6,28 +6,43 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Absolute timeframe. */ + +/** + *

Absolute timeframe.

+ */ @JsonPropertyOrder({ NotebookAbsoluteTime.JSON_PROPERTY_END, NotebookAbsoluteTime.JSON_PROPERTY_LIVE, NotebookAbsoluteTime.JSON_PROPERTY_START }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookAbsoluteTime { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_END = "end"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime end; @@ -35,7 +50,6 @@ public class NotebookAbsoluteTime { private Boolean live; public static final String JSON_PROPERTY_START = "start"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime start; @@ -43,74 +57,70 @@ public NotebookAbsoluteTime() {} @JsonCreator public NotebookAbsoluteTime( - @JsonProperty(required = true, value = JSON_PROPERTY_END) OffsetDateTime end, - @JsonProperty(required = true, value = JSON_PROPERTY_START) OffsetDateTime start) { - this.end = end; - this.start = start; + @JsonProperty(required=true, value=JSON_PROPERTY_END)OffsetDateTime end, + @JsonProperty(required=true, value=JSON_PROPERTY_START)OffsetDateTime start) { + this.end = end; + this.start = start; } - public NotebookAbsoluteTime end(OffsetDateTime end) { this.end = end; return this; } /** - * The end time. - * + *

The end time.

* @return end - */ - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getEnd() { - return end; - } - + **/ + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getEnd() { + return end; + } public void setEnd(OffsetDateTime end) { this.end = end; } - public NotebookAbsoluteTime live(Boolean live) { this.live = live; return this; } /** - * Indicates whether the timeframe should be shifted to end at the current time. - * + *

Indicates whether the timeframe should be shifted to end at the current time.

* @return live - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getLive() { - return live; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getLive() { + return live; + } public void setLive(Boolean live) { this.live = live; } - public NotebookAbsoluteTime start(OffsetDateTime start) { this.start = start; return this; } /** - * The start time. - * + *

The start time.

* @return start - */ - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getStart() { - return start; - } - + **/ + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getStart() { + return start; + } public void setStart(OffsetDateTime start) { this.start = start; } - /** Return true if this NotebookAbsoluteTime object is equal to o. */ + /** + * Return true if this NotebookAbsoluteTime object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +130,13 @@ public boolean equals(Object o) { return false; } NotebookAbsoluteTime notebookAbsoluteTime = (NotebookAbsoluteTime) o; - return Objects.equals(this.end, notebookAbsoluteTime.end) - && Objects.equals(this.live, notebookAbsoluteTime.live) - && Objects.equals(this.start, notebookAbsoluteTime.start); + return Objects.equals(this.end, notebookAbsoluteTime.end) && Objects.equals(this.live, notebookAbsoluteTime.live) && Objects.equals(this.start, notebookAbsoluteTime.start); } + @Override public int hashCode() { - return Objects.hash(end, live, start); + return Objects.hash(end,live,start); } @Override @@ -142,7 +151,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookAuthor.java b/src/main/java/com/datadog/api/client/v1/model/NotebookAuthor.java index c124ce38200..4f1412d7cd8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookAuthor.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookAuthor.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of user object returned by the API. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of user object returned by the API.

+ */ @JsonPropertyOrder({ NotebookAuthor.JSON_PROPERTY_CREATED_AT, NotebookAuthor.JSON_PROPERTY_DISABLED, @@ -28,12 +44,11 @@ NotebookAuthor.JSON_PROPERTY_TITLE, NotebookAuthor.JSON_PROPERTY_VERIFIED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookAuthor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; @@ -67,210 +82,189 @@ public NotebookAuthor createdAt(OffsetDateTime createdAt) { } /** - * Creation time of the user. - * + *

Creation time of the user.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public NotebookAuthor disabled(Boolean disabled) { this.disabled = disabled; return this; } /** - * Whether the user is disabled. - * + *

Whether the user is disabled.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } - public NotebookAuthor email(String email) { this.email = email; return this; } /** - * Email of the user. - * + *

Email of the user.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public NotebookAuthor handle(String handle) { this.handle = handle; return this; } /** - * Handle of the user. - * + *

Handle of the user.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public NotebookAuthor icon(String icon) { this.icon = icon; return this; } /** - * URL of the user's icon. - * + *

URL of the user's icon.

* @return icon - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ICON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIcon() { - return icon; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ICON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIcon() { + return icon; + } public void setIcon(String icon) { this.icon = icon; } - public NotebookAuthor name(String name) { this.name = JsonNullable.of(name); return this; } /** - * Name of the user. - * + *

Name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getName() { - return name.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getName_JsonNullable() { return name; } - - @JsonProperty(JSON_PROPERTY_NAME) - public void setName_JsonNullable(JsonNullable name) { + @JsonProperty(JSON_PROPERTY_NAME)public void setName_JsonNullable(JsonNullable name) { this.name = name; } - public void setName(String name) { this.name = JsonNullable.of(name); } - public NotebookAuthor status(String status) { this.status = status; return this; } /** - * Status of the user. - * + *

Status of the user.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - public NotebookAuthor title(String title) { this.title = JsonNullable.of(title); return this; } /** - * Title of the user. - * + *

Title of the user.

* @return title - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getTitle() { - return title.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTitle() { + return title.orElse(null); + } @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTitle_JsonNullable() { return title; } - - @JsonProperty(JSON_PROPERTY_TITLE) - public void setTitle_JsonNullable(JsonNullable title) { + @JsonProperty(JSON_PROPERTY_TITLE)public void setTitle_JsonNullable(JsonNullable title) { this.title = title; } - public void setTitle(String title) { this.title = JsonNullable.of(title); } - public NotebookAuthor verified(Boolean verified) { this.verified = verified; return this; } /** - * Whether the user is verified. - * + *

Whether the user is verified.

* @return verified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVerified() { - return verified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVerified() { + return verified; + } public void setVerified(Boolean verified) { this.verified = verified; } - /** Return true if this NotebookAuthor object is equal to o. */ + /** + * Return true if this NotebookAuthor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -280,20 +274,13 @@ public boolean equals(Object o) { return false; } NotebookAuthor notebookAuthor = (NotebookAuthor) o; - return Objects.equals(this.createdAt, notebookAuthor.createdAt) - && Objects.equals(this.disabled, notebookAuthor.disabled) - && Objects.equals(this.email, notebookAuthor.email) - && Objects.equals(this.handle, notebookAuthor.handle) - && Objects.equals(this.icon, notebookAuthor.icon) - && Objects.equals(this.name, notebookAuthor.name) - && Objects.equals(this.status, notebookAuthor.status) - && Objects.equals(this.title, notebookAuthor.title) - && Objects.equals(this.verified, notebookAuthor.verified); + return Objects.equals(this.createdAt, notebookAuthor.createdAt) && Objects.equals(this.disabled, notebookAuthor.disabled) && Objects.equals(this.email, notebookAuthor.email) && Objects.equals(this.handle, notebookAuthor.handle) && Objects.equals(this.icon, notebookAuthor.icon) && Objects.equals(this.name, notebookAuthor.name) && Objects.equals(this.status, notebookAuthor.status) && Objects.equals(this.title, notebookAuthor.title) && Objects.equals(this.verified, notebookAuthor.verified); } + @Override public int hashCode() { - return Objects.hash(createdAt, disabled, email, handle, icon, name, status, title, verified); + return Objects.hash(createdAt,disabled,email,handle,icon,name,status,title,verified); } @Override @@ -314,7 +301,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequest.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequest.java index 378e10f0dcc..f8e322a6459 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The description of a notebook cell create request. */ + +/** + *

The description of a notebook cell create request.

+ */ @JsonPropertyOrder({ NotebookCellCreateRequest.JSON_PROPERTY_ATTRIBUTES, NotebookCellCreateRequest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookCellCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebookCellCreateRequestAttributes attributes; @@ -32,15 +51,13 @@ public NotebookCellCreateRequest() {} @JsonCreator public NotebookCellCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebookCellCreateRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookCellResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebookCellCreateRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookCellResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookCellCreateRequest attributes(NotebookCellCreateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,24 +65,19 @@ public NotebookCellCreateRequest attributes(NotebookCellCreateRequestAttributes } /** - * The attributes of a notebook cell in create cell request. Valid cell types are markdown - * , timeseries, toplist, heatmap, - * distribution, log_stream. More information on each graph - * visualization type. - * + *

The attributes of a notebook cell in create cell request. Valid cell types are markdown, timeseries, toplist, heatmap, distribution, + * log_stream. More information on each graph visualization type.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCellCreateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCellCreateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebookCellCreateRequestAttributes attributes) { this.attributes = attributes; } - public NotebookCellCreateRequest type(NotebookCellResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -73,24 +85,25 @@ public NotebookCellCreateRequest type(NotebookCellResourceType type) { } /** - * Type of the Notebook Cell resource. - * + *

Type of the Notebook Cell resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCellResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCellResourceType getType() { + return type; + } public void setType(NotebookCellResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookCellCreateRequest object is equal to o. */ + /** + * Return true if this NotebookCellCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -100,13 +113,13 @@ public boolean equals(Object o) { return false; } NotebookCellCreateRequest notebookCellCreateRequest = (NotebookCellCreateRequest) o; - return Objects.equals(this.attributes, notebookCellCreateRequest.attributes) - && Objects.equals(this.type, notebookCellCreateRequest.type); + return Objects.equals(this.attributes, notebookCellCreateRequest.attributes) && Objects.equals(this.type, notebookCellCreateRequest.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -120,7 +133,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequestAttributes.java index b7421a5b8bd..55713833916 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellCreateRequestAttributes.java @@ -6,578 +6,461 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - NotebookCellCreateRequestAttributes.NotebookCellCreateRequestAttributesDeserializer.class) -@JsonSerialize( - using = NotebookCellCreateRequestAttributes.NotebookCellCreateRequestAttributesSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = NotebookCellCreateRequestAttributes.NotebookCellCreateRequestAttributesDeserializer.class) +@JsonSerialize(using = NotebookCellCreateRequestAttributes.NotebookCellCreateRequestAttributesSerializer.class) public class NotebookCellCreateRequestAttributes extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NotebookCellCreateRequestAttributes.class.getName()); + private static final Logger log = Logger.getLogger(NotebookCellCreateRequestAttributes.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class NotebookCellCreateRequestAttributesSerializer - extends StdSerializer { - public NotebookCellCreateRequestAttributesSerializer( - Class t) { - super(t); - } + public static class NotebookCellCreateRequestAttributesSerializer extends StdSerializer { + public NotebookCellCreateRequestAttributesSerializer(Class t) { + super(t); + } + + public NotebookCellCreateRequestAttributesSerializer() { + this(null); + } - public NotebookCellCreateRequestAttributesSerializer() { - this(null); + @Override + public void serialize(NotebookCellCreateRequestAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public void serialize( - NotebookCellCreateRequestAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + public static class NotebookCellCreateRequestAttributesDeserializer extends StdDeserializer { + public NotebookCellCreateRequestAttributesDeserializer() { + this(NotebookCellCreateRequestAttributes.class); + } + + public NotebookCellCreateRequestAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public NotebookCellCreateRequestAttributes 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 NotebookMarkdownCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookMarkdownCellAttributes.class.equals(Integer.class) || NotebookMarkdownCellAttributes.class.equals(Long.class) || NotebookMarkdownCellAttributes.class.equals(Float.class) || NotebookMarkdownCellAttributes.class.equals(Double.class) || NotebookMarkdownCellAttributes.class.equals(Boolean.class) || NotebookMarkdownCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookMarkdownCellAttributes.class.equals(Integer.class) || NotebookMarkdownCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookMarkdownCellAttributes.class.equals(Float.class) || NotebookMarkdownCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookMarkdownCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookMarkdownCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookMarkdownCellAttributes.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 (!((NotebookMarkdownCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookMarkdownCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookMarkdownCellAttributes'", e); + } + + // deserialize NotebookTimeseriesCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookTimeseriesCellAttributes.class.equals(Integer.class) || NotebookTimeseriesCellAttributes.class.equals(Long.class) || NotebookTimeseriesCellAttributes.class.equals(Float.class) || NotebookTimeseriesCellAttributes.class.equals(Double.class) || NotebookTimeseriesCellAttributes.class.equals(Boolean.class) || NotebookTimeseriesCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookTimeseriesCellAttributes.class.equals(Integer.class) || NotebookTimeseriesCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookTimeseriesCellAttributes.class.equals(Float.class) || NotebookTimeseriesCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookTimeseriesCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookTimeseriesCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookTimeseriesCellAttributes.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 (!((NotebookTimeseriesCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookTimeseriesCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookTimeseriesCellAttributes'", e); + } + + // deserialize NotebookToplistCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookToplistCellAttributes.class.equals(Integer.class) || NotebookToplistCellAttributes.class.equals(Long.class) || NotebookToplistCellAttributes.class.equals(Float.class) || NotebookToplistCellAttributes.class.equals(Double.class) || NotebookToplistCellAttributes.class.equals(Boolean.class) || NotebookToplistCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookToplistCellAttributes.class.equals(Integer.class) || NotebookToplistCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookToplistCellAttributes.class.equals(Float.class) || NotebookToplistCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookToplistCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookToplistCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookToplistCellAttributes.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 (!((NotebookToplistCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookToplistCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookToplistCellAttributes'", e); + } + + // deserialize NotebookHeatMapCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookHeatMapCellAttributes.class.equals(Integer.class) || NotebookHeatMapCellAttributes.class.equals(Long.class) || NotebookHeatMapCellAttributes.class.equals(Float.class) || NotebookHeatMapCellAttributes.class.equals(Double.class) || NotebookHeatMapCellAttributes.class.equals(Boolean.class) || NotebookHeatMapCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookHeatMapCellAttributes.class.equals(Integer.class) || NotebookHeatMapCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookHeatMapCellAttributes.class.equals(Float.class) || NotebookHeatMapCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookHeatMapCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookHeatMapCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookHeatMapCellAttributes.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 (!((NotebookHeatMapCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookHeatMapCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookHeatMapCellAttributes'", e); + } + + // deserialize NotebookDistributionCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookDistributionCellAttributes.class.equals(Integer.class) || NotebookDistributionCellAttributes.class.equals(Long.class) || NotebookDistributionCellAttributes.class.equals(Float.class) || NotebookDistributionCellAttributes.class.equals(Double.class) || NotebookDistributionCellAttributes.class.equals(Boolean.class) || NotebookDistributionCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookDistributionCellAttributes.class.equals(Integer.class) || NotebookDistributionCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookDistributionCellAttributes.class.equals(Float.class) || NotebookDistributionCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookDistributionCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookDistributionCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookDistributionCellAttributes.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 (!((NotebookDistributionCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookDistributionCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookDistributionCellAttributes'", e); + } + + // deserialize NotebookLogStreamCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookLogStreamCellAttributes.class.equals(Integer.class) || NotebookLogStreamCellAttributes.class.equals(Long.class) || NotebookLogStreamCellAttributes.class.equals(Float.class) || NotebookLogStreamCellAttributes.class.equals(Double.class) || NotebookLogStreamCellAttributes.class.equals(Boolean.class) || NotebookLogStreamCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookLogStreamCellAttributes.class.equals(Integer.class) || NotebookLogStreamCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookLogStreamCellAttributes.class.equals(Float.class) || NotebookLogStreamCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookLogStreamCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookLogStreamCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookLogStreamCellAttributes.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 (!((NotebookLogStreamCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookLogStreamCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookLogStreamCellAttributes'", e); + } + + NotebookCellCreateRequestAttributes ret = new NotebookCellCreateRequestAttributes(); + 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 NotebookCellCreateRequestAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "NotebookCellCreateRequestAttributes cannot be null"); + } } - } - public static class NotebookCellCreateRequestAttributesDeserializer - extends StdDeserializer { - public NotebookCellCreateRequestAttributesDeserializer() { - this(NotebookCellCreateRequestAttributes.class); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NotebookCellCreateRequestAttributes() { + super("oneOf", Boolean.FALSE); + } + public NotebookCellCreateRequestAttributes(NotebookMarkdownCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellCreateRequestAttributes(NotebookTimeseriesCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellCreateRequestAttributes(NotebookToplistCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellCreateRequestAttributes(NotebookHeatMapCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellCreateRequestAttributes(NotebookDistributionCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellCreateRequestAttributes(NotebookLogStreamCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public NotebookCellCreateRequestAttributesDeserializer(Class vc) { - super(vc); + static { + schemas.put("NotebookMarkdownCellAttributes", new GenericType() { + }); + schemas.put("NotebookTimeseriesCellAttributes", new GenericType() { + }); + schemas.put("NotebookToplistCellAttributes", new GenericType() { + }); + schemas.put("NotebookHeatMapCellAttributes", new GenericType() { + }); + schemas.put("NotebookDistributionCellAttributes", new GenericType() { + }); + schemas.put("NotebookLogStreamCellAttributes", new GenericType() { + }); + JSON.registerDescendants(NotebookCellCreateRequestAttributes.class, Collections.unmodifiableMap(schemas)); } @Override - public NotebookCellCreateRequestAttributes 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 NotebookMarkdownCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookMarkdownCellAttributes.class.equals(Integer.class) - || NotebookMarkdownCellAttributes.class.equals(Long.class) - || NotebookMarkdownCellAttributes.class.equals(Float.class) - || NotebookMarkdownCellAttributes.class.equals(Double.class) - || NotebookMarkdownCellAttributes.class.equals(Boolean.class) - || NotebookMarkdownCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookMarkdownCellAttributes.class.equals(Integer.class) - || NotebookMarkdownCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookMarkdownCellAttributes.class.equals(Float.class) - || NotebookMarkdownCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookMarkdownCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookMarkdownCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookMarkdownCellAttributes.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 (!((NotebookMarkdownCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookMarkdownCellAttributes'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookMarkdownCellAttributes'", e); - } - - // deserialize NotebookTimeseriesCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookTimeseriesCellAttributes.class.equals(Integer.class) - || NotebookTimeseriesCellAttributes.class.equals(Long.class) - || NotebookTimeseriesCellAttributes.class.equals(Float.class) - || NotebookTimeseriesCellAttributes.class.equals(Double.class) - || NotebookTimeseriesCellAttributes.class.equals(Boolean.class) - || NotebookTimeseriesCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookTimeseriesCellAttributes.class.equals(Integer.class) - || NotebookTimeseriesCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookTimeseriesCellAttributes.class.equals(Float.class) - || NotebookTimeseriesCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookTimeseriesCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookTimeseriesCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookTimeseriesCellAttributes.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 (!((NotebookTimeseriesCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookTimeseriesCellAttributes'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookTimeseriesCellAttributes'", e); - } + public Map getSchemas() { + return NotebookCellCreateRequestAttributes.schemas; + } - // deserialize NotebookToplistCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookToplistCellAttributes.class.equals(Integer.class) - || NotebookToplistCellAttributes.class.equals(Long.class) - || NotebookToplistCellAttributes.class.equals(Float.class) - || NotebookToplistCellAttributes.class.equals(Double.class) - || NotebookToplistCellAttributes.class.equals(Boolean.class) - || NotebookToplistCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookToplistCellAttributes.class.equals(Integer.class) - || NotebookToplistCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookToplistCellAttributes.class.equals(Float.class) - || NotebookToplistCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookToplistCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookToplistCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes + * + * 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(NotebookMarkdownCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookToplistCellAttributes.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 (!((NotebookToplistCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookToplistCellAttributes'"); + if (JSON.isInstanceOf(NotebookTimeseriesCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookToplistCellAttributes'", e); - } - - // deserialize NotebookHeatMapCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookHeatMapCellAttributes.class.equals(Integer.class) - || NotebookHeatMapCellAttributes.class.equals(Long.class) - || NotebookHeatMapCellAttributes.class.equals(Float.class) - || NotebookHeatMapCellAttributes.class.equals(Double.class) - || NotebookHeatMapCellAttributes.class.equals(Boolean.class) - || NotebookHeatMapCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookHeatMapCellAttributes.class.equals(Integer.class) - || NotebookHeatMapCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookHeatMapCellAttributes.class.equals(Float.class) - || NotebookHeatMapCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookHeatMapCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookHeatMapCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NotebookToplistCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookHeatMapCellAttributes.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 (!((NotebookHeatMapCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookHeatMapCellAttributes'"); + if (JSON.isInstanceOf(NotebookHeatMapCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookHeatMapCellAttributes'", e); - } - - // deserialize NotebookDistributionCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookDistributionCellAttributes.class.equals(Integer.class) - || NotebookDistributionCellAttributes.class.equals(Long.class) - || NotebookDistributionCellAttributes.class.equals(Float.class) - || NotebookDistributionCellAttributes.class.equals(Double.class) - || NotebookDistributionCellAttributes.class.equals(Boolean.class) - || NotebookDistributionCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookDistributionCellAttributes.class.equals(Integer.class) - || NotebookDistributionCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookDistributionCellAttributes.class.equals(Float.class) - || NotebookDistributionCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookDistributionCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookDistributionCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NotebookDistributionCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookDistributionCellAttributes.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 (!((NotebookDistributionCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookDistributionCellAttributes'"); + if (JSON.isInstanceOf(NotebookLogStreamCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NotebookDistributionCellAttributes'", - e); - } - // deserialize NotebookLogStreamCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookLogStreamCellAttributes.class.equals(Integer.class) - || NotebookLogStreamCellAttributes.class.equals(Long.class) - || NotebookLogStreamCellAttributes.class.equals(Float.class) - || NotebookLogStreamCellAttributes.class.equals(Double.class) - || NotebookLogStreamCellAttributes.class.equals(Boolean.class) - || NotebookLogStreamCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookLogStreamCellAttributes.class.equals(Integer.class) - || NotebookLogStreamCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookLogStreamCellAttributes.class.equals(Float.class) - || NotebookLogStreamCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookLogStreamCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookLogStreamCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookLogStreamCellAttributes.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 (!((NotebookLogStreamCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookLogStreamCellAttributes'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookLogStreamCellAttributes'", e); - } - - NotebookCellCreateRequestAttributes ret = new NotebookCellCreateRequestAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes + * + * @return The actual instance (NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes) + */ @Override - public NotebookCellCreateRequestAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NotebookCellCreateRequestAttributes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public NotebookCellCreateRequestAttributes() { - super("oneOf", Boolean.FALSE); - } - - public NotebookCellCreateRequestAttributes(NotebookMarkdownCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellCreateRequestAttributes(NotebookTimeseriesCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellCreateRequestAttributes(NotebookToplistCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellCreateRequestAttributes(NotebookHeatMapCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellCreateRequestAttributes(NotebookDistributionCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellCreateRequestAttributes(NotebookLogStreamCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "NotebookMarkdownCellAttributes", new GenericType() {}); - schemas.put( - "NotebookTimeseriesCellAttributes", new GenericType() {}); - schemas.put( - "NotebookToplistCellAttributes", new GenericType() {}); - schemas.put( - "NotebookHeatMapCellAttributes", new GenericType() {}); - schemas.put( - "NotebookDistributionCellAttributes", - new GenericType() {}); - schemas.put( - "NotebookLogStreamCellAttributes", new GenericType() {}); - JSON.registerDescendants( - NotebookCellCreateRequestAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return NotebookCellCreateRequestAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NotebookMarkdownCellAttributes, - * NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes - * - *

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( - NotebookMarkdownCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookTimeseriesCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookToplistCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookHeatMapCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookDistributionCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookLogStreamCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookMarkdownCellAttributes`. If the actual instance is not `NotebookMarkdownCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookMarkdownCellAttributes` + * @throws ClassCastException if the instance is not `NotebookMarkdownCellAttributes` + */ + public NotebookMarkdownCellAttributes getNotebookMarkdownCellAttributes() throws ClassCastException { + return (NotebookMarkdownCellAttributes)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookTimeseriesCellAttributes`. If the actual instance is not `NotebookTimeseriesCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookTimeseriesCellAttributes` + * @throws ClassCastException if the instance is not `NotebookTimeseriesCellAttributes` + */ + public NotebookTimeseriesCellAttributes getNotebookTimeseriesCellAttributes() throws ClassCastException { + return (NotebookTimeseriesCellAttributes)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be NotebookMarkdownCellAttributes," - + " NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes," - + " NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes," - + " NotebookLogStreamCellAttributes"); - } - - /** - * Get the actual instance, which can be the following: NotebookMarkdownCellAttributes, - * NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes - * - * @return The actual instance (NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, - * NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookMarkdownCellAttributes`. If the actual instance is not - * `NotebookMarkdownCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookMarkdownCellAttributes` - * @throws ClassCastException if the instance is not `NotebookMarkdownCellAttributes` - */ - public NotebookMarkdownCellAttributes getNotebookMarkdownCellAttributes() - throws ClassCastException { - return (NotebookMarkdownCellAttributes) super.getActualInstance(); - } - /** - * Get the actual instance of `NotebookTimeseriesCellAttributes`. If the actual instance is not - * `NotebookTimeseriesCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookTimeseriesCellAttributes` - * @throws ClassCastException if the instance is not `NotebookTimeseriesCellAttributes` - */ - public NotebookTimeseriesCellAttributes getNotebookTimeseriesCellAttributes() - throws ClassCastException { - return (NotebookTimeseriesCellAttributes) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookToplistCellAttributes`. If the actual instance is not - * `NotebookToplistCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookToplistCellAttributes` - * @throws ClassCastException if the instance is not `NotebookToplistCellAttributes` - */ - public NotebookToplistCellAttributes getNotebookToplistCellAttributes() - throws ClassCastException { - return (NotebookToplistCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookToplistCellAttributes`. If the actual instance is not `NotebookToplistCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookToplistCellAttributes` + * @throws ClassCastException if the instance is not `NotebookToplistCellAttributes` + */ + public NotebookToplistCellAttributes getNotebookToplistCellAttributes() throws ClassCastException { + return (NotebookToplistCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookHeatMapCellAttributes`. If the actual instance is not - * `NotebookHeatMapCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookHeatMapCellAttributes` - * @throws ClassCastException if the instance is not `NotebookHeatMapCellAttributes` - */ - public NotebookHeatMapCellAttributes getNotebookHeatMapCellAttributes() - throws ClassCastException { - return (NotebookHeatMapCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookHeatMapCellAttributes`. If the actual instance is not `NotebookHeatMapCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookHeatMapCellAttributes` + * @throws ClassCastException if the instance is not `NotebookHeatMapCellAttributes` + */ + public NotebookHeatMapCellAttributes getNotebookHeatMapCellAttributes() throws ClassCastException { + return (NotebookHeatMapCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookDistributionCellAttributes`. If the actual instance is not - * `NotebookDistributionCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookDistributionCellAttributes` - * @throws ClassCastException if the instance is not `NotebookDistributionCellAttributes` - */ - public NotebookDistributionCellAttributes getNotebookDistributionCellAttributes() - throws ClassCastException { - return (NotebookDistributionCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookDistributionCellAttributes`. If the actual instance is not `NotebookDistributionCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookDistributionCellAttributes` + * @throws ClassCastException if the instance is not `NotebookDistributionCellAttributes` + */ + public NotebookDistributionCellAttributes getNotebookDistributionCellAttributes() throws ClassCastException { + return (NotebookDistributionCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookLogStreamCellAttributes`. If the actual instance is not - * `NotebookLogStreamCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookLogStreamCellAttributes` - * @throws ClassCastException if the instance is not `NotebookLogStreamCellAttributes` - */ - public NotebookLogStreamCellAttributes getNotebookLogStreamCellAttributes() - throws ClassCastException { - return (NotebookLogStreamCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookLogStreamCellAttributes`. If the actual instance is not `NotebookLogStreamCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookLogStreamCellAttributes` + * @throws ClassCastException if the instance is not `NotebookLogStreamCellAttributes` + */ + public NotebookLogStreamCellAttributes getNotebookLogStreamCellAttributes() throws ClassCastException { + return (NotebookLogStreamCellAttributes)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellResourceType.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellResourceType.java index 8090d2c8da9..92fd77288a4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellResourceType.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellResourceType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Notebook Cell resource. */ +/** + *

Type of the Notebook Cell resource.

+ */ @JsonSerialize(using = NotebookCellResourceType.NotebookCellResourceTypeSerializer.class) public class NotebookCellResourceType { - public static final NotebookCellResourceType NOTEBOOK_CELLS = - new NotebookCellResourceType("notebook_cells"); + public static final NotebookCellResourceType NOTEBOOK_CELLS = new NotebookCellResourceType("notebook_cells"); - private static final Set allowedValues = - new HashSet(Arrays.asList("notebook_cells")); + private static final Set allowedValues = new HashSet(Arrays.asList("notebook_cells")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class NotebookCellResourceTypeSerializer - extends StdSerializer { - public NotebookCellResourceTypeSerializer(Class t) { - super(t); - } + public static class NotebookCellResourceTypeSerializer extends StdSerializer { + public NotebookCellResourceTypeSerializer(Class t) { + super(t); + } - public NotebookCellResourceTypeSerializer() { - this(null); - } + public NotebookCellResourceTypeSerializer() { + this(null); + } - @Override - public void serialize( - NotebookCellResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(NotebookCellResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NotebookCellResourceType object is equal to o. */ + /** + * Return true if this NotebookCellResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponse.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponse.java index ebecbd1d969..190aa9be0e3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponse.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The description of a notebook cell response. */ +/** + *

The description of a notebook cell response.

+ */ @JsonPropertyOrder({ NotebookCellResponse.JSON_PROPERTY_ATTRIBUTES, NotebookCellResponse.JSON_PROPERTY_ID, NotebookCellResponse.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookCellResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebookCellResponseAttributes attributes; @@ -36,17 +55,15 @@ public NotebookCellResponse() {} @JsonCreator public NotebookCellResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebookCellResponseAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookCellResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebookCellResponseAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookCellResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookCellResponse attributes(NotebookCellResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,43 +71,37 @@ public NotebookCellResponse attributes(NotebookCellResponseAttributes attributes } /** - * The attributes of a notebook cell response. Valid cell types are markdown, - * timeseries, toplist, heatmap, distribution, - * log_stream. More - * information on each graph visualization type. - * + *

The attributes of a notebook cell response. Valid cell types are markdown, timeseries, toplist, heatmap, distribution, + * log_stream. More information on each graph visualization type.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCellResponseAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCellResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebookCellResponseAttributes attributes) { this.attributes = attributes; } - public NotebookCellResponse id(String id) { this.id = id; return this; } /** - * Notebook cell ID. - * + *

Notebook cell ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public NotebookCellResponse type(NotebookCellResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -98,24 +109,25 @@ public NotebookCellResponse type(NotebookCellResourceType type) { } /** - * Type of the Notebook Cell resource. - * + *

Type of the Notebook Cell resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCellResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCellResourceType getType() { + return type; + } public void setType(NotebookCellResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookCellResponse object is equal to o. */ + /** + * Return true if this NotebookCellResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -125,14 +137,13 @@ public boolean equals(Object o) { return false; } NotebookCellResponse notebookCellResponse = (NotebookCellResponse) o; - return Objects.equals(this.attributes, notebookCellResponse.attributes) - && Objects.equals(this.id, notebookCellResponse.id) - && Objects.equals(this.type, notebookCellResponse.type); + return Objects.equals(this.attributes, notebookCellResponse.attributes) && Objects.equals(this.id, notebookCellResponse.id) && Objects.equals(this.type, notebookCellResponse.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -147,7 +158,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponseAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponseAttributes.java index cedf516595e..63b9181d06e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellResponseAttributes.java @@ -6,576 +6,461 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = NotebookCellResponseAttributes.NotebookCellResponseAttributesDeserializer.class) -@JsonSerialize( - using = NotebookCellResponseAttributes.NotebookCellResponseAttributesSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = NotebookCellResponseAttributes.NotebookCellResponseAttributesDeserializer.class) +@JsonSerialize(using = NotebookCellResponseAttributes.NotebookCellResponseAttributesSerializer.class) public class NotebookCellResponseAttributes extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NotebookCellResponseAttributes.class.getName()); + private static final Logger log = Logger.getLogger(NotebookCellResponseAttributes.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class NotebookCellResponseAttributesSerializer - extends StdSerializer { - public NotebookCellResponseAttributesSerializer(Class t) { - super(t); - } + public static class NotebookCellResponseAttributesSerializer extends StdSerializer { + public NotebookCellResponseAttributesSerializer(Class t) { + super(t); + } + + public NotebookCellResponseAttributesSerializer() { + this(null); + } - public NotebookCellResponseAttributesSerializer() { - this(null); + @Override + public void serialize(NotebookCellResponseAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public void serialize( - NotebookCellResponseAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + public static class NotebookCellResponseAttributesDeserializer extends StdDeserializer { + public NotebookCellResponseAttributesDeserializer() { + this(NotebookCellResponseAttributes.class); + } + + public NotebookCellResponseAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public NotebookCellResponseAttributes 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 NotebookMarkdownCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookMarkdownCellAttributes.class.equals(Integer.class) || NotebookMarkdownCellAttributes.class.equals(Long.class) || NotebookMarkdownCellAttributes.class.equals(Float.class) || NotebookMarkdownCellAttributes.class.equals(Double.class) || NotebookMarkdownCellAttributes.class.equals(Boolean.class) || NotebookMarkdownCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookMarkdownCellAttributes.class.equals(Integer.class) || NotebookMarkdownCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookMarkdownCellAttributes.class.equals(Float.class) || NotebookMarkdownCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookMarkdownCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookMarkdownCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookMarkdownCellAttributes.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 (!((NotebookMarkdownCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookMarkdownCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookMarkdownCellAttributes'", e); + } + + // deserialize NotebookTimeseriesCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookTimeseriesCellAttributes.class.equals(Integer.class) || NotebookTimeseriesCellAttributes.class.equals(Long.class) || NotebookTimeseriesCellAttributes.class.equals(Float.class) || NotebookTimeseriesCellAttributes.class.equals(Double.class) || NotebookTimeseriesCellAttributes.class.equals(Boolean.class) || NotebookTimeseriesCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookTimeseriesCellAttributes.class.equals(Integer.class) || NotebookTimeseriesCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookTimeseriesCellAttributes.class.equals(Float.class) || NotebookTimeseriesCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookTimeseriesCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookTimeseriesCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookTimeseriesCellAttributes.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 (!((NotebookTimeseriesCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookTimeseriesCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookTimeseriesCellAttributes'", e); + } + + // deserialize NotebookToplistCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookToplistCellAttributes.class.equals(Integer.class) || NotebookToplistCellAttributes.class.equals(Long.class) || NotebookToplistCellAttributes.class.equals(Float.class) || NotebookToplistCellAttributes.class.equals(Double.class) || NotebookToplistCellAttributes.class.equals(Boolean.class) || NotebookToplistCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookToplistCellAttributes.class.equals(Integer.class) || NotebookToplistCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookToplistCellAttributes.class.equals(Float.class) || NotebookToplistCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookToplistCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookToplistCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookToplistCellAttributes.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 (!((NotebookToplistCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookToplistCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookToplistCellAttributes'", e); + } + + // deserialize NotebookHeatMapCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookHeatMapCellAttributes.class.equals(Integer.class) || NotebookHeatMapCellAttributes.class.equals(Long.class) || NotebookHeatMapCellAttributes.class.equals(Float.class) || NotebookHeatMapCellAttributes.class.equals(Double.class) || NotebookHeatMapCellAttributes.class.equals(Boolean.class) || NotebookHeatMapCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookHeatMapCellAttributes.class.equals(Integer.class) || NotebookHeatMapCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookHeatMapCellAttributes.class.equals(Float.class) || NotebookHeatMapCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookHeatMapCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookHeatMapCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookHeatMapCellAttributes.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 (!((NotebookHeatMapCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookHeatMapCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookHeatMapCellAttributes'", e); + } + + // deserialize NotebookDistributionCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookDistributionCellAttributes.class.equals(Integer.class) || NotebookDistributionCellAttributes.class.equals(Long.class) || NotebookDistributionCellAttributes.class.equals(Float.class) || NotebookDistributionCellAttributes.class.equals(Double.class) || NotebookDistributionCellAttributes.class.equals(Boolean.class) || NotebookDistributionCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookDistributionCellAttributes.class.equals(Integer.class) || NotebookDistributionCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookDistributionCellAttributes.class.equals(Float.class) || NotebookDistributionCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookDistributionCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookDistributionCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookDistributionCellAttributes.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 (!((NotebookDistributionCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookDistributionCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookDistributionCellAttributes'", e); + } + + // deserialize NotebookLogStreamCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookLogStreamCellAttributes.class.equals(Integer.class) || NotebookLogStreamCellAttributes.class.equals(Long.class) || NotebookLogStreamCellAttributes.class.equals(Float.class) || NotebookLogStreamCellAttributes.class.equals(Double.class) || NotebookLogStreamCellAttributes.class.equals(Boolean.class) || NotebookLogStreamCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookLogStreamCellAttributes.class.equals(Integer.class) || NotebookLogStreamCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookLogStreamCellAttributes.class.equals(Float.class) || NotebookLogStreamCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookLogStreamCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookLogStreamCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookLogStreamCellAttributes.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 (!((NotebookLogStreamCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookLogStreamCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookLogStreamCellAttributes'", e); + } + + NotebookCellResponseAttributes ret = new NotebookCellResponseAttributes(); + 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 NotebookCellResponseAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "NotebookCellResponseAttributes cannot be null"); + } } - } - public static class NotebookCellResponseAttributesDeserializer - extends StdDeserializer { - public NotebookCellResponseAttributesDeserializer() { - this(NotebookCellResponseAttributes.class); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NotebookCellResponseAttributes() { + super("oneOf", Boolean.FALSE); + } + public NotebookCellResponseAttributes(NotebookMarkdownCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellResponseAttributes(NotebookTimeseriesCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellResponseAttributes(NotebookToplistCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellResponseAttributes(NotebookHeatMapCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellResponseAttributes(NotebookDistributionCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellResponseAttributes(NotebookLogStreamCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public NotebookCellResponseAttributesDeserializer(Class vc) { - super(vc); + static { + schemas.put("NotebookMarkdownCellAttributes", new GenericType() { + }); + schemas.put("NotebookTimeseriesCellAttributes", new GenericType() { + }); + schemas.put("NotebookToplistCellAttributes", new GenericType() { + }); + schemas.put("NotebookHeatMapCellAttributes", new GenericType() { + }); + schemas.put("NotebookDistributionCellAttributes", new GenericType() { + }); + schemas.put("NotebookLogStreamCellAttributes", new GenericType() { + }); + JSON.registerDescendants(NotebookCellResponseAttributes.class, Collections.unmodifiableMap(schemas)); } @Override - public NotebookCellResponseAttributes 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 NotebookMarkdownCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookMarkdownCellAttributes.class.equals(Integer.class) - || NotebookMarkdownCellAttributes.class.equals(Long.class) - || NotebookMarkdownCellAttributes.class.equals(Float.class) - || NotebookMarkdownCellAttributes.class.equals(Double.class) - || NotebookMarkdownCellAttributes.class.equals(Boolean.class) - || NotebookMarkdownCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookMarkdownCellAttributes.class.equals(Integer.class) - || NotebookMarkdownCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookMarkdownCellAttributes.class.equals(Float.class) - || NotebookMarkdownCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookMarkdownCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookMarkdownCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookMarkdownCellAttributes.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 (!((NotebookMarkdownCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookMarkdownCellAttributes'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookMarkdownCellAttributes'", e); - } - - // deserialize NotebookTimeseriesCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookTimeseriesCellAttributes.class.equals(Integer.class) - || NotebookTimeseriesCellAttributes.class.equals(Long.class) - || NotebookTimeseriesCellAttributes.class.equals(Float.class) - || NotebookTimeseriesCellAttributes.class.equals(Double.class) - || NotebookTimeseriesCellAttributes.class.equals(Boolean.class) - || NotebookTimeseriesCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookTimeseriesCellAttributes.class.equals(Integer.class) - || NotebookTimeseriesCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookTimeseriesCellAttributes.class.equals(Float.class) - || NotebookTimeseriesCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookTimeseriesCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookTimeseriesCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookTimeseriesCellAttributes.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 (!((NotebookTimeseriesCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookTimeseriesCellAttributes'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookTimeseriesCellAttributes'", e); - } + public Map getSchemas() { + return NotebookCellResponseAttributes.schemas; + } - // deserialize NotebookToplistCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookToplistCellAttributes.class.equals(Integer.class) - || NotebookToplistCellAttributes.class.equals(Long.class) - || NotebookToplistCellAttributes.class.equals(Float.class) - || NotebookToplistCellAttributes.class.equals(Double.class) - || NotebookToplistCellAttributes.class.equals(Boolean.class) - || NotebookToplistCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookToplistCellAttributes.class.equals(Integer.class) - || NotebookToplistCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookToplistCellAttributes.class.equals(Float.class) - || NotebookToplistCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookToplistCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookToplistCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes + * + * 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(NotebookMarkdownCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookToplistCellAttributes.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 (!((NotebookToplistCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookToplistCellAttributes'"); + if (JSON.isInstanceOf(NotebookTimeseriesCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookToplistCellAttributes'", e); - } - - // deserialize NotebookHeatMapCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookHeatMapCellAttributes.class.equals(Integer.class) - || NotebookHeatMapCellAttributes.class.equals(Long.class) - || NotebookHeatMapCellAttributes.class.equals(Float.class) - || NotebookHeatMapCellAttributes.class.equals(Double.class) - || NotebookHeatMapCellAttributes.class.equals(Boolean.class) - || NotebookHeatMapCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookHeatMapCellAttributes.class.equals(Integer.class) - || NotebookHeatMapCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookHeatMapCellAttributes.class.equals(Float.class) - || NotebookHeatMapCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookHeatMapCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookHeatMapCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NotebookToplistCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookHeatMapCellAttributes.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 (!((NotebookHeatMapCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookHeatMapCellAttributes'"); + if (JSON.isInstanceOf(NotebookHeatMapCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookHeatMapCellAttributes'", e); - } - - // deserialize NotebookDistributionCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookDistributionCellAttributes.class.equals(Integer.class) - || NotebookDistributionCellAttributes.class.equals(Long.class) - || NotebookDistributionCellAttributes.class.equals(Float.class) - || NotebookDistributionCellAttributes.class.equals(Double.class) - || NotebookDistributionCellAttributes.class.equals(Boolean.class) - || NotebookDistributionCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookDistributionCellAttributes.class.equals(Integer.class) - || NotebookDistributionCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookDistributionCellAttributes.class.equals(Float.class) - || NotebookDistributionCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookDistributionCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookDistributionCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NotebookDistributionCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookDistributionCellAttributes.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 (!((NotebookDistributionCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookDistributionCellAttributes'"); + if (JSON.isInstanceOf(NotebookLogStreamCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NotebookDistributionCellAttributes'", - e); - } - // deserialize NotebookLogStreamCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookLogStreamCellAttributes.class.equals(Integer.class) - || NotebookLogStreamCellAttributes.class.equals(Long.class) - || NotebookLogStreamCellAttributes.class.equals(Float.class) - || NotebookLogStreamCellAttributes.class.equals(Double.class) - || NotebookLogStreamCellAttributes.class.equals(Boolean.class) - || NotebookLogStreamCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookLogStreamCellAttributes.class.equals(Integer.class) - || NotebookLogStreamCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookLogStreamCellAttributes.class.equals(Float.class) - || NotebookLogStreamCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookLogStreamCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookLogStreamCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookLogStreamCellAttributes.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 (!((NotebookLogStreamCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookLogStreamCellAttributes'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookLogStreamCellAttributes'", e); - } - - NotebookCellResponseAttributes ret = new NotebookCellResponseAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes + * + * @return The actual instance (NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes) + */ @Override - public NotebookCellResponseAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NotebookCellResponseAttributes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public NotebookCellResponseAttributes() { - super("oneOf", Boolean.FALSE); - } - - public NotebookCellResponseAttributes(NotebookMarkdownCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellResponseAttributes(NotebookTimeseriesCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellResponseAttributes(NotebookToplistCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellResponseAttributes(NotebookHeatMapCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellResponseAttributes(NotebookDistributionCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellResponseAttributes(NotebookLogStreamCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "NotebookMarkdownCellAttributes", new GenericType() {}); - schemas.put( - "NotebookTimeseriesCellAttributes", new GenericType() {}); - schemas.put( - "NotebookToplistCellAttributes", new GenericType() {}); - schemas.put( - "NotebookHeatMapCellAttributes", new GenericType() {}); - schemas.put( - "NotebookDistributionCellAttributes", - new GenericType() {}); - schemas.put( - "NotebookLogStreamCellAttributes", new GenericType() {}); - JSON.registerDescendants( - NotebookCellResponseAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return NotebookCellResponseAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NotebookMarkdownCellAttributes, - * NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes - * - *

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( - NotebookMarkdownCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookTimeseriesCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookToplistCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookHeatMapCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookDistributionCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookLogStreamCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookMarkdownCellAttributes`. If the actual instance is not `NotebookMarkdownCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookMarkdownCellAttributes` + * @throws ClassCastException if the instance is not `NotebookMarkdownCellAttributes` + */ + public NotebookMarkdownCellAttributes getNotebookMarkdownCellAttributes() throws ClassCastException { + return (NotebookMarkdownCellAttributes)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookTimeseriesCellAttributes`. If the actual instance is not `NotebookTimeseriesCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookTimeseriesCellAttributes` + * @throws ClassCastException if the instance is not `NotebookTimeseriesCellAttributes` + */ + public NotebookTimeseriesCellAttributes getNotebookTimeseriesCellAttributes() throws ClassCastException { + return (NotebookTimeseriesCellAttributes)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be NotebookMarkdownCellAttributes," - + " NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes," - + " NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes," - + " NotebookLogStreamCellAttributes"); - } - - /** - * Get the actual instance, which can be the following: NotebookMarkdownCellAttributes, - * NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes - * - * @return The actual instance (NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, - * NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookMarkdownCellAttributes`. If the actual instance is not - * `NotebookMarkdownCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookMarkdownCellAttributes` - * @throws ClassCastException if the instance is not `NotebookMarkdownCellAttributes` - */ - public NotebookMarkdownCellAttributes getNotebookMarkdownCellAttributes() - throws ClassCastException { - return (NotebookMarkdownCellAttributes) super.getActualInstance(); - } - /** - * Get the actual instance of `NotebookTimeseriesCellAttributes`. If the actual instance is not - * `NotebookTimeseriesCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookTimeseriesCellAttributes` - * @throws ClassCastException if the instance is not `NotebookTimeseriesCellAttributes` - */ - public NotebookTimeseriesCellAttributes getNotebookTimeseriesCellAttributes() - throws ClassCastException { - return (NotebookTimeseriesCellAttributes) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookToplistCellAttributes`. If the actual instance is not - * `NotebookToplistCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookToplistCellAttributes` - * @throws ClassCastException if the instance is not `NotebookToplistCellAttributes` - */ - public NotebookToplistCellAttributes getNotebookToplistCellAttributes() - throws ClassCastException { - return (NotebookToplistCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookToplistCellAttributes`. If the actual instance is not `NotebookToplistCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookToplistCellAttributes` + * @throws ClassCastException if the instance is not `NotebookToplistCellAttributes` + */ + public NotebookToplistCellAttributes getNotebookToplistCellAttributes() throws ClassCastException { + return (NotebookToplistCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookHeatMapCellAttributes`. If the actual instance is not - * `NotebookHeatMapCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookHeatMapCellAttributes` - * @throws ClassCastException if the instance is not `NotebookHeatMapCellAttributes` - */ - public NotebookHeatMapCellAttributes getNotebookHeatMapCellAttributes() - throws ClassCastException { - return (NotebookHeatMapCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookHeatMapCellAttributes`. If the actual instance is not `NotebookHeatMapCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookHeatMapCellAttributes` + * @throws ClassCastException if the instance is not `NotebookHeatMapCellAttributes` + */ + public NotebookHeatMapCellAttributes getNotebookHeatMapCellAttributes() throws ClassCastException { + return (NotebookHeatMapCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookDistributionCellAttributes`. If the actual instance is not - * `NotebookDistributionCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookDistributionCellAttributes` - * @throws ClassCastException if the instance is not `NotebookDistributionCellAttributes` - */ - public NotebookDistributionCellAttributes getNotebookDistributionCellAttributes() - throws ClassCastException { - return (NotebookDistributionCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookDistributionCellAttributes`. If the actual instance is not `NotebookDistributionCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookDistributionCellAttributes` + * @throws ClassCastException if the instance is not `NotebookDistributionCellAttributes` + */ + public NotebookDistributionCellAttributes getNotebookDistributionCellAttributes() throws ClassCastException { + return (NotebookDistributionCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookLogStreamCellAttributes`. If the actual instance is not - * `NotebookLogStreamCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookLogStreamCellAttributes` - * @throws ClassCastException if the instance is not `NotebookLogStreamCellAttributes` - */ - public NotebookLogStreamCellAttributes getNotebookLogStreamCellAttributes() - throws ClassCastException { - return (NotebookLogStreamCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookLogStreamCellAttributes`. If the actual instance is not `NotebookLogStreamCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookLogStreamCellAttributes` + * @throws ClassCastException if the instance is not `NotebookLogStreamCellAttributes` + */ + public NotebookLogStreamCellAttributes getNotebookLogStreamCellAttributes() throws ClassCastException { + return (NotebookLogStreamCellAttributes)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellTime.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellTime.java index 349be0dacd4..8db7c6c6afe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellTime.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellTime.java @@ -6,277 +6,268 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = NotebookCellTime.NotebookCellTimeDeserializer.class) @JsonSerialize(using = NotebookCellTime.NotebookCellTimeSerializer.class) public class NotebookCellTime extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(NotebookCellTime.class.getName()); + private static final Logger log = Logger.getLogger(NotebookCellTime.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class NotebookCellTimeSerializer extends StdSerializer { - public NotebookCellTimeSerializer(Class t) { - super(t); + public static class NotebookCellTimeSerializer extends StdSerializer { + public NotebookCellTimeSerializer(Class t) { + super(t); + } + + public NotebookCellTimeSerializer() { + this(null); + } + + @Override + public void serialize(NotebookCellTime value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public NotebookCellTimeSerializer() { - this(null); + public static class NotebookCellTimeDeserializer extends StdDeserializer { + public NotebookCellTimeDeserializer() { + this(NotebookCellTime.class); + } + + public NotebookCellTimeDeserializer(Class vc) { + super(vc); + } + + @Override + public NotebookCellTime 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 NotebookRelativeTime + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookRelativeTime.class.equals(Integer.class) || NotebookRelativeTime.class.equals(Long.class) || NotebookRelativeTime.class.equals(Float.class) || NotebookRelativeTime.class.equals(Double.class) || NotebookRelativeTime.class.equals(Boolean.class) || NotebookRelativeTime.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookRelativeTime.class.equals(Integer.class) || NotebookRelativeTime.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookRelativeTime.class.equals(Float.class) || NotebookRelativeTime.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookRelativeTime.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookRelativeTime.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookRelativeTime.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 (!((NotebookRelativeTime)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookRelativeTime'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookRelativeTime'", e); + } + + // deserialize NotebookAbsoluteTime + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookAbsoluteTime.class.equals(Integer.class) || NotebookAbsoluteTime.class.equals(Long.class) || NotebookAbsoluteTime.class.equals(Float.class) || NotebookAbsoluteTime.class.equals(Double.class) || NotebookAbsoluteTime.class.equals(Boolean.class) || NotebookAbsoluteTime.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookAbsoluteTime.class.equals(Integer.class) || NotebookAbsoluteTime.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookAbsoluteTime.class.equals(Float.class) || NotebookAbsoluteTime.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookAbsoluteTime.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookAbsoluteTime.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookAbsoluteTime.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 (!((NotebookAbsoluteTime)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookAbsoluteTime'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookAbsoluteTime'", e); + } + + NotebookCellTime ret = new NotebookCellTime(); + 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 NotebookCellTime getNullValue(DeserializationContext ctxt) throws JsonMappingException { + return null; + } } - @Override - public void serialize(NotebookCellTime value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NotebookCellTime() { + super("oneOf", Boolean.TRUE); + } + public NotebookCellTime(NotebookRelativeTime o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + public NotebookCellTime(NotebookAbsoluteTime o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); } - } - public static class NotebookCellTimeDeserializer extends StdDeserializer { - public NotebookCellTimeDeserializer() { - this(NotebookCellTime.class); + static { + schemas.put("NotebookRelativeTime", new GenericType() { + }); + schemas.put("NotebookAbsoluteTime", new GenericType() { + }); + JSON.registerDescendants(NotebookCellTime.class, Collections.unmodifiableMap(schemas)); } - public NotebookCellTimeDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return NotebookCellTime.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotebookRelativeTime, NotebookAbsoluteTime + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public NotebookCellTime 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 NotebookRelativeTime - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookRelativeTime.class.equals(Integer.class) - || NotebookRelativeTime.class.equals(Long.class) - || NotebookRelativeTime.class.equals(Float.class) - || NotebookRelativeTime.class.equals(Double.class) - || NotebookRelativeTime.class.equals(Boolean.class) - || NotebookRelativeTime.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookRelativeTime.class.equals(Integer.class) - || NotebookRelativeTime.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookRelativeTime.class.equals(Float.class) - || NotebookRelativeTime.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookRelativeTime.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookRelativeTime.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - attemptParsing |= (token == JsonToken.VALUE_NULL); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookRelativeTime.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 (!((NotebookRelativeTime) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookRelativeTime'"); + public void setActualInstance(Object instance) { + if (instance == null) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookRelativeTime'", e); - } - // deserialize NotebookAbsoluteTime - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookAbsoluteTime.class.equals(Integer.class) - || NotebookAbsoluteTime.class.equals(Long.class) - || NotebookAbsoluteTime.class.equals(Float.class) - || NotebookAbsoluteTime.class.equals(Double.class) - || NotebookAbsoluteTime.class.equals(Boolean.class) - || NotebookAbsoluteTime.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookAbsoluteTime.class.equals(Integer.class) - || NotebookAbsoluteTime.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookAbsoluteTime.class.equals(Float.class) - || NotebookAbsoluteTime.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookAbsoluteTime.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookAbsoluteTime.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + + if (JSON.isInstanceOf(NotebookRelativeTime.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookAbsoluteTime.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 (!((NotebookAbsoluteTime) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookAbsoluteTime'"); + if (JSON.isInstanceOf(NotebookAbsoluteTime.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookAbsoluteTime'", e); - } - NotebookCellTime ret = new NotebookCellTime(); - 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; + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be NotebookRelativeTime, NotebookAbsoluteTime"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * NotebookRelativeTime, NotebookAbsoluteTime + * + * @return The actual instance (NotebookRelativeTime, NotebookAbsoluteTime) + */ @Override - public NotebookCellTime getNullValue(DeserializationContext ctxt) throws JsonMappingException { - return null; + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public NotebookCellTime() { - super("oneOf", Boolean.TRUE); - } - - public NotebookCellTime(NotebookRelativeTime o) { - super("oneOf", Boolean.TRUE); - setActualInstance(o); - } - - public NotebookCellTime(NotebookAbsoluteTime o) { - super("oneOf", Boolean.TRUE); - setActualInstance(o); - } - - static { - schemas.put("NotebookRelativeTime", new GenericType() {}); - schemas.put("NotebookAbsoluteTime", new GenericType() {}); - JSON.registerDescendants(NotebookCellTime.class, Collections.unmodifiableMap(schemas)); - } - @Override - public Map getSchemas() { - return NotebookCellTime.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NotebookRelativeTime, NotebookAbsoluteTime - * - *

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 (instance == null) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(NotebookRelativeTime.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookAbsoluteTime.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookRelativeTime`. If the actual instance is not `NotebookRelativeTime`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookRelativeTime` + * @throws ClassCastException if the instance is not `NotebookRelativeTime` + */ + public NotebookRelativeTime getNotebookRelativeTime() throws ClassCastException { + return (NotebookRelativeTime)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookAbsoluteTime`. If the actual instance is not `NotebookAbsoluteTime`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookAbsoluteTime` + * @throws ClassCastException if the instance is not `NotebookAbsoluteTime` + */ + public NotebookAbsoluteTime getNotebookAbsoluteTime() throws ClassCastException { + return (NotebookAbsoluteTime)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be NotebookRelativeTime, NotebookAbsoluteTime"); - } - - /** - * Get the actual instance, which can be the following: NotebookRelativeTime, NotebookAbsoluteTime - * - * @return The actual instance (NotebookRelativeTime, NotebookAbsoluteTime) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookRelativeTime`. If the actual instance is not - * `NotebookRelativeTime`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookRelativeTime` - * @throws ClassCastException if the instance is not `NotebookRelativeTime` - */ - public NotebookRelativeTime getNotebookRelativeTime() throws ClassCastException { - return (NotebookRelativeTime) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookAbsoluteTime`. If the actual instance is not - * `NotebookAbsoluteTime`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookAbsoluteTime` - * @throws ClassCastException if the instance is not `NotebookAbsoluteTime` - */ - public NotebookAbsoluteTime getNotebookAbsoluteTime() throws ClassCastException { - return (NotebookAbsoluteTime) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequest.java index 856d5185701..b2ae85c4093 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequest.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The description of a notebook cell update request. */ +/** + *

The description of a notebook cell update request.

+ */ @JsonPropertyOrder({ NotebookCellUpdateRequest.JSON_PROPERTY_ATTRIBUTES, NotebookCellUpdateRequest.JSON_PROPERTY_ID, NotebookCellUpdateRequest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookCellUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebookCellUpdateRequestAttributes attributes; @@ -36,17 +55,15 @@ public NotebookCellUpdateRequest() {} @JsonCreator public NotebookCellUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebookCellUpdateRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookCellResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebookCellUpdateRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookCellResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookCellUpdateRequest attributes(NotebookCellUpdateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,44 +71,37 @@ public NotebookCellUpdateRequest attributes(NotebookCellUpdateRequestAttributes } /** - * The attributes of a notebook cell in update cell request. Valid cell types are markdown - * , timeseries, toplist, heatmap, - * distribution, log_stream. More information on each graph - * visualization type. - * + *

The attributes of a notebook cell in update cell request. Valid cell types are markdown, timeseries, toplist, heatmap, distribution, + * log_stream. More information on each graph visualization type.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCellUpdateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCellUpdateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebookCellUpdateRequestAttributes attributes) { this.attributes = attributes; } - public NotebookCellUpdateRequest id(String id) { this.id = id; return this; } /** - * Notebook cell ID. - * + *

Notebook cell ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public NotebookCellUpdateRequest type(NotebookCellResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -99,24 +109,25 @@ public NotebookCellUpdateRequest type(NotebookCellResourceType type) { } /** - * Type of the Notebook Cell resource. - * + *

Type of the Notebook Cell resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCellResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCellResourceType getType() { + return type; + } public void setType(NotebookCellResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookCellUpdateRequest object is equal to o. */ + /** + * Return true if this NotebookCellUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,14 +137,13 @@ public boolean equals(Object o) { return false; } NotebookCellUpdateRequest notebookCellUpdateRequest = (NotebookCellUpdateRequest) o; - return Objects.equals(this.attributes, notebookCellUpdateRequest.attributes) - && Objects.equals(this.id, notebookCellUpdateRequest.id) - && Objects.equals(this.type, notebookCellUpdateRequest.type); + return Objects.equals(this.attributes, notebookCellUpdateRequest.attributes) && Objects.equals(this.id, notebookCellUpdateRequest.id) && Objects.equals(this.type, notebookCellUpdateRequest.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -148,7 +158,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequestAttributes.java index b283923884d..e5a99b17334 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCellUpdateRequestAttributes.java @@ -6,578 +6,461 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - NotebookCellUpdateRequestAttributes.NotebookCellUpdateRequestAttributesDeserializer.class) -@JsonSerialize( - using = NotebookCellUpdateRequestAttributes.NotebookCellUpdateRequestAttributesSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = NotebookCellUpdateRequestAttributes.NotebookCellUpdateRequestAttributesDeserializer.class) +@JsonSerialize(using = NotebookCellUpdateRequestAttributes.NotebookCellUpdateRequestAttributesSerializer.class) public class NotebookCellUpdateRequestAttributes extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(NotebookCellUpdateRequestAttributes.class.getName()); + private static final Logger log = Logger.getLogger(NotebookCellUpdateRequestAttributes.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class NotebookCellUpdateRequestAttributesSerializer - extends StdSerializer { - public NotebookCellUpdateRequestAttributesSerializer( - Class t) { - super(t); - } + public static class NotebookCellUpdateRequestAttributesSerializer extends StdSerializer { + public NotebookCellUpdateRequestAttributesSerializer(Class t) { + super(t); + } + + public NotebookCellUpdateRequestAttributesSerializer() { + this(null); + } - public NotebookCellUpdateRequestAttributesSerializer() { - this(null); + @Override + public void serialize(NotebookCellUpdateRequestAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public void serialize( - NotebookCellUpdateRequestAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + public static class NotebookCellUpdateRequestAttributesDeserializer extends StdDeserializer { + public NotebookCellUpdateRequestAttributesDeserializer() { + this(NotebookCellUpdateRequestAttributes.class); + } + + public NotebookCellUpdateRequestAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public NotebookCellUpdateRequestAttributes 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 NotebookMarkdownCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookMarkdownCellAttributes.class.equals(Integer.class) || NotebookMarkdownCellAttributes.class.equals(Long.class) || NotebookMarkdownCellAttributes.class.equals(Float.class) || NotebookMarkdownCellAttributes.class.equals(Double.class) || NotebookMarkdownCellAttributes.class.equals(Boolean.class) || NotebookMarkdownCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookMarkdownCellAttributes.class.equals(Integer.class) || NotebookMarkdownCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookMarkdownCellAttributes.class.equals(Float.class) || NotebookMarkdownCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookMarkdownCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookMarkdownCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookMarkdownCellAttributes.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 (!((NotebookMarkdownCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookMarkdownCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookMarkdownCellAttributes'", e); + } + + // deserialize NotebookTimeseriesCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookTimeseriesCellAttributes.class.equals(Integer.class) || NotebookTimeseriesCellAttributes.class.equals(Long.class) || NotebookTimeseriesCellAttributes.class.equals(Float.class) || NotebookTimeseriesCellAttributes.class.equals(Double.class) || NotebookTimeseriesCellAttributes.class.equals(Boolean.class) || NotebookTimeseriesCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookTimeseriesCellAttributes.class.equals(Integer.class) || NotebookTimeseriesCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookTimeseriesCellAttributes.class.equals(Float.class) || NotebookTimeseriesCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookTimeseriesCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookTimeseriesCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookTimeseriesCellAttributes.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 (!((NotebookTimeseriesCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookTimeseriesCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookTimeseriesCellAttributes'", e); + } + + // deserialize NotebookToplistCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookToplistCellAttributes.class.equals(Integer.class) || NotebookToplistCellAttributes.class.equals(Long.class) || NotebookToplistCellAttributes.class.equals(Float.class) || NotebookToplistCellAttributes.class.equals(Double.class) || NotebookToplistCellAttributes.class.equals(Boolean.class) || NotebookToplistCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookToplistCellAttributes.class.equals(Integer.class) || NotebookToplistCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookToplistCellAttributes.class.equals(Float.class) || NotebookToplistCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookToplistCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookToplistCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookToplistCellAttributes.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 (!((NotebookToplistCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookToplistCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookToplistCellAttributes'", e); + } + + // deserialize NotebookHeatMapCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookHeatMapCellAttributes.class.equals(Integer.class) || NotebookHeatMapCellAttributes.class.equals(Long.class) || NotebookHeatMapCellAttributes.class.equals(Float.class) || NotebookHeatMapCellAttributes.class.equals(Double.class) || NotebookHeatMapCellAttributes.class.equals(Boolean.class) || NotebookHeatMapCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookHeatMapCellAttributes.class.equals(Integer.class) || NotebookHeatMapCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookHeatMapCellAttributes.class.equals(Float.class) || NotebookHeatMapCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookHeatMapCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookHeatMapCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookHeatMapCellAttributes.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 (!((NotebookHeatMapCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookHeatMapCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookHeatMapCellAttributes'", e); + } + + // deserialize NotebookDistributionCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookDistributionCellAttributes.class.equals(Integer.class) || NotebookDistributionCellAttributes.class.equals(Long.class) || NotebookDistributionCellAttributes.class.equals(Float.class) || NotebookDistributionCellAttributes.class.equals(Double.class) || NotebookDistributionCellAttributes.class.equals(Boolean.class) || NotebookDistributionCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookDistributionCellAttributes.class.equals(Integer.class) || NotebookDistributionCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookDistributionCellAttributes.class.equals(Float.class) || NotebookDistributionCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookDistributionCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookDistributionCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookDistributionCellAttributes.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 (!((NotebookDistributionCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookDistributionCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookDistributionCellAttributes'", e); + } + + // deserialize NotebookLogStreamCellAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookLogStreamCellAttributes.class.equals(Integer.class) || NotebookLogStreamCellAttributes.class.equals(Long.class) || NotebookLogStreamCellAttributes.class.equals(Float.class) || NotebookLogStreamCellAttributes.class.equals(Double.class) || NotebookLogStreamCellAttributes.class.equals(Boolean.class) || NotebookLogStreamCellAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookLogStreamCellAttributes.class.equals(Integer.class) || NotebookLogStreamCellAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookLogStreamCellAttributes.class.equals(Float.class) || NotebookLogStreamCellAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookLogStreamCellAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookLogStreamCellAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookLogStreamCellAttributes.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 (!((NotebookLogStreamCellAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookLogStreamCellAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookLogStreamCellAttributes'", e); + } + + NotebookCellUpdateRequestAttributes ret = new NotebookCellUpdateRequestAttributes(); + 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 NotebookCellUpdateRequestAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "NotebookCellUpdateRequestAttributes cannot be null"); + } } - } - public static class NotebookCellUpdateRequestAttributesDeserializer - extends StdDeserializer { - public NotebookCellUpdateRequestAttributesDeserializer() { - this(NotebookCellUpdateRequestAttributes.class); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NotebookCellUpdateRequestAttributes() { + super("oneOf", Boolean.FALSE); + } + public NotebookCellUpdateRequestAttributes(NotebookMarkdownCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellUpdateRequestAttributes(NotebookTimeseriesCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellUpdateRequestAttributes(NotebookToplistCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellUpdateRequestAttributes(NotebookHeatMapCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellUpdateRequestAttributes(NotebookDistributionCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookCellUpdateRequestAttributes(NotebookLogStreamCellAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public NotebookCellUpdateRequestAttributesDeserializer(Class vc) { - super(vc); + static { + schemas.put("NotebookMarkdownCellAttributes", new GenericType() { + }); + schemas.put("NotebookTimeseriesCellAttributes", new GenericType() { + }); + schemas.put("NotebookToplistCellAttributes", new GenericType() { + }); + schemas.put("NotebookHeatMapCellAttributes", new GenericType() { + }); + schemas.put("NotebookDistributionCellAttributes", new GenericType() { + }); + schemas.put("NotebookLogStreamCellAttributes", new GenericType() { + }); + JSON.registerDescendants(NotebookCellUpdateRequestAttributes.class, Collections.unmodifiableMap(schemas)); } @Override - public NotebookCellUpdateRequestAttributes 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 NotebookMarkdownCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookMarkdownCellAttributes.class.equals(Integer.class) - || NotebookMarkdownCellAttributes.class.equals(Long.class) - || NotebookMarkdownCellAttributes.class.equals(Float.class) - || NotebookMarkdownCellAttributes.class.equals(Double.class) - || NotebookMarkdownCellAttributes.class.equals(Boolean.class) - || NotebookMarkdownCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookMarkdownCellAttributes.class.equals(Integer.class) - || NotebookMarkdownCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookMarkdownCellAttributes.class.equals(Float.class) - || NotebookMarkdownCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookMarkdownCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookMarkdownCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookMarkdownCellAttributes.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 (!((NotebookMarkdownCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookMarkdownCellAttributes'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookMarkdownCellAttributes'", e); - } - - // deserialize NotebookTimeseriesCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookTimeseriesCellAttributes.class.equals(Integer.class) - || NotebookTimeseriesCellAttributes.class.equals(Long.class) - || NotebookTimeseriesCellAttributes.class.equals(Float.class) - || NotebookTimeseriesCellAttributes.class.equals(Double.class) - || NotebookTimeseriesCellAttributes.class.equals(Boolean.class) - || NotebookTimeseriesCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookTimeseriesCellAttributes.class.equals(Integer.class) - || NotebookTimeseriesCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookTimeseriesCellAttributes.class.equals(Float.class) - || NotebookTimeseriesCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookTimeseriesCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookTimeseriesCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookTimeseriesCellAttributes.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 (!((NotebookTimeseriesCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookTimeseriesCellAttributes'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookTimeseriesCellAttributes'", e); - } + public Map getSchemas() { + return NotebookCellUpdateRequestAttributes.schemas; + } - // deserialize NotebookToplistCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookToplistCellAttributes.class.equals(Integer.class) - || NotebookToplistCellAttributes.class.equals(Long.class) - || NotebookToplistCellAttributes.class.equals(Float.class) - || NotebookToplistCellAttributes.class.equals(Double.class) - || NotebookToplistCellAttributes.class.equals(Boolean.class) - || NotebookToplistCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookToplistCellAttributes.class.equals(Integer.class) - || NotebookToplistCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookToplistCellAttributes.class.equals(Float.class) - || NotebookToplistCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookToplistCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookToplistCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes + * + * 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(NotebookMarkdownCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookToplistCellAttributes.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 (!((NotebookToplistCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookToplistCellAttributes'"); + if (JSON.isInstanceOf(NotebookTimeseriesCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookToplistCellAttributes'", e); - } - - // deserialize NotebookHeatMapCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookHeatMapCellAttributes.class.equals(Integer.class) - || NotebookHeatMapCellAttributes.class.equals(Long.class) - || NotebookHeatMapCellAttributes.class.equals(Float.class) - || NotebookHeatMapCellAttributes.class.equals(Double.class) - || NotebookHeatMapCellAttributes.class.equals(Boolean.class) - || NotebookHeatMapCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookHeatMapCellAttributes.class.equals(Integer.class) - || NotebookHeatMapCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookHeatMapCellAttributes.class.equals(Float.class) - || NotebookHeatMapCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookHeatMapCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookHeatMapCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NotebookToplistCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookHeatMapCellAttributes.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 (!((NotebookHeatMapCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookHeatMapCellAttributes'"); + if (JSON.isInstanceOf(NotebookHeatMapCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookHeatMapCellAttributes'", e); - } - - // deserialize NotebookDistributionCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookDistributionCellAttributes.class.equals(Integer.class) - || NotebookDistributionCellAttributes.class.equals(Long.class) - || NotebookDistributionCellAttributes.class.equals(Float.class) - || NotebookDistributionCellAttributes.class.equals(Double.class) - || NotebookDistributionCellAttributes.class.equals(Boolean.class) - || NotebookDistributionCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookDistributionCellAttributes.class.equals(Integer.class) - || NotebookDistributionCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookDistributionCellAttributes.class.equals(Float.class) - || NotebookDistributionCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookDistributionCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookDistributionCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NotebookDistributionCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookDistributionCellAttributes.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 (!((NotebookDistributionCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookDistributionCellAttributes'"); + if (JSON.isInstanceOf(NotebookLogStreamCellAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'NotebookDistributionCellAttributes'", - e); - } - // deserialize NotebookLogStreamCellAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookLogStreamCellAttributes.class.equals(Integer.class) - || NotebookLogStreamCellAttributes.class.equals(Long.class) - || NotebookLogStreamCellAttributes.class.equals(Float.class) - || NotebookLogStreamCellAttributes.class.equals(Double.class) - || NotebookLogStreamCellAttributes.class.equals(Boolean.class) - || NotebookLogStreamCellAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookLogStreamCellAttributes.class.equals(Integer.class) - || NotebookLogStreamCellAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookLogStreamCellAttributes.class.equals(Float.class) - || NotebookLogStreamCellAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookLogStreamCellAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookLogStreamCellAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookLogStreamCellAttributes.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 (!((NotebookLogStreamCellAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookLogStreamCellAttributes'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'NotebookLogStreamCellAttributes'", e); - } - - NotebookCellUpdateRequestAttributes ret = new NotebookCellUpdateRequestAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes + * + * @return The actual instance (NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes) + */ @Override - public NotebookCellUpdateRequestAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "NotebookCellUpdateRequestAttributes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public NotebookCellUpdateRequestAttributes() { - super("oneOf", Boolean.FALSE); - } - - public NotebookCellUpdateRequestAttributes(NotebookMarkdownCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellUpdateRequestAttributes(NotebookTimeseriesCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellUpdateRequestAttributes(NotebookToplistCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellUpdateRequestAttributes(NotebookHeatMapCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellUpdateRequestAttributes(NotebookDistributionCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public NotebookCellUpdateRequestAttributes(NotebookLogStreamCellAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "NotebookMarkdownCellAttributes", new GenericType() {}); - schemas.put( - "NotebookTimeseriesCellAttributes", new GenericType() {}); - schemas.put( - "NotebookToplistCellAttributes", new GenericType() {}); - schemas.put( - "NotebookHeatMapCellAttributes", new GenericType() {}); - schemas.put( - "NotebookDistributionCellAttributes", - new GenericType() {}); - schemas.put( - "NotebookLogStreamCellAttributes", new GenericType() {}); - JSON.registerDescendants( - NotebookCellUpdateRequestAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return NotebookCellUpdateRequestAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NotebookMarkdownCellAttributes, - * NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes - * - *

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( - NotebookMarkdownCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookTimeseriesCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookToplistCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookHeatMapCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookDistributionCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - NotebookLogStreamCellAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookMarkdownCellAttributes`. If the actual instance is not `NotebookMarkdownCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookMarkdownCellAttributes` + * @throws ClassCastException if the instance is not `NotebookMarkdownCellAttributes` + */ + public NotebookMarkdownCellAttributes getNotebookMarkdownCellAttributes() throws ClassCastException { + return (NotebookMarkdownCellAttributes)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookTimeseriesCellAttributes`. If the actual instance is not `NotebookTimeseriesCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookTimeseriesCellAttributes` + * @throws ClassCastException if the instance is not `NotebookTimeseriesCellAttributes` + */ + public NotebookTimeseriesCellAttributes getNotebookTimeseriesCellAttributes() throws ClassCastException { + return (NotebookTimeseriesCellAttributes)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be NotebookMarkdownCellAttributes," - + " NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes," - + " NotebookHeatMapCellAttributes, NotebookDistributionCellAttributes," - + " NotebookLogStreamCellAttributes"); - } - - /** - * Get the actual instance, which can be the following: NotebookMarkdownCellAttributes, - * NotebookTimeseriesCellAttributes, NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes - * - * @return The actual instance (NotebookMarkdownCellAttributes, NotebookTimeseriesCellAttributes, - * NotebookToplistCellAttributes, NotebookHeatMapCellAttributes, - * NotebookDistributionCellAttributes, NotebookLogStreamCellAttributes) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookMarkdownCellAttributes`. If the actual instance is not - * `NotebookMarkdownCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookMarkdownCellAttributes` - * @throws ClassCastException if the instance is not `NotebookMarkdownCellAttributes` - */ - public NotebookMarkdownCellAttributes getNotebookMarkdownCellAttributes() - throws ClassCastException { - return (NotebookMarkdownCellAttributes) super.getActualInstance(); - } - /** - * Get the actual instance of `NotebookTimeseriesCellAttributes`. If the actual instance is not - * `NotebookTimeseriesCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookTimeseriesCellAttributes` - * @throws ClassCastException if the instance is not `NotebookTimeseriesCellAttributes` - */ - public NotebookTimeseriesCellAttributes getNotebookTimeseriesCellAttributes() - throws ClassCastException { - return (NotebookTimeseriesCellAttributes) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookToplistCellAttributes`. If the actual instance is not - * `NotebookToplistCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookToplistCellAttributes` - * @throws ClassCastException if the instance is not `NotebookToplistCellAttributes` - */ - public NotebookToplistCellAttributes getNotebookToplistCellAttributes() - throws ClassCastException { - return (NotebookToplistCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookToplistCellAttributes`. If the actual instance is not `NotebookToplistCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookToplistCellAttributes` + * @throws ClassCastException if the instance is not `NotebookToplistCellAttributes` + */ + public NotebookToplistCellAttributes getNotebookToplistCellAttributes() throws ClassCastException { + return (NotebookToplistCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookHeatMapCellAttributes`. If the actual instance is not - * `NotebookHeatMapCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookHeatMapCellAttributes` - * @throws ClassCastException if the instance is not `NotebookHeatMapCellAttributes` - */ - public NotebookHeatMapCellAttributes getNotebookHeatMapCellAttributes() - throws ClassCastException { - return (NotebookHeatMapCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookHeatMapCellAttributes`. If the actual instance is not `NotebookHeatMapCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookHeatMapCellAttributes` + * @throws ClassCastException if the instance is not `NotebookHeatMapCellAttributes` + */ + public NotebookHeatMapCellAttributes getNotebookHeatMapCellAttributes() throws ClassCastException { + return (NotebookHeatMapCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookDistributionCellAttributes`. If the actual instance is not - * `NotebookDistributionCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookDistributionCellAttributes` - * @throws ClassCastException if the instance is not `NotebookDistributionCellAttributes` - */ - public NotebookDistributionCellAttributes getNotebookDistributionCellAttributes() - throws ClassCastException { - return (NotebookDistributionCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookDistributionCellAttributes`. If the actual instance is not `NotebookDistributionCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookDistributionCellAttributes` + * @throws ClassCastException if the instance is not `NotebookDistributionCellAttributes` + */ + public NotebookDistributionCellAttributes getNotebookDistributionCellAttributes() throws ClassCastException { + return (NotebookDistributionCellAttributes)super.getActualInstance(); + } - /** - * Get the actual instance of `NotebookLogStreamCellAttributes`. If the actual instance is not - * `NotebookLogStreamCellAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookLogStreamCellAttributes` - * @throws ClassCastException if the instance is not `NotebookLogStreamCellAttributes` - */ - public NotebookLogStreamCellAttributes getNotebookLogStreamCellAttributes() - throws ClassCastException { - return (NotebookLogStreamCellAttributes) super.getActualInstance(); - } + /** + * Get the actual instance of `NotebookLogStreamCellAttributes`. If the actual instance is not `NotebookLogStreamCellAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookLogStreamCellAttributes` + * @throws ClassCastException if the instance is not `NotebookLogStreamCellAttributes` + */ + public NotebookLogStreamCellAttributes getNotebookLogStreamCellAttributes() throws ClassCastException { + return (NotebookLogStreamCellAttributes)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCreateData.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCreateData.java index 54571fb103e..0815aa7cb5f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCreateData.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCreateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data for a notebook create request. */ + +/** + *

The data for a notebook create request.

+ */ @JsonPropertyOrder({ NotebookCreateData.JSON_PROPERTY_ATTRIBUTES, NotebookCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebookCreateDataAttributes attributes; @@ -32,15 +51,13 @@ public NotebookCreateData() {} @JsonCreator public NotebookCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebookCreateDataAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebookCreateDataAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookCreateData attributes(NotebookCreateDataAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public NotebookCreateData attributes(NotebookCreateDataAttributes attributes) { } /** - * The data attributes of a notebook. - * + *

The data attributes of a notebook.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCreateDataAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCreateDataAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebookCreateDataAttributes attributes) { this.attributes = attributes; } - public NotebookCreateData type(NotebookResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public NotebookCreateData type(NotebookResourceType type) { } /** - * Type of the Notebook resource. - * + *

Type of the Notebook resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookResourceType getType() { + return type; + } public void setType(NotebookResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookCreateData object is equal to o. */ + /** + * Return true if this NotebookCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } NotebookCreateData notebookCreateData = (NotebookCreateData) o; - return Objects.equals(this.attributes, notebookCreateData.attributes) - && Objects.equals(this.type, notebookCreateData.type); + return Objects.equals(this.attributes, notebookCreateData.attributes) && Objects.equals(this.type, notebookCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCreateDataAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCreateDataAttributes.java index f57c13615cb..d2c08c18156 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCreateDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCreateDataAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data attributes of a notebook. */ + +/** + *

The data attributes of a notebook.

+ */ @JsonPropertyOrder({ NotebookCreateDataAttributes.JSON_PROPERTY_CELLS, NotebookCreateDataAttributes.JSON_PROPERTY_METADATA, @@ -23,10 +40,10 @@ NotebookCreateDataAttributes.JSON_PROPERTY_STATUS, NotebookCreateDataAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookCreateDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CELLS = "cells"; private List cells = new ArrayList<>(); @@ -46,16 +63,14 @@ public NotebookCreateDataAttributes() {} @JsonCreator public NotebookCreateDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_CELLS) - List cells, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TIME) NotebookGlobalTime time) { - this.cells = cells; - this.name = name; - this.time = time; - this.unparsed |= time.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CELLS)List cells, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TIME)NotebookGlobalTime time) { + this.cells = cells; + this.name = name; + this.time = time; + this.unparsed |= time.unparsed; } - public NotebookCreateDataAttributes cells(List cells) { this.cells = cells; for (NotebookCellCreateRequest item : cells) { @@ -63,7 +78,6 @@ public NotebookCreateDataAttributes cells(List cells) } return this; } - public NotebookCreateDataAttributes addCellsItem(NotebookCellCreateRequest cellsItem) { this.cells.add(cellsItem); this.unparsed |= cellsItem.unparsed; @@ -71,20 +85,18 @@ public NotebookCreateDataAttributes addCellsItem(NotebookCellCreateRequest cells } /** - * List of cells to display in the notebook. - * + *

List of cells to display in the notebook.

* @return cells - */ - @JsonProperty(JSON_PROPERTY_CELLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCells() { - return cells; - } - + **/ + @JsonProperty(JSON_PROPERTY_CELLS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCells() { + return cells; + } public void setCells(List cells) { this.cells = cells; } - public NotebookCreateDataAttributes metadata(NotebookMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -92,41 +104,37 @@ public NotebookCreateDataAttributes metadata(NotebookMetadata metadata) { } /** - * Metadata associated with the notebook. - * + *

Metadata associated with the notebook.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookMetadata getMetadata() { + return metadata; + } public void setMetadata(NotebookMetadata metadata) { this.metadata = metadata; } - public NotebookCreateDataAttributes name(String name) { this.name = name; return this; } /** - * The name of the notebook. - * + *

The name of the notebook.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public NotebookCreateDataAttributes status(NotebookStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -134,24 +142,22 @@ public NotebookCreateDataAttributes status(NotebookStatus status) { } /** - * Publication status of the notebook. For now, always "published". - * + *

Publication status of the notebook. For now, always "published".

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookStatus getStatus() { + return status; + } public void setStatus(NotebookStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public NotebookCreateDataAttributes time(NotebookGlobalTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -159,21 +165,22 @@ public NotebookCreateDataAttributes time(NotebookGlobalTime time) { } /** - * Notebook global timeframe. - * + *

Notebook global timeframe.

* @return time - */ - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookGlobalTime getTime() { - return time; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookGlobalTime getTime() { + return time; + } public void setTime(NotebookGlobalTime time) { this.time = time; } - /** Return true if this NotebookCreateDataAttributes object is equal to o. */ + /** + * Return true if this NotebookCreateDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,16 +190,13 @@ public boolean equals(Object o) { return false; } NotebookCreateDataAttributes notebookCreateDataAttributes = (NotebookCreateDataAttributes) o; - return Objects.equals(this.cells, notebookCreateDataAttributes.cells) - && Objects.equals(this.metadata, notebookCreateDataAttributes.metadata) - && Objects.equals(this.name, notebookCreateDataAttributes.name) - && Objects.equals(this.status, notebookCreateDataAttributes.status) - && Objects.equals(this.time, notebookCreateDataAttributes.time); + return Objects.equals(this.cells, notebookCreateDataAttributes.cells) && Objects.equals(this.metadata, notebookCreateDataAttributes.metadata) && Objects.equals(this.name, notebookCreateDataAttributes.name) && Objects.equals(this.status, notebookCreateDataAttributes.status) && Objects.equals(this.time, notebookCreateDataAttributes.time); } + @Override public int hashCode() { - return Objects.hash(cells, metadata, name, status, time); + return Objects.hash(cells,metadata,name,status,time); } @Override @@ -209,7 +213,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookCreateRequest.java b/src/main/java/com/datadog/api/client/v1/model/NotebookCreateRequest.java index 40ba48e7446..45dd594a5a7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The description of a notebook create request. */ -@JsonPropertyOrder({NotebookCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The description of a notebook create request.

+ */ +@JsonPropertyOrder({ + NotebookCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private NotebookCreateData data; @@ -26,11 +47,10 @@ public NotebookCreateRequest() {} @JsonCreator public NotebookCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) NotebookCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)NotebookCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public NotebookCreateRequest data(NotebookCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public NotebookCreateRequest data(NotebookCreateData data) { } /** - * The data for a notebook create request. - * + *

The data for a notebook create request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookCreateData getData() { + return data; + } public void setData(NotebookCreateData data) { this.data = data; } - /** Return true if this NotebookCreateRequest object is equal to o. */ + /** + * Return true if this NotebookCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, notebookCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookDistributionCellAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookDistributionCellAttributes.java index a82280bb212..a22b61a2e76 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookDistributionCellAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookDistributionCellAttributes.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes of a notebook distribution cell. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes of a notebook distribution cell.

+ */ @JsonPropertyOrder({ NotebookDistributionCellAttributes.JSON_PROPERTY_DEFINITION, NotebookDistributionCellAttributes.JSON_PROPERTY_GRAPH_SIZE, NotebookDistributionCellAttributes.JSON_PROPERTY_SPLIT_BY, NotebookDistributionCellAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookDistributionCellAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private DistributionWidgetDefinition definition; @@ -41,12 +59,10 @@ public NotebookDistributionCellAttributes() {} @JsonCreator public NotebookDistributionCellAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - DistributionWidgetDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)DistributionWidgetDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public NotebookDistributionCellAttributes definition(DistributionWidgetDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -54,22 +70,20 @@ public NotebookDistributionCellAttributes definition(DistributionWidgetDefinitio } /** - * The Distribution visualization is another way of showing metrics aggregated across one or - * several tags, such as hosts. Unlike the heat map, a distribution graph’s x-axis is quantity - * rather than time. - * + *

The Distribution visualization is another way of showing metrics + * aggregated across one or several tags, such as hosts. + * Unlike the heat map, a distribution graph’s x-axis is quantity rather than time.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DistributionWidgetDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DistributionWidgetDefinition getDefinition() { + return definition; + } public void setDefinition(DistributionWidgetDefinition definition) { this.definition = definition; } - public NotebookDistributionCellAttributes graphSize(NotebookGraphSize graphSize) { this.graphSize = graphSize; this.unparsed |= !graphSize.isValid(); @@ -77,24 +91,22 @@ public NotebookDistributionCellAttributes graphSize(NotebookGraphSize graphSize) } /** - * The size of the graph. - * + *

The size of the graph.

* @return graphSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookGraphSize getGraphSize() { - return graphSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookGraphSize getGraphSize() { + return graphSize; + } public void setGraphSize(NotebookGraphSize graphSize) { if (!graphSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.graphSize = graphSize; } - public NotebookDistributionCellAttributes splitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; this.unparsed |= splitBy.unparsed; @@ -102,53 +114,49 @@ public NotebookDistributionCellAttributes splitBy(NotebookSplitBy splitBy) { } /** - * Object describing how to split the graph to display multiple visualizations per request. - * + *

Object describing how to split the graph to display multiple visualizations per request.

* @return splitBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SPLIT_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookSplitBy getSplitBy() { - return splitBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPLIT_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookSplitBy getSplitBy() { + return splitBy; + } public void setSplitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; } - public NotebookDistributionCellAttributes time(NotebookCellTime time) { this.time = JsonNullable.of(time); return this; } /** - * Timeframe for the notebook cell. When 'null', the notebook global time is used. - * + *

Timeframe for the notebook cell. When 'null', the notebook global time is used.

* @return time - */ - @jakarta.annotation.Nullable - @JsonIgnore - public NotebookCellTime getTime() { - return time.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public NotebookCellTime getTime() { + return time.orElse(null); + } @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTime_JsonNullable() { return time; } - - @JsonProperty(JSON_PROPERTY_TIME) - public void setTime_JsonNullable(JsonNullable time) { + @JsonProperty(JSON_PROPERTY_TIME)public void setTime_JsonNullable(JsonNullable time) { this.time = time; } - public void setTime(NotebookCellTime time) { this.time = JsonNullable.of(time); } - /** Return true if this NotebookDistributionCellAttributes object is equal to o. */ + /** + * Return true if this NotebookDistributionCellAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -157,17 +165,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebookDistributionCellAttributes notebookDistributionCellAttributes = - (NotebookDistributionCellAttributes) o; - return Objects.equals(this.definition, notebookDistributionCellAttributes.definition) - && Objects.equals(this.graphSize, notebookDistributionCellAttributes.graphSize) - && Objects.equals(this.splitBy, notebookDistributionCellAttributes.splitBy) - && Objects.equals(this.time, notebookDistributionCellAttributes.time); + NotebookDistributionCellAttributes notebookDistributionCellAttributes = (NotebookDistributionCellAttributes) o; + return Objects.equals(this.definition, notebookDistributionCellAttributes.definition) && Objects.equals(this.graphSize, notebookDistributionCellAttributes.graphSize) && Objects.equals(this.splitBy, notebookDistributionCellAttributes.splitBy) && Objects.equals(this.time, notebookDistributionCellAttributes.time); } + @Override public int hashCode() { - return Objects.hash(definition, graphSize, splitBy, time); + return Objects.hash(definition,graphSize,splitBy,time); } @Override @@ -183,7 +188,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookGlobalTime.java b/src/main/java/com/datadog/api/client/v1/model/NotebookGlobalTime.java index 691a510a8a9..957eb5d0ce7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookGlobalTime.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookGlobalTime.java @@ -6,273 +6,262 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = NotebookGlobalTime.NotebookGlobalTimeDeserializer.class) @JsonSerialize(using = NotebookGlobalTime.NotebookGlobalTimeSerializer.class) public class NotebookGlobalTime extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(NotebookGlobalTime.class.getName()); + private static final Logger log = Logger.getLogger(NotebookGlobalTime.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class NotebookGlobalTimeSerializer extends StdSerializer { + public NotebookGlobalTimeSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public NotebookGlobalTimeSerializer() { + this(null); + } - public static class NotebookGlobalTimeSerializer extends StdSerializer { - public NotebookGlobalTimeSerializer(Class t) { - super(t); + @Override + public void serialize(NotebookGlobalTime value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public NotebookGlobalTimeSerializer() { - this(null); + public static class NotebookGlobalTimeDeserializer extends StdDeserializer { + public NotebookGlobalTimeDeserializer() { + this(NotebookGlobalTime.class); + } + + public NotebookGlobalTimeDeserializer(Class vc) { + super(vc); + } + + @Override + public NotebookGlobalTime 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 NotebookRelativeTime + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookRelativeTime.class.equals(Integer.class) || NotebookRelativeTime.class.equals(Long.class) || NotebookRelativeTime.class.equals(Float.class) || NotebookRelativeTime.class.equals(Double.class) || NotebookRelativeTime.class.equals(Boolean.class) || NotebookRelativeTime.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookRelativeTime.class.equals(Integer.class) || NotebookRelativeTime.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookRelativeTime.class.equals(Float.class) || NotebookRelativeTime.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookRelativeTime.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookRelativeTime.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (token == JsonToken.VALUE_NULL); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookRelativeTime.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 (!((NotebookRelativeTime)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookRelativeTime'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookRelativeTime'", e); + } + + // deserialize NotebookAbsoluteTime + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookAbsoluteTime.class.equals(Integer.class) || NotebookAbsoluteTime.class.equals(Long.class) || NotebookAbsoluteTime.class.equals(Float.class) || NotebookAbsoluteTime.class.equals(Double.class) || NotebookAbsoluteTime.class.equals(Boolean.class) || NotebookAbsoluteTime.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookAbsoluteTime.class.equals(Integer.class) || NotebookAbsoluteTime.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookAbsoluteTime.class.equals(Float.class) || NotebookAbsoluteTime.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookAbsoluteTime.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookAbsoluteTime.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookAbsoluteTime.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 (!((NotebookAbsoluteTime)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookAbsoluteTime'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookAbsoluteTime'", e); + } + + NotebookGlobalTime ret = new NotebookGlobalTime(); + 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 NotebookGlobalTime getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "NotebookGlobalTime cannot be null"); + } } - @Override - public void serialize(NotebookGlobalTime value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NotebookGlobalTime() { + super("oneOf", Boolean.FALSE); + } + public NotebookGlobalTime(NotebookRelativeTime o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookGlobalTime(NotebookAbsoluteTime o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class NotebookGlobalTimeDeserializer extends StdDeserializer { - public NotebookGlobalTimeDeserializer() { - this(NotebookGlobalTime.class); + static { + schemas.put("NotebookRelativeTime", new GenericType() { + }); + schemas.put("NotebookAbsoluteTime", new GenericType() { + }); + JSON.registerDescendants(NotebookGlobalTime.class, Collections.unmodifiableMap(schemas)); } - public NotebookGlobalTimeDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return NotebookGlobalTime.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotebookRelativeTime, NotebookAbsoluteTime + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public NotebookGlobalTime 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 NotebookRelativeTime - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookRelativeTime.class.equals(Integer.class) - || NotebookRelativeTime.class.equals(Long.class) - || NotebookRelativeTime.class.equals(Float.class) - || NotebookRelativeTime.class.equals(Double.class) - || NotebookRelativeTime.class.equals(Boolean.class) - || NotebookRelativeTime.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookRelativeTime.class.equals(Integer.class) - || NotebookRelativeTime.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookRelativeTime.class.equals(Float.class) - || NotebookRelativeTime.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookRelativeTime.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookRelativeTime.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - attemptParsing |= (token == JsonToken.VALUE_NULL); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(NotebookRelativeTime.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookRelativeTime.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 (!((NotebookRelativeTime) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookRelativeTime'"); + if (JSON.isInstanceOf(NotebookAbsoluteTime.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookRelativeTime'", e); - } - // deserialize NotebookAbsoluteTime - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookAbsoluteTime.class.equals(Integer.class) - || NotebookAbsoluteTime.class.equals(Long.class) - || NotebookAbsoluteTime.class.equals(Float.class) - || NotebookAbsoluteTime.class.equals(Double.class) - || NotebookAbsoluteTime.class.equals(Boolean.class) - || NotebookAbsoluteTime.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookAbsoluteTime.class.equals(Integer.class) - || NotebookAbsoluteTime.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookAbsoluteTime.class.equals(Float.class) - || NotebookAbsoluteTime.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookAbsoluteTime.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookAbsoluteTime.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookAbsoluteTime.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 (!((NotebookAbsoluteTime) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookAbsoluteTime'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookAbsoluteTime'", e); - } - - NotebookGlobalTime ret = new NotebookGlobalTime(); - 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; + throw new RuntimeException("Invalid instance type. Must be NotebookRelativeTime, NotebookAbsoluteTime"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * NotebookRelativeTime, NotebookAbsoluteTime + * + * @return The actual instance (NotebookRelativeTime, NotebookAbsoluteTime) + */ @Override - public NotebookGlobalTime getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "NotebookGlobalTime cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public NotebookGlobalTime() { - super("oneOf", Boolean.FALSE); - } - - public NotebookGlobalTime(NotebookRelativeTime o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public NotebookGlobalTime(NotebookAbsoluteTime o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("NotebookRelativeTime", new GenericType() {}); - schemas.put("NotebookAbsoluteTime", new GenericType() {}); - JSON.registerDescendants(NotebookGlobalTime.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return NotebookGlobalTime.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NotebookRelativeTime, NotebookAbsoluteTime - * - *

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(NotebookRelativeTime.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookAbsoluteTime.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookRelativeTime`. If the actual instance is not `NotebookRelativeTime`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookRelativeTime` + * @throws ClassCastException if the instance is not `NotebookRelativeTime` + */ + public NotebookRelativeTime getNotebookRelativeTime() throws ClassCastException { + return (NotebookRelativeTime)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookAbsoluteTime`. If the actual instance is not `NotebookAbsoluteTime`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookAbsoluteTime` + * @throws ClassCastException if the instance is not `NotebookAbsoluteTime` + */ + public NotebookAbsoluteTime getNotebookAbsoluteTime() throws ClassCastException { + return (NotebookAbsoluteTime)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be NotebookRelativeTime, NotebookAbsoluteTime"); - } - - /** - * Get the actual instance, which can be the following: NotebookRelativeTime, NotebookAbsoluteTime - * - * @return The actual instance (NotebookRelativeTime, NotebookAbsoluteTime) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookRelativeTime`. If the actual instance is not - * `NotebookRelativeTime`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookRelativeTime` - * @throws ClassCastException if the instance is not `NotebookRelativeTime` - */ - public NotebookRelativeTime getNotebookRelativeTime() throws ClassCastException { - return (NotebookRelativeTime) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookAbsoluteTime`. If the actual instance is not - * `NotebookAbsoluteTime`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookAbsoluteTime` - * @throws ClassCastException if the instance is not `NotebookAbsoluteTime` - */ - public NotebookAbsoluteTime getNotebookAbsoluteTime() throws ClassCastException { - return (NotebookAbsoluteTime) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookGraphSize.java b/src/main/java/com/datadog/api/client/v1/model/NotebookGraphSize.java index 0e4977f2a7d..01bdad14a9f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookGraphSize.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookGraphSize.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The size of the graph. */ +/** + *

The size of the graph.

+ */ @JsonSerialize(using = NotebookGraphSize.NotebookGraphSizeSerializer.class) public class NotebookGraphSize { @@ -29,8 +53,7 @@ public class NotebookGraphSize { public static final NotebookGraphSize LARGE = new NotebookGraphSize("l"); public static final NotebookGraphSize EXTRA_LARGE = new NotebookGraphSize("xl"); - private static final Set allowedValues = - new HashSet(Arrays.asList("xs", "s", "m", "l", "xl")); + private static final Set allowedValues = new HashSet(Arrays.asList("xs", "s", "m", "l", "xl")); private String value; @@ -43,19 +66,18 @@ public boolean isValid() { } public static class NotebookGraphSizeSerializer extends StdSerializer { - public NotebookGraphSizeSerializer(Class t) { - super(t); - } - - public NotebookGraphSizeSerializer() { - this(null); - } - - @Override - public void serialize(NotebookGraphSize value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public NotebookGraphSizeSerializer(Class t) { + super(t); + } + + public NotebookGraphSizeSerializer() { + this(null); + } + + @Override + public void serialize(NotebookGraphSize value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NotebookGraphSize object is equal to o. */ + /** + * Return true if this NotebookGraphSize object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookHeatMapCellAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookHeatMapCellAttributes.java index a00d2427acc..92e9636d92f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookHeatMapCellAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookHeatMapCellAttributes.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes of a notebook heatmap cell. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes of a notebook heatmap cell.

+ */ @JsonPropertyOrder({ NotebookHeatMapCellAttributes.JSON_PROPERTY_DEFINITION, NotebookHeatMapCellAttributes.JSON_PROPERTY_GRAPH_SIZE, NotebookHeatMapCellAttributes.JSON_PROPERTY_SPLIT_BY, NotebookHeatMapCellAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookHeatMapCellAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private HeatMapWidgetDefinition definition; @@ -41,12 +59,10 @@ public NotebookHeatMapCellAttributes() {} @JsonCreator public NotebookHeatMapCellAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - HeatMapWidgetDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)HeatMapWidgetDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public NotebookHeatMapCellAttributes definition(HeatMapWidgetDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -54,21 +70,18 @@ public NotebookHeatMapCellAttributes definition(HeatMapWidgetDefinition definiti } /** - * The heat map visualization shows metrics aggregated across many tags, such as hosts. The more - * hosts that have a particular value, the darker that square is. - * + *

The heat map visualization shows metrics aggregated across many tags, such as hosts. The more hosts that have a particular value, the darker that square is.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public HeatMapWidgetDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public HeatMapWidgetDefinition getDefinition() { + return definition; + } public void setDefinition(HeatMapWidgetDefinition definition) { this.definition = definition; } - public NotebookHeatMapCellAttributes graphSize(NotebookGraphSize graphSize) { this.graphSize = graphSize; this.unparsed |= !graphSize.isValid(); @@ -76,24 +89,22 @@ public NotebookHeatMapCellAttributes graphSize(NotebookGraphSize graphSize) { } /** - * The size of the graph. - * + *

The size of the graph.

* @return graphSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookGraphSize getGraphSize() { - return graphSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookGraphSize getGraphSize() { + return graphSize; + } public void setGraphSize(NotebookGraphSize graphSize) { if (!graphSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.graphSize = graphSize; } - public NotebookHeatMapCellAttributes splitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; this.unparsed |= splitBy.unparsed; @@ -101,53 +112,49 @@ public NotebookHeatMapCellAttributes splitBy(NotebookSplitBy splitBy) { } /** - * Object describing how to split the graph to display multiple visualizations per request. - * + *

Object describing how to split the graph to display multiple visualizations per request.

* @return splitBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SPLIT_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookSplitBy getSplitBy() { - return splitBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPLIT_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookSplitBy getSplitBy() { + return splitBy; + } public void setSplitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; } - public NotebookHeatMapCellAttributes time(NotebookCellTime time) { this.time = JsonNullable.of(time); return this; } /** - * Timeframe for the notebook cell. When 'null', the notebook global time is used. - * + *

Timeframe for the notebook cell. When 'null', the notebook global time is used.

* @return time - */ - @jakarta.annotation.Nullable - @JsonIgnore - public NotebookCellTime getTime() { - return time.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public NotebookCellTime getTime() { + return time.orElse(null); + } @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTime_JsonNullable() { return time; } - - @JsonProperty(JSON_PROPERTY_TIME) - public void setTime_JsonNullable(JsonNullable time) { + @JsonProperty(JSON_PROPERTY_TIME)public void setTime_JsonNullable(JsonNullable time) { this.time = time; } - public void setTime(NotebookCellTime time) { this.time = JsonNullable.of(time); } - /** Return true if this NotebookHeatMapCellAttributes object is equal to o. */ + /** + * Return true if this NotebookHeatMapCellAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -157,15 +164,13 @@ public boolean equals(Object o) { return false; } NotebookHeatMapCellAttributes notebookHeatMapCellAttributes = (NotebookHeatMapCellAttributes) o; - return Objects.equals(this.definition, notebookHeatMapCellAttributes.definition) - && Objects.equals(this.graphSize, notebookHeatMapCellAttributes.graphSize) - && Objects.equals(this.splitBy, notebookHeatMapCellAttributes.splitBy) - && Objects.equals(this.time, notebookHeatMapCellAttributes.time); + return Objects.equals(this.definition, notebookHeatMapCellAttributes.definition) && Objects.equals(this.graphSize, notebookHeatMapCellAttributes.graphSize) && Objects.equals(this.splitBy, notebookHeatMapCellAttributes.splitBy) && Objects.equals(this.time, notebookHeatMapCellAttributes.time); } + @Override public int hashCode() { - return Objects.hash(definition, graphSize, splitBy, time); + return Objects.hash(definition,graphSize,splitBy,time); } @Override @@ -181,7 +186,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookLogStreamCellAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookLogStreamCellAttributes.java index e1d8bb34e4c..3df192ac375 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookLogStreamCellAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookLogStreamCellAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes of a notebook log_stream cell. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes of a notebook log_stream cell.

+ */ @JsonPropertyOrder({ NotebookLogStreamCellAttributes.JSON_PROPERTY_DEFINITION, NotebookLogStreamCellAttributes.JSON_PROPERTY_GRAPH_SIZE, NotebookLogStreamCellAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookLogStreamCellAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private LogStreamWidgetDefinition definition; @@ -37,12 +55,10 @@ public NotebookLogStreamCellAttributes() {} @JsonCreator public NotebookLogStreamCellAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - LogStreamWidgetDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)LogStreamWidgetDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public NotebookLogStreamCellAttributes definition(LogStreamWidgetDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -50,21 +66,18 @@ public NotebookLogStreamCellAttributes definition(LogStreamWidgetDefinition defi } /** - * The Log Stream displays a log flow matching the defined query. Only available on FREE layout - * dashboards. - * + *

The Log Stream displays a log flow matching the defined query. Only available on FREE layout dashboards.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogStreamWidgetDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogStreamWidgetDefinition getDefinition() { + return definition; + } public void setDefinition(LogStreamWidgetDefinition definition) { this.definition = definition; } - public NotebookLogStreamCellAttributes graphSize(NotebookGraphSize graphSize) { this.graphSize = graphSize; this.unparsed |= !graphSize.isValid(); @@ -72,56 +85,52 @@ public NotebookLogStreamCellAttributes graphSize(NotebookGraphSize graphSize) { } /** - * The size of the graph. - * + *

The size of the graph.

* @return graphSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookGraphSize getGraphSize() { - return graphSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookGraphSize getGraphSize() { + return graphSize; + } public void setGraphSize(NotebookGraphSize graphSize) { if (!graphSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.graphSize = graphSize; } - public NotebookLogStreamCellAttributes time(NotebookCellTime time) { this.time = JsonNullable.of(time); return this; } /** - * Timeframe for the notebook cell. When 'null', the notebook global time is used. - * + *

Timeframe for the notebook cell. When 'null', the notebook global time is used.

* @return time - */ - @jakarta.annotation.Nullable - @JsonIgnore - public NotebookCellTime getTime() { - return time.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public NotebookCellTime getTime() { + return time.orElse(null); + } @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTime_JsonNullable() { return time; } - - @JsonProperty(JSON_PROPERTY_TIME) - public void setTime_JsonNullable(JsonNullable time) { + @JsonProperty(JSON_PROPERTY_TIME)public void setTime_JsonNullable(JsonNullable time) { this.time = time; } - public void setTime(NotebookCellTime time) { this.time = JsonNullable.of(time); } - /** Return true if this NotebookLogStreamCellAttributes object is equal to o. */ + /** + * Return true if this NotebookLogStreamCellAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -130,16 +139,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebookLogStreamCellAttributes notebookLogStreamCellAttributes = - (NotebookLogStreamCellAttributes) o; - return Objects.equals(this.definition, notebookLogStreamCellAttributes.definition) - && Objects.equals(this.graphSize, notebookLogStreamCellAttributes.graphSize) - && Objects.equals(this.time, notebookLogStreamCellAttributes.time); + NotebookLogStreamCellAttributes notebookLogStreamCellAttributes = (NotebookLogStreamCellAttributes) o; + return Objects.equals(this.definition, notebookLogStreamCellAttributes.definition) && Objects.equals(this.graphSize, notebookLogStreamCellAttributes.graphSize) && Objects.equals(this.time, notebookLogStreamCellAttributes.time); } + @Override public int hashCode() { - return Objects.hash(definition, graphSize, time); + return Objects.hash(definition,graphSize,time); } @Override @@ -154,7 +161,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellAttributes.java index 057e90be0e2..21c341cd6ba 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attributes of a notebook markdown cell. */ -@JsonPropertyOrder({NotebookMarkdownCellAttributes.JSON_PROPERTY_DEFINITION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The attributes of a notebook markdown cell.

+ */ +@JsonPropertyOrder({ + NotebookMarkdownCellAttributes.JSON_PROPERTY_DEFINITION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookMarkdownCellAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private NotebookMarkdownCellDefinition definition; @@ -26,12 +47,10 @@ public NotebookMarkdownCellAttributes() {} @JsonCreator public NotebookMarkdownCellAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - NotebookMarkdownCellDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)NotebookMarkdownCellDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public NotebookMarkdownCellAttributes definition(NotebookMarkdownCellDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -39,23 +58,22 @@ public NotebookMarkdownCellAttributes definition(NotebookMarkdownCellDefinition } /** - * Text in a notebook is formatted with Markdown, which enables the use of - * headings, subheadings, links, images, lists, and code blocks. - * + *

Text in a notebook is formatted with Markdown, which enables the use of headings, subheadings, links, images, lists, and code blocks.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookMarkdownCellDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookMarkdownCellDefinition getDefinition() { + return definition; + } public void setDefinition(NotebookMarkdownCellDefinition definition) { this.definition = definition; } - /** Return true if this NotebookMarkdownCellAttributes object is equal to o. */ + /** + * Return true if this NotebookMarkdownCellAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -64,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebookMarkdownCellAttributes notebookMarkdownCellAttributes = - (NotebookMarkdownCellAttributes) o; + NotebookMarkdownCellAttributes notebookMarkdownCellAttributes = (NotebookMarkdownCellAttributes) o; return Objects.equals(this.definition, notebookMarkdownCellAttributes.definition); } + @Override public int hashCode() { return Objects.hash(definition); @@ -84,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinition.java b/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinition.java index a2d6f173164..d810a96d565 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinition.java @@ -6,26 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Text in a notebook is formatted with Markdown, which enables the use of - * headings, subheadings, links, images, lists, and code blocks. + *

Text in a notebook is formatted with Markdown, which enables the use of headings, subheadings, links, images, lists, and code blocks.

*/ @JsonPropertyOrder({ NotebookMarkdownCellDefinition.JSON_PROPERTY_TEXT, NotebookMarkdownCellDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookMarkdownCellDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TEXT = "text"; private String text; @@ -36,34 +51,30 @@ public NotebookMarkdownCellDefinition() {} @JsonCreator public NotebookMarkdownCellDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TEXT) String text, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - NotebookMarkdownCellDefinitionType type) { - this.text = text; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TEXT)String text, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookMarkdownCellDefinitionType type) { + this.text = text; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookMarkdownCellDefinition text(String text) { this.text = text; return this; } /** - * The markdown content. - * + *

The markdown content.

* @return text - */ - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getText() { - return text; - } - + **/ + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getText() { + return text; + } public void setText(String text) { this.text = text; } - public NotebookMarkdownCellDefinition type(NotebookMarkdownCellDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -71,24 +82,25 @@ public NotebookMarkdownCellDefinition type(NotebookMarkdownCellDefinitionType ty } /** - * Type of the markdown cell. - * + *

Type of the markdown cell.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookMarkdownCellDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookMarkdownCellDefinitionType getType() { + return type; + } public void setType(NotebookMarkdownCellDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookMarkdownCellDefinition object is equal to o. */ + /** + * Return true if this NotebookMarkdownCellDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebookMarkdownCellDefinition notebookMarkdownCellDefinition = - (NotebookMarkdownCellDefinition) o; - return Objects.equals(this.text, notebookMarkdownCellDefinition.text) - && Objects.equals(this.type, notebookMarkdownCellDefinition.type); + NotebookMarkdownCellDefinition notebookMarkdownCellDefinition = (NotebookMarkdownCellDefinition) o; + return Objects.equals(this.text, notebookMarkdownCellDefinition.text) && Objects.equals(this.type, notebookMarkdownCellDefinition.type); } + @Override public int hashCode() { - return Objects.hash(text, type); + return Objects.hash(text,type); } @Override @@ -119,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinitionType.java index 191a7e5fc15..cf41311abe1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookMarkdownCellDefinitionType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the markdown cell. */ -@JsonSerialize( - using = NotebookMarkdownCellDefinitionType.NotebookMarkdownCellDefinitionTypeSerializer.class) +/** + *

Type of the markdown cell.

+ */ +@JsonSerialize(using = NotebookMarkdownCellDefinitionType.NotebookMarkdownCellDefinitionTypeSerializer.class) public class NotebookMarkdownCellDefinitionType { - public static final NotebookMarkdownCellDefinitionType MARKDOWN = - new NotebookMarkdownCellDefinitionType("markdown"); + public static final NotebookMarkdownCellDefinitionType MARKDOWN = new NotebookMarkdownCellDefinitionType("markdown"); private static final Set allowedValues = new HashSet(Arrays.asList("markdown")); @@ -39,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class NotebookMarkdownCellDefinitionTypeSerializer - extends StdSerializer { - public NotebookMarkdownCellDefinitionTypeSerializer( - Class t) { - super(t); - } + public static class NotebookMarkdownCellDefinitionTypeSerializer extends StdSerializer { + public NotebookMarkdownCellDefinitionTypeSerializer(Class t) { + super(t); + } - public NotebookMarkdownCellDefinitionTypeSerializer() { - this(null); - } + public NotebookMarkdownCellDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - NotebookMarkdownCellDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(NotebookMarkdownCellDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NotebookMarkdownCellDefinitionType object is equal to o. */ + /** + * Return true if this NotebookMarkdownCellDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookMetadata.java b/src/main/java/com/datadog/api/client/v1/model/NotebookMetadata.java index c9c1a2b03fd..d821950e499 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookMetadata.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Metadata associated with the notebook. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Metadata associated with the notebook.

+ */ @JsonPropertyOrder({ NotebookMetadata.JSON_PROPERTY_IS_TEMPLATE, NotebookMetadata.JSON_PROPERTY_TAKE_SNAPSHOTS, NotebookMetadata.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_TEMPLATE = "is_template"; private Boolean isTemplate = false; @@ -38,77 +57,71 @@ public NotebookMetadata isTemplate(Boolean isTemplate) { } /** - * Whether or not the notebook is a template. - * + *

Whether or not the notebook is a template.

* @return isTemplate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsTemplate() { - return isTemplate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_TEMPLATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsTemplate() { + return isTemplate; + } public void setIsTemplate(Boolean isTemplate) { this.isTemplate = isTemplate; } - public NotebookMetadata takeSnapshots(Boolean takeSnapshots) { this.takeSnapshots = takeSnapshots; return this; } /** - * Whether or not the notebook takes snapshot image backups of the notebook's fixed-time graphs. - * + *

Whether or not the notebook takes snapshot image backups of the notebook's fixed-time graphs.

* @return takeSnapshots - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAKE_SNAPSHOTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTakeSnapshots() { - return takeSnapshots; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAKE_SNAPSHOTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTakeSnapshots() { + return takeSnapshots; + } public void setTakeSnapshots(Boolean takeSnapshots) { this.takeSnapshots = takeSnapshots; } - public NotebookMetadata type(NotebookMetadataType type) { this.type = JsonNullable.of(type); return this; } /** - * Metadata type of the notebook. - * + *

Metadata type of the notebook.

* @return type - */ - @jakarta.annotation.Nullable - @JsonIgnore - public NotebookMetadataType getType() { - return type.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public NotebookMetadataType getType() { + return type.orElse(null); + } @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getType_JsonNullable() { return type; } - - @JsonProperty(JSON_PROPERTY_TYPE) - public void setType_JsonNullable(JsonNullable type) { + @JsonProperty(JSON_PROPERTY_TYPE)public void setType_JsonNullable(JsonNullable type) { this.type = type; } - public void setType(NotebookMetadataType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = JsonNullable.of(type); } - /** Return true if this NotebookMetadata object is equal to o. */ + /** + * Return true if this NotebookMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +131,13 @@ public boolean equals(Object o) { return false; } NotebookMetadata notebookMetadata = (NotebookMetadata) o; - return Objects.equals(this.isTemplate, notebookMetadata.isTemplate) - && Objects.equals(this.takeSnapshots, notebookMetadata.takeSnapshots) - && Objects.equals(this.type, notebookMetadata.type); + return Objects.equals(this.isTemplate, notebookMetadata.isTemplate) && Objects.equals(this.takeSnapshots, notebookMetadata.takeSnapshots) && Objects.equals(this.type, notebookMetadata.type); } + @Override public int hashCode() { - return Objects.hash(isTemplate, takeSnapshots, type); + return Objects.hash(isTemplate,takeSnapshots,type); } @Override @@ -140,7 +152,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookMetadataType.java b/src/main/java/com/datadog/api/client/v1/model/NotebookMetadataType.java index f3a12157f9c..fb97047f429 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookMetadataType.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookMetadataType.java @@ -6,34 +6,54 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Metadata type of the notebook. */ +/** + *

Metadata type of the notebook.

+ */ @JsonSerialize(using = NotebookMetadataType.NotebookMetadataTypeSerializer.class) public class NotebookMetadataType { public static final NotebookMetadataType POSTMORTEM = new NotebookMetadataType("postmortem"); public static final NotebookMetadataType RUNBOOK = new NotebookMetadataType("runbook"); - public static final NotebookMetadataType INVESTIGATION = - new NotebookMetadataType("investigation"); - public static final NotebookMetadataType DOCUMENTATION = - new NotebookMetadataType("documentation"); + public static final NotebookMetadataType INVESTIGATION = new NotebookMetadataType("investigation"); + public static final NotebookMetadataType DOCUMENTATION = new NotebookMetadataType("documentation"); public static final NotebookMetadataType REPORT = new NotebookMetadataType("report"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("postmortem", "runbook", "investigation", "documentation", "report")); + private static final Set allowedValues = new HashSet(Arrays.asList("postmortem", "runbook", "investigation", "documentation", "report")); private String value; @@ -46,20 +66,18 @@ public boolean isValid() { } public static class NotebookMetadataTypeSerializer extends StdSerializer { - public NotebookMetadataTypeSerializer(Class t) { - super(t); - } - - public NotebookMetadataTypeSerializer() { - this(null); - } - - @Override - public void serialize( - NotebookMetadataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public NotebookMetadataTypeSerializer(Class t) { + super(t); + } + + public NotebookMetadataTypeSerializer() { + this(null); + } + + @Override + public void serialize(NotebookMetadataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NotebookMetadataType object is equal to o. */ + /** + * Return true if this NotebookMetadataType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookRelativeTime.java b/src/main/java/com/datadog/api/client/v1/model/NotebookRelativeTime.java index 76a9522b7a7..0634998ad12 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookRelativeTime.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookRelativeTime.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relative timeframe. */ -@JsonPropertyOrder({NotebookRelativeTime.JSON_PROPERTY_LIVE_SPAN}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relative timeframe.

+ */ +@JsonPropertyOrder({ + NotebookRelativeTime.JSON_PROPERTY_LIVE_SPAN +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookRelativeTime { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LIVE_SPAN = "live_span"; private WidgetLiveSpan liveSpan; @@ -26,11 +47,10 @@ public NotebookRelativeTime() {} @JsonCreator public NotebookRelativeTime( - @JsonProperty(required = true, value = JSON_PROPERTY_LIVE_SPAN) WidgetLiveSpan liveSpan) { - this.liveSpan = liveSpan; - this.unparsed |= !liveSpan.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_LIVE_SPAN)WidgetLiveSpan liveSpan) { + this.liveSpan = liveSpan; + this.unparsed |= !liveSpan.isValid(); } - public NotebookRelativeTime liveSpan(WidgetLiveSpan liveSpan) { this.liveSpan = liveSpan; this.unparsed |= !liveSpan.isValid(); @@ -38,24 +58,25 @@ public NotebookRelativeTime liveSpan(WidgetLiveSpan liveSpan) { } /** - * The available timeframes depend on the widget you are using. - * + *

The available timeframes depend on the widget you are using.

* @return liveSpan - */ - @JsonProperty(JSON_PROPERTY_LIVE_SPAN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetLiveSpan getLiveSpan() { - return liveSpan; - } - + **/ + @JsonProperty(JSON_PROPERTY_LIVE_SPAN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetLiveSpan getLiveSpan() { + return liveSpan; + } public void setLiveSpan(WidgetLiveSpan liveSpan) { if (!liveSpan.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.liveSpan = liveSpan; } - /** Return true if this NotebookRelativeTime object is equal to o. */ + /** + * Return true if this NotebookRelativeTime object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -68,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.liveSpan, notebookRelativeTime.liveSpan); } + @Override public int hashCode() { return Objects.hash(liveSpan); @@ -83,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookResourceType.java b/src/main/java/com/datadog/api/client/v1/model/NotebookResourceType.java index 18b91756a2e..e4a3cfa9890 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookResourceType.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookResourceType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Notebook resource. */ +/** + *

Type of the Notebook resource.

+ */ @JsonSerialize(using = NotebookResourceType.NotebookResourceTypeSerializer.class) public class NotebookResourceType { @@ -38,20 +62,18 @@ public boolean isValid() { } public static class NotebookResourceTypeSerializer extends StdSerializer { - public NotebookResourceTypeSerializer(Class t) { - super(t); - } - - public NotebookResourceTypeSerializer() { - this(null); - } - - @Override - public void serialize( - NotebookResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public NotebookResourceTypeSerializer(Class t) { + super(t); + } + + public NotebookResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize(NotebookResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NotebookResourceType object is equal to o. */ + /** + * Return true if this NotebookResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookResponse.java b/src/main/java/com/datadog/api/client/v1/model/NotebookResponse.java index 67531b0d917..dfbbf97b3e1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The description of a notebook response. */ -@JsonPropertyOrder({NotebookResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The description of a notebook response.

+ */ +@JsonPropertyOrder({ + NotebookResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private NotebookResponseData data; @@ -28,22 +50,23 @@ public NotebookResponse data(NotebookResponseData data) { } /** - * The data for a notebook. - * + *

The data for a notebook.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookResponseData getData() { + return data; + } public void setData(NotebookResponseData data) { this.data = data; } - /** Return true if this NotebookResponse object is equal to o. */ + /** + * Return true if this NotebookResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, notebookResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookResponseData.java b/src/main/java/com/datadog/api/client/v1/model/NotebookResponseData.java index 69d5b637e39..aefdda5adb6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data for a notebook. */ + +/** + *

The data for a notebook.

+ */ @JsonPropertyOrder({ NotebookResponseData.JSON_PROPERTY_ATTRIBUTES, NotebookResponseData.JSON_PROPERTY_ID, NotebookResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebookResponseDataAttributes attributes; @@ -36,17 +55,15 @@ public NotebookResponseData() {} @JsonCreator public NotebookResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebookResponseDataAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) Long id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebookResponseDataAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)Long id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookResponseData attributes(NotebookResponseDataAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,31 +71,29 @@ public NotebookResponseData attributes(NotebookResponseDataAttributes attributes } /** - * The attributes of a notebook. - * + *

The attributes of a notebook.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookResponseDataAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookResponseDataAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebookResponseDataAttributes attributes) { this.attributes = attributes; } /** - * Unique notebook ID, assigned when you create the notebook. - * + *

Unique notebook ID, assigned when you create the notebook.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getId() { + return id; + } public NotebookResponseData type(NotebookResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -86,24 +101,25 @@ public NotebookResponseData type(NotebookResourceType type) { } /** - * Type of the Notebook resource. - * + *

Type of the Notebook resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookResourceType getType() { + return type; + } public void setType(NotebookResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookResponseData object is equal to o. */ + /** + * Return true if this NotebookResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,14 +129,13 @@ public boolean equals(Object o) { return false; } NotebookResponseData notebookResponseData = (NotebookResponseData) o; - return Objects.equals(this.attributes, notebookResponseData.attributes) - && Objects.equals(this.id, notebookResponseData.id) - && Objects.equals(this.type, notebookResponseData.type); + return Objects.equals(this.attributes, notebookResponseData.attributes) && Objects.equals(this.id, notebookResponseData.id) && Objects.equals(this.type, notebookResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -135,7 +150,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookResponseDataAttributes.java index b37950088dc..74eaf037123 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookResponseDataAttributes.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The attributes of a notebook. */ +/** + *

The attributes of a notebook.

+ */ @JsonPropertyOrder({ NotebookResponseDataAttributes.JSON_PROPERTY_AUTHOR, NotebookResponseDataAttributes.JSON_PROPERTY_CELLS, @@ -29,10 +43,10 @@ NotebookResponseDataAttributes.JSON_PROPERTY_STATUS, NotebookResponseDataAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookResponseDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHOR = "author"; private NotebookAuthor author; @@ -40,7 +54,6 @@ public class NotebookResponseDataAttributes { private List cells = new ArrayList<>(); public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -48,7 +61,6 @@ public class NotebookResponseDataAttributes { private NotebookMetadata metadata; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; @@ -65,15 +77,14 @@ public NotebookResponseDataAttributes() {} @JsonCreator public NotebookResponseDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_CELLS) List cells, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TIME) NotebookGlobalTime time) { - this.cells = cells; - this.name = name; - this.time = time; - this.unparsed |= time.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CELLS)List cells, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TIME)NotebookGlobalTime time) { + this.cells = cells; + this.name = name; + this.time = time; + this.unparsed |= time.unparsed; } - public NotebookResponseDataAttributes author(NotebookAuthor author) { this.author = author; this.unparsed |= author.unparsed; @@ -81,21 +92,19 @@ public NotebookResponseDataAttributes author(NotebookAuthor author) { } /** - * Attributes of user object returned by the API. - * + *

Attributes of user object returned by the API.

* @return author - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookAuthor getAuthor() { - return author; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookAuthor getAuthor() { + return author; + } public void setAuthor(NotebookAuthor author) { this.author = author; } - public NotebookResponseDataAttributes cells(List cells) { this.cells = cells; for (NotebookCellResponse item : cells) { @@ -103,7 +112,6 @@ public NotebookResponseDataAttributes cells(List cells) { } return this; } - public NotebookResponseDataAttributes addCellsItem(NotebookCellResponse cellsItem) { this.cells.add(cellsItem); this.unparsed |= cellsItem.unparsed; @@ -111,32 +119,30 @@ public NotebookResponseDataAttributes addCellsItem(NotebookCellResponse cellsIte } /** - * List of cells to display in the notebook. - * + *

List of cells to display in the notebook.

* @return cells - */ - @JsonProperty(JSON_PROPERTY_CELLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCells() { - return cells; - } - + **/ + @JsonProperty(JSON_PROPERTY_CELLS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCells() { + return cells; + } public void setCells(List cells) { this.cells = cells; } /** - * UTC time stamp for when the notebook was created. - * + *

UTC time stamp for when the notebook was created.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } public NotebookResponseDataAttributes metadata(NotebookMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -144,53 +150,49 @@ public NotebookResponseDataAttributes metadata(NotebookMetadata metadata) { } /** - * Metadata associated with the notebook. - * + *

Metadata associated with the notebook.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookMetadata getMetadata() { + return metadata; + } public void setMetadata(NotebookMetadata metadata) { this.metadata = metadata; } /** - * UTC time stamp for when the notebook was last modified. - * + *

UTC time stamp for when the notebook was last modified.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } public NotebookResponseDataAttributes name(String name) { this.name = name; return this; } /** - * The name of the notebook. - * + *

The name of the notebook.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public NotebookResponseDataAttributes status(NotebookStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -198,24 +200,22 @@ public NotebookResponseDataAttributes status(NotebookStatus status) { } /** - * Publication status of the notebook. For now, always "published". - * + *

Publication status of the notebook. For now, always "published".

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookStatus getStatus() { + return status; + } public void setStatus(NotebookStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public NotebookResponseDataAttributes time(NotebookGlobalTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -223,21 +223,22 @@ public NotebookResponseDataAttributes time(NotebookGlobalTime time) { } /** - * Notebook global timeframe. - * + *

Notebook global timeframe.

* @return time - */ - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookGlobalTime getTime() { - return time; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookGlobalTime getTime() { + return time; + } public void setTime(NotebookGlobalTime time) { this.time = time; } - /** Return true if this NotebookResponseDataAttributes object is equal to o. */ + /** + * Return true if this NotebookResponseDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -246,21 +247,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebookResponseDataAttributes notebookResponseDataAttributes = - (NotebookResponseDataAttributes) o; - return Objects.equals(this.author, notebookResponseDataAttributes.author) - && Objects.equals(this.cells, notebookResponseDataAttributes.cells) - && Objects.equals(this.created, notebookResponseDataAttributes.created) - && Objects.equals(this.metadata, notebookResponseDataAttributes.metadata) - && Objects.equals(this.modified, notebookResponseDataAttributes.modified) - && Objects.equals(this.name, notebookResponseDataAttributes.name) - && Objects.equals(this.status, notebookResponseDataAttributes.status) - && Objects.equals(this.time, notebookResponseDataAttributes.time); + NotebookResponseDataAttributes notebookResponseDataAttributes = (NotebookResponseDataAttributes) o; + return Objects.equals(this.author, notebookResponseDataAttributes.author) && Objects.equals(this.cells, notebookResponseDataAttributes.cells) && Objects.equals(this.created, notebookResponseDataAttributes.created) && Objects.equals(this.metadata, notebookResponseDataAttributes.metadata) && Objects.equals(this.modified, notebookResponseDataAttributes.modified) && Objects.equals(this.name, notebookResponseDataAttributes.name) && Objects.equals(this.status, notebookResponseDataAttributes.status) && Objects.equals(this.time, notebookResponseDataAttributes.time); } + @Override public int hashCode() { - return Objects.hash(author, cells, created, metadata, modified, name, status, time); + return Objects.hash(author,cells,created,metadata,modified,name,status,time); } @Override @@ -280,7 +274,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookSplitBy.java b/src/main/java/com/datadog/api/client/v1/model/NotebookSplitBy.java index 6b9b76d81e0..53f336b0411 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookSplitBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookSplitBy.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing how to split the graph to display multiple visualizations per request. */ -@JsonPropertyOrder({NotebookSplitBy.JSON_PROPERTY_KEYS, NotebookSplitBy.JSON_PROPERTY_TAGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing how to split the graph to display multiple visualizations per request.

+ */ +@JsonPropertyOrder({ + NotebookSplitBy.JSON_PROPERTY_KEYS, + NotebookSplitBy.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookSplitBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_KEYS = "keys"; private List keys = new ArrayList<>(); @@ -31,63 +51,59 @@ public NotebookSplitBy() {} @JsonCreator public NotebookSplitBy( - @JsonProperty(required = true, value = JSON_PROPERTY_KEYS) List keys, - @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { - this.keys = keys; - this.tags = tags; + @JsonProperty(required=true, value=JSON_PROPERTY_KEYS)List keys, + @JsonProperty(required=true, value=JSON_PROPERTY_TAGS)List tags) { + this.keys = keys; + this.tags = tags; } - public NotebookSplitBy keys(List keys) { this.keys = keys; return this; } - public NotebookSplitBy addKeysItem(String keysItem) { this.keys.add(keysItem); return this; } /** - * Keys to split on. - * + *

Keys to split on.

* @return keys - */ - @JsonProperty(JSON_PROPERTY_KEYS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getKeys() { - return keys; - } - + **/ + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getKeys() { + return keys; + } public void setKeys(List keys) { this.keys = keys; } - public NotebookSplitBy tags(List tags) { this.tags = tags; return this; } - public NotebookSplitBy addTagsItem(String tagsItem) { this.tags.add(tagsItem); return this; } /** - * Tags to split on. - * + *

Tags to split on.

* @return tags - */ - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTags() { - return tags; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this NotebookSplitBy object is equal to o. */ + /** + * Return true if this NotebookSplitBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +113,13 @@ public boolean equals(Object o) { return false; } NotebookSplitBy notebookSplitBy = (NotebookSplitBy) o; - return Objects.equals(this.keys, notebookSplitBy.keys) - && Objects.equals(this.tags, notebookSplitBy.tags); + return Objects.equals(this.keys, notebookSplitBy.keys) && Objects.equals(this.tags, notebookSplitBy.tags); } + @Override public int hashCode() { - return Objects.hash(keys, tags); + return Objects.hash(keys,tags); } @Override @@ -117,7 +133,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookStatus.java b/src/main/java/com/datadog/api/client/v1/model/NotebookStatus.java index e6a1af00cfc..279b06bdbfa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookStatus.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Publication status of the notebook. For now, always "published". */ +/** + *

Publication status of the notebook. For now, always "published".

+ */ @JsonSerialize(using = NotebookStatus.NotebookStatusSerializer.class) public class NotebookStatus { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class NotebookStatusSerializer extends StdSerializer { - public NotebookStatusSerializer(Class t) { - super(t); - } - - public NotebookStatusSerializer() { - this(null); - } - - @Override - public void serialize(NotebookStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public NotebookStatusSerializer(Class t) { + super(t); + } + + public NotebookStatusSerializer() { + this(null); + } + + @Override + public void serialize(NotebookStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this NotebookStatus object is equal to o. */ + /** + * Return true if this NotebookStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookTimeseriesCellAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookTimeseriesCellAttributes.java index 009d79d59d0..45357a23f1d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookTimeseriesCellAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookTimeseriesCellAttributes.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes of a notebook timeseries cell. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes of a notebook timeseries cell.

+ */ @JsonPropertyOrder({ NotebookTimeseriesCellAttributes.JSON_PROPERTY_DEFINITION, NotebookTimeseriesCellAttributes.JSON_PROPERTY_GRAPH_SIZE, NotebookTimeseriesCellAttributes.JSON_PROPERTY_SPLIT_BY, NotebookTimeseriesCellAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookTimeseriesCellAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private TimeseriesWidgetDefinition definition; @@ -41,12 +59,10 @@ public NotebookTimeseriesCellAttributes() {} @JsonCreator public NotebookTimeseriesCellAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - TimeseriesWidgetDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)TimeseriesWidgetDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public NotebookTimeseriesCellAttributes definition(TimeseriesWidgetDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -54,21 +70,18 @@ public NotebookTimeseriesCellAttributes definition(TimeseriesWidgetDefinition de } /** - * The timeseries visualization allows you to display the evolution of one or more metrics, log - * events, or Indexed Spans over time. - * + *

The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TimeseriesWidgetDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TimeseriesWidgetDefinition getDefinition() { + return definition; + } public void setDefinition(TimeseriesWidgetDefinition definition) { this.definition = definition; } - public NotebookTimeseriesCellAttributes graphSize(NotebookGraphSize graphSize) { this.graphSize = graphSize; this.unparsed |= !graphSize.isValid(); @@ -76,24 +89,22 @@ public NotebookTimeseriesCellAttributes graphSize(NotebookGraphSize graphSize) { } /** - * The size of the graph. - * + *

The size of the graph.

* @return graphSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookGraphSize getGraphSize() { - return graphSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookGraphSize getGraphSize() { + return graphSize; + } public void setGraphSize(NotebookGraphSize graphSize) { if (!graphSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.graphSize = graphSize; } - public NotebookTimeseriesCellAttributes splitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; this.unparsed |= splitBy.unparsed; @@ -101,53 +112,49 @@ public NotebookTimeseriesCellAttributes splitBy(NotebookSplitBy splitBy) { } /** - * Object describing how to split the graph to display multiple visualizations per request. - * + *

Object describing how to split the graph to display multiple visualizations per request.

* @return splitBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SPLIT_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookSplitBy getSplitBy() { - return splitBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPLIT_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookSplitBy getSplitBy() { + return splitBy; + } public void setSplitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; } - public NotebookTimeseriesCellAttributes time(NotebookCellTime time) { this.time = JsonNullable.of(time); return this; } /** - * Timeframe for the notebook cell. When 'null', the notebook global time is used. - * + *

Timeframe for the notebook cell. When 'null', the notebook global time is used.

* @return time - */ - @jakarta.annotation.Nullable - @JsonIgnore - public NotebookCellTime getTime() { - return time.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public NotebookCellTime getTime() { + return time.orElse(null); + } @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTime_JsonNullable() { return time; } - - @JsonProperty(JSON_PROPERTY_TIME) - public void setTime_JsonNullable(JsonNullable time) { + @JsonProperty(JSON_PROPERTY_TIME)public void setTime_JsonNullable(JsonNullable time) { this.time = time; } - public void setTime(NotebookCellTime time) { this.time = JsonNullable.of(time); } - /** Return true if this NotebookTimeseriesCellAttributes object is equal to o. */ + /** + * Return true if this NotebookTimeseriesCellAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -156,17 +163,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebookTimeseriesCellAttributes notebookTimeseriesCellAttributes = - (NotebookTimeseriesCellAttributes) o; - return Objects.equals(this.definition, notebookTimeseriesCellAttributes.definition) - && Objects.equals(this.graphSize, notebookTimeseriesCellAttributes.graphSize) - && Objects.equals(this.splitBy, notebookTimeseriesCellAttributes.splitBy) - && Objects.equals(this.time, notebookTimeseriesCellAttributes.time); + NotebookTimeseriesCellAttributes notebookTimeseriesCellAttributes = (NotebookTimeseriesCellAttributes) o; + return Objects.equals(this.definition, notebookTimeseriesCellAttributes.definition) && Objects.equals(this.graphSize, notebookTimeseriesCellAttributes.graphSize) && Objects.equals(this.splitBy, notebookTimeseriesCellAttributes.splitBy) && Objects.equals(this.time, notebookTimeseriesCellAttributes.time); } + @Override public int hashCode() { - return Objects.hash(definition, graphSize, splitBy, time); + return Objects.hash(definition,graphSize,splitBy,time); } @Override @@ -182,7 +186,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookToplistCellAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookToplistCellAttributes.java index 9dd575d62f1..bba2884e835 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookToplistCellAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookToplistCellAttributes.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes of a notebook toplist cell. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes of a notebook toplist cell.

+ */ @JsonPropertyOrder({ NotebookToplistCellAttributes.JSON_PROPERTY_DEFINITION, NotebookToplistCellAttributes.JSON_PROPERTY_GRAPH_SIZE, NotebookToplistCellAttributes.JSON_PROPERTY_SPLIT_BY, NotebookToplistCellAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookToplistCellAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private ToplistWidgetDefinition definition; @@ -41,12 +59,10 @@ public NotebookToplistCellAttributes() {} @JsonCreator public NotebookToplistCellAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - ToplistWidgetDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)ToplistWidgetDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public NotebookToplistCellAttributes definition(ToplistWidgetDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -54,22 +70,18 @@ public NotebookToplistCellAttributes definition(ToplistWidgetDefinition definiti } /** - * The top list visualization enables you to display a list of Tag value like hostname or service - * with the most or least of any metric value, such as highest consumers of CPU, hosts with the - * least disk space, etc. - * + *

The top list visualization enables you to display a list of Tag value like hostname or service with the most or least of any metric value, such as highest consumers of CPU, hosts with the least disk space, etc.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ToplistWidgetDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ToplistWidgetDefinition getDefinition() { + return definition; + } public void setDefinition(ToplistWidgetDefinition definition) { this.definition = definition; } - public NotebookToplistCellAttributes graphSize(NotebookGraphSize graphSize) { this.graphSize = graphSize; this.unparsed |= !graphSize.isValid(); @@ -77,24 +89,22 @@ public NotebookToplistCellAttributes graphSize(NotebookGraphSize graphSize) { } /** - * The size of the graph. - * + *

The size of the graph.

* @return graphSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookGraphSize getGraphSize() { - return graphSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookGraphSize getGraphSize() { + return graphSize; + } public void setGraphSize(NotebookGraphSize graphSize) { if (!graphSize.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.graphSize = graphSize; } - public NotebookToplistCellAttributes splitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; this.unparsed |= splitBy.unparsed; @@ -102,53 +112,49 @@ public NotebookToplistCellAttributes splitBy(NotebookSplitBy splitBy) { } /** - * Object describing how to split the graph to display multiple visualizations per request. - * + *

Object describing how to split the graph to display multiple visualizations per request.

* @return splitBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SPLIT_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookSplitBy getSplitBy() { - return splitBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPLIT_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookSplitBy getSplitBy() { + return splitBy; + } public void setSplitBy(NotebookSplitBy splitBy) { this.splitBy = splitBy; } - public NotebookToplistCellAttributes time(NotebookCellTime time) { this.time = JsonNullable.of(time); return this; } /** - * Timeframe for the notebook cell. When 'null', the notebook global time is used. - * + *

Timeframe for the notebook cell. When 'null', the notebook global time is used.

* @return time - */ - @jakarta.annotation.Nullable - @JsonIgnore - public NotebookCellTime getTime() { - return time.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public NotebookCellTime getTime() { + return time.orElse(null); + } @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTime_JsonNullable() { return time; } - - @JsonProperty(JSON_PROPERTY_TIME) - public void setTime_JsonNullable(JsonNullable time) { + @JsonProperty(JSON_PROPERTY_TIME)public void setTime_JsonNullable(JsonNullable time) { this.time = time; } - public void setTime(NotebookCellTime time) { this.time = JsonNullable.of(time); } - /** Return true if this NotebookToplistCellAttributes object is equal to o. */ + /** + * Return true if this NotebookToplistCellAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -158,15 +164,13 @@ public boolean equals(Object o) { return false; } NotebookToplistCellAttributes notebookToplistCellAttributes = (NotebookToplistCellAttributes) o; - return Objects.equals(this.definition, notebookToplistCellAttributes.definition) - && Objects.equals(this.graphSize, notebookToplistCellAttributes.graphSize) - && Objects.equals(this.splitBy, notebookToplistCellAttributes.splitBy) - && Objects.equals(this.time, notebookToplistCellAttributes.time); + return Objects.equals(this.definition, notebookToplistCellAttributes.definition) && Objects.equals(this.graphSize, notebookToplistCellAttributes.graphSize) && Objects.equals(this.splitBy, notebookToplistCellAttributes.splitBy) && Objects.equals(this.time, notebookToplistCellAttributes.time); } + @Override public int hashCode() { - return Objects.hash(definition, graphSize, splitBy, time); + return Objects.hash(definition,graphSize,splitBy,time); } @Override @@ -182,7 +186,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateCell.java b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateCell.java index 953bcc09d49..a74848842f1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateCell.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateCell.java @@ -6,273 +6,261 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = NotebookUpdateCell.NotebookUpdateCellDeserializer.class) @JsonSerialize(using = NotebookUpdateCell.NotebookUpdateCellSerializer.class) public class NotebookUpdateCell extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(NotebookUpdateCell.class.getName()); + private static final Logger log = Logger.getLogger(NotebookUpdateCell.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class NotebookUpdateCellSerializer extends StdSerializer { + public NotebookUpdateCellSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public NotebookUpdateCellSerializer() { + this(null); + } - public static class NotebookUpdateCellSerializer extends StdSerializer { - public NotebookUpdateCellSerializer(Class t) { - super(t); + @Override + public void serialize(NotebookUpdateCell value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public NotebookUpdateCellSerializer() { - this(null); + public static class NotebookUpdateCellDeserializer extends StdDeserializer { + public NotebookUpdateCellDeserializer() { + this(NotebookUpdateCell.class); + } + + public NotebookUpdateCellDeserializer(Class vc) { + super(vc); + } + + @Override + public NotebookUpdateCell 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 NotebookCellCreateRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookCellCreateRequest.class.equals(Integer.class) || NotebookCellCreateRequest.class.equals(Long.class) || NotebookCellCreateRequest.class.equals(Float.class) || NotebookCellCreateRequest.class.equals(Double.class) || NotebookCellCreateRequest.class.equals(Boolean.class) || NotebookCellCreateRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookCellCreateRequest.class.equals(Integer.class) || NotebookCellCreateRequest.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookCellCreateRequest.class.equals(Float.class) || NotebookCellCreateRequest.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookCellCreateRequest.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookCellCreateRequest.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookCellCreateRequest.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 (!((NotebookCellCreateRequest)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookCellCreateRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookCellCreateRequest'", e); + } + + // deserialize NotebookCellUpdateRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NotebookCellUpdateRequest.class.equals(Integer.class) || NotebookCellUpdateRequest.class.equals(Long.class) || NotebookCellUpdateRequest.class.equals(Float.class) || NotebookCellUpdateRequest.class.equals(Double.class) || NotebookCellUpdateRequest.class.equals(Boolean.class) || NotebookCellUpdateRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NotebookCellUpdateRequest.class.equals(Integer.class) || NotebookCellUpdateRequest.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NotebookCellUpdateRequest.class.equals(Float.class) || NotebookCellUpdateRequest.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NotebookCellUpdateRequest.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NotebookCellUpdateRequest.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookCellUpdateRequest.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 (!((NotebookCellUpdateRequest)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NotebookCellUpdateRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NotebookCellUpdateRequest'", e); + } + + NotebookUpdateCell ret = new NotebookUpdateCell(); + 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 NotebookUpdateCell getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "NotebookUpdateCell cannot be null"); + } } - @Override - public void serialize(NotebookUpdateCell value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public NotebookUpdateCell() { + super("oneOf", Boolean.FALSE); + } + public NotebookUpdateCell(NotebookCellCreateRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public NotebookUpdateCell(NotebookCellUpdateRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class NotebookUpdateCellDeserializer extends StdDeserializer { - public NotebookUpdateCellDeserializer() { - this(NotebookUpdateCell.class); + static { + schemas.put("NotebookCellCreateRequest", new GenericType() { + }); + schemas.put("NotebookCellUpdateRequest", new GenericType() { + }); + JSON.registerDescendants(NotebookUpdateCell.class, Collections.unmodifiableMap(schemas)); } - public NotebookUpdateCellDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return NotebookUpdateCell.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotebookCellCreateRequest, NotebookCellUpdateRequest + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public NotebookUpdateCell 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 NotebookCellCreateRequest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookCellCreateRequest.class.equals(Integer.class) - || NotebookCellCreateRequest.class.equals(Long.class) - || NotebookCellCreateRequest.class.equals(Float.class) - || NotebookCellCreateRequest.class.equals(Double.class) - || NotebookCellCreateRequest.class.equals(Boolean.class) - || NotebookCellCreateRequest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookCellCreateRequest.class.equals(Integer.class) - || NotebookCellCreateRequest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookCellCreateRequest.class.equals(Float.class) - || NotebookCellCreateRequest.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookCellCreateRequest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookCellCreateRequest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(NotebookCellCreateRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookCellCreateRequest.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 (!((NotebookCellCreateRequest) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookCellCreateRequest'"); + if (JSON.isInstanceOf(NotebookCellUpdateRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookCellCreateRequest'", e); - } - // deserialize NotebookCellUpdateRequest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NotebookCellUpdateRequest.class.equals(Integer.class) - || NotebookCellUpdateRequest.class.equals(Long.class) - || NotebookCellUpdateRequest.class.equals(Float.class) - || NotebookCellUpdateRequest.class.equals(Double.class) - || NotebookCellUpdateRequest.class.equals(Boolean.class) - || NotebookCellUpdateRequest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NotebookCellUpdateRequest.class.equals(Integer.class) - || NotebookCellUpdateRequest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NotebookCellUpdateRequest.class.equals(Float.class) - || NotebookCellUpdateRequest.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NotebookCellUpdateRequest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NotebookCellUpdateRequest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NotebookCellUpdateRequest.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 (!((NotebookCellUpdateRequest) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NotebookCellUpdateRequest'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NotebookCellUpdateRequest'", e); - } - - NotebookUpdateCell ret = new NotebookUpdateCell(); - 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; + throw new RuntimeException("Invalid instance type. Must be NotebookCellCreateRequest, NotebookCellUpdateRequest"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * NotebookCellCreateRequest, NotebookCellUpdateRequest + * + * @return The actual instance (NotebookCellCreateRequest, NotebookCellUpdateRequest) + */ @Override - public NotebookUpdateCell getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "NotebookUpdateCell cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public NotebookUpdateCell() { - super("oneOf", Boolean.FALSE); - } - - public NotebookUpdateCell(NotebookCellCreateRequest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public NotebookUpdateCell(NotebookCellUpdateRequest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("NotebookCellCreateRequest", new GenericType() {}); - schemas.put("NotebookCellUpdateRequest", new GenericType() {}); - JSON.registerDescendants(NotebookUpdateCell.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return NotebookUpdateCell.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NotebookCellCreateRequest, NotebookCellUpdateRequest - * - *

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(NotebookCellCreateRequest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NotebookCellUpdateRequest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookCellCreateRequest`. If the actual instance is not `NotebookCellCreateRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookCellCreateRequest` + * @throws ClassCastException if the instance is not `NotebookCellCreateRequest` + */ + public NotebookCellCreateRequest getNotebookCellCreateRequest() throws ClassCastException { + return (NotebookCellCreateRequest)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `NotebookCellUpdateRequest`. If the actual instance is not `NotebookCellUpdateRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotebookCellUpdateRequest` + * @throws ClassCastException if the instance is not `NotebookCellUpdateRequest` + */ + public NotebookCellUpdateRequest getNotebookCellUpdateRequest() throws ClassCastException { + return (NotebookCellUpdateRequest)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be NotebookCellCreateRequest, NotebookCellUpdateRequest"); - } - - /** - * Get the actual instance, which can be the following: NotebookCellCreateRequest, - * NotebookCellUpdateRequest - * - * @return The actual instance (NotebookCellCreateRequest, NotebookCellUpdateRequest) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookCellCreateRequest`. If the actual instance is not - * `NotebookCellCreateRequest`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookCellCreateRequest` - * @throws ClassCastException if the instance is not `NotebookCellCreateRequest` - */ - public NotebookCellCreateRequest getNotebookCellCreateRequest() throws ClassCastException { - return (NotebookCellCreateRequest) super.getActualInstance(); - } - - /** - * Get the actual instance of `NotebookCellUpdateRequest`. If the actual instance is not - * `NotebookCellUpdateRequest`, the ClassCastException will be thrown. - * - * @return The actual instance of `NotebookCellUpdateRequest` - * @throws ClassCastException if the instance is not `NotebookCellUpdateRequest` - */ - public NotebookCellUpdateRequest getNotebookCellUpdateRequest() throws ClassCastException { - return (NotebookCellUpdateRequest) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateData.java b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateData.java index e6bbaa21d37..f83bd43de71 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateData.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data for a notebook update request. */ + +/** + *

The data for a notebook update request.

+ */ @JsonPropertyOrder({ NotebookUpdateData.JSON_PROPERTY_ATTRIBUTES, NotebookUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebookUpdateDataAttributes attributes; @@ -32,15 +51,13 @@ public NotebookUpdateData() {} @JsonCreator public NotebookUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebookUpdateDataAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebookUpdateDataAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebookUpdateData attributes(NotebookUpdateDataAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public NotebookUpdateData attributes(NotebookUpdateDataAttributes attributes) { } /** - * The data attributes of a notebook. - * + *

The data attributes of a notebook.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookUpdateDataAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookUpdateDataAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebookUpdateDataAttributes attributes) { this.attributes = attributes; } - public NotebookUpdateData type(NotebookResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public NotebookUpdateData type(NotebookResourceType type) { } /** - * Type of the Notebook resource. - * + *

Type of the Notebook resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookResourceType getType() { + return type; + } public void setType(NotebookResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebookUpdateData object is equal to o. */ + /** + * Return true if this NotebookUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } NotebookUpdateData notebookUpdateData = (NotebookUpdateData) o; - return Objects.equals(this.attributes, notebookUpdateData.attributes) - && Objects.equals(this.type, notebookUpdateData.type); + return Objects.equals(this.attributes, notebookUpdateData.attributes) && Objects.equals(this.type, notebookUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateDataAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateDataAttributes.java index f118fc1936c..8a739bd6e8c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateDataAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data attributes of a notebook. */ + +/** + *

The data attributes of a notebook.

+ */ @JsonPropertyOrder({ NotebookUpdateDataAttributes.JSON_PROPERTY_CELLS, NotebookUpdateDataAttributes.JSON_PROPERTY_METADATA, @@ -23,10 +40,10 @@ NotebookUpdateDataAttributes.JSON_PROPERTY_STATUS, NotebookUpdateDataAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookUpdateDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CELLS = "cells"; private List cells = new ArrayList<>(); @@ -46,15 +63,14 @@ public NotebookUpdateDataAttributes() {} @JsonCreator public NotebookUpdateDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_CELLS) List cells, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TIME) NotebookGlobalTime time) { - this.cells = cells; - this.name = name; - this.time = time; - this.unparsed |= time.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CELLS)List cells, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TIME)NotebookGlobalTime time) { + this.cells = cells; + this.name = name; + this.time = time; + this.unparsed |= time.unparsed; } - public NotebookUpdateDataAttributes cells(List cells) { this.cells = cells; for (NotebookUpdateCell item : cells) { @@ -62,7 +78,6 @@ public NotebookUpdateDataAttributes cells(List cells) { } return this; } - public NotebookUpdateDataAttributes addCellsItem(NotebookUpdateCell cellsItem) { this.cells.add(cellsItem); this.unparsed |= cellsItem.unparsed; @@ -70,20 +85,18 @@ public NotebookUpdateDataAttributes addCellsItem(NotebookUpdateCell cellsItem) { } /** - * List of cells to display in the notebook. - * + *

List of cells to display in the notebook.

* @return cells - */ - @JsonProperty(JSON_PROPERTY_CELLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCells() { - return cells; - } - + **/ + @JsonProperty(JSON_PROPERTY_CELLS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCells() { + return cells; + } public void setCells(List cells) { this.cells = cells; } - public NotebookUpdateDataAttributes metadata(NotebookMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -91,41 +104,37 @@ public NotebookUpdateDataAttributes metadata(NotebookMetadata metadata) { } /** - * Metadata associated with the notebook. - * + *

Metadata associated with the notebook.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookMetadata getMetadata() { + return metadata; + } public void setMetadata(NotebookMetadata metadata) { this.metadata = metadata; } - public NotebookUpdateDataAttributes name(String name) { this.name = name; return this; } /** - * The name of the notebook. - * + *

The name of the notebook.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public NotebookUpdateDataAttributes status(NotebookStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -133,24 +142,22 @@ public NotebookUpdateDataAttributes status(NotebookStatus status) { } /** - * Publication status of the notebook. For now, always "published". - * + *

Publication status of the notebook. For now, always "published".

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookStatus getStatus() { + return status; + } public void setStatus(NotebookStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public NotebookUpdateDataAttributes time(NotebookGlobalTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -158,21 +165,22 @@ public NotebookUpdateDataAttributes time(NotebookGlobalTime time) { } /** - * Notebook global timeframe. - * + *

Notebook global timeframe.

* @return time - */ - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookGlobalTime getTime() { - return time; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookGlobalTime getTime() { + return time; + } public void setTime(NotebookGlobalTime time) { this.time = time; } - /** Return true if this NotebookUpdateDataAttributes object is equal to o. */ + /** + * Return true if this NotebookUpdateDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -182,16 +190,13 @@ public boolean equals(Object o) { return false; } NotebookUpdateDataAttributes notebookUpdateDataAttributes = (NotebookUpdateDataAttributes) o; - return Objects.equals(this.cells, notebookUpdateDataAttributes.cells) - && Objects.equals(this.metadata, notebookUpdateDataAttributes.metadata) - && Objects.equals(this.name, notebookUpdateDataAttributes.name) - && Objects.equals(this.status, notebookUpdateDataAttributes.status) - && Objects.equals(this.time, notebookUpdateDataAttributes.time); + return Objects.equals(this.cells, notebookUpdateDataAttributes.cells) && Objects.equals(this.metadata, notebookUpdateDataAttributes.metadata) && Objects.equals(this.name, notebookUpdateDataAttributes.name) && Objects.equals(this.status, notebookUpdateDataAttributes.status) && Objects.equals(this.time, notebookUpdateDataAttributes.time); } + @Override public int hashCode() { - return Objects.hash(cells, metadata, name, status, time); + return Objects.hash(cells,metadata,name,status,time); } @Override @@ -208,7 +213,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateRequest.java index b50d5b0586c..63d455ca5d3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebookUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The description of a notebook update request. */ -@JsonPropertyOrder({NotebookUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The description of a notebook update request.

+ */ +@JsonPropertyOrder({ + NotebookUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebookUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private NotebookUpdateData data; @@ -26,11 +47,10 @@ public NotebookUpdateRequest() {} @JsonCreator public NotebookUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) NotebookUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)NotebookUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public NotebookUpdateRequest data(NotebookUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public NotebookUpdateRequest data(NotebookUpdateData data) { } /** - * The data for a notebook update request. - * + *

The data for a notebook update request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookUpdateData getData() { + return data; + } public void setData(NotebookUpdateData data) { this.data = data; } - /** Return true if this NotebookUpdateRequest object is equal to o. */ + /** + * Return true if this NotebookUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, notebookUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponse.java b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponse.java index 75995d87430..53f77ae77fc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Notebooks get all response. */ -@JsonPropertyOrder({NotebooksResponse.JSON_PROPERTY_DATA, NotebooksResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Notebooks get all response.

+ */ +@JsonPropertyOrder({ + NotebooksResponse.JSON_PROPERTY_DATA, + NotebooksResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebooksResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -33,7 +54,6 @@ public NotebooksResponse data(List data) { } return this; } - public NotebooksResponse addDataItem(NotebooksResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -44,21 +64,19 @@ public NotebooksResponse addDataItem(NotebooksResponseData dataItem) { } /** - * List of notebook definitions. - * + *

List of notebook definitions.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public NotebooksResponse meta(NotebooksResponseMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -66,22 +84,23 @@ public NotebooksResponse meta(NotebooksResponseMeta meta) { } /** - * Searches metadata returned by the API. - * + *

Searches metadata returned by the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebooksResponseMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebooksResponseMeta getMeta() { + return meta; + } public void setMeta(NotebooksResponseMeta meta) { this.meta = meta; } - /** Return true if this NotebooksResponse object is equal to o. */ + /** + * Return true if this NotebooksResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +110,13 @@ public boolean equals(Object o) { return false; } NotebooksResponse notebooksResponse = (NotebooksResponse) o; - return Objects.equals(this.data, notebooksResponse.data) - && Objects.equals(this.meta, notebooksResponse.meta); + return Objects.equals(this.data, notebooksResponse.data) && Objects.equals(this.meta, notebooksResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -111,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseData.java b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseData.java index 4526f104f6d..d53b8c0ef25 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data for a notebook in get all response. */ + +/** + *

The data for a notebook in get all response.

+ */ @JsonPropertyOrder({ NotebooksResponseData.JSON_PROPERTY_ATTRIBUTES, NotebooksResponseData.JSON_PROPERTY_ID, NotebooksResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebooksResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private NotebooksResponseDataAttributes attributes; @@ -36,17 +55,15 @@ public NotebooksResponseData() {} @JsonCreator public NotebooksResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - NotebooksResponseDataAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) Long id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NotebookResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)NotebooksResponseDataAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)Long id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)NotebookResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public NotebooksResponseData attributes(NotebooksResponseDataAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,31 +71,29 @@ public NotebooksResponseData attributes(NotebooksResponseDataAttributes attribut } /** - * The attributes of a notebook in get all response. - * + *

The attributes of a notebook in get all response.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebooksResponseDataAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebooksResponseDataAttributes getAttributes() { + return attributes; + } public void setAttributes(NotebooksResponseDataAttributes attributes) { this.attributes = attributes; } /** - * Unique notebook ID, assigned when you create the notebook. - * + *

Unique notebook ID, assigned when you create the notebook.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getId() { + return id; + } public NotebooksResponseData type(NotebookResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -86,24 +101,25 @@ public NotebooksResponseData type(NotebookResourceType type) { } /** - * Type of the Notebook resource. - * + *

Type of the Notebook resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotebookResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NotebookResourceType getType() { + return type; + } public void setType(NotebookResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NotebooksResponseData object is equal to o. */ + /** + * Return true if this NotebooksResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,14 +129,13 @@ public boolean equals(Object o) { return false; } NotebooksResponseData notebooksResponseData = (NotebooksResponseData) o; - return Objects.equals(this.attributes, notebooksResponseData.attributes) - && Objects.equals(this.id, notebooksResponseData.id) - && Objects.equals(this.type, notebooksResponseData.type); + return Objects.equals(this.attributes, notebooksResponseData.attributes) && Objects.equals(this.id, notebooksResponseData.id) && Objects.equals(this.type, notebooksResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -135,7 +150,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseDataAttributes.java index 1eb59373d59..e2d334dc0e0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseDataAttributes.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The attributes of a notebook in get all response. */ +/** + *

The attributes of a notebook in get all response.

+ */ @JsonPropertyOrder({ NotebooksResponseDataAttributes.JSON_PROPERTY_AUTHOR, NotebooksResponseDataAttributes.JSON_PROPERTY_CELLS, @@ -29,10 +43,10 @@ NotebooksResponseDataAttributes.JSON_PROPERTY_STATUS, NotebooksResponseDataAttributes.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebooksResponseDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHOR = "author"; private NotebookAuthor author; @@ -40,7 +54,6 @@ public class NotebooksResponseDataAttributes { private List cells = null; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -48,7 +61,6 @@ public class NotebooksResponseDataAttributes { private NotebookMetadata metadata; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; @@ -65,10 +77,9 @@ public NotebooksResponseDataAttributes() {} @JsonCreator public NotebooksResponseDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public NotebooksResponseDataAttributes author(NotebookAuthor author) { this.author = author; this.unparsed |= author.unparsed; @@ -76,21 +87,19 @@ public NotebooksResponseDataAttributes author(NotebookAuthor author) { } /** - * Attributes of user object returned by the API. - * + *

Attributes of user object returned by the API.

* @return author - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookAuthor getAuthor() { - return author; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookAuthor getAuthor() { + return author; + } public void setAuthor(NotebookAuthor author) { this.author = author; } - public NotebooksResponseDataAttributes cells(List cells) { this.cells = cells; for (NotebookCellResponse item : cells) { @@ -98,7 +107,6 @@ public NotebooksResponseDataAttributes cells(List cells) { } return this; } - public NotebooksResponseDataAttributes addCellsItem(NotebookCellResponse cellsItem) { if (this.cells == null) { this.cells = new ArrayList<>(); @@ -109,33 +117,31 @@ public NotebooksResponseDataAttributes addCellsItem(NotebookCellResponse cellsIt } /** - * List of cells to display in the notebook. - * + *

List of cells to display in the notebook.

* @return cells - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CELLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCells() { - return cells; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCells() { + return cells; + } public void setCells(List cells) { this.cells = cells; } /** - * UTC time stamp for when the notebook was created. - * + *

UTC time stamp for when the notebook was created.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } public NotebooksResponseDataAttributes metadata(NotebookMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -143,53 +149,49 @@ public NotebooksResponseDataAttributes metadata(NotebookMetadata metadata) { } /** - * Metadata associated with the notebook. - * + *

Metadata associated with the notebook.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookMetadata getMetadata() { + return metadata; + } public void setMetadata(NotebookMetadata metadata) { this.metadata = metadata; } /** - * UTC time stamp for when the notebook was last modified. - * + *

UTC time stamp for when the notebook was last modified.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } public NotebooksResponseDataAttributes name(String name) { this.name = name; return this; } /** - * The name of the notebook. - * + *

The name of the notebook.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public NotebooksResponseDataAttributes status(NotebookStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -197,24 +199,22 @@ public NotebooksResponseDataAttributes status(NotebookStatus status) { } /** - * Publication status of the notebook. For now, always "published". - * + *

Publication status of the notebook. For now, always "published".

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookStatus getStatus() { + return status; + } public void setStatus(NotebookStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public NotebooksResponseDataAttributes time(NotebookGlobalTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -222,22 +222,23 @@ public NotebooksResponseDataAttributes time(NotebookGlobalTime time) { } /** - * Notebook global timeframe. - * + *

Notebook global timeframe.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebookGlobalTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebookGlobalTime getTime() { + return time; + } public void setTime(NotebookGlobalTime time) { this.time = time; } - /** Return true if this NotebooksResponseDataAttributes object is equal to o. */ + /** + * Return true if this NotebooksResponseDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -246,21 +247,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NotebooksResponseDataAttributes notebooksResponseDataAttributes = - (NotebooksResponseDataAttributes) o; - return Objects.equals(this.author, notebooksResponseDataAttributes.author) - && Objects.equals(this.cells, notebooksResponseDataAttributes.cells) - && Objects.equals(this.created, notebooksResponseDataAttributes.created) - && Objects.equals(this.metadata, notebooksResponseDataAttributes.metadata) - && Objects.equals(this.modified, notebooksResponseDataAttributes.modified) - && Objects.equals(this.name, notebooksResponseDataAttributes.name) - && Objects.equals(this.status, notebooksResponseDataAttributes.status) - && Objects.equals(this.time, notebooksResponseDataAttributes.time); + NotebooksResponseDataAttributes notebooksResponseDataAttributes = (NotebooksResponseDataAttributes) o; + return Objects.equals(this.author, notebooksResponseDataAttributes.author) && Objects.equals(this.cells, notebooksResponseDataAttributes.cells) && Objects.equals(this.created, notebooksResponseDataAttributes.created) && Objects.equals(this.metadata, notebooksResponseDataAttributes.metadata) && Objects.equals(this.modified, notebooksResponseDataAttributes.modified) && Objects.equals(this.name, notebooksResponseDataAttributes.name) && Objects.equals(this.status, notebooksResponseDataAttributes.status) && Objects.equals(this.time, notebooksResponseDataAttributes.time); } + @Override public int hashCode() { - return Objects.hash(author, cells, created, metadata, modified, name, status, time); + return Objects.hash(author,cells,created,metadata,modified,name,status,time); } @Override @@ -280,7 +274,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseMeta.java b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseMeta.java index 3d68bb67f93..e35a300ea8a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseMeta.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponseMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Searches metadata returned by the API. */ -@JsonPropertyOrder({NotebooksResponseMeta.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Searches metadata returned by the API.

+ */ +@JsonPropertyOrder({ + NotebooksResponseMeta.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebooksResponseMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private NotebooksResponsePage page; @@ -28,22 +50,23 @@ public NotebooksResponseMeta page(NotebooksResponsePage page) { } /** - * Pagination metadata returned by the API. - * + *

Pagination metadata returned by the API.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotebooksResponsePage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NotebooksResponsePage getPage() { + return page; + } public void setPage(NotebooksResponsePage page) { this.page = page; } - /** Return true if this NotebooksResponseMeta object is equal to o. */ + /** + * Return true if this NotebooksResponseMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.page, notebooksResponseMeta.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponsePage.java b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponsePage.java index 50a9f4a72a4..4d8ad294799 100644 --- a/src/main/java/com/datadog/api/client/v1/model/NotebooksResponsePage.java +++ b/src/main/java/com/datadog/api/client/v1/model/NotebooksResponsePage.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Pagination metadata returned by the API. */ + +/** + *

Pagination metadata returned by the API.

+ */ @JsonPropertyOrder({ NotebooksResponsePage.JSON_PROPERTY_TOTAL_COUNT, NotebooksResponsePage.JSON_PROPERTY_TOTAL_FILTERED_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NotebooksResponsePage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; @@ -33,44 +53,42 @@ public NotebooksResponsePage totalCount(Long totalCount) { } /** - * The total number of notebooks that would be returned if the request was not filtered by - * start and count parameters. - * + *

The total number of notebooks that would be returned if the request was not filtered by start and count parameters.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } - public NotebooksResponsePage totalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; return this; } /** - * The total number of notebooks returned. - * + *

The total number of notebooks returned.

* @return totalFilteredCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalFilteredCount() { - return totalFilteredCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } public void setTotalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; } - /** Return true if this NotebooksResponsePage object is equal to o. */ + /** + * Return true if this NotebooksResponsePage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +98,13 @@ public boolean equals(Object o) { return false; } NotebooksResponsePage notebooksResponsePage = (NotebooksResponsePage) o; - return Objects.equals(this.totalCount, notebooksResponsePage.totalCount) - && Objects.equals(this.totalFilteredCount, notebooksResponsePage.totalFilteredCount); + return Objects.equals(this.totalCount, notebooksResponsePage.totalCount) && Objects.equals(this.totalFilteredCount, notebooksResponsePage.totalFilteredCount); } + @Override public int hashCode() { - return Objects.hash(totalCount, totalFilteredCount); + return Objects.hash(totalCount,totalFilteredCount); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OnMissingDataOption.java b/src/main/java/com/datadog/api/client/v1/model/OnMissingDataOption.java index b193b62fa06..776c9462ebf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OnMissingDataOption.java +++ b/src/main/java/com/datadog/api/client/v1/model/OnMissingDataOption.java @@ -6,39 +6,57 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Controls how groups or monitors are treated if an evaluation does not return any data points. The - * default option results in different behavior depending on the monitor query type. For monitors - * using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold - * conditions. For monitors using any query type other than Count, for example Gauge, Measure, or - * Rate, the monitor shows the last known status. This option is only available for APM Trace - * Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. + *

Controls how groups or monitors are treated if an evaluation does not return any data points. + * The default option results in different behavior depending on the monitor query type. + * For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. + * For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. + * This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

*/ @JsonSerialize(using = OnMissingDataOption.OnMissingDataOptionSerializer.class) public class OnMissingDataOption { public static final OnMissingDataOption DEFAULT = new OnMissingDataOption("default"); public static final OnMissingDataOption SHOW_NO_DATA = new OnMissingDataOption("show_no_data"); - public static final OnMissingDataOption SHOW_AND_NOTIFY_NO_DATA = - new OnMissingDataOption("show_and_notify_no_data"); + public static final OnMissingDataOption SHOW_AND_NOTIFY_NO_DATA = new OnMissingDataOption("show_and_notify_no_data"); public static final OnMissingDataOption RESOLVE = new OnMissingDataOption("resolve"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("default", "show_no_data", "show_and_notify_no_data", "resolve")); + private static final Set allowedValues = new HashSet(Arrays.asList("default", "show_no_data", "show_and_notify_no_data", "resolve")); private String value; @@ -51,20 +69,18 @@ public boolean isValid() { } public static class OnMissingDataOptionSerializer extends StdSerializer { - public OnMissingDataOptionSerializer(Class t) { - super(t); - } - - public OnMissingDataOptionSerializer() { - this(null); - } - - @Override - public void serialize( - OnMissingDataOption value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public OnMissingDataOptionSerializer(Class t) { + super(t); + } + + public OnMissingDataOptionSerializer() { + this(null); + } + + @Override + public void serialize(OnMissingDataOption value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -76,7 +92,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this OnMissingDataOption object is equal to o. */ + /** + * Return true if this OnMissingDataOption object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +108,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/OrgDowngradedResponse.java b/src/main/java/com/datadog/api/client/v1/model/OrgDowngradedResponse.java index 341fa540808..d557df52d36 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrgDowngradedResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrgDowngradedResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Status of downgrade */ -@JsonPropertyOrder({OrgDowngradedResponse.JSON_PROPERTY_MESSAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Status of downgrade

+ */ +@JsonPropertyOrder({ + OrgDowngradedResponse.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrgDowngradedResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; @@ -27,22 +49,23 @@ public OrgDowngradedResponse message(String message) { } /** - * Information pertaining to the downgraded child organization. - * + *

Information pertaining to the downgraded child organization.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this OrgDowngradedResponse object is equal to o. */ + /** + * Return true if this OrgDowngradedResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.message, orgDowngradedResponse.message); } + @Override public int hashCode() { return Objects.hash(message); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Organization.java b/src/main/java/com/datadog/api/client/v1/model/Organization.java index 44f8a91b920..360a74f1d3c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Organization.java +++ b/src/main/java/com/datadog/api/client/v1/model/Organization.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create, edit, and manage organizations. */ + +/** + *

Create, edit, and manage organizations.

+ */ @JsonPropertyOrder({ Organization.JSON_PROPERTY_BILLING, Organization.JSON_PROPERTY_CREATED, @@ -23,10 +43,10 @@ Organization.JSON_PROPERTY_SUBSCRIPTION, Organization.JSON_PROPERTY_TRIAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Organization { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BILLING = "billing"; private OrganizationBilling billing; @@ -58,99 +78,91 @@ public Organization billing(OrganizationBilling billing) { } /** - * A JSON array of billing type. - * + *

A JSON array of billing type.

* @return billing * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationBilling getBilling() { - return billing; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationBilling getBilling() { + return billing; + } @Deprecated public void setBilling(OrganizationBilling billing) { this.billing = billing; } /** - * Date of the organization creation. - * + *

Date of the organization creation.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreated() { - return created; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreated() { + return created; + } public Organization description(String description) { this.description = description; return this; } /** - * Description of the organization. - * + *

Description of the organization.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public Organization name(String name) { this.name = name; return this; } /** - * The name of the new child-organization, limited to 32 characters. - * + *

The name of the new child-organization, limited to 32 characters.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public Organization publicId(String publicId) { this.publicId = publicId; return this; } /** - * The public_id of the organization you are operating within. - * + *

The public_id of the organization you are operating within.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public Organization settings(OrganizationSettings settings) { this.settings = settings; this.unparsed |= settings.unparsed; @@ -158,21 +170,19 @@ public Organization settings(OrganizationSettings settings) { } /** - * A JSON array of settings. - * + *

A JSON array of settings.

* @return settings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSettings getSettings() { - return settings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSettings getSettings() { + return settings; + } public void setSettings(OrganizationSettings settings) { this.settings = settings; } - public Organization subscription(OrganizationSubscription subscription) { this.subscription = subscription; this.unparsed |= subscription.unparsed; @@ -180,46 +190,45 @@ public Organization subscription(OrganizationSubscription subscription) { } /** - * Subscription definition. - * + *

Subscription definition.

* @return subscription * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSubscription getSubscription() { - return subscription; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSubscription getSubscription() { + return subscription; + } @Deprecated public void setSubscription(OrganizationSubscription subscription) { this.subscription = subscription; } - public Organization trial(Boolean trial) { this.trial = trial; return this; } /** - * Only available for MSP customers. Allows child organizations to be created on a trial plan. - * + *

Only available for MSP customers. Allows child organizations to be created on a trial plan.

* @return trial - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRIAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTrial() { - return trial; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTrial() { + return trial; + } public void setTrial(Boolean trial) { this.trial = trial; } - /** Return true if this Organization object is equal to o. */ + /** + * Return true if this Organization object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -229,20 +238,13 @@ public boolean equals(Object o) { return false; } Organization organization = (Organization) o; - return Objects.equals(this.billing, organization.billing) - && Objects.equals(this.created, organization.created) - && Objects.equals(this.description, organization.description) - && Objects.equals(this.name, organization.name) - && Objects.equals(this.publicId, organization.publicId) - && Objects.equals(this.settings, organization.settings) - && Objects.equals(this.subscription, organization.subscription) - && Objects.equals(this.trial, organization.trial); + return Objects.equals(this.billing, organization.billing) && Objects.equals(this.created, organization.created) && Objects.equals(this.description, organization.description) && Objects.equals(this.name, organization.name) && Objects.equals(this.publicId, organization.publicId) && Objects.equals(this.settings, organization.settings) && Objects.equals(this.subscription, organization.subscription) && Objects.equals(this.trial, organization.trial); } + @Override public int hashCode() { - return Objects.hash( - billing, created, description, name, publicId, settings, subscription, trial); + return Objects.hash(billing,created,description,name,publicId,settings,subscription,trial); } @Override @@ -262,7 +264,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationBilling.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationBilling.java index 22f95f6e83d..70fdd2e2550 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationBilling.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationBilling.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * A JSON array of billing type. - * + *

A JSON array of billing type.

* @deprecated */ @Deprecated -@JsonPropertyOrder({OrganizationBilling.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + OrganizationBilling.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationBilling { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -32,22 +51,23 @@ public OrganizationBilling type(String type) { } /** - * The type of billing. Only parent_billing is supported. - * + *

The type of billing. Only parent_billing is supported.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this OrganizationBilling object is equal to o. */ + /** + * Return true if this OrganizationBilling object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -60,6 +80,7 @@ public boolean equals(Object o) { return Objects.equals(this.type, organizationBilling.type); } + @Override public int hashCode() { return Objects.hash(type); @@ -75,7 +96,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateBody.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateBody.java index 6eb03d6172c..445d58a4e40 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateBody.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing an organization to create. */ + +/** + *

Object describing an organization to create.

+ */ @JsonPropertyOrder({ OrganizationCreateBody.JSON_PROPERTY_BILLING, OrganizationCreateBody.JSON_PROPERTY_NAME, OrganizationCreateBody.JSON_PROPERTY_SUBSCRIPTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationCreateBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BILLING = "billing"; private OrganizationBilling billing; @@ -36,10 +55,9 @@ public OrganizationCreateBody() {} @JsonCreator public OrganizationCreateBody( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public OrganizationCreateBody billing(OrganizationBilling billing) { this.billing = billing; this.unparsed |= billing.unparsed; @@ -47,44 +65,40 @@ public OrganizationCreateBody billing(OrganizationBilling billing) { } /** - * A JSON array of billing type. - * + *

A JSON array of billing type.

* @return billing * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationBilling getBilling() { - return billing; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationBilling getBilling() { + return billing; + } @Deprecated public void setBilling(OrganizationBilling billing) { this.billing = billing; } - public OrganizationCreateBody name(String name) { this.name = name; return this; } /** - * The name of the new child-organization, limited to 32 characters. - * + *

The name of the new child-organization, limited to 32 characters.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public OrganizationCreateBody subscription(OrganizationSubscription subscription) { this.subscription = subscription; this.unparsed |= subscription.unparsed; @@ -92,25 +106,26 @@ public OrganizationCreateBody subscription(OrganizationSubscription subscription } /** - * Subscription definition. - * + *

Subscription definition.

* @return subscription * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSubscription getSubscription() { - return subscription; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSubscription getSubscription() { + return subscription; + } @Deprecated public void setSubscription(OrganizationSubscription subscription) { this.subscription = subscription; } - /** Return true if this OrganizationCreateBody object is equal to o. */ + /** + * Return true if this OrganizationCreateBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +135,13 @@ public boolean equals(Object o) { return false; } OrganizationCreateBody organizationCreateBody = (OrganizationCreateBody) o; - return Objects.equals(this.billing, organizationCreateBody.billing) - && Objects.equals(this.name, organizationCreateBody.name) - && Objects.equals(this.subscription, organizationCreateBody.subscription); + return Objects.equals(this.billing, organizationCreateBody.billing) && Objects.equals(this.name, organizationCreateBody.name) && Objects.equals(this.subscription, organizationCreateBody.subscription); } + @Override public int hashCode() { - return Objects.hash(billing, name, subscription); + return Objects.hash(billing,name,subscription); } @Override @@ -142,7 +156,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateResponse.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateResponse.java index 82ecf786220..5c32f533c83 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationCreateResponse.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response object for an organization creation. */ + +/** + *

Response object for an organization creation.

+ */ @JsonPropertyOrder({ OrganizationCreateResponse.JSON_PROPERTY_API_KEY, OrganizationCreateResponse.JSON_PROPERTY_APPLICATION_KEY, OrganizationCreateResponse.JSON_PROPERTY_ORG, OrganizationCreateResponse.JSON_PROPERTY_USER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationCreateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private ApiKey apiKey; @@ -42,21 +62,19 @@ public OrganizationCreateResponse apiKey(ApiKey apiKey) { } /** - * Datadog API key. - * + *

Datadog API key.

* @return apiKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApiKey getApiKey() { - return apiKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApiKey getApiKey() { + return apiKey; + } public void setApiKey(ApiKey apiKey) { this.apiKey = apiKey; } - public OrganizationCreateResponse applicationKey(ApplicationKey applicationKey) { this.applicationKey = applicationKey; this.unparsed |= applicationKey.unparsed; @@ -64,21 +82,19 @@ public OrganizationCreateResponse applicationKey(ApplicationKey applicationKey) } /** - * An application key with its associated metadata. - * + *

An application key with its associated metadata.

* @return applicationKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApplicationKey getApplicationKey() { - return applicationKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApplicationKey getApplicationKey() { + return applicationKey; + } public void setApplicationKey(ApplicationKey applicationKey) { this.applicationKey = applicationKey; } - public OrganizationCreateResponse org(Organization org) { this.org = org; this.unparsed |= org.unparsed; @@ -86,21 +102,19 @@ public OrganizationCreateResponse org(Organization org) { } /** - * Create, edit, and manage organizations. - * + *

Create, edit, and manage organizations.

* @return org - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Organization getOrg() { - return org; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Organization getOrg() { + return org; + } public void setOrg(Organization org) { this.org = org; } - public OrganizationCreateResponse user(User user) { this.user = user; this.unparsed |= user.unparsed; @@ -108,22 +122,23 @@ public OrganizationCreateResponse user(User user) { } /** - * Create, edit, and disable users. - * + *

Create, edit, and disable users.

* @return user - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public User getUser() { - return user; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public User getUser() { + return user; + } public void setUser(User user) { this.user = user; } - /** Return true if this OrganizationCreateResponse object is equal to o. */ + /** + * Return true if this OrganizationCreateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,15 +148,13 @@ public boolean equals(Object o) { return false; } OrganizationCreateResponse organizationCreateResponse = (OrganizationCreateResponse) o; - return Objects.equals(this.apiKey, organizationCreateResponse.apiKey) - && Objects.equals(this.applicationKey, organizationCreateResponse.applicationKey) - && Objects.equals(this.org, organizationCreateResponse.org) - && Objects.equals(this.user, organizationCreateResponse.user); + return Objects.equals(this.apiKey, organizationCreateResponse.apiKey) && Objects.equals(this.applicationKey, organizationCreateResponse.applicationKey) && Objects.equals(this.org, organizationCreateResponse.org) && Objects.equals(this.user, organizationCreateResponse.user); } + @Override public int hashCode() { - return Objects.hash(apiKey, applicationKey, org, user); + return Objects.hash(apiKey,applicationKey,org,user); } @Override @@ -157,7 +170,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationListResponse.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationListResponse.java index 19292f361ce..7a6accd3157 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response with the list of organizations. */ -@JsonPropertyOrder({OrganizationListResponse.JSON_PROPERTY_ORGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response with the list of organizations.

+ */ +@JsonPropertyOrder({ + OrganizationListResponse.JSON_PROPERTY_ORGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ORGS = "orgs"; private List orgs = null; @@ -30,7 +50,6 @@ public OrganizationListResponse orgs(List orgs) { } return this; } - public OrganizationListResponse addOrgsItem(Organization orgsItem) { if (this.orgs == null) { this.orgs = new ArrayList<>(); @@ -41,22 +60,23 @@ public OrganizationListResponse addOrgsItem(Organization orgsItem) { } /** - * Array of organization objects. - * + *

Array of organization objects.

* @return orgs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOrgs() { - return orgs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getOrgs() { + return orgs; + } public void setOrgs(List orgs) { this.orgs = orgs; } - /** Return true if this OrganizationListResponse object is equal to o. */ + /** + * Return true if this OrganizationListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.orgs, organizationListResponse.orgs); } + @Override public int hashCode() { return Objects.hash(orgs); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationResponse.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationResponse.java index be2d48ba95d..521fb688678 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with an organization. */ -@JsonPropertyOrder({OrganizationResponse.JSON_PROPERTY_ORG}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with an organization.

+ */ +@JsonPropertyOrder({ + OrganizationResponse.JSON_PROPERTY_ORG +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ORG = "org"; private Organization org; @@ -28,22 +50,23 @@ public OrganizationResponse org(Organization org) { } /** - * Create, edit, and manage organizations. - * + *

Create, edit, and manage organizations.

* @return org - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Organization getOrg() { - return org; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Organization getOrg() { + return org; + } public void setOrg(Organization org) { this.org = org; } - /** Return true if this OrganizationResponse object is equal to o. */ + /** + * Return true if this OrganizationResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.org, organizationResponse.org); } + @Override public int hashCode() { return Objects.hash(org); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettings.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettings.java index 6b23acae5a4..8908d798c88 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettings.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettings.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A JSON array of settings. */ + +/** + *

A JSON array of settings.

+ */ @JsonPropertyOrder({ OrganizationSettings.JSON_PROPERTY_PRIVATE_WIDGET_SHARE, OrganizationSettings.JSON_PROPERTY_SAML, @@ -25,22 +45,20 @@ OrganizationSettings.JSON_PROPERTY_SAML_LOGIN_URL, OrganizationSettings.JSON_PROPERTY_SAML_STRICT_MODE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationSettings { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PRIVATE_WIDGET_SHARE = "private_widget_share"; private Boolean privateWidgetShare; public static final String JSON_PROPERTY_SAML = "saml"; private OrganizationSettingsSaml saml; - public static final String JSON_PROPERTY_SAML_AUTOCREATE_ACCESS_ROLE = - "saml_autocreate_access_role"; + public static final String JSON_PROPERTY_SAML_AUTOCREATE_ACCESS_ROLE = "saml_autocreate_access_role"; private AccessRole samlAutocreateAccessRole = AccessRole.STANDARD; - public static final String JSON_PROPERTY_SAML_AUTOCREATE_USERS_DOMAINS = - "saml_autocreate_users_domains"; + public static final String JSON_PROPERTY_SAML_AUTOCREATE_USERS_DOMAINS = "saml_autocreate_users_domains"; private OrganizationSettingsSamlAutocreateUsersDomains samlAutocreateUsersDomains; public static final String JSON_PROPERTY_SAML_CAN_BE_ENABLED = "saml_can_be_enabled"; @@ -52,8 +70,7 @@ public class OrganizationSettings { public static final String JSON_PROPERTY_SAML_IDP_INITIATED_LOGIN = "saml_idp_initiated_login"; private OrganizationSettingsSamlIdpInitiatedLogin samlIdpInitiatedLogin; - public static final String JSON_PROPERTY_SAML_IDP_METADATA_UPLOADED = - "saml_idp_metadata_uploaded"; + public static final String JSON_PROPERTY_SAML_IDP_METADATA_UPLOADED = "saml_idp_metadata_uploaded"; private Boolean samlIdpMetadataUploaded; public static final String JSON_PROPERTY_SAML_LOGIN_URL = "saml_login_url"; @@ -68,21 +85,19 @@ public OrganizationSettings privateWidgetShare(Boolean privateWidgetShare) { } /** - * Whether or not the organization users can share widgets outside of Datadog. - * + *

Whether or not the organization users can share widgets outside of Datadog.

* @return privateWidgetShare - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIVATE_WIDGET_SHARE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPrivateWidgetShare() { - return privateWidgetShare; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVATE_WIDGET_SHARE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPrivateWidgetShare() { + return privateWidgetShare; + } public void setPrivateWidgetShare(Boolean privateWidgetShare) { this.privateWidgetShare = privateWidgetShare; } - public OrganizationSettings saml(OrganizationSettingsSaml saml) { this.saml = saml; this.unparsed |= saml.unparsed; @@ -90,22 +105,20 @@ public OrganizationSettings saml(OrganizationSettingsSaml saml) { } /** - * Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML - * documentation for more information about all SAML settings. - * + *

Set the boolean property enabled to enable or disable single sign on with SAML. + * See the SAML documentation for more information about all SAML settings.

* @return saml - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSettingsSaml getSaml() { - return saml; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSettingsSaml getSaml() { + return saml; + } public void setSaml(OrganizationSettingsSaml saml) { this.saml = saml; } - public OrganizationSettings samlAutocreateAccessRole(AccessRole samlAutocreateAccessRole) { this.samlAutocreateAccessRole = samlAutocreateAccessRole; this.unparsed |= !samlAutocreateAccessRole.isValid(); @@ -113,158 +126,138 @@ public OrganizationSettings samlAutocreateAccessRole(AccessRole samlAutocreateAc } /** - * The access role of the user. Options are st (standard user), - * adm (admin user), or ro (read-only user). - * + *

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).

* @return samlAutocreateAccessRole - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_AUTOCREATE_ACCESS_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AccessRole getSamlAutocreateAccessRole() { - return samlAutocreateAccessRole; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_AUTOCREATE_ACCESS_ROLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AccessRole getSamlAutocreateAccessRole() { + return samlAutocreateAccessRole; + } public void setSamlAutocreateAccessRole(AccessRole samlAutocreateAccessRole) { if (!samlAutocreateAccessRole.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.samlAutocreateAccessRole = samlAutocreateAccessRole; } - - public OrganizationSettings samlAutocreateUsersDomains( - OrganizationSettingsSamlAutocreateUsersDomains samlAutocreateUsersDomains) { + public OrganizationSettings samlAutocreateUsersDomains(OrganizationSettingsSamlAutocreateUsersDomains samlAutocreateUsersDomains) { this.samlAutocreateUsersDomains = samlAutocreateUsersDomains; this.unparsed |= samlAutocreateUsersDomains.unparsed; return this; } /** - * Has two properties, enabled (boolean) and domains, which is a list of - * domains without the @ symbol. - * + *

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

* @return samlAutocreateUsersDomains - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_AUTOCREATE_USERS_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSettingsSamlAutocreateUsersDomains getSamlAutocreateUsersDomains() { - return samlAutocreateUsersDomains; - } - - public void setSamlAutocreateUsersDomains( - OrganizationSettingsSamlAutocreateUsersDomains samlAutocreateUsersDomains) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_AUTOCREATE_USERS_DOMAINS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSettingsSamlAutocreateUsersDomains getSamlAutocreateUsersDomains() { + return samlAutocreateUsersDomains; + } + public void setSamlAutocreateUsersDomains(OrganizationSettingsSamlAutocreateUsersDomains samlAutocreateUsersDomains) { this.samlAutocreateUsersDomains = samlAutocreateUsersDomains; } - public OrganizationSettings samlCanBeEnabled(Boolean samlCanBeEnabled) { this.samlCanBeEnabled = samlCanBeEnabled; return this; } /** - * Whether or not SAML can be enabled for this organization. - * + *

Whether or not SAML can be enabled for this organization.

* @return samlCanBeEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_CAN_BE_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSamlCanBeEnabled() { - return samlCanBeEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_CAN_BE_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSamlCanBeEnabled() { + return samlCanBeEnabled; + } public void setSamlCanBeEnabled(Boolean samlCanBeEnabled) { this.samlCanBeEnabled = samlCanBeEnabled; } - public OrganizationSettings samlIdpEndpoint(String samlIdpEndpoint) { this.samlIdpEndpoint = samlIdpEndpoint; return this; } /** - * Identity provider endpoint for SAML authentication. - * + *

Identity provider endpoint for SAML authentication.

* @return samlIdpEndpoint - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_IDP_ENDPOINT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSamlIdpEndpoint() { - return samlIdpEndpoint; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_IDP_ENDPOINT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSamlIdpEndpoint() { + return samlIdpEndpoint; + } public void setSamlIdpEndpoint(String samlIdpEndpoint) { this.samlIdpEndpoint = samlIdpEndpoint; } - - public OrganizationSettings samlIdpInitiatedLogin( - OrganizationSettingsSamlIdpInitiatedLogin samlIdpInitiatedLogin) { + public OrganizationSettings samlIdpInitiatedLogin(OrganizationSettingsSamlIdpInitiatedLogin samlIdpInitiatedLogin) { this.samlIdpInitiatedLogin = samlIdpInitiatedLogin; this.unparsed |= samlIdpInitiatedLogin.unparsed; return this; } /** - * Has one property enabled (boolean). - * + *

Has one property enabled (boolean).

* @return samlIdpInitiatedLogin - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_IDP_INITIATED_LOGIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSettingsSamlIdpInitiatedLogin getSamlIdpInitiatedLogin() { - return samlIdpInitiatedLogin; - } - - public void setSamlIdpInitiatedLogin( - OrganizationSettingsSamlIdpInitiatedLogin samlIdpInitiatedLogin) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_IDP_INITIATED_LOGIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSettingsSamlIdpInitiatedLogin getSamlIdpInitiatedLogin() { + return samlIdpInitiatedLogin; + } + public void setSamlIdpInitiatedLogin(OrganizationSettingsSamlIdpInitiatedLogin samlIdpInitiatedLogin) { this.samlIdpInitiatedLogin = samlIdpInitiatedLogin; } - public OrganizationSettings samlIdpMetadataUploaded(Boolean samlIdpMetadataUploaded) { this.samlIdpMetadataUploaded = samlIdpMetadataUploaded; return this; } /** - * Whether or not a SAML identity provider metadata file was provided to the Datadog organization. - * + *

Whether or not a SAML identity provider metadata file was provided to the Datadog organization.

* @return samlIdpMetadataUploaded - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_IDP_METADATA_UPLOADED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSamlIdpMetadataUploaded() { - return samlIdpMetadataUploaded; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_IDP_METADATA_UPLOADED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSamlIdpMetadataUploaded() { + return samlIdpMetadataUploaded; + } public void setSamlIdpMetadataUploaded(Boolean samlIdpMetadataUploaded) { this.samlIdpMetadataUploaded = samlIdpMetadataUploaded; } - public OrganizationSettings samlLoginUrl(String samlLoginUrl) { this.samlLoginUrl = samlLoginUrl; return this; } /** - * URL for SAML logging. - * + *

URL for SAML logging.

* @return samlLoginUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_LOGIN_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSamlLoginUrl() { - return samlLoginUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_LOGIN_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSamlLoginUrl() { + return samlLoginUrl; + } public void setSamlLoginUrl(String samlLoginUrl) { this.samlLoginUrl = samlLoginUrl; } - public OrganizationSettings samlStrictMode(OrganizationSettingsSamlStrictMode samlStrictMode) { this.samlStrictMode = samlStrictMode; this.unparsed |= samlStrictMode.unparsed; @@ -272,22 +265,23 @@ public OrganizationSettings samlStrictMode(OrganizationSettingsSamlStrictMode sa } /** - * Has one property enabled (boolean). - * + *

Has one property enabled (boolean).

* @return samlStrictMode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_STRICT_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationSettingsSamlStrictMode getSamlStrictMode() { - return samlStrictMode; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_STRICT_MODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationSettingsSamlStrictMode getSamlStrictMode() { + return samlStrictMode; + } public void setSamlStrictMode(OrganizationSettingsSamlStrictMode samlStrictMode) { this.samlStrictMode = samlStrictMode; } - /** Return true if this OrganizationSettings object is equal to o. */ + /** + * Return true if this OrganizationSettings object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -297,34 +291,13 @@ public boolean equals(Object o) { return false; } OrganizationSettings organizationSettings = (OrganizationSettings) o; - return Objects.equals(this.privateWidgetShare, organizationSettings.privateWidgetShare) - && Objects.equals(this.saml, organizationSettings.saml) - && Objects.equals( - this.samlAutocreateAccessRole, organizationSettings.samlAutocreateAccessRole) - && Objects.equals( - this.samlAutocreateUsersDomains, organizationSettings.samlAutocreateUsersDomains) - && Objects.equals(this.samlCanBeEnabled, organizationSettings.samlCanBeEnabled) - && Objects.equals(this.samlIdpEndpoint, organizationSettings.samlIdpEndpoint) - && Objects.equals(this.samlIdpInitiatedLogin, organizationSettings.samlIdpInitiatedLogin) - && Objects.equals( - this.samlIdpMetadataUploaded, organizationSettings.samlIdpMetadataUploaded) - && Objects.equals(this.samlLoginUrl, organizationSettings.samlLoginUrl) - && Objects.equals(this.samlStrictMode, organizationSettings.samlStrictMode); + return Objects.equals(this.privateWidgetShare, organizationSettings.privateWidgetShare) && Objects.equals(this.saml, organizationSettings.saml) && Objects.equals(this.samlAutocreateAccessRole, organizationSettings.samlAutocreateAccessRole) && Objects.equals(this.samlAutocreateUsersDomains, organizationSettings.samlAutocreateUsersDomains) && Objects.equals(this.samlCanBeEnabled, organizationSettings.samlCanBeEnabled) && Objects.equals(this.samlIdpEndpoint, organizationSettings.samlIdpEndpoint) && Objects.equals(this.samlIdpInitiatedLogin, organizationSettings.samlIdpInitiatedLogin) && Objects.equals(this.samlIdpMetadataUploaded, organizationSettings.samlIdpMetadataUploaded) && Objects.equals(this.samlLoginUrl, organizationSettings.samlLoginUrl) && Objects.equals(this.samlStrictMode, organizationSettings.samlStrictMode); } + @Override public int hashCode() { - return Objects.hash( - privateWidgetShare, - saml, - samlAutocreateAccessRole, - samlAutocreateUsersDomains, - samlCanBeEnabled, - samlIdpEndpoint, - samlIdpInitiatedLogin, - samlIdpMetadataUploaded, - samlLoginUrl, - samlStrictMode); + return Objects.hash(privateWidgetShare,saml,samlAutocreateAccessRole,samlAutocreateUsersDomains,samlCanBeEnabled,samlIdpEndpoint,samlIdpInitiatedLogin,samlIdpMetadataUploaded,samlLoginUrl,samlStrictMode); } @Override @@ -333,20 +306,12 @@ public String toString() { sb.append("class OrganizationSettings {\n"); sb.append(" privateWidgetShare: ").append(toIndentedString(privateWidgetShare)).append("\n"); sb.append(" saml: ").append(toIndentedString(saml)).append("\n"); - sb.append(" samlAutocreateAccessRole: ") - .append(toIndentedString(samlAutocreateAccessRole)) - .append("\n"); - sb.append(" samlAutocreateUsersDomains: ") - .append(toIndentedString(samlAutocreateUsersDomains)) - .append("\n"); + sb.append(" samlAutocreateAccessRole: ").append(toIndentedString(samlAutocreateAccessRole)).append("\n"); + sb.append(" samlAutocreateUsersDomains: ").append(toIndentedString(samlAutocreateUsersDomains)).append("\n"); sb.append(" samlCanBeEnabled: ").append(toIndentedString(samlCanBeEnabled)).append("\n"); sb.append(" samlIdpEndpoint: ").append(toIndentedString(samlIdpEndpoint)).append("\n"); - sb.append(" samlIdpInitiatedLogin: ") - .append(toIndentedString(samlIdpInitiatedLogin)) - .append("\n"); - sb.append(" samlIdpMetadataUploaded: ") - .append(toIndentedString(samlIdpMetadataUploaded)) - .append("\n"); + sb.append(" samlIdpInitiatedLogin: ").append(toIndentedString(samlIdpInitiatedLogin)).append("\n"); + sb.append(" samlIdpMetadataUploaded: ").append(toIndentedString(samlIdpMetadataUploaded)).append("\n"); sb.append(" samlLoginUrl: ").append(toIndentedString(samlLoginUrl)).append("\n"); sb.append(" samlStrictMode: ").append(toIndentedString(samlStrictMode)).append("\n"); sb.append("}"); @@ -354,7 +319,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSaml.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSaml.java index 53d94be0d6c..1925434918f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSaml.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSaml.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML - * documentation for more information about all SAML settings. + *

Set the boolean property enabled to enable or disable single sign on with SAML. + * See the SAML documentation for more information about all SAML settings.

*/ -@JsonPropertyOrder({OrganizationSettingsSaml.JSON_PROPERTY_ENABLED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + OrganizationSettingsSaml.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationSettingsSaml { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; @@ -30,22 +50,23 @@ public OrganizationSettingsSaml enabled(Boolean enabled) { } /** - * Whether or not SAML is enabled for this organization. - * + *

Whether or not SAML is enabled for this organization.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /** Return true if this OrganizationSettingsSaml object is equal to o. */ + /** + * Return true if this OrganizationSettingsSaml object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -58,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.enabled, organizationSettingsSaml.enabled); } + @Override public int hashCode() { return Objects.hash(enabled); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlAutocreateUsersDomains.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlAutocreateUsersDomains.java index 0386f414bba..4830f491eda 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlAutocreateUsersDomains.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlAutocreateUsersDomains.java @@ -6,26 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Has two properties, enabled (boolean) and domains, which is a list of - * domains without the @ symbol. + *

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

*/ @JsonPropertyOrder({ OrganizationSettingsSamlAutocreateUsersDomains.JSON_PROPERTY_DOMAINS, OrganizationSettingsSamlAutocreateUsersDomains.JSON_PROPERTY_ENABLED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationSettingsSamlAutocreateUsersDomains { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DOMAINS = "domains"; private List domains = null; @@ -36,7 +51,6 @@ public OrganizationSettingsSamlAutocreateUsersDomains domains(List domai this.domains = domains; return this; } - public OrganizationSettingsSamlAutocreateUsersDomains addDomainsItem(String domainsItem) { if (this.domains == null) { this.domains = new ArrayList<>(); @@ -46,43 +60,42 @@ public OrganizationSettingsSamlAutocreateUsersDomains addDomainsItem(String doma } /** - * List of domains where the SAML automated user creation is enabled. - * + *

List of domains where the SAML automated user creation is enabled.

* @return domains - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDomains() { - return domains; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAINS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDomains() { + return domains; + } public void setDomains(List domains) { this.domains = domains; } - public OrganizationSettingsSamlAutocreateUsersDomains enabled(Boolean enabled) { this.enabled = enabled; return this; } /** - * Whether or not the automated user creation based on SAML domain is enabled. - * + *

Whether or not the automated user creation based on SAML domain is enabled.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /** Return true if this OrganizationSettingsSamlAutocreateUsersDomains object is equal to o. */ + /** + * Return true if this OrganizationSettingsSamlAutocreateUsersDomains object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,15 +104,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OrganizationSettingsSamlAutocreateUsersDomains organizationSettingsSamlAutocreateUsersDomains = - (OrganizationSettingsSamlAutocreateUsersDomains) o; - return Objects.equals(this.domains, organizationSettingsSamlAutocreateUsersDomains.domains) - && Objects.equals(this.enabled, organizationSettingsSamlAutocreateUsersDomains.enabled); + OrganizationSettingsSamlAutocreateUsersDomains organizationSettingsSamlAutocreateUsersDomains = (OrganizationSettingsSamlAutocreateUsersDomains) o; + return Objects.equals(this.domains, organizationSettingsSamlAutocreateUsersDomains.domains) && Objects.equals(this.enabled, organizationSettingsSamlAutocreateUsersDomains.enabled); } + @Override public int hashCode() { - return Objects.hash(domains, enabled); + return Objects.hash(domains,enabled); } @Override @@ -113,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlIdpInitiatedLogin.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlIdpInitiatedLogin.java index 22f958d26d1..01e597cd770 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlIdpInitiatedLogin.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlIdpInitiatedLogin.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Has one property enabled (boolean). */ -@JsonPropertyOrder({OrganizationSettingsSamlIdpInitiatedLogin.JSON_PROPERTY_ENABLED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Has one property enabled (boolean).

+ */ +@JsonPropertyOrder({ + OrganizationSettingsSamlIdpInitiatedLogin.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationSettingsSamlIdpInitiatedLogin { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; @@ -27,24 +49,24 @@ public OrganizationSettingsSamlIdpInitiatedLogin enabled(Boolean enabled) { } /** - * Whether SAML IdP initiated login is enabled, learn more in the SAML - * documentation. - * + *

Whether SAML IdP initiated login is enabled, learn more + * in the SAML documentation.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /** Return true if this OrganizationSettingsSamlIdpInitiatedLogin object is equal to o. */ + /** + * Return true if this OrganizationSettingsSamlIdpInitiatedLogin object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -53,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OrganizationSettingsSamlIdpInitiatedLogin organizationSettingsSamlIdpInitiatedLogin = - (OrganizationSettingsSamlIdpInitiatedLogin) o; + OrganizationSettingsSamlIdpInitiatedLogin organizationSettingsSamlIdpInitiatedLogin = (OrganizationSettingsSamlIdpInitiatedLogin) o; return Objects.equals(this.enabled, organizationSettingsSamlIdpInitiatedLogin.enabled); } + @Override public int hashCode() { return Objects.hash(enabled); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlStrictMode.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlStrictMode.java index 815f94c15d9..0dd1d9ebb6b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlStrictMode.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationSettingsSamlStrictMode.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Has one property enabled (boolean). */ -@JsonPropertyOrder({OrganizationSettingsSamlStrictMode.JSON_PROPERTY_ENABLED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Has one property enabled (boolean).

+ */ +@JsonPropertyOrder({ + OrganizationSettingsSamlStrictMode.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationSettingsSamlStrictMode { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; @@ -27,24 +49,24 @@ public OrganizationSettingsSamlStrictMode enabled(Boolean enabled) { } /** - * Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn - * more on the SAML - * Strict documentation. - * + *

Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. + * Learn more on the SAML Strict documentation.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /** Return true if this OrganizationSettingsSamlStrictMode object is equal to o. */ + /** + * Return true if this OrganizationSettingsSamlStrictMode object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -53,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OrganizationSettingsSamlStrictMode organizationSettingsSamlStrictMode = - (OrganizationSettingsSamlStrictMode) o; + OrganizationSettingsSamlStrictMode organizationSettingsSamlStrictMode = (OrganizationSettingsSamlStrictMode) o; return Objects.equals(this.enabled, organizationSettingsSamlStrictMode.enabled); } + @Override public int hashCode() { return Objects.hash(enabled); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/OrganizationSubscription.java b/src/main/java/com/datadog/api/client/v1/model/OrganizationSubscription.java index 32217e0fca9..15a10da8307 100644 --- a/src/main/java/com/datadog/api/client/v1/model/OrganizationSubscription.java +++ b/src/main/java/com/datadog/api/client/v1/model/OrganizationSubscription.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Subscription definition. - * + *

Subscription definition.

* @deprecated */ @Deprecated -@JsonPropertyOrder({OrganizationSubscription.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + OrganizationSubscription.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationSubscription { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -32,23 +51,23 @@ public OrganizationSubscription type(String type) { } /** - * The subscription type. Types available are trial, free, and pro - * . - * + *

The subscription type. Types available are trial, free, and pro.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this OrganizationSubscription object is equal to o. */ + /** + * Return true if this OrganizationSubscription object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,6 +80,7 @@ public boolean equals(Object o) { return Objects.equals(this.type, organizationSubscription.type); } + @Override public int hashCode() { return Objects.hash(type); @@ -76,7 +96,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/PagerDutyService.java b/src/main/java/com/datadog/api/client/v1/model/PagerDutyService.java index 58998c80bd7..8ec3ea870ff 100644 --- a/src/main/java/com/datadog/api/client/v1/model/PagerDutyService.java +++ b/src/main/java/com/datadog/api/client/v1/model/PagerDutyService.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The PagerDuty service that is available for integration with Datadog. */ + +/** + *

The PagerDuty service that is available for integration with Datadog.

+ */ @JsonPropertyOrder({ PagerDutyService.JSON_PROPERTY_SERVICE_KEY, PagerDutyService.JSON_PROPERTY_SERVICE_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PagerDutyService { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERVICE_KEY = "service_key"; private String serviceKey; @@ -32,53 +51,51 @@ public PagerDutyService() {} @JsonCreator public PagerDutyService( - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_KEY) String serviceKey, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_NAME) String serviceName) { - this.serviceKey = serviceKey; - this.serviceName = serviceName; + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE_KEY)String serviceKey, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE_NAME)String serviceName) { + this.serviceKey = serviceKey; + this.serviceName = serviceName; } - public PagerDutyService serviceKey(String serviceKey) { this.serviceKey = serviceKey; return this; } /** - * Your service key in PagerDuty. - * + *

Your service key in PagerDuty.

* @return serviceKey - */ - @JsonProperty(JSON_PROPERTY_SERVICE_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getServiceKey() { - return serviceKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getServiceKey() { + return serviceKey; + } public void setServiceKey(String serviceKey) { this.serviceKey = serviceKey; } - public PagerDutyService serviceName(String serviceName) { this.serviceName = serviceName; return this; } /** - * Your service name associated with a service key in PagerDuty. - * + *

Your service name associated with a service key in PagerDuty.

* @return serviceName - */ - @JsonProperty(JSON_PROPERTY_SERVICE_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getServiceName() { - return serviceName; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getServiceName() { + return serviceName; + } public void setServiceName(String serviceName) { this.serviceName = serviceName; } - /** Return true if this PagerDutyService object is equal to o. */ + /** + * Return true if this PagerDutyService object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } PagerDutyService pagerDutyService = (PagerDutyService) o; - return Objects.equals(this.serviceKey, pagerDutyService.serviceKey) - && Objects.equals(this.serviceName, pagerDutyService.serviceName); + return Objects.equals(this.serviceKey, pagerDutyService.serviceKey) && Objects.equals(this.serviceName, pagerDutyService.serviceName); } + @Override public int hashCode() { - return Objects.hash(serviceKey, serviceName); + return Objects.hash(serviceKey,serviceName); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceKey.java b/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceKey.java index 4395ffda326..d24cd8cde29 100644 --- a/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceKey.java +++ b/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceKey.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** PagerDuty service object key. */ -@JsonPropertyOrder({PagerDutyServiceKey.JSON_PROPERTY_SERVICE_KEY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

PagerDuty service object key.

+ */ +@JsonPropertyOrder({ + PagerDutyServiceKey.JSON_PROPERTY_SERVICE_KEY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PagerDutyServiceKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERVICE_KEY = "service_key"; private String serviceKey; @@ -26,31 +47,31 @@ public PagerDutyServiceKey() {} @JsonCreator public PagerDutyServiceKey( - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_KEY) String serviceKey) { - this.serviceKey = serviceKey; + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE_KEY)String serviceKey) { + this.serviceKey = serviceKey; } - public PagerDutyServiceKey serviceKey(String serviceKey) { this.serviceKey = serviceKey; return this; } /** - * Your service key in PagerDuty. - * + *

Your service key in PagerDuty.

* @return serviceKey - */ - @JsonProperty(JSON_PROPERTY_SERVICE_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getServiceKey() { - return serviceKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getServiceKey() { + return serviceKey; + } public void setServiceKey(String serviceKey) { this.serviceKey = serviceKey; } - /** Return true if this PagerDutyServiceKey object is equal to o. */ + /** + * Return true if this PagerDutyServiceKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.serviceKey, pagerDutyServiceKey.serviceKey); } + @Override public int hashCode() { return Objects.hash(serviceKey); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceName.java b/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceName.java index 861574c102b..eff6cd9e3c2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceName.java +++ b/src/main/java/com/datadog/api/client/v1/model/PagerDutyServiceName.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** PagerDuty service object name. */ -@JsonPropertyOrder({PagerDutyServiceName.JSON_PROPERTY_SERVICE_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

PagerDuty service object name.

+ */ +@JsonPropertyOrder({ + PagerDutyServiceName.JSON_PROPERTY_SERVICE_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PagerDutyServiceName { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERVICE_NAME = "service_name"; private String serviceName; @@ -26,31 +47,31 @@ public PagerDutyServiceName() {} @JsonCreator public PagerDutyServiceName( - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_NAME) String serviceName) { - this.serviceName = serviceName; + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE_NAME)String serviceName) { + this.serviceName = serviceName; } - public PagerDutyServiceName serviceName(String serviceName) { this.serviceName = serviceName; return this; } /** - * Your service name associated service key in PagerDuty. - * + *

Your service name associated service key in PagerDuty.

* @return serviceName - */ - @JsonProperty(JSON_PROPERTY_SERVICE_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getServiceName() { - return serviceName; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getServiceName() { + return serviceName; + } public void setServiceName(String serviceName) { this.serviceName = serviceName; } - /** Return true if this PagerDutyServiceName object is equal to o. */ + /** + * Return true if this PagerDutyServiceName object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.serviceName, pagerDutyServiceName.serviceName); } + @Override public int hashCode() { return Objects.hash(serviceName); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Pagination.java b/src/main/java/com/datadog/api/client/v1/model/Pagination.java index ada874f76d1..3b8a29cdef6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Pagination.java +++ b/src/main/java/com/datadog/api/client/v1/model/Pagination.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Pagination object. */ + +/** + *

Pagination object.

+ */ @JsonPropertyOrder({ Pagination.JSON_PROPERTY_TOTAL_COUNT, Pagination.JSON_PROPERTY_TOTAL_FILTERED_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Pagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; @@ -33,43 +53,42 @@ public Pagination totalCount(Long totalCount) { } /** - * Total count. - * + *

Total count.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } - public Pagination totalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; return this; } /** - * Total count of elements matched by the filter. - * + *

Total count of elements matched by the filter.

* @return totalFilteredCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalFilteredCount() { - return totalFilteredCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } public void setTotalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; } - /** Return true if this Pagination object is equal to o. */ + /** + * Return true if this Pagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } Pagination pagination = (Pagination) o; - return Objects.equals(this.totalCount, pagination.totalCount) - && Objects.equals(this.totalFilteredCount, pagination.totalFilteredCount); + return Objects.equals(this.totalCount, pagination.totalCount) && Objects.equals(this.totalFilteredCount, pagination.totalFilteredCount); } + @Override public int hashCode() { - return Objects.hash(totalCount, totalFilteredCount); + return Objects.hash(totalCount,totalFilteredCount); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ProcessQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ProcessQueryDefinition.java index 993c266a534..2b910df7957 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ProcessQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ProcessQueryDefinition.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The process query to use in the widget. */ + +/** + *

The process query to use in the widget.

+ */ @JsonPropertyOrder({ ProcessQueryDefinition.JSON_PROPERTY_FILTER_BY, ProcessQueryDefinition.JSON_PROPERTY_LIMIT, ProcessQueryDefinition.JSON_PROPERTY_METRIC, ProcessQueryDefinition.JSON_PROPERTY_SEARCH_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessQueryDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER_BY = "filter_by"; private List filterBy = null; @@ -42,15 +59,13 @@ public ProcessQueryDefinition() {} @JsonCreator public ProcessQueryDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_METRIC) String metric) { - this.metric = metric; + @JsonProperty(required=true, value=JSON_PROPERTY_METRIC)String metric) { + this.metric = metric; } - public ProcessQueryDefinition filterBy(List filterBy) { this.filterBy = filterBy; return this; } - public ProcessQueryDefinition addFilterByItem(String filterByItem) { if (this.filterBy == null) { this.filterBy = new ArrayList<>(); @@ -60,84 +75,80 @@ public ProcessQueryDefinition addFilterByItem(String filterByItem) { } /** - * List of processes. - * + *

List of processes.

* @return filterBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilterBy() { - return filterBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilterBy() { + return filterBy; + } public void setFilterBy(List filterBy) { this.filterBy = filterBy; } - public ProcessQueryDefinition limit(Long limit) { this.limit = limit; return this; } /** - * Max number of items in the filter list. minimum: 0 - * + *

Max number of items in the filter list.

+ * minimum: 0 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public ProcessQueryDefinition metric(String metric) { this.metric = metric; return this; } /** - * Your chosen metric. - * + *

Your chosen metric.

* @return metric - */ - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMetric() { - return metric; - } - + **/ + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public ProcessQueryDefinition searchBy(String searchBy) { this.searchBy = searchBy; return this; } /** - * Your chosen search term. - * + *

Your chosen search term.

* @return searchBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEARCH_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSearchBy() { - return searchBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSearchBy() { + return searchBy; + } public void setSearchBy(String searchBy) { this.searchBy = searchBy; } - /** Return true if this ProcessQueryDefinition object is equal to o. */ + /** + * Return true if this ProcessQueryDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,15 +158,13 @@ public boolean equals(Object o) { return false; } ProcessQueryDefinition processQueryDefinition = (ProcessQueryDefinition) o; - return Objects.equals(this.filterBy, processQueryDefinition.filterBy) - && Objects.equals(this.limit, processQueryDefinition.limit) - && Objects.equals(this.metric, processQueryDefinition.metric) - && Objects.equals(this.searchBy, processQueryDefinition.searchBy); + return Objects.equals(this.filterBy, processQueryDefinition.filterBy) && Objects.equals(this.limit, processQueryDefinition.limit) && Objects.equals(this.metric, processQueryDefinition.metric) && Objects.equals(this.searchBy, processQueryDefinition.searchBy); } + @Override public int hashCode() { - return Objects.hash(filterBy, limit, metric, searchBy); + return Objects.hash(filterBy,limit,metric,searchBy); } @Override @@ -171,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/QuerySortOrder.java b/src/main/java/com/datadog/api/client/v1/model/QuerySortOrder.java index a90af94f143..97df8718a06 100644 --- a/src/main/java/com/datadog/api/client/v1/model/QuerySortOrder.java +++ b/src/main/java/com/datadog/api/client/v1/model/QuerySortOrder.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Direction of sort. */ +/** + *

Direction of sort.

+ */ @JsonSerialize(using = QuerySortOrder.QuerySortOrderSerializer.class) public class QuerySortOrder { public static final QuerySortOrder ASC = new QuerySortOrder("asc"); public static final QuerySortOrder DESC = new QuerySortOrder("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class QuerySortOrderSerializer extends StdSerializer { - public QuerySortOrderSerializer(Class t) { - super(t); - } - - public QuerySortOrderSerializer() { - this(null); - } - - @Override - public void serialize(QuerySortOrder value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public QuerySortOrderSerializer(Class t) { + super(t); + } + + public QuerySortOrderSerializer() { + this(null); + } + + @Override + public void serialize(QuerySortOrder value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this QuerySortOrder object is equal to o. */ + /** + * Return true if this QuerySortOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinition.java index 3f385b8e260..0f523c7e3f2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Query values display the current value of a given metric, APM, or log query. */ +/** + *

Query values display the current value of a given metric, APM, or log query.

+ */ @JsonPropertyOrder({ QueryValueWidgetDefinition.JSON_PROPERTY_AUTOSCALE, QueryValueWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -30,10 +47,10 @@ QueryValueWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, QueryValueWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class QueryValueWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTOSCALE = "autoscale"; private Boolean autoscale; @@ -74,36 +91,31 @@ public QueryValueWidgetDefinition() {} @JsonCreator public QueryValueWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - QueryValueWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)QueryValueWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public QueryValueWidgetDefinition autoscale(Boolean autoscale) { this.autoscale = autoscale; return this; } /** - * Whether to use auto-scaling or not. - * + *

Whether to use auto-scaling or not.

* @return autoscale - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTOSCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAutoscale() { - return autoscale; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTOSCALE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutoscale() { + return autoscale; + } public void setAutoscale(Boolean autoscale) { this.autoscale = autoscale; } - public QueryValueWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -111,7 +123,6 @@ public QueryValueWidgetDefinition customLinks(List customLinks } return this; } - public QueryValueWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -122,63 +133,57 @@ public QueryValueWidgetDefinition addCustomLinksItem(WidgetCustomLink customLink } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public QueryValueWidgetDefinition customUnit(String customUnit) { this.customUnit = customUnit; return this; } /** - * Display a unit of your choice on the widget. - * + *

Display a unit of your choice on the widget.

* @return customUnit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomUnit() { - return customUnit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomUnit() { + return customUnit; + } public void setCustomUnit(String customUnit) { this.customUnit = customUnit; } - public QueryValueWidgetDefinition precision(Long precision) { this.precision = precision; return this; } /** - * Number of decimals to show. If not defined, the widget uses the raw value. - * + *

Number of decimals to show. If not defined, the widget uses the raw value.

* @return precision - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPrecision() { - return precision; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRECISION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPrecision() { + return precision; + } public void setPrecision(Long precision) { this.precision = precision; } - public QueryValueWidgetDefinition requests(List requests) { this.requests = requests; for (QueryValueWidgetRequest item : requests) { @@ -186,7 +191,6 @@ public QueryValueWidgetDefinition requests(List request } return this; } - public QueryValueWidgetDefinition addRequestsItem(QueryValueWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -194,20 +198,18 @@ public QueryValueWidgetDefinition addRequestsItem(QueryValueWidgetRequest reques } /** - * Widget definition. - * + *

Widget definition.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public QueryValueWidgetDefinition textAlign(WidgetTextAlign textAlign) { this.textAlign = textAlign; this.unparsed |= !textAlign.isValid(); @@ -215,24 +217,22 @@ public QueryValueWidgetDefinition textAlign(WidgetTextAlign textAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return textAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTextAlign() { - return textAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTextAlign() { + return textAlign; + } public void setTextAlign(WidgetTextAlign textAlign) { if (!textAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.textAlign = textAlign; } - public QueryValueWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -240,65 +240,58 @@ public QueryValueWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - - public QueryValueWidgetDefinition timeseriesBackground( - TimeseriesBackground timeseriesBackground) { + public QueryValueWidgetDefinition timeseriesBackground(TimeseriesBackground timeseriesBackground) { this.timeseriesBackground = timeseriesBackground; this.unparsed |= timeseriesBackground.unparsed; return this; } /** - * Set a timeseries on the widget background. - * + *

Set a timeseries on the widget background.

* @return timeseriesBackground - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESERIES_BACKGROUND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeseriesBackground getTimeseriesBackground() { - return timeseriesBackground; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESERIES_BACKGROUND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TimeseriesBackground getTimeseriesBackground() { + return timeseriesBackground; + } public void setTimeseriesBackground(TimeseriesBackground timeseriesBackground) { this.timeseriesBackground = timeseriesBackground; } - public QueryValueWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public QueryValueWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -306,45 +299,41 @@ public QueryValueWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public QueryValueWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public QueryValueWidgetDefinition type(QueryValueWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -352,24 +341,25 @@ public QueryValueWidgetDefinition type(QueryValueWidgetDefinitionType type) { } /** - * Type of the query value widget. - * + *

Type of the query value widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public QueryValueWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public QueryValueWidgetDefinitionType getType() { + return type; + } public void setType(QueryValueWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this QueryValueWidgetDefinition object is equal to o. */ + /** + * Return true if this QueryValueWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -379,36 +369,13 @@ public boolean equals(Object o) { return false; } QueryValueWidgetDefinition queryValueWidgetDefinition = (QueryValueWidgetDefinition) o; - return Objects.equals(this.autoscale, queryValueWidgetDefinition.autoscale) - && Objects.equals(this.customLinks, queryValueWidgetDefinition.customLinks) - && Objects.equals(this.customUnit, queryValueWidgetDefinition.customUnit) - && Objects.equals(this.precision, queryValueWidgetDefinition.precision) - && Objects.equals(this.requests, queryValueWidgetDefinition.requests) - && Objects.equals(this.textAlign, queryValueWidgetDefinition.textAlign) - && Objects.equals(this.time, queryValueWidgetDefinition.time) - && Objects.equals( - this.timeseriesBackground, queryValueWidgetDefinition.timeseriesBackground) - && Objects.equals(this.title, queryValueWidgetDefinition.title) - && Objects.equals(this.titleAlign, queryValueWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, queryValueWidgetDefinition.titleSize) - && Objects.equals(this.type, queryValueWidgetDefinition.type); + return Objects.equals(this.autoscale, queryValueWidgetDefinition.autoscale) && Objects.equals(this.customLinks, queryValueWidgetDefinition.customLinks) && Objects.equals(this.customUnit, queryValueWidgetDefinition.customUnit) && Objects.equals(this.precision, queryValueWidgetDefinition.precision) && Objects.equals(this.requests, queryValueWidgetDefinition.requests) && Objects.equals(this.textAlign, queryValueWidgetDefinition.textAlign) && Objects.equals(this.time, queryValueWidgetDefinition.time) && Objects.equals(this.timeseriesBackground, queryValueWidgetDefinition.timeseriesBackground) && Objects.equals(this.title, queryValueWidgetDefinition.title) && Objects.equals(this.titleAlign, queryValueWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, queryValueWidgetDefinition.titleSize) && Objects.equals(this.type, queryValueWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - autoscale, - customLinks, - customUnit, - precision, - requests, - textAlign, - time, - timeseriesBackground, - title, - titleAlign, - titleSize, - type); + return Objects.hash(autoscale,customLinks,customUnit,precision,requests,textAlign,time,timeseriesBackground,title,titleAlign,titleSize,type); } @Override @@ -422,9 +389,7 @@ public String toString() { sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); sb.append(" textAlign: ").append(toIndentedString(textAlign)).append("\n"); sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" timeseriesBackground: ") - .append(toIndentedString(timeseriesBackground)) - .append("\n"); + sb.append(" timeseriesBackground: ").append(toIndentedString(timeseriesBackground)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" titleAlign: ").append(toIndentedString(titleAlign)).append("\n"); sb.append(" titleSize: ").append(toIndentedString(titleSize)).append("\n"); @@ -434,7 +399,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinitionType.java index afce25f3482..11f03e3d144 100644 --- a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the query value widget. */ -@JsonSerialize( - using = QueryValueWidgetDefinitionType.QueryValueWidgetDefinitionTypeSerializer.class) +/** + *

Type of the query value widget.

+ */ +@JsonSerialize(using = QueryValueWidgetDefinitionType.QueryValueWidgetDefinitionTypeSerializer.class) public class QueryValueWidgetDefinitionType { - public static final QueryValueWidgetDefinitionType QUERY_VALUE = - new QueryValueWidgetDefinitionType("query_value"); + public static final QueryValueWidgetDefinitionType QUERY_VALUE = new QueryValueWidgetDefinitionType("query_value"); - private static final Set allowedValues = - new HashSet(Arrays.asList("query_value")); + private static final Set allowedValues = new HashSet(Arrays.asList("query_value")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class QueryValueWidgetDefinitionTypeSerializer - extends StdSerializer { - public QueryValueWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class QueryValueWidgetDefinitionTypeSerializer extends StdSerializer { + public QueryValueWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public QueryValueWidgetDefinitionTypeSerializer() { - this(null); - } + public QueryValueWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - QueryValueWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(QueryValueWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this QueryValueWidgetDefinitionType object is equal to o. */ + /** + * Return true if this QueryValueWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java index 5ed06b931e6..2088ae6d03f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated query value widget. */ + +/** + *

Updated query value widget.

+ */ @JsonPropertyOrder({ QueryValueWidgetRequest.JSON_PROPERTY_AGGREGATOR, QueryValueWidgetRequest.JSON_PROPERTY_APM_QUERY, @@ -32,10 +50,10 @@ QueryValueWidgetRequest.JSON_PROPERTY_RUM_QUERY, QueryValueWidgetRequest.JSON_PROPERTY_SECURITY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class QueryValueWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATOR = "aggregator"; private WidgetAggregator aggregator; @@ -88,24 +106,22 @@ public QueryValueWidgetRequest aggregator(WidgetAggregator aggregator) { } /** - * Aggregator used for the request. - * + *

Aggregator used for the request.

* @return aggregator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAggregator getAggregator() { - return aggregator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAggregator getAggregator() { + return aggregator; + } public void setAggregator(WidgetAggregator aggregator) { if (!aggregator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregator = aggregator; } - public QueryValueWidgetRequest apmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; this.unparsed |= apmQuery.unparsed; @@ -113,21 +129,19 @@ public QueryValueWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public QueryValueWidgetRequest auditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; this.unparsed |= auditQuery.unparsed; @@ -135,32 +149,27 @@ public QueryValueWidgetRequest auditQuery(LogQueryDefinition auditQuery) { } /** - * The log query. - * + *

The log query.

* @return auditQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getAuditQuery() { - return auditQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getAuditQuery() { + return auditQuery; + } public void setAuditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; } - - public QueryValueWidgetRequest conditionalFormats( - List conditionalFormats) { + public QueryValueWidgetRequest conditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; for (WidgetConditionalFormat item : conditionalFormats) { this.unparsed |= item.unparsed; } return this; } - - public QueryValueWidgetRequest addConditionalFormatsItem( - WidgetConditionalFormat conditionalFormatsItem) { + public QueryValueWidgetRequest addConditionalFormatsItem(WidgetConditionalFormat conditionalFormatsItem) { if (this.conditionalFormats == null) { this.conditionalFormats = new ArrayList<>(); } @@ -170,21 +179,19 @@ public QueryValueWidgetRequest addConditionalFormatsItem( } /** - * List of conditional formats. - * + *

List of conditional formats.

* @return conditionalFormats - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConditionalFormats() { - return conditionalFormats; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConditionalFormats() { + return conditionalFormats; + } public void setConditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; } - public QueryValueWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -192,21 +199,19 @@ public QueryValueWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public QueryValueWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -214,7 +219,6 @@ public QueryValueWidgetRequest formulas(List formulas) { } return this; } - public QueryValueWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -225,21 +229,19 @@ public QueryValueWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public QueryValueWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -247,21 +249,19 @@ public QueryValueWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public QueryValueWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -269,21 +269,19 @@ public QueryValueWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public QueryValueWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -291,21 +289,19 @@ public QueryValueWidgetRequest processQuery(ProcessQueryDefinition processQuery) } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public QueryValueWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -313,42 +309,38 @@ public QueryValueWidgetRequest profileMetricsQuery(LogQueryDefinition profileMet } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public QueryValueWidgetRequest q(String q) { this.q = q; return this; } /** - * TODO. - * + *

TODO.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public QueryValueWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -356,7 +348,6 @@ public QueryValueWidgetRequest queries(List q } return this; } - public QueryValueWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -367,21 +358,19 @@ public QueryValueWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public QueryValueWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -389,24 +378,22 @@ public QueryValueWidgetRequest responseFormat(FormulaAndFunctionResponseFormat r } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public QueryValueWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -414,21 +401,19 @@ public QueryValueWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public QueryValueWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -436,22 +421,23 @@ public QueryValueWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - /** Return true if this QueryValueWidgetRequest object is equal to o. */ + /** + * Return true if this QueryValueWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -461,41 +447,13 @@ public boolean equals(Object o) { return false; } QueryValueWidgetRequest queryValueWidgetRequest = (QueryValueWidgetRequest) o; - return Objects.equals(this.aggregator, queryValueWidgetRequest.aggregator) - && Objects.equals(this.apmQuery, queryValueWidgetRequest.apmQuery) - && Objects.equals(this.auditQuery, queryValueWidgetRequest.auditQuery) - && Objects.equals(this.conditionalFormats, queryValueWidgetRequest.conditionalFormats) - && Objects.equals(this.eventQuery, queryValueWidgetRequest.eventQuery) - && Objects.equals(this.formulas, queryValueWidgetRequest.formulas) - && Objects.equals(this.logQuery, queryValueWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, queryValueWidgetRequest.networkQuery) - && Objects.equals(this.processQuery, queryValueWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, queryValueWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, queryValueWidgetRequest.q) - && Objects.equals(this.queries, queryValueWidgetRequest.queries) - && Objects.equals(this.responseFormat, queryValueWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, queryValueWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, queryValueWidgetRequest.securityQuery); + return Objects.equals(this.aggregator, queryValueWidgetRequest.aggregator) && Objects.equals(this.apmQuery, queryValueWidgetRequest.apmQuery) && Objects.equals(this.auditQuery, queryValueWidgetRequest.auditQuery) && Objects.equals(this.conditionalFormats, queryValueWidgetRequest.conditionalFormats) && Objects.equals(this.eventQuery, queryValueWidgetRequest.eventQuery) && Objects.equals(this.formulas, queryValueWidgetRequest.formulas) && Objects.equals(this.logQuery, queryValueWidgetRequest.logQuery) && Objects.equals(this.networkQuery, queryValueWidgetRequest.networkQuery) && Objects.equals(this.processQuery, queryValueWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, queryValueWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, queryValueWidgetRequest.q) && Objects.equals(this.queries, queryValueWidgetRequest.queries) && Objects.equals(this.responseFormat, queryValueWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, queryValueWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, queryValueWidgetRequest.securityQuery); } + @Override public int hashCode() { - return Objects.hash( - aggregator, - apmQuery, - auditQuery, - conditionalFormats, - eventQuery, - formulas, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - queries, - responseFormat, - rumQuery, - securityQuery); + return Objects.hash(aggregator,apmQuery,auditQuery,conditionalFormats,eventQuery,formulas,logQuery,networkQuery,processQuery,profileMetricsQuery,q,queries,responseFormat,rumQuery,securityQuery); } @Override @@ -511,9 +469,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); @@ -524,7 +480,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ReferenceTableLogsLookupProcessor.java b/src/main/java/com/datadog/api/client/v1/model/ReferenceTableLogsLookupProcessor.java index f1ec7f94732..ceaba591b66 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ReferenceTableLogsLookupProcessor.java +++ b/src/main/java/com/datadog/api/client/v1/model/ReferenceTableLogsLookupProcessor.java @@ -6,19 +6,38 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Note: Reference Tables are in public beta. Use the Lookup Processor to define a - * mapping between a log attribute and a human readable value saved in a Reference Table. For - * example, you can use the Lookup Processor to map an internal service ID into a human readable - * service name. Alternatively, you could also use it to check if the MAC address that just - * attempted to connect to the production environment belongs to your list of stolen machines. + *

Note: Reference Tables are in public beta. + * Use the Lookup Processor to define a mapping between a log attribute + * and a human readable value saved in a Reference Table. + * For example, you can use the Lookup Processor to map an internal service ID + * into a human readable service name. Alternatively, you could also use it to check + * if the MAC address that just attempted to connect to the production + * environment belongs to your list of stolen machines.

*/ @JsonPropertyOrder({ ReferenceTableLogsLookupProcessor.JSON_PROPERTY_IS_ENABLED, @@ -28,10 +47,10 @@ ReferenceTableLogsLookupProcessor.JSON_PROPERTY_TARGET, ReferenceTableLogsLookupProcessor.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ReferenceTableLogsLookupProcessor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; private Boolean isEnabled = false; @@ -54,121 +73,108 @@ public ReferenceTableLogsLookupProcessor() {} @JsonCreator public ReferenceTableLogsLookupProcessor( - @JsonProperty(required = true, value = JSON_PROPERTY_LOOKUP_ENRICHMENT_TABLE) - String lookupEnrichmentTable, - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) String target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsLookupProcessorType type) { - this.lookupEnrichmentTable = lookupEnrichmentTable; - this.source = source; - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_LOOKUP_ENRICHMENT_TABLE)String lookupEnrichmentTable, + @JsonProperty(required=true, value=JSON_PROPERTY_SOURCE)String source, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)String target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsLookupProcessorType type) { + this.lookupEnrichmentTable = lookupEnrichmentTable; + this.source = source; + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public ReferenceTableLogsLookupProcessor isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the processor is enabled. - * + *

Whether or not the processor is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public ReferenceTableLogsLookupProcessor lookupEnrichmentTable(String lookupEnrichmentTable) { this.lookupEnrichmentTable = lookupEnrichmentTable; return this; } /** - * Name of the Reference Table for the source attribute and their associated target attribute - * values. - * + *

Name of the Reference Table for the source attribute and their associated target attribute values.

* @return lookupEnrichmentTable - */ - @JsonProperty(JSON_PROPERTY_LOOKUP_ENRICHMENT_TABLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getLookupEnrichmentTable() { - return lookupEnrichmentTable; - } - + **/ + @JsonProperty(JSON_PROPERTY_LOOKUP_ENRICHMENT_TABLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getLookupEnrichmentTable() { + return lookupEnrichmentTable; + } public void setLookupEnrichmentTable(String lookupEnrichmentTable) { this.lookupEnrichmentTable = lookupEnrichmentTable; } - public ReferenceTableLogsLookupProcessor name(String name) { this.name = name; return this; } /** - * Name of the processor. - * + *

Name of the processor.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ReferenceTableLogsLookupProcessor source(String source) { this.source = source; return this; } /** - * Source attribute used to perform the lookup. - * + *

Source attribute used to perform the lookup.

* @return source - */ - @JsonProperty(JSON_PROPERTY_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSource() { - return source; - } - + **/ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } public void setSource(String source) { this.source = source; } - public ReferenceTableLogsLookupProcessor target(String target) { this.target = target; return this; } /** - * Name of the attribute that contains the corresponding value in the mapping list. - * + *

Name of the attribute that contains the corresponding value in the mapping list.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTarget() { + return target; + } public void setTarget(String target) { this.target = target; } - public ReferenceTableLogsLookupProcessor type(LogsLookupProcessorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -176,24 +182,25 @@ public ReferenceTableLogsLookupProcessor type(LogsLookupProcessorType type) { } /** - * Type of logs lookup processor. - * + *

Type of logs lookup processor.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsLookupProcessorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsLookupProcessorType getType() { + return type; + } public void setType(LogsLookupProcessorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ReferenceTableLogsLookupProcessor object is equal to o. */ + /** + * Return true if this ReferenceTableLogsLookupProcessor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -202,20 +209,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReferenceTableLogsLookupProcessor referenceTableLogsLookupProcessor = - (ReferenceTableLogsLookupProcessor) o; - return Objects.equals(this.isEnabled, referenceTableLogsLookupProcessor.isEnabled) - && Objects.equals( - this.lookupEnrichmentTable, referenceTableLogsLookupProcessor.lookupEnrichmentTable) - && Objects.equals(this.name, referenceTableLogsLookupProcessor.name) - && Objects.equals(this.source, referenceTableLogsLookupProcessor.source) - && Objects.equals(this.target, referenceTableLogsLookupProcessor.target) - && Objects.equals(this.type, referenceTableLogsLookupProcessor.type); + ReferenceTableLogsLookupProcessor referenceTableLogsLookupProcessor = (ReferenceTableLogsLookupProcessor) o; + return Objects.equals(this.isEnabled, referenceTableLogsLookupProcessor.isEnabled) && Objects.equals(this.lookupEnrichmentTable, referenceTableLogsLookupProcessor.lookupEnrichmentTable) && Objects.equals(this.name, referenceTableLogsLookupProcessor.name) && Objects.equals(this.source, referenceTableLogsLookupProcessor.source) && Objects.equals(this.target, referenceTableLogsLookupProcessor.target) && Objects.equals(this.type, referenceTableLogsLookupProcessor.type); } + @Override public int hashCode() { - return Objects.hash(isEnabled, lookupEnrichmentTable, name, source, target, type); + return Objects.hash(isEnabled,lookupEnrichmentTable,name,source,target,type); } @Override @@ -223,9 +224,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReferenceTableLogsLookupProcessor {\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); - sb.append(" lookupEnrichmentTable: ") - .append(toIndentedString(lookupEnrichmentTable)) - .append("\n"); + sb.append(" lookupEnrichmentTable: ").append(toIndentedString(lookupEnrichmentTable)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" target: ").append(toIndentedString(target)).append("\n"); @@ -235,7 +234,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ResponseMetaAttributes.java b/src/main/java/com/datadog/api/client/v1/model/ResponseMetaAttributes.java index f00cb40e5a0..53623116dfa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ResponseMetaAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/ResponseMetaAttributes.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing meta attributes of response. */ -@JsonPropertyOrder({ResponseMetaAttributes.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing meta attributes of response.

+ */ +@JsonPropertyOrder({ + ResponseMetaAttributes.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ResponseMetaAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private Pagination page; @@ -28,22 +50,23 @@ public ResponseMetaAttributes page(Pagination page) { } /** - * Pagination object. - * + *

Pagination object.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Pagination getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Pagination getPage() { + return page; + } public void setPage(Pagination page) { this.page = page; } - /** Return true if this ResponseMetaAttributes object is equal to o. */ + /** + * Return true if this ResponseMetaAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.page, responseMetaAttributes.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinition.java index 968b1e467f3..e9c1f20c67d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Run workflow is widget that allows you to run a workflow from a dashboard. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Run workflow is widget that allows you to run a workflow from a dashboard.

+ */ @JsonPropertyOrder({ RunWorkflowWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, RunWorkflowWidgetDefinition.JSON_PROPERTY_INPUTS, @@ -26,10 +43,10 @@ RunWorkflowWidgetDefinition.JSON_PROPERTY_TYPE, RunWorkflowWidgetDefinition.JSON_PROPERTY_WORKFLOW_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RunWorkflowWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -58,14 +75,12 @@ public RunWorkflowWidgetDefinition() {} @JsonCreator public RunWorkflowWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - RunWorkflowWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_WORKFLOW_ID) String workflowId) { - this.type = type; - this.unparsed |= !type.isValid(); - this.workflowId = workflowId; + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RunWorkflowWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_WORKFLOW_ID)String workflowId) { + this.type = type; + this.unparsed |= !type.isValid(); + this.workflowId = workflowId; } - public RunWorkflowWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -73,7 +88,6 @@ public RunWorkflowWidgetDefinition customLinks(List customLink } return this; } - public RunWorkflowWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -84,21 +98,19 @@ public RunWorkflowWidgetDefinition addCustomLinksItem(WidgetCustomLink customLin } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public RunWorkflowWidgetDefinition inputs(List inputs) { this.inputs = inputs; for (RunWorkflowWidgetInput item : inputs) { @@ -106,7 +118,6 @@ public RunWorkflowWidgetDefinition inputs(List inputs) { } return this; } - public RunWorkflowWidgetDefinition addInputsItem(RunWorkflowWidgetInput inputsItem) { if (this.inputs == null) { this.inputs = new ArrayList<>(); @@ -117,21 +128,19 @@ public RunWorkflowWidgetDefinition addInputsItem(RunWorkflowWidgetInput inputsIt } /** - * Array of workflow inputs to map to dashboard template variables. - * + *

Array of workflow inputs to map to dashboard template variables.

* @return inputs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INPUTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInputs() { - return inputs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getInputs() { + return inputs; + } public void setInputs(List inputs) { this.inputs = inputs; } - public RunWorkflowWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -139,42 +148,38 @@ public RunWorkflowWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public RunWorkflowWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public RunWorkflowWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -182,45 +187,41 @@ public RunWorkflowWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public RunWorkflowWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public RunWorkflowWidgetDefinition type(RunWorkflowWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -228,44 +229,43 @@ public RunWorkflowWidgetDefinition type(RunWorkflowWidgetDefinitionType type) { } /** - * Type of the run workflow widget. - * + *

Type of the run workflow widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RunWorkflowWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RunWorkflowWidgetDefinitionType getType() { + return type; + } public void setType(RunWorkflowWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public RunWorkflowWidgetDefinition workflowId(String workflowId) { this.workflowId = workflowId; return this; } /** - * Workflow id. - * + *

Workflow id.

* @return workflowId - */ - @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getWorkflowId() { - return workflowId; - } - + **/ + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getWorkflowId() { + return workflowId; + } public void setWorkflowId(String workflowId) { this.workflowId = workflowId; } - /** Return true if this RunWorkflowWidgetDefinition object is equal to o. */ + /** + * Return true if this RunWorkflowWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -275,19 +275,13 @@ public boolean equals(Object o) { return false; } RunWorkflowWidgetDefinition runWorkflowWidgetDefinition = (RunWorkflowWidgetDefinition) o; - return Objects.equals(this.customLinks, runWorkflowWidgetDefinition.customLinks) - && Objects.equals(this.inputs, runWorkflowWidgetDefinition.inputs) - && Objects.equals(this.time, runWorkflowWidgetDefinition.time) - && Objects.equals(this.title, runWorkflowWidgetDefinition.title) - && Objects.equals(this.titleAlign, runWorkflowWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, runWorkflowWidgetDefinition.titleSize) - && Objects.equals(this.type, runWorkflowWidgetDefinition.type) - && Objects.equals(this.workflowId, runWorkflowWidgetDefinition.workflowId); + return Objects.equals(this.customLinks, runWorkflowWidgetDefinition.customLinks) && Objects.equals(this.inputs, runWorkflowWidgetDefinition.inputs) && Objects.equals(this.time, runWorkflowWidgetDefinition.time) && Objects.equals(this.title, runWorkflowWidgetDefinition.title) && Objects.equals(this.titleAlign, runWorkflowWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, runWorkflowWidgetDefinition.titleSize) && Objects.equals(this.type, runWorkflowWidgetDefinition.type) && Objects.equals(this.workflowId, runWorkflowWidgetDefinition.workflowId); } + @Override public int hashCode() { - return Objects.hash(customLinks, inputs, time, title, titleAlign, titleSize, type, workflowId); + return Objects.hash(customLinks,inputs,time,title,titleAlign,titleSize,type,workflowId); } @Override @@ -307,7 +301,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinitionType.java index 6f3ee0d0d2f..827bfb77c6f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the run workflow widget. */ -@JsonSerialize( - using = RunWorkflowWidgetDefinitionType.RunWorkflowWidgetDefinitionTypeSerializer.class) +/** + *

Type of the run workflow widget.

+ */ +@JsonSerialize(using = RunWorkflowWidgetDefinitionType.RunWorkflowWidgetDefinitionTypeSerializer.class) public class RunWorkflowWidgetDefinitionType { - public static final RunWorkflowWidgetDefinitionType RUN_WORKFLOW = - new RunWorkflowWidgetDefinitionType("run_workflow"); + public static final RunWorkflowWidgetDefinitionType RUN_WORKFLOW = new RunWorkflowWidgetDefinitionType("run_workflow"); - private static final Set allowedValues = - new HashSet(Arrays.asList("run_workflow")); + private static final Set allowedValues = new HashSet(Arrays.asList("run_workflow")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class RunWorkflowWidgetDefinitionTypeSerializer - extends StdSerializer { - public RunWorkflowWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class RunWorkflowWidgetDefinitionTypeSerializer extends StdSerializer { + public RunWorkflowWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public RunWorkflowWidgetDefinitionTypeSerializer() { - this(null); - } + public RunWorkflowWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - RunWorkflowWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(RunWorkflowWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RunWorkflowWidgetDefinitionType object is equal to o. */ + /** + * Return true if this RunWorkflowWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetInput.java b/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetInput.java index 508b2f2b1da..5f33a593a42 100644 --- a/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetInput.java +++ b/src/main/java/com/datadog/api/client/v1/model/RunWorkflowWidgetInput.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to map a dashboard template variable to a workflow input. */ + +/** + *

Object to map a dashboard template variable to a workflow input.

+ */ @JsonPropertyOrder({ RunWorkflowWidgetInput.JSON_PROPERTY_NAME, RunWorkflowWidgetInput.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RunWorkflowWidgetInput { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -32,53 +51,51 @@ public RunWorkflowWidgetInput() {} @JsonCreator public RunWorkflowWidgetInput( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { - this.name = name; - this.value = value; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_VALUE)String value) { + this.name = name; + this.value = value; } - public RunWorkflowWidgetInput name(String name) { this.name = name; return this; } /** - * Name of the workflow input. - * + *

Name of the workflow input.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public RunWorkflowWidgetInput value(String value) { this.value = value; return this; } /** - * Dashboard template variable. Can be suffixed with '.value' or '.key'. - * + *

Dashboard template variable. Can be suffixed with '.value' or '.key'.

* @return value - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getValue() { - return value; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this RunWorkflowWidgetInput object is equal to o. */ + /** + * Return true if this RunWorkflowWidgetInput object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } RunWorkflowWidgetInput runWorkflowWidgetInput = (RunWorkflowWidgetInput) o; - return Objects.equals(this.name, runWorkflowWidgetInput.name) - && Objects.equals(this.value, runWorkflowWidgetInput.value); + return Objects.equals(this.name, runWorkflowWidgetInput.name) && Objects.equals(this.value, runWorkflowWidgetInput.value); } + @Override public int hashCode() { - return Objects.hash(name, value); + return Objects.hash(name,value); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteError.java b/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteError.java index 91ff2ceb3de..7b8a05862b0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteError.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteError.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the error. */ + +/** + *

Object describing the error.

+ */ @JsonPropertyOrder({ SLOBulkDeleteError.JSON_PROPERTY_ID, SLOBulkDeleteError.JSON_PROPERTY_MESSAGE, SLOBulkDeleteError.JSON_PROPERTY_TIMEFRAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOBulkDeleteError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -36,55 +55,51 @@ public SLOBulkDeleteError() {} @JsonCreator public SLOBulkDeleteError( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) SLOErrorTimeframe timeframe) { - this.id = id; - this.message = message; - this.timeframe = timeframe; - this.unparsed |= !timeframe.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_TIMEFRAME)SLOErrorTimeframe timeframe) { + this.id = id; + this.message = message; + this.timeframe = timeframe; + this.unparsed |= !timeframe.isValid(); } - public SLOBulkDeleteError id(String id) { this.id = id; return this; } /** - * The ID of the service level objective object associated with this error. - * + *

The ID of the service level objective object associated with + * this error.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SLOBulkDeleteError message(String message) { this.message = message; return this; } /** - * The error message. - * + *

The error message.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SLOBulkDeleteError timeframe(SLOErrorTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -92,25 +107,26 @@ public SLOBulkDeleteError timeframe(SLOErrorTimeframe timeframe) { } /** - * The timeframe of the threshold associated with this error or "all" if all thresholds are - * affected. - * + *

The timeframe of the threshold associated with this error + * or "all" if all thresholds are affected.

* @return timeframe - */ - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOErrorTimeframe getTimeframe() { - return timeframe; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOErrorTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SLOErrorTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - /** Return true if this SLOBulkDeleteError object is equal to o. */ + /** + * Return true if this SLOBulkDeleteError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +136,13 @@ public boolean equals(Object o) { return false; } SLOBulkDeleteError sloBulkDeleteError = (SLOBulkDeleteError) o; - return Objects.equals(this.id, sloBulkDeleteError.id) - && Objects.equals(this.message, sloBulkDeleteError.message) - && Objects.equals(this.timeframe, sloBulkDeleteError.timeframe); + return Objects.equals(this.id, sloBulkDeleteError.id) && Objects.equals(this.message, sloBulkDeleteError.message) && Objects.equals(this.timeframe, sloBulkDeleteError.timeframe); } + @Override public int hashCode() { - return Objects.hash(id, message, timeframe); + return Objects.hash(id,message,timeframe); } @Override @@ -142,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponse.java index e17c0704394..e1721a7a9bf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponse.java @@ -6,29 +6,45 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The bulk partial delete service level objective object endpoint response. - * - *

This endpoint operates on multiple service level objective objects, so it may be partially - * successful. In such cases, the "data" and "error" fields in this response indicate which - * deletions succeeded and failed. + *

The bulk partial delete service level objective object endpoint + * response.

+ *

This endpoint operates on multiple service level objective objects, so + * it may be partially successful. In such cases, the "data" and "error" + * fields in this response indicate which deletions succeeded and failed.

*/ @JsonPropertyOrder({ SLOBulkDeleteResponse.JSON_PROPERTY_DATA, SLOBulkDeleteResponse.JSON_PROPERTY_ERRORS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOBulkDeleteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SLOBulkDeleteResponseData data; @@ -42,21 +58,19 @@ public SLOBulkDeleteResponse data(SLOBulkDeleteResponseData data) { } /** - * An array of service level objective objects. - * + *

An array of service level objective objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOBulkDeleteResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOBulkDeleteResponseData getData() { + return data; + } public void setData(SLOBulkDeleteResponseData data) { this.data = data; } - public SLOBulkDeleteResponse errors(List errors) { this.errors = errors; for (SLOBulkDeleteError item : errors) { @@ -64,7 +78,6 @@ public SLOBulkDeleteResponse errors(List errors) { } return this; } - public SLOBulkDeleteResponse addErrorsItem(SLOBulkDeleteError errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -75,22 +88,23 @@ public SLOBulkDeleteResponse addErrorsItem(SLOBulkDeleteError errorsItem) { } /** - * Array of errors object returned. - * + *

Array of errors object returned.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this SLOBulkDeleteResponse object is equal to o. */ + /** + * Return true if this SLOBulkDeleteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -100,13 +114,13 @@ public boolean equals(Object o) { return false; } SLOBulkDeleteResponse sloBulkDeleteResponse = (SLOBulkDeleteResponse) o; - return Objects.equals(this.data, sloBulkDeleteResponse.data) - && Objects.equals(this.errors, sloBulkDeleteResponse.errors); + return Objects.equals(this.data, sloBulkDeleteResponse.data) && Objects.equals(this.errors, sloBulkDeleteResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -120,7 +134,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponseData.java b/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponseData.java index eca9237247f..594b5f2ccf1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOBulkDeleteResponseData.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An array of service level objective objects. */ +/** + *

An array of service level objective objects.

+ */ @JsonPropertyOrder({ SLOBulkDeleteResponseData.JSON_PROPERTY_DELETED, SLOBulkDeleteResponseData.JSON_PROPERTY_UPDATED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOBulkDeleteResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DELETED = "deleted"; private List deleted = null; @@ -33,7 +51,6 @@ public SLOBulkDeleteResponseData deleted(List deleted) { this.deleted = deleted; return this; } - public SLOBulkDeleteResponseData addDeletedItem(String deletedItem) { if (this.deleted == null) { this.deleted = new ArrayList<>(); @@ -43,27 +60,24 @@ public SLOBulkDeleteResponseData addDeletedItem(String deletedItem) { } /** - * An array of service level objective object IDs that indicates which objects that were - * completely deleted. - * + *

An array of service level objective object IDs that indicates + * which objects that were completely deleted.

* @return deleted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDeleted() { - return deleted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDeleted() { + return deleted; + } public void setDeleted(List deleted) { this.deleted = deleted; } - public SLOBulkDeleteResponseData updated(List updated) { this.updated = updated; return this; } - public SLOBulkDeleteResponseData addUpdatedItem(String updatedItem) { if (this.updated == null) { this.updated = new ArrayList<>(); @@ -73,23 +87,25 @@ public SLOBulkDeleteResponseData addUpdatedItem(String updatedItem) { } /** - * An array of service level objective object IDs that indicates which objects that were modified - * (objects for which at least one threshold was deleted, but that were not completely deleted). - * + *

An array of service level objective object IDs that indicates + * which objects that were modified (objects for which at least one + * threshold was deleted, but that were not completely deleted).

* @return updated - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUpdated() { - return updated; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUpdated() { + return updated; + } public void setUpdated(List updated) { this.updated = updated; } - /** Return true if this SLOBulkDeleteResponseData object is equal to o. */ + /** + * Return true if this SLOBulkDeleteResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,13 +115,13 @@ public boolean equals(Object o) { return false; } SLOBulkDeleteResponseData sloBulkDeleteResponseData = (SLOBulkDeleteResponseData) o; - return Objects.equals(this.deleted, sloBulkDeleteResponseData.deleted) - && Objects.equals(this.updated, sloBulkDeleteResponseData.updated); + return Objects.equals(this.deleted, sloBulkDeleteResponseData.deleted) && Objects.equals(this.updated, sloBulkDeleteResponseData.updated); } + @Override public int hashCode() { - return Objects.hash(deleted, updated); + return Objects.hash(deleted,updated); } @Override @@ -119,7 +135,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrection.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrection.java index 6b8667410d6..1f9f676511d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrection.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrection.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response object of a list of SLO corrections. */ + +/** + *

The response object of a list of SLO corrections.

+ */ @JsonPropertyOrder({ SLOCorrection.JSON_PROPERTY_ATTRIBUTES, SLOCorrection.JSON_PROPERTY_ID, SLOCorrection.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrection { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SLOCorrectionResponseAttributes attributes; @@ -38,42 +58,38 @@ public SLOCorrection attributes(SLOCorrectionResponseAttributes attributes) { } /** - * The attribute object associated with the SLO correction. - * + *

The attribute object associated with the SLO correction.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(SLOCorrectionResponseAttributes attributes) { this.attributes = attributes; } - public SLOCorrection id(String id) { this.id = id; return this; } /** - * The ID of the SLO correction. - * + *

The ID of the SLO correction.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SLOCorrection type(SLOCorrectionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public SLOCorrection type(SLOCorrectionType type) { } /** - * SLO correction resource type. - * + *

SLO correction resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionType getType() { + return type; + } public void setType(SLOCorrectionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SLOCorrection object is equal to o. */ + /** + * Return true if this SLOCorrection object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } SLOCorrection sloCorrection = (SLOCorrection) o; - return Objects.equals(this.attributes, sloCorrection.attributes) - && Objects.equals(this.id, sloCorrection.id) - && Objects.equals(this.type, sloCorrection.type); + return Objects.equals(this.attributes, sloCorrection.attributes) && Objects.equals(this.id, sloCorrection.id) && Objects.equals(this.type, sloCorrection.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCategory.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCategory.java index aab1ee7e74f..d7bec92a5bf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCategory.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCategory.java @@ -6,33 +6,53 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Category the SLO correction belongs to. */ +/** + *

Category the SLO correction belongs to.

+ */ @JsonSerialize(using = SLOCorrectionCategory.SLOCorrectionCategorySerializer.class) public class SLOCorrectionCategory { - public static final SLOCorrectionCategory SCHEDULED_MAINTENANCE = - new SLOCorrectionCategory("Scheduled Maintenance"); - public static final SLOCorrectionCategory OUTSIDE_BUSINESS_HOURS = - new SLOCorrectionCategory("Outside Business Hours"); + public static final SLOCorrectionCategory SCHEDULED_MAINTENANCE = new SLOCorrectionCategory("Scheduled Maintenance"); + public static final SLOCorrectionCategory OUTSIDE_BUSINESS_HOURS = new SLOCorrectionCategory("Outside Business Hours"); public static final SLOCorrectionCategory DEPLOYMENT = new SLOCorrectionCategory("Deployment"); public static final SLOCorrectionCategory OTHER = new SLOCorrectionCategory("Other"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("Scheduled Maintenance", "Outside Business Hours", "Deployment", "Other")); + private static final Set allowedValues = new HashSet(Arrays.asList("Scheduled Maintenance", "Outside Business Hours", "Deployment", "Other")); private String value; @@ -45,20 +65,18 @@ public boolean isValid() { } public static class SLOCorrectionCategorySerializer extends StdSerializer { - public SLOCorrectionCategorySerializer(Class t) { - super(t); - } - - public SLOCorrectionCategorySerializer() { - this(null); - } - - @Override - public void serialize( - SLOCorrectionCategory value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOCorrectionCategorySerializer(Class t) { + super(t); + } + + public SLOCorrectionCategorySerializer() { + this(null); + } + + @Override + public void serialize(SLOCorrectionCategory value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOCorrectionCategory object is equal to o. */ + /** + * Return true if this SLOCorrectionCategory object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateData.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateData.java index 4de83ff1a9d..f76102a4395 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data object associated with the SLO correction to be created. */ + +/** + *

The data object associated with the SLO correction to be created.

+ */ @JsonPropertyOrder({ SLOCorrectionCreateData.JSON_PROPERTY_ATTRIBUTES, SLOCorrectionCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SLOCorrectionCreateRequestAttributes attributes; @@ -32,11 +51,10 @@ public SLOCorrectionCreateData() {} @JsonCreator public SLOCorrectionCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SLOCorrectionType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SLOCorrectionType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public SLOCorrectionCreateData attributes(SLOCorrectionCreateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -44,21 +62,19 @@ public SLOCorrectionCreateData attributes(SLOCorrectionCreateRequestAttributes a } /** - * The attribute object associated with the SLO correction to be created. - * + *

The attribute object associated with the SLO correction to be created.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionCreateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionCreateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(SLOCorrectionCreateRequestAttributes attributes) { this.attributes = attributes; } - public SLOCorrectionCreateData type(SLOCorrectionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public SLOCorrectionCreateData type(SLOCorrectionType type) { } /** - * SLO correction resource type. - * + *

SLO correction resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOCorrectionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOCorrectionType getType() { + return type; + } public void setType(SLOCorrectionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SLOCorrectionCreateData object is equal to o. */ + /** + * Return true if this SLOCorrectionCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +110,13 @@ public boolean equals(Object o) { return false; } SLOCorrectionCreateData sloCorrectionCreateData = (SLOCorrectionCreateData) o; - return Objects.equals(this.attributes, sloCorrectionCreateData.attributes) - && Objects.equals(this.type, sloCorrectionCreateData.type); + return Objects.equals(this.attributes, sloCorrectionCreateData.attributes) && Objects.equals(this.type, sloCorrectionCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -113,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequest.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequest.java index a6be47d629c..b0579ef88b3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequest.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** An object that defines a correction to be applied to an SLO. */ -@JsonPropertyOrder({SLOCorrectionCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

An object that defines a correction to be applied to an SLO.

+ */ +@JsonPropertyOrder({ + SLOCorrectionCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SLOCorrectionCreateData data; @@ -28,22 +50,23 @@ public SLOCorrectionCreateRequest data(SLOCorrectionCreateData data) { } /** - * The data object associated with the SLO correction to be created. - * + *

The data object associated with the SLO correction to be created.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionCreateData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionCreateData getData() { + return data; + } public void setData(SLOCorrectionCreateData data) { this.data = data; } - /** Return true if this SLOCorrectionCreateRequest object is equal to o. */ + /** + * Return true if this SLOCorrectionCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, sloCorrectionCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequestAttributes.java index 47ea8b9fd61..6a2623e2aba 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionCreateRequestAttributes.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attribute object associated with the SLO correction to be created. */ + +/** + *

The attribute object associated with the SLO correction to be created.

+ */ @JsonPropertyOrder({ SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_CATEGORY, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_DESCRIPTION, @@ -24,10 +43,10 @@ SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_START, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionCreateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CATEGORY = "category"; private SLOCorrectionCategory category; @@ -56,15 +75,14 @@ public SLOCorrectionCreateRequestAttributes() {} @JsonCreator public SLOCorrectionCreateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_CATEGORY) SLOCorrectionCategory category, - @JsonProperty(required = true, value = JSON_PROPERTY_SLO_ID) String sloId, - @JsonProperty(required = true, value = JSON_PROPERTY_START) Long start) { - this.category = category; - this.unparsed |= !category.isValid(); - this.sloId = sloId; - this.start = start; + @JsonProperty(required=true, value=JSON_PROPERTY_CATEGORY)SLOCorrectionCategory category, + @JsonProperty(required=true, value=JSON_PROPERTY_SLO_ID)String sloId, + @JsonProperty(required=true, value=JSON_PROPERTY_START)Long start) { + this.category = category; + this.unparsed |= !category.isValid(); + this.sloId = sloId; + this.start = start; } - public SLOCorrectionCreateRequestAttributes category(SLOCorrectionCategory category) { this.category = category; this.unparsed |= !category.isValid(); @@ -72,171 +90,157 @@ public SLOCorrectionCreateRequestAttributes category(SLOCorrectionCategory categ } /** - * Category the SLO correction belongs to. - * + *

Category the SLO correction belongs to.

* @return category - */ - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOCorrectionCategory getCategory() { - return category; - } - + **/ + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOCorrectionCategory getCategory() { + return category; + } public void setCategory(SLOCorrectionCategory category) { if (!category.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.category = category; } - public SLOCorrectionCreateRequestAttributes description(String description) { this.description = description; return this; } /** - * Description of the correction being made. - * + *

Description of the correction being made.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SLOCorrectionCreateRequestAttributes duration(Long duration) { this.duration = duration; return this; } /** - * Length of time (in seconds) for a specified rrule recurring SLO correction. - * + *

Length of time (in seconds) for a specified rrule recurring SLO correction.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDuration() { + return duration; + } public void setDuration(Long duration) { this.duration = duration; } - public SLOCorrectionCreateRequestAttributes end(Long end) { this.end = end; return this; } /** - * Ending time of the correction in epoch seconds. - * + *

Ending time of the correction in epoch seconds.

* @return end - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEnd() { - return end; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } public void setEnd(Long end) { this.end = end; } - public SLOCorrectionCreateRequestAttributes rrule(String rrule) { this.rrule = rrule; return this; } /** - * The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO - * corrections are FREQ, INTERVAL, COUNT and UNTIL - * . - * + *

The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections + * are FREQ, INTERVAL, COUNT and UNTIL.

* @return rrule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RRULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRrule() { - return rrule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRrule() { + return rrule; + } public void setRrule(String rrule) { this.rrule = rrule; } - public SLOCorrectionCreateRequestAttributes sloId(String sloId) { this.sloId = sloId; return this; } /** - * ID of the SLO that this correction applies to. - * + *

ID of the SLO that this correction applies to.

* @return sloId - */ - @JsonProperty(JSON_PROPERTY_SLO_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSloId() { - return sloId; - } - + **/ + @JsonProperty(JSON_PROPERTY_SLO_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSloId() { + return sloId; + } public void setSloId(String sloId) { this.sloId = sloId; } - public SLOCorrectionCreateRequestAttributes start(Long start) { this.start = start; return this; } /** - * Starting time of the correction in epoch seconds. - * + *

Starting time of the correction in epoch seconds.

* @return start - */ - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getStart() { - return start; - } - + **/ + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getStart() { + return start; + } public void setStart(Long start) { this.start = start; } - public SLOCorrectionCreateRequestAttributes timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone to display in the UI for the correction times (defaults to "UTC"). - * + *

The timezone to display in the UI for the correction times (defaults to "UTC").

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this SLOCorrectionCreateRequestAttributes object is equal to o. */ + /** + * Return true if this SLOCorrectionCreateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -245,21 +249,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOCorrectionCreateRequestAttributes sloCorrectionCreateRequestAttributes = - (SLOCorrectionCreateRequestAttributes) o; - return Objects.equals(this.category, sloCorrectionCreateRequestAttributes.category) - && Objects.equals(this.description, sloCorrectionCreateRequestAttributes.description) - && Objects.equals(this.duration, sloCorrectionCreateRequestAttributes.duration) - && Objects.equals(this.end, sloCorrectionCreateRequestAttributes.end) - && Objects.equals(this.rrule, sloCorrectionCreateRequestAttributes.rrule) - && Objects.equals(this.sloId, sloCorrectionCreateRequestAttributes.sloId) - && Objects.equals(this.start, sloCorrectionCreateRequestAttributes.start) - && Objects.equals(this.timezone, sloCorrectionCreateRequestAttributes.timezone); + SLOCorrectionCreateRequestAttributes sloCorrectionCreateRequestAttributes = (SLOCorrectionCreateRequestAttributes) o; + return Objects.equals(this.category, sloCorrectionCreateRequestAttributes.category) && Objects.equals(this.description, sloCorrectionCreateRequestAttributes.description) && Objects.equals(this.duration, sloCorrectionCreateRequestAttributes.duration) && Objects.equals(this.end, sloCorrectionCreateRequestAttributes.end) && Objects.equals(this.rrule, sloCorrectionCreateRequestAttributes.rrule) && Objects.equals(this.sloId, sloCorrectionCreateRequestAttributes.sloId) && Objects.equals(this.start, sloCorrectionCreateRequestAttributes.start) && Objects.equals(this.timezone, sloCorrectionCreateRequestAttributes.timezone); } + @Override public int hashCode() { - return Objects.hash(category, description, duration, end, rrule, sloId, start, timezone); + return Objects.hash(category,description,duration,end,rrule,sloId,start,timezone); } @Override @@ -279,7 +276,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionListResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionListResponse.java index 301ff5c5357..d45616cd87b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionListResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A list of SLO correction objects. */ +/** + *

A list of SLO correction objects.

+ */ @JsonPropertyOrder({ SLOCorrectionListResponse.JSON_PROPERTY_DATA, SLOCorrectionListResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -36,7 +54,6 @@ public SLOCorrectionListResponse data(List data) { } return this; } - public SLOCorrectionListResponse addDataItem(SLOCorrection dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -47,21 +64,19 @@ public SLOCorrectionListResponse addDataItem(SLOCorrection dataItem) { } /** - * The list of of SLO corrections objects. - * + *

The list of of SLO corrections objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public SLOCorrectionListResponse meta(ResponseMetaAttributes meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -69,22 +84,23 @@ public SLOCorrectionListResponse meta(ResponseMetaAttributes meta) { } /** - * Object describing meta attributes of response. - * + *

Object describing meta attributes of response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ResponseMetaAttributes getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ResponseMetaAttributes getMeta() { + return meta; + } public void setMeta(ResponseMetaAttributes meta) { this.meta = meta; } - /** Return true if this SLOCorrectionListResponse object is equal to o. */ + /** + * Return true if this SLOCorrectionListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } SLOCorrectionListResponse sloCorrectionListResponse = (SLOCorrectionListResponse) o; - return Objects.equals(this.data, sloCorrectionListResponse.data) - && Objects.equals(this.meta, sloCorrectionListResponse.meta); + return Objects.equals(this.data, sloCorrectionListResponse.data) && Objects.equals(this.meta, sloCorrectionListResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponse.java index b08bf813733..ca10c39612d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The response object of an SLO correction. */ -@JsonPropertyOrder({SLOCorrectionResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The response object of an SLO correction.

+ */ +@JsonPropertyOrder({ + SLOCorrectionResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SLOCorrection data; @@ -28,22 +50,23 @@ public SLOCorrectionResponse data(SLOCorrection data) { } /** - * The response object of a list of SLO corrections. - * + *

The response object of a list of SLO corrections.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrection getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrection getData() { + return data; + } public void setData(SLOCorrection data) { this.data = data; } - /** Return true if this SLOCorrectionResponse object is equal to o. */ + /** + * Return true if this SLOCorrectionResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, sloCorrectionResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributes.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributes.java index 7ce6af4d960..6941109e513 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributes.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attribute object associated with the SLO correction. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attribute object associated with the SLO correction.

+ */ @JsonPropertyOrder({ SLOCorrectionResponseAttributes.JSON_PROPERTY_CATEGORY, SLOCorrectionResponseAttributes.JSON_PROPERTY_CREATED_AT, @@ -28,10 +47,10 @@ SLOCorrectionResponseAttributes.JSON_PROPERTY_START, SLOCorrectionResponseAttributes.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CATEGORY = "category"; private SLOCorrectionCategory category; @@ -54,8 +73,7 @@ public class SLOCorrectionResponseAttributes { private Long modifiedAt; public static final String JSON_PROPERTY_MODIFIER = "modifier"; - private JsonNullable modifier = - JsonNullable.undefined(); + private JsonNullable modifier = JsonNullable.undefined(); public static final String JSON_PROPERTY_RRULE = "rrule"; private JsonNullable rrule = JsonNullable.undefined(); @@ -76,281 +94,250 @@ public SLOCorrectionResponseAttributes category(SLOCorrectionCategory category) } /** - * Category the SLO correction belongs to. - * + *

Category the SLO correction belongs to.

* @return category - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionCategory getCategory() { - return category; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionCategory getCategory() { + return category; + } public void setCategory(SLOCorrectionCategory category) { if (!category.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.category = category; } - public SLOCorrectionResponseAttributes createdAt(Long createdAt) { this.createdAt = createdAt; return this; } /** - * The epoch timestamp of when the correction was created at. - * + *

The epoch timestamp of when the correction was created at.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } public void setCreatedAt(Long createdAt) { this.createdAt = createdAt; } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } public SLOCorrectionResponseAttributes description(String description) { this.description = description; return this; } /** - * Description of the correction being made. - * + *

Description of the correction being made.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SLOCorrectionResponseAttributes duration(Long duration) { this.duration = JsonNullable.of(duration); return this; } /** - * Length of time (in seconds) for a specified rrule recurring SLO correction. - * + *

Length of time (in seconds) for a specified rrule recurring SLO correction.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getDuration() { - return duration.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getDuration() { + return duration.orElse(null); + } @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDuration_JsonNullable() { return duration; } - - @JsonProperty(JSON_PROPERTY_DURATION) - public void setDuration_JsonNullable(JsonNullable duration) { + @JsonProperty(JSON_PROPERTY_DURATION)public void setDuration_JsonNullable(JsonNullable duration) { this.duration = duration; } - public void setDuration(Long duration) { this.duration = JsonNullable.of(duration); } - public SLOCorrectionResponseAttributes end(Long end) { this.end = end; return this; } /** - * Ending time of the correction in epoch seconds. - * + *

Ending time of the correction in epoch seconds.

* @return end - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEnd() { - return end; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } public void setEnd(Long end) { this.end = end; } - public SLOCorrectionResponseAttributes modifiedAt(Long modifiedAt) { this.modifiedAt = modifiedAt; return this; } /** - * The epoch timestamp of when the correction was modified at. - * + *

The epoch timestamp of when the correction was modified at.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getModifiedAt() { + return modifiedAt; + } public void setModifiedAt(Long modifiedAt) { this.modifiedAt = modifiedAt; } - - public SLOCorrectionResponseAttributes modifier( - SLOCorrectionResponseAttributesModifier modifier) { + public SLOCorrectionResponseAttributes modifier(SLOCorrectionResponseAttributesModifier modifier) { this.modifier = JsonNullable.of(modifier); return this; } /** - * Modifier of the object. - * + *

Modifier of the object.

* @return modifier - */ - @jakarta.annotation.Nullable - @JsonIgnore - public SLOCorrectionResponseAttributesModifier getModifier() { - return modifier.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public SLOCorrectionResponseAttributesModifier getModifier() { + return modifier.orElse(null); + } @JsonProperty(JSON_PROPERTY_MODIFIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getModifier_JsonNullable() { return modifier; } - - @JsonProperty(JSON_PROPERTY_MODIFIER) - public void setModifier_JsonNullable( - JsonNullable modifier) { + @JsonProperty(JSON_PROPERTY_MODIFIER)public void setModifier_JsonNullable(JsonNullable modifier) { this.modifier = modifier; } - public void setModifier(SLOCorrectionResponseAttributesModifier modifier) { this.modifier = JsonNullable.of(modifier); } - public SLOCorrectionResponseAttributes rrule(String rrule) { this.rrule = JsonNullable.of(rrule); return this; } /** - * The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO - * corrections are FREQ, INTERVAL, COUNT, and UNTIL - * . - * + *

The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections + * are FREQ, INTERVAL, COUNT, and UNTIL.

* @return rrule - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getRrule() { - return rrule.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getRrule() { + return rrule.orElse(null); + } @JsonProperty(JSON_PROPERTY_RRULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRrule_JsonNullable() { return rrule; } - - @JsonProperty(JSON_PROPERTY_RRULE) - public void setRrule_JsonNullable(JsonNullable rrule) { + @JsonProperty(JSON_PROPERTY_RRULE)public void setRrule_JsonNullable(JsonNullable rrule) { this.rrule = rrule; } - public void setRrule(String rrule) { this.rrule = JsonNullable.of(rrule); } - public SLOCorrectionResponseAttributes sloId(String sloId) { this.sloId = sloId; return this; } /** - * ID of the SLO that this correction applies to. - * + *

ID of the SLO that this correction applies to.

* @return sloId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLO_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSloId() { - return sloId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLO_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSloId() { + return sloId; + } public void setSloId(String sloId) { this.sloId = sloId; } - public SLOCorrectionResponseAttributes start(Long start) { this.start = start; return this; } /** - * Starting time of the correction in epoch seconds. - * + *

Starting time of the correction in epoch seconds.

* @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } public void setStart(Long start) { this.start = start; } - public SLOCorrectionResponseAttributes timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone to display in the UI for the correction times (defaults to "UTC"). - * + *

The timezone to display in the UI for the correction times (defaults to "UTC").

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this SLOCorrectionResponseAttributes object is equal to o. */ + /** + * Return true if this SLOCorrectionResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -359,37 +346,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOCorrectionResponseAttributes sloCorrectionResponseAttributes = - (SLOCorrectionResponseAttributes) o; - return Objects.equals(this.category, sloCorrectionResponseAttributes.category) - && Objects.equals(this.createdAt, sloCorrectionResponseAttributes.createdAt) - && Objects.equals(this.creator, sloCorrectionResponseAttributes.creator) - && Objects.equals(this.description, sloCorrectionResponseAttributes.description) - && Objects.equals(this.duration, sloCorrectionResponseAttributes.duration) - && Objects.equals(this.end, sloCorrectionResponseAttributes.end) - && Objects.equals(this.modifiedAt, sloCorrectionResponseAttributes.modifiedAt) - && Objects.equals(this.modifier, sloCorrectionResponseAttributes.modifier) - && Objects.equals(this.rrule, sloCorrectionResponseAttributes.rrule) - && Objects.equals(this.sloId, sloCorrectionResponseAttributes.sloId) - && Objects.equals(this.start, sloCorrectionResponseAttributes.start) - && Objects.equals(this.timezone, sloCorrectionResponseAttributes.timezone); + SLOCorrectionResponseAttributes sloCorrectionResponseAttributes = (SLOCorrectionResponseAttributes) o; + return Objects.equals(this.category, sloCorrectionResponseAttributes.category) && Objects.equals(this.createdAt, sloCorrectionResponseAttributes.createdAt) && Objects.equals(this.creator, sloCorrectionResponseAttributes.creator) && Objects.equals(this.description, sloCorrectionResponseAttributes.description) && Objects.equals(this.duration, sloCorrectionResponseAttributes.duration) && Objects.equals(this.end, sloCorrectionResponseAttributes.end) && Objects.equals(this.modifiedAt, sloCorrectionResponseAttributes.modifiedAt) && Objects.equals(this.modifier, sloCorrectionResponseAttributes.modifier) && Objects.equals(this.rrule, sloCorrectionResponseAttributes.rrule) && Objects.equals(this.sloId, sloCorrectionResponseAttributes.sloId) && Objects.equals(this.start, sloCorrectionResponseAttributes.start) && Objects.equals(this.timezone, sloCorrectionResponseAttributes.timezone); } + @Override public int hashCode() { - return Objects.hash( - category, - createdAt, - creator, - description, - duration, - end, - modifiedAt, - modifier, - rrule, - sloId, - start, - timezone); + return Objects.hash(category,createdAt,creator,description,duration,end,modifiedAt,modifier,rrule,sloId,start,timezone); } @Override @@ -413,7 +377,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributesModifier.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributesModifier.java index ea4e41a9ffc..ada75088975 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributesModifier.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionResponseAttributesModifier.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Modifier of the object. */ + +/** + *

Modifier of the object.

+ */ @JsonPropertyOrder({ SLOCorrectionResponseAttributesModifier.JSON_PROPERTY_EMAIL, SLOCorrectionResponseAttributesModifier.JSON_PROPERTY_HANDLE, SLOCorrectionResponseAttributesModifier.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionResponseAttributesModifier { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -37,64 +57,61 @@ public SLOCorrectionResponseAttributesModifier email(String email) { } /** - * Email of the Modifier. - * + *

Email of the Modifier.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public SLOCorrectionResponseAttributesModifier handle(String handle) { this.handle = handle; return this; } /** - * Handle of the Modifier. - * + *

Handle of the Modifier.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public SLOCorrectionResponseAttributesModifier name(String name) { this.name = name; return this; } /** - * Name of the Modifier. - * + *

Name of the Modifier.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SLOCorrectionResponseAttributesModifier object is equal to o. */ + /** + * Return true if this SLOCorrectionResponseAttributesModifier object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,16 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOCorrectionResponseAttributesModifier sloCorrectionResponseAttributesModifier = - (SLOCorrectionResponseAttributesModifier) o; - return Objects.equals(this.email, sloCorrectionResponseAttributesModifier.email) - && Objects.equals(this.handle, sloCorrectionResponseAttributesModifier.handle) - && Objects.equals(this.name, sloCorrectionResponseAttributesModifier.name); + SLOCorrectionResponseAttributesModifier sloCorrectionResponseAttributesModifier = (SLOCorrectionResponseAttributesModifier) o; + return Objects.equals(this.email, sloCorrectionResponseAttributesModifier.email) && Objects.equals(this.handle, sloCorrectionResponseAttributesModifier.handle) && Objects.equals(this.name, sloCorrectionResponseAttributesModifier.name); } + @Override public int hashCode() { - return Objects.hash(email, handle, name); + return Objects.hash(email,handle,name); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionType.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionType.java index 4f34e266db8..6e29a24f00a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** SLO correction resource type. */ +/** + *

SLO correction resource type.

+ */ @JsonSerialize(using = SLOCorrectionType.SLOCorrectionTypeSerializer.class) public class SLOCorrectionType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class SLOCorrectionTypeSerializer extends StdSerializer { - public SLOCorrectionTypeSerializer(Class t) { - super(t); - } - - public SLOCorrectionTypeSerializer() { - this(null); - } - - @Override - public void serialize(SLOCorrectionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOCorrectionTypeSerializer(Class t) { + super(t); + } + + public SLOCorrectionTypeSerializer() { + this(null); + } + + @Override + public void serialize(SLOCorrectionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOCorrectionType object is equal to o. */ + /** + * Return true if this SLOCorrectionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateData.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateData.java index 7b2a8597199..0941ce5aeea 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data object associated with the SLO correction to be updated. */ + +/** + *

The data object associated with the SLO correction to be updated.

+ */ @JsonPropertyOrder({ SLOCorrectionUpdateData.JSON_PROPERTY_ATTRIBUTES, SLOCorrectionUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SLOCorrectionUpdateRequestAttributes attributes; @@ -34,21 +54,19 @@ public SLOCorrectionUpdateData attributes(SLOCorrectionUpdateRequestAttributes a } /** - * The attribute object associated with the SLO correction to be updated. - * + *

The attribute object associated with the SLO correction to be updated.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionUpdateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionUpdateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(SLOCorrectionUpdateRequestAttributes attributes) { this.attributes = attributes; } - public SLOCorrectionUpdateData type(SLOCorrectionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +74,26 @@ public SLOCorrectionUpdateData type(SLOCorrectionType type) { } /** - * SLO correction resource type. - * + *

SLO correction resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionType getType() { + return type; + } public void setType(SLOCorrectionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SLOCorrectionUpdateData object is equal to o. */ + /** + * Return true if this SLOCorrectionUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +103,13 @@ public boolean equals(Object o) { return false; } SLOCorrectionUpdateData sloCorrectionUpdateData = (SLOCorrectionUpdateData) o; - return Objects.equals(this.attributes, sloCorrectionUpdateData.attributes) - && Objects.equals(this.type, sloCorrectionUpdateData.type); + return Objects.equals(this.attributes, sloCorrectionUpdateData.attributes) && Objects.equals(this.type, sloCorrectionUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -104,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequest.java index ecb7672a4aa..ad6dfe27000 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequest.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** An object that defines a correction to be applied to an SLO. */ -@JsonPropertyOrder({SLOCorrectionUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

An object that defines a correction to be applied to an SLO.

+ */ +@JsonPropertyOrder({ + SLOCorrectionUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SLOCorrectionUpdateData data; @@ -28,22 +50,23 @@ public SLOCorrectionUpdateRequest data(SLOCorrectionUpdateData data) { } /** - * The data object associated with the SLO correction to be updated. - * + *

The data object associated with the SLO correction to be updated.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionUpdateData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionUpdateData getData() { + return data; + } public void setData(SLOCorrectionUpdateData data) { this.data = data; } - /** Return true if this SLOCorrectionUpdateRequest object is equal to o. */ + /** + * Return true if this SLOCorrectionUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, sloCorrectionUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequestAttributes.java index ebd71882a84..9b7a9a0614e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCorrectionUpdateRequestAttributes.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attribute object associated with the SLO correction to be updated. */ + +/** + *

The attribute object associated with the SLO correction to be updated.

+ */ @JsonPropertyOrder({ SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_CATEGORY, SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_DESCRIPTION, @@ -22,10 +42,10 @@ SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_START, SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCorrectionUpdateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CATEGORY = "category"; private SLOCorrectionCategory category; @@ -54,153 +74,141 @@ public SLOCorrectionUpdateRequestAttributes category(SLOCorrectionCategory categ } /** - * Category the SLO correction belongs to. - * + *

Category the SLO correction belongs to.

* @return category - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOCorrectionCategory getCategory() { - return category; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOCorrectionCategory getCategory() { + return category; + } public void setCategory(SLOCorrectionCategory category) { if (!category.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.category = category; } - public SLOCorrectionUpdateRequestAttributes description(String description) { this.description = description; return this; } /** - * Description of the correction being made. - * + *

Description of the correction being made.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SLOCorrectionUpdateRequestAttributes duration(Long duration) { this.duration = duration; return this; } /** - * Length of time (in seconds) for a specified rrule recurring SLO correction. - * + *

Length of time (in seconds) for a specified rrule recurring SLO correction.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDuration() { + return duration; + } public void setDuration(Long duration) { this.duration = duration; } - public SLOCorrectionUpdateRequestAttributes end(Long end) { this.end = end; return this; } /** - * Ending time of the correction in epoch seconds. - * + *

Ending time of the correction in epoch seconds.

* @return end - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEnd() { - return end; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } public void setEnd(Long end) { this.end = end; } - public SLOCorrectionUpdateRequestAttributes rrule(String rrule) { this.rrule = rrule; return this; } /** - * The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO - * corrections are FREQ, INTERVAL, COUNT, and UNTIL - * . - * + *

The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections + * are FREQ, INTERVAL, COUNT, and UNTIL.

* @return rrule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RRULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRrule() { - return rrule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRrule() { + return rrule; + } public void setRrule(String rrule) { this.rrule = rrule; } - public SLOCorrectionUpdateRequestAttributes start(Long start) { this.start = start; return this; } /** - * Starting time of the correction in epoch seconds. - * + *

Starting time of the correction in epoch seconds.

* @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } public void setStart(Long start) { this.start = start; } - public SLOCorrectionUpdateRequestAttributes timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone to display in the UI for the correction times (defaults to "UTC"). - * + *

The timezone to display in the UI for the correction times (defaults to "UTC").

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this SLOCorrectionUpdateRequestAttributes object is equal to o. */ + /** + * Return true if this SLOCorrectionUpdateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -209,20 +217,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOCorrectionUpdateRequestAttributes sloCorrectionUpdateRequestAttributes = - (SLOCorrectionUpdateRequestAttributes) o; - return Objects.equals(this.category, sloCorrectionUpdateRequestAttributes.category) - && Objects.equals(this.description, sloCorrectionUpdateRequestAttributes.description) - && Objects.equals(this.duration, sloCorrectionUpdateRequestAttributes.duration) - && Objects.equals(this.end, sloCorrectionUpdateRequestAttributes.end) - && Objects.equals(this.rrule, sloCorrectionUpdateRequestAttributes.rrule) - && Objects.equals(this.start, sloCorrectionUpdateRequestAttributes.start) - && Objects.equals(this.timezone, sloCorrectionUpdateRequestAttributes.timezone); + SLOCorrectionUpdateRequestAttributes sloCorrectionUpdateRequestAttributes = (SLOCorrectionUpdateRequestAttributes) o; + return Objects.equals(this.category, sloCorrectionUpdateRequestAttributes.category) && Objects.equals(this.description, sloCorrectionUpdateRequestAttributes.description) && Objects.equals(this.duration, sloCorrectionUpdateRequestAttributes.duration) && Objects.equals(this.end, sloCorrectionUpdateRequestAttributes.end) && Objects.equals(this.rrule, sloCorrectionUpdateRequestAttributes.rrule) && Objects.equals(this.start, sloCorrectionUpdateRequestAttributes.start) && Objects.equals(this.timezone, sloCorrectionUpdateRequestAttributes.timezone); } + @Override public int hashCode() { - return Objects.hash(category, description, duration, end, rrule, start, timezone); + return Objects.hash(category,description,duration,end,rrule,start,timezone); } @Override @@ -241,7 +243,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOCreator.java b/src/main/java/com/datadog/api/client/v1/model/SLOCreator.java index d4bb4ca321b..1dd4c2eb7ab 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOCreator.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOCreator.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The creator of the SLO */ + +/** + *

The creator of the SLO

+ */ @JsonPropertyOrder({ SLOCreator.JSON_PROPERTY_EMAIL, SLOCreator.JSON_PROPERTY_ID, SLOCreator.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOCreator { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -37,64 +57,61 @@ public SLOCreator email(String email) { } /** - * Email of the creator. - * + *

Email of the creator.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public SLOCreator id(Long id) { this.id = id; return this; } /** - * User ID of the creator. - * + *

User ID of the creator.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public SLOCreator name(String name) { this.name = name; return this; } /** - * Name of the creator. - * + *

Name of the creator.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SLOCreator object is equal to o. */ + /** + * Return true if this SLOCreator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } SLOCreator sloCreator = (SLOCreator) o; - return Objects.equals(this.email, sloCreator.email) - && Objects.equals(this.id, sloCreator.id) - && Objects.equals(this.name, sloCreator.name); + return Objects.equals(this.email, sloCreator.email) && Objects.equals(this.id, sloCreator.id) && Objects.equals(this.name, sloCreator.name); } + @Override public int hashCode() { - return Objects.hash(email, id, name); + return Objects.hash(email,id,name); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLODeleteResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLODeleteResponse.java index 220d729834a..1107f8ef6fe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLODeleteResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLODeleteResponse.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A response list of all service level objective deleted. */ -@JsonPropertyOrder({SLODeleteResponse.JSON_PROPERTY_DATA, SLODeleteResponse.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

A response list of all service level objective deleted.

+ */ +@JsonPropertyOrder({ + SLODeleteResponse.JSON_PROPERTY_DATA, + SLODeleteResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLODeleteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -32,7 +51,6 @@ public SLODeleteResponse data(List data) { this.data = data; return this; } - public SLODeleteResponse addDataItem(String dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -42,26 +60,23 @@ public SLODeleteResponse addDataItem(String dataItem) { } /** - * An array containing the ID of the deleted service level objective object. - * + *

An array containing the ID of the deleted service level objective object.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public SLODeleteResponse errors(Map errors) { this.errors = errors; return this; } - public SLODeleteResponse putErrorsItem(String key, String errorsItem) { if (this.errors == null) { this.errors = new HashMap<>(); @@ -71,22 +86,23 @@ public SLODeleteResponse putErrorsItem(String key, String errorsItem) { } /** - * An dictionary containing the ID of the SLO as key and a deletion error as value. - * + *

An dictionary containing the ID of the SLO as key and a deletion error as value.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrors() { + return errors; + } public void setErrors(Map errors) { this.errors = errors; } - /** Return true if this SLODeleteResponse object is equal to o. */ + /** + * Return true if this SLODeleteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } SLODeleteResponse sloDeleteResponse = (SLODeleteResponse) o; - return Objects.equals(this.data, sloDeleteResponse.data) - && Objects.equals(this.errors, sloDeleteResponse.errors); + return Objects.equals(this.data, sloDeleteResponse.data) && Objects.equals(this.errors, sloDeleteResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOErrorTimeframe.java b/src/main/java/com/datadog/api/client/v1/model/SLOErrorTimeframe.java index d5b3b06d3fa..1ff251fa073 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOErrorTimeframe.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOErrorTimeframe.java @@ -6,22 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The timeframe of the threshold associated with this error or "all" if all thresholds are - * affected. + *

The timeframe of the threshold associated with this error + * or "all" if all thresholds are affected.

*/ @JsonSerialize(using = SLOErrorTimeframe.SLOErrorTimeframeSerializer.class) public class SLOErrorTimeframe { @@ -31,8 +53,7 @@ public class SLOErrorTimeframe { public static final SLOErrorTimeframe NINETY_DAYS = new SLOErrorTimeframe("90d"); public static final SLOErrorTimeframe ALL = new SLOErrorTimeframe("all"); - private static final Set allowedValues = - new HashSet(Arrays.asList("7d", "30d", "90d", "all")); + private static final Set allowedValues = new HashSet(Arrays.asList("7d", "30d", "90d", "all")); private String value; @@ -45,19 +66,18 @@ public boolean isValid() { } public static class SLOErrorTimeframeSerializer extends StdSerializer { - public SLOErrorTimeframeSerializer(Class t) { - super(t); - } - - public SLOErrorTimeframeSerializer() { - this(null); - } - - @Override - public void serialize(SLOErrorTimeframe value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOErrorTimeframeSerializer(Class t) { + super(t); + } + + public SLOErrorTimeframeSerializer() { + this(null); + } + + @Override + public void serialize(SLOErrorTimeframe value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOErrorTimeframe object is equal to o. */ + /** + * Return true if this SLOErrorTimeframe object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetrics.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetrics.java index 01016a11124..dcb40c29add 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetrics.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetrics.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * A metric based SLO history response. - * - *

This is not included in responses for monitor based SLOs. + *

A metric based SLO history response.

+ *

This is not included in responses for monitor based SLOs.

*/ @JsonPropertyOrder({ SLOHistoryMetrics.JSON_PROPERTY_DENOMINATOR, @@ -30,10 +44,10 @@ SLOHistoryMetrics.JSON_PROPERTY_RESP_VERSION, SLOHistoryMetrics.JSON_PROPERTY_TIMES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryMetrics { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DENOMINATOR = "denominator"; private SLOHistoryMetricsSeries denominator; @@ -62,26 +76,23 @@ public SLOHistoryMetrics() {} @JsonCreator public SLOHistoryMetrics( - @JsonProperty(required = true, value = JSON_PROPERTY_DENOMINATOR) - SLOHistoryMetricsSeries denominator, - @JsonProperty(required = true, value = JSON_PROPERTY_INTERVAL) Long interval, - @JsonProperty(required = true, value = JSON_PROPERTY_NUMERATOR) - SLOHistoryMetricsSeries numerator, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, - @JsonProperty(required = true, value = JSON_PROPERTY_RES_TYPE) String resType, - @JsonProperty(required = true, value = JSON_PROPERTY_RESP_VERSION) Long respVersion, - @JsonProperty(required = true, value = JSON_PROPERTY_TIMES) List times) { - this.denominator = denominator; - this.unparsed |= denominator.unparsed; - this.interval = interval; - this.numerator = numerator; - this.unparsed |= numerator.unparsed; - this.query = query; - this.resType = resType; - this.respVersion = respVersion; - this.times = times; + @JsonProperty(required=true, value=JSON_PROPERTY_DENOMINATOR)SLOHistoryMetricsSeries denominator, + @JsonProperty(required=true, value=JSON_PROPERTY_INTERVAL)Long interval, + @JsonProperty(required=true, value=JSON_PROPERTY_NUMERATOR)SLOHistoryMetricsSeries numerator, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query, + @JsonProperty(required=true, value=JSON_PROPERTY_RES_TYPE)String resType, + @JsonProperty(required=true, value=JSON_PROPERTY_RESP_VERSION)Long respVersion, + @JsonProperty(required=true, value=JSON_PROPERTY_TIMES)List times) { + this.denominator = denominator; + this.unparsed |= denominator.unparsed; + this.interval = interval; + this.numerator = numerator; + this.unparsed |= numerator.unparsed; + this.query = query; + this.resType = resType; + this.respVersion = respVersion; + this.times = times; } - public SLOHistoryMetrics denominator(SLOHistoryMetricsSeries denominator) { this.denominator = denominator; this.unparsed |= denominator.unparsed; @@ -89,63 +100,56 @@ public SLOHistoryMetrics denominator(SLOHistoryMetricsSeries denominator) { } /** - * A representation of metric based SLO time series for the provided queries. This is - * the same response type from batch_query endpoint. - * + *

A representation of metric based SLO time series for the provided queries. + * This is the same response type from batch_query endpoint.

* @return denominator - */ - @JsonProperty(JSON_PROPERTY_DENOMINATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOHistoryMetricsSeries getDenominator() { - return denominator; - } - + **/ + @JsonProperty(JSON_PROPERTY_DENOMINATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOHistoryMetricsSeries getDenominator() { + return denominator; + } public void setDenominator(SLOHistoryMetricsSeries denominator) { this.denominator = denominator; } - public SLOHistoryMetrics interval(Long interval) { this.interval = interval; return this; } /** - * The aggregated query interval for the series data. It's implicit based on the query time - * window. - * + *

The aggregated query interval for the series data. It's implicit based on the query time window.

* @return interval - */ - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getInterval() { - return interval; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - public SLOHistoryMetrics message(String message) { this.message = message; return this; } /** - * Optional message if there are specific query issues/warnings. - * + *

Optional message if there are specific query issues/warnings.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SLOHistoryMetrics numerator(SLOHistoryMetricsSeries numerator) { this.numerator = numerator; this.unparsed |= numerator.unparsed; @@ -153,107 +157,99 @@ public SLOHistoryMetrics numerator(SLOHistoryMetricsSeries numerator) { } /** - * A representation of metric based SLO time series for the provided queries. This is - * the same response type from batch_query endpoint. - * + *

A representation of metric based SLO time series for the provided queries. + * This is the same response type from batch_query endpoint.

* @return numerator - */ - @JsonProperty(JSON_PROPERTY_NUMERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOHistoryMetricsSeries getNumerator() { - return numerator; - } - + **/ + @JsonProperty(JSON_PROPERTY_NUMERATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOHistoryMetricsSeries getNumerator() { + return numerator; + } public void setNumerator(SLOHistoryMetricsSeries numerator) { this.numerator = numerator; } - public SLOHistoryMetrics query(String query) { this.query = query; return this; } /** - * The combined numerator and denominator query CSV. - * + *

The combined numerator and denominator query CSV.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public SLOHistoryMetrics resType(String resType) { this.resType = resType; return this; } /** - * The series result type. This mimics batch_query response type. - * + *

The series result type. This mimics batch_query response type.

* @return resType - */ - @JsonProperty(JSON_PROPERTY_RES_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getResType() { - return resType; - } - + **/ + @JsonProperty(JSON_PROPERTY_RES_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getResType() { + return resType; + } public void setResType(String resType) { this.resType = resType; } - public SLOHistoryMetrics respVersion(Long respVersion) { this.respVersion = respVersion; return this; } /** - * The series response version type. This mimics batch_query response type. - * + *

The series response version type. This mimics batch_query response type.

* @return respVersion - */ - @JsonProperty(JSON_PROPERTY_RESP_VERSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getRespVersion() { - return respVersion; - } - + **/ + @JsonProperty(JSON_PROPERTY_RESP_VERSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getRespVersion() { + return respVersion; + } public void setRespVersion(Long respVersion) { this.respVersion = respVersion; } - public SLOHistoryMetrics times(List times) { this.times = times; return this; } - public SLOHistoryMetrics addTimesItem(Double timesItem) { this.times.add(timesItem); return this; } /** - * An array of query timestamps in EPOCH milliseconds. - * + *

An array of query timestamps in EPOCH milliseconds.

* @return times - */ - @JsonProperty(JSON_PROPERTY_TIMES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTimes() { - return times; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIMES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTimes() { + return times; + } public void setTimes(List times) { this.times = times; } - /** Return true if this SLOHistoryMetrics object is equal to o. */ + /** + * Return true if this SLOHistoryMetrics object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -263,20 +259,13 @@ public boolean equals(Object o) { return false; } SLOHistoryMetrics sloHistoryMetrics = (SLOHistoryMetrics) o; - return Objects.equals(this.denominator, sloHistoryMetrics.denominator) - && Objects.equals(this.interval, sloHistoryMetrics.interval) - && Objects.equals(this.message, sloHistoryMetrics.message) - && Objects.equals(this.numerator, sloHistoryMetrics.numerator) - && Objects.equals(this.query, sloHistoryMetrics.query) - && Objects.equals(this.resType, sloHistoryMetrics.resType) - && Objects.equals(this.respVersion, sloHistoryMetrics.respVersion) - && Objects.equals(this.times, sloHistoryMetrics.times); + return Objects.equals(this.denominator, sloHistoryMetrics.denominator) && Objects.equals(this.interval, sloHistoryMetrics.interval) && Objects.equals(this.message, sloHistoryMetrics.message) && Objects.equals(this.numerator, sloHistoryMetrics.numerator) && Objects.equals(this.query, sloHistoryMetrics.query) && Objects.equals(this.resType, sloHistoryMetrics.resType) && Objects.equals(this.respVersion, sloHistoryMetrics.respVersion) && Objects.equals(this.times, sloHistoryMetrics.times); } + @Override public int hashCode() { - return Objects.hash( - denominator, interval, message, numerator, query, resType, respVersion, times); + return Objects.hash(denominator,interval,message,numerator,query,resType,respVersion,times); } @Override @@ -296,7 +285,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeries.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeries.java index 1a15c054b3a..f4cae7a3dc2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeries.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeries.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * A representation of metric based SLO time series for the provided queries. This is - * the same response type from batch_query endpoint. + *

A representation of metric based SLO time series for the provided queries. + * This is the same response type from batch_query endpoint.

*/ @JsonPropertyOrder({ SLOHistoryMetricsSeries.JSON_PROPERTY_COUNT, @@ -25,10 +40,10 @@ SLOHistoryMetricsSeries.JSON_PROPERTY_SUM, SLOHistoryMetricsSeries.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryMetricsSeries { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Long count; @@ -45,34 +60,31 @@ public SLOHistoryMetricsSeries() {} @JsonCreator public SLOHistoryMetricsSeries( - @JsonProperty(required = true, value = JSON_PROPERTY_COUNT) Long count, - @JsonProperty(required = true, value = JSON_PROPERTY_SUM) Double sum, - @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { - this.count = count; - this.sum = sum; - this.values = values; + @JsonProperty(required=true, value=JSON_PROPERTY_COUNT)Long count, + @JsonProperty(required=true, value=JSON_PROPERTY_SUM)Double sum, + @JsonProperty(required=true, value=JSON_PROPERTY_VALUES)List values) { + this.count = count; + this.sum = sum; + this.values = values; } - public SLOHistoryMetricsSeries count(Long count) { this.count = count; return this; } /** - * Count of submitted metrics. - * + *

Count of submitted metrics.

* @return count - */ - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getCount() { - return count; - } - + **/ + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getCount() { + return count; + } public void setCount(Long count) { this.count = count; } - public SLOHistoryMetricsSeries metadata(SLOHistoryMetricsSeriesMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -80,67 +92,63 @@ public SLOHistoryMetricsSeries metadata(SLOHistoryMetricsSeriesMetadata metadata } /** - * Query metadata. - * + *

Query metadata.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOHistoryMetricsSeriesMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOHistoryMetricsSeriesMetadata getMetadata() { + return metadata; + } public void setMetadata(SLOHistoryMetricsSeriesMetadata metadata) { this.metadata = metadata; } - public SLOHistoryMetricsSeries sum(Double sum) { this.sum = sum; return this; } /** - * Total sum of the query. - * + *

Total sum of the query.

* @return sum - */ - @JsonProperty(JSON_PROPERTY_SUM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getSum() { - return sum; - } - + **/ + @JsonProperty(JSON_PROPERTY_SUM) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getSum() { + return sum; + } public void setSum(Double sum) { this.sum = sum; } - public SLOHistoryMetricsSeries values(List values) { this.values = values; return this; } - public SLOHistoryMetricsSeries addValuesItem(Double valuesItem) { this.values.add(valuesItem); return this; } /** - * The query values for each metric. - * + *

The query values for each metric.

* @return values - */ - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getValues() { - return values; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } public void setValues(List values) { this.values = values; } - /** Return true if this SLOHistoryMetricsSeries object is equal to o. */ + /** + * Return true if this SLOHistoryMetricsSeries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -150,15 +158,13 @@ public boolean equals(Object o) { return false; } SLOHistoryMetricsSeries sloHistoryMetricsSeries = (SLOHistoryMetricsSeries) o; - return Objects.equals(this.count, sloHistoryMetricsSeries.count) - && Objects.equals(this.metadata, sloHistoryMetricsSeries.metadata) - && Objects.equals(this.sum, sloHistoryMetricsSeries.sum) - && Objects.equals(this.values, sloHistoryMetricsSeries.values); + return Objects.equals(this.count, sloHistoryMetricsSeries.count) && Objects.equals(this.metadata, sloHistoryMetricsSeries.metadata) && Objects.equals(this.sum, sloHistoryMetricsSeries.sum) && Objects.equals(this.values, sloHistoryMetricsSeries.values); } + @Override public int hashCode() { - return Objects.hash(count, metadata, sum, values); + return Objects.hash(count,metadata,sum,values); } @Override @@ -174,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadata.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadata.java index 2fcfded086d..04b02db20f9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadata.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Query metadata. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Query metadata.

+ */ @JsonPropertyOrder({ SLOHistoryMetricsSeriesMetadata.JSON_PROPERTY_AGGR, SLOHistoryMetricsSeriesMetadata.JSON_PROPERTY_EXPRESSION, @@ -24,10 +41,10 @@ SLOHistoryMetricsSeriesMetadata.JSON_PROPERTY_SCOPE, SLOHistoryMetricsSeriesMetadata.JSON_PROPERTY_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryMetricsSeriesMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGR = "aggr"; private String aggr; @@ -44,8 +61,7 @@ public class SLOHistoryMetricsSeriesMetadata { private String scope; public static final String JSON_PROPERTY_UNIT = "unit"; - private JsonNullable> unit = - JsonNullable.>undefined(); + private JsonNullable> unit = JsonNullable.>undefined(); public SLOHistoryMetricsSeriesMetadata aggr(String aggr) { this.aggr = aggr; @@ -53,110 +69,99 @@ public SLOHistoryMetricsSeriesMetadata aggr(String aggr) { } /** - * Query aggregator function. - * + *

Query aggregator function.

* @return aggr - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAggr() { - return aggr; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAggr() { + return aggr; + } public void setAggr(String aggr) { this.aggr = aggr; } - public SLOHistoryMetricsSeriesMetadata expression(String expression) { this.expression = expression; return this; } /** - * Query expression. - * + *

Query expression.

* @return expression - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExpression() { - return expression; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExpression() { + return expression; + } public void setExpression(String expression) { this.expression = expression; } - public SLOHistoryMetricsSeriesMetadata metric(String metric) { this.metric = metric; return this; } /** - * Query metric used. - * + *

Query metric used.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public SLOHistoryMetricsSeriesMetadata queryIndex(Long queryIndex) { this.queryIndex = queryIndex; return this; } /** - * Query index from original combined query. - * + *

Query index from original combined query.

* @return queryIndex - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getQueryIndex() { - return queryIndex; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getQueryIndex() { + return queryIndex; + } public void setQueryIndex(Long queryIndex) { this.queryIndex = queryIndex; } - public SLOHistoryMetricsSeriesMetadata scope(String scope) { this.scope = scope; return this; } /** - * Query scope. - * + *

Query scope.

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScope() { - return scope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } public void setScope(String scope) { this.scope = scope; } - public SLOHistoryMetricsSeriesMetadata unit(List unit) { this.unit = JsonNullable.>of(unit); return this; } - public SLOHistoryMetricsSeriesMetadata addUnitItem(SLOHistoryMetricsSeriesMetadataUnit unitItem) { if (this.unit == null || !this.unit.isPresent()) { this.unit = JsonNullable.>of(new ArrayList<>()); @@ -170,34 +175,32 @@ public SLOHistoryMetricsSeriesMetadata addUnitItem(SLOHistoryMetricsSeriesMetada } /** - * An array of metric units that contains up to two unit objects. For example, bytes represents - * one unit object and bytes per second represents two unit objects. If a metric query only has - * one unit object, the second array element is null. - * + *

An array of metric units that contains up to two unit objects. + * For example, bytes represents one unit object and bytes per second represents two unit objects. + * If a metric query only has one unit object, the second array element is null.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getUnit() { - return unit.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getUnit() { + return unit.orElse(null); + } @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getUnit_JsonNullable() { return unit; } - - @JsonProperty(JSON_PROPERTY_UNIT) - public void setUnit_JsonNullable(JsonNullable> unit) { + @JsonProperty(JSON_PROPERTY_UNIT)public void setUnit_JsonNullable(JsonNullable> unit) { this.unit = unit; } - public void setUnit(List unit) { this.unit = JsonNullable.>of(unit); } - /** Return true if this SLOHistoryMetricsSeriesMetadata object is equal to o. */ + /** + * Return true if this SLOHistoryMetricsSeriesMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -206,19 +209,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOHistoryMetricsSeriesMetadata sloHistoryMetricsSeriesMetadata = - (SLOHistoryMetricsSeriesMetadata) o; - return Objects.equals(this.aggr, sloHistoryMetricsSeriesMetadata.aggr) - && Objects.equals(this.expression, sloHistoryMetricsSeriesMetadata.expression) - && Objects.equals(this.metric, sloHistoryMetricsSeriesMetadata.metric) - && Objects.equals(this.queryIndex, sloHistoryMetricsSeriesMetadata.queryIndex) - && Objects.equals(this.scope, sloHistoryMetricsSeriesMetadata.scope) - && Objects.equals(this.unit, sloHistoryMetricsSeriesMetadata.unit); + SLOHistoryMetricsSeriesMetadata sloHistoryMetricsSeriesMetadata = (SLOHistoryMetricsSeriesMetadata) o; + return Objects.equals(this.aggr, sloHistoryMetricsSeriesMetadata.aggr) && Objects.equals(this.expression, sloHistoryMetricsSeriesMetadata.expression) && Objects.equals(this.metric, sloHistoryMetricsSeriesMetadata.metric) && Objects.equals(this.queryIndex, sloHistoryMetricsSeriesMetadata.queryIndex) && Objects.equals(this.scope, sloHistoryMetricsSeriesMetadata.scope) && Objects.equals(this.unit, sloHistoryMetricsSeriesMetadata.unit); } + @Override public int hashCode() { - return Objects.hash(aggr, expression, metric, queryIndex, scope, unit); + return Objects.hash(aggr,expression,metric,queryIndex,scope,unit); } @Override @@ -236,7 +234,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadataUnit.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadataUnit.java index 06767b4cf78..4b573eb7e64 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadataUnit.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMetricsSeriesMetadataUnit.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** An Object of metric units. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

An Object of metric units.

+ */ @JsonPropertyOrder({ SLOHistoryMetricsSeriesMetadataUnit.JSON_PROPERTY_FAMILY, SLOHistoryMetricsSeriesMetadataUnit.JSON_PROPERTY_ID, @@ -22,10 +41,10 @@ SLOHistoryMetricsSeriesMetadataUnit.JSON_PROPERTY_SCALE_FACTOR, SLOHistoryMetricsSeriesMetadataUnit.JSON_PROPERTY_SHORT_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryMetricsSeriesMetadataUnit { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FAMILY = "family"; private String family; @@ -50,148 +69,132 @@ public SLOHistoryMetricsSeriesMetadataUnit family(String family) { } /** - * The family of metric unit, for example bytes is the family for kibibyte - * , byte, and bit units. - * + *

The family of metric unit, for example bytes is the family for kibibyte, byte, and bit units.

* @return family - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFamily() { - return family; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAMILY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFamily() { + return family; + } public void setFamily(String family) { this.family = family; } - public SLOHistoryMetricsSeriesMetadataUnit id(Long id) { this.id = id; return this; } /** - * The ID of the metric unit. - * + *

The ID of the metric unit.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public SLOHistoryMetricsSeriesMetadataUnit name(String name) { this.name = name; return this; } /** - * The unit of the metric, for instance byte. - * + *

The unit of the metric, for instance byte.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SLOHistoryMetricsSeriesMetadataUnit plural(String plural) { this.plural = JsonNullable.of(plural); return this; } /** - * The plural Unit of metric, for instance bytes. - * + *

The plural Unit of metric, for instance bytes.

* @return plural - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getPlural() { - return plural.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPlural() { + return plural.orElse(null); + } @JsonProperty(JSON_PROPERTY_PLURAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPlural_JsonNullable() { return plural; } - - @JsonProperty(JSON_PROPERTY_PLURAL) - public void setPlural_JsonNullable(JsonNullable plural) { + @JsonProperty(JSON_PROPERTY_PLURAL)public void setPlural_JsonNullable(JsonNullable plural) { this.plural = plural; } - public void setPlural(String plural) { this.plural = JsonNullable.of(plural); } - public SLOHistoryMetricsSeriesMetadataUnit scaleFactor(Double scaleFactor) { this.scaleFactor = scaleFactor; return this; } /** - * The scale factor of metric unit, for instance 1.0. - * + *

The scale factor of metric unit, for instance 1.0.

* @return scaleFactor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCALE_FACTOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getScaleFactor() { - return scaleFactor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCALE_FACTOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getScaleFactor() { + return scaleFactor; + } public void setScaleFactor(Double scaleFactor) { this.scaleFactor = scaleFactor; } - public SLOHistoryMetricsSeriesMetadataUnit shortName(String shortName) { this.shortName = JsonNullable.of(shortName); return this; } /** - * A shorter and abbreviated version of the metric unit, for instance B. - * + *

A shorter and abbreviated version of the metric unit, for instance B.

* @return shortName - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getShortName() { - return shortName.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getShortName() { + return shortName.orElse(null); + } @JsonProperty(JSON_PROPERTY_SHORT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getShortName_JsonNullable() { return shortName; } - - @JsonProperty(JSON_PROPERTY_SHORT_NAME) - public void setShortName_JsonNullable(JsonNullable shortName) { + @JsonProperty(JSON_PROPERTY_SHORT_NAME)public void setShortName_JsonNullable(JsonNullable shortName) { this.shortName = shortName; } - public void setShortName(String shortName) { this.shortName = JsonNullable.of(shortName); } - /** Return true if this SLOHistoryMetricsSeriesMetadataUnit object is equal to o. */ + /** + * Return true if this SLOHistoryMetricsSeriesMetadataUnit object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -200,19 +203,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOHistoryMetricsSeriesMetadataUnit sloHistoryMetricsSeriesMetadataUnit = - (SLOHistoryMetricsSeriesMetadataUnit) o; - return Objects.equals(this.family, sloHistoryMetricsSeriesMetadataUnit.family) - && Objects.equals(this.id, sloHistoryMetricsSeriesMetadataUnit.id) - && Objects.equals(this.name, sloHistoryMetricsSeriesMetadataUnit.name) - && Objects.equals(this.plural, sloHistoryMetricsSeriesMetadataUnit.plural) - && Objects.equals(this.scaleFactor, sloHistoryMetricsSeriesMetadataUnit.scaleFactor) - && Objects.equals(this.shortName, sloHistoryMetricsSeriesMetadataUnit.shortName); + SLOHistoryMetricsSeriesMetadataUnit sloHistoryMetricsSeriesMetadataUnit = (SLOHistoryMetricsSeriesMetadataUnit) o; + return Objects.equals(this.family, sloHistoryMetricsSeriesMetadataUnit.family) && Objects.equals(this.id, sloHistoryMetricsSeriesMetadataUnit.id) && Objects.equals(this.name, sloHistoryMetricsSeriesMetadataUnit.name) && Objects.equals(this.plural, sloHistoryMetricsSeriesMetadataUnit.plural) && Objects.equals(this.scaleFactor, sloHistoryMetricsSeriesMetadataUnit.scaleFactor) && Objects.equals(this.shortName, sloHistoryMetricsSeriesMetadataUnit.shortName); } + @Override public int hashCode() { - return Objects.hash(family, id, name, plural, scaleFactor, shortName); + return Objects.hash(family,id,name,plural,scaleFactor,shortName); } @Override @@ -230,7 +228,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMonitor.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMonitor.java index 9f15fee4012..2e57e21497e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMonitor.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryMonitor.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI - * value. This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a - * group in grouped SLOs. + *

An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. + * This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs.

*/ @JsonPropertyOrder({ SLOHistoryMonitor.JSON_PROPERTY_ERROR_BUDGET_REMAINING, @@ -35,10 +48,10 @@ SLOHistoryMonitor.JSON_PROPERTY_SPAN_PRECISION, SLOHistoryMonitor.JSON_PROPERTY_UPTIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryMonitor { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR_BUDGET_REMAINING = "error_budget_remaining"; private Map errorBudgetRemaining = null; @@ -79,9 +92,7 @@ public SLOHistoryMonitor errorBudgetRemaining(Map errorBudgetRem this.errorBudgetRemaining = errorBudgetRemaining; return this; } - - public SLOHistoryMonitor putErrorBudgetRemainingItem( - String key, Double errorBudgetRemainingItem) { + public SLOHistoryMonitor putErrorBudgetRemainingItem(String key, Double errorBudgetRemainingItem) { if (this.errorBudgetRemaining == null) { this.errorBudgetRemaining = new HashMap<>(); } @@ -90,21 +101,19 @@ public SLOHistoryMonitor putErrorBudgetRemainingItem( } /** - * A mapping of threshold timeframe to the remaining error budget. - * + *

A mapping of threshold timeframe to the remaining error budget.

* @return errorBudgetRemaining - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getErrorBudgetRemaining() { - return errorBudgetRemaining; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrorBudgetRemaining() { + return errorBudgetRemaining; + } public void setErrorBudgetRemaining(Map errorBudgetRemaining) { this.errorBudgetRemaining = errorBudgetRemaining; } - public SLOHistoryMonitor errors(List errors) { this.errors = errors; for (SLOHistoryResponseErrorWithType item : errors) { @@ -112,7 +121,6 @@ public SLOHistoryMonitor errors(List errors) { } return this; } - public SLOHistoryMonitor addErrorsItem(SLOHistoryResponseErrorWithType errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -123,48 +131,42 @@ public SLOHistoryMonitor addErrorsItem(SLOHistoryResponseErrorWithType errorsIte } /** - * An array of error objects returned while querying the history data for the service level - * objective. - * + *

An array of error objects returned while querying the history data for the service level objective.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - public SLOHistoryMonitor group(String group) { this.group = group; return this; } /** - * For groups in a grouped SLO, this is the group name. - * + *

For groups in a grouped SLO, this is the group name.

* @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } public void setGroup(String group) { this.group = group; } - public SLOHistoryMonitor history(List> history) { this.history = history; return this; } - public SLOHistoryMonitor addHistoryItem(List historyItem) { if (this.history == null) { this.history = new ArrayList<>(); @@ -174,203 +176,182 @@ public SLOHistoryMonitor addHistoryItem(List historyItem) { } /** - * For monitor based SLOs, this includes the aggregated history as arrays that - * include time series and uptime data where 0=monitor is in OK state - * and 1=monitor is in alert state. - * + *

For monitor based SLOs, this includes the aggregated history as arrays that include time series and uptime data where 0=monitor is in OK state and 1=monitor is in alert state.

* @return history - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HISTORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getHistory() { - return history; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HISTORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List> getHistory() { + return history; + } public void setHistory(List> history) { this.history = history; } - public SLOHistoryMonitor monitorModified(Long monitorModified) { this.monitorModified = monitorModified; return this; } /** - * For monitor based SLOs, this is the last modified timestamp in epoch seconds of - * the monitor. - * + *

For monitor based SLOs, this is the last modified timestamp in epoch seconds of the monitor.

* @return monitorModified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonitorModified() { - return monitorModified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorModified() { + return monitorModified; + } public void setMonitorModified(Long monitorModified) { this.monitorModified = monitorModified; } - public SLOHistoryMonitor monitorType(String monitorType) { this.monitorType = monitorType; return this; } /** - * For monitor based SLOs, this describes the type of monitor. - * + *

For monitor based SLOs, this describes the type of monitor.

* @return monitorType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMonitorType() { - return monitorType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMonitorType() { + return monitorType; + } public void setMonitorType(String monitorType) { this.monitorType = monitorType; } - public SLOHistoryMonitor name(String name) { this.name = name; return this; } /** - * For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this - * is the monitor name. - * + *

For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this is the monitor name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SLOHistoryMonitor precision(Double precision) { this.precision = precision; return this; } /** - * The amount of decimal places the SLI value is accurate to for the given from && - * to timestamp. Use span_precision instead. - * + *

The amount of decimal places the SLI value is accurate to for the given from && to timestamp. Use span_precision instead.

* @return precision * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getPrecision() { - return precision; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRECISION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getPrecision() { + return precision; + } @Deprecated public void setPrecision(Double precision) { this.precision = precision; } - public SLOHistoryMonitor preview(Boolean preview) { this.preview = preview; return this; } /** - * For monitor based SLOs, when true this indicates that a replay is in - * progress to give an accurate uptime calculation. - * + *

For monitor based SLOs, when true this indicates that a replay is in progress to give an accurate uptime + * calculation.

* @return preview - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPreview() { - return preview; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPreview() { + return preview; + } public void setPreview(Boolean preview) { this.preview = preview; } - public SLOHistoryMonitor sliValue(Double sliValue) { this.sliValue = sliValue; return this; } /** - * The current SLI value of the SLO over the history window. - * + *

The current SLI value of the SLO over the history window.

* @return sliValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLI_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSliValue() { - return sliValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLI_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSliValue() { + return sliValue; + } public void setSliValue(Double sliValue) { this.sliValue = sliValue; } - public SLOHistoryMonitor spanPrecision(Double spanPrecision) { this.spanPrecision = spanPrecision; return this; } /** - * The amount of decimal places the SLI value is accurate to for the given from && - * to timestamp. - * + *

The amount of decimal places the SLI value is accurate to for the given from && to timestamp.

* @return spanPrecision - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSpanPrecision() { - return spanPrecision; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSpanPrecision() { + return spanPrecision; + } public void setSpanPrecision(Double spanPrecision) { this.spanPrecision = spanPrecision; } - public SLOHistoryMonitor uptime(Double uptime) { this.uptime = uptime; return this; } /** - * Use sli_value instead. - * + *

Use sli_value instead.

* @return uptime * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPTIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getUptime() { - return uptime; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPTIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getUptime() { + return uptime; + } @Deprecated public void setUptime(Double uptime) { this.uptime = uptime; } - /** Return true if this SLOHistoryMonitor object is equal to o. */ + /** + * Return true if this SLOHistoryMonitor object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -380,44 +361,20 @@ public boolean equals(Object o) { return false; } SLOHistoryMonitor sloHistoryMonitor = (SLOHistoryMonitor) o; - return Objects.equals(this.errorBudgetRemaining, sloHistoryMonitor.errorBudgetRemaining) - && Objects.equals(this.errors, sloHistoryMonitor.errors) - && Objects.equals(this.group, sloHistoryMonitor.group) - && Objects.equals(this.history, sloHistoryMonitor.history) - && Objects.equals(this.monitorModified, sloHistoryMonitor.monitorModified) - && Objects.equals(this.monitorType, sloHistoryMonitor.monitorType) - && Objects.equals(this.name, sloHistoryMonitor.name) - && Objects.equals(this.precision, sloHistoryMonitor.precision) - && Objects.equals(this.preview, sloHistoryMonitor.preview) - && Objects.equals(this.sliValue, sloHistoryMonitor.sliValue) - && Objects.equals(this.spanPrecision, sloHistoryMonitor.spanPrecision) - && Objects.equals(this.uptime, sloHistoryMonitor.uptime); + return Objects.equals(this.errorBudgetRemaining, sloHistoryMonitor.errorBudgetRemaining) && Objects.equals(this.errors, sloHistoryMonitor.errors) && Objects.equals(this.group, sloHistoryMonitor.group) && Objects.equals(this.history, sloHistoryMonitor.history) && Objects.equals(this.monitorModified, sloHistoryMonitor.monitorModified) && Objects.equals(this.monitorType, sloHistoryMonitor.monitorType) && Objects.equals(this.name, sloHistoryMonitor.name) && Objects.equals(this.precision, sloHistoryMonitor.precision) && Objects.equals(this.preview, sloHistoryMonitor.preview) && Objects.equals(this.sliValue, sloHistoryMonitor.sliValue) && Objects.equals(this.spanPrecision, sloHistoryMonitor.spanPrecision) && Objects.equals(this.uptime, sloHistoryMonitor.uptime); } + @Override public int hashCode() { - return Objects.hash( - errorBudgetRemaining, - errors, - group, - history, - monitorModified, - monitorType, - name, - precision, - preview, - sliValue, - spanPrecision, - uptime); + return Objects.hash(errorBudgetRemaining,errors,group,history,monitorModified,monitorType,name,precision,preview,sliValue,spanPrecision,uptime); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SLOHistoryMonitor {\n"); - sb.append(" errorBudgetRemaining: ") - .append(toIndentedString(errorBudgetRemaining)) - .append("\n"); + sb.append(" errorBudgetRemaining: ").append(toIndentedString(errorBudgetRemaining)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append(" history: ").append(toIndentedString(history)).append("\n"); @@ -434,7 +391,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponse.java index 11de70fda4e..6e09486c9db 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A service level objective history response. */ -@JsonPropertyOrder({SLOHistoryResponse.JSON_PROPERTY_DATA, SLOHistoryResponse.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

A service level objective history response.

+ */ +@JsonPropertyOrder({ + SLOHistoryResponse.JSON_PROPERTY_DATA, + SLOHistoryResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SLOHistoryResponseData data; @@ -33,21 +54,19 @@ public SLOHistoryResponse data(SLOHistoryResponseData data) { } /** - * An array of service level objective objects. - * + *

An array of service level objective objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOHistoryResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOHistoryResponseData getData() { + return data; + } public void setData(SLOHistoryResponseData data) { this.data = data; } - public SLOHistoryResponse errors(List errors) { this.errors = errors; for (SLOHistoryResponseError item : errors) { @@ -55,7 +74,6 @@ public SLOHistoryResponse errors(List errors) { } return this; } - public SLOHistoryResponse addErrorsItem(SLOHistoryResponseError errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -66,22 +84,23 @@ public SLOHistoryResponse addErrorsItem(SLOHistoryResponseError errorsItem) { } /** - * A list of errors while querying the history data for the service level objective. - * + *

A list of errors while querying the history data for the service level objective.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this SLOHistoryResponse object is equal to o. */ + /** + * Return true if this SLOHistoryResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +110,13 @@ public boolean equals(Object o) { return false; } SLOHistoryResponse sloHistoryResponse = (SLOHistoryResponse) o; - return Objects.equals(this.data, sloHistoryResponse.data) - && Objects.equals(this.errors, sloHistoryResponse.errors); + return Objects.equals(this.data, sloHistoryResponse.data) && Objects.equals(this.errors, sloHistoryResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -111,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseData.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseData.java index 5e7d448d12d..9781c4d735a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseData.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** An array of service level objective objects. */ + +/** + *

An array of service level objective objects.

+ */ @JsonPropertyOrder({ SLOHistoryResponseData.JSON_PROPERTY_FROM_TS, SLOHistoryResponseData.JSON_PROPERTY_GROUP_BY, @@ -29,10 +45,10 @@ SLOHistoryResponseData.JSON_PROPERTY_TYPE, SLOHistoryResponseData.JSON_PROPERTY_TYPE_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM_TS = "from_ts"; private Long fromTs; @@ -69,26 +85,23 @@ public SLOHistoryResponseData fromTs(Long fromTs) { } /** - * The from timestamp in epoch seconds. - * + *

The from timestamp in epoch seconds.

* @return fromTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFromTs() { - return fromTs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFromTs() { + return fromTs; + } public void setFromTs(Long fromTs) { this.fromTs = fromTs; } - public SLOHistoryResponseData groupBy(List groupBy) { this.groupBy = groupBy; return this; } - public SLOHistoryResponseData addGroupByItem(String groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -98,24 +111,20 @@ public SLOHistoryResponseData addGroupByItem(String groupByItem) { } /** - * For metric based SLOs where the query includes a group-by clause, this represents - * the list of grouping parameters. - * - *

This is not included in responses for monitor based SLOs. - * + *

For metric based SLOs where the query includes a group-by clause, this represents the list of grouping parameters.

+ *

This is not included in responses for monitor based SLOs.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public SLOHistoryResponseData groups(List groups) { this.groups = groups; for (SLOHistoryMonitor item : groups) { @@ -123,7 +132,6 @@ public SLOHistoryResponseData groups(List groups) { } return this; } - public SLOHistoryResponseData addGroupsItem(SLOHistoryMonitor groupsItem) { if (this.groups == null) { this.groups = new ArrayList<>(); @@ -134,23 +142,20 @@ public SLOHistoryResponseData addGroupsItem(SLOHistoryMonitor groupsItem) { } /** - * For grouped SLOs, this represents SLI data for specific groups. - * - *

This is not included in the responses for metric based SLOs. - * + *

For grouped SLOs, this represents SLI data for specific groups.

+ *

This is not included in the responses for metric based SLOs.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } public void setGroups(List groups) { this.groups = groups; } - public SLOHistoryResponseData monitors(List monitors) { this.monitors = monitors; for (SLOHistoryMonitor item : monitors) { @@ -158,7 +163,6 @@ public SLOHistoryResponseData monitors(List monitors) { } return this; } - public SLOHistoryResponseData addMonitorsItem(SLOHistoryMonitor monitorsItem) { if (this.monitors == null) { this.monitors = new ArrayList<>(); @@ -169,23 +173,20 @@ public SLOHistoryResponseData addMonitorsItem(SLOHistoryMonitor monitorsItem) { } /** - * For multi-monitor SLOs, this represents SLI data for specific monitors. - * - *

This is not included in the responses for metric based SLOs. - * + *

For multi-monitor SLOs, this represents SLI data for specific monitors.

+ *

This is not included in the responses for metric based SLOs.

* @return monitors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitors() { - return monitors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitors() { + return monitors; + } public void setMonitors(List monitors) { this.monitors = monitors; } - public SLOHistoryResponseData overall(SLOHistorySLIData overall) { this.overall = overall; this.unparsed |= overall.unparsed; @@ -193,23 +194,20 @@ public SLOHistoryResponseData overall(SLOHistorySLIData overall) { } /** - * An object that holds an SLI value and its associated data. It can represent an SLO's overall - * SLI value. This can also represent the SLI value for a specific monitor in multi-monitor SLOs, - * or a group in grouped SLOs. - * + *

An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. + * This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs.

* @return overall - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERALL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOHistorySLIData getOverall() { - return overall; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOHistorySLIData getOverall() { + return overall; + } public void setOverall(SLOHistorySLIData overall) { this.overall = overall; } - public SLOHistoryResponseData series(SLOHistoryMetrics series) { this.series = series; this.unparsed |= series.unparsed; @@ -217,28 +215,24 @@ public SLOHistoryResponseData series(SLOHistoryMetrics series) { } /** - * A metric based SLO history response. - * - *

This is not included in responses for monitor based SLOs. - * + *

A metric based SLO history response.

+ *

This is not included in responses for monitor based SLOs.

* @return series - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOHistoryMetrics getSeries() { - return series; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOHistoryMetrics getSeries() { + return series; + } public void setSeries(SLOHistoryMetrics series) { this.series = series; } - public SLOHistoryResponseData thresholds(Map thresholds) { this.thresholds = thresholds; return this; } - public SLOHistoryResponseData putThresholdsItem(String key, SLOThreshold thresholdsItem) { if (this.thresholds == null) { this.thresholds = new HashMap<>(); @@ -248,42 +242,38 @@ public SLOHistoryResponseData putThresholdsItem(String key, SLOThreshold thresho } /** - * mapping of string timeframe to the SLO threshold. - * + *

mapping of string timeframe to the SLO threshold.

* @return thresholds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_THRESHOLDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getThresholds() { - return thresholds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THRESHOLDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getThresholds() { + return thresholds; + } public void setThresholds(Map thresholds) { this.thresholds = thresholds; } - public SLOHistoryResponseData toTs(Long toTs) { this.toTs = toTs; return this; } /** - * The to timestamp in epoch seconds. - * + *

The to timestamp in epoch seconds.

* @return toTs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO_TS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getToTs() { - return toTs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_TS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getToTs() { + return toTs; + } public void setToTs(Long toTs) { this.toTs = toTs; } - public SLOHistoryResponseData type(SLOType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -291,24 +281,22 @@ public SLOHistoryResponseData type(SLOType type) { } /** - * The type of the service level objective. - * + *

The type of the service level objective.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOType getType() { + return type; + } public void setType(SLOType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SLOHistoryResponseData typeId(SLOTypeNumeric typeId) { this.typeId = typeId; this.unparsed |= !typeId.isValid(); @@ -316,27 +304,28 @@ public SLOHistoryResponseData typeId(SLOTypeNumeric typeId) { } /** - * A numeric representation of the type of the service level objective (0 for + *

A numeric representation of the type of the service level objective (0 for * monitor, 1 for metric). Always included in service level objective responses. - * Ignored in create/update requests. - * + * Ignored in create/update requests.

* @return typeId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOTypeNumeric getTypeId() { - return typeId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOTypeNumeric getTypeId() { + return typeId; + } public void setTypeId(SLOTypeNumeric typeId) { if (!typeId.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.typeId = typeId; } - /** Return true if this SLOHistoryResponseData object is equal to o. */ + /** + * Return true if this SLOHistoryResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -346,22 +335,13 @@ public boolean equals(Object o) { return false; } SLOHistoryResponseData sloHistoryResponseData = (SLOHistoryResponseData) o; - return Objects.equals(this.fromTs, sloHistoryResponseData.fromTs) - && Objects.equals(this.groupBy, sloHistoryResponseData.groupBy) - && Objects.equals(this.groups, sloHistoryResponseData.groups) - && Objects.equals(this.monitors, sloHistoryResponseData.monitors) - && Objects.equals(this.overall, sloHistoryResponseData.overall) - && Objects.equals(this.series, sloHistoryResponseData.series) - && Objects.equals(this.thresholds, sloHistoryResponseData.thresholds) - && Objects.equals(this.toTs, sloHistoryResponseData.toTs) - && Objects.equals(this.type, sloHistoryResponseData.type) - && Objects.equals(this.typeId, sloHistoryResponseData.typeId); + return Objects.equals(this.fromTs, sloHistoryResponseData.fromTs) && Objects.equals(this.groupBy, sloHistoryResponseData.groupBy) && Objects.equals(this.groups, sloHistoryResponseData.groups) && Objects.equals(this.monitors, sloHistoryResponseData.monitors) && Objects.equals(this.overall, sloHistoryResponseData.overall) && Objects.equals(this.series, sloHistoryResponseData.series) && Objects.equals(this.thresholds, sloHistoryResponseData.thresholds) && Objects.equals(this.toTs, sloHistoryResponseData.toTs) && Objects.equals(this.type, sloHistoryResponseData.type) && Objects.equals(this.typeId, sloHistoryResponseData.typeId); } + @Override public int hashCode() { - return Objects.hash( - fromTs, groupBy, groups, monitors, overall, series, thresholds, toTs, type, typeId); + return Objects.hash(fromTs,groupBy,groups,monitors,overall,series,thresholds,toTs,type,typeId); } @Override @@ -383,7 +363,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseError.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseError.java index aeb05c16ba0..7ef592100c3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseError.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseError.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A list of errors while querying the history data for the service level objective. */ -@JsonPropertyOrder({SLOHistoryResponseError.JSON_PROPERTY_ERROR}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A list of errors while querying the history data for the service level objective.

+ */ +@JsonPropertyOrder({ + SLOHistoryResponseError.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryResponseError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR = "error"; private String error; @@ -27,22 +49,23 @@ public SLOHistoryResponseError error(String error) { } /** - * Human readable error. - * + *

Human readable error.

* @return error - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getError() { - return error; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } public void setError(String error) { this.error = error; } - /** Return true if this SLOHistoryResponseError object is equal to o. */ + /** + * Return true if this SLOHistoryResponseError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.error, sloHistoryResponseError.error); } + @Override public int hashCode() { return Objects.hash(error); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseErrorWithType.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseErrorWithType.java index 83b8590bb90..a06094b9d20 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseErrorWithType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistoryResponseErrorWithType.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** An object describing the error with error type and error message. */ + +/** + *

An object describing the error with error type and error message.

+ */ @JsonPropertyOrder({ SLOHistoryResponseErrorWithType.JSON_PROPERTY_ERROR_MESSAGE, SLOHistoryResponseErrorWithType.JSON_PROPERTY_ERROR_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistoryResponseErrorWithType { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; private String errorMessage; @@ -32,53 +51,51 @@ public SLOHistoryResponseErrorWithType() {} @JsonCreator public SLOHistoryResponseErrorWithType( - @JsonProperty(required = true, value = JSON_PROPERTY_ERROR_MESSAGE) String errorMessage, - @JsonProperty(required = true, value = JSON_PROPERTY_ERROR_TYPE) String errorType) { - this.errorMessage = errorMessage; - this.errorType = errorType; + @JsonProperty(required=true, value=JSON_PROPERTY_ERROR_MESSAGE)String errorMessage, + @JsonProperty(required=true, value=JSON_PROPERTY_ERROR_TYPE)String errorType) { + this.errorMessage = errorMessage; + this.errorType = errorType; } - public SLOHistoryResponseErrorWithType errorMessage(String errorMessage) { this.errorMessage = errorMessage; return this; } /** - * A message with more details about the error. - * + *

A message with more details about the error.

* @return errorMessage - */ - @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorMessage() { - return errorMessage; - } - + **/ + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getErrorMessage() { + return errorMessage; + } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } - public SLOHistoryResponseErrorWithType errorType(String errorType) { this.errorType = errorType; return this; } /** - * Type of the error. - * + *

Type of the error.

* @return errorType - */ - @JsonProperty(JSON_PROPERTY_ERROR_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorType() { - return errorType; - } - + **/ + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getErrorType() { + return errorType; + } public void setErrorType(String errorType) { this.errorType = errorType; } - /** Return true if this SLOHistoryResponseErrorWithType object is equal to o. */ + /** + * Return true if this SLOHistoryResponseErrorWithType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,15 +104,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SLOHistoryResponseErrorWithType sloHistoryResponseErrorWithType = - (SLOHistoryResponseErrorWithType) o; - return Objects.equals(this.errorMessage, sloHistoryResponseErrorWithType.errorMessage) - && Objects.equals(this.errorType, sloHistoryResponseErrorWithType.errorType); + SLOHistoryResponseErrorWithType sloHistoryResponseErrorWithType = (SLOHistoryResponseErrorWithType) o; + return Objects.equals(this.errorMessage, sloHistoryResponseErrorWithType.errorMessage) && Objects.equals(this.errorType, sloHistoryResponseErrorWithType.errorType); } + @Override public int hashCode() { - return Objects.hash(errorMessage, errorType); + return Objects.hash(errorMessage,errorType); } @Override @@ -109,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOHistorySLIData.java b/src/main/java/com/datadog/api/client/v1/model/SLOHistorySLIData.java index 64a61e115d0..4caf20f1673 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOHistorySLIData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOHistorySLIData.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI - * value. This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a - * group in grouped SLOs. + *

An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. + * This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs.

*/ @JsonPropertyOrder({ SLOHistorySLIData.JSON_PROPERTY_ERROR_BUDGET_REMAINING, @@ -35,10 +48,10 @@ SLOHistorySLIData.JSON_PROPERTY_SPAN_PRECISION, SLOHistorySLIData.JSON_PROPERTY_UPTIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOHistorySLIData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR_BUDGET_REMAINING = "error_budget_remaining"; private Map errorBudgetRemaining = null; @@ -79,9 +92,7 @@ public SLOHistorySLIData errorBudgetRemaining(Map errorBudgetRem this.errorBudgetRemaining = errorBudgetRemaining; return this; } - - public SLOHistorySLIData putErrorBudgetRemainingItem( - String key, Double errorBudgetRemainingItem) { + public SLOHistorySLIData putErrorBudgetRemainingItem(String key, Double errorBudgetRemainingItem) { if (this.errorBudgetRemaining == null) { this.errorBudgetRemaining = new HashMap<>(); } @@ -90,21 +101,19 @@ public SLOHistorySLIData putErrorBudgetRemainingItem( } /** - * A mapping of threshold timeframe to the remaining error budget. - * + *

A mapping of threshold timeframe to the remaining error budget.

* @return errorBudgetRemaining - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getErrorBudgetRemaining() { - return errorBudgetRemaining; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrorBudgetRemaining() { + return errorBudgetRemaining; + } public void setErrorBudgetRemaining(Map errorBudgetRemaining) { this.errorBudgetRemaining = errorBudgetRemaining; } - public SLOHistorySLIData errors(List errors) { this.errors = errors; for (SLOHistoryResponseErrorWithType item : errors) { @@ -112,7 +121,6 @@ public SLOHistorySLIData errors(List errors) { } return this; } - public SLOHistorySLIData addErrorsItem(SLOHistoryResponseErrorWithType errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -123,48 +131,42 @@ public SLOHistorySLIData addErrorsItem(SLOHistoryResponseErrorWithType errorsIte } /** - * An array of error objects returned while querying the history data for the service level - * objective. - * + *

An array of error objects returned while querying the history data for the service level objective.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - public SLOHistorySLIData group(String group) { this.group = group; return this; } /** - * For groups in a grouped SLO, this is the group name. - * + *

For groups in a grouped SLO, this is the group name.

* @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } public void setGroup(String group) { this.group = group; } - public SLOHistorySLIData history(List> history) { this.history = history; return this; } - public SLOHistorySLIData addHistoryItem(List historyItem) { if (this.history == null) { this.history = new ArrayList<>(); @@ -174,93 +176,80 @@ public SLOHistorySLIData addHistoryItem(List historyItem) { } /** - * For monitor based SLOs, this includes the aggregated history as arrays that - * include time series and uptime data where 0=monitor is in OK state - * and 1=monitor is in alert state. - * + *

For monitor based SLOs, this includes the aggregated history as arrays that include time series and uptime data where 0=monitor is in OK state and 1=monitor is in alert state.

* @return history - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HISTORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getHistory() { - return history; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HISTORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List> getHistory() { + return history; + } public void setHistory(List> history) { this.history = history; } - public SLOHistorySLIData monitorModified(Long monitorModified) { this.monitorModified = monitorModified; return this; } /** - * For monitor based SLOs, this is the last modified timestamp in epoch seconds of - * the monitor. - * + *

For monitor based SLOs, this is the last modified timestamp in epoch seconds of the monitor.

* @return monitorModified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonitorModified() { - return monitorModified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorModified() { + return monitorModified; + } public void setMonitorModified(Long monitorModified) { this.monitorModified = monitorModified; } - public SLOHistorySLIData monitorType(String monitorType) { this.monitorType = monitorType; return this; } /** - * For monitor based SLOs, this describes the type of monitor. - * + *

For monitor based SLOs, this describes the type of monitor.

* @return monitorType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMonitorType() { - return monitorType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMonitorType() { + return monitorType; + } public void setMonitorType(String monitorType) { this.monitorType = monitorType; } - public SLOHistorySLIData name(String name) { this.name = name; return this; } /** - * For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this - * is the monitor name. - * + *

For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this is the monitor name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SLOHistorySLIData precision(Map precision) { this.precision = precision; return this; } - public SLOHistorySLIData putPrecisionItem(String key, Double precisionItem) { if (this.precision == null) { this.precision = new HashMap<>(); @@ -270,112 +259,103 @@ public SLOHistorySLIData putPrecisionItem(String key, Double precisionItem) { } /** - * A mapping of threshold timeframe to number of accurate decimals, regardless of the - * from && to timestamp. - * + *

A mapping of threshold timeframe to number of accurate decimals, regardless of the from && to timestamp.

* @return precision - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getPrecision() { - return precision; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRECISION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getPrecision() { + return precision; + } public void setPrecision(Map precision) { this.precision = precision; } - public SLOHistorySLIData preview(Boolean preview) { this.preview = preview; return this; } /** - * For monitor based SLOs, when true this indicates that a replay is in - * progress to give an accurate uptime calculation. - * + *

For monitor based SLOs, when true this indicates that a replay is in progress to give an accurate uptime + * calculation.

* @return preview - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPreview() { - return preview; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPreview() { + return preview; + } public void setPreview(Boolean preview) { this.preview = preview; } - public SLOHistorySLIData sliValue(Double sliValue) { this.sliValue = sliValue; return this; } /** - * The current SLI value of the SLO over the history window. - * + *

The current SLI value of the SLO over the history window.

* @return sliValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLI_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSliValue() { - return sliValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLI_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSliValue() { + return sliValue; + } public void setSliValue(Double sliValue) { this.sliValue = sliValue; } - public SLOHistorySLIData spanPrecision(Double spanPrecision) { this.spanPrecision = spanPrecision; return this; } /** - * The amount of decimal places the SLI value is accurate to for the given from && - * to timestamp. - * + *

The amount of decimal places the SLI value is accurate to for the given from && to timestamp.

* @return spanPrecision - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSpanPrecision() { - return spanPrecision; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSpanPrecision() { + return spanPrecision; + } public void setSpanPrecision(Double spanPrecision) { this.spanPrecision = spanPrecision; } - public SLOHistorySLIData uptime(Double uptime) { this.uptime = uptime; return this; } /** - * Use sli_value instead. - * + *

Use sli_value instead.

* @return uptime * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPTIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getUptime() { - return uptime; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPTIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getUptime() { + return uptime; + } @Deprecated public void setUptime(Double uptime) { this.uptime = uptime; } - /** Return true if this SLOHistorySLIData object is equal to o. */ + /** + * Return true if this SLOHistorySLIData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -385,44 +365,20 @@ public boolean equals(Object o) { return false; } SLOHistorySLIData sloHistorySliData = (SLOHistorySLIData) o; - return Objects.equals(this.errorBudgetRemaining, sloHistorySliData.errorBudgetRemaining) - && Objects.equals(this.errors, sloHistorySliData.errors) - && Objects.equals(this.group, sloHistorySliData.group) - && Objects.equals(this.history, sloHistorySliData.history) - && Objects.equals(this.monitorModified, sloHistorySliData.monitorModified) - && Objects.equals(this.monitorType, sloHistorySliData.monitorType) - && Objects.equals(this.name, sloHistorySliData.name) - && Objects.equals(this.precision, sloHistorySliData.precision) - && Objects.equals(this.preview, sloHistorySliData.preview) - && Objects.equals(this.sliValue, sloHistorySliData.sliValue) - && Objects.equals(this.spanPrecision, sloHistorySliData.spanPrecision) - && Objects.equals(this.uptime, sloHistorySliData.uptime); + return Objects.equals(this.errorBudgetRemaining, sloHistorySliData.errorBudgetRemaining) && Objects.equals(this.errors, sloHistorySliData.errors) && Objects.equals(this.group, sloHistorySliData.group) && Objects.equals(this.history, sloHistorySliData.history) && Objects.equals(this.monitorModified, sloHistorySliData.monitorModified) && Objects.equals(this.monitorType, sloHistorySliData.monitorType) && Objects.equals(this.name, sloHistorySliData.name) && Objects.equals(this.precision, sloHistorySliData.precision) && Objects.equals(this.preview, sloHistorySliData.preview) && Objects.equals(this.sliValue, sloHistorySliData.sliValue) && Objects.equals(this.spanPrecision, sloHistorySliData.spanPrecision) && Objects.equals(this.uptime, sloHistorySliData.uptime); } + @Override public int hashCode() { - return Objects.hash( - errorBudgetRemaining, - errors, - group, - history, - monitorModified, - monitorType, - name, - precision, - preview, - sliValue, - spanPrecision, - uptime); + return Objects.hash(errorBudgetRemaining,errors,group,history,monitorModified,monitorType,name,precision,preview,sliValue,spanPrecision,uptime); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SLOHistorySLIData {\n"); - sb.append(" errorBudgetRemaining: ") - .append(toIndentedString(errorBudgetRemaining)) - .append("\n"); + sb.append(" errorBudgetRemaining: ").append(toIndentedString(errorBudgetRemaining)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append(" history: ").append(toIndentedString(history)).append("\n"); @@ -439,7 +395,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLOListResponse.java index 4bd3a67c870..4033ed5c281 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A response with one or more service level objective. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A response with one or more service level objective.

+ */ @JsonPropertyOrder({ SLOListResponse.JSON_PROPERTY_DATA, SLOListResponse.JSON_PROPERTY_ERRORS, SLOListResponse.JSON_PROPERTY_METADATA }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public SLOListResponse data(List data) { } return this; } - public SLOListResponse addDataItem(ServiceLevelObjective dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,26 +68,23 @@ public SLOListResponse addDataItem(ServiceLevelObjective dataItem) { } /** - * An array of service level objective objects. - * + *

An array of service level objective objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public SLOListResponse errors(List errors) { this.errors = errors; return this; } - public SLOListResponse addErrorsItem(String errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -80,21 +94,20 @@ public SLOListResponse addErrorsItem(String errorsItem) { } /** - * An array of error messages. Each endpoint documents how/whether this field is used. - * + *

An array of error messages. Each endpoint documents how/whether this field is + * used.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - public SLOListResponse metadata(SLOListResponseMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -102,22 +115,23 @@ public SLOListResponse metadata(SLOListResponseMetadata metadata) { } /** - * The metadata object containing additional information about the list of SLOs. - * + *

The metadata object containing additional information about the list of SLOs.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOListResponseMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOListResponseMetadata getMetadata() { + return metadata; + } public void setMetadata(SLOListResponseMetadata metadata) { this.metadata = metadata; } - /** Return true if this SLOListResponse object is equal to o. */ + /** + * Return true if this SLOListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -127,14 +141,13 @@ public boolean equals(Object o) { return false; } SLOListResponse sloListResponse = (SLOListResponse) o; - return Objects.equals(this.data, sloListResponse.data) - && Objects.equals(this.errors, sloListResponse.errors) - && Objects.equals(this.metadata, sloListResponse.metadata); + return Objects.equals(this.data, sloListResponse.data) && Objects.equals(this.errors, sloListResponse.errors) && Objects.equals(this.metadata, sloListResponse.metadata); } + @Override public int hashCode() { - return Objects.hash(data, errors, metadata); + return Objects.hash(data,errors,metadata); } @Override @@ -149,7 +162,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadata.java b/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadata.java index 931818c623f..5c03d08e553 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadata.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The metadata object containing additional information about the list of SLOs. */ -@JsonPropertyOrder({SLOListResponseMetadata.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata object containing additional information about the list of SLOs.

+ */ +@JsonPropertyOrder({ + SLOListResponseMetadata.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOListResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private SLOListResponseMetadataPage page; @@ -28,22 +50,23 @@ public SLOListResponseMetadata page(SLOListResponseMetadataPage page) { } /** - * The object containing information about the pages of the list of SLOs. - * + *

The object containing information about the pages of the list of SLOs.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOListResponseMetadataPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOListResponseMetadataPage getPage() { + return page; + } public void setPage(SLOListResponseMetadataPage page) { this.page = page; } - /** Return true if this SLOListResponseMetadata object is equal to o. */ + /** + * Return true if this SLOListResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.page, sloListResponseMetadata.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadataPage.java b/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadataPage.java index 8b59d843ed2..41a60d2db0c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadataPage.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListResponseMetadataPage.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The object containing information about the pages of the list of SLOs. */ + +/** + *

The object containing information about the pages of the list of SLOs.

+ */ @JsonPropertyOrder({ SLOListResponseMetadataPage.JSON_PROPERTY_TOTAL_COUNT, SLOListResponseMetadataPage.JSON_PROPERTY_TOTAL_FILTERED_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOListResponseMetadataPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; @@ -33,45 +53,42 @@ public SLOListResponseMetadataPage totalCount(Long totalCount) { } /** - * The total number of resources that could be retrieved ignoring the parameters and filters in - * the request. - * + *

The total number of resources that could be retrieved ignoring the parameters and filters in the request.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } - public SLOListResponseMetadataPage totalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; return this; } /** - * The total number of resources that match the parameters and filters in the request. This - * attribute can be used by a client to determine the total number of pages. - * + *

The total number of resources that match the parameters and filters in the request. This attribute can be used by a client to determine the total number of pages.

* @return totalFilteredCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalFilteredCount() { - return totalFilteredCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } public void setTotalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; } - /** Return true if this SLOListResponseMetadataPage object is equal to o. */ + /** + * Return true if this SLOListResponseMetadataPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +98,13 @@ public boolean equals(Object o) { return false; } SLOListResponseMetadataPage sloListResponseMetadataPage = (SLOListResponseMetadataPage) o; - return Objects.equals(this.totalCount, sloListResponseMetadataPage.totalCount) - && Objects.equals(this.totalFilteredCount, sloListResponseMetadataPage.totalFilteredCount); + return Objects.equals(this.totalCount, sloListResponseMetadataPage.totalCount) && Objects.equals(this.totalFilteredCount, sloListResponseMetadataPage.totalFilteredCount); } + @Override public int hashCode() { - return Objects.hash(totalCount, totalFilteredCount); + return Objects.hash(totalCount,totalFilteredCount); } @Override @@ -101,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinition.java index b85174dc509..3c0a9de977f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Use the SLO List widget to track your SLOs (Service Level Objectives) on dashboards. */ + +/** + *

Use the SLO List widget to track your SLOs (Service Level Objectives) on dashboards.

+ */ @JsonPropertyOrder({ SLOListWidgetDefinition.JSON_PROPERTY_REQUESTS, SLOListWidgetDefinition.JSON_PROPERTY_TITLE, @@ -23,10 +40,10 @@ SLOListWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, SLOListWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOListWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_REQUESTS = "requests"; private List requests = new ArrayList<>(); @@ -46,14 +63,12 @@ public SLOListWidgetDefinition() {} @JsonCreator public SLOListWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SLOListWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SLOListWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public SLOListWidgetDefinition requests(List requests) { this.requests = requests; for (SLOListWidgetRequest item : requests) { @@ -61,7 +76,6 @@ public SLOListWidgetDefinition requests(List requests) { } return this; } - public SLOListWidgetDefinition addRequestsItem(SLOListWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -69,41 +83,37 @@ public SLOListWidgetDefinition addRequestsItem(SLOListWidgetRequest requestsItem } /** - * Array of one request object to display in the widget. - * + *

Array of one request object to display in the widget.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public SLOListWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public SLOListWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -111,45 +121,41 @@ public SLOListWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public SLOListWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public SLOListWidgetDefinition type(SLOListWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -157,24 +163,25 @@ public SLOListWidgetDefinition type(SLOListWidgetDefinitionType type) { } /** - * Type of the SLO List widget. - * + *

Type of the SLO List widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOListWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOListWidgetDefinitionType getType() { + return type; + } public void setType(SLOListWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SLOListWidgetDefinition object is equal to o. */ + /** + * Return true if this SLOListWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -184,16 +191,13 @@ public boolean equals(Object o) { return false; } SLOListWidgetDefinition sloListWidgetDefinition = (SLOListWidgetDefinition) o; - return Objects.equals(this.requests, sloListWidgetDefinition.requests) - && Objects.equals(this.title, sloListWidgetDefinition.title) - && Objects.equals(this.titleAlign, sloListWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, sloListWidgetDefinition.titleSize) - && Objects.equals(this.type, sloListWidgetDefinition.type); + return Objects.equals(this.requests, sloListWidgetDefinition.requests) && Objects.equals(this.title, sloListWidgetDefinition.title) && Objects.equals(this.titleAlign, sloListWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, sloListWidgetDefinition.titleSize) && Objects.equals(this.type, sloListWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(requests, title, titleAlign, titleSize, type); + return Objects.hash(requests,title,titleAlign,titleSize,type); } @Override @@ -210,7 +214,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinitionType.java index 65634510d00..8101cd60124 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the SLO List widget. */ +/** + *

Type of the SLO List widget.

+ */ @JsonSerialize(using = SLOListWidgetDefinitionType.SLOListWidgetDefinitionTypeSerializer.class) public class SLOListWidgetDefinitionType { - public static final SLOListWidgetDefinitionType SLO_LIST = - new SLOListWidgetDefinitionType("slo_list"); + public static final SLOListWidgetDefinitionType SLO_LIST = new SLOListWidgetDefinitionType("slo_list"); private static final Set allowedValues = new HashSet(Arrays.asList("slo_list")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SLOListWidgetDefinitionTypeSerializer - extends StdSerializer { - public SLOListWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class SLOListWidgetDefinitionTypeSerializer extends StdSerializer { + public SLOListWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public SLOListWidgetDefinitionTypeSerializer() { - this(null); - } + public SLOListWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - SLOListWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SLOListWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOListWidgetDefinitionType object is equal to o. */ + /** + * Return true if this SLOListWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetQuery.java b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetQuery.java index f66cb1ba8f7..8c2ee6815fe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetQuery.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Updated SLO List widget. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Updated SLO List widget.

+ */ @JsonPropertyOrder({ SLOListWidgetQuery.JSON_PROPERTY_LIMIT, SLOListWidgetQuery.JSON_PROPERTY_QUERY_STRING, SLOListWidgetQuery.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOListWidgetQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LIMIT = "limit"; private Long limit = 100l; @@ -38,51 +55,48 @@ public SLOListWidgetQuery() {} @JsonCreator public SLOListWidgetQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY_STRING) String queryString) { - this.queryString = queryString; + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY_STRING)String queryString) { + this.queryString = queryString; } - public SLOListWidgetQuery limit(Long limit) { this.limit = limit; return this; } /** - * Maximum number of results to display in the table. minimum: 1 maximum: 100 - * + *

Maximum number of results to display in the table.

+ * minimum: 1 + * maximum: 100 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public SLOListWidgetQuery queryString(String queryString) { this.queryString = queryString; return this; } /** - * Widget query. - * + *

Widget query.

* @return queryString - */ - @JsonProperty(JSON_PROPERTY_QUERY_STRING) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQueryString() { - return queryString; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY_STRING) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQueryString() { + return queryString; + } public void setQueryString(String queryString) { this.queryString = queryString; } - public SLOListWidgetQuery sort(List sort) { this.sort = sort; for (WidgetFieldSort item : sort) { @@ -90,7 +104,6 @@ public SLOListWidgetQuery sort(List sort) { } return this; } - public SLOListWidgetQuery addSortItem(WidgetFieldSort sortItem) { if (this.sort == null) { this.sort = new ArrayList<>(); @@ -101,22 +114,23 @@ public SLOListWidgetQuery addSortItem(WidgetFieldSort sortItem) { } /** - * Options for sorting results. - * + *

Options for sorting results.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSort() { + return sort; + } public void setSort(List sort) { this.sort = sort; } - /** Return true if this SLOListWidgetQuery object is equal to o. */ + /** + * Return true if this SLOListWidgetQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,14 +140,13 @@ public boolean equals(Object o) { return false; } SLOListWidgetQuery sloListWidgetQuery = (SLOListWidgetQuery) o; - return Objects.equals(this.limit, sloListWidgetQuery.limit) - && Objects.equals(this.queryString, sloListWidgetQuery.queryString) - && Objects.equals(this.sort, sloListWidgetQuery.sort); + return Objects.equals(this.limit, sloListWidgetQuery.limit) && Objects.equals(this.queryString, sloListWidgetQuery.queryString) && Objects.equals(this.sort, sloListWidgetQuery.sort); } + @Override public int hashCode() { - return Objects.hash(limit, queryString, sort); + return Objects.hash(limit,queryString,sort); } @Override @@ -148,7 +161,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequest.java index 7d76289246f..013ea5350a8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated SLO List widget. */ + +/** + *

Updated SLO List widget.

+ */ @JsonPropertyOrder({ SLOListWidgetRequest.JSON_PROPERTY_QUERY, SLOListWidgetRequest.JSON_PROPERTY_REQUEST_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOListWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private SLOListWidgetQuery query; @@ -32,15 +51,13 @@ public SLOListWidgetRequest() {} @JsonCreator public SLOListWidgetRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) SLOListWidgetQuery query, - @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST_TYPE) - SLOListWidgetRequestType requestType) { - this.query = query; - this.unparsed |= query.unparsed; - this.requestType = requestType; - this.unparsed |= !requestType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)SLOListWidgetQuery query, + @JsonProperty(required=true, value=JSON_PROPERTY_REQUEST_TYPE)SLOListWidgetRequestType requestType) { + this.query = query; + this.unparsed |= query.unparsed; + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); } - public SLOListWidgetRequest query(SLOListWidgetQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -48,20 +65,18 @@ public SLOListWidgetRequest query(SLOListWidgetQuery query) { } /** - * Updated SLO List widget. - * + *

Updated SLO List widget.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOListWidgetQuery getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOListWidgetQuery getQuery() { + return query; + } public void setQuery(SLOListWidgetQuery query) { this.query = query; } - public SLOListWidgetRequest requestType(SLOListWidgetRequestType requestType) { this.requestType = requestType; this.unparsed |= !requestType.isValid(); @@ -69,24 +84,25 @@ public SLOListWidgetRequest requestType(SLOListWidgetRequestType requestType) { } /** - * Widget request type. - * + *

Widget request type.

* @return requestType - */ - @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOListWidgetRequestType getRequestType() { - return requestType; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOListWidgetRequestType getRequestType() { + return requestType; + } public void setRequestType(SLOListWidgetRequestType requestType) { if (!requestType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.requestType = requestType; } - /** Return true if this SLOListWidgetRequest object is equal to o. */ + /** + * Return true if this SLOListWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } SLOListWidgetRequest sloListWidgetRequest = (SLOListWidgetRequest) o; - return Objects.equals(this.query, sloListWidgetRequest.query) - && Objects.equals(this.requestType, sloListWidgetRequest.requestType); + return Objects.equals(this.query, sloListWidgetRequest.query) && Objects.equals(this.requestType, sloListWidgetRequest.requestType); } + @Override public int hashCode() { - return Objects.hash(query, requestType); + return Objects.hash(query,requestType); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequestType.java b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequestType.java index c95c5da8120..94b56594eca 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOListWidgetRequestType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget request type. */ +/** + *

Widget request type.

+ */ @JsonSerialize(using = SLOListWidgetRequestType.SLOListWidgetRequestTypeSerializer.class) public class SLOListWidgetRequestType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SLOListWidgetRequestTypeSerializer - extends StdSerializer { - public SLOListWidgetRequestTypeSerializer(Class t) { - super(t); - } + public static class SLOListWidgetRequestTypeSerializer extends StdSerializer { + public SLOListWidgetRequestTypeSerializer(Class t) { + super(t); + } - public SLOListWidgetRequestTypeSerializer() { - this(null); - } + public SLOListWidgetRequestTypeSerializer() { + this(null); + } - @Override - public void serialize( - SLOListWidgetRequestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SLOListWidgetRequestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOListWidgetRequestType object is equal to o. */ + /** + * Return true if this SLOListWidgetRequestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOOverallStatuses.java b/src/main/java/com/datadog/api/client/v1/model/SLOOverallStatuses.java index 7b1566368d2..28a30afb63c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOOverallStatuses.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOOverallStatuses.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Overall status of the SLO by timeframes. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Overall status of the SLO by timeframes.

+ */ @JsonPropertyOrder({ SLOOverallStatuses.JSON_PROPERTY_ERROR, SLOOverallStatuses.JSON_PROPERTY_ERROR_BUDGET_REMAINING, @@ -25,10 +44,10 @@ SLOOverallStatuses.JSON_PROPERTY_TARGET, SLOOverallStatuses.JSON_PROPERTY_TIMEFRAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOOverallStatuses { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERROR = "error"; private JsonNullable error = JsonNullable.undefined(); @@ -38,10 +57,8 @@ public class SLOOverallStatuses { public static final String JSON_PROPERTY_INDEXED_AT = "indexed_at"; private Long indexedAt; - public static final String JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING = - "raw_error_budget_remaining"; - private JsonNullable rawErrorBudgetRemaining = - JsonNullable.undefined(); + public static final String JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING = "raw_error_budget_remaining"; + private JsonNullable rawErrorBudgetRemaining = JsonNullable.undefined(); public static final String JSON_PROPERTY_SPAN_PRECISION = "span_precision"; private JsonNullable spanPrecision = JsonNullable.undefined(); @@ -64,149 +81,124 @@ public SLOOverallStatuses error(String error) { } /** - * Error message if SLO status or error budget could not be calculated. - * + *

Error message if SLO status or error budget could not be calculated.

* @return error - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getError() { - return error.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getError_JsonNullable() { return error; } - - @JsonProperty(JSON_PROPERTY_ERROR) - public void setError_JsonNullable(JsonNullable error) { + @JsonProperty(JSON_PROPERTY_ERROR)public void setError_JsonNullable(JsonNullable error) { this.error = error; } - public void setError(String error) { this.error = JsonNullable.of(error); } - public SLOOverallStatuses errorBudgetRemaining(Double errorBudgetRemaining) { this.errorBudgetRemaining = JsonNullable.of(errorBudgetRemaining); return this; } /** - * Remaining error budget of the SLO in percentage. - * + *

Remaining error budget of the SLO in percentage.

* @return errorBudgetRemaining - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getErrorBudgetRemaining() { - return errorBudgetRemaining.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getErrorBudgetRemaining() { + return errorBudgetRemaining.orElse(null); + } @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getErrorBudgetRemaining_JsonNullable() { return errorBudgetRemaining; } - - @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) - public void setErrorBudgetRemaining_JsonNullable(JsonNullable errorBudgetRemaining) { + @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING)public void setErrorBudgetRemaining_JsonNullable(JsonNullable errorBudgetRemaining) { this.errorBudgetRemaining = errorBudgetRemaining; } - public void setErrorBudgetRemaining(Double errorBudgetRemaining) { this.errorBudgetRemaining = JsonNullable.of(errorBudgetRemaining); } - public SLOOverallStatuses indexedAt(Long indexedAt) { this.indexedAt = indexedAt; return this; } /** - * timestamp (UNIX time in seconds) of when the SLO status and error budget were calculated. - * + *

timestamp (UNIX time in seconds) of when the SLO status and error budget + * were calculated.

* @return indexedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedAt() { - return indexedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedAt() { + return indexedAt; + } public void setIndexedAt(Long indexedAt) { this.indexedAt = indexedAt; } - - public SLOOverallStatuses rawErrorBudgetRemaining( - SLORawErrorBudgetRemaining rawErrorBudgetRemaining) { - this.rawErrorBudgetRemaining = - JsonNullable.of(rawErrorBudgetRemaining); + public SLOOverallStatuses rawErrorBudgetRemaining(SLORawErrorBudgetRemaining rawErrorBudgetRemaining) { + this.rawErrorBudgetRemaining = JsonNullable.of(rawErrorBudgetRemaining); return this; } /** - * Error budget remaining for an SLO. - * + *

Error budget remaining for an SLO.

* @return rawErrorBudgetRemaining - */ - @jakarta.annotation.Nullable - @JsonIgnore - public SLORawErrorBudgetRemaining getRawErrorBudgetRemaining() { - return rawErrorBudgetRemaining.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public SLORawErrorBudgetRemaining getRawErrorBudgetRemaining() { + return rawErrorBudgetRemaining.orElse(null); + } @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRawErrorBudgetRemaining_JsonNullable() { return rawErrorBudgetRemaining; } - - @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING) - public void setRawErrorBudgetRemaining_JsonNullable( - JsonNullable rawErrorBudgetRemaining) { + @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING)public void setRawErrorBudgetRemaining_JsonNullable(JsonNullable rawErrorBudgetRemaining) { this.rawErrorBudgetRemaining = rawErrorBudgetRemaining; } - public void setRawErrorBudgetRemaining(SLORawErrorBudgetRemaining rawErrorBudgetRemaining) { - this.rawErrorBudgetRemaining = - JsonNullable.of(rawErrorBudgetRemaining); + this.rawErrorBudgetRemaining = JsonNullable.of(rawErrorBudgetRemaining); } - public SLOOverallStatuses spanPrecision(Long spanPrecision) { this.spanPrecision = JsonNullable.of(spanPrecision); return this; } /** - * The amount of decimal places the SLI value is accurate to. - * + *

The amount of decimal places the SLI value is accurate to.

* @return spanPrecision - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSpanPrecision() { - return spanPrecision.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSpanPrecision() { + return spanPrecision.orElse(null); + } @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSpanPrecision_JsonNullable() { return spanPrecision; } - - @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) - public void setSpanPrecision_JsonNullable(JsonNullable spanPrecision) { + @JsonProperty(JSON_PROPERTY_SPAN_PRECISION)public void setSpanPrecision_JsonNullable(JsonNullable spanPrecision) { this.spanPrecision = spanPrecision; } - public void setSpanPrecision(Long spanPrecision) { this.spanPrecision = JsonNullable.of(spanPrecision); } - public SLOOverallStatuses state(SLOState state) { this.state = state; this.unparsed |= !state.isValid(); @@ -214,76 +206,67 @@ public SLOOverallStatuses state(SLOState state) { } /** - * State of the SLO. - * + *

State of the SLO.

* @return state - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOState getState() { - return state; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOState getState() { + return state; + } public void setState(SLOState state) { if (!state.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.state = state; } - public SLOOverallStatuses status(Double status) { this.status = JsonNullable.of(status); return this; } /** - * The status of the SLO. - * + *

The status of the SLO.

* @return status - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getStatus() { - return status.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getStatus() { + return status.orElse(null); + } @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getStatus_JsonNullable() { return status; } - - @JsonProperty(JSON_PROPERTY_STATUS) - public void setStatus_JsonNullable(JsonNullable status) { + @JsonProperty(JSON_PROPERTY_STATUS)public void setStatus_JsonNullable(JsonNullable status) { this.status = status; } - public void setStatus(Double status) { this.status = JsonNullable.of(status); } - public SLOOverallStatuses target(Double target) { this.target = target; return this; } /** - * The target of the SLO. - * + *

The target of the SLO.

* @return target - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTarget() { - return target; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTarget() { + return target; + } public void setTarget(Double target) { this.target = target; } - public SLOOverallStatuses timeframe(SLOTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -291,25 +274,26 @@ public SLOOverallStatuses timeframe(SLOTimeframe timeframe) { } /** - * The SLO time window options. - * + *

The SLO time window options.

* @return timeframe - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOTimeframe getTimeframe() { - return timeframe; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SLOTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - /** Return true if this SLOOverallStatuses object is equal to o. */ + /** + * Return true if this SLOOverallStatuses object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -319,29 +303,13 @@ public boolean equals(Object o) { return false; } SLOOverallStatuses sloOverallStatuses = (SLOOverallStatuses) o; - return Objects.equals(this.error, sloOverallStatuses.error) - && Objects.equals(this.errorBudgetRemaining, sloOverallStatuses.errorBudgetRemaining) - && Objects.equals(this.indexedAt, sloOverallStatuses.indexedAt) - && Objects.equals(this.rawErrorBudgetRemaining, sloOverallStatuses.rawErrorBudgetRemaining) - && Objects.equals(this.spanPrecision, sloOverallStatuses.spanPrecision) - && Objects.equals(this.state, sloOverallStatuses.state) - && Objects.equals(this.status, sloOverallStatuses.status) - && Objects.equals(this.target, sloOverallStatuses.target) - && Objects.equals(this.timeframe, sloOverallStatuses.timeframe); + return Objects.equals(this.error, sloOverallStatuses.error) && Objects.equals(this.errorBudgetRemaining, sloOverallStatuses.errorBudgetRemaining) && Objects.equals(this.indexedAt, sloOverallStatuses.indexedAt) && Objects.equals(this.rawErrorBudgetRemaining, sloOverallStatuses.rawErrorBudgetRemaining) && Objects.equals(this.spanPrecision, sloOverallStatuses.spanPrecision) && Objects.equals(this.state, sloOverallStatuses.state) && Objects.equals(this.status, sloOverallStatuses.status) && Objects.equals(this.target, sloOverallStatuses.target) && Objects.equals(this.timeframe, sloOverallStatuses.timeframe); } + @Override public int hashCode() { - return Objects.hash( - error, - errorBudgetRemaining, - indexedAt, - rawErrorBudgetRemaining, - spanPrecision, - state, - status, - target, - timeframe); + return Objects.hash(error,errorBudgetRemaining,indexedAt,rawErrorBudgetRemaining,spanPrecision,state,status,target,timeframe); } @Override @@ -349,13 +317,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SLOOverallStatuses {\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" errorBudgetRemaining: ") - .append(toIndentedString(errorBudgetRemaining)) - .append("\n"); + sb.append(" errorBudgetRemaining: ").append(toIndentedString(errorBudgetRemaining)).append("\n"); sb.append(" indexedAt: ").append(toIndentedString(indexedAt)).append("\n"); - sb.append(" rawErrorBudgetRemaining: ") - .append(toIndentedString(rawErrorBudgetRemaining)) - .append("\n"); + sb.append(" rawErrorBudgetRemaining: ").append(toIndentedString(rawErrorBudgetRemaining)).append("\n"); sb.append(" spanPrecision: ").append(toIndentedString(spanPrecision)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); @@ -366,7 +330,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLORawErrorBudgetRemaining.java b/src/main/java/com/datadog/api/client/v1/model/SLORawErrorBudgetRemaining.java index 55c4012cae6..47e6e7ad2b2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLORawErrorBudgetRemaining.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLORawErrorBudgetRemaining.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Error budget remaining for an SLO. */ + +/** + *

Error budget remaining for an SLO.

+ */ @JsonPropertyOrder({ SLORawErrorBudgetRemaining.JSON_PROPERTY_UNIT, SLORawErrorBudgetRemaining.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLORawErrorBudgetRemaining { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_UNIT = "unit"; private String unit; @@ -33,43 +53,42 @@ public SLORawErrorBudgetRemaining unit(String unit) { } /** - * Error budget remaining unit. - * + *

Error budget remaining unit.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUnit() { - return unit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUnit() { + return unit; + } public void setUnit(String unit) { this.unit = unit; } - public SLORawErrorBudgetRemaining value(Double value) { this.value = value; return this; } /** - * Error budget remaining value. - * + *

Error budget remaining value.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this SLORawErrorBudgetRemaining object is equal to o. */ + /** + * Return true if this SLORawErrorBudgetRemaining object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } SLORawErrorBudgetRemaining sloRawErrorBudgetRemaining = (SLORawErrorBudgetRemaining) o; - return Objects.equals(this.unit, sloRawErrorBudgetRemaining.unit) - && Objects.equals(this.value, sloRawErrorBudgetRemaining.value); + return Objects.equals(this.unit, sloRawErrorBudgetRemaining.unit) && Objects.equals(this.value, sloRawErrorBudgetRemaining.value); } + @Override public int hashCode() { - return Objects.hash(unit, value); + return Objects.hash(unit,value); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOResponse.java b/src/main/java/com/datadog/api/client/v1/model/SLOResponse.java index 06be04051bb..d0bd06518e3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A service level objective response containing a single service level objective. */ -@JsonPropertyOrder({SLOResponse.JSON_PROPERTY_DATA, SLOResponse.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

A service level objective response containing a single service level objective.

+ */ +@JsonPropertyOrder({ + SLOResponse.JSON_PROPERTY_DATA, + SLOResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SLOResponseData data; @@ -33,28 +54,24 @@ public SLOResponse data(SLOResponseData data) { } /** - * A service level objective object includes a service level indicator, thresholds for one or more - * timeframes, and metadata (name, description, tags, - * etc.). - * + *

A service level objective object includes a service level indicator, thresholds + * for one or more timeframes, and metadata (name, description, tags, etc.).

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOResponseData getData() { + return data; + } public void setData(SLOResponseData data) { this.data = data; } - public SLOResponse errors(List errors) { this.errors = errors; return this; } - public SLOResponse addErrorsItem(String errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -64,22 +81,24 @@ public SLOResponse addErrorsItem(String errorsItem) { } /** - * An array of error messages. Each endpoint documents how/whether this field is used. - * + *

An array of error messages. Each endpoint documents how/whether this field is + * used.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this SLOResponse object is equal to o. */ + /** + * Return true if this SLOResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,13 +108,13 @@ public boolean equals(Object o) { return false; } SLOResponse sloResponse = (SLOResponse) o; - return Objects.equals(this.data, sloResponse.data) - && Objects.equals(this.errors, sloResponse.errors); + return Objects.equals(this.data, sloResponse.data) && Objects.equals(this.errors, sloResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -109,7 +128,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOResponseData.java b/src/main/java/com/datadog/api/client/v1/model/SLOResponseData.java index 51832198848..59d7739c130 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOResponseData.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A service level objective object includes a service level indicator, thresholds for one or more - * timeframes, and metadata (name, description, tags, etc.). + *

A service level objective object includes a service level indicator, thresholds + * for one or more timeframes, and metadata (name, description, tags, etc.).

*/ @JsonPropertyOrder({ SLOResponseData.JSON_PROPERTY_CONFIGURED_ALERT_IDS, @@ -38,10 +53,10 @@ SLOResponseData.JSON_PROPERTY_TYPE, SLOResponseData.JSON_PROPERTY_WARNING_THRESHOLD }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIGURED_ALERT_IDS = "configured_alert_ids"; private List configuredAlertIds = null; @@ -97,7 +112,6 @@ public SLOResponseData configuredAlertIds(List configuredAlertIds) { this.configuredAlertIds = configuredAlertIds; return this; } - public SLOResponseData addConfiguredAlertIdsItem(Long configuredAlertIdsItem) { if (this.configuredAlertIds == null) { this.configuredAlertIds = new ArrayList<>(); @@ -107,87 +121,76 @@ public SLOResponseData addConfiguredAlertIdsItem(Long configuredAlertIdsItem) { } /** - * A list of SLO monitors IDs that reference this SLO. This field is returned only when - * with_configured_alert_ids parameter is true in query. - * + *

A list of SLO monitors IDs that reference this SLO. This field is returned only when with_configured_alert_ids parameter is true in query.

* @return configuredAlertIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIGURED_ALERT_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConfiguredAlertIds() { - return configuredAlertIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGURED_ALERT_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConfiguredAlertIds() { + return configuredAlertIds; + } public void setConfiguredAlertIds(List configuredAlertIds) { this.configuredAlertIds = configuredAlertIds; } /** - * Creation timestamp (UNIX time in seconds) - * - *

Always included in service level objective responses. - * + *

Creation timestamp (UNIX time in seconds)

+ *

Always included in service level objective responses.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } public SLOResponseData description(String description) { this.description = JsonNullable.of(description); return this; } /** - * A user-defined description of the service level objective. - * + *

A user-defined description of the service level objective.

*

Always included in service level objective responses (but may be null). - * Optional in create/update requests. - * + * Optional in create/update requests.

* @return description - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getDescription() { - return description.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDescription_JsonNullable() { return description; } - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - public void setDescription_JsonNullable(JsonNullable description) { + @JsonProperty(JSON_PROPERTY_DESCRIPTION)public void setDescription_JsonNullable(JsonNullable description) { this.description = description; } - public void setDescription(String description) { this.description = JsonNullable.of(description); } - public SLOResponseData groups(List groups) { this.groups = groups; return this; } - public SLOResponseData addGroupsItem(String groupsItem) { if (this.groups == null) { this.groups = new ArrayList<>(); @@ -197,58 +200,52 @@ public SLOResponseData addGroupsItem(String groupsItem) { } /** - * A list of (up to 20) monitor groups that narrow the scope of a monitor service level objective. - * - *

Included in service level objective responses if it is not empty. Optional in create/update - * requests for monitor service level objectives, but may only be used when then length of the - * monitor_ids field is one. - * + *

A list of (up to 20) monitor groups that narrow the scope of a monitor service level objective.

+ *

Included in service level objective responses if it is not empty. Optional in + * create/update requests for monitor service level objectives, but may only be + * used when then length of the monitor_ids field is one.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } public void setGroups(List groups) { this.groups = groups; } /** - * A unique identifier for the service level objective object. - * - *

Always included in service level objective responses. - * + *

A unique identifier for the service level objective object.

+ *

Always included in service level objective responses.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } /** - * Modification timestamp (UNIX time in seconds) - * - *

Always included in service level objective responses. - * + *

Modification timestamp (UNIX time in seconds)

+ *

Always included in service level objective responses.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getModifiedAt() { + return modifiedAt; + } public SLOResponseData monitorIds(List monitorIds) { this.monitorIds = monitorIds; return this; } - public SLOResponseData addMonitorIdsItem(Long monitorIdsItem) { if (this.monitorIds == null) { this.monitorIds = new ArrayList<>(); @@ -258,27 +255,24 @@ public SLOResponseData addMonitorIdsItem(Long monitorIdsItem) { } /** - * A list of monitor ids that defines the scope of a monitor service level objective. - * Required if type is monitor. - * + *

A list of monitor ids that defines the scope of a monitor service level + * objective. Required if type is monitor.

* @return monitorIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorIds() { - return monitorIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorIds() { + return monitorIds; + } public void setMonitorIds(List monitorIds) { this.monitorIds = monitorIds; } - public SLOResponseData monitorTags(List monitorTags) { this.monitorTags = monitorTags; return this; } - public SLOResponseData addMonitorTagsItem(String monitorTagsItem) { if (this.monitorTags == null) { this.monitorTags = new ArrayList<>(); @@ -288,46 +282,43 @@ public SLOResponseData addMonitorTagsItem(String monitorTagsItem) { } /** - * The union of monitor tags for all monitors referenced by the monitor_ids field. - * Always included in service level objective responses for monitor service level objectives (but - * may be empty). Ignored in create/update requests. Does not affect which monitors are included - * in the service level objective (that is determined entirely by the monitor_ids - * field). - * + *

The union of monitor tags for all monitors referenced by the monitor_ids + * field. + * Always included in service level objective responses for monitor service level + * objectives (but may be empty). Ignored in create/update requests. Does not + * affect which monitors are included in the service level objective (that is + * determined entirely by the monitor_ids field).

* @return monitorTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorTags() { - return monitorTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorTags() { + return monitorTags; + } public void setMonitorTags(List monitorTags) { this.monitorTags = monitorTags; } - public SLOResponseData name(String name) { this.name = name; return this; } /** - * The name of the service level objective object. - * + *

The name of the service level objective object.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SLOResponseData query(ServiceLevelObjectiveQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -335,28 +326,25 @@ public SLOResponseData query(ServiceLevelObjectiveQuery query) { } /** - * A metric-based SLO. Required if type is metric. Note that Datadog - * only allows the sum by aggregator to be used because this will sum up all request counts - * instead of averaging them, or taking the max or min of all of those requests. - * + *

A metric-based SLO. Required if type is metric. Note that Datadog only allows the sum by aggregator + * to be used because this will sum up all request counts instead of averaging them, or taking the max or + * min of all of those requests.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceLevelObjectiveQuery getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceLevelObjectiveQuery getQuery() { + return query; + } public void setQuery(ServiceLevelObjectiveQuery query) { this.query = query; } - public SLOResponseData tags(List tags) { this.tags = tags; return this; } - public SLOResponseData addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -366,44 +354,41 @@ public SLOResponseData addTagsItem(String tagsItem) { } /** - * A list of tags associated with this service level objective. Always included in service level - * objective responses (but may be empty). Optional in create/update requests. - * + *

A list of tags associated with this service level objective. + * Always included in service level objective responses (but may be empty). + * Optional in create/update requests.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SLOResponseData targetThreshold(Double targetThreshold) { this.targetThreshold = targetThreshold; return this; } /** - * The target threshold such that when the service level indicator is above this threshold over - * the given timeframe, the objective is being met. - * + *

The target threshold such that when the service level indicator is above this + * threshold over the given timeframe, the objective is being met.

* @return targetThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTargetThreshold() { - return targetThreshold; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTargetThreshold() { + return targetThreshold; + } public void setTargetThreshold(Double targetThreshold) { this.targetThreshold = targetThreshold; } - public SLOResponseData thresholds(List thresholds) { this.thresholds = thresholds; for (SLOThreshold item : thresholds) { @@ -411,7 +396,6 @@ public SLOResponseData thresholds(List thresholds) { } return this; } - public SLOResponseData addThresholdsItem(SLOThreshold thresholdsItem) { if (this.thresholds == null) { this.thresholds = new ArrayList<>(); @@ -422,21 +406,20 @@ public SLOResponseData addThresholdsItem(SLOThreshold thresholdsItem) { } /** - * The thresholds (timeframes and associated targets) for this service level objective object. - * + *

The thresholds (timeframes and associated targets) for this service level + * objective object.

* @return thresholds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_THRESHOLDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getThresholds() { - return thresholds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THRESHOLDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getThresholds() { + return thresholds; + } public void setThresholds(List thresholds) { this.thresholds = thresholds; } - public SLOResponseData timeframe(SLOTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -444,24 +427,22 @@ public SLOResponseData timeframe(SLOTimeframe timeframe) { } /** - * The SLO time window options. - * + *

The SLO time window options.

* @return timeframe - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOTimeframe getTimeframe() { - return timeframe; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SLOTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - public SLOResponseData type(SLOType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -469,48 +450,48 @@ public SLOResponseData type(SLOType type) { } /** - * The type of the service level objective. - * + *

The type of the service level objective.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOType getType() { + return type; + } public void setType(SLOType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SLOResponseData warningThreshold(Double warningThreshold) { this.warningThreshold = warningThreshold; return this; } /** - * The optional warning threshold such that when the service level indicator is below this value - * for the given threshold, but above the target threshold, the objective appears in a "warning" - * state. This value must be greater than the target threshold. - * + *

The optional warning threshold such that when the service level indicator is + * below this value for the given threshold, but above the target threshold, the + * objective appears in a "warning" state. This value must be greater than the target + * threshold.

* @return warningThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getWarningThreshold() { - return warningThreshold; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getWarningThreshold() { + return warningThreshold; + } public void setWarningThreshold(Double warningThreshold) { this.warningThreshold = warningThreshold; } - /** Return true if this SLOResponseData object is equal to o. */ + /** + * Return true if this SLOResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -520,45 +501,13 @@ public boolean equals(Object o) { return false; } SLOResponseData sloResponseData = (SLOResponseData) o; - return Objects.equals(this.configuredAlertIds, sloResponseData.configuredAlertIds) - && Objects.equals(this.createdAt, sloResponseData.createdAt) - && Objects.equals(this.creator, sloResponseData.creator) - && Objects.equals(this.description, sloResponseData.description) - && Objects.equals(this.groups, sloResponseData.groups) - && Objects.equals(this.id, sloResponseData.id) - && Objects.equals(this.modifiedAt, sloResponseData.modifiedAt) - && Objects.equals(this.monitorIds, sloResponseData.monitorIds) - && Objects.equals(this.monitorTags, sloResponseData.monitorTags) - && Objects.equals(this.name, sloResponseData.name) - && Objects.equals(this.query, sloResponseData.query) - && Objects.equals(this.tags, sloResponseData.tags) - && Objects.equals(this.targetThreshold, sloResponseData.targetThreshold) - && Objects.equals(this.thresholds, sloResponseData.thresholds) - && Objects.equals(this.timeframe, sloResponseData.timeframe) - && Objects.equals(this.type, sloResponseData.type) - && Objects.equals(this.warningThreshold, sloResponseData.warningThreshold); + return Objects.equals(this.configuredAlertIds, sloResponseData.configuredAlertIds) && Objects.equals(this.createdAt, sloResponseData.createdAt) && Objects.equals(this.creator, sloResponseData.creator) && Objects.equals(this.description, sloResponseData.description) && Objects.equals(this.groups, sloResponseData.groups) && Objects.equals(this.id, sloResponseData.id) && Objects.equals(this.modifiedAt, sloResponseData.modifiedAt) && Objects.equals(this.monitorIds, sloResponseData.monitorIds) && Objects.equals(this.monitorTags, sloResponseData.monitorTags) && Objects.equals(this.name, sloResponseData.name) && Objects.equals(this.query, sloResponseData.query) && Objects.equals(this.tags, sloResponseData.tags) && Objects.equals(this.targetThreshold, sloResponseData.targetThreshold) && Objects.equals(this.thresholds, sloResponseData.thresholds) && Objects.equals(this.timeframe, sloResponseData.timeframe) && Objects.equals(this.type, sloResponseData.type) && Objects.equals(this.warningThreshold, sloResponseData.warningThreshold); } + @Override public int hashCode() { - return Objects.hash( - configuredAlertIds, - createdAt, - creator, - description, - groups, - id, - modifiedAt, - monitorIds, - monitorTags, - name, - query, - tags, - targetThreshold, - thresholds, - timeframe, - type, - warningThreshold); + return Objects.hash(configuredAlertIds,createdAt,creator,description,groups,id,modifiedAt,monitorIds,monitorTags,name,query,tags,targetThreshold,thresholds,timeframe,type,warningThreshold); } @Override @@ -587,7 +536,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOState.java b/src/main/java/com/datadog/api/client/v1/model/SLOState.java index a1e01208454..4436348a5a1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOState.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOState.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** State of the SLO. */ +/** + *

State of the SLO.

+ */ @JsonSerialize(using = SLOState.SLOStateSerializer.class) public class SLOState { @@ -28,8 +52,7 @@ public class SLOState { public static final SLOState OK = new SLOState("ok"); public static final SLOState NO_DATA = new SLOState("no_data"); - private static final Set allowedValues = - new HashSet(Arrays.asList("breached", "warning", "ok", "no_data")); + private static final Set allowedValues = new HashSet(Arrays.asList("breached", "warning", "ok", "no_data")); private String value; @@ -42,19 +65,18 @@ public boolean isValid() { } public static class SLOStateSerializer extends StdSerializer { - public SLOStateSerializer(Class t) { - super(t); - } - - public SLOStateSerializer() { - this(null); - } - - @Override - public void serialize(SLOState value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOStateSerializer(Class t) { + super(t); + } + + public SLOStateSerializer() { + this(null); + } + + @Override + public void serialize(SLOState value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOState object is equal to o. */ + /** + * Return true if this SLOState object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOStatus.java b/src/main/java/com/datadog/api/client/v1/model/SLOStatus.java index dfbaa5e1cf5..494ac5ea996 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOStatus.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Status of the SLO's primary timeframe. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Status of the SLO's primary timeframe.

+ */ @JsonPropertyOrder({ SLOStatus.JSON_PROPERTY_CALCULATION_ERROR, SLOStatus.JSON_PROPERTY_ERROR_BUDGET_REMAINING, @@ -23,10 +42,10 @@ SLOStatus.JSON_PROPERTY_SPAN_PRECISION, SLOStatus.JSON_PROPERTY_STATE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOStatus { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CALCULATION_ERROR = "calculation_error"; private JsonNullable calculationError = JsonNullable.undefined(); @@ -36,10 +55,8 @@ public class SLOStatus { public static final String JSON_PROPERTY_INDEXED_AT = "indexed_at"; private Long indexedAt; - public static final String JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING = - "raw_error_budget_remaining"; - private JsonNullable rawErrorBudgetRemaining = - JsonNullable.undefined(); + public static final String JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING = "raw_error_budget_remaining"; + private JsonNullable rawErrorBudgetRemaining = JsonNullable.undefined(); public static final String JSON_PROPERTY_SLI = "sli"; private JsonNullable sli = JsonNullable.undefined(); @@ -56,180 +73,150 @@ public SLOStatus calculationError(String calculationError) { } /** - * Error message if SLO status or error budget could not be calculated. - * + *

Error message if SLO status or error budget could not be calculated.

* @return calculationError - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getCalculationError() { - return calculationError.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCalculationError() { + return calculationError.orElse(null); + } @JsonProperty(JSON_PROPERTY_CALCULATION_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCalculationError_JsonNullable() { return calculationError; } - - @JsonProperty(JSON_PROPERTY_CALCULATION_ERROR) - public void setCalculationError_JsonNullable(JsonNullable calculationError) { + @JsonProperty(JSON_PROPERTY_CALCULATION_ERROR)public void setCalculationError_JsonNullable(JsonNullable calculationError) { this.calculationError = calculationError; } - public void setCalculationError(String calculationError) { this.calculationError = JsonNullable.of(calculationError); } - public SLOStatus errorBudgetRemaining(Double errorBudgetRemaining) { this.errorBudgetRemaining = JsonNullable.of(errorBudgetRemaining); return this; } /** - * Remaining error budget of the SLO in percentage. - * + *

Remaining error budget of the SLO in percentage.

* @return errorBudgetRemaining - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getErrorBudgetRemaining() { - return errorBudgetRemaining.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getErrorBudgetRemaining() { + return errorBudgetRemaining.orElse(null); + } @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getErrorBudgetRemaining_JsonNullable() { return errorBudgetRemaining; } - - @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING) - public void setErrorBudgetRemaining_JsonNullable(JsonNullable errorBudgetRemaining) { + @JsonProperty(JSON_PROPERTY_ERROR_BUDGET_REMAINING)public void setErrorBudgetRemaining_JsonNullable(JsonNullable errorBudgetRemaining) { this.errorBudgetRemaining = errorBudgetRemaining; } - public void setErrorBudgetRemaining(Double errorBudgetRemaining) { this.errorBudgetRemaining = JsonNullable.of(errorBudgetRemaining); } - public SLOStatus indexedAt(Long indexedAt) { this.indexedAt = indexedAt; return this; } /** - * timestamp (UNIX time in seconds) of when the SLO status and error budget were calculated. - * + *

timestamp (UNIX time in seconds) of when the SLO status and error budget + * were calculated.

* @return indexedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedAt() { - return indexedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedAt() { + return indexedAt; + } public void setIndexedAt(Long indexedAt) { this.indexedAt = indexedAt; } - public SLOStatus rawErrorBudgetRemaining(SLORawErrorBudgetRemaining rawErrorBudgetRemaining) { - this.rawErrorBudgetRemaining = - JsonNullable.of(rawErrorBudgetRemaining); + this.rawErrorBudgetRemaining = JsonNullable.of(rawErrorBudgetRemaining); return this; } /** - * Error budget remaining for an SLO. - * + *

Error budget remaining for an SLO.

* @return rawErrorBudgetRemaining - */ - @jakarta.annotation.Nullable - @JsonIgnore - public SLORawErrorBudgetRemaining getRawErrorBudgetRemaining() { - return rawErrorBudgetRemaining.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public SLORawErrorBudgetRemaining getRawErrorBudgetRemaining() { + return rawErrorBudgetRemaining.orElse(null); + } @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRawErrorBudgetRemaining_JsonNullable() { return rawErrorBudgetRemaining; } - - @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING) - public void setRawErrorBudgetRemaining_JsonNullable( - JsonNullable rawErrorBudgetRemaining) { + @JsonProperty(JSON_PROPERTY_RAW_ERROR_BUDGET_REMAINING)public void setRawErrorBudgetRemaining_JsonNullable(JsonNullable rawErrorBudgetRemaining) { this.rawErrorBudgetRemaining = rawErrorBudgetRemaining; } - public void setRawErrorBudgetRemaining(SLORawErrorBudgetRemaining rawErrorBudgetRemaining) { - this.rawErrorBudgetRemaining = - JsonNullable.of(rawErrorBudgetRemaining); + this.rawErrorBudgetRemaining = JsonNullable.of(rawErrorBudgetRemaining); } - public SLOStatus sli(Double sli) { this.sli = JsonNullable.of(sli); return this; } /** - * The current service level indicator (SLI) of the SLO, also known as 'status'. This is a - * percentage value from 0-100 (inclusive). - * + *

The current service level indicator (SLI) of the SLO, also known as 'status'. This is a percentage value from 0-100 (inclusive).

* @return sli - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getSli() { - return sli.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getSli() { + return sli.orElse(null); + } @JsonProperty(JSON_PROPERTY_SLI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSli_JsonNullable() { return sli; } - - @JsonProperty(JSON_PROPERTY_SLI) - public void setSli_JsonNullable(JsonNullable sli) { + @JsonProperty(JSON_PROPERTY_SLI)public void setSli_JsonNullable(JsonNullable sli) { this.sli = sli; } - public void setSli(Double sli) { this.sli = JsonNullable.of(sli); } - public SLOStatus spanPrecision(Long spanPrecision) { this.spanPrecision = JsonNullable.of(spanPrecision); return this; } /** - * The number of decimal places the SLI value is accurate to. - * + *

The number of decimal places the SLI value is accurate to.

* @return spanPrecision - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSpanPrecision() { - return spanPrecision.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSpanPrecision() { + return spanPrecision.orElse(null); + } @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSpanPrecision_JsonNullable() { return spanPrecision; } - - @JsonProperty(JSON_PROPERTY_SPAN_PRECISION) - public void setSpanPrecision_JsonNullable(JsonNullable spanPrecision) { + @JsonProperty(JSON_PROPERTY_SPAN_PRECISION)public void setSpanPrecision_JsonNullable(JsonNullable spanPrecision) { this.spanPrecision = spanPrecision; } - public void setSpanPrecision(Long spanPrecision) { this.spanPrecision = JsonNullable.of(spanPrecision); } - public SLOStatus state(SLOState state) { this.state = state; this.unparsed |= !state.isValid(); @@ -237,25 +224,26 @@ public SLOStatus state(SLOState state) { } /** - * State of the SLO. - * + *

State of the SLO.

* @return state - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOState getState() { - return state; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOState getState() { + return state; + } public void setState(SLOState state) { if (!state.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.state = state; } - /** Return true if this SLOStatus object is equal to o. */ + /** + * Return true if this SLOStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -265,25 +253,13 @@ public boolean equals(Object o) { return false; } SLOStatus sloStatus = (SLOStatus) o; - return Objects.equals(this.calculationError, sloStatus.calculationError) - && Objects.equals(this.errorBudgetRemaining, sloStatus.errorBudgetRemaining) - && Objects.equals(this.indexedAt, sloStatus.indexedAt) - && Objects.equals(this.rawErrorBudgetRemaining, sloStatus.rawErrorBudgetRemaining) - && Objects.equals(this.sli, sloStatus.sli) - && Objects.equals(this.spanPrecision, sloStatus.spanPrecision) - && Objects.equals(this.state, sloStatus.state); + return Objects.equals(this.calculationError, sloStatus.calculationError) && Objects.equals(this.errorBudgetRemaining, sloStatus.errorBudgetRemaining) && Objects.equals(this.indexedAt, sloStatus.indexedAt) && Objects.equals(this.rawErrorBudgetRemaining, sloStatus.rawErrorBudgetRemaining) && Objects.equals(this.sli, sloStatus.sli) && Objects.equals(this.spanPrecision, sloStatus.spanPrecision) && Objects.equals(this.state, sloStatus.state); } + @Override public int hashCode() { - return Objects.hash( - calculationError, - errorBudgetRemaining, - indexedAt, - rawErrorBudgetRemaining, - sli, - spanPrecision, - state); + return Objects.hash(calculationError,errorBudgetRemaining,indexedAt,rawErrorBudgetRemaining,sli,spanPrecision,state); } @Override @@ -291,13 +267,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SLOStatus {\n"); sb.append(" calculationError: ").append(toIndentedString(calculationError)).append("\n"); - sb.append(" errorBudgetRemaining: ") - .append(toIndentedString(errorBudgetRemaining)) - .append("\n"); + sb.append(" errorBudgetRemaining: ").append(toIndentedString(errorBudgetRemaining)).append("\n"); sb.append(" indexedAt: ").append(toIndentedString(indexedAt)).append("\n"); - sb.append(" rawErrorBudgetRemaining: ") - .append(toIndentedString(rawErrorBudgetRemaining)) - .append("\n"); + sb.append(" rawErrorBudgetRemaining: ").append(toIndentedString(rawErrorBudgetRemaining)).append("\n"); sb.append(" sli: ").append(toIndentedString(sli)).append("\n"); sb.append(" spanPrecision: ").append(toIndentedString(spanPrecision)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); @@ -306,7 +278,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOThreshold.java b/src/main/java/com/datadog/api/client/v1/model/SLOThreshold.java index 855c5696304..468a5423bd9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOThreshold.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOThreshold.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** SLO thresholds (target and optionally warning) for a single time window. */ +/** + *

SLO thresholds (target and optionally warning) for a single time window.

+ */ @JsonPropertyOrder({ SLOThreshold.JSON_PROPERTY_TARGET, SLOThreshold.JSON_PROPERTY_TARGET_DISPLAY, @@ -21,10 +40,10 @@ SLOThreshold.JSON_PROPERTY_WARNING, SLOThreshold.JSON_PROPERTY_WARNING_DISPLAY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOThreshold { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TARGET = "target"; private Double target; @@ -44,57 +63,53 @@ public SLOThreshold() {} @JsonCreator public SLOThreshold( - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) Double target, - @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) SLOTimeframe timeframe) { - this.target = target; - this.timeframe = timeframe; - this.unparsed |= !timeframe.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)Double target, + @JsonProperty(required=true, value=JSON_PROPERTY_TIMEFRAME)SLOTimeframe timeframe) { + this.target = target; + this.timeframe = timeframe; + this.unparsed |= !timeframe.isValid(); } - public SLOThreshold target(Double target) { this.target = target; return this; } /** - * The target value for the service level indicator within the corresponding timeframe. - * + *

The target value for the service level indicator within the corresponding + * timeframe.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getTarget() { + return target; + } public void setTarget(Double target) { this.target = target; } - public SLOThreshold targetDisplay(String targetDisplay) { this.targetDisplay = targetDisplay; return this; } /** - * A string representation of the target that indicates its precision. It uses trailing zeros to - * show significant decimal places (for example 98.00). - * - *

Always included in service level objective responses. Ignored in create/update requests. - * + *

A string representation of the target that indicates its precision. + * It uses trailing zeros to show significant decimal places (for example 98.00).

+ *

Always included in service level objective responses. Ignored in + * create/update requests.

* @return targetDisplay - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_DISPLAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTargetDisplay() { - return targetDisplay; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_DISPLAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTargetDisplay() { + return targetDisplay; + } public void setTargetDisplay(String targetDisplay) { this.targetDisplay = targetDisplay; } - public SLOThreshold timeframe(SLOTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -102,70 +117,66 @@ public SLOThreshold timeframe(SLOTimeframe timeframe) { } /** - * The SLO time window options. - * + *

The SLO time window options.

* @return timeframe - */ - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOTimeframe getTimeframe() { - return timeframe; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SLOTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - public SLOThreshold warning(Double warning) { this.warning = warning; return this; } /** - * The warning value for the service level objective. - * + *

The warning value for the service level objective.

* @return warning - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getWarning() { - return warning; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getWarning() { + return warning; + } public void setWarning(Double warning) { this.warning = warning; } - public SLOThreshold warningDisplay(String warningDisplay) { this.warningDisplay = warningDisplay; return this; } /** - * A string representation of the warning target (see the description of the target_display - * field for details). - * - *

Included in service level objective responses if a warning target exists. Ignored in - * create/update requests. - * + *

A string representation of the warning target (see the description of + * the target_display field for details).

+ *

Included in service level objective responses if a warning target exists. + * Ignored in create/update requests.

* @return warningDisplay - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNING_DISPLAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getWarningDisplay() { - return warningDisplay; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_DISPLAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getWarningDisplay() { + return warningDisplay; + } public void setWarningDisplay(String warningDisplay) { this.warningDisplay = warningDisplay; } - /** Return true if this SLOThreshold object is equal to o. */ + /** + * Return true if this SLOThreshold object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -175,16 +186,13 @@ public boolean equals(Object o) { return false; } SLOThreshold sloThreshold = (SLOThreshold) o; - return Objects.equals(this.target, sloThreshold.target) - && Objects.equals(this.targetDisplay, sloThreshold.targetDisplay) - && Objects.equals(this.timeframe, sloThreshold.timeframe) - && Objects.equals(this.warning, sloThreshold.warning) - && Objects.equals(this.warningDisplay, sloThreshold.warningDisplay); + return Objects.equals(this.target, sloThreshold.target) && Objects.equals(this.targetDisplay, sloThreshold.targetDisplay) && Objects.equals(this.timeframe, sloThreshold.timeframe) && Objects.equals(this.warning, sloThreshold.warning) && Objects.equals(this.warningDisplay, sloThreshold.warningDisplay); } + @Override public int hashCode() { - return Objects.hash(target, targetDisplay, timeframe, warning, warningDisplay); + return Objects.hash(target,targetDisplay,timeframe,warning,warningDisplay); } @Override @@ -201,7 +209,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOTimeframe.java b/src/main/java/com/datadog/api/client/v1/model/SLOTimeframe.java index 4bf9b9a6fab..f633ccd83cb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOTimeframe.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOTimeframe.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The SLO time window options. */ +/** + *

The SLO time window options.

+ */ @JsonSerialize(using = SLOTimeframe.SLOTimeframeSerializer.class) public class SLOTimeframe { @@ -28,8 +52,7 @@ public class SLOTimeframe { public static final SLOTimeframe NINETY_DAYS = new SLOTimeframe("90d"); public static final SLOTimeframe CUSTOM = new SLOTimeframe("custom"); - private static final Set allowedValues = - new HashSet(Arrays.asList("7d", "30d", "90d", "custom")); + private static final Set allowedValues = new HashSet(Arrays.asList("7d", "30d", "90d", "custom")); private String value; @@ -42,19 +65,18 @@ public boolean isValid() { } public static class SLOTimeframeSerializer extends StdSerializer { - public SLOTimeframeSerializer(Class t) { - super(t); - } - - public SLOTimeframeSerializer() { - this(null); - } - - @Override - public void serialize(SLOTimeframe value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOTimeframeSerializer(Class t) { + super(t); + } + + public SLOTimeframeSerializer() { + this(null); + } + + @Override + public void serialize(SLOTimeframe value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOTimeframe object is equal to o. */ + /** + * Return true if this SLOTimeframe object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOType.java b/src/main/java/com/datadog/api/client/v1/model/SLOType.java index 5b34cf6e6f8..49fa8e2a2d0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the service level objective. */ +/** + *

The type of the service level objective.

+ */ @JsonSerialize(using = SLOType.SLOTypeSerializer.class) public class SLOType { public static final SLOType METRIC = new SLOType("metric"); public static final SLOType MONITOR = new SLOType("monitor"); - private static final Set allowedValues = - new HashSet(Arrays.asList("metric", "monitor")); + private static final Set allowedValues = new HashSet(Arrays.asList("metric", "monitor")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class SLOTypeSerializer extends StdSerializer { - public SLOTypeSerializer(Class t) { - super(t); - } - - public SLOTypeSerializer() { - this(null); - } - - @Override - public void serialize(SLOType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOTypeSerializer(Class t) { + super(t); + } + + public SLOTypeSerializer() { + this(null); + } + + @Override + public void serialize(SLOType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOType object is equal to o. */ + /** + * Return true if this SLOType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOTypeNumeric.java b/src/main/java/com/datadog/api/client/v1/model/SLOTypeNumeric.java index c76eceb9eff..1516f0b7a75 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOTypeNumeric.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOTypeNumeric.java @@ -6,23 +6,45 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * A numeric representation of the type of the service level objective (0 for monitor, - * 1 for metric). Always included in service level objective responses. Ignored in - * create/update requests. + *

A numeric representation of the type of the service level objective (0 for + * monitor, 1 for metric). Always included in service level objective responses. + * Ignored in create/update requests.

*/ @JsonSerialize(using = SLOTypeNumeric.SLOTypeNumericSerializer.class) public class SLOTypeNumeric { @@ -43,19 +65,18 @@ public boolean isValid() { } public static class SLOTypeNumericSerializer extends StdSerializer { - public SLOTypeNumericSerializer(Class t) { - super(t); - } - - public SLOTypeNumericSerializer() { - this(null); - } - - @Override - public void serialize(SLOTypeNumeric value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SLOTypeNumericSerializer(Class t) { + super(t); + } + + public SLOTypeNumericSerializer() { + this(null); + } + + @Override + public void serialize(SLOTypeNumeric value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +88,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this SLOTypeNumeric object is equal to o. */ + /** + * Return true if this SLOTypeNumeric object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinition.java index f32514fe0a5..0651ea76796 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Use the SLO and uptime widget to track your SLOs (Service Level Objectives) and uptime on - * screenboards and timeboards. + *

Use the SLO and uptime widget to track your SLOs (Service Level Objectives) and uptime on screenboards and timeboards.

*/ @JsonPropertyOrder({ SLOWidgetDefinition.JSON_PROPERTY_GLOBAL_TIME_TARGET, @@ -31,10 +45,10 @@ SLOWidgetDefinition.JSON_PROPERTY_VIEW_MODE, SLOWidgetDefinition.JSON_PROPERTY_VIEW_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SLOWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GLOBAL_TIME_TARGET = "global_time_target"; private String globalTimeTarget; @@ -69,81 +83,73 @@ public SLOWidgetDefinition() {} @JsonCreator public SLOWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SLOWidgetDefinitionType type, - @JsonProperty(required = true, value = JSON_PROPERTY_VIEW_TYPE) String viewType) { - this.type = type; - this.unparsed |= !type.isValid(); - this.viewType = viewType; + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SLOWidgetDefinitionType type, + @JsonProperty(required=true, value=JSON_PROPERTY_VIEW_TYPE)String viewType) { + this.type = type; + this.unparsed |= !type.isValid(); + this.viewType = viewType; } - public SLOWidgetDefinition globalTimeTarget(String globalTimeTarget) { this.globalTimeTarget = globalTimeTarget; return this; } /** - * Defined global time target. - * + *

Defined global time target.

* @return globalTimeTarget - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GLOBAL_TIME_TARGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGlobalTimeTarget() { - return globalTimeTarget; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GLOBAL_TIME_TARGET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGlobalTimeTarget() { + return globalTimeTarget; + } public void setGlobalTimeTarget(String globalTimeTarget) { this.globalTimeTarget = globalTimeTarget; } - public SLOWidgetDefinition showErrorBudget(Boolean showErrorBudget) { this.showErrorBudget = showErrorBudget; return this; } /** - * Defined error budget. - * + *

Defined error budget.

* @return showErrorBudget - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_ERROR_BUDGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowErrorBudget() { - return showErrorBudget; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_ERROR_BUDGET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowErrorBudget() { + return showErrorBudget; + } public void setShowErrorBudget(Boolean showErrorBudget) { this.showErrorBudget = showErrorBudget; } - public SLOWidgetDefinition sloId(String sloId) { this.sloId = sloId; return this; } /** - * ID of the SLO displayed. - * + *

ID of the SLO displayed.

* @return sloId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLO_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSloId() { - return sloId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLO_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSloId() { + return sloId; + } public void setSloId(String sloId) { this.sloId = sloId; } - public SLOWidgetDefinition timeWindows(List timeWindows) { this.timeWindows = timeWindows; return this; } - public SLOWidgetDefinition addTimeWindowsItem(WidgetTimeWindows timeWindowsItem) { if (this.timeWindows == null) { this.timeWindows = new ArrayList<>(); @@ -154,42 +160,38 @@ public SLOWidgetDefinition addTimeWindowsItem(WidgetTimeWindows timeWindowsItem) } /** - * Times being monitored. - * + *

Times being monitored.

* @return timeWindows - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_WINDOWS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimeWindows() { - return timeWindows; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_WINDOWS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimeWindows() { + return timeWindows; + } public void setTimeWindows(List timeWindows) { this.timeWindows = timeWindows; } - public SLOWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public SLOWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -197,45 +199,41 @@ public SLOWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public SLOWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public SLOWidgetDefinition type(SLOWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -243,23 +241,21 @@ public SLOWidgetDefinition type(SLOWidgetDefinitionType type) { } /** - * Type of the SLO widget. - * + *

Type of the SLO widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOWidgetDefinitionType getType() { + return type; + } public void setType(SLOWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SLOWidgetDefinition viewMode(WidgetViewMode viewMode) { this.viewMode = viewMode; this.unparsed |= !viewMode.isValid(); @@ -267,45 +263,44 @@ public SLOWidgetDefinition viewMode(WidgetViewMode viewMode) { } /** - * Define how you want the SLO to be displayed. - * + *

Define how you want the SLO to be displayed.

* @return viewMode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VIEW_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetViewMode getViewMode() { - return viewMode; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VIEW_MODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetViewMode getViewMode() { + return viewMode; + } public void setViewMode(WidgetViewMode viewMode) { if (!viewMode.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.viewMode = viewMode; } - public SLOWidgetDefinition viewType(String viewType) { this.viewType = viewType; return this; } /** - * Type of view displayed by the widget. - * + *

Type of view displayed by the widget.

* @return viewType - */ - @JsonProperty(JSON_PROPERTY_VIEW_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getViewType() { - return viewType; - } - + **/ + @JsonProperty(JSON_PROPERTY_VIEW_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getViewType() { + return viewType; + } public void setViewType(String viewType) { this.viewType = viewType; } - /** Return true if this SLOWidgetDefinition object is equal to o. */ + /** + * Return true if this SLOWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -315,31 +310,13 @@ public boolean equals(Object o) { return false; } SLOWidgetDefinition sloWidgetDefinition = (SLOWidgetDefinition) o; - return Objects.equals(this.globalTimeTarget, sloWidgetDefinition.globalTimeTarget) - && Objects.equals(this.showErrorBudget, sloWidgetDefinition.showErrorBudget) - && Objects.equals(this.sloId, sloWidgetDefinition.sloId) - && Objects.equals(this.timeWindows, sloWidgetDefinition.timeWindows) - && Objects.equals(this.title, sloWidgetDefinition.title) - && Objects.equals(this.titleAlign, sloWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, sloWidgetDefinition.titleSize) - && Objects.equals(this.type, sloWidgetDefinition.type) - && Objects.equals(this.viewMode, sloWidgetDefinition.viewMode) - && Objects.equals(this.viewType, sloWidgetDefinition.viewType); + return Objects.equals(this.globalTimeTarget, sloWidgetDefinition.globalTimeTarget) && Objects.equals(this.showErrorBudget, sloWidgetDefinition.showErrorBudget) && Objects.equals(this.sloId, sloWidgetDefinition.sloId) && Objects.equals(this.timeWindows, sloWidgetDefinition.timeWindows) && Objects.equals(this.title, sloWidgetDefinition.title) && Objects.equals(this.titleAlign, sloWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, sloWidgetDefinition.titleSize) && Objects.equals(this.type, sloWidgetDefinition.type) && Objects.equals(this.viewMode, sloWidgetDefinition.viewMode) && Objects.equals(this.viewType, sloWidgetDefinition.viewType); } + @Override public int hashCode() { - return Objects.hash( - globalTimeTarget, - showErrorBudget, - sloId, - timeWindows, - title, - titleAlign, - titleSize, - type, - viewMode, - viewType); + return Objects.hash(globalTimeTarget,showErrorBudget,sloId,timeWindows,title,titleAlign,titleSize,type,viewMode,viewType); } @Override @@ -361,7 +338,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinitionType.java index 56d9bb10809..4fa0a821951 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SLOWidgetDefinitionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the SLO widget. */ +/** + *

Type of the SLO widget.

+ */ @JsonSerialize(using = SLOWidgetDefinitionType.SLOWidgetDefinitionTypeSerializer.class) public class SLOWidgetDefinitionType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SLOWidgetDefinitionTypeSerializer - extends StdSerializer { - public SLOWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class SLOWidgetDefinitionTypeSerializer extends StdSerializer { + public SLOWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public SLOWidgetDefinitionTypeSerializer() { - this(null); - } + public SLOWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - SLOWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SLOWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SLOWidgetDefinitionType object is equal to o. */ + /** + * Return true if this SLOWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotRequest.java b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotRequest.java index af1ceead9d1..00e0e0fe3be 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotRequest.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated scatter plot. */ + +/** + *

Updated scatter plot.

+ */ @JsonPropertyOrder({ ScatterPlotRequest.JSON_PROPERTY_AGGREGATOR, ScatterPlotRequest.JSON_PROPERTY_APM_QUERY, @@ -25,10 +45,10 @@ ScatterPlotRequest.JSON_PROPERTY_RUM_QUERY, ScatterPlotRequest.JSON_PROPERTY_SECURITY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScatterPlotRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATOR = "aggregator"; private ScatterplotWidgetAggregator aggregator; @@ -66,24 +86,22 @@ public ScatterPlotRequest aggregator(ScatterplotWidgetAggregator aggregator) { } /** - * Aggregator used for the request. - * + *

Aggregator used for the request.

* @return aggregator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScatterplotWidgetAggregator getAggregator() { - return aggregator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScatterplotWidgetAggregator getAggregator() { + return aggregator; + } public void setAggregator(ScatterplotWidgetAggregator aggregator) { if (!aggregator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregator = aggregator; } - public ScatterPlotRequest apmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; this.unparsed |= apmQuery.unparsed; @@ -91,21 +109,19 @@ public ScatterPlotRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public ScatterPlotRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -113,21 +129,19 @@ public ScatterPlotRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public ScatterPlotRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -135,21 +149,19 @@ public ScatterPlotRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public ScatterPlotRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -157,21 +169,19 @@ public ScatterPlotRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public ScatterPlotRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -179,21 +189,19 @@ public ScatterPlotRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public ScatterPlotRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -201,42 +209,38 @@ public ScatterPlotRequest profileMetricsQuery(LogQueryDefinition profileMetricsQ } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public ScatterPlotRequest q(String q) { this.q = q; return this; } /** - * Query definition. - * + *

Query definition.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public ScatterPlotRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -244,21 +248,19 @@ public ScatterPlotRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public ScatterPlotRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -266,22 +268,23 @@ public ScatterPlotRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - /** Return true if this ScatterPlotRequest object is equal to o. */ + /** + * Return true if this ScatterPlotRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -291,31 +294,13 @@ public boolean equals(Object o) { return false; } ScatterPlotRequest scatterPlotRequest = (ScatterPlotRequest) o; - return Objects.equals(this.aggregator, scatterPlotRequest.aggregator) - && Objects.equals(this.apmQuery, scatterPlotRequest.apmQuery) - && Objects.equals(this.eventQuery, scatterPlotRequest.eventQuery) - && Objects.equals(this.logQuery, scatterPlotRequest.logQuery) - && Objects.equals(this.networkQuery, scatterPlotRequest.networkQuery) - && Objects.equals(this.processQuery, scatterPlotRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, scatterPlotRequest.profileMetricsQuery) - && Objects.equals(this.q, scatterPlotRequest.q) - && Objects.equals(this.rumQuery, scatterPlotRequest.rumQuery) - && Objects.equals(this.securityQuery, scatterPlotRequest.securityQuery); + return Objects.equals(this.aggregator, scatterPlotRequest.aggregator) && Objects.equals(this.apmQuery, scatterPlotRequest.apmQuery) && Objects.equals(this.eventQuery, scatterPlotRequest.eventQuery) && Objects.equals(this.logQuery, scatterPlotRequest.logQuery) && Objects.equals(this.networkQuery, scatterPlotRequest.networkQuery) && Objects.equals(this.processQuery, scatterPlotRequest.processQuery) && Objects.equals(this.profileMetricsQuery, scatterPlotRequest.profileMetricsQuery) && Objects.equals(this.q, scatterPlotRequest.q) && Objects.equals(this.rumQuery, scatterPlotRequest.rumQuery) && Objects.equals(this.securityQuery, scatterPlotRequest.securityQuery); } + @Override public int hashCode() { - return Objects.hash( - aggregator, - apmQuery, - eventQuery, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - rumQuery, - securityQuery); + return Objects.hash(aggregator,apmQuery,eventQuery,logQuery,networkQuery,processQuery,profileMetricsQuery,q,rumQuery,securityQuery); } @Override @@ -328,9 +313,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" rumQuery: ").append(toIndentedString(rumQuery)).append("\n"); sb.append(" securityQuery: ").append(toIndentedString(securityQuery)).append("\n"); @@ -339,7 +322,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinition.java index 19c87c01cc8..88ddd1a94c9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The scatter plot visualization allows you to graph a chosen scope over two different metrics with - * their respective aggregation. + *

The scatter plot visualization allows you to graph a chosen scope over two different metrics with their respective aggregation.

*/ @JsonPropertyOrder({ ScatterPlotWidgetDefinition.JSON_PROPERTY_COLOR_BY_GROUPS, @@ -31,10 +45,10 @@ ScatterPlotWidgetDefinition.JSON_PROPERTY_XAXIS, ScatterPlotWidgetDefinition.JSON_PROPERTY_YAXIS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScatterPlotWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLOR_BY_GROUPS = "color_by_groups"; private List colorByGroups = null; @@ -69,21 +83,17 @@ public ScatterPlotWidgetDefinition() {} @JsonCreator public ScatterPlotWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - ScatterPlotWidgetDefinitionRequests requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ScatterPlotWidgetDefinitionType type) { - this.requests = requests; - this.unparsed |= requests.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)ScatterPlotWidgetDefinitionRequests requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ScatterPlotWidgetDefinitionType type) { + this.requests = requests; + this.unparsed |= requests.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public ScatterPlotWidgetDefinition colorByGroups(List colorByGroups) { this.colorByGroups = colorByGroups; return this; } - public ScatterPlotWidgetDefinition addColorByGroupsItem(String colorByGroupsItem) { if (this.colorByGroups == null) { this.colorByGroups = new ArrayList<>(); @@ -93,21 +103,19 @@ public ScatterPlotWidgetDefinition addColorByGroupsItem(String colorByGroupsItem } /** - * List of groups used for colors. - * + *

List of groups used for colors.

* @return colorByGroups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLOR_BY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getColorByGroups() { - return colorByGroups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR_BY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getColorByGroups() { + return colorByGroups; + } public void setColorByGroups(List colorByGroups) { this.colorByGroups = colorByGroups; } - public ScatterPlotWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -115,7 +123,6 @@ public ScatterPlotWidgetDefinition customLinks(List customLink } return this; } - public ScatterPlotWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -126,21 +133,19 @@ public ScatterPlotWidgetDefinition addCustomLinksItem(WidgetCustomLink customLin } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public ScatterPlotWidgetDefinition requests(ScatterPlotWidgetDefinitionRequests requests) { this.requests = requests; this.unparsed |= requests.unparsed; @@ -148,20 +153,18 @@ public ScatterPlotWidgetDefinition requests(ScatterPlotWidgetDefinitionRequests } /** - * Widget definition. - * + *

Widget definition.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScatterPlotWidgetDefinitionRequests getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ScatterPlotWidgetDefinitionRequests getRequests() { + return requests; + } public void setRequests(ScatterPlotWidgetDefinitionRequests requests) { this.requests = requests; } - public ScatterPlotWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -169,42 +172,38 @@ public ScatterPlotWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public ScatterPlotWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public ScatterPlotWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -212,45 +211,41 @@ public ScatterPlotWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public ScatterPlotWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public ScatterPlotWidgetDefinition type(ScatterPlotWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -258,23 +253,21 @@ public ScatterPlotWidgetDefinition type(ScatterPlotWidgetDefinitionType type) { } /** - * Type of the scatter plot widget. - * + *

Type of the scatter plot widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScatterPlotWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ScatterPlotWidgetDefinitionType getType() { + return type; + } public void setType(ScatterPlotWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public ScatterPlotWidgetDefinition xaxis(WidgetAxis xaxis) { this.xaxis = xaxis; this.unparsed |= xaxis.unparsed; @@ -282,21 +275,19 @@ public ScatterPlotWidgetDefinition xaxis(WidgetAxis xaxis) { } /** - * Axis controls for the widget. - * + *

Axis controls for the widget.

* @return xaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_XAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAxis getXaxis() { - return xaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_XAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAxis getXaxis() { + return xaxis; + } public void setXaxis(WidgetAxis xaxis) { this.xaxis = xaxis; } - public ScatterPlotWidgetDefinition yaxis(WidgetAxis yaxis) { this.yaxis = yaxis; this.unparsed |= yaxis.unparsed; @@ -304,22 +295,23 @@ public ScatterPlotWidgetDefinition yaxis(WidgetAxis yaxis) { } /** - * Axis controls for the widget. - * + *

Axis controls for the widget.

* @return yaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAxis getYaxis() { - return yaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAxis getYaxis() { + return yaxis; + } public void setYaxis(WidgetAxis yaxis) { this.yaxis = yaxis; } - /** Return true if this ScatterPlotWidgetDefinition object is equal to o. */ + /** + * Return true if this ScatterPlotWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -329,31 +321,13 @@ public boolean equals(Object o) { return false; } ScatterPlotWidgetDefinition scatterPlotWidgetDefinition = (ScatterPlotWidgetDefinition) o; - return Objects.equals(this.colorByGroups, scatterPlotWidgetDefinition.colorByGroups) - && Objects.equals(this.customLinks, scatterPlotWidgetDefinition.customLinks) - && Objects.equals(this.requests, scatterPlotWidgetDefinition.requests) - && Objects.equals(this.time, scatterPlotWidgetDefinition.time) - && Objects.equals(this.title, scatterPlotWidgetDefinition.title) - && Objects.equals(this.titleAlign, scatterPlotWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, scatterPlotWidgetDefinition.titleSize) - && Objects.equals(this.type, scatterPlotWidgetDefinition.type) - && Objects.equals(this.xaxis, scatterPlotWidgetDefinition.xaxis) - && Objects.equals(this.yaxis, scatterPlotWidgetDefinition.yaxis); + return Objects.equals(this.colorByGroups, scatterPlotWidgetDefinition.colorByGroups) && Objects.equals(this.customLinks, scatterPlotWidgetDefinition.customLinks) && Objects.equals(this.requests, scatterPlotWidgetDefinition.requests) && Objects.equals(this.time, scatterPlotWidgetDefinition.time) && Objects.equals(this.title, scatterPlotWidgetDefinition.title) && Objects.equals(this.titleAlign, scatterPlotWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, scatterPlotWidgetDefinition.titleSize) && Objects.equals(this.type, scatterPlotWidgetDefinition.type) && Objects.equals(this.xaxis, scatterPlotWidgetDefinition.xaxis) && Objects.equals(this.yaxis, scatterPlotWidgetDefinition.yaxis); } + @Override public int hashCode() { - return Objects.hash( - colorByGroups, - customLinks, - requests, - time, - title, - titleAlign, - titleSize, - type, - xaxis, - yaxis); + return Objects.hash(colorByGroups,customLinks,requests,time,title,titleAlign,titleSize,type,xaxis,yaxis); } @Override @@ -375,7 +349,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionRequests.java b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionRequests.java index 53b64c32f46..878e96f2692 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionRequests.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionRequests.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Widget definition. */ + +/** + *

Widget definition.

+ */ @JsonPropertyOrder({ ScatterPlotWidgetDefinitionRequests.JSON_PROPERTY_TABLE, ScatterPlotWidgetDefinitionRequests.JSON_PROPERTY_X, ScatterPlotWidgetDefinitionRequests.JSON_PROPERTY_Y }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScatterPlotWidgetDefinitionRequests { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TABLE = "table"; private ScatterplotTableRequest table; @@ -38,21 +58,19 @@ public ScatterPlotWidgetDefinitionRequests table(ScatterplotTableRequest table) } /** - * Scatterplot request containing formulas and functions. - * + *

Scatterplot request containing formulas and functions.

* @return table - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TABLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScatterplotTableRequest getTable() { - return table; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScatterplotTableRequest getTable() { + return table; + } public void setTable(ScatterplotTableRequest table) { this.table = table; } - public ScatterPlotWidgetDefinitionRequests x(ScatterPlotRequest x) { this.x = x; this.unparsed |= x.unparsed; @@ -60,21 +78,19 @@ public ScatterPlotWidgetDefinitionRequests x(ScatterPlotRequest x) { } /** - * Updated scatter plot. - * + *

Updated scatter plot.

* @return x - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScatterPlotRequest getX() { - return x; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_X) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScatterPlotRequest getX() { + return x; + } public void setX(ScatterPlotRequest x) { this.x = x; } - public ScatterPlotWidgetDefinitionRequests y(ScatterPlotRequest y) { this.y = y; this.unparsed |= y.unparsed; @@ -82,22 +98,23 @@ public ScatterPlotWidgetDefinitionRequests y(ScatterPlotRequest y) { } /** - * Updated scatter plot. - * + *

Updated scatter plot.

* @return y - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScatterPlotRequest getY() { - return y; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Y) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScatterPlotRequest getY() { + return y; + } public void setY(ScatterPlotRequest y) { this.y = y; } - /** Return true if this ScatterPlotWidgetDefinitionRequests object is equal to o. */ + /** + * Return true if this ScatterPlotWidgetDefinitionRequests object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,16 +123,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ScatterPlotWidgetDefinitionRequests scatterPlotWidgetDefinitionRequests = - (ScatterPlotWidgetDefinitionRequests) o; - return Objects.equals(this.table, scatterPlotWidgetDefinitionRequests.table) - && Objects.equals(this.x, scatterPlotWidgetDefinitionRequests.x) - && Objects.equals(this.y, scatterPlotWidgetDefinitionRequests.y); + ScatterPlotWidgetDefinitionRequests scatterPlotWidgetDefinitionRequests = (ScatterPlotWidgetDefinitionRequests) o; + return Objects.equals(this.table, scatterPlotWidgetDefinitionRequests.table) && Objects.equals(this.x, scatterPlotWidgetDefinitionRequests.x) && Objects.equals(this.y, scatterPlotWidgetDefinitionRequests.y); } + @Override public int hashCode() { - return Objects.hash(table, x, y); + return Objects.hash(table,x,y); } @Override @@ -130,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionType.java index 0db8eede63b..857b76eecc0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterPlotWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the scatter plot widget. */ -@JsonSerialize( - using = ScatterPlotWidgetDefinitionType.ScatterPlotWidgetDefinitionTypeSerializer.class) +/** + *

Type of the scatter plot widget.

+ */ +@JsonSerialize(using = ScatterPlotWidgetDefinitionType.ScatterPlotWidgetDefinitionTypeSerializer.class) public class ScatterPlotWidgetDefinitionType { - public static final ScatterPlotWidgetDefinitionType SCATTERPLOT = - new ScatterPlotWidgetDefinitionType("scatterplot"); + public static final ScatterPlotWidgetDefinitionType SCATTERPLOT = new ScatterPlotWidgetDefinitionType("scatterplot"); - private static final Set allowedValues = - new HashSet(Arrays.asList("scatterplot")); + private static final Set allowedValues = new HashSet(Arrays.asList("scatterplot")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ScatterPlotWidgetDefinitionTypeSerializer - extends StdSerializer { - public ScatterPlotWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class ScatterPlotWidgetDefinitionTypeSerializer extends StdSerializer { + public ScatterPlotWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ScatterPlotWidgetDefinitionTypeSerializer() { - this(null); - } + public ScatterPlotWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ScatterPlotWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ScatterPlotWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ScatterPlotWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ScatterPlotWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterplotDimension.java b/src/main/java/com/datadog/api/client/v1/model/ScatterplotDimension.java index 34d87e38c22..c78a9bea194 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterplotDimension.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterplotDimension.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Dimension of the Scatterplot. */ +/** + *

Dimension of the Scatterplot.

+ */ @JsonSerialize(using = ScatterplotDimension.ScatterplotDimensionSerializer.class) public class ScatterplotDimension { @@ -28,8 +52,7 @@ public class ScatterplotDimension { public static final ScatterplotDimension RADIUS = new ScatterplotDimension("radius"); public static final ScatterplotDimension COLOR = new ScatterplotDimension("color"); - private static final Set allowedValues = - new HashSet(Arrays.asList("x", "y", "radius", "color")); + private static final Set allowedValues = new HashSet(Arrays.asList("x", "y", "radius", "color")); private String value; @@ -42,20 +65,18 @@ public boolean isValid() { } public static class ScatterplotDimensionSerializer extends StdSerializer { - public ScatterplotDimensionSerializer(Class t) { - super(t); - } - - public ScatterplotDimensionSerializer() { - this(null); - } - - @Override - public void serialize( - ScatterplotDimension value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ScatterplotDimensionSerializer(Class t) { + super(t); + } + + public ScatterplotDimensionSerializer() { + this(null); + } + + @Override + public void serialize(ScatterplotDimension value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ScatterplotDimension object is equal to o. */ + /** + * Return true if this ScatterplotDimension object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java b/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java index e2ee5b2ea3f..00a4ef60cfa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Scatterplot request containing formulas and functions. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Scatterplot request containing formulas and functions.

+ */ @JsonPropertyOrder({ ScatterplotTableRequest.JSON_PROPERTY_FORMULAS, ScatterplotTableRequest.JSON_PROPERTY_QUERIES, ScatterplotTableRequest.JSON_PROPERTY_RESPONSE_FORMAT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScatterplotTableRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -40,7 +58,6 @@ public ScatterplotTableRequest formulas(List formulas) } return this; } - public ScatterplotTableRequest addFormulasItem(ScatterplotWidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -51,21 +68,19 @@ public ScatterplotTableRequest addFormulasItem(ScatterplotWidgetFormula formulas } /** - * List of Scatterplot formulas that operate on queries. - * + *

List of Scatterplot formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public ScatterplotTableRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -73,7 +88,6 @@ public ScatterplotTableRequest queries(List q } return this; } - public ScatterplotTableRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -84,21 +98,19 @@ public ScatterplotTableRequest addQueriesItem(FormulaAndFunctionQueryDefinition } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public ScatterplotTableRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -106,25 +118,26 @@ public ScatterplotTableRequest responseFormat(FormulaAndFunctionResponseFormat r } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - /** Return true if this ScatterplotTableRequest object is equal to o. */ + /** + * Return true if this ScatterplotTableRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,14 +147,13 @@ public boolean equals(Object o) { return false; } ScatterplotTableRequest scatterplotTableRequest = (ScatterplotTableRequest) o; - return Objects.equals(this.formulas, scatterplotTableRequest.formulas) - && Objects.equals(this.queries, scatterplotTableRequest.queries) - && Objects.equals(this.responseFormat, scatterplotTableRequest.responseFormat); + return Objects.equals(this.formulas, scatterplotTableRequest.formulas) && Objects.equals(this.queries, scatterplotTableRequest.queries) && Objects.equals(this.responseFormat, scatterplotTableRequest.responseFormat); } + @Override public int hashCode() { - return Objects.hash(formulas, queries, responseFormat); + return Objects.hash(formulas,queries,responseFormat); } @Override @@ -156,7 +168,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetAggregator.java b/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetAggregator.java index b14f753b87c..df1abc1b1f4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetAggregator.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetAggregator.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Aggregator used for the request. */ +/** + *

Aggregator used for the request.

+ */ @JsonSerialize(using = ScatterplotWidgetAggregator.ScatterplotWidgetAggregatorSerializer.class) public class ScatterplotWidgetAggregator { @@ -29,8 +53,7 @@ public class ScatterplotWidgetAggregator { public static final ScatterplotWidgetAggregator MINIMUM = new ScatterplotWidgetAggregator("min"); public static final ScatterplotWidgetAggregator SUM = new ScatterplotWidgetAggregator("sum"); - private static final Set allowedValues = - new HashSet(Arrays.asList("avg", "last", "max", "min", "sum")); + private static final Set allowedValues = new HashSet(Arrays.asList("avg", "last", "max", "min", "sum")); private String value; @@ -42,22 +65,19 @@ public boolean isValid() { this.value = value; } - public static class ScatterplotWidgetAggregatorSerializer - extends StdSerializer { - public ScatterplotWidgetAggregatorSerializer(Class t) { - super(t); - } + public static class ScatterplotWidgetAggregatorSerializer extends StdSerializer { + public ScatterplotWidgetAggregatorSerializer(Class t) { + super(t); + } - public ScatterplotWidgetAggregatorSerializer() { - this(null); - } + public ScatterplotWidgetAggregatorSerializer() { + this(null); + } - @Override - public void serialize( - ScatterplotWidgetAggregator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ScatterplotWidgetAggregator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ScatterplotWidgetAggregator object is equal to o. */ + /** + * Return true if this ScatterplotWidgetAggregator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetFormula.java b/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetFormula.java index 2c0025c56a4..2fd2b742045 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetFormula.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterplotWidgetFormula.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Formula to be used in a Scatterplot widget query. */ + +/** + *

Formula to be used in a Scatterplot widget query.

+ */ @JsonPropertyOrder({ ScatterplotWidgetFormula.JSON_PROPERTY_ALIAS, ScatterplotWidgetFormula.JSON_PROPERTY_DIMENSION, ScatterplotWidgetFormula.JSON_PROPERTY_FORMULA }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScatterplotWidgetFormula { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALIAS = "alias"; private String alias; @@ -36,35 +55,31 @@ public ScatterplotWidgetFormula() {} @JsonCreator public ScatterplotWidgetFormula( - @JsonProperty(required = true, value = JSON_PROPERTY_DIMENSION) - ScatterplotDimension dimension, - @JsonProperty(required = true, value = JSON_PROPERTY_FORMULA) String formula) { - this.dimension = dimension; - this.unparsed |= !dimension.isValid(); - this.formula = formula; + @JsonProperty(required=true, value=JSON_PROPERTY_DIMENSION)ScatterplotDimension dimension, + @JsonProperty(required=true, value=JSON_PROPERTY_FORMULA)String formula) { + this.dimension = dimension; + this.unparsed |= !dimension.isValid(); + this.formula = formula; } - public ScatterplotWidgetFormula alias(String alias) { this.alias = alias; return this; } /** - * Expression alias. - * + *

Expression alias.

* @return alias - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlias() { - return alias; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAlias() { + return alias; + } public void setAlias(String alias) { this.alias = alias; } - public ScatterplotWidgetFormula dimension(ScatterplotDimension dimension) { this.dimension = dimension; this.unparsed |= !dimension.isValid(); @@ -72,44 +87,43 @@ public ScatterplotWidgetFormula dimension(ScatterplotDimension dimension) { } /** - * Dimension of the Scatterplot. - * + *

Dimension of the Scatterplot.

* @return dimension - */ - @JsonProperty(JSON_PROPERTY_DIMENSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScatterplotDimension getDimension() { - return dimension; - } - + **/ + @JsonProperty(JSON_PROPERTY_DIMENSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ScatterplotDimension getDimension() { + return dimension; + } public void setDimension(ScatterplotDimension dimension) { if (!dimension.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dimension = dimension; } - public ScatterplotWidgetFormula formula(String formula) { this.formula = formula; return this; } /** - * String expression built from queries, formulas, and functions. - * + *

String expression built from queries, formulas, and functions.

* @return formula - */ - @JsonProperty(JSON_PROPERTY_FORMULA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFormula() { - return formula; - } - + **/ + @JsonProperty(JSON_PROPERTY_FORMULA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFormula() { + return formula; + } public void setFormula(String formula) { this.formula = formula; } - /** Return true if this ScatterplotWidgetFormula object is equal to o. */ + /** + * Return true if this ScatterplotWidgetFormula object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +133,13 @@ public boolean equals(Object o) { return false; } ScatterplotWidgetFormula scatterplotWidgetFormula = (ScatterplotWidgetFormula) o; - return Objects.equals(this.alias, scatterplotWidgetFormula.alias) - && Objects.equals(this.dimension, scatterplotWidgetFormula.dimension) - && Objects.equals(this.formula, scatterplotWidgetFormula.formula); + return Objects.equals(this.alias, scatterplotWidgetFormula.alias) && Objects.equals(this.dimension, scatterplotWidgetFormula.dimension) && Objects.equals(this.formula, scatterplotWidgetFormula.formula); } + @Override public int hashCode() { - return Objects.hash(alias, dimension, formula); + return Objects.hash(alias,dimension,formula); } @Override @@ -141,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOQuery.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOQuery.java index 08671ecdcb3..de39e356ce4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOQuery.java @@ -6,29 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A metric-based SLO. Required if type is metric. Note that Datadog - * only allows the sum by aggregator to be used because this will sum up all request counts instead - * of averaging them, or taking the max or min of all of those requests. + *

A metric-based SLO. Required if type is metric. Note that Datadog only allows the sum by aggregator + * to be used because this will sum up all request counts instead of averaging them, or taking the max or + * min of all of those requests.

*/ @JsonPropertyOrder({ SearchSLOQuery.JSON_PROPERTY_DENOMINATOR, SearchSLOQuery.JSON_PROPERTY_METRICS, SearchSLOQuery.JSON_PROPERTY_NUMERATOR }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DENOMINATOR = "denominator"; private String denominator; @@ -44,26 +59,23 @@ public SearchSLOQuery denominator(String denominator) { } /** - * A Datadog metric query for total (valid) events. - * + *

A Datadog metric query for total (valid) events.

* @return denominator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DENOMINATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDenominator() { - return denominator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DENOMINATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDenominator() { + return denominator; + } public void setDenominator(String denominator) { this.denominator = denominator; } - public SearchSLOQuery metrics(List metrics) { this.metrics = JsonNullable.>of(metrics); return this; } - public SearchSLOQuery addMetricsItem(String metricsItem) { if (this.metrics == null || !this.metrics.isPresent()) { this.metrics = JsonNullable.>of(new ArrayList<>()); @@ -77,54 +89,50 @@ public SearchSLOQuery addMetricsItem(String metricsItem) { } /** - * Metric names used in the query's numerator and denominator. This field will return null and - * will be implemented in the next version of this endpoint. - * + *

Metric names used in the query's numerator and denominator. + * This field will return null and will be implemented in the next version of this endpoint.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getMetrics() { - return metrics.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getMetrics() { + return metrics.orElse(null); + } @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getMetrics_JsonNullable() { return metrics; } - - @JsonProperty(JSON_PROPERTY_METRICS) - public void setMetrics_JsonNullable(JsonNullable> metrics) { + @JsonProperty(JSON_PROPERTY_METRICS)public void setMetrics_JsonNullable(JsonNullable> metrics) { this.metrics = metrics; } - public void setMetrics(List metrics) { this.metrics = JsonNullable.>of(metrics); } - public SearchSLOQuery numerator(String numerator) { this.numerator = numerator; return this; } /** - * A Datadog metric query for good events. - * + *

A Datadog metric query for good events.

* @return numerator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUMERATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNumerator() { - return numerator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMERATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNumerator() { + return numerator; + } public void setNumerator(String numerator) { this.numerator = numerator; } - /** Return true if this SearchSLOQuery object is equal to o. */ + /** + * Return true if this SearchSLOQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,14 +142,13 @@ public boolean equals(Object o) { return false; } SearchSLOQuery searchSloQuery = (SearchSLOQuery) o; - return Objects.equals(this.denominator, searchSloQuery.denominator) - && Objects.equals(this.metrics, searchSloQuery.metrics) - && Objects.equals(this.numerator, searchSloQuery.numerator); + return Objects.equals(this.denominator, searchSloQuery.denominator) && Objects.equals(this.metrics, searchSloQuery.metrics) && Objects.equals(this.numerator, searchSloQuery.numerator); } + @Override public int hashCode() { - return Objects.hash(denominator, metrics, numerator); + return Objects.hash(denominator,metrics,numerator); } @Override @@ -156,7 +163,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponse.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponse.java index 20762db72ad..b27fa37f29c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponse.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A search SLO response containing results from the search query. */ + +/** + *

A search SLO response containing results from the search query.

+ */ @JsonPropertyOrder({ SearchSLOResponse.JSON_PROPERTY_DATA, SearchSLOResponse.JSON_PROPERTY_LINKS, SearchSLOResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SearchSLOResponseData data; @@ -38,21 +58,19 @@ public SearchSLOResponse data(SearchSLOResponseData data) { } /** - * Data from search SLO response. - * + *

Data from search SLO response.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchSLOResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchSLOResponseData getData() { + return data; + } public void setData(SearchSLOResponseData data) { this.data = data; } - public SearchSLOResponse links(SearchSLOResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -60,21 +78,19 @@ public SearchSLOResponse links(SearchSLOResponseLinks links) { } /** - * Pagination links. - * + *

Pagination links.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchSLOResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchSLOResponseLinks getLinks() { + return links; + } public void setLinks(SearchSLOResponseLinks links) { this.links = links; } - public SearchSLOResponse meta(SearchSLOResponseMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -82,22 +98,23 @@ public SearchSLOResponse meta(SearchSLOResponseMeta meta) { } /** - * Searches metadata returned by the API. - * + *

Searches metadata returned by the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchSLOResponseMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchSLOResponseMeta getMeta() { + return meta; + } public void setMeta(SearchSLOResponseMeta meta) { this.meta = meta; } - /** Return true if this SearchSLOResponse object is equal to o. */ + /** + * Return true if this SearchSLOResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,14 +124,13 @@ public boolean equals(Object o) { return false; } SearchSLOResponse searchSloResponse = (SearchSLOResponse) o; - return Objects.equals(this.data, searchSloResponse.data) - && Objects.equals(this.links, searchSloResponse.links) - && Objects.equals(this.meta, searchSloResponse.meta); + return Objects.equals(this.data, searchSloResponse.data) && Objects.equals(this.links, searchSloResponse.links) && Objects.equals(this.meta, searchSloResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -129,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseData.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseData.java index f2d14b75051..84cd512d771 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data from search SLO response. */ + +/** + *

Data from search SLO response.

+ */ @JsonPropertyOrder({ SearchSLOResponseData.JSON_PROPERTY_ATTRIBUTES, SearchSLOResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SearchSLOResponseDataAttributes attributes; @@ -34,43 +54,42 @@ public SearchSLOResponseData attributes(SearchSLOResponseDataAttributes attribut } /** - * Attributes - * + *

Attributes

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchSLOResponseDataAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchSLOResponseDataAttributes getAttributes() { + return attributes; + } public void setAttributes(SearchSLOResponseDataAttributes attributes) { this.attributes = attributes; } - public SearchSLOResponseData type(String type) { this.type = type; return this; } /** - * Type of service level objective result. - * + *

Type of service level objective result.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this SearchSLOResponseData object is equal to o. */ + /** + * Return true if this SearchSLOResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +99,13 @@ public boolean equals(Object o) { return false; } SearchSLOResponseData searchSloResponseData = (SearchSLOResponseData) o; - return Objects.equals(this.attributes, searchSloResponseData.attributes) - && Objects.equals(this.type, searchSloResponseData.type); + return Objects.equals(this.attributes, searchSloResponseData.attributes) && Objects.equals(this.type, searchSloResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributes.java index 5b195f74ba7..9ee1457b1b1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributes.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes */ +/** + *

Attributes

+ */ @JsonPropertyOrder({ SearchSLOResponseDataAttributes.JSON_PROPERTY_FACETS, SearchSLOResponseDataAttributes.JSON_PROPERTY_SLOS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACETS = "facets"; private SearchSLOResponseDataAttributesFacets facets; @@ -36,21 +54,19 @@ public SearchSLOResponseDataAttributes facets(SearchSLOResponseDataAttributesFac } /** - * Facets - * + *

Facets

* @return facets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FACETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchSLOResponseDataAttributesFacets getFacets() { - return facets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FACETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchSLOResponseDataAttributesFacets getFacets() { + return facets; + } public void setFacets(SearchSLOResponseDataAttributesFacets facets) { this.facets = facets; } - public SearchSLOResponseDataAttributes slos(List slos) { this.slos = slos; for (SearchServiceLevelObjective item : slos) { @@ -58,7 +74,6 @@ public SearchSLOResponseDataAttributes slos(List sl } return this; } - public SearchSLOResponseDataAttributes addSlosItem(SearchServiceLevelObjective slosItem) { if (this.slos == null) { this.slos = new ArrayList<>(); @@ -69,22 +84,23 @@ public SearchSLOResponseDataAttributes addSlosItem(SearchServiceLevelObjective s } /** - * SLOs - * + *

SLOs

* @return slos - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLOS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSlos() { - return slos; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLOS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSlos() { + return slos; + } public void setSlos(List slos) { this.slos = slos; } - /** Return true if this SearchSLOResponseDataAttributes object is equal to o. */ + /** + * Return true if this SearchSLOResponseDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchSLOResponseDataAttributes searchSloResponseDataAttributes = - (SearchSLOResponseDataAttributes) o; - return Objects.equals(this.facets, searchSloResponseDataAttributes.facets) - && Objects.equals(this.slos, searchSloResponseDataAttributes.slos); + SearchSLOResponseDataAttributes searchSloResponseDataAttributes = (SearchSLOResponseDataAttributes) o; + return Objects.equals(this.facets, searchSloResponseDataAttributes.facets) && Objects.equals(this.slos, searchSloResponseDataAttributes.slos); } + @Override public int hashCode() { - return Objects.hash(facets, slos); + return Objects.hash(facets,slos); } @Override @@ -115,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacets.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacets.java index 9b0c32b618d..0dfb7661783 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacets.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacets.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Facets */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Facets

+ */ @JsonPropertyOrder({ SearchSLOResponseDataAttributesFacets.JSON_PROPERTY_ALL_TAGS, SearchSLOResponseDataAttributesFacets.JSON_PROPERTY_CREATOR_NAME, @@ -25,10 +43,10 @@ SearchSLOResponseDataAttributesFacets.JSON_PROPERTY_TEAM_TAGS, SearchSLOResponseDataAttributesFacets.JSON_PROPERTY_TIMEFRAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseDataAttributesFacets { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALL_TAGS = "all_tags"; private List allTags = null; @@ -53,17 +71,14 @@ public class SearchSLOResponseDataAttributesFacets { public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; private List timeframe = null; - public SearchSLOResponseDataAttributesFacets allTags( - List allTags) { + public SearchSLOResponseDataAttributesFacets allTags(List allTags) { this.allTags = allTags; for (SearchSLOResponseDataAttributesFacetsObjectString item : allTags) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addAllTagsItem( - SearchSLOResponseDataAttributesFacetsObjectString allTagsItem) { + public SearchSLOResponseDataAttributesFacets addAllTagsItem(SearchSLOResponseDataAttributesFacetsObjectString allTagsItem) { if (this.allTags == null) { this.allTags = new ArrayList<>(); } @@ -73,32 +88,27 @@ public SearchSLOResponseDataAttributesFacets addAllTagsItem( } /** - * All tags associated with an SLO. - * + *

All tags associated with an SLO.

* @return allTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALL_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAllTags() { - return allTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALL_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAllTags() { + return allTags; + } public void setAllTags(List allTags) { this.allTags = allTags; } - - public SearchSLOResponseDataAttributesFacets creatorName( - List creatorName) { + public SearchSLOResponseDataAttributesFacets creatorName(List creatorName) { this.creatorName = creatorName; for (SearchSLOResponseDataAttributesFacetsObjectString item : creatorName) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addCreatorNameItem( - SearchSLOResponseDataAttributesFacetsObjectString creatorNameItem) { + public SearchSLOResponseDataAttributesFacets addCreatorNameItem(SearchSLOResponseDataAttributesFacetsObjectString creatorNameItem) { if (this.creatorName == null) { this.creatorName = new ArrayList<>(); } @@ -108,32 +118,27 @@ public SearchSLOResponseDataAttributesFacets addCreatorNameItem( } /** - * Creator of an SLO. - * + *

Creator of an SLO.

* @return creatorName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCreatorName() { - return creatorName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCreatorName() { + return creatorName; + } public void setCreatorName(List creatorName) { this.creatorName = creatorName; } - - public SearchSLOResponseDataAttributesFacets envTags( - List envTags) { + public SearchSLOResponseDataAttributesFacets envTags(List envTags) { this.envTags = envTags; for (SearchSLOResponseDataAttributesFacetsObjectString item : envTags) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addEnvTagsItem( - SearchSLOResponseDataAttributesFacetsObjectString envTagsItem) { + public SearchSLOResponseDataAttributesFacets addEnvTagsItem(SearchSLOResponseDataAttributesFacetsObjectString envTagsItem) { if (this.envTags == null) { this.envTags = new ArrayList<>(); } @@ -143,32 +148,27 @@ public SearchSLOResponseDataAttributesFacets addEnvTagsItem( } /** - * Tags with the env tag key. - * + *

Tags with the env tag key.

* @return envTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENV_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEnvTags() { - return envTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvTags() { + return envTags; + } public void setEnvTags(List envTags) { this.envTags = envTags; } - - public SearchSLOResponseDataAttributesFacets serviceTags( - List serviceTags) { + public SearchSLOResponseDataAttributesFacets serviceTags(List serviceTags) { this.serviceTags = serviceTags; for (SearchSLOResponseDataAttributesFacetsObjectString item : serviceTags) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addServiceTagsItem( - SearchSLOResponseDataAttributesFacetsObjectString serviceTagsItem) { + public SearchSLOResponseDataAttributesFacets addServiceTagsItem(SearchSLOResponseDataAttributesFacetsObjectString serviceTagsItem) { if (this.serviceTags == null) { this.serviceTags = new ArrayList<>(); } @@ -178,32 +178,27 @@ public SearchSLOResponseDataAttributesFacets addServiceTagsItem( } /** - * Tags with the service tag key. - * + *

Tags with the service tag key.

* @return serviceTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getServiceTags() { - return serviceTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getServiceTags() { + return serviceTags; + } public void setServiceTags(List serviceTags) { this.serviceTags = serviceTags; } - - public SearchSLOResponseDataAttributesFacets sloType( - List sloType) { + public SearchSLOResponseDataAttributesFacets sloType(List sloType) { this.sloType = sloType; for (SearchSLOResponseDataAttributesFacetsObjectInt item : sloType) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addSloTypeItem( - SearchSLOResponseDataAttributesFacetsObjectInt sloTypeItem) { + public SearchSLOResponseDataAttributesFacets addSloTypeItem(SearchSLOResponseDataAttributesFacetsObjectInt sloTypeItem) { if (this.sloType == null) { this.sloType = new ArrayList<>(); } @@ -213,32 +208,27 @@ public SearchSLOResponseDataAttributesFacets addSloTypeItem( } /** - * Type of SLO. - * + *

Type of SLO.

* @return sloType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLO_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSloType() { - return sloType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLO_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSloType() { + return sloType; + } public void setSloType(List sloType) { this.sloType = sloType; } - - public SearchSLOResponseDataAttributesFacets target( - List target) { + public SearchSLOResponseDataAttributesFacets target(List target) { this.target = target; for (SearchSLOResponseDataAttributesFacetsObjectInt item : target) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addTargetItem( - SearchSLOResponseDataAttributesFacetsObjectInt targetItem) { + public SearchSLOResponseDataAttributesFacets addTargetItem(SearchSLOResponseDataAttributesFacetsObjectInt targetItem) { if (this.target == null) { this.target = new ArrayList<>(); } @@ -248,32 +238,27 @@ public SearchSLOResponseDataAttributesFacets addTargetItem( } /** - * SLO Target - * + *

SLO Target

* @return target - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTarget() { - return target; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTarget() { + return target; + } public void setTarget(List target) { this.target = target; } - - public SearchSLOResponseDataAttributesFacets teamTags( - List teamTags) { + public SearchSLOResponseDataAttributesFacets teamTags(List teamTags) { this.teamTags = teamTags; for (SearchSLOResponseDataAttributesFacetsObjectString item : teamTags) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addTeamTagsItem( - SearchSLOResponseDataAttributesFacetsObjectString teamTagsItem) { + public SearchSLOResponseDataAttributesFacets addTeamTagsItem(SearchSLOResponseDataAttributesFacetsObjectString teamTagsItem) { if (this.teamTags == null) { this.teamTags = new ArrayList<>(); } @@ -283,32 +268,27 @@ public SearchSLOResponseDataAttributesFacets addTeamTagsItem( } /** - * Tags with the team tag key. - * + *

Tags with the team tag key.

* @return teamTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEAM_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTeamTags() { - return teamTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTeamTags() { + return teamTags; + } public void setTeamTags(List teamTags) { this.teamTags = teamTags; } - - public SearchSLOResponseDataAttributesFacets timeframe( - List timeframe) { + public SearchSLOResponseDataAttributesFacets timeframe(List timeframe) { this.timeframe = timeframe; for (SearchSLOResponseDataAttributesFacetsObjectString item : timeframe) { this.unparsed |= item.unparsed; } return this; } - - public SearchSLOResponseDataAttributesFacets addTimeframeItem( - SearchSLOResponseDataAttributesFacetsObjectString timeframeItem) { + public SearchSLOResponseDataAttributesFacets addTimeframeItem(SearchSLOResponseDataAttributesFacetsObjectString timeframeItem) { if (this.timeframe == null) { this.timeframe = new ArrayList<>(); } @@ -318,22 +298,23 @@ public SearchSLOResponseDataAttributesFacets addTimeframeItem( } /** - * Timeframes of SLOs. - * + *

Timeframes of SLOs.

* @return timeframe - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimeframe() { - return timeframe; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimeframe() { + return timeframe; + } public void setTimeframe(List timeframe) { this.timeframe = timeframe; } - /** Return true if this SearchSLOResponseDataAttributesFacets object is equal to o. */ + /** + * Return true if this SearchSLOResponseDataAttributesFacets object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -342,22 +323,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchSLOResponseDataAttributesFacets searchSloResponseDataAttributesFacets = - (SearchSLOResponseDataAttributesFacets) o; - return Objects.equals(this.allTags, searchSloResponseDataAttributesFacets.allTags) - && Objects.equals(this.creatorName, searchSloResponseDataAttributesFacets.creatorName) - && Objects.equals(this.envTags, searchSloResponseDataAttributesFacets.envTags) - && Objects.equals(this.serviceTags, searchSloResponseDataAttributesFacets.serviceTags) - && Objects.equals(this.sloType, searchSloResponseDataAttributesFacets.sloType) - && Objects.equals(this.target, searchSloResponseDataAttributesFacets.target) - && Objects.equals(this.teamTags, searchSloResponseDataAttributesFacets.teamTags) - && Objects.equals(this.timeframe, searchSloResponseDataAttributesFacets.timeframe); + SearchSLOResponseDataAttributesFacets searchSloResponseDataAttributesFacets = (SearchSLOResponseDataAttributesFacets) o; + return Objects.equals(this.allTags, searchSloResponseDataAttributesFacets.allTags) && Objects.equals(this.creatorName, searchSloResponseDataAttributesFacets.creatorName) && Objects.equals(this.envTags, searchSloResponseDataAttributesFacets.envTags) && Objects.equals(this.serviceTags, searchSloResponseDataAttributesFacets.serviceTags) && Objects.equals(this.sloType, searchSloResponseDataAttributesFacets.sloType) && Objects.equals(this.target, searchSloResponseDataAttributesFacets.target) && Objects.equals(this.teamTags, searchSloResponseDataAttributesFacets.teamTags) && Objects.equals(this.timeframe, searchSloResponseDataAttributesFacets.timeframe); } + @Override public int hashCode() { - return Objects.hash( - allTags, creatorName, envTags, serviceTags, sloType, target, teamTags, timeframe); + return Objects.hash(allTags,creatorName,envTags,serviceTags,sloType,target,teamTags,timeframe); } @Override @@ -377,7 +350,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectInt.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectInt.java index 93daddb4f30..6d562105a8b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectInt.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectInt.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Facet */ + +/** + *

Facet

+ */ @JsonPropertyOrder({ SearchSLOResponseDataAttributesFacetsObjectInt.JSON_PROPERTY_COUNT, SearchSLOResponseDataAttributesFacetsObjectInt.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseDataAttributesFacetsObjectInt { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Long count; @@ -33,43 +53,42 @@ public SearchSLOResponseDataAttributesFacetsObjectInt count(Long count) { } /** - * Count - * + *

Count

* @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } public void setCount(Long count) { this.count = count; } - public SearchSLOResponseDataAttributesFacetsObjectInt name(Double name) { this.name = name; return this; } /** - * Facet - * + *

Facet

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getName() { + return name; + } public void setName(Double name) { this.name = name; } - /** Return true if this SearchSLOResponseDataAttributesFacetsObjectInt object is equal to o. */ + /** + * Return true if this SearchSLOResponseDataAttributesFacetsObjectInt object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchSLOResponseDataAttributesFacetsObjectInt searchSloResponseDataAttributesFacetsObjectInt = - (SearchSLOResponseDataAttributesFacetsObjectInt) o; - return Objects.equals(this.count, searchSloResponseDataAttributesFacetsObjectInt.count) - && Objects.equals(this.name, searchSloResponseDataAttributesFacetsObjectInt.name); + SearchSLOResponseDataAttributesFacetsObjectInt searchSloResponseDataAttributesFacetsObjectInt = (SearchSLOResponseDataAttributesFacetsObjectInt) o; + return Objects.equals(this.count, searchSloResponseDataAttributesFacetsObjectInt.count) && Objects.equals(this.name, searchSloResponseDataAttributesFacetsObjectInt.name); } + @Override public int hashCode() { - return Objects.hash(count, name); + return Objects.hash(count,name); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectString.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectString.java index 372ecbc905b..6ea6e43ac1c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectString.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseDataAttributesFacetsObjectString.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Facet */ + +/** + *

Facet

+ */ @JsonPropertyOrder({ SearchSLOResponseDataAttributesFacetsObjectString.JSON_PROPERTY_COUNT, SearchSLOResponseDataAttributesFacetsObjectString.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseDataAttributesFacetsObjectString { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Long count; @@ -33,43 +53,42 @@ public SearchSLOResponseDataAttributesFacetsObjectString count(Long count) { } /** - * Count - * + *

Count

* @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } public void setCount(Long count) { this.count = count; } - public SearchSLOResponseDataAttributesFacetsObjectString name(String name) { this.name = name; return this; } /** - * Facet - * + *

Facet

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SearchSLOResponseDataAttributesFacetsObjectString object is equal to o. */ + /** + * Return true if this SearchSLOResponseDataAttributesFacetsObjectString object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,16 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchSLOResponseDataAttributesFacetsObjectString - searchSloResponseDataAttributesFacetsObjectString = - (SearchSLOResponseDataAttributesFacetsObjectString) o; - return Objects.equals(this.count, searchSloResponseDataAttributesFacetsObjectString.count) - && Objects.equals(this.name, searchSloResponseDataAttributesFacetsObjectString.name); + SearchSLOResponseDataAttributesFacetsObjectString searchSloResponseDataAttributesFacetsObjectString = (SearchSLOResponseDataAttributesFacetsObjectString) o; + return Objects.equals(this.count, searchSloResponseDataAttributesFacetsObjectString.count) && Objects.equals(this.name, searchSloResponseDataAttributesFacetsObjectString.name); } + @Override public int hashCode() { - return Objects.hash(count, name); + return Objects.hash(count,name); } @Override @@ -101,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseLinks.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseLinks.java index 25a47abb06f..36b953610b6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseLinks.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Pagination links. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Pagination links.

+ */ @JsonPropertyOrder({ SearchSLOResponseLinks.JSON_PROPERTY_FIRST, SearchSLOResponseLinks.JSON_PROPERTY_LAST, @@ -21,10 +40,10 @@ SearchSLOResponseLinks.JSON_PROPERTY_PREV, SearchSLOResponseLinks.JSON_PROPERTY_SELF }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FIRST = "first"; private String first; @@ -46,126 +65,113 @@ public SearchSLOResponseLinks first(String first) { } /** - * Link to last page. - * + *

Link to last page.

* @return first - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIRST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFirst() { - return first; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFirst() { + return first; + } public void setFirst(String first) { this.first = first; } - public SearchSLOResponseLinks last(String last) { this.last = JsonNullable.of(last); return this; } /** - * Link to first page. - * + *

Link to first page.

* @return last - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getLast() { - return last.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getLast() { + return last.orElse(null); + } @JsonProperty(JSON_PROPERTY_LAST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getLast_JsonNullable() { return last; } - - @JsonProperty(JSON_PROPERTY_LAST) - public void setLast_JsonNullable(JsonNullable last) { + @JsonProperty(JSON_PROPERTY_LAST)public void setLast_JsonNullable(JsonNullable last) { this.last = last; } - public void setLast(String last) { this.last = JsonNullable.of(last); } - public SearchSLOResponseLinks next(String next) { this.next = next; return this; } /** - * Link to the next page. - * + *

Link to the next page.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - public SearchSLOResponseLinks prev(String prev) { this.prev = JsonNullable.of(prev); return this; } /** - * Link to previous page. - * + *

Link to previous page.

* @return prev - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getPrev() { - return prev.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrev() { + return prev.orElse(null); + } @JsonProperty(JSON_PROPERTY_PREV) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPrev_JsonNullable() { return prev; } - - @JsonProperty(JSON_PROPERTY_PREV) - public void setPrev_JsonNullable(JsonNullable prev) { + @JsonProperty(JSON_PROPERTY_PREV)public void setPrev_JsonNullable(JsonNullable prev) { this.prev = prev; } - public void setPrev(String prev) { this.prev = JsonNullable.of(prev); } - public SearchSLOResponseLinks self(String self) { this.self = self; return this; } /** - * Link to current page. - * + *

Link to current page.

* @return self - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SELF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSelf() { - return self; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELF) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSelf() { + return self; + } public void setSelf(String self) { this.self = self; } - /** Return true if this SearchSLOResponseLinks object is equal to o. */ + /** + * Return true if this SearchSLOResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -175,16 +181,13 @@ public boolean equals(Object o) { return false; } SearchSLOResponseLinks searchSloResponseLinks = (SearchSLOResponseLinks) o; - return Objects.equals(this.first, searchSloResponseLinks.first) - && Objects.equals(this.last, searchSloResponseLinks.last) - && Objects.equals(this.next, searchSloResponseLinks.next) - && Objects.equals(this.prev, searchSloResponseLinks.prev) - && Objects.equals(this.self, searchSloResponseLinks.self); + return Objects.equals(this.first, searchSloResponseLinks.first) && Objects.equals(this.last, searchSloResponseLinks.last) && Objects.equals(this.next, searchSloResponseLinks.next) && Objects.equals(this.prev, searchSloResponseLinks.prev) && Objects.equals(this.self, searchSloResponseLinks.self); } + @Override public int hashCode() { - return Objects.hash(first, last, next, prev, self); + return Objects.hash(first,last,next,prev,self); } @Override @@ -201,7 +204,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMeta.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMeta.java index 1b48e0c039d..9d5fea1fd78 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMeta.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Searches metadata returned by the API. */ -@JsonPropertyOrder({SearchSLOResponseMeta.JSON_PROPERTY_PAGINATION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Searches metadata returned by the API.

+ */ +@JsonPropertyOrder({ + SearchSLOResponseMeta.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGINATION = "pagination"; private SearchSLOResponseMetaPage pagination; @@ -28,22 +50,23 @@ public SearchSLOResponseMeta pagination(SearchSLOResponseMetaPage pagination) { } /** - * Pagination metadata returned by the API. - * + *

Pagination metadata returned by the API.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchSLOResponseMetaPage getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchSLOResponseMetaPage getPagination() { + return pagination; + } public void setPagination(SearchSLOResponseMetaPage pagination) { this.pagination = pagination; } - /** Return true if this SearchSLOResponseMeta object is equal to o. */ + /** + * Return true if this SearchSLOResponseMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.pagination, searchSloResponseMeta.pagination); } + @Override public int hashCode() { return Objects.hash(pagination); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMetaPage.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMetaPage.java index 0f56dc72c8d..be5e96d7d29 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMetaPage.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOResponseMetaPage.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Pagination metadata returned by the API. */ + +/** + *

Pagination metadata returned by the API.

+ */ @JsonPropertyOrder({ SearchSLOResponseMetaPage.JSON_PROPERTY_FIRST_NUMBER, SearchSLOResponseMetaPage.JSON_PROPERTY_LAST_NUMBER, @@ -23,10 +43,10 @@ SearchSLOResponseMetaPage.JSON_PROPERTY_TOTAL, SearchSLOResponseMetaPage.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOResponseMetaPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FIRST_NUMBER = "first_number"; private Long firstNumber; @@ -57,169 +77,156 @@ public SearchSLOResponseMetaPage firstNumber(Long firstNumber) { } /** - * The first number. - * + *

The first number.

* @return firstNumber - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIRST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFirstNumber() { - return firstNumber; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_NUMBER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFirstNumber() { + return firstNumber; + } public void setFirstNumber(Long firstNumber) { this.firstNumber = firstNumber; } - public SearchSLOResponseMetaPage lastNumber(Long lastNumber) { this.lastNumber = lastNumber; return this; } /** - * The last number. - * + *

The last number.

* @return lastNumber - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastNumber() { - return lastNumber; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_NUMBER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastNumber() { + return lastNumber; + } public void setLastNumber(Long lastNumber) { this.lastNumber = lastNumber; } - public SearchSLOResponseMetaPage nextNumber(Long nextNumber) { this.nextNumber = nextNumber; return this; } /** - * The next number. - * + *

The next number.

* @return nextNumber - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNextNumber() { - return nextNumber; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_NUMBER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNextNumber() { + return nextNumber; + } public void setNextNumber(Long nextNumber) { this.nextNumber = nextNumber; } - public SearchSLOResponseMetaPage number(Long number) { this.number = number; return this; } /** - * The page number. - * + *

The page number.

* @return number - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumber() { - return number; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumber() { + return number; + } public void setNumber(Long number) { this.number = number; } - public SearchSLOResponseMetaPage prevNumber(Long prevNumber) { this.prevNumber = prevNumber; return this; } /** - * The previous page number. - * + *

The previous page number.

* @return prevNumber - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREV_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPrevNumber() { - return prevNumber; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREV_NUMBER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPrevNumber() { + return prevNumber; + } public void setPrevNumber(Long prevNumber) { this.prevNumber = prevNumber; } - public SearchSLOResponseMetaPage size(Long size) { this.size = size; return this; } /** - * The size of the response. - * + *

The size of the response.

* @return size - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSize() { - return size; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } public void setSize(Long size) { this.size = size; } - public SearchSLOResponseMetaPage total(Long total) { this.total = total; return this; } /** - * The total number of SLOs in the response. - * + *

The total number of SLOs in the response.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotal() { - return total; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotal() { + return total; + } public void setTotal(Long total) { this.total = total; } - public SearchSLOResponseMetaPage type(String type) { this.type = type; return this; } /** - * Type of pagination. - * + *

Type of pagination.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this SearchSLOResponseMetaPage object is equal to o. */ + /** + * Return true if this SearchSLOResponseMetaPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -229,19 +236,13 @@ public boolean equals(Object o) { return false; } SearchSLOResponseMetaPage searchSloResponseMetaPage = (SearchSLOResponseMetaPage) o; - return Objects.equals(this.firstNumber, searchSloResponseMetaPage.firstNumber) - && Objects.equals(this.lastNumber, searchSloResponseMetaPage.lastNumber) - && Objects.equals(this.nextNumber, searchSloResponseMetaPage.nextNumber) - && Objects.equals(this.number, searchSloResponseMetaPage.number) - && Objects.equals(this.prevNumber, searchSloResponseMetaPage.prevNumber) - && Objects.equals(this.size, searchSloResponseMetaPage.size) - && Objects.equals(this.total, searchSloResponseMetaPage.total) - && Objects.equals(this.type, searchSloResponseMetaPage.type); + return Objects.equals(this.firstNumber, searchSloResponseMetaPage.firstNumber) && Objects.equals(this.lastNumber, searchSloResponseMetaPage.lastNumber) && Objects.equals(this.nextNumber, searchSloResponseMetaPage.nextNumber) && Objects.equals(this.number, searchSloResponseMetaPage.number) && Objects.equals(this.prevNumber, searchSloResponseMetaPage.prevNumber) && Objects.equals(this.size, searchSloResponseMetaPage.size) && Objects.equals(this.total, searchSloResponseMetaPage.total) && Objects.equals(this.type, searchSloResponseMetaPage.type); } + @Override public int hashCode() { - return Objects.hash(firstNumber, lastNumber, nextNumber, number, prevNumber, size, total, type); + return Objects.hash(firstNumber,lastNumber,nextNumber,number,prevNumber,size,total,type); } @Override @@ -261,7 +262,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOThreshold.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOThreshold.java index 870b15f0ced..11375ef0c43 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOThreshold.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOThreshold.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** SLO thresholds (target and optionally warning) for a single time window. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

SLO thresholds (target and optionally warning) for a single time window.

+ */ @JsonPropertyOrder({ SearchSLOThreshold.JSON_PROPERTY_TARGET, SearchSLOThreshold.JSON_PROPERTY_TARGET_DISPLAY, @@ -22,10 +40,10 @@ SearchSLOThreshold.JSON_PROPERTY_WARNING, SearchSLOThreshold.JSON_PROPERTY_WARNING_DISPLAY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchSLOThreshold { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TARGET = "target"; private Double target; @@ -45,58 +63,53 @@ public SearchSLOThreshold() {} @JsonCreator public SearchSLOThreshold( - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) Double target, - @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) - SearchSLOTimeframe timeframe) { - this.target = target; - this.timeframe = timeframe; - this.unparsed |= !timeframe.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)Double target, + @JsonProperty(required=true, value=JSON_PROPERTY_TIMEFRAME)SearchSLOTimeframe timeframe) { + this.target = target; + this.timeframe = timeframe; + this.unparsed |= !timeframe.isValid(); } - public SearchSLOThreshold target(Double target) { this.target = target; return this; } /** - * The target value for the service level indicator within the corresponding timeframe. - * + *

The target value for the service level indicator within the corresponding + * timeframe.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getTarget() { + return target; + } public void setTarget(Double target) { this.target = target; } - public SearchSLOThreshold targetDisplay(String targetDisplay) { this.targetDisplay = targetDisplay; return this; } /** - * A string representation of the target that indicates its precision. It uses trailing zeros to - * show significant decimal places (for example 98.00). - * - *

Always included in service level objective responses. Ignored in create/update requests. - * + *

A string representation of the target that indicates its precision. + * It uses trailing zeros to show significant decimal places (for example 98.00).

+ *

Always included in service level objective responses. Ignored in + * create/update requests.

* @return targetDisplay - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_DISPLAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTargetDisplay() { - return targetDisplay; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_DISPLAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTargetDisplay() { + return targetDisplay; + } public void setTargetDisplay(String targetDisplay) { this.targetDisplay = targetDisplay; } - public SearchSLOThreshold timeframe(SearchSLOTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -104,90 +117,80 @@ public SearchSLOThreshold timeframe(SearchSLOTimeframe timeframe) { } /** - * The SLO time window options. - * + *

The SLO time window options.

* @return timeframe - */ - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SearchSLOTimeframe getTimeframe() { - return timeframe; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SearchSLOTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SearchSLOTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - public SearchSLOThreshold warning(Double warning) { this.warning = JsonNullable.of(warning); return this; } /** - * The warning value for the service level objective. - * + *

The warning value for the service level objective.

* @return warning - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getWarning() { - return warning.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getWarning() { + return warning.orElse(null); + } @JsonProperty(JSON_PROPERTY_WARNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getWarning_JsonNullable() { return warning; } - - @JsonProperty(JSON_PROPERTY_WARNING) - public void setWarning_JsonNullable(JsonNullable warning) { + @JsonProperty(JSON_PROPERTY_WARNING)public void setWarning_JsonNullable(JsonNullable warning) { this.warning = warning; } - public void setWarning(Double warning) { this.warning = JsonNullable.of(warning); } - public SearchSLOThreshold warningDisplay(String warningDisplay) { this.warningDisplay = JsonNullable.of(warningDisplay); return this; } /** - * A string representation of the warning target (see the description of the target_display - * field for details). - * - *

Included in service level objective responses if a warning target exists. Ignored in - * create/update requests. - * + *

A string representation of the warning target (see the description of + * the target_display field for details).

+ *

Included in service level objective responses if a warning target exists. + * Ignored in create/update requests.

* @return warningDisplay - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getWarningDisplay() { - return warningDisplay.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getWarningDisplay() { + return warningDisplay.orElse(null); + } @JsonProperty(JSON_PROPERTY_WARNING_DISPLAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getWarningDisplay_JsonNullable() { return warningDisplay; } - - @JsonProperty(JSON_PROPERTY_WARNING_DISPLAY) - public void setWarningDisplay_JsonNullable(JsonNullable warningDisplay) { + @JsonProperty(JSON_PROPERTY_WARNING_DISPLAY)public void setWarningDisplay_JsonNullable(JsonNullable warningDisplay) { this.warningDisplay = warningDisplay; } - public void setWarningDisplay(String warningDisplay) { this.warningDisplay = JsonNullable.of(warningDisplay); } - /** Return true if this SearchSLOThreshold object is equal to o. */ + /** + * Return true if this SearchSLOThreshold object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -197,16 +200,13 @@ public boolean equals(Object o) { return false; } SearchSLOThreshold searchSloThreshold = (SearchSLOThreshold) o; - return Objects.equals(this.target, searchSloThreshold.target) - && Objects.equals(this.targetDisplay, searchSloThreshold.targetDisplay) - && Objects.equals(this.timeframe, searchSloThreshold.timeframe) - && Objects.equals(this.warning, searchSloThreshold.warning) - && Objects.equals(this.warningDisplay, searchSloThreshold.warningDisplay); + return Objects.equals(this.target, searchSloThreshold.target) && Objects.equals(this.targetDisplay, searchSloThreshold.targetDisplay) && Objects.equals(this.timeframe, searchSloThreshold.timeframe) && Objects.equals(this.warning, searchSloThreshold.warning) && Objects.equals(this.warningDisplay, searchSloThreshold.warningDisplay); } + @Override public int hashCode() { - return Objects.hash(target, targetDisplay, timeframe, warning, warningDisplay); + return Objects.hash(target,targetDisplay,timeframe,warning,warningDisplay); } @Override @@ -223,7 +223,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchSLOTimeframe.java b/src/main/java/com/datadog/api/client/v1/model/SearchSLOTimeframe.java index e853a73fa13..ee187c6b91a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchSLOTimeframe.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchSLOTimeframe.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The SLO time window options. */ +/** + *

The SLO time window options.

+ */ @JsonSerialize(using = SearchSLOTimeframe.SearchSLOTimeframeSerializer.class) public class SearchSLOTimeframe { @@ -27,8 +51,7 @@ public class SearchSLOTimeframe { public static final SearchSLOTimeframe THIRTY_DAYS = new SearchSLOTimeframe("30d"); public static final SearchSLOTimeframe NINETY_DAYS = new SearchSLOTimeframe("90d"); - private static final Set allowedValues = - new HashSet(Arrays.asList("7d", "30d", "90d")); + private static final Set allowedValues = new HashSet(Arrays.asList("7d", "30d", "90d")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class SearchSLOTimeframeSerializer extends StdSerializer { - public SearchSLOTimeframeSerializer(Class t) { - super(t); - } - - public SearchSLOTimeframeSerializer() { - this(null); - } - - @Override - public void serialize(SearchSLOTimeframe value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SearchSLOTimeframeSerializer(Class t) { + super(t); + } + + public SearchSLOTimeframeSerializer() { + this(null); + } + + @Override + public void serialize(SearchSLOTimeframe value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SearchSLOTimeframe object is equal to o. */ + /** + * Return true if this SearchSLOTimeframe object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjective.java b/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjective.java index 39949efb56c..736617a879b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjective.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjective.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A service level objective data container. */ -@JsonPropertyOrder({SearchServiceLevelObjective.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A service level objective data container.

+ */ +@JsonPropertyOrder({ + SearchServiceLevelObjective.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchServiceLevelObjective { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SearchServiceLevelObjectiveData data; @@ -28,22 +50,23 @@ public SearchServiceLevelObjective data(SearchServiceLevelObjectiveData data) { } /** - * A service level objective ID and attributes. - * + *

A service level objective ID and attributes.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchServiceLevelObjectiveData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchServiceLevelObjectiveData getData() { + return data; + } public void setData(SearchServiceLevelObjectiveData data) { this.data = data; } - /** Return true if this SearchServiceLevelObjective object is equal to o. */ + /** + * Return true if this SearchServiceLevelObjective object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, searchServiceLevelObjective.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveAttributes.java b/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveAttributes.java index 7107df9c6f0..3198e39cc7e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveAttributes.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A service level objective object includes a service level indicator, thresholds for one or more - * timeframes, and metadata (name, description, and tags). + *

A service level objective object includes a service level indicator, thresholds + * for one or more timeframes, and metadata (name, description, and tags).

*/ @JsonPropertyOrder({ SearchServiceLevelObjectiveAttributes.JSON_PROPERTY_ALL_TAGS, @@ -37,10 +52,10 @@ SearchServiceLevelObjectiveAttributes.JSON_PROPERTY_TEAM_TAGS, SearchServiceLevelObjectiveAttributes.JSON_PROPERTY_THRESHOLDS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchServiceLevelObjectiveAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALL_TAGS = "all_tags"; private List allTags = null; @@ -93,7 +108,6 @@ public SearchServiceLevelObjectiveAttributes allTags(List allTags) { this.allTags = allTags; return this; } - public SearchServiceLevelObjectiveAttributes addAllTagsItem(String allTagsItem) { if (this.allTags == null) { this.allTags = new ArrayList<>(); @@ -103,106 +117,91 @@ public SearchServiceLevelObjectiveAttributes addAllTagsItem(String allTagsItem) } /** - * A list of tags associated with this service level objective. Always included in service level - * objective responses (but may be empty). - * + *

A list of tags associated with this service level objective. + * Always included in service level objective responses (but may be empty).

* @return allTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALL_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAllTags() { - return allTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALL_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAllTags() { + return allTags; + } public void setAllTags(List allTags) { this.allTags = allTags; } /** - * Creation timestamp (UNIX time in seconds) - * - *

Always included in service level objective responses. - * + *

Creation timestamp (UNIX time in seconds)

+ *

Always included in service level objective responses.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } public SearchServiceLevelObjectiveAttributes creator(SLOCreator creator) { this.creator = JsonNullable.of(creator); return this; } /** - * The creator of the SLO - * + *

The creator of the SLO

* @return creator - */ - @jakarta.annotation.Nullable - @JsonIgnore - public SLOCreator getCreator() { - return creator.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public SLOCreator getCreator() { + return creator.orElse(null); + } @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCreator_JsonNullable() { return creator; } - - @JsonProperty(JSON_PROPERTY_CREATOR) - public void setCreator_JsonNullable(JsonNullable creator) { + @JsonProperty(JSON_PROPERTY_CREATOR)public void setCreator_JsonNullable(JsonNullable creator) { this.creator = creator; } - public void setCreator(SLOCreator creator) { this.creator = JsonNullable.of(creator); } - public SearchServiceLevelObjectiveAttributes description(String description) { this.description = JsonNullable.of(description); return this; } /** - * A user-defined description of the service level objective. - * + *

A user-defined description of the service level objective.

*

Always included in service level objective responses (but may be null). - * Optional in create/update requests. - * + * Optional in create/update requests.

* @return description - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getDescription() { - return description.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDescription_JsonNullable() { return description; } - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - public void setDescription_JsonNullable(JsonNullable description) { + @JsonProperty(JSON_PROPERTY_DESCRIPTION)public void setDescription_JsonNullable(JsonNullable description) { this.description = description; } - public void setDescription(String description) { this.description = JsonNullable.of(description); } - public SearchServiceLevelObjectiveAttributes envTags(List envTags) { this.envTags = envTags; return this; } - public SearchServiceLevelObjectiveAttributes addEnvTagsItem(String envTagsItem) { if (this.envTags == null) { this.envTags = new ArrayList<>(); @@ -212,26 +211,23 @@ public SearchServiceLevelObjectiveAttributes addEnvTagsItem(String envTagsItem) } /** - * Tags with the env tag key. - * + *

Tags with the env tag key.

* @return envTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENV_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEnvTags() { - return envTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvTags() { + return envTags; + } public void setEnvTags(List envTags) { this.envTags = envTags; } - public SearchServiceLevelObjectiveAttributes groups(List groups) { this.groups = JsonNullable.>of(groups); return this; } - public SearchServiceLevelObjectiveAttributes addGroupsItem(String groupsItem) { if (this.groups == null || !this.groups.isPresent()) { this.groups = JsonNullable.>of(new ArrayList<>()); @@ -245,51 +241,44 @@ public SearchServiceLevelObjectiveAttributes addGroupsItem(String groupsItem) { } /** - * A list of (up to 100) monitor groups that narrow the scope of a monitor service level - * objective. Included in service level objective responses if it is not empty. - * + *

A list of (up to 100) monitor groups that narrow the scope of a monitor service level objective. + * Included in service level objective responses if it is not empty.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getGroups() { - return groups.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getGroups() { + return groups.orElse(null); + } @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getGroups_JsonNullable() { return groups; } - - @JsonProperty(JSON_PROPERTY_GROUPS) - public void setGroups_JsonNullable(JsonNullable> groups) { + @JsonProperty(JSON_PROPERTY_GROUPS)public void setGroups_JsonNullable(JsonNullable> groups) { this.groups = groups; } - public void setGroups(List groups) { this.groups = JsonNullable.>of(groups); } /** - * Modification timestamp (UNIX time in seconds) - * - *

Always included in service level objective responses. - * + *

Modification timestamp (UNIX time in seconds)

+ *

Always included in service level objective responses.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getModifiedAt() { + return modifiedAt; + } public SearchServiceLevelObjectiveAttributes monitorIds(List monitorIds) { this.monitorIds = JsonNullable.>of(monitorIds); return this; } - public SearchServiceLevelObjectiveAttributes addMonitorIdsItem(Long monitorIdsItem) { if (this.monitorIds == null || !this.monitorIds.isPresent()) { this.monitorIds = JsonNullable.>of(new ArrayList<>()); @@ -303,63 +292,54 @@ public SearchServiceLevelObjectiveAttributes addMonitorIdsItem(Long monitorIdsIt } /** - * A list of monitor ids that defines the scope of a monitor service level objective. - * + *

A list of monitor ids that defines the scope of a monitor service level + * objective.

* @return monitorIds - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getMonitorIds() { - return monitorIds.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getMonitorIds() { + return monitorIds.orElse(null); + } @JsonProperty(JSON_PROPERTY_MONITOR_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getMonitorIds_JsonNullable() { return monitorIds; } - - @JsonProperty(JSON_PROPERTY_MONITOR_IDS) - public void setMonitorIds_JsonNullable(JsonNullable> monitorIds) { + @JsonProperty(JSON_PROPERTY_MONITOR_IDS)public void setMonitorIds_JsonNullable(JsonNullable> monitorIds) { this.monitorIds = monitorIds; } - public void setMonitorIds(List monitorIds) { this.monitorIds = JsonNullable.>of(monitorIds); } - public SearchServiceLevelObjectiveAttributes name(String name) { this.name = name; return this; } /** - * The name of the service level objective object. - * + *

The name of the service level objective object.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public SearchServiceLevelObjectiveAttributes overallStatus( - List overallStatus) { + public SearchServiceLevelObjectiveAttributes overallStatus(List overallStatus) { this.overallStatus = overallStatus; for (SLOOverallStatuses item : overallStatus) { this.unparsed |= item.unparsed; } return this; } - - public SearchServiceLevelObjectiveAttributes addOverallStatusItem( - SLOOverallStatuses overallStatusItem) { + public SearchServiceLevelObjectiveAttributes addOverallStatusItem(SLOOverallStatuses overallStatusItem) { if (this.overallStatus == null) { this.overallStatus = new ArrayList<>(); } @@ -369,59 +349,51 @@ public SearchServiceLevelObjectiveAttributes addOverallStatusItem( } /** - * calculated status and error budget remaining. - * + *

calculated status and error budget remaining.

* @return overallStatus - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERALL_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOverallStatus() { - return overallStatus; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getOverallStatus() { + return overallStatus; + } public void setOverallStatus(List overallStatus) { this.overallStatus = overallStatus; } - public SearchServiceLevelObjectiveAttributes query(SearchSLOQuery query) { this.query = JsonNullable.of(query); return this; } /** - * A metric-based SLO. Required if type is metric. Note that Datadog - * only allows the sum by aggregator to be used because this will sum up all request counts - * instead of averaging them, or taking the max or min of all of those requests. - * + *

A metric-based SLO. Required if type is metric. Note that Datadog only allows the sum by aggregator + * to be used because this will sum up all request counts instead of averaging them, or taking the max or + * min of all of those requests.

* @return query - */ - @jakarta.annotation.Nullable - @JsonIgnore - public SearchSLOQuery getQuery() { - return query.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public SearchSLOQuery getQuery() { + return query.orElse(null); + } @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getQuery_JsonNullable() { return query; } - - @JsonProperty(JSON_PROPERTY_QUERY) - public void setQuery_JsonNullable(JsonNullable query) { + @JsonProperty(JSON_PROPERTY_QUERY)public void setQuery_JsonNullable(JsonNullable query) { this.query = query; } - public void setQuery(SearchSLOQuery query) { this.query = JsonNullable.of(query); } - public SearchServiceLevelObjectiveAttributes serviceTags(List serviceTags) { this.serviceTags = serviceTags; return this; } - public SearchServiceLevelObjectiveAttributes addServiceTagsItem(String serviceTagsItem) { if (this.serviceTags == null) { this.serviceTags = new ArrayList<>(); @@ -431,21 +403,19 @@ public SearchServiceLevelObjectiveAttributes addServiceTagsItem(String serviceTa } /** - * Tags with the service tag key. - * + *

Tags with the service tag key.

* @return serviceTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getServiceTags() { - return serviceTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getServiceTags() { + return serviceTags; + } public void setServiceTags(List serviceTags) { this.serviceTags = serviceTags; } - public SearchServiceLevelObjectiveAttributes sloType(SLOType sloType) { this.sloType = sloType; this.unparsed |= !sloType.isValid(); @@ -453,24 +423,22 @@ public SearchServiceLevelObjectiveAttributes sloType(SLOType sloType) { } /** - * The type of the service level objective. - * + *

The type of the service level objective.

* @return sloType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLO_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOType getSloType() { - return sloType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLO_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOType getSloType() { + return sloType; + } public void setSloType(SLOType sloType) { if (!sloType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sloType = sloType; } - public SearchServiceLevelObjectiveAttributes status(SLOStatus status) { this.status = status; this.unparsed |= status.unparsed; @@ -478,26 +446,23 @@ public SearchServiceLevelObjectiveAttributes status(SLOStatus status) { } /** - * Status of the SLO's primary timeframe. - * + *

Status of the SLO's primary timeframe.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOStatus getStatus() { + return status; + } public void setStatus(SLOStatus status) { this.status = status; } - public SearchServiceLevelObjectiveAttributes teamTags(List teamTags) { this.teamTags = teamTags; return this; } - public SearchServiceLevelObjectiveAttributes addTeamTagsItem(String teamTagsItem) { if (this.teamTags == null) { this.teamTags = new ArrayList<>(); @@ -507,21 +472,19 @@ public SearchServiceLevelObjectiveAttributes addTeamTagsItem(String teamTagsItem } /** - * Tags with the team tag key. - * + *

Tags with the team tag key.

* @return teamTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEAM_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTeamTags() { - return teamTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTeamTags() { + return teamTags; + } public void setTeamTags(List teamTags) { this.teamTags = teamTags; } - public SearchServiceLevelObjectiveAttributes thresholds(List thresholds) { this.thresholds = thresholds; for (SearchSLOThreshold item : thresholds) { @@ -529,9 +492,7 @@ public SearchServiceLevelObjectiveAttributes thresholds(List } return this; } - - public SearchServiceLevelObjectiveAttributes addThresholdsItem( - SearchSLOThreshold thresholdsItem) { + public SearchServiceLevelObjectiveAttributes addThresholdsItem(SearchSLOThreshold thresholdsItem) { if (this.thresholds == null) { this.thresholds = new ArrayList<>(); } @@ -541,22 +502,24 @@ public SearchServiceLevelObjectiveAttributes addThresholdsItem( } /** - * The thresholds (timeframes and associated targets) for this service level objective object. - * + *

The thresholds (timeframes and associated targets) for this service level + * objective object.

* @return thresholds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_THRESHOLDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getThresholds() { - return thresholds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THRESHOLDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getThresholds() { + return thresholds; + } public void setThresholds(List thresholds) { this.thresholds = thresholds; } - /** Return true if this SearchServiceLevelObjectiveAttributes object is equal to o. */ + /** + * Return true if this SearchServiceLevelObjectiveAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -565,45 +528,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchServiceLevelObjectiveAttributes searchServiceLevelObjectiveAttributes = - (SearchServiceLevelObjectiveAttributes) o; - return Objects.equals(this.allTags, searchServiceLevelObjectiveAttributes.allTags) - && Objects.equals(this.createdAt, searchServiceLevelObjectiveAttributes.createdAt) - && Objects.equals(this.creator, searchServiceLevelObjectiveAttributes.creator) - && Objects.equals(this.description, searchServiceLevelObjectiveAttributes.description) - && Objects.equals(this.envTags, searchServiceLevelObjectiveAttributes.envTags) - && Objects.equals(this.groups, searchServiceLevelObjectiveAttributes.groups) - && Objects.equals(this.modifiedAt, searchServiceLevelObjectiveAttributes.modifiedAt) - && Objects.equals(this.monitorIds, searchServiceLevelObjectiveAttributes.monitorIds) - && Objects.equals(this.name, searchServiceLevelObjectiveAttributes.name) - && Objects.equals(this.overallStatus, searchServiceLevelObjectiveAttributes.overallStatus) - && Objects.equals(this.query, searchServiceLevelObjectiveAttributes.query) - && Objects.equals(this.serviceTags, searchServiceLevelObjectiveAttributes.serviceTags) - && Objects.equals(this.sloType, searchServiceLevelObjectiveAttributes.sloType) - && Objects.equals(this.status, searchServiceLevelObjectiveAttributes.status) - && Objects.equals(this.teamTags, searchServiceLevelObjectiveAttributes.teamTags) - && Objects.equals(this.thresholds, searchServiceLevelObjectiveAttributes.thresholds); + SearchServiceLevelObjectiveAttributes searchServiceLevelObjectiveAttributes = (SearchServiceLevelObjectiveAttributes) o; + return Objects.equals(this.allTags, searchServiceLevelObjectiveAttributes.allTags) && Objects.equals(this.createdAt, searchServiceLevelObjectiveAttributes.createdAt) && Objects.equals(this.creator, searchServiceLevelObjectiveAttributes.creator) && Objects.equals(this.description, searchServiceLevelObjectiveAttributes.description) && Objects.equals(this.envTags, searchServiceLevelObjectiveAttributes.envTags) && Objects.equals(this.groups, searchServiceLevelObjectiveAttributes.groups) && Objects.equals(this.modifiedAt, searchServiceLevelObjectiveAttributes.modifiedAt) && Objects.equals(this.monitorIds, searchServiceLevelObjectiveAttributes.monitorIds) && Objects.equals(this.name, searchServiceLevelObjectiveAttributes.name) && Objects.equals(this.overallStatus, searchServiceLevelObjectiveAttributes.overallStatus) && Objects.equals(this.query, searchServiceLevelObjectiveAttributes.query) && Objects.equals(this.serviceTags, searchServiceLevelObjectiveAttributes.serviceTags) && Objects.equals(this.sloType, searchServiceLevelObjectiveAttributes.sloType) && Objects.equals(this.status, searchServiceLevelObjectiveAttributes.status) && Objects.equals(this.teamTags, searchServiceLevelObjectiveAttributes.teamTags) && Objects.equals(this.thresholds, searchServiceLevelObjectiveAttributes.thresholds); } + @Override public int hashCode() { - return Objects.hash( - allTags, - createdAt, - creator, - description, - envTags, - groups, - modifiedAt, - monitorIds, - name, - overallStatus, - query, - serviceTags, - sloType, - status, - teamTags, - thresholds); + return Objects.hash(allTags,createdAt,creator,description,envTags,groups,modifiedAt,monitorIds,name,overallStatus,query,serviceTags,sloType,status,teamTags,thresholds); } @Override @@ -631,7 +563,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveData.java b/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveData.java index 42eb9e4845d..ae5cb90a0f7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SearchServiceLevelObjectiveData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A service level objective ID and attributes. */ + +/** + *

A service level objective ID and attributes.

+ */ @JsonPropertyOrder({ SearchServiceLevelObjectiveData.JSON_PROPERTY_ATTRIBUTES, SearchServiceLevelObjectiveData.JSON_PROPERTY_ID, SearchServiceLevelObjectiveData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SearchServiceLevelObjectiveData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SearchServiceLevelObjectiveAttributes attributes; @@ -31,66 +51,63 @@ public class SearchServiceLevelObjectiveData { public static final String JSON_PROPERTY_TYPE = "type"; private String type; - public SearchServiceLevelObjectiveData attributes( - SearchServiceLevelObjectiveAttributes attributes) { + public SearchServiceLevelObjectiveData attributes(SearchServiceLevelObjectiveAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * A service level objective object includes a service level indicator, thresholds for one or more - * timeframes, and metadata (name, description, and tags). - * + *

A service level objective object includes a service level indicator, thresholds + * for one or more timeframes, and metadata (name, description, and tags).

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SearchServiceLevelObjectiveAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SearchServiceLevelObjectiveAttributes getAttributes() { + return attributes; + } public void setAttributes(SearchServiceLevelObjectiveAttributes attributes) { this.attributes = attributes; } /** - * A unique identifier for the service level objective object. - * - *

Always included in service level objective responses. - * + *

A unique identifier for the service level objective object.

+ *

Always included in service level objective responses.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public SearchServiceLevelObjectiveData type(String type) { this.type = type; return this; } /** - * The type of the object, must be slo. - * + *

The type of the object, must be slo.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this SearchServiceLevelObjectiveData object is equal to o. */ + /** + * Return true if this SearchServiceLevelObjectiveData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,16 +116,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchServiceLevelObjectiveData searchServiceLevelObjectiveData = - (SearchServiceLevelObjectiveData) o; - return Objects.equals(this.attributes, searchServiceLevelObjectiveData.attributes) - && Objects.equals(this.id, searchServiceLevelObjectiveData.id) - && Objects.equals(this.type, searchServiceLevelObjectiveData.type); + SearchServiceLevelObjectiveData searchServiceLevelObjectiveData = (SearchServiceLevelObjectiveData) o; + return Objects.equals(this.attributes, searchServiceLevelObjectiveData.attributes) && Objects.equals(this.id, searchServiceLevelObjectiveData.id) && Objects.equals(this.type, searchServiceLevelObjectiveData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -123,7 +138,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Series.java b/src/main/java/com/datadog/api/client/v1/model/Series.java index 6ddcc46df4b..89d560a5a69 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Series.java +++ b/src/main/java/com/datadog/api/client/v1/model/Series.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A metric to submit to Datadog. See Datadog - * metrics. + *

A metric to submit to Datadog. + * See Datadog metrics.

*/ @JsonPropertyOrder({ Series.JSON_PROPERTY_HOST, @@ -29,10 +42,10 @@ Series.JSON_PROPERTY_TAGS, Series.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Series { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOST = "host"; private String host; @@ -55,116 +68,100 @@ public Series() {} @JsonCreator public Series( - @JsonProperty(required = true, value = JSON_PROPERTY_METRIC) String metric, - @JsonProperty(required = true, value = JSON_PROPERTY_POINTS) List> points) { - this.metric = metric; - this.points = points; + @JsonProperty(required=true, value=JSON_PROPERTY_METRIC)String metric, + @JsonProperty(required=true, value=JSON_PROPERTY_POINTS)List> points) { + this.metric = metric; + this.points = points; } - public Series host(String host) { this.host = host; return this; } /** - * The name of the host that produced the metric. - * + *

The name of the host that produced the metric.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public Series interval(Long interval) { this.interval = JsonNullable.of(interval); return this; } /** - * If the type of the metric is rate or count, define the corresponding interval. - * + *

If the type of the metric is rate or count, define the corresponding interval.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getInterval() { - return interval.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getInterval() { + return interval.orElse(null); + } @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getInterval_JsonNullable() { return interval; } - - @JsonProperty(JSON_PROPERTY_INTERVAL) - public void setInterval_JsonNullable(JsonNullable interval) { + @JsonProperty(JSON_PROPERTY_INTERVAL)public void setInterval_JsonNullable(JsonNullable interval) { this.interval = interval; } - public void setInterval(Long interval) { this.interval = JsonNullable.of(interval); } - public Series metric(String metric) { this.metric = metric; return this; } /** - * The name of the timeseries. - * + *

The name of the timeseries.

* @return metric - */ - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMetric() { - return metric; - } - + **/ + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public Series points(List> points) { this.points = points; return this; } - public Series addPointsItem(List pointsItem) { this.points.add(pointsItem); return this; } /** - * Points relating to a metric. All points must be tuples with timestamp and a scalar value - * (cannot be a string). Timestamps should be in POSIX time in seconds, and cannot be more than - * ten minutes in the future or more than one hour in the past. - * + *

Points relating to a metric. All points must be tuples with timestamp and a scalar value (cannot be a string). Timestamps should be in POSIX time in seconds, and cannot be more than ten minutes in the future or more than one hour in the past.

* @return points - */ - @JsonProperty(JSON_PROPERTY_POINTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List> getPoints() { - return points; - } - + **/ + @JsonProperty(JSON_PROPERTY_POINTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List> getPoints() { + return points; + } public void setPoints(List> points) { this.points = points; } - public Series tags(List tags) { this.tags = tags; return this; } - public Series addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -174,44 +171,42 @@ public Series addTagsItem(String tagsItem) { } /** - * A list of tags associated with the metric. - * + *

A list of tags associated with the metric.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public Series type(String type) { this.type = type; return this; } /** - * The type of the metric. Valid types are "",count, gauge, and - * rate. - * + *

The type of the metric. Valid types are "",count, gauge, and rate.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this Series object is equal to o. */ + /** + * Return true if this Series object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -221,17 +216,13 @@ public boolean equals(Object o) { return false; } Series series = (Series) o; - return Objects.equals(this.host, series.host) - && Objects.equals(this.interval, series.interval) - && Objects.equals(this.metric, series.metric) - && Objects.equals(this.points, series.points) - && Objects.equals(this.tags, series.tags) - && Objects.equals(this.type, series.type); + return Objects.equals(this.host, series.host) && Objects.equals(this.interval, series.interval) && Objects.equals(this.metric, series.metric) && Objects.equals(this.points, series.points) && Objects.equals(this.tags, series.tags) && Objects.equals(this.type, series.type); } + @Override public int hashCode() { - return Objects.hash(host, interval, metric, points, tags, type); + return Objects.hash(host,interval,metric,points,tags,type); } @Override @@ -249,7 +240,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceCheck.java b/src/main/java/com/datadog/api/client/v1/model/ServiceCheck.java index 68a98f3a730..4e9a6c81b22 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceCheck.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceCheck.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An object containing service check and status. */ +/** + *

An object containing service check and status.

+ */ @JsonPropertyOrder({ ServiceCheck.JSON_PROPERTY_CHECK, ServiceCheck.JSON_PROPERTY_HOST_NAME, @@ -24,10 +41,10 @@ ServiceCheck.JSON_PROPERTY_TAGS, ServiceCheck.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceCheck { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK = "check"; private String check; @@ -50,78 +67,71 @@ public ServiceCheck() {} @JsonCreator public ServiceCheck( - @JsonProperty(required = true, value = JSON_PROPERTY_CHECK) String check, - @JsonProperty(required = true, value = JSON_PROPERTY_HOST_NAME) String hostName, - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) ServiceCheckStatus status, - @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { - this.check = check; - this.hostName = hostName; - this.status = status; - this.unparsed |= !status.isValid(); - this.tags = tags; + @JsonProperty(required=true, value=JSON_PROPERTY_CHECK)String check, + @JsonProperty(required=true, value=JSON_PROPERTY_HOST_NAME)String hostName, + @JsonProperty(required=true, value=JSON_PROPERTY_STATUS)ServiceCheckStatus status, + @JsonProperty(required=true, value=JSON_PROPERTY_TAGS)List tags) { + this.check = check; + this.hostName = hostName; + this.status = status; + this.unparsed |= !status.isValid(); + this.tags = tags; } - public ServiceCheck check(String check) { this.check = check; return this; } /** - * The check. - * + *

The check.

* @return check - */ - @JsonProperty(JSON_PROPERTY_CHECK) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCheck() { - return check; - } - + **/ + @JsonProperty(JSON_PROPERTY_CHECK) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getCheck() { + return check; + } public void setCheck(String check) { this.check = check; } - public ServiceCheck hostName(String hostName) { this.hostName = hostName; return this; } /** - * The host name correlated with the check. - * + *

The host name correlated with the check.

* @return hostName - */ - @JsonProperty(JSON_PROPERTY_HOST_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getHostName() { - return hostName; - } - + **/ + @JsonProperty(JSON_PROPERTY_HOST_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getHostName() { + return hostName; + } public void setHostName(String hostName) { this.hostName = hostName; } - public ServiceCheck message(String message) { this.message = message; return this; } /** - * Message containing check status. - * + *

Message containing check status.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public ServiceCheck status(ServiceCheckStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -129,71 +139,66 @@ public ServiceCheck status(ServiceCheckStatus status) { } /** - * The status of a service check. Set to 0 for OK, 1 for warning, - * 2 for critical, and 3 for unknown. - * + *

The status of a service check. Set to 0 for OK, 1 for warning, 2 for critical, and 3 for unknown.

* @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceCheckStatus getStatus() { - return status; - } - + **/ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceCheckStatus getStatus() { + return status; + } public void setStatus(ServiceCheckStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public ServiceCheck tags(List tags) { this.tags = tags; return this; } - public ServiceCheck addTagsItem(String tagsItem) { this.tags.add(tagsItem); return this; } /** - * Tags related to a check. - * + *

Tags related to a check.

* @return tags - */ - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTags() { - return tags; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public ServiceCheck timestamp(Long timestamp) { this.timestamp = timestamp; return this; } /** - * Time of check. - * + *

Time of check.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimestamp() { + return timestamp; + } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } - /** Return true if this ServiceCheck object is equal to o. */ + /** + * Return true if this ServiceCheck object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -203,17 +208,13 @@ public boolean equals(Object o) { return false; } ServiceCheck serviceCheck = (ServiceCheck) o; - return Objects.equals(this.check, serviceCheck.check) - && Objects.equals(this.hostName, serviceCheck.hostName) - && Objects.equals(this.message, serviceCheck.message) - && Objects.equals(this.status, serviceCheck.status) - && Objects.equals(this.tags, serviceCheck.tags) - && Objects.equals(this.timestamp, serviceCheck.timestamp); + return Objects.equals(this.check, serviceCheck.check) && Objects.equals(this.hostName, serviceCheck.hostName) && Objects.equals(this.message, serviceCheck.message) && Objects.equals(this.status, serviceCheck.status) && Objects.equals(this.tags, serviceCheck.tags) && Objects.equals(this.timestamp, serviceCheck.timestamp); } + @Override public int hashCode() { - return Objects.hash(check, hostName, message, status, tags, timestamp); + return Objects.hash(check,hostName,message,status,tags,timestamp); } @Override @@ -231,7 +232,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceCheckStatus.java b/src/main/java/com/datadog/api/client/v1/model/ServiceCheckStatus.java index a8cbe243373..845934d65cd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceCheckStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceCheckStatus.java @@ -6,22 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The status of a service check. Set to 0 for OK, 1 for warning, 2 - * for critical, and 3 for unknown. + *

The status of a service check. Set to 0 for OK, 1 for warning, 2 for critical, and 3 for unknown.

*/ @JsonSerialize(using = ServiceCheckStatus.ServiceCheckStatusSerializer.class) public class ServiceCheckStatus { @@ -44,19 +65,18 @@ public boolean isValid() { } public static class ServiceCheckStatusSerializer extends StdSerializer { - public ServiceCheckStatusSerializer(Class t) { - super(t); - } - - public ServiceCheckStatusSerializer() { - this(null); - } - - @Override - public void serialize(ServiceCheckStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ServiceCheckStatusSerializer(Class t) { + super(t); + } + + public ServiceCheckStatusSerializer() { + this(null); + } + + @Override + public void serialize(ServiceCheckStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +88,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this ServiceCheckStatus object is equal to o. */ + /** + * Return true if this ServiceCheckStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjective.java b/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjective.java index c695c68507d..79cc520c789 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjective.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjective.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A service level objective object includes a service level indicator, thresholds for one or more - * timeframes, and metadata (name, description, tags, etc.). + *

A service level objective object includes a service level indicator, thresholds + * for one or more timeframes, and metadata (name, description, tags, etc.).

*/ @JsonPropertyOrder({ ServiceLevelObjective.JSON_PROPERTY_CREATED_AT, @@ -38,10 +52,10 @@ ServiceLevelObjective.JSON_PROPERTY_TYPE, ServiceLevelObjective.JSON_PROPERTY_WARNING_THRESHOLD }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceLevelObjective { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private Long createdAt; @@ -94,81 +108,71 @@ public ServiceLevelObjective() {} @JsonCreator public ServiceLevelObjective( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_THRESHOLDS) - List thresholds, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SLOType type) { - this.name = name; - this.thresholds = thresholds; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_THRESHOLDS)List thresholds, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SLOType type) { + this.name = name; + this.thresholds = thresholds; + this.type = type; + this.unparsed |= !type.isValid(); } /** - * Creation timestamp (UNIX time in seconds) - * - *

Always included in service level objective responses. - * + *

Creation timestamp (UNIX time in seconds)

+ *

Always included in service level objective responses.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } public ServiceLevelObjective description(String description) { this.description = JsonNullable.of(description); return this; } /** - * A user-defined description of the service level objective. - * + *

A user-defined description of the service level objective.

*

Always included in service level objective responses (but may be null). - * Optional in create/update requests. - * + * Optional in create/update requests.

* @return description - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getDescription() { - return description.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDescription_JsonNullable() { return description; } - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - public void setDescription_JsonNullable(JsonNullable description) { + @JsonProperty(JSON_PROPERTY_DESCRIPTION)public void setDescription_JsonNullable(JsonNullable description) { this.description = description; } - public void setDescription(String description) { this.description = JsonNullable.of(description); } - public ServiceLevelObjective groups(List groups) { this.groups = groups; return this; } - public ServiceLevelObjective addGroupsItem(String groupsItem) { if (this.groups == null) { this.groups = new ArrayList<>(); @@ -178,59 +182,52 @@ public ServiceLevelObjective addGroupsItem(String groupsItem) { } /** - * A list of (up to 100) monitor groups that narrow the scope of a monitor service level - * objective. - * - *

Included in service level objective responses if it is not empty. Optional in create/update - * requests for monitor service level objectives, but may only be used when then length of the - * monitor_ids field is one. - * + *

A list of (up to 100) monitor groups that narrow the scope of a monitor service level objective.

+ *

Included in service level objective responses if it is not empty. Optional in + * create/update requests for monitor service level objectives, but may only be + * used when then length of the monitor_ids field is one.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } public void setGroups(List groups) { this.groups = groups; } /** - * A unique identifier for the service level objective object. - * - *

Always included in service level objective responses. - * + *

A unique identifier for the service level objective object.

+ *

Always included in service level objective responses.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } /** - * Modification timestamp (UNIX time in seconds) - * - *

Always included in service level objective responses. - * + *

Modification timestamp (UNIX time in seconds)

+ *

Always included in service level objective responses.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getModifiedAt() { + return modifiedAt; + } public ServiceLevelObjective monitorIds(List monitorIds) { this.monitorIds = monitorIds; return this; } - public ServiceLevelObjective addMonitorIdsItem(Long monitorIdsItem) { if (this.monitorIds == null) { this.monitorIds = new ArrayList<>(); @@ -240,27 +237,24 @@ public ServiceLevelObjective addMonitorIdsItem(Long monitorIdsItem) { } /** - * A list of monitor ids that defines the scope of a monitor service level objective. - * Required if type is monitor. - * + *

A list of monitor ids that defines the scope of a monitor service level + * objective. Required if type is monitor.

* @return monitorIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorIds() { - return monitorIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorIds() { + return monitorIds; + } public void setMonitorIds(List monitorIds) { this.monitorIds = monitorIds; } - public ServiceLevelObjective monitorTags(List monitorTags) { this.monitorTags = monitorTags; return this; } - public ServiceLevelObjective addMonitorTagsItem(String monitorTagsItem) { if (this.monitorTags == null) { this.monitorTags = new ArrayList<>(); @@ -270,45 +264,42 @@ public ServiceLevelObjective addMonitorTagsItem(String monitorTagsItem) { } /** - * The union of monitor tags for all monitors referenced by the monitor_ids field. - * Always included in service level objective responses for monitor-based service level objectives - * (but may be empty). Ignored in create/update requests. Does not affect which monitors are - * included in the service level objective (that is determined entirely by the monitor_ids - * field). - * + *

The union of monitor tags for all monitors referenced by the monitor_ids + * field. + * Always included in service level objective responses for monitor-based service level + * objectives (but may be empty). Ignored in create/update requests. Does not + * affect which monitors are included in the service level objective (that is + * determined entirely by the monitor_ids field).

* @return monitorTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorTags() { - return monitorTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorTags() { + return monitorTags; + } public void setMonitorTags(List monitorTags) { this.monitorTags = monitorTags; } - public ServiceLevelObjective name(String name) { this.name = name; return this; } /** - * The name of the service level objective object. - * + *

The name of the service level objective object.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceLevelObjective query(ServiceLevelObjectiveQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -316,28 +307,25 @@ public ServiceLevelObjective query(ServiceLevelObjectiveQuery query) { } /** - * A metric-based SLO. Required if type is metric. Note that Datadog - * only allows the sum by aggregator to be used because this will sum up all request counts - * instead of averaging them, or taking the max or min of all of those requests. - * + *

A metric-based SLO. Required if type is metric. Note that Datadog only allows the sum by aggregator + * to be used because this will sum up all request counts instead of averaging them, or taking the max or + * min of all of those requests.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceLevelObjectiveQuery getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceLevelObjectiveQuery getQuery() { + return query; + } public void setQuery(ServiceLevelObjectiveQuery query) { this.query = query; } - public ServiceLevelObjective tags(List tags) { this.tags = tags; return this; } - public ServiceLevelObjective addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -347,44 +335,41 @@ public ServiceLevelObjective addTagsItem(String tagsItem) { } /** - * A list of tags associated with this service level objective. Always included in service level - * objective responses (but may be empty). Optional in create/update requests. - * + *

A list of tags associated with this service level objective. + * Always included in service level objective responses (but may be empty). + * Optional in create/update requests.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public ServiceLevelObjective targetThreshold(Double targetThreshold) { this.targetThreshold = targetThreshold; return this; } /** - * The target threshold such that when the service level indicator is above this threshold over - * the given timeframe, the objective is being met. - * + *

The target threshold such that when the service level indicator is above this + * threshold over the given timeframe, the objective is being met.

* @return targetThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTargetThreshold() { - return targetThreshold; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTargetThreshold() { + return targetThreshold; + } public void setTargetThreshold(Double targetThreshold) { this.targetThreshold = targetThreshold; } - public ServiceLevelObjective thresholds(List thresholds) { this.thresholds = thresholds; for (SLOThreshold item : thresholds) { @@ -392,7 +377,6 @@ public ServiceLevelObjective thresholds(List thresholds) { } return this; } - public ServiceLevelObjective addThresholdsItem(SLOThreshold thresholdsItem) { this.thresholds.add(thresholdsItem); this.unparsed |= thresholdsItem.unparsed; @@ -400,20 +384,19 @@ public ServiceLevelObjective addThresholdsItem(SLOThreshold thresholdsItem) { } /** - * The thresholds (timeframes and associated targets) for this service level objective object. - * + *

The thresholds (timeframes and associated targets) for this service level + * objective object.

* @return thresholds - */ - @JsonProperty(JSON_PROPERTY_THRESHOLDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getThresholds() { - return thresholds; - } - + **/ + @JsonProperty(JSON_PROPERTY_THRESHOLDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getThresholds() { + return thresholds; + } public void setThresholds(List thresholds) { this.thresholds = thresholds; } - public ServiceLevelObjective timeframe(SLOTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -421,24 +404,22 @@ public ServiceLevelObjective timeframe(SLOTimeframe timeframe) { } /** - * The SLO time window options. - * + *

The SLO time window options.

* @return timeframe - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOTimeframe getTimeframe() { - return timeframe; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SLOTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - public ServiceLevelObjective type(SLOType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -446,47 +427,47 @@ public ServiceLevelObjective type(SLOType type) { } /** - * The type of the service level objective. - * + *

The type of the service level objective.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOType getType() { + return type; + } public void setType(SLOType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public ServiceLevelObjective warningThreshold(Double warningThreshold) { this.warningThreshold = warningThreshold; return this; } /** - * The optional warning threshold such that when the service level indicator is below this value - * for the given threshold, but above the target threshold, the objective appears in a "warning" - * state. This value must be greater than the target threshold. - * + *

The optional warning threshold such that when the service level indicator is + * below this value for the given threshold, but above the target threshold, the + * objective appears in a "warning" state. This value must be greater than the target + * threshold.

* @return warningThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getWarningThreshold() { - return warningThreshold; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getWarningThreshold() { + return warningThreshold; + } public void setWarningThreshold(Double warningThreshold) { this.warningThreshold = warningThreshold; } - /** Return true if this ServiceLevelObjective object is equal to o. */ + /** + * Return true if this ServiceLevelObjective object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -496,43 +477,13 @@ public boolean equals(Object o) { return false; } ServiceLevelObjective serviceLevelObjective = (ServiceLevelObjective) o; - return Objects.equals(this.createdAt, serviceLevelObjective.createdAt) - && Objects.equals(this.creator, serviceLevelObjective.creator) - && Objects.equals(this.description, serviceLevelObjective.description) - && Objects.equals(this.groups, serviceLevelObjective.groups) - && Objects.equals(this.id, serviceLevelObjective.id) - && Objects.equals(this.modifiedAt, serviceLevelObjective.modifiedAt) - && Objects.equals(this.monitorIds, serviceLevelObjective.monitorIds) - && Objects.equals(this.monitorTags, serviceLevelObjective.monitorTags) - && Objects.equals(this.name, serviceLevelObjective.name) - && Objects.equals(this.query, serviceLevelObjective.query) - && Objects.equals(this.tags, serviceLevelObjective.tags) - && Objects.equals(this.targetThreshold, serviceLevelObjective.targetThreshold) - && Objects.equals(this.thresholds, serviceLevelObjective.thresholds) - && Objects.equals(this.timeframe, serviceLevelObjective.timeframe) - && Objects.equals(this.type, serviceLevelObjective.type) - && Objects.equals(this.warningThreshold, serviceLevelObjective.warningThreshold); + return Objects.equals(this.createdAt, serviceLevelObjective.createdAt) && Objects.equals(this.creator, serviceLevelObjective.creator) && Objects.equals(this.description, serviceLevelObjective.description) && Objects.equals(this.groups, serviceLevelObjective.groups) && Objects.equals(this.id, serviceLevelObjective.id) && Objects.equals(this.modifiedAt, serviceLevelObjective.modifiedAt) && Objects.equals(this.monitorIds, serviceLevelObjective.monitorIds) && Objects.equals(this.monitorTags, serviceLevelObjective.monitorTags) && Objects.equals(this.name, serviceLevelObjective.name) && Objects.equals(this.query, serviceLevelObjective.query) && Objects.equals(this.tags, serviceLevelObjective.tags) && Objects.equals(this.targetThreshold, serviceLevelObjective.targetThreshold) && Objects.equals(this.thresholds, serviceLevelObjective.thresholds) && Objects.equals(this.timeframe, serviceLevelObjective.timeframe) && Objects.equals(this.type, serviceLevelObjective.type) && Objects.equals(this.warningThreshold, serviceLevelObjective.warningThreshold); } + @Override public int hashCode() { - return Objects.hash( - createdAt, - creator, - description, - groups, - id, - modifiedAt, - monitorIds, - monitorTags, - name, - query, - tags, - targetThreshold, - thresholds, - timeframe, - type, - warningThreshold); + return Objects.hash(createdAt,creator,description,groups,id,modifiedAt,monitorIds,monitorTags,name,query,tags,targetThreshold,thresholds,timeframe,type,warningThreshold); } @Override @@ -560,7 +511,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveQuery.java b/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveQuery.java index 846b362a14f..b292e07bb9b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveQuery.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * A metric-based SLO. Required if type is metric. Note that Datadog - * only allows the sum by aggregator to be used because this will sum up all request counts instead - * of averaging them, or taking the max or min of all of those requests. + *

A metric-based SLO. Required if type is metric. Note that Datadog only allows the sum by aggregator + * to be used because this will sum up all request counts instead of averaging them, or taking the max or + * min of all of those requests.

*/ @JsonPropertyOrder({ ServiceLevelObjectiveQuery.JSON_PROPERTY_DENOMINATOR, ServiceLevelObjectiveQuery.JSON_PROPERTY_NUMERATOR }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceLevelObjectiveQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DENOMINATOR = "denominator"; private String denominator; @@ -36,53 +53,51 @@ public ServiceLevelObjectiveQuery() {} @JsonCreator public ServiceLevelObjectiveQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_DENOMINATOR) String denominator, - @JsonProperty(required = true, value = JSON_PROPERTY_NUMERATOR) String numerator) { - this.denominator = denominator; - this.numerator = numerator; + @JsonProperty(required=true, value=JSON_PROPERTY_DENOMINATOR)String denominator, + @JsonProperty(required=true, value=JSON_PROPERTY_NUMERATOR)String numerator) { + this.denominator = denominator; + this.numerator = numerator; } - public ServiceLevelObjectiveQuery denominator(String denominator) { this.denominator = denominator; return this; } /** - * A Datadog metric query for total (valid) events. - * + *

A Datadog metric query for total (valid) events.

* @return denominator - */ - @JsonProperty(JSON_PROPERTY_DENOMINATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDenominator() { - return denominator; - } - + **/ + @JsonProperty(JSON_PROPERTY_DENOMINATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDenominator() { + return denominator; + } public void setDenominator(String denominator) { this.denominator = denominator; } - public ServiceLevelObjectiveQuery numerator(String numerator) { this.numerator = numerator; return this; } /** - * A Datadog metric query for good events. - * + *

A Datadog metric query for good events.

* @return numerator - */ - @JsonProperty(JSON_PROPERTY_NUMERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNumerator() { - return numerator; - } - + **/ + @JsonProperty(JSON_PROPERTY_NUMERATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getNumerator() { + return numerator; + } public void setNumerator(String numerator) { this.numerator = numerator; } - /** Return true if this ServiceLevelObjectiveQuery object is equal to o. */ + /** + * Return true if this ServiceLevelObjectiveQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,13 +107,13 @@ public boolean equals(Object o) { return false; } ServiceLevelObjectiveQuery serviceLevelObjectiveQuery = (ServiceLevelObjectiveQuery) o; - return Objects.equals(this.denominator, serviceLevelObjectiveQuery.denominator) - && Objects.equals(this.numerator, serviceLevelObjectiveQuery.numerator); + return Objects.equals(this.denominator, serviceLevelObjectiveQuery.denominator) && Objects.equals(this.numerator, serviceLevelObjectiveQuery.numerator); } + @Override public int hashCode() { - return Objects.hash(denominator, numerator); + return Objects.hash(denominator,numerator); } @Override @@ -112,7 +127,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveRequest.java b/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveRequest.java index 70338d20053..cad5d3be31c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceLevelObjectiveRequest.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * A service level objective object includes a service level indicator, thresholds for one or more - * timeframes, and metadata (name, description, tags, etc.). + *

A service level objective object includes a service level indicator, thresholds + * for one or more timeframes, and metadata (name, description, tags, etc.).

*/ @JsonPropertyOrder({ ServiceLevelObjectiveRequest.JSON_PROPERTY_DESCRIPTION, @@ -33,10 +47,10 @@ ServiceLevelObjectiveRequest.JSON_PROPERTY_TYPE, ServiceLevelObjectiveRequest.JSON_PROPERTY_WARNING_THRESHOLD }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceLevelObjectiveRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private JsonNullable description = JsonNullable.undefined(); @@ -74,55 +88,46 @@ public ServiceLevelObjectiveRequest() {} @JsonCreator public ServiceLevelObjectiveRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_THRESHOLDS) - List thresholds, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SLOType type) { - this.name = name; - this.thresholds = thresholds; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_THRESHOLDS)List thresholds, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SLOType type) { + this.name = name; + this.thresholds = thresholds; + this.type = type; + this.unparsed |= !type.isValid(); } - public ServiceLevelObjectiveRequest description(String description) { this.description = JsonNullable.of(description); return this; } /** - * A user-defined description of the service level objective. - * + *

A user-defined description of the service level objective.

*

Always included in service level objective responses (but may be null). - * Optional in create/update requests. - * + * Optional in create/update requests.

* @return description - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getDescription() { - return description.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDescription_JsonNullable() { return description; } - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - public void setDescription_JsonNullable(JsonNullable description) { + @JsonProperty(JSON_PROPERTY_DESCRIPTION)public void setDescription_JsonNullable(JsonNullable description) { this.description = description; } - public void setDescription(String description) { this.description = JsonNullable.of(description); } - public ServiceLevelObjectiveRequest groups(List groups) { this.groups = groups; return this; } - public ServiceLevelObjectiveRequest addGroupsItem(String groupsItem) { if (this.groups == null) { this.groups = new ArrayList<>(); @@ -132,31 +137,26 @@ public ServiceLevelObjectiveRequest addGroupsItem(String groupsItem) { } /** - * A list of (up to 100) monitor groups that narrow the scope of a monitor service level - * objective. - * - *

Included in service level objective responses if it is not empty. Optional in create/update - * requests for monitor service level objectives, but may only be used when then length of the - * monitor_ids field is one. - * + *

A list of (up to 100) monitor groups that narrow the scope of a monitor service level objective.

+ *

Included in service level objective responses if it is not empty. Optional in + * create/update requests for monitor service level objectives, but may only be + * used when then length of the monitor_ids field is one.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } public void setGroups(List groups) { this.groups = groups; } - public ServiceLevelObjectiveRequest monitorIds(List monitorIds) { this.monitorIds = monitorIds; return this; } - public ServiceLevelObjectiveRequest addMonitorIdsItem(Long monitorIdsItem) { if (this.monitorIds == null) { this.monitorIds = new ArrayList<>(); @@ -166,42 +166,38 @@ public ServiceLevelObjectiveRequest addMonitorIdsItem(Long monitorIdsItem) { } /** - * A list of monitor IDs that defines the scope of a monitor service level objective. - * Required if type is monitor. - * + *

A list of monitor IDs that defines the scope of a monitor service level + * objective. Required if type is monitor.

* @return monitorIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMonitorIds() { - return monitorIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMonitorIds() { + return monitorIds; + } public void setMonitorIds(List monitorIds) { this.monitorIds = monitorIds; } - public ServiceLevelObjectiveRequest name(String name) { this.name = name; return this; } /** - * The name of the service level objective object. - * + *

The name of the service level objective object.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceLevelObjectiveRequest query(ServiceLevelObjectiveQuery query) { this.query = query; this.unparsed |= query.unparsed; @@ -209,28 +205,25 @@ public ServiceLevelObjectiveRequest query(ServiceLevelObjectiveQuery query) { } /** - * A metric-based SLO. Required if type is metric. Note that Datadog - * only allows the sum by aggregator to be used because this will sum up all request counts - * instead of averaging them, or taking the max or min of all of those requests. - * + *

A metric-based SLO. Required if type is metric. Note that Datadog only allows the sum by aggregator + * to be used because this will sum up all request counts instead of averaging them, or taking the max or + * min of all of those requests.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceLevelObjectiveQuery getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceLevelObjectiveQuery getQuery() { + return query; + } public void setQuery(ServiceLevelObjectiveQuery query) { this.query = query; } - public ServiceLevelObjectiveRequest tags(List tags) { this.tags = tags; return this; } - public ServiceLevelObjectiveRequest addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -240,44 +233,41 @@ public ServiceLevelObjectiveRequest addTagsItem(String tagsItem) { } /** - * A list of tags associated with this service level objective. Always included in service level - * objective responses (but may be empty). Optional in create/update requests. - * + *

A list of tags associated with this service level objective. + * Always included in service level objective responses (but may be empty). + * Optional in create/update requests.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public ServiceLevelObjectiveRequest targetThreshold(Double targetThreshold) { this.targetThreshold = targetThreshold; return this; } /** - * The target threshold such that when the service level indicator is above this threshold over - * the given timeframe, the objective is being met. - * + *

The target threshold such that when the service level indicator is above this + * threshold over the given timeframe, the objective is being met.

* @return targetThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTargetThreshold() { - return targetThreshold; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTargetThreshold() { + return targetThreshold; + } public void setTargetThreshold(Double targetThreshold) { this.targetThreshold = targetThreshold; } - public ServiceLevelObjectiveRequest thresholds(List thresholds) { this.thresholds = thresholds; for (SLOThreshold item : thresholds) { @@ -285,7 +275,6 @@ public ServiceLevelObjectiveRequest thresholds(List thresholds) { } return this; } - public ServiceLevelObjectiveRequest addThresholdsItem(SLOThreshold thresholdsItem) { this.thresholds.add(thresholdsItem); this.unparsed |= thresholdsItem.unparsed; @@ -293,20 +282,19 @@ public ServiceLevelObjectiveRequest addThresholdsItem(SLOThreshold thresholdsIte } /** - * The thresholds (timeframes and associated targets) for this service level objective object. - * + *

The thresholds (timeframes and associated targets) for this service level + * objective object.

* @return thresholds - */ - @JsonProperty(JSON_PROPERTY_THRESHOLDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getThresholds() { - return thresholds; - } - + **/ + @JsonProperty(JSON_PROPERTY_THRESHOLDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getThresholds() { + return thresholds; + } public void setThresholds(List thresholds) { this.thresholds = thresholds; } - public ServiceLevelObjectiveRequest timeframe(SLOTimeframe timeframe) { this.timeframe = timeframe; this.unparsed |= !timeframe.isValid(); @@ -314,24 +302,22 @@ public ServiceLevelObjectiveRequest timeframe(SLOTimeframe timeframe) { } /** - * The SLO time window options. - * + *

The SLO time window options.

* @return timeframe - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SLOTimeframe getTimeframe() { - return timeframe; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SLOTimeframe getTimeframe() { + return timeframe; + } public void setTimeframe(SLOTimeframe timeframe) { if (!timeframe.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.timeframe = timeframe; } - public ServiceLevelObjectiveRequest type(SLOType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -339,47 +325,47 @@ public ServiceLevelObjectiveRequest type(SLOType type) { } /** - * The type of the service level objective. - * + *

The type of the service level objective.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SLOType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SLOType getType() { + return type; + } public void setType(SLOType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public ServiceLevelObjectiveRequest warningThreshold(Double warningThreshold) { this.warningThreshold = warningThreshold; return this; } /** - * The optional warning threshold such that when the service level indicator is below this value - * for the given threshold, but above the target threshold, the objective appears in a "warning" - * state. This value must be greater than the target threshold. - * + *

The optional warning threshold such that when the service level indicator is + * below this value for the given threshold, but above the target threshold, the + * objective appears in a "warning" state. This value must be greater than the target + * threshold.

* @return warningThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getWarningThreshold() { - return warningThreshold; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getWarningThreshold() { + return warningThreshold; + } public void setWarningThreshold(Double warningThreshold) { this.warningThreshold = warningThreshold; } - /** Return true if this ServiceLevelObjectiveRequest object is equal to o. */ + /** + * Return true if this ServiceLevelObjectiveRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -389,33 +375,13 @@ public boolean equals(Object o) { return false; } ServiceLevelObjectiveRequest serviceLevelObjectiveRequest = (ServiceLevelObjectiveRequest) o; - return Objects.equals(this.description, serviceLevelObjectiveRequest.description) - && Objects.equals(this.groups, serviceLevelObjectiveRequest.groups) - && Objects.equals(this.monitorIds, serviceLevelObjectiveRequest.monitorIds) - && Objects.equals(this.name, serviceLevelObjectiveRequest.name) - && Objects.equals(this.query, serviceLevelObjectiveRequest.query) - && Objects.equals(this.tags, serviceLevelObjectiveRequest.tags) - && Objects.equals(this.targetThreshold, serviceLevelObjectiveRequest.targetThreshold) - && Objects.equals(this.thresholds, serviceLevelObjectiveRequest.thresholds) - && Objects.equals(this.timeframe, serviceLevelObjectiveRequest.timeframe) - && Objects.equals(this.type, serviceLevelObjectiveRequest.type) - && Objects.equals(this.warningThreshold, serviceLevelObjectiveRequest.warningThreshold); + return Objects.equals(this.description, serviceLevelObjectiveRequest.description) && Objects.equals(this.groups, serviceLevelObjectiveRequest.groups) && Objects.equals(this.monitorIds, serviceLevelObjectiveRequest.monitorIds) && Objects.equals(this.name, serviceLevelObjectiveRequest.name) && Objects.equals(this.query, serviceLevelObjectiveRequest.query) && Objects.equals(this.tags, serviceLevelObjectiveRequest.tags) && Objects.equals(this.targetThreshold, serviceLevelObjectiveRequest.targetThreshold) && Objects.equals(this.thresholds, serviceLevelObjectiveRequest.thresholds) && Objects.equals(this.timeframe, serviceLevelObjectiveRequest.timeframe) && Objects.equals(this.type, serviceLevelObjectiveRequest.type) && Objects.equals(this.warningThreshold, serviceLevelObjectiveRequest.warningThreshold); } + @Override public int hashCode() { - return Objects.hash( - description, - groups, - monitorIds, - name, - query, - tags, - targetThreshold, - thresholds, - timeframe, - type, - warningThreshold); + return Objects.hash(description,groups,monitorIds,name,query,tags,targetThreshold,thresholds,timeframe,type,warningThreshold); } @Override @@ -438,7 +404,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinition.java index 98f8b7f954d..a42294538a5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * This widget displays a map of a service to all of the services that call it, and all of the - * services that it calls. + *

This widget displays a map of a service to all of the services that call it, and all of the services that it calls.

*/ @JsonPropertyOrder({ ServiceMapWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -28,10 +42,10 @@ ServiceMapWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, ServiceMapWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceMapWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -57,16 +71,14 @@ public ServiceMapWidgetDefinition() {} @JsonCreator public ServiceMapWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_FILTERS) List filters, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ServiceMapWidgetDefinitionType type) { - this.filters = filters; - this.service = service; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_FILTERS)List filters, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE)String service, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ServiceMapWidgetDefinitionType type) { + this.filters = filters; + this.service = service; + this.type = type; + this.unparsed |= !type.isValid(); } - public ServiceMapWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -74,7 +86,6 @@ public ServiceMapWidgetDefinition customLinks(List customLinks } return this; } - public ServiceMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -85,87 +96,78 @@ public ServiceMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLink } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public ServiceMapWidgetDefinition filters(List filters) { this.filters = filters; return this; } - public ServiceMapWidgetDefinition addFiltersItem(String filtersItem) { this.filters.add(filtersItem); return this; } /** - * Your environment and primary tag (or * if enabled for your account). - * + *

Your environment and primary tag (or * if enabled for your account).

* @return filters - */ - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getFilters() { - return filters; - } - + **/ + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public ServiceMapWidgetDefinition service(String service) { this.service = service; return this; } /** - * The ID of the service you want to map. - * + *

The ID of the service you want to map.

* @return service - */ - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getService() { - return service; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public ServiceMapWidgetDefinition title(String title) { this.title = title; return this; } /** - * The title of your widget. - * + *

The title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public ServiceMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -173,45 +175,41 @@ public ServiceMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public ServiceMapWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public ServiceMapWidgetDefinition type(ServiceMapWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -219,24 +217,25 @@ public ServiceMapWidgetDefinition type(ServiceMapWidgetDefinitionType type) { } /** - * Type of the service map widget. - * + *

Type of the service map widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceMapWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceMapWidgetDefinitionType getType() { + return type; + } public void setType(ServiceMapWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ServiceMapWidgetDefinition object is equal to o. */ + /** + * Return true if this ServiceMapWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -246,18 +245,13 @@ public boolean equals(Object o) { return false; } ServiceMapWidgetDefinition serviceMapWidgetDefinition = (ServiceMapWidgetDefinition) o; - return Objects.equals(this.customLinks, serviceMapWidgetDefinition.customLinks) - && Objects.equals(this.filters, serviceMapWidgetDefinition.filters) - && Objects.equals(this.service, serviceMapWidgetDefinition.service) - && Objects.equals(this.title, serviceMapWidgetDefinition.title) - && Objects.equals(this.titleAlign, serviceMapWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, serviceMapWidgetDefinition.titleSize) - && Objects.equals(this.type, serviceMapWidgetDefinition.type); + return Objects.equals(this.customLinks, serviceMapWidgetDefinition.customLinks) && Objects.equals(this.filters, serviceMapWidgetDefinition.filters) && Objects.equals(this.service, serviceMapWidgetDefinition.service) && Objects.equals(this.title, serviceMapWidgetDefinition.title) && Objects.equals(this.titleAlign, serviceMapWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, serviceMapWidgetDefinition.titleSize) && Objects.equals(this.type, serviceMapWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(customLinks, filters, service, title, titleAlign, titleSize, type); + return Objects.hash(customLinks,filters,service,title,titleAlign,titleSize,type); } @Override @@ -276,7 +270,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinitionType.java index 13b42498a7c..a008d1b2624 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceMapWidgetDefinitionType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the service map widget. */ -@JsonSerialize( - using = ServiceMapWidgetDefinitionType.ServiceMapWidgetDefinitionTypeSerializer.class) +/** + *

Type of the service map widget.

+ */ +@JsonSerialize(using = ServiceMapWidgetDefinitionType.ServiceMapWidgetDefinitionTypeSerializer.class) public class ServiceMapWidgetDefinitionType { - public static final ServiceMapWidgetDefinitionType SERVICEMAP = - new ServiceMapWidgetDefinitionType("servicemap"); + public static final ServiceMapWidgetDefinitionType SERVICEMAP = new ServiceMapWidgetDefinitionType("servicemap"); private static final Set allowedValues = new HashSet(Arrays.asList("servicemap")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceMapWidgetDefinitionTypeSerializer - extends StdSerializer { - public ServiceMapWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class ServiceMapWidgetDefinitionTypeSerializer extends StdSerializer { + public ServiceMapWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ServiceMapWidgetDefinitionTypeSerializer() { - this(null); - } + public ServiceMapWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ServiceMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceMapWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ServiceMapWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinition.java index 30e1e9634aa..11eba0d4ebe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinition.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The service summary displays the graphs of a chosen service in your screenboard. Only available - * on FREE layout dashboards. + *

The service summary displays the graphs of a chosen service in your screenboard. Only available on FREE layout dashboards.

*/ @JsonPropertyOrder({ ServiceSummaryWidgetDefinition.JSON_PROPERTY_DISPLAY_FORMAT, @@ -35,10 +51,10 @@ ServiceSummaryWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, ServiceSummaryWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceSummaryWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DISPLAY_FORMAT = "display_format"; private WidgetServiceSummaryDisplayFormat displayFormat; @@ -85,217 +101,195 @@ public class ServiceSummaryWidgetDefinition { private String titleSize; public static final String JSON_PROPERTY_TYPE = "type"; - private ServiceSummaryWidgetDefinitionType type = - ServiceSummaryWidgetDefinitionType.TRACE_SERVICE; + private ServiceSummaryWidgetDefinitionType type = ServiceSummaryWidgetDefinitionType.TRACE_SERVICE; public ServiceSummaryWidgetDefinition() {} @JsonCreator public ServiceSummaryWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_ENV) String env, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, - @JsonProperty(required = true, value = JSON_PROPERTY_SPAN_NAME) String spanName, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ServiceSummaryWidgetDefinitionType type) { - this.env = env; - this.service = service; - this.spanName = spanName; - this.type = type; - this.unparsed |= !type.isValid(); - } - - public ServiceSummaryWidgetDefinition displayFormat( - WidgetServiceSummaryDisplayFormat displayFormat) { + @JsonProperty(required=true, value=JSON_PROPERTY_ENV)String env, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE)String service, + @JsonProperty(required=true, value=JSON_PROPERTY_SPAN_NAME)String spanName, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ServiceSummaryWidgetDefinitionType type) { + this.env = env; + this.service = service; + this.spanName = spanName; + this.type = type; + this.unparsed |= !type.isValid(); + } + public ServiceSummaryWidgetDefinition displayFormat(WidgetServiceSummaryDisplayFormat displayFormat) { this.displayFormat = displayFormat; this.unparsed |= !displayFormat.isValid(); return this; } /** - * Number of columns to display. - * + *

Number of columns to display.

* @return displayFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetServiceSummaryDisplayFormat getDisplayFormat() { - return displayFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetServiceSummaryDisplayFormat getDisplayFormat() { + return displayFormat; + } public void setDisplayFormat(WidgetServiceSummaryDisplayFormat displayFormat) { if (!displayFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.displayFormat = displayFormat; } - public ServiceSummaryWidgetDefinition env(String env) { this.env = env; return this; } /** - * APM environment. - * + *

APM environment.

* @return env - */ - @JsonProperty(JSON_PROPERTY_ENV) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEnv() { - return env; - } - + **/ + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getEnv() { + return env; + } public void setEnv(String env) { this.env = env; } - public ServiceSummaryWidgetDefinition service(String service) { this.service = service; return this; } /** - * APM service. - * + *

APM service.

* @return service - */ - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getService() { - return service; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public ServiceSummaryWidgetDefinition showBreakdown(Boolean showBreakdown) { this.showBreakdown = showBreakdown; return this; } /** - * Whether to show the latency breakdown or not. - * + *

Whether to show the latency breakdown or not.

* @return showBreakdown - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_BREAKDOWN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowBreakdown() { - return showBreakdown; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_BREAKDOWN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowBreakdown() { + return showBreakdown; + } public void setShowBreakdown(Boolean showBreakdown) { this.showBreakdown = showBreakdown; } - public ServiceSummaryWidgetDefinition showDistribution(Boolean showDistribution) { this.showDistribution = showDistribution; return this; } /** - * Whether to show the latency distribution or not. - * + *

Whether to show the latency distribution or not.

* @return showDistribution - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_DISTRIBUTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowDistribution() { - return showDistribution; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_DISTRIBUTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowDistribution() { + return showDistribution; + } public void setShowDistribution(Boolean showDistribution) { this.showDistribution = showDistribution; } - public ServiceSummaryWidgetDefinition showErrors(Boolean showErrors) { this.showErrors = showErrors; return this; } /** - * Whether to show the error metrics or not. - * + *

Whether to show the error metrics or not.

* @return showErrors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowErrors() { - return showErrors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowErrors() { + return showErrors; + } public void setShowErrors(Boolean showErrors) { this.showErrors = showErrors; } - public ServiceSummaryWidgetDefinition showHits(Boolean showHits) { this.showHits = showHits; return this; } /** - * Whether to show the hits metrics or not. - * + *

Whether to show the hits metrics or not.

* @return showHits - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_HITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowHits() { - return showHits; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_HITS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowHits() { + return showHits; + } public void setShowHits(Boolean showHits) { this.showHits = showHits; } - public ServiceSummaryWidgetDefinition showLatency(Boolean showLatency) { this.showLatency = showLatency; return this; } /** - * Whether to show the latency metrics or not. - * + *

Whether to show the latency metrics or not.

* @return showLatency - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_LATENCY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowLatency() { - return showLatency; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_LATENCY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowLatency() { + return showLatency; + } public void setShowLatency(Boolean showLatency) { this.showLatency = showLatency; } - public ServiceSummaryWidgetDefinition showResourceList(Boolean showResourceList) { this.showResourceList = showResourceList; return this; } /** - * Whether to show the resource list or not. - * + *

Whether to show the resource list or not.

* @return showResourceList - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_RESOURCE_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowResourceList() { - return showResourceList; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_RESOURCE_LIST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowResourceList() { + return showResourceList; + } public void setShowResourceList(Boolean showResourceList) { this.showResourceList = showResourceList; } - public ServiceSummaryWidgetDefinition sizeFormat(WidgetSizeFormat sizeFormat) { this.sizeFormat = sizeFormat; this.unparsed |= !sizeFormat.isValid(); @@ -303,44 +297,40 @@ public ServiceSummaryWidgetDefinition sizeFormat(WidgetSizeFormat sizeFormat) { } /** - * Size of the widget. - * + *

Size of the widget.

* @return sizeFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetSizeFormat getSizeFormat() { - return sizeFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetSizeFormat getSizeFormat() { + return sizeFormat; + } public void setSizeFormat(WidgetSizeFormat sizeFormat) { if (!sizeFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sizeFormat = sizeFormat; } - public ServiceSummaryWidgetDefinition spanName(String spanName) { this.spanName = spanName; return this; } /** - * APM span name. - * + *

APM span name.

* @return spanName - */ - @JsonProperty(JSON_PROPERTY_SPAN_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSpanName() { - return spanName; - } - + **/ + @JsonProperty(JSON_PROPERTY_SPAN_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSpanName() { + return spanName; + } public void setSpanName(String spanName) { this.spanName = spanName; } - public ServiceSummaryWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -348,42 +338,38 @@ public ServiceSummaryWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public ServiceSummaryWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of the widget. - * + *

Title of the widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public ServiceSummaryWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -391,45 +377,41 @@ public ServiceSummaryWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public ServiceSummaryWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public ServiceSummaryWidgetDefinition type(ServiceSummaryWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -437,24 +419,25 @@ public ServiceSummaryWidgetDefinition type(ServiceSummaryWidgetDefinitionType ty } /** - * Type of the service summary widget. - * + *

Type of the service summary widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceSummaryWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceSummaryWidgetDefinitionType getType() { + return type; + } public void setType(ServiceSummaryWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ServiceSummaryWidgetDefinition object is equal to o. */ + /** + * Return true if this ServiceSummaryWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -463,45 +446,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceSummaryWidgetDefinition serviceSummaryWidgetDefinition = - (ServiceSummaryWidgetDefinition) o; - return Objects.equals(this.displayFormat, serviceSummaryWidgetDefinition.displayFormat) - && Objects.equals(this.env, serviceSummaryWidgetDefinition.env) - && Objects.equals(this.service, serviceSummaryWidgetDefinition.service) - && Objects.equals(this.showBreakdown, serviceSummaryWidgetDefinition.showBreakdown) - && Objects.equals(this.showDistribution, serviceSummaryWidgetDefinition.showDistribution) - && Objects.equals(this.showErrors, serviceSummaryWidgetDefinition.showErrors) - && Objects.equals(this.showHits, serviceSummaryWidgetDefinition.showHits) - && Objects.equals(this.showLatency, serviceSummaryWidgetDefinition.showLatency) - && Objects.equals(this.showResourceList, serviceSummaryWidgetDefinition.showResourceList) - && Objects.equals(this.sizeFormat, serviceSummaryWidgetDefinition.sizeFormat) - && Objects.equals(this.spanName, serviceSummaryWidgetDefinition.spanName) - && Objects.equals(this.time, serviceSummaryWidgetDefinition.time) - && Objects.equals(this.title, serviceSummaryWidgetDefinition.title) - && Objects.equals(this.titleAlign, serviceSummaryWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, serviceSummaryWidgetDefinition.titleSize) - && Objects.equals(this.type, serviceSummaryWidgetDefinition.type); + ServiceSummaryWidgetDefinition serviceSummaryWidgetDefinition = (ServiceSummaryWidgetDefinition) o; + return Objects.equals(this.displayFormat, serviceSummaryWidgetDefinition.displayFormat) && Objects.equals(this.env, serviceSummaryWidgetDefinition.env) && Objects.equals(this.service, serviceSummaryWidgetDefinition.service) && Objects.equals(this.showBreakdown, serviceSummaryWidgetDefinition.showBreakdown) && Objects.equals(this.showDistribution, serviceSummaryWidgetDefinition.showDistribution) && Objects.equals(this.showErrors, serviceSummaryWidgetDefinition.showErrors) && Objects.equals(this.showHits, serviceSummaryWidgetDefinition.showHits) && Objects.equals(this.showLatency, serviceSummaryWidgetDefinition.showLatency) && Objects.equals(this.showResourceList, serviceSummaryWidgetDefinition.showResourceList) && Objects.equals(this.sizeFormat, serviceSummaryWidgetDefinition.sizeFormat) && Objects.equals(this.spanName, serviceSummaryWidgetDefinition.spanName) && Objects.equals(this.time, serviceSummaryWidgetDefinition.time) && Objects.equals(this.title, serviceSummaryWidgetDefinition.title) && Objects.equals(this.titleAlign, serviceSummaryWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, serviceSummaryWidgetDefinition.titleSize) && Objects.equals(this.type, serviceSummaryWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - displayFormat, - env, - service, - showBreakdown, - showDistribution, - showErrors, - showHits, - showLatency, - showResourceList, - sizeFormat, - spanName, - time, - title, - titleAlign, - titleSize, - type); + return Objects.hash(displayFormat,env,service,showBreakdown,showDistribution,showErrors,showHits,showLatency,showResourceList,sizeFormat,spanName,time,title,titleAlign,titleSize,type); } @Override @@ -529,7 +481,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinitionType.java index a5d0a7ec1c6..9d8197b61f1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ServiceSummaryWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the service summary widget. */ -@JsonSerialize( - using = ServiceSummaryWidgetDefinitionType.ServiceSummaryWidgetDefinitionTypeSerializer.class) +/** + *

Type of the service summary widget.

+ */ +@JsonSerialize(using = ServiceSummaryWidgetDefinitionType.ServiceSummaryWidgetDefinitionTypeSerializer.class) public class ServiceSummaryWidgetDefinitionType { - public static final ServiceSummaryWidgetDefinitionType TRACE_SERVICE = - new ServiceSummaryWidgetDefinitionType("trace_service"); + public static final ServiceSummaryWidgetDefinitionType TRACE_SERVICE = new ServiceSummaryWidgetDefinitionType("trace_service"); - private static final Set allowedValues = - new HashSet(Arrays.asList("trace_service")); + private static final Set allowedValues = new HashSet(Arrays.asList("trace_service")); private String value; @@ -40,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceSummaryWidgetDefinitionTypeSerializer - extends StdSerializer { - public ServiceSummaryWidgetDefinitionTypeSerializer( - Class t) { - super(t); - } + public static class ServiceSummaryWidgetDefinitionTypeSerializer extends StdSerializer { + public ServiceSummaryWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ServiceSummaryWidgetDefinitionTypeSerializer() { - this(null); - } + public ServiceSummaryWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ServiceSummaryWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceSummaryWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceSummaryWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ServiceSummaryWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SignalArchiveReason.java b/src/main/java/com/datadog/api/client/v1/model/SignalArchiveReason.java index 13e7870f193..f5af0f5472a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SignalArchiveReason.java +++ b/src/main/java/com/datadog/api/client/v1/model/SignalArchiveReason.java @@ -6,33 +6,53 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Reason why a signal has been archived. */ +/** + *

Reason why a signal has been archived.

+ */ @JsonSerialize(using = SignalArchiveReason.SignalArchiveReasonSerializer.class) public class SignalArchiveReason { public static final SignalArchiveReason NONE = new SignalArchiveReason("none"); - public static final SignalArchiveReason FALSE_POSITIVE = - new SignalArchiveReason("false_positive"); - public static final SignalArchiveReason TESTING_OR_MAINTENANCE = - new SignalArchiveReason("testing_or_maintenance"); + public static final SignalArchiveReason FALSE_POSITIVE = new SignalArchiveReason("false_positive"); + public static final SignalArchiveReason TESTING_OR_MAINTENANCE = new SignalArchiveReason("testing_or_maintenance"); public static final SignalArchiveReason OTHER = new SignalArchiveReason("other"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("none", "false_positive", "testing_or_maintenance", "other")); + private static final Set allowedValues = new HashSet(Arrays.asList("none", "false_positive", "testing_or_maintenance", "other")); private String value; @@ -45,20 +65,18 @@ public boolean isValid() { } public static class SignalArchiveReasonSerializer extends StdSerializer { - public SignalArchiveReasonSerializer(Class t) { - super(t); - } - - public SignalArchiveReasonSerializer() { - this(null); - } - - @Override - public void serialize( - SignalArchiveReason value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SignalArchiveReasonSerializer(Class t) { + super(t); + } + + public SignalArchiveReasonSerializer() { + this(null); + } + + @Override + public void serialize(SignalArchiveReason value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SignalArchiveReason object is equal to o. */ + /** + * Return true if this SignalArchiveReason object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SignalAssigneeUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/SignalAssigneeUpdateRequest.java index 96d40e4704a..40b1155679e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SignalAssigneeUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SignalAssigneeUpdateRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes describing an assignee update operation over a security signal. */ + +/** + *

Attributes describing an assignee update operation over a security signal.

+ */ @JsonPropertyOrder({ SignalAssigneeUpdateRequest.JSON_PROPERTY_ASSIGNEE, SignalAssigneeUpdateRequest.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SignalAssigneeUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ASSIGNEE = "assignee"; private String assignee; @@ -32,52 +51,50 @@ public SignalAssigneeUpdateRequest() {} @JsonCreator public SignalAssigneeUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ASSIGNEE) String assignee) { - this.assignee = assignee; + @JsonProperty(required=true, value=JSON_PROPERTY_ASSIGNEE)String assignee) { + this.assignee = assignee; } - public SignalAssigneeUpdateRequest assignee(String assignee) { this.assignee = assignee; return this; } /** - * The UUID of the user being assigned. Use empty string to return signal to unassigned. - * + *

The UUID of the user being assigned. Use empty string to return signal to unassigned.

* @return assignee - */ - @JsonProperty(JSON_PROPERTY_ASSIGNEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAssignee() { - return assignee; - } - + **/ + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAssignee() { + return assignee; + } public void setAssignee(String assignee) { this.assignee = assignee; } - public SignalAssigneeUpdateRequest version(Long version) { this.version = version; return this; } /** - * Version of the updated signal. If server side version is higher, update will be rejected. - * + *

Version of the updated signal. If server side version is higher, update will be rejected.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SignalAssigneeUpdateRequest object is equal to o. */ + /** + * Return true if this SignalAssigneeUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,13 +104,13 @@ public boolean equals(Object o) { return false; } SignalAssigneeUpdateRequest signalAssigneeUpdateRequest = (SignalAssigneeUpdateRequest) o; - return Objects.equals(this.assignee, signalAssigneeUpdateRequest.assignee) - && Objects.equals(this.version, signalAssigneeUpdateRequest.version); + return Objects.equals(this.assignee, signalAssigneeUpdateRequest.assignee) && Objects.equals(this.version, signalAssigneeUpdateRequest.version); } + @Override public int hashCode() { - return Objects.hash(assignee, version); + return Objects.hash(assignee,version); } @Override @@ -107,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SignalStateUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/SignalStateUpdateRequest.java index a5abd88e215..850da20cc06 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SignalStateUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SignalStateUpdateRequest.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes describing the change of state for a given state. */ +/** + *

Attributes describing the change of state for a given state.

+ */ @JsonPropertyOrder({ SignalStateUpdateRequest.JSON_PROPERTY_ARCHIVE_COMMENT, SignalStateUpdateRequest.JSON_PROPERTY_ARCHIVE_REASON, SignalStateUpdateRequest.JSON_PROPERTY_STATE, SignalStateUpdateRequest.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SignalStateUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ARCHIVE_COMMENT = "archiveComment"; private String archiveComment; @@ -40,32 +59,29 @@ public SignalStateUpdateRequest() {} @JsonCreator public SignalStateUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_STATE) SignalTriageState state) { - this.state = state; - this.unparsed |= !state.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_STATE)SignalTriageState state) { + this.state = state; + this.unparsed |= !state.isValid(); } - public SignalStateUpdateRequest archiveComment(String archiveComment) { this.archiveComment = archiveComment; return this; } /** - * Optional comment to explain why a signal is being archived. - * + *

Optional comment to explain why a signal is being archived.

* @return archiveComment - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getArchiveComment() { - return archiveComment; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getArchiveComment() { + return archiveComment; + } public void setArchiveComment(String archiveComment) { this.archiveComment = archiveComment; } - public SignalStateUpdateRequest archiveReason(SignalArchiveReason archiveReason) { this.archiveReason = archiveReason; this.unparsed |= !archiveReason.isValid(); @@ -73,24 +89,22 @@ public SignalStateUpdateRequest archiveReason(SignalArchiveReason archiveReason) } /** - * Reason why a signal has been archived. - * + *

Reason why a signal has been archived.

* @return archiveReason - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SignalArchiveReason getArchiveReason() { - return archiveReason; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SignalArchiveReason getArchiveReason() { + return archiveReason; + } public void setArchiveReason(SignalArchiveReason archiveReason) { if (!archiveReason.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.archiveReason = archiveReason; } - public SignalStateUpdateRequest state(SignalTriageState state) { this.state = state; this.unparsed |= !state.isValid(); @@ -98,45 +112,44 @@ public SignalStateUpdateRequest state(SignalTriageState state) { } /** - * The new triage state of the signal. - * + *

The new triage state of the signal.

* @return state - */ - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SignalTriageState getState() { - return state; - } - + **/ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SignalTriageState getState() { + return state; + } public void setState(SignalTriageState state) { if (!state.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.state = state; } - public SignalStateUpdateRequest version(Long version) { this.version = version; return this; } /** - * Version of the updated signal. If server side version is higher, update will be rejected. - * + *

Version of the updated signal. If server side version is higher, update will be rejected.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SignalStateUpdateRequest object is equal to o. */ + /** + * Return true if this SignalStateUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -146,15 +159,13 @@ public boolean equals(Object o) { return false; } SignalStateUpdateRequest signalStateUpdateRequest = (SignalStateUpdateRequest) o; - return Objects.equals(this.archiveComment, signalStateUpdateRequest.archiveComment) - && Objects.equals(this.archiveReason, signalStateUpdateRequest.archiveReason) - && Objects.equals(this.state, signalStateUpdateRequest.state) - && Objects.equals(this.version, signalStateUpdateRequest.version); + return Objects.equals(this.archiveComment, signalStateUpdateRequest.archiveComment) && Objects.equals(this.archiveReason, signalStateUpdateRequest.archiveReason) && Objects.equals(this.state, signalStateUpdateRequest.state) && Objects.equals(this.version, signalStateUpdateRequest.version); } + @Override public int hashCode() { - return Objects.hash(archiveComment, archiveReason, state, version); + return Objects.hash(archiveComment,archiveReason,state,version); } @Override @@ -170,7 +181,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SignalTriageState.java b/src/main/java/com/datadog/api/client/v1/model/SignalTriageState.java index 3df0d138ba7..b69b7963c19 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SignalTriageState.java +++ b/src/main/java/com/datadog/api/client/v1/model/SignalTriageState.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The new triage state of the signal. */ +/** + *

The new triage state of the signal.

+ */ @JsonSerialize(using = SignalTriageState.SignalTriageStateSerializer.class) public class SignalTriageState { @@ -27,8 +51,7 @@ public class SignalTriageState { public static final SignalTriageState ARCHIVED = new SignalTriageState("archived"); public static final SignalTriageState UNDER_REVIEW = new SignalTriageState("under_review"); - private static final Set allowedValues = - new HashSet(Arrays.asList("open", "archived", "under_review")); + private static final Set allowedValues = new HashSet(Arrays.asList("open", "archived", "under_review")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class SignalTriageStateSerializer extends StdSerializer { - public SignalTriageStateSerializer(Class t) { - super(t); - } - - public SignalTriageStateSerializer() { - this(null); - } - - @Override - public void serialize(SignalTriageState value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SignalTriageStateSerializer(Class t) { + super(t); + } + + public SignalTriageStateSerializer() { + this(null); + } + + @Override + public void serialize(SignalTriageState value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SignalTriageState object is equal to o. */ + /** + * Return true if this SignalTriageState object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannel.java b/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannel.java index 6370f7fac74..e6be1639126 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannel.java +++ b/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannel.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The Slack channel configuration. */ + +/** + *

The Slack channel configuration.

+ */ @JsonPropertyOrder({ SlackIntegrationChannel.JSON_PROPERTY_DISPLAY, SlackIntegrationChannel.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SlackIntegrationChannel { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DISPLAY = "display"; private SlackIntegrationChannelDisplay display; @@ -34,43 +54,42 @@ public SlackIntegrationChannel display(SlackIntegrationChannelDisplay display) { } /** - * Configuration options for what is shown in an alert event message. - * + *

Configuration options for what is shown in an alert event message.

* @return display - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SlackIntegrationChannelDisplay getDisplay() { - return display; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SlackIntegrationChannelDisplay getDisplay() { + return display; + } public void setDisplay(SlackIntegrationChannelDisplay display) { this.display = display; } - public SlackIntegrationChannel name(String name) { this.name = name; return this; } /** - * Your channel name. - * + *

Your channel name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SlackIntegrationChannel object is equal to o. */ + /** + * Return true if this SlackIntegrationChannel object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +99,13 @@ public boolean equals(Object o) { return false; } SlackIntegrationChannel slackIntegrationChannel = (SlackIntegrationChannel) o; - return Objects.equals(this.display, slackIntegrationChannel.display) - && Objects.equals(this.name, slackIntegrationChannel.name); + return Objects.equals(this.display, slackIntegrationChannel.display) && Objects.equals(this.name, slackIntegrationChannel.name); } + @Override public int hashCode() { - return Objects.hash(display, name); + return Objects.hash(display,name); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java b/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java index e7edfe49f56..7918e07f8f6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java +++ b/src/main/java/com/datadog/api/client/v1/model/SlackIntegrationChannelDisplay.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Configuration options for what is shown in an alert event message. */ + +/** + *

Configuration options for what is shown in an alert event message.

+ */ @JsonPropertyOrder({ SlackIntegrationChannelDisplay.JSON_PROPERTY_MESSAGE, SlackIntegrationChannelDisplay.JSON_PROPERTY_NOTIFIED, SlackIntegrationChannelDisplay.JSON_PROPERTY_SNAPSHOT, SlackIntegrationChannelDisplay.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SlackIntegrationChannelDisplay { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MESSAGE = "message"; private Boolean message = true; @@ -41,85 +61,80 @@ public SlackIntegrationChannelDisplay message(Boolean message) { } /** - * Show the main body of the alert event. - * + *

Show the main body of the alert event.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMessage() { + return message; + } public void setMessage(Boolean message) { this.message = message; } - public SlackIntegrationChannelDisplay notified(Boolean notified) { this.notified = notified; return this; } /** - * Show the list of @-handles in the alert event. - * + *

Show the list of @-handles in the alert event.

* @return notified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNotified() { - return notified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotified() { + return notified; + } public void setNotified(Boolean notified) { this.notified = notified; } - public SlackIntegrationChannelDisplay snapshot(Boolean snapshot) { this.snapshot = snapshot; return this; } /** - * Show the alert event's snapshot image. - * + *

Show the alert event's snapshot image.

* @return snapshot - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNAPSHOT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSnapshot() { - return snapshot; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNAPSHOT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSnapshot() { + return snapshot; + } public void setSnapshot(Boolean snapshot) { this.snapshot = snapshot; } - public SlackIntegrationChannelDisplay tags(Boolean tags) { this.tags = tags; return this; } /** - * Show the scopes on which the monitor alerted. - * + *

Show the scopes on which the monitor alerted.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTags() { + return tags; + } public void setTags(Boolean tags) { this.tags = tags; } - /** Return true if this SlackIntegrationChannelDisplay object is equal to o. */ + /** + * Return true if this SlackIntegrationChannelDisplay object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -128,17 +143,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SlackIntegrationChannelDisplay slackIntegrationChannelDisplay = - (SlackIntegrationChannelDisplay) o; - return Objects.equals(this.message, slackIntegrationChannelDisplay.message) - && Objects.equals(this.notified, slackIntegrationChannelDisplay.notified) - && Objects.equals(this.snapshot, slackIntegrationChannelDisplay.snapshot) - && Objects.equals(this.tags, slackIntegrationChannelDisplay.tags); + SlackIntegrationChannelDisplay slackIntegrationChannelDisplay = (SlackIntegrationChannelDisplay) o; + return Objects.equals(this.message, slackIntegrationChannelDisplay.message) && Objects.equals(this.notified, slackIntegrationChannelDisplay.notified) && Objects.equals(this.snapshot, slackIntegrationChannelDisplay.snapshot) && Objects.equals(this.tags, slackIntegrationChannelDisplay.tags); } + @Override public int hashCode() { - return Objects.hash(message, notified, snapshot, tags); + return Objects.hash(message,notified,snapshot,tags); } @Override @@ -154,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SuccessfulSignalUpdateResponse.java b/src/main/java/com/datadog/api/client/v1/model/SuccessfulSignalUpdateResponse.java index 7d973b63801..34215a67050 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SuccessfulSignalUpdateResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SuccessfulSignalUpdateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Updated signal data following a successfully performed update. */ -@JsonPropertyOrder({SuccessfulSignalUpdateResponse.JSON_PROPERTY_STATUS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Updated signal data following a successfully performed update.

+ */ +@JsonPropertyOrder({ + SuccessfulSignalUpdateResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SuccessfulSignalUpdateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_STATUS = "status"; private String status; @@ -27,22 +49,23 @@ public SuccessfulSignalUpdateResponse status(String status) { } /** - * Status of the response. - * + *

Status of the response.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - /** Return true if this SuccessfulSignalUpdateResponse object is equal to o. */ + /** + * Return true if this SuccessfulSignalUpdateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SuccessfulSignalUpdateResponse successfulSignalUpdateResponse = - (SuccessfulSignalUpdateResponse) o; + SuccessfulSignalUpdateResponse successfulSignalUpdateResponse = (SuccessfulSignalUpdateResponse) o; return Objects.equals(this.status, successfulSignalUpdateResponse.status); } + @Override public int hashCode() { return Objects.hash(status); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinition.java index f5aeb63931b..ce3cb632e74 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinition.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Sunbursts are spot on to highlight how groups contribute to the total of a query. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Sunbursts are spot on to highlight how groups contribute to the total of a query.

+ */ @JsonPropertyOrder({ SunburstWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, SunburstWidgetDefinition.JSON_PROPERTY_HIDE_TOTAL, @@ -27,10 +44,10 @@ SunburstWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, SunburstWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SunburstWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -62,15 +79,12 @@ public SunburstWidgetDefinition() {} @JsonCreator public SunburstWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SunburstWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SunburstWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public SunburstWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -78,7 +92,6 @@ public SunburstWidgetDefinition customLinks(List customLinks) } return this; } - public SunburstWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -89,42 +102,38 @@ public SunburstWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksI } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public SunburstWidgetDefinition hideTotal(Boolean hideTotal) { this.hideTotal = hideTotal; return this; } /** - * Show the total value in this widget. - * + *

Show the total value in this widget.

* @return hideTotal - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HIDE_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTotal() { - return hideTotal; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideTotal() { + return hideTotal; + } public void setHideTotal(Boolean hideTotal) { this.hideTotal = hideTotal; } - public SunburstWidgetDefinition legend(SunburstWidgetLegend legend) { this.legend = legend; this.unparsed |= legend.unparsed; @@ -132,21 +141,19 @@ public SunburstWidgetDefinition legend(SunburstWidgetLegend legend) { } /** - * Configuration of the legend. - * + *

Configuration of the legend.

* @return legend - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SunburstWidgetLegend getLegend() { - return legend; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SunburstWidgetLegend getLegend() { + return legend; + } public void setLegend(SunburstWidgetLegend legend) { this.legend = legend; } - public SunburstWidgetDefinition requests(List requests) { this.requests = requests; for (SunburstWidgetRequest item : requests) { @@ -154,7 +161,6 @@ public SunburstWidgetDefinition requests(List requests) { } return this; } - public SunburstWidgetDefinition addRequestsItem(SunburstWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -162,20 +168,18 @@ public SunburstWidgetDefinition addRequestsItem(SunburstWidgetRequest requestsIt } /** - * List of sunburst widget requests. - * + *

List of sunburst widget requests.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public SunburstWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -183,42 +187,38 @@ public SunburstWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public SunburstWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public SunburstWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -226,45 +226,41 @@ public SunburstWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public SunburstWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public SunburstWidgetDefinition type(SunburstWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -272,24 +268,25 @@ public SunburstWidgetDefinition type(SunburstWidgetDefinitionType type) { } /** - * Type of the Sunburst widget. - * + *

Type of the Sunburst widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SunburstWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SunburstWidgetDefinitionType getType() { + return type; + } public void setType(SunburstWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SunburstWidgetDefinition object is equal to o. */ + /** + * Return true if this SunburstWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -299,21 +296,13 @@ public boolean equals(Object o) { return false; } SunburstWidgetDefinition sunburstWidgetDefinition = (SunburstWidgetDefinition) o; - return Objects.equals(this.customLinks, sunburstWidgetDefinition.customLinks) - && Objects.equals(this.hideTotal, sunburstWidgetDefinition.hideTotal) - && Objects.equals(this.legend, sunburstWidgetDefinition.legend) - && Objects.equals(this.requests, sunburstWidgetDefinition.requests) - && Objects.equals(this.time, sunburstWidgetDefinition.time) - && Objects.equals(this.title, sunburstWidgetDefinition.title) - && Objects.equals(this.titleAlign, sunburstWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, sunburstWidgetDefinition.titleSize) - && Objects.equals(this.type, sunburstWidgetDefinition.type); + return Objects.equals(this.customLinks, sunburstWidgetDefinition.customLinks) && Objects.equals(this.hideTotal, sunburstWidgetDefinition.hideTotal) && Objects.equals(this.legend, sunburstWidgetDefinition.legend) && Objects.equals(this.requests, sunburstWidgetDefinition.requests) && Objects.equals(this.time, sunburstWidgetDefinition.time) && Objects.equals(this.title, sunburstWidgetDefinition.title) && Objects.equals(this.titleAlign, sunburstWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, sunburstWidgetDefinition.titleSize) && Objects.equals(this.type, sunburstWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - customLinks, hideTotal, legend, requests, time, title, titleAlign, titleSize, type); + return Objects.hash(customLinks,hideTotal,legend,requests,time,title,titleAlign,titleSize,type); } @Override @@ -334,7 +323,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinitionType.java index 3705f18fdfd..dc3cbcea3e0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Sunburst widget. */ +/** + *

Type of the Sunburst widget.

+ */ @JsonSerialize(using = SunburstWidgetDefinitionType.SunburstWidgetDefinitionTypeSerializer.class) public class SunburstWidgetDefinitionType { - public static final SunburstWidgetDefinitionType SUNBURST = - new SunburstWidgetDefinitionType("sunburst"); + public static final SunburstWidgetDefinitionType SUNBURST = new SunburstWidgetDefinitionType("sunburst"); private static final Set allowedValues = new HashSet(Arrays.asList("sunburst")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SunburstWidgetDefinitionTypeSerializer - extends StdSerializer { - public SunburstWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class SunburstWidgetDefinitionTypeSerializer extends StdSerializer { + public SunburstWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public SunburstWidgetDefinitionTypeSerializer() { - this(null); - } + public SunburstWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - SunburstWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SunburstWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SunburstWidgetDefinitionType object is equal to o. */ + /** + * Return true if this SunburstWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegend.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegend.java index 0c303b1242d..0f91dbb0a1d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegend.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegend.java @@ -6,283 +6,261 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = SunburstWidgetLegend.SunburstWidgetLegendDeserializer.class) @JsonSerialize(using = SunburstWidgetLegend.SunburstWidgetLegendSerializer.class) public class SunburstWidgetLegend extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(SunburstWidgetLegend.class.getName()); + private static final Logger log = Logger.getLogger(SunburstWidgetLegend.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class SunburstWidgetLegendSerializer extends StdSerializer { + public SunburstWidgetLegendSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public SunburstWidgetLegendSerializer() { + this(null); + } - public static class SunburstWidgetLegendSerializer extends StdSerializer { - public SunburstWidgetLegendSerializer(Class t) { - super(t); + @Override + public void serialize(SunburstWidgetLegend value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public SunburstWidgetLegendSerializer() { - this(null); + public static class SunburstWidgetLegendDeserializer extends StdDeserializer { + public SunburstWidgetLegendDeserializer() { + this(SunburstWidgetLegend.class); + } + + public SunburstWidgetLegendDeserializer(Class vc) { + super(vc); + } + + @Override + public SunburstWidgetLegend 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 SunburstWidgetLegendTable + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SunburstWidgetLegendTable.class.equals(Integer.class) || SunburstWidgetLegendTable.class.equals(Long.class) || SunburstWidgetLegendTable.class.equals(Float.class) || SunburstWidgetLegendTable.class.equals(Double.class) || SunburstWidgetLegendTable.class.equals(Boolean.class) || SunburstWidgetLegendTable.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SunburstWidgetLegendTable.class.equals(Integer.class) || SunburstWidgetLegendTable.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SunburstWidgetLegendTable.class.equals(Float.class) || SunburstWidgetLegendTable.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SunburstWidgetLegendTable.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SunburstWidgetLegendTable.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SunburstWidgetLegendTable.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 (!((SunburstWidgetLegendTable)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SunburstWidgetLegendTable'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SunburstWidgetLegendTable'", e); + } + + // deserialize SunburstWidgetLegendInlineAutomatic + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SunburstWidgetLegendInlineAutomatic.class.equals(Integer.class) || SunburstWidgetLegendInlineAutomatic.class.equals(Long.class) || SunburstWidgetLegendInlineAutomatic.class.equals(Float.class) || SunburstWidgetLegendInlineAutomatic.class.equals(Double.class) || SunburstWidgetLegendInlineAutomatic.class.equals(Boolean.class) || SunburstWidgetLegendInlineAutomatic.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SunburstWidgetLegendInlineAutomatic.class.equals(Integer.class) || SunburstWidgetLegendInlineAutomatic.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SunburstWidgetLegendInlineAutomatic.class.equals(Float.class) || SunburstWidgetLegendInlineAutomatic.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SunburstWidgetLegendInlineAutomatic.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SunburstWidgetLegendInlineAutomatic.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SunburstWidgetLegendInlineAutomatic.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 (!((SunburstWidgetLegendInlineAutomatic)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SunburstWidgetLegendInlineAutomatic'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SunburstWidgetLegendInlineAutomatic'", e); + } + + SunburstWidgetLegend ret = new SunburstWidgetLegend(); + 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 SunburstWidgetLegend getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SunburstWidgetLegend cannot be null"); + } } - @Override - public void serialize( - SunburstWidgetLegend value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SunburstWidgetLegend() { + super("oneOf", Boolean.FALSE); + } + public SunburstWidgetLegend(SunburstWidgetLegendTable o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SunburstWidgetLegend(SunburstWidgetLegendInlineAutomatic o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class SunburstWidgetLegendDeserializer - extends StdDeserializer { - public SunburstWidgetLegendDeserializer() { - this(SunburstWidgetLegend.class); + static { + schemas.put("SunburstWidgetLegendTable", new GenericType() { + }); + schemas.put("SunburstWidgetLegendInlineAutomatic", new GenericType() { + }); + JSON.registerDescendants(SunburstWidgetLegend.class, Collections.unmodifiableMap(schemas)); } - public SunburstWidgetLegendDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return SunburstWidgetLegend.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SunburstWidgetLegendTable, SunburstWidgetLegendInlineAutomatic + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public SunburstWidgetLegend 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 SunburstWidgetLegendTable - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SunburstWidgetLegendTable.class.equals(Integer.class) - || SunburstWidgetLegendTable.class.equals(Long.class) - || SunburstWidgetLegendTable.class.equals(Float.class) - || SunburstWidgetLegendTable.class.equals(Double.class) - || SunburstWidgetLegendTable.class.equals(Boolean.class) - || SunburstWidgetLegendTable.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SunburstWidgetLegendTable.class.equals(Integer.class) - || SunburstWidgetLegendTable.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SunburstWidgetLegendTable.class.equals(Float.class) - || SunburstWidgetLegendTable.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SunburstWidgetLegendTable.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SunburstWidgetLegendTable.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SunburstWidgetLegendTable.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SunburstWidgetLegendTable.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 (!((SunburstWidgetLegendTable) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SunburstWidgetLegendTable'"); + if (JSON.isInstanceOf(SunburstWidgetLegendInlineAutomatic.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SunburstWidgetLegendTable'", e); - } - // deserialize SunburstWidgetLegendInlineAutomatic - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SunburstWidgetLegendInlineAutomatic.class.equals(Integer.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(Long.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(Float.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(Double.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(Boolean.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SunburstWidgetLegendInlineAutomatic.class.equals(Integer.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SunburstWidgetLegendInlineAutomatic.class.equals(Float.class) - || SunburstWidgetLegendInlineAutomatic.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SunburstWidgetLegendInlineAutomatic.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SunburstWidgetLegendInlineAutomatic.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SunburstWidgetLegendInlineAutomatic.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 (!((SunburstWidgetLegendInlineAutomatic) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SunburstWidgetLegendInlineAutomatic'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SunburstWidgetLegendInlineAutomatic'", - e); - } - - SunburstWidgetLegend ret = new SunburstWidgetLegend(); - 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; + throw new RuntimeException("Invalid instance type. Must be SunburstWidgetLegendTable, SunburstWidgetLegendInlineAutomatic"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SunburstWidgetLegendTable, SunburstWidgetLegendInlineAutomatic + * + * @return The actual instance (SunburstWidgetLegendTable, SunburstWidgetLegendInlineAutomatic) + */ @Override - public SunburstWidgetLegend getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SunburstWidgetLegend cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public SunburstWidgetLegend() { - super("oneOf", Boolean.FALSE); - } - - public SunburstWidgetLegend(SunburstWidgetLegendTable o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public SunburstWidgetLegend(SunburstWidgetLegendInlineAutomatic o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("SunburstWidgetLegendTable", new GenericType() {}); - schemas.put( - "SunburstWidgetLegendInlineAutomatic", - new GenericType() {}); - JSON.registerDescendants(SunburstWidgetLegend.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SunburstWidgetLegend.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SunburstWidgetLegendTable, SunburstWidgetLegendInlineAutomatic - * - *

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(SunburstWidgetLegendTable.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SunburstWidgetLegendInlineAutomatic.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SunburstWidgetLegendTable`. If the actual instance is not `SunburstWidgetLegendTable`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SunburstWidgetLegendTable` + * @throws ClassCastException if the instance is not `SunburstWidgetLegendTable` + */ + public SunburstWidgetLegendTable getSunburstWidgetLegendTable() throws ClassCastException { + return (SunburstWidgetLegendTable)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SunburstWidgetLegendInlineAutomatic`. If the actual instance is not `SunburstWidgetLegendInlineAutomatic`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SunburstWidgetLegendInlineAutomatic` + * @throws ClassCastException if the instance is not `SunburstWidgetLegendInlineAutomatic` + */ + public SunburstWidgetLegendInlineAutomatic getSunburstWidgetLegendInlineAutomatic() throws ClassCastException { + return (SunburstWidgetLegendInlineAutomatic)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SunburstWidgetLegendTable," - + " SunburstWidgetLegendInlineAutomatic"); - } - - /** - * Get the actual instance, which can be the following: SunburstWidgetLegendTable, - * SunburstWidgetLegendInlineAutomatic - * - * @return The actual instance (SunburstWidgetLegendTable, SunburstWidgetLegendInlineAutomatic) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SunburstWidgetLegendTable`. If the actual instance is not - * `SunburstWidgetLegendTable`, the ClassCastException will be thrown. - * - * @return The actual instance of `SunburstWidgetLegendTable` - * @throws ClassCastException if the instance is not `SunburstWidgetLegendTable` - */ - public SunburstWidgetLegendTable getSunburstWidgetLegendTable() throws ClassCastException { - return (SunburstWidgetLegendTable) super.getActualInstance(); - } - - /** - * Get the actual instance of `SunburstWidgetLegendInlineAutomatic`. If the actual instance is not - * `SunburstWidgetLegendInlineAutomatic`, the ClassCastException will be thrown. - * - * @return The actual instance of `SunburstWidgetLegendInlineAutomatic` - * @throws ClassCastException if the instance is not `SunburstWidgetLegendInlineAutomatic` - */ - public SunburstWidgetLegendInlineAutomatic getSunburstWidgetLegendInlineAutomatic() - throws ClassCastException { - return (SunburstWidgetLegendInlineAutomatic) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomatic.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomatic.java index d3b6ec708f7..8665c129ba2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomatic.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomatic.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Configuration of inline or automatic legends. */ + +/** + *

Configuration of inline or automatic legends.

+ */ @JsonPropertyOrder({ SunburstWidgetLegendInlineAutomatic.JSON_PROPERTY_HIDE_PERCENT, SunburstWidgetLegendInlineAutomatic.JSON_PROPERTY_HIDE_VALUE, SunburstWidgetLegendInlineAutomatic.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SunburstWidgetLegendInlineAutomatic { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HIDE_PERCENT = "hide_percent"; private Boolean hidePercent; @@ -36,54 +55,48 @@ public SunburstWidgetLegendInlineAutomatic() {} @JsonCreator public SunburstWidgetLegendInlineAutomatic( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SunburstWidgetLegendInlineAutomaticType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SunburstWidgetLegendInlineAutomaticType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public SunburstWidgetLegendInlineAutomatic hidePercent(Boolean hidePercent) { this.hidePercent = hidePercent; return this; } /** - * Whether to hide the percentages of the groups. - * + *

Whether to hide the percentages of the groups.

* @return hidePercent - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HIDE_PERCENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHidePercent() { - return hidePercent; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_PERCENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHidePercent() { + return hidePercent; + } public void setHidePercent(Boolean hidePercent) { this.hidePercent = hidePercent; } - public SunburstWidgetLegendInlineAutomatic hideValue(Boolean hideValue) { this.hideValue = hideValue; return this; } /** - * Whether to hide the values of the groups. - * + *

Whether to hide the values of the groups.

* @return hideValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HIDE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideValue() { - return hideValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideValue() { + return hideValue; + } public void setHideValue(Boolean hideValue) { this.hideValue = hideValue; } - public SunburstWidgetLegendInlineAutomatic type(SunburstWidgetLegendInlineAutomaticType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -91,24 +104,25 @@ public SunburstWidgetLegendInlineAutomatic type(SunburstWidgetLegendInlineAutoma } /** - * Whether to show the legend inline or let it be automatically generated. - * + *

Whether to show the legend inline or let it be automatically generated.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SunburstWidgetLegendInlineAutomaticType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SunburstWidgetLegendInlineAutomaticType getType() { + return type; + } public void setType(SunburstWidgetLegendInlineAutomaticType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SunburstWidgetLegendInlineAutomatic object is equal to o. */ + /** + * Return true if this SunburstWidgetLegendInlineAutomatic object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,16 +131,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SunburstWidgetLegendInlineAutomatic sunburstWidgetLegendInlineAutomatic = - (SunburstWidgetLegendInlineAutomatic) o; - return Objects.equals(this.hidePercent, sunburstWidgetLegendInlineAutomatic.hidePercent) - && Objects.equals(this.hideValue, sunburstWidgetLegendInlineAutomatic.hideValue) - && Objects.equals(this.type, sunburstWidgetLegendInlineAutomatic.type); + SunburstWidgetLegendInlineAutomatic sunburstWidgetLegendInlineAutomatic = (SunburstWidgetLegendInlineAutomatic) o; + return Objects.equals(this.hidePercent, sunburstWidgetLegendInlineAutomatic.hidePercent) && Objects.equals(this.hideValue, sunburstWidgetLegendInlineAutomatic.hideValue) && Objects.equals(this.type, sunburstWidgetLegendInlineAutomatic.type); } + @Override public int hashCode() { - return Objects.hash(hidePercent, hideValue, type); + return Objects.hash(hidePercent,hideValue,type); } @Override @@ -141,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomaticType.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomaticType.java index 913b89ce78a..30151e7db51 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomaticType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendInlineAutomaticType.java @@ -6,33 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Whether to show the legend inline or let it be automatically generated. */ -@JsonSerialize( - using = - SunburstWidgetLegendInlineAutomaticType.SunburstWidgetLegendInlineAutomaticTypeSerializer - .class) +/** + *

Whether to show the legend inline or let it be automatically generated.

+ */ +@JsonSerialize(using = SunburstWidgetLegendInlineAutomaticType.SunburstWidgetLegendInlineAutomaticTypeSerializer.class) public class SunburstWidgetLegendInlineAutomaticType { - public static final SunburstWidgetLegendInlineAutomaticType INLINE = - new SunburstWidgetLegendInlineAutomaticType("inline"); - public static final SunburstWidgetLegendInlineAutomaticType AUTOMATIC = - new SunburstWidgetLegendInlineAutomaticType("automatic"); + public static final SunburstWidgetLegendInlineAutomaticType INLINE = new SunburstWidgetLegendInlineAutomaticType("inline"); + public static final SunburstWidgetLegendInlineAutomaticType AUTOMATIC = new SunburstWidgetLegendInlineAutomaticType("automatic"); - private static final Set allowedValues = - new HashSet(Arrays.asList("inline", "automatic")); + private static final Set allowedValues = new HashSet(Arrays.asList("inline", "automatic")); private String value; @@ -44,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SunburstWidgetLegendInlineAutomaticTypeSerializer - extends StdSerializer { - public SunburstWidgetLegendInlineAutomaticTypeSerializer( - Class t) { - super(t); - } + public static class SunburstWidgetLegendInlineAutomaticTypeSerializer extends StdSerializer { + public SunburstWidgetLegendInlineAutomaticTypeSerializer(Class t) { + super(t); + } - public SunburstWidgetLegendInlineAutomaticTypeSerializer() { - this(null); - } + public SunburstWidgetLegendInlineAutomaticTypeSerializer() { + this(null); + } - @Override - public void serialize( - SunburstWidgetLegendInlineAutomaticType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SunburstWidgetLegendInlineAutomaticType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SunburstWidgetLegendInlineAutomaticType object is equal to o. */ + /** + * Return true if this SunburstWidgetLegendInlineAutomaticType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTable.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTable.java index ed433c1e81d..302245e38d5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTable.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTable.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Configuration of table-based legend. */ -@JsonPropertyOrder({SunburstWidgetLegendTable.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Configuration of table-based legend.

+ */ +@JsonPropertyOrder({ + SunburstWidgetLegendTable.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SunburstWidgetLegendTable { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private SunburstWidgetLegendTableType type; @@ -26,12 +47,10 @@ public SunburstWidgetLegendTable() {} @JsonCreator public SunburstWidgetLegendTable( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SunburstWidgetLegendTableType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SunburstWidgetLegendTableType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public SunburstWidgetLegendTable type(SunburstWidgetLegendTableType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -39,24 +58,25 @@ public SunburstWidgetLegendTable type(SunburstWidgetLegendTableType type) { } /** - * Whether or not to show a table legend. - * + *

Whether or not to show a table legend.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SunburstWidgetLegendTableType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SunburstWidgetLegendTableType getType() { + return type; + } public void setType(SunburstWidgetLegendTableType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SunburstWidgetLegendTable object is equal to o. */ + /** + * Return true if this SunburstWidgetLegendTable object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.type, sunburstWidgetLegendTable.type); } + @Override public int hashCode() { return Objects.hash(type); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTableType.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTableType.java index f8ab24573a8..74a9c076f9b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTableType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetLegendTableType.java @@ -6,30 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Whether or not to show a table legend. */ +/** + *

Whether or not to show a table legend.

+ */ @JsonSerialize(using = SunburstWidgetLegendTableType.SunburstWidgetLegendTableTypeSerializer.class) public class SunburstWidgetLegendTableType { - public static final SunburstWidgetLegendTableType TABLE = - new SunburstWidgetLegendTableType("table"); - public static final SunburstWidgetLegendTableType NONE = - new SunburstWidgetLegendTableType("none"); + public static final SunburstWidgetLegendTableType TABLE = new SunburstWidgetLegendTableType("table"); + public static final SunburstWidgetLegendTableType NONE = new SunburstWidgetLegendTableType("none"); - private static final Set allowedValues = - new HashSet(Arrays.asList("table", "none")); + private static final Set allowedValues = new HashSet(Arrays.asList("table", "none")); private String value; @@ -41,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SunburstWidgetLegendTableTypeSerializer - extends StdSerializer { - public SunburstWidgetLegendTableTypeSerializer(Class t) { - super(t); - } + public static class SunburstWidgetLegendTableTypeSerializer extends StdSerializer { + public SunburstWidgetLegendTableTypeSerializer(Class t) { + super(t); + } - public SunburstWidgetLegendTableTypeSerializer() { - this(null); - } + public SunburstWidgetLegendTableTypeSerializer() { + this(null); + } - @Override - public void serialize( - SunburstWidgetLegendTableType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SunburstWidgetLegendTableType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SunburstWidgetLegendTableType object is equal to o. */ + /** + * Return true if this SunburstWidgetLegendTableType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java index 69ce8159525..1bf7ffee82b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Request definition of sunburst widget. */ +/** + *

Request definition of sunburst widget.

+ */ @JsonPropertyOrder({ SunburstWidgetRequest.JSON_PROPERTY_APM_QUERY, SunburstWidgetRequest.JSON_PROPERTY_AUDIT_QUERY, @@ -30,10 +48,10 @@ SunburstWidgetRequest.JSON_PROPERTY_RUM_QUERY, SunburstWidgetRequest.JSON_PROPERTY_SECURITY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SunburstWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -80,21 +98,19 @@ public SunburstWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public SunburstWidgetRequest auditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; this.unparsed |= auditQuery.unparsed; @@ -102,21 +118,19 @@ public SunburstWidgetRequest auditQuery(LogQueryDefinition auditQuery) { } /** - * The log query. - * + *

The log query.

* @return auditQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getAuditQuery() { - return auditQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getAuditQuery() { + return auditQuery; + } public void setAuditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; } - public SunburstWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -124,21 +138,19 @@ public SunburstWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public SunburstWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -146,7 +158,6 @@ public SunburstWidgetRequest formulas(List formulas) { } return this; } - public SunburstWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -157,21 +168,19 @@ public SunburstWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public SunburstWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -179,21 +188,19 @@ public SunburstWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public SunburstWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -201,21 +208,19 @@ public SunburstWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public SunburstWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -223,21 +228,19 @@ public SunburstWidgetRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public SunburstWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -245,42 +248,38 @@ public SunburstWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetri } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public SunburstWidgetRequest q(String q) { this.q = q; return this; } /** - * Widget query. - * + *

Widget query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public SunburstWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -288,7 +287,6 @@ public SunburstWidgetRequest queries(List que } return this; } - public SunburstWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -299,21 +297,19 @@ public SunburstWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition qu } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public SunburstWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -321,24 +317,22 @@ public SunburstWidgetRequest responseFormat(FormulaAndFunctionResponseFormat res } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public SunburstWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -346,21 +340,19 @@ public SunburstWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public SunburstWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -368,22 +360,23 @@ public SunburstWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - /** Return true if this SunburstWidgetRequest object is equal to o. */ + /** + * Return true if this SunburstWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -393,37 +386,13 @@ public boolean equals(Object o) { return false; } SunburstWidgetRequest sunburstWidgetRequest = (SunburstWidgetRequest) o; - return Objects.equals(this.apmQuery, sunburstWidgetRequest.apmQuery) - && Objects.equals(this.auditQuery, sunburstWidgetRequest.auditQuery) - && Objects.equals(this.eventQuery, sunburstWidgetRequest.eventQuery) - && Objects.equals(this.formulas, sunburstWidgetRequest.formulas) - && Objects.equals(this.logQuery, sunburstWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, sunburstWidgetRequest.networkQuery) - && Objects.equals(this.processQuery, sunburstWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, sunburstWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, sunburstWidgetRequest.q) - && Objects.equals(this.queries, sunburstWidgetRequest.queries) - && Objects.equals(this.responseFormat, sunburstWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, sunburstWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, sunburstWidgetRequest.securityQuery); + return Objects.equals(this.apmQuery, sunburstWidgetRequest.apmQuery) && Objects.equals(this.auditQuery, sunburstWidgetRequest.auditQuery) && Objects.equals(this.eventQuery, sunburstWidgetRequest.eventQuery) && Objects.equals(this.formulas, sunburstWidgetRequest.formulas) && Objects.equals(this.logQuery, sunburstWidgetRequest.logQuery) && Objects.equals(this.networkQuery, sunburstWidgetRequest.networkQuery) && Objects.equals(this.processQuery, sunburstWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, sunburstWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, sunburstWidgetRequest.q) && Objects.equals(this.queries, sunburstWidgetRequest.queries) && Objects.equals(this.responseFormat, sunburstWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, sunburstWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, sunburstWidgetRequest.securityQuery); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - auditQuery, - eventQuery, - formulas, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - queries, - responseFormat, - rumQuery, - securityQuery); + return Objects.hash(apmQuery,auditQuery,eventQuery,formulas,logQuery,networkQuery,processQuery,profileMetricsQuery,q,queries,responseFormat,rumQuery,securityQuery); } @Override @@ -437,9 +406,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); @@ -450,7 +417,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStep.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStep.java index 3f299506ca9..1bffffd5ad1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStep.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStep.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The steps used in a Synthetics multistep API test. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The steps used in a Synthetics multistep API test.

+ */ @JsonPropertyOrder({ SyntheticsAPIStep.JSON_PROPERTY_ALLOW_FAILURE, SyntheticsAPIStep.JSON_PROPERTY_ASSERTIONS, @@ -26,10 +43,10 @@ SyntheticsAPIStep.JSON_PROPERTY_RETRY, SyntheticsAPIStep.JSON_PROPERTY_SUBTYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPIStep { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALLOW_FAILURE = "allowFailure"; private Boolean allowFailure; @@ -58,41 +75,36 @@ public SyntheticsAPIStep() {} @JsonCreator public SyntheticsAPIStep( - @JsonProperty(required = true, value = JSON_PROPERTY_ASSERTIONS) - List assertions, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST) SyntheticsTestRequest request, - @JsonProperty(required = true, value = JSON_PROPERTY_SUBTYPE) - SyntheticsAPIStepSubtype subtype) { - this.assertions = assertions; - this.name = name; - this.request = request; - this.unparsed |= request.unparsed; - this.subtype = subtype; - this.unparsed |= !subtype.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ASSERTIONS)List assertions, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_REQUEST)SyntheticsTestRequest request, + @JsonProperty(required=true, value=JSON_PROPERTY_SUBTYPE)SyntheticsAPIStepSubtype subtype) { + this.assertions = assertions; + this.name = name; + this.request = request; + this.unparsed |= request.unparsed; + this.subtype = subtype; + this.unparsed |= !subtype.isValid(); } - public SyntheticsAPIStep allowFailure(Boolean allowFailure) { this.allowFailure = allowFailure; return this; } /** - * Determines whether or not to continue with test if this step fails. - * + *

Determines whether or not to continue with test if this step fails.

* @return allowFailure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALLOW_FAILURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowFailure() { - return allowFailure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_FAILURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowFailure() { + return allowFailure; + } public void setAllowFailure(Boolean allowFailure) { this.allowFailure = allowFailure; } - public SyntheticsAPIStep assertions(List assertions) { this.assertions = assertions; for (SyntheticsAssertion item : assertions) { @@ -100,7 +112,6 @@ public SyntheticsAPIStep assertions(List assertions) { } return this; } - public SyntheticsAPIStep addAssertionsItem(SyntheticsAssertion assertionsItem) { this.assertions.add(assertionsItem); this.unparsed |= assertionsItem.unparsed; @@ -108,20 +119,18 @@ public SyntheticsAPIStep addAssertionsItem(SyntheticsAssertion assertionsItem) { } /** - * Array of assertions used for the test. - * + *

Array of assertions used for the test.

* @return assertions - */ - @JsonProperty(JSON_PROPERTY_ASSERTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getAssertions() { - return assertions; - } - + **/ + @JsonProperty(JSON_PROPERTY_ASSERTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getAssertions() { + return assertions; + } public void setAssertions(List assertions) { this.assertions = assertions; } - public SyntheticsAPIStep extractedValues(List extractedValues) { this.extractedValues = extractedValues; for (SyntheticsParsingOptions item : extractedValues) { @@ -129,7 +138,6 @@ public SyntheticsAPIStep extractedValues(List extracte } return this; } - public SyntheticsAPIStep addExtractedValuesItem(SyntheticsParsingOptions extractedValuesItem) { if (this.extractedValues == null) { this.extractedValues = new ArrayList<>(); @@ -140,63 +148,57 @@ public SyntheticsAPIStep addExtractedValuesItem(SyntheticsParsingOptions extract } /** - * Array of values to parse and save as variables from the response. - * + *

Array of values to parse and save as variables from the response.

* @return extractedValues - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXTRACTED_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExtractedValues() { - return extractedValues; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTRACTED_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExtractedValues() { + return extractedValues; + } public void setExtractedValues(List extractedValues) { this.extractedValues = extractedValues; } - public SyntheticsAPIStep isCritical(Boolean isCritical) { this.isCritical = isCritical; return this; } /** - * Determines whether or not to consider the entire test as failed if this step fails. Can be used - * only if allowFailure is true. - * + *

Determines whether or not to consider the entire test as failed if this step fails. + * Can be used only if allowFailure is true.

* @return isCritical - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_CRITICAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsCritical() { - return isCritical; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_CRITICAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCritical() { + return isCritical; + } public void setIsCritical(Boolean isCritical) { this.isCritical = isCritical; } - public SyntheticsAPIStep name(String name) { this.name = name; return this; } /** - * The name of the step. - * + *

The name of the step.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsAPIStep request(SyntheticsTestRequest request) { this.request = request; this.unparsed |= request.unparsed; @@ -204,20 +206,18 @@ public SyntheticsAPIStep request(SyntheticsTestRequest request) { } /** - * Object describing the Synthetic test request. - * + *

Object describing the Synthetic test request.

* @return request - */ - @JsonProperty(JSON_PROPERTY_REQUEST) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsTestRequest getRequest() { - return request; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUEST) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsTestRequest getRequest() { + return request; + } public void setRequest(SyntheticsTestRequest request) { this.request = request; } - public SyntheticsAPIStep retry(SyntheticsTestOptionsRetry retry) { this.retry = retry; this.unparsed |= retry.unparsed; @@ -225,21 +225,19 @@ public SyntheticsAPIStep retry(SyntheticsTestOptionsRetry retry) { } /** - * Object describing the retry strategy to apply to a Synthetic test. - * + *

Object describing the retry strategy to apply to a Synthetic test.

* @return retry - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptionsRetry getRetry() { - return retry; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETRY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptionsRetry getRetry() { + return retry; + } public void setRetry(SyntheticsTestOptionsRetry retry) { this.retry = retry; } - public SyntheticsAPIStep subtype(SyntheticsAPIStepSubtype subtype) { this.subtype = subtype; this.unparsed |= !subtype.isValid(); @@ -247,25 +245,25 @@ public SyntheticsAPIStep subtype(SyntheticsAPIStepSubtype subtype) { } /** - * The subtype of the Synthetic multistep API test step, currently only supporting http - * . - * + *

The subtype of the Synthetic multistep API test step, currently only supporting http.

* @return subtype - */ - @JsonProperty(JSON_PROPERTY_SUBTYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAPIStepSubtype getSubtype() { - return subtype; - } - + **/ + @JsonProperty(JSON_PROPERTY_SUBTYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAPIStepSubtype getSubtype() { + return subtype; + } public void setSubtype(SyntheticsAPIStepSubtype subtype) { if (!subtype.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.subtype = subtype; } - /** Return true if this SyntheticsAPIStep object is equal to o. */ + /** + * Return true if this SyntheticsAPIStep object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -275,20 +273,13 @@ public boolean equals(Object o) { return false; } SyntheticsAPIStep syntheticsApiStep = (SyntheticsAPIStep) o; - return Objects.equals(this.allowFailure, syntheticsApiStep.allowFailure) - && Objects.equals(this.assertions, syntheticsApiStep.assertions) - && Objects.equals(this.extractedValues, syntheticsApiStep.extractedValues) - && Objects.equals(this.isCritical, syntheticsApiStep.isCritical) - && Objects.equals(this.name, syntheticsApiStep.name) - && Objects.equals(this.request, syntheticsApiStep.request) - && Objects.equals(this.retry, syntheticsApiStep.retry) - && Objects.equals(this.subtype, syntheticsApiStep.subtype); + return Objects.equals(this.allowFailure, syntheticsApiStep.allowFailure) && Objects.equals(this.assertions, syntheticsApiStep.assertions) && Objects.equals(this.extractedValues, syntheticsApiStep.extractedValues) && Objects.equals(this.isCritical, syntheticsApiStep.isCritical) && Objects.equals(this.name, syntheticsApiStep.name) && Objects.equals(this.request, syntheticsApiStep.request) && Objects.equals(this.retry, syntheticsApiStep.retry) && Objects.equals(this.subtype, syntheticsApiStep.subtype); } + @Override public int hashCode() { - return Objects.hash( - allowFailure, assertions, extractedValues, isCritical, name, request, retry, subtype); + return Objects.hash(allowFailure,assertions,extractedValues,isCritical,name,request,retry,subtype); } @Override @@ -308,7 +299,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStepSubtype.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStepSubtype.java index 1a063d3a9a7..ab0af1544bf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStepSubtype.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPIStepSubtype.java @@ -6,22 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The subtype of the Synthetic multistep API test step, currently only supporting http - * . + *

The subtype of the Synthetic multistep API test step, currently only supporting http.

*/ @JsonSerialize(using = SyntheticsAPIStepSubtype.SyntheticsAPIStepSubtypeSerializer.class) public class SyntheticsAPIStepSubtype { @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsAPIStepSubtypeSerializer - extends StdSerializer { - public SyntheticsAPIStepSubtypeSerializer(Class t) { - super(t); - } + public static class SyntheticsAPIStepSubtypeSerializer extends StdSerializer { + public SyntheticsAPIStepSubtypeSerializer(Class t) { + super(t); + } - public SyntheticsAPIStepSubtypeSerializer() { - this(null); - } + public SyntheticsAPIStepSubtypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsAPIStepSubtype value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsAPIStepSubtype value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsAPIStepSubtype object is equal to o. */ + /** + * Return true if this SyntheticsAPIStepSubtype object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITest.java index 9e2cfcaecb7..f6353aac58a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITest.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing details about a Synthetic API test. */ + +/** + *

Object containing details about a Synthetic API test.

+ */ @JsonPropertyOrder({ SyntheticsAPITest.JSON_PROPERTY_CONFIG, SyntheticsAPITest.JSON_PROPERTY_LOCATIONS, @@ -29,10 +46,10 @@ SyntheticsAPITest.JSON_PROPERTY_TAGS, SyntheticsAPITest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIG = "config"; private SyntheticsAPITestConfig config; @@ -70,23 +87,22 @@ public SyntheticsAPITest() {} @JsonCreator public SyntheticsAPITest( - @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG) SyntheticsAPITestConfig config, - @JsonProperty(required = true, value = JSON_PROPERTY_LOCATIONS) List locations, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) SyntheticsTestOptions options, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsAPITestType type) { - this.config = config; - this.unparsed |= config.unparsed; - this.locations = locations; - this.message = message; - this.name = name; - this.options = options; - this.unparsed |= options.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CONFIG)SyntheticsAPITestConfig config, + @JsonProperty(required=true, value=JSON_PROPERTY_LOCATIONS)List locations, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPTIONS)SyntheticsTestOptions options, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsAPITestType type) { + this.config = config; + this.unparsed |= config.unparsed; + this.locations = locations; + this.message = message; + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsAPITest config(SyntheticsAPITestConfig config) { this.config = config; this.unparsed |= config.unparsed; @@ -94,97 +110,88 @@ public SyntheticsAPITest config(SyntheticsAPITestConfig config) { } /** - * Configuration object for a Synthetic API test. - * + *

Configuration object for a Synthetic API test.

* @return config - */ - @JsonProperty(JSON_PROPERTY_CONFIG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAPITestConfig getConfig() { - return config; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAPITestConfig getConfig() { + return config; + } public void setConfig(SyntheticsAPITestConfig config) { this.config = config; } - public SyntheticsAPITest locations(List locations) { this.locations = locations; return this; } - public SyntheticsAPITest addLocationsItem(String locationsItem) { this.locations.add(locationsItem); return this; } /** - * Array of locations used to run the test. - * + *

Array of locations used to run the test.

* @return locations - */ - @JsonProperty(JSON_PROPERTY_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getLocations() { - return locations; - } - + **/ + @JsonProperty(JSON_PROPERTY_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getLocations() { + return locations; + } public void setLocations(List locations) { this.locations = locations; } - public SyntheticsAPITest message(String message) { this.message = message; return this; } /** - * Notification message associated with the test. - * + *

Notification message associated with the test.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } /** - * The associated monitor ID. - * + *

The associated monitor ID.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonitorId() { - return monitorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorId() { + return monitorId; + } public SyntheticsAPITest name(String name) { this.name = name; return this; } /** - * Name of the test. - * + *

Name of the test.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsAPITest options(SyntheticsTestOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -192,32 +199,30 @@ public SyntheticsAPITest options(SyntheticsTestOptions options) { } /** - * Object describing the extra options for a Synthetic test. - * + *

Object describing the extra options for a Synthetic test.

* @return options - */ - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsTestOptions getOptions() { - return options; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsTestOptions getOptions() { + return options; + } public void setOptions(SyntheticsTestOptions options) { this.options = options; } /** - * The public ID for the test. - * + *

The public ID for the test.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public SyntheticsAPITest status(SyntheticsTestPauseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -225,25 +230,23 @@ public SyntheticsAPITest status(SyntheticsTestPauseStatus status) { } /** - * Define whether you want to start (live) or pause (paused) a Synthetic - * test. - * + *

Define whether you want to start (live) or pause (paused) a + * Synthetic test.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestPauseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestPauseStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestPauseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public SyntheticsAPITest subtype(SyntheticsTestDetailsSubType subtype) { this.subtype = subtype; this.unparsed |= !subtype.isValid(); @@ -251,31 +254,27 @@ public SyntheticsAPITest subtype(SyntheticsTestDetailsSubType subtype) { } /** - * The subtype of the Synthetic API test, http, ssl, tcp, - * dns, icmp, udp, websocket, grpc - * or multi. - * + *

The subtype of the Synthetic API test, http, ssl, tcp, + * dns, icmp, udp, websocket, grpc or multi.

* @return subtype - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUBTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestDetailsSubType getSubtype() { - return subtype; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBTYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestDetailsSubType getSubtype() { + return subtype; + } public void setSubtype(SyntheticsTestDetailsSubType subtype) { if (!subtype.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.subtype = subtype; } - public SyntheticsAPITest tags(List tags) { this.tags = tags; return this; } - public SyntheticsAPITest addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -285,21 +284,19 @@ public SyntheticsAPITest addTagsItem(String tagsItem) { } /** - * Array of tags attached to the test. - * + *

Array of tags attached to the test.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SyntheticsAPITest type(SyntheticsAPITestType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -307,24 +304,25 @@ public SyntheticsAPITest type(SyntheticsAPITestType type) { } /** - * Type of the Synthetic test, api. - * + *

Type of the Synthetic test, api.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAPITestType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAPITestType getType() { + return type; + } public void setType(SyntheticsAPITestType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsAPITest object is equal to o. */ + /** + * Return true if this SyntheticsAPITest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -334,24 +332,13 @@ public boolean equals(Object o) { return false; } SyntheticsAPITest syntheticsApiTest = (SyntheticsAPITest) o; - return Objects.equals(this.config, syntheticsApiTest.config) - && Objects.equals(this.locations, syntheticsApiTest.locations) - && Objects.equals(this.message, syntheticsApiTest.message) - && Objects.equals(this.monitorId, syntheticsApiTest.monitorId) - && Objects.equals(this.name, syntheticsApiTest.name) - && Objects.equals(this.options, syntheticsApiTest.options) - && Objects.equals(this.publicId, syntheticsApiTest.publicId) - && Objects.equals(this.status, syntheticsApiTest.status) - && Objects.equals(this.subtype, syntheticsApiTest.subtype) - && Objects.equals(this.tags, syntheticsApiTest.tags) - && Objects.equals(this.type, syntheticsApiTest.type); + return Objects.equals(this.config, syntheticsApiTest.config) && Objects.equals(this.locations, syntheticsApiTest.locations) && Objects.equals(this.message, syntheticsApiTest.message) && Objects.equals(this.monitorId, syntheticsApiTest.monitorId) && Objects.equals(this.name, syntheticsApiTest.name) && Objects.equals(this.options, syntheticsApiTest.options) && Objects.equals(this.publicId, syntheticsApiTest.publicId) && Objects.equals(this.status, syntheticsApiTest.status) && Objects.equals(this.subtype, syntheticsApiTest.subtype) && Objects.equals(this.tags, syntheticsApiTest.tags) && Objects.equals(this.type, syntheticsApiTest.type); } + @Override public int hashCode() { - return Objects.hash( - config, locations, message, monitorId, name, options, publicId, status, subtype, tags, - type); + return Objects.hash(config,locations,message,monitorId,name,options,publicId,status,subtype,tags,type); } @Override @@ -374,7 +361,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestConfig.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestConfig.java index 421a012089e..6ae8e0a5e67 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestConfig.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestConfig.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Configuration object for a Synthetic API test. */ + +/** + *

Configuration object for a Synthetic API test.

+ */ @JsonPropertyOrder({ SyntheticsAPITestConfig.JSON_PROPERTY_ASSERTIONS, SyntheticsAPITestConfig.JSON_PROPERTY_CONFIG_VARIABLES, SyntheticsAPITestConfig.JSON_PROPERTY_REQUEST, SyntheticsAPITestConfig.JSON_PROPERTY_STEPS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITestConfig { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ASSERTIONS = "assertions"; private List assertions = null; @@ -44,7 +62,6 @@ public SyntheticsAPITestConfig assertions(List assertions) } return this; } - public SyntheticsAPITestConfig addAssertionsItem(SyntheticsAssertion assertionsItem) { if (this.assertions == null) { this.assertions = new ArrayList<>(); @@ -55,21 +72,19 @@ public SyntheticsAPITestConfig addAssertionsItem(SyntheticsAssertion assertionsI } /** - * Array of assertions used for the test. Required for single API tests. - * + *

Array of assertions used for the test. Required for single API tests.

* @return assertions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ASSERTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAssertions() { - return assertions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSERTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAssertions() { + return assertions; + } public void setAssertions(List assertions) { this.assertions = assertions; } - public SyntheticsAPITestConfig configVariables(List configVariables) { this.configVariables = configVariables; for (SyntheticsConfigVariable item : configVariables) { @@ -77,9 +92,7 @@ public SyntheticsAPITestConfig configVariables(List co } return this; } - - public SyntheticsAPITestConfig addConfigVariablesItem( - SyntheticsConfigVariable configVariablesItem) { + public SyntheticsAPITestConfig addConfigVariablesItem(SyntheticsConfigVariable configVariablesItem) { if (this.configVariables == null) { this.configVariables = new ArrayList<>(); } @@ -89,21 +102,19 @@ public SyntheticsAPITestConfig addConfigVariablesItem( } /** - * Array of variables used for the test. - * + *

Array of variables used for the test.

* @return configVariables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIG_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConfigVariables() { - return configVariables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConfigVariables() { + return configVariables; + } public void setConfigVariables(List configVariables) { this.configVariables = configVariables; } - public SyntheticsAPITestConfig request(SyntheticsTestRequest request) { this.request = request; this.unparsed |= request.unparsed; @@ -111,21 +122,19 @@ public SyntheticsAPITestConfig request(SyntheticsTestRequest request) { } /** - * Object describing the Synthetic test request. - * + *

Object describing the Synthetic test request.

* @return request - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequest getRequest() { - return request; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequest getRequest() { + return request; + } public void setRequest(SyntheticsTestRequest request) { this.request = request; } - public SyntheticsAPITestConfig steps(List steps) { this.steps = steps; for (SyntheticsAPIStep item : steps) { @@ -133,7 +142,6 @@ public SyntheticsAPITestConfig steps(List steps) { } return this; } - public SyntheticsAPITestConfig addStepsItem(SyntheticsAPIStep stepsItem) { if (this.steps == null) { this.steps = new ArrayList<>(); @@ -144,22 +152,23 @@ public SyntheticsAPITestConfig addStepsItem(SyntheticsAPIStep stepsItem) { } /** - * When the test subtype is multi, the steps of the test. - * + *

When the test subtype is multi, the steps of the test.

* @return steps - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSteps() { - return steps; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSteps() { + return steps; + } public void setSteps(List steps) { this.steps = steps; } - /** Return true if this SyntheticsAPITestConfig object is equal to o. */ + /** + * Return true if this SyntheticsAPITestConfig object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -169,15 +178,13 @@ public boolean equals(Object o) { return false; } SyntheticsAPITestConfig syntheticsApiTestConfig = (SyntheticsAPITestConfig) o; - return Objects.equals(this.assertions, syntheticsApiTestConfig.assertions) - && Objects.equals(this.configVariables, syntheticsApiTestConfig.configVariables) - && Objects.equals(this.request, syntheticsApiTestConfig.request) - && Objects.equals(this.steps, syntheticsApiTestConfig.steps); + return Objects.equals(this.assertions, syntheticsApiTestConfig.assertions) && Objects.equals(this.configVariables, syntheticsApiTestConfig.configVariables) && Objects.equals(this.request, syntheticsApiTestConfig.request) && Objects.equals(this.steps, syntheticsApiTestConfig.steps); } + @Override public int hashCode() { - return Objects.hash(assertions, configVariables, request, steps); + return Objects.hash(assertions,configVariables,request,steps); } @Override @@ -193,7 +200,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultData.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultData.java index fac3a59d486..1e681000796 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultData.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing results for your Synthetic API test. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing results for your Synthetic API test.

+ */ @JsonPropertyOrder({ SyntheticsAPITestResultData.JSON_PROPERTY_CERT, SyntheticsAPITestResultData.JSON_PROPERTY_EVENT_TYPE, @@ -26,10 +44,10 @@ SyntheticsAPITestResultData.JSON_PROPERTY_RESPONSE_SIZE, SyntheticsAPITestResultData.JSON_PROPERTY_TIMINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITestResultData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CERT = "cert"; private SyntheticsSSLCertificate cert; @@ -64,21 +82,19 @@ public SyntheticsAPITestResultData cert(SyntheticsSSLCertificate cert) { } /** - * Object describing the SSL certificate used for a Synthetic test. - * + *

Object describing the SSL certificate used for a Synthetic test.

* @return cert - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CERT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsSSLCertificate getCert() { - return cert; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSSLCertificate getCert() { + return cert; + } public void setCert(SyntheticsSSLCertificate cert) { this.cert = cert; } - public SyntheticsAPITestResultData eventType(SyntheticsTestProcessStatus eventType) { this.eventType = eventType; this.unparsed |= !eventType.isValid(); @@ -86,24 +102,22 @@ public SyntheticsAPITestResultData eventType(SyntheticsTestProcessStatus eventTy } /** - * Status of a Synthetic test. - * + *

Status of a Synthetic test.

* @return eventType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestProcessStatus getEventType() { - return eventType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestProcessStatus getEventType() { + return eventType; + } public void setEventType(SyntheticsTestProcessStatus eventType) { if (!eventType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.eventType = eventType; } - public SyntheticsAPITestResultData failure(SyntheticsApiTestResultFailure failure) { this.failure = failure; this.unparsed |= failure.unparsed; @@ -111,47 +125,42 @@ public SyntheticsAPITestResultData failure(SyntheticsApiTestResultFailure failur } /** - * The API test failure details. - * + *

The API test failure details.

* @return failure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FAILURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsApiTestResultFailure getFailure() { - return failure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsApiTestResultFailure getFailure() { + return failure; + } public void setFailure(SyntheticsApiTestResultFailure failure) { this.failure = failure; } - public SyntheticsAPITestResultData httpStatusCode(Long httpStatusCode) { this.httpStatusCode = httpStatusCode; return this; } /** - * The API test HTTP status code. - * + *

The API test HTTP status code.

* @return httpStatusCode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HTTP_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHttpStatusCode() { - return httpStatusCode; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HTTP_STATUS_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHttpStatusCode() { + return httpStatusCode; + } public void setHttpStatusCode(Long httpStatusCode) { this.httpStatusCode = httpStatusCode; } - public SyntheticsAPITestResultData requestHeaders(Map requestHeaders) { this.requestHeaders = requestHeaders; return this; } - public SyntheticsAPITestResultData putRequestHeadersItem(String key, Object requestHeadersItem) { if (this.requestHeaders == null) { this.requestHeaders = new HashMap<>(); @@ -161,49 +170,43 @@ public SyntheticsAPITestResultData putRequestHeadersItem(String key, Object requ } /** - * Request header object used for the API test. - * + *

Request header object used for the API test.

* @return requestHeaders - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getRequestHeaders() { - return requestHeaders; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_HEADERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getRequestHeaders() { + return requestHeaders; + } public void setRequestHeaders(Map requestHeaders) { this.requestHeaders = requestHeaders; } - public SyntheticsAPITestResultData responseBody(String responseBody) { this.responseBody = responseBody; return this; } /** - * Response body returned for the API test. - * + *

Response body returned for the API test.

* @return responseBody - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_BODY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResponseBody() { - return responseBody; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_BODY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResponseBody() { + return responseBody; + } public void setResponseBody(String responseBody) { this.responseBody = responseBody; } - public SyntheticsAPITestResultData responseHeaders(Map responseHeaders) { this.responseHeaders = responseHeaders; return this; } - - public SyntheticsAPITestResultData putResponseHeadersItem( - String key, Object responseHeadersItem) { + public SyntheticsAPITestResultData putResponseHeadersItem(String key, Object responseHeadersItem) { if (this.responseHeaders == null) { this.responseHeaders = new HashMap<>(); } @@ -212,42 +215,38 @@ public SyntheticsAPITestResultData putResponseHeadersItem( } /** - * Response headers returned for the API test. - * + *

Response headers returned for the API test.

* @return responseHeaders - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getResponseHeaders() { - return responseHeaders; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_HEADERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getResponseHeaders() { + return responseHeaders; + } public void setResponseHeaders(Map responseHeaders) { this.responseHeaders = responseHeaders; } - public SyntheticsAPITestResultData responseSize(Long responseSize) { this.responseSize = responseSize; return this; } /** - * Global size in byte of the API test response. - * + *

Global size in byte of the API test response.

* @return responseSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getResponseSize() { - return responseSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getResponseSize() { + return responseSize; + } public void setResponseSize(Long responseSize) { this.responseSize = responseSize; } - public SyntheticsAPITestResultData timings(SyntheticsTiming timings) { this.timings = timings; this.unparsed |= timings.unparsed; @@ -255,24 +254,24 @@ public SyntheticsAPITestResultData timings(SyntheticsTiming timings) { } /** - * Object containing all metrics and their values collected for a Synthetic API test. Learn more - * about those metrics in Synthetics - * documentation. - * + *

Object containing all metrics and their values collected for a Synthetic API test. + * Learn more about those metrics in Synthetics documentation.

* @return timings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTiming getTimings() { - return timings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTiming getTimings() { + return timings; + } public void setTimings(SyntheticsTiming timings) { this.timings = timings; } - /** Return true if this SyntheticsAPITestResultData object is equal to o. */ + /** + * Return true if this SyntheticsAPITestResultData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -282,29 +281,13 @@ public boolean equals(Object o) { return false; } SyntheticsAPITestResultData syntheticsApiTestResultData = (SyntheticsAPITestResultData) o; - return Objects.equals(this.cert, syntheticsApiTestResultData.cert) - && Objects.equals(this.eventType, syntheticsApiTestResultData.eventType) - && Objects.equals(this.failure, syntheticsApiTestResultData.failure) - && Objects.equals(this.httpStatusCode, syntheticsApiTestResultData.httpStatusCode) - && Objects.equals(this.requestHeaders, syntheticsApiTestResultData.requestHeaders) - && Objects.equals(this.responseBody, syntheticsApiTestResultData.responseBody) - && Objects.equals(this.responseHeaders, syntheticsApiTestResultData.responseHeaders) - && Objects.equals(this.responseSize, syntheticsApiTestResultData.responseSize) - && Objects.equals(this.timings, syntheticsApiTestResultData.timings); + return Objects.equals(this.cert, syntheticsApiTestResultData.cert) && Objects.equals(this.eventType, syntheticsApiTestResultData.eventType) && Objects.equals(this.failure, syntheticsApiTestResultData.failure) && Objects.equals(this.httpStatusCode, syntheticsApiTestResultData.httpStatusCode) && Objects.equals(this.requestHeaders, syntheticsApiTestResultData.requestHeaders) && Objects.equals(this.responseBody, syntheticsApiTestResultData.responseBody) && Objects.equals(this.responseHeaders, syntheticsApiTestResultData.responseHeaders) && Objects.equals(this.responseSize, syntheticsApiTestResultData.responseSize) && Objects.equals(this.timings, syntheticsApiTestResultData.timings); } + @Override public int hashCode() { - return Objects.hash( - cert, - eventType, - failure, - httpStatusCode, - requestHeaders, - responseBody, - responseHeaders, - responseSize, - timings); + return Objects.hash(cert,eventType,failure,httpStatusCode,requestHeaders,responseBody,responseHeaders,responseSize,timings); } @Override @@ -325,7 +308,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFull.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFull.java index e6f24d216aa..8d6bec3c539 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFull.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFull.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object returned describing a API test result. */ + +/** + *

Object returned describing a API test result.

+ */ @JsonPropertyOrder({ SyntheticsAPITestResultFull.JSON_PROPERTY_CHECK, SyntheticsAPITestResultFull.JSON_PROPERTY_CHECK_TIME, @@ -22,10 +42,10 @@ SyntheticsAPITestResultFull.JSON_PROPERTY_RESULT_ID, SyntheticsAPITestResultFull.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITestResultFull { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK = "check"; private SyntheticsAPITestResultFullCheck check; @@ -54,84 +74,76 @@ public SyntheticsAPITestResultFull check(SyntheticsAPITestResultFullCheck check) } /** - * Object describing the API test configuration. - * + *

Object describing the API test configuration.

* @return check - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsAPITestResultFullCheck getCheck() { - return check; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsAPITestResultFullCheck getCheck() { + return check; + } public void setCheck(SyntheticsAPITestResultFullCheck check) { this.check = check; } - public SyntheticsAPITestResultFull checkTime(Double checkTime) { this.checkTime = checkTime; return this; } /** - * When the API test was conducted. - * + *

When the API test was conducted.

* @return checkTime - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCheckTime() { - return checkTime; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCheckTime() { + return checkTime; + } public void setCheckTime(Double checkTime) { this.checkTime = checkTime; } - public SyntheticsAPITestResultFull checkVersion(Long checkVersion) { this.checkVersion = checkVersion; return this; } /** - * Version of the API test used. - * + *

Version of the API test used.

* @return checkVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCheckVersion() { - return checkVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCheckVersion() { + return checkVersion; + } public void setCheckVersion(Long checkVersion) { this.checkVersion = checkVersion; } - public SyntheticsAPITestResultFull probeDc(String probeDc) { this.probeDc = probeDc; return this; } /** - * Locations for which to query the API test results. - * + *

Locations for which to query the API test results.

* @return probeDc - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROBE_DC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProbeDc() { - return probeDc; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROBE_DC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProbeDc() { + return probeDc; + } public void setProbeDc(String probeDc) { this.probeDc = probeDc; } - public SyntheticsAPITestResultFull result(SyntheticsAPITestResultData result) { this.result = result; this.unparsed |= result.unparsed; @@ -139,42 +151,38 @@ public SyntheticsAPITestResultFull result(SyntheticsAPITestResultData result) { } /** - * Object containing results for your Synthetic API test. - * + *

Object containing results for your Synthetic API test.

* @return result - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsAPITestResultData getResult() { - return result; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsAPITestResultData getResult() { + return result; + } public void setResult(SyntheticsAPITestResultData result) { this.result = result; } - public SyntheticsAPITestResultFull resultId(String resultId) { this.resultId = resultId; return this; } /** - * ID of the API test result. - * + *

ID of the API test result.

* @return resultId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResultId() { - return resultId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } public void setResultId(String resultId) { this.resultId = resultId; } - public SyntheticsAPITestResultFull status(SyntheticsTestMonitorStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -182,26 +190,29 @@ public SyntheticsAPITestResultFull status(SyntheticsTestMonitorStatus status) { } /** - * The status of your Synthetic monitor. * O for not triggered * 1 for - * triggered * 2 for no data - * + *

The status of your Synthetic monitor. + * * O for not triggered + * * 1 for triggered + * * 2 for no data

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestMonitorStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestMonitorStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestMonitorStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SyntheticsAPITestResultFull object is equal to o. */ + /** + * Return true if this SyntheticsAPITestResultFull object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -211,18 +222,13 @@ public boolean equals(Object o) { return false; } SyntheticsAPITestResultFull syntheticsApiTestResultFull = (SyntheticsAPITestResultFull) o; - return Objects.equals(this.check, syntheticsApiTestResultFull.check) - && Objects.equals(this.checkTime, syntheticsApiTestResultFull.checkTime) - && Objects.equals(this.checkVersion, syntheticsApiTestResultFull.checkVersion) - && Objects.equals(this.probeDc, syntheticsApiTestResultFull.probeDc) - && Objects.equals(this.result, syntheticsApiTestResultFull.result) - && Objects.equals(this.resultId, syntheticsApiTestResultFull.resultId) - && Objects.equals(this.status, syntheticsApiTestResultFull.status); + return Objects.equals(this.check, syntheticsApiTestResultFull.check) && Objects.equals(this.checkTime, syntheticsApiTestResultFull.checkTime) && Objects.equals(this.checkVersion, syntheticsApiTestResultFull.checkVersion) && Objects.equals(this.probeDc, syntheticsApiTestResultFull.probeDc) && Objects.equals(this.result, syntheticsApiTestResultFull.result) && Objects.equals(this.resultId, syntheticsApiTestResultFull.resultId) && Objects.equals(this.status, syntheticsApiTestResultFull.status); } + @Override public int hashCode() { - return Objects.hash(check, checkTime, checkVersion, probeDc, result, resultId, status); + return Objects.hash(check,checkTime,checkVersion,probeDc,result,resultId,status); } @Override @@ -241,7 +247,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFullCheck.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFullCheck.java index d581dd881a2..3298da206da 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFullCheck.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultFullCheck.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the API test configuration. */ -@JsonPropertyOrder({SyntheticsAPITestResultFullCheck.JSON_PROPERTY_CONFIG}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object describing the API test configuration.

+ */ +@JsonPropertyOrder({ + SyntheticsAPITestResultFullCheck.JSON_PROPERTY_CONFIG +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITestResultFullCheck { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIG = "config"; private SyntheticsTestConfig config; @@ -26,11 +47,10 @@ public SyntheticsAPITestResultFullCheck() {} @JsonCreator public SyntheticsAPITestResultFullCheck( - @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG) SyntheticsTestConfig config) { - this.config = config; - this.unparsed |= config.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CONFIG)SyntheticsTestConfig config) { + this.config = config; + this.unparsed |= config.unparsed; } - public SyntheticsAPITestResultFullCheck config(SyntheticsTestConfig config) { this.config = config; this.unparsed |= config.unparsed; @@ -38,21 +58,22 @@ public SyntheticsAPITestResultFullCheck config(SyntheticsTestConfig config) { } /** - * Configuration object for a Synthetic test. - * + *

Configuration object for a Synthetic test.

* @return config - */ - @JsonProperty(JSON_PROPERTY_CONFIG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsTestConfig getConfig() { - return config; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsTestConfig getConfig() { + return config; + } public void setConfig(SyntheticsTestConfig config) { this.config = config; } - /** Return true if this SyntheticsAPITestResultFullCheck object is equal to o. */ + /** + * Return true if this SyntheticsAPITestResultFullCheck object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsAPITestResultFullCheck syntheticsApiTestResultFullCheck = - (SyntheticsAPITestResultFullCheck) o; + SyntheticsAPITestResultFullCheck syntheticsApiTestResultFullCheck = (SyntheticsAPITestResultFullCheck) o; return Objects.equals(this.config, syntheticsApiTestResultFullCheck.config); } + @Override public int hashCode() { return Objects.hash(config); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShort.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShort.java index 8d9d6138b2f..9f6db3d3205 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShort.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShort.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object with the results of a single Synthetic API test. */ +/** + *

Object with the results of a single Synthetic API test.

+ */ @JsonPropertyOrder({ SyntheticsAPITestResultShort.JSON_PROPERTY_CHECK_TIME, SyntheticsAPITestResultShort.JSON_PROPERTY_PROBE_DC, @@ -20,10 +40,10 @@ SyntheticsAPITestResultShort.JSON_PROPERTY_RESULT_ID, SyntheticsAPITestResultShort.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITestResultShort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK_TIME = "check_time"; private Double checkTime; @@ -45,42 +65,38 @@ public SyntheticsAPITestResultShort checkTime(Double checkTime) { } /** - * Last time the API test was performed. - * + *

Last time the API test was performed.

* @return checkTime - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCheckTime() { - return checkTime; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCheckTime() { + return checkTime; + } public void setCheckTime(Double checkTime) { this.checkTime = checkTime; } - public SyntheticsAPITestResultShort probeDc(String probeDc) { this.probeDc = probeDc; return this; } /** - * Location from which the API test was performed. - * + *

Location from which the API test was performed.

* @return probeDc - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROBE_DC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProbeDc() { - return probeDc; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROBE_DC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProbeDc() { + return probeDc; + } public void setProbeDc(String probeDc) { this.probeDc = probeDc; } - public SyntheticsAPITestResultShort result(SyntheticsAPITestResultShortResult result) { this.result = result; this.unparsed |= result.unparsed; @@ -88,42 +104,38 @@ public SyntheticsAPITestResultShort result(SyntheticsAPITestResultShortResult re } /** - * Result of the last API test run. - * + *

Result of the last API test run.

* @return result - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsAPITestResultShortResult getResult() { - return result; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsAPITestResultShortResult getResult() { + return result; + } public void setResult(SyntheticsAPITestResultShortResult result) { this.result = result; } - public SyntheticsAPITestResultShort resultId(String resultId) { this.resultId = resultId; return this; } /** - * ID of the API test result. - * + *

ID of the API test result.

* @return resultId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResultId() { - return resultId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } public void setResultId(String resultId) { this.resultId = resultId; } - public SyntheticsAPITestResultShort status(SyntheticsTestMonitorStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -131,26 +143,29 @@ public SyntheticsAPITestResultShort status(SyntheticsTestMonitorStatus status) { } /** - * The status of your Synthetic monitor. * O for not triggered * 1 for - * triggered * 2 for no data - * + *

The status of your Synthetic monitor. + * * O for not triggered + * * 1 for triggered + * * 2 for no data

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestMonitorStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestMonitorStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestMonitorStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SyntheticsAPITestResultShort object is equal to o. */ + /** + * Return true if this SyntheticsAPITestResultShort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -160,16 +175,13 @@ public boolean equals(Object o) { return false; } SyntheticsAPITestResultShort syntheticsApiTestResultShort = (SyntheticsAPITestResultShort) o; - return Objects.equals(this.checkTime, syntheticsApiTestResultShort.checkTime) - && Objects.equals(this.probeDc, syntheticsApiTestResultShort.probeDc) - && Objects.equals(this.result, syntheticsApiTestResultShort.result) - && Objects.equals(this.resultId, syntheticsApiTestResultShort.resultId) - && Objects.equals(this.status, syntheticsApiTestResultShort.status); + return Objects.equals(this.checkTime, syntheticsApiTestResultShort.checkTime) && Objects.equals(this.probeDc, syntheticsApiTestResultShort.probeDc) && Objects.equals(this.result, syntheticsApiTestResultShort.result) && Objects.equals(this.resultId, syntheticsApiTestResultShort.resultId) && Objects.equals(this.status, syntheticsApiTestResultShort.status); } + @Override public int hashCode() { - return Objects.hash(checkTime, probeDc, result, resultId, status); + return Objects.hash(checkTime,probeDc,result,resultId,status); } @Override @@ -186,7 +198,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShortResult.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShortResult.java index dd1f184c473..ea28ecfe33a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShortResult.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestResultShortResult.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Result of the last API test run. */ + +/** + *

Result of the last API test run.

+ */ @JsonPropertyOrder({ SyntheticsAPITestResultShortResult.JSON_PROPERTY_PASSED, SyntheticsAPITestResultShortResult.JSON_PROPERTY_TIMINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAPITestResultShortResult { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PASSED = "passed"; private Boolean passed; @@ -33,21 +53,19 @@ public SyntheticsAPITestResultShortResult passed(Boolean passed) { } /** - * Describes if the test run has passed or failed. - * + *

Describes if the test run has passed or failed.

* @return passed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PASSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPassed() { - return passed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPassed() { + return passed; + } public void setPassed(Boolean passed) { this.passed = passed; } - public SyntheticsAPITestResultShortResult timings(SyntheticsTiming timings) { this.timings = timings; this.unparsed |= timings.unparsed; @@ -55,24 +73,24 @@ public SyntheticsAPITestResultShortResult timings(SyntheticsTiming timings) { } /** - * Object containing all metrics and their values collected for a Synthetic API test. Learn more - * about those metrics in Synthetics - * documentation. - * + *

Object containing all metrics and their values collected for a Synthetic API test. + * Learn more about those metrics in Synthetics documentation.

* @return timings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTiming getTimings() { - return timings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTiming getTimings() { + return timings; + } public void setTimings(SyntheticsTiming timings) { this.timings = timings; } - /** Return true if this SyntheticsAPITestResultShortResult object is equal to o. */ + /** + * Return true if this SyntheticsAPITestResultShortResult object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsAPITestResultShortResult syntheticsApiTestResultShortResult = - (SyntheticsAPITestResultShortResult) o; - return Objects.equals(this.passed, syntheticsApiTestResultShortResult.passed) - && Objects.equals(this.timings, syntheticsApiTestResultShortResult.timings); + SyntheticsAPITestResultShortResult syntheticsApiTestResultShortResult = (SyntheticsAPITestResultShortResult) o; + return Objects.equals(this.passed, syntheticsApiTestResultShortResult.passed) && Objects.equals(this.timings, syntheticsApiTestResultShortResult.timings); } + @Override public int hashCode() { - return Objects.hash(passed, timings); + return Objects.hash(passed,timings); } @Override @@ -103,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestType.java index f3bbce9eb7d..baf5504379b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAPITestType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Synthetic test, api. */ +/** + *

Type of the Synthetic test, api.

+ */ @JsonSerialize(using = SyntheticsAPITestType.SyntheticsAPITestTypeSerializer.class) public class SyntheticsAPITestType { @@ -38,20 +62,18 @@ public boolean isValid() { } public static class SyntheticsAPITestTypeSerializer extends StdSerializer { - public SyntheticsAPITestTypeSerializer(Class t) { - super(t); - } - - public SyntheticsAPITestTypeSerializer() { - this(null); - } - - @Override - public void serialize( - SyntheticsAPITestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsAPITestTypeSerializer(Class t) { + super(t); + } + + public SyntheticsAPITestTypeSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsAPITestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsAPITestType object is equal to o. */ + /** + * Return true if this SyntheticsAPITestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestFailureCode.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestFailureCode.java index dcff28721e6..314425fc45f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestFailureCode.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestFailureCode.java @@ -6,102 +6,75 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Error code that can be returned by a Synthetic test. */ +/** + *

Error code that can be returned by a Synthetic test.

+ */ @JsonSerialize(using = SyntheticsApiTestFailureCode.SyntheticsApiTestFailureCodeSerializer.class) public class SyntheticsApiTestFailureCode { - public static final SyntheticsApiTestFailureCode BODY_TOO_LARGE = - new SyntheticsApiTestFailureCode("BODY_TOO_LARGE"); - public static final SyntheticsApiTestFailureCode DENIED = - new SyntheticsApiTestFailureCode("DENIED"); - public static final SyntheticsApiTestFailureCode TOO_MANY_REDIRECTS = - new SyntheticsApiTestFailureCode("TOO_MANY_REDIRECTS"); - public static final SyntheticsApiTestFailureCode AUTHENTICATION_ERROR = - new SyntheticsApiTestFailureCode("AUTHENTICATION_ERROR"); - public static final SyntheticsApiTestFailureCode DECRYPTION = - new SyntheticsApiTestFailureCode("DECRYPTION"); - public static final SyntheticsApiTestFailureCode INVALID_CHAR_IN_HEADER = - new SyntheticsApiTestFailureCode("INVALID_CHAR_IN_HEADER"); - public static final SyntheticsApiTestFailureCode HEADER_TOO_LARGE = - new SyntheticsApiTestFailureCode("HEADER_TOO_LARGE"); - public static final SyntheticsApiTestFailureCode HEADERS_INCOMPATIBLE_CONTENT_LENGTH = - new SyntheticsApiTestFailureCode("HEADERS_INCOMPATIBLE_CONTENT_LENGTH"); - public static final SyntheticsApiTestFailureCode INVALID_REQUEST = - new SyntheticsApiTestFailureCode("INVALID_REQUEST"); - public static final SyntheticsApiTestFailureCode REQUIRES_UPDATE = - new SyntheticsApiTestFailureCode("REQUIRES_UPDATE"); - public static final SyntheticsApiTestFailureCode UNESCAPED_CHARACTERS_IN_REQUEST_PATH = - new SyntheticsApiTestFailureCode("UNESCAPED_CHARACTERS_IN_REQUEST_PATH"); - public static final SyntheticsApiTestFailureCode MALFORMED_RESPONSE = - new SyntheticsApiTestFailureCode("MALFORMED_RESPONSE"); - public static final SyntheticsApiTestFailureCode INCORRECT_ASSERTION = - new SyntheticsApiTestFailureCode("INCORRECT_ASSERTION"); - public static final SyntheticsApiTestFailureCode CONNREFUSED = - new SyntheticsApiTestFailureCode("CONNREFUSED"); - public static final SyntheticsApiTestFailureCode CONNRESET = - new SyntheticsApiTestFailureCode("CONNRESET"); + public static final SyntheticsApiTestFailureCode BODY_TOO_LARGE = new SyntheticsApiTestFailureCode("BODY_TOO_LARGE"); + public static final SyntheticsApiTestFailureCode DENIED = new SyntheticsApiTestFailureCode("DENIED"); + public static final SyntheticsApiTestFailureCode TOO_MANY_REDIRECTS = new SyntheticsApiTestFailureCode("TOO_MANY_REDIRECTS"); + public static final SyntheticsApiTestFailureCode AUTHENTICATION_ERROR = new SyntheticsApiTestFailureCode("AUTHENTICATION_ERROR"); + public static final SyntheticsApiTestFailureCode DECRYPTION = new SyntheticsApiTestFailureCode("DECRYPTION"); + public static final SyntheticsApiTestFailureCode INVALID_CHAR_IN_HEADER = new SyntheticsApiTestFailureCode("INVALID_CHAR_IN_HEADER"); + public static final SyntheticsApiTestFailureCode HEADER_TOO_LARGE = new SyntheticsApiTestFailureCode("HEADER_TOO_LARGE"); + public static final SyntheticsApiTestFailureCode HEADERS_INCOMPATIBLE_CONTENT_LENGTH = new SyntheticsApiTestFailureCode("HEADERS_INCOMPATIBLE_CONTENT_LENGTH"); + public static final SyntheticsApiTestFailureCode INVALID_REQUEST = new SyntheticsApiTestFailureCode("INVALID_REQUEST"); + public static final SyntheticsApiTestFailureCode REQUIRES_UPDATE = new SyntheticsApiTestFailureCode("REQUIRES_UPDATE"); + public static final SyntheticsApiTestFailureCode UNESCAPED_CHARACTERS_IN_REQUEST_PATH = new SyntheticsApiTestFailureCode("UNESCAPED_CHARACTERS_IN_REQUEST_PATH"); + public static final SyntheticsApiTestFailureCode MALFORMED_RESPONSE = new SyntheticsApiTestFailureCode("MALFORMED_RESPONSE"); + public static final SyntheticsApiTestFailureCode INCORRECT_ASSERTION = new SyntheticsApiTestFailureCode("INCORRECT_ASSERTION"); + public static final SyntheticsApiTestFailureCode CONNREFUSED = new SyntheticsApiTestFailureCode("CONNREFUSED"); + public static final SyntheticsApiTestFailureCode CONNRESET = new SyntheticsApiTestFailureCode("CONNRESET"); public static final SyntheticsApiTestFailureCode DNS = new SyntheticsApiTestFailureCode("DNS"); - public static final SyntheticsApiTestFailureCode HOSTUNREACH = - new SyntheticsApiTestFailureCode("HOSTUNREACH"); - public static final SyntheticsApiTestFailureCode NETUNREACH = - new SyntheticsApiTestFailureCode("NETUNREACH"); - public static final SyntheticsApiTestFailureCode TIMEOUT = - new SyntheticsApiTestFailureCode("TIMEOUT"); + public static final SyntheticsApiTestFailureCode HOSTUNREACH = new SyntheticsApiTestFailureCode("HOSTUNREACH"); + public static final SyntheticsApiTestFailureCode NETUNREACH = new SyntheticsApiTestFailureCode("NETUNREACH"); + public static final SyntheticsApiTestFailureCode TIMEOUT = new SyntheticsApiTestFailureCode("TIMEOUT"); public static final SyntheticsApiTestFailureCode SSL = new SyntheticsApiTestFailureCode("SSL"); public static final SyntheticsApiTestFailureCode OCSP = new SyntheticsApiTestFailureCode("OCSP"); - public static final SyntheticsApiTestFailureCode INVALID_TEST = - new SyntheticsApiTestFailureCode("INVALID_TEST"); - public static final SyntheticsApiTestFailureCode TUNNEL = - new SyntheticsApiTestFailureCode("TUNNEL"); - public static final SyntheticsApiTestFailureCode WEBSOCKET = - new SyntheticsApiTestFailureCode("WEBSOCKET"); - public static final SyntheticsApiTestFailureCode UNKNOWN = - new SyntheticsApiTestFailureCode("UNKNOWN"); - public static final SyntheticsApiTestFailureCode INTERNAL_ERROR = - new SyntheticsApiTestFailureCode("INTERNAL_ERROR"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "BODY_TOO_LARGE", - "DENIED", - "TOO_MANY_REDIRECTS", - "AUTHENTICATION_ERROR", - "DECRYPTION", - "INVALID_CHAR_IN_HEADER", - "HEADER_TOO_LARGE", - "HEADERS_INCOMPATIBLE_CONTENT_LENGTH", - "INVALID_REQUEST", - "REQUIRES_UPDATE", - "UNESCAPED_CHARACTERS_IN_REQUEST_PATH", - "MALFORMED_RESPONSE", - "INCORRECT_ASSERTION", - "CONNREFUSED", - "CONNRESET", - "DNS", - "HOSTUNREACH", - "NETUNREACH", - "TIMEOUT", - "SSL", - "OCSP", - "INVALID_TEST", - "TUNNEL", - "WEBSOCKET", - "UNKNOWN", - "INTERNAL_ERROR")); + public static final SyntheticsApiTestFailureCode INVALID_TEST = new SyntheticsApiTestFailureCode("INVALID_TEST"); + public static final SyntheticsApiTestFailureCode TUNNEL = new SyntheticsApiTestFailureCode("TUNNEL"); + public static final SyntheticsApiTestFailureCode WEBSOCKET = new SyntheticsApiTestFailureCode("WEBSOCKET"); + public static final SyntheticsApiTestFailureCode UNKNOWN = new SyntheticsApiTestFailureCode("UNKNOWN"); + public static final SyntheticsApiTestFailureCode INTERNAL_ERROR = new SyntheticsApiTestFailureCode("INTERNAL_ERROR"); + + private static final Set allowedValues = new HashSet(Arrays.asList("BODY_TOO_LARGE", "DENIED", "TOO_MANY_REDIRECTS", "AUTHENTICATION_ERROR", "DECRYPTION", "INVALID_CHAR_IN_HEADER", "HEADER_TOO_LARGE", "HEADERS_INCOMPATIBLE_CONTENT_LENGTH", "INVALID_REQUEST", "REQUIRES_UPDATE", "UNESCAPED_CHARACTERS_IN_REQUEST_PATH", "MALFORMED_RESPONSE", "INCORRECT_ASSERTION", "CONNREFUSED", "CONNRESET", "DNS", "HOSTUNREACH", "NETUNREACH", "TIMEOUT", "SSL", "OCSP", "INVALID_TEST", "TUNNEL", "WEBSOCKET", "UNKNOWN", "INTERNAL_ERROR")); private String value; @@ -113,22 +86,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsApiTestFailureCodeSerializer - extends StdSerializer { - public SyntheticsApiTestFailureCodeSerializer(Class t) { - super(t); - } + public static class SyntheticsApiTestFailureCodeSerializer extends StdSerializer { + public SyntheticsApiTestFailureCodeSerializer(Class t) { + super(t); + } - public SyntheticsApiTestFailureCodeSerializer() { - this(null); - } + public SyntheticsApiTestFailureCodeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsApiTestFailureCode value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsApiTestFailureCode value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -140,7 +110,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsApiTestFailureCode object is equal to o. */ + /** + * Return true if this SyntheticsApiTestFailureCode object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -154,7 +126,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestResultFailure.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestResultFailure.java index ef0053bd301..eb765340eaf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestResultFailure.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsApiTestResultFailure.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The API test failure details. */ + +/** + *

The API test failure details.

+ */ @JsonPropertyOrder({ SyntheticsApiTestResultFailure.JSON_PROPERTY_CODE, SyntheticsApiTestResultFailure.JSON_PROPERTY_MESSAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsApiTestResultFailure { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private SyntheticsApiTestFailureCode code; @@ -34,46 +54,45 @@ public SyntheticsApiTestResultFailure code(SyntheticsApiTestFailureCode code) { } /** - * Error code that can be returned by a Synthetic test. - * + *

Error code that can be returned by a Synthetic test.

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsApiTestFailureCode getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsApiTestFailureCode getCode() { + return code; + } public void setCode(SyntheticsApiTestFailureCode code) { if (!code.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.code = code; } - public SyntheticsApiTestResultFailure message(String message) { this.message = message; return this; } /** - * The API test error message. - * + *

The API test error message.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this SyntheticsApiTestResultFailure object is equal to o. */ + /** + * Return true if this SyntheticsApiTestResultFailure object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,15 +101,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsApiTestResultFailure syntheticsApiTestResultFailure = - (SyntheticsApiTestResultFailure) o; - return Objects.equals(this.code, syntheticsApiTestResultFailure.code) - && Objects.equals(this.message, syntheticsApiTestResultFailure.message); + SyntheticsApiTestResultFailure syntheticsApiTestResultFailure = (SyntheticsApiTestResultFailure) o; + return Objects.equals(this.code, syntheticsApiTestResultFailure.code) && Objects.equals(this.message, syntheticsApiTestResultFailure.message); } + @Override public int hashCode() { - return Objects.hash(code, message); + return Objects.hash(code,message); } @Override @@ -104,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertion.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertion.java index a64d439e493..ee863388ee5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertion.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertion.java @@ -6,352 +6,311 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = SyntheticsAssertion.SyntheticsAssertionDeserializer.class) @JsonSerialize(using = SyntheticsAssertion.SyntheticsAssertionSerializer.class) public class SyntheticsAssertion extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(SyntheticsAssertion.class.getName()); + private static final Logger log = Logger.getLogger(SyntheticsAssertion.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; + + public static class SyntheticsAssertionSerializer extends StdSerializer { + public SyntheticsAssertionSerializer(Class t) { + super(t); + } - public static class SyntheticsAssertionSerializer extends StdSerializer { - public SyntheticsAssertionSerializer(Class t) { - super(t); + public SyntheticsAssertionSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsAssertion value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public SyntheticsAssertionSerializer() { - this(null); + public static class SyntheticsAssertionDeserializer extends StdDeserializer { + public SyntheticsAssertionDeserializer() { + this(SyntheticsAssertion.class); + } + + public SyntheticsAssertionDeserializer(Class vc) { + super(vc); + } + + @Override + public SyntheticsAssertion 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 SyntheticsAssertionTarget + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsAssertionTarget.class.equals(Integer.class) || SyntheticsAssertionTarget.class.equals(Long.class) || SyntheticsAssertionTarget.class.equals(Float.class) || SyntheticsAssertionTarget.class.equals(Double.class) || SyntheticsAssertionTarget.class.equals(Boolean.class) || SyntheticsAssertionTarget.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsAssertionTarget.class.equals(Integer.class) || SyntheticsAssertionTarget.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsAssertionTarget.class.equals(Float.class) || SyntheticsAssertionTarget.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsAssertionTarget.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsAssertionTarget.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsAssertionTarget.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 (!((SyntheticsAssertionTarget)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsAssertionTarget'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsAssertionTarget'", e); + } + + // deserialize SyntheticsAssertionJSONPathTarget + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsAssertionJSONPathTarget.class.equals(Integer.class) || SyntheticsAssertionJSONPathTarget.class.equals(Long.class) || SyntheticsAssertionJSONPathTarget.class.equals(Float.class) || SyntheticsAssertionJSONPathTarget.class.equals(Double.class) || SyntheticsAssertionJSONPathTarget.class.equals(Boolean.class) || SyntheticsAssertionJSONPathTarget.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsAssertionJSONPathTarget.class.equals(Integer.class) || SyntheticsAssertionJSONPathTarget.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsAssertionJSONPathTarget.class.equals(Float.class) || SyntheticsAssertionJSONPathTarget.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsAssertionJSONPathTarget.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsAssertionJSONPathTarget.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsAssertionJSONPathTarget.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 (!((SyntheticsAssertionJSONPathTarget)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsAssertionJSONPathTarget'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsAssertionJSONPathTarget'", e); + } + + // deserialize SyntheticsAssertionXPathTarget + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsAssertionXPathTarget.class.equals(Integer.class) || SyntheticsAssertionXPathTarget.class.equals(Long.class) || SyntheticsAssertionXPathTarget.class.equals(Float.class) || SyntheticsAssertionXPathTarget.class.equals(Double.class) || SyntheticsAssertionXPathTarget.class.equals(Boolean.class) || SyntheticsAssertionXPathTarget.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsAssertionXPathTarget.class.equals(Integer.class) || SyntheticsAssertionXPathTarget.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsAssertionXPathTarget.class.equals(Float.class) || SyntheticsAssertionXPathTarget.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsAssertionXPathTarget.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsAssertionXPathTarget.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsAssertionXPathTarget.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 (!((SyntheticsAssertionXPathTarget)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsAssertionXPathTarget'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsAssertionXPathTarget'", e); + } + + SyntheticsAssertion ret = new SyntheticsAssertion(); + 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 SyntheticsAssertion getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SyntheticsAssertion cannot be null"); + } } - @Override - public void serialize( - SyntheticsAssertion value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SyntheticsAssertion() { + super("oneOf", Boolean.FALSE); + } + public SyntheticsAssertion(SyntheticsAssertionTarget o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsAssertion(SyntheticsAssertionJSONPathTarget o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsAssertion(SyntheticsAssertionXPathTarget o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class SyntheticsAssertionDeserializer extends StdDeserializer { - public SyntheticsAssertionDeserializer() { - this(SyntheticsAssertion.class); + static { + schemas.put("SyntheticsAssertionTarget", new GenericType() { + }); + schemas.put("SyntheticsAssertionJSONPathTarget", new GenericType() { + }); + schemas.put("SyntheticsAssertionXPathTarget", new GenericType() { + }); + JSON.registerDescendants(SyntheticsAssertion.class, Collections.unmodifiableMap(schemas)); } - public SyntheticsAssertionDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return SyntheticsAssertion.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SyntheticsAssertionTarget, SyntheticsAssertionJSONPathTarget, SyntheticsAssertionXPathTarget + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public SyntheticsAssertion 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 SyntheticsAssertionTarget - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsAssertionTarget.class.equals(Integer.class) - || SyntheticsAssertionTarget.class.equals(Long.class) - || SyntheticsAssertionTarget.class.equals(Float.class) - || SyntheticsAssertionTarget.class.equals(Double.class) - || SyntheticsAssertionTarget.class.equals(Boolean.class) - || SyntheticsAssertionTarget.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsAssertionTarget.class.equals(Integer.class) - || SyntheticsAssertionTarget.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsAssertionTarget.class.equals(Float.class) - || SyntheticsAssertionTarget.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsAssertionTarget.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsAssertionTarget.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SyntheticsAssertionTarget.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsAssertionTarget.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 (!((SyntheticsAssertionTarget) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsAssertionTarget'"); + if (JSON.isInstanceOf(SyntheticsAssertionJSONPathTarget.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SyntheticsAssertionTarget'", e); - } - - // deserialize SyntheticsAssertionJSONPathTarget - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsAssertionJSONPathTarget.class.equals(Integer.class) - || SyntheticsAssertionJSONPathTarget.class.equals(Long.class) - || SyntheticsAssertionJSONPathTarget.class.equals(Float.class) - || SyntheticsAssertionJSONPathTarget.class.equals(Double.class) - || SyntheticsAssertionJSONPathTarget.class.equals(Boolean.class) - || SyntheticsAssertionJSONPathTarget.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsAssertionJSONPathTarget.class.equals(Integer.class) - || SyntheticsAssertionJSONPathTarget.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsAssertionJSONPathTarget.class.equals(Float.class) - || SyntheticsAssertionJSONPathTarget.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsAssertionJSONPathTarget.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsAssertionJSONPathTarget.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(SyntheticsAssertionXPathTarget.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsAssertionJSONPathTarget.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 (!((SyntheticsAssertionJSONPathTarget) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsAssertionJSONPathTarget'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'SyntheticsAssertionJSONPathTarget'", e); - } - // deserialize SyntheticsAssertionXPathTarget - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsAssertionXPathTarget.class.equals(Integer.class) - || SyntheticsAssertionXPathTarget.class.equals(Long.class) - || SyntheticsAssertionXPathTarget.class.equals(Float.class) - || SyntheticsAssertionXPathTarget.class.equals(Double.class) - || SyntheticsAssertionXPathTarget.class.equals(Boolean.class) - || SyntheticsAssertionXPathTarget.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsAssertionXPathTarget.class.equals(Integer.class) - || SyntheticsAssertionXPathTarget.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsAssertionXPathTarget.class.equals(Float.class) - || SyntheticsAssertionXPathTarget.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsAssertionXPathTarget.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsAssertionXPathTarget.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsAssertionXPathTarget.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 (!((SyntheticsAssertionXPathTarget) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsAssertionXPathTarget'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'SyntheticsAssertionXPathTarget'", e); - } - - SyntheticsAssertion ret = new SyntheticsAssertion(); - 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; + throw new RuntimeException("Invalid instance type. Must be SyntheticsAssertionTarget, SyntheticsAssertionJSONPathTarget, SyntheticsAssertionXPathTarget"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SyntheticsAssertionTarget, SyntheticsAssertionJSONPathTarget, SyntheticsAssertionXPathTarget + * + * @return The actual instance (SyntheticsAssertionTarget, SyntheticsAssertionJSONPathTarget, SyntheticsAssertionXPathTarget) + */ @Override - public SyntheticsAssertion getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SyntheticsAssertion cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public SyntheticsAssertion() { - super("oneOf", Boolean.FALSE); - } - - public SyntheticsAssertion(SyntheticsAssertionTarget o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsAssertion(SyntheticsAssertionJSONPathTarget o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsAssertion(SyntheticsAssertionXPathTarget o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - static { - schemas.put("SyntheticsAssertionTarget", new GenericType() {}); - schemas.put( - "SyntheticsAssertionJSONPathTarget", - new GenericType() {}); - schemas.put( - "SyntheticsAssertionXPathTarget", new GenericType() {}); - JSON.registerDescendants(SyntheticsAssertion.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SyntheticsAssertion.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SyntheticsAssertionTarget, SyntheticsAssertionJSONPathTarget, - * SyntheticsAssertionXPathTarget - * - *

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(SyntheticsAssertionTarget.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SyntheticsAssertionJSONPathTarget.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SyntheticsAssertionXPathTarget.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SyntheticsAssertionTarget`. If the actual instance is not `SyntheticsAssertionTarget`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsAssertionTarget` + * @throws ClassCastException if the instance is not `SyntheticsAssertionTarget` + */ + public SyntheticsAssertionTarget getSyntheticsAssertionTarget() throws ClassCastException { + return (SyntheticsAssertionTarget)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SyntheticsAssertionJSONPathTarget`. If the actual instance is not `SyntheticsAssertionJSONPathTarget`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsAssertionJSONPathTarget` + * @throws ClassCastException if the instance is not `SyntheticsAssertionJSONPathTarget` + */ + public SyntheticsAssertionJSONPathTarget getSyntheticsAssertionJSONPathTarget() throws ClassCastException { + return (SyntheticsAssertionJSONPathTarget)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SyntheticsAssertionTarget," - + " SyntheticsAssertionJSONPathTarget, SyntheticsAssertionXPathTarget"); - } - /** - * Get the actual instance, which can be the following: SyntheticsAssertionTarget, - * SyntheticsAssertionJSONPathTarget, SyntheticsAssertionXPathTarget - * - * @return The actual instance (SyntheticsAssertionTarget, SyntheticsAssertionJSONPathTarget, - * SyntheticsAssertionXPathTarget) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SyntheticsAssertionTarget`. If the actual instance is not - * `SyntheticsAssertionTarget`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsAssertionTarget` - * @throws ClassCastException if the instance is not `SyntheticsAssertionTarget` - */ - public SyntheticsAssertionTarget getSyntheticsAssertionTarget() throws ClassCastException { - return (SyntheticsAssertionTarget) super.getActualInstance(); - } - - /** - * Get the actual instance of `SyntheticsAssertionJSONPathTarget`. If the actual instance is not - * `SyntheticsAssertionJSONPathTarget`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsAssertionJSONPathTarget` - * @throws ClassCastException if the instance is not `SyntheticsAssertionJSONPathTarget` - */ - public SyntheticsAssertionJSONPathTarget getSyntheticsAssertionJSONPathTarget() - throws ClassCastException { - return (SyntheticsAssertionJSONPathTarget) super.getActualInstance(); - } - - /** - * Get the actual instance of `SyntheticsAssertionXPathTarget`. If the actual instance is not - * `SyntheticsAssertionXPathTarget`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsAssertionXPathTarget` - * @throws ClassCastException if the instance is not `SyntheticsAssertionXPathTarget` - */ - public SyntheticsAssertionXPathTarget getSyntheticsAssertionXPathTarget() - throws ClassCastException { - return (SyntheticsAssertionXPathTarget) super.getActualInstance(); - } + /** + * Get the actual instance of `SyntheticsAssertionXPathTarget`. If the actual instance is not `SyntheticsAssertionXPathTarget`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsAssertionXPathTarget` + * @throws ClassCastException if the instance is not `SyntheticsAssertionXPathTarget` + */ + public SyntheticsAssertionXPathTarget getSyntheticsAssertionXPathTarget() throws ClassCastException { + return (SyntheticsAssertionXPathTarget)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathOperator.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathOperator.java index c6aadf6558f..3553b039b89 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathOperator.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathOperator.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Assertion operator to apply. */ -@JsonSerialize( - using = SyntheticsAssertionJSONPathOperator.SyntheticsAssertionJSONPathOperatorSerializer.class) +/** + *

Assertion operator to apply.

+ */ +@JsonSerialize(using = SyntheticsAssertionJSONPathOperator.SyntheticsAssertionJSONPathOperatorSerializer.class) public class SyntheticsAssertionJSONPathOperator { - public static final SyntheticsAssertionJSONPathOperator VALIDATES_JSON_PATH = - new SyntheticsAssertionJSONPathOperator("validatesJSONPath"); + public static final SyntheticsAssertionJSONPathOperator VALIDATES_JSON_PATH = new SyntheticsAssertionJSONPathOperator("validatesJSONPath"); - private static final Set allowedValues = - new HashSet(Arrays.asList("validatesJSONPath")); + private static final Set allowedValues = new HashSet(Arrays.asList("validatesJSONPath")); private String value; @@ -40,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsAssertionJSONPathOperatorSerializer - extends StdSerializer { - public SyntheticsAssertionJSONPathOperatorSerializer( - Class t) { - super(t); - } + public static class SyntheticsAssertionJSONPathOperatorSerializer extends StdSerializer { + public SyntheticsAssertionJSONPathOperatorSerializer(Class t) { + super(t); + } - public SyntheticsAssertionJSONPathOperatorSerializer() { - this(null); - } + public SyntheticsAssertionJSONPathOperatorSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsAssertionJSONPathOperator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsAssertionJSONPathOperator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsAssertionJSONPathOperator object is equal to o. */ + /** + * Return true if this SyntheticsAssertionJSONPathOperator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTarget.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTarget.java index 208cd4ebc79..8935276b03e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTarget.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTarget.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An assertion for the validatesJSONPath operator. */ +/** + *

An assertion for the validatesJSONPath operator.

+ */ @JsonPropertyOrder({ SyntheticsAssertionJSONPathTarget.JSON_PROPERTY_OPERATOR, SyntheticsAssertionJSONPathTarget.JSON_PROPERTY_PROPERTY, SyntheticsAssertionJSONPathTarget.JSON_PROPERTY_TARGET, SyntheticsAssertionJSONPathTarget.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAssertionJSONPathTarget { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OPERATOR = "operator"; private SyntheticsAssertionJSONPathOperator operator; @@ -40,15 +59,13 @@ public SyntheticsAssertionJSONPathTarget() {} @JsonCreator public SyntheticsAssertionJSONPathTarget( - @JsonProperty(required = true, value = JSON_PROPERTY_OPERATOR) - SyntheticsAssertionJSONPathOperator operator, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsAssertionType type) { - this.operator = operator; - this.unparsed |= !operator.isValid(); - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_OPERATOR)SyntheticsAssertionJSONPathOperator operator, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsAssertionType type) { + this.operator = operator; + this.unparsed |= !operator.isValid(); + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsAssertionJSONPathTarget operator(SyntheticsAssertionJSONPathOperator operator) { this.operator = operator; this.unparsed |= !operator.isValid(); @@ -56,44 +73,40 @@ public SyntheticsAssertionJSONPathTarget operator(SyntheticsAssertionJSONPathOpe } /** - * Assertion operator to apply. - * + *

Assertion operator to apply.

* @return operator - */ - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAssertionJSONPathOperator getOperator() { - return operator; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAssertionJSONPathOperator getOperator() { + return operator; + } public void setOperator(SyntheticsAssertionJSONPathOperator operator) { if (!operator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.operator = operator; } - public SyntheticsAssertionJSONPathTarget property(String property) { this.property = property; return this; } /** - * The associated assertion property. - * + *

The associated assertion property.

* @return property - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProperty() { - return property; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { + return property; + } public void setProperty(String property) { this.property = property; } - public SyntheticsAssertionJSONPathTarget target(SyntheticsAssertionJSONPathTargetTarget target) { this.target = target; this.unparsed |= target.unparsed; @@ -101,21 +114,19 @@ public SyntheticsAssertionJSONPathTarget target(SyntheticsAssertionJSONPathTarge } /** - * Composed target for validatesJSONPath operator. - * + *

Composed target for validatesJSONPath operator.

* @return target - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsAssertionJSONPathTargetTarget getTarget() { - return target; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsAssertionJSONPathTargetTarget getTarget() { + return target; + } public void setTarget(SyntheticsAssertionJSONPathTargetTarget target) { this.target = target; } - public SyntheticsAssertionJSONPathTarget type(SyntheticsAssertionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -123,24 +134,25 @@ public SyntheticsAssertionJSONPathTarget type(SyntheticsAssertionType type) { } /** - * Type of the assertion. - * + *

Type of the assertion.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAssertionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAssertionType getType() { + return type; + } public void setType(SyntheticsAssertionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsAssertionJSONPathTarget object is equal to o. */ + /** + * Return true if this SyntheticsAssertionJSONPathTarget object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -149,17 +161,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsAssertionJSONPathTarget syntheticsAssertionJsonPathTarget = - (SyntheticsAssertionJSONPathTarget) o; - return Objects.equals(this.operator, syntheticsAssertionJsonPathTarget.operator) - && Objects.equals(this.property, syntheticsAssertionJsonPathTarget.property) - && Objects.equals(this.target, syntheticsAssertionJsonPathTarget.target) - && Objects.equals(this.type, syntheticsAssertionJsonPathTarget.type); + SyntheticsAssertionJSONPathTarget syntheticsAssertionJsonPathTarget = (SyntheticsAssertionJSONPathTarget) o; + return Objects.equals(this.operator, syntheticsAssertionJsonPathTarget.operator) && Objects.equals(this.property, syntheticsAssertionJsonPathTarget.property) && Objects.equals(this.target, syntheticsAssertionJsonPathTarget.target) && Objects.equals(this.type, syntheticsAssertionJsonPathTarget.type); } + @Override public int hashCode() { - return Objects.hash(operator, property, target, type); + return Objects.hash(operator,property,target,type); } @Override @@ -175,7 +184,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTargetTarget.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTargetTarget.java index 8432302036f..92697b1467e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTargetTarget.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionJSONPathTargetTarget.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Composed target for validatesJSONPath operator. */ + +/** + *

Composed target for validatesJSONPath operator.

+ */ @JsonPropertyOrder({ SyntheticsAssertionJSONPathTargetTarget.JSON_PROPERTY_JSON_PATH, SyntheticsAssertionJSONPathTargetTarget.JSON_PROPERTY_OPERATOR, SyntheticsAssertionJSONPathTargetTarget.JSON_PROPERTY_TARGET_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAssertionJSONPathTargetTarget { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_JSON_PATH = "jsonPath"; private String jsonPath; @@ -37,64 +57,61 @@ public SyntheticsAssertionJSONPathTargetTarget jsonPath(String jsonPath) { } /** - * The JSON path to assert. - * + *

The JSON path to assert.

* @return jsonPath - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_JSON_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getJsonPath() { - return jsonPath; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JSON_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getJsonPath() { + return jsonPath; + } public void setJsonPath(String jsonPath) { this.jsonPath = jsonPath; } - public SyntheticsAssertionJSONPathTargetTarget operator(String operator) { this.operator = operator; return this; } /** - * The specific operator to use on the path. - * + *

The specific operator to use on the path.

* @return operator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOperator() { - return operator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOperator() { + return operator; + } public void setOperator(String operator) { this.operator = operator; } - public SyntheticsAssertionJSONPathTargetTarget targetValue(Object targetValue) { this.targetValue = targetValue; return this; } /** - * The path target value to compare to. - * + *

The path target value to compare to.

* @return targetValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getTargetValue() { - return targetValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getTargetValue() { + return targetValue; + } public void setTargetValue(Object targetValue) { this.targetValue = targetValue; } - /** Return true if this SyntheticsAssertionJSONPathTargetTarget object is equal to o. */ + /** + * Return true if this SyntheticsAssertionJSONPathTargetTarget object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,16 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsAssertionJSONPathTargetTarget syntheticsAssertionJsonPathTargetTarget = - (SyntheticsAssertionJSONPathTargetTarget) o; - return Objects.equals(this.jsonPath, syntheticsAssertionJsonPathTargetTarget.jsonPath) - && Objects.equals(this.operator, syntheticsAssertionJsonPathTargetTarget.operator) - && Objects.equals(this.targetValue, syntheticsAssertionJsonPathTargetTarget.targetValue); + SyntheticsAssertionJSONPathTargetTarget syntheticsAssertionJsonPathTargetTarget = (SyntheticsAssertionJSONPathTargetTarget) o; + return Objects.equals(this.jsonPath, syntheticsAssertionJsonPathTargetTarget.jsonPath) && Objects.equals(this.operator, syntheticsAssertionJsonPathTargetTarget.operator) && Objects.equals(this.targetValue, syntheticsAssertionJsonPathTargetTarget.targetValue); } + @Override public int hashCode() { - return Objects.hash(jsonPath, operator, targetValue); + return Objects.hash(jsonPath,operator,targetValue); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionOperator.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionOperator.java index 01eb636db32..e2649814344 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionOperator.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionOperator.java @@ -6,67 +6,63 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Assertion operator to apply. */ +/** + *

Assertion operator to apply.

+ */ @JsonSerialize(using = SyntheticsAssertionOperator.SyntheticsAssertionOperatorSerializer.class) public class SyntheticsAssertionOperator { - public static final SyntheticsAssertionOperator CONTAINS = - new SyntheticsAssertionOperator("contains"); - public static final SyntheticsAssertionOperator DOES_NOT_CONTAIN = - new SyntheticsAssertionOperator("doesNotContain"); + public static final SyntheticsAssertionOperator CONTAINS = new SyntheticsAssertionOperator("contains"); + public static final SyntheticsAssertionOperator DOES_NOT_CONTAIN = new SyntheticsAssertionOperator("doesNotContain"); public static final SyntheticsAssertionOperator IS = new SyntheticsAssertionOperator("is"); public static final SyntheticsAssertionOperator IS_NOT = new SyntheticsAssertionOperator("isNot"); - public static final SyntheticsAssertionOperator LESS_THAN = - new SyntheticsAssertionOperator("lessThan"); - public static final SyntheticsAssertionOperator LESS_THAN_OR_EQUAL = - new SyntheticsAssertionOperator("lessThanOrEqual"); - public static final SyntheticsAssertionOperator MORE_THAN = - new SyntheticsAssertionOperator("moreThan"); - public static final SyntheticsAssertionOperator MORE_THAN_OR_EQUAL = - new SyntheticsAssertionOperator("moreThanOrEqual"); - public static final SyntheticsAssertionOperator MATCHES = - new SyntheticsAssertionOperator("matches"); - public static final SyntheticsAssertionOperator DOES_NOT_MATCH = - new SyntheticsAssertionOperator("doesNotMatch"); - public static final SyntheticsAssertionOperator VALIDATES = - new SyntheticsAssertionOperator("validates"); - public static final SyntheticsAssertionOperator IS_IN_MORE_DAYS_THAN = - new SyntheticsAssertionOperator("isInMoreThan"); - public static final SyntheticsAssertionOperator IS_IN_LESS_DAYS_THAN = - new SyntheticsAssertionOperator("isInLessThan"); - public static final SyntheticsAssertionOperator DOES_NOT_EXIST = - new SyntheticsAssertionOperator("doesNotExist"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "contains", - "doesNotContain", - "is", - "isNot", - "lessThan", - "lessThanOrEqual", - "moreThan", - "moreThanOrEqual", - "matches", - "doesNotMatch", - "validates", - "isInMoreThan", - "isInLessThan", - "doesNotExist")); + public static final SyntheticsAssertionOperator LESS_THAN = new SyntheticsAssertionOperator("lessThan"); + public static final SyntheticsAssertionOperator LESS_THAN_OR_EQUAL = new SyntheticsAssertionOperator("lessThanOrEqual"); + public static final SyntheticsAssertionOperator MORE_THAN = new SyntheticsAssertionOperator("moreThan"); + public static final SyntheticsAssertionOperator MORE_THAN_OR_EQUAL = new SyntheticsAssertionOperator("moreThanOrEqual"); + public static final SyntheticsAssertionOperator MATCHES = new SyntheticsAssertionOperator("matches"); + public static final SyntheticsAssertionOperator DOES_NOT_MATCH = new SyntheticsAssertionOperator("doesNotMatch"); + public static final SyntheticsAssertionOperator VALIDATES = new SyntheticsAssertionOperator("validates"); + public static final SyntheticsAssertionOperator IS_IN_MORE_DAYS_THAN = new SyntheticsAssertionOperator("isInMoreThan"); + public static final SyntheticsAssertionOperator IS_IN_LESS_DAYS_THAN = new SyntheticsAssertionOperator("isInLessThan"); + public static final SyntheticsAssertionOperator DOES_NOT_EXIST = new SyntheticsAssertionOperator("doesNotExist"); + + private static final Set allowedValues = new HashSet(Arrays.asList("contains", "doesNotContain", "is", "isNot", "lessThan", "lessThanOrEqual", "moreThan", "moreThanOrEqual", "matches", "doesNotMatch", "validates", "isInMoreThan", "isInLessThan", "doesNotExist")); private String value; @@ -78,22 +74,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsAssertionOperatorSerializer - extends StdSerializer { - public SyntheticsAssertionOperatorSerializer(Class t) { - super(t); - } + public static class SyntheticsAssertionOperatorSerializer extends StdSerializer { + public SyntheticsAssertionOperatorSerializer(Class t) { + super(t); + } - public SyntheticsAssertionOperatorSerializer() { - this(null); - } + public SyntheticsAssertionOperatorSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsAssertionOperator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsAssertionOperator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -105,7 +98,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsAssertionOperator object is equal to o. */ + /** + * Return true if this SyntheticsAssertionOperator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,7 +114,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionTarget.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionTarget.java index 074d93b942c..457d6921a51 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionTarget.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionTarget.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An assertion which uses a simple target. */ +/** + *

An assertion which uses a simple target.

+ */ @JsonPropertyOrder({ SyntheticsAssertionTarget.JSON_PROPERTY_OPERATOR, SyntheticsAssertionTarget.JSON_PROPERTY_PROPERTY, SyntheticsAssertionTarget.JSON_PROPERTY_TARGET, SyntheticsAssertionTarget.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAssertionTarget { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OPERATOR = "operator"; private SyntheticsAssertionOperator operator; @@ -40,17 +59,15 @@ public SyntheticsAssertionTarget() {} @JsonCreator public SyntheticsAssertionTarget( - @JsonProperty(required = true, value = JSON_PROPERTY_OPERATOR) - SyntheticsAssertionOperator operator, - @JsonProperty(required = true, value = JSON_PROPERTY_TARGET) Object target, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsAssertionType type) { - this.operator = operator; - this.unparsed |= !operator.isValid(); - this.target = target; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_OPERATOR)SyntheticsAssertionOperator operator, + @JsonProperty(required=true, value=JSON_PROPERTY_TARGET)Object target, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsAssertionType type) { + this.operator = operator; + this.unparsed |= !operator.isValid(); + this.target = target; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsAssertionTarget operator(SyntheticsAssertionOperator operator) { this.operator = operator; this.unparsed |= !operator.isValid(); @@ -58,64 +75,58 @@ public SyntheticsAssertionTarget operator(SyntheticsAssertionOperator operator) } /** - * Assertion operator to apply. - * + *

Assertion operator to apply.

* @return operator - */ - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAssertionOperator getOperator() { - return operator; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAssertionOperator getOperator() { + return operator; + } public void setOperator(SyntheticsAssertionOperator operator) { if (!operator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.operator = operator; } - public SyntheticsAssertionTarget property(String property) { this.property = property; return this; } /** - * The associated assertion property. - * + *

The associated assertion property.

* @return property - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProperty() { - return property; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { + return property; + } public void setProperty(String property) { this.property = property; } - public SyntheticsAssertionTarget target(Object target) { this.target = target; return this; } /** - * Value used by the operator. - * + *

Value used by the operator.

* @return target - */ - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Object getTarget() { - return target; - } - + **/ + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Object getTarget() { + return target; + } public void setTarget(Object target) { this.target = target; } - public SyntheticsAssertionTarget type(SyntheticsAssertionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -123,24 +134,25 @@ public SyntheticsAssertionTarget type(SyntheticsAssertionType type) { } /** - * Type of the assertion. - * + *

Type of the assertion.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAssertionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAssertionType getType() { + return type; + } public void setType(SyntheticsAssertionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsAssertionTarget object is equal to o. */ + /** + * Return true if this SyntheticsAssertionTarget object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -150,15 +162,13 @@ public boolean equals(Object o) { return false; } SyntheticsAssertionTarget syntheticsAssertionTarget = (SyntheticsAssertionTarget) o; - return Objects.equals(this.operator, syntheticsAssertionTarget.operator) - && Objects.equals(this.property, syntheticsAssertionTarget.property) - && Objects.equals(this.target, syntheticsAssertionTarget.target) - && Objects.equals(this.type, syntheticsAssertionTarget.type); + return Objects.equals(this.operator, syntheticsAssertionTarget.operator) && Objects.equals(this.property, syntheticsAssertionTarget.property) && Objects.equals(this.target, syntheticsAssertionTarget.target) && Objects.equals(this.type, syntheticsAssertionTarget.type); } + @Override public int hashCode() { - return Objects.hash(operator, property, target, type); + return Objects.hash(operator,property,target,type); } @Override @@ -174,7 +184,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionType.java index f242731ac15..41a61273672 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionType.java @@ -6,74 +6,66 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the assertion. */ +/** + *

Type of the assertion.

+ */ @JsonSerialize(using = SyntheticsAssertionType.SyntheticsAssertionTypeSerializer.class) public class SyntheticsAssertionType { public static final SyntheticsAssertionType BODY = new SyntheticsAssertionType("body"); public static final SyntheticsAssertionType HEADER = new SyntheticsAssertionType("header"); - public static final SyntheticsAssertionType STATUS_CODE = - new SyntheticsAssertionType("statusCode"); - public static final SyntheticsAssertionType CERTIFICATE = - new SyntheticsAssertionType("certificate"); - public static final SyntheticsAssertionType RESPONSE_TIME = - new SyntheticsAssertionType("responseTime"); + public static final SyntheticsAssertionType STATUS_CODE = new SyntheticsAssertionType("statusCode"); + public static final SyntheticsAssertionType CERTIFICATE = new SyntheticsAssertionType("certificate"); + public static final SyntheticsAssertionType RESPONSE_TIME = new SyntheticsAssertionType("responseTime"); public static final SyntheticsAssertionType PROPERTY = new SyntheticsAssertionType("property"); - public static final SyntheticsAssertionType RECORD_EVERY = - new SyntheticsAssertionType("recordEvery"); - public static final SyntheticsAssertionType RECORD_SOME = - new SyntheticsAssertionType("recordSome"); - public static final SyntheticsAssertionType TLS_VERSION = - new SyntheticsAssertionType("tlsVersion"); - public static final SyntheticsAssertionType MIN_TLS_VERSION = - new SyntheticsAssertionType("minTlsVersion"); + public static final SyntheticsAssertionType RECORD_EVERY = new SyntheticsAssertionType("recordEvery"); + public static final SyntheticsAssertionType RECORD_SOME = new SyntheticsAssertionType("recordSome"); + public static final SyntheticsAssertionType TLS_VERSION = new SyntheticsAssertionType("tlsVersion"); + public static final SyntheticsAssertionType MIN_TLS_VERSION = new SyntheticsAssertionType("minTlsVersion"); public static final SyntheticsAssertionType LATENCY = new SyntheticsAssertionType("latency"); - public static final SyntheticsAssertionType PACKET_LOSS_PERCENTAGE = - new SyntheticsAssertionType("packetLossPercentage"); - public static final SyntheticsAssertionType PACKETS_RECEIVED = - new SyntheticsAssertionType("packetsReceived"); - public static final SyntheticsAssertionType NETWORK_HOP = - new SyntheticsAssertionType("networkHop"); - public static final SyntheticsAssertionType RECEIVED_MESSAGE = - new SyntheticsAssertionType("receivedMessage"); - public static final SyntheticsAssertionType GRPC_HEALTHCHECK_STATUS = - new SyntheticsAssertionType("grpcHealthcheckStatus"); - public static final SyntheticsAssertionType CONNECTION = - new SyntheticsAssertionType("connection"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "body", - "header", - "statusCode", - "certificate", - "responseTime", - "property", - "recordEvery", - "recordSome", - "tlsVersion", - "minTlsVersion", - "latency", - "packetLossPercentage", - "packetsReceived", - "networkHop", - "receivedMessage", - "grpcHealthcheckStatus", - "connection")); + public static final SyntheticsAssertionType PACKET_LOSS_PERCENTAGE = new SyntheticsAssertionType("packetLossPercentage"); + public static final SyntheticsAssertionType PACKETS_RECEIVED = new SyntheticsAssertionType("packetsReceived"); + public static final SyntheticsAssertionType NETWORK_HOP = new SyntheticsAssertionType("networkHop"); + public static final SyntheticsAssertionType RECEIVED_MESSAGE = new SyntheticsAssertionType("receivedMessage"); + public static final SyntheticsAssertionType GRPC_HEALTHCHECK_STATUS = new SyntheticsAssertionType("grpcHealthcheckStatus"); + public static final SyntheticsAssertionType CONNECTION = new SyntheticsAssertionType("connection"); + + private static final Set allowedValues = new HashSet(Arrays.asList("body", "header", "statusCode", "certificate", "responseTime", "property", "recordEvery", "recordSome", "tlsVersion", "minTlsVersion", "latency", "packetLossPercentage", "packetsReceived", "networkHop", "receivedMessage", "grpcHealthcheckStatus", "connection")); private String value; @@ -85,22 +77,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsAssertionTypeSerializer - extends StdSerializer { - public SyntheticsAssertionTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsAssertionTypeSerializer extends StdSerializer { + public SyntheticsAssertionTypeSerializer(Class t) { + super(t); + } - public SyntheticsAssertionTypeSerializer() { - this(null); - } + public SyntheticsAssertionTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsAssertionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsAssertionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -112,7 +101,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsAssertionType object is equal to o. */ + /** + * Return true if this SyntheticsAssertionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,7 +117,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathOperator.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathOperator.java index 61e07d2fff5..bb6d6a91b88 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathOperator.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathOperator.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Assertion operator to apply. */ -@JsonSerialize( - using = SyntheticsAssertionXPathOperator.SyntheticsAssertionXPathOperatorSerializer.class) +/** + *

Assertion operator to apply.

+ */ +@JsonSerialize(using = SyntheticsAssertionXPathOperator.SyntheticsAssertionXPathOperatorSerializer.class) public class SyntheticsAssertionXPathOperator { - public static final SyntheticsAssertionXPathOperator VALIDATES_X_PATH = - new SyntheticsAssertionXPathOperator("validatesXPath"); + public static final SyntheticsAssertionXPathOperator VALIDATES_X_PATH = new SyntheticsAssertionXPathOperator("validatesXPath"); - private static final Set allowedValues = - new HashSet(Arrays.asList("validatesXPath")); + private static final Set allowedValues = new HashSet(Arrays.asList("validatesXPath")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsAssertionXPathOperatorSerializer - extends StdSerializer { - public SyntheticsAssertionXPathOperatorSerializer(Class t) { - super(t); - } + public static class SyntheticsAssertionXPathOperatorSerializer extends StdSerializer { + public SyntheticsAssertionXPathOperatorSerializer(Class t) { + super(t); + } - public SyntheticsAssertionXPathOperatorSerializer() { - this(null); - } + public SyntheticsAssertionXPathOperatorSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsAssertionXPathOperator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsAssertionXPathOperator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsAssertionXPathOperator object is equal to o. */ + /** + * Return true if this SyntheticsAssertionXPathOperator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTarget.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTarget.java index 5ca0557b4f0..43b31cfc809 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTarget.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTarget.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An assertion for the validatesXPath operator. */ +/** + *

An assertion for the validatesXPath operator.

+ */ @JsonPropertyOrder({ SyntheticsAssertionXPathTarget.JSON_PROPERTY_OPERATOR, SyntheticsAssertionXPathTarget.JSON_PROPERTY_PROPERTY, SyntheticsAssertionXPathTarget.JSON_PROPERTY_TARGET, SyntheticsAssertionXPathTarget.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAssertionXPathTarget { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OPERATOR = "operator"; private SyntheticsAssertionXPathOperator operator; @@ -40,15 +59,13 @@ public SyntheticsAssertionXPathTarget() {} @JsonCreator public SyntheticsAssertionXPathTarget( - @JsonProperty(required = true, value = JSON_PROPERTY_OPERATOR) - SyntheticsAssertionXPathOperator operator, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsAssertionType type) { - this.operator = operator; - this.unparsed |= !operator.isValid(); - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_OPERATOR)SyntheticsAssertionXPathOperator operator, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsAssertionType type) { + this.operator = operator; + this.unparsed |= !operator.isValid(); + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsAssertionXPathTarget operator(SyntheticsAssertionXPathOperator operator) { this.operator = operator; this.unparsed |= !operator.isValid(); @@ -56,44 +73,40 @@ public SyntheticsAssertionXPathTarget operator(SyntheticsAssertionXPathOperator } /** - * Assertion operator to apply. - * + *

Assertion operator to apply.

* @return operator - */ - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAssertionXPathOperator getOperator() { - return operator; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAssertionXPathOperator getOperator() { + return operator; + } public void setOperator(SyntheticsAssertionXPathOperator operator) { if (!operator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.operator = operator; } - public SyntheticsAssertionXPathTarget property(String property) { this.property = property; return this; } /** - * The associated assertion property. - * + *

The associated assertion property.

* @return property - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProperty() { - return property; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { + return property; + } public void setProperty(String property) { this.property = property; } - public SyntheticsAssertionXPathTarget target(SyntheticsAssertionXPathTargetTarget target) { this.target = target; this.unparsed |= target.unparsed; @@ -101,21 +114,19 @@ public SyntheticsAssertionXPathTarget target(SyntheticsAssertionXPathTargetTarge } /** - * Composed target for validatesXPath operator. - * + *

Composed target for validatesXPath operator.

* @return target - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsAssertionXPathTargetTarget getTarget() { - return target; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsAssertionXPathTargetTarget getTarget() { + return target; + } public void setTarget(SyntheticsAssertionXPathTargetTarget target) { this.target = target; } - public SyntheticsAssertionXPathTarget type(SyntheticsAssertionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -123,24 +134,25 @@ public SyntheticsAssertionXPathTarget type(SyntheticsAssertionType type) { } /** - * Type of the assertion. - * + *

Type of the assertion.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsAssertionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsAssertionType getType() { + return type; + } public void setType(SyntheticsAssertionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsAssertionXPathTarget object is equal to o. */ + /** + * Return true if this SyntheticsAssertionXPathTarget object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -149,17 +161,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsAssertionXPathTarget syntheticsAssertionXPathTarget = - (SyntheticsAssertionXPathTarget) o; - return Objects.equals(this.operator, syntheticsAssertionXPathTarget.operator) - && Objects.equals(this.property, syntheticsAssertionXPathTarget.property) - && Objects.equals(this.target, syntheticsAssertionXPathTarget.target) - && Objects.equals(this.type, syntheticsAssertionXPathTarget.type); + SyntheticsAssertionXPathTarget syntheticsAssertionXPathTarget = (SyntheticsAssertionXPathTarget) o; + return Objects.equals(this.operator, syntheticsAssertionXPathTarget.operator) && Objects.equals(this.property, syntheticsAssertionXPathTarget.property) && Objects.equals(this.target, syntheticsAssertionXPathTarget.target) && Objects.equals(this.type, syntheticsAssertionXPathTarget.type); } + @Override public int hashCode() { - return Objects.hash(operator, property, target, type); + return Objects.hash(operator,property,target,type); } @Override @@ -175,7 +184,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTargetTarget.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTargetTarget.java index e5238525ab0..450c51351b8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTargetTarget.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsAssertionXPathTargetTarget.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Composed target for validatesXPath operator. */ + +/** + *

Composed target for validatesXPath operator.

+ */ @JsonPropertyOrder({ SyntheticsAssertionXPathTargetTarget.JSON_PROPERTY_OPERATOR, SyntheticsAssertionXPathTargetTarget.JSON_PROPERTY_TARGET_VALUE, SyntheticsAssertionXPathTargetTarget.JSON_PROPERTY_X_PATH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsAssertionXPathTargetTarget { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OPERATOR = "operator"; private String operator; @@ -37,64 +57,61 @@ public SyntheticsAssertionXPathTargetTarget operator(String operator) { } /** - * The specific operator to use on the path. - * + *

The specific operator to use on the path.

* @return operator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOperator() { - return operator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOperator() { + return operator; + } public void setOperator(String operator) { this.operator = operator; } - public SyntheticsAssertionXPathTargetTarget targetValue(Object targetValue) { this.targetValue = targetValue; return this; } /** - * The path target value to compare to. - * + *

The path target value to compare to.

* @return targetValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TARGET_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getTargetValue() { - return targetValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getTargetValue() { + return targetValue; + } public void setTargetValue(Object targetValue) { this.targetValue = targetValue; } - public SyntheticsAssertionXPathTargetTarget xPath(String xPath) { this.xPath = xPath; return this; } /** - * The X path to assert. - * + *

The X path to assert.

* @return xPath - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_X_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getXPath() { - return xPath; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_X_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getXPath() { + return xPath; + } public void setXPath(String xPath) { this.xPath = xPath; } - /** Return true if this SyntheticsAssertionXPathTargetTarget object is equal to o. */ + /** + * Return true if this SyntheticsAssertionXPathTargetTarget object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,16 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsAssertionXPathTargetTarget syntheticsAssertionXPathTargetTarget = - (SyntheticsAssertionXPathTargetTarget) o; - return Objects.equals(this.operator, syntheticsAssertionXPathTargetTarget.operator) - && Objects.equals(this.targetValue, syntheticsAssertionXPathTargetTarget.targetValue) - && Objects.equals(this.xPath, syntheticsAssertionXPathTargetTarget.xPath); + SyntheticsAssertionXPathTargetTarget syntheticsAssertionXPathTargetTarget = (SyntheticsAssertionXPathTargetTarget) o; + return Objects.equals(this.operator, syntheticsAssertionXPathTargetTarget.operator) && Objects.equals(this.targetValue, syntheticsAssertionXPathTargetTarget.targetValue) && Objects.equals(this.xPath, syntheticsAssertionXPathTargetTarget.xPath); } + @Override public int hashCode() { - return Objects.hash(operator, targetValue, xPath); + return Objects.hash(operator,targetValue,xPath); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuth.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuth.java index 8b3e4f6a80f..4f276a1f830 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuth.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuth.java @@ -6,549 +6,461 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = SyntheticsBasicAuth.SyntheticsBasicAuthDeserializer.class) @JsonSerialize(using = SyntheticsBasicAuth.SyntheticsBasicAuthSerializer.class) public class SyntheticsBasicAuth extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(SyntheticsBasicAuth.class.getName()); + private static final Logger log = Logger.getLogger(SyntheticsBasicAuth.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class SyntheticsBasicAuthSerializer extends StdSerializer { - public SyntheticsBasicAuthSerializer(Class t) { - super(t); - } + public static class SyntheticsBasicAuthSerializer extends StdSerializer { + public SyntheticsBasicAuthSerializer(Class t) { + super(t); + } + + public SyntheticsBasicAuthSerializer() { + this(null); + } - public SyntheticsBasicAuthSerializer() { - this(null); + @Override + public void serialize(SyntheticsBasicAuth value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public void serialize( - SyntheticsBasicAuth value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + public static class SyntheticsBasicAuthDeserializer extends StdDeserializer { + public SyntheticsBasicAuthDeserializer() { + this(SyntheticsBasicAuth.class); + } + + public SyntheticsBasicAuthDeserializer(Class vc) { + super(vc); + } + + @Override + public SyntheticsBasicAuth 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 SyntheticsBasicAuthWeb + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthWeb.class.equals(Integer.class) || SyntheticsBasicAuthWeb.class.equals(Long.class) || SyntheticsBasicAuthWeb.class.equals(Float.class) || SyntheticsBasicAuthWeb.class.equals(Double.class) || SyntheticsBasicAuthWeb.class.equals(Boolean.class) || SyntheticsBasicAuthWeb.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsBasicAuthWeb.class.equals(Integer.class) || SyntheticsBasicAuthWeb.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsBasicAuthWeb.class.equals(Float.class) || SyntheticsBasicAuthWeb.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsBasicAuthWeb.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsBasicAuthWeb.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthWeb.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 (!((SyntheticsBasicAuthWeb)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthWeb'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthWeb'", e); + } + + // deserialize SyntheticsBasicAuthSigv4 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthSigv4.class.equals(Integer.class) || SyntheticsBasicAuthSigv4.class.equals(Long.class) || SyntheticsBasicAuthSigv4.class.equals(Float.class) || SyntheticsBasicAuthSigv4.class.equals(Double.class) || SyntheticsBasicAuthSigv4.class.equals(Boolean.class) || SyntheticsBasicAuthSigv4.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsBasicAuthSigv4.class.equals(Integer.class) || SyntheticsBasicAuthSigv4.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsBasicAuthSigv4.class.equals(Float.class) || SyntheticsBasicAuthSigv4.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsBasicAuthSigv4.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsBasicAuthSigv4.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthSigv4.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 (!((SyntheticsBasicAuthSigv4)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthSigv4'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthSigv4'", e); + } + + // deserialize SyntheticsBasicAuthNTLM + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthNTLM.class.equals(Integer.class) || SyntheticsBasicAuthNTLM.class.equals(Long.class) || SyntheticsBasicAuthNTLM.class.equals(Float.class) || SyntheticsBasicAuthNTLM.class.equals(Double.class) || SyntheticsBasicAuthNTLM.class.equals(Boolean.class) || SyntheticsBasicAuthNTLM.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsBasicAuthNTLM.class.equals(Integer.class) || SyntheticsBasicAuthNTLM.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsBasicAuthNTLM.class.equals(Float.class) || SyntheticsBasicAuthNTLM.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsBasicAuthNTLM.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsBasicAuthNTLM.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthNTLM.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 (!((SyntheticsBasicAuthNTLM)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthNTLM'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthNTLM'", e); + } + + // deserialize SyntheticsBasicAuthDigest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthDigest.class.equals(Integer.class) || SyntheticsBasicAuthDigest.class.equals(Long.class) || SyntheticsBasicAuthDigest.class.equals(Float.class) || SyntheticsBasicAuthDigest.class.equals(Double.class) || SyntheticsBasicAuthDigest.class.equals(Boolean.class) || SyntheticsBasicAuthDigest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsBasicAuthDigest.class.equals(Integer.class) || SyntheticsBasicAuthDigest.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsBasicAuthDigest.class.equals(Float.class) || SyntheticsBasicAuthDigest.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsBasicAuthDigest.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsBasicAuthDigest.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthDigest.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 (!((SyntheticsBasicAuthDigest)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthDigest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthDigest'", e); + } + + // deserialize SyntheticsBasicAuthOauthClient + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthOauthClient.class.equals(Integer.class) || SyntheticsBasicAuthOauthClient.class.equals(Long.class) || SyntheticsBasicAuthOauthClient.class.equals(Float.class) || SyntheticsBasicAuthOauthClient.class.equals(Double.class) || SyntheticsBasicAuthOauthClient.class.equals(Boolean.class) || SyntheticsBasicAuthOauthClient.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsBasicAuthOauthClient.class.equals(Integer.class) || SyntheticsBasicAuthOauthClient.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsBasicAuthOauthClient.class.equals(Float.class) || SyntheticsBasicAuthOauthClient.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsBasicAuthOauthClient.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsBasicAuthOauthClient.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthOauthClient.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 (!((SyntheticsBasicAuthOauthClient)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthOauthClient'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthOauthClient'", e); + } + + // deserialize SyntheticsBasicAuthOauthROP + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthOauthROP.class.equals(Integer.class) || SyntheticsBasicAuthOauthROP.class.equals(Long.class) || SyntheticsBasicAuthOauthROP.class.equals(Float.class) || SyntheticsBasicAuthOauthROP.class.equals(Double.class) || SyntheticsBasicAuthOauthROP.class.equals(Boolean.class) || SyntheticsBasicAuthOauthROP.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SyntheticsBasicAuthOauthROP.class.equals(Integer.class) || SyntheticsBasicAuthOauthROP.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SyntheticsBasicAuthOauthROP.class.equals(Float.class) || SyntheticsBasicAuthOauthROP.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SyntheticsBasicAuthOauthROP.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SyntheticsBasicAuthOauthROP.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthOauthROP.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 (!((SyntheticsBasicAuthOauthROP)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthOauthROP'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthOauthROP'", e); + } + + SyntheticsBasicAuth ret = new SyntheticsBasicAuth(); + 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 SyntheticsBasicAuth getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SyntheticsBasicAuth cannot be null"); + } } - } - public static class SyntheticsBasicAuthDeserializer extends StdDeserializer { - public SyntheticsBasicAuthDeserializer() { - this(SyntheticsBasicAuth.class); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SyntheticsBasicAuth() { + super("oneOf", Boolean.FALSE); + } + public SyntheticsBasicAuth(SyntheticsBasicAuthWeb o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsBasicAuth(SyntheticsBasicAuthSigv4 o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsBasicAuth(SyntheticsBasicAuthNTLM o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsBasicAuth(SyntheticsBasicAuthDigest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsBasicAuth(SyntheticsBasicAuthOauthClient o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SyntheticsBasicAuth(SyntheticsBasicAuthOauthROP o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SyntheticsBasicAuthDeserializer(Class vc) { - super(vc); + static { + schemas.put("SyntheticsBasicAuthWeb", new GenericType() { + }); + schemas.put("SyntheticsBasicAuthSigv4", new GenericType() { + }); + schemas.put("SyntheticsBasicAuthNTLM", new GenericType() { + }); + schemas.put("SyntheticsBasicAuthDigest", new GenericType() { + }); + schemas.put("SyntheticsBasicAuthOauthClient", new GenericType() { + }); + schemas.put("SyntheticsBasicAuthOauthROP", new GenericType() { + }); + JSON.registerDescendants(SyntheticsBasicAuth.class, Collections.unmodifiableMap(schemas)); } @Override - public SyntheticsBasicAuth 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 SyntheticsBasicAuthWeb - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsBasicAuthWeb.class.equals(Integer.class) - || SyntheticsBasicAuthWeb.class.equals(Long.class) - || SyntheticsBasicAuthWeb.class.equals(Float.class) - || SyntheticsBasicAuthWeb.class.equals(Double.class) - || SyntheticsBasicAuthWeb.class.equals(Boolean.class) - || SyntheticsBasicAuthWeb.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsBasicAuthWeb.class.equals(Integer.class) - || SyntheticsBasicAuthWeb.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsBasicAuthWeb.class.equals(Float.class) - || SyntheticsBasicAuthWeb.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsBasicAuthWeb.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsBasicAuthWeb.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthWeb.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 (!((SyntheticsBasicAuthWeb) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthWeb'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthWeb'", e); - } - - // deserialize SyntheticsBasicAuthSigv4 - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsBasicAuthSigv4.class.equals(Integer.class) - || SyntheticsBasicAuthSigv4.class.equals(Long.class) - || SyntheticsBasicAuthSigv4.class.equals(Float.class) - || SyntheticsBasicAuthSigv4.class.equals(Double.class) - || SyntheticsBasicAuthSigv4.class.equals(Boolean.class) - || SyntheticsBasicAuthSigv4.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsBasicAuthSigv4.class.equals(Integer.class) - || SyntheticsBasicAuthSigv4.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsBasicAuthSigv4.class.equals(Float.class) - || SyntheticsBasicAuthSigv4.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsBasicAuthSigv4.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsBasicAuthSigv4.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthSigv4.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 (!((SyntheticsBasicAuthSigv4) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthSigv4'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthSigv4'", e); - } + public Map getSchemas() { + return SyntheticsBasicAuth.schemas; + } - // deserialize SyntheticsBasicAuthNTLM - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsBasicAuthNTLM.class.equals(Integer.class) - || SyntheticsBasicAuthNTLM.class.equals(Long.class) - || SyntheticsBasicAuthNTLM.class.equals(Float.class) - || SyntheticsBasicAuthNTLM.class.equals(Double.class) - || SyntheticsBasicAuthNTLM.class.equals(Boolean.class) - || SyntheticsBasicAuthNTLM.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsBasicAuthNTLM.class.equals(Integer.class) - || SyntheticsBasicAuthNTLM.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsBasicAuthNTLM.class.equals(Float.class) - || SyntheticsBasicAuthNTLM.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsBasicAuthNTLM.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsBasicAuthNTLM.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP + * + * 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(SyntheticsBasicAuthWeb.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthNTLM.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 (!((SyntheticsBasicAuthNTLM) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthNTLM'"); + if (JSON.isInstanceOf(SyntheticsBasicAuthSigv4.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthNTLM'", e); - } - - // deserialize SyntheticsBasicAuthDigest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsBasicAuthDigest.class.equals(Integer.class) - || SyntheticsBasicAuthDigest.class.equals(Long.class) - || SyntheticsBasicAuthDigest.class.equals(Float.class) - || SyntheticsBasicAuthDigest.class.equals(Double.class) - || SyntheticsBasicAuthDigest.class.equals(Boolean.class) - || SyntheticsBasicAuthDigest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsBasicAuthDigest.class.equals(Integer.class) - || SyntheticsBasicAuthDigest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsBasicAuthDigest.class.equals(Float.class) - || SyntheticsBasicAuthDigest.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsBasicAuthDigest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsBasicAuthDigest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(SyntheticsBasicAuthNTLM.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthDigest.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 (!((SyntheticsBasicAuthDigest) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthDigest'"); + if (JSON.isInstanceOf(SyntheticsBasicAuthDigest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthDigest'", e); - } - - // deserialize SyntheticsBasicAuthOauthClient - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsBasicAuthOauthClient.class.equals(Integer.class) - || SyntheticsBasicAuthOauthClient.class.equals(Long.class) - || SyntheticsBasicAuthOauthClient.class.equals(Float.class) - || SyntheticsBasicAuthOauthClient.class.equals(Double.class) - || SyntheticsBasicAuthOauthClient.class.equals(Boolean.class) - || SyntheticsBasicAuthOauthClient.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsBasicAuthOauthClient.class.equals(Integer.class) - || SyntheticsBasicAuthOauthClient.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsBasicAuthOauthClient.class.equals(Float.class) - || SyntheticsBasicAuthOauthClient.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsBasicAuthOauthClient.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsBasicAuthOauthClient.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(SyntheticsBasicAuthOauthClient.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthOauthClient.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 (!((SyntheticsBasicAuthOauthClient) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthOauthClient'"); + if (JSON.isInstanceOf(SyntheticsBasicAuthOauthROP.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthOauthClient'", e); - } - // deserialize SyntheticsBasicAuthOauthROP - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SyntheticsBasicAuthOauthROP.class.equals(Integer.class) - || SyntheticsBasicAuthOauthROP.class.equals(Long.class) - || SyntheticsBasicAuthOauthROP.class.equals(Float.class) - || SyntheticsBasicAuthOauthROP.class.equals(Double.class) - || SyntheticsBasicAuthOauthROP.class.equals(Boolean.class) - || SyntheticsBasicAuthOauthROP.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SyntheticsBasicAuthOauthROP.class.equals(Integer.class) - || SyntheticsBasicAuthOauthROP.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SyntheticsBasicAuthOauthROP.class.equals(Float.class) - || SyntheticsBasicAuthOauthROP.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SyntheticsBasicAuthOauthROP.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SyntheticsBasicAuthOauthROP.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthOauthROP.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 (!((SyntheticsBasicAuthOauthROP) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthOauthROP'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthOauthROP'", e); - } - - SyntheticsBasicAuth ret = new SyntheticsBasicAuth(); - 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; + throw new RuntimeException("Invalid instance type. Must be SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP + * + * @return The actual instance (SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP) + */ @Override - public SyntheticsBasicAuth getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SyntheticsBasicAuth cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public SyntheticsBasicAuth() { - super("oneOf", Boolean.FALSE); - } - - public SyntheticsBasicAuth(SyntheticsBasicAuthWeb o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsBasicAuth(SyntheticsBasicAuthSigv4 o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsBasicAuth(SyntheticsBasicAuthNTLM o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsBasicAuth(SyntheticsBasicAuthDigest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsBasicAuth(SyntheticsBasicAuthOauthClient o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SyntheticsBasicAuth(SyntheticsBasicAuthOauthROP o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("SyntheticsBasicAuthWeb", new GenericType() {}); - schemas.put("SyntheticsBasicAuthSigv4", new GenericType() {}); - schemas.put("SyntheticsBasicAuthNTLM", new GenericType() {}); - schemas.put("SyntheticsBasicAuthDigest", new GenericType() {}); - schemas.put( - "SyntheticsBasicAuthOauthClient", new GenericType() {}); - schemas.put("SyntheticsBasicAuthOauthROP", new GenericType() {}); - JSON.registerDescendants(SyntheticsBasicAuth.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SyntheticsBasicAuth.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, - * SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, - * SyntheticsBasicAuthOauthROP - * - *

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(SyntheticsBasicAuthWeb.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SyntheticsBasicAuthSigv4.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SyntheticsBasicAuthNTLM.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SyntheticsBasicAuthDigest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SyntheticsBasicAuthOauthClient.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SyntheticsBasicAuthOauthROP.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SyntheticsBasicAuthWeb`. If the actual instance is not `SyntheticsBasicAuthWeb`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthWeb` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthWeb` + */ + public SyntheticsBasicAuthWeb getSyntheticsBasicAuthWeb() throws ClassCastException { + return (SyntheticsBasicAuthWeb)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SyntheticsBasicAuthSigv4`. If the actual instance is not `SyntheticsBasicAuthSigv4`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthSigv4` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthSigv4` + */ + public SyntheticsBasicAuthSigv4 getSyntheticsBasicAuthSigv4() throws ClassCastException { + return (SyntheticsBasicAuthSigv4)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4," - + " SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient," - + " SyntheticsBasicAuthOauthROP"); - } - - /** - * Get the actual instance, which can be the following: SyntheticsBasicAuthWeb, - * SyntheticsBasicAuthSigv4, SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, - * SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP - * - * @return The actual instance (SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, - * SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, - * SyntheticsBasicAuthOauthROP) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SyntheticsBasicAuthWeb`. If the actual instance is not - * `SyntheticsBasicAuthWeb`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsBasicAuthWeb` - * @throws ClassCastException if the instance is not `SyntheticsBasicAuthWeb` - */ - public SyntheticsBasicAuthWeb getSyntheticsBasicAuthWeb() throws ClassCastException { - return (SyntheticsBasicAuthWeb) super.getActualInstance(); - } - /** - * Get the actual instance of `SyntheticsBasicAuthSigv4`. If the actual instance is not - * `SyntheticsBasicAuthSigv4`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsBasicAuthSigv4` - * @throws ClassCastException if the instance is not `SyntheticsBasicAuthSigv4` - */ - public SyntheticsBasicAuthSigv4 getSyntheticsBasicAuthSigv4() throws ClassCastException { - return (SyntheticsBasicAuthSigv4) super.getActualInstance(); - } - - /** - * Get the actual instance of `SyntheticsBasicAuthNTLM`. If the actual instance is not - * `SyntheticsBasicAuthNTLM`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsBasicAuthNTLM` - * @throws ClassCastException if the instance is not `SyntheticsBasicAuthNTLM` - */ - public SyntheticsBasicAuthNTLM getSyntheticsBasicAuthNTLM() throws ClassCastException { - return (SyntheticsBasicAuthNTLM) super.getActualInstance(); - } + /** + * Get the actual instance of `SyntheticsBasicAuthNTLM`. If the actual instance is not `SyntheticsBasicAuthNTLM`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthNTLM` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthNTLM` + */ + public SyntheticsBasicAuthNTLM getSyntheticsBasicAuthNTLM() throws ClassCastException { + return (SyntheticsBasicAuthNTLM)super.getActualInstance(); + } - /** - * Get the actual instance of `SyntheticsBasicAuthDigest`. If the actual instance is not - * `SyntheticsBasicAuthDigest`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsBasicAuthDigest` - * @throws ClassCastException if the instance is not `SyntheticsBasicAuthDigest` - */ - public SyntheticsBasicAuthDigest getSyntheticsBasicAuthDigest() throws ClassCastException { - return (SyntheticsBasicAuthDigest) super.getActualInstance(); - } + /** + * Get the actual instance of `SyntheticsBasicAuthDigest`. If the actual instance is not `SyntheticsBasicAuthDigest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthDigest` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthDigest` + */ + public SyntheticsBasicAuthDigest getSyntheticsBasicAuthDigest() throws ClassCastException { + return (SyntheticsBasicAuthDigest)super.getActualInstance(); + } - /** - * Get the actual instance of `SyntheticsBasicAuthOauthClient`. If the actual instance is not - * `SyntheticsBasicAuthOauthClient`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsBasicAuthOauthClient` - * @throws ClassCastException if the instance is not `SyntheticsBasicAuthOauthClient` - */ - public SyntheticsBasicAuthOauthClient getSyntheticsBasicAuthOauthClient() - throws ClassCastException { - return (SyntheticsBasicAuthOauthClient) super.getActualInstance(); - } + /** + * Get the actual instance of `SyntheticsBasicAuthOauthClient`. If the actual instance is not `SyntheticsBasicAuthOauthClient`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthOauthClient` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthOauthClient` + */ + public SyntheticsBasicAuthOauthClient getSyntheticsBasicAuthOauthClient() throws ClassCastException { + return (SyntheticsBasicAuthOauthClient)super.getActualInstance(); + } - /** - * Get the actual instance of `SyntheticsBasicAuthOauthROP`. If the actual instance is not - * `SyntheticsBasicAuthOauthROP`, the ClassCastException will be thrown. - * - * @return The actual instance of `SyntheticsBasicAuthOauthROP` - * @throws ClassCastException if the instance is not `SyntheticsBasicAuthOauthROP` - */ - public SyntheticsBasicAuthOauthROP getSyntheticsBasicAuthOauthROP() throws ClassCastException { - return (SyntheticsBasicAuthOauthROP) super.getActualInstance(); - } + /** + * Get the actual instance of `SyntheticsBasicAuthOauthROP`. If the actual instance is not `SyntheticsBasicAuthOauthROP`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthOauthROP` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthOauthROP` + */ + public SyntheticsBasicAuthOauthROP getSyntheticsBasicAuthOauthROP() throws ClassCastException { + return (SyntheticsBasicAuthOauthROP)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigest.java index 325e5961244..b384da2cea1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigest.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to handle digest authentication when performing the test. */ + +/** + *

Object to handle digest authentication when performing the test.

+ */ @JsonPropertyOrder({ SyntheticsBasicAuthDigest.JSON_PROPERTY_PASSWORD, SyntheticsBasicAuthDigest.JSON_PROPERTY_TYPE, SyntheticsBasicAuthDigest.JSON_PROPERTY_USERNAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBasicAuthDigest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; @@ -36,32 +55,29 @@ public SyntheticsBasicAuthDigest() {} @JsonCreator public SyntheticsBasicAuthDigest( - @JsonProperty(required = true, value = JSON_PROPERTY_PASSWORD) String password, - @JsonProperty(required = true, value = JSON_PROPERTY_USERNAME) String username) { - this.password = password; - this.username = username; + @JsonProperty(required=true, value=JSON_PROPERTY_PASSWORD)String password, + @JsonProperty(required=true, value=JSON_PROPERTY_USERNAME)String username) { + this.password = password; + this.username = username; } - public SyntheticsBasicAuthDigest password(String password) { this.password = password; return this; } /** - * Password to use for the digest authentication. - * + *

Password to use for the digest authentication.

* @return password - */ - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPassword() { - return password; - } - + **/ + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPassword() { + return password; + } public void setPassword(String password) { this.password = password; } - public SyntheticsBasicAuthDigest type(SyntheticsBasicAuthDigestType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,45 +85,44 @@ public SyntheticsBasicAuthDigest type(SyntheticsBasicAuthDigestType type) { } /** - * The type of basic authentication to use when performing the test. - * + *

The type of basic authentication to use when performing the test.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBasicAuthDigestType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuthDigestType getType() { + return type; + } public void setType(SyntheticsBasicAuthDigestType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SyntheticsBasicAuthDigest username(String username) { this.username = username; return this; } /** - * Username to use for the digest authentication. - * + *

Username to use for the digest authentication.

* @return username - */ - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUsername() { - return username; - } - + **/ + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUsername() { + return username; + } public void setUsername(String username) { this.username = username; } - /** Return true if this SyntheticsBasicAuthDigest object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthDigest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,14 +132,13 @@ public boolean equals(Object o) { return false; } SyntheticsBasicAuthDigest syntheticsBasicAuthDigest = (SyntheticsBasicAuthDigest) o; - return Objects.equals(this.password, syntheticsBasicAuthDigest.password) - && Objects.equals(this.type, syntheticsBasicAuthDigest.type) - && Objects.equals(this.username, syntheticsBasicAuthDigest.username); + return Objects.equals(this.password, syntheticsBasicAuthDigest.password) && Objects.equals(this.type, syntheticsBasicAuthDigest.type) && Objects.equals(this.username, syntheticsBasicAuthDigest.username); } + @Override public int hashCode() { - return Objects.hash(password, type, username); + return Objects.hash(password,type,username); } @Override @@ -139,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigestType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigestType.java index 76aa1262c09..38630b53aee 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthDigestType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of basic authentication to use when performing the test. */ +/** + *

The type of basic authentication to use when performing the test.

+ */ @JsonSerialize(using = SyntheticsBasicAuthDigestType.SyntheticsBasicAuthDigestTypeSerializer.class) public class SyntheticsBasicAuthDigestType { - public static final SyntheticsBasicAuthDigestType DIGEST = - new SyntheticsBasicAuthDigestType("digest"); + public static final SyntheticsBasicAuthDigestType DIGEST = new SyntheticsBasicAuthDigestType("digest"); private static final Set allowedValues = new HashSet(Arrays.asList("digest")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthDigestTypeSerializer - extends StdSerializer { - public SyntheticsBasicAuthDigestTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBasicAuthDigestTypeSerializer extends StdSerializer { + public SyntheticsBasicAuthDigestTypeSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthDigestTypeSerializer() { - this(null); - } + public SyntheticsBasicAuthDigestTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthDigestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthDigestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthDigestType object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthDigestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLM.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLM.java index 0adc3c2c3fc..44f561fb4da 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLM.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLM.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object to handle NTLM authentication when performing the test. */ +/** + *

Object to handle NTLM authentication when performing the test.

+ */ @JsonPropertyOrder({ SyntheticsBasicAuthNTLM.JSON_PROPERTY_DOMAIN, SyntheticsBasicAuthNTLM.JSON_PROPERTY_PASSWORD, @@ -21,10 +40,10 @@ SyntheticsBasicAuthNTLM.JSON_PROPERTY_USERNAME, SyntheticsBasicAuthNTLM.JSON_PROPERTY_WORKSTATION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBasicAuthNTLM { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DOMAIN = "domain"; private String domain; @@ -44,53 +63,48 @@ public SyntheticsBasicAuthNTLM() {} @JsonCreator public SyntheticsBasicAuthNTLM( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsBasicAuthNTLMType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsBasicAuthNTLMType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsBasicAuthNTLM domain(String domain) { this.domain = domain; return this; } /** - * Domain for the authentication to use when performing the test. - * + *

Domain for the authentication to use when performing the test.

* @return domain - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOMAIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDomain() { - return domain; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } public void setDomain(String domain) { this.domain = domain; } - public SyntheticsBasicAuthNTLM password(String password) { this.password = password; return this; } /** - * Password for the authentication to use when performing the test. - * + *

Password for the authentication to use when performing the test.

* @return password - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPassword() { - return password; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPassword() { + return password; + } public void setPassword(String password) { this.password = password; } - public SyntheticsBasicAuthNTLM type(SyntheticsBasicAuthNTLMType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -98,66 +112,63 @@ public SyntheticsBasicAuthNTLM type(SyntheticsBasicAuthNTLMType type) { } /** - * The type of authentication to use when performing the test. - * + *

The type of authentication to use when performing the test.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBasicAuthNTLMType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBasicAuthNTLMType getType() { + return type; + } public void setType(SyntheticsBasicAuthNTLMType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SyntheticsBasicAuthNTLM username(String username) { this.username = username; return this; } /** - * Username for the authentication to use when performing the test. - * + *

Username for the authentication to use when performing the test.

* @return username - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUsername() { - return username; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUsername() { + return username; + } public void setUsername(String username) { this.username = username; } - public SyntheticsBasicAuthNTLM workstation(String workstation) { this.workstation = workstation; return this; } /** - * Workstation for the authentication to use when performing the test. - * + *

Workstation for the authentication to use when performing the test.

* @return workstation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WORKSTATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getWorkstation() { - return workstation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKSTATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getWorkstation() { + return workstation; + } public void setWorkstation(String workstation) { this.workstation = workstation; } - /** Return true if this SyntheticsBasicAuthNTLM object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthNTLM object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -167,16 +178,13 @@ public boolean equals(Object o) { return false; } SyntheticsBasicAuthNTLM syntheticsBasicAuthNtlm = (SyntheticsBasicAuthNTLM) o; - return Objects.equals(this.domain, syntheticsBasicAuthNtlm.domain) - && Objects.equals(this.password, syntheticsBasicAuthNtlm.password) - && Objects.equals(this.type, syntheticsBasicAuthNtlm.type) - && Objects.equals(this.username, syntheticsBasicAuthNtlm.username) - && Objects.equals(this.workstation, syntheticsBasicAuthNtlm.workstation); + return Objects.equals(this.domain, syntheticsBasicAuthNtlm.domain) && Objects.equals(this.password, syntheticsBasicAuthNtlm.password) && Objects.equals(this.type, syntheticsBasicAuthNtlm.type) && Objects.equals(this.username, syntheticsBasicAuthNtlm.username) && Objects.equals(this.workstation, syntheticsBasicAuthNtlm.workstation); } + @Override public int hashCode() { - return Objects.hash(domain, password, type, username, workstation); + return Objects.hash(domain,password,type,username,workstation); } @Override @@ -193,7 +201,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLMType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLMType.java index 19911e8e787..b07c8c9d58b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLMType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthNTLMType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of authentication to use when performing the test. */ +/** + *

The type of authentication to use when performing the test.

+ */ @JsonSerialize(using = SyntheticsBasicAuthNTLMType.SyntheticsBasicAuthNTLMTypeSerializer.class) public class SyntheticsBasicAuthNTLMType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthNTLMTypeSerializer - extends StdSerializer { - public SyntheticsBasicAuthNTLMTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBasicAuthNTLMTypeSerializer extends StdSerializer { + public SyntheticsBasicAuthNTLMTypeSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthNTLMTypeSerializer() { - this(null); - } + public SyntheticsBasicAuthNTLMTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthNTLMType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthNTLMType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthNTLMType object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthNTLMType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClient.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClient.java index 7cb8d57e4a3..51e53cad1ae 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClient.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClient.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to handle oauth client authentication when performing the test. */ + +/** + *

Object to handle oauth client authentication when performing the test.

+ */ @JsonPropertyOrder({ SyntheticsBasicAuthOauthClient.JSON_PROPERTY_ACCESS_TOKEN_URL, SyntheticsBasicAuthOauthClient.JSON_PROPERTY_AUDIENCE, @@ -24,10 +43,10 @@ SyntheticsBasicAuthOauthClient.JSON_PROPERTY_TOKEN_API_AUTHENTICATION, SyntheticsBasicAuthOauthClient.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBasicAuthOauthClient { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCESS_TOKEN_URL = "accessTokenUrl"; private String accessTokenUrl; @@ -56,167 +75,149 @@ public SyntheticsBasicAuthOauthClient() {} @JsonCreator public SyntheticsBasicAuthOauthClient( - @JsonProperty(required = true, value = JSON_PROPERTY_ACCESS_TOKEN_URL) String accessTokenUrl, - @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ID) String clientId, - @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_SECRET) String clientSecret, - @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN_API_AUTHENTICATION) - SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { - this.accessTokenUrl = accessTokenUrl; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.tokenApiAuthentication = tokenApiAuthentication; - this.unparsed |= !tokenApiAuthentication.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ACCESS_TOKEN_URL)String accessTokenUrl, + @JsonProperty(required=true, value=JSON_PROPERTY_CLIENT_ID)String clientId, + @JsonProperty(required=true, value=JSON_PROPERTY_CLIENT_SECRET)String clientSecret, + @JsonProperty(required=true, value=JSON_PROPERTY_TOKEN_API_AUTHENTICATION)SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { + this.accessTokenUrl = accessTokenUrl; + this.clientId = clientId; + this.clientSecret = clientSecret; + this.tokenApiAuthentication = tokenApiAuthentication; + this.unparsed |= !tokenApiAuthentication.isValid(); } - public SyntheticsBasicAuthOauthClient accessTokenUrl(String accessTokenUrl) { this.accessTokenUrl = accessTokenUrl; return this; } /** - * Access token URL to use when performing the authentication. - * + *

Access token URL to use when performing the authentication.

* @return accessTokenUrl - */ - @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccessTokenUrl() { - return accessTokenUrl; - } - + **/ + @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccessTokenUrl() { + return accessTokenUrl; + } public void setAccessTokenUrl(String accessTokenUrl) { this.accessTokenUrl = accessTokenUrl; } - public SyntheticsBasicAuthOauthClient audience(String audience) { this.audience = audience; return this; } /** - * Audience to use when performing the authentication. - * + *

Audience to use when performing the authentication.

* @return audience - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAudience() { - return audience; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIENCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAudience() { + return audience; + } public void setAudience(String audience) { this.audience = audience; } - public SyntheticsBasicAuthOauthClient clientId(String clientId) { this.clientId = clientId; return this; } /** - * Client ID to use when performing the authentication. - * + *

Client ID to use when performing the authentication.

* @return clientId - */ - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - + **/ + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } public void setClientId(String clientId) { this.clientId = clientId; } - public SyntheticsBasicAuthOauthClient clientSecret(String clientSecret) { this.clientSecret = clientSecret; return this; } /** - * Client secret to use when performing the authentication. - * + *

Client secret to use when performing the authentication.

* @return clientSecret - */ - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientSecret() { - return clientSecret; - } - + **/ + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getClientSecret() { + return clientSecret; + } public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } - public SyntheticsBasicAuthOauthClient resource(String resource) { this.resource = resource; return this; } /** - * Resource to use when performing the authentication. - * + *

Resource to use when performing the authentication.

* @return resource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResource() { - return resource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResource() { + return resource; + } public void setResource(String resource) { this.resource = resource; } - public SyntheticsBasicAuthOauthClient scope(String scope) { this.scope = scope; return this; } /** - * Scope to use when performing the authentication. - * + *

Scope to use when performing the authentication.

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScope() { - return scope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } public void setScope(String scope) { this.scope = scope; } - - public SyntheticsBasicAuthOauthClient tokenApiAuthentication( - SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { + public SyntheticsBasicAuthOauthClient tokenApiAuthentication(SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { this.tokenApiAuthentication = tokenApiAuthentication; this.unparsed |= !tokenApiAuthentication.isValid(); return this; } /** - * Type of token to use when performing the authentication. - * + *

Type of token to use when performing the authentication.

* @return tokenApiAuthentication - */ - @JsonProperty(JSON_PROPERTY_TOKEN_API_AUTHENTICATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBasicAuthOauthTokenApiAuthentication getTokenApiAuthentication() { - return tokenApiAuthentication; - } - - public void setTokenApiAuthentication( - SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { + **/ + @JsonProperty(JSON_PROPERTY_TOKEN_API_AUTHENTICATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBasicAuthOauthTokenApiAuthentication getTokenApiAuthentication() { + return tokenApiAuthentication; + } + public void setTokenApiAuthentication(SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { if (!tokenApiAuthentication.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.tokenApiAuthentication = tokenApiAuthentication; } - public SyntheticsBasicAuthOauthClient type(SyntheticsBasicAuthOauthClientType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -224,25 +225,26 @@ public SyntheticsBasicAuthOauthClient type(SyntheticsBasicAuthOauthClientType ty } /** - * The type of basic authentication to use when performing the test. - * + *

The type of basic authentication to use when performing the test.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBasicAuthOauthClientType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuthOauthClientType getType() { + return type; + } public void setType(SyntheticsBasicAuthOauthClientType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsBasicAuthOauthClient object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthOauthClient object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -251,30 +253,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBasicAuthOauthClient syntheticsBasicAuthOauthClient = - (SyntheticsBasicAuthOauthClient) o; - return Objects.equals(this.accessTokenUrl, syntheticsBasicAuthOauthClient.accessTokenUrl) - && Objects.equals(this.audience, syntheticsBasicAuthOauthClient.audience) - && Objects.equals(this.clientId, syntheticsBasicAuthOauthClient.clientId) - && Objects.equals(this.clientSecret, syntheticsBasicAuthOauthClient.clientSecret) - && Objects.equals(this.resource, syntheticsBasicAuthOauthClient.resource) - && Objects.equals(this.scope, syntheticsBasicAuthOauthClient.scope) - && Objects.equals( - this.tokenApiAuthentication, syntheticsBasicAuthOauthClient.tokenApiAuthentication) - && Objects.equals(this.type, syntheticsBasicAuthOauthClient.type); + SyntheticsBasicAuthOauthClient syntheticsBasicAuthOauthClient = (SyntheticsBasicAuthOauthClient) o; + return Objects.equals(this.accessTokenUrl, syntheticsBasicAuthOauthClient.accessTokenUrl) && Objects.equals(this.audience, syntheticsBasicAuthOauthClient.audience) && Objects.equals(this.clientId, syntheticsBasicAuthOauthClient.clientId) && Objects.equals(this.clientSecret, syntheticsBasicAuthOauthClient.clientSecret) && Objects.equals(this.resource, syntheticsBasicAuthOauthClient.resource) && Objects.equals(this.scope, syntheticsBasicAuthOauthClient.scope) && Objects.equals(this.tokenApiAuthentication, syntheticsBasicAuthOauthClient.tokenApiAuthentication) && Objects.equals(this.type, syntheticsBasicAuthOauthClient.type); } + @Override public int hashCode() { - return Objects.hash( - accessTokenUrl, - audience, - clientId, - clientSecret, - resource, - scope, - tokenApiAuthentication, - type); + return Objects.hash(accessTokenUrl,audience,clientId,clientSecret,resource,scope,tokenApiAuthentication,type); } @Override @@ -287,16 +273,15 @@ public String toString() { sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" tokenApiAuthentication: ") - .append(toIndentedString(tokenApiAuthentication)) - .append("\n"); + sb.append(" tokenApiAuthentication: ").append(toIndentedString(tokenApiAuthentication)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClientType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClientType.java index 5d7e015cd6b..068e1b61bba 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClientType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthClientType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of basic authentication to use when performing the test. */ -@JsonSerialize( - using = SyntheticsBasicAuthOauthClientType.SyntheticsBasicAuthOauthClientTypeSerializer.class) +/** + *

The type of basic authentication to use when performing the test.

+ */ +@JsonSerialize(using = SyntheticsBasicAuthOauthClientType.SyntheticsBasicAuthOauthClientTypeSerializer.class) public class SyntheticsBasicAuthOauthClientType { - public static final SyntheticsBasicAuthOauthClientType OAUTH_CLIENT = - new SyntheticsBasicAuthOauthClientType("oauth-client"); + public static final SyntheticsBasicAuthOauthClientType OAUTH_CLIENT = new SyntheticsBasicAuthOauthClientType("oauth-client"); - private static final Set allowedValues = - new HashSet(Arrays.asList("oauth-client")); + private static final Set allowedValues = new HashSet(Arrays.asList("oauth-client")); private String value; @@ -40,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthOauthClientTypeSerializer - extends StdSerializer { - public SyntheticsBasicAuthOauthClientTypeSerializer( - Class t) { - super(t); - } + public static class SyntheticsBasicAuthOauthClientTypeSerializer extends StdSerializer { + public SyntheticsBasicAuthOauthClientTypeSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthOauthClientTypeSerializer() { - this(null); - } + public SyntheticsBasicAuthOauthClientTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthOauthClientType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthOauthClientType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthOauthClientType object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthOauthClientType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROP.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROP.java index d65cd1b6c60..dfb65a85ae0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROP.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROP.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object to handle oauth rop authentication when performing the test. */ +/** + *

Object to handle oauth rop authentication when performing the test.

+ */ @JsonPropertyOrder({ SyntheticsBasicAuthOauthROP.JSON_PROPERTY_ACCESS_TOKEN_URL, SyntheticsBasicAuthOauthROP.JSON_PROPERTY_AUDIENCE, @@ -26,10 +45,10 @@ SyntheticsBasicAuthOauthROP.JSON_PROPERTY_TYPE, SyntheticsBasicAuthOauthROP.JSON_PROPERTY_USERNAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBasicAuthOauthROP { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCESS_TOKEN_URL = "accessTokenUrl"; private String accessTokenUrl; @@ -64,189 +83,169 @@ public SyntheticsBasicAuthOauthROP() {} @JsonCreator public SyntheticsBasicAuthOauthROP( - @JsonProperty(required = true, value = JSON_PROPERTY_ACCESS_TOKEN_URL) String accessTokenUrl, - @JsonProperty(required = true, value = JSON_PROPERTY_PASSWORD) String password, - @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN_API_AUTHENTICATION) - SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication, - @JsonProperty(required = true, value = JSON_PROPERTY_USERNAME) String username) { - this.accessTokenUrl = accessTokenUrl; - this.password = password; - this.tokenApiAuthentication = tokenApiAuthentication; - this.unparsed |= !tokenApiAuthentication.isValid(); - this.username = username; + @JsonProperty(required=true, value=JSON_PROPERTY_ACCESS_TOKEN_URL)String accessTokenUrl, + @JsonProperty(required=true, value=JSON_PROPERTY_PASSWORD)String password, + @JsonProperty(required=true, value=JSON_PROPERTY_TOKEN_API_AUTHENTICATION)SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication, + @JsonProperty(required=true, value=JSON_PROPERTY_USERNAME)String username) { + this.accessTokenUrl = accessTokenUrl; + this.password = password; + this.tokenApiAuthentication = tokenApiAuthentication; + this.unparsed |= !tokenApiAuthentication.isValid(); + this.username = username; } - public SyntheticsBasicAuthOauthROP accessTokenUrl(String accessTokenUrl) { this.accessTokenUrl = accessTokenUrl; return this; } /** - * Access token URL to use when performing the authentication. - * + *

Access token URL to use when performing the authentication.

* @return accessTokenUrl - */ - @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccessTokenUrl() { - return accessTokenUrl; - } - + **/ + @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccessTokenUrl() { + return accessTokenUrl; + } public void setAccessTokenUrl(String accessTokenUrl) { this.accessTokenUrl = accessTokenUrl; } - public SyntheticsBasicAuthOauthROP audience(String audience) { this.audience = audience; return this; } /** - * Audience to use when performing the authentication. - * + *

Audience to use when performing the authentication.

* @return audience - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAudience() { - return audience; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIENCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAudience() { + return audience; + } public void setAudience(String audience) { this.audience = audience; } - public SyntheticsBasicAuthOauthROP clientId(String clientId) { this.clientId = clientId; return this; } /** - * Client ID to use when performing the authentication. - * + *

Client ID to use when performing the authentication.

* @return clientId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } public void setClientId(String clientId) { this.clientId = clientId; } - public SyntheticsBasicAuthOauthROP clientSecret(String clientSecret) { this.clientSecret = clientSecret; return this; } /** - * Client secret to use when performing the authentication. - * + *

Client secret to use when performing the authentication.

* @return clientSecret - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientSecret() { - return clientSecret; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getClientSecret() { + return clientSecret; + } public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } - public SyntheticsBasicAuthOauthROP password(String password) { this.password = password; return this; } /** - * Password to use when performing the authentication. - * + *

Password to use when performing the authentication.

* @return password - */ - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPassword() { - return password; - } - + **/ + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPassword() { + return password; + } public void setPassword(String password) { this.password = password; } - public SyntheticsBasicAuthOauthROP resource(String resource) { this.resource = resource; return this; } /** - * Resource to use when performing the authentication. - * + *

Resource to use when performing the authentication.

* @return resource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResource() { - return resource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResource() { + return resource; + } public void setResource(String resource) { this.resource = resource; } - public SyntheticsBasicAuthOauthROP scope(String scope) { this.scope = scope; return this; } /** - * Scope to use when performing the authentication. - * + *

Scope to use when performing the authentication.

* @return scope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScope() { - return scope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } public void setScope(String scope) { this.scope = scope; } - - public SyntheticsBasicAuthOauthROP tokenApiAuthentication( - SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { + public SyntheticsBasicAuthOauthROP tokenApiAuthentication(SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { this.tokenApiAuthentication = tokenApiAuthentication; this.unparsed |= !tokenApiAuthentication.isValid(); return this; } /** - * Type of token to use when performing the authentication. - * + *

Type of token to use when performing the authentication.

* @return tokenApiAuthentication - */ - @JsonProperty(JSON_PROPERTY_TOKEN_API_AUTHENTICATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBasicAuthOauthTokenApiAuthentication getTokenApiAuthentication() { - return tokenApiAuthentication; - } - - public void setTokenApiAuthentication( - SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { + **/ + @JsonProperty(JSON_PROPERTY_TOKEN_API_AUTHENTICATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBasicAuthOauthTokenApiAuthentication getTokenApiAuthentication() { + return tokenApiAuthentication; + } + public void setTokenApiAuthentication(SyntheticsBasicAuthOauthTokenApiAuthentication tokenApiAuthentication) { if (!tokenApiAuthentication.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.tokenApiAuthentication = tokenApiAuthentication; } - public SyntheticsBasicAuthOauthROP type(SyntheticsBasicAuthOauthROPType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -254,45 +253,44 @@ public SyntheticsBasicAuthOauthROP type(SyntheticsBasicAuthOauthROPType type) { } /** - * The type of basic authentication to use when performing the test. - * + *

The type of basic authentication to use when performing the test.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBasicAuthOauthROPType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuthOauthROPType getType() { + return type; + } public void setType(SyntheticsBasicAuthOauthROPType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SyntheticsBasicAuthOauthROP username(String username) { this.username = username; return this; } /** - * Username to use when performing the authentication. - * + *

Username to use when performing the authentication.

* @return username - */ - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUsername() { - return username; - } - + **/ + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUsername() { + return username; + } public void setUsername(String username) { this.username = username; } - /** Return true if this SyntheticsBasicAuthOauthROP object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthOauthROP object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -302,32 +300,13 @@ public boolean equals(Object o) { return false; } SyntheticsBasicAuthOauthROP syntheticsBasicAuthOauthRop = (SyntheticsBasicAuthOauthROP) o; - return Objects.equals(this.accessTokenUrl, syntheticsBasicAuthOauthRop.accessTokenUrl) - && Objects.equals(this.audience, syntheticsBasicAuthOauthRop.audience) - && Objects.equals(this.clientId, syntheticsBasicAuthOauthRop.clientId) - && Objects.equals(this.clientSecret, syntheticsBasicAuthOauthRop.clientSecret) - && Objects.equals(this.password, syntheticsBasicAuthOauthRop.password) - && Objects.equals(this.resource, syntheticsBasicAuthOauthRop.resource) - && Objects.equals(this.scope, syntheticsBasicAuthOauthRop.scope) - && Objects.equals( - this.tokenApiAuthentication, syntheticsBasicAuthOauthRop.tokenApiAuthentication) - && Objects.equals(this.type, syntheticsBasicAuthOauthRop.type) - && Objects.equals(this.username, syntheticsBasicAuthOauthRop.username); + return Objects.equals(this.accessTokenUrl, syntheticsBasicAuthOauthRop.accessTokenUrl) && Objects.equals(this.audience, syntheticsBasicAuthOauthRop.audience) && Objects.equals(this.clientId, syntheticsBasicAuthOauthRop.clientId) && Objects.equals(this.clientSecret, syntheticsBasicAuthOauthRop.clientSecret) && Objects.equals(this.password, syntheticsBasicAuthOauthRop.password) && Objects.equals(this.resource, syntheticsBasicAuthOauthRop.resource) && Objects.equals(this.scope, syntheticsBasicAuthOauthRop.scope) && Objects.equals(this.tokenApiAuthentication, syntheticsBasicAuthOauthRop.tokenApiAuthentication) && Objects.equals(this.type, syntheticsBasicAuthOauthRop.type) && Objects.equals(this.username, syntheticsBasicAuthOauthRop.username); } + @Override public int hashCode() { - return Objects.hash( - accessTokenUrl, - audience, - clientId, - clientSecret, - password, - resource, - scope, - tokenApiAuthentication, - type, - username); + return Objects.hash(accessTokenUrl,audience,clientId,clientSecret,password,resource,scope,tokenApiAuthentication,type,username); } @Override @@ -341,9 +320,7 @@ public String toString() { sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" tokenApiAuthentication: ") - .append(toIndentedString(tokenApiAuthentication)) - .append("\n"); + sb.append(" tokenApiAuthentication: ").append(toIndentedString(tokenApiAuthentication)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append("}"); @@ -351,7 +328,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROPType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROPType.java index afd4f18b6b8..c5d0edb971d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROPType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthROPType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of basic authentication to use when performing the test. */ -@JsonSerialize( - using = SyntheticsBasicAuthOauthROPType.SyntheticsBasicAuthOauthROPTypeSerializer.class) +/** + *

The type of basic authentication to use when performing the test.

+ */ +@JsonSerialize(using = SyntheticsBasicAuthOauthROPType.SyntheticsBasicAuthOauthROPTypeSerializer.class) public class SyntheticsBasicAuthOauthROPType { - public static final SyntheticsBasicAuthOauthROPType OAUTH_ROP = - new SyntheticsBasicAuthOauthROPType("oauth-rop"); + public static final SyntheticsBasicAuthOauthROPType OAUTH_ROP = new SyntheticsBasicAuthOauthROPType("oauth-rop"); private static final Set allowedValues = new HashSet(Arrays.asList("oauth-rop")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthOauthROPTypeSerializer - extends StdSerializer { - public SyntheticsBasicAuthOauthROPTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBasicAuthOauthROPTypeSerializer extends StdSerializer { + public SyntheticsBasicAuthOauthROPTypeSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthOauthROPTypeSerializer() { - this(null); - } + public SyntheticsBasicAuthOauthROPTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthOauthROPType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthOauthROPType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthOauthROPType object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthOauthROPType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthTokenApiAuthentication.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthTokenApiAuthentication.java index 28579549f1e..1564c3b2e90 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthTokenApiAuthentication.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthOauthTokenApiAuthentication.java @@ -6,33 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of token to use when performing the authentication. */ -@JsonSerialize( - using = - SyntheticsBasicAuthOauthTokenApiAuthentication - .SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer.class) +/** + *

Type of token to use when performing the authentication.

+ */ +@JsonSerialize(using = SyntheticsBasicAuthOauthTokenApiAuthentication.SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer.class) public class SyntheticsBasicAuthOauthTokenApiAuthentication { - public static final SyntheticsBasicAuthOauthTokenApiAuthentication HEADER = - new SyntheticsBasicAuthOauthTokenApiAuthentication("header"); - public static final SyntheticsBasicAuthOauthTokenApiAuthentication BODY = - new SyntheticsBasicAuthOauthTokenApiAuthentication("body"); + public static final SyntheticsBasicAuthOauthTokenApiAuthentication HEADER = new SyntheticsBasicAuthOauthTokenApiAuthentication("header"); + public static final SyntheticsBasicAuthOauthTokenApiAuthentication BODY = new SyntheticsBasicAuthOauthTokenApiAuthentication("body"); - private static final Set allowedValues = - new HashSet(Arrays.asList("header", "body")); + private static final Set allowedValues = new HashSet(Arrays.asList("header", "body")); private String value; @@ -44,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer - extends StdSerializer { - public SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer( - Class t) { - super(t); - } + public static class SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer extends StdSerializer { + public SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer() { - this(null); - } + public SyntheticsBasicAuthOauthTokenApiAuthenticationSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthOauthTokenApiAuthentication value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthOauthTokenApiAuthentication value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthOauthTokenApiAuthentication object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthOauthTokenApiAuthentication object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4.java index 38aecae5c33..f85a3576829 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to handle SIGV4 authentication when performing the test. */ + +/** + *

Object to handle SIGV4 authentication when performing the test.

+ */ @JsonPropertyOrder({ SyntheticsBasicAuthSigv4.JSON_PROPERTY_ACCESS_KEY, SyntheticsBasicAuthSigv4.JSON_PROPERTY_REGION, @@ -22,10 +41,10 @@ SyntheticsBasicAuthSigv4.JSON_PROPERTY_SESSION_TOKEN, SyntheticsBasicAuthSigv4.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBasicAuthSigv4 { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCESS_KEY = "accessKey"; private String accessKey; @@ -48,119 +67,107 @@ public SyntheticsBasicAuthSigv4() {} @JsonCreator public SyntheticsBasicAuthSigv4( - @JsonProperty(required = true, value = JSON_PROPERTY_ACCESS_KEY) String accessKey, - @JsonProperty(required = true, value = JSON_PROPERTY_SECRET_KEY) String secretKey, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SyntheticsBasicAuthSigv4Type type) { - this.accessKey = accessKey; - this.secretKey = secretKey; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ACCESS_KEY)String accessKey, + @JsonProperty(required=true, value=JSON_PROPERTY_SECRET_KEY)String secretKey, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsBasicAuthSigv4Type type) { + this.accessKey = accessKey; + this.secretKey = secretKey; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsBasicAuthSigv4 accessKey(String accessKey) { this.accessKey = accessKey; return this; } /** - * Access key for the SIGV4 authentication. - * + *

Access key for the SIGV4 authentication.

* @return accessKey - */ - @JsonProperty(JSON_PROPERTY_ACCESS_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccessKey() { - return accessKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_ACCESS_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccessKey() { + return accessKey; + } public void setAccessKey(String accessKey) { this.accessKey = accessKey; } - public SyntheticsBasicAuthSigv4 region(String region) { this.region = region; return this; } /** - * Region for the SIGV4 authentication. - * + *

Region for the SIGV4 authentication.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } public void setRegion(String region) { this.region = region; } - public SyntheticsBasicAuthSigv4 secretKey(String secretKey) { this.secretKey = secretKey; return this; } /** - * Secret key for the SIGV4 authentication. - * + *

Secret key for the SIGV4 authentication.

* @return secretKey - */ - @JsonProperty(JSON_PROPERTY_SECRET_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSecretKey() { - return secretKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_SECRET_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getSecretKey() { + return secretKey; + } public void setSecretKey(String secretKey) { this.secretKey = secretKey; } - public SyntheticsBasicAuthSigv4 serviceName(String serviceName) { this.serviceName = serviceName; return this; } /** - * Service name for the SIGV4 authentication. - * + *

Service name for the SIGV4 authentication.

* @return serviceName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getServiceName() { - return serviceName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceName() { + return serviceName; + } public void setServiceName(String serviceName) { this.serviceName = serviceName; } - public SyntheticsBasicAuthSigv4 sessionToken(String sessionToken) { this.sessionToken = sessionToken; return this; } /** - * Session token for the SIGV4 authentication. - * + *

Session token for the SIGV4 authentication.

* @return sessionToken - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSessionToken() { - return sessionToken; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_TOKEN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSessionToken() { + return sessionToken; + } public void setSessionToken(String sessionToken) { this.sessionToken = sessionToken; } - public SyntheticsBasicAuthSigv4 type(SyntheticsBasicAuthSigv4Type type) { this.type = type; this.unparsed |= !type.isValid(); @@ -168,24 +175,25 @@ public SyntheticsBasicAuthSigv4 type(SyntheticsBasicAuthSigv4Type type) { } /** - * The type of authentication to use when performing the test. - * + *

The type of authentication to use when performing the test.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBasicAuthSigv4Type getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBasicAuthSigv4Type getType() { + return type; + } public void setType(SyntheticsBasicAuthSigv4Type type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsBasicAuthSigv4 object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthSigv4 object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -195,17 +203,13 @@ public boolean equals(Object o) { return false; } SyntheticsBasicAuthSigv4 syntheticsBasicAuthSigv4 = (SyntheticsBasicAuthSigv4) o; - return Objects.equals(this.accessKey, syntheticsBasicAuthSigv4.accessKey) - && Objects.equals(this.region, syntheticsBasicAuthSigv4.region) - && Objects.equals(this.secretKey, syntheticsBasicAuthSigv4.secretKey) - && Objects.equals(this.serviceName, syntheticsBasicAuthSigv4.serviceName) - && Objects.equals(this.sessionToken, syntheticsBasicAuthSigv4.sessionToken) - && Objects.equals(this.type, syntheticsBasicAuthSigv4.type); + return Objects.equals(this.accessKey, syntheticsBasicAuthSigv4.accessKey) && Objects.equals(this.region, syntheticsBasicAuthSigv4.region) && Objects.equals(this.secretKey, syntheticsBasicAuthSigv4.secretKey) && Objects.equals(this.serviceName, syntheticsBasicAuthSigv4.serviceName) && Objects.equals(this.sessionToken, syntheticsBasicAuthSigv4.sessionToken) && Objects.equals(this.type, syntheticsBasicAuthSigv4.type); } + @Override public int hashCode() { - return Objects.hash(accessKey, region, secretKey, serviceName, sessionToken, type); + return Objects.hash(accessKey,region,secretKey,serviceName,sessionToken,type); } @Override @@ -223,7 +227,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4Type.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4Type.java index 2cf8c9eb7dd..a12448f3806 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4Type.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthSigv4Type.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of authentication to use when performing the test. */ +/** + *

The type of authentication to use when performing the test.

+ */ @JsonSerialize(using = SyntheticsBasicAuthSigv4Type.SyntheticsBasicAuthSigv4TypeSerializer.class) public class SyntheticsBasicAuthSigv4Type { - public static final SyntheticsBasicAuthSigv4Type SIGV4 = - new SyntheticsBasicAuthSigv4Type("sigv4"); + public static final SyntheticsBasicAuthSigv4Type SIGV4 = new SyntheticsBasicAuthSigv4Type("sigv4"); private static final Set allowedValues = new HashSet(Arrays.asList("sigv4")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthSigv4TypeSerializer - extends StdSerializer { - public SyntheticsBasicAuthSigv4TypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBasicAuthSigv4TypeSerializer extends StdSerializer { + public SyntheticsBasicAuthSigv4TypeSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthSigv4TypeSerializer() { - this(null); - } + public SyntheticsBasicAuthSigv4TypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthSigv4Type value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthSigv4Type value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthSigv4Type object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthSigv4Type object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWeb.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWeb.java index 8ee34fa8eb8..a30e0819339 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWeb.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWeb.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to handle basic authentication when performing the test. */ + +/** + *

Object to handle basic authentication when performing the test.

+ */ @JsonPropertyOrder({ SyntheticsBasicAuthWeb.JSON_PROPERTY_PASSWORD, SyntheticsBasicAuthWeb.JSON_PROPERTY_TYPE, SyntheticsBasicAuthWeb.JSON_PROPERTY_USERNAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBasicAuthWeb { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; @@ -36,32 +55,29 @@ public SyntheticsBasicAuthWeb() {} @JsonCreator public SyntheticsBasicAuthWeb( - @JsonProperty(required = true, value = JSON_PROPERTY_PASSWORD) String password, - @JsonProperty(required = true, value = JSON_PROPERTY_USERNAME) String username) { - this.password = password; - this.username = username; + @JsonProperty(required=true, value=JSON_PROPERTY_PASSWORD)String password, + @JsonProperty(required=true, value=JSON_PROPERTY_USERNAME)String username) { + this.password = password; + this.username = username; } - public SyntheticsBasicAuthWeb password(String password) { this.password = password; return this; } /** - * Password to use for the basic authentication. - * + *

Password to use for the basic authentication.

* @return password - */ - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPassword() { - return password; - } - + **/ + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPassword() { + return password; + } public void setPassword(String password) { this.password = password; } - public SyntheticsBasicAuthWeb type(SyntheticsBasicAuthWebType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,45 +85,44 @@ public SyntheticsBasicAuthWeb type(SyntheticsBasicAuthWebType type) { } /** - * The type of basic authentication to use when performing the test. - * + *

The type of basic authentication to use when performing the test.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBasicAuthWebType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuthWebType getType() { + return type; + } public void setType(SyntheticsBasicAuthWebType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SyntheticsBasicAuthWeb username(String username) { this.username = username; return this; } /** - * Username to use for the basic authentication. - * + *

Username to use for the basic authentication.

* @return username - */ - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUsername() { - return username; - } - + **/ + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUsername() { + return username; + } public void setUsername(String username) { this.username = username; } - /** Return true if this SyntheticsBasicAuthWeb object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthWeb object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,14 +132,13 @@ public boolean equals(Object o) { return false; } SyntheticsBasicAuthWeb syntheticsBasicAuthWeb = (SyntheticsBasicAuthWeb) o; - return Objects.equals(this.password, syntheticsBasicAuthWeb.password) - && Objects.equals(this.type, syntheticsBasicAuthWeb.type) - && Objects.equals(this.username, syntheticsBasicAuthWeb.username); + return Objects.equals(this.password, syntheticsBasicAuthWeb.password) && Objects.equals(this.type, syntheticsBasicAuthWeb.type) && Objects.equals(this.username, syntheticsBasicAuthWeb.username); } + @Override public int hashCode() { - return Objects.hash(password, type, username); + return Objects.hash(password,type,username); } @Override @@ -139,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWebType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWebType.java index 3343fdd349f..67bb44aacb5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWebType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthWebType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of basic authentication to use when performing the test. */ +/** + *

The type of basic authentication to use when performing the test.

+ */ @JsonSerialize(using = SyntheticsBasicAuthWebType.SyntheticsBasicAuthWebTypeSerializer.class) public class SyntheticsBasicAuthWebType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBasicAuthWebTypeSerializer - extends StdSerializer { - public SyntheticsBasicAuthWebTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBasicAuthWebTypeSerializer extends StdSerializer { + public SyntheticsBasicAuthWebTypeSerializer(Class t) { + super(t); + } - public SyntheticsBasicAuthWebTypeSerializer() { - this(null); - } + public SyntheticsBasicAuthWebTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBasicAuthWebType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBasicAuthWebType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBasicAuthWebType object is equal to o. */ + /** + * Return true if this SyntheticsBasicAuthWebType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetails.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetails.java index 3cb6b96d35f..ace1b6aa72d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetails.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetails.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Details about a batch response. */ -@JsonPropertyOrder({SyntheticsBatchDetails.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Details about a batch response.

+ */ +@JsonPropertyOrder({ + SyntheticsBatchDetails.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBatchDetails { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SyntheticsBatchDetailsData data; @@ -28,22 +50,23 @@ public SyntheticsBatchDetails data(SyntheticsBatchDetailsData data) { } /** - * Wrapper object that contains the details of a batch. - * + *

Wrapper object that contains the details of a batch.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBatchDetailsData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBatchDetailsData getData() { + return data; + } public void setData(SyntheticsBatchDetailsData data) { this.data = data; } - /** Return true if this SyntheticsBatchDetails object is equal to o. */ + /** + * Return true if this SyntheticsBatchDetails object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, syntheticsBatchDetails.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetailsData.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetailsData.java index e04998a4f39..863ec2ea151 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetailsData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchDetailsData.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Wrapper object that contains the details of a batch. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Wrapper object that contains the details of a batch.

+ */ @JsonPropertyOrder({ SyntheticsBatchDetailsData.JSON_PROPERTY_METADATA, SyntheticsBatchDetailsData.JSON_PROPERTY_RESULTS, SyntheticsBatchDetailsData.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBatchDetailsData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METADATA = "metadata"; private SyntheticsCIBatchMetadata metadata; @@ -40,21 +58,19 @@ public SyntheticsBatchDetailsData metadata(SyntheticsCIBatchMetadata metadata) { } /** - * Metadata for the Synthetics tests run. - * + *

Metadata for the Synthetics tests run.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadata getMetadata() { + return metadata; + } public void setMetadata(SyntheticsCIBatchMetadata metadata) { this.metadata = metadata; } - public SyntheticsBatchDetailsData results(List results) { this.results = results; for (SyntheticsBatchResult item : results) { @@ -62,7 +78,6 @@ public SyntheticsBatchDetailsData results(List results) { } return this; } - public SyntheticsBatchDetailsData addResultsItem(SyntheticsBatchResult resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); @@ -73,21 +88,19 @@ public SyntheticsBatchDetailsData addResultsItem(SyntheticsBatchResult resultsIt } /** - * List of results for the batch. - * + *

List of results for the batch.

* @return results - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResults() { - return results; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } public void setResults(List results) { this.results = results; } - public SyntheticsBatchDetailsData status(SyntheticsStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -95,25 +108,26 @@ public SyntheticsBatchDetailsData status(SyntheticsStatus status) { } /** - * Determines whether or not the batch has passed, failed, or is in progress. - * + *

Determines whether or not the batch has passed, failed, or is in progress.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsStatus getStatus() { + return status; + } public void setStatus(SyntheticsStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SyntheticsBatchDetailsData object is equal to o. */ + /** + * Return true if this SyntheticsBatchDetailsData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -123,14 +137,13 @@ public boolean equals(Object o) { return false; } SyntheticsBatchDetailsData syntheticsBatchDetailsData = (SyntheticsBatchDetailsData) o; - return Objects.equals(this.metadata, syntheticsBatchDetailsData.metadata) - && Objects.equals(this.results, syntheticsBatchDetailsData.results) - && Objects.equals(this.status, syntheticsBatchDetailsData.status); + return Objects.equals(this.metadata, syntheticsBatchDetailsData.metadata) && Objects.equals(this.results, syntheticsBatchDetailsData.results) && Objects.equals(this.status, syntheticsBatchDetailsData.status); } + @Override public int hashCode() { - return Objects.hash(metadata, results, status); + return Objects.hash(metadata,results,status); } @Override @@ -145,7 +158,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchResult.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchResult.java index 68b37add2c2..442d400cc15 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchResult.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBatchResult.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object with the results of a Synthetics batch. */ + +/** + *

Object with the results of a Synthetics batch.

+ */ @JsonPropertyOrder({ SyntheticsBatchResult.JSON_PROPERTY_DEVICE, SyntheticsBatchResult.JSON_PROPERTY_DURATION, @@ -25,10 +45,10 @@ SyntheticsBatchResult.JSON_PROPERTY_TEST_PUBLIC_ID, SyntheticsBatchResult.JSON_PROPERTY_TEST_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBatchResult { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEVICE = "device"; private SyntheticsDeviceID device; @@ -66,45 +86,41 @@ public SyntheticsBatchResult device(SyntheticsDeviceID device) { } /** - * The device ID. - * + *

The device ID.

* @return device - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsDeviceID getDevice() { - return device; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsDeviceID getDevice() { + return device; + } public void setDevice(SyntheticsDeviceID device) { if (!device.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.device = device; } - public SyntheticsBatchResult duration(Double duration) { this.duration = duration; return this; } /** - * Total duration in millisecond of the test. - * + *

Total duration in millisecond of the test.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDuration() { + return duration; + } public void setDuration(Double duration) { this.duration = duration; } - public SyntheticsBatchResult executionRule(SyntheticsTestExecutionRule executionRule) { this.executionRule = executionRule; this.unparsed |= !executionRule.isValid(); @@ -112,87 +128,79 @@ public SyntheticsBatchResult executionRule(SyntheticsTestExecutionRule execution } /** - * Execution rule for a Synthetics test. - * + *

Execution rule for a Synthetics test.

* @return executionRule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXECUTION_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestExecutionRule getExecutionRule() { - return executionRule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_RULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestExecutionRule getExecutionRule() { + return executionRule; + } public void setExecutionRule(SyntheticsTestExecutionRule executionRule) { if (!executionRule.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.executionRule = executionRule; } - public SyntheticsBatchResult location(String location) { this.location = location; return this; } /** - * Name of the location. - * + *

Name of the location.

* @return location - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLocation() { - return location; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLocation() { + return location; + } public void setLocation(String location) { this.location = location; } - public SyntheticsBatchResult resultId(String resultId) { this.resultId = resultId; return this; } /** - * The ID of the result to get. - * + *

The ID of the result to get.

* @return resultId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResultId() { - return resultId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } public void setResultId(String resultId) { this.resultId = resultId; } - public SyntheticsBatchResult retries(Double retries) { this.retries = retries; return this; } /** - * Number of times this result has been retried. - * + *

Number of times this result has been retried.

* @return retries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETRIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getRetries() { - return retries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETRIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getRetries() { + return retries; + } public void setRetries(Double retries) { this.retries = retries; } - public SyntheticsBatchResult status(SyntheticsStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -200,66 +208,60 @@ public SyntheticsBatchResult status(SyntheticsStatus status) { } /** - * Determines whether or not the batch has passed, failed, or is in progress. - * + *

Determines whether or not the batch has passed, failed, or is in progress.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsStatus getStatus() { + return status; + } public void setStatus(SyntheticsStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public SyntheticsBatchResult testName(String testName) { this.testName = testName; return this; } /** - * Name of the test. - * + *

Name of the test.

* @return testName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTestName() { - return testName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTestName() { + return testName; + } public void setTestName(String testName) { this.testName = testName; } - public SyntheticsBatchResult testPublicId(String testPublicId) { this.testPublicId = testPublicId; return this; } /** - * The public ID of the Synthetic test. - * + *

The public ID of the Synthetic test.

* @return testPublicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEST_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTestPublicId() { - return testPublicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTestPublicId() { + return testPublicId; + } public void setTestPublicId(String testPublicId) { this.testPublicId = testPublicId; } - public SyntheticsBatchResult testType(SyntheticsTestDetailsType testType) { this.testType = testType; this.unparsed |= !testType.isValid(); @@ -267,25 +269,26 @@ public SyntheticsBatchResult testType(SyntheticsTestDetailsType testType) { } /** - * Type of the Synthetic test, either api or browser. - * + *

Type of the Synthetic test, either api or browser.

* @return testType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEST_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestDetailsType getTestType() { - return testType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestDetailsType getTestType() { + return testType; + } public void setTestType(SyntheticsTestDetailsType testType) { if (!testType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.testType = testType; } - /** Return true if this SyntheticsBatchResult object is equal to o. */ + /** + * Return true if this SyntheticsBatchResult object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -295,31 +298,13 @@ public boolean equals(Object o) { return false; } SyntheticsBatchResult syntheticsBatchResult = (SyntheticsBatchResult) o; - return Objects.equals(this.device, syntheticsBatchResult.device) - && Objects.equals(this.duration, syntheticsBatchResult.duration) - && Objects.equals(this.executionRule, syntheticsBatchResult.executionRule) - && Objects.equals(this.location, syntheticsBatchResult.location) - && Objects.equals(this.resultId, syntheticsBatchResult.resultId) - && Objects.equals(this.retries, syntheticsBatchResult.retries) - && Objects.equals(this.status, syntheticsBatchResult.status) - && Objects.equals(this.testName, syntheticsBatchResult.testName) - && Objects.equals(this.testPublicId, syntheticsBatchResult.testPublicId) - && Objects.equals(this.testType, syntheticsBatchResult.testType); + return Objects.equals(this.device, syntheticsBatchResult.device) && Objects.equals(this.duration, syntheticsBatchResult.duration) && Objects.equals(this.executionRule, syntheticsBatchResult.executionRule) && Objects.equals(this.location, syntheticsBatchResult.location) && Objects.equals(this.resultId, syntheticsBatchResult.resultId) && Objects.equals(this.retries, syntheticsBatchResult.retries) && Objects.equals(this.status, syntheticsBatchResult.status) && Objects.equals(this.testName, syntheticsBatchResult.testName) && Objects.equals(this.testPublicId, syntheticsBatchResult.testPublicId) && Objects.equals(this.testType, syntheticsBatchResult.testType); } + @Override public int hashCode() { - return Objects.hash( - device, - duration, - executionRule, - location, - resultId, - retries, - status, - testName, - testPublicId, - testType); + return Objects.hash(device,duration,executionRule,location,resultId,retries,status,testName,testPublicId,testType); } @Override @@ -341,7 +326,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserError.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserError.java index 7be2c6026a6..9b07f0f7a62 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserError.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserError.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Error response object for a browser test. */ +/** + *

Error response object for a browser test.

+ */ @JsonPropertyOrder({ SyntheticsBrowserError.JSON_PROPERTY_DESCRIPTION, SyntheticsBrowserError.JSON_PROPERTY_NAME, SyntheticsBrowserError.JSON_PROPERTY_STATUS, SyntheticsBrowserError.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -40,76 +59,69 @@ public SyntheticsBrowserError() {} @JsonCreator public SyntheticsBrowserError( - @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsBrowserErrorType type) { - this.description = description; - this.name = name; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_DESCRIPTION)String description, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsBrowserErrorType type) { + this.description = description; + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsBrowserError description(String description) { this.description = description; return this; } /** - * Description of the error. - * + *

Description of the error.

* @return description - */ - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDescription() { - return description; - } - + **/ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SyntheticsBrowserError name(String name) { this.name = name; return this; } /** - * Name of the error. - * + *

Name of the error.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsBrowserError status(Long status) { this.status = status; return this; } /** - * Status Code of the error. - * + *

Status Code of the error.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStatus() { + return status; + } public void setStatus(Long status) { this.status = status; } - public SyntheticsBrowserError type(SyntheticsBrowserErrorType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -117,24 +129,25 @@ public SyntheticsBrowserError type(SyntheticsBrowserErrorType type) { } /** - * Error type returned by a browser test. - * + *

Error type returned by a browser test.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBrowserErrorType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBrowserErrorType getType() { + return type; + } public void setType(SyntheticsBrowserErrorType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsBrowserError object is equal to o. */ + /** + * Return true if this SyntheticsBrowserError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -144,15 +157,13 @@ public boolean equals(Object o) { return false; } SyntheticsBrowserError syntheticsBrowserError = (SyntheticsBrowserError) o; - return Objects.equals(this.description, syntheticsBrowserError.description) - && Objects.equals(this.name, syntheticsBrowserError.name) - && Objects.equals(this.status, syntheticsBrowserError.status) - && Objects.equals(this.type, syntheticsBrowserError.type); + return Objects.equals(this.description, syntheticsBrowserError.description) && Objects.equals(this.name, syntheticsBrowserError.name) && Objects.equals(this.status, syntheticsBrowserError.status) && Objects.equals(this.type, syntheticsBrowserError.type); } + @Override public int hashCode() { - return Objects.hash(description, name, status, type); + return Objects.hash(description,name,status,type); } @Override @@ -168,7 +179,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserErrorType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserErrorType.java index d9a968639f6..f0b58105143 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserErrorType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserErrorType.java @@ -6,29 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Error type returned by a browser test. */ +/** + *

Error type returned by a browser test.

+ */ @JsonSerialize(using = SyntheticsBrowserErrorType.SyntheticsBrowserErrorTypeSerializer.class) public class SyntheticsBrowserErrorType { - public static final SyntheticsBrowserErrorType NETWORK = - new SyntheticsBrowserErrorType("network"); + public static final SyntheticsBrowserErrorType NETWORK = new SyntheticsBrowserErrorType("network"); public static final SyntheticsBrowserErrorType JS = new SyntheticsBrowserErrorType("js"); - private static final Set allowedValues = - new HashSet(Arrays.asList("network", "js")); + private static final Set allowedValues = new HashSet(Arrays.asList("network", "js")); private String value; @@ -40,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBrowserErrorTypeSerializer - extends StdSerializer { - public SyntheticsBrowserErrorTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBrowserErrorTypeSerializer extends StdSerializer { + public SyntheticsBrowserErrorTypeSerializer(Class t) { + super(t); + } - public SyntheticsBrowserErrorTypeSerializer() { - this(null); - } + public SyntheticsBrowserErrorTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBrowserErrorType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBrowserErrorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBrowserErrorType object is equal to o. */ + /** + * Return true if this SyntheticsBrowserErrorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTest.java index 27d0d776d7d..857eabb47c8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTest.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing details about a Synthetic browser test. */ +/** + *

Object containing details about a Synthetic browser test.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTest.JSON_PROPERTY_CONFIG, SyntheticsBrowserTest.JSON_PROPERTY_LOCATIONS, @@ -29,10 +46,10 @@ SyntheticsBrowserTest.JSON_PROPERTY_TAGS, SyntheticsBrowserTest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIG = "config"; private SyntheticsBrowserTestConfig config; @@ -70,24 +87,22 @@ public SyntheticsBrowserTest() {} @JsonCreator public SyntheticsBrowserTest( - @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG) - SyntheticsBrowserTestConfig config, - @JsonProperty(required = true, value = JSON_PROPERTY_LOCATIONS) List locations, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) SyntheticsTestOptions options, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsBrowserTestType type) { - this.config = config; - this.unparsed |= config.unparsed; - this.locations = locations; - this.message = message; - this.name = name; - this.options = options; - this.unparsed |= options.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CONFIG)SyntheticsBrowserTestConfig config, + @JsonProperty(required=true, value=JSON_PROPERTY_LOCATIONS)List locations, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPTIONS)SyntheticsTestOptions options, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsBrowserTestType type) { + this.config = config; + this.unparsed |= config.unparsed; + this.locations = locations; + this.message = message; + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsBrowserTest config(SyntheticsBrowserTestConfig config) { this.config = config; this.unparsed |= config.unparsed; @@ -95,97 +110,88 @@ public SyntheticsBrowserTest config(SyntheticsBrowserTestConfig config) { } /** - * Configuration object for a Synthetic browser test. - * + *

Configuration object for a Synthetic browser test.

* @return config - */ - @JsonProperty(JSON_PROPERTY_CONFIG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBrowserTestConfig getConfig() { - return config; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBrowserTestConfig getConfig() { + return config; + } public void setConfig(SyntheticsBrowserTestConfig config) { this.config = config; } - public SyntheticsBrowserTest locations(List locations) { this.locations = locations; return this; } - public SyntheticsBrowserTest addLocationsItem(String locationsItem) { this.locations.add(locationsItem); return this; } /** - * Array of locations used to run the test. - * + *

Array of locations used to run the test.

* @return locations - */ - @JsonProperty(JSON_PROPERTY_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getLocations() { - return locations; - } - + **/ + @JsonProperty(JSON_PROPERTY_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getLocations() { + return locations; + } public void setLocations(List locations) { this.locations = locations; } - public SyntheticsBrowserTest message(String message) { this.message = message; return this; } /** - * Notification message associated with the test. Message can either be text or an empty string. - * + *

Notification message associated with the test. Message can either be text or an empty string.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } /** - * The associated monitor ID. - * + *

The associated monitor ID.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonitorId() { - return monitorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorId() { + return monitorId; + } public SyntheticsBrowserTest name(String name) { this.name = name; return this; } /** - * Name of the test. - * + *

Name of the test.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsBrowserTest options(SyntheticsTestOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -193,32 +199,30 @@ public SyntheticsBrowserTest options(SyntheticsTestOptions options) { } /** - * Object describing the extra options for a Synthetic test. - * + *

Object describing the extra options for a Synthetic test.

* @return options - */ - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsTestOptions getOptions() { - return options; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsTestOptions getOptions() { + return options; + } public void setOptions(SyntheticsTestOptions options) { this.options = options; } /** - * The public ID of the test. - * + *

The public ID of the test.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public SyntheticsBrowserTest status(SyntheticsTestPauseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -226,25 +230,23 @@ public SyntheticsBrowserTest status(SyntheticsTestPauseStatus status) { } /** - * Define whether you want to start (live) or pause (paused) a Synthetic - * test. - * + *

Define whether you want to start (live) or pause (paused) a + * Synthetic test.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestPauseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestPauseStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestPauseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public SyntheticsBrowserTest steps(List steps) { this.steps = steps; for (SyntheticsStep item : steps) { @@ -252,7 +254,6 @@ public SyntheticsBrowserTest steps(List steps) { } return this; } - public SyntheticsBrowserTest addStepsItem(SyntheticsStep stepsItem) { if (this.steps == null) { this.steps = new ArrayList<>(); @@ -263,26 +264,23 @@ public SyntheticsBrowserTest addStepsItem(SyntheticsStep stepsItem) { } /** - * Array of steps for the test. - * + *

Array of steps for the test.

* @return steps - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSteps() { - return steps; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSteps() { + return steps; + } public void setSteps(List steps) { this.steps = steps; } - public SyntheticsBrowserTest tags(List tags) { this.tags = tags; return this; } - public SyntheticsBrowserTest addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -292,21 +290,19 @@ public SyntheticsBrowserTest addTagsItem(String tagsItem) { } /** - * Array of tags attached to the test. - * + *

Array of tags attached to the test.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SyntheticsBrowserTest type(SyntheticsBrowserTestType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -314,24 +310,25 @@ public SyntheticsBrowserTest type(SyntheticsBrowserTestType type) { } /** - * Type of the Synthetic test, browser. - * + *

Type of the Synthetic test, browser.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBrowserTestType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBrowserTestType getType() { + return type; + } public void setType(SyntheticsBrowserTestType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsBrowserTest object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -341,23 +338,13 @@ public boolean equals(Object o) { return false; } SyntheticsBrowserTest syntheticsBrowserTest = (SyntheticsBrowserTest) o; - return Objects.equals(this.config, syntheticsBrowserTest.config) - && Objects.equals(this.locations, syntheticsBrowserTest.locations) - && Objects.equals(this.message, syntheticsBrowserTest.message) - && Objects.equals(this.monitorId, syntheticsBrowserTest.monitorId) - && Objects.equals(this.name, syntheticsBrowserTest.name) - && Objects.equals(this.options, syntheticsBrowserTest.options) - && Objects.equals(this.publicId, syntheticsBrowserTest.publicId) - && Objects.equals(this.status, syntheticsBrowserTest.status) - && Objects.equals(this.steps, syntheticsBrowserTest.steps) - && Objects.equals(this.tags, syntheticsBrowserTest.tags) - && Objects.equals(this.type, syntheticsBrowserTest.type); + return Objects.equals(this.config, syntheticsBrowserTest.config) && Objects.equals(this.locations, syntheticsBrowserTest.locations) && Objects.equals(this.message, syntheticsBrowserTest.message) && Objects.equals(this.monitorId, syntheticsBrowserTest.monitorId) && Objects.equals(this.name, syntheticsBrowserTest.name) && Objects.equals(this.options, syntheticsBrowserTest.options) && Objects.equals(this.publicId, syntheticsBrowserTest.publicId) && Objects.equals(this.status, syntheticsBrowserTest.status) && Objects.equals(this.steps, syntheticsBrowserTest.steps) && Objects.equals(this.tags, syntheticsBrowserTest.tags) && Objects.equals(this.type, syntheticsBrowserTest.type); } + @Override public int hashCode() { - return Objects.hash( - config, locations, message, monitorId, name, options, publicId, status, steps, tags, type); + return Objects.hash(config,locations,message,monitorId,name,options,publicId,status,steps,tags,type); } @Override @@ -380,7 +367,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestConfig.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestConfig.java index 585cd5f1209..4eb35a2a230 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestConfig.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestConfig.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Configuration object for a Synthetic browser test. */ + +/** + *

Configuration object for a Synthetic browser test.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTestConfig.JSON_PROPERTY_ASSERTIONS, SyntheticsBrowserTestConfig.JSON_PROPERTY_CONFIG_VARIABLES, @@ -23,10 +40,10 @@ SyntheticsBrowserTestConfig.JSON_PROPERTY_SET_COOKIE, SyntheticsBrowserTestConfig.JSON_PROPERTY_VARIABLES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestConfig { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ASSERTIONS = "assertions"; private List assertions = new ArrayList<>(); @@ -46,14 +63,12 @@ public SyntheticsBrowserTestConfig() {} @JsonCreator public SyntheticsBrowserTestConfig( - @JsonProperty(required = true, value = JSON_PROPERTY_ASSERTIONS) - List assertions, - @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST) SyntheticsTestRequest request) { - this.assertions = assertions; - this.request = request; - this.unparsed |= request.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_ASSERTIONS)List assertions, + @JsonProperty(required=true, value=JSON_PROPERTY_REQUEST)SyntheticsTestRequest request) { + this.assertions = assertions; + this.request = request; + this.unparsed |= request.unparsed; } - public SyntheticsBrowserTestConfig assertions(List assertions) { this.assertions = assertions; for (SyntheticsAssertion item : assertions) { @@ -61,7 +76,6 @@ public SyntheticsBrowserTestConfig assertions(List assertio } return this; } - public SyntheticsBrowserTestConfig addAssertionsItem(SyntheticsAssertion assertionsItem) { this.assertions.add(assertionsItem); this.unparsed |= assertionsItem.unparsed; @@ -69,31 +83,26 @@ public SyntheticsBrowserTestConfig addAssertionsItem(SyntheticsAssertion asserti } /** - * Array of assertions used for the test. - * + *

Array of assertions used for the test.

* @return assertions - */ - @JsonProperty(JSON_PROPERTY_ASSERTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getAssertions() { - return assertions; - } - + **/ + @JsonProperty(JSON_PROPERTY_ASSERTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getAssertions() { + return assertions; + } public void setAssertions(List assertions) { this.assertions = assertions; } - - public SyntheticsBrowserTestConfig configVariables( - List configVariables) { + public SyntheticsBrowserTestConfig configVariables(List configVariables) { this.configVariables = configVariables; for (SyntheticsConfigVariable item : configVariables) { this.unparsed |= item.unparsed; } return this; } - - public SyntheticsBrowserTestConfig addConfigVariablesItem( - SyntheticsConfigVariable configVariablesItem) { + public SyntheticsBrowserTestConfig addConfigVariablesItem(SyntheticsConfigVariable configVariablesItem) { if (this.configVariables == null) { this.configVariables = new ArrayList<>(); } @@ -103,21 +112,19 @@ public SyntheticsBrowserTestConfig addConfigVariablesItem( } /** - * Array of variables used for the test. - * + *

Array of variables used for the test.

* @return configVariables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIG_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConfigVariables() { - return configVariables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConfigVariables() { + return configVariables; + } public void setConfigVariables(List configVariables) { this.configVariables = configVariables; } - public SyntheticsBrowserTestConfig request(SyntheticsTestRequest request) { this.request = request; this.unparsed |= request.unparsed; @@ -125,43 +132,37 @@ public SyntheticsBrowserTestConfig request(SyntheticsTestRequest request) { } /** - * Object describing the Synthetic test request. - * + *

Object describing the Synthetic test request.

* @return request - */ - @JsonProperty(JSON_PROPERTY_REQUEST) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsTestRequest getRequest() { - return request; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUEST) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsTestRequest getRequest() { + return request; + } public void setRequest(SyntheticsTestRequest request) { this.request = request; } - public SyntheticsBrowserTestConfig setCookie(String setCookie) { this.setCookie = setCookie; return this; } /** - * Cookies to be used for the request, using the Set-Cookie - * syntax. - * + *

Cookies to be used for the request, using the Set-Cookie syntax.

* @return setCookie - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SET_COOKIE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSetCookie() { - return setCookie; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SET_COOKIE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSetCookie() { + return setCookie; + } public void setSetCookie(String setCookie) { this.setCookie = setCookie; } - public SyntheticsBrowserTestConfig variables(List variables) { this.variables = variables; for (SyntheticsBrowserVariable item : variables) { @@ -169,7 +170,6 @@ public SyntheticsBrowserTestConfig variables(List var } return this; } - public SyntheticsBrowserTestConfig addVariablesItem(SyntheticsBrowserVariable variablesItem) { if (this.variables == null) { this.variables = new ArrayList<>(); @@ -180,22 +180,23 @@ public SyntheticsBrowserTestConfig addVariablesItem(SyntheticsBrowserVariable va } /** - * Array of variables used for the test steps. - * + *

Array of variables used for the test steps.

* @return variables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getVariables() { - return variables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getVariables() { + return variables; + } public void setVariables(List variables) { this.variables = variables; } - /** Return true if this SyntheticsBrowserTestConfig object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestConfig object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -205,16 +206,13 @@ public boolean equals(Object o) { return false; } SyntheticsBrowserTestConfig syntheticsBrowserTestConfig = (SyntheticsBrowserTestConfig) o; - return Objects.equals(this.assertions, syntheticsBrowserTestConfig.assertions) - && Objects.equals(this.configVariables, syntheticsBrowserTestConfig.configVariables) - && Objects.equals(this.request, syntheticsBrowserTestConfig.request) - && Objects.equals(this.setCookie, syntheticsBrowserTestConfig.setCookie) - && Objects.equals(this.variables, syntheticsBrowserTestConfig.variables); + return Objects.equals(this.assertions, syntheticsBrowserTestConfig.assertions) && Objects.equals(this.configVariables, syntheticsBrowserTestConfig.configVariables) && Objects.equals(this.request, syntheticsBrowserTestConfig.request) && Objects.equals(this.setCookie, syntheticsBrowserTestConfig.setCookie) && Objects.equals(this.variables, syntheticsBrowserTestConfig.variables); } + @Override public int hashCode() { - return Objects.hash(assertions, configVariables, request, setCookie, variables); + return Objects.hash(assertions,configVariables,request,setCookie,variables); } @Override @@ -231,7 +229,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestFailureCode.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestFailureCode.java index 41816cccad9..9ab62bae784 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestFailureCode.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestFailureCode.java @@ -6,127 +6,82 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Error code that can be returned by a Synthetic test. */ -@JsonSerialize( - using = SyntheticsBrowserTestFailureCode.SyntheticsBrowserTestFailureCodeSerializer.class) +/** + *

Error code that can be returned by a Synthetic test.

+ */ +@JsonSerialize(using = SyntheticsBrowserTestFailureCode.SyntheticsBrowserTestFailureCodeSerializer.class) public class SyntheticsBrowserTestFailureCode { - public static final SyntheticsBrowserTestFailureCode API_REQUEST_FAILURE = - new SyntheticsBrowserTestFailureCode("API_REQUEST_FAILURE"); - public static final SyntheticsBrowserTestFailureCode ASSERTION_FAILURE = - new SyntheticsBrowserTestFailureCode("ASSERTION_FAILURE"); - public static final SyntheticsBrowserTestFailureCode DOWNLOAD_FILE_TOO_LARGE = - new SyntheticsBrowserTestFailureCode("DOWNLOAD_FILE_TOO_LARGE"); - public static final SyntheticsBrowserTestFailureCode ELEMENT_NOT_INTERACTABLE = - new SyntheticsBrowserTestFailureCode("ELEMENT_NOT_INTERACTABLE"); - public static final SyntheticsBrowserTestFailureCode EMAIL_VARIABLE_NOT_DEFINED = - new SyntheticsBrowserTestFailureCode("EMAIL_VARIABLE_NOT_DEFINED"); - public static final SyntheticsBrowserTestFailureCode EVALUATE_JAVASCRIPT = - new SyntheticsBrowserTestFailureCode("EVALUATE_JAVASCRIPT"); - public static final SyntheticsBrowserTestFailureCode EVALUATE_JAVASCRIPT_CONTEXT = - new SyntheticsBrowserTestFailureCode("EVALUATE_JAVASCRIPT_CONTEXT"); - public static final SyntheticsBrowserTestFailureCode EXTRACT_VARIABLE = - new SyntheticsBrowserTestFailureCode("EXTRACT_VARIABLE"); - public static final SyntheticsBrowserTestFailureCode FORBIDDEN_URL = - new SyntheticsBrowserTestFailureCode("FORBIDDEN_URL"); - public static final SyntheticsBrowserTestFailureCode FRAME_DETACHED = - new SyntheticsBrowserTestFailureCode("FRAME_DETACHED"); - public static final SyntheticsBrowserTestFailureCode INCONSISTENCIES = - new SyntheticsBrowserTestFailureCode("INCONSISTENCIES"); - public static final SyntheticsBrowserTestFailureCode INTERNAL_ERROR = - new SyntheticsBrowserTestFailureCode("INTERNAL_ERROR"); - public static final SyntheticsBrowserTestFailureCode INVALID_TYPE_TEXT_DELAY = - new SyntheticsBrowserTestFailureCode("INVALID_TYPE_TEXT_DELAY"); - public static final SyntheticsBrowserTestFailureCode INVALID_URL = - new SyntheticsBrowserTestFailureCode("INVALID_URL"); - public static final SyntheticsBrowserTestFailureCode INVALID_VARIABLE_PATTERN = - new SyntheticsBrowserTestFailureCode("INVALID_VARIABLE_PATTERN"); - public static final SyntheticsBrowserTestFailureCode INVISIBLE_ELEMENT = - new SyntheticsBrowserTestFailureCode("INVISIBLE_ELEMENT"); - public static final SyntheticsBrowserTestFailureCode LOCATE_ELEMENT = - new SyntheticsBrowserTestFailureCode("LOCATE_ELEMENT"); - public static final SyntheticsBrowserTestFailureCode NAVIGATE_TO_LINK = - new SyntheticsBrowserTestFailureCode("NAVIGATE_TO_LINK"); - public static final SyntheticsBrowserTestFailureCode OPEN_URL = - new SyntheticsBrowserTestFailureCode("OPEN_URL"); - public static final SyntheticsBrowserTestFailureCode PRESS_KEY = - new SyntheticsBrowserTestFailureCode("PRESS_KEY"); - public static final SyntheticsBrowserTestFailureCode SERVER_CERTIFICATE = - new SyntheticsBrowserTestFailureCode("SERVER_CERTIFICATE"); - public static final SyntheticsBrowserTestFailureCode SELECT_OPTION = - new SyntheticsBrowserTestFailureCode("SELECT_OPTION"); - public static final SyntheticsBrowserTestFailureCode STEP_TIMEOUT = - new SyntheticsBrowserTestFailureCode("STEP_TIMEOUT"); - public static final SyntheticsBrowserTestFailureCode SUB_TEST_NOT_PASSED = - new SyntheticsBrowserTestFailureCode("SUB_TEST_NOT_PASSED"); - public static final SyntheticsBrowserTestFailureCode TEST_TIMEOUT = - new SyntheticsBrowserTestFailureCode("TEST_TIMEOUT"); - public static final SyntheticsBrowserTestFailureCode TOO_MANY_HTTP_REQUESTS = - new SyntheticsBrowserTestFailureCode("TOO_MANY_HTTP_REQUESTS"); - public static final SyntheticsBrowserTestFailureCode UNAVAILABLE_BROWSER = - new SyntheticsBrowserTestFailureCode("UNAVAILABLE_BROWSER"); - public static final SyntheticsBrowserTestFailureCode UNKNOWN = - new SyntheticsBrowserTestFailureCode("UNKNOWN"); - public static final SyntheticsBrowserTestFailureCode UNSUPPORTED_AUTH_SCHEMA = - new SyntheticsBrowserTestFailureCode("UNSUPPORTED_AUTH_SCHEMA"); - public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_ELEMENT_TYPE = - new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_ELEMENT_TYPE"); - public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_DIALOG = - new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_DIALOG"); - public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_DYNAMIC_ELEMENT = - new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_DYNAMIC_ELEMENT"); - public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_NAME = - new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_NAME"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "API_REQUEST_FAILURE", - "ASSERTION_FAILURE", - "DOWNLOAD_FILE_TOO_LARGE", - "ELEMENT_NOT_INTERACTABLE", - "EMAIL_VARIABLE_NOT_DEFINED", - "EVALUATE_JAVASCRIPT", - "EVALUATE_JAVASCRIPT_CONTEXT", - "EXTRACT_VARIABLE", - "FORBIDDEN_URL", - "FRAME_DETACHED", - "INCONSISTENCIES", - "INTERNAL_ERROR", - "INVALID_TYPE_TEXT_DELAY", - "INVALID_URL", - "INVALID_VARIABLE_PATTERN", - "INVISIBLE_ELEMENT", - "LOCATE_ELEMENT", - "NAVIGATE_TO_LINK", - "OPEN_URL", - "PRESS_KEY", - "SERVER_CERTIFICATE", - "SELECT_OPTION", - "STEP_TIMEOUT", - "SUB_TEST_NOT_PASSED", - "TEST_TIMEOUT", - "TOO_MANY_HTTP_REQUESTS", - "UNAVAILABLE_BROWSER", - "UNKNOWN", - "UNSUPPORTED_AUTH_SCHEMA", - "UPLOAD_FILES_ELEMENT_TYPE", - "UPLOAD_FILES_DIALOG", - "UPLOAD_FILES_DYNAMIC_ELEMENT", - "UPLOAD_FILES_NAME")); + public static final SyntheticsBrowserTestFailureCode API_REQUEST_FAILURE = new SyntheticsBrowserTestFailureCode("API_REQUEST_FAILURE"); + public static final SyntheticsBrowserTestFailureCode ASSERTION_FAILURE = new SyntheticsBrowserTestFailureCode("ASSERTION_FAILURE"); + public static final SyntheticsBrowserTestFailureCode DOWNLOAD_FILE_TOO_LARGE = new SyntheticsBrowserTestFailureCode("DOWNLOAD_FILE_TOO_LARGE"); + public static final SyntheticsBrowserTestFailureCode ELEMENT_NOT_INTERACTABLE = new SyntheticsBrowserTestFailureCode("ELEMENT_NOT_INTERACTABLE"); + public static final SyntheticsBrowserTestFailureCode EMAIL_VARIABLE_NOT_DEFINED = new SyntheticsBrowserTestFailureCode("EMAIL_VARIABLE_NOT_DEFINED"); + public static final SyntheticsBrowserTestFailureCode EVALUATE_JAVASCRIPT = new SyntheticsBrowserTestFailureCode("EVALUATE_JAVASCRIPT"); + public static final SyntheticsBrowserTestFailureCode EVALUATE_JAVASCRIPT_CONTEXT = new SyntheticsBrowserTestFailureCode("EVALUATE_JAVASCRIPT_CONTEXT"); + public static final SyntheticsBrowserTestFailureCode EXTRACT_VARIABLE = new SyntheticsBrowserTestFailureCode("EXTRACT_VARIABLE"); + public static final SyntheticsBrowserTestFailureCode FORBIDDEN_URL = new SyntheticsBrowserTestFailureCode("FORBIDDEN_URL"); + public static final SyntheticsBrowserTestFailureCode FRAME_DETACHED = new SyntheticsBrowserTestFailureCode("FRAME_DETACHED"); + public static final SyntheticsBrowserTestFailureCode INCONSISTENCIES = new SyntheticsBrowserTestFailureCode("INCONSISTENCIES"); + public static final SyntheticsBrowserTestFailureCode INTERNAL_ERROR = new SyntheticsBrowserTestFailureCode("INTERNAL_ERROR"); + public static final SyntheticsBrowserTestFailureCode INVALID_TYPE_TEXT_DELAY = new SyntheticsBrowserTestFailureCode("INVALID_TYPE_TEXT_DELAY"); + public static final SyntheticsBrowserTestFailureCode INVALID_URL = new SyntheticsBrowserTestFailureCode("INVALID_URL"); + public static final SyntheticsBrowserTestFailureCode INVALID_VARIABLE_PATTERN = new SyntheticsBrowserTestFailureCode("INVALID_VARIABLE_PATTERN"); + public static final SyntheticsBrowserTestFailureCode INVISIBLE_ELEMENT = new SyntheticsBrowserTestFailureCode("INVISIBLE_ELEMENT"); + public static final SyntheticsBrowserTestFailureCode LOCATE_ELEMENT = new SyntheticsBrowserTestFailureCode("LOCATE_ELEMENT"); + public static final SyntheticsBrowserTestFailureCode NAVIGATE_TO_LINK = new SyntheticsBrowserTestFailureCode("NAVIGATE_TO_LINK"); + public static final SyntheticsBrowserTestFailureCode OPEN_URL = new SyntheticsBrowserTestFailureCode("OPEN_URL"); + public static final SyntheticsBrowserTestFailureCode PRESS_KEY = new SyntheticsBrowserTestFailureCode("PRESS_KEY"); + public static final SyntheticsBrowserTestFailureCode SERVER_CERTIFICATE = new SyntheticsBrowserTestFailureCode("SERVER_CERTIFICATE"); + public static final SyntheticsBrowserTestFailureCode SELECT_OPTION = new SyntheticsBrowserTestFailureCode("SELECT_OPTION"); + public static final SyntheticsBrowserTestFailureCode STEP_TIMEOUT = new SyntheticsBrowserTestFailureCode("STEP_TIMEOUT"); + public static final SyntheticsBrowserTestFailureCode SUB_TEST_NOT_PASSED = new SyntheticsBrowserTestFailureCode("SUB_TEST_NOT_PASSED"); + public static final SyntheticsBrowserTestFailureCode TEST_TIMEOUT = new SyntheticsBrowserTestFailureCode("TEST_TIMEOUT"); + public static final SyntheticsBrowserTestFailureCode TOO_MANY_HTTP_REQUESTS = new SyntheticsBrowserTestFailureCode("TOO_MANY_HTTP_REQUESTS"); + public static final SyntheticsBrowserTestFailureCode UNAVAILABLE_BROWSER = new SyntheticsBrowserTestFailureCode("UNAVAILABLE_BROWSER"); + public static final SyntheticsBrowserTestFailureCode UNKNOWN = new SyntheticsBrowserTestFailureCode("UNKNOWN"); + public static final SyntheticsBrowserTestFailureCode UNSUPPORTED_AUTH_SCHEMA = new SyntheticsBrowserTestFailureCode("UNSUPPORTED_AUTH_SCHEMA"); + public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_ELEMENT_TYPE = new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_ELEMENT_TYPE"); + public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_DIALOG = new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_DIALOG"); + public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_DYNAMIC_ELEMENT = new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_DYNAMIC_ELEMENT"); + public static final SyntheticsBrowserTestFailureCode UPLOAD_FILES_NAME = new SyntheticsBrowserTestFailureCode("UPLOAD_FILES_NAME"); + + private static final Set allowedValues = new HashSet(Arrays.asList("API_REQUEST_FAILURE", "ASSERTION_FAILURE", "DOWNLOAD_FILE_TOO_LARGE", "ELEMENT_NOT_INTERACTABLE", "EMAIL_VARIABLE_NOT_DEFINED", "EVALUATE_JAVASCRIPT", "EVALUATE_JAVASCRIPT_CONTEXT", "EXTRACT_VARIABLE", "FORBIDDEN_URL", "FRAME_DETACHED", "INCONSISTENCIES", "INTERNAL_ERROR", "INVALID_TYPE_TEXT_DELAY", "INVALID_URL", "INVALID_VARIABLE_PATTERN", "INVISIBLE_ELEMENT", "LOCATE_ELEMENT", "NAVIGATE_TO_LINK", "OPEN_URL", "PRESS_KEY", "SERVER_CERTIFICATE", "SELECT_OPTION", "STEP_TIMEOUT", "SUB_TEST_NOT_PASSED", "TEST_TIMEOUT", "TOO_MANY_HTTP_REQUESTS", "UNAVAILABLE_BROWSER", "UNKNOWN", "UNSUPPORTED_AUTH_SCHEMA", "UPLOAD_FILES_ELEMENT_TYPE", "UPLOAD_FILES_DIALOG", "UPLOAD_FILES_DYNAMIC_ELEMENT", "UPLOAD_FILES_NAME")); private String value; @@ -138,22 +93,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBrowserTestFailureCodeSerializer - extends StdSerializer { - public SyntheticsBrowserTestFailureCodeSerializer(Class t) { - super(t); - } + public static class SyntheticsBrowserTestFailureCodeSerializer extends StdSerializer { + public SyntheticsBrowserTestFailureCodeSerializer(Class t) { + super(t); + } - public SyntheticsBrowserTestFailureCodeSerializer() { - this(null); - } + public SyntheticsBrowserTestFailureCodeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBrowserTestFailureCode value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBrowserTestFailureCode value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -165,7 +117,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBrowserTestFailureCode object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestFailureCode object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -179,7 +133,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultData.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultData.java index c42a497c57a..3e1f042365f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultData.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultData.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing results for your Synthetic browser test. */ + +/** + *

Object containing results for your Synthetic browser test.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTestResultData.JSON_PROPERTY_BROWSER_TYPE, SyntheticsBrowserTestResultData.JSON_PROPERTY_BROWSER_VERSION, @@ -29,10 +47,10 @@ SyntheticsBrowserTestResultData.JSON_PROPERTY_THUMBNAILS_BUCKET_KEY, SyntheticsBrowserTestResultData.JSON_PROPERTY_TIME_TO_INTERACTIVE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestResultData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BROWSER_TYPE = "browserType"; private String browserType; @@ -75,42 +93,38 @@ public SyntheticsBrowserTestResultData browserType(String browserType) { } /** - * Type of browser device used for the browser test. - * + *

Type of browser device used for the browser test.

* @return browserType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBrowserType() { - return browserType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBrowserType() { + return browserType; + } public void setBrowserType(String browserType) { this.browserType = browserType; } - public SyntheticsBrowserTestResultData browserVersion(String browserVersion) { this.browserVersion = browserVersion; return this; } /** - * Browser version used for the browser test. - * + *

Browser version used for the browser test.

* @return browserVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBrowserVersion() { - return browserVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBrowserVersion() { + return browserVersion; + } public void setBrowserVersion(String browserVersion) { this.browserVersion = browserVersion; } - public SyntheticsBrowserTestResultData device(SyntheticsDevice device) { this.device = device; this.unparsed |= device.unparsed; @@ -118,63 +132,57 @@ public SyntheticsBrowserTestResultData device(SyntheticsDevice device) { } /** - * Object describing the device used to perform the Synthetic test. - * + *

Object describing the device used to perform the Synthetic test.

* @return device - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsDevice getDevice() { - return device; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsDevice getDevice() { + return device; + } public void setDevice(SyntheticsDevice device) { this.device = device; } - public SyntheticsBrowserTestResultData duration(Double duration) { this.duration = duration; return this; } /** - * Global duration in second of the browser test. - * + *

Global duration in second of the browser test.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDuration() { + return duration; + } public void setDuration(Double duration) { this.duration = duration; } - public SyntheticsBrowserTestResultData error(String error) { this.error = error; return this; } /** - * Error returned for the browser test. - * + *

Error returned for the browser test.

* @return error - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getError() { - return error; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } public void setError(String error) { this.error = error; } - public SyntheticsBrowserTestResultData failure(SyntheticsBrowserTestResultFailure failure) { this.failure = failure; this.unparsed |= failure.unparsed; @@ -182,84 +190,76 @@ public SyntheticsBrowserTestResultData failure(SyntheticsBrowserTestResultFailur } /** - * The browser test failure details. - * + *

The browser test failure details.

* @return failure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FAILURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBrowserTestResultFailure getFailure() { - return failure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBrowserTestResultFailure getFailure() { + return failure; + } public void setFailure(SyntheticsBrowserTestResultFailure failure) { this.failure = failure; } - public SyntheticsBrowserTestResultData passed(Boolean passed) { this.passed = passed; return this; } /** - * Whether or not the browser test was conducted. - * + *

Whether or not the browser test was conducted.

* @return passed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PASSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPassed() { - return passed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPassed() { + return passed; + } public void setPassed(Boolean passed) { this.passed = passed; } - public SyntheticsBrowserTestResultData receivedEmailCount(Long receivedEmailCount) { this.receivedEmailCount = receivedEmailCount; return this; } /** - * The amount of email received during the browser test. - * + *

The amount of email received during the browser test.

* @return receivedEmailCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RECEIVED_EMAIL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getReceivedEmailCount() { - return receivedEmailCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVED_EMAIL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getReceivedEmailCount() { + return receivedEmailCount; + } public void setReceivedEmailCount(Long receivedEmailCount) { this.receivedEmailCount = receivedEmailCount; } - public SyntheticsBrowserTestResultData startUrl(String startUrl) { this.startUrl = startUrl; return this; } /** - * Starting URL for the browser test. - * + *

Starting URL for the browser test.

* @return startUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStartUrl() { - return startUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStartUrl() { + return startUrl; + } public void setStartUrl(String startUrl) { this.startUrl = startUrl; } - public SyntheticsBrowserTestResultData stepDetails(List stepDetails) { this.stepDetails = stepDetails; for (SyntheticsStepDetail item : stepDetails) { @@ -267,7 +267,6 @@ public SyntheticsBrowserTestResultData stepDetails(List st } return this; } - public SyntheticsBrowserTestResultData addStepDetailsItem(SyntheticsStepDetail stepDetailsItem) { if (this.stepDetails == null) { this.stepDetails = new ArrayList<>(); @@ -278,64 +277,62 @@ public SyntheticsBrowserTestResultData addStepDetailsItem(SyntheticsStepDetail s } /** - * Array containing the different browser test steps. - * + *

Array containing the different browser test steps.

* @return stepDetails - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEP_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getStepDetails() { - return stepDetails; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEP_DETAILS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getStepDetails() { + return stepDetails; + } public void setStepDetails(List stepDetails) { this.stepDetails = stepDetails; } - public SyntheticsBrowserTestResultData thumbnailsBucketKey(Boolean thumbnailsBucketKey) { this.thumbnailsBucketKey = thumbnailsBucketKey; return this; } /** - * Whether or not a thumbnail is associated with the browser test. - * + *

Whether or not a thumbnail is associated with the browser test.

* @return thumbnailsBucketKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_THUMBNAILS_BUCKET_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getThumbnailsBucketKey() { - return thumbnailsBucketKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THUMBNAILS_BUCKET_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getThumbnailsBucketKey() { + return thumbnailsBucketKey; + } public void setThumbnailsBucketKey(Boolean thumbnailsBucketKey) { this.thumbnailsBucketKey = thumbnailsBucketKey; } - public SyntheticsBrowserTestResultData timeToInteractive(Double timeToInteractive) { this.timeToInteractive = timeToInteractive; return this; } /** - * Time in second to wait before the browser test starts after reaching the start URL. - * + *

Time in second to wait before the browser test starts after + * reaching the start URL.

* @return timeToInteractive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_INTERACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTimeToInteractive() { - return timeToInteractive; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_INTERACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTimeToInteractive() { + return timeToInteractive; + } public void setTimeToInteractive(Double timeToInteractive) { this.timeToInteractive = timeToInteractive; } - /** Return true if this SyntheticsBrowserTestResultData object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestResultData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -344,40 +341,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestResultData syntheticsBrowserTestResultData = - (SyntheticsBrowserTestResultData) o; - return Objects.equals(this.browserType, syntheticsBrowserTestResultData.browserType) - && Objects.equals(this.browserVersion, syntheticsBrowserTestResultData.browserVersion) - && Objects.equals(this.device, syntheticsBrowserTestResultData.device) - && Objects.equals(this.duration, syntheticsBrowserTestResultData.duration) - && Objects.equals(this.error, syntheticsBrowserTestResultData.error) - && Objects.equals(this.failure, syntheticsBrowserTestResultData.failure) - && Objects.equals(this.passed, syntheticsBrowserTestResultData.passed) - && Objects.equals( - this.receivedEmailCount, syntheticsBrowserTestResultData.receivedEmailCount) - && Objects.equals(this.startUrl, syntheticsBrowserTestResultData.startUrl) - && Objects.equals(this.stepDetails, syntheticsBrowserTestResultData.stepDetails) - && Objects.equals( - this.thumbnailsBucketKey, syntheticsBrowserTestResultData.thumbnailsBucketKey) - && Objects.equals( - this.timeToInteractive, syntheticsBrowserTestResultData.timeToInteractive); + SyntheticsBrowserTestResultData syntheticsBrowserTestResultData = (SyntheticsBrowserTestResultData) o; + return Objects.equals(this.browserType, syntheticsBrowserTestResultData.browserType) && Objects.equals(this.browserVersion, syntheticsBrowserTestResultData.browserVersion) && Objects.equals(this.device, syntheticsBrowserTestResultData.device) && Objects.equals(this.duration, syntheticsBrowserTestResultData.duration) && Objects.equals(this.error, syntheticsBrowserTestResultData.error) && Objects.equals(this.failure, syntheticsBrowserTestResultData.failure) && Objects.equals(this.passed, syntheticsBrowserTestResultData.passed) && Objects.equals(this.receivedEmailCount, syntheticsBrowserTestResultData.receivedEmailCount) && Objects.equals(this.startUrl, syntheticsBrowserTestResultData.startUrl) && Objects.equals(this.stepDetails, syntheticsBrowserTestResultData.stepDetails) && Objects.equals(this.thumbnailsBucketKey, syntheticsBrowserTestResultData.thumbnailsBucketKey) && Objects.equals(this.timeToInteractive, syntheticsBrowserTestResultData.timeToInteractive); } + @Override public int hashCode() { - return Objects.hash( - browserType, - browserVersion, - device, - duration, - error, - failure, - passed, - receivedEmailCount, - startUrl, - stepDetails, - thumbnailsBucketKey, - timeToInteractive); + return Objects.hash(browserType,browserVersion,device,duration,error,failure,passed,receivedEmailCount,startUrl,stepDetails,thumbnailsBucketKey,timeToInteractive); } @Override @@ -394,16 +365,15 @@ public String toString() { sb.append(" receivedEmailCount: ").append(toIndentedString(receivedEmailCount)).append("\n"); sb.append(" startUrl: ").append(toIndentedString(startUrl)).append("\n"); sb.append(" stepDetails: ").append(toIndentedString(stepDetails)).append("\n"); - sb.append(" thumbnailsBucketKey: ") - .append(toIndentedString(thumbnailsBucketKey)) - .append("\n"); + sb.append(" thumbnailsBucketKey: ").append(toIndentedString(thumbnailsBucketKey)).append("\n"); sb.append(" timeToInteractive: ").append(toIndentedString(timeToInteractive)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFailure.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFailure.java index 0dc583b7449..6b92ab84f42 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFailure.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFailure.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The browser test failure details. */ + +/** + *

The browser test failure details.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTestResultFailure.JSON_PROPERTY_CODE, SyntheticsBrowserTestResultFailure.JSON_PROPERTY_MESSAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestResultFailure { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private SyntheticsBrowserTestFailureCode code; @@ -34,46 +54,45 @@ public SyntheticsBrowserTestResultFailure code(SyntheticsBrowserTestFailureCode } /** - * Error code that can be returned by a Synthetic test. - * + *

Error code that can be returned by a Synthetic test.

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBrowserTestFailureCode getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBrowserTestFailureCode getCode() { + return code; + } public void setCode(SyntheticsBrowserTestFailureCode code) { if (!code.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.code = code; } - public SyntheticsBrowserTestResultFailure message(String message) { this.message = message; return this; } /** - * The browser test error message. - * + *

The browser test error message.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this SyntheticsBrowserTestResultFailure object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestResultFailure object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,15 +101,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestResultFailure syntheticsBrowserTestResultFailure = - (SyntheticsBrowserTestResultFailure) o; - return Objects.equals(this.code, syntheticsBrowserTestResultFailure.code) - && Objects.equals(this.message, syntheticsBrowserTestResultFailure.message); + SyntheticsBrowserTestResultFailure syntheticsBrowserTestResultFailure = (SyntheticsBrowserTestResultFailure) o; + return Objects.equals(this.code, syntheticsBrowserTestResultFailure.code) && Objects.equals(this.message, syntheticsBrowserTestResultFailure.message); } + @Override public int hashCode() { - return Objects.hash(code, message); + return Objects.hash(code,message); } @Override @@ -104,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFull.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFull.java index e3ce0a37f1c..920763ffe54 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFull.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFull.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object returned describing a browser test result. */ + +/** + *

Object returned describing a browser test result.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTestResultFull.JSON_PROPERTY_CHECK, SyntheticsBrowserTestResultFull.JSON_PROPERTY_CHECK_TIME, @@ -22,10 +42,10 @@ SyntheticsBrowserTestResultFull.JSON_PROPERTY_RESULT_ID, SyntheticsBrowserTestResultFull.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestResultFull { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK = "check"; private SyntheticsBrowserTestResultFullCheck check; @@ -54,84 +74,76 @@ public SyntheticsBrowserTestResultFull check(SyntheticsBrowserTestResultFullChec } /** - * Object describing the browser test configuration. - * + *

Object describing the browser test configuration.

* @return check - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBrowserTestResultFullCheck getCheck() { - return check; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBrowserTestResultFullCheck getCheck() { + return check; + } public void setCheck(SyntheticsBrowserTestResultFullCheck check) { this.check = check; } - public SyntheticsBrowserTestResultFull checkTime(Double checkTime) { this.checkTime = checkTime; return this; } /** - * When the browser test was conducted. - * + *

When the browser test was conducted.

* @return checkTime - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCheckTime() { - return checkTime; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCheckTime() { + return checkTime; + } public void setCheckTime(Double checkTime) { this.checkTime = checkTime; } - public SyntheticsBrowserTestResultFull checkVersion(Long checkVersion) { this.checkVersion = checkVersion; return this; } /** - * Version of the browser test used. - * + *

Version of the browser test used.

* @return checkVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCheckVersion() { - return checkVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCheckVersion() { + return checkVersion; + } public void setCheckVersion(Long checkVersion) { this.checkVersion = checkVersion; } - public SyntheticsBrowserTestResultFull probeDc(String probeDc) { this.probeDc = probeDc; return this; } /** - * Location from which the browser test was performed. - * + *

Location from which the browser test was performed.

* @return probeDc - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROBE_DC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProbeDc() { - return probeDc; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROBE_DC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProbeDc() { + return probeDc; + } public void setProbeDc(String probeDc) { this.probeDc = probeDc; } - public SyntheticsBrowserTestResultFull result(SyntheticsBrowserTestResultData result) { this.result = result; this.unparsed |= result.unparsed; @@ -139,42 +151,38 @@ public SyntheticsBrowserTestResultFull result(SyntheticsBrowserTestResultData re } /** - * Object containing results for your Synthetic browser test. - * + *

Object containing results for your Synthetic browser test.

* @return result - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBrowserTestResultData getResult() { - return result; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBrowserTestResultData getResult() { + return result; + } public void setResult(SyntheticsBrowserTestResultData result) { this.result = result; } - public SyntheticsBrowserTestResultFull resultId(String resultId) { this.resultId = resultId; return this; } /** - * ID of the browser test result. - * + *

ID of the browser test result.

* @return resultId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResultId() { - return resultId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } public void setResultId(String resultId) { this.resultId = resultId; } - public SyntheticsBrowserTestResultFull status(SyntheticsTestMonitorStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -182,26 +190,29 @@ public SyntheticsBrowserTestResultFull status(SyntheticsTestMonitorStatus status } /** - * The status of your Synthetic monitor. * O for not triggered * 1 for - * triggered * 2 for no data - * + *

The status of your Synthetic monitor. + * * O for not triggered + * * 1 for triggered + * * 2 for no data

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestMonitorStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestMonitorStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestMonitorStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SyntheticsBrowserTestResultFull object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestResultFull object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -210,20 +221,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestResultFull syntheticsBrowserTestResultFull = - (SyntheticsBrowserTestResultFull) o; - return Objects.equals(this.check, syntheticsBrowserTestResultFull.check) - && Objects.equals(this.checkTime, syntheticsBrowserTestResultFull.checkTime) - && Objects.equals(this.checkVersion, syntheticsBrowserTestResultFull.checkVersion) - && Objects.equals(this.probeDc, syntheticsBrowserTestResultFull.probeDc) - && Objects.equals(this.result, syntheticsBrowserTestResultFull.result) - && Objects.equals(this.resultId, syntheticsBrowserTestResultFull.resultId) - && Objects.equals(this.status, syntheticsBrowserTestResultFull.status); + SyntheticsBrowserTestResultFull syntheticsBrowserTestResultFull = (SyntheticsBrowserTestResultFull) o; + return Objects.equals(this.check, syntheticsBrowserTestResultFull.check) && Objects.equals(this.checkTime, syntheticsBrowserTestResultFull.checkTime) && Objects.equals(this.checkVersion, syntheticsBrowserTestResultFull.checkVersion) && Objects.equals(this.probeDc, syntheticsBrowserTestResultFull.probeDc) && Objects.equals(this.result, syntheticsBrowserTestResultFull.result) && Objects.equals(this.resultId, syntheticsBrowserTestResultFull.resultId) && Objects.equals(this.status, syntheticsBrowserTestResultFull.status); } + @Override public int hashCode() { - return Objects.hash(check, checkTime, checkVersion, probeDc, result, resultId, status); + return Objects.hash(check,checkTime,checkVersion,probeDc,result,resultId,status); } @Override @@ -242,7 +247,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFullCheck.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFullCheck.java index f09db424401..8cae04e664d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFullCheck.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultFullCheck.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the browser test configuration. */ -@JsonPropertyOrder({SyntheticsBrowserTestResultFullCheck.JSON_PROPERTY_CONFIG}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object describing the browser test configuration.

+ */ +@JsonPropertyOrder({ + SyntheticsBrowserTestResultFullCheck.JSON_PROPERTY_CONFIG +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestResultFullCheck { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIG = "config"; private SyntheticsTestConfig config; @@ -26,11 +47,10 @@ public SyntheticsBrowserTestResultFullCheck() {} @JsonCreator public SyntheticsBrowserTestResultFullCheck( - @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG) SyntheticsTestConfig config) { - this.config = config; - this.unparsed |= config.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CONFIG)SyntheticsTestConfig config) { + this.config = config; + this.unparsed |= config.unparsed; } - public SyntheticsBrowserTestResultFullCheck config(SyntheticsTestConfig config) { this.config = config; this.unparsed |= config.unparsed; @@ -38,21 +58,22 @@ public SyntheticsBrowserTestResultFullCheck config(SyntheticsTestConfig config) } /** - * Configuration object for a Synthetic test. - * + *

Configuration object for a Synthetic test.

* @return config - */ - @JsonProperty(JSON_PROPERTY_CONFIG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsTestConfig getConfig() { - return config; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsTestConfig getConfig() { + return config; + } public void setConfig(SyntheticsTestConfig config) { this.config = config; } - /** Return true if this SyntheticsBrowserTestResultFullCheck object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestResultFullCheck object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestResultFullCheck syntheticsBrowserTestResultFullCheck = - (SyntheticsBrowserTestResultFullCheck) o; + SyntheticsBrowserTestResultFullCheck syntheticsBrowserTestResultFullCheck = (SyntheticsBrowserTestResultFullCheck) o; return Objects.equals(this.config, syntheticsBrowserTestResultFullCheck.config); } + @Override public int hashCode() { return Objects.hash(config); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShort.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShort.java index e689ffd5a7e..fe706f960e3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShort.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShort.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object with the results of a single Synthetic browser test. */ +/** + *

Object with the results of a single Synthetic browser test.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTestResultShort.JSON_PROPERTY_CHECK_TIME, SyntheticsBrowserTestResultShort.JSON_PROPERTY_PROBE_DC, @@ -20,10 +40,10 @@ SyntheticsBrowserTestResultShort.JSON_PROPERTY_RESULT_ID, SyntheticsBrowserTestResultShort.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestResultShort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK_TIME = "check_time"; private Double checkTime; @@ -45,42 +65,38 @@ public SyntheticsBrowserTestResultShort checkTime(Double checkTime) { } /** - * Last time the browser test was performed. - * + *

Last time the browser test was performed.

* @return checkTime - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCheckTime() { - return checkTime; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCheckTime() { + return checkTime; + } public void setCheckTime(Double checkTime) { this.checkTime = checkTime; } - public SyntheticsBrowserTestResultShort probeDc(String probeDc) { this.probeDc = probeDc; return this; } /** - * Location from which the Browser test was performed. - * + *

Location from which the Browser test was performed.

* @return probeDc - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROBE_DC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProbeDc() { - return probeDc; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROBE_DC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProbeDc() { + return probeDc; + } public void setProbeDc(String probeDc) { this.probeDc = probeDc; } - public SyntheticsBrowserTestResultShort result(SyntheticsBrowserTestResultShortResult result) { this.result = result; this.unparsed |= result.unparsed; @@ -88,42 +104,38 @@ public SyntheticsBrowserTestResultShort result(SyntheticsBrowserTestResultShortR } /** - * Object with the result of the last browser test run. - * + *

Object with the result of the last browser test run.

* @return result - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBrowserTestResultShortResult getResult() { - return result; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBrowserTestResultShortResult getResult() { + return result; + } public void setResult(SyntheticsBrowserTestResultShortResult result) { this.result = result; } - public SyntheticsBrowserTestResultShort resultId(String resultId) { this.resultId = resultId; return this; } /** - * ID of the browser test result. - * + *

ID of the browser test result.

* @return resultId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResultId() { - return resultId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } public void setResultId(String resultId) { this.resultId = resultId; } - public SyntheticsBrowserTestResultShort status(SyntheticsTestMonitorStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -131,26 +143,29 @@ public SyntheticsBrowserTestResultShort status(SyntheticsTestMonitorStatus statu } /** - * The status of your Synthetic monitor. * O for not triggered * 1 for - * triggered * 2 for no data - * + *

The status of your Synthetic monitor. + * * O for not triggered + * * 1 for triggered + * * 2 for no data

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestMonitorStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestMonitorStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestMonitorStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SyntheticsBrowserTestResultShort object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestResultShort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -159,18 +174,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestResultShort syntheticsBrowserTestResultShort = - (SyntheticsBrowserTestResultShort) o; - return Objects.equals(this.checkTime, syntheticsBrowserTestResultShort.checkTime) - && Objects.equals(this.probeDc, syntheticsBrowserTestResultShort.probeDc) - && Objects.equals(this.result, syntheticsBrowserTestResultShort.result) - && Objects.equals(this.resultId, syntheticsBrowserTestResultShort.resultId) - && Objects.equals(this.status, syntheticsBrowserTestResultShort.status); + SyntheticsBrowserTestResultShort syntheticsBrowserTestResultShort = (SyntheticsBrowserTestResultShort) o; + return Objects.equals(this.checkTime, syntheticsBrowserTestResultShort.checkTime) && Objects.equals(this.probeDc, syntheticsBrowserTestResultShort.probeDc) && Objects.equals(this.result, syntheticsBrowserTestResultShort.result) && Objects.equals(this.resultId, syntheticsBrowserTestResultShort.resultId) && Objects.equals(this.status, syntheticsBrowserTestResultShort.status); } + @Override public int hashCode() { - return Objects.hash(checkTime, probeDc, result, resultId, status); + return Objects.hash(checkTime,probeDc,result,resultId,status); } @Override @@ -187,7 +198,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShortResult.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShortResult.java index 1cf3477b862..319e9c1c57c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShortResult.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestResultShortResult.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object with the result of the last browser test run. */ +/** + *

Object with the result of the last browser test run.

+ */ @JsonPropertyOrder({ SyntheticsBrowserTestResultShortResult.JSON_PROPERTY_DEVICE, SyntheticsBrowserTestResultShortResult.JSON_PROPERTY_DURATION, @@ -20,10 +40,10 @@ SyntheticsBrowserTestResultShortResult.JSON_PROPERTY_STEP_COUNT_COMPLETED, SyntheticsBrowserTestResultShortResult.JSON_PROPERTY_STEP_COUNT_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestResultShortResult { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEVICE = "device"; private SyntheticsDevice device; @@ -46,106 +66,99 @@ public SyntheticsBrowserTestResultShortResult device(SyntheticsDevice device) { } /** - * Object describing the device used to perform the Synthetic test. - * + *

Object describing the device used to perform the Synthetic test.

* @return device - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsDevice getDevice() { - return device; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsDevice getDevice() { + return device; + } public void setDevice(SyntheticsDevice device) { this.device = device; } - public SyntheticsBrowserTestResultShortResult duration(Double duration) { this.duration = duration; return this; } /** - * Length in milliseconds of the browser test run. - * + *

Length in milliseconds of the browser test run.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDuration() { + return duration; + } public void setDuration(Double duration) { this.duration = duration; } - public SyntheticsBrowserTestResultShortResult errorCount(Long errorCount) { this.errorCount = errorCount; return this; } /** - * Amount of errors collected for a single browser test run. - * + *

Amount of errors collected for a single browser test run.

* @return errorCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getErrorCount() { - return errorCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getErrorCount() { + return errorCount; + } public void setErrorCount(Long errorCount) { this.errorCount = errorCount; } - public SyntheticsBrowserTestResultShortResult stepCountCompleted(Long stepCountCompleted) { this.stepCountCompleted = stepCountCompleted; return this; } /** - * Amount of browser test steps completed before failing. - * + *

Amount of browser test steps completed before failing.

* @return stepCountCompleted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEP_COUNT_COMPLETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStepCountCompleted() { - return stepCountCompleted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEP_COUNT_COMPLETED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStepCountCompleted() { + return stepCountCompleted; + } public void setStepCountCompleted(Long stepCountCompleted) { this.stepCountCompleted = stepCountCompleted; } - public SyntheticsBrowserTestResultShortResult stepCountTotal(Long stepCountTotal) { this.stepCountTotal = stepCountTotal; return this; } /** - * Total amount of browser test steps. - * + *

Total amount of browser test steps.

* @return stepCountTotal - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEP_COUNT_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStepCountTotal() { - return stepCountTotal; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEP_COUNT_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStepCountTotal() { + return stepCountTotal; + } public void setStepCountTotal(Long stepCountTotal) { this.stepCountTotal = stepCountTotal; } - /** Return true if this SyntheticsBrowserTestResultShortResult object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestResultShortResult object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -154,20 +167,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestResultShortResult syntheticsBrowserTestResultShortResult = - (SyntheticsBrowserTestResultShortResult) o; - return Objects.equals(this.device, syntheticsBrowserTestResultShortResult.device) - && Objects.equals(this.duration, syntheticsBrowserTestResultShortResult.duration) - && Objects.equals(this.errorCount, syntheticsBrowserTestResultShortResult.errorCount) - && Objects.equals( - this.stepCountCompleted, syntheticsBrowserTestResultShortResult.stepCountCompleted) - && Objects.equals( - this.stepCountTotal, syntheticsBrowserTestResultShortResult.stepCountTotal); + SyntheticsBrowserTestResultShortResult syntheticsBrowserTestResultShortResult = (SyntheticsBrowserTestResultShortResult) o; + return Objects.equals(this.device, syntheticsBrowserTestResultShortResult.device) && Objects.equals(this.duration, syntheticsBrowserTestResultShortResult.duration) && Objects.equals(this.errorCount, syntheticsBrowserTestResultShortResult.errorCount) && Objects.equals(this.stepCountCompleted, syntheticsBrowserTestResultShortResult.stepCountCompleted) && Objects.equals(this.stepCountTotal, syntheticsBrowserTestResultShortResult.stepCountTotal); } + @Override public int hashCode() { - return Objects.hash(device, duration, errorCount, stepCountCompleted, stepCountTotal); + return Objects.hash(device,duration,errorCount,stepCountCompleted,stepCountTotal); } @Override @@ -184,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestRumSettings.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestRumSettings.java index a2f3ca3cadb..a4ffd011de7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestRumSettings.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestRumSettings.java @@ -6,35 +6,49 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The RUM data collection settings for the Synthetic browser test. Note: There are - * 3 ways to format RUM settings: - * - *

{ isEnabled: false } RUM data is not collected. - * - *

{ isEnabled: true } RUM data is collected from the Synthetic test's default - * application. - * - *

- * { isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 } - * RUM data is collected using the specified application. + *

The RUM data collection settings for the Synthetic browser test. + * Note: There are 3 ways to format RUM settings:

+ *

{ isEnabled: false } + * RUM data is not collected.

+ *

{ isEnabled: true } + * RUM data is collected from the Synthetic test's default application.

+ *

{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 } + * RUM data is collected using the specified application.

*/ @JsonPropertyOrder({ SyntheticsBrowserTestRumSettings.JSON_PROPERTY_APPLICATION_ID, SyntheticsBrowserTestRumSettings.JSON_PROPERTY_CLIENT_TOKEN_ID, SyntheticsBrowserTestRumSettings.JSON_PROPERTY_IS_ENABLED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserTestRumSettings { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APPLICATION_ID = "applicationId"; private String applicationId; @@ -48,73 +62,69 @@ public SyntheticsBrowserTestRumSettings() {} @JsonCreator public SyntheticsBrowserTestRumSettings( - @JsonProperty(required = true, value = JSON_PROPERTY_IS_ENABLED) Boolean isEnabled) { - this.isEnabled = isEnabled; + @JsonProperty(required=true, value=JSON_PROPERTY_IS_ENABLED)Boolean isEnabled) { + this.isEnabled = isEnabled; } - public SyntheticsBrowserTestRumSettings applicationId(String applicationId) { this.applicationId = applicationId; return this; } /** - * RUM application ID used to collect RUM data for the browser test. - * + *

RUM application ID used to collect RUM data for the browser test.

* @return applicationId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApplicationId() { - return applicationId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getApplicationId() { + return applicationId; + } public void setApplicationId(String applicationId) { this.applicationId = applicationId; } - public SyntheticsBrowserTestRumSettings clientTokenId(Long clientTokenId) { this.clientTokenId = clientTokenId; return this; } /** - * RUM application API key ID used to collect RUM data for the browser test. - * + *

RUM application API key ID used to collect RUM data for the browser test.

* @return clientTokenId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT_TOKEN_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getClientTokenId() { - return clientTokenId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_TOKEN_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getClientTokenId() { + return clientTokenId; + } public void setClientTokenId(Long clientTokenId) { this.clientTokenId = clientTokenId; } - public SyntheticsBrowserTestRumSettings isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Determines whether RUM data is collected during test runs. - * + *

Determines whether RUM data is collected during test runs.

* @return isEnabled - */ - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - /** Return true if this SyntheticsBrowserTestRumSettings object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestRumSettings object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -123,16 +133,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsBrowserTestRumSettings syntheticsBrowserTestRumSettings = - (SyntheticsBrowserTestRumSettings) o; - return Objects.equals(this.applicationId, syntheticsBrowserTestRumSettings.applicationId) - && Objects.equals(this.clientTokenId, syntheticsBrowserTestRumSettings.clientTokenId) - && Objects.equals(this.isEnabled, syntheticsBrowserTestRumSettings.isEnabled); + SyntheticsBrowserTestRumSettings syntheticsBrowserTestRumSettings = (SyntheticsBrowserTestRumSettings) o; + return Objects.equals(this.applicationId, syntheticsBrowserTestRumSettings.applicationId) && Objects.equals(this.clientTokenId, syntheticsBrowserTestRumSettings.clientTokenId) && Objects.equals(this.isEnabled, syntheticsBrowserTestRumSettings.isEnabled); } + @Override public int hashCode() { - return Objects.hash(applicationId, clientTokenId, isEnabled); + return Objects.hash(applicationId,clientTokenId,isEnabled); } @Override @@ -147,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestType.java index e322732ae0f..a6b566a21c9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserTestType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Synthetic test, browser. */ +/** + *

Type of the Synthetic test, browser.

+ */ @JsonSerialize(using = SyntheticsBrowserTestType.SyntheticsBrowserTestTypeSerializer.class) public class SyntheticsBrowserTestType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBrowserTestTypeSerializer - extends StdSerializer { - public SyntheticsBrowserTestTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBrowserTestTypeSerializer extends StdSerializer { + public SyntheticsBrowserTestTypeSerializer(Class t) { + super(t); + } - public SyntheticsBrowserTestTypeSerializer() { - this(null); - } + public SyntheticsBrowserTestTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBrowserTestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBrowserTestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBrowserTestType object is equal to o. */ + /** + * Return true if this SyntheticsBrowserTestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariable.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariable.java index 40133ccfc77..e4ac26bc8fc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariable.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariable.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Object defining a variable that can be used in your browser test. Learn more in the Browser test Actions - * documentation. + *

Object defining a variable that can be used in your browser test. + * Learn more in the Browser test Actions documentation.

*/ @JsonPropertyOrder({ SyntheticsBrowserVariable.JSON_PROPERTY_EXAMPLE, @@ -25,10 +41,10 @@ SyntheticsBrowserVariable.JSON_PROPERTY_PATTERN, SyntheticsBrowserVariable.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsBrowserVariable { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXAMPLE = "example"; private String example; @@ -48,97 +64,87 @@ public SyntheticsBrowserVariable() {} @JsonCreator public SyntheticsBrowserVariable( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SyntheticsBrowserVariableType type) { - this.name = name; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsBrowserVariableType type) { + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsBrowserVariable example(String example) { this.example = example; return this; } /** - * Example for the variable. - * + *

Example for the variable.

* @return example - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXAMPLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExample() { - return example; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXAMPLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExample() { + return example; + } public void setExample(String example) { this.example = example; } - public SyntheticsBrowserVariable id(String id) { this.id = id; return this; } /** - * ID for the variable. Global variables require an ID. - * + *

ID for the variable. Global variables require an ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SyntheticsBrowserVariable name(String name) { this.name = name; return this; } /** - * Name of the variable. - * + *

Name of the variable.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsBrowserVariable pattern(String pattern) { this.pattern = pattern; return this; } /** - * Pattern of the variable. - * + *

Pattern of the variable.

* @return pattern - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATTERN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPattern() { - return pattern; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPattern() { + return pattern; + } public void setPattern(String pattern) { this.pattern = pattern; } - public SyntheticsBrowserVariable type(SyntheticsBrowserVariableType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -146,24 +152,25 @@ public SyntheticsBrowserVariable type(SyntheticsBrowserVariableType type) { } /** - * Type of browser test variable. - * + *

Type of browser test variable.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsBrowserVariableType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsBrowserVariableType getType() { + return type; + } public void setType(SyntheticsBrowserVariableType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsBrowserVariable object is equal to o. */ + /** + * Return true if this SyntheticsBrowserVariable object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -173,16 +180,13 @@ public boolean equals(Object o) { return false; } SyntheticsBrowserVariable syntheticsBrowserVariable = (SyntheticsBrowserVariable) o; - return Objects.equals(this.example, syntheticsBrowserVariable.example) - && Objects.equals(this.id, syntheticsBrowserVariable.id) - && Objects.equals(this.name, syntheticsBrowserVariable.name) - && Objects.equals(this.pattern, syntheticsBrowserVariable.pattern) - && Objects.equals(this.type, syntheticsBrowserVariable.type); + return Objects.equals(this.example, syntheticsBrowserVariable.example) && Objects.equals(this.id, syntheticsBrowserVariable.id) && Objects.equals(this.name, syntheticsBrowserVariable.name) && Objects.equals(this.pattern, syntheticsBrowserVariable.pattern) && Objects.equals(this.type, syntheticsBrowserVariable.type); } + @Override public int hashCode() { - return Objects.hash(example, id, name, pattern, type); + return Objects.hash(example,id,name,pattern,type); } @Override @@ -199,7 +203,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariableType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariableType.java index 3b5497eaf2a..659bb2a4205 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariableType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBrowserVariableType.java @@ -6,36 +6,54 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of browser test variable. */ +/** + *

Type of browser test variable.

+ */ @JsonSerialize(using = SyntheticsBrowserVariableType.SyntheticsBrowserVariableTypeSerializer.class) public class SyntheticsBrowserVariableType { - public static final SyntheticsBrowserVariableType ELEMENT = - new SyntheticsBrowserVariableType("element"); - public static final SyntheticsBrowserVariableType EMAIL = - new SyntheticsBrowserVariableType("email"); - public static final SyntheticsBrowserVariableType GLOBAL = - new SyntheticsBrowserVariableType("global"); - public static final SyntheticsBrowserVariableType JAVASCRIPT = - new SyntheticsBrowserVariableType("javascript"); - public static final SyntheticsBrowserVariableType TEXT = - new SyntheticsBrowserVariableType("text"); + public static final SyntheticsBrowserVariableType ELEMENT = new SyntheticsBrowserVariableType("element"); + public static final SyntheticsBrowserVariableType EMAIL = new SyntheticsBrowserVariableType("email"); + public static final SyntheticsBrowserVariableType GLOBAL = new SyntheticsBrowserVariableType("global"); + public static final SyntheticsBrowserVariableType JAVASCRIPT = new SyntheticsBrowserVariableType("javascript"); + public static final SyntheticsBrowserVariableType TEXT = new SyntheticsBrowserVariableType("text"); - private static final Set allowedValues = - new HashSet(Arrays.asList("element", "email", "global", "javascript", "text")); + private static final Set allowedValues = new HashSet(Arrays.asList("element", "email", "global", "javascript", "text")); private String value; @@ -47,22 +65,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsBrowserVariableTypeSerializer - extends StdSerializer { - public SyntheticsBrowserVariableTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsBrowserVariableTypeSerializer extends StdSerializer { + public SyntheticsBrowserVariableTypeSerializer(Class t) { + super(t); + } - public SyntheticsBrowserVariableTypeSerializer() { - this(null); - } + public SyntheticsBrowserVariableTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsBrowserVariableType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsBrowserVariableType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsBrowserVariableType object is equal to o. */ + /** + * Return true if this SyntheticsBrowserVariableType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadata.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadata.java index 2aafbaaca74..a93c1f401c5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadata.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Metadata for the Synthetics tests run. */ + +/** + *

Metadata for the Synthetics tests run.

+ */ @JsonPropertyOrder({ SyntheticsCIBatchMetadata.JSON_PROPERTY_CI, SyntheticsCIBatchMetadata.JSON_PROPERTY_GIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCIBatchMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CI = "ci"; private SyntheticsCIBatchMetadataCI ci; @@ -34,21 +54,19 @@ public SyntheticsCIBatchMetadata ci(SyntheticsCIBatchMetadataCI ci) { } /** - * Description of the CI provider. - * + *

Description of the CI provider.

* @return ci - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadataCI getCi() { - return ci; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadataCI getCi() { + return ci; + } public void setCi(SyntheticsCIBatchMetadataCI ci) { this.ci = ci; } - public SyntheticsCIBatchMetadata git(SyntheticsCIBatchMetadataGit git) { this.git = git; this.unparsed |= git.unparsed; @@ -56,22 +74,23 @@ public SyntheticsCIBatchMetadata git(SyntheticsCIBatchMetadataGit git) { } /** - * Git information. - * + *

Git information.

* @return git - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadataGit getGit() { - return git; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadataGit getGit() { + return git; + } public void setGit(SyntheticsCIBatchMetadataGit git) { this.git = git; } - /** Return true if this SyntheticsCIBatchMetadata object is equal to o. */ + /** + * Return true if this SyntheticsCIBatchMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } SyntheticsCIBatchMetadata syntheticsCiBatchMetadata = (SyntheticsCIBatchMetadata) o; - return Objects.equals(this.ci, syntheticsCiBatchMetadata.ci) - && Objects.equals(this.git, syntheticsCiBatchMetadata.git); + return Objects.equals(this.ci, syntheticsCiBatchMetadata.ci) && Objects.equals(this.git, syntheticsCiBatchMetadata.git); } + @Override public int hashCode() { - return Objects.hash(ci, git); + return Objects.hash(ci,git); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataCI.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataCI.java index 2db4fb1a45e..6d0fbace1dd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataCI.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataCI.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Description of the CI provider. */ + +/** + *

Description of the CI provider.

+ */ @JsonPropertyOrder({ SyntheticsCIBatchMetadataCI.JSON_PROPERTY_PIPELINE, SyntheticsCIBatchMetadataCI.JSON_PROPERTY_PROVIDER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCIBatchMetadataCI { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PIPELINE = "pipeline"; private SyntheticsCIBatchMetadataPipeline pipeline; @@ -34,21 +54,19 @@ public SyntheticsCIBatchMetadataCI pipeline(SyntheticsCIBatchMetadataPipeline pi } /** - * Description of the CI pipeline. - * + *

Description of the CI pipeline.

* @return pipeline - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PIPELINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadataPipeline getPipeline() { - return pipeline; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PIPELINE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadataPipeline getPipeline() { + return pipeline; + } public void setPipeline(SyntheticsCIBatchMetadataPipeline pipeline) { this.pipeline = pipeline; } - public SyntheticsCIBatchMetadataCI provider(SyntheticsCIBatchMetadataProvider provider) { this.provider = provider; this.unparsed |= provider.unparsed; @@ -56,22 +74,23 @@ public SyntheticsCIBatchMetadataCI provider(SyntheticsCIBatchMetadataProvider pr } /** - * Description of the CI provider. - * + *

Description of the CI provider.

* @return provider - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadataProvider getProvider() { - return provider; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadataProvider getProvider() { + return provider; + } public void setProvider(SyntheticsCIBatchMetadataProvider provider) { this.provider = provider; } - /** Return true if this SyntheticsCIBatchMetadataCI object is equal to o. */ + /** + * Return true if this SyntheticsCIBatchMetadataCI object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } SyntheticsCIBatchMetadataCI syntheticsCiBatchMetadataCi = (SyntheticsCIBatchMetadataCI) o; - return Objects.equals(this.pipeline, syntheticsCiBatchMetadataCi.pipeline) - && Objects.equals(this.provider, syntheticsCiBatchMetadataCi.provider); + return Objects.equals(this.pipeline, syntheticsCiBatchMetadataCi.pipeline) && Objects.equals(this.provider, syntheticsCiBatchMetadataCi.provider); } + @Override public int hashCode() { - return Objects.hash(pipeline, provider); + return Objects.hash(pipeline,provider); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataGit.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataGit.java index 159d49724e9..dd4fc545b14 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataGit.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataGit.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Git information. */ + +/** + *

Git information.

+ */ @JsonPropertyOrder({ SyntheticsCIBatchMetadataGit.JSON_PROPERTY_BRANCH, SyntheticsCIBatchMetadataGit.JSON_PROPERTY_COMMIT_SHA }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCIBatchMetadataGit { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BRANCH = "branch"; private String branch; @@ -33,43 +53,42 @@ public SyntheticsCIBatchMetadataGit branch(String branch) { } /** - * Branch name. - * + *

Branch name.

* @return branch - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BRANCH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBranch() { - return branch; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BRANCH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBranch() { + return branch; + } public void setBranch(String branch) { this.branch = branch; } - public SyntheticsCIBatchMetadataGit commitSha(String commitSha) { this.commitSha = commitSha; return this; } /** - * The commit SHA. - * + *

The commit SHA.

* @return commitSha - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMMIT_SHA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCommitSha() { - return commitSha; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMIT_SHA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCommitSha() { + return commitSha; + } public void setCommitSha(String commitSha) { this.commitSha = commitSha; } - /** Return true if this SyntheticsCIBatchMetadataGit object is equal to o. */ + /** + * Return true if this SyntheticsCIBatchMetadataGit object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } SyntheticsCIBatchMetadataGit syntheticsCiBatchMetadataGit = (SyntheticsCIBatchMetadataGit) o; - return Objects.equals(this.branch, syntheticsCiBatchMetadataGit.branch) - && Objects.equals(this.commitSha, syntheticsCiBatchMetadataGit.commitSha); + return Objects.equals(this.branch, syntheticsCiBatchMetadataGit.branch) && Objects.equals(this.commitSha, syntheticsCiBatchMetadataGit.commitSha); } + @Override public int hashCode() { - return Objects.hash(branch, commitSha); + return Objects.hash(branch,commitSha); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataPipeline.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataPipeline.java index 46125f68477..1c0e1ef7951 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataPipeline.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataPipeline.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Description of the CI pipeline. */ -@JsonPropertyOrder({SyntheticsCIBatchMetadataPipeline.JSON_PROPERTY_URL}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Description of the CI pipeline.

+ */ +@JsonPropertyOrder({ + SyntheticsCIBatchMetadataPipeline.JSON_PROPERTY_URL +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCIBatchMetadataPipeline { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_URL = "url"; private String url; @@ -27,22 +49,23 @@ public SyntheticsCIBatchMetadataPipeline url(String url) { } /** - * URL of the pipeline. - * + *

URL of the pipeline.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this SyntheticsCIBatchMetadataPipeline object is equal to o. */ + /** + * Return true if this SyntheticsCIBatchMetadataPipeline object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsCIBatchMetadataPipeline syntheticsCiBatchMetadataPipeline = - (SyntheticsCIBatchMetadataPipeline) o; + SyntheticsCIBatchMetadataPipeline syntheticsCiBatchMetadataPipeline = (SyntheticsCIBatchMetadataPipeline) o; return Objects.equals(this.url, syntheticsCiBatchMetadataPipeline.url); } + @Override public int hashCode() { return Objects.hash(url); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataProvider.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataProvider.java index e29bc5eae91..57fdd2278a8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataProvider.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCIBatchMetadataProvider.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Description of the CI provider. */ -@JsonPropertyOrder({SyntheticsCIBatchMetadataProvider.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Description of the CI provider.

+ */ +@JsonPropertyOrder({ + SyntheticsCIBatchMetadataProvider.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCIBatchMetadataProvider { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -27,22 +49,23 @@ public SyntheticsCIBatchMetadataProvider name(String name) { } /** - * Name of the CI provider. - * + *

Name of the CI provider.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SyntheticsCIBatchMetadataProvider object is equal to o. */ + /** + * Return true if this SyntheticsCIBatchMetadataProvider object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsCIBatchMetadataProvider syntheticsCiBatchMetadataProvider = - (SyntheticsCIBatchMetadataProvider) o; + SyntheticsCIBatchMetadataProvider syntheticsCiBatchMetadataProvider = (SyntheticsCIBatchMetadataProvider) o; return Objects.equals(this.name, syntheticsCiBatchMetadataProvider.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITest.java index 63e63d62b7d..2c021886e99 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITest.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Test configuration for Synthetics CI */ +/** + *

Test configuration for Synthetics CI

+ */ @JsonPropertyOrder({ SyntheticsCITest.JSON_PROPERTY_ALLOW_INSECURE_CERTIFICATES, SyntheticsCITest.JSON_PROPERTY_BASIC_AUTH, @@ -34,12 +49,11 @@ SyntheticsCITest.JSON_PROPERTY_START_URL, SyntheticsCITest.JSON_PROPERTY_VARIABLES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCITest { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ALLOW_INSECURE_CERTIFICATES = - "allowInsecureCertificates"; + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_INSECURE_CERTIFICATES = "allowInsecureCertificates"; private Boolean allowInsecureCertificates; public static final String JSON_PROPERTY_BASIC_AUTH = "basicAuth"; @@ -85,31 +99,28 @@ public SyntheticsCITest() {} @JsonCreator public SyntheticsCITest( - @JsonProperty(required = true, value = JSON_PROPERTY_PUBLIC_ID) String publicId) { - this.publicId = publicId; + @JsonProperty(required=true, value=JSON_PROPERTY_PUBLIC_ID)String publicId) { + this.publicId = publicId; } - public SyntheticsCITest allowInsecureCertificates(Boolean allowInsecureCertificates) { this.allowInsecureCertificates = allowInsecureCertificates; return this; } /** - * Disable certificate checks in API tests. - * + *

Disable certificate checks in API tests.

* @return allowInsecureCertificates - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALLOW_INSECURE_CERTIFICATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowInsecureCertificates() { - return allowInsecureCertificates; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_INSECURE_CERTIFICATES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowInsecureCertificates() { + return allowInsecureCertificates; + } public void setAllowInsecureCertificates(Boolean allowInsecureCertificates) { this.allowInsecureCertificates = allowInsecureCertificates; } - public SyntheticsCITest basicAuth(SyntheticsBasicAuth basicAuth) { this.basicAuth = basicAuth; this.unparsed |= basicAuth.unparsed; @@ -117,89 +128,80 @@ public SyntheticsCITest basicAuth(SyntheticsBasicAuth basicAuth) { } /** - * Object to handle basic authentication when performing the test. - * + *

Object to handle basic authentication when performing the test.

* @return basicAuth - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BASIC_AUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBasicAuth getBasicAuth() { - return basicAuth; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASIC_AUTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuth getBasicAuth() { + return basicAuth; + } public void setBasicAuth(SyntheticsBasicAuth basicAuth) { this.basicAuth = basicAuth; } - public SyntheticsCITest body(String body) { this.body = body; return this; } /** - * Body to include in the test. - * + *

Body to include in the test.

* @return body - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BODY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBody() { - return body; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BODY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBody() { + return body; + } public void setBody(String body) { this.body = body; } - public SyntheticsCITest bodyType(String bodyType) { this.bodyType = bodyType; return this; } /** - * Type of the data sent in a synthetics API test. - * + *

Type of the data sent in a synthetics API test.

* @return bodyType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BODY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBodyType() { - return bodyType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BODY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBodyType() { + return bodyType; + } public void setBodyType(String bodyType) { this.bodyType = bodyType; } - public SyntheticsCITest cookies(String cookies) { this.cookies = cookies; return this; } /** - * Cookies for the request. - * + *

Cookies for the request.

* @return cookies - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COOKIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCookies() { - return cookies; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COOKIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCookies() { + return cookies; + } public void setCookies(String cookies) { this.cookies = cookies; } - public SyntheticsCITest deviceIds(List deviceIds) { this.deviceIds = deviceIds; return this; } - public SyntheticsCITest addDeviceIdsItem(SyntheticsDeviceID deviceIdsItem) { if (this.deviceIds == null) { this.deviceIds = new ArrayList<>(); @@ -210,47 +212,42 @@ public SyntheticsCITest addDeviceIdsItem(SyntheticsDeviceID deviceIdsItem) { } /** - * For browser test, array with the different device IDs used to run the test. - * + *

For browser test, array with the different device IDs used to run the test.

* @return deviceIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDeviceIds() { - return deviceIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDeviceIds() { + return deviceIds; + } public void setDeviceIds(List deviceIds) { this.deviceIds = deviceIds; } - public SyntheticsCITest followRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; return this; } /** - * For API HTTP test, whether or not the test should follow redirects. - * + *

For API HTTP test, whether or not the test should follow redirects.

* @return followRedirects - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FOLLOW_REDIRECTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getFollowRedirects() { - return followRedirects; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FOLLOW_REDIRECTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFollowRedirects() { + return followRedirects; + } public void setFollowRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; } - public SyntheticsCITest headers(Map headers) { this.headers = headers; return this; } - public SyntheticsCITest putHeadersItem(String key, String headersItem) { if (this.headers == null) { this.headers = new HashMap<>(); @@ -260,26 +257,23 @@ public SyntheticsCITest putHeadersItem(String key, String headersItem) { } /** - * Headers to include when performing the test. - * + *

Headers to include when performing the test.

* @return headers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getHeaders() { - return headers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getHeaders() { + return headers; + } public void setHeaders(Map headers) { this.headers = headers; } - public SyntheticsCITest locations(List locations) { this.locations = locations; return this; } - public SyntheticsCITest addLocationsItem(String locationsItem) { if (this.locations == null) { this.locations = new ArrayList<>(); @@ -289,21 +283,19 @@ public SyntheticsCITest addLocationsItem(String locationsItem) { } /** - * Array of locations used to run the test. - * + *

Array of locations used to run the test.

* @return locations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLocations() { - return locations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLocations() { + return locations; + } public void setLocations(List locations) { this.locations = locations; } - public SyntheticsCITest metadata(SyntheticsCIBatchMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -311,41 +303,37 @@ public SyntheticsCITest metadata(SyntheticsCIBatchMetadata metadata) { } /** - * Metadata for the Synthetics tests run. - * + *

Metadata for the Synthetics tests run.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadata getMetadata() { + return metadata; + } public void setMetadata(SyntheticsCIBatchMetadata metadata) { this.metadata = metadata; } - public SyntheticsCITest publicId(String publicId) { this.publicId = publicId; return this; } /** - * The public ID of the Synthetics test to trigger. - * + *

The public ID of the Synthetics test to trigger.

* @return publicId - */ - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPublicId() { - return publicId; - } - + **/ + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public SyntheticsCITest retry(SyntheticsTestOptionsRetry retry) { this.retry = retry; this.unparsed |= retry.unparsed; @@ -353,47 +341,42 @@ public SyntheticsCITest retry(SyntheticsTestOptionsRetry retry) { } /** - * Object describing the retry strategy to apply to a Synthetic test. - * + *

Object describing the retry strategy to apply to a Synthetic test.

* @return retry - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptionsRetry getRetry() { - return retry; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETRY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptionsRetry getRetry() { + return retry; + } public void setRetry(SyntheticsTestOptionsRetry retry) { this.retry = retry; } - public SyntheticsCITest startUrl(String startUrl) { this.startUrl = startUrl; return this; } /** - * Starting URL for the browser test. - * + *

Starting URL for the browser test.

* @return startUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStartUrl() { - return startUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStartUrl() { + return startUrl; + } public void setStartUrl(String startUrl) { this.startUrl = startUrl; } - public SyntheticsCITest variables(Map variables) { this.variables = variables; return this; } - public SyntheticsCITest putVariablesItem(String key, String variablesItem) { if (this.variables == null) { this.variables = new HashMap<>(); @@ -403,22 +386,23 @@ public SyntheticsCITest putVariablesItem(String key, String variablesItem) { } /** - * Variables to replace in the test. - * + *

Variables to replace in the test.

* @return variables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getVariables() { - return variables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getVariables() { + return variables; + } public void setVariables(Map variables) { this.variables = variables; } - /** Return true if this SyntheticsCITest object is equal to o. */ + /** + * Return true if this SyntheticsCITest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -428,49 +412,20 @@ public boolean equals(Object o) { return false; } SyntheticsCITest syntheticsCiTest = (SyntheticsCITest) o; - return Objects.equals( - this.allowInsecureCertificates, syntheticsCiTest.allowInsecureCertificates) - && Objects.equals(this.basicAuth, syntheticsCiTest.basicAuth) - && Objects.equals(this.body, syntheticsCiTest.body) - && Objects.equals(this.bodyType, syntheticsCiTest.bodyType) - && Objects.equals(this.cookies, syntheticsCiTest.cookies) - && Objects.equals(this.deviceIds, syntheticsCiTest.deviceIds) - && Objects.equals(this.followRedirects, syntheticsCiTest.followRedirects) - && Objects.equals(this.headers, syntheticsCiTest.headers) - && Objects.equals(this.locations, syntheticsCiTest.locations) - && Objects.equals(this.metadata, syntheticsCiTest.metadata) - && Objects.equals(this.publicId, syntheticsCiTest.publicId) - && Objects.equals(this.retry, syntheticsCiTest.retry) - && Objects.equals(this.startUrl, syntheticsCiTest.startUrl) - && Objects.equals(this.variables, syntheticsCiTest.variables); + return Objects.equals(this.allowInsecureCertificates, syntheticsCiTest.allowInsecureCertificates) && Objects.equals(this.basicAuth, syntheticsCiTest.basicAuth) && Objects.equals(this.body, syntheticsCiTest.body) && Objects.equals(this.bodyType, syntheticsCiTest.bodyType) && Objects.equals(this.cookies, syntheticsCiTest.cookies) && Objects.equals(this.deviceIds, syntheticsCiTest.deviceIds) && Objects.equals(this.followRedirects, syntheticsCiTest.followRedirects) && Objects.equals(this.headers, syntheticsCiTest.headers) && Objects.equals(this.locations, syntheticsCiTest.locations) && Objects.equals(this.metadata, syntheticsCiTest.metadata) && Objects.equals(this.publicId, syntheticsCiTest.publicId) && Objects.equals(this.retry, syntheticsCiTest.retry) && Objects.equals(this.startUrl, syntheticsCiTest.startUrl) && Objects.equals(this.variables, syntheticsCiTest.variables); } + @Override public int hashCode() { - return Objects.hash( - allowInsecureCertificates, - basicAuth, - body, - bodyType, - cookies, - deviceIds, - followRedirects, - headers, - locations, - metadata, - publicId, - retry, - startUrl, - variables); + return Objects.hash(allowInsecureCertificates,basicAuth,body,bodyType,cookies,deviceIds,followRedirects,headers,locations,metadata,publicId,retry,startUrl,variables); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SyntheticsCITest {\n"); - sb.append(" allowInsecureCertificates: ") - .append(toIndentedString(allowInsecureCertificates)) - .append("\n"); + sb.append(" allowInsecureCertificates: ").append(toIndentedString(allowInsecureCertificates)).append("\n"); sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append(" bodyType: ").append(toIndentedString(bodyType)).append("\n"); @@ -489,7 +444,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITestBody.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITestBody.java index 503f65b253f..254e3369996 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITestBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCITestBody.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object describing the synthetics tests to trigger. */ -@JsonPropertyOrder({SyntheticsCITestBody.JSON_PROPERTY_TESTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object describing the synthetics tests to trigger.

+ */ +@JsonPropertyOrder({ + SyntheticsCITestBody.JSON_PROPERTY_TESTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCITestBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TESTS = "tests"; private List tests = null; @@ -30,7 +50,6 @@ public SyntheticsCITestBody tests(List tests) { } return this; } - public SyntheticsCITestBody addTestsItem(SyntheticsCITest testsItem) { if (this.tests == null) { this.tests = new ArrayList<>(); @@ -41,22 +60,23 @@ public SyntheticsCITestBody addTestsItem(SyntheticsCITest testsItem) { } /** - * Individual synthetics test. - * + *

Individual synthetics test.

* @return tests - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TESTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTests() { - return tests; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TESTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTests() { + return tests; + } public void setTests(List tests) { this.tests = tests; } - /** Return true if this SyntheticsCITestBody object is equal to o. */ + /** + * Return true if this SyntheticsCITestBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.tests, syntheticsCiTestBody.tests); } + @Override public int hashCode() { return Objects.hash(tests); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCheckType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCheckType.java index 2e9aef18d55..bec81c599d6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCheckType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCheckType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of assertion to apply in an API test. */ +/** + *

Type of assertion to apply in an API test.

+ */ @JsonSerialize(using = SyntheticsCheckType.SyntheticsCheckTypeSerializer.class) public class SyntheticsCheckType { @@ -28,8 +52,7 @@ public class SyntheticsCheckType { public static final SyntheticsCheckType CONTAINS = new SyntheticsCheckType("contains"); public static final SyntheticsCheckType NOT_CONTAINS = new SyntheticsCheckType("notContains"); public static final SyntheticsCheckType STARTS_WITH = new SyntheticsCheckType("startsWith"); - public static final SyntheticsCheckType NOT_STARTS_WITH = - new SyntheticsCheckType("notStartsWith"); + public static final SyntheticsCheckType NOT_STARTS_WITH = new SyntheticsCheckType("notStartsWith"); public static final SyntheticsCheckType GREATER = new SyntheticsCheckType("greater"); public static final SyntheticsCheckType LOWER = new SyntheticsCheckType("lower"); public static final SyntheticsCheckType GREATER_EQUALS = new SyntheticsCheckType("greaterEquals"); @@ -39,23 +62,7 @@ public class SyntheticsCheckType { public static final SyntheticsCheckType IS_EMPTY = new SyntheticsCheckType("isEmpty"); public static final SyntheticsCheckType NOT_IS_EMPTY = new SyntheticsCheckType("notIsEmpty"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "equals", - "notEquals", - "contains", - "notContains", - "startsWith", - "notStartsWith", - "greater", - "lower", - "greaterEquals", - "lowerEquals", - "matchRegex", - "between", - "isEmpty", - "notIsEmpty")); + private static final Set allowedValues = new HashSet(Arrays.asList("equals", "notEquals", "contains", "notContains", "startsWith", "notStartsWith", "greater", "lower", "greaterEquals", "lowerEquals", "matchRegex", "between", "isEmpty", "notIsEmpty")); private String value; @@ -68,20 +75,18 @@ public boolean isValid() { } public static class SyntheticsCheckTypeSerializer extends StdSerializer { - public SyntheticsCheckTypeSerializer(Class t) { - super(t); - } - - public SyntheticsCheckTypeSerializer() { - this(null); - } - - @Override - public void serialize( - SyntheticsCheckType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsCheckTypeSerializer(Class t) { + super(t); + } + + public SyntheticsCheckTypeSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsCheckType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -93,7 +98,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsCheckType object is equal to o. */ + /** + * Return true if this SyntheticsCheckType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,7 +114,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariable.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariable.java index 6a64d6a40f8..bd6eaa6de34 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariable.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariable.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object defining a variable that can be used in your test configuration. */ + +/** + *

Object defining a variable that can be used in your test configuration.

+ */ @JsonPropertyOrder({ SyntheticsConfigVariable.JSON_PROPERTY_EXAMPLE, SyntheticsConfigVariable.JSON_PROPERTY_ID, @@ -22,10 +41,10 @@ SyntheticsConfigVariable.JSON_PROPERTY_SECURE, SyntheticsConfigVariable.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsConfigVariable { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXAMPLE = "example"; private String example; @@ -48,119 +67,106 @@ public SyntheticsConfigVariable() {} @JsonCreator public SyntheticsConfigVariable( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SyntheticsConfigVariableType type) { - this.name = name; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsConfigVariableType type) { + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsConfigVariable example(String example) { this.example = example; return this; } /** - * Example for the variable. - * + *

Example for the variable.

* @return example - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXAMPLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExample() { - return example; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXAMPLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExample() { + return example; + } public void setExample(String example) { this.example = example; } - public SyntheticsConfigVariable id(String id) { this.id = id; return this; } /** - * ID of the variable for global variables. - * + *

ID of the variable for global variables.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SyntheticsConfigVariable name(String name) { this.name = name; return this; } /** - * Name of the variable. - * + *

Name of the variable.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsConfigVariable pattern(String pattern) { this.pattern = pattern; return this; } /** - * Pattern of the variable. - * + *

Pattern of the variable.

* @return pattern - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATTERN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPattern() { - return pattern; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPattern() { + return pattern; + } public void setPattern(String pattern) { this.pattern = pattern; } - public SyntheticsConfigVariable secure(Boolean secure) { this.secure = secure; return this; } /** - * Whether the value of this variable will be obfuscated in test results. Only for config - * variables of type text. - * + *

Whether the value of this variable will be obfuscated in test results. Only for config variables of type text.

* @return secure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSecure() { - return secure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSecure() { + return secure; + } public void setSecure(Boolean secure) { this.secure = secure; } - public SyntheticsConfigVariable type(SyntheticsConfigVariableType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -168,24 +174,25 @@ public SyntheticsConfigVariable type(SyntheticsConfigVariableType type) { } /** - * Type of the configuration variable. - * + *

Type of the configuration variable.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsConfigVariableType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsConfigVariableType getType() { + return type; + } public void setType(SyntheticsConfigVariableType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsConfigVariable object is equal to o. */ + /** + * Return true if this SyntheticsConfigVariable object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -195,17 +202,13 @@ public boolean equals(Object o) { return false; } SyntheticsConfigVariable syntheticsConfigVariable = (SyntheticsConfigVariable) o; - return Objects.equals(this.example, syntheticsConfigVariable.example) - && Objects.equals(this.id, syntheticsConfigVariable.id) - && Objects.equals(this.name, syntheticsConfigVariable.name) - && Objects.equals(this.pattern, syntheticsConfigVariable.pattern) - && Objects.equals(this.secure, syntheticsConfigVariable.secure) - && Objects.equals(this.type, syntheticsConfigVariable.type); + return Objects.equals(this.example, syntheticsConfigVariable.example) && Objects.equals(this.id, syntheticsConfigVariable.id) && Objects.equals(this.name, syntheticsConfigVariable.name) && Objects.equals(this.pattern, syntheticsConfigVariable.pattern) && Objects.equals(this.secure, syntheticsConfigVariable.secure) && Objects.equals(this.type, syntheticsConfigVariable.type); } + @Override public int hashCode() { - return Objects.hash(example, id, name, pattern, secure, type); + return Objects.hash(example,id,name,pattern,secure,type); } @Override @@ -223,7 +226,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariableType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariableType.java index 03b98bc93bf..2411836ecdf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariableType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsConfigVariableType.java @@ -6,29 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the configuration variable. */ +/** + *

Type of the configuration variable.

+ */ @JsonSerialize(using = SyntheticsConfigVariableType.SyntheticsConfigVariableTypeSerializer.class) public class SyntheticsConfigVariableType { - public static final SyntheticsConfigVariableType GLOBAL = - new SyntheticsConfigVariableType("global"); + public static final SyntheticsConfigVariableType GLOBAL = new SyntheticsConfigVariableType("global"); public static final SyntheticsConfigVariableType TEXT = new SyntheticsConfigVariableType("text"); - private static final Set allowedValues = - new HashSet(Arrays.asList("global", "text")); + private static final Set allowedValues = new HashSet(Arrays.asList("global", "text")); private String value; @@ -40,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsConfigVariableTypeSerializer - extends StdSerializer { - public SyntheticsConfigVariableTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsConfigVariableTypeSerializer extends StdSerializer { + public SyntheticsConfigVariableTypeSerializer(Class t) { + super(t); + } - public SyntheticsConfigVariableTypeSerializer() { - this(null); - } + public SyntheticsConfigVariableTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsConfigVariableType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsConfigVariableType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsConfigVariableType object is equal to o. */ + /** + * Return true if this SyntheticsConfigVariableType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCoreWebVitals.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCoreWebVitals.java index d0a8942ae13..a6834e4902f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsCoreWebVitals.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsCoreWebVitals.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Core Web Vitals attached to a browser test step. */ + +/** + *

Core Web Vitals attached to a browser test step.

+ */ @JsonPropertyOrder({ SyntheticsCoreWebVitals.JSON_PROPERTY_CLS, SyntheticsCoreWebVitals.JSON_PROPERTY_LCP, SyntheticsCoreWebVitals.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsCoreWebVitals { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CLS = "cls"; private Double cls; @@ -37,64 +57,61 @@ public SyntheticsCoreWebVitals cls(Double cls) { } /** - * Cumulative Layout Shift. - * + *

Cumulative Layout Shift.

* @return cls - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCls() { - return cls; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCls() { + return cls; + } public void setCls(Double cls) { this.cls = cls; } - public SyntheticsCoreWebVitals lcp(Double lcp) { this.lcp = lcp; return this; } /** - * Largest Contentful Paint in milliseconds. - * + *

Largest Contentful Paint in milliseconds.

* @return lcp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LCP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getLcp() { - return lcp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LCP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getLcp() { + return lcp; + } public void setLcp(Double lcp) { this.lcp = lcp; } - public SyntheticsCoreWebVitals url(String url) { this.url = url; return this; } /** - * URL attached to the metrics. - * + *

URL attached to the metrics.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this SyntheticsCoreWebVitals object is equal to o. */ + /** + * Return true if this SyntheticsCoreWebVitals object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } SyntheticsCoreWebVitals syntheticsCoreWebVitals = (SyntheticsCoreWebVitals) o; - return Objects.equals(this.cls, syntheticsCoreWebVitals.cls) - && Objects.equals(this.lcp, syntheticsCoreWebVitals.lcp) - && Objects.equals(this.url, syntheticsCoreWebVitals.url); + return Objects.equals(this.cls, syntheticsCoreWebVitals.cls) && Objects.equals(this.lcp, syntheticsCoreWebVitals.lcp) && Objects.equals(this.url, syntheticsCoreWebVitals.url); } + @Override public int hashCode() { - return Objects.hash(cls, lcp, url); + return Objects.hash(cls,lcp,url); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsPayload.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsPayload.java index ed3b17385ad..aa92dbdf200 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsPayload.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsPayload.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A JSON list of the ID or IDs of the Synthetic tests that you want to delete. */ -@JsonPropertyOrder({SyntheticsDeleteTestsPayload.JSON_PROPERTY_PUBLIC_IDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

A JSON list of the ID or IDs of the Synthetic tests that you want + * to delete.

+ */ +@JsonPropertyOrder({ + SyntheticsDeleteTestsPayload.JSON_PROPERTY_PUBLIC_IDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsDeleteTestsPayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PUBLIC_IDS = "public_ids"; private List publicIds = null; @@ -27,7 +48,6 @@ public SyntheticsDeleteTestsPayload publicIds(List publicIds) { this.publicIds = publicIds; return this; } - public SyntheticsDeleteTestsPayload addPublicIdsItem(String publicIdsItem) { if (this.publicIds == null) { this.publicIds = new ArrayList<>(); @@ -37,22 +57,23 @@ public SyntheticsDeleteTestsPayload addPublicIdsItem(String publicIdsItem) { } /** - * An array of Synthetic test IDs you want to delete. - * + *

An array of Synthetic test IDs you want to delete.

* @return publicIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPublicIds() { - return publicIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPublicIds() { + return publicIds; + } public void setPublicIds(List publicIds) { this.publicIds = publicIds; } - /** Return true if this SyntheticsDeleteTestsPayload object is equal to o. */ + /** + * Return true if this SyntheticsDeleteTestsPayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.publicIds, syntheticsDeleteTestsPayload.publicIds); } + @Override public int hashCode() { return Objects.hash(publicIds); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsResponse.java index 0115c864df8..eefb53979f3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeleteTestsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response object for deleting Synthetic tests. */ -@JsonPropertyOrder({SyntheticsDeleteTestsResponse.JSON_PROPERTY_DELETED_TESTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response object for deleting Synthetic tests.

+ */ +@JsonPropertyOrder({ + SyntheticsDeleteTestsResponse.JSON_PROPERTY_DELETED_TESTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsDeleteTestsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DELETED_TESTS = "deleted_tests"; private List deletedTests = null; @@ -30,7 +50,6 @@ public SyntheticsDeleteTestsResponse deletedTests(List de } return this; } - public SyntheticsDeleteTestsResponse addDeletedTestsItem(SyntheticsDeletedTest deletedTestsItem) { if (this.deletedTests == null) { this.deletedTests = new ArrayList<>(); @@ -41,22 +60,24 @@ public SyntheticsDeleteTestsResponse addDeletedTestsItem(SyntheticsDeletedTest d } /** - * Array of objects containing a deleted Synthetic test ID with the associated deletion timestamp. - * + *

Array of objects containing a deleted Synthetic test ID with + * the associated deletion timestamp.

* @return deletedTests - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED_TESTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDeletedTests() { - return deletedTests; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_TESTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDeletedTests() { + return deletedTests; + } public void setDeletedTests(List deletedTests) { this.deletedTests = deletedTests; } - /** Return true if this SyntheticsDeleteTestsResponse object is equal to o. */ + /** + * Return true if this SyntheticsDeleteTestsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +90,7 @@ public boolean equals(Object o) { return Objects.equals(this.deletedTests, syntheticsDeleteTestsResponse.deletedTests); } + @Override public int hashCode() { return Objects.hash(deletedTests); @@ -84,7 +106,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeletedTest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeletedTest.java index 5fd35a7fd7e..093cc979e02 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeletedTest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeletedTest.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing a deleted Synthetic test ID with the associated deletion timestamp. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing a deleted Synthetic test ID with the associated + * deletion timestamp.

+ */ @JsonPropertyOrder({ SyntheticsDeletedTest.JSON_PROPERTY_DELETED_AT, SyntheticsDeletedTest.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsDeletedTest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime deletedAt; @@ -38,43 +55,42 @@ public SyntheticsDeletedTest deletedAt(OffsetDateTime deletedAt) { } /** - * Deletion timestamp of the Synthetic test ID. - * + *

Deletion timestamp of the Synthetic test ID.

* @return deletedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getDeletedAt() { - return deletedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDeletedAt() { + return deletedAt; + } public void setDeletedAt(OffsetDateTime deletedAt) { this.deletedAt = deletedAt; } - public SyntheticsDeletedTest publicId(String publicId) { this.publicId = publicId; return this; } /** - * The Synthetic test ID deleted. - * + *

The Synthetic test ID deleted.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this SyntheticsDeletedTest object is equal to o. */ + /** + * Return true if this SyntheticsDeletedTest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +100,13 @@ public boolean equals(Object o) { return false; } SyntheticsDeletedTest syntheticsDeletedTest = (SyntheticsDeletedTest) o; - return Objects.equals(this.deletedAt, syntheticsDeletedTest.deletedAt) - && Objects.equals(this.publicId, syntheticsDeletedTest.publicId); + return Objects.equals(this.deletedAt, syntheticsDeletedTest.deletedAt) && Objects.equals(this.publicId, syntheticsDeletedTest.publicId); } + @Override public int hashCode() { - return Objects.hash(deletedAt, publicId); + return Objects.hash(deletedAt,publicId); } @Override @@ -104,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDevice.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDevice.java index 03db146684f..3463220c99d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDevice.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDevice.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the device used to perform the Synthetic test. */ + +/** + *

Object describing the device used to perform the Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsDevice.JSON_PROPERTY_HEIGHT, SyntheticsDevice.JSON_PROPERTY_ID, @@ -21,10 +40,10 @@ SyntheticsDevice.JSON_PROPERTY_NAME, SyntheticsDevice.JSON_PROPERTY_WIDTH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsDevice { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HEIGHT = "height"; private Long height; @@ -44,37 +63,34 @@ public SyntheticsDevice() {} @JsonCreator public SyntheticsDevice( - @JsonProperty(required = true, value = JSON_PROPERTY_HEIGHT) Long height, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) SyntheticsDeviceID id, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_WIDTH) Long width) { - this.height = height; - this.id = id; - this.unparsed |= !id.isValid(); - this.name = name; - this.width = width; + @JsonProperty(required=true, value=JSON_PROPERTY_HEIGHT)Long height, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)SyntheticsDeviceID id, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_WIDTH)Long width) { + this.height = height; + this.id = id; + this.unparsed |= !id.isValid(); + this.name = name; + this.width = width; } - public SyntheticsDevice height(Long height) { this.height = height; return this; } /** - * Screen height of the device. - * + *

Screen height of the device.

* @return height - */ - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getHeight() { - return height; - } - + **/ + @JsonProperty(JSON_PROPERTY_HEIGHT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getHeight() { + return height; + } public void setHeight(Long height) { this.height = height; } - public SyntheticsDevice id(SyntheticsDeviceID id) { this.id = id; this.unparsed |= !id.isValid(); @@ -82,85 +98,80 @@ public SyntheticsDevice id(SyntheticsDeviceID id) { } /** - * The device ID. - * + *

The device ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsDeviceID getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsDeviceID getId() { + return id; + } public void setId(SyntheticsDeviceID id) { if (!id.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.id = id; } - public SyntheticsDevice isMobile(Boolean isMobile) { this.isMobile = isMobile; return this; } /** - * Whether or not the device is a mobile. - * + *

Whether or not the device is a mobile.

* @return isMobile - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_MOBILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsMobile() { - return isMobile; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MOBILE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMobile() { + return isMobile; + } public void setIsMobile(Boolean isMobile) { this.isMobile = isMobile; } - public SyntheticsDevice name(String name) { this.name = name; return this; } /** - * The device name. - * + *

The device name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsDevice width(Long width) { this.width = width; return this; } /** - * Screen width of the device. - * + *

Screen width of the device.

* @return width - */ - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getWidth() { - return width; - } - + **/ + @JsonProperty(JSON_PROPERTY_WIDTH) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getWidth() { + return width; + } public void setWidth(Long width) { this.width = width; } - /** Return true if this SyntheticsDevice object is equal to o. */ + /** + * Return true if this SyntheticsDevice object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -170,16 +181,13 @@ public boolean equals(Object o) { return false; } SyntheticsDevice syntheticsDevice = (SyntheticsDevice) o; - return Objects.equals(this.height, syntheticsDevice.height) - && Objects.equals(this.id, syntheticsDevice.id) - && Objects.equals(this.isMobile, syntheticsDevice.isMobile) - && Objects.equals(this.name, syntheticsDevice.name) - && Objects.equals(this.width, syntheticsDevice.width); + return Objects.equals(this.height, syntheticsDevice.height) && Objects.equals(this.id, syntheticsDevice.id) && Objects.equals(this.isMobile, syntheticsDevice.isMobile) && Objects.equals(this.name, syntheticsDevice.name) && Objects.equals(this.width, syntheticsDevice.width); } + @Override public int hashCode() { - return Objects.hash(height, id, isMobile, name, width); + return Objects.hash(height,id,isMobile,name,width); } @Override @@ -196,7 +204,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeviceID.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeviceID.java index 451668c06e8..139ed04025a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeviceID.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsDeviceID.java @@ -6,57 +6,61 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The device ID. */ +/** + *

The device ID.

+ */ @JsonSerialize(using = SyntheticsDeviceID.SyntheticsDeviceIDSerializer.class) public class SyntheticsDeviceID { public static final SyntheticsDeviceID LAPTOP_LARGE = new SyntheticsDeviceID("laptop_large"); public static final SyntheticsDeviceID TABLET = new SyntheticsDeviceID("tablet"); public static final SyntheticsDeviceID MOBILE_SMALL = new SyntheticsDeviceID("mobile_small"); - public static final SyntheticsDeviceID CHROME_LAPTOP_LARGE = - new SyntheticsDeviceID("chrome.laptop_large"); + public static final SyntheticsDeviceID CHROME_LAPTOP_LARGE = new SyntheticsDeviceID("chrome.laptop_large"); public static final SyntheticsDeviceID CHROME_TABLET = new SyntheticsDeviceID("chrome.tablet"); - public static final SyntheticsDeviceID CHROME_MOBILE_SMALL = - new SyntheticsDeviceID("chrome.mobile_small"); - public static final SyntheticsDeviceID FIREFOX_LAPTOP_LARGE = - new SyntheticsDeviceID("firefox.laptop_large"); + public static final SyntheticsDeviceID CHROME_MOBILE_SMALL = new SyntheticsDeviceID("chrome.mobile_small"); + public static final SyntheticsDeviceID FIREFOX_LAPTOP_LARGE = new SyntheticsDeviceID("firefox.laptop_large"); public static final SyntheticsDeviceID FIREFOX_TABLET = new SyntheticsDeviceID("firefox.tablet"); - public static final SyntheticsDeviceID FIREFOX_MOBILE_SMALL = - new SyntheticsDeviceID("firefox.mobile_small"); - public static final SyntheticsDeviceID EDGE_LAPTOP_LARGE = - new SyntheticsDeviceID("edge.laptop_large"); + public static final SyntheticsDeviceID FIREFOX_MOBILE_SMALL = new SyntheticsDeviceID("firefox.mobile_small"); + public static final SyntheticsDeviceID EDGE_LAPTOP_LARGE = new SyntheticsDeviceID("edge.laptop_large"); public static final SyntheticsDeviceID EDGE_TABLET = new SyntheticsDeviceID("edge.tablet"); - public static final SyntheticsDeviceID EDGE_MOBILE_SMALL = - new SyntheticsDeviceID("edge.mobile_small"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "laptop_large", - "tablet", - "mobile_small", - "chrome.laptop_large", - "chrome.tablet", - "chrome.mobile_small", - "firefox.laptop_large", - "firefox.tablet", - "firefox.mobile_small", - "edge.laptop_large", - "edge.tablet", - "edge.mobile_small")); + public static final SyntheticsDeviceID EDGE_MOBILE_SMALL = new SyntheticsDeviceID("edge.mobile_small"); + + private static final Set allowedValues = new HashSet(Arrays.asList("laptop_large", "tablet", "mobile_small", "chrome.laptop_large", "chrome.tablet", "chrome.mobile_small", "firefox.laptop_large", "firefox.tablet", "firefox.mobile_small", "edge.laptop_large", "edge.tablet", "edge.mobile_small")); private String value; @@ -69,19 +73,18 @@ public boolean isValid() { } public static class SyntheticsDeviceIDSerializer extends StdSerializer { - public SyntheticsDeviceIDSerializer(Class t) { - super(t); - } - - public SyntheticsDeviceIDSerializer() { - this(null); - } - - @Override - public void serialize(SyntheticsDeviceID value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsDeviceIDSerializer(Class t) { + super(t); + } + + public SyntheticsDeviceIDSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsDeviceID value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -93,7 +96,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsDeviceID object is equal to o. */ + /** + * Return true if this SyntheticsDeviceID object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,7 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetAPITestLatestResultsResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetAPITestLatestResultsResponse.java index 89fee77bc7e..54f78a4f385 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetAPITestLatestResultsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetAPITestLatestResultsResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object with the latest Synthetic API test run. */ +/** + *

Object with the latest Synthetic API test run.

+ */ @JsonPropertyOrder({ SyntheticsGetAPITestLatestResultsResponse.JSON_PROPERTY_LAST_TIMESTAMP_FETCHED, SyntheticsGetAPITestLatestResultsResponse.JSON_PROPERTY_RESULTS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGetAPITestLatestResultsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LAST_TIMESTAMP_FETCHED = "last_timestamp_fetched"; private Long lastTimestampFetched; @@ -35,32 +53,27 @@ public SyntheticsGetAPITestLatestResultsResponse lastTimestampFetched(Long lastT } /** - * Timestamp of the latest API test run. - * + *

Timestamp of the latest API test run.

* @return lastTimestampFetched - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_TIMESTAMP_FETCHED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastTimestampFetched() { - return lastTimestampFetched; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_TIMESTAMP_FETCHED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastTimestampFetched() { + return lastTimestampFetched; + } public void setLastTimestampFetched(Long lastTimestampFetched) { this.lastTimestampFetched = lastTimestampFetched; } - - public SyntheticsGetAPITestLatestResultsResponse results( - List results) { + public SyntheticsGetAPITestLatestResultsResponse results(List results) { this.results = results; for (SyntheticsAPITestResultShort item : results) { this.unparsed |= item.unparsed; } return this; } - - public SyntheticsGetAPITestLatestResultsResponse addResultsItem( - SyntheticsAPITestResultShort resultsItem) { + public SyntheticsGetAPITestLatestResultsResponse addResultsItem(SyntheticsAPITestResultShort resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -70,22 +83,23 @@ public SyntheticsGetAPITestLatestResultsResponse addResultsItem( } /** - * Result of the latest API test run. - * + *

Result of the latest API test run.

* @return results - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResults() { - return results; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } public void setResults(List results) { this.results = results; } - /** Return true if this SyntheticsGetAPITestLatestResultsResponse object is equal to o. */ + /** + * Return true if this SyntheticsGetAPITestLatestResultsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,33 +108,29 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsGetAPITestLatestResultsResponse syntheticsGetApiTestLatestResultsResponse = - (SyntheticsGetAPITestLatestResultsResponse) o; - return Objects.equals( - this.lastTimestampFetched, - syntheticsGetApiTestLatestResultsResponse.lastTimestampFetched) - && Objects.equals(this.results, syntheticsGetApiTestLatestResultsResponse.results); + SyntheticsGetAPITestLatestResultsResponse syntheticsGetApiTestLatestResultsResponse = (SyntheticsGetAPITestLatestResultsResponse) o; + return Objects.equals(this.lastTimestampFetched, syntheticsGetApiTestLatestResultsResponse.lastTimestampFetched) && Objects.equals(this.results, syntheticsGetApiTestLatestResultsResponse.results); } + @Override public int hashCode() { - return Objects.hash(lastTimestampFetched, results); + return Objects.hash(lastTimestampFetched,results); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SyntheticsGetAPITestLatestResultsResponse {\n"); - sb.append(" lastTimestampFetched: ") - .append(toIndentedString(lastTimestampFetched)) - .append("\n"); + sb.append(" lastTimestampFetched: ").append(toIndentedString(lastTimestampFetched)).append("\n"); sb.append(" results: ").append(toIndentedString(results)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetBrowserTestLatestResultsResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetBrowserTestLatestResultsResponse.java index dcd9717cbf5..da2d880dcf2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetBrowserTestLatestResultsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGetBrowserTestLatestResultsResponse.java @@ -6,62 +6,74 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object with the latest Synthetic browser test run. */ +/** + *

Object with the latest Synthetic browser test run.

+ */ @JsonPropertyOrder({ SyntheticsGetBrowserTestLatestResultsResponse.JSON_PROPERTY_LAST_TIMESTAMP_FETCHED, SyntheticsGetBrowserTestLatestResultsResponse.JSON_PROPERTY_RESULTS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGetBrowserTestLatestResultsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LAST_TIMESTAMP_FETCHED = "last_timestamp_fetched"; private Long lastTimestampFetched; public static final String JSON_PROPERTY_RESULTS = "results"; private List results = null; - public SyntheticsGetBrowserTestLatestResultsResponse lastTimestampFetched( - Long lastTimestampFetched) { + public SyntheticsGetBrowserTestLatestResultsResponse lastTimestampFetched(Long lastTimestampFetched) { this.lastTimestampFetched = lastTimestampFetched; return this; } /** - * Timestamp of the latest browser test run. - * + *

Timestamp of the latest browser test run.

* @return lastTimestampFetched - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_TIMESTAMP_FETCHED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLastTimestampFetched() { - return lastTimestampFetched; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_TIMESTAMP_FETCHED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastTimestampFetched() { + return lastTimestampFetched; + } public void setLastTimestampFetched(Long lastTimestampFetched) { this.lastTimestampFetched = lastTimestampFetched; } - - public SyntheticsGetBrowserTestLatestResultsResponse results( - List results) { + public SyntheticsGetBrowserTestLatestResultsResponse results(List results) { this.results = results; for (SyntheticsBrowserTestResultShort item : results) { this.unparsed |= item.unparsed; } return this; } - - public SyntheticsGetBrowserTestLatestResultsResponse addResultsItem( - SyntheticsBrowserTestResultShort resultsItem) { + public SyntheticsGetBrowserTestLatestResultsResponse addResultsItem(SyntheticsBrowserTestResultShort resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -71,22 +83,23 @@ public SyntheticsGetBrowserTestLatestResultsResponse addResultsItem( } /** - * Result of the latest browser test run. - * + *

Result of the latest browser test run.

* @return results - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResults() { - return results; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } public void setResults(List results) { this.results = results; } - /** Return true if this SyntheticsGetBrowserTestLatestResultsResponse object is equal to o. */ + /** + * Return true if this SyntheticsGetBrowserTestLatestResultsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -95,33 +108,29 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsGetBrowserTestLatestResultsResponse syntheticsGetBrowserTestLatestResultsResponse = - (SyntheticsGetBrowserTestLatestResultsResponse) o; - return Objects.equals( - this.lastTimestampFetched, - syntheticsGetBrowserTestLatestResultsResponse.lastTimestampFetched) - && Objects.equals(this.results, syntheticsGetBrowserTestLatestResultsResponse.results); + SyntheticsGetBrowserTestLatestResultsResponse syntheticsGetBrowserTestLatestResultsResponse = (SyntheticsGetBrowserTestLatestResultsResponse) o; + return Objects.equals(this.lastTimestampFetched, syntheticsGetBrowserTestLatestResultsResponse.lastTimestampFetched) && Objects.equals(this.results, syntheticsGetBrowserTestLatestResultsResponse.results); } + @Override public int hashCode() { - return Objects.hash(lastTimestampFetched, results); + return Objects.hash(lastTimestampFetched,results); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SyntheticsGetBrowserTestLatestResultsResponse {\n"); - sb.append(" lastTimestampFetched: ") - .append(toIndentedString(lastTimestampFetched)) - .append("\n"); + sb.append(" lastTimestampFetched: ").append(toIndentedString(lastTimestampFetched)).append("\n"); sb.append(" results: ").append(toIndentedString(results)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariable.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariable.java index 8fa18abd9f3..b1d33d63086 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariable.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariable.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Synthetics global variable. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Synthetics global variable.

+ */ @JsonPropertyOrder({ SyntheticsGlobalVariable.JSON_PROPERTY_ATTRIBUTES, SyntheticsGlobalVariable.JSON_PROPERTY_DESCRIPTION, @@ -26,10 +43,10 @@ SyntheticsGlobalVariable.JSON_PROPERTY_TAGS, SyntheticsGlobalVariable.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGlobalVariable { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SyntheticsGlobalVariableAttributes attributes; @@ -58,18 +75,16 @@ public SyntheticsGlobalVariable() {} @JsonCreator public SyntheticsGlobalVariable( - @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags, - @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) - SyntheticsGlobalVariableValue value) { - this.description = description; - this.name = name; - this.tags = tags; - this.value = value; - this.unparsed |= value.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DESCRIPTION)String description, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TAGS)List tags, + @JsonProperty(required=true, value=JSON_PROPERTY_VALUE)SyntheticsGlobalVariableValue value) { + this.description = description; + this.name = name; + this.tags = tags; + this.value = value; + this.unparsed |= value.unparsed; } - public SyntheticsGlobalVariable attributes(SyntheticsGlobalVariableAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -77,143 +92,128 @@ public SyntheticsGlobalVariable attributes(SyntheticsGlobalVariableAttributes at } /** - * Attributes of the global variable. - * + *

Attributes of the global variable.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsGlobalVariableAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsGlobalVariableAttributes getAttributes() { + return attributes; + } public void setAttributes(SyntheticsGlobalVariableAttributes attributes) { this.attributes = attributes; } - public SyntheticsGlobalVariable description(String description) { this.description = description; return this; } /** - * Description of the global variable. - * + *

Description of the global variable.

* @return description - */ - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDescription() { - return description; - } - + **/ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } /** - * Unique identifier of the global variable. - * + *

Unique identifier of the global variable.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public SyntheticsGlobalVariable name(String name) { this.name = name; return this; } /** - * Name of the global variable. Unique across Synthetics global variables. - * + *

Name of the global variable. Unique across Synthetics global variables.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public SyntheticsGlobalVariable parseTestOptions( - SyntheticsGlobalVariableParseTestOptions parseTestOptions) { + public SyntheticsGlobalVariable parseTestOptions(SyntheticsGlobalVariableParseTestOptions parseTestOptions) { this.parseTestOptions = parseTestOptions; this.unparsed |= parseTestOptions.unparsed; return this; } /** - * Parser options to use for retrieving a Synthetics global variable from a Synthetics Test. Used - * in conjunction with parse_test_public_id. - * + *

Parser options to use for retrieving a Synthetics global variable from a Synthetics Test. Used in conjunction with parse_test_public_id.

* @return parseTestOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PARSE_TEST_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsGlobalVariableParseTestOptions getParseTestOptions() { - return parseTestOptions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARSE_TEST_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsGlobalVariableParseTestOptions getParseTestOptions() { + return parseTestOptions; + } public void setParseTestOptions(SyntheticsGlobalVariableParseTestOptions parseTestOptions) { this.parseTestOptions = parseTestOptions; } - public SyntheticsGlobalVariable parseTestPublicId(String parseTestPublicId) { this.parseTestPublicId = parseTestPublicId; return this; } /** - * A Synthetic test ID to use as a test to generate the variable value. - * + *

A Synthetic test ID to use as a test to generate the variable value.

* @return parseTestPublicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PARSE_TEST_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getParseTestPublicId() { - return parseTestPublicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARSE_TEST_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getParseTestPublicId() { + return parseTestPublicId; + } public void setParseTestPublicId(String parseTestPublicId) { this.parseTestPublicId = parseTestPublicId; } - public SyntheticsGlobalVariable tags(List tags) { this.tags = tags; return this; } - public SyntheticsGlobalVariable addTagsItem(String tagsItem) { this.tags.add(tagsItem); return this; } /** - * Tags of the global variable. - * + *

Tags of the global variable.

* @return tags - */ - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTags() { - return tags; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SyntheticsGlobalVariable value(SyntheticsGlobalVariableValue value) { this.value = value; this.unparsed |= value.unparsed; @@ -221,21 +221,22 @@ public SyntheticsGlobalVariable value(SyntheticsGlobalVariableValue value) { } /** - * Value of the global variable. - * + *

Value of the global variable.

* @return value - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsGlobalVariableValue getValue() { - return value; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsGlobalVariableValue getValue() { + return value; + } public void setValue(SyntheticsGlobalVariableValue value) { this.value = value; } - /** Return true if this SyntheticsGlobalVariable object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariable object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -245,20 +246,13 @@ public boolean equals(Object o) { return false; } SyntheticsGlobalVariable syntheticsGlobalVariable = (SyntheticsGlobalVariable) o; - return Objects.equals(this.attributes, syntheticsGlobalVariable.attributes) - && Objects.equals(this.description, syntheticsGlobalVariable.description) - && Objects.equals(this.id, syntheticsGlobalVariable.id) - && Objects.equals(this.name, syntheticsGlobalVariable.name) - && Objects.equals(this.parseTestOptions, syntheticsGlobalVariable.parseTestOptions) - && Objects.equals(this.parseTestPublicId, syntheticsGlobalVariable.parseTestPublicId) - && Objects.equals(this.tags, syntheticsGlobalVariable.tags) - && Objects.equals(this.value, syntheticsGlobalVariable.value); + return Objects.equals(this.attributes, syntheticsGlobalVariable.attributes) && Objects.equals(this.description, syntheticsGlobalVariable.description) && Objects.equals(this.id, syntheticsGlobalVariable.id) && Objects.equals(this.name, syntheticsGlobalVariable.name) && Objects.equals(this.parseTestOptions, syntheticsGlobalVariable.parseTestOptions) && Objects.equals(this.parseTestPublicId, syntheticsGlobalVariable.parseTestPublicId) && Objects.equals(this.tags, syntheticsGlobalVariable.tags) && Objects.equals(this.value, syntheticsGlobalVariable.value); } + @Override public int hashCode() { - return Objects.hash( - attributes, description, id, name, parseTestOptions, parseTestPublicId, tags, value); + return Objects.hash(attributes,description,id,name,parseTestOptions,parseTestPublicId,tags,value); } @Override @@ -278,7 +272,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableAttributes.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableAttributes.java index 3b7e08510ca..9fb27336822 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableAttributes.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes of the global variable. */ -@JsonPropertyOrder({SyntheticsGlobalVariableAttributes.JSON_PROPERTY_RESTRICTED_ROLES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Attributes of the global variable.

+ */ +@JsonPropertyOrder({ + SyntheticsGlobalVariableAttributes.JSON_PROPERTY_RESTRICTED_ROLES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGlobalVariableAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RESTRICTED_ROLES = "restricted_roles"; private List restrictedRoles = null; @@ -27,7 +47,6 @@ public SyntheticsGlobalVariableAttributes restrictedRoles(List restricte this.restrictedRoles = restrictedRoles; return this; } - public SyntheticsGlobalVariableAttributes addRestrictedRolesItem(String restrictedRolesItem) { if (this.restrictedRoles == null) { this.restrictedRoles = new ArrayList<>(); @@ -37,23 +56,23 @@ public SyntheticsGlobalVariableAttributes addRestrictedRolesItem(String restrict } /** - * A list of role identifiers that can be pulled from the Roles API, for restricting read and - * write access. - * + *

A list of role identifiers that can be pulled from the Roles API, for restricting read and write access.

* @return restrictedRoles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRestrictedRoles() { - return restrictedRoles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRestrictedRoles() { + return restrictedRoles; + } public void setRestrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; } - /** Return true if this SyntheticsGlobalVariableAttributes object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +81,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsGlobalVariableAttributes syntheticsGlobalVariableAttributes = - (SyntheticsGlobalVariableAttributes) o; + SyntheticsGlobalVariableAttributes syntheticsGlobalVariableAttributes = (SyntheticsGlobalVariableAttributes) o; return Objects.equals(this.restrictedRoles, syntheticsGlobalVariableAttributes.restrictedRoles); } + @Override public int hashCode() { return Objects.hash(restrictedRoles); @@ -82,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableOptions.java index 047bdc3dda4..15b08a5cf2e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableOptions.java @@ -6,45 +6,67 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Options for the Global Variable for MFA. */ -@JsonPropertyOrder({SyntheticsGlobalVariableOptions.JSON_PROPERTY_TOTP_PARAMETERS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Options for the Global Variable for MFA.

+ */ +@JsonPropertyOrder({ + SyntheticsGlobalVariableOptions.JSON_PROPERTY_TOTP_PARAMETERS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGlobalVariableOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTP_PARAMETERS = "totp_parameters"; private SyntheticsGlobalVariableTOTPParameters totpParameters; - public SyntheticsGlobalVariableOptions totpParameters( - SyntheticsGlobalVariableTOTPParameters totpParameters) { + public SyntheticsGlobalVariableOptions totpParameters(SyntheticsGlobalVariableTOTPParameters totpParameters) { this.totpParameters = totpParameters; this.unparsed |= totpParameters.unparsed; return this; } /** - * Parameters for the TOTP/MFA variable - * + *

Parameters for the TOTP/MFA variable

* @return totpParameters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTP_PARAMETERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsGlobalVariableTOTPParameters getTotpParameters() { - return totpParameters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTP_PARAMETERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsGlobalVariableTOTPParameters getTotpParameters() { + return totpParameters; + } public void setTotpParameters(SyntheticsGlobalVariableTOTPParameters totpParameters) { this.totpParameters = totpParameters; } - /** Return true if this SyntheticsGlobalVariableOptions object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -53,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsGlobalVariableOptions syntheticsGlobalVariableOptions = - (SyntheticsGlobalVariableOptions) o; + SyntheticsGlobalVariableOptions syntheticsGlobalVariableOptions = (SyntheticsGlobalVariableOptions) o; return Objects.equals(this.totpParameters, syntheticsGlobalVariableOptions.totpParameters); } + @Override public int hashCode() { return Objects.hash(totpParameters); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptions.java index bba46617f05..4eb50cacd01 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptions.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Parser options to use for retrieving a Synthetics global variable from a Synthetics Test. Used in - * conjunction with parse_test_public_id. + *

Parser options to use for retrieving a Synthetics global variable from a Synthetics Test. Used in conjunction with parse_test_public_id.

*/ @JsonPropertyOrder({ SyntheticsGlobalVariableParseTestOptions.JSON_PROPERTY_FIELD, @@ -23,10 +39,10 @@ SyntheticsGlobalVariableParseTestOptions.JSON_PROPERTY_PARSER, SyntheticsGlobalVariableParseTestOptions.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGlobalVariableParseTestOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FIELD = "field"; private String field; @@ -43,55 +59,48 @@ public SyntheticsGlobalVariableParseTestOptions() {} @JsonCreator public SyntheticsGlobalVariableParseTestOptions( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SyntheticsGlobalVariableParseTestOptionsType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsGlobalVariableParseTestOptionsType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsGlobalVariableParseTestOptions field(String field) { this.field = field; return this; } /** - * When type is http_header, name of the header to use to extract the value. - * + *

When type is http_header, name of the header to use to extract the value.

* @return field - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getField() { - return field; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } public void setField(String field) { this.field = field; } - public SyntheticsGlobalVariableParseTestOptions localVariableName(String localVariableName) { this.localVariableName = localVariableName; return this; } /** - * When type is local_variable, name of the local variable to use to extract the - * value. - * + *

When type is local_variable, name of the local variable to use to extract the value.

* @return localVariableName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCAL_VARIABLE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLocalVariableName() { - return localVariableName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCAL_VARIABLE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLocalVariableName() { + return localVariableName; + } public void setLocalVariableName(String localVariableName) { this.localVariableName = localVariableName; } - public SyntheticsGlobalVariableParseTestOptions parser(SyntheticsVariableParser parser) { this.parser = parser; this.unparsed |= parser.unparsed; @@ -99,47 +108,45 @@ public SyntheticsGlobalVariableParseTestOptions parser(SyntheticsVariableParser } /** - * Details of the parser to use for the global variable. - * + *

Details of the parser to use for the global variable.

* @return parser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PARSER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsVariableParser getParser() { - return parser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARSER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsVariableParser getParser() { + return parser; + } public void setParser(SyntheticsVariableParser parser) { this.parser = parser; } - - public SyntheticsGlobalVariableParseTestOptions type( - SyntheticsGlobalVariableParseTestOptionsType type) { + public SyntheticsGlobalVariableParseTestOptions type(SyntheticsGlobalVariableParseTestOptionsType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Property of the Synthetics Test Response to use for a Synthetics global variable. - * + *

Property of the Synthetics Test Response to use for a Synthetics global variable.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsGlobalVariableParseTestOptionsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsGlobalVariableParseTestOptionsType getType() { + return type; + } public void setType(SyntheticsGlobalVariableParseTestOptionsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsGlobalVariableParseTestOptions object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableParseTestOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -148,18 +155,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsGlobalVariableParseTestOptions syntheticsGlobalVariableParseTestOptions = - (SyntheticsGlobalVariableParseTestOptions) o; - return Objects.equals(this.field, syntheticsGlobalVariableParseTestOptions.field) - && Objects.equals( - this.localVariableName, syntheticsGlobalVariableParseTestOptions.localVariableName) - && Objects.equals(this.parser, syntheticsGlobalVariableParseTestOptions.parser) - && Objects.equals(this.type, syntheticsGlobalVariableParseTestOptions.type); + SyntheticsGlobalVariableParseTestOptions syntheticsGlobalVariableParseTestOptions = (SyntheticsGlobalVariableParseTestOptions) o; + return Objects.equals(this.field, syntheticsGlobalVariableParseTestOptions.field) && Objects.equals(this.localVariableName, syntheticsGlobalVariableParseTestOptions.localVariableName) && Objects.equals(this.parser, syntheticsGlobalVariableParseTestOptions.parser) && Objects.equals(this.type, syntheticsGlobalVariableParseTestOptions.type); } + @Override public int hashCode() { - return Objects.hash(field, localVariableName, parser, type); + return Objects.hash(field,localVariableName,parser,type); } @Override @@ -175,7 +178,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptionsType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptionsType.java index 27604734699..e4830b88718 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptionsType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptionsType.java @@ -6,35 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Property of the Synthetics Test Response to use for a Synthetics global variable. */ -@JsonSerialize( - using = - SyntheticsGlobalVariableParseTestOptionsType - .SyntheticsGlobalVariableParseTestOptionsTypeSerializer.class) +/** + *

Property of the Synthetics Test Response to use for a Synthetics global variable.

+ */ +@JsonSerialize(using = SyntheticsGlobalVariableParseTestOptionsType.SyntheticsGlobalVariableParseTestOptionsTypeSerializer.class) public class SyntheticsGlobalVariableParseTestOptionsType { - public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_BODY = - new SyntheticsGlobalVariableParseTestOptionsType("http_body"); - public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_HEADER = - new SyntheticsGlobalVariableParseTestOptionsType("http_header"); - public static final SyntheticsGlobalVariableParseTestOptionsType LOCAL_VARIABLE = - new SyntheticsGlobalVariableParseTestOptionsType("local_variable"); + public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_BODY = new SyntheticsGlobalVariableParseTestOptionsType("http_body"); + public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_HEADER = new SyntheticsGlobalVariableParseTestOptionsType("http_header"); + public static final SyntheticsGlobalVariableParseTestOptionsType LOCAL_VARIABLE = new SyntheticsGlobalVariableParseTestOptionsType("local_variable"); - private static final Set allowedValues = - new HashSet(Arrays.asList("http_body", "http_header", "local_variable")); + private static final Set allowedValues = new HashSet(Arrays.asList("http_body", "http_header", "local_variable")); private String value; @@ -46,25 +63,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsGlobalVariableParseTestOptionsTypeSerializer - extends StdSerializer { - public SyntheticsGlobalVariableParseTestOptionsTypeSerializer( - Class t) { - super(t); - } + public static class SyntheticsGlobalVariableParseTestOptionsTypeSerializer extends StdSerializer { + public SyntheticsGlobalVariableParseTestOptionsTypeSerializer(Class t) { + super(t); + } - public SyntheticsGlobalVariableParseTestOptionsTypeSerializer() { - this(null); - } + public SyntheticsGlobalVariableParseTestOptionsTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsGlobalVariableParseTestOptionsType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsGlobalVariableParseTestOptionsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -76,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsGlobalVariableParseTestOptionsType object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableParseTestOptionsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParserType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParserType.java index c93026da072..37bd0edc2cc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParserType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParserType.java @@ -6,35 +6,53 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of parser for a Synthetics global variable from a synthetics test. */ -@JsonSerialize( - using = SyntheticsGlobalVariableParserType.SyntheticsGlobalVariableParserTypeSerializer.class) +/** + *

Type of parser for a Synthetics global variable from a synthetics test.

+ */ +@JsonSerialize(using = SyntheticsGlobalVariableParserType.SyntheticsGlobalVariableParserTypeSerializer.class) public class SyntheticsGlobalVariableParserType { - public static final SyntheticsGlobalVariableParserType RAW = - new SyntheticsGlobalVariableParserType("raw"); - public static final SyntheticsGlobalVariableParserType JSON_PATH = - new SyntheticsGlobalVariableParserType("json_path"); - public static final SyntheticsGlobalVariableParserType REGEX = - new SyntheticsGlobalVariableParserType("regex"); - public static final SyntheticsGlobalVariableParserType X_PATH = - new SyntheticsGlobalVariableParserType("x_path"); + public static final SyntheticsGlobalVariableParserType RAW = new SyntheticsGlobalVariableParserType("raw"); + public static final SyntheticsGlobalVariableParserType JSON_PATH = new SyntheticsGlobalVariableParserType("json_path"); + public static final SyntheticsGlobalVariableParserType REGEX = new SyntheticsGlobalVariableParserType("regex"); + public static final SyntheticsGlobalVariableParserType X_PATH = new SyntheticsGlobalVariableParserType("x_path"); - private static final Set allowedValues = - new HashSet(Arrays.asList("raw", "json_path", "regex", "x_path")); + private static final Set allowedValues = new HashSet(Arrays.asList("raw", "json_path", "regex", "x_path")); private String value; @@ -46,23 +64,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsGlobalVariableParserTypeSerializer - extends StdSerializer { - public SyntheticsGlobalVariableParserTypeSerializer( - Class t) { - super(t); - } + public static class SyntheticsGlobalVariableParserTypeSerializer extends StdSerializer { + public SyntheticsGlobalVariableParserTypeSerializer(Class t) { + super(t); + } - public SyntheticsGlobalVariableParserTypeSerializer() { - this(null); - } + public SyntheticsGlobalVariableParserTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsGlobalVariableParserType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsGlobalVariableParserType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsGlobalVariableParserType object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableParserType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableTOTPParameters.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableTOTPParameters.java index 7e1cc8e6663..d0860628aa5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableTOTPParameters.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableTOTPParameters.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Parameters for the TOTP/MFA variable */ + +/** + *

Parameters for the TOTP/MFA variable

+ */ @JsonPropertyOrder({ SyntheticsGlobalVariableTOTPParameters.JSON_PROPERTY_DIGITS, SyntheticsGlobalVariableTOTPParameters.JSON_PROPERTY_REFRESH_INTERVAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGlobalVariableTOTPParameters { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DIGITS = "digits"; private Integer digits; @@ -33,43 +53,46 @@ public SyntheticsGlobalVariableTOTPParameters digits(Integer digits) { } /** - * Number of digits for the OTP code. minimum: 4 maximum: 10 - * + *

Number of digits for the OTP code.

+ * minimum: 4 + * maximum: 10 * @return digits - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DIGITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDigits() { - return digits; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIGITS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDigits() { + return digits; + } public void setDigits(Integer digits) { this.digits = digits; } - public SyntheticsGlobalVariableTOTPParameters refreshInterval(Integer refreshInterval) { this.refreshInterval = refreshInterval; return this; } /** - * Interval for which to refresh the token (in seconds). minimum: 0 maximum: 999 - * + *

Interval for which to refresh the token (in seconds).

+ * minimum: 0 + * maximum: 999 * @return refreshInterval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REFRESH_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getRefreshInterval() { - return refreshInterval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFRESH_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRefreshInterval() { + return refreshInterval; + } public void setRefreshInterval(Integer refreshInterval) { this.refreshInterval = refreshInterval; } - /** Return true if this SyntheticsGlobalVariableTOTPParameters object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableTOTPParameters object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,16 +101,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsGlobalVariableTOTPParameters syntheticsGlobalVariableTotpParameters = - (SyntheticsGlobalVariableTOTPParameters) o; - return Objects.equals(this.digits, syntheticsGlobalVariableTotpParameters.digits) - && Objects.equals( - this.refreshInterval, syntheticsGlobalVariableTotpParameters.refreshInterval); + SyntheticsGlobalVariableTOTPParameters syntheticsGlobalVariableTotpParameters = (SyntheticsGlobalVariableTOTPParameters) o; + return Objects.equals(this.digits, syntheticsGlobalVariableTotpParameters.digits) && Objects.equals(this.refreshInterval, syntheticsGlobalVariableTotpParameters.refreshInterval); } + @Override public int hashCode() { - return Objects.hash(digits, refreshInterval); + return Objects.hash(digits,refreshInterval); } @Override @@ -101,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableValue.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableValue.java index 80f5708cdd5..7eb6abf19d4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableValue.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableValue.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Value of the global variable. */ + +/** + *

Value of the global variable.

+ */ @JsonPropertyOrder({ SyntheticsGlobalVariableValue.JSON_PROPERTY_OPTIONS, SyntheticsGlobalVariableValue.JSON_PROPERTY_SECURE, SyntheticsGlobalVariableValue.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsGlobalVariableValue { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OPTIONS = "options"; private SyntheticsGlobalVariableOptions options; @@ -38,65 +58,62 @@ public SyntheticsGlobalVariableValue options(SyntheticsGlobalVariableOptions opt } /** - * Options for the Global Variable for MFA. - * + *

Options for the Global Variable for MFA.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsGlobalVariableOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsGlobalVariableOptions getOptions() { + return options; + } public void setOptions(SyntheticsGlobalVariableOptions options) { this.options = options; } - public SyntheticsGlobalVariableValue secure(Boolean secure) { this.secure = secure; return this; } /** - * Determines if the value of the variable is hidden. - * + *

Determines if the value of the variable is hidden.

* @return secure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSecure() { - return secure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSecure() { + return secure; + } public void setSecure(Boolean secure) { this.secure = secure; } - public SyntheticsGlobalVariableValue value(String value) { this.value = value; return this; } /** - * Value of the global variable. When reading a global variable, the value will not be present if - * the variable is hidden with the secure property. - * + *

Value of the global variable. When reading a global variable, + * the value will not be present if the variable is hidden with the secure property.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsGlobalVariableValue object is equal to o. */ + /** + * Return true if this SyntheticsGlobalVariableValue object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +123,13 @@ public boolean equals(Object o) { return false; } SyntheticsGlobalVariableValue syntheticsGlobalVariableValue = (SyntheticsGlobalVariableValue) o; - return Objects.equals(this.options, syntheticsGlobalVariableValue.options) - && Objects.equals(this.secure, syntheticsGlobalVariableValue.secure) - && Objects.equals(this.value, syntheticsGlobalVariableValue.value); + return Objects.equals(this.options, syntheticsGlobalVariableValue.options) && Objects.equals(this.secure, syntheticsGlobalVariableValue.secure) && Objects.equals(this.value, syntheticsGlobalVariableValue.value); } + @Override public int hashCode() { - return Objects.hash(options, secure, value); + return Objects.hash(options,secure,value); } @Override @@ -128,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsListGlobalVariablesResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsListGlobalVariablesResponse.java index ae539ed2f1d..04adfb46ddf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsListGlobalVariablesResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsListGlobalVariablesResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing an array of Synthetic global variables. */ -@JsonPropertyOrder({SyntheticsListGlobalVariablesResponse.JSON_PROPERTY_VARIABLES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object containing an array of Synthetic global variables.

+ */ +@JsonPropertyOrder({ + SyntheticsListGlobalVariablesResponse.JSON_PROPERTY_VARIABLES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsListGlobalVariablesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_VARIABLES = "variables"; private List variables = null; @@ -30,9 +50,7 @@ public SyntheticsListGlobalVariablesResponse variables(List(); } @@ -42,22 +60,23 @@ public SyntheticsListGlobalVariablesResponse addVariablesItem( } /** - * Array of Synthetic global variables. - * + *

Array of Synthetic global variables.

* @return variables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getVariables() { - return variables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getVariables() { + return variables; + } public void setVariables(List variables) { this.variables = variables; } - /** Return true if this SyntheticsListGlobalVariablesResponse object is equal to o. */ + /** + * Return true if this SyntheticsListGlobalVariablesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsListGlobalVariablesResponse syntheticsListGlobalVariablesResponse = - (SyntheticsListGlobalVariablesResponse) o; + SyntheticsListGlobalVariablesResponse syntheticsListGlobalVariablesResponse = (SyntheticsListGlobalVariablesResponse) o; return Objects.equals(this.variables, syntheticsListGlobalVariablesResponse.variables); } + @Override public int hashCode() { return Objects.hash(variables); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsListTestsResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsListTestsResponse.java index 844a3a94c95..9914ea398b2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsListTestsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsListTestsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing an array of Synthetic tests configuration. */ -@JsonPropertyOrder({SyntheticsListTestsResponse.JSON_PROPERTY_TESTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object containing an array of Synthetic tests configuration.

+ */ +@JsonPropertyOrder({ + SyntheticsListTestsResponse.JSON_PROPERTY_TESTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsListTestsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TESTS = "tests"; private List tests = null; @@ -30,7 +50,6 @@ public SyntheticsListTestsResponse tests(List tests) { } return this; } - public SyntheticsListTestsResponse addTestsItem(SyntheticsTestDetails testsItem) { if (this.tests == null) { this.tests = new ArrayList<>(); @@ -41,22 +60,23 @@ public SyntheticsListTestsResponse addTestsItem(SyntheticsTestDetails testsItem) } /** - * Array of Synthetic tests configuration. - * + *

Array of Synthetic tests configuration.

* @return tests - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TESTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTests() { - return tests; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TESTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTests() { + return tests; + } public void setTests(List tests) { this.tests = tests; } - /** Return true if this SyntheticsListTestsResponse object is equal to o. */ + /** + * Return true if this SyntheticsListTestsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.tests, syntheticsListTestsResponse.tests); } + @Override public int hashCode() { return Objects.hash(tests); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocation.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocation.java index 16a7ba7af31..2c9269a523f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocation.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocation.java @@ -6,18 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Synthetic location that can be used when creating or editing a test. */ -@JsonPropertyOrder({SyntheticsLocation.JSON_PROPERTY_ID, SyntheticsLocation.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Synthetic location that can be used when creating or editing a + * test.

+ */ +@JsonPropertyOrder({ + SyntheticsLocation.JSON_PROPERTY_ID, + SyntheticsLocation.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsLocation { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -30,43 +54,42 @@ public SyntheticsLocation id(String id) { } /** - * Unique identifier of the location. - * + *

Unique identifier of the location.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SyntheticsLocation name(String name) { this.name = name; return this; } /** - * Name of the location. - * + *

Name of the location.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SyntheticsLocation object is equal to o. */ + /** + * Return true if this SyntheticsLocation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,13 +99,13 @@ public boolean equals(Object o) { return false; } SyntheticsLocation syntheticsLocation = (SyntheticsLocation) o; - return Objects.equals(this.id, syntheticsLocation.id) - && Objects.equals(this.name, syntheticsLocation.name); + return Objects.equals(this.id, syntheticsLocation.id) && Objects.equals(this.name, syntheticsLocation.name); } + @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(id,name); } @Override @@ -96,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocations.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocations.java index 74f2d9dbb9a..c22a98cc833 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocations.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsLocations.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List of Synthetics locations. */ -@JsonPropertyOrder({SyntheticsLocations.JSON_PROPERTY_LOCATIONS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

List of Synthetics locations.

+ */ +@JsonPropertyOrder({ + SyntheticsLocations.JSON_PROPERTY_LOCATIONS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsLocations { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LOCATIONS = "locations"; private List locations = null; @@ -30,7 +50,6 @@ public SyntheticsLocations locations(List locations) { } return this; } - public SyntheticsLocations addLocationsItem(SyntheticsLocation locationsItem) { if (this.locations == null) { this.locations = new ArrayList<>(); @@ -41,22 +60,23 @@ public SyntheticsLocations addLocationsItem(SyntheticsLocation locationsItem) { } /** - * List of Synthetics locations. - * + *

List of Synthetics locations.

* @return locations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLocations() { - return locations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLocations() { + return locations; + } public void setLocations(List locations) { this.locations = locations; } - /** Return true if this SyntheticsLocations object is equal to o. */ + /** + * Return true if this SyntheticsLocations object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.locations, syntheticsLocations.locations); } + @Override public int hashCode() { return Objects.hash(locations); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java index 540530e7555..6fd6a191560 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Parsing options for variables to extract. */ + +/** + *

Parsing options for variables to extract.

+ */ @JsonPropertyOrder({ SyntheticsParsingOptions.JSON_PROPERTY_FIELD, SyntheticsParsingOptions.JSON_PROPERTY_NAME, SyntheticsParsingOptions.JSON_PROPERTY_PARSER, SyntheticsParsingOptions.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsParsingOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FIELD = "field"; private String field; @@ -41,42 +61,38 @@ public SyntheticsParsingOptions field(String field) { } /** - * When type is http_header, name of the header to use to extract the value. - * + *

When type is http_header, name of the header to use to extract the value.

* @return field - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getField() { - return field; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } public void setField(String field) { this.field = field; } - public SyntheticsParsingOptions name(String name) { this.name = name; return this; } /** - * Name of the variable to extract. - * + *

Name of the variable to extract.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsParsingOptions parser(SyntheticsVariableParser parser) { this.parser = parser; this.unparsed |= parser.unparsed; @@ -84,21 +100,19 @@ public SyntheticsParsingOptions parser(SyntheticsVariableParser parser) { } /** - * Details of the parser to use for the global variable. - * + *

Details of the parser to use for the global variable.

* @return parser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PARSER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsVariableParser getParser() { - return parser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARSER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsVariableParser getParser() { + return parser; + } public void setParser(SyntheticsVariableParser parser) { this.parser = parser; } - public SyntheticsParsingOptions type(SyntheticsGlobalVariableParseTestOptionsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -106,25 +120,26 @@ public SyntheticsParsingOptions type(SyntheticsGlobalVariableParseTestOptionsTyp } /** - * Property of the Synthetics Test Response to use for a Synthetics global variable. - * + *

Property of the Synthetics Test Response to use for a Synthetics global variable.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsGlobalVariableParseTestOptionsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsGlobalVariableParseTestOptionsType getType() { + return type; + } public void setType(SyntheticsGlobalVariableParseTestOptionsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsParsingOptions object is equal to o. */ + /** + * Return true if this SyntheticsParsingOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +149,13 @@ public boolean equals(Object o) { return false; } SyntheticsParsingOptions syntheticsParsingOptions = (SyntheticsParsingOptions) o; - return Objects.equals(this.field, syntheticsParsingOptions.field) - && Objects.equals(this.name, syntheticsParsingOptions.name) - && Objects.equals(this.parser, syntheticsParsingOptions.parser) - && Objects.equals(this.type, syntheticsParsingOptions.type); + return Objects.equals(this.field, syntheticsParsingOptions.field) && Objects.equals(this.name, syntheticsParsingOptions.name) && Objects.equals(this.parser, syntheticsParsingOptions.parser) && Objects.equals(this.type, syntheticsParsingOptions.type); } + @Override public int hashCode() { - return Objects.hash(field, name, parser, type); + return Objects.hash(field,name,parser,type); } @Override @@ -158,7 +171,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPlayingTab.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPlayingTab.java index 4acdcc69dac..1c1c5c4798f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPlayingTab.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPlayingTab.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Navigate between different tabs for your browser test. */ +/** + *

Navigate between different tabs for your browser test.

+ */ @JsonSerialize(using = SyntheticsPlayingTab.SyntheticsPlayingTabSerializer.class) public class SyntheticsPlayingTab { @@ -29,8 +53,7 @@ public class SyntheticsPlayingTab { public static final SyntheticsPlayingTab TAB_2 = new SyntheticsPlayingTab(2l); public static final SyntheticsPlayingTab TAB_3 = new SyntheticsPlayingTab(3l); - private static final Set allowedValues = - new HashSet(Arrays.asList(-1l, 0l, 1l, 2l, 3l)); + private static final Set allowedValues = new HashSet(Arrays.asList(-1l, 0l, 1l, 2l, 3l)); private Long value; @@ -43,20 +66,18 @@ public boolean isValid() { } public static class SyntheticsPlayingTabSerializer extends StdSerializer { - public SyntheticsPlayingTabSerializer(Class t) { - super(t); - } - - public SyntheticsPlayingTabSerializer() { - this(null); - } - - @Override - public void serialize( - SyntheticsPlayingTab value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsPlayingTabSerializer(Class t) { + super(t); + } + + public SyntheticsPlayingTabSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsPlayingTab value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +89,9 @@ public void setValue(Long value) { this.value = value; } - /** Return true if this SyntheticsPlayingTab object is equal to o. */ + /** + * Return true if this SyntheticsPlayingTab object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocation.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocation.java index 766de16a81e..33145a88fad 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocation.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocation.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing information about the private location to create. */ + +/** + *

Object containing information about the private location to create.

+ */ @JsonPropertyOrder({ SyntheticsPrivateLocation.JSON_PROPERTY_DESCRIPTION, SyntheticsPrivateLocation.JSON_PROPERTY_ID, @@ -24,10 +41,10 @@ SyntheticsPrivateLocation.JSON_PROPERTY_SECRETS, SyntheticsPrivateLocation.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocation { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -50,46 +67,43 @@ public SyntheticsPrivateLocation() {} @JsonCreator public SyntheticsPrivateLocation( - @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { - this.description = description; - this.name = name; - this.tags = tags; + @JsonProperty(required=true, value=JSON_PROPERTY_DESCRIPTION)String description, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TAGS)List tags) { + this.description = description; + this.name = name; + this.tags = tags; } - public SyntheticsPrivateLocation description(String description) { this.description = description; return this; } /** - * Description of the private location. - * + *

Description of the private location.

* @return description - */ - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDescription() { - return description; - } - + **/ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } /** - * Unique identifier of the private location. - * + *

Unique identifier of the private location.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public SyntheticsPrivateLocation metadata(SyntheticsPrivateLocationMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -97,80 +111,75 @@ public SyntheticsPrivateLocation metadata(SyntheticsPrivateLocationMetadata meta } /** - * Object containing metadata about the private location. - * + *

Object containing metadata about the private location.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPrivateLocationMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPrivateLocationMetadata getMetadata() { + return metadata; + } public void setMetadata(SyntheticsPrivateLocationMetadata metadata) { this.metadata = metadata; } - public SyntheticsPrivateLocation name(String name) { this.name = name; return this; } /** - * Name of the private location. - * + *

Name of the private location.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } /** - * Secrets for the private location. Only present in the response when creating the private - * location. - * + *

Secrets for the private location. Only present in the response when creating the private location.

* @return secrets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECRETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPrivateLocationSecrets getSecrets() { - return secrets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPrivateLocationSecrets getSecrets() { + return secrets; + } public SyntheticsPrivateLocation tags(List tags) { this.tags = tags; return this; } - public SyntheticsPrivateLocation addTagsItem(String tagsItem) { this.tags.add(tagsItem); return this; } /** - * Array of tags attached to the private location. - * + *

Array of tags attached to the private location.

* @return tags - */ - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTags() { - return tags; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this SyntheticsPrivateLocation object is equal to o. */ + /** + * Return true if this SyntheticsPrivateLocation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -180,17 +189,13 @@ public boolean equals(Object o) { return false; } SyntheticsPrivateLocation syntheticsPrivateLocation = (SyntheticsPrivateLocation) o; - return Objects.equals(this.description, syntheticsPrivateLocation.description) - && Objects.equals(this.id, syntheticsPrivateLocation.id) - && Objects.equals(this.metadata, syntheticsPrivateLocation.metadata) - && Objects.equals(this.name, syntheticsPrivateLocation.name) - && Objects.equals(this.secrets, syntheticsPrivateLocation.secrets) - && Objects.equals(this.tags, syntheticsPrivateLocation.tags); + return Objects.equals(this.description, syntheticsPrivateLocation.description) && Objects.equals(this.id, syntheticsPrivateLocation.id) && Objects.equals(this.metadata, syntheticsPrivateLocation.metadata) && Objects.equals(this.name, syntheticsPrivateLocation.name) && Objects.equals(this.secrets, syntheticsPrivateLocation.secrets) && Objects.equals(this.tags, syntheticsPrivateLocation.tags); } + @Override public int hashCode() { - return Objects.hash(description, id, metadata, name, secrets, tags); + return Objects.hash(description,id,metadata,name,secrets,tags); } @Override @@ -208,7 +213,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponse.java index 65051d77f5b..60d5788d332 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponse.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Object that contains the new private location, the public key for result encryption, and the - * configuration skeleton. + *

Object that contains the new private location, the public key for result encryption, and the configuration skeleton.

*/ @JsonPropertyOrder({ SyntheticsPrivateLocationCreationResponse.JSON_PROPERTY_CONFIG, SyntheticsPrivateLocationCreationResponse.JSON_PROPERTY_PRIVATE_LOCATION, SyntheticsPrivateLocationCreationResponse.JSON_PROPERTY_RESULT_ENCRYPTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocationCreationResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIG = "config"; private Object config; @@ -40,70 +57,63 @@ public SyntheticsPrivateLocationCreationResponse config(Object config) { } /** - * Configuration skeleton for the private location. See installation instructions of the private - * location on how to use this configuration. - * + *

Configuration skeleton for the private location. See installation instructions of the private location on how to use this configuration.

* @return config - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getConfig() { - return config; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getConfig() { + return config; + } public void setConfig(Object config) { this.config = config; } - - public SyntheticsPrivateLocationCreationResponse privateLocation( - SyntheticsPrivateLocation privateLocation) { + public SyntheticsPrivateLocationCreationResponse privateLocation(SyntheticsPrivateLocation privateLocation) { this.privateLocation = privateLocation; this.unparsed |= privateLocation.unparsed; return this; } /** - * Object containing information about the private location to create. - * + *

Object containing information about the private location to create.

* @return privateLocation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRIVATE_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPrivateLocation getPrivateLocation() { - return privateLocation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVATE_LOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPrivateLocation getPrivateLocation() { + return privateLocation; + } public void setPrivateLocation(SyntheticsPrivateLocation privateLocation) { this.privateLocation = privateLocation; } - - public SyntheticsPrivateLocationCreationResponse resultEncryption( - SyntheticsPrivateLocationCreationResponseResultEncryption resultEncryption) { + public SyntheticsPrivateLocationCreationResponse resultEncryption(SyntheticsPrivateLocationCreationResponseResultEncryption resultEncryption) { this.resultEncryption = resultEncryption; this.unparsed |= resultEncryption.unparsed; return this; } /** - * Public key for the result encryption. - * + *

Public key for the result encryption.

* @return resultEncryption - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ENCRYPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPrivateLocationCreationResponseResultEncryption getResultEncryption() { - return resultEncryption; - } - - public void setResultEncryption( - SyntheticsPrivateLocationCreationResponseResultEncryption resultEncryption) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ENCRYPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPrivateLocationCreationResponseResultEncryption getResultEncryption() { + return resultEncryption; + } + public void setResultEncryption(SyntheticsPrivateLocationCreationResponseResultEncryption resultEncryption) { this.resultEncryption = resultEncryption; } - /** Return true if this SyntheticsPrivateLocationCreationResponse object is equal to o. */ + /** + * Return true if this SyntheticsPrivateLocationCreationResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,18 +122,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsPrivateLocationCreationResponse syntheticsPrivateLocationCreationResponse = - (SyntheticsPrivateLocationCreationResponse) o; - return Objects.equals(this.config, syntheticsPrivateLocationCreationResponse.config) - && Objects.equals( - this.privateLocation, syntheticsPrivateLocationCreationResponse.privateLocation) - && Objects.equals( - this.resultEncryption, syntheticsPrivateLocationCreationResponse.resultEncryption); + SyntheticsPrivateLocationCreationResponse syntheticsPrivateLocationCreationResponse = (SyntheticsPrivateLocationCreationResponse) o; + return Objects.equals(this.config, syntheticsPrivateLocationCreationResponse.config) && Objects.equals(this.privateLocation, syntheticsPrivateLocationCreationResponse.privateLocation) && Objects.equals(this.resultEncryption, syntheticsPrivateLocationCreationResponse.resultEncryption); } + @Override public int hashCode() { - return Objects.hash(config, privateLocation, resultEncryption); + return Objects.hash(config,privateLocation,resultEncryption); } @Override @@ -138,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponseResultEncryption.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponseResultEncryption.java index b8e9f9a9d43..ecdacc3dadc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponseResultEncryption.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationCreationResponseResultEncryption.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Public key for the result encryption. */ + +/** + *

Public key for the result encryption.

+ */ @JsonPropertyOrder({ SyntheticsPrivateLocationCreationResponseResultEncryption.JSON_PROPERTY_ID, SyntheticsPrivateLocationCreationResponseResultEncryption.JSON_PROPERTY_KEY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocationCreationResponseResultEncryption { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -33,45 +53,41 @@ public SyntheticsPrivateLocationCreationResponseResultEncryption id(String id) { } /** - * Fingerprint for the encryption key. - * + *

Fingerprint for the encryption key.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SyntheticsPrivateLocationCreationResponseResultEncryption key(String key) { this.key = key; return this; } /** - * Public key for result encryption. - * + *

Public key for result encryption.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } public void setKey(String key) { this.key = key; } /** - * Return true if this SyntheticsPrivateLocationCreationResponseResultEncryption object is equal - * to o. + * Return true if this SyntheticsPrivateLocationCreationResponseResultEncryption object is equal to o. */ @Override public boolean equals(Object o) { @@ -81,16 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsPrivateLocationCreationResponseResultEncryption - syntheticsPrivateLocationCreationResponseResultEncryption = - (SyntheticsPrivateLocationCreationResponseResultEncryption) o; - return Objects.equals(this.id, syntheticsPrivateLocationCreationResponseResultEncryption.id) - && Objects.equals(this.key, syntheticsPrivateLocationCreationResponseResultEncryption.key); + SyntheticsPrivateLocationCreationResponseResultEncryption syntheticsPrivateLocationCreationResponseResultEncryption = (SyntheticsPrivateLocationCreationResponseResultEncryption) o; + return Objects.equals(this.id, syntheticsPrivateLocationCreationResponseResultEncryption.id) && Objects.equals(this.key, syntheticsPrivateLocationCreationResponseResultEncryption.key); } + @Override public int hashCode() { - return Objects.hash(id, key); + return Objects.hash(id,key); } @Override @@ -104,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationMetadata.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationMetadata.java index 8228df2619e..d3ce60362d3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationMetadata.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing metadata about the private location. */ -@JsonPropertyOrder({SyntheticsPrivateLocationMetadata.JSON_PROPERTY_RESTRICTED_ROLES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object containing metadata about the private location.

+ */ +@JsonPropertyOrder({ + SyntheticsPrivateLocationMetadata.JSON_PROPERTY_RESTRICTED_ROLES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocationMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RESTRICTED_ROLES = "restricted_roles"; private List restrictedRoles = null; @@ -27,7 +47,6 @@ public SyntheticsPrivateLocationMetadata restrictedRoles(List restricted this.restrictedRoles = restrictedRoles; return this; } - public SyntheticsPrivateLocationMetadata addRestrictedRolesItem(String restrictedRolesItem) { if (this.restrictedRoles == null) { this.restrictedRoles = new ArrayList<>(); @@ -37,23 +56,23 @@ public SyntheticsPrivateLocationMetadata addRestrictedRolesItem(String restricte } /** - * A list of role identifiers that can be pulled from the Roles API, for restricting read and - * write access. - * + *

A list of role identifiers that can be pulled from the Roles API, for restricting read and write access.

* @return restrictedRoles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRestrictedRoles() { - return restrictedRoles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRestrictedRoles() { + return restrictedRoles; + } public void setRestrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; } - /** Return true if this SyntheticsPrivateLocationMetadata object is equal to o. */ + /** + * Return true if this SyntheticsPrivateLocationMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +81,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsPrivateLocationMetadata syntheticsPrivateLocationMetadata = - (SyntheticsPrivateLocationMetadata) o; + SyntheticsPrivateLocationMetadata syntheticsPrivateLocationMetadata = (SyntheticsPrivateLocationMetadata) o; return Objects.equals(this.restrictedRoles, syntheticsPrivateLocationMetadata.restrictedRoles); } + @Override public int hashCode() { return Objects.hash(restrictedRoles); @@ -82,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecrets.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecrets.java index 04e06a7d4c9..45d6682f8f5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecrets.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecrets.java @@ -6,78 +6,91 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Secrets for the private location. Only present in the response when creating the private - * location. + *

Secrets for the private location. Only present in the response when creating the private location.

*/ @JsonPropertyOrder({ SyntheticsPrivateLocationSecrets.JSON_PROPERTY_AUTHENTICATION, SyntheticsPrivateLocationSecrets.JSON_PROPERTY_CONFIG_DECRYPTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocationSecrets { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; private SyntheticsPrivateLocationSecretsAuthentication authentication; public static final String JSON_PROPERTY_CONFIG_DECRYPTION = "config_decryption"; private SyntheticsPrivateLocationSecretsConfigDecryption configDecryption; - public SyntheticsPrivateLocationSecrets authentication( - SyntheticsPrivateLocationSecretsAuthentication authentication) { + public SyntheticsPrivateLocationSecrets authentication(SyntheticsPrivateLocationSecretsAuthentication authentication) { this.authentication = authentication; this.unparsed |= authentication.unparsed; return this; } /** - * Authentication part of the secrets. - * + *

Authentication part of the secrets.

* @return authentication - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHENTICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPrivateLocationSecretsAuthentication getAuthentication() { - return authentication; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPrivateLocationSecretsAuthentication getAuthentication() { + return authentication; + } public void setAuthentication(SyntheticsPrivateLocationSecretsAuthentication authentication) { this.authentication = authentication; } - - public SyntheticsPrivateLocationSecrets configDecryption( - SyntheticsPrivateLocationSecretsConfigDecryption configDecryption) { + public SyntheticsPrivateLocationSecrets configDecryption(SyntheticsPrivateLocationSecretsConfigDecryption configDecryption) { this.configDecryption = configDecryption; this.unparsed |= configDecryption.unparsed; return this; } /** - * Private key for the private location. - * + *

Private key for the private location.

* @return configDecryption - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIG_DECRYPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPrivateLocationSecretsConfigDecryption getConfigDecryption() { - return configDecryption; - } - - public void setConfigDecryption( - SyntheticsPrivateLocationSecretsConfigDecryption configDecryption) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_DECRYPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPrivateLocationSecretsConfigDecryption getConfigDecryption() { + return configDecryption; + } + public void setConfigDecryption(SyntheticsPrivateLocationSecretsConfigDecryption configDecryption) { this.configDecryption = configDecryption; } - /** Return true if this SyntheticsPrivateLocationSecrets object is equal to o. */ + /** + * Return true if this SyntheticsPrivateLocationSecrets object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsPrivateLocationSecrets syntheticsPrivateLocationSecrets = - (SyntheticsPrivateLocationSecrets) o; - return Objects.equals(this.authentication, syntheticsPrivateLocationSecrets.authentication) - && Objects.equals(this.configDecryption, syntheticsPrivateLocationSecrets.configDecryption); + SyntheticsPrivateLocationSecrets syntheticsPrivateLocationSecrets = (SyntheticsPrivateLocationSecrets) o; + return Objects.equals(this.authentication, syntheticsPrivateLocationSecrets.authentication) && Objects.equals(this.configDecryption, syntheticsPrivateLocationSecrets.configDecryption); } + @Override public int hashCode() { - return Objects.hash(authentication, configDecryption); + return Objects.hash(authentication,configDecryption); } @Override @@ -108,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsAuthentication.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsAuthentication.java index f8617ba093b..7e6bf1a0867 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsAuthentication.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsAuthentication.java @@ -6,52 +6,75 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Authentication part of the secrets. */ + +/** + *

Authentication part of the secrets.

+ */ @JsonPropertyOrder({ SyntheticsPrivateLocationSecretsAuthentication.JSON_PROPERTY_ID, SyntheticsPrivateLocationSecretsAuthentication.JSON_PROPERTY_KEY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocationSecretsAuthentication { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_KEY = "key"; private String key; + /** - * Access key for the private location. - * + *

Access key for the private location.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } /** - * Secret access key for the private location. - * + *

Secret access key for the private location.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } - /** Return true if this SyntheticsPrivateLocationSecretsAuthentication object is equal to o. */ + /** + * Return true if this SyntheticsPrivateLocationSecretsAuthentication object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -60,15 +83,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsPrivateLocationSecretsAuthentication syntheticsPrivateLocationSecretsAuthentication = - (SyntheticsPrivateLocationSecretsAuthentication) o; - return Objects.equals(this.id, syntheticsPrivateLocationSecretsAuthentication.id) - && Objects.equals(this.key, syntheticsPrivateLocationSecretsAuthentication.key); + SyntheticsPrivateLocationSecretsAuthentication syntheticsPrivateLocationSecretsAuthentication = (SyntheticsPrivateLocationSecretsAuthentication) o; + return Objects.equals(this.id, syntheticsPrivateLocationSecretsAuthentication.id) && Objects.equals(this.key, syntheticsPrivateLocationSecretsAuthentication.key); } + @Override public int hashCode() { - return Objects.hash(id, key); + return Objects.hash(id,key); } @Override @@ -82,7 +104,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsConfigDecryption.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsConfigDecryption.java index 5380440184c..38219d44583 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsConfigDecryption.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsPrivateLocationSecretsConfigDecryption.java @@ -6,34 +6,59 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Private key for the private location. */ -@JsonPropertyOrder({SyntheticsPrivateLocationSecretsConfigDecryption.JSON_PROPERTY_KEY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Private key for the private location.

+ */ +@JsonPropertyOrder({ + SyntheticsPrivateLocationSecretsConfigDecryption.JSON_PROPERTY_KEY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsPrivateLocationSecretsConfigDecryption { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_KEY = "key"; private String key; + /** - * Private key for the private location. - * + *

Private key for the private location.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } - /** Return true if this SyntheticsPrivateLocationSecretsConfigDecryption object is equal to o. */ + /** + * Return true if this SyntheticsPrivateLocationSecretsConfigDecryption object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -42,12 +67,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsPrivateLocationSecretsConfigDecryption - syntheticsPrivateLocationSecretsConfigDecryption = - (SyntheticsPrivateLocationSecretsConfigDecryption) o; + SyntheticsPrivateLocationSecretsConfigDecryption syntheticsPrivateLocationSecretsConfigDecryption = (SyntheticsPrivateLocationSecretsConfigDecryption) o; return Objects.equals(this.key, syntheticsPrivateLocationSecretsConfigDecryption.key); } + @Override public int hashCode() { return Objects.hash(key); @@ -63,7 +87,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificate.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificate.java index fe200300c0c..e2bcf2f6627 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificate.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificate.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object describing the SSL certificate used for a Synthetic test. */ +/** + *

Object describing the SSL certificate used for a Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsSSLCertificate.JSON_PROPERTY_CIPHER, SyntheticsSSLCertificate.JSON_PROPERTY_EXPONENT, @@ -32,10 +47,10 @@ SyntheticsSSLCertificate.JSON_PROPERTY_VALID_FROM, SyntheticsSSLCertificate.JSON_PROPERTY_VALID_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsSSLCertificate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CIPHER = "cipher"; private String cipher; @@ -67,12 +82,10 @@ public class SyntheticsSSLCertificate { private SyntheticsSSLCertificateSubject subject; public static final String JSON_PROPERTY_VALID_FROM = "validFrom"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime validFrom; public static final String JSON_PROPERTY_VALID_TO = "validTo"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime validTo; @@ -82,47 +95,42 @@ public SyntheticsSSLCertificate cipher(String cipher) { } /** - * Cipher used for the connection. - * + *

Cipher used for the connection.

* @return cipher - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CIPHER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCipher() { - return cipher; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CIPHER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCipher() { + return cipher; + } public void setCipher(String cipher) { this.cipher = cipher; } - public SyntheticsSSLCertificate exponent(Double exponent) { this.exponent = exponent; return this; } /** - * Exponent associated to the certificate. - * + *

Exponent associated to the certificate.

* @return exponent - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPONENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getExponent() { - return exponent; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPONENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getExponent() { + return exponent; + } public void setExponent(Double exponent) { this.exponent = exponent; } - public SyntheticsSSLCertificate extKeyUsage(List extKeyUsage) { this.extKeyUsage = extKeyUsage; return this; } - public SyntheticsSSLCertificate addExtKeyUsageItem(String extKeyUsageItem) { if (this.extKeyUsage == null) { this.extKeyUsage = new ArrayList<>(); @@ -132,63 +140,57 @@ public SyntheticsSSLCertificate addExtKeyUsageItem(String extKeyUsageItem) { } /** - * Array of extensions and details used for the certificate. - * + *

Array of extensions and details used for the certificate.

* @return extKeyUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXT_KEY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExtKeyUsage() { - return extKeyUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXT_KEY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExtKeyUsage() { + return extKeyUsage; + } public void setExtKeyUsage(List extKeyUsage) { this.extKeyUsage = extKeyUsage; } - public SyntheticsSSLCertificate fingerprint(String fingerprint) { this.fingerprint = fingerprint; return this; } /** - * MD5 digest of the DER-encoded Certificate information. - * + *

MD5 digest of the DER-encoded Certificate information.

* @return fingerprint - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FINGERPRINT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFingerprint() { - return fingerprint; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINGERPRINT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFingerprint() { + return fingerprint; + } public void setFingerprint(String fingerprint) { this.fingerprint = fingerprint; } - public SyntheticsSSLCertificate fingerprint256(String fingerprint256) { this.fingerprint256 = fingerprint256; return this; } /** - * SHA-1 digest of the DER-encoded Certificate information. - * + *

SHA-1 digest of the DER-encoded Certificate information.

* @return fingerprint256 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FINGERPRINT256) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFingerprint256() { - return fingerprint256; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINGERPRINT256) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFingerprint256() { + return fingerprint256; + } public void setFingerprint256(String fingerprint256) { this.fingerprint256 = fingerprint256; } - public SyntheticsSSLCertificate issuer(SyntheticsSSLCertificateIssuer issuer) { this.issuer = issuer; this.unparsed |= issuer.unparsed; @@ -196,84 +198,76 @@ public SyntheticsSSLCertificate issuer(SyntheticsSSLCertificateIssuer issuer) { } /** - * Object describing the issuer of a SSL certificate. - * + *

Object describing the issuer of a SSL certificate.

* @return issuer - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ISSUER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsSSLCertificateIssuer getIssuer() { - return issuer; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSSLCertificateIssuer getIssuer() { + return issuer; + } public void setIssuer(SyntheticsSSLCertificateIssuer issuer) { this.issuer = issuer; } - public SyntheticsSSLCertificate modulus(String modulus) { this.modulus = modulus; return this; } /** - * Modulus associated to the SSL certificate private key. - * + *

Modulus associated to the SSL certificate private key.

* @return modulus - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODULUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getModulus() { - return modulus; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODULUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getModulus() { + return modulus; + } public void setModulus(String modulus) { this.modulus = modulus; } - public SyntheticsSSLCertificate protocol(String protocol) { this.protocol = protocol; return this; } /** - * TLS protocol used for the test. - * + *

TLS protocol used for the test.

* @return protocol - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProtocol() { - return protocol; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROTOCOL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProtocol() { + return protocol; + } public void setProtocol(String protocol) { this.protocol = protocol; } - public SyntheticsSSLCertificate serialNumber(String serialNumber) { this.serialNumber = serialNumber; return this; } /** - * Serial Number assigned by Symantec to the SSL certificate. - * + *

Serial Number assigned by Symantec to the SSL certificate.

* @return serialNumber - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERIAL_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSerialNumber() { - return serialNumber; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERIAL_NUMBER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSerialNumber() { + return serialNumber; + } public void setSerialNumber(String serialNumber) { this.serialNumber = serialNumber; } - public SyntheticsSSLCertificate subject(SyntheticsSSLCertificateSubject subject) { this.subject = subject; this.unparsed |= subject.unparsed; @@ -281,64 +275,61 @@ public SyntheticsSSLCertificate subject(SyntheticsSSLCertificateSubject subject) } /** - * Object describing the SSL certificate used for the test. - * + *

Object describing the SSL certificate used for the test.

* @return subject - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsSSLCertificateSubject getSubject() { - return subject; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSSLCertificateSubject getSubject() { + return subject; + } public void setSubject(SyntheticsSSLCertificateSubject subject) { this.subject = subject; } - public SyntheticsSSLCertificate validFrom(OffsetDateTime validFrom) { this.validFrom = validFrom; return this; } /** - * Date from which the SSL certificate is valid. - * + *

Date from which the SSL certificate is valid.

* @return validFrom - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALID_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getValidFrom() { - return validFrom; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALID_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getValidFrom() { + return validFrom; + } public void setValidFrom(OffsetDateTime validFrom) { this.validFrom = validFrom; } - public SyntheticsSSLCertificate validTo(OffsetDateTime validTo) { this.validTo = validTo; return this; } /** - * Date until which the SSL certificate is valid. - * + *

Date until which the SSL certificate is valid.

* @return validTo - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALID_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getValidTo() { - return validTo; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALID_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getValidTo() { + return validTo; + } public void setValidTo(OffsetDateTime validTo) { this.validTo = validTo; } - /** Return true if this SyntheticsSSLCertificate object is equal to o. */ + /** + * Return true if this SyntheticsSSLCertificate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -348,35 +339,13 @@ public boolean equals(Object o) { return false; } SyntheticsSSLCertificate syntheticsSslCertificate = (SyntheticsSSLCertificate) o; - return Objects.equals(this.cipher, syntheticsSslCertificate.cipher) - && Objects.equals(this.exponent, syntheticsSslCertificate.exponent) - && Objects.equals(this.extKeyUsage, syntheticsSslCertificate.extKeyUsage) - && Objects.equals(this.fingerprint, syntheticsSslCertificate.fingerprint) - && Objects.equals(this.fingerprint256, syntheticsSslCertificate.fingerprint256) - && Objects.equals(this.issuer, syntheticsSslCertificate.issuer) - && Objects.equals(this.modulus, syntheticsSslCertificate.modulus) - && Objects.equals(this.protocol, syntheticsSslCertificate.protocol) - && Objects.equals(this.serialNumber, syntheticsSslCertificate.serialNumber) - && Objects.equals(this.subject, syntheticsSslCertificate.subject) - && Objects.equals(this.validFrom, syntheticsSslCertificate.validFrom) - && Objects.equals(this.validTo, syntheticsSslCertificate.validTo); + return Objects.equals(this.cipher, syntheticsSslCertificate.cipher) && Objects.equals(this.exponent, syntheticsSslCertificate.exponent) && Objects.equals(this.extKeyUsage, syntheticsSslCertificate.extKeyUsage) && Objects.equals(this.fingerprint, syntheticsSslCertificate.fingerprint) && Objects.equals(this.fingerprint256, syntheticsSslCertificate.fingerprint256) && Objects.equals(this.issuer, syntheticsSslCertificate.issuer) && Objects.equals(this.modulus, syntheticsSslCertificate.modulus) && Objects.equals(this.protocol, syntheticsSslCertificate.protocol) && Objects.equals(this.serialNumber, syntheticsSslCertificate.serialNumber) && Objects.equals(this.subject, syntheticsSslCertificate.subject) && Objects.equals(this.validFrom, syntheticsSslCertificate.validFrom) && Objects.equals(this.validTo, syntheticsSslCertificate.validTo); } + @Override public int hashCode() { - return Objects.hash( - cipher, - exponent, - extKeyUsage, - fingerprint, - fingerprint256, - issuer, - modulus, - protocol, - serialNumber, - subject, - validFrom, - validTo); + return Objects.hash(cipher,exponent,extKeyUsage,fingerprint,fingerprint256,issuer,modulus,protocol,serialNumber,subject,validFrom,validTo); } @Override @@ -400,7 +369,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateIssuer.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateIssuer.java index 1484cda18d5..387de39bc88 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateIssuer.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateIssuer.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object describing the issuer of a SSL certificate. */ +/** + *

Object describing the issuer of a SSL certificate.

+ */ @JsonPropertyOrder({ SyntheticsSSLCertificateIssuer.JSON_PROPERTY_C, SyntheticsSSLCertificateIssuer.JSON_PROPERTY_C_N, @@ -21,10 +41,10 @@ SyntheticsSSLCertificateIssuer.JSON_PROPERTY_O_U, SyntheticsSSLCertificateIssuer.JSON_PROPERTY_S_T }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsSSLCertificateIssuer { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_C = "C"; private String C; @@ -49,127 +69,118 @@ public SyntheticsSSLCertificateIssuer C(String C) { } /** - * Country Name that issued the certificate. - * + *

Country Name that issued the certificate.

* @return C - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_C) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getC() { - return C; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_C) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getC() { + return C; + } public void setC(String C) { this.C = C; } - public SyntheticsSSLCertificateIssuer CN(String CN) { this.CN = CN; return this; } /** - * Common Name that issued certificate. - * + *

Common Name that issued certificate.

* @return CN - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_C_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCN() { - return CN; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_C_N) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCN() { + return CN; + } public void setCN(String CN) { this.CN = CN; } - public SyntheticsSSLCertificateIssuer L(String L) { this.L = L; return this; } /** - * Locality that issued the certificate. - * + *

Locality that issued the certificate.

* @return L - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_L) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getL() { - return L; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_L) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getL() { + return L; + } public void setL(String L) { this.L = L; } - public SyntheticsSSLCertificateIssuer O(String O) { this.O = O; return this; } /** - * Organization that issued the certificate. - * + *

Organization that issued the certificate.

* @return O - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_O) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getO() { - return O; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_O) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getO() { + return O; + } public void setO(String O) { this.O = O; } - public SyntheticsSSLCertificateIssuer OU(String OU) { this.OU = OU; return this; } /** - * Organizational Unit that issued the certificate. - * + *

Organizational Unit that issued the certificate.

* @return OU - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_O_U) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOU() { - return OU; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_O_U) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOU() { + return OU; + } public void setOU(String OU) { this.OU = OU; } - public SyntheticsSSLCertificateIssuer ST(String ST) { this.ST = ST; return this; } /** - * State Or Province Name that issued the certificate. - * + *

State Or Province Name that issued the certificate.

* @return ST - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_S_T) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getST() { - return ST; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_S_T) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getST() { + return ST; + } public void setST(String ST) { this.ST = ST; } - /** Return true if this SyntheticsSSLCertificateIssuer object is equal to o. */ + /** + * Return true if this SyntheticsSSLCertificateIssuer object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -178,19 +189,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsSSLCertificateIssuer syntheticsSslCertificateIssuer = - (SyntheticsSSLCertificateIssuer) o; - return Objects.equals(this.C, syntheticsSslCertificateIssuer.C) - && Objects.equals(this.CN, syntheticsSslCertificateIssuer.CN) - && Objects.equals(this.L, syntheticsSslCertificateIssuer.L) - && Objects.equals(this.O, syntheticsSslCertificateIssuer.O) - && Objects.equals(this.OU, syntheticsSslCertificateIssuer.OU) - && Objects.equals(this.ST, syntheticsSslCertificateIssuer.ST); + SyntheticsSSLCertificateIssuer syntheticsSslCertificateIssuer = (SyntheticsSSLCertificateIssuer) o; + return Objects.equals(this.C, syntheticsSslCertificateIssuer.C) && Objects.equals(this.CN, syntheticsSslCertificateIssuer.CN) && Objects.equals(this.L, syntheticsSslCertificateIssuer.L) && Objects.equals(this.O, syntheticsSslCertificateIssuer.O) && Objects.equals(this.OU, syntheticsSslCertificateIssuer.OU) && Objects.equals(this.ST, syntheticsSslCertificateIssuer.ST); } + @Override public int hashCode() { - return Objects.hash(C, CN, L, O, OU, ST); + return Objects.hash(C,CN,L,O,OU,ST); } @Override @@ -208,7 +214,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateSubject.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateSubject.java index 2179b1a570c..e17a79f0a53 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateSubject.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsSSLCertificateSubject.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the SSL certificate used for the test. */ + +/** + *

Object describing the SSL certificate used for the test.

+ */ @JsonPropertyOrder({ SyntheticsSSLCertificateSubject.JSON_PROPERTY_C, SyntheticsSSLCertificateSubject.JSON_PROPERTY_C_N, @@ -22,10 +42,10 @@ SyntheticsSSLCertificateSubject.JSON_PROPERTY_S_T, SyntheticsSSLCertificateSubject.JSON_PROPERTY_ALT_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsSSLCertificateSubject { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_C = "C"; private String C; @@ -53,148 +73,137 @@ public SyntheticsSSLCertificateSubject C(String C) { } /** - * Country Name associated with the certificate. - * + *

Country Name associated with the certificate.

* @return C - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_C) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getC() { - return C; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_C) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getC() { + return C; + } public void setC(String C) { this.C = C; } - public SyntheticsSSLCertificateSubject CN(String CN) { this.CN = CN; return this; } /** - * Common Name that associated with the certificate. - * + *

Common Name that associated with the certificate.

* @return CN - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_C_N) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCN() { - return CN; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_C_N) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCN() { + return CN; + } public void setCN(String CN) { this.CN = CN; } - public SyntheticsSSLCertificateSubject L(String L) { this.L = L; return this; } /** - * Locality associated with the certificate. - * + *

Locality associated with the certificate.

* @return L - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_L) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getL() { - return L; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_L) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getL() { + return L; + } public void setL(String L) { this.L = L; } - public SyntheticsSSLCertificateSubject O(String O) { this.O = O; return this; } /** - * Organization associated with the certificate. - * + *

Organization associated with the certificate.

* @return O - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_O) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getO() { - return O; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_O) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getO() { + return O; + } public void setO(String O) { this.O = O; } - public SyntheticsSSLCertificateSubject OU(String OU) { this.OU = OU; return this; } /** - * Organizational Unit associated with the certificate. - * + *

Organizational Unit associated with the certificate.

* @return OU - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_O_U) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOU() { - return OU; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_O_U) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOU() { + return OU; + } public void setOU(String OU) { this.OU = OU; } - public SyntheticsSSLCertificateSubject ST(String ST) { this.ST = ST; return this; } /** - * State Or Province Name associated with the certificate. - * + *

State Or Province Name associated with the certificate.

* @return ST - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_S_T) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getST() { - return ST; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_S_T) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getST() { + return ST; + } public void setST(String ST) { this.ST = ST; } - public SyntheticsSSLCertificateSubject altName(String altName) { this.altName = altName; return this; } /** - * Subject Alternative Name associated with the certificate. - * + *

Subject Alternative Name associated with the certificate.

* @return altName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAltName() { - return altName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAltName() { + return altName; + } public void setAltName(String altName) { this.altName = altName; } - /** Return true if this SyntheticsSSLCertificateSubject object is equal to o. */ + /** + * Return true if this SyntheticsSSLCertificateSubject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -203,20 +212,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsSSLCertificateSubject syntheticsSslCertificateSubject = - (SyntheticsSSLCertificateSubject) o; - return Objects.equals(this.C, syntheticsSslCertificateSubject.C) - && Objects.equals(this.CN, syntheticsSslCertificateSubject.CN) - && Objects.equals(this.L, syntheticsSslCertificateSubject.L) - && Objects.equals(this.O, syntheticsSslCertificateSubject.O) - && Objects.equals(this.OU, syntheticsSslCertificateSubject.OU) - && Objects.equals(this.ST, syntheticsSslCertificateSubject.ST) - && Objects.equals(this.altName, syntheticsSslCertificateSubject.altName); + SyntheticsSSLCertificateSubject syntheticsSslCertificateSubject = (SyntheticsSSLCertificateSubject) o; + return Objects.equals(this.C, syntheticsSslCertificateSubject.C) && Objects.equals(this.CN, syntheticsSslCertificateSubject.CN) && Objects.equals(this.L, syntheticsSslCertificateSubject.L) && Objects.equals(this.O, syntheticsSslCertificateSubject.O) && Objects.equals(this.OU, syntheticsSslCertificateSubject.OU) && Objects.equals(this.ST, syntheticsSslCertificateSubject.ST) && Objects.equals(this.altName, syntheticsSslCertificateSubject.altName); } + @Override public int hashCode() { - return Objects.hash(C, CN, L, O, OU, ST, altName); + return Objects.hash(C,CN,L,O,OU,ST,altName); } @Override @@ -235,7 +238,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStatus.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStatus.java index d8de9235b7e..9987741b78f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStatus.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Determines whether or not the batch has passed, failed, or is in progress. */ +/** + *

Determines whether or not the batch has passed, failed, or is in progress.

+ */ @JsonSerialize(using = SyntheticsStatus.SyntheticsStatusSerializer.class) public class SyntheticsStatus { @@ -27,8 +51,7 @@ public class SyntheticsStatus { public static final SyntheticsStatus skipped = new SyntheticsStatus("skipped"); public static final SyntheticsStatus failed = new SyntheticsStatus("failed"); - private static final Set allowedValues = - new HashSet(Arrays.asList("passed", "skipped", "failed")); + private static final Set allowedValues = new HashSet(Arrays.asList("passed", "skipped", "failed")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class SyntheticsStatusSerializer extends StdSerializer { - public SyntheticsStatusSerializer(Class t) { - super(t); - } - - public SyntheticsStatusSerializer() { - this(null); - } - - @Override - public void serialize(SyntheticsStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsStatusSerializer(Class t) { + super(t); + } + + public SyntheticsStatusSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsStatus object is equal to o. */ + /** + * Return true if this SyntheticsStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java index 9b7d09e4f71..1a48de19831 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStep.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The steps used in a Synthetics browser test. */ + +/** + *

The steps used in a Synthetics browser test.

+ */ @JsonPropertyOrder({ SyntheticsStep.JSON_PROPERTY_ALLOW_FAILURE, SyntheticsStep.JSON_PROPERTY_IS_CRITICAL, @@ -22,10 +42,10 @@ SyntheticsStep.JSON_PROPERTY_TIMEOUT, SyntheticsStep.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsStep { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALLOW_FAILURE = "allowFailure"; private Boolean allowFailure; @@ -53,127 +73,114 @@ public SyntheticsStep allowFailure(Boolean allowFailure) { } /** - * A boolean set to allow this step to fail. - * + *

A boolean set to allow this step to fail.

* @return allowFailure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALLOW_FAILURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowFailure() { - return allowFailure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_FAILURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowFailure() { + return allowFailure; + } public void setAllowFailure(Boolean allowFailure) { this.allowFailure = allowFailure; } - public SyntheticsStep isCritical(Boolean isCritical) { this.isCritical = isCritical; return this; } /** - * A boolean to use in addition to allowFailure to determine if the test should be - * marked as failed when the step fails. - * + *

A boolean to use in addition to allowFailure to determine if the test should be marked as failed when the step fails.

* @return isCritical - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_CRITICAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsCritical() { - return isCritical; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_CRITICAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCritical() { + return isCritical; + } public void setIsCritical(Boolean isCritical) { this.isCritical = isCritical; } - public SyntheticsStep name(String name) { this.name = name; return this; } /** - * The name of the step. - * + *

The name of the step.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsStep noScreenshot(Boolean noScreenshot) { this.noScreenshot = noScreenshot; return this; } /** - * A boolean set to not take a screenshot for the step. - * + *

A boolean set to not take a screenshot for the step.

* @return noScreenshot - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NO_SCREENSHOT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNoScreenshot() { - return noScreenshot; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_SCREENSHOT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoScreenshot() { + return noScreenshot; + } public void setNoScreenshot(Boolean noScreenshot) { this.noScreenshot = noScreenshot; } - public SyntheticsStep params(Object params) { this.params = params; return this; } /** - * The parameters of the step. - * + *

The parameters of the step.

* @return params - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PARAMS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getParams() { - return params; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getParams() { + return params; + } public void setParams(Object params) { this.params = params; } - public SyntheticsStep timeout(Long timeout) { this.timeout = timeout; return this; } /** - * The time before declaring a step failed. - * + *

The time before declaring a step failed.

* @return timeout - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEOUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeout() { - return timeout; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEOUT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeout() { + return timeout; + } public void setTimeout(Long timeout) { this.timeout = timeout; } - public SyntheticsStep type(SyntheticsStepType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -181,25 +188,26 @@ public SyntheticsStep type(SyntheticsStepType type) { } /** - * Step type used in your Synthetic test. - * + *

Step type used in your Synthetic test.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsStepType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsStepType getType() { + return type; + } public void setType(SyntheticsStepType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsStep object is equal to o. */ + /** + * Return true if this SyntheticsStep object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -209,18 +217,13 @@ public boolean equals(Object o) { return false; } SyntheticsStep syntheticsStep = (SyntheticsStep) o; - return Objects.equals(this.allowFailure, syntheticsStep.allowFailure) - && Objects.equals(this.isCritical, syntheticsStep.isCritical) - && Objects.equals(this.name, syntheticsStep.name) - && Objects.equals(this.noScreenshot, syntheticsStep.noScreenshot) - && Objects.equals(this.params, syntheticsStep.params) - && Objects.equals(this.timeout, syntheticsStep.timeout) - && Objects.equals(this.type, syntheticsStep.type); + return Objects.equals(this.allowFailure, syntheticsStep.allowFailure) && Objects.equals(this.isCritical, syntheticsStep.isCritical) && Objects.equals(this.name, syntheticsStep.name) && Objects.equals(this.noScreenshot, syntheticsStep.noScreenshot) && Objects.equals(this.params, syntheticsStep.params) && Objects.equals(this.timeout, syntheticsStep.timeout) && Objects.equals(this.type, syntheticsStep.type); } + @Override public int hashCode() { - return Objects.hash(allowFailure, isCritical, name, noScreenshot, params, timeout, type); + return Objects.hash(allowFailure,isCritical,name,noScreenshot,params,timeout,type); } @Override @@ -239,7 +242,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetail.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetail.java index 0b3653d926a..e69f515af2d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetail.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetail.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object describing a step for a Synthetic test. */ +/** + *

Object describing a step for a Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsStepDetail.JSON_PROPERTY_BROWSER_ERRORS, SyntheticsStepDetail.JSON_PROPERTY_CHECK_TYPE, @@ -34,10 +52,10 @@ SyntheticsStepDetail.JSON_PROPERTY_VITALS_METRICS, SyntheticsStepDetail.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsStepDetail { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BROWSER_ERRORS = "browserErrors"; private List browserErrors = null; @@ -96,7 +114,6 @@ public SyntheticsStepDetail browserErrors(List browserEr } return this; } - public SyntheticsStepDetail addBrowserErrorsItem(SyntheticsBrowserError browserErrorsItem) { if (this.browserErrors == null) { this.browserErrors = new ArrayList<>(); @@ -107,21 +124,19 @@ public SyntheticsStepDetail addBrowserErrorsItem(SyntheticsBrowserError browserE } /** - * Array of errors collected for a browser test. - * + *

Array of errors collected for a browser test.

* @return browserErrors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getBrowserErrors() { - return browserErrors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getBrowserErrors() { + return browserErrors; + } public void setBrowserErrors(List browserErrors) { this.browserErrors = browserErrors; } - public SyntheticsStepDetail checkType(SyntheticsCheckType checkType) { this.checkType = checkType; this.unparsed |= !checkType.isValid(); @@ -129,87 +144,79 @@ public SyntheticsStepDetail checkType(SyntheticsCheckType checkType) { } /** - * Type of assertion to apply in an API test. - * + *

Type of assertion to apply in an API test.

* @return checkType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCheckType getCheckType() { - return checkType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCheckType getCheckType() { + return checkType; + } public void setCheckType(SyntheticsCheckType checkType) { if (!checkType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.checkType = checkType; } - public SyntheticsStepDetail description(String description) { this.description = description; return this; } /** - * Description of the test. - * + *

Description of the test.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SyntheticsStepDetail duration(Double duration) { this.duration = duration; return this; } /** - * Total duration in millisecond of the test. - * + *

Total duration in millisecond of the test.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDuration() { + return duration; + } public void setDuration(Double duration) { this.duration = duration; } - public SyntheticsStepDetail error(String error) { this.error = error; return this; } /** - * Error returned by the test. - * + *

Error returned by the test.

* @return error - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getError() { - return error; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } public void setError(String error) { this.error = error; } - public SyntheticsStepDetail playingTab(SyntheticsPlayingTab playingTab) { this.playingTab = playingTab; this.unparsed |= !playingTab.isValid(); @@ -217,108 +224,98 @@ public SyntheticsStepDetail playingTab(SyntheticsPlayingTab playingTab) { } /** - * Navigate between different tabs for your browser test. - * + *

Navigate between different tabs for your browser test.

* @return playingTab - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PLAYING_TAB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsPlayingTab getPlayingTab() { - return playingTab; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLAYING_TAB) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsPlayingTab getPlayingTab() { + return playingTab; + } public void setPlayingTab(SyntheticsPlayingTab playingTab) { if (!playingTab.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.playingTab = playingTab; } - public SyntheticsStepDetail screenshotBucketKey(Boolean screenshotBucketKey) { this.screenshotBucketKey = screenshotBucketKey; return this; } /** - * Whether or not screenshots where collected by the test. - * + *

Whether or not screenshots where collected by the test.

* @return screenshotBucketKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCREENSHOT_BUCKET_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getScreenshotBucketKey() { - return screenshotBucketKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCREENSHOT_BUCKET_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getScreenshotBucketKey() { + return screenshotBucketKey; + } public void setScreenshotBucketKey(Boolean screenshotBucketKey) { this.screenshotBucketKey = screenshotBucketKey; } - public SyntheticsStepDetail skipped(Boolean skipped) { this.skipped = skipped; return this; } /** - * Whether or not to skip this step. - * + *

Whether or not to skip this step.

* @return skipped - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SKIPPED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSkipped() { - return skipped; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SKIPPED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSkipped() { + return skipped; + } public void setSkipped(Boolean skipped) { this.skipped = skipped; } - public SyntheticsStepDetail snapshotBucketKey(Boolean snapshotBucketKey) { this.snapshotBucketKey = snapshotBucketKey; return this; } /** - * Whether or not snapshots where collected by the test. - * + *

Whether or not snapshots where collected by the test.

* @return snapshotBucketKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNAPSHOT_BUCKET_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSnapshotBucketKey() { - return snapshotBucketKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNAPSHOT_BUCKET_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSnapshotBucketKey() { + return snapshotBucketKey; + } public void setSnapshotBucketKey(Boolean snapshotBucketKey) { this.snapshotBucketKey = snapshotBucketKey; } - public SyntheticsStepDetail stepId(Long stepId) { this.stepId = stepId; return this; } /** - * The step ID. - * + *

The step ID.

* @return stepId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEP_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStepId() { - return stepId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStepId() { + return stepId; + } public void setStepId(Long stepId) { this.stepId = stepId; } - public SyntheticsStepDetail subTestStepDetails(List subTestStepDetails) { this.subTestStepDetails = subTestStepDetails; for (SyntheticsStepDetail item : subTestStepDetails) { @@ -326,9 +323,7 @@ public SyntheticsStepDetail subTestStepDetails(List subTes } return this; } - - public SyntheticsStepDetail addSubTestStepDetailsItem( - SyntheticsStepDetail subTestStepDetailsItem) { + public SyntheticsStepDetail addSubTestStepDetailsItem(SyntheticsStepDetail subTestStepDetailsItem) { if (this.subTestStepDetails == null) { this.subTestStepDetails = new ArrayList<>(); } @@ -338,44 +333,39 @@ public SyntheticsStepDetail addSubTestStepDetailsItem( } /** - * If this steps include a sub-test. Subtests - * documentation. - * + *

If this steps include a sub-test. + * Subtests documentation.

* @return subTestStepDetails - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUB_TEST_STEP_DETAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSubTestStepDetails() { - return subTestStepDetails; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUB_TEST_STEP_DETAILS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSubTestStepDetails() { + return subTestStepDetails; + } public void setSubTestStepDetails(List subTestStepDetails) { this.subTestStepDetails = subTestStepDetails; } - public SyntheticsStepDetail timeToInteractive(Double timeToInteractive) { this.timeToInteractive = timeToInteractive; return this; } /** - * Time before starting the step. - * + *

Time before starting the step.

* @return timeToInteractive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_INTERACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTimeToInteractive() { - return timeToInteractive; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_INTERACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTimeToInteractive() { + return timeToInteractive; + } public void setTimeToInteractive(Double timeToInteractive) { this.timeToInteractive = timeToInteractive; } - public SyntheticsStepDetail type(SyntheticsStepType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -383,66 +373,60 @@ public SyntheticsStepDetail type(SyntheticsStepType type) { } /** - * Step type used in your Synthetic test. - * + *

Step type used in your Synthetic test.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsStepType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsStepType getType() { + return type; + } public void setType(SyntheticsStepType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SyntheticsStepDetail url(String url) { this.url = url; return this; } /** - * URL to perform the step against. - * + *

URL to perform the step against.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - public SyntheticsStepDetail value(Object value) { this.value = value; return this; } /** - * Value for the step. - * + *

Value for the step.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getValue() { + return value; + } public void setValue(Object value) { this.value = value; } - public SyntheticsStepDetail vitalsMetrics(List vitalsMetrics) { this.vitalsMetrics = vitalsMetrics; for (SyntheticsCoreWebVitals item : vitalsMetrics) { @@ -450,7 +434,6 @@ public SyntheticsStepDetail vitalsMetrics(List vitalsMe } return this; } - public SyntheticsStepDetail addVitalsMetricsItem(SyntheticsCoreWebVitals vitalsMetricsItem) { if (this.vitalsMetrics == null) { this.vitalsMetrics = new ArrayList<>(); @@ -461,21 +444,19 @@ public SyntheticsStepDetail addVitalsMetricsItem(SyntheticsCoreWebVitals vitalsM } /** - * Array of Core Web Vitals metrics for the step. - * + *

Array of Core Web Vitals metrics for the step.

* @return vitalsMetrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VITALS_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getVitalsMetrics() { - return vitalsMetrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VITALS_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getVitalsMetrics() { + return vitalsMetrics; + } public void setVitalsMetrics(List vitalsMetrics) { this.vitalsMetrics = vitalsMetrics; } - public SyntheticsStepDetail warnings(List warnings) { this.warnings = warnings; for (SyntheticsStepDetailWarning item : warnings) { @@ -483,7 +464,6 @@ public SyntheticsStepDetail warnings(List warnings) } return this; } - public SyntheticsStepDetail addWarningsItem(SyntheticsStepDetailWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -494,22 +474,23 @@ public SyntheticsStepDetail addWarningsItem(SyntheticsStepDetailWarning warnings } /** - * Warning collected that didn't failed the step. - * + *

Warning collected that didn't failed the step.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this SyntheticsStepDetail object is equal to o. */ + /** + * Return true if this SyntheticsStepDetail object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -519,45 +500,13 @@ public boolean equals(Object o) { return false; } SyntheticsStepDetail syntheticsStepDetail = (SyntheticsStepDetail) o; - return Objects.equals(this.browserErrors, syntheticsStepDetail.browserErrors) - && Objects.equals(this.checkType, syntheticsStepDetail.checkType) - && Objects.equals(this.description, syntheticsStepDetail.description) - && Objects.equals(this.duration, syntheticsStepDetail.duration) - && Objects.equals(this.error, syntheticsStepDetail.error) - && Objects.equals(this.playingTab, syntheticsStepDetail.playingTab) - && Objects.equals(this.screenshotBucketKey, syntheticsStepDetail.screenshotBucketKey) - && Objects.equals(this.skipped, syntheticsStepDetail.skipped) - && Objects.equals(this.snapshotBucketKey, syntheticsStepDetail.snapshotBucketKey) - && Objects.equals(this.stepId, syntheticsStepDetail.stepId) - && Objects.equals(this.subTestStepDetails, syntheticsStepDetail.subTestStepDetails) - && Objects.equals(this.timeToInteractive, syntheticsStepDetail.timeToInteractive) - && Objects.equals(this.type, syntheticsStepDetail.type) - && Objects.equals(this.url, syntheticsStepDetail.url) - && Objects.equals(this.value, syntheticsStepDetail.value) - && Objects.equals(this.vitalsMetrics, syntheticsStepDetail.vitalsMetrics) - && Objects.equals(this.warnings, syntheticsStepDetail.warnings); + return Objects.equals(this.browserErrors, syntheticsStepDetail.browserErrors) && Objects.equals(this.checkType, syntheticsStepDetail.checkType) && Objects.equals(this.description, syntheticsStepDetail.description) && Objects.equals(this.duration, syntheticsStepDetail.duration) && Objects.equals(this.error, syntheticsStepDetail.error) && Objects.equals(this.playingTab, syntheticsStepDetail.playingTab) && Objects.equals(this.screenshotBucketKey, syntheticsStepDetail.screenshotBucketKey) && Objects.equals(this.skipped, syntheticsStepDetail.skipped) && Objects.equals(this.snapshotBucketKey, syntheticsStepDetail.snapshotBucketKey) && Objects.equals(this.stepId, syntheticsStepDetail.stepId) && Objects.equals(this.subTestStepDetails, syntheticsStepDetail.subTestStepDetails) && Objects.equals(this.timeToInteractive, syntheticsStepDetail.timeToInteractive) && Objects.equals(this.type, syntheticsStepDetail.type) && Objects.equals(this.url, syntheticsStepDetail.url) && Objects.equals(this.value, syntheticsStepDetail.value) && Objects.equals(this.vitalsMetrics, syntheticsStepDetail.vitalsMetrics) && Objects.equals(this.warnings, syntheticsStepDetail.warnings); } + @Override public int hashCode() { - return Objects.hash( - browserErrors, - checkType, - description, - duration, - error, - playingTab, - screenshotBucketKey, - skipped, - snapshotBucketKey, - stepId, - subTestStepDetails, - timeToInteractive, - type, - url, - value, - vitalsMetrics, - warnings); + return Objects.hash(browserErrors,checkType,description,duration,error,playingTab,screenshotBucketKey,skipped,snapshotBucketKey,stepId,subTestStepDetails,timeToInteractive,type,url,value,vitalsMetrics,warnings); } @Override @@ -570,9 +519,7 @@ public String toString() { sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append(" playingTab: ").append(toIndentedString(playingTab)).append("\n"); - sb.append(" screenshotBucketKey: ") - .append(toIndentedString(screenshotBucketKey)) - .append("\n"); + sb.append(" screenshotBucketKey: ").append(toIndentedString(screenshotBucketKey)).append("\n"); sb.append(" skipped: ").append(toIndentedString(skipped)).append("\n"); sb.append(" snapshotBucketKey: ").append(toIndentedString(snapshotBucketKey)).append("\n"); sb.append(" stepId: ").append(toIndentedString(stepId)).append("\n"); @@ -588,7 +535,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetailWarning.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetailWarning.java index 39d29d7b6c9..7907f287b48 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetailWarning.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepDetailWarning.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object collecting warnings for a given step. */ + +/** + *

Object collecting warnings for a given step.

+ */ @JsonPropertyOrder({ SyntheticsStepDetailWarning.JSON_PROPERTY_MESSAGE, SyntheticsStepDetailWarning.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsStepDetailWarning { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; @@ -32,33 +51,30 @@ public SyntheticsStepDetailWarning() {} @JsonCreator public SyntheticsStepDetailWarning( - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsWarningType type) { - this.message = message; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsWarningType type) { + this.message = message; + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsStepDetailWarning message(String message) { this.message = message; return this; } /** - * Message for the warning. - * + *

Message for the warning.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SyntheticsStepDetailWarning type(SyntheticsWarningType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public SyntheticsStepDetailWarning type(SyntheticsWarningType type) { } /** - * User locator used. - * + *

User locator used.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsWarningType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsWarningType getType() { + return type; + } public void setType(SyntheticsWarningType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsStepDetailWarning object is equal to o. */ + /** + * Return true if this SyntheticsStepDetailWarning object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +110,13 @@ public boolean equals(Object o) { return false; } SyntheticsStepDetailWarning syntheticsStepDetailWarning = (SyntheticsStepDetailWarning) o; - return Objects.equals(this.message, syntheticsStepDetailWarning.message) - && Objects.equals(this.type, syntheticsStepDetailWarning.type); + return Objects.equals(this.message, syntheticsStepDetailWarning.message) && Objects.equals(this.type, syntheticsStepDetailWarning.type); } + @Override public int hashCode() { - return Objects.hash(message, type); + return Objects.hash(message,type); } @Override @@ -113,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepType.java index 0b133fb4b8f..c8f85f3f8f2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsStepType.java @@ -6,49 +6,62 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Step type used in your Synthetic test. */ +/** + *

Step type used in your Synthetic test.

+ */ @JsonSerialize(using = SyntheticsStepType.SyntheticsStepTypeSerializer.class) public class SyntheticsStepType { - public static final SyntheticsStepType ASSERT_CURRENT_URL = - new SyntheticsStepType("assertCurrentUrl"); - public static final SyntheticsStepType ASSERT_ELEMENT_ATTRIBUTE = - new SyntheticsStepType("assertElementAttribute"); - public static final SyntheticsStepType ASSERT_ELEMENT_CONTENT = - new SyntheticsStepType("assertElementContent"); - public static final SyntheticsStepType ASSERT_ELEMENT_PRESENT = - new SyntheticsStepType("assertElementPresent"); + public static final SyntheticsStepType ASSERT_CURRENT_URL = new SyntheticsStepType("assertCurrentUrl"); + public static final SyntheticsStepType ASSERT_ELEMENT_ATTRIBUTE = new SyntheticsStepType("assertElementAttribute"); + public static final SyntheticsStepType ASSERT_ELEMENT_CONTENT = new SyntheticsStepType("assertElementContent"); + public static final SyntheticsStepType ASSERT_ELEMENT_PRESENT = new SyntheticsStepType("assertElementPresent"); public static final SyntheticsStepType ASSERT_EMAIL = new SyntheticsStepType("assertEmail"); - public static final SyntheticsStepType ASSERT_FILE_DOWNLOAD = - new SyntheticsStepType("assertFileDownload"); - public static final SyntheticsStepType ASSERT_FROM_JAVASCRIPT = - new SyntheticsStepType("assertFromJavascript"); - public static final SyntheticsStepType ASSERT_PAGE_CONTAINS = - new SyntheticsStepType("assertPageContains"); - public static final SyntheticsStepType ASSERT_PAGE_LACKS = - new SyntheticsStepType("assertPageLacks"); + public static final SyntheticsStepType ASSERT_FILE_DOWNLOAD = new SyntheticsStepType("assertFileDownload"); + public static final SyntheticsStepType ASSERT_FROM_JAVASCRIPT = new SyntheticsStepType("assertFromJavascript"); + public static final SyntheticsStepType ASSERT_PAGE_CONTAINS = new SyntheticsStepType("assertPageContains"); + public static final SyntheticsStepType ASSERT_PAGE_LACKS = new SyntheticsStepType("assertPageLacks"); public static final SyntheticsStepType CLICK = new SyntheticsStepType("click"); - public static final SyntheticsStepType EXTRACT_FROM_JAVASCRIPT = - new SyntheticsStepType("extractFromJavascript"); - public static final SyntheticsStepType EXTRACT_VARIABLE = - new SyntheticsStepType("extractVariable"); + public static final SyntheticsStepType EXTRACT_FROM_JAVASCRIPT = new SyntheticsStepType("extractFromJavascript"); + public static final SyntheticsStepType EXTRACT_VARIABLE = new SyntheticsStepType("extractVariable"); public static final SyntheticsStepType GO_TO_EMAIL_LINK = new SyntheticsStepType("goToEmailLink"); public static final SyntheticsStepType GO_TO_URL = new SyntheticsStepType("goToUrl"); - public static final SyntheticsStepType GO_TO_URL_AND_MEASURE_TTI = - new SyntheticsStepType("goToUrlAndMeasureTti"); + public static final SyntheticsStepType GO_TO_URL_AND_MEASURE_TTI = new SyntheticsStepType("goToUrlAndMeasureTti"); public static final SyntheticsStepType HOVER = new SyntheticsStepType("hover"); public static final SyntheticsStepType PLAY_SUB_TEST = new SyntheticsStepType("playSubTest"); public static final SyntheticsStepType PRESS_KEY = new SyntheticsStepType("pressKey"); @@ -60,34 +73,7 @@ public class SyntheticsStepType { public static final SyntheticsStepType UPLOAD_FILES = new SyntheticsStepType("uploadFiles"); public static final SyntheticsStepType WAIT = new SyntheticsStepType("wait"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "assertCurrentUrl", - "assertElementAttribute", - "assertElementContent", - "assertElementPresent", - "assertEmail", - "assertFileDownload", - "assertFromJavascript", - "assertPageContains", - "assertPageLacks", - "click", - "extractFromJavascript", - "extractVariable", - "goToEmailLink", - "goToUrl", - "goToUrlAndMeasureTti", - "hover", - "playSubTest", - "pressKey", - "refresh", - "runApiTest", - "scroll", - "selectOption", - "typeText", - "uploadFiles", - "wait")); + private static final Set allowedValues = new HashSet(Arrays.asList("assertCurrentUrl", "assertElementAttribute", "assertElementContent", "assertElementPresent", "assertEmail", "assertFileDownload", "assertFromJavascript", "assertPageContains", "assertPageLacks", "click", "extractFromJavascript", "extractVariable", "goToEmailLink", "goToUrl", "goToUrlAndMeasureTti", "hover", "playSubTest", "pressKey", "refresh", "runApiTest", "scroll", "selectOption", "typeText", "uploadFiles", "wait")); private String value; @@ -100,19 +86,18 @@ public boolean isValid() { } public static class SyntheticsStepTypeSerializer extends StdSerializer { - public SyntheticsStepTypeSerializer(Class t) { - super(t); - } - - public SyntheticsStepTypeSerializer() { - this(null); - } - - @Override - public void serialize(SyntheticsStepType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsStepTypeSerializer(Class t) { + super(t); + } + + public SyntheticsStepTypeSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsStepType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -124,7 +109,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsStepType object is equal to o. */ + /** + * Return true if this SyntheticsStepType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +125,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCallType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCallType.java index 537225b3a7d..01a369e7008 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCallType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCallType.java @@ -6,29 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of gRPC call to perform. */ +/** + *

The type of gRPC call to perform.

+ */ @JsonSerialize(using = SyntheticsTestCallType.SyntheticsTestCallTypeSerializer.class) public class SyntheticsTestCallType { - public static final SyntheticsTestCallType HEALTHCHECK = - new SyntheticsTestCallType("healthcheck"); + public static final SyntheticsTestCallType HEALTHCHECK = new SyntheticsTestCallType("healthcheck"); public static final SyntheticsTestCallType UNARY = new SyntheticsTestCallType("unary"); - private static final Set allowedValues = - new HashSet(Arrays.asList("healthcheck", "unary")); + private static final Set allowedValues = new HashSet(Arrays.asList("healthcheck", "unary")); private String value; @@ -40,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestCallTypeSerializer - extends StdSerializer { - public SyntheticsTestCallTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsTestCallTypeSerializer extends StdSerializer { + public SyntheticsTestCallTypeSerializer(Class t) { + super(t); + } - public SyntheticsTestCallTypeSerializer() { - this(null); - } + public SyntheticsTestCallTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestCallType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestCallType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestCallType object is equal to o. */ + /** + * Return true if this SyntheticsTestCallType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCiOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCiOptions.java index d9232b0a8d8..f9c2b29f466 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCiOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestCiOptions.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** CI/CD options for a Synthetic test. */ -@JsonPropertyOrder({SyntheticsTestCiOptions.JSON_PROPERTY_EXECUTION_RULE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

CI/CD options for a Synthetic test.

+ */ +@JsonPropertyOrder({ + SyntheticsTestCiOptions.JSON_PROPERTY_EXECUTION_RULE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestCiOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXECUTION_RULE = "executionRule"; private SyntheticsTestExecutionRule executionRule; @@ -28,25 +50,26 @@ public SyntheticsTestCiOptions executionRule(SyntheticsTestExecutionRule executi } /** - * Execution rule for a Synthetics test. - * + *

Execution rule for a Synthetics test.

* @return executionRule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXECUTION_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestExecutionRule getExecutionRule() { - return executionRule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_RULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestExecutionRule getExecutionRule() { + return executionRule; + } public void setExecutionRule(SyntheticsTestExecutionRule executionRule) { if (!executionRule.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.executionRule = executionRule; } - /** Return true if this SyntheticsTestCiOptions object is equal to o. */ + /** + * Return true if this SyntheticsTestCiOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -59,6 +82,7 @@ public boolean equals(Object o) { return Objects.equals(this.executionRule, syntheticsTestCiOptions.executionRule); } + @Override public int hashCode() { return Objects.hash(executionRule); @@ -74,7 +98,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestConfig.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestConfig.java index 50bc1823362..75e51dd720a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestConfig.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestConfig.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Configuration object for a Synthetic test. */ + +/** + *

Configuration object for a Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsTestConfig.JSON_PROPERTY_ASSERTIONS, SyntheticsTestConfig.JSON_PROPERTY_CONFIG_VARIABLES, SyntheticsTestConfig.JSON_PROPERTY_REQUEST, SyntheticsTestConfig.JSON_PROPERTY_VARIABLES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestConfig { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ASSERTIONS = "assertions"; private List assertions = null; @@ -44,7 +62,6 @@ public SyntheticsTestConfig assertions(List assertions) { } return this; } - public SyntheticsTestConfig addAssertionsItem(SyntheticsAssertion assertionsItem) { if (this.assertions == null) { this.assertions = new ArrayList<>(); @@ -55,21 +72,19 @@ public SyntheticsTestConfig addAssertionsItem(SyntheticsAssertion assertionsItem } /** - * Array of assertions used for the test. Required for single API tests. - * + *

Array of assertions used for the test. Required for single API tests.

* @return assertions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ASSERTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAssertions() { - return assertions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSERTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAssertions() { + return assertions; + } public void setAssertions(List assertions) { this.assertions = assertions; } - public SyntheticsTestConfig configVariables(List configVariables) { this.configVariables = configVariables; for (SyntheticsConfigVariable item : configVariables) { @@ -77,7 +92,6 @@ public SyntheticsTestConfig configVariables(List confi } return this; } - public SyntheticsTestConfig addConfigVariablesItem(SyntheticsConfigVariable configVariablesItem) { if (this.configVariables == null) { this.configVariables = new ArrayList<>(); @@ -88,21 +102,19 @@ public SyntheticsTestConfig addConfigVariablesItem(SyntheticsConfigVariable conf } /** - * Array of variables used for the test. - * + *

Array of variables used for the test.

* @return configVariables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIG_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConfigVariables() { - return configVariables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConfigVariables() { + return configVariables; + } public void setConfigVariables(List configVariables) { this.configVariables = configVariables; } - public SyntheticsTestConfig request(SyntheticsTestRequest request) { this.request = request; this.unparsed |= request.unparsed; @@ -110,21 +122,19 @@ public SyntheticsTestConfig request(SyntheticsTestRequest request) { } /** - * Object describing the Synthetic test request. - * + *

Object describing the Synthetic test request.

* @return request - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequest getRequest() { - return request; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequest getRequest() { + return request; + } public void setRequest(SyntheticsTestRequest request) { this.request = request; } - public SyntheticsTestConfig variables(List variables) { this.variables = variables; for (SyntheticsBrowserVariable item : variables) { @@ -132,7 +142,6 @@ public SyntheticsTestConfig variables(List variables) } return this; } - public SyntheticsTestConfig addVariablesItem(SyntheticsBrowserVariable variablesItem) { if (this.variables == null) { this.variables = new ArrayList<>(); @@ -143,22 +152,23 @@ public SyntheticsTestConfig addVariablesItem(SyntheticsBrowserVariable variables } /** - * Browser tests only - array of variables used for the test steps. - * + *

Browser tests only - array of variables used for the test steps.

* @return variables - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VARIABLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getVariables() { - return variables; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getVariables() { + return variables; + } public void setVariables(List variables) { this.variables = variables; } - /** Return true if this SyntheticsTestConfig object is equal to o. */ + /** + * Return true if this SyntheticsTestConfig object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -168,15 +178,13 @@ public boolean equals(Object o) { return false; } SyntheticsTestConfig syntheticsTestConfig = (SyntheticsTestConfig) o; - return Objects.equals(this.assertions, syntheticsTestConfig.assertions) - && Objects.equals(this.configVariables, syntheticsTestConfig.configVariables) - && Objects.equals(this.request, syntheticsTestConfig.request) - && Objects.equals(this.variables, syntheticsTestConfig.variables); + return Objects.equals(this.assertions, syntheticsTestConfig.assertions) && Objects.equals(this.configVariables, syntheticsTestConfig.configVariables) && Objects.equals(this.request, syntheticsTestConfig.request) && Objects.equals(this.variables, syntheticsTestConfig.variables); } + @Override public int hashCode() { - return Objects.hash(assertions, configVariables, request, variables); + return Objects.hash(assertions,configVariables,request,variables); } @Override @@ -192,7 +200,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetails.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetails.java index ab5e3775530..e792b214d07 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetails.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetails.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing details about your Synthetic test. */ + +/** + *

Object containing details about your Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsTestDetails.JSON_PROPERTY_CONFIG, SyntheticsTestDetails.JSON_PROPERTY_CREATOR, @@ -30,10 +48,10 @@ SyntheticsTestDetails.JSON_PROPERTY_TAGS, SyntheticsTestDetails.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestDetails { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIG = "config"; private SyntheticsTestConfig config; @@ -80,38 +98,35 @@ public SyntheticsTestDetails config(SyntheticsTestConfig config) { } /** - * Configuration object for a Synthetic test. - * + *

Configuration object for a Synthetic test.

* @return config - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestConfig getConfig() { - return config; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestConfig getConfig() { + return config; + } public void setConfig(SyntheticsTestConfig config) { this.config = config; } /** - * Object describing the creator of the shared element. - * + *

Object describing the creator of the shared element.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getCreator() { - return creator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getCreator() { + return creator; + } public SyntheticsTestDetails locations(List locations) { this.locations = locations; return this; } - public SyntheticsTestDetails addLocationsItem(String locationsItem) { if (this.locations == null) { this.locations = new ArrayList<>(); @@ -121,75 +136,69 @@ public SyntheticsTestDetails addLocationsItem(String locationsItem) { } /** - * Array of locations used to run the test. - * + *

Array of locations used to run the test.

* @return locations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLocations() { - return locations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLocations() { + return locations; + } public void setLocations(List locations) { this.locations = locations; } - public SyntheticsTestDetails message(String message) { this.message = message; return this; } /** - * Notification message associated with the test. - * + *

Notification message associated with the test.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } /** - * The associated monitor ID. - * + *

The associated monitor ID.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonitorId() { - return monitorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonitorId() { + return monitorId; + } public SyntheticsTestDetails name(String name) { this.name = name; return this; } /** - * Name of the test. - * + *

Name of the test.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SyntheticsTestDetails options(SyntheticsTestOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -197,33 +206,31 @@ public SyntheticsTestDetails options(SyntheticsTestOptions options) { } /** - * Object describing the extra options for a Synthetic test. - * + *

Object describing the extra options for a Synthetic test.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptions getOptions() { + return options; + } public void setOptions(SyntheticsTestOptions options) { this.options = options; } /** - * The test public ID. - * + *

The test public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public SyntheticsTestDetails status(SyntheticsTestPauseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -231,25 +238,23 @@ public SyntheticsTestDetails status(SyntheticsTestPauseStatus status) { } /** - * Define whether you want to start (live) or pause (paused) a Synthetic - * test. - * + *

Define whether you want to start (live) or pause (paused) a + * Synthetic test.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestPauseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestPauseStatus getStatus() { + return status; + } public void setStatus(SyntheticsTestPauseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public SyntheticsTestDetails steps(List steps) { this.steps = steps; for (SyntheticsStep item : steps) { @@ -257,7 +262,6 @@ public SyntheticsTestDetails steps(List steps) { } return this; } - public SyntheticsTestDetails addStepsItem(SyntheticsStep stepsItem) { if (this.steps == null) { this.steps = new ArrayList<>(); @@ -268,21 +272,19 @@ public SyntheticsTestDetails addStepsItem(SyntheticsStep stepsItem) { } /** - * For browser test, the steps of the test. - * + *

For browser test, the steps of the test.

* @return steps - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STEPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSteps() { - return steps; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSteps() { + return steps; + } public void setSteps(List steps) { this.steps = steps; } - public SyntheticsTestDetails subtype(SyntheticsTestDetailsSubType subtype) { this.subtype = subtype; this.unparsed |= !subtype.isValid(); @@ -290,31 +292,27 @@ public SyntheticsTestDetails subtype(SyntheticsTestDetailsSubType subtype) { } /** - * The subtype of the Synthetic API test, http, ssl, tcp, - * dns, icmp, udp, websocket, grpc - * or multi. - * + *

The subtype of the Synthetic API test, http, ssl, tcp, + * dns, icmp, udp, websocket, grpc or multi.

* @return subtype - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUBTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestDetailsSubType getSubtype() { - return subtype; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBTYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestDetailsSubType getSubtype() { + return subtype; + } public void setSubtype(SyntheticsTestDetailsSubType subtype) { if (!subtype.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.subtype = subtype; } - public SyntheticsTestDetails tags(List tags) { this.tags = tags; return this; } - public SyntheticsTestDetails addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -324,21 +322,19 @@ public SyntheticsTestDetails addTagsItem(String tagsItem) { } /** - * Array of tags attached to the test. - * + *

Array of tags attached to the test.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SyntheticsTestDetails type(SyntheticsTestDetailsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -346,25 +342,26 @@ public SyntheticsTestDetails type(SyntheticsTestDetailsType type) { } /** - * Type of the Synthetic test, either api or browser. - * + *

Type of the Synthetic test, either api or browser.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestDetailsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestDetailsType getType() { + return type; + } public void setType(SyntheticsTestDetailsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SyntheticsTestDetails object is equal to o. */ + /** + * Return true if this SyntheticsTestDetails object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -374,26 +371,13 @@ public boolean equals(Object o) { return false; } SyntheticsTestDetails syntheticsTestDetails = (SyntheticsTestDetails) o; - return Objects.equals(this.config, syntheticsTestDetails.config) - && Objects.equals(this.creator, syntheticsTestDetails.creator) - && Objects.equals(this.locations, syntheticsTestDetails.locations) - && Objects.equals(this.message, syntheticsTestDetails.message) - && Objects.equals(this.monitorId, syntheticsTestDetails.monitorId) - && Objects.equals(this.name, syntheticsTestDetails.name) - && Objects.equals(this.options, syntheticsTestDetails.options) - && Objects.equals(this.publicId, syntheticsTestDetails.publicId) - && Objects.equals(this.status, syntheticsTestDetails.status) - && Objects.equals(this.steps, syntheticsTestDetails.steps) - && Objects.equals(this.subtype, syntheticsTestDetails.subtype) - && Objects.equals(this.tags, syntheticsTestDetails.tags) - && Objects.equals(this.type, syntheticsTestDetails.type); + return Objects.equals(this.config, syntheticsTestDetails.config) && Objects.equals(this.creator, syntheticsTestDetails.creator) && Objects.equals(this.locations, syntheticsTestDetails.locations) && Objects.equals(this.message, syntheticsTestDetails.message) && Objects.equals(this.monitorId, syntheticsTestDetails.monitorId) && Objects.equals(this.name, syntheticsTestDetails.name) && Objects.equals(this.options, syntheticsTestDetails.options) && Objects.equals(this.publicId, syntheticsTestDetails.publicId) && Objects.equals(this.status, syntheticsTestDetails.status) && Objects.equals(this.steps, syntheticsTestDetails.steps) && Objects.equals(this.subtype, syntheticsTestDetails.subtype) && Objects.equals(this.tags, syntheticsTestDetails.tags) && Objects.equals(this.type, syntheticsTestDetails.type); } + @Override public int hashCode() { - return Objects.hash( - config, creator, locations, message, monitorId, name, options, publicId, status, steps, - subtype, tags, type); + return Objects.hash(config,creator,locations,message,monitorId,name,options,publicId,status,steps,subtype,tags,type); } @Override @@ -418,7 +402,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsSubType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsSubType.java index 914c89ea316..7540f9c930e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsSubType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsSubType.java @@ -6,23 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The subtype of the Synthetic API test, http, ssl, tcp, - * dns, icmp, udp, websocket, grpc - * or multi. + *

The subtype of the Synthetic API test, http, ssl, tcp, + * dns, icmp, udp, websocket, grpc or multi.

*/ @JsonSerialize(using = SyntheticsTestDetailsSubType.SyntheticsTestDetailsSubTypeSerializer.class) public class SyntheticsTestDetailsSubType { @@ -31,17 +52,13 @@ public class SyntheticsTestDetailsSubType { public static final SyntheticsTestDetailsSubType SSL = new SyntheticsTestDetailsSubType("ssl"); public static final SyntheticsTestDetailsSubType TCP = new SyntheticsTestDetailsSubType("tcp"); public static final SyntheticsTestDetailsSubType DNS = new SyntheticsTestDetailsSubType("dns"); - public static final SyntheticsTestDetailsSubType MULTI = - new SyntheticsTestDetailsSubType("multi"); + public static final SyntheticsTestDetailsSubType MULTI = new SyntheticsTestDetailsSubType("multi"); public static final SyntheticsTestDetailsSubType ICMP = new SyntheticsTestDetailsSubType("icmp"); public static final SyntheticsTestDetailsSubType UDP = new SyntheticsTestDetailsSubType("udp"); - public static final SyntheticsTestDetailsSubType WEBSOCKET = - new SyntheticsTestDetailsSubType("websocket"); + public static final SyntheticsTestDetailsSubType WEBSOCKET = new SyntheticsTestDetailsSubType("websocket"); public static final SyntheticsTestDetailsSubType GRPC = new SyntheticsTestDetailsSubType("grpc"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("http", "ssl", "tcp", "dns", "multi", "icmp", "udp", "websocket", "grpc")); + private static final Set allowedValues = new HashSet(Arrays.asList("http", "ssl", "tcp", "dns", "multi", "icmp", "udp", "websocket", "grpc")); private String value; @@ -53,22 +70,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestDetailsSubTypeSerializer - extends StdSerializer { - public SyntheticsTestDetailsSubTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsTestDetailsSubTypeSerializer extends StdSerializer { + public SyntheticsTestDetailsSubTypeSerializer(Class t) { + super(t); + } - public SyntheticsTestDetailsSubTypeSerializer() { - this(null); - } + public SyntheticsTestDetailsSubTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestDetailsSubType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestDetailsSubType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -80,7 +94,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestDetailsSubType object is equal to o. */ + /** + * Return true if this SyntheticsTestDetailsSubType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,7 +110,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsType.java index bf096a26fb7..ff47e8c6d5a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestDetailsType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Synthetic test, either api or browser. */ +/** + *

Type of the Synthetic test, either api or browser.

+ */ @JsonSerialize(using = SyntheticsTestDetailsType.SyntheticsTestDetailsTypeSerializer.class) public class SyntheticsTestDetailsType { public static final SyntheticsTestDetailsType API = new SyntheticsTestDetailsType("api"); public static final SyntheticsTestDetailsType BROWSER = new SyntheticsTestDetailsType("browser"); - private static final Set allowedValues = - new HashSet(Arrays.asList("api", "browser")); + private static final Set allowedValues = new HashSet(Arrays.asList("api", "browser")); private String value; @@ -39,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestDetailsTypeSerializer - extends StdSerializer { - public SyntheticsTestDetailsTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsTestDetailsTypeSerializer extends StdSerializer { + public SyntheticsTestDetailsTypeSerializer(Class t) { + super(t); + } - public SyntheticsTestDetailsTypeSerializer() { - this(null); - } + public SyntheticsTestDetailsTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestDetailsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestDetailsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestDetailsType object is equal to o. */ + /** + * Return true if this SyntheticsTestDetailsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestExecutionRule.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestExecutionRule.java index eba03fca82d..d31272eb341 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestExecutionRule.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestExecutionRule.java @@ -6,32 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Execution rule for a Synthetics test. */ +/** + *

Execution rule for a Synthetics test.

+ */ @JsonSerialize(using = SyntheticsTestExecutionRule.SyntheticsTestExecutionRuleSerializer.class) public class SyntheticsTestExecutionRule { - public static final SyntheticsTestExecutionRule BLOCKING = - new SyntheticsTestExecutionRule("blocking"); - public static final SyntheticsTestExecutionRule NON_BLOCKING = - new SyntheticsTestExecutionRule("non_blocking"); - public static final SyntheticsTestExecutionRule SKIPPED = - new SyntheticsTestExecutionRule("skipped"); + public static final SyntheticsTestExecutionRule BLOCKING = new SyntheticsTestExecutionRule("blocking"); + public static final SyntheticsTestExecutionRule NON_BLOCKING = new SyntheticsTestExecutionRule("non_blocking"); + public static final SyntheticsTestExecutionRule SKIPPED = new SyntheticsTestExecutionRule("skipped"); - private static final Set allowedValues = - new HashSet(Arrays.asList("blocking", "non_blocking", "skipped")); + private static final Set allowedValues = new HashSet(Arrays.asList("blocking", "non_blocking", "skipped")); private String value; @@ -43,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestExecutionRuleSerializer - extends StdSerializer { - public SyntheticsTestExecutionRuleSerializer(Class t) { - super(t); - } + public static class SyntheticsTestExecutionRuleSerializer extends StdSerializer { + public SyntheticsTestExecutionRuleSerializer(Class t) { + super(t); + } - public SyntheticsTestExecutionRuleSerializer() { - this(null); - } + public SyntheticsTestExecutionRuleSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestExecutionRule value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestExecutionRule value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestExecutionRule object is equal to o. */ + /** + * Return true if this SyntheticsTestExecutionRule object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestMonitorStatus.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestMonitorStatus.java index 708ed030b21..f2bf6cc8191 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestMonitorStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestMonitorStatus.java @@ -6,22 +6,46 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The status of your Synthetic monitor. * O for not triggered * 1 for - * triggered * 2 for no data + *

The status of your Synthetic monitor. + * * O for not triggered + * * 1 for triggered + * * 2 for no data

*/ @JsonSerialize(using = SyntheticsTestMonitorStatus.SyntheticsTestMonitorStatusSerializer.class) public class SyntheticsTestMonitorStatus { @@ -42,22 +66,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestMonitorStatusSerializer - extends StdSerializer { - public SyntheticsTestMonitorStatusSerializer(Class t) { - super(t); - } + public static class SyntheticsTestMonitorStatusSerializer extends StdSerializer { + public SyntheticsTestMonitorStatusSerializer(Class t) { + super(t); + } - public SyntheticsTestMonitorStatusSerializer() { - this(null); - } + public SyntheticsTestMonitorStatusSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestMonitorStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestMonitorStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +90,9 @@ public void setValue(Long value) { this.value = value; } - /** Return true if this SyntheticsTestMonitorStatus object is equal to o. */ + /** + * Return true if this SyntheticsTestMonitorStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptions.java index c7bd250612d..9af3ca0240f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptions.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing the extra options for a Synthetic test. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing the extra options for a Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsTestOptions.JSON_PROPERTY_ACCEPT_SELF_SIGNED, SyntheticsTestOptions.JSON_PROPERTY_ALLOW_INSECURE, @@ -39,18 +57,17 @@ SyntheticsTestOptions.JSON_PROPERTY_SCHEDULING, SyntheticsTestOptions.JSON_PROPERTY_TICK_EVERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCEPT_SELF_SIGNED = "accept_self_signed"; private Boolean acceptSelfSigned; public static final String JSON_PROPERTY_ALLOW_INSECURE = "allow_insecure"; private Boolean allowInsecure; - public static final String JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION = - "checkCertificateRevocation"; + public static final String JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION = "checkCertificateRevocation"; private Boolean checkCertificateRevocation; public static final String JSON_PROPERTY_CI = "ci"; @@ -71,8 +88,7 @@ public class SyntheticsTestOptions { public static final String JSON_PROPERTY_HTTP_VERSION = "httpVersion"; private SyntheticsTestOptionsHTTPVersion httpVersion; - public static final String JSON_PROPERTY_IGNORE_SERVER_CERTIFICATE_ERROR = - "ignoreServerCertificateError"; + public static final String JSON_PROPERTY_IGNORE_SERVER_CERTIFICATE_ERROR = "ignoreServerCertificateError"; private Boolean ignoreServerCertificateError; public static final String JSON_PROPERTY_INITIAL_NAVIGATION_TIMEOUT = "initialNavigationTimeout"; @@ -117,63 +133,58 @@ public SyntheticsTestOptions acceptSelfSigned(Boolean acceptSelfSigned) { } /** - * For SSL test, whether or not the test should allow self signed certificates. - * + *

For SSL test, whether or not the test should allow self signed + * certificates.

* @return acceptSelfSigned - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCEPT_SELF_SIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAcceptSelfSigned() { - return acceptSelfSigned; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCEPT_SELF_SIGNED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAcceptSelfSigned() { + return acceptSelfSigned; + } public void setAcceptSelfSigned(Boolean acceptSelfSigned) { this.acceptSelfSigned = acceptSelfSigned; } - public SyntheticsTestOptions allowInsecure(Boolean allowInsecure) { this.allowInsecure = allowInsecure; return this; } /** - * Allows loading insecure content for an HTTP request in an API test. - * + *

Allows loading insecure content for an HTTP request in an API test.

* @return allowInsecure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALLOW_INSECURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowInsecure() { - return allowInsecure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_INSECURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowInsecure() { + return allowInsecure; + } public void setAllowInsecure(Boolean allowInsecure) { this.allowInsecure = allowInsecure; } - public SyntheticsTestOptions checkCertificateRevocation(Boolean checkCertificateRevocation) { this.checkCertificateRevocation = checkCertificateRevocation; return this; } /** - * For SSL test, whether or not the test should fail on revoked certificate in stapled OCSP. - * + *

For SSL test, whether or not the test should fail on revoked certificate in stapled OCSP.

* @return checkCertificateRevocation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCheckCertificateRevocation() { - return checkCertificateRevocation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_CERTIFICATE_REVOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCheckCertificateRevocation() { + return checkCertificateRevocation; + } public void setCheckCertificateRevocation(Boolean checkCertificateRevocation) { this.checkCertificateRevocation = checkCertificateRevocation; } - public SyntheticsTestOptions ci(SyntheticsTestCiOptions ci) { this.ci = ci; this.unparsed |= ci.unparsed; @@ -181,26 +192,23 @@ public SyntheticsTestOptions ci(SyntheticsTestCiOptions ci) { } /** - * CI/CD options for a Synthetic test. - * + *

CI/CD options for a Synthetic test.

* @return ci - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestCiOptions getCi() { - return ci; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestCiOptions getCi() { + return ci; + } public void setCi(SyntheticsTestCiOptions ci) { this.ci = ci; } - public SyntheticsTestOptions deviceIds(List deviceIds) { this.deviceIds = deviceIds; return this; } - public SyntheticsTestOptions addDeviceIdsItem(SyntheticsDeviceID deviceIdsItem) { if (this.deviceIds == null) { this.deviceIds = new ArrayList<>(); @@ -211,84 +219,76 @@ public SyntheticsTestOptions addDeviceIdsItem(SyntheticsDeviceID deviceIdsItem) } /** - * For browser test, array with the different device IDs used to run the test. - * + *

For browser test, array with the different device IDs used to run the test.

* @return deviceIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDeviceIds() { - return deviceIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDeviceIds() { + return deviceIds; + } public void setDeviceIds(List deviceIds) { this.deviceIds = deviceIds; } - public SyntheticsTestOptions disableCors(Boolean disableCors) { this.disableCors = disableCors; return this; } /** - * Whether or not to disable CORS mechanism. - * + *

Whether or not to disable CORS mechanism.

* @return disableCors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLE_CORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisableCors() { - return disableCors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLE_CORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisableCors() { + return disableCors; + } public void setDisableCors(Boolean disableCors) { this.disableCors = disableCors; } - public SyntheticsTestOptions disableCsp(Boolean disableCsp) { this.disableCsp = disableCsp; return this; } /** - * Disable Content Security Policy for browser tests. - * + *

Disable Content Security Policy for browser tests.

* @return disableCsp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLE_CSP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisableCsp() { - return disableCsp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLE_CSP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisableCsp() { + return disableCsp; + } public void setDisableCsp(Boolean disableCsp) { this.disableCsp = disableCsp; } - public SyntheticsTestOptions followRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; return this; } /** - * For API HTTP test, whether or not the test should follow redirects. - * + *

For API HTTP test, whether or not the test should follow redirects.

* @return followRedirects - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FOLLOW_REDIRECTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getFollowRedirects() { - return followRedirects; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FOLLOW_REDIRECTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFollowRedirects() { + return followRedirects; + } public void setFollowRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; } - public SyntheticsTestOptions httpVersion(SyntheticsTestOptionsHTTPVersion httpVersion) { this.httpVersion = httpVersion; this.unparsed |= !httpVersion.isValid(); @@ -296,130 +296,118 @@ public SyntheticsTestOptions httpVersion(SyntheticsTestOptionsHTTPVersion httpVe } /** - * HTTP version to use for a Synthetic test. - * + *

HTTP version to use for a Synthetic test.

* @return httpVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HTTP_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptionsHTTPVersion getHttpVersion() { - return httpVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HTTP_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptionsHTTPVersion getHttpVersion() { + return httpVersion; + } public void setHttpVersion(SyntheticsTestOptionsHTTPVersion httpVersion) { if (!httpVersion.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.httpVersion = httpVersion; } - public SyntheticsTestOptions ignoreServerCertificateError(Boolean ignoreServerCertificateError) { this.ignoreServerCertificateError = ignoreServerCertificateError; return this; } /** - * Ignore server certificate error for browser tests. - * + *

Ignore server certificate error for browser tests.

* @return ignoreServerCertificateError - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IGNORE_SERVER_CERTIFICATE_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIgnoreServerCertificateError() { - return ignoreServerCertificateError; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IGNORE_SERVER_CERTIFICATE_ERROR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIgnoreServerCertificateError() { + return ignoreServerCertificateError; + } public void setIgnoreServerCertificateError(Boolean ignoreServerCertificateError) { this.ignoreServerCertificateError = ignoreServerCertificateError; } - public SyntheticsTestOptions initialNavigationTimeout(Long initialNavigationTimeout) { this.initialNavigationTimeout = initialNavigationTimeout; return this; } /** - * Timeout before declaring the initial step as failed (in seconds) for browser tests. - * + *

Timeout before declaring the initial step as failed (in seconds) for browser tests.

* @return initialNavigationTimeout - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INITIAL_NAVIGATION_TIMEOUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInitialNavigationTimeout() { - return initialNavigationTimeout; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_NAVIGATION_TIMEOUT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInitialNavigationTimeout() { + return initialNavigationTimeout; + } public void setInitialNavigationTimeout(Long initialNavigationTimeout) { this.initialNavigationTimeout = initialNavigationTimeout; } - public SyntheticsTestOptions minFailureDuration(Long minFailureDuration) { this.minFailureDuration = minFailureDuration; return this; } /** - * Minimum amount of time in failure required to trigger an alert. - * + *

Minimum amount of time in failure required to trigger an alert.

* @return minFailureDuration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MIN_FAILURE_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMinFailureDuration() { - return minFailureDuration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN_FAILURE_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMinFailureDuration() { + return minFailureDuration; + } public void setMinFailureDuration(Long minFailureDuration) { this.minFailureDuration = minFailureDuration; } - public SyntheticsTestOptions minLocationFailed(Long minLocationFailed) { this.minLocationFailed = minLocationFailed; return this; } /** - * Minimum number of locations in failure required to trigger an alert. - * + *

Minimum number of locations in failure required to trigger + * an alert.

* @return minLocationFailed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MIN_LOCATION_FAILED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMinLocationFailed() { - return minLocationFailed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN_LOCATION_FAILED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMinLocationFailed() { + return minLocationFailed; + } public void setMinLocationFailed(Long minLocationFailed) { this.minLocationFailed = minLocationFailed; } - public SyntheticsTestOptions monitorName(String monitorName) { this.monitorName = monitorName; return this; } /** - * The monitor name is used for the alert title as well as for all monitor dashboard widgets and - * SLOs. - * + *

The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.

* @return monitorName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMonitorName() { - return monitorName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMonitorName() { + return monitorName; + } public void setMonitorName(String monitorName) { this.monitorName = monitorName; } - public SyntheticsTestOptions monitorOptions(SyntheticsTestOptionsMonitorOptions monitorOptions) { this.monitorOptions = monitorOptions; this.unparsed |= monitorOptions.unparsed; @@ -427,68 +415,64 @@ public SyntheticsTestOptions monitorOptions(SyntheticsTestOptionsMonitorOptions } /** - * Object containing the options for a Synthetic test as a monitor (for example, renotification). - * + *

Object containing the options for a Synthetic test as a monitor + * (for example, renotification).

* @return monitorOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptionsMonitorOptions getMonitorOptions() { - return monitorOptions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptionsMonitorOptions getMonitorOptions() { + return monitorOptions; + } public void setMonitorOptions(SyntheticsTestOptionsMonitorOptions monitorOptions) { this.monitorOptions = monitorOptions; } - public SyntheticsTestOptions monitorPriority(Integer monitorPriority) { this.monitorPriority = monitorPriority; return this; } /** - * Integer from 1 (high) to 5 (low) indicating alert severity. minimum: 1 maximum: 5 - * + *

Integer from 1 (high) to 5 (low) indicating alert severity.

+ * minimum: 1 + * maximum: 5 * @return monitorPriority - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONITOR_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMonitorPriority() { - return monitorPriority; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONITOR_PRIORITY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMonitorPriority() { + return monitorPriority; + } public void setMonitorPriority(Integer monitorPriority) { this.monitorPriority = monitorPriority; } - public SyntheticsTestOptions noScreenshot(Boolean noScreenshot) { this.noScreenshot = noScreenshot; return this; } /** - * Prevents saving screenshots of the steps. - * + *

Prevents saving screenshots of the steps.

* @return noScreenshot - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NO_SCREENSHOT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNoScreenshot() { - return noScreenshot; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_SCREENSHOT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoScreenshot() { + return noScreenshot; + } public void setNoScreenshot(Boolean noScreenshot) { this.noScreenshot = noScreenshot; } - public SyntheticsTestOptions restrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; return this; } - public SyntheticsTestOptions addRestrictedRolesItem(String restrictedRolesItem) { if (this.restrictedRoles == null) { this.restrictedRoles = new ArrayList<>(); @@ -498,22 +482,19 @@ public SyntheticsTestOptions addRestrictedRolesItem(String restrictedRolesItem) } /** - * A list of role identifiers that can be pulled from the Roles API, for restricting read and - * write access. - * + *

A list of role identifiers that can be pulled from the Roles API, for restricting read and write access.

* @return restrictedRoles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRestrictedRoles() { - return restrictedRoles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICTED_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRestrictedRoles() { + return restrictedRoles; + } public void setRestrictedRoles(List restrictedRoles) { this.restrictedRoles = restrictedRoles; } - public SyntheticsTestOptions retry(SyntheticsTestOptionsRetry retry) { this.retry = retry; this.unparsed |= retry.unparsed; @@ -521,21 +502,19 @@ public SyntheticsTestOptions retry(SyntheticsTestOptionsRetry retry) { } /** - * Object describing the retry strategy to apply to a Synthetic test. - * + *

Object describing the retry strategy to apply to a Synthetic test.

* @return retry - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETRY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptionsRetry getRetry() { - return retry; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETRY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptionsRetry getRetry() { + return retry; + } public void setRetry(SyntheticsTestOptionsRetry retry) { this.retry = retry; } - public SyntheticsTestOptions rumSettings(SyntheticsBrowserTestRumSettings rumSettings) { this.rumSettings = rumSettings; this.unparsed |= rumSettings.unparsed; @@ -543,31 +522,26 @@ public SyntheticsTestOptions rumSettings(SyntheticsBrowserTestRumSettings rumSet } /** - * The RUM data collection settings for the Synthetic browser test. Note: There - * are 3 ways to format RUM settings: - * - *

{ isEnabled: false } RUM data is not collected. - * - *

{ isEnabled: true } RUM data is collected from the Synthetic test's default - * application. - * - *

- * { isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 } - * RUM data is collected using the specified application. - * + *

The RUM data collection settings for the Synthetic browser test. + * Note: There are 3 ways to format RUM settings:

+ *

{ isEnabled: false } + * RUM data is not collected.

+ *

{ isEnabled: true } + * RUM data is collected from the Synthetic test's default application.

+ *

{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 } + * RUM data is collected using the specified application.

* @return rumSettings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBrowserTestRumSettings getRumSettings() { - return rumSettings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_SETTINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBrowserTestRumSettings getRumSettings() { + return rumSettings; + } public void setRumSettings(SyntheticsBrowserTestRumSettings rumSettings) { this.rumSettings = rumSettings; } - public SyntheticsTestOptions scheduling(SyntheticsTestOptionsScheduling scheduling) { this.scheduling = scheduling; this.unparsed |= scheduling.unparsed; @@ -575,43 +549,44 @@ public SyntheticsTestOptions scheduling(SyntheticsTestOptionsScheduling scheduli } /** - * Object containing timeframes and timezone used for advanced scheduling. - * + *

Object containing timeframes and timezone used for advanced scheduling.

* @return scheduling - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCHEDULING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestOptionsScheduling getScheduling() { - return scheduling; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCHEDULING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestOptionsScheduling getScheduling() { + return scheduling; + } public void setScheduling(SyntheticsTestOptionsScheduling scheduling) { this.scheduling = scheduling; } - public SyntheticsTestOptions tickEvery(Long tickEvery) { this.tickEvery = tickEvery; return this; } /** - * The frequency at which to run the Synthetic test (in seconds). minimum: 30 maximum: 604800 - * + *

The frequency at which to run the Synthetic test (in seconds).

+ * minimum: 30 + * maximum: 604800 * @return tickEvery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TICK_EVERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTickEvery() { - return tickEvery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TICK_EVERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTickEvery() { + return tickEvery; + } public void setTickEvery(Long tickEvery) { this.tickEvery = tickEvery; } - /** Return true if this SyntheticsTestOptions object is equal to o. */ + /** + * Return true if this SyntheticsTestOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -621,58 +596,13 @@ public boolean equals(Object o) { return false; } SyntheticsTestOptions syntheticsTestOptions = (SyntheticsTestOptions) o; - return Objects.equals(this.acceptSelfSigned, syntheticsTestOptions.acceptSelfSigned) - && Objects.equals(this.allowInsecure, syntheticsTestOptions.allowInsecure) - && Objects.equals( - this.checkCertificateRevocation, syntheticsTestOptions.checkCertificateRevocation) - && Objects.equals(this.ci, syntheticsTestOptions.ci) - && Objects.equals(this.deviceIds, syntheticsTestOptions.deviceIds) - && Objects.equals(this.disableCors, syntheticsTestOptions.disableCors) - && Objects.equals(this.disableCsp, syntheticsTestOptions.disableCsp) - && Objects.equals(this.followRedirects, syntheticsTestOptions.followRedirects) - && Objects.equals(this.httpVersion, syntheticsTestOptions.httpVersion) - && Objects.equals( - this.ignoreServerCertificateError, syntheticsTestOptions.ignoreServerCertificateError) - && Objects.equals( - this.initialNavigationTimeout, syntheticsTestOptions.initialNavigationTimeout) - && Objects.equals(this.minFailureDuration, syntheticsTestOptions.minFailureDuration) - && Objects.equals(this.minLocationFailed, syntheticsTestOptions.minLocationFailed) - && Objects.equals(this.monitorName, syntheticsTestOptions.monitorName) - && Objects.equals(this.monitorOptions, syntheticsTestOptions.monitorOptions) - && Objects.equals(this.monitorPriority, syntheticsTestOptions.monitorPriority) - && Objects.equals(this.noScreenshot, syntheticsTestOptions.noScreenshot) - && Objects.equals(this.restrictedRoles, syntheticsTestOptions.restrictedRoles) - && Objects.equals(this.retry, syntheticsTestOptions.retry) - && Objects.equals(this.rumSettings, syntheticsTestOptions.rumSettings) - && Objects.equals(this.scheduling, syntheticsTestOptions.scheduling) - && Objects.equals(this.tickEvery, syntheticsTestOptions.tickEvery); + return Objects.equals(this.acceptSelfSigned, syntheticsTestOptions.acceptSelfSigned) && Objects.equals(this.allowInsecure, syntheticsTestOptions.allowInsecure) && Objects.equals(this.checkCertificateRevocation, syntheticsTestOptions.checkCertificateRevocation) && Objects.equals(this.ci, syntheticsTestOptions.ci) && Objects.equals(this.deviceIds, syntheticsTestOptions.deviceIds) && Objects.equals(this.disableCors, syntheticsTestOptions.disableCors) && Objects.equals(this.disableCsp, syntheticsTestOptions.disableCsp) && Objects.equals(this.followRedirects, syntheticsTestOptions.followRedirects) && Objects.equals(this.httpVersion, syntheticsTestOptions.httpVersion) && Objects.equals(this.ignoreServerCertificateError, syntheticsTestOptions.ignoreServerCertificateError) && Objects.equals(this.initialNavigationTimeout, syntheticsTestOptions.initialNavigationTimeout) && Objects.equals(this.minFailureDuration, syntheticsTestOptions.minFailureDuration) && Objects.equals(this.minLocationFailed, syntheticsTestOptions.minLocationFailed) && Objects.equals(this.monitorName, syntheticsTestOptions.monitorName) && Objects.equals(this.monitorOptions, syntheticsTestOptions.monitorOptions) && Objects.equals(this.monitorPriority, syntheticsTestOptions.monitorPriority) && Objects.equals(this.noScreenshot, syntheticsTestOptions.noScreenshot) && Objects.equals(this.restrictedRoles, syntheticsTestOptions.restrictedRoles) && Objects.equals(this.retry, syntheticsTestOptions.retry) && Objects.equals(this.rumSettings, syntheticsTestOptions.rumSettings) && Objects.equals(this.scheduling, syntheticsTestOptions.scheduling) && Objects.equals(this.tickEvery, syntheticsTestOptions.tickEvery); } + @Override public int hashCode() { - return Objects.hash( - acceptSelfSigned, - allowInsecure, - checkCertificateRevocation, - ci, - deviceIds, - disableCors, - disableCsp, - followRedirects, - httpVersion, - ignoreServerCertificateError, - initialNavigationTimeout, - minFailureDuration, - minLocationFailed, - monitorName, - monitorOptions, - monitorPriority, - noScreenshot, - restrictedRoles, - retry, - rumSettings, - scheduling, - tickEvery); + return Objects.hash(acceptSelfSigned,allowInsecure,checkCertificateRevocation,ci,deviceIds,disableCors,disableCsp,followRedirects,httpVersion,ignoreServerCertificateError,initialNavigationTimeout,minFailureDuration,minLocationFailed,monitorName,monitorOptions,monitorPriority,noScreenshot,restrictedRoles,retry,rumSettings,scheduling,tickEvery); } @Override @@ -681,21 +611,15 @@ public String toString() { sb.append("class SyntheticsTestOptions {\n"); sb.append(" acceptSelfSigned: ").append(toIndentedString(acceptSelfSigned)).append("\n"); sb.append(" allowInsecure: ").append(toIndentedString(allowInsecure)).append("\n"); - sb.append(" checkCertificateRevocation: ") - .append(toIndentedString(checkCertificateRevocation)) - .append("\n"); + sb.append(" checkCertificateRevocation: ").append(toIndentedString(checkCertificateRevocation)).append("\n"); sb.append(" ci: ").append(toIndentedString(ci)).append("\n"); sb.append(" deviceIds: ").append(toIndentedString(deviceIds)).append("\n"); sb.append(" disableCors: ").append(toIndentedString(disableCors)).append("\n"); sb.append(" disableCsp: ").append(toIndentedString(disableCsp)).append("\n"); sb.append(" followRedirects: ").append(toIndentedString(followRedirects)).append("\n"); sb.append(" httpVersion: ").append(toIndentedString(httpVersion)).append("\n"); - sb.append(" ignoreServerCertificateError: ") - .append(toIndentedString(ignoreServerCertificateError)) - .append("\n"); - sb.append(" initialNavigationTimeout: ") - .append(toIndentedString(initialNavigationTimeout)) - .append("\n"); + sb.append(" ignoreServerCertificateError: ").append(toIndentedString(ignoreServerCertificateError)).append("\n"); + sb.append(" initialNavigationTimeout: ").append(toIndentedString(initialNavigationTimeout)).append("\n"); sb.append(" minFailureDuration: ").append(toIndentedString(minFailureDuration)).append("\n"); sb.append(" minLocationFailed: ").append(toIndentedString(minLocationFailed)).append("\n"); sb.append(" monitorName: ").append(toIndentedString(monitorName)).append("\n"); @@ -712,7 +636,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsHTTPVersion.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsHTTPVersion.java index 49871811752..f6673e8f975 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsHTTPVersion.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsHTTPVersion.java @@ -6,33 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** HTTP version to use for a Synthetic test. */ -@JsonSerialize( - using = SyntheticsTestOptionsHTTPVersion.SyntheticsTestOptionsHTTPVersionSerializer.class) +/** + *

HTTP version to use for a Synthetic test.

+ */ +@JsonSerialize(using = SyntheticsTestOptionsHTTPVersion.SyntheticsTestOptionsHTTPVersionSerializer.class) public class SyntheticsTestOptionsHTTPVersion { - public static final SyntheticsTestOptionsHTTPVersion HTTP1 = - new SyntheticsTestOptionsHTTPVersion("http1"); - public static final SyntheticsTestOptionsHTTPVersion HTTP2 = - new SyntheticsTestOptionsHTTPVersion("http2"); - public static final SyntheticsTestOptionsHTTPVersion ANY = - new SyntheticsTestOptionsHTTPVersion("any"); + public static final SyntheticsTestOptionsHTTPVersion HTTP1 = new SyntheticsTestOptionsHTTPVersion("http1"); + public static final SyntheticsTestOptionsHTTPVersion HTTP2 = new SyntheticsTestOptionsHTTPVersion("http2"); + public static final SyntheticsTestOptionsHTTPVersion ANY = new SyntheticsTestOptionsHTTPVersion("any"); - private static final Set allowedValues = - new HashSet(Arrays.asList("http1", "http2", "any")); + private static final Set allowedValues = new HashSet(Arrays.asList("http1", "http2", "any")); private String value; @@ -44,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestOptionsHTTPVersionSerializer - extends StdSerializer { - public SyntheticsTestOptionsHTTPVersionSerializer(Class t) { - super(t); - } + public static class SyntheticsTestOptionsHTTPVersionSerializer extends StdSerializer { + public SyntheticsTestOptionsHTTPVersionSerializer(Class t) { + super(t); + } - public SyntheticsTestOptionsHTTPVersionSerializer() { - this(null); - } + public SyntheticsTestOptionsHTTPVersionSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestOptionsHTTPVersion value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestOptionsHTTPVersion value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestOptionsHTTPVersion object is equal to o. */ + /** + * Return true if this SyntheticsTestOptionsHTTPVersion object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsMonitorOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsMonitorOptions.java index 986d8172357..b727a4b2989 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsMonitorOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsMonitorOptions.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Object containing the options for a Synthetic test as a monitor (for example, renotification). + *

Object containing the options for a Synthetic test as a monitor + * (for example, renotification).

*/ -@JsonPropertyOrder({SyntheticsTestOptionsMonitorOptions.JSON_PROPERTY_RENOTIFY_INTERVAL}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + SyntheticsTestOptionsMonitorOptions.JSON_PROPERTY_RENOTIFY_INTERVAL +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestOptionsMonitorOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RENOTIFY_INTERVAL = "renotify_interval"; private Long renotifyInterval; @@ -29,23 +50,26 @@ public SyntheticsTestOptionsMonitorOptions renotifyInterval(Long renotifyInterva } /** - * Time interval before renotifying if the test is still failing (in minutes). minimum: 0 maximum: - * 1440 - * + *

Time interval before renotifying if the test is still failing + * (in minutes).

+ * minimum: 0 + * maximum: 1440 * @return renotifyInterval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RENOTIFY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRenotifyInterval() { - return renotifyInterval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RENOTIFY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRenotifyInterval() { + return renotifyInterval; + } public void setRenotifyInterval(Long renotifyInterval) { this.renotifyInterval = renotifyInterval; } - /** Return true if this SyntheticsTestOptionsMonitorOptions object is equal to o. */ + /** + * Return true if this SyntheticsTestOptionsMonitorOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -54,12 +78,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTestOptionsMonitorOptions syntheticsTestOptionsMonitorOptions = - (SyntheticsTestOptionsMonitorOptions) o; - return Objects.equals( - this.renotifyInterval, syntheticsTestOptionsMonitorOptions.renotifyInterval); + SyntheticsTestOptionsMonitorOptions syntheticsTestOptionsMonitorOptions = (SyntheticsTestOptionsMonitorOptions) o; + return Objects.equals(this.renotifyInterval, syntheticsTestOptionsMonitorOptions.renotifyInterval); } + @Override public int hashCode() { return Objects.hash(renotifyInterval); @@ -75,7 +98,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsRetry.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsRetry.java index 3bce994ec12..2b3ef6aa82f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsRetry.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsRetry.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the retry strategy to apply to a Synthetic test. */ + +/** + *

Object describing the retry strategy to apply to a Synthetic test.

+ */ @JsonPropertyOrder({ SyntheticsTestOptionsRetry.JSON_PROPERTY_COUNT, SyntheticsTestOptionsRetry.JSON_PROPERTY_INTERVAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestOptionsRetry { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Long count; @@ -33,43 +53,44 @@ public SyntheticsTestOptionsRetry count(Long count) { } /** - * Number of times a test needs to be retried before marking a location as failed. Defaults to 0. - * + *

Number of times a test needs to be retried before marking a + * location as failed. Defaults to 0.

* @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } public void setCount(Long count) { this.count = count; } - public SyntheticsTestOptionsRetry interval(Double interval) { this.interval = interval; return this; } /** - * Time interval between retries (in milliseconds). Defaults to 300ms. - * + *

Time interval between retries (in milliseconds). Defaults to + * 300ms.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInterval() { + return interval; + } public void setInterval(Double interval) { this.interval = interval; } - /** Return true if this SyntheticsTestOptionsRetry object is equal to o. */ + /** + * Return true if this SyntheticsTestOptionsRetry object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +100,13 @@ public boolean equals(Object o) { return false; } SyntheticsTestOptionsRetry syntheticsTestOptionsRetry = (SyntheticsTestOptionsRetry) o; - return Objects.equals(this.count, syntheticsTestOptionsRetry.count) - && Objects.equals(this.interval, syntheticsTestOptionsRetry.interval); + return Objects.equals(this.count, syntheticsTestOptionsRetry.count) && Objects.equals(this.interval, syntheticsTestOptionsRetry.interval); } + @Override public int hashCode() { - return Objects.hash(count, interval); + return Objects.hash(count,interval); } @Override @@ -99,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsScheduling.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsScheduling.java index 71153a908e8..d5c891c6734 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsScheduling.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsScheduling.java @@ -6,40 +6,55 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing timeframes and timezone used for advanced scheduling. */ +/** + *

Object containing timeframes and timezone used for advanced scheduling.

+ */ @JsonPropertyOrder({ SyntheticsTestOptionsScheduling.JSON_PROPERTY_TIMEFRAMES, SyntheticsTestOptionsScheduling.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestOptionsScheduling { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIMEFRAMES = "timeframes"; private List timeframes = null; public static final String JSON_PROPERTY_TIMEZONE = "timezone"; private String timezone; - public SyntheticsTestOptionsScheduling timeframes( - List timeframes) { + public SyntheticsTestOptionsScheduling timeframes(List timeframes) { this.timeframes = timeframes; for (SyntheticsTestOptionsSchedulingTimeframe item : timeframes) { this.unparsed |= item.unparsed; } return this; } - - public SyntheticsTestOptionsScheduling addTimeframesItem( - SyntheticsTestOptionsSchedulingTimeframe timeframesItem) { + public SyntheticsTestOptionsScheduling addTimeframesItem(SyntheticsTestOptionsSchedulingTimeframe timeframesItem) { if (this.timeframes == null) { this.timeframes = new ArrayList<>(); } @@ -49,43 +64,42 @@ public SyntheticsTestOptionsScheduling addTimeframesItem( } /** - * Array containing objects describing the scheduling pattern to apply to each day. - * + *

Array containing objects describing the scheduling pattern to apply to each day.

* @return timeframes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAMES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimeframes() { - return timeframes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAMES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimeframes() { + return timeframes; + } public void setTimeframes(List timeframes) { this.timeframes = timeframes; } - public SyntheticsTestOptionsScheduling timezone(String timezone) { this.timezone = timezone; return this; } /** - * Timezone in which the timeframe is based. - * + *

Timezone in which the timeframe is based.

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this SyntheticsTestOptionsScheduling object is equal to o. */ + /** + * Return true if this SyntheticsTestOptionsScheduling object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,15 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTestOptionsScheduling syntheticsTestOptionsScheduling = - (SyntheticsTestOptionsScheduling) o; - return Objects.equals(this.timeframes, syntheticsTestOptionsScheduling.timeframes) - && Objects.equals(this.timezone, syntheticsTestOptionsScheduling.timezone); + SyntheticsTestOptionsScheduling syntheticsTestOptionsScheduling = (SyntheticsTestOptionsScheduling) o; + return Objects.equals(this.timeframes, syntheticsTestOptionsScheduling.timeframes) && Objects.equals(this.timezone, syntheticsTestOptionsScheduling.timezone); } + @Override public int hashCode() { - return Objects.hash(timeframes, timezone); + return Objects.hash(timeframes,timezone); } @Override @@ -116,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsSchedulingTimeframe.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsSchedulingTimeframe.java index ae66318928f..4b55483846e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsSchedulingTimeframe.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestOptionsSchedulingTimeframe.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing a timeframe. */ + +/** + *

Object describing a timeframe.

+ */ @JsonPropertyOrder({ SyntheticsTestOptionsSchedulingTimeframe.JSON_PROPERTY_DAY, SyntheticsTestOptionsSchedulingTimeframe.JSON_PROPERTY_FROM, SyntheticsTestOptionsSchedulingTimeframe.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestOptionsSchedulingTimeframe { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DAY = "day"; private Integer day; @@ -37,64 +57,63 @@ public SyntheticsTestOptionsSchedulingTimeframe day(Integer day) { } /** - * Number representing the day of the week. minimum: 1 maximum: 7 - * + *

Number representing the day of the week.

+ * minimum: 1 + * maximum: 7 * @return day - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDay() { - return day; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDay() { + return day; + } public void setDay(Integer day) { this.day = day; } - public SyntheticsTestOptionsSchedulingTimeframe from(String from) { this.from = from; return this; } /** - * The hour of the day on which scheduling starts. - * + *

The hour of the day on which scheduling starts.

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public SyntheticsTestOptionsSchedulingTimeframe to(String to) { this.to = to; return this; } /** - * The hour of the day on which scheduling ends. - * + *

The hour of the day on which scheduling ends.

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this SyntheticsTestOptionsSchedulingTimeframe object is equal to o. */ + /** + * Return true if this SyntheticsTestOptionsSchedulingTimeframe object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,16 +122,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTestOptionsSchedulingTimeframe syntheticsTestOptionsSchedulingTimeframe = - (SyntheticsTestOptionsSchedulingTimeframe) o; - return Objects.equals(this.day, syntheticsTestOptionsSchedulingTimeframe.day) - && Objects.equals(this.from, syntheticsTestOptionsSchedulingTimeframe.from) - && Objects.equals(this.to, syntheticsTestOptionsSchedulingTimeframe.to); + SyntheticsTestOptionsSchedulingTimeframe syntheticsTestOptionsSchedulingTimeframe = (SyntheticsTestOptionsSchedulingTimeframe) o; + return Objects.equals(this.day, syntheticsTestOptionsSchedulingTimeframe.day) && Objects.equals(this.from, syntheticsTestOptionsSchedulingTimeframe.from) && Objects.equals(this.to, syntheticsTestOptionsSchedulingTimeframe.to); } + @Override public int hashCode() { - return Objects.hash(day, from, to); + return Objects.hash(day,from,to); } @Override @@ -127,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestPauseStatus.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestPauseStatus.java index bd80fcfbc19..8e055981578 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestPauseStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestPauseStatus.java @@ -6,22 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Define whether you want to start (live) or pause (paused) a Synthetic - * test. + *

Define whether you want to start (live) or pause (paused) a + * Synthetic test.

*/ @JsonSerialize(using = SyntheticsTestPauseStatus.SyntheticsTestPauseStatusSerializer.class) public class SyntheticsTestPauseStatus { @@ -29,8 +51,7 @@ public class SyntheticsTestPauseStatus { public static final SyntheticsTestPauseStatus LIVE = new SyntheticsTestPauseStatus("live"); public static final SyntheticsTestPauseStatus PAUSED = new SyntheticsTestPauseStatus("paused"); - private static final Set allowedValues = - new HashSet(Arrays.asList("live", "paused")); + private static final Set allowedValues = new HashSet(Arrays.asList("live", "paused")); private String value; @@ -42,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestPauseStatusSerializer - extends StdSerializer { - public SyntheticsTestPauseStatusSerializer(Class t) { - super(t); - } + public static class SyntheticsTestPauseStatusSerializer extends StdSerializer { + public SyntheticsTestPauseStatusSerializer(Class t) { + super(t); + } - public SyntheticsTestPauseStatusSerializer() { - this(null); - } + public SyntheticsTestPauseStatusSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestPauseStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestPauseStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestPauseStatus object is equal to o. */ + /** + * Return true if this SyntheticsTestPauseStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestProcessStatus.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestProcessStatus.java index 9eb8feaaadd..c4ebe835ec7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestProcessStatus.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestProcessStatus.java @@ -6,35 +6,53 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Status of a Synthetic test. */ +/** + *

Status of a Synthetic test.

+ */ @JsonSerialize(using = SyntheticsTestProcessStatus.SyntheticsTestProcessStatusSerializer.class) public class SyntheticsTestProcessStatus { - public static final SyntheticsTestProcessStatus NOT_SCHEDULED = - new SyntheticsTestProcessStatus("not_scheduled"); - public static final SyntheticsTestProcessStatus SCHEDULED = - new SyntheticsTestProcessStatus("scheduled"); - public static final SyntheticsTestProcessStatus FINISHED = - new SyntheticsTestProcessStatus("finished"); - public static final SyntheticsTestProcessStatus FINISHED_WITH_ERROR = - new SyntheticsTestProcessStatus("finished_with_error"); + public static final SyntheticsTestProcessStatus NOT_SCHEDULED = new SyntheticsTestProcessStatus("not_scheduled"); + public static final SyntheticsTestProcessStatus SCHEDULED = new SyntheticsTestProcessStatus("scheduled"); + public static final SyntheticsTestProcessStatus FINISHED = new SyntheticsTestProcessStatus("finished"); + public static final SyntheticsTestProcessStatus FINISHED_WITH_ERROR = new SyntheticsTestProcessStatus("finished_with_error"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("not_scheduled", "scheduled", "finished", "finished_with_error")); + private static final Set allowedValues = new HashSet(Arrays.asList("not_scheduled", "scheduled", "finished", "finished_with_error")); private String value; @@ -46,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestProcessStatusSerializer - extends StdSerializer { - public SyntheticsTestProcessStatusSerializer(Class t) { - super(t); - } + public static class SyntheticsTestProcessStatusSerializer extends StdSerializer { + public SyntheticsTestProcessStatusSerializer(Class t) { + super(t); + } - public SyntheticsTestProcessStatusSerializer() { - this(null); - } + public SyntheticsTestProcessStatusSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestProcessStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestProcessStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -73,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestProcessStatus object is equal to o. */ + /** + * Return true if this SyntheticsTestProcessStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java index e202400e69e..a946ffcd954 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the Synthetic test request. */ + +/** + *

Object describing the Synthetic test request.

+ */ @JsonPropertyOrder({ SyntheticsTestRequest.JSON_PROPERTY_ALLOW_INSECURE, SyntheticsTestRequest.JSON_PROPERTY_BASIC_AUTH, @@ -44,10 +60,10 @@ SyntheticsTestRequest.JSON_PROPERTY_TIMEOUT, SyntheticsTestRequest.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALLOW_INSECURE = "allow_insecure"; private Boolean allowInsecure; @@ -129,21 +145,19 @@ public SyntheticsTestRequest allowInsecure(Boolean allowInsecure) { } /** - * Allows loading insecure content for an HTTP request in a multistep test step. - * + *

Allows loading insecure content for an HTTP request in a multistep test step.

* @return allowInsecure - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALLOW_INSECURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowInsecure() { - return allowInsecure; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_INSECURE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowInsecure() { + return allowInsecure; + } public void setAllowInsecure(Boolean allowInsecure) { this.allowInsecure = allowInsecure; } - public SyntheticsTestRequest basicAuth(SyntheticsBasicAuth basicAuth) { this.basicAuth = basicAuth; this.unparsed |= basicAuth.unparsed; @@ -151,42 +165,38 @@ public SyntheticsTestRequest basicAuth(SyntheticsBasicAuth basicAuth) { } /** - * Object to handle basic authentication when performing the test. - * + *

Object to handle basic authentication when performing the test.

* @return basicAuth - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BASIC_AUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsBasicAuth getBasicAuth() { - return basicAuth; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASIC_AUTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuth getBasicAuth() { + return basicAuth; + } public void setBasicAuth(SyntheticsBasicAuth basicAuth) { this.basicAuth = basicAuth; } - public SyntheticsTestRequest body(String body) { this.body = body; return this; } /** - * Body to include in the test. - * + *

Body to include in the test.

* @return body - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BODY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBody() { - return body; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BODY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBody() { + return body; + } public void setBody(String body) { this.body = body; } - public SyntheticsTestRequest bodyType(SyntheticsTestRequestBodyType bodyType) { this.bodyType = bodyType; this.unparsed |= !bodyType.isValid(); @@ -194,24 +204,22 @@ public SyntheticsTestRequest bodyType(SyntheticsTestRequestBodyType bodyType) { } /** - * Type of the request body. - * + *

Type of the request body.

* @return bodyType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BODY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequestBodyType getBodyType() { - return bodyType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BODY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequestBodyType getBodyType() { + return bodyType; + } public void setBodyType(SyntheticsTestRequestBodyType bodyType) { if (!bodyType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.bodyType = bodyType; } - public SyntheticsTestRequest callType(SyntheticsTestCallType callType) { this.callType = callType; this.unparsed |= !callType.isValid(); @@ -219,24 +227,22 @@ public SyntheticsTestRequest callType(SyntheticsTestCallType callType) { } /** - * The type of gRPC call to perform. - * + *

The type of gRPC call to perform.

* @return callType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CALL_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestCallType getCallType() { - return callType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestCallType getCallType() { + return callType; + } public void setCallType(SyntheticsTestCallType callType) { if (!callType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.callType = callType; } - public SyntheticsTestRequest certificate(SyntheticsTestRequestCertificate certificate) { this.certificate = certificate; this.unparsed |= certificate.unparsed; @@ -244,26 +250,23 @@ public SyntheticsTestRequest certificate(SyntheticsTestRequestCertificate certif } /** - * Client certificate to use when performing the test request. - * + *

Client certificate to use when performing the test request.

* @return certificate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CERTIFICATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequestCertificate getCertificate() { - return certificate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERTIFICATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequestCertificate getCertificate() { + return certificate; + } public void setCertificate(SyntheticsTestRequestCertificate certificate) { this.certificate = certificate; } - public SyntheticsTestRequest certificateDomains(List certificateDomains) { this.certificateDomains = certificateDomains; return this; } - public SyntheticsTestRequest addCertificateDomainsItem(String certificateDomainsItem) { if (this.certificateDomains == null) { this.certificateDomains = new ArrayList<>(); @@ -273,91 +276,82 @@ public SyntheticsTestRequest addCertificateDomainsItem(String certificateDomains } /** - * By default, the client certificate is applied on the domain of the starting URL for browser - * tests. If you want your client certificate to be applied on other domains instead, add them in - * certificateDomains. - * + *

By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in certificateDomains.

* @return certificateDomains - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CERTIFICATE_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCertificateDomains() { - return certificateDomains; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERTIFICATE_DOMAINS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCertificateDomains() { + return certificateDomains; + } public void setCertificateDomains(List certificateDomains) { this.certificateDomains = certificateDomains; } - public SyntheticsTestRequest dnsServer(String dnsServer) { this.dnsServer = dnsServer; return this; } /** - * DNS server to use for DNS tests. - * + *

DNS server to use for DNS tests.

* @return dnsServer - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DNS_SERVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDnsServer() { - return dnsServer; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DNS_SERVER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDnsServer() { + return dnsServer; + } public void setDnsServer(String dnsServer) { this.dnsServer = dnsServer; } - public SyntheticsTestRequest dnsServerPort(Integer dnsServerPort) { this.dnsServerPort = dnsServerPort; return this; } /** - * DNS server port to use for DNS tests. minimum: 1 maximum: 65535 - * + *

DNS server port to use for DNS tests.

+ * minimum: 1 + * maximum: 65535 * @return dnsServerPort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DNS_SERVER_PORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDnsServerPort() { - return dnsServerPort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DNS_SERVER_PORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDnsServerPort() { + return dnsServerPort; + } public void setDnsServerPort(Integer dnsServerPort) { this.dnsServerPort = dnsServerPort; } - public SyntheticsTestRequest followRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; return this; } /** - * Specifies whether or not the request follows redirects. - * + *

Specifies whether or not the request follows redirects.

* @return followRedirects - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FOLLOW_REDIRECTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getFollowRedirects() { - return followRedirects; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FOLLOW_REDIRECTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFollowRedirects() { + return followRedirects; + } public void setFollowRedirects(Boolean followRedirects) { this.followRedirects = followRedirects; } - public SyntheticsTestRequest headers(Map headers) { this.headers = headers; return this; } - public SyntheticsTestRequest putHeadersItem(String key, String headersItem) { if (this.headers == null) { this.headers = new HashMap<>(); @@ -367,68 +361,61 @@ public SyntheticsTestRequest putHeadersItem(String key, String headersItem) { } /** - * Headers to include when performing the test. - * + *

Headers to include when performing the test.

* @return headers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getHeaders() { - return headers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getHeaders() { + return headers; + } public void setHeaders(Map headers) { this.headers = headers; } - public SyntheticsTestRequest host(String host) { this.host = host; return this; } /** - * Host name to perform the test with. - * + *

Host name to perform the test with.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public SyntheticsTestRequest message(String message) { this.message = message; return this; } /** - * Message to send for UDP or WebSocket tests. - * + *

Message to send for UDP or WebSocket tests.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SyntheticsTestRequest metadata(Map metadata) { this.metadata = metadata; return this; } - public SyntheticsTestRequest putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { this.metadata = new HashMap<>(); @@ -438,107 +425,97 @@ public SyntheticsTestRequest putMetadataItem(String key, String metadataItem) { } /** - * Metadata to include when performing the gRPC test. - * + *

Metadata to include when performing the gRPC test.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } public void setMetadata(Map metadata) { this.metadata = metadata; } - public SyntheticsTestRequest method(String method) { this.method = method; return this; } /** - * Either the HTTP method/verb to use or a gRPC method available on the service set in the - * service field. Required if subtype is HTTP or if subtype - * is grpc and callType is unary. - * + *

Either the HTTP method/verb to use or a gRPC method available on the service set in the service field. Required if subtype is HTTP or if subtype is grpc and callType is unary.

* @return method - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMethod() { - return method; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METHOD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMethod() { + return method; + } public void setMethod(String method) { this.method = method; } - public SyntheticsTestRequest noSavingResponseBody(Boolean noSavingResponseBody) { this.noSavingResponseBody = noSavingResponseBody; return this; } /** - * Determines whether or not to save the response body. - * + *

Determines whether or not to save the response body.

* @return noSavingResponseBody - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NO_SAVING_RESPONSE_BODY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNoSavingResponseBody() { - return noSavingResponseBody; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_SAVING_RESPONSE_BODY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoSavingResponseBody() { + return noSavingResponseBody; + } public void setNoSavingResponseBody(Boolean noSavingResponseBody) { this.noSavingResponseBody = noSavingResponseBody; } - public SyntheticsTestRequest numberOfPackets(Integer numberOfPackets) { this.numberOfPackets = numberOfPackets; return this; } /** - * Number of pings to use per test. minimum: 0 maximum: 10 - * + *

Number of pings to use per test.

+ * minimum: 0 + * maximum: 10 * @return numberOfPackets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUMBER_OF_PACKETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumberOfPackets() { - return numberOfPackets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PACKETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumberOfPackets() { + return numberOfPackets; + } public void setNumberOfPackets(Integer numberOfPackets) { this.numberOfPackets = numberOfPackets; } - public SyntheticsTestRequest port(Long port) { this.port = port; return this; } /** - * Port to use when performing the test. - * + *

Port to use when performing the test.

* @return port - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPort() { - return port; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPort() { + return port; + } public void setPort(Long port) { this.port = port; } - public SyntheticsTestRequest proxy(SyntheticsTestRequestProxy proxy) { this.proxy = proxy; this.unparsed |= proxy.unparsed; @@ -546,150 +523,139 @@ public SyntheticsTestRequest proxy(SyntheticsTestRequestProxy proxy) { } /** - * The proxy to perform the test. - * + *

The proxy to perform the test.

* @return proxy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROXY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequestProxy getProxy() { - return proxy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROXY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequestProxy getProxy() { + return proxy; + } public void setProxy(SyntheticsTestRequestProxy proxy) { this.proxy = proxy; } - public SyntheticsTestRequest query(Object query) { this.query = query; return this; } /** - * Query to use for the test. - * + *

Query to use for the test.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Object getQuery() { + return query; + } public void setQuery(Object query) { this.query = query; } - public SyntheticsTestRequest servername(String servername) { this.servername = servername; return this; } /** - * For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing - * the server to present one of multiple possible certificates on the same IP address and TCP port - * number. - * + *

For SSL tests, it specifies on which server you want to initiate the TLS handshake, + * allowing the server to present one of multiple possible certificates on + * the same IP address and TCP port number.

* @return servername - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getServername() { - return servername; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getServername() { + return servername; + } public void setServername(String servername) { this.servername = servername; } - public SyntheticsTestRequest service(String service) { this.service = service; return this; } /** - * The gRPC service on which you want to perform the gRPC call. - * + *

The gRPC service on which you want to perform the gRPC call.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public SyntheticsTestRequest shouldTrackHops(Boolean shouldTrackHops) { this.shouldTrackHops = shouldTrackHops; return this; } /** - * Turns on a traceroute probe to discover all gateways along the path to the host destination. - * + *

Turns on a traceroute probe to discover all gateways along the path to the host destination.

* @return shouldTrackHops - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOULD_TRACK_HOPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShouldTrackHops() { - return shouldTrackHops; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_TRACK_HOPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldTrackHops() { + return shouldTrackHops; + } public void setShouldTrackHops(Boolean shouldTrackHops) { this.shouldTrackHops = shouldTrackHops; } - public SyntheticsTestRequest timeout(Double timeout) { this.timeout = timeout; return this; } /** - * Timeout in seconds for the test. - * + *

Timeout in seconds for the test.

* @return timeout - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEOUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTimeout() { - return timeout; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEOUT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTimeout() { + return timeout; + } public void setTimeout(Double timeout) { this.timeout = timeout; } - public SyntheticsTestRequest url(String url) { this.url = url; return this; } /** - * URL to perform the test with. - * + *

URL to perform the test with.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this SyntheticsTestRequest object is equal to o. */ + /** + * Return true if this SyntheticsTestRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -699,61 +665,13 @@ public boolean equals(Object o) { return false; } SyntheticsTestRequest syntheticsTestRequest = (SyntheticsTestRequest) o; - return Objects.equals(this.allowInsecure, syntheticsTestRequest.allowInsecure) - && Objects.equals(this.basicAuth, syntheticsTestRequest.basicAuth) - && Objects.equals(this.body, syntheticsTestRequest.body) - && Objects.equals(this.bodyType, syntheticsTestRequest.bodyType) - && Objects.equals(this.callType, syntheticsTestRequest.callType) - && Objects.equals(this.certificate, syntheticsTestRequest.certificate) - && Objects.equals(this.certificateDomains, syntheticsTestRequest.certificateDomains) - && Objects.equals(this.dnsServer, syntheticsTestRequest.dnsServer) - && Objects.equals(this.dnsServerPort, syntheticsTestRequest.dnsServerPort) - && Objects.equals(this.followRedirects, syntheticsTestRequest.followRedirects) - && Objects.equals(this.headers, syntheticsTestRequest.headers) - && Objects.equals(this.host, syntheticsTestRequest.host) - && Objects.equals(this.message, syntheticsTestRequest.message) - && Objects.equals(this.metadata, syntheticsTestRequest.metadata) - && Objects.equals(this.method, syntheticsTestRequest.method) - && Objects.equals(this.noSavingResponseBody, syntheticsTestRequest.noSavingResponseBody) - && Objects.equals(this.numberOfPackets, syntheticsTestRequest.numberOfPackets) - && Objects.equals(this.port, syntheticsTestRequest.port) - && Objects.equals(this.proxy, syntheticsTestRequest.proxy) - && Objects.equals(this.query, syntheticsTestRequest.query) - && Objects.equals(this.servername, syntheticsTestRequest.servername) - && Objects.equals(this.service, syntheticsTestRequest.service) - && Objects.equals(this.shouldTrackHops, syntheticsTestRequest.shouldTrackHops) - && Objects.equals(this.timeout, syntheticsTestRequest.timeout) - && Objects.equals(this.url, syntheticsTestRequest.url); + return Objects.equals(this.allowInsecure, syntheticsTestRequest.allowInsecure) && Objects.equals(this.basicAuth, syntheticsTestRequest.basicAuth) && Objects.equals(this.body, syntheticsTestRequest.body) && Objects.equals(this.bodyType, syntheticsTestRequest.bodyType) && Objects.equals(this.callType, syntheticsTestRequest.callType) && Objects.equals(this.certificate, syntheticsTestRequest.certificate) && Objects.equals(this.certificateDomains, syntheticsTestRequest.certificateDomains) && Objects.equals(this.dnsServer, syntheticsTestRequest.dnsServer) && Objects.equals(this.dnsServerPort, syntheticsTestRequest.dnsServerPort) && Objects.equals(this.followRedirects, syntheticsTestRequest.followRedirects) && Objects.equals(this.headers, syntheticsTestRequest.headers) && Objects.equals(this.host, syntheticsTestRequest.host) && Objects.equals(this.message, syntheticsTestRequest.message) && Objects.equals(this.metadata, syntheticsTestRequest.metadata) && Objects.equals(this.method, syntheticsTestRequest.method) && Objects.equals(this.noSavingResponseBody, syntheticsTestRequest.noSavingResponseBody) && Objects.equals(this.numberOfPackets, syntheticsTestRequest.numberOfPackets) && Objects.equals(this.port, syntheticsTestRequest.port) && Objects.equals(this.proxy, syntheticsTestRequest.proxy) && Objects.equals(this.query, syntheticsTestRequest.query) && Objects.equals(this.servername, syntheticsTestRequest.servername) && Objects.equals(this.service, syntheticsTestRequest.service) && Objects.equals(this.shouldTrackHops, syntheticsTestRequest.shouldTrackHops) && Objects.equals(this.timeout, syntheticsTestRequest.timeout) && Objects.equals(this.url, syntheticsTestRequest.url); } + @Override public int hashCode() { - return Objects.hash( - allowInsecure, - basicAuth, - body, - bodyType, - callType, - certificate, - certificateDomains, - dnsServer, - dnsServerPort, - followRedirects, - headers, - host, - message, - metadata, - method, - noSavingResponseBody, - numberOfPackets, - port, - proxy, - query, - servername, - service, - shouldTrackHops, - timeout, - url); + return Objects.hash(allowInsecure,basicAuth,body,bodyType,callType,certificate,certificateDomains,dnsServer,dnsServerPort,followRedirects,headers,host,message,metadata,method,noSavingResponseBody,numberOfPackets,port,proxy,query,servername,service,shouldTrackHops,timeout,url); } @Override @@ -775,9 +693,7 @@ public String toString() { sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" method: ").append(toIndentedString(method)).append("\n"); - sb.append(" noSavingResponseBody: ") - .append(toIndentedString(noSavingResponseBody)) - .append("\n"); + sb.append(" noSavingResponseBody: ").append(toIndentedString(noSavingResponseBody)).append("\n"); sb.append(" numberOfPackets: ").append(toIndentedString(numberOfPackets)).append("\n"); sb.append(" port: ").append(toIndentedString(port)).append("\n"); sb.append(" proxy: ").append(toIndentedString(proxy)).append("\n"); @@ -792,7 +708,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestBodyType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestBodyType.java index 821253f2d34..a68c3a703a1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestBodyType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestBodyType.java @@ -6,45 +6,55 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the request body. */ +/** + *

Type of the request body.

+ */ @JsonSerialize(using = SyntheticsTestRequestBodyType.SyntheticsTestRequestBodyTypeSerializer.class) public class SyntheticsTestRequestBodyType { - public static final SyntheticsTestRequestBodyType TEXT_PLAIN = - new SyntheticsTestRequestBodyType("text/plain"); - public static final SyntheticsTestRequestBodyType APPLICATION_JSON = - new SyntheticsTestRequestBodyType("application/json"); - public static final SyntheticsTestRequestBodyType TEXT_XML = - new SyntheticsTestRequestBodyType("text/xml"); - public static final SyntheticsTestRequestBodyType TEXT_HTML = - new SyntheticsTestRequestBodyType("text/html"); - public static final SyntheticsTestRequestBodyType APPLICATION_X_WWW_FORM_URLENCODED = - new SyntheticsTestRequestBodyType("application/x-www-form-urlencoded"); - public static final SyntheticsTestRequestBodyType GRAPHQL = - new SyntheticsTestRequestBodyType("graphql"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "text/plain", - "application/json", - "text/xml", - "text/html", - "application/x-www-form-urlencoded", - "graphql")); + public static final SyntheticsTestRequestBodyType TEXT_PLAIN = new SyntheticsTestRequestBodyType("text/plain"); + public static final SyntheticsTestRequestBodyType APPLICATION_JSON = new SyntheticsTestRequestBodyType("application/json"); + public static final SyntheticsTestRequestBodyType TEXT_XML = new SyntheticsTestRequestBodyType("text/xml"); + public static final SyntheticsTestRequestBodyType TEXT_HTML = new SyntheticsTestRequestBodyType("text/html"); + public static final SyntheticsTestRequestBodyType APPLICATION_X_WWW_FORM_URLENCODED = new SyntheticsTestRequestBodyType("application/x-www-form-urlencoded"); + public static final SyntheticsTestRequestBodyType GRAPHQL = new SyntheticsTestRequestBodyType("graphql"); + + private static final Set allowedValues = new HashSet(Arrays.asList("text/plain", "application/json", "text/xml", "text/html", "application/x-www-form-urlencoded", "graphql")); private String value; @@ -56,22 +66,19 @@ public boolean isValid() { this.value = value; } - public static class SyntheticsTestRequestBodyTypeSerializer - extends StdSerializer { - public SyntheticsTestRequestBodyTypeSerializer(Class t) { - super(t); - } + public static class SyntheticsTestRequestBodyTypeSerializer extends StdSerializer { + public SyntheticsTestRequestBodyTypeSerializer(Class t) { + super(t); + } - public SyntheticsTestRequestBodyTypeSerializer() { - this(null); - } + public SyntheticsTestRequestBodyTypeSerializer() { + this(null); + } - @Override - public void serialize( - SyntheticsTestRequestBodyType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SyntheticsTestRequestBodyType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -83,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsTestRequestBodyType object is equal to o. */ + /** + * Return true if this SyntheticsTestRequestBodyType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificate.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificate.java index 97a822667d7..8ca4da01216 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificate.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificate.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Client certificate to use when performing the test request. */ + +/** + *

Client certificate to use when performing the test request.

+ */ @JsonPropertyOrder({ SyntheticsTestRequestCertificate.JSON_PROPERTY_CERT, SyntheticsTestRequestCertificate.JSON_PROPERTY_KEY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestRequestCertificate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CERT = "cert"; private SyntheticsTestRequestCertificateItem cert; @@ -34,21 +54,19 @@ public SyntheticsTestRequestCertificate cert(SyntheticsTestRequestCertificateIte } /** - * Define a request certificate. - * + *

Define a request certificate.

* @return cert - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CERT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequestCertificateItem getCert() { - return cert; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequestCertificateItem getCert() { + return cert; + } public void setCert(SyntheticsTestRequestCertificateItem cert) { this.cert = cert; } - public SyntheticsTestRequestCertificate key(SyntheticsTestRequestCertificateItem key) { this.key = key; this.unparsed |= key.unparsed; @@ -56,22 +74,23 @@ public SyntheticsTestRequestCertificate key(SyntheticsTestRequestCertificateItem } /** - * Define a request certificate. - * + *

Define a request certificate.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestRequestCertificateItem getKey() { - return key; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestRequestCertificateItem getKey() { + return key; + } public void setKey(SyntheticsTestRequestCertificateItem key) { this.key = key; } - /** Return true if this SyntheticsTestRequestCertificate object is equal to o. */ + /** + * Return true if this SyntheticsTestRequestCertificate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTestRequestCertificate syntheticsTestRequestCertificate = - (SyntheticsTestRequestCertificate) o; - return Objects.equals(this.cert, syntheticsTestRequestCertificate.cert) - && Objects.equals(this.key, syntheticsTestRequestCertificate.key); + SyntheticsTestRequestCertificate syntheticsTestRequestCertificate = (SyntheticsTestRequestCertificate) o; + return Objects.equals(this.cert, syntheticsTestRequestCertificate.cert) && Objects.equals(this.key, syntheticsTestRequestCertificate.key); } + @Override public int hashCode() { - return Objects.hash(cert, key); + return Objects.hash(cert,key); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificateItem.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificateItem.java index 4797570f6af..7332eba1af7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificateItem.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestCertificateItem.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Define a request certificate. */ + +/** + *

Define a request certificate.

+ */ @JsonPropertyOrder({ SyntheticsTestRequestCertificateItem.JSON_PROPERTY_CONTENT, SyntheticsTestRequestCertificateItem.JSON_PROPERTY_FILENAME, SyntheticsTestRequestCertificateItem.JSON_PROPERTY_UPDATED_AT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestRequestCertificateItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTENT = "content"; private String content; @@ -37,64 +57,61 @@ public SyntheticsTestRequestCertificateItem content(String content) { } /** - * Content of the certificate or key. - * + *

Content of the certificate or key.

* @return content - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getContent() { - return content; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getContent() { + return content; + } public void setContent(String content) { this.content = content; } - public SyntheticsTestRequestCertificateItem filename(String filename) { this.filename = filename; return this; } /** - * File name for the certificate or key. - * + *

File name for the certificate or key.

* @return filename - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILENAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFilename() { - return filename; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFilename() { + return filename; + } public void setFilename(String filename) { this.filename = filename; } - public SyntheticsTestRequestCertificateItem updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Date of update of the certificate or key, ISO format. - * + *

Date of update of the certificate or key, ISO format.

* @return updatedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUpdatedAt() { - return updatedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } - /** Return true if this SyntheticsTestRequestCertificateItem object is equal to o. */ + /** + * Return true if this SyntheticsTestRequestCertificateItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,16 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTestRequestCertificateItem syntheticsTestRequestCertificateItem = - (SyntheticsTestRequestCertificateItem) o; - return Objects.equals(this.content, syntheticsTestRequestCertificateItem.content) - && Objects.equals(this.filename, syntheticsTestRequestCertificateItem.filename) - && Objects.equals(this.updatedAt, syntheticsTestRequestCertificateItem.updatedAt); + SyntheticsTestRequestCertificateItem syntheticsTestRequestCertificateItem = (SyntheticsTestRequestCertificateItem) o; + return Objects.equals(this.content, syntheticsTestRequestCertificateItem.content) && Objects.equals(this.filename, syntheticsTestRequestCertificateItem.filename) && Objects.equals(this.updatedAt, syntheticsTestRequestCertificateItem.updatedAt); } + @Override public int hashCode() { - return Objects.hash(content, filename, updatedAt); + return Objects.hash(content,filename,updatedAt); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestProxy.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestProxy.java index 30e73a0cd47..64b95bd422d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestProxy.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequestProxy.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The proxy to perform the test. */ +/** + *

The proxy to perform the test.

+ */ @JsonPropertyOrder({ SyntheticsTestRequestProxy.JSON_PROPERTY_HEADERS, SyntheticsTestRequestProxy.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestRequestProxy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HEADERS = "headers"; private Map headers = null; @@ -34,15 +51,13 @@ public SyntheticsTestRequestProxy() {} @JsonCreator public SyntheticsTestRequestProxy( - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.url = url; } - public SyntheticsTestRequestProxy headers(Map headers) { this.headers = headers; return this; } - public SyntheticsTestRequestProxy putHeadersItem(String key, String headersItem) { if (this.headers == null) { this.headers = new HashMap<>(); @@ -52,42 +67,41 @@ public SyntheticsTestRequestProxy putHeadersItem(String key, String headersItem) } /** - * Headers to include when performing the test. - * + *

Headers to include when performing the test.

* @return headers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getHeaders() { - return headers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getHeaders() { + return headers; + } public void setHeaders(Map headers) { this.headers = headers; } - public SyntheticsTestRequestProxy url(String url) { this.url = url; return this; } /** - * URL of the proxy to perform the test. - * + *

URL of the proxy to perform the test.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this SyntheticsTestRequestProxy object is equal to o. */ + /** + * Return true if this SyntheticsTestRequestProxy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +111,13 @@ public boolean equals(Object o) { return false; } SyntheticsTestRequestProxy syntheticsTestRequestProxy = (SyntheticsTestRequestProxy) o; - return Objects.equals(this.headers, syntheticsTestRequestProxy.headers) - && Objects.equals(this.url, syntheticsTestRequestProxy.url); + return Objects.equals(this.headers, syntheticsTestRequestProxy.headers) && Objects.equals(this.url, syntheticsTestRequestProxy.url); } + @Override public int hashCode() { - return Objects.hash(headers, url); + return Objects.hash(headers,url); } @Override @@ -117,7 +131,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTiming.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTiming.java index 228ce8cf8ca..134b28f45cf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTiming.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTiming.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Object containing all metrics and their values collected for a Synthetic API test. Learn more - * about those metrics in Synthetics - * documentation. + *

Object containing all metrics and their values collected for a Synthetic API test. + * Learn more about those metrics in Synthetics documentation.

*/ @JsonPropertyOrder({ SyntheticsTiming.JSON_PROPERTY_DNS, @@ -28,10 +45,10 @@ SyntheticsTiming.JSON_PROPERTY_TOTAL, SyntheticsTiming.JSON_PROPERTY_WAIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTiming { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DNS = "dns"; private Double dns; @@ -65,190 +82,175 @@ public SyntheticsTiming dns(Double dns) { } /** - * The duration in millisecond of the DNS lookup. - * + *

The duration in millisecond of the DNS lookup.

* @return dns - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DNS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDns() { - return dns; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DNS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDns() { + return dns; + } public void setDns(Double dns) { this.dns = dns; } - public SyntheticsTiming download(Double download) { this.download = download; return this; } /** - * The time in millisecond to download the response. - * + *

The time in millisecond to download the response.

* @return download - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOWNLOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDownload() { - return download; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOWNLOAD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDownload() { + return download; + } public void setDownload(Double download) { this.download = download; } - public SyntheticsTiming firstByte(Double firstByte) { this.firstByte = firstByte; return this; } /** - * The time in millisecond to first byte. - * + *

The time in millisecond to first byte.

* @return firstByte - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIRST_BYTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getFirstByte() { - return firstByte; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_BYTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getFirstByte() { + return firstByte; + } public void setFirstByte(Double firstByte) { this.firstByte = firstByte; } - public SyntheticsTiming handshake(Double handshake) { this.handshake = handshake; return this; } /** - * The duration in millisecond of the TLS handshake. - * + *

The duration in millisecond of the TLS handshake.

* @return handshake - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDSHAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getHandshake() { - return handshake; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDSHAKE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getHandshake() { + return handshake; + } public void setHandshake(Double handshake) { this.handshake = handshake; } - public SyntheticsTiming redirect(Double redirect) { this.redirect = redirect; return this; } /** - * The time in millisecond spent during redirections. - * + *

The time in millisecond spent during redirections.

* @return redirect - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REDIRECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getRedirect() { - return redirect; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REDIRECT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getRedirect() { + return redirect; + } public void setRedirect(Double redirect) { this.redirect = redirect; } - public SyntheticsTiming ssl(Double ssl) { this.ssl = ssl; return this; } /** - * The duration in millisecond of the TLS handshake. - * + *

The duration in millisecond of the TLS handshake.

* @return ssl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SSL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSsl() { - return ssl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSsl() { + return ssl; + } public void setSsl(Double ssl) { this.ssl = ssl; } - public SyntheticsTiming tcp(Double tcp) { this.tcp = tcp; return this; } /** - * Time in millisecond to establish the TCP connection. - * + *

Time in millisecond to establish the TCP connection.

* @return tcp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TCP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTcp() { - return tcp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TCP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTcp() { + return tcp; + } public void setTcp(Double tcp) { this.tcp = tcp; } - public SyntheticsTiming total(Double total) { this.total = total; return this; } /** - * The overall time in millisecond the request took to be processed. - * + *

The overall time in millisecond the request took to be processed.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTotal() { - return total; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTotal() { + return total; + } public void setTotal(Double total) { this.total = total; } - public SyntheticsTiming wait(Double wait) { this.wait = wait; return this; } /** - * Time spent in millisecond waiting for a response. - * + *

Time spent in millisecond waiting for a response.

* @return wait - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WAIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getWait() { - return wait; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WAIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getWait() { + return wait; + } public void setWait(Double wait) { this.wait = wait; } - /** Return true if this SyntheticsTiming object is equal to o. */ + /** + * Return true if this SyntheticsTiming object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -258,20 +260,13 @@ public boolean equals(Object o) { return false; } SyntheticsTiming syntheticsTiming = (SyntheticsTiming) o; - return Objects.equals(this.dns, syntheticsTiming.dns) - && Objects.equals(this.download, syntheticsTiming.download) - && Objects.equals(this.firstByte, syntheticsTiming.firstByte) - && Objects.equals(this.handshake, syntheticsTiming.handshake) - && Objects.equals(this.redirect, syntheticsTiming.redirect) - && Objects.equals(this.ssl, syntheticsTiming.ssl) - && Objects.equals(this.tcp, syntheticsTiming.tcp) - && Objects.equals(this.total, syntheticsTiming.total) - && Objects.equals(this.wait, syntheticsTiming.wait); + return Objects.equals(this.dns, syntheticsTiming.dns) && Objects.equals(this.download, syntheticsTiming.download) && Objects.equals(this.firstByte, syntheticsTiming.firstByte) && Objects.equals(this.handshake, syntheticsTiming.handshake) && Objects.equals(this.redirect, syntheticsTiming.redirect) && Objects.equals(this.ssl, syntheticsTiming.ssl) && Objects.equals(this.tcp, syntheticsTiming.tcp) && Objects.equals(this.total, syntheticsTiming.total) && Objects.equals(this.wait, syntheticsTiming.wait); } + @Override public int hashCode() { - return Objects.hash(dns, download, firstByte, handshake, redirect, ssl, tcp, total, wait); + return Objects.hash(dns,download,firstByte,handshake,redirect,ssl,tcp,total,wait); } @Override @@ -292,7 +287,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerBody.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerBody.java index 186dbd8c894..7e43b2182de 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerBody.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing the synthetics tests to trigger. */ -@JsonPropertyOrder({SyntheticsTriggerBody.JSON_PROPERTY_TESTS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object describing the synthetics tests to trigger.

+ */ +@JsonPropertyOrder({ + SyntheticsTriggerBody.JSON_PROPERTY_TESTS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTriggerBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TESTS = "tests"; private List tests = new ArrayList<>(); @@ -28,11 +47,9 @@ public SyntheticsTriggerBody() {} @JsonCreator public SyntheticsTriggerBody( - @JsonProperty(required = true, value = JSON_PROPERTY_TESTS) - List tests) { - this.tests = tests; + @JsonProperty(required=true, value=JSON_PROPERTY_TESTS)List tests) { + this.tests = tests; } - public SyntheticsTriggerBody tests(List tests) { this.tests = tests; for (SyntheticsTriggerTest item : tests) { @@ -40,7 +57,6 @@ public SyntheticsTriggerBody tests(List tests) { } return this; } - public SyntheticsTriggerBody addTestsItem(SyntheticsTriggerTest testsItem) { this.tests.add(testsItem); this.unparsed |= testsItem.unparsed; @@ -48,21 +64,22 @@ public SyntheticsTriggerBody addTestsItem(SyntheticsTriggerTest testsItem) { } /** - * Individual synthetics test. - * + *

Individual synthetics test.

* @return tests - */ - @JsonProperty(JSON_PROPERTY_TESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTests() { - return tests; - } - + **/ + @JsonProperty(JSON_PROPERTY_TESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTests() { + return tests; + } public void setTests(List tests) { this.tests = tests; } - /** Return true if this SyntheticsTriggerBody object is equal to o. */ + /** + * Return true if this SyntheticsTriggerBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.tests, syntheticsTriggerBody.tests); } + @Override public int hashCode() { return Objects.hash(tests); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestLocation.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestLocation.java index ab715885384..e8ca0f462fc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestLocation.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestLocation.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Synthetics location. */ + +/** + *

Synthetics location.

+ */ @JsonPropertyOrder({ SyntheticsTriggerCITestLocation.JSON_PROPERTY_ID, SyntheticsTriggerCITestLocation.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTriggerCITestLocation { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private Long id; @@ -33,43 +53,42 @@ public SyntheticsTriggerCITestLocation id(Long id) { } /** - * Unique identifier of the location. - * + *

Unique identifier of the location.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public SyntheticsTriggerCITestLocation name(String name) { this.name = name; return this; } /** - * Name of the location. - * + *

Name of the location.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this SyntheticsTriggerCITestLocation object is equal to o. */ + /** + * Return true if this SyntheticsTriggerCITestLocation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTriggerCITestLocation syntheticsTriggerCiTestLocation = - (SyntheticsTriggerCITestLocation) o; - return Objects.equals(this.id, syntheticsTriggerCiTestLocation.id) - && Objects.equals(this.name, syntheticsTriggerCiTestLocation.name); + SyntheticsTriggerCITestLocation syntheticsTriggerCiTestLocation = (SyntheticsTriggerCITestLocation) o; + return Objects.equals(this.id, syntheticsTriggerCiTestLocation.id) && Objects.equals(this.name, syntheticsTriggerCiTestLocation.name); } + @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(id,name); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestRunResult.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestRunResult.java index 9a414abdcb5..dc42d229c6b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestRunResult.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestRunResult.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Information about a single test run. */ + +/** + *

Information about a single test run.

+ */ @JsonPropertyOrder({ SyntheticsTriggerCITestRunResult.JSON_PROPERTY_DEVICE, SyntheticsTriggerCITestRunResult.JSON_PROPERTY_LOCATION, SyntheticsTriggerCITestRunResult.JSON_PROPERTY_PUBLIC_ID, SyntheticsTriggerCITestRunResult.JSON_PROPERTY_RESULT_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTriggerCITestRunResult { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEVICE = "device"; private SyntheticsDeviceID device; @@ -42,88 +62,83 @@ public SyntheticsTriggerCITestRunResult device(SyntheticsDeviceID device) { } /** - * The device ID. - * + *

The device ID.

* @return device - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsDeviceID getDevice() { - return device; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsDeviceID getDevice() { + return device; + } public void setDevice(SyntheticsDeviceID device) { if (!device.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.device = device; } - public SyntheticsTriggerCITestRunResult location(Long location) { this.location = location; return this; } /** - * The location ID of the test run. - * + *

The location ID of the test run.

* @return location - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLocation() { - return location; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLocation() { + return location; + } public void setLocation(Long location) { this.location = location; } - public SyntheticsTriggerCITestRunResult publicId(String publicId) { this.publicId = publicId; return this; } /** - * The public ID of the Synthetics test. - * + *

The public ID of the Synthetics test.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public SyntheticsTriggerCITestRunResult resultId(String resultId) { this.resultId = resultId; return this; } /** - * ID of the result. - * + *

ID of the result.

* @return resultId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResultId() { - return resultId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } public void setResultId(String resultId) { this.resultId = resultId; } - /** Return true if this SyntheticsTriggerCITestRunResult object is equal to o. */ + /** + * Return true if this SyntheticsTriggerCITestRunResult object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -132,17 +147,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTriggerCITestRunResult syntheticsTriggerCiTestRunResult = - (SyntheticsTriggerCITestRunResult) o; - return Objects.equals(this.device, syntheticsTriggerCiTestRunResult.device) - && Objects.equals(this.location, syntheticsTriggerCiTestRunResult.location) - && Objects.equals(this.publicId, syntheticsTriggerCiTestRunResult.publicId) - && Objects.equals(this.resultId, syntheticsTriggerCiTestRunResult.resultId); + SyntheticsTriggerCITestRunResult syntheticsTriggerCiTestRunResult = (SyntheticsTriggerCITestRunResult) o; + return Objects.equals(this.device, syntheticsTriggerCiTestRunResult.device) && Objects.equals(this.location, syntheticsTriggerCiTestRunResult.location) && Objects.equals(this.publicId, syntheticsTriggerCiTestRunResult.publicId) && Objects.equals(this.resultId, syntheticsTriggerCiTestRunResult.resultId); } + @Override public int hashCode() { - return Objects.hash(device, location, publicId, resultId); + return Objects.hash(device,location,publicId,resultId); } @Override @@ -158,7 +170,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestsResponse.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestsResponse.java index 7e8b52358ee..68cf731d36b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerCITestsResponse.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing information about the tests triggered. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing information about the tests triggered.

+ */ @JsonPropertyOrder({ SyntheticsTriggerCITestsResponse.JSON_PROPERTY_BATCH_ID, SyntheticsTriggerCITestsResponse.JSON_PROPERTY_LOCATIONS, SyntheticsTriggerCITestsResponse.JSON_PROPERTY_RESULTS, SyntheticsTriggerCITestsResponse.JSON_PROPERTY_TRIGGERED_CHECK_IDS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTriggerCITestsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BATCH_ID = "batch_id"; private JsonNullable batchId = JsonNullable.undefined(); @@ -44,42 +61,34 @@ public SyntheticsTriggerCITestsResponse batchId(String batchId) { } /** - * The public ID of the batch triggered. - * + *

The public ID of the batch triggered.

* @return batchId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getBatchId() { - return batchId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getBatchId() { + return batchId.orElse(null); + } @JsonProperty(JSON_PROPERTY_BATCH_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getBatchId_JsonNullable() { return batchId; } - - @JsonProperty(JSON_PROPERTY_BATCH_ID) - public void setBatchId_JsonNullable(JsonNullable batchId) { + @JsonProperty(JSON_PROPERTY_BATCH_ID)public void setBatchId_JsonNullable(JsonNullable batchId) { this.batchId = batchId; } - public void setBatchId(String batchId) { this.batchId = JsonNullable.of(batchId); } - - public SyntheticsTriggerCITestsResponse locations( - List locations) { + public SyntheticsTriggerCITestsResponse locations(List locations) { this.locations = locations; for (SyntheticsTriggerCITestLocation item : locations) { this.unparsed |= item.unparsed; } return this; } - - public SyntheticsTriggerCITestsResponse addLocationsItem( - SyntheticsTriggerCITestLocation locationsItem) { + public SyntheticsTriggerCITestsResponse addLocationsItem(SyntheticsTriggerCITestLocation locationsItem) { if (this.locations == null) { this.locations = new ArrayList<>(); } @@ -89,21 +98,19 @@ public SyntheticsTriggerCITestsResponse addLocationsItem( } /** - * List of Synthetics locations. - * + *

List of Synthetics locations.

* @return locations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLocations() { - return locations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLocations() { + return locations; + } public void setLocations(List locations) { this.locations = locations; } - public SyntheticsTriggerCITestsResponse results(List results) { this.results = results; for (SyntheticsTriggerCITestRunResult item : results) { @@ -111,9 +118,7 @@ public SyntheticsTriggerCITestsResponse results(List(); } @@ -123,26 +128,23 @@ public SyntheticsTriggerCITestsResponse addResultsItem( } /** - * Information about the tests runs. - * + *

Information about the tests runs.

* @return results - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResults() { - return results; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } public void setResults(List results) { this.results = results; } - public SyntheticsTriggerCITestsResponse triggeredCheckIds(List triggeredCheckIds) { this.triggeredCheckIds = triggeredCheckIds; return this; } - public SyntheticsTriggerCITestsResponse addTriggeredCheckIdsItem(String triggeredCheckIdsItem) { if (this.triggeredCheckIds == null) { this.triggeredCheckIds = new ArrayList<>(); @@ -152,22 +154,23 @@ public SyntheticsTriggerCITestsResponse addTriggeredCheckIdsItem(String triggere } /** - * The public IDs of the Synthetics test triggered. - * + *

The public IDs of the Synthetics test triggered.

* @return triggeredCheckIds - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRIGGERED_CHECK_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTriggeredCheckIds() { - return triggeredCheckIds; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIGGERED_CHECK_IDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTriggeredCheckIds() { + return triggeredCheckIds; + } public void setTriggeredCheckIds(List triggeredCheckIds) { this.triggeredCheckIds = triggeredCheckIds; } - /** Return true if this SyntheticsTriggerCITestsResponse object is equal to o. */ + /** + * Return true if this SyntheticsTriggerCITestsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -176,18 +179,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsTriggerCITestsResponse syntheticsTriggerCiTestsResponse = - (SyntheticsTriggerCITestsResponse) o; - return Objects.equals(this.batchId, syntheticsTriggerCiTestsResponse.batchId) - && Objects.equals(this.locations, syntheticsTriggerCiTestsResponse.locations) - && Objects.equals(this.results, syntheticsTriggerCiTestsResponse.results) - && Objects.equals( - this.triggeredCheckIds, syntheticsTriggerCiTestsResponse.triggeredCheckIds); + SyntheticsTriggerCITestsResponse syntheticsTriggerCiTestsResponse = (SyntheticsTriggerCITestsResponse) o; + return Objects.equals(this.batchId, syntheticsTriggerCiTestsResponse.batchId) && Objects.equals(this.locations, syntheticsTriggerCiTestsResponse.locations) && Objects.equals(this.results, syntheticsTriggerCiTestsResponse.results) && Objects.equals(this.triggeredCheckIds, syntheticsTriggerCiTestsResponse.triggeredCheckIds); } + @Override public int hashCode() { - return Objects.hash(batchId, locations, results, triggeredCheckIds); + return Objects.hash(batchId,locations,results,triggeredCheckIds); } @Override @@ -203,7 +202,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerTest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerTest.java index d2c78335605..b2def69ee4c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerTest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTriggerTest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Test configuration for Synthetics */ + +/** + *

Test configuration for Synthetics

+ */ @JsonPropertyOrder({ SyntheticsTriggerTest.JSON_PROPERTY_METADATA, SyntheticsTriggerTest.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTriggerTest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METADATA = "metadata"; private SyntheticsCIBatchMetadata metadata; @@ -32,10 +51,9 @@ public SyntheticsTriggerTest() {} @JsonCreator public SyntheticsTriggerTest( - @JsonProperty(required = true, value = JSON_PROPERTY_PUBLIC_ID) String publicId) { - this.publicId = publicId; + @JsonProperty(required=true, value=JSON_PROPERTY_PUBLIC_ID)String publicId) { + this.publicId = publicId; } - public SyntheticsTriggerTest metadata(SyntheticsCIBatchMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -43,42 +61,41 @@ public SyntheticsTriggerTest metadata(SyntheticsCIBatchMetadata metadata) { } /** - * Metadata for the Synthetics tests run. - * + *

Metadata for the Synthetics tests run.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsCIBatchMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsCIBatchMetadata getMetadata() { + return metadata; + } public void setMetadata(SyntheticsCIBatchMetadata metadata) { this.metadata = metadata; } - public SyntheticsTriggerTest publicId(String publicId) { this.publicId = publicId; return this; } /** - * The public ID of the Synthetics test to trigger. - * + *

The public ID of the Synthetics test to trigger.

* @return publicId - */ - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPublicId() { - return publicId; - } - + **/ + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this SyntheticsTriggerTest object is equal to o. */ + /** + * Return true if this SyntheticsTriggerTest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } SyntheticsTriggerTest syntheticsTriggerTest = (SyntheticsTriggerTest) o; - return Objects.equals(this.metadata, syntheticsTriggerTest.metadata) - && Objects.equals(this.publicId, syntheticsTriggerTest.publicId); + return Objects.equals(this.metadata, syntheticsTriggerTest.metadata) && Objects.equals(this.publicId, syntheticsTriggerTest.publicId); } + @Override public int hashCode() { - return Objects.hash(metadata, publicId); + return Objects.hash(metadata,publicId); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsUpdateTestPauseStatusPayload.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsUpdateTestPauseStatusPayload.java index ca0fbc6e5b8..6b3e2b5c070 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsUpdateTestPauseStatusPayload.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsUpdateTestPauseStatusPayload.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object to start or pause an existing Synthetic test. */ -@JsonPropertyOrder({SyntheticsUpdateTestPauseStatusPayload.JSON_PROPERTY_NEW_STATUS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object to start or pause an existing Synthetic test.

+ */ +@JsonPropertyOrder({ + SyntheticsUpdateTestPauseStatusPayload.JSON_PROPERTY_NEW_STATUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsUpdateTestPauseStatusPayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEW_STATUS = "new_status"; private SyntheticsTestPauseStatus newStatus; @@ -28,26 +50,27 @@ public SyntheticsUpdateTestPauseStatusPayload newStatus(SyntheticsTestPauseStatu } /** - * Define whether you want to start (live) or pause (paused) a Synthetic - * test. - * + *

Define whether you want to start (live) or pause (paused) a + * Synthetic test.

* @return newStatus - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEW_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SyntheticsTestPauseStatus getNewStatus() { - return newStatus; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsTestPauseStatus getNewStatus() { + return newStatus; + } public void setNewStatus(SyntheticsTestPauseStatus newStatus) { if (!newStatus.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.newStatus = newStatus; } - /** Return true if this SyntheticsUpdateTestPauseStatusPayload object is equal to o. */ + /** + * Return true if this SyntheticsUpdateTestPauseStatusPayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,11 +79,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SyntheticsUpdateTestPauseStatusPayload syntheticsUpdateTestPauseStatusPayload = - (SyntheticsUpdateTestPauseStatusPayload) o; + SyntheticsUpdateTestPauseStatusPayload syntheticsUpdateTestPauseStatusPayload = (SyntheticsUpdateTestPauseStatusPayload) o; return Objects.equals(this.newStatus, syntheticsUpdateTestPauseStatusPayload.newStatus); } + @Override public int hashCode() { return Objects.hash(newStatus); @@ -76,7 +99,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsVariableParser.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsVariableParser.java index 30b80be556c..6ed597e92d6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsVariableParser.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsVariableParser.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Details of the parser to use for the global variable. */ + +/** + *

Details of the parser to use for the global variable.

+ */ @JsonPropertyOrder({ SyntheticsVariableParser.JSON_PROPERTY_TYPE, SyntheticsVariableParser.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsVariableParser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private SyntheticsGlobalVariableParserType type; @@ -32,12 +51,10 @@ public SyntheticsVariableParser() {} @JsonCreator public SyntheticsVariableParser( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SyntheticsGlobalVariableParserType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SyntheticsGlobalVariableParserType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public SyntheticsVariableParser type(SyntheticsGlobalVariableParserType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -45,45 +62,44 @@ public SyntheticsVariableParser type(SyntheticsGlobalVariableParserType type) { } /** - * Type of parser for a Synthetics global variable from a synthetics test. - * + *

Type of parser for a Synthetics global variable from a synthetics test.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SyntheticsGlobalVariableParserType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SyntheticsGlobalVariableParserType getType() { + return type; + } public void setType(SyntheticsGlobalVariableParserType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SyntheticsVariableParser value(String value) { this.value = value; return this; } /** - * Regex or JSON path used for the parser. Not used with type raw. - * + *

Regex or JSON path used for the parser. Not used with type raw.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsVariableParser object is equal to o. */ + /** + * Return true if this SyntheticsVariableParser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +109,13 @@ public boolean equals(Object o) { return false; } SyntheticsVariableParser syntheticsVariableParser = (SyntheticsVariableParser) o; - return Objects.equals(this.type, syntheticsVariableParser.type) - && Objects.equals(this.value, syntheticsVariableParser.value); + return Objects.equals(this.type, syntheticsVariableParser.type) && Objects.equals(this.value, syntheticsVariableParser.value); } + @Override public int hashCode() { - return Objects.hash(type, value); + return Objects.hash(type,value); } @Override @@ -113,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsWarningType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsWarningType.java index c7c63dc95d1..cc9854ffc9b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsWarningType.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsWarningType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** User locator used. */ +/** + *

User locator used.

+ */ @JsonSerialize(using = SyntheticsWarningType.SyntheticsWarningTypeSerializer.class) public class SyntheticsWarningType { - public static final SyntheticsWarningType USER_LOCATOR = - new SyntheticsWarningType("user_locator"); + public static final SyntheticsWarningType USER_LOCATOR = new SyntheticsWarningType("user_locator"); - private static final Set allowedValues = - new HashSet(Arrays.asList("user_locator")); + private static final Set allowedValues = new HashSet(Arrays.asList("user_locator")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class SyntheticsWarningTypeSerializer extends StdSerializer { - public SyntheticsWarningTypeSerializer(Class t) { - super(t); - } - - public SyntheticsWarningTypeSerializer() { - this(null); - } - - @Override - public void serialize( - SyntheticsWarningType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SyntheticsWarningTypeSerializer(Class t) { + super(t); + } + + public SyntheticsWarningTypeSerializer() { + this(null); + } + + @Override + public void serialize(SyntheticsWarningType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SyntheticsWarningType object is equal to o. */ + /** + * Return true if this SyntheticsWarningType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TableWidgetCellDisplayMode.java b/src/main/java/com/datadog/api/client/v1/model/TableWidgetCellDisplayMode.java index 43cd78a1132..ff9a9be3b1f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TableWidgetCellDisplayMode.java +++ b/src/main/java/com/datadog/api/client/v1/model/TableWidgetCellDisplayMode.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Define a display mode for the table cell. */ +/** + *

Define a display mode for the table cell.

+ */ @JsonSerialize(using = TableWidgetCellDisplayMode.TableWidgetCellDisplayModeSerializer.class) public class TableWidgetCellDisplayMode { public static final TableWidgetCellDisplayMode NUMBER = new TableWidgetCellDisplayMode("number"); public static final TableWidgetCellDisplayMode BAR = new TableWidgetCellDisplayMode("bar"); - private static final Set allowedValues = - new HashSet(Arrays.asList("number", "bar")); + private static final Set allowedValues = new HashSet(Arrays.asList("number", "bar")); private String value; @@ -39,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class TableWidgetCellDisplayModeSerializer - extends StdSerializer { - public TableWidgetCellDisplayModeSerializer(Class t) { - super(t); - } + public static class TableWidgetCellDisplayModeSerializer extends StdSerializer { + public TableWidgetCellDisplayModeSerializer(Class t) { + super(t); + } - public TableWidgetCellDisplayModeSerializer() { - this(null); - } + public TableWidgetCellDisplayModeSerializer() { + this(null); + } - @Override - public void serialize( - TableWidgetCellDisplayMode value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TableWidgetCellDisplayMode value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TableWidgetCellDisplayMode object is equal to o. */ + /** + * Return true if this TableWidgetCellDisplayMode object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinition.java index 0f78f8f629c..816b7bb1584 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The table visualization is available on timeboards and screenboards. It displays columns of - * metrics grouped by tag key. + *

The table visualization is available on timeboards and screenboards. It displays columns of metrics grouped by tag key.

*/ @JsonPropertyOrder({ TableWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -29,10 +43,10 @@ TableWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, TableWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TableWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -61,14 +75,12 @@ public TableWidgetDefinition() {} @JsonCreator public TableWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TableWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)TableWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public TableWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -76,7 +88,6 @@ public TableWidgetDefinition customLinks(List customLinks) { } return this; } - public TableWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -87,21 +98,19 @@ public TableWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public TableWidgetDefinition hasSearchBar(TableWidgetHasSearchBar hasSearchBar) { this.hasSearchBar = hasSearchBar; this.unparsed |= !hasSearchBar.isValid(); @@ -109,24 +118,22 @@ public TableWidgetDefinition hasSearchBar(TableWidgetHasSearchBar hasSearchBar) } /** - * Controls the display of the search bar. - * + *

Controls the display of the search bar.

* @return hasSearchBar - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_SEARCH_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TableWidgetHasSearchBar getHasSearchBar() { - return hasSearchBar; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_SEARCH_BAR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TableWidgetHasSearchBar getHasSearchBar() { + return hasSearchBar; + } public void setHasSearchBar(TableWidgetHasSearchBar hasSearchBar) { if (!hasSearchBar.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.hasSearchBar = hasSearchBar; } - public TableWidgetDefinition requests(List requests) { this.requests = requests; for (TableWidgetRequest item : requests) { @@ -134,7 +141,6 @@ public TableWidgetDefinition requests(List requests) { } return this; } - public TableWidgetDefinition addRequestsItem(TableWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -142,20 +148,18 @@ public TableWidgetDefinition addRequestsItem(TableWidgetRequest requestsItem) { } /** - * Widget definition. - * + *

Widget definition.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public TableWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -163,42 +167,38 @@ public TableWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public TableWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public TableWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -206,45 +206,41 @@ public TableWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public TableWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public TableWidgetDefinition type(TableWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -252,24 +248,25 @@ public TableWidgetDefinition type(TableWidgetDefinitionType type) { } /** - * Type of the table widget. - * + *

Type of the table widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TableWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TableWidgetDefinitionType getType() { + return type; + } public void setType(TableWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this TableWidgetDefinition object is equal to o. */ + /** + * Return true if this TableWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -279,20 +276,13 @@ public boolean equals(Object o) { return false; } TableWidgetDefinition tableWidgetDefinition = (TableWidgetDefinition) o; - return Objects.equals(this.customLinks, tableWidgetDefinition.customLinks) - && Objects.equals(this.hasSearchBar, tableWidgetDefinition.hasSearchBar) - && Objects.equals(this.requests, tableWidgetDefinition.requests) - && Objects.equals(this.time, tableWidgetDefinition.time) - && Objects.equals(this.title, tableWidgetDefinition.title) - && Objects.equals(this.titleAlign, tableWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, tableWidgetDefinition.titleSize) - && Objects.equals(this.type, tableWidgetDefinition.type); + return Objects.equals(this.customLinks, tableWidgetDefinition.customLinks) && Objects.equals(this.hasSearchBar, tableWidgetDefinition.hasSearchBar) && Objects.equals(this.requests, tableWidgetDefinition.requests) && Objects.equals(this.time, tableWidgetDefinition.time) && Objects.equals(this.title, tableWidgetDefinition.title) && Objects.equals(this.titleAlign, tableWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, tableWidgetDefinition.titleSize) && Objects.equals(this.type, tableWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash( - customLinks, hasSearchBar, requests, time, title, titleAlign, titleSize, type); + return Objects.hash(customLinks,hasSearchBar,requests,time,title,titleAlign,titleSize,type); } @Override @@ -312,7 +302,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinitionType.java index 5559b1e6aba..b2dd375b419 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TableWidgetDefinitionType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the table widget. */ +/** + *

Type of the table widget.

+ */ @JsonSerialize(using = TableWidgetDefinitionType.TableWidgetDefinitionTypeSerializer.class) public class TableWidgetDefinitionType { - public static final TableWidgetDefinitionType QUERY_TABLE = - new TableWidgetDefinitionType("query_table"); + public static final TableWidgetDefinitionType QUERY_TABLE = new TableWidgetDefinitionType("query_table"); - private static final Set allowedValues = - new HashSet(Arrays.asList("query_table")); + private static final Set allowedValues = new HashSet(Arrays.asList("query_table")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class TableWidgetDefinitionTypeSerializer - extends StdSerializer { - public TableWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class TableWidgetDefinitionTypeSerializer extends StdSerializer { + public TableWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public TableWidgetDefinitionTypeSerializer() { - this(null); - } + public TableWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - TableWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TableWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TableWidgetDefinitionType object is equal to o. */ + /** + * Return true if this TableWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TableWidgetHasSearchBar.java b/src/main/java/com/datadog/api/client/v1/model/TableWidgetHasSearchBar.java index 8d60272d052..b264186514c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TableWidgetHasSearchBar.java +++ b/src/main/java/com/datadog/api/client/v1/model/TableWidgetHasSearchBar.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Controls the display of the search bar. */ +/** + *

Controls the display of the search bar.

+ */ @JsonSerialize(using = TableWidgetHasSearchBar.TableWidgetHasSearchBarSerializer.class) public class TableWidgetHasSearchBar { @@ -27,8 +51,7 @@ public class TableWidgetHasSearchBar { public static final TableWidgetHasSearchBar NEVER = new TableWidgetHasSearchBar("never"); public static final TableWidgetHasSearchBar AUTO = new TableWidgetHasSearchBar("auto"); - private static final Set allowedValues = - new HashSet(Arrays.asList("always", "never", "auto")); + private static final Set allowedValues = new HashSet(Arrays.asList("always", "never", "auto")); private String value; @@ -40,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class TableWidgetHasSearchBarSerializer - extends StdSerializer { - public TableWidgetHasSearchBarSerializer(Class t) { - super(t); - } + public static class TableWidgetHasSearchBarSerializer extends StdSerializer { + public TableWidgetHasSearchBarSerializer(Class t) { + super(t); + } - public TableWidgetHasSearchBarSerializer() { - this(null); - } + public TableWidgetHasSearchBarSerializer() { + this(null); + } - @Override - public void serialize( - TableWidgetHasSearchBar value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TableWidgetHasSearchBar value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TableWidgetHasSearchBar object is equal to o. */ + /** + * Return true if this TableWidgetHasSearchBar object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java index 7a1ff32e65c..e1d1af61e62 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Updated table widget. */ +/** + *

Updated table widget.

+ */ @JsonPropertyOrder({ TableWidgetRequest.JSON_PROPERTY_AGGREGATOR, TableWidgetRequest.JSON_PROPERTY_ALIAS, @@ -36,10 +54,10 @@ TableWidgetRequest.JSON_PROPERTY_RUM_QUERY, TableWidgetRequest.JSON_PROPERTY_SECURITY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TableWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATOR = "aggregator"; private WidgetAggregator aggregator; @@ -104,45 +122,41 @@ public TableWidgetRequest aggregator(WidgetAggregator aggregator) { } /** - * Aggregator used for the request. - * + *

Aggregator used for the request.

* @return aggregator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAggregator getAggregator() { - return aggregator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAggregator getAggregator() { + return aggregator; + } public void setAggregator(WidgetAggregator aggregator) { if (!aggregator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregator = aggregator; } - public TableWidgetRequest alias(String alias) { this.alias = alias; return this; } /** - * The column name (defaults to the metric name). - * + *

The column name (defaults to the metric name).

* @return alias - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlias() { - return alias; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAlias() { + return alias; + } public void setAlias(String alias) { this.alias = alias; } - public TableWidgetRequest apmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; this.unparsed |= apmQuery.unparsed; @@ -150,21 +164,19 @@ public TableWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public TableWidgetRequest apmStatsQuery(ApmStatsQueryDefinition apmStatsQuery) { this.apmStatsQuery = apmStatsQuery; this.unparsed |= apmStatsQuery.unparsed; @@ -172,26 +184,23 @@ public TableWidgetRequest apmStatsQuery(ApmStatsQueryDefinition apmStatsQuery) { } /** - * The APM stats query for table and distributions widgets. - * + *

The APM stats query for table and distributions widgets.

* @return apmStatsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_STATS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApmStatsQueryDefinition getApmStatsQuery() { - return apmStatsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_STATS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApmStatsQueryDefinition getApmStatsQuery() { + return apmStatsQuery; + } public void setApmStatsQuery(ApmStatsQueryDefinition apmStatsQuery) { this.apmStatsQuery = apmStatsQuery; } - public TableWidgetRequest cellDisplayMode(List cellDisplayMode) { this.cellDisplayMode = cellDisplayMode; return this; } - public TableWidgetRequest addCellDisplayModeItem(TableWidgetCellDisplayMode cellDisplayModeItem) { if (this.cellDisplayMode == null) { this.cellDisplayMode = new ArrayList<>(); @@ -202,21 +211,19 @@ public TableWidgetRequest addCellDisplayModeItem(TableWidgetCellDisplayMode cell } /** - * A list of display modes for each table cell. - * + *

A list of display modes for each table cell.

* @return cellDisplayMode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CELL_DISPLAY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCellDisplayMode() { - return cellDisplayMode; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_DISPLAY_MODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCellDisplayMode() { + return cellDisplayMode; + } public void setCellDisplayMode(List cellDisplayMode) { this.cellDisplayMode = cellDisplayMode; } - public TableWidgetRequest conditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; for (WidgetConditionalFormat item : conditionalFormats) { @@ -224,9 +231,7 @@ public TableWidgetRequest conditionalFormats(List condi } return this; } - - public TableWidgetRequest addConditionalFormatsItem( - WidgetConditionalFormat conditionalFormatsItem) { + public TableWidgetRequest addConditionalFormatsItem(WidgetConditionalFormat conditionalFormatsItem) { if (this.conditionalFormats == null) { this.conditionalFormats = new ArrayList<>(); } @@ -236,21 +241,19 @@ public TableWidgetRequest addConditionalFormatsItem( } /** - * List of conditional formats. - * + *

List of conditional formats.

* @return conditionalFormats - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConditionalFormats() { - return conditionalFormats; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConditionalFormats() { + return conditionalFormats; + } public void setConditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; } - public TableWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -258,21 +261,19 @@ public TableWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public TableWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -280,7 +281,6 @@ public TableWidgetRequest formulas(List formulas) { } return this; } - public TableWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -291,43 +291,38 @@ public TableWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public TableWidgetRequest limit(Long limit) { this.limit = limit; return this; } /** - * For metric queries, the number of lines to show in the table. Only one request should have this - * property. - * + *

For metric queries, the number of lines to show in the table. Only one request should have this property.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public TableWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -335,21 +330,19 @@ public TableWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public TableWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -357,21 +350,19 @@ public TableWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public TableWidgetRequest order(WidgetSort order) { this.order = order; this.unparsed |= !order.isValid(); @@ -379,24 +370,22 @@ public TableWidgetRequest order(WidgetSort order) { } /** - * Widget sorting methods. - * + *

Widget sorting methods.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetSort getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetSort getOrder() { + return order; + } public void setOrder(WidgetSort order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - public TableWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -404,21 +393,19 @@ public TableWidgetRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public TableWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -426,42 +413,38 @@ public TableWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQ } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public TableWidgetRequest q(String q) { this.q = q; return this; } /** - * Query definition. - * + *

Query definition.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public TableWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -469,7 +452,6 @@ public TableWidgetRequest queries(List querie } return this; } - public TableWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -480,21 +462,19 @@ public TableWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queri } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public TableWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -502,24 +482,22 @@ public TableWidgetRequest responseFormat(FormulaAndFunctionResponseFormat respon } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public TableWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -527,21 +505,19 @@ public TableWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public TableWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -549,22 +525,23 @@ public TableWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - /** Return true if this TableWidgetRequest object is equal to o. */ + /** + * Return true if this TableWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -574,49 +551,13 @@ public boolean equals(Object o) { return false; } TableWidgetRequest tableWidgetRequest = (TableWidgetRequest) o; - return Objects.equals(this.aggregator, tableWidgetRequest.aggregator) - && Objects.equals(this.alias, tableWidgetRequest.alias) - && Objects.equals(this.apmQuery, tableWidgetRequest.apmQuery) - && Objects.equals(this.apmStatsQuery, tableWidgetRequest.apmStatsQuery) - && Objects.equals(this.cellDisplayMode, tableWidgetRequest.cellDisplayMode) - && Objects.equals(this.conditionalFormats, tableWidgetRequest.conditionalFormats) - && Objects.equals(this.eventQuery, tableWidgetRequest.eventQuery) - && Objects.equals(this.formulas, tableWidgetRequest.formulas) - && Objects.equals(this.limit, tableWidgetRequest.limit) - && Objects.equals(this.logQuery, tableWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, tableWidgetRequest.networkQuery) - && Objects.equals(this.order, tableWidgetRequest.order) - && Objects.equals(this.processQuery, tableWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, tableWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, tableWidgetRequest.q) - && Objects.equals(this.queries, tableWidgetRequest.queries) - && Objects.equals(this.responseFormat, tableWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, tableWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, tableWidgetRequest.securityQuery); + return Objects.equals(this.aggregator, tableWidgetRequest.aggregator) && Objects.equals(this.alias, tableWidgetRequest.alias) && Objects.equals(this.apmQuery, tableWidgetRequest.apmQuery) && Objects.equals(this.apmStatsQuery, tableWidgetRequest.apmStatsQuery) && Objects.equals(this.cellDisplayMode, tableWidgetRequest.cellDisplayMode) && Objects.equals(this.conditionalFormats, tableWidgetRequest.conditionalFormats) && Objects.equals(this.eventQuery, tableWidgetRequest.eventQuery) && Objects.equals(this.formulas, tableWidgetRequest.formulas) && Objects.equals(this.limit, tableWidgetRequest.limit) && Objects.equals(this.logQuery, tableWidgetRequest.logQuery) && Objects.equals(this.networkQuery, tableWidgetRequest.networkQuery) && Objects.equals(this.order, tableWidgetRequest.order) && Objects.equals(this.processQuery, tableWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, tableWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, tableWidgetRequest.q) && Objects.equals(this.queries, tableWidgetRequest.queries) && Objects.equals(this.responseFormat, tableWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, tableWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, tableWidgetRequest.securityQuery); } + @Override public int hashCode() { - return Objects.hash( - aggregator, - alias, - apmQuery, - apmStatsQuery, - cellDisplayMode, - conditionalFormats, - eventQuery, - formulas, - limit, - logQuery, - networkQuery, - order, - processQuery, - profileMetricsQuery, - q, - queries, - responseFormat, - rumQuery, - securityQuery); + return Objects.hash(aggregator,alias,apmQuery,apmStatsQuery,cellDisplayMode,conditionalFormats,eventQuery,formulas,limit,logQuery,networkQuery,order,processQuery,profileMetricsQuery,q,queries,responseFormat,rumQuery,securityQuery); } @Override @@ -636,9 +577,7 @@ public String toString() { sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); @@ -649,7 +588,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TagToHosts.java b/src/main/java/com/datadog/api/client/v1/model/TagToHosts.java index 808fa132cd1..1f22ead1467 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TagToHosts.java +++ b/src/main/java/com/datadog/api/client/v1/model/TagToHosts.java @@ -6,24 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Map; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * In this object, the key is the tag, the value is a list of host names that are reporting that - * tag. + *

In this object, the key is the tag, the value is a list of host names that are reporting that tag.

*/ -@JsonPropertyOrder({TagToHosts.JSON_PROPERTY_TAGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + TagToHosts.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TagToHosts { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TAGS = "tags"; private Map> tags = null; @@ -31,7 +47,6 @@ public TagToHosts tags(Map> tags) { this.tags = tags; return this; } - public TagToHosts putTagsItem(String key, List tagsItem) { if (this.tags == null) { this.tags = new HashMap<>(); @@ -41,22 +56,23 @@ public TagToHosts putTagsItem(String key, List tagsItem) { } /** - * A list of tags to apply to the host. - * + *

A list of tags to apply to the host.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getTags() { + return tags; + } public void setTags(Map> tags) { this.tags = tags; } - /** Return true if this TagToHosts object is equal to o. */ + /** + * Return true if this TagToHosts object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.tags, tagToHosts.tags); } + @Override public int hashCode() { return Objects.hash(tags); @@ -84,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TargetFormatType.java b/src/main/java/com/datadog/api/client/v1/model/TargetFormatType.java index e4082b0a888..b016f3d509e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TargetFormatType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TargetFormatType.java @@ -6,24 +6,45 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * If the target_type of the remapper is attribute, try to cast the value - * to a new specific type. If the cast is not possible, the original type is kept. string - * , integer, or double are the possible types. If the - * target_type is tag, this parameter may not be specified. + *

If the target_type of the remapper is attribute, try to cast the value to a new specific type. + * If the cast is not possible, the original type is kept. string, integer, or double are the possible types. + * If the target_type is tag, this parameter may not be specified.

*/ @JsonSerialize(using = TargetFormatType.TargetFormatTypeSerializer.class) public class TargetFormatType { @@ -33,8 +54,7 @@ public class TargetFormatType { public static final TargetFormatType INTEGER = new TargetFormatType("integer"); public static final TargetFormatType DOUBLE = new TargetFormatType("double"); - private static final Set allowedValues = - new HashSet(Arrays.asList("auto", "string", "integer", "double")); + private static final Set allowedValues = new HashSet(Arrays.asList("auto", "string", "integer", "double")); private String value; @@ -47,19 +67,18 @@ public boolean isValid() { } public static class TargetFormatTypeSerializer extends StdSerializer { - public TargetFormatTypeSerializer(Class t) { - super(t); - } - - public TargetFormatTypeSerializer() { - this(null); - } - - @Override - public void serialize(TargetFormatType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public TargetFormatTypeSerializer(Class t) { + super(t); + } + + public TargetFormatTypeSerializer() { + this(null); + } + + @Override + public void serialize(TargetFormatType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TargetFormatType object is equal to o. */ + /** + * Return true if this TargetFormatType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackground.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackground.java index 72e87beb3d9..a10eebedd40 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackground.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackground.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Set a timeseries on the widget background. */ + +/** + *

Set a timeseries on the widget background.

+ */ @JsonPropertyOrder({ TimeseriesBackground.JSON_PROPERTY_TYPE, TimeseriesBackground.JSON_PROPERTY_YAXIS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesBackground { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private TimeseriesBackgroundType type = TimeseriesBackgroundType.AREA; @@ -32,11 +51,10 @@ public TimeseriesBackground() {} @JsonCreator public TimeseriesBackground( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TimeseriesBackgroundType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)TimeseriesBackgroundType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public TimeseriesBackground type(TimeseriesBackgroundType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -44,23 +62,21 @@ public TimeseriesBackground type(TimeseriesBackgroundType type) { } /** - * Timeseries is made using an area or bars. - * + *

Timeseries is made using an area or bars.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TimeseriesBackgroundType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TimeseriesBackgroundType getType() { + return type; + } public void setType(TimeseriesBackgroundType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public TimeseriesBackground yaxis(WidgetAxis yaxis) { this.yaxis = yaxis; this.unparsed |= yaxis.unparsed; @@ -68,22 +84,23 @@ public TimeseriesBackground yaxis(WidgetAxis yaxis) { } /** - * Axis controls for the widget. - * + *

Axis controls for the widget.

* @return yaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAxis getYaxis() { - return yaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAxis getYaxis() { + return yaxis; + } public void setYaxis(WidgetAxis yaxis) { this.yaxis = yaxis; } - /** Return true if this TimeseriesBackground object is equal to o. */ + /** + * Return true if this TimeseriesBackground object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +110,13 @@ public boolean equals(Object o) { return false; } TimeseriesBackground timeseriesBackground = (TimeseriesBackground) o; - return Objects.equals(this.type, timeseriesBackground.type) - && Objects.equals(this.yaxis, timeseriesBackground.yaxis); + return Objects.equals(this.type, timeseriesBackground.type) && Objects.equals(this.yaxis, timeseriesBackground.yaxis); } + @Override public int hashCode() { - return Objects.hash(type, yaxis); + return Objects.hash(type,yaxis); } @Override @@ -113,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackgroundType.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackgroundType.java index 95a30d4baba..9f992601d99 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackgroundType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesBackgroundType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Timeseries is made using an area or bars. */ +/** + *

Timeseries is made using an area or bars.

+ */ @JsonSerialize(using = TimeseriesBackgroundType.TimeseriesBackgroundTypeSerializer.class) public class TimeseriesBackgroundType { public static final TimeseriesBackgroundType BARS = new TimeseriesBackgroundType("bars"); public static final TimeseriesBackgroundType AREA = new TimeseriesBackgroundType("area"); - private static final Set allowedValues = - new HashSet(Arrays.asList("bars", "area")); + private static final Set allowedValues = new HashSet(Arrays.asList("bars", "area")); private String value; @@ -39,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class TimeseriesBackgroundTypeSerializer - extends StdSerializer { - public TimeseriesBackgroundTypeSerializer(Class t) { - super(t); - } + public static class TimeseriesBackgroundTypeSerializer extends StdSerializer { + public TimeseriesBackgroundTypeSerializer(Class t) { + super(t); + } - public TimeseriesBackgroundTypeSerializer() { - this(null); - } + public TimeseriesBackgroundTypeSerializer() { + this(null); + } - @Override - public void serialize( - TimeseriesBackgroundType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TimeseriesBackgroundType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TimeseriesBackgroundType object is equal to o. */ + /** + * Return true if this TimeseriesBackgroundType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinition.java index bfc79fceb4e..dc23a70f5f4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The timeseries visualization allows you to display the evolution of one or more metrics, log - * events, or Indexed Spans over time. + *

The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time.

*/ @JsonPropertyOrder({ TimeseriesWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -36,10 +50,10 @@ TimeseriesWidgetDefinition.JSON_PROPERTY_TYPE, TimeseriesWidgetDefinition.JSON_PROPERTY_YAXIS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -89,15 +103,12 @@ public TimeseriesWidgetDefinition() {} @JsonCreator public TimeseriesWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - TimeseriesWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)TimeseriesWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public TimeseriesWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -105,7 +116,6 @@ public TimeseriesWidgetDefinition customLinks(List customLinks } return this; } - public TimeseriesWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -116,21 +126,19 @@ public TimeseriesWidgetDefinition addCustomLinksItem(WidgetCustomLink customLink } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public TimeseriesWidgetDefinition events(List events) { this.events = events; for (WidgetEvent item : events) { @@ -138,7 +146,6 @@ public TimeseriesWidgetDefinition events(List events) { } return this; } - public TimeseriesWidgetDefinition addEventsItem(WidgetEvent eventsItem) { if (this.events == null) { this.events = new ArrayList<>(); @@ -149,29 +156,24 @@ public TimeseriesWidgetDefinition addEventsItem(WidgetEvent eventsItem) { } /** - * List of widget events. - * + *

List of widget events.

* @return events - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEvents() { - return events; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } public void setEvents(List events) { this.events = events; } - - public TimeseriesWidgetDefinition legendColumns( - List legendColumns) { + public TimeseriesWidgetDefinition legendColumns(List legendColumns) { this.legendColumns = legendColumns; return this; } - - public TimeseriesWidgetDefinition addLegendColumnsItem( - TimeseriesWidgetLegendColumn legendColumnsItem) { + public TimeseriesWidgetDefinition addLegendColumnsItem(TimeseriesWidgetLegendColumn legendColumnsItem) { if (this.legendColumns == null) { this.legendColumns = new ArrayList<>(); } @@ -181,21 +183,19 @@ public TimeseriesWidgetDefinition addLegendColumnsItem( } /** - * Columns displayed in the legend. - * + *

Columns displayed in the legend.

* @return legendColumns - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND_COLUMNS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLegendColumns() { - return legendColumns; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND_COLUMNS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLegendColumns() { + return legendColumns; + } public void setLegendColumns(List legendColumns) { this.legendColumns = legendColumns; } - public TimeseriesWidgetDefinition legendLayout(TimeseriesWidgetLegendLayout legendLayout) { this.legendLayout = legendLayout; this.unparsed |= !legendLayout.isValid(); @@ -203,45 +203,41 @@ public TimeseriesWidgetDefinition legendLayout(TimeseriesWidgetLegendLayout lege } /** - * Layout of the legend. - * + *

Layout of the legend.

* @return legendLayout - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND_LAYOUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeseriesWidgetLegendLayout getLegendLayout() { - return legendLayout; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND_LAYOUT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TimeseriesWidgetLegendLayout getLegendLayout() { + return legendLayout; + } public void setLegendLayout(TimeseriesWidgetLegendLayout legendLayout) { if (!legendLayout.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.legendLayout = legendLayout; } - public TimeseriesWidgetDefinition legendSize(String legendSize) { this.legendSize = legendSize; return this; } /** - * Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". - * + *

Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto".

* @return legendSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegendSize() { - return legendSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEGEND_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLegendSize() { + return legendSize; + } public void setLegendSize(String legendSize) { this.legendSize = legendSize; } - public TimeseriesWidgetDefinition markers(List markers) { this.markers = markers; for (WidgetMarker item : markers) { @@ -249,7 +245,6 @@ public TimeseriesWidgetDefinition markers(List markers) { } return this; } - public TimeseriesWidgetDefinition addMarkersItem(WidgetMarker markersItem) { if (this.markers == null) { this.markers = new ArrayList<>(); @@ -260,21 +255,19 @@ public TimeseriesWidgetDefinition addMarkersItem(WidgetMarker markersItem) { } /** - * List of markers. - * + *

List of markers.

* @return markers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MARKERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMarkers() { - return markers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MARKERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMarkers() { + return markers; + } public void setMarkers(List markers) { this.markers = markers; } - public TimeseriesWidgetDefinition requests(List requests) { this.requests = requests; for (TimeseriesWidgetRequest item : requests) { @@ -282,7 +275,6 @@ public TimeseriesWidgetDefinition requests(List request } return this; } - public TimeseriesWidgetDefinition addRequestsItem(TimeseriesWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -290,20 +282,18 @@ public TimeseriesWidgetDefinition addRequestsItem(TimeseriesWidgetRequest reques } /** - * List of timeseries widget requests. - * + *

List of timeseries widget requests.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public TimeseriesWidgetDefinition rightYaxis(WidgetAxis rightYaxis) { this.rightYaxis = rightYaxis; this.unparsed |= rightYaxis.unparsed; @@ -311,42 +301,38 @@ public TimeseriesWidgetDefinition rightYaxis(WidgetAxis rightYaxis) { } /** - * Axis controls for the widget. - * + *

Axis controls for the widget.

* @return rightYaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RIGHT_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAxis getRightYaxis() { - return rightYaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RIGHT_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAxis getRightYaxis() { + return rightYaxis; + } public void setRightYaxis(WidgetAxis rightYaxis) { this.rightYaxis = rightYaxis; } - public TimeseriesWidgetDefinition showLegend(Boolean showLegend) { this.showLegend = showLegend; return this; } /** - * (screenboard only) Show the legend for this widget. - * + *

(screenboard only) Show the legend for this widget.

* @return showLegend - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowLegend() { - return showLegend; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_LEGEND) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowLegend() { + return showLegend; + } public void setShowLegend(Boolean showLegend) { this.showLegend = showLegend; } - public TimeseriesWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -354,42 +340,38 @@ public TimeseriesWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public TimeseriesWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public TimeseriesWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -397,45 +379,41 @@ public TimeseriesWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public TimeseriesWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public TimeseriesWidgetDefinition type(TimeseriesWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -443,23 +421,21 @@ public TimeseriesWidgetDefinition type(TimeseriesWidgetDefinitionType type) { } /** - * Type of the timeseries widget. - * + *

Type of the timeseries widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TimeseriesWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TimeseriesWidgetDefinitionType getType() { + return type; + } public void setType(TimeseriesWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public TimeseriesWidgetDefinition yaxis(WidgetAxis yaxis) { this.yaxis = yaxis; this.unparsed |= yaxis.unparsed; @@ -467,22 +443,23 @@ public TimeseriesWidgetDefinition yaxis(WidgetAxis yaxis) { } /** - * Axis controls for the widget. - * + *

Axis controls for the widget.

* @return yaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetAxis getYaxis() { - return yaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetAxis getYaxis() { + return yaxis; + } public void setYaxis(WidgetAxis yaxis) { this.yaxis = yaxis; } - /** Return true if this TimeseriesWidgetDefinition object is equal to o. */ + /** + * Return true if this TimeseriesWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -492,41 +469,13 @@ public boolean equals(Object o) { return false; } TimeseriesWidgetDefinition timeseriesWidgetDefinition = (TimeseriesWidgetDefinition) o; - return Objects.equals(this.customLinks, timeseriesWidgetDefinition.customLinks) - && Objects.equals(this.events, timeseriesWidgetDefinition.events) - && Objects.equals(this.legendColumns, timeseriesWidgetDefinition.legendColumns) - && Objects.equals(this.legendLayout, timeseriesWidgetDefinition.legendLayout) - && Objects.equals(this.legendSize, timeseriesWidgetDefinition.legendSize) - && Objects.equals(this.markers, timeseriesWidgetDefinition.markers) - && Objects.equals(this.requests, timeseriesWidgetDefinition.requests) - && Objects.equals(this.rightYaxis, timeseriesWidgetDefinition.rightYaxis) - && Objects.equals(this.showLegend, timeseriesWidgetDefinition.showLegend) - && Objects.equals(this.time, timeseriesWidgetDefinition.time) - && Objects.equals(this.title, timeseriesWidgetDefinition.title) - && Objects.equals(this.titleAlign, timeseriesWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, timeseriesWidgetDefinition.titleSize) - && Objects.equals(this.type, timeseriesWidgetDefinition.type) - && Objects.equals(this.yaxis, timeseriesWidgetDefinition.yaxis); + return Objects.equals(this.customLinks, timeseriesWidgetDefinition.customLinks) && Objects.equals(this.events, timeseriesWidgetDefinition.events) && Objects.equals(this.legendColumns, timeseriesWidgetDefinition.legendColumns) && Objects.equals(this.legendLayout, timeseriesWidgetDefinition.legendLayout) && Objects.equals(this.legendSize, timeseriesWidgetDefinition.legendSize) && Objects.equals(this.markers, timeseriesWidgetDefinition.markers) && Objects.equals(this.requests, timeseriesWidgetDefinition.requests) && Objects.equals(this.rightYaxis, timeseriesWidgetDefinition.rightYaxis) && Objects.equals(this.showLegend, timeseriesWidgetDefinition.showLegend) && Objects.equals(this.time, timeseriesWidgetDefinition.time) && Objects.equals(this.title, timeseriesWidgetDefinition.title) && Objects.equals(this.titleAlign, timeseriesWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, timeseriesWidgetDefinition.titleSize) && Objects.equals(this.type, timeseriesWidgetDefinition.type) && Objects.equals(this.yaxis, timeseriesWidgetDefinition.yaxis); } + @Override public int hashCode() { - return Objects.hash( - customLinks, - events, - legendColumns, - legendLayout, - legendSize, - markers, - requests, - rightYaxis, - showLegend, - time, - title, - titleAlign, - titleSize, - type, - yaxis); + return Objects.hash(customLinks,events,legendColumns,legendLayout,legendSize,markers,requests,rightYaxis,showLegend,time,title,titleAlign,titleSize,type,yaxis); } @Override @@ -553,7 +502,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinitionType.java index 04412235183..fc479fe96c8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetDefinitionType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the timeseries widget. */ -@JsonSerialize( - using = TimeseriesWidgetDefinitionType.TimeseriesWidgetDefinitionTypeSerializer.class) +/** + *

Type of the timeseries widget.

+ */ +@JsonSerialize(using = TimeseriesWidgetDefinitionType.TimeseriesWidgetDefinitionTypeSerializer.class) public class TimeseriesWidgetDefinitionType { - public static final TimeseriesWidgetDefinitionType TIMESERIES = - new TimeseriesWidgetDefinitionType("timeseries"); + public static final TimeseriesWidgetDefinitionType TIMESERIES = new TimeseriesWidgetDefinitionType("timeseries"); private static final Set allowedValues = new HashSet(Arrays.asList("timeseries")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class TimeseriesWidgetDefinitionTypeSerializer - extends StdSerializer { - public TimeseriesWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class TimeseriesWidgetDefinitionTypeSerializer extends StdSerializer { + public TimeseriesWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public TimeseriesWidgetDefinitionTypeSerializer() { - this(null); - } + public TimeseriesWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - TimeseriesWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TimeseriesWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TimeseriesWidgetDefinitionType object is equal to o. */ + /** + * Return true if this TimeseriesWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetExpressionAlias.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetExpressionAlias.java index 4f4db8a2d69..138807d6a44 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetExpressionAlias.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetExpressionAlias.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Define an expression alias. */ + +/** + *

Define an expression alias.

+ */ @JsonPropertyOrder({ TimeseriesWidgetExpressionAlias.JSON_PROPERTY_ALIAS_NAME, TimeseriesWidgetExpressionAlias.JSON_PROPERTY_EXPRESSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesWidgetExpressionAlias { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALIAS_NAME = "alias_name"; private String aliasName; @@ -32,52 +51,50 @@ public TimeseriesWidgetExpressionAlias() {} @JsonCreator public TimeseriesWidgetExpressionAlias( - @JsonProperty(required = true, value = JSON_PROPERTY_EXPRESSION) String expression) { - this.expression = expression; + @JsonProperty(required=true, value=JSON_PROPERTY_EXPRESSION)String expression) { + this.expression = expression; } - public TimeseriesWidgetExpressionAlias aliasName(String aliasName) { this.aliasName = aliasName; return this; } /** - * Expression alias. - * + *

Expression alias.

* @return aliasName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIAS_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAliasName() { - return aliasName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIAS_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAliasName() { + return aliasName; + } public void setAliasName(String aliasName) { this.aliasName = aliasName; } - public TimeseriesWidgetExpressionAlias expression(String expression) { this.expression = expression; return this; } /** - * Expression name. - * + *

Expression name.

* @return expression - */ - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getExpression() { - return expression; - } - + **/ + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getExpression() { + return expression; + } public void setExpression(String expression) { this.expression = expression; } - /** Return true if this TimeseriesWidgetExpressionAlias object is equal to o. */ + /** + * Return true if this TimeseriesWidgetExpressionAlias object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,15 +103,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TimeseriesWidgetExpressionAlias timeseriesWidgetExpressionAlias = - (TimeseriesWidgetExpressionAlias) o; - return Objects.equals(this.aliasName, timeseriesWidgetExpressionAlias.aliasName) - && Objects.equals(this.expression, timeseriesWidgetExpressionAlias.expression); + TimeseriesWidgetExpressionAlias timeseriesWidgetExpressionAlias = (TimeseriesWidgetExpressionAlias) o; + return Objects.equals(this.aliasName, timeseriesWidgetExpressionAlias.aliasName) && Objects.equals(this.expression, timeseriesWidgetExpressionAlias.expression); } + @Override public int hashCode() { - return Objects.hash(aliasName, expression); + return Objects.hash(aliasName,expression); } @Override @@ -108,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendColumn.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendColumn.java index 006f1fa00eb..8962524e952 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendColumn.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendColumn.java @@ -6,32 +6,54 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Legend column. */ +/** + *

Legend column.

+ */ @JsonSerialize(using = TimeseriesWidgetLegendColumn.TimeseriesWidgetLegendColumnSerializer.class) public class TimeseriesWidgetLegendColumn { - public static final TimeseriesWidgetLegendColumn VALUE = - new TimeseriesWidgetLegendColumn("value"); + public static final TimeseriesWidgetLegendColumn VALUE = new TimeseriesWidgetLegendColumn("value"); public static final TimeseriesWidgetLegendColumn AVG = new TimeseriesWidgetLegendColumn("avg"); public static final TimeseriesWidgetLegendColumn SUM = new TimeseriesWidgetLegendColumn("sum"); public static final TimeseriesWidgetLegendColumn MIN = new TimeseriesWidgetLegendColumn("min"); public static final TimeseriesWidgetLegendColumn MAX = new TimeseriesWidgetLegendColumn("max"); - private static final Set allowedValues = - new HashSet(Arrays.asList("value", "avg", "sum", "min", "max")); + private static final Set allowedValues = new HashSet(Arrays.asList("value", "avg", "sum", "min", "max")); private String value; @@ -43,22 +65,19 @@ public boolean isValid() { this.value = value; } - public static class TimeseriesWidgetLegendColumnSerializer - extends StdSerializer { - public TimeseriesWidgetLegendColumnSerializer(Class t) { - super(t); - } + public static class TimeseriesWidgetLegendColumnSerializer extends StdSerializer { + public TimeseriesWidgetLegendColumnSerializer(Class t) { + super(t); + } - public TimeseriesWidgetLegendColumnSerializer() { - this(null); - } + public TimeseriesWidgetLegendColumnSerializer() { + this(null); + } - @Override - public void serialize( - TimeseriesWidgetLegendColumn value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TimeseriesWidgetLegendColumn value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TimeseriesWidgetLegendColumn object is equal to o. */ + /** + * Return true if this TimeseriesWidgetLegendColumn object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendLayout.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendLayout.java index 78a2e08b64c..fdd0c628bb4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendLayout.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetLegendLayout.java @@ -6,31 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Layout of the legend. */ +/** + *

Layout of the legend.

+ */ @JsonSerialize(using = TimeseriesWidgetLegendLayout.TimeseriesWidgetLegendLayoutSerializer.class) public class TimeseriesWidgetLegendLayout { public static final TimeseriesWidgetLegendLayout AUTO = new TimeseriesWidgetLegendLayout("auto"); - public static final TimeseriesWidgetLegendLayout HORIZONTAL = - new TimeseriesWidgetLegendLayout("horizontal"); - public static final TimeseriesWidgetLegendLayout VERTICAL = - new TimeseriesWidgetLegendLayout("vertical"); + public static final TimeseriesWidgetLegendLayout HORIZONTAL = new TimeseriesWidgetLegendLayout("horizontal"); + public static final TimeseriesWidgetLegendLayout VERTICAL = new TimeseriesWidgetLegendLayout("vertical"); - private static final Set allowedValues = - new HashSet(Arrays.asList("auto", "horizontal", "vertical")); + private static final Set allowedValues = new HashSet(Arrays.asList("auto", "horizontal", "vertical")); private String value; @@ -42,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class TimeseriesWidgetLegendLayoutSerializer - extends StdSerializer { - public TimeseriesWidgetLegendLayoutSerializer(Class t) { - super(t); - } + public static class TimeseriesWidgetLegendLayoutSerializer extends StdSerializer { + public TimeseriesWidgetLegendLayoutSerializer(Class t) { + super(t); + } - public TimeseriesWidgetLegendLayoutSerializer() { - this(null); - } + public TimeseriesWidgetLegendLayoutSerializer() { + this(null); + } - @Override - public void serialize( - TimeseriesWidgetLegendLayout value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TimeseriesWidgetLegendLayout value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TimeseriesWidgetLegendLayout object is equal to o. */ + /** + * Return true if this TimeseriesWidgetLegendLayout object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java index 112c6cfb6a9..8666cab73e7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Updated timeseries widget. */ +/** + *

Updated timeseries widget.

+ */ @JsonPropertyOrder({ TimeseriesWidgetRequest.JSON_PROPERTY_APM_QUERY, TimeseriesWidgetRequest.JSON_PROPERTY_AUDIT_QUERY, @@ -34,10 +52,10 @@ TimeseriesWidgetRequest.JSON_PROPERTY_SECURITY_QUERY, TimeseriesWidgetRequest.JSON_PROPERTY_STYLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -96,21 +114,19 @@ public TimeseriesWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public TimeseriesWidgetRequest auditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; this.unparsed |= auditQuery.unparsed; @@ -118,21 +134,19 @@ public TimeseriesWidgetRequest auditQuery(LogQueryDefinition auditQuery) { } /** - * The log query. - * + *

The log query.

* @return auditQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getAuditQuery() { - return auditQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getAuditQuery() { + return auditQuery; + } public void setAuditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; } - public TimeseriesWidgetRequest displayType(WidgetDisplayType displayType) { this.displayType = displayType; this.unparsed |= !displayType.isValid(); @@ -140,24 +154,22 @@ public TimeseriesWidgetRequest displayType(WidgetDisplayType displayType) { } /** - * Type of display to use for the request. - * + *

Type of display to use for the request.

* @return displayType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetDisplayType getDisplayType() { - return displayType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetDisplayType getDisplayType() { + return displayType; + } public void setDisplayType(WidgetDisplayType displayType) { if (!displayType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.displayType = displayType; } - public TimeseriesWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -165,21 +177,19 @@ public TimeseriesWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public TimeseriesWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -187,7 +197,6 @@ public TimeseriesWidgetRequest formulas(List formulas) { } return this; } - public TimeseriesWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -198,21 +207,19 @@ public TimeseriesWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public TimeseriesWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -220,21 +227,19 @@ public TimeseriesWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public TimeseriesWidgetRequest metadata(List metadata) { this.metadata = metadata; for (TimeseriesWidgetExpressionAlias item : metadata) { @@ -242,7 +247,6 @@ public TimeseriesWidgetRequest metadata(List me } return this; } - public TimeseriesWidgetRequest addMetadataItem(TimeseriesWidgetExpressionAlias metadataItem) { if (this.metadata == null) { this.metadata = new ArrayList<>(); @@ -253,21 +257,19 @@ public TimeseriesWidgetRequest addMetadataItem(TimeseriesWidgetExpressionAlias m } /** - * Used to define expression aliases. - * + *

Used to define expression aliases.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetadata() { + return metadata; + } public void setMetadata(List metadata) { this.metadata = metadata; } - public TimeseriesWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -275,42 +277,38 @@ public TimeseriesWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public TimeseriesWidgetRequest onRightYaxis(Boolean onRightYaxis) { this.onRightYaxis = onRightYaxis; return this; } /** - * Whether or not to display a second y-axis on the right. - * + *

Whether or not to display a second y-axis on the right.

* @return onRightYaxis - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ON_RIGHT_YAXIS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getOnRightYaxis() { - return onRightYaxis; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ON_RIGHT_YAXIS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOnRightYaxis() { + return onRightYaxis; + } public void setOnRightYaxis(Boolean onRightYaxis) { this.onRightYaxis = onRightYaxis; } - public TimeseriesWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -318,21 +316,19 @@ public TimeseriesWidgetRequest processQuery(ProcessQueryDefinition processQuery) } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public TimeseriesWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -340,42 +336,38 @@ public TimeseriesWidgetRequest profileMetricsQuery(LogQueryDefinition profileMet } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public TimeseriesWidgetRequest q(String q) { this.q = q; return this; } /** - * Widget query. - * + *

Widget query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public TimeseriesWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -383,7 +375,6 @@ public TimeseriesWidgetRequest queries(List q } return this; } - public TimeseriesWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -394,21 +385,19 @@ public TimeseriesWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public TimeseriesWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -416,24 +405,22 @@ public TimeseriesWidgetRequest responseFormat(FormulaAndFunctionResponseFormat r } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public TimeseriesWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -441,21 +428,19 @@ public TimeseriesWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public TimeseriesWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -463,21 +448,19 @@ public TimeseriesWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - public TimeseriesWidgetRequest style(WidgetRequestStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -485,22 +468,23 @@ public TimeseriesWidgetRequest style(WidgetRequestStyle style) { } /** - * Define request widget style. - * + *

Define request widget style.

* @return style - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetRequestStyle getStyle() { - return style; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetRequestStyle getStyle() { + return style; + } public void setStyle(WidgetRequestStyle style) { this.style = style; } - /** Return true if this TimeseriesWidgetRequest object is equal to o. */ + /** + * Return true if this TimeseriesWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -510,45 +494,13 @@ public boolean equals(Object o) { return false; } TimeseriesWidgetRequest timeseriesWidgetRequest = (TimeseriesWidgetRequest) o; - return Objects.equals(this.apmQuery, timeseriesWidgetRequest.apmQuery) - && Objects.equals(this.auditQuery, timeseriesWidgetRequest.auditQuery) - && Objects.equals(this.displayType, timeseriesWidgetRequest.displayType) - && Objects.equals(this.eventQuery, timeseriesWidgetRequest.eventQuery) - && Objects.equals(this.formulas, timeseriesWidgetRequest.formulas) - && Objects.equals(this.logQuery, timeseriesWidgetRequest.logQuery) - && Objects.equals(this.metadata, timeseriesWidgetRequest.metadata) - && Objects.equals(this.networkQuery, timeseriesWidgetRequest.networkQuery) - && Objects.equals(this.onRightYaxis, timeseriesWidgetRequest.onRightYaxis) - && Objects.equals(this.processQuery, timeseriesWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, timeseriesWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, timeseriesWidgetRequest.q) - && Objects.equals(this.queries, timeseriesWidgetRequest.queries) - && Objects.equals(this.responseFormat, timeseriesWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, timeseriesWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, timeseriesWidgetRequest.securityQuery) - && Objects.equals(this.style, timeseriesWidgetRequest.style); + return Objects.equals(this.apmQuery, timeseriesWidgetRequest.apmQuery) && Objects.equals(this.auditQuery, timeseriesWidgetRequest.auditQuery) && Objects.equals(this.displayType, timeseriesWidgetRequest.displayType) && Objects.equals(this.eventQuery, timeseriesWidgetRequest.eventQuery) && Objects.equals(this.formulas, timeseriesWidgetRequest.formulas) && Objects.equals(this.logQuery, timeseriesWidgetRequest.logQuery) && Objects.equals(this.metadata, timeseriesWidgetRequest.metadata) && Objects.equals(this.networkQuery, timeseriesWidgetRequest.networkQuery) && Objects.equals(this.onRightYaxis, timeseriesWidgetRequest.onRightYaxis) && Objects.equals(this.processQuery, timeseriesWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, timeseriesWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, timeseriesWidgetRequest.q) && Objects.equals(this.queries, timeseriesWidgetRequest.queries) && Objects.equals(this.responseFormat, timeseriesWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, timeseriesWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, timeseriesWidgetRequest.securityQuery) && Objects.equals(this.style, timeseriesWidgetRequest.style); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - auditQuery, - displayType, - eventQuery, - formulas, - logQuery, - metadata, - networkQuery, - onRightYaxis, - processQuery, - profileMetricsQuery, - q, - queries, - responseFormat, - rumQuery, - securityQuery, - style); + return Objects.hash(apmQuery,auditQuery,displayType,eventQuery,formulas,logQuery,metadata,networkQuery,onRightYaxis,processQuery,profileMetricsQuery,q,queries,responseFormat,rumQuery,securityQuery,style); } @Override @@ -565,9 +517,7 @@ public String toString() { sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" onRightYaxis: ").append(toIndentedString(onRightYaxis)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); @@ -579,7 +529,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinition.java index 64c7627fca7..abe88823f68 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinition.java @@ -6,19 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The top list visualization enables you to display a list of Tag value like hostname or service - * with the most or least of any metric value, such as highest consumers of CPU, hosts with the - * least disk space, etc. + *

The top list visualization enables you to display a list of Tag value like hostname or service with the most or least of any metric value, such as highest consumers of CPU, hosts with the least disk space, etc.

*/ @JsonPropertyOrder({ ToplistWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -29,10 +42,10 @@ ToplistWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, ToplistWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ToplistWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -58,14 +71,12 @@ public ToplistWidgetDefinition() {} @JsonCreator public ToplistWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ToplistWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ToplistWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public ToplistWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -73,7 +84,6 @@ public ToplistWidgetDefinition customLinks(List customLinks) { } return this; } - public ToplistWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -84,21 +94,19 @@ public ToplistWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksIt } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public ToplistWidgetDefinition requests(List requests) { this.requests = requests; for (ToplistWidgetRequest item : requests) { @@ -106,7 +114,6 @@ public ToplistWidgetDefinition requests(List requests) { } return this; } - public ToplistWidgetDefinition addRequestsItem(ToplistWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -114,20 +121,18 @@ public ToplistWidgetDefinition addRequestsItem(ToplistWidgetRequest requestsItem } /** - * List of top list widget requests. - * + *

List of top list widget requests.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public ToplistWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -135,42 +140,38 @@ public ToplistWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public ToplistWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public ToplistWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -178,45 +179,41 @@ public ToplistWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public ToplistWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public ToplistWidgetDefinition type(ToplistWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -224,24 +221,25 @@ public ToplistWidgetDefinition type(ToplistWidgetDefinitionType type) { } /** - * Type of the top list widget. - * + *

Type of the top list widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ToplistWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ToplistWidgetDefinitionType getType() { + return type; + } public void setType(ToplistWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ToplistWidgetDefinition object is equal to o. */ + /** + * Return true if this ToplistWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -251,18 +249,13 @@ public boolean equals(Object o) { return false; } ToplistWidgetDefinition toplistWidgetDefinition = (ToplistWidgetDefinition) o; - return Objects.equals(this.customLinks, toplistWidgetDefinition.customLinks) - && Objects.equals(this.requests, toplistWidgetDefinition.requests) - && Objects.equals(this.time, toplistWidgetDefinition.time) - && Objects.equals(this.title, toplistWidgetDefinition.title) - && Objects.equals(this.titleAlign, toplistWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, toplistWidgetDefinition.titleSize) - && Objects.equals(this.type, toplistWidgetDefinition.type); + return Objects.equals(this.customLinks, toplistWidgetDefinition.customLinks) && Objects.equals(this.requests, toplistWidgetDefinition.requests) && Objects.equals(this.time, toplistWidgetDefinition.time) && Objects.equals(this.title, toplistWidgetDefinition.title) && Objects.equals(this.titleAlign, toplistWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, toplistWidgetDefinition.titleSize) && Objects.equals(this.type, toplistWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(customLinks, requests, time, title, titleAlign, titleSize, type); + return Objects.hash(customLinks,requests,time,title,titleAlign,titleSize,type); } @Override @@ -281,7 +274,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinitionType.java index bbf45205f74..847cf86e14a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the top list widget. */ +/** + *

Type of the top list widget.

+ */ @JsonSerialize(using = ToplistWidgetDefinitionType.ToplistWidgetDefinitionTypeSerializer.class) public class ToplistWidgetDefinitionType { - public static final ToplistWidgetDefinitionType TOPLIST = - new ToplistWidgetDefinitionType("toplist"); + public static final ToplistWidgetDefinitionType TOPLIST = new ToplistWidgetDefinitionType("toplist"); private static final Set allowedValues = new HashSet(Arrays.asList("toplist")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ToplistWidgetDefinitionTypeSerializer - extends StdSerializer { - public ToplistWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class ToplistWidgetDefinitionTypeSerializer extends StdSerializer { + public ToplistWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public ToplistWidgetDefinitionTypeSerializer() { - this(null); - } + public ToplistWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - ToplistWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ToplistWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ToplistWidgetDefinitionType object is equal to o. */ + /** + * Return true if this ToplistWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java index d110668ed7c..4fabd7b6a4e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Updated top list widget. */ + +/** + *

Updated top list widget.

+ */ @JsonPropertyOrder({ ToplistWidgetRequest.JSON_PROPERTY_APM_QUERY, ToplistWidgetRequest.JSON_PROPERTY_AUDIT_QUERY, @@ -32,10 +50,10 @@ ToplistWidgetRequest.JSON_PROPERTY_SECURITY_QUERY, ToplistWidgetRequest.JSON_PROPERTY_STYLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ToplistWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_QUERY = "apm_query"; private LogQueryDefinition apmQuery; @@ -88,21 +106,19 @@ public ToplistWidgetRequest apmQuery(LogQueryDefinition apmQuery) { } /** - * The log query. - * + *

The log query.

* @return apmQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getApmQuery() { - return apmQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getApmQuery() { + return apmQuery; + } public void setApmQuery(LogQueryDefinition apmQuery) { this.apmQuery = apmQuery; } - public ToplistWidgetRequest auditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; this.unparsed |= auditQuery.unparsed; @@ -110,21 +126,19 @@ public ToplistWidgetRequest auditQuery(LogQueryDefinition auditQuery) { } /** - * The log query. - * + *

The log query.

* @return auditQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getAuditQuery() { - return auditQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getAuditQuery() { + return auditQuery; + } public void setAuditQuery(LogQueryDefinition auditQuery) { this.auditQuery = auditQuery; } - public ToplistWidgetRequest conditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; for (WidgetConditionalFormat item : conditionalFormats) { @@ -132,9 +146,7 @@ public ToplistWidgetRequest conditionalFormats(List con } return this; } - - public ToplistWidgetRequest addConditionalFormatsItem( - WidgetConditionalFormat conditionalFormatsItem) { + public ToplistWidgetRequest addConditionalFormatsItem(WidgetConditionalFormat conditionalFormatsItem) { if (this.conditionalFormats == null) { this.conditionalFormats = new ArrayList<>(); } @@ -144,21 +156,19 @@ public ToplistWidgetRequest addConditionalFormatsItem( } /** - * List of conditional formats. - * + *

List of conditional formats.

* @return conditionalFormats - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConditionalFormats() { - return conditionalFormats; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConditionalFormats() { + return conditionalFormats; + } public void setConditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; } - public ToplistWidgetRequest eventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; this.unparsed |= eventQuery.unparsed; @@ -166,21 +176,19 @@ public ToplistWidgetRequest eventQuery(LogQueryDefinition eventQuery) { } /** - * The log query. - * + *

The log query.

* @return eventQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getEventQuery() { - return eventQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getEventQuery() { + return eventQuery; + } public void setEventQuery(LogQueryDefinition eventQuery) { this.eventQuery = eventQuery; } - public ToplistWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -188,7 +196,6 @@ public ToplistWidgetRequest formulas(List formulas) { } return this; } - public ToplistWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -199,21 +206,19 @@ public ToplistWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public ToplistWidgetRequest logQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; this.unparsed |= logQuery.unparsed; @@ -221,21 +226,19 @@ public ToplistWidgetRequest logQuery(LogQueryDefinition logQuery) { } /** - * The log query. - * + *

The log query.

* @return logQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOG_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getLogQuery() { - return logQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getLogQuery() { + return logQuery; + } public void setLogQuery(LogQueryDefinition logQuery) { this.logQuery = logQuery; } - public ToplistWidgetRequest networkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; this.unparsed |= networkQuery.unparsed; @@ -243,21 +246,19 @@ public ToplistWidgetRequest networkQuery(LogQueryDefinition networkQuery) { } /** - * The log query. - * + *

The log query.

* @return networkQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getNetworkQuery() { - return networkQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getNetworkQuery() { + return networkQuery; + } public void setNetworkQuery(LogQueryDefinition networkQuery) { this.networkQuery = networkQuery; } - public ToplistWidgetRequest processQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; this.unparsed |= processQuery.unparsed; @@ -265,21 +266,19 @@ public ToplistWidgetRequest processQuery(ProcessQueryDefinition processQuery) { } /** - * The process query to use in the widget. - * + *

The process query to use in the widget.

* @return processQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessQueryDefinition getProcessQuery() { - return processQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessQueryDefinition getProcessQuery() { + return processQuery; + } public void setProcessQuery(ProcessQueryDefinition processQuery) { this.processQuery = processQuery; } - public ToplistWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; this.unparsed |= profileMetricsQuery.unparsed; @@ -287,42 +286,38 @@ public ToplistWidgetRequest profileMetricsQuery(LogQueryDefinition profileMetric } /** - * The log query. - * + *

The log query.

* @return profileMetricsQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getProfileMetricsQuery() { - return profileMetricsQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE_METRICS_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getProfileMetricsQuery() { + return profileMetricsQuery; + } public void setProfileMetricsQuery(LogQueryDefinition profileMetricsQuery) { this.profileMetricsQuery = profileMetricsQuery; } - public ToplistWidgetRequest q(String q) { this.q = q; return this; } /** - * Widget query. - * + *

Widget query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public ToplistWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -330,7 +325,6 @@ public ToplistWidgetRequest queries(List quer } return this; } - public ToplistWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -341,21 +335,19 @@ public ToplistWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition que } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public ToplistWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -363,24 +355,22 @@ public ToplistWidgetRequest responseFormat(FormulaAndFunctionResponseFormat resp } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - public ToplistWidgetRequest rumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; this.unparsed |= rumQuery.unparsed; @@ -388,21 +378,19 @@ public ToplistWidgetRequest rumQuery(LogQueryDefinition rumQuery) { } /** - * The log query. - * + *

The log query.

* @return rumQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getRumQuery() { - return rumQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getRumQuery() { + return rumQuery; + } public void setRumQuery(LogQueryDefinition rumQuery) { this.rumQuery = rumQuery; } - public ToplistWidgetRequest securityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; this.unparsed |= securityQuery.unparsed; @@ -410,21 +398,19 @@ public ToplistWidgetRequest securityQuery(LogQueryDefinition securityQuery) { } /** - * The log query. - * + *

The log query.

* @return securityQuery - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogQueryDefinition getSecurityQuery() { - return securityQuery; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURITY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogQueryDefinition getSecurityQuery() { + return securityQuery; + } public void setSecurityQuery(LogQueryDefinition securityQuery) { this.securityQuery = securityQuery; } - public ToplistWidgetRequest style(WidgetRequestStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -432,22 +418,23 @@ public ToplistWidgetRequest style(WidgetRequestStyle style) { } /** - * Define request widget style. - * + *

Define request widget style.

* @return style - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetRequestStyle getStyle() { - return style; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetRequestStyle getStyle() { + return style; + } public void setStyle(WidgetRequestStyle style) { this.style = style; } - /** Return true if this ToplistWidgetRequest object is equal to o. */ + /** + * Return true if this ToplistWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -457,41 +444,13 @@ public boolean equals(Object o) { return false; } ToplistWidgetRequest toplistWidgetRequest = (ToplistWidgetRequest) o; - return Objects.equals(this.apmQuery, toplistWidgetRequest.apmQuery) - && Objects.equals(this.auditQuery, toplistWidgetRequest.auditQuery) - && Objects.equals(this.conditionalFormats, toplistWidgetRequest.conditionalFormats) - && Objects.equals(this.eventQuery, toplistWidgetRequest.eventQuery) - && Objects.equals(this.formulas, toplistWidgetRequest.formulas) - && Objects.equals(this.logQuery, toplistWidgetRequest.logQuery) - && Objects.equals(this.networkQuery, toplistWidgetRequest.networkQuery) - && Objects.equals(this.processQuery, toplistWidgetRequest.processQuery) - && Objects.equals(this.profileMetricsQuery, toplistWidgetRequest.profileMetricsQuery) - && Objects.equals(this.q, toplistWidgetRequest.q) - && Objects.equals(this.queries, toplistWidgetRequest.queries) - && Objects.equals(this.responseFormat, toplistWidgetRequest.responseFormat) - && Objects.equals(this.rumQuery, toplistWidgetRequest.rumQuery) - && Objects.equals(this.securityQuery, toplistWidgetRequest.securityQuery) - && Objects.equals(this.style, toplistWidgetRequest.style); + return Objects.equals(this.apmQuery, toplistWidgetRequest.apmQuery) && Objects.equals(this.auditQuery, toplistWidgetRequest.auditQuery) && Objects.equals(this.conditionalFormats, toplistWidgetRequest.conditionalFormats) && Objects.equals(this.eventQuery, toplistWidgetRequest.eventQuery) && Objects.equals(this.formulas, toplistWidgetRequest.formulas) && Objects.equals(this.logQuery, toplistWidgetRequest.logQuery) && Objects.equals(this.networkQuery, toplistWidgetRequest.networkQuery) && Objects.equals(this.processQuery, toplistWidgetRequest.processQuery) && Objects.equals(this.profileMetricsQuery, toplistWidgetRequest.profileMetricsQuery) && Objects.equals(this.q, toplistWidgetRequest.q) && Objects.equals(this.queries, toplistWidgetRequest.queries) && Objects.equals(this.responseFormat, toplistWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, toplistWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, toplistWidgetRequest.securityQuery) && Objects.equals(this.style, toplistWidgetRequest.style); } + @Override public int hashCode() { - return Objects.hash( - apmQuery, - auditQuery, - conditionalFormats, - eventQuery, - formulas, - logQuery, - networkQuery, - processQuery, - profileMetricsQuery, - q, - queries, - responseFormat, - rumQuery, - securityQuery, - style); + return Objects.hash(apmQuery,auditQuery,conditionalFormats,eventQuery,formulas,logQuery,networkQuery,processQuery,profileMetricsQuery,q,queries,responseFormat,rumQuery,securityQuery,style); } @Override @@ -506,9 +465,7 @@ public String toString() { sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" networkQuery: ").append(toIndentedString(networkQuery)).append("\n"); sb.append(" processQuery: ").append(toIndentedString(processQuery)).append("\n"); - sb.append(" profileMetricsQuery: ") - .append(toIndentedString(profileMetricsQuery)) - .append("\n"); + sb.append(" profileMetricsQuery: ").append(toIndentedString(profileMetricsQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); @@ -520,7 +477,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinition.java index db94b7202fb..54b66759b85 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinition.java @@ -6,18 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * This widget displays a topology of nodes and edges for different data sources. It replaces the - * service map widget. + *

This widget displays a topology of nodes and edges for different data sources. It replaces the service map widget.

*/ @JsonPropertyOrder({ TopologyMapWidgetDefinition.JSON_PROPERTY_CUSTOM_LINKS, @@ -27,10 +41,10 @@ TopologyMapWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, TopologyMapWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TopologyMapWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_LINKS = "custom_links"; private List customLinks = null; @@ -53,14 +67,12 @@ public TopologyMapWidgetDefinition() {} @JsonCreator public TopologyMapWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - TopologyMapWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)TopologyMapWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public TopologyMapWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -68,7 +80,6 @@ public TopologyMapWidgetDefinition customLinks(List customLink } return this; } - public TopologyMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -79,21 +90,19 @@ public TopologyMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLin } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public TopologyMapWidgetDefinition requests(List requests) { this.requests = requests; for (TopologyRequest item : requests) { @@ -101,7 +110,6 @@ public TopologyMapWidgetDefinition requests(List requests) { } return this; } - public TopologyMapWidgetDefinition addRequestsItem(TopologyRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -109,41 +117,37 @@ public TopologyMapWidgetDefinition addRequestsItem(TopologyRequest requestsItem) } /** - * One or more Topology requests. - * + *

One or more Topology requests.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public TopologyMapWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public TopologyMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { this.titleAlign = titleAlign; this.unparsed |= !titleAlign.isValid(); @@ -151,45 +155,41 @@ public TopologyMapWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { } /** - * How to align the text on the widget. - * + *

How to align the text on the widget.

* @return titleAlign - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTextAlign getTitleAlign() { - return titleAlign; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } public void setTitleAlign(WidgetTextAlign titleAlign) { if (!titleAlign.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.titleAlign = titleAlign; } - public TopologyMapWidgetDefinition titleSize(String titleSize) { this.titleSize = titleSize; return this; } /** - * Size of the title. - * + *

Size of the title.

* @return titleSize - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitleSize() { - return titleSize; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } public void setTitleSize(String titleSize) { this.titleSize = titleSize; } - public TopologyMapWidgetDefinition type(TopologyMapWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -197,24 +197,25 @@ public TopologyMapWidgetDefinition type(TopologyMapWidgetDefinitionType type) { } /** - * Type of the topology map widget. - * + *

Type of the topology map widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TopologyMapWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TopologyMapWidgetDefinitionType getType() { + return type; + } public void setType(TopologyMapWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this TopologyMapWidgetDefinition object is equal to o. */ + /** + * Return true if this TopologyMapWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -224,17 +225,13 @@ public boolean equals(Object o) { return false; } TopologyMapWidgetDefinition topologyMapWidgetDefinition = (TopologyMapWidgetDefinition) o; - return Objects.equals(this.customLinks, topologyMapWidgetDefinition.customLinks) - && Objects.equals(this.requests, topologyMapWidgetDefinition.requests) - && Objects.equals(this.title, topologyMapWidgetDefinition.title) - && Objects.equals(this.titleAlign, topologyMapWidgetDefinition.titleAlign) - && Objects.equals(this.titleSize, topologyMapWidgetDefinition.titleSize) - && Objects.equals(this.type, topologyMapWidgetDefinition.type); + return Objects.equals(this.customLinks, topologyMapWidgetDefinition.customLinks) && Objects.equals(this.requests, topologyMapWidgetDefinition.requests) && Objects.equals(this.title, topologyMapWidgetDefinition.title) && Objects.equals(this.titleAlign, topologyMapWidgetDefinition.titleAlign) && Objects.equals(this.titleSize, topologyMapWidgetDefinition.titleSize) && Objects.equals(this.type, topologyMapWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(customLinks, requests, title, titleAlign, titleSize, type); + return Objects.hash(customLinks,requests,title,titleAlign,titleSize,type); } @Override @@ -252,7 +249,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinitionType.java index 90f841a1ba9..59eff41d1ba 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TopologyMapWidgetDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the topology map widget. */ -@JsonSerialize( - using = TopologyMapWidgetDefinitionType.TopologyMapWidgetDefinitionTypeSerializer.class) +/** + *

Type of the topology map widget.

+ */ +@JsonSerialize(using = TopologyMapWidgetDefinitionType.TopologyMapWidgetDefinitionTypeSerializer.class) public class TopologyMapWidgetDefinitionType { - public static final TopologyMapWidgetDefinitionType TOPOLOGY_MAP = - new TopologyMapWidgetDefinitionType("topology_map"); + public static final TopologyMapWidgetDefinitionType TOPOLOGY_MAP = new TopologyMapWidgetDefinitionType("topology_map"); - private static final Set allowedValues = - new HashSet(Arrays.asList("topology_map")); + private static final Set allowedValues = new HashSet(Arrays.asList("topology_map")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class TopologyMapWidgetDefinitionTypeSerializer - extends StdSerializer { - public TopologyMapWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class TopologyMapWidgetDefinitionTypeSerializer extends StdSerializer { + public TopologyMapWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public TopologyMapWidgetDefinitionTypeSerializer() { - this(null); - } + public TopologyMapWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - TopologyMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TopologyMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TopologyMapWidgetDefinitionType object is equal to o. */ + /** + * Return true if this TopologyMapWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TopologyQuery.java b/src/main/java/com/datadog/api/client/v1/model/TopologyQuery.java index b40e185d08a..b87dbf2f27c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TopologyQuery.java +++ b/src/main/java/com/datadog/api/client/v1/model/TopologyQuery.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Query to service-based topology data sources like the service map or data streams. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Query to service-based topology data sources like the service map or data streams.

+ */ @JsonPropertyOrder({ TopologyQuery.JSON_PROPERTY_DATA_SOURCE, TopologyQuery.JSON_PROPERTY_FILTERS, TopologyQuery.JSON_PROPERTY_SERVICE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TopologyQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; private TopologyQueryDataSource dataSource; @@ -40,29 +58,26 @@ public TopologyQuery dataSource(TopologyQueryDataSource dataSource) { } /** - * Name of the data source - * + *

Name of the data source

* @return dataSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TopologyQueryDataSource getDataSource() { - return dataSource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TopologyQueryDataSource getDataSource() { + return dataSource; + } public void setDataSource(TopologyQueryDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public TopologyQuery filters(List filters) { this.filters = filters; return this; } - public TopologyQuery addFiltersItem(String filtersItem) { if (this.filters == null) { this.filters = new ArrayList<>(); @@ -72,43 +87,42 @@ public TopologyQuery addFiltersItem(String filtersItem) { } /** - * Your environment and primary tag (or * if enabled for your account). - * + *

Your environment and primary tag (or * if enabled for your account).

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public TopologyQuery service(String service) { this.service = service; return this; } /** - * Name of the service - * + *

Name of the service

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - /** Return true if this TopologyQuery object is equal to o. */ + /** + * Return true if this TopologyQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +132,13 @@ public boolean equals(Object o) { return false; } TopologyQuery topologyQuery = (TopologyQuery) o; - return Objects.equals(this.dataSource, topologyQuery.dataSource) - && Objects.equals(this.filters, topologyQuery.filters) - && Objects.equals(this.service, topologyQuery.service); + return Objects.equals(this.dataSource, topologyQuery.dataSource) && Objects.equals(this.filters, topologyQuery.filters) && Objects.equals(this.service, topologyQuery.service); } + @Override public int hashCode() { - return Objects.hash(dataSource, filters, service); + return Objects.hash(dataSource,filters,service); } @Override @@ -140,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TopologyQueryDataSource.java b/src/main/java/com/datadog/api/client/v1/model/TopologyQueryDataSource.java index 5de0f7de451..dc99d793132 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TopologyQueryDataSource.java +++ b/src/main/java/com/datadog/api/client/v1/model/TopologyQueryDataSource.java @@ -6,30 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Name of the data source */ +/** + *

Name of the data source

+ */ @JsonSerialize(using = TopologyQueryDataSource.TopologyQueryDataSourceSerializer.class) public class TopologyQueryDataSource { - public static final TopologyQueryDataSource DATA_STREAMS = - new TopologyQueryDataSource("data_streams"); - public static final TopologyQueryDataSource SERVICE_MAP = - new TopologyQueryDataSource("service_map"); + public static final TopologyQueryDataSource DATA_STREAMS = new TopologyQueryDataSource("data_streams"); + public static final TopologyQueryDataSource SERVICE_MAP = new TopologyQueryDataSource("service_map"); - private static final Set allowedValues = - new HashSet(Arrays.asList("data_streams", "service_map")); + private static final Set allowedValues = new HashSet(Arrays.asList("data_streams", "service_map")); private String value; @@ -41,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class TopologyQueryDataSourceSerializer - extends StdSerializer { - public TopologyQueryDataSourceSerializer(Class t) { - super(t); - } + public static class TopologyQueryDataSourceSerializer extends StdSerializer { + public TopologyQueryDataSourceSerializer(Class t) { + super(t); + } - public TopologyQueryDataSourceSerializer() { - this(null); - } + public TopologyQueryDataSourceSerializer() { + this(null); + } - @Override - public void serialize( - TopologyQueryDataSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TopologyQueryDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TopologyQueryDataSource object is equal to o. */ + /** + * Return true if this TopologyQueryDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TopologyRequest.java b/src/main/java/com/datadog/api/client/v1/model/TopologyRequest.java index 7d77eaf3581..e470c327bcd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TopologyRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TopologyRequest.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request that will return nodes and edges to be used by topology map. */ + +/** + *

Request that will return nodes and edges to be used by topology map.

+ */ @JsonPropertyOrder({ TopologyRequest.JSON_PROPERTY_QUERY, TopologyRequest.JSON_PROPERTY_REQUEST_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TopologyRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private TopologyQuery query; @@ -34,21 +54,19 @@ public TopologyRequest query(TopologyQuery query) { } /** - * Query to service-based topology data sources like the service map or data streams. - * + *

Query to service-based topology data sources like the service map or data streams.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TopologyQuery getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TopologyQuery getQuery() { + return query; + } public void setQuery(TopologyQuery query) { this.query = query; } - public TopologyRequest requestType(TopologyRequestType requestType) { this.requestType = requestType; this.unparsed |= !requestType.isValid(); @@ -56,25 +74,26 @@ public TopologyRequest requestType(TopologyRequestType requestType) { } /** - * Widget request type. - * + *

Widget request type.

* @return requestType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TopologyRequestType getRequestType() { - return requestType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TopologyRequestType getRequestType() { + return requestType; + } public void setRequestType(TopologyRequestType requestType) { if (!requestType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.requestType = requestType; } - /** Return true if this TopologyRequest object is equal to o. */ + /** + * Return true if this TopologyRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +103,13 @@ public boolean equals(Object o) { return false; } TopologyRequest topologyRequest = (TopologyRequest) o; - return Objects.equals(this.query, topologyRequest.query) - && Objects.equals(this.requestType, topologyRequest.requestType); + return Objects.equals(this.query, topologyRequest.query) && Objects.equals(this.requestType, topologyRequest.requestType); } + @Override public int hashCode() { - return Objects.hash(query, requestType); + return Objects.hash(query,requestType); } @Override @@ -104,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TopologyRequestType.java b/src/main/java/com/datadog/api/client/v1/model/TopologyRequestType.java index 15dca410c8c..3121d2b7a8e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TopologyRequestType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TopologyRequestType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget request type. */ +/** + *

Widget request type.

+ */ @JsonSerialize(using = TopologyRequestType.TopologyRequestTypeSerializer.class) public class TopologyRequestType { @@ -38,20 +62,18 @@ public boolean isValid() { } public static class TopologyRequestTypeSerializer extends StdSerializer { - public TopologyRequestTypeSerializer(Class t) { - super(t); - } - - public TopologyRequestTypeSerializer() { - this(null); - } - - @Override - public void serialize( - TopologyRequestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public TopologyRequestTypeSerializer(Class t) { + super(t); + } + + public TopologyRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize(TopologyRequestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TopologyRequestType object is equal to o. */ + /** + * Return true if this TopologyRequestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapColorBy.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapColorBy.java index de14a4e5088..341a7bd5b16 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapColorBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapColorBy.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** (deprecated) The attribute formerly used to determine color in the widget. */ +/** + *

(deprecated) The attribute formerly used to determine color in the widget.

+ */ @JsonSerialize(using = TreeMapColorBy.TreeMapColorBySerializer.class) public class TreeMapColorBy { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class TreeMapColorBySerializer extends StdSerializer { - public TreeMapColorBySerializer(Class t) { - super(t); - } - - public TreeMapColorBySerializer() { - this(null); - } - - @Override - public void serialize(TreeMapColorBy value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public TreeMapColorBySerializer(Class t) { + super(t); + } + + public TreeMapColorBySerializer() { + this(null); + } + + @Override + public void serialize(TreeMapColorBy value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TreeMapColorBy object is equal to o. */ + /** + * Return true if this TreeMapColorBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapGroupBy.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapGroupBy.java index 1acf6da3705..3cdf5d8fb98 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapGroupBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapGroupBy.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** (deprecated) The attribute formerly used to group elements in the widget. */ +/** + *

(deprecated) The attribute formerly used to group elements in the widget.

+ */ @JsonSerialize(using = TreeMapGroupBy.TreeMapGroupBySerializer.class) public class TreeMapGroupBy { @@ -27,8 +51,7 @@ public class TreeMapGroupBy { public static final TreeMapGroupBy FAMILY = new TreeMapGroupBy("family"); public static final TreeMapGroupBy PROCESS = new TreeMapGroupBy("process"); - private static final Set allowedValues = - new HashSet(Arrays.asList("user", "family", "process")); + private static final Set allowedValues = new HashSet(Arrays.asList("user", "family", "process")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class TreeMapGroupBySerializer extends StdSerializer { - public TreeMapGroupBySerializer(Class t) { - super(t); - } - - public TreeMapGroupBySerializer() { - this(null); - } - - @Override - public void serialize(TreeMapGroupBy value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public TreeMapGroupBySerializer(Class t) { + super(t); + } + + public TreeMapGroupBySerializer() { + this(null); + } + + @Override + public void serialize(TreeMapGroupBy value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TreeMapGroupBy object is equal to o. */ + /** + * Return true if this TreeMapGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapSizeBy.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapSizeBy.java index 65ad9d1de4e..6e751aba0c3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapSizeBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapSizeBy.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** (deprecated) The attribute formerly used to determine size in the widget. */ +/** + *

(deprecated) The attribute formerly used to determine size in the widget.

+ */ @JsonSerialize(using = TreeMapSizeBy.TreeMapSizeBySerializer.class) public class TreeMapSizeBy { public static final TreeMapSizeBy PCT_CPU = new TreeMapSizeBy("pct_cpu"); public static final TreeMapSizeBy PCT_MEM = new TreeMapSizeBy("pct_mem"); - private static final Set allowedValues = - new HashSet(Arrays.asList("pct_cpu", "pct_mem")); + private static final Set allowedValues = new HashSet(Arrays.asList("pct_cpu", "pct_mem")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class TreeMapSizeBySerializer extends StdSerializer { - public TreeMapSizeBySerializer(Class t) { - super(t); - } - - public TreeMapSizeBySerializer() { - this(null); - } - - @Override - public void serialize(TreeMapSizeBy value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public TreeMapSizeBySerializer(Class t) { + super(t); + } + + public TreeMapSizeBySerializer() { + this(null); + } + + @Override + public void serialize(TreeMapSizeBy value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TreeMapSizeBy object is equal to o. */ + /** + * Return true if this TreeMapSizeBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinition.java index 15490d85cc4..e38f1c24879 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinition.java @@ -6,19 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The treemap visualization enables you to display hierarchical and nested data. It is well suited - * for queries that describe part-whole relationships, such as resource usage by availability zone, - * data center, or team. + *

The treemap visualization enables you to display hierarchical and nested data. It is well suited for queries that describe part-whole relationships, such as resource usage by availability zone, data center, or team.

*/ @JsonPropertyOrder({ TreeMapWidgetDefinition.JSON_PROPERTY_COLOR_BY, @@ -30,10 +43,10 @@ TreeMapWidgetDefinition.JSON_PROPERTY_TITLE, TreeMapWidgetDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TreeMapWidgetDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLOR_BY = "color_by"; private TreeMapColorBy colorBy = TreeMapColorBy.USER; @@ -62,14 +75,12 @@ public TreeMapWidgetDefinition() {} @JsonCreator public TreeMapWidgetDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) - List requests, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TreeMapWidgetDefinitionType type) { - this.requests = requests; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_REQUESTS)List requests, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)TreeMapWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); } - public TreeMapWidgetDefinition colorBy(TreeMapColorBy colorBy) { this.colorBy = colorBy; this.unparsed |= !colorBy.isValid(); @@ -77,27 +88,25 @@ public TreeMapWidgetDefinition colorBy(TreeMapColorBy colorBy) { } /** - * (deprecated) The attribute formerly used to determine color in the widget. - * + *

(deprecated) The attribute formerly used to determine color in the widget.

* @return colorBy * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLOR_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TreeMapColorBy getColorBy() { - return colorBy; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TreeMapColorBy getColorBy() { + return colorBy; + } @Deprecated public void setColorBy(TreeMapColorBy colorBy) { if (!colorBy.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.colorBy = colorBy; } - public TreeMapWidgetDefinition customLinks(List customLinks) { this.customLinks = customLinks; for (WidgetCustomLink item : customLinks) { @@ -105,7 +114,6 @@ public TreeMapWidgetDefinition customLinks(List customLinks) { } return this; } - public TreeMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksItem) { if (this.customLinks == null) { this.customLinks = new ArrayList<>(); @@ -116,21 +124,19 @@ public TreeMapWidgetDefinition addCustomLinksItem(WidgetCustomLink customLinksIt } /** - * List of custom links. - * + *

List of custom links.

* @return customLinks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomLinks() { - return customLinks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomLinks() { + return customLinks; + } public void setCustomLinks(List customLinks) { this.customLinks = customLinks; } - public TreeMapWidgetDefinition groupBy(TreeMapGroupBy groupBy) { this.groupBy = groupBy; this.unparsed |= !groupBy.isValid(); @@ -138,27 +144,25 @@ public TreeMapWidgetDefinition groupBy(TreeMapGroupBy groupBy) { } /** - * (deprecated) The attribute formerly used to group elements in the widget. - * + *

(deprecated) The attribute formerly used to group elements in the widget.

* @return groupBy * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TreeMapGroupBy getGroupBy() { - return groupBy; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TreeMapGroupBy getGroupBy() { + return groupBy; + } @Deprecated public void setGroupBy(TreeMapGroupBy groupBy) { if (!groupBy.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.groupBy = groupBy; } - public TreeMapWidgetDefinition requests(List requests) { this.requests = requests; for (TreeMapWidgetRequest item : requests) { @@ -166,7 +170,6 @@ public TreeMapWidgetDefinition requests(List requests) { } return this; } - public TreeMapWidgetDefinition addRequestsItem(TreeMapWidgetRequest requestsItem) { this.requests.add(requestsItem); this.unparsed |= requestsItem.unparsed; @@ -174,20 +177,18 @@ public TreeMapWidgetDefinition addRequestsItem(TreeMapWidgetRequest requestsItem } /** - * List of treemap widget requests. - * + *

List of treemap widget requests.

* @return requests - */ - @JsonProperty(JSON_PROPERTY_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequests() { - return requests; - } - + **/ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } public void setRequests(List requests) { this.requests = requests; } - public TreeMapWidgetDefinition sizeBy(TreeMapSizeBy sizeBy) { this.sizeBy = sizeBy; this.unparsed |= !sizeBy.isValid(); @@ -195,27 +196,25 @@ public TreeMapWidgetDefinition sizeBy(TreeMapSizeBy sizeBy) { } /** - * (deprecated) The attribute formerly used to determine size in the widget. - * + *

(deprecated) The attribute formerly used to determine size in the widget.

* @return sizeBy * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TreeMapSizeBy getSizeBy() { - return sizeBy; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TreeMapSizeBy getSizeBy() { + return sizeBy; + } @Deprecated public void setSizeBy(TreeMapSizeBy sizeBy) { if (!sizeBy.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sizeBy = sizeBy; } - public TreeMapWidgetDefinition time(WidgetTime time) { this.time = time; this.unparsed |= time.unparsed; @@ -223,42 +222,38 @@ public TreeMapWidgetDefinition time(WidgetTime time) { } /** - * Time setting for the widget. - * + *

Time setting for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } public void setTime(WidgetTime time) { this.time = time; } - public TreeMapWidgetDefinition title(String title) { this.title = title; return this; } /** - * Title of your widget. - * + *

Title of your widget.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - public TreeMapWidgetDefinition type(TreeMapWidgetDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -266,24 +261,25 @@ public TreeMapWidgetDefinition type(TreeMapWidgetDefinitionType type) { } /** - * Type of the treemap widget. - * + *

Type of the treemap widget.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TreeMapWidgetDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TreeMapWidgetDefinitionType getType() { + return type; + } public void setType(TreeMapWidgetDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this TreeMapWidgetDefinition object is equal to o. */ + /** + * Return true if this TreeMapWidgetDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -293,19 +289,13 @@ public boolean equals(Object o) { return false; } TreeMapWidgetDefinition treeMapWidgetDefinition = (TreeMapWidgetDefinition) o; - return Objects.equals(this.colorBy, treeMapWidgetDefinition.colorBy) - && Objects.equals(this.customLinks, treeMapWidgetDefinition.customLinks) - && Objects.equals(this.groupBy, treeMapWidgetDefinition.groupBy) - && Objects.equals(this.requests, treeMapWidgetDefinition.requests) - && Objects.equals(this.sizeBy, treeMapWidgetDefinition.sizeBy) - && Objects.equals(this.time, treeMapWidgetDefinition.time) - && Objects.equals(this.title, treeMapWidgetDefinition.title) - && Objects.equals(this.type, treeMapWidgetDefinition.type); + return Objects.equals(this.colorBy, treeMapWidgetDefinition.colorBy) && Objects.equals(this.customLinks, treeMapWidgetDefinition.customLinks) && Objects.equals(this.groupBy, treeMapWidgetDefinition.groupBy) && Objects.equals(this.requests, treeMapWidgetDefinition.requests) && Objects.equals(this.sizeBy, treeMapWidgetDefinition.sizeBy) && Objects.equals(this.time, treeMapWidgetDefinition.time) && Objects.equals(this.title, treeMapWidgetDefinition.title) && Objects.equals(this.type, treeMapWidgetDefinition.type); } + @Override public int hashCode() { - return Objects.hash(colorBy, customLinks, groupBy, requests, sizeBy, time, title, type); + return Objects.hash(colorBy,customLinks,groupBy,requests,sizeBy,time,title,type); } @Override @@ -325,7 +315,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinitionType.java index 2bc6049a442..f8cb5cae00a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetDefinitionType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the treemap widget. */ +/** + *

Type of the treemap widget.

+ */ @JsonSerialize(using = TreeMapWidgetDefinitionType.TreeMapWidgetDefinitionTypeSerializer.class) public class TreeMapWidgetDefinitionType { - public static final TreeMapWidgetDefinitionType TREEMAP = - new TreeMapWidgetDefinitionType("treemap"); + public static final TreeMapWidgetDefinitionType TREEMAP = new TreeMapWidgetDefinitionType("treemap"); private static final Set allowedValues = new HashSet(Arrays.asList("treemap")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class TreeMapWidgetDefinitionTypeSerializer - extends StdSerializer { - public TreeMapWidgetDefinitionTypeSerializer(Class t) { - super(t); - } + public static class TreeMapWidgetDefinitionTypeSerializer extends StdSerializer { + public TreeMapWidgetDefinitionTypeSerializer(Class t) { + super(t); + } - public TreeMapWidgetDefinitionTypeSerializer() { - this(null); - } + public TreeMapWidgetDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - TreeMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TreeMapWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TreeMapWidgetDefinitionType object is equal to o. */ + /** + * Return true if this TreeMapWidgetDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java index cd8164b027a..7d1954eda64 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** An updated treemap widget. */ + +/** + *

An updated treemap widget.

+ */ @JsonPropertyOrder({ TreeMapWidgetRequest.JSON_PROPERTY_FORMULAS, TreeMapWidgetRequest.JSON_PROPERTY_Q, TreeMapWidgetRequest.JSON_PROPERTY_QUERIES, TreeMapWidgetRequest.JSON_PROPERTY_RESPONSE_FORMAT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TreeMapWidgetRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -44,7 +62,6 @@ public TreeMapWidgetRequest formulas(List formulas) { } return this; } - public TreeMapWidgetRequest addFormulasItem(WidgetFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -55,42 +72,38 @@ public TreeMapWidgetRequest addFormulasItem(WidgetFormula formulasItem) { } /** - * List of formulas that operate on queries. - * + *

List of formulas that operate on queries.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public TreeMapWidgetRequest q(String q) { this.q = q; return this; } /** - * The widget metrics query. - * + *

The widget metrics query.

* @return q - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQ() { - return q; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public TreeMapWidgetRequest queries(List queries) { this.queries = queries; for (FormulaAndFunctionQueryDefinition item : queries) { @@ -98,7 +111,6 @@ public TreeMapWidgetRequest queries(List quer } return this; } - public TreeMapWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); @@ -109,21 +121,19 @@ public TreeMapWidgetRequest addQueriesItem(FormulaAndFunctionQueryDefinition que } /** - * List of queries that can be returned directly or used in formulas. - * + *

List of queries that can be returned directly or used in formulas.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public TreeMapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -131,25 +141,26 @@ public TreeMapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat resp } /** - * Timeseries or Scalar response. - * + *

Timeseries or Scalar response.

* @return responseFormat - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaAndFunctionResponseFormat getResponseFormat() { - return responseFormat; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionResponseFormat getResponseFormat() { + return responseFormat; + } public void setResponseFormat(FormulaAndFunctionResponseFormat responseFormat) { if (!responseFormat.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.responseFormat = responseFormat; } - /** Return true if this TreeMapWidgetRequest object is equal to o. */ + /** + * Return true if this TreeMapWidgetRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -159,15 +170,13 @@ public boolean equals(Object o) { return false; } TreeMapWidgetRequest treeMapWidgetRequest = (TreeMapWidgetRequest) o; - return Objects.equals(this.formulas, treeMapWidgetRequest.formulas) - && Objects.equals(this.q, treeMapWidgetRequest.q) - && Objects.equals(this.queries, treeMapWidgetRequest.queries) - && Objects.equals(this.responseFormat, treeMapWidgetRequest.responseFormat); + return Objects.equals(this.formulas, treeMapWidgetRequest.formulas) && Objects.equals(this.q, treeMapWidgetRequest.q) && Objects.equals(this.queries, treeMapWidgetRequest.queries) && Objects.equals(this.responseFormat, treeMapWidgetRequest.responseFormat); } + @Override public int hashCode() { - return Objects.hash(formulas, q, queries, responseFormat); + return Objects.hash(formulas,q,queries,responseFormat); } @Override @@ -183,7 +192,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsHour.java index 17bb41a8d5f..4bf4ebdb2c0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsHour.java @@ -6,31 +6,47 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The number of analyzed logs for each hour for a given organization. */ + +/** + *

The number of analyzed logs for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageAnalyzedLogsHour.JSON_PROPERTY_ANALYZED_LOGS, UsageAnalyzedLogsHour.JSON_PROPERTY_HOUR, UsageAnalyzedLogsHour.JSON_PROPERTY_ORG_NAME, UsageAnalyzedLogsHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAnalyzedLogsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ANALYZED_LOGS = "analyzed_logs"; private Long analyzedLogs; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageAnalyzedLogsHour analyzedLogs(Long analyzedLogs) { } /** - * Contains the number of analyzed logs. - * + *

Contains the number of analyzed logs.

* @return analyzedLogs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANALYZED_LOGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAnalyzedLogs() { - return analyzedLogs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANALYZED_LOGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAnalyzedLogs() { + return analyzedLogs; + } public void setAnalyzedLogs(Long analyzedLogs) { this.analyzedLogs = analyzedLogs; } - public UsageAnalyzedLogsHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageAnalyzedLogsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageAnalyzedLogsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageAnalyzedLogsHour object is equal to o. */ + /** + * Return true if this UsageAnalyzedLogsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageAnalyzedLogsHour usageAnalyzedLogsHour = (UsageAnalyzedLogsHour) o; - return Objects.equals(this.analyzedLogs, usageAnalyzedLogsHour.analyzedLogs) - && Objects.equals(this.hour, usageAnalyzedLogsHour.hour) - && Objects.equals(this.orgName, usageAnalyzedLogsHour.orgName) - && Objects.equals(this.publicId, usageAnalyzedLogsHour.publicId); + return Objects.equals(this.analyzedLogs, usageAnalyzedLogsHour.analyzedLogs) && Objects.equals(this.hour, usageAnalyzedLogsHour.hour) && Objects.equals(this.orgName, usageAnalyzedLogsHour.orgName) && Objects.equals(this.publicId, usageAnalyzedLogsHour.publicId); } + @Override public int hashCode() { - return Objects.hash(analyzedLogs, hour, orgName, publicId); + return Objects.hash(analyzedLogs,hour,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsResponse.java index 0a5cad36d7d..867d7014bf5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAnalyzedLogsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A response containing the number of analyzed logs for each hour for a given organization. */ -@JsonPropertyOrder({UsageAnalyzedLogsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

A response containing the number of analyzed logs for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageAnalyzedLogsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAnalyzedLogsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageAnalyzedLogsResponse usage(List usage) { } return this; } - public UsageAnalyzedLogsResponse addUsageItem(UsageAnalyzedLogsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageAnalyzedLogsResponse addUsageItem(UsageAnalyzedLogsHour usageItem) { } /** - * Get hourly usage for analyzed logs. - * + *

Get hourly usage for analyzed logs.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageAnalyzedLogsResponse object is equal to o. */ + /** + * Return true if this UsageAnalyzedLogsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageAnalyzedLogsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionAggregatesBody.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionAggregatesBody.java index b1141328991..81421fa871f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionAggregatesBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionAggregatesBody.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The object containing the aggregates. */ + +/** + *

The object containing the aggregates.

+ */ @JsonPropertyOrder({ UsageAttributionAggregatesBody.JSON_PROPERTY_AGG_TYPE, UsageAttributionAggregatesBody.JSON_PROPERTY_FIELD, UsageAttributionAggregatesBody.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributionAggregatesBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGG_TYPE = "agg_type"; private String aggType; @@ -37,64 +57,61 @@ public UsageAttributionAggregatesBody aggType(String aggType) { } /** - * The aggregate type. - * + *

The aggregate type.

* @return aggType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGG_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAggType() { - return aggType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGG_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAggType() { + return aggType; + } public void setAggType(String aggType) { this.aggType = aggType; } - public UsageAttributionAggregatesBody field(String field) { this.field = field; return this; } /** - * The field. - * + *

The field.

* @return field - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getField() { - return field; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } public void setField(String field) { this.field = field; } - public UsageAttributionAggregatesBody value(Double value) { this.value = value; return this; } /** - * The value for a given field. - * + *

The value for a given field.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this UsageAttributionAggregatesBody object is equal to o. */ + /** + * Return true if this UsageAttributionAggregatesBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,16 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageAttributionAggregatesBody usageAttributionAggregatesBody = - (UsageAttributionAggregatesBody) o; - return Objects.equals(this.aggType, usageAttributionAggregatesBody.aggType) - && Objects.equals(this.field, usageAttributionAggregatesBody.field) - && Objects.equals(this.value, usageAttributionAggregatesBody.value); + UsageAttributionAggregatesBody usageAttributionAggregatesBody = (UsageAttributionAggregatesBody) o; + return Objects.equals(this.aggType, usageAttributionAggregatesBody.aggType) && Objects.equals(this.field, usageAttributionAggregatesBody.field) && Objects.equals(this.value, usageAttributionAggregatesBody.value); } + @Override public int hashCode() { - return Objects.hash(aggType, field, value); + return Objects.hash(aggType,field,value); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionBody.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionBody.java index 3b244f8eec1..61e3d246b88 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionBody.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Usage Summary by tag for a given organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Usage Summary by tag for a given organization.

+ */ @JsonPropertyOrder({ UsageAttributionBody.JSON_PROPERTY_MONTH, UsageAttributionBody.JSON_PROPERTY_ORG_NAME, @@ -28,12 +42,11 @@ UsageAttributionBody.JSON_PROPERTY_UPDATED_AT, UsageAttributionBody.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributionBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MONTH = "month"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime month; @@ -61,92 +74,80 @@ public UsageAttributionBody month(OffsetDateTime month) { } /** - * Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]. - * + *

Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].

* @return month - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getMonth() { - return month; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getMonth() { + return month; + } public void setMonth(OffsetDateTime month) { this.month = month; } - public UsageAttributionBody orgName(String orgName) { this.orgName = orgName; return this; } /** - * The name of the organization. - * + *

The name of the organization.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageAttributionBody publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageAttributionBody tagConfigSource(String tagConfigSource) { this.tagConfigSource = tagConfigSource; return this; } /** - * The source of the usage attribution tag configuration and the selected tags in the format - * - * <source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3> - * . - * + *

The source of the usage attribution tag configuration and the selected tags in the format <source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3>.

* @return tagConfigSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_CONFIG_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagConfigSource() { - return tagConfigSource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_CONFIG_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagConfigSource() { + return tagConfigSource; + } public void setTagConfigSource(String tagConfigSource) { this.tagConfigSource = tagConfigSource; } - public UsageAttributionBody tags(Map> tags) { this.tags = tags; return this; } - public UsageAttributionBody putTagsItem(String key, List tagsItem) { if (this.tags == null) { this.tags = new HashMap<>(); @@ -156,49 +157,41 @@ public UsageAttributionBody putTagsItem(String key, List tagsItem) { } /** - * Tag keys and values. - * - *

A null value here means that the requested tag breakdown cannot be applied - * because it does not match the tags - * configured for usage attribution. In this scenario the API returns the total usage, not - * broken down by tags. - * + *

Tag keys and values.

+ *

A null value here means that the requested tag breakdown cannot be applied because it does not match the tags + * configured for usage attribution. + * In this scenario the API returns the total usage, not broken down by tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map> getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map> getTags() { + return tags; + } public void setTags(Map> tags) { this.tags = tags; } - public UsageAttributionBody updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Shows the the most recent hour in the current months for all organizations for which all usages - * were calculated. - * + *

Shows the the most recent hour in the current months for all organizations for which all usages were calculated.

* @return updatedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUpdatedAt() { - return updatedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } - public UsageAttributionBody values(UsageAttributionValues values) { this.values = values; this.unparsed |= values.unparsed; @@ -206,22 +199,23 @@ public UsageAttributionBody values(UsageAttributionValues values) { } /** - * Fields in Usage Summary by tag(s). - * + *

Fields in Usage Summary by tag(s).

* @return values - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageAttributionValues getValues() { - return values; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageAttributionValues getValues() { + return values; + } public void setValues(UsageAttributionValues values) { this.values = values; } - /** Return true if this UsageAttributionBody object is equal to o. */ + /** + * Return true if this UsageAttributionBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -231,18 +225,13 @@ public boolean equals(Object o) { return false; } UsageAttributionBody usageAttributionBody = (UsageAttributionBody) o; - return Objects.equals(this.month, usageAttributionBody.month) - && Objects.equals(this.orgName, usageAttributionBody.orgName) - && Objects.equals(this.publicId, usageAttributionBody.publicId) - && Objects.equals(this.tagConfigSource, usageAttributionBody.tagConfigSource) - && Objects.equals(this.tags, usageAttributionBody.tags) - && Objects.equals(this.updatedAt, usageAttributionBody.updatedAt) - && Objects.equals(this.values, usageAttributionBody.values); + return Objects.equals(this.month, usageAttributionBody.month) && Objects.equals(this.orgName, usageAttributionBody.orgName) && Objects.equals(this.publicId, usageAttributionBody.publicId) && Objects.equals(this.tagConfigSource, usageAttributionBody.tagConfigSource) && Objects.equals(this.tags, usageAttributionBody.tags) && Objects.equals(this.updatedAt, usageAttributionBody.updatedAt) && Objects.equals(this.values, usageAttributionBody.values); } + @Override public int hashCode() { - return Objects.hash(month, orgName, publicId, tagConfigSource, tags, updatedAt, values); + return Objects.hash(month,orgName,publicId,tagConfigSource,tags,updatedAt,values); } @Override @@ -261,7 +250,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionMetadata.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionMetadata.java index a01c65c52d0..b4863d89733 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionMetadata.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object containing document metadata. */ +/** + *

The object containing document metadata.

+ */ @JsonPropertyOrder({ UsageAttributionMetadata.JSON_PROPERTY_AGGREGATES, UsageAttributionMetadata.JSON_PROPERTY_PAGINATION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributionMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATES = "aggregates"; private List aggregates = null; @@ -36,7 +54,6 @@ public UsageAttributionMetadata aggregates(List } return this; } - public UsageAttributionMetadata addAggregatesItem(UsageAttributionAggregatesBody aggregatesItem) { if (this.aggregates == null) { this.aggregates = new ArrayList<>(); @@ -47,21 +64,19 @@ public UsageAttributionMetadata addAggregatesItem(UsageAttributionAggregatesBody } /** - * An array of available aggregates. - * + *

An array of available aggregates.

* @return aggregates - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAggregates() { - return aggregates; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAggregates() { + return aggregates; + } public void setAggregates(List aggregates) { this.aggregates = aggregates; } - public UsageAttributionMetadata pagination(UsageAttributionPagination pagination) { this.pagination = pagination; this.unparsed |= pagination.unparsed; @@ -69,22 +84,23 @@ public UsageAttributionMetadata pagination(UsageAttributionPagination pagination } /** - * The metadata for the current pagination. - * + *

The metadata for the current pagination.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageAttributionPagination getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageAttributionPagination getPagination() { + return pagination; + } public void setPagination(UsageAttributionPagination pagination) { this.pagination = pagination; } - /** Return true if this UsageAttributionMetadata object is equal to o. */ + /** + * Return true if this UsageAttributionMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } UsageAttributionMetadata usageAttributionMetadata = (UsageAttributionMetadata) o; - return Objects.equals(this.aggregates, usageAttributionMetadata.aggregates) - && Objects.equals(this.pagination, usageAttributionMetadata.pagination); + return Objects.equals(this.aggregates, usageAttributionMetadata.aggregates) && Objects.equals(this.pagination, usageAttributionMetadata.pagination); } + @Override public int hashCode() { - return Objects.hash(aggregates, pagination); + return Objects.hash(aggregates,pagination); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionPagination.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionPagination.java index a8aad56fa54..8b1b883e6e4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionPagination.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionPagination.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The metadata for the current pagination. */ +/** + *

The metadata for the current pagination.

+ */ @JsonPropertyOrder({ UsageAttributionPagination.JSON_PROPERTY_LIMIT, UsageAttributionPagination.JSON_PROPERTY_OFFSET, @@ -20,10 +40,10 @@ UsageAttributionPagination.JSON_PROPERTY_SORT_NAME, UsageAttributionPagination.JSON_PROPERTY_TOTAL_NUMBER_OF_RECORDS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributionPagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LIMIT = "limit"; private Long limit; @@ -45,106 +65,99 @@ public UsageAttributionPagination limit(Long limit) { } /** - * Maximum amount of records to be returned. - * + *

Maximum amount of records to be returned.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public UsageAttributionPagination offset(Long offset) { this.offset = offset; return this; } /** - * Records to be skipped before beginning to return. - * + *

Records to be skipped before beginning to return.

* @return offset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOffset() { - return offset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOffset() { + return offset; + } public void setOffset(Long offset) { this.offset = offset; } - public UsageAttributionPagination sortDirection(String sortDirection) { this.sortDirection = sortDirection; return this; } /** - * Direction to sort by. - * + *

Direction to sort by.

* @return sortDirection - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT_DIRECTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSortDirection() { - return sortDirection; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT_DIRECTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSortDirection() { + return sortDirection; + } public void setSortDirection(String sortDirection) { this.sortDirection = sortDirection; } - public UsageAttributionPagination sortName(String sortName) { this.sortName = sortName; return this; } /** - * Field to sort by. - * + *

Field to sort by.

* @return sortName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSortName() { - return sortName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSortName() { + return sortName; + } public void setSortName(String sortName) { this.sortName = sortName; } - public UsageAttributionPagination totalNumberOfRecords(Long totalNumberOfRecords) { this.totalNumberOfRecords = totalNumberOfRecords; return this; } /** - * Total number of records. - * + *

Total number of records.

* @return totalNumberOfRecords - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_RECORDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalNumberOfRecords() { - return totalNumberOfRecords; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_RECORDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalNumberOfRecords() { + return totalNumberOfRecords; + } public void setTotalNumberOfRecords(Long totalNumberOfRecords) { this.totalNumberOfRecords = totalNumberOfRecords; } - /** Return true if this UsageAttributionPagination object is equal to o. */ + /** + * Return true if this UsageAttributionPagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -154,17 +167,13 @@ public boolean equals(Object o) { return false; } UsageAttributionPagination usageAttributionPagination = (UsageAttributionPagination) o; - return Objects.equals(this.limit, usageAttributionPagination.limit) - && Objects.equals(this.offset, usageAttributionPagination.offset) - && Objects.equals(this.sortDirection, usageAttributionPagination.sortDirection) - && Objects.equals(this.sortName, usageAttributionPagination.sortName) - && Objects.equals( - this.totalNumberOfRecords, usageAttributionPagination.totalNumberOfRecords); + return Objects.equals(this.limit, usageAttributionPagination.limit) && Objects.equals(this.offset, usageAttributionPagination.offset) && Objects.equals(this.sortDirection, usageAttributionPagination.sortDirection) && Objects.equals(this.sortName, usageAttributionPagination.sortName) && Objects.equals(this.totalNumberOfRecords, usageAttributionPagination.totalNumberOfRecords); } + @Override public int hashCode() { - return Objects.hash(limit, offset, sortDirection, sortName, totalNumberOfRecords); + return Objects.hash(limit,offset,sortDirection,sortName,totalNumberOfRecords); } @Override @@ -175,15 +184,14 @@ public String toString() { sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); sb.append(" sortDirection: ").append(toIndentedString(sortDirection)).append("\n"); sb.append(" sortName: ").append(toIndentedString(sortName)).append("\n"); - sb.append(" totalNumberOfRecords: ") - .append(toIndentedString(totalNumberOfRecords)) - .append("\n"); + sb.append(" totalNumberOfRecords: ").append(toIndentedString(totalNumberOfRecords)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionResponse.java index 479edfbce48..ad861ffb017 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the Usage Summary by tag(s). */ +/** + *

Response containing the Usage Summary by tag(s).

+ */ @JsonPropertyOrder({ UsageAttributionResponse.JSON_PROPERTY_METADATA, UsageAttributionResponse.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributionResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METADATA = "metadata"; private UsageAttributionMetadata metadata; @@ -36,21 +54,19 @@ public UsageAttributionResponse metadata(UsageAttributionMetadata metadata) { } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageAttributionMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageAttributionMetadata getMetadata() { + return metadata; + } public void setMetadata(UsageAttributionMetadata metadata) { this.metadata = metadata; } - public UsageAttributionResponse usage(List usage) { this.usage = usage; for (UsageAttributionBody item : usage) { @@ -58,7 +74,6 @@ public UsageAttributionResponse usage(List usage) { } return this; } - public UsageAttributionResponse addUsageItem(UsageAttributionBody usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -69,22 +84,23 @@ public UsageAttributionResponse addUsageItem(UsageAttributionBody usageItem) { } /** - * Get usage summary by tag(s). - * + *

Get usage summary by tag(s).

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageAttributionResponse object is equal to o. */ + /** + * Return true if this UsageAttributionResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } UsageAttributionResponse usageAttributionResponse = (UsageAttributionResponse) o; - return Objects.equals(this.metadata, usageAttributionResponse.metadata) - && Objects.equals(this.usage, usageAttributionResponse.usage); + return Objects.equals(this.metadata, usageAttributionResponse.metadata) && Objects.equals(this.usage, usageAttributionResponse.usage); } + @Override public int hashCode() { - return Objects.hash(metadata, usage); + return Objects.hash(metadata,usage); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSort.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSort.java index ae3b2bf66e5..01b60d9aee4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSort.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSort.java @@ -6,132 +6,85 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The field to sort by. */ +/** + *

The field to sort by.

+ */ @JsonSerialize(using = UsageAttributionSort.UsageAttributionSortSerializer.class) public class UsageAttributionSort { - public static final UsageAttributionSort API_PERCENTAGE = - new UsageAttributionSort("api_percentage"); + public static final UsageAttributionSort API_PERCENTAGE = new UsageAttributionSort("api_percentage"); public static final UsageAttributionSort SNMP_USAGE = new UsageAttributionSort("snmp_usage"); - public static final UsageAttributionSort APM_HOST_USAGE = - new UsageAttributionSort("apm_host_usage"); + public static final UsageAttributionSort APM_HOST_USAGE = new UsageAttributionSort("apm_host_usage"); public static final UsageAttributionSort API_USAGE = new UsageAttributionSort("api_usage"); public static final UsageAttributionSort APPSEC_USAGE = new UsageAttributionSort("appsec_usage"); - public static final UsageAttributionSort APPSEC_PERCENTAGE = - new UsageAttributionSort("appsec_percentage"); - public static final UsageAttributionSort CONTAINER_USAGE = - new UsageAttributionSort("container_usage"); - public static final UsageAttributionSort CUSTOM_TIMESERIES_PERCENTAGE = - new UsageAttributionSort("custom_timeseries_percentage"); - public static final UsageAttributionSort CONTAINER_PERCENTAGE = - new UsageAttributionSort("container_percentage"); - public static final UsageAttributionSort APM_HOST_PERCENTAGE = - new UsageAttributionSort("apm_host_percentage"); - public static final UsageAttributionSort NPM_HOST_PERCENTAGE = - new UsageAttributionSort("npm_host_percentage"); - public static final UsageAttributionSort BROWSER_PERCENTAGE = - new UsageAttributionSort("browser_percentage"); - public static final UsageAttributionSort BROWSER_USAGE = - new UsageAttributionSort("browser_usage"); - public static final UsageAttributionSort INFRA_HOST_PERCENTAGE = - new UsageAttributionSort("infra_host_percentage"); - public static final UsageAttributionSort SNMP_PERCENTAGE = - new UsageAttributionSort("snmp_percentage"); - public static final UsageAttributionSort NPM_HOST_USAGE = - new UsageAttributionSort("npm_host_usage"); - public static final UsageAttributionSort INFRA_HOST_USAGE = - new UsageAttributionSort("infra_host_usage"); - public static final UsageAttributionSort CUSTOM_TIMESERIES_USAGE = - new UsageAttributionSort("custom_timeseries_usage"); - public static final UsageAttributionSort LAMBDA_FUNCTIONS_USAGE = - new UsageAttributionSort("lambda_functions_usage"); - public static final UsageAttributionSort LAMBDA_FUNCTIONS_PERCENTAGE = - new UsageAttributionSort("lambda_functions_percentage"); - public static final UsageAttributionSort LAMBDA_INVOCATIONS_USAGE = - new UsageAttributionSort("lambda_invocations_usage"); - public static final UsageAttributionSort LAMBDA_INVOCATIONS_PERCENTAGE = - new UsageAttributionSort("lambda_invocations_percentage"); - public static final UsageAttributionSort ESTIMATED_INDEXED_LOGS_USAGE = - new UsageAttributionSort("estimated_indexed_logs_usage"); - public static final UsageAttributionSort ESTIMATED_INDEXED_LOGS_PERCENTAGE = - new UsageAttributionSort("estimated_indexed_logs_percentage"); - public static final UsageAttributionSort ESTIMATED_INGESTED_LOGS_USAGE = - new UsageAttributionSort("estimated_ingested_logs_usage"); - public static final UsageAttributionSort ESTIMATED_INGESTED_LOGS_PERCENTAGE = - new UsageAttributionSort("estimated_ingested_logs_percentage"); - public static final UsageAttributionSort ESTIMATED_INDEXED_SPANS_USAGE = - new UsageAttributionSort("estimated_indexed_spans_usage"); - public static final UsageAttributionSort ESTIMATED_INDEXED_SPANS_PERCENTAGE = - new UsageAttributionSort("estimated_indexed_spans_percentage"); - public static final UsageAttributionSort ESTIMATED_INGESTED_SPANS_USAGE = - new UsageAttributionSort("estimated_ingested_spans_usage"); - public static final UsageAttributionSort ESTIMATED_INGESTED_SPANS_PERCENTAGE = - new UsageAttributionSort("estimated_ingested_spans_percentage"); - public static final UsageAttributionSort APM_FARGATE_USAGE = - new UsageAttributionSort("apm_fargate_usage"); - public static final UsageAttributionSort APM_FARGATE_PERCENTAGE = - new UsageAttributionSort("apm_fargate_percentage"); - public static final UsageAttributionSort APPSEC_FARGATE_USAGE = - new UsageAttributionSort("appsec_fargate_usage"); - public static final UsageAttributionSort APPSEC_FARGATE_PERCENTAGE = - new UsageAttributionSort("appsec_fargate_percentage"); - public static final UsageAttributionSort ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE = - new UsageAttributionSort("estimated_rum_usage_attribution_usage"); - public static final UsageAttributionSort ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE = - new UsageAttributionSort("estimated_rum_usage_attribution_percentage"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "api_percentage", - "snmp_usage", - "apm_host_usage", - "api_usage", - "appsec_usage", - "appsec_percentage", - "container_usage", - "custom_timeseries_percentage", - "container_percentage", - "apm_host_percentage", - "npm_host_percentage", - "browser_percentage", - "browser_usage", - "infra_host_percentage", - "snmp_percentage", - "npm_host_usage", - "infra_host_usage", - "custom_timeseries_usage", - "lambda_functions_usage", - "lambda_functions_percentage", - "lambda_invocations_usage", - "lambda_invocations_percentage", - "estimated_indexed_logs_usage", - "estimated_indexed_logs_percentage", - "estimated_ingested_logs_usage", - "estimated_ingested_logs_percentage", - "estimated_indexed_spans_usage", - "estimated_indexed_spans_percentage", - "estimated_ingested_spans_usage", - "estimated_ingested_spans_percentage", - "apm_fargate_usage", - "apm_fargate_percentage", - "appsec_fargate_usage", - "appsec_fargate_percentage", - "estimated_rum_usage_attribution_usage", - "estimated_rum_usage_attribution_percentage")); + public static final UsageAttributionSort APPSEC_PERCENTAGE = new UsageAttributionSort("appsec_percentage"); + public static final UsageAttributionSort CONTAINER_USAGE = new UsageAttributionSort("container_usage"); + public static final UsageAttributionSort CUSTOM_TIMESERIES_PERCENTAGE = new UsageAttributionSort("custom_timeseries_percentage"); + public static final UsageAttributionSort CONTAINER_PERCENTAGE = new UsageAttributionSort("container_percentage"); + public static final UsageAttributionSort APM_HOST_PERCENTAGE = new UsageAttributionSort("apm_host_percentage"); + public static final UsageAttributionSort NPM_HOST_PERCENTAGE = new UsageAttributionSort("npm_host_percentage"); + public static final UsageAttributionSort BROWSER_PERCENTAGE = new UsageAttributionSort("browser_percentage"); + public static final UsageAttributionSort BROWSER_USAGE = new UsageAttributionSort("browser_usage"); + public static final UsageAttributionSort INFRA_HOST_PERCENTAGE = new UsageAttributionSort("infra_host_percentage"); + public static final UsageAttributionSort SNMP_PERCENTAGE = new UsageAttributionSort("snmp_percentage"); + public static final UsageAttributionSort NPM_HOST_USAGE = new UsageAttributionSort("npm_host_usage"); + public static final UsageAttributionSort INFRA_HOST_USAGE = new UsageAttributionSort("infra_host_usage"); + public static final UsageAttributionSort CUSTOM_TIMESERIES_USAGE = new UsageAttributionSort("custom_timeseries_usage"); + public static final UsageAttributionSort LAMBDA_FUNCTIONS_USAGE = new UsageAttributionSort("lambda_functions_usage"); + public static final UsageAttributionSort LAMBDA_FUNCTIONS_PERCENTAGE = new UsageAttributionSort("lambda_functions_percentage"); + public static final UsageAttributionSort LAMBDA_INVOCATIONS_USAGE = new UsageAttributionSort("lambda_invocations_usage"); + public static final UsageAttributionSort LAMBDA_INVOCATIONS_PERCENTAGE = new UsageAttributionSort("lambda_invocations_percentage"); + public static final UsageAttributionSort ESTIMATED_INDEXED_LOGS_USAGE = new UsageAttributionSort("estimated_indexed_logs_usage"); + public static final UsageAttributionSort ESTIMATED_INDEXED_LOGS_PERCENTAGE = new UsageAttributionSort("estimated_indexed_logs_percentage"); + public static final UsageAttributionSort ESTIMATED_INGESTED_LOGS_USAGE = new UsageAttributionSort("estimated_ingested_logs_usage"); + public static final UsageAttributionSort ESTIMATED_INGESTED_LOGS_PERCENTAGE = new UsageAttributionSort("estimated_ingested_logs_percentage"); + public static final UsageAttributionSort ESTIMATED_INDEXED_SPANS_USAGE = new UsageAttributionSort("estimated_indexed_spans_usage"); + public static final UsageAttributionSort ESTIMATED_INDEXED_SPANS_PERCENTAGE = new UsageAttributionSort("estimated_indexed_spans_percentage"); + public static final UsageAttributionSort ESTIMATED_INGESTED_SPANS_USAGE = new UsageAttributionSort("estimated_ingested_spans_usage"); + public static final UsageAttributionSort ESTIMATED_INGESTED_SPANS_PERCENTAGE = new UsageAttributionSort("estimated_ingested_spans_percentage"); + public static final UsageAttributionSort APM_FARGATE_USAGE = new UsageAttributionSort("apm_fargate_usage"); + public static final UsageAttributionSort APM_FARGATE_PERCENTAGE = new UsageAttributionSort("apm_fargate_percentage"); + public static final UsageAttributionSort APPSEC_FARGATE_USAGE = new UsageAttributionSort("appsec_fargate_usage"); + public static final UsageAttributionSort APPSEC_FARGATE_PERCENTAGE = new UsageAttributionSort("appsec_fargate_percentage"); + public static final UsageAttributionSort ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE = new UsageAttributionSort("estimated_rum_usage_attribution_usage"); + public static final UsageAttributionSort ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE = new UsageAttributionSort("estimated_rum_usage_attribution_percentage"); + + private static final Set allowedValues = new HashSet(Arrays.asList("api_percentage", "snmp_usage", "apm_host_usage", "api_usage", "appsec_usage", "appsec_percentage", "container_usage", "custom_timeseries_percentage", "container_percentage", "apm_host_percentage", "npm_host_percentage", "browser_percentage", "browser_usage", "infra_host_percentage", "snmp_percentage", "npm_host_usage", "infra_host_usage", "custom_timeseries_usage", "lambda_functions_usage", "lambda_functions_percentage", "lambda_invocations_usage", "lambda_invocations_percentage", "estimated_indexed_logs_usage", "estimated_indexed_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_logs_percentage", "estimated_indexed_spans_usage", "estimated_indexed_spans_percentage", "estimated_ingested_spans_usage", "estimated_ingested_spans_percentage", "apm_fargate_usage", "apm_fargate_percentage", "appsec_fargate_usage", "appsec_fargate_percentage", "estimated_rum_usage_attribution_usage", "estimated_rum_usage_attribution_percentage")); private String value; @@ -144,20 +97,18 @@ public boolean isValid() { } public static class UsageAttributionSortSerializer extends StdSerializer { - public UsageAttributionSortSerializer(Class t) { - super(t); - } - - public UsageAttributionSortSerializer() { - this(null); - } - - @Override - public void serialize( - UsageAttributionSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsageAttributionSortSerializer(Class t) { + super(t); + } + + public UsageAttributionSortSerializer() { + this(null); + } + + @Override + public void serialize(UsageAttributionSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -169,7 +120,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageAttributionSort object is equal to o. */ + /** + * Return true if this UsageAttributionSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +136,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSupportedMetrics.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSupportedMetrics.java index 41ef4fc1466..cbb48977653 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSupportedMetrics.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionSupportedMetrics.java @@ -6,172 +6,96 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Supported fields for usage attribution requests (valid requests contain one or more metrics, or - * * for all). + *

Supported fields for usage attribution requests (valid requests contain one or more metrics, or * for all).

*/ -@JsonSerialize( - using = UsageAttributionSupportedMetrics.UsageAttributionSupportedMetricsSerializer.class) +@JsonSerialize(using = UsageAttributionSupportedMetrics.UsageAttributionSupportedMetricsSerializer.class) public class UsageAttributionSupportedMetrics { - public static final UsageAttributionSupportedMetrics CUSTOM_TIMESERIES_USAGE = - new UsageAttributionSupportedMetrics("custom_timeseries_usage"); - public static final UsageAttributionSupportedMetrics CONTAINER_USAGE = - new UsageAttributionSupportedMetrics("container_usage"); - public static final UsageAttributionSupportedMetrics SNMP_PERCENTAGE = - new UsageAttributionSupportedMetrics("snmp_percentage"); - public static final UsageAttributionSupportedMetrics APM_HOST_USAGE = - new UsageAttributionSupportedMetrics("apm_host_usage"); - public static final UsageAttributionSupportedMetrics BROWSER_USAGE = - new UsageAttributionSupportedMetrics("browser_usage"); - public static final UsageAttributionSupportedMetrics NPM_HOST_PERCENTAGE = - new UsageAttributionSupportedMetrics("npm_host_percentage"); - public static final UsageAttributionSupportedMetrics INFRA_HOST_USAGE = - new UsageAttributionSupportedMetrics("infra_host_usage"); - public static final UsageAttributionSupportedMetrics CUSTOM_TIMESERIES_PERCENTAGE = - new UsageAttributionSupportedMetrics("custom_timeseries_percentage"); - public static final UsageAttributionSupportedMetrics CONTAINER_PERCENTAGE = - new UsageAttributionSupportedMetrics("container_percentage"); - public static final UsageAttributionSupportedMetrics API_USAGE = - new UsageAttributionSupportedMetrics("api_usage"); - public static final UsageAttributionSupportedMetrics APM_HOST_PERCENTAGE = - new UsageAttributionSupportedMetrics("apm_host_percentage"); - public static final UsageAttributionSupportedMetrics INFRA_HOST_PERCENTAGE = - new UsageAttributionSupportedMetrics("infra_host_percentage"); - public static final UsageAttributionSupportedMetrics SNMP_USAGE = - new UsageAttributionSupportedMetrics("snmp_usage"); - public static final UsageAttributionSupportedMetrics BROWSER_PERCENTAGE = - new UsageAttributionSupportedMetrics("browser_percentage"); - public static final UsageAttributionSupportedMetrics API_PERCENTAGE = - new UsageAttributionSupportedMetrics("api_percentage"); - public static final UsageAttributionSupportedMetrics NPM_HOST_USAGE = - new UsageAttributionSupportedMetrics("npm_host_usage"); - public static final UsageAttributionSupportedMetrics LAMBDA_FUNCTIONS_USAGE = - new UsageAttributionSupportedMetrics("lambda_functions_usage"); - public static final UsageAttributionSupportedMetrics LAMBDA_FUNCTIONS_PERCENTAGE = - new UsageAttributionSupportedMetrics("lambda_functions_percentage"); - public static final UsageAttributionSupportedMetrics LAMBDA_INVOCATIONS_USAGE = - new UsageAttributionSupportedMetrics("lambda_invocations_usage"); - public static final UsageAttributionSupportedMetrics LAMBDA_INVOCATIONS_PERCENTAGE = - new UsageAttributionSupportedMetrics("lambda_invocations_percentage"); - public static final UsageAttributionSupportedMetrics FARGATE_USAGE = - new UsageAttributionSupportedMetrics("fargate_usage"); - public static final UsageAttributionSupportedMetrics FARGATE_PERCENTAGE = - new UsageAttributionSupportedMetrics("fargate_percentage"); - public static final UsageAttributionSupportedMetrics PROFILED_HOST_USAGE = - new UsageAttributionSupportedMetrics("profiled_host_usage"); - public static final UsageAttributionSupportedMetrics PROFILED_HOST_PERCENTAGE = - new UsageAttributionSupportedMetrics("profiled_host_percentage"); - public static final UsageAttributionSupportedMetrics PROFILED_CONTAINER_USAGE = - new UsageAttributionSupportedMetrics("profiled_container_usage"); - public static final UsageAttributionSupportedMetrics PROFILED_CONTAINER_PERCENTAGE = - new UsageAttributionSupportedMetrics("profiled_container_percentage"); - public static final UsageAttributionSupportedMetrics DBM_HOSTS_USAGE = - new UsageAttributionSupportedMetrics("dbm_hosts_usage"); - public static final UsageAttributionSupportedMetrics DBM_HOSTS_PERCENTAGE = - new UsageAttributionSupportedMetrics("dbm_hosts_percentage"); - public static final UsageAttributionSupportedMetrics DBM_QUERIES_USAGE = - new UsageAttributionSupportedMetrics("dbm_queries_usage"); - public static final UsageAttributionSupportedMetrics DBM_QUERIES_PERCENTAGE = - new UsageAttributionSupportedMetrics("dbm_queries_percentage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_USAGE = - new UsageAttributionSupportedMetrics("estimated_indexed_logs_usage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_PERCENTAGE = - new UsageAttributionSupportedMetrics("estimated_indexed_logs_percentage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_USAGE = - new UsageAttributionSupportedMetrics("estimated_ingested_logs_usage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_PERCENTAGE = - new UsageAttributionSupportedMetrics("estimated_ingested_logs_percentage"); - public static final UsageAttributionSupportedMetrics APPSEC_USAGE = - new UsageAttributionSupportedMetrics("appsec_usage"); - public static final UsageAttributionSupportedMetrics APPSEC_PERCENTAGE = - new UsageAttributionSupportedMetrics("appsec_percentage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_USAGE = - new UsageAttributionSupportedMetrics("estimated_indexed_spans_usage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_PERCENTAGE = - new UsageAttributionSupportedMetrics("estimated_indexed_spans_percentage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_USAGE = - new UsageAttributionSupportedMetrics("estimated_ingested_spans_usage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_PERCENTAGE = - new UsageAttributionSupportedMetrics("estimated_ingested_spans_percentage"); - public static final UsageAttributionSupportedMetrics APM_FARGATE_USAGE = - new UsageAttributionSupportedMetrics("apm_fargate_usage"); - public static final UsageAttributionSupportedMetrics APM_FARGATE_PERCENTAGE = - new UsageAttributionSupportedMetrics("apm_fargate_percentage"); - public static final UsageAttributionSupportedMetrics APPSEC_FARGATE_USAGE = - new UsageAttributionSupportedMetrics("appsec_fargate_usage"); - public static final UsageAttributionSupportedMetrics APPSEC_FARGATE_PERCENTAGE = - new UsageAttributionSupportedMetrics("appsec_fargate_percentage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE = - new UsageAttributionSupportedMetrics("estimated_rum_usage_attribution_usage"); - public static final UsageAttributionSupportedMetrics ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE = - new UsageAttributionSupportedMetrics("estimated_rum_usage_attribution_percentage"); - public static final UsageAttributionSupportedMetrics ALL = - new UsageAttributionSupportedMetrics("*"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "custom_timeseries_usage", - "container_usage", - "snmp_percentage", - "apm_host_usage", - "browser_usage", - "npm_host_percentage", - "infra_host_usage", - "custom_timeseries_percentage", - "container_percentage", - "api_usage", - "apm_host_percentage", - "infra_host_percentage", - "snmp_usage", - "browser_percentage", - "api_percentage", - "npm_host_usage", - "lambda_functions_usage", - "lambda_functions_percentage", - "lambda_invocations_usage", - "lambda_invocations_percentage", - "fargate_usage", - "fargate_percentage", - "profiled_host_usage", - "profiled_host_percentage", - "profiled_container_usage", - "profiled_container_percentage", - "dbm_hosts_usage", - "dbm_hosts_percentage", - "dbm_queries_usage", - "dbm_queries_percentage", - "estimated_indexed_logs_usage", - "estimated_indexed_logs_percentage", - "estimated_ingested_logs_usage", - "estimated_ingested_logs_percentage", - "appsec_usage", - "appsec_percentage", - "estimated_indexed_spans_usage", - "estimated_indexed_spans_percentage", - "estimated_ingested_spans_usage", - "estimated_ingested_spans_percentage", - "apm_fargate_usage", - "apm_fargate_percentage", - "appsec_fargate_usage", - "appsec_fargate_percentage", - "estimated_rum_usage_attribution_usage", - "estimated_rum_usage_attribution_percentage", - "*")); + public static final UsageAttributionSupportedMetrics CUSTOM_TIMESERIES_USAGE = new UsageAttributionSupportedMetrics("custom_timeseries_usage"); + public static final UsageAttributionSupportedMetrics CONTAINER_USAGE = new UsageAttributionSupportedMetrics("container_usage"); + public static final UsageAttributionSupportedMetrics SNMP_PERCENTAGE = new UsageAttributionSupportedMetrics("snmp_percentage"); + public static final UsageAttributionSupportedMetrics APM_HOST_USAGE = new UsageAttributionSupportedMetrics("apm_host_usage"); + public static final UsageAttributionSupportedMetrics BROWSER_USAGE = new UsageAttributionSupportedMetrics("browser_usage"); + public static final UsageAttributionSupportedMetrics NPM_HOST_PERCENTAGE = new UsageAttributionSupportedMetrics("npm_host_percentage"); + public static final UsageAttributionSupportedMetrics INFRA_HOST_USAGE = new UsageAttributionSupportedMetrics("infra_host_usage"); + public static final UsageAttributionSupportedMetrics CUSTOM_TIMESERIES_PERCENTAGE = new UsageAttributionSupportedMetrics("custom_timeseries_percentage"); + public static final UsageAttributionSupportedMetrics CONTAINER_PERCENTAGE = new UsageAttributionSupportedMetrics("container_percentage"); + public static final UsageAttributionSupportedMetrics API_USAGE = new UsageAttributionSupportedMetrics("api_usage"); + public static final UsageAttributionSupportedMetrics APM_HOST_PERCENTAGE = new UsageAttributionSupportedMetrics("apm_host_percentage"); + public static final UsageAttributionSupportedMetrics INFRA_HOST_PERCENTAGE = new UsageAttributionSupportedMetrics("infra_host_percentage"); + public static final UsageAttributionSupportedMetrics SNMP_USAGE = new UsageAttributionSupportedMetrics("snmp_usage"); + public static final UsageAttributionSupportedMetrics BROWSER_PERCENTAGE = new UsageAttributionSupportedMetrics("browser_percentage"); + public static final UsageAttributionSupportedMetrics API_PERCENTAGE = new UsageAttributionSupportedMetrics("api_percentage"); + public static final UsageAttributionSupportedMetrics NPM_HOST_USAGE = new UsageAttributionSupportedMetrics("npm_host_usage"); + public static final UsageAttributionSupportedMetrics LAMBDA_FUNCTIONS_USAGE = new UsageAttributionSupportedMetrics("lambda_functions_usage"); + public static final UsageAttributionSupportedMetrics LAMBDA_FUNCTIONS_PERCENTAGE = new UsageAttributionSupportedMetrics("lambda_functions_percentage"); + public static final UsageAttributionSupportedMetrics LAMBDA_INVOCATIONS_USAGE = new UsageAttributionSupportedMetrics("lambda_invocations_usage"); + public static final UsageAttributionSupportedMetrics LAMBDA_INVOCATIONS_PERCENTAGE = new UsageAttributionSupportedMetrics("lambda_invocations_percentage"); + public static final UsageAttributionSupportedMetrics FARGATE_USAGE = new UsageAttributionSupportedMetrics("fargate_usage"); + public static final UsageAttributionSupportedMetrics FARGATE_PERCENTAGE = new UsageAttributionSupportedMetrics("fargate_percentage"); + public static final UsageAttributionSupportedMetrics PROFILED_HOST_USAGE = new UsageAttributionSupportedMetrics("profiled_host_usage"); + public static final UsageAttributionSupportedMetrics PROFILED_HOST_PERCENTAGE = new UsageAttributionSupportedMetrics("profiled_host_percentage"); + public static final UsageAttributionSupportedMetrics PROFILED_CONTAINER_USAGE = new UsageAttributionSupportedMetrics("profiled_container_usage"); + public static final UsageAttributionSupportedMetrics PROFILED_CONTAINER_PERCENTAGE = new UsageAttributionSupportedMetrics("profiled_container_percentage"); + public static final UsageAttributionSupportedMetrics DBM_HOSTS_USAGE = new UsageAttributionSupportedMetrics("dbm_hosts_usage"); + public static final UsageAttributionSupportedMetrics DBM_HOSTS_PERCENTAGE = new UsageAttributionSupportedMetrics("dbm_hosts_percentage"); + public static final UsageAttributionSupportedMetrics DBM_QUERIES_USAGE = new UsageAttributionSupportedMetrics("dbm_queries_usage"); + public static final UsageAttributionSupportedMetrics DBM_QUERIES_PERCENTAGE = new UsageAttributionSupportedMetrics("dbm_queries_percentage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_USAGE = new UsageAttributionSupportedMetrics("estimated_indexed_logs_usage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_LOGS_PERCENTAGE = new UsageAttributionSupportedMetrics("estimated_indexed_logs_percentage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_USAGE = new UsageAttributionSupportedMetrics("estimated_ingested_logs_usage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_LOGS_PERCENTAGE = new UsageAttributionSupportedMetrics("estimated_ingested_logs_percentage"); + public static final UsageAttributionSupportedMetrics APPSEC_USAGE = new UsageAttributionSupportedMetrics("appsec_usage"); + public static final UsageAttributionSupportedMetrics APPSEC_PERCENTAGE = new UsageAttributionSupportedMetrics("appsec_percentage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_USAGE = new UsageAttributionSupportedMetrics("estimated_indexed_spans_usage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INDEXED_SPANS_PERCENTAGE = new UsageAttributionSupportedMetrics("estimated_indexed_spans_percentage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_USAGE = new UsageAttributionSupportedMetrics("estimated_ingested_spans_usage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_INGESTED_SPANS_PERCENTAGE = new UsageAttributionSupportedMetrics("estimated_ingested_spans_percentage"); + public static final UsageAttributionSupportedMetrics APM_FARGATE_USAGE = new UsageAttributionSupportedMetrics("apm_fargate_usage"); + public static final UsageAttributionSupportedMetrics APM_FARGATE_PERCENTAGE = new UsageAttributionSupportedMetrics("apm_fargate_percentage"); + public static final UsageAttributionSupportedMetrics APPSEC_FARGATE_USAGE = new UsageAttributionSupportedMetrics("appsec_fargate_usage"); + public static final UsageAttributionSupportedMetrics APPSEC_FARGATE_PERCENTAGE = new UsageAttributionSupportedMetrics("appsec_fargate_percentage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE = new UsageAttributionSupportedMetrics("estimated_rum_usage_attribution_usage"); + public static final UsageAttributionSupportedMetrics ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE = new UsageAttributionSupportedMetrics("estimated_rum_usage_attribution_percentage"); + public static final UsageAttributionSupportedMetrics ALL = new UsageAttributionSupportedMetrics("*"); + + private static final Set allowedValues = new HashSet(Arrays.asList("custom_timeseries_usage", "container_usage", "snmp_percentage", "apm_host_usage", "browser_usage", "npm_host_percentage", "infra_host_usage", "custom_timeseries_percentage", "container_percentage", "api_usage", "apm_host_percentage", "infra_host_percentage", "snmp_usage", "browser_percentage", "api_percentage", "npm_host_usage", "lambda_functions_usage", "lambda_functions_percentage", "lambda_invocations_usage", "lambda_invocations_percentage", "fargate_usage", "fargate_percentage", "profiled_host_usage", "profiled_host_percentage", "profiled_container_usage", "profiled_container_percentage", "dbm_hosts_usage", "dbm_hosts_percentage", "dbm_queries_usage", "dbm_queries_percentage", "estimated_indexed_logs_usage", "estimated_indexed_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_logs_percentage", "appsec_usage", "appsec_percentage", "estimated_indexed_spans_usage", "estimated_indexed_spans_percentage", "estimated_ingested_spans_usage", "estimated_ingested_spans_percentage", "apm_fargate_usage", "apm_fargate_percentage", "appsec_fargate_usage", "appsec_fargate_percentage", "estimated_rum_usage_attribution_usage", "estimated_rum_usage_attribution_percentage", "*")); private String value; @@ -183,22 +107,19 @@ public boolean isValid() { this.value = value; } - public static class UsageAttributionSupportedMetricsSerializer - extends StdSerializer { - public UsageAttributionSupportedMetricsSerializer(Class t) { - super(t); - } + public static class UsageAttributionSupportedMetricsSerializer extends StdSerializer { + public UsageAttributionSupportedMetricsSerializer(Class t) { + super(t); + } - public UsageAttributionSupportedMetricsSerializer() { - this(null); - } + public UsageAttributionSupportedMetricsSerializer() { + this(null); + } - @Override - public void serialize( - UsageAttributionSupportedMetrics value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(UsageAttributionSupportedMetrics value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -210,7 +131,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageAttributionSupportedMetrics object is equal to o. */ + /** + * Return true if this UsageAttributionSupportedMetrics object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +147,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionValues.java b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionValues.java index 296f4b45973..0fb2de99b10 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAttributionValues.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAttributionValues.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Fields in Usage Summary by tag(s). */ +/** + *

Fields in Usage Summary by tag(s).

+ */ @JsonPropertyOrder({ UsageAttributionValues.JSON_PROPERTY_API_PERCENTAGE, UsageAttributionValues.JSON_PROPERTY_API_USAGE, @@ -67,10 +87,10 @@ UsageAttributionValues.JSON_PROPERTY_SNMP_PERCENTAGE, UsageAttributionValues.JSON_PROPERTY_SNMP_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributionValues { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_PERCENTAGE = "api_percentage"; private Double apiPercentage; @@ -125,8 +145,7 @@ public class UsageAttributionValues { public static final String JSON_PROPERTY_CSPM_HOST_USAGE = "cspm_host_usage"; private Double cspmHostUsage; - public static final String JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE = - "custom_timeseries_percentage"; + public static final String JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE = "custom_timeseries_percentage"; private Double customTimeseriesPercentage; public static final String JSON_PROPERTY_CUSTOM_TIMESERIES_USAGE = "custom_timeseries_usage"; @@ -156,44 +175,34 @@ public class UsageAttributionValues { public static final String JSON_PROPERTY_DBM_QUERIES_USAGE = "dbm_queries_usage"; private Double dbmQueriesUsage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE = - "estimated_indexed_logs_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE = "estimated_indexed_logs_percentage"; private Double estimatedIndexedLogsPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE = - "estimated_indexed_logs_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE = "estimated_indexed_logs_usage"; private Double estimatedIndexedLogsUsage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE = - "estimated_indexed_spans_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE = "estimated_indexed_spans_percentage"; private Double estimatedIndexedSpansPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE = - "estimated_indexed_spans_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE = "estimated_indexed_spans_usage"; private Double estimatedIndexedSpansUsage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE = - "estimated_ingested_logs_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE = "estimated_ingested_logs_percentage"; private Double estimatedIngestedLogsPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE = - "estimated_ingested_logs_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE = "estimated_ingested_logs_usage"; private Double estimatedIngestedLogsUsage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE = - "estimated_ingested_spans_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE = "estimated_ingested_spans_percentage"; private Double estimatedIngestedSpansPercentage; - public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE = - "estimated_ingested_spans_usage"; + public static final String JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE = "estimated_ingested_spans_usage"; private Double estimatedIngestedSpansUsage; - public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE = - "estimated_rum_sessions_percentage"; + public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE = "estimated_rum_sessions_percentage"; private Double estimatedRumSessionsPercentage; - public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE = - "estimated_rum_sessions_usage"; + public static final String JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE = "estimated_rum_sessions_usage"; private Double estimatedRumSessionsUsage; public static final String JSON_PROPERTY_INFRA_HOST_PERCENTAGE = "infra_host_percentage"; @@ -202,15 +211,13 @@ public class UsageAttributionValues { public static final String JSON_PROPERTY_INFRA_HOST_USAGE = "infra_host_usage"; private Double infraHostUsage; - public static final String JSON_PROPERTY_LAMBDA_FUNCTIONS_PERCENTAGE = - "lambda_functions_percentage"; + public static final String JSON_PROPERTY_LAMBDA_FUNCTIONS_PERCENTAGE = "lambda_functions_percentage"; private Double lambdaFunctionsPercentage; public static final String JSON_PROPERTY_LAMBDA_FUNCTIONS_USAGE = "lambda_functions_usage"; private Double lambdaFunctionsUsage; - public static final String JSON_PROPERTY_LAMBDA_INVOCATIONS_PERCENTAGE = - "lambda_invocations_percentage"; + public static final String JSON_PROPERTY_LAMBDA_INVOCATIONS_PERCENTAGE = "lambda_invocations_percentage"; private Double lambdaInvocationsPercentage; public static final String JSON_PROPERTY_LAMBDA_INVOCATIONS_USAGE = "lambda_invocations_usage"; @@ -222,8 +229,7 @@ public class UsageAttributionValues { public static final String JSON_PROPERTY_NPM_HOST_USAGE = "npm_host_usage"; private Double npmHostUsage; - public static final String JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE = - "profiled_container_percentage"; + public static final String JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE = "profiled_container_percentage"; private Double profiledContainerPercentage; public static final String JSON_PROPERTY_PROFILED_CONTAINER_USAGE = "profiled_container_usage"; @@ -247,1098 +253,992 @@ public UsageAttributionValues apiPercentage(Double apiPercentage) { } /** - * The percentage of synthetic API test usage by tag(s). - * + *

The percentage of synthetic API test usage by tag(s).

* @return apiPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApiPercentage() { - return apiPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApiPercentage() { + return apiPercentage; + } public void setApiPercentage(Double apiPercentage) { this.apiPercentage = apiPercentage; } - public UsageAttributionValues apiUsage(Double apiUsage) { this.apiUsage = apiUsage; return this; } /** - * The synthetic API test usage by tag(s). - * + *

The synthetic API test usage by tag(s).

* @return apiUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApiUsage() { - return apiUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApiUsage() { + return apiUsage; + } public void setApiUsage(Double apiUsage) { this.apiUsage = apiUsage; } - public UsageAttributionValues apmFargatePercentage(Double apmFargatePercentage) { this.apmFargatePercentage = apmFargatePercentage; return this; } /** - * The percentage of APM ECS Fargate task usage by tag(s). - * + *

The percentage of APM ECS Fargate task usage by tag(s).

* @return apmFargatePercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmFargatePercentage() { - return apmFargatePercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmFargatePercentage() { + return apmFargatePercentage; + } public void setApmFargatePercentage(Double apmFargatePercentage) { this.apmFargatePercentage = apmFargatePercentage; } - public UsageAttributionValues apmFargateUsage(Double apmFargateUsage) { this.apmFargateUsage = apmFargateUsage; return this; } /** - * The APM ECS Fargate task usage by tag(s). - * + *

The APM ECS Fargate task usage by tag(s).

* @return apmFargateUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmFargateUsage() { - return apmFargateUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmFargateUsage() { + return apmFargateUsage; + } public void setApmFargateUsage(Double apmFargateUsage) { this.apmFargateUsage = apmFargateUsage; } - public UsageAttributionValues apmHostPercentage(Double apmHostPercentage) { this.apmHostPercentage = apmHostPercentage; return this; } /** - * The percentage of APM host usage by tag(s). - * + *

The percentage of APM host usage by tag(s).

* @return apmHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmHostPercentage() { - return apmHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmHostPercentage() { + return apmHostPercentage; + } public void setApmHostPercentage(Double apmHostPercentage) { this.apmHostPercentage = apmHostPercentage; } - public UsageAttributionValues apmHostUsage(Double apmHostUsage) { this.apmHostUsage = apmHostUsage; return this; } /** - * The APM host usage by tag(s). - * + *

The APM host usage by tag(s).

* @return apmHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getApmHostUsage() { - return apmHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmHostUsage() { + return apmHostUsage; + } public void setApmHostUsage(Double apmHostUsage) { this.apmHostUsage = apmHostUsage; } - public UsageAttributionValues appsecFargatePercentage(Double appsecFargatePercentage) { this.appsecFargatePercentage = appsecFargatePercentage; return this; } /** - * The percentage of Application Security Monitoring ECS Fargate task usage by tag(s). - * + *

The percentage of Application Security Monitoring ECS Fargate task usage by tag(s).

* @return appsecFargatePercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecFargatePercentage() { - return appsecFargatePercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecFargatePercentage() { + return appsecFargatePercentage; + } public void setAppsecFargatePercentage(Double appsecFargatePercentage) { this.appsecFargatePercentage = appsecFargatePercentage; } - public UsageAttributionValues appsecFargateUsage(Double appsecFargateUsage) { this.appsecFargateUsage = appsecFargateUsage; return this; } /** - * The Application Security Monitoring ECS Fargate task usage by tag(s). - * + *

The Application Security Monitoring ECS Fargate task usage by tag(s).

* @return appsecFargateUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecFargateUsage() { - return appsecFargateUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecFargateUsage() { + return appsecFargateUsage; + } public void setAppsecFargateUsage(Double appsecFargateUsage) { this.appsecFargateUsage = appsecFargateUsage; } - public UsageAttributionValues appsecPercentage(Double appsecPercentage) { this.appsecPercentage = appsecPercentage; return this; } /** - * The percentage of Application Security Monitoring host usage by tag(s). - * + *

The percentage of Application Security Monitoring host usage by tag(s).

* @return appsecPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecPercentage() { - return appsecPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecPercentage() { + return appsecPercentage; + } public void setAppsecPercentage(Double appsecPercentage) { this.appsecPercentage = appsecPercentage; } - public UsageAttributionValues appsecUsage(Double appsecUsage) { this.appsecUsage = appsecUsage; return this; } /** - * The Application Security Monitoring host usage by tag(s). - * + *

The Application Security Monitoring host usage by tag(s).

* @return appsecUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getAppsecUsage() { - return appsecUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getAppsecUsage() { + return appsecUsage; + } public void setAppsecUsage(Double appsecUsage) { this.appsecUsage = appsecUsage; } - public UsageAttributionValues browserPercentage(Double browserPercentage) { this.browserPercentage = browserPercentage; return this; } /** - * The percentage of synthetic browser test usage by tag(s). - * + *

The percentage of synthetic browser test usage by tag(s).

* @return browserPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getBrowserPercentage() { - return browserPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getBrowserPercentage() { + return browserPercentage; + } public void setBrowserPercentage(Double browserPercentage) { this.browserPercentage = browserPercentage; } - public UsageAttributionValues browserUsage(Double browserUsage) { this.browserUsage = browserUsage; return this; } /** - * The synthetic browser test usage by tag(s). - * + *

The synthetic browser test usage by tag(s).

* @return browserUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getBrowserUsage() { - return browserUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getBrowserUsage() { + return browserUsage; + } public void setBrowserUsage(Double browserUsage) { this.browserUsage = browserUsage; } - public UsageAttributionValues containerPercentage(Double containerPercentage) { this.containerPercentage = containerPercentage; return this; } /** - * The percentage of container usage by tag(s). - * + *

The percentage of container usage by tag(s).

* @return containerPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getContainerPercentage() { - return containerPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getContainerPercentage() { + return containerPercentage; + } public void setContainerPercentage(Double containerPercentage) { this.containerPercentage = containerPercentage; } - public UsageAttributionValues containerUsage(Double containerUsage) { this.containerUsage = containerUsage; return this; } /** - * The container usage by tag(s). - * + *

The container usage by tag(s).

* @return containerUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getContainerUsage() { - return containerUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getContainerUsage() { + return containerUsage; + } public void setContainerUsage(Double containerUsage) { this.containerUsage = containerUsage; } - public UsageAttributionValues cspmContainerPercentage(Double cspmContainerPercentage) { this.cspmContainerPercentage = cspmContainerPercentage; return this; } /** - * The percentage of Cloud Security Posture Management container usage by tag(s) - * + *

The percentage of Cloud Security Posture Management container usage by tag(s)

* @return cspmContainerPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmContainerPercentage() { - return cspmContainerPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmContainerPercentage() { + return cspmContainerPercentage; + } public void setCspmContainerPercentage(Double cspmContainerPercentage) { this.cspmContainerPercentage = cspmContainerPercentage; } - public UsageAttributionValues cspmContainerUsage(Double cspmContainerUsage) { this.cspmContainerUsage = cspmContainerUsage; return this; } /** - * The Cloud Security Posture Management container usage by tag(s) - * + *

The Cloud Security Posture Management container usage by tag(s)

* @return cspmContainerUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmContainerUsage() { - return cspmContainerUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmContainerUsage() { + return cspmContainerUsage; + } public void setCspmContainerUsage(Double cspmContainerUsage) { this.cspmContainerUsage = cspmContainerUsage; } - public UsageAttributionValues cspmHostPercentage(Double cspmHostPercentage) { this.cspmHostPercentage = cspmHostPercentage; return this; } /** - * The percentage of Cloud Security Posture Management host usage by tag(s) - * + *

The percentage of Cloud Security Posture Management host usage by tag(s)

* @return cspmHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmHostPercentage() { - return cspmHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmHostPercentage() { + return cspmHostPercentage; + } public void setCspmHostPercentage(Double cspmHostPercentage) { this.cspmHostPercentage = cspmHostPercentage; } - public UsageAttributionValues cspmHostUsage(Double cspmHostUsage) { this.cspmHostUsage = cspmHostUsage; return this; } /** - * The Cloud Security Posture Management host usage by tag(s) - * + *

The Cloud Security Posture Management host usage by tag(s)

* @return cspmHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCspmHostUsage() { - return cspmHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCspmHostUsage() { + return cspmHostUsage; + } public void setCspmHostUsage(Double cspmHostUsage) { this.cspmHostUsage = cspmHostUsage; } - public UsageAttributionValues customTimeseriesPercentage(Double customTimeseriesPercentage) { this.customTimeseriesPercentage = customTimeseriesPercentage; return this; } /** - * The percentage of custom metrics usage by tag(s). - * + *

The percentage of custom metrics usage by tag(s).

* @return customTimeseriesPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCustomTimeseriesPercentage() { - return customTimeseriesPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCustomTimeseriesPercentage() { + return customTimeseriesPercentage; + } public void setCustomTimeseriesPercentage(Double customTimeseriesPercentage) { this.customTimeseriesPercentage = customTimeseriesPercentage; } - public UsageAttributionValues customTimeseriesUsage(Double customTimeseriesUsage) { this.customTimeseriesUsage = customTimeseriesUsage; return this; } /** - * The custom metrics usage by tag(s). - * + *

The custom metrics usage by tag(s).

* @return customTimeseriesUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCustomTimeseriesUsage() { - return customTimeseriesUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TIMESERIES_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCustomTimeseriesUsage() { + return customTimeseriesUsage; + } public void setCustomTimeseriesUsage(Double customTimeseriesUsage) { this.customTimeseriesUsage = customTimeseriesUsage; } - public UsageAttributionValues cwsContainerPercentage(Double cwsContainerPercentage) { this.cwsContainerPercentage = cwsContainerPercentage; return this; } /** - * The percentage of Cloud Workload Security container usage by tag(s) - * + *

The percentage of Cloud Workload Security container usage by tag(s)

* @return cwsContainerPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsContainerPercentage() { - return cwsContainerPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsContainerPercentage() { + return cwsContainerPercentage; + } public void setCwsContainerPercentage(Double cwsContainerPercentage) { this.cwsContainerPercentage = cwsContainerPercentage; } - public UsageAttributionValues cwsContainerUsage(Double cwsContainerUsage) { this.cwsContainerUsage = cwsContainerUsage; return this; } /** - * The Cloud Workload Security container usage by tag(s) - * + *

The Cloud Workload Security container usage by tag(s)

* @return cwsContainerUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsContainerUsage() { - return cwsContainerUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsContainerUsage() { + return cwsContainerUsage; + } public void setCwsContainerUsage(Double cwsContainerUsage) { this.cwsContainerUsage = cwsContainerUsage; } - public UsageAttributionValues cwsHostPercentage(Double cwsHostPercentage) { this.cwsHostPercentage = cwsHostPercentage; return this; } /** - * The percentage of Cloud Workload Security host usage by tag(s) - * + *

The percentage of Cloud Workload Security host usage by tag(s)

* @return cwsHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsHostPercentage() { - return cwsHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsHostPercentage() { + return cwsHostPercentage; + } public void setCwsHostPercentage(Double cwsHostPercentage) { this.cwsHostPercentage = cwsHostPercentage; } - public UsageAttributionValues cwsHostUsage(Double cwsHostUsage) { this.cwsHostUsage = cwsHostUsage; return this; } /** - * The Cloud Workload Security host usage by tag(s) - * + *

The Cloud Workload Security host usage by tag(s)

* @return cwsHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCwsHostUsage() { - return cwsHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCwsHostUsage() { + return cwsHostUsage; + } public void setCwsHostUsage(Double cwsHostUsage) { this.cwsHostUsage = cwsHostUsage; } - public UsageAttributionValues dbmHostsPercentage(Double dbmHostsPercentage) { this.dbmHostsPercentage = dbmHostsPercentage; return this; } /** - * The percentage of Database Monitoring host usage by tag(s). - * + *

The percentage of Database Monitoring host usage by tag(s).

* @return dbmHostsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOSTS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmHostsPercentage() { - return dbmHostsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOSTS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmHostsPercentage() { + return dbmHostsPercentage; + } public void setDbmHostsPercentage(Double dbmHostsPercentage) { this.dbmHostsPercentage = dbmHostsPercentage; } - public UsageAttributionValues dbmHostsUsage(Double dbmHostsUsage) { this.dbmHostsUsage = dbmHostsUsage; return this; } /** - * The Database Monitoring host usage by tag(s). - * + *

The Database Monitoring host usage by tag(s).

* @return dbmHostsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOSTS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmHostsUsage() { - return dbmHostsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOSTS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmHostsUsage() { + return dbmHostsUsage; + } public void setDbmHostsUsage(Double dbmHostsUsage) { this.dbmHostsUsage = dbmHostsUsage; } - public UsageAttributionValues dbmQueriesPercentage(Double dbmQueriesPercentage) { this.dbmQueriesPercentage = dbmQueriesPercentage; return this; } /** - * The percentage of Database Monitoring normalized queries usage by tag(s). - * + *

The percentage of Database Monitoring normalized queries usage by tag(s).

* @return dbmQueriesPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmQueriesPercentage() { - return dbmQueriesPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmQueriesPercentage() { + return dbmQueriesPercentage; + } public void setDbmQueriesPercentage(Double dbmQueriesPercentage) { this.dbmQueriesPercentage = dbmQueriesPercentage; } - public UsageAttributionValues dbmQueriesUsage(Double dbmQueriesUsage) { this.dbmQueriesUsage = dbmQueriesUsage; return this; } /** - * The Database Monitoring normalized queries usage by tag(s). - * + *

The Database Monitoring normalized queries usage by tag(s).

* @return dbmQueriesUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDbmQueriesUsage() { - return dbmQueriesUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getDbmQueriesUsage() { + return dbmQueriesUsage; + } public void setDbmQueriesUsage(Double dbmQueriesUsage) { this.dbmQueriesUsage = dbmQueriesUsage; } - - public UsageAttributionValues estimatedIndexedLogsPercentage( - Double estimatedIndexedLogsPercentage) { + public UsageAttributionValues estimatedIndexedLogsPercentage(Double estimatedIndexedLogsPercentage) { this.estimatedIndexedLogsPercentage = estimatedIndexedLogsPercentage; return this; } /** - * The percentage of estimated live indexed logs usage by tag(s). - * + *

The percentage of estimated live indexed logs usage by tag(s).

* @return estimatedIndexedLogsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedLogsPercentage() { - return estimatedIndexedLogsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedLogsPercentage() { + return estimatedIndexedLogsPercentage; + } public void setEstimatedIndexedLogsPercentage(Double estimatedIndexedLogsPercentage) { this.estimatedIndexedLogsPercentage = estimatedIndexedLogsPercentage; } - public UsageAttributionValues estimatedIndexedLogsUsage(Double estimatedIndexedLogsUsage) { this.estimatedIndexedLogsUsage = estimatedIndexedLogsUsage; return this; } /** - * The estimated live indexed logs usage by tag(s). - * + *

The estimated live indexed logs usage by tag(s).

* @return estimatedIndexedLogsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedLogsUsage() { - return estimatedIndexedLogsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_LOGS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedLogsUsage() { + return estimatedIndexedLogsUsage; + } public void setEstimatedIndexedLogsUsage(Double estimatedIndexedLogsUsage) { this.estimatedIndexedLogsUsage = estimatedIndexedLogsUsage; } - - public UsageAttributionValues estimatedIndexedSpansPercentage( - Double estimatedIndexedSpansPercentage) { + public UsageAttributionValues estimatedIndexedSpansPercentage(Double estimatedIndexedSpansPercentage) { this.estimatedIndexedSpansPercentage = estimatedIndexedSpansPercentage; return this; } /** - * The percentage of estimated indexed spans usage by tag(s). - * + *

The percentage of estimated indexed spans usage by tag(s).

* @return estimatedIndexedSpansPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedSpansPercentage() { - return estimatedIndexedSpansPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedSpansPercentage() { + return estimatedIndexedSpansPercentage; + } public void setEstimatedIndexedSpansPercentage(Double estimatedIndexedSpansPercentage) { this.estimatedIndexedSpansPercentage = estimatedIndexedSpansPercentage; } - public UsageAttributionValues estimatedIndexedSpansUsage(Double estimatedIndexedSpansUsage) { this.estimatedIndexedSpansUsage = estimatedIndexedSpansUsage; return this; } /** - * The estimated indexed spans usage by tag(s). - * + *

The estimated indexed spans usage by tag(s).

* @return estimatedIndexedSpansUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIndexedSpansUsage() { - return estimatedIndexedSpansUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INDEXED_SPANS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIndexedSpansUsage() { + return estimatedIndexedSpansUsage; + } public void setEstimatedIndexedSpansUsage(Double estimatedIndexedSpansUsage) { this.estimatedIndexedSpansUsage = estimatedIndexedSpansUsage; } - - public UsageAttributionValues estimatedIngestedLogsPercentage( - Double estimatedIngestedLogsPercentage) { + public UsageAttributionValues estimatedIngestedLogsPercentage(Double estimatedIngestedLogsPercentage) { this.estimatedIngestedLogsPercentage = estimatedIngestedLogsPercentage; return this; } /** - * The percentage of estimated live ingested logs usage by tag(s). - * + *

The percentage of estimated live ingested logs usage by tag(s).

* @return estimatedIngestedLogsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedLogsPercentage() { - return estimatedIngestedLogsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedLogsPercentage() { + return estimatedIngestedLogsPercentage; + } public void setEstimatedIngestedLogsPercentage(Double estimatedIngestedLogsPercentage) { this.estimatedIngestedLogsPercentage = estimatedIngestedLogsPercentage; } - public UsageAttributionValues estimatedIngestedLogsUsage(Double estimatedIngestedLogsUsage) { this.estimatedIngestedLogsUsage = estimatedIngestedLogsUsage; return this; } /** - * The estimated live ingested logs usage by tag(s). - * + *

The estimated live ingested logs usage by tag(s).

* @return estimatedIngestedLogsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedLogsUsage() { - return estimatedIngestedLogsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_LOGS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedLogsUsage() { + return estimatedIngestedLogsUsage; + } public void setEstimatedIngestedLogsUsage(Double estimatedIngestedLogsUsage) { this.estimatedIngestedLogsUsage = estimatedIngestedLogsUsage; } - - public UsageAttributionValues estimatedIngestedSpansPercentage( - Double estimatedIngestedSpansPercentage) { + public UsageAttributionValues estimatedIngestedSpansPercentage(Double estimatedIngestedSpansPercentage) { this.estimatedIngestedSpansPercentage = estimatedIngestedSpansPercentage; return this; } /** - * The percentage of estimated ingested spans usage by tag(s). - * + *

The percentage of estimated ingested spans usage by tag(s).

* @return estimatedIngestedSpansPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedSpansPercentage() { - return estimatedIngestedSpansPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedSpansPercentage() { + return estimatedIngestedSpansPercentage; + } public void setEstimatedIngestedSpansPercentage(Double estimatedIngestedSpansPercentage) { this.estimatedIngestedSpansPercentage = estimatedIngestedSpansPercentage; } - public UsageAttributionValues estimatedIngestedSpansUsage(Double estimatedIngestedSpansUsage) { this.estimatedIngestedSpansUsage = estimatedIngestedSpansUsage; return this; } /** - * The estimated ingested spans usage by tag(s). - * + *

The estimated ingested spans usage by tag(s).

* @return estimatedIngestedSpansUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedIngestedSpansUsage() { - return estimatedIngestedSpansUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_INGESTED_SPANS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedIngestedSpansUsage() { + return estimatedIngestedSpansUsage; + } public void setEstimatedIngestedSpansUsage(Double estimatedIngestedSpansUsage) { this.estimatedIngestedSpansUsage = estimatedIngestedSpansUsage; } - - public UsageAttributionValues estimatedRumSessionsPercentage( - Double estimatedRumSessionsPercentage) { + public UsageAttributionValues estimatedRumSessionsPercentage(Double estimatedRumSessionsPercentage) { this.estimatedRumSessionsPercentage = estimatedRumSessionsPercentage; return this; } /** - * The percentage of estimated rum sessions usage by tag(s). - * + *

The percentage of estimated rum sessions usage by tag(s).

* @return estimatedRumSessionsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedRumSessionsPercentage() { - return estimatedRumSessionsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedRumSessionsPercentage() { + return estimatedRumSessionsPercentage; + } public void setEstimatedRumSessionsPercentage(Double estimatedRumSessionsPercentage) { this.estimatedRumSessionsPercentage = estimatedRumSessionsPercentage; } - public UsageAttributionValues estimatedRumSessionsUsage(Double estimatedRumSessionsUsage) { this.estimatedRumSessionsUsage = estimatedRumSessionsUsage; return this; } /** - * The estimated rum sessions usage by tag(s). - * + *

The estimated rum sessions usage by tag(s).

* @return estimatedRumSessionsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getEstimatedRumSessionsUsage() { - return estimatedRumSessionsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_RUM_SESSIONS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedRumSessionsUsage() { + return estimatedRumSessionsUsage; + } public void setEstimatedRumSessionsUsage(Double estimatedRumSessionsUsage) { this.estimatedRumSessionsUsage = estimatedRumSessionsUsage; } - public UsageAttributionValues infraHostPercentage(Double infraHostPercentage) { this.infraHostPercentage = infraHostPercentage; return this; } /** - * The percentage of infrastructure host usage by tag(s). - * + *

The percentage of infrastructure host usage by tag(s).

* @return infraHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInfraHostPercentage() { - return infraHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInfraHostPercentage() { + return infraHostPercentage; + } public void setInfraHostPercentage(Double infraHostPercentage) { this.infraHostPercentage = infraHostPercentage; } - public UsageAttributionValues infraHostUsage(Double infraHostUsage) { this.infraHostUsage = infraHostUsage; return this; } /** - * The infrastructure host usage by tag(s). - * + *

The infrastructure host usage by tag(s).

* @return infraHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getInfraHostUsage() { - return infraHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getInfraHostUsage() { + return infraHostUsage; + } public void setInfraHostUsage(Double infraHostUsage) { this.infraHostUsage = infraHostUsage; } - public UsageAttributionValues lambdaFunctionsPercentage(Double lambdaFunctionsPercentage) { this.lambdaFunctionsPercentage = lambdaFunctionsPercentage; return this; } /** - * The percentage of Lambda function usage by tag(s). - * + *

The percentage of Lambda function usage by tag(s).

* @return lambdaFunctionsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTIONS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getLambdaFunctionsPercentage() { - return lambdaFunctionsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTIONS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getLambdaFunctionsPercentage() { + return lambdaFunctionsPercentage; + } public void setLambdaFunctionsPercentage(Double lambdaFunctionsPercentage) { this.lambdaFunctionsPercentage = lambdaFunctionsPercentage; } - public UsageAttributionValues lambdaFunctionsUsage(Double lambdaFunctionsUsage) { this.lambdaFunctionsUsage = lambdaFunctionsUsage; return this; } /** - * The Lambda function usage by tag(s). - * + *

The Lambda function usage by tag(s).

* @return lambdaFunctionsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTIONS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getLambdaFunctionsUsage() { - return lambdaFunctionsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTIONS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getLambdaFunctionsUsage() { + return lambdaFunctionsUsage; + } public void setLambdaFunctionsUsage(Double lambdaFunctionsUsage) { this.lambdaFunctionsUsage = lambdaFunctionsUsage; } - public UsageAttributionValues lambdaInvocationsPercentage(Double lambdaInvocationsPercentage) { this.lambdaInvocationsPercentage = lambdaInvocationsPercentage; return this; } /** - * The percentage of Lambda invocation usage by tag(s). - * + *

The percentage of Lambda invocation usage by tag(s).

* @return lambdaInvocationsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDA_INVOCATIONS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getLambdaInvocationsPercentage() { - return lambdaInvocationsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDA_INVOCATIONS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getLambdaInvocationsPercentage() { + return lambdaInvocationsPercentage; + } public void setLambdaInvocationsPercentage(Double lambdaInvocationsPercentage) { this.lambdaInvocationsPercentage = lambdaInvocationsPercentage; } - public UsageAttributionValues lambdaInvocationsUsage(Double lambdaInvocationsUsage) { this.lambdaInvocationsUsage = lambdaInvocationsUsage; return this; } /** - * The Lambda invocation usage by tag(s). - * + *

The Lambda invocation usage by tag(s).

* @return lambdaInvocationsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDA_INVOCATIONS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getLambdaInvocationsUsage() { - return lambdaInvocationsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDA_INVOCATIONS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getLambdaInvocationsUsage() { + return lambdaInvocationsUsage; + } public void setLambdaInvocationsUsage(Double lambdaInvocationsUsage) { this.lambdaInvocationsUsage = lambdaInvocationsUsage; } - public UsageAttributionValues npmHostPercentage(Double npmHostPercentage) { this.npmHostPercentage = npmHostPercentage; return this; } /** - * The percentage of network host usage by tag(s). - * + *

The percentage of network host usage by tag(s).

* @return npmHostPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getNpmHostPercentage() { - return npmHostPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getNpmHostPercentage() { + return npmHostPercentage; + } public void setNpmHostPercentage(Double npmHostPercentage) { this.npmHostPercentage = npmHostPercentage; } - public UsageAttributionValues npmHostUsage(Double npmHostUsage) { this.npmHostUsage = npmHostUsage; return this; } /** - * The network host usage by tag(s). - * + *

The network host usage by tag(s).

* @return npmHostUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getNpmHostUsage() { - return npmHostUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getNpmHostUsage() { + return npmHostUsage; + } public void setNpmHostUsage(Double npmHostUsage) { this.npmHostUsage = npmHostUsage; } - public UsageAttributionValues profiledContainerPercentage(Double profiledContainerPercentage) { this.profiledContainerPercentage = profiledContainerPercentage; return this; } /** - * The percentage of profiled containers usage by tag(s). - * + *

The percentage of profiled containers usage by tag(s).

* @return profiledContainerPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledContainerPercentage() { - return profiledContainerPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledContainerPercentage() { + return profiledContainerPercentage; + } public void setProfiledContainerPercentage(Double profiledContainerPercentage) { this.profiledContainerPercentage = profiledContainerPercentage; } - public UsageAttributionValues profiledContainerUsage(Double profiledContainerUsage) { this.profiledContainerUsage = profiledContainerUsage; return this; } /** - * The profiled container usage by tag(s). - * + *

The profiled container usage by tag(s).

* @return profiledContainerUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledContainerUsage() { - return profiledContainerUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_CONTAINER_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledContainerUsage() { + return profiledContainerUsage; + } public void setProfiledContainerUsage(Double profiledContainerUsage) { this.profiledContainerUsage = profiledContainerUsage; } - public UsageAttributionValues profiledHostsPercentage(Double profiledHostsPercentage) { this.profiledHostsPercentage = profiledHostsPercentage; return this; } /** - * The percentage of profiled hosts usage by tag(s). - * + *

The percentage of profiled hosts usage by tag(s).

* @return profiledHostsPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_HOSTS_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledHostsPercentage() { - return profiledHostsPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_HOSTS_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledHostsPercentage() { + return profiledHostsPercentage; + } public void setProfiledHostsPercentage(Double profiledHostsPercentage) { this.profiledHostsPercentage = profiledHostsPercentage; } - public UsageAttributionValues profiledHostsUsage(Double profiledHostsUsage) { this.profiledHostsUsage = profiledHostsUsage; return this; } /** - * The profiled host usage by tag(s). - * + *

The profiled host usage by tag(s).

* @return profiledHostsUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILED_HOSTS_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProfiledHostsUsage() { - return profiledHostsUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILED_HOSTS_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getProfiledHostsUsage() { + return profiledHostsUsage; + } public void setProfiledHostsUsage(Double profiledHostsUsage) { this.profiledHostsUsage = profiledHostsUsage; } - public UsageAttributionValues snmpPercentage(Double snmpPercentage) { this.snmpPercentage = snmpPercentage; return this; } /** - * The percentage of network device usage by tag(s). - * + *

The percentage of network device usage by tag(s).

* @return snmpPercentage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNMP_PERCENTAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSnmpPercentage() { - return snmpPercentage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_PERCENTAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSnmpPercentage() { + return snmpPercentage; + } public void setSnmpPercentage(Double snmpPercentage) { this.snmpPercentage = snmpPercentage; } - public UsageAttributionValues snmpUsage(Double snmpUsage) { this.snmpUsage = snmpUsage; return this; } /** - * The network device usage by tag(s). - * + *

The network device usage by tag(s).

* @return snmpUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNMP_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getSnmpUsage() { - return snmpUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getSnmpUsage() { + return snmpUsage; + } public void setSnmpUsage(Double snmpUsage) { this.snmpUsage = snmpUsage; } - /** Return true if this UsageAttributionValues object is equal to o. */ + /** + * Return true if this UsageAttributionValues object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -1348,140 +1248,13 @@ public boolean equals(Object o) { return false; } UsageAttributionValues usageAttributionValues = (UsageAttributionValues) o; - return Objects.equals(this.apiPercentage, usageAttributionValues.apiPercentage) - && Objects.equals(this.apiUsage, usageAttributionValues.apiUsage) - && Objects.equals(this.apmFargatePercentage, usageAttributionValues.apmFargatePercentage) - && Objects.equals(this.apmFargateUsage, usageAttributionValues.apmFargateUsage) - && Objects.equals(this.apmHostPercentage, usageAttributionValues.apmHostPercentage) - && Objects.equals(this.apmHostUsage, usageAttributionValues.apmHostUsage) - && Objects.equals( - this.appsecFargatePercentage, usageAttributionValues.appsecFargatePercentage) - && Objects.equals(this.appsecFargateUsage, usageAttributionValues.appsecFargateUsage) - && Objects.equals(this.appsecPercentage, usageAttributionValues.appsecPercentage) - && Objects.equals(this.appsecUsage, usageAttributionValues.appsecUsage) - && Objects.equals(this.browserPercentage, usageAttributionValues.browserPercentage) - && Objects.equals(this.browserUsage, usageAttributionValues.browserUsage) - && Objects.equals(this.containerPercentage, usageAttributionValues.containerPercentage) - && Objects.equals(this.containerUsage, usageAttributionValues.containerUsage) - && Objects.equals( - this.cspmContainerPercentage, usageAttributionValues.cspmContainerPercentage) - && Objects.equals(this.cspmContainerUsage, usageAttributionValues.cspmContainerUsage) - && Objects.equals(this.cspmHostPercentage, usageAttributionValues.cspmHostPercentage) - && Objects.equals(this.cspmHostUsage, usageAttributionValues.cspmHostUsage) - && Objects.equals( - this.customTimeseriesPercentage, usageAttributionValues.customTimeseriesPercentage) - && Objects.equals(this.customTimeseriesUsage, usageAttributionValues.customTimeseriesUsage) - && Objects.equals( - this.cwsContainerPercentage, usageAttributionValues.cwsContainerPercentage) - && Objects.equals(this.cwsContainerUsage, usageAttributionValues.cwsContainerUsage) - && Objects.equals(this.cwsHostPercentage, usageAttributionValues.cwsHostPercentage) - && Objects.equals(this.cwsHostUsage, usageAttributionValues.cwsHostUsage) - && Objects.equals(this.dbmHostsPercentage, usageAttributionValues.dbmHostsPercentage) - && Objects.equals(this.dbmHostsUsage, usageAttributionValues.dbmHostsUsage) - && Objects.equals(this.dbmQueriesPercentage, usageAttributionValues.dbmQueriesPercentage) - && Objects.equals(this.dbmQueriesUsage, usageAttributionValues.dbmQueriesUsage) - && Objects.equals( - this.estimatedIndexedLogsPercentage, - usageAttributionValues.estimatedIndexedLogsPercentage) - && Objects.equals( - this.estimatedIndexedLogsUsage, usageAttributionValues.estimatedIndexedLogsUsage) - && Objects.equals( - this.estimatedIndexedSpansPercentage, - usageAttributionValues.estimatedIndexedSpansPercentage) - && Objects.equals( - this.estimatedIndexedSpansUsage, usageAttributionValues.estimatedIndexedSpansUsage) - && Objects.equals( - this.estimatedIngestedLogsPercentage, - usageAttributionValues.estimatedIngestedLogsPercentage) - && Objects.equals( - this.estimatedIngestedLogsUsage, usageAttributionValues.estimatedIngestedLogsUsage) - && Objects.equals( - this.estimatedIngestedSpansPercentage, - usageAttributionValues.estimatedIngestedSpansPercentage) - && Objects.equals( - this.estimatedIngestedSpansUsage, usageAttributionValues.estimatedIngestedSpansUsage) - && Objects.equals( - this.estimatedRumSessionsPercentage, - usageAttributionValues.estimatedRumSessionsPercentage) - && Objects.equals( - this.estimatedRumSessionsUsage, usageAttributionValues.estimatedRumSessionsUsage) - && Objects.equals(this.infraHostPercentage, usageAttributionValues.infraHostPercentage) - && Objects.equals(this.infraHostUsage, usageAttributionValues.infraHostUsage) - && Objects.equals( - this.lambdaFunctionsPercentage, usageAttributionValues.lambdaFunctionsPercentage) - && Objects.equals(this.lambdaFunctionsUsage, usageAttributionValues.lambdaFunctionsUsage) - && Objects.equals( - this.lambdaInvocationsPercentage, usageAttributionValues.lambdaInvocationsPercentage) - && Objects.equals( - this.lambdaInvocationsUsage, usageAttributionValues.lambdaInvocationsUsage) - && Objects.equals(this.npmHostPercentage, usageAttributionValues.npmHostPercentage) - && Objects.equals(this.npmHostUsage, usageAttributionValues.npmHostUsage) - && Objects.equals( - this.profiledContainerPercentage, usageAttributionValues.profiledContainerPercentage) - && Objects.equals( - this.profiledContainerUsage, usageAttributionValues.profiledContainerUsage) - && Objects.equals( - this.profiledHostsPercentage, usageAttributionValues.profiledHostsPercentage) - && Objects.equals(this.profiledHostsUsage, usageAttributionValues.profiledHostsUsage) - && Objects.equals(this.snmpPercentage, usageAttributionValues.snmpPercentage) - && Objects.equals(this.snmpUsage, usageAttributionValues.snmpUsage); + return Objects.equals(this.apiPercentage, usageAttributionValues.apiPercentage) && Objects.equals(this.apiUsage, usageAttributionValues.apiUsage) && Objects.equals(this.apmFargatePercentage, usageAttributionValues.apmFargatePercentage) && Objects.equals(this.apmFargateUsage, usageAttributionValues.apmFargateUsage) && Objects.equals(this.apmHostPercentage, usageAttributionValues.apmHostPercentage) && Objects.equals(this.apmHostUsage, usageAttributionValues.apmHostUsage) && Objects.equals(this.appsecFargatePercentage, usageAttributionValues.appsecFargatePercentage) && Objects.equals(this.appsecFargateUsage, usageAttributionValues.appsecFargateUsage) && Objects.equals(this.appsecPercentage, usageAttributionValues.appsecPercentage) && Objects.equals(this.appsecUsage, usageAttributionValues.appsecUsage) && Objects.equals(this.browserPercentage, usageAttributionValues.browserPercentage) && Objects.equals(this.browserUsage, usageAttributionValues.browserUsage) && Objects.equals(this.containerPercentage, usageAttributionValues.containerPercentage) && Objects.equals(this.containerUsage, usageAttributionValues.containerUsage) && Objects.equals(this.cspmContainerPercentage, usageAttributionValues.cspmContainerPercentage) && Objects.equals(this.cspmContainerUsage, usageAttributionValues.cspmContainerUsage) && Objects.equals(this.cspmHostPercentage, usageAttributionValues.cspmHostPercentage) && Objects.equals(this.cspmHostUsage, usageAttributionValues.cspmHostUsage) && Objects.equals(this.customTimeseriesPercentage, usageAttributionValues.customTimeseriesPercentage) && Objects.equals(this.customTimeseriesUsage, usageAttributionValues.customTimeseriesUsage) && Objects.equals(this.cwsContainerPercentage, usageAttributionValues.cwsContainerPercentage) && Objects.equals(this.cwsContainerUsage, usageAttributionValues.cwsContainerUsage) && Objects.equals(this.cwsHostPercentage, usageAttributionValues.cwsHostPercentage) && Objects.equals(this.cwsHostUsage, usageAttributionValues.cwsHostUsage) && Objects.equals(this.dbmHostsPercentage, usageAttributionValues.dbmHostsPercentage) && Objects.equals(this.dbmHostsUsage, usageAttributionValues.dbmHostsUsage) && Objects.equals(this.dbmQueriesPercentage, usageAttributionValues.dbmQueriesPercentage) && Objects.equals(this.dbmQueriesUsage, usageAttributionValues.dbmQueriesUsage) && Objects.equals(this.estimatedIndexedLogsPercentage, usageAttributionValues.estimatedIndexedLogsPercentage) && Objects.equals(this.estimatedIndexedLogsUsage, usageAttributionValues.estimatedIndexedLogsUsage) && Objects.equals(this.estimatedIndexedSpansPercentage, usageAttributionValues.estimatedIndexedSpansPercentage) && Objects.equals(this.estimatedIndexedSpansUsage, usageAttributionValues.estimatedIndexedSpansUsage) && Objects.equals(this.estimatedIngestedLogsPercentage, usageAttributionValues.estimatedIngestedLogsPercentage) && Objects.equals(this.estimatedIngestedLogsUsage, usageAttributionValues.estimatedIngestedLogsUsage) && Objects.equals(this.estimatedIngestedSpansPercentage, usageAttributionValues.estimatedIngestedSpansPercentage) && Objects.equals(this.estimatedIngestedSpansUsage, usageAttributionValues.estimatedIngestedSpansUsage) && Objects.equals(this.estimatedRumSessionsPercentage, usageAttributionValues.estimatedRumSessionsPercentage) && Objects.equals(this.estimatedRumSessionsUsage, usageAttributionValues.estimatedRumSessionsUsage) && Objects.equals(this.infraHostPercentage, usageAttributionValues.infraHostPercentage) && Objects.equals(this.infraHostUsage, usageAttributionValues.infraHostUsage) && Objects.equals(this.lambdaFunctionsPercentage, usageAttributionValues.lambdaFunctionsPercentage) && Objects.equals(this.lambdaFunctionsUsage, usageAttributionValues.lambdaFunctionsUsage) && Objects.equals(this.lambdaInvocationsPercentage, usageAttributionValues.lambdaInvocationsPercentage) && Objects.equals(this.lambdaInvocationsUsage, usageAttributionValues.lambdaInvocationsUsage) && Objects.equals(this.npmHostPercentage, usageAttributionValues.npmHostPercentage) && Objects.equals(this.npmHostUsage, usageAttributionValues.npmHostUsage) && Objects.equals(this.profiledContainerPercentage, usageAttributionValues.profiledContainerPercentage) && Objects.equals(this.profiledContainerUsage, usageAttributionValues.profiledContainerUsage) && Objects.equals(this.profiledHostsPercentage, usageAttributionValues.profiledHostsPercentage) && Objects.equals(this.profiledHostsUsage, usageAttributionValues.profiledHostsUsage) && Objects.equals(this.snmpPercentage, usageAttributionValues.snmpPercentage) && Objects.equals(this.snmpUsage, usageAttributionValues.snmpUsage); } + @Override public int hashCode() { - return Objects.hash( - apiPercentage, - apiUsage, - apmFargatePercentage, - apmFargateUsage, - apmHostPercentage, - apmHostUsage, - appsecFargatePercentage, - appsecFargateUsage, - appsecPercentage, - appsecUsage, - browserPercentage, - browserUsage, - containerPercentage, - containerUsage, - cspmContainerPercentage, - cspmContainerUsage, - cspmHostPercentage, - cspmHostUsage, - customTimeseriesPercentage, - customTimeseriesUsage, - cwsContainerPercentage, - cwsContainerUsage, - cwsHostPercentage, - cwsHostUsage, - dbmHostsPercentage, - dbmHostsUsage, - dbmQueriesPercentage, - dbmQueriesUsage, - estimatedIndexedLogsPercentage, - estimatedIndexedLogsUsage, - estimatedIndexedSpansPercentage, - estimatedIndexedSpansUsage, - estimatedIngestedLogsPercentage, - estimatedIngestedLogsUsage, - estimatedIngestedSpansPercentage, - estimatedIngestedSpansUsage, - estimatedRumSessionsPercentage, - estimatedRumSessionsUsage, - infraHostPercentage, - infraHostUsage, - lambdaFunctionsPercentage, - lambdaFunctionsUsage, - lambdaInvocationsPercentage, - lambdaInvocationsUsage, - npmHostPercentage, - npmHostUsage, - profiledContainerPercentage, - profiledContainerUsage, - profiledHostsPercentage, - profiledHostsUsage, - snmpPercentage, - snmpUsage); + return Objects.hash(apiPercentage,apiUsage,apmFargatePercentage,apmFargateUsage,apmHostPercentage,apmHostUsage,appsecFargatePercentage,appsecFargateUsage,appsecPercentage,appsecUsage,browserPercentage,browserUsage,containerPercentage,containerUsage,cspmContainerPercentage,cspmContainerUsage,cspmHostPercentage,cspmHostUsage,customTimeseriesPercentage,customTimeseriesUsage,cwsContainerPercentage,cwsContainerUsage,cwsHostPercentage,cwsHostUsage,dbmHostsPercentage,dbmHostsUsage,dbmQueriesPercentage,dbmQueriesUsage,estimatedIndexedLogsPercentage,estimatedIndexedLogsUsage,estimatedIndexedSpansPercentage,estimatedIndexedSpansUsage,estimatedIngestedLogsPercentage,estimatedIngestedLogsUsage,estimatedIngestedSpansPercentage,estimatedIngestedSpansUsage,estimatedRumSessionsPercentage,estimatedRumSessionsUsage,infraHostPercentage,infraHostUsage,lambdaFunctionsPercentage,lambdaFunctionsUsage,lambdaInvocationsPercentage,lambdaInvocationsUsage,npmHostPercentage,npmHostUsage,profiledContainerPercentage,profiledContainerUsage,profiledHostsPercentage,profiledHostsUsage,snmpPercentage,snmpUsage); } @Override @@ -1490,105 +1263,53 @@ public String toString() { sb.append("class UsageAttributionValues {\n"); sb.append(" apiPercentage: ").append(toIndentedString(apiPercentage)).append("\n"); sb.append(" apiUsage: ").append(toIndentedString(apiUsage)).append("\n"); - sb.append(" apmFargatePercentage: ") - .append(toIndentedString(apmFargatePercentage)) - .append("\n"); + sb.append(" apmFargatePercentage: ").append(toIndentedString(apmFargatePercentage)).append("\n"); sb.append(" apmFargateUsage: ").append(toIndentedString(apmFargateUsage)).append("\n"); sb.append(" apmHostPercentage: ").append(toIndentedString(apmHostPercentage)).append("\n"); sb.append(" apmHostUsage: ").append(toIndentedString(apmHostUsage)).append("\n"); - sb.append(" appsecFargatePercentage: ") - .append(toIndentedString(appsecFargatePercentage)) - .append("\n"); + sb.append(" appsecFargatePercentage: ").append(toIndentedString(appsecFargatePercentage)).append("\n"); sb.append(" appsecFargateUsage: ").append(toIndentedString(appsecFargateUsage)).append("\n"); sb.append(" appsecPercentage: ").append(toIndentedString(appsecPercentage)).append("\n"); sb.append(" appsecUsage: ").append(toIndentedString(appsecUsage)).append("\n"); sb.append(" browserPercentage: ").append(toIndentedString(browserPercentage)).append("\n"); sb.append(" browserUsage: ").append(toIndentedString(browserUsage)).append("\n"); - sb.append(" containerPercentage: ") - .append(toIndentedString(containerPercentage)) - .append("\n"); + sb.append(" containerPercentage: ").append(toIndentedString(containerPercentage)).append("\n"); sb.append(" containerUsage: ").append(toIndentedString(containerUsage)).append("\n"); - sb.append(" cspmContainerPercentage: ") - .append(toIndentedString(cspmContainerPercentage)) - .append("\n"); + sb.append(" cspmContainerPercentage: ").append(toIndentedString(cspmContainerPercentage)).append("\n"); sb.append(" cspmContainerUsage: ").append(toIndentedString(cspmContainerUsage)).append("\n"); sb.append(" cspmHostPercentage: ").append(toIndentedString(cspmHostPercentage)).append("\n"); sb.append(" cspmHostUsage: ").append(toIndentedString(cspmHostUsage)).append("\n"); - sb.append(" customTimeseriesPercentage: ") - .append(toIndentedString(customTimeseriesPercentage)) - .append("\n"); - sb.append(" customTimeseriesUsage: ") - .append(toIndentedString(customTimeseriesUsage)) - .append("\n"); - sb.append(" cwsContainerPercentage: ") - .append(toIndentedString(cwsContainerPercentage)) - .append("\n"); + sb.append(" customTimeseriesPercentage: ").append(toIndentedString(customTimeseriesPercentage)).append("\n"); + sb.append(" customTimeseriesUsage: ").append(toIndentedString(customTimeseriesUsage)).append("\n"); + sb.append(" cwsContainerPercentage: ").append(toIndentedString(cwsContainerPercentage)).append("\n"); sb.append(" cwsContainerUsage: ").append(toIndentedString(cwsContainerUsage)).append("\n"); sb.append(" cwsHostPercentage: ").append(toIndentedString(cwsHostPercentage)).append("\n"); sb.append(" cwsHostUsage: ").append(toIndentedString(cwsHostUsage)).append("\n"); sb.append(" dbmHostsPercentage: ").append(toIndentedString(dbmHostsPercentage)).append("\n"); sb.append(" dbmHostsUsage: ").append(toIndentedString(dbmHostsUsage)).append("\n"); - sb.append(" dbmQueriesPercentage: ") - .append(toIndentedString(dbmQueriesPercentage)) - .append("\n"); + sb.append(" dbmQueriesPercentage: ").append(toIndentedString(dbmQueriesPercentage)).append("\n"); sb.append(" dbmQueriesUsage: ").append(toIndentedString(dbmQueriesUsage)).append("\n"); - sb.append(" estimatedIndexedLogsPercentage: ") - .append(toIndentedString(estimatedIndexedLogsPercentage)) - .append("\n"); - sb.append(" estimatedIndexedLogsUsage: ") - .append(toIndentedString(estimatedIndexedLogsUsage)) - .append("\n"); - sb.append(" estimatedIndexedSpansPercentage: ") - .append(toIndentedString(estimatedIndexedSpansPercentage)) - .append("\n"); - sb.append(" estimatedIndexedSpansUsage: ") - .append(toIndentedString(estimatedIndexedSpansUsage)) - .append("\n"); - sb.append(" estimatedIngestedLogsPercentage: ") - .append(toIndentedString(estimatedIngestedLogsPercentage)) - .append("\n"); - sb.append(" estimatedIngestedLogsUsage: ") - .append(toIndentedString(estimatedIngestedLogsUsage)) - .append("\n"); - sb.append(" estimatedIngestedSpansPercentage: ") - .append(toIndentedString(estimatedIngestedSpansPercentage)) - .append("\n"); - sb.append(" estimatedIngestedSpansUsage: ") - .append(toIndentedString(estimatedIngestedSpansUsage)) - .append("\n"); - sb.append(" estimatedRumSessionsPercentage: ") - .append(toIndentedString(estimatedRumSessionsPercentage)) - .append("\n"); - sb.append(" estimatedRumSessionsUsage: ") - .append(toIndentedString(estimatedRumSessionsUsage)) - .append("\n"); - sb.append(" infraHostPercentage: ") - .append(toIndentedString(infraHostPercentage)) - .append("\n"); + sb.append(" estimatedIndexedLogsPercentage: ").append(toIndentedString(estimatedIndexedLogsPercentage)).append("\n"); + sb.append(" estimatedIndexedLogsUsage: ").append(toIndentedString(estimatedIndexedLogsUsage)).append("\n"); + sb.append(" estimatedIndexedSpansPercentage: ").append(toIndentedString(estimatedIndexedSpansPercentage)).append("\n"); + sb.append(" estimatedIndexedSpansUsage: ").append(toIndentedString(estimatedIndexedSpansUsage)).append("\n"); + sb.append(" estimatedIngestedLogsPercentage: ").append(toIndentedString(estimatedIngestedLogsPercentage)).append("\n"); + sb.append(" estimatedIngestedLogsUsage: ").append(toIndentedString(estimatedIngestedLogsUsage)).append("\n"); + sb.append(" estimatedIngestedSpansPercentage: ").append(toIndentedString(estimatedIngestedSpansPercentage)).append("\n"); + sb.append(" estimatedIngestedSpansUsage: ").append(toIndentedString(estimatedIngestedSpansUsage)).append("\n"); + sb.append(" estimatedRumSessionsPercentage: ").append(toIndentedString(estimatedRumSessionsPercentage)).append("\n"); + sb.append(" estimatedRumSessionsUsage: ").append(toIndentedString(estimatedRumSessionsUsage)).append("\n"); + sb.append(" infraHostPercentage: ").append(toIndentedString(infraHostPercentage)).append("\n"); sb.append(" infraHostUsage: ").append(toIndentedString(infraHostUsage)).append("\n"); - sb.append(" lambdaFunctionsPercentage: ") - .append(toIndentedString(lambdaFunctionsPercentage)) - .append("\n"); - sb.append(" lambdaFunctionsUsage: ") - .append(toIndentedString(lambdaFunctionsUsage)) - .append("\n"); - sb.append(" lambdaInvocationsPercentage: ") - .append(toIndentedString(lambdaInvocationsPercentage)) - .append("\n"); - sb.append(" lambdaInvocationsUsage: ") - .append(toIndentedString(lambdaInvocationsUsage)) - .append("\n"); + sb.append(" lambdaFunctionsPercentage: ").append(toIndentedString(lambdaFunctionsPercentage)).append("\n"); + sb.append(" lambdaFunctionsUsage: ").append(toIndentedString(lambdaFunctionsUsage)).append("\n"); + sb.append(" lambdaInvocationsPercentage: ").append(toIndentedString(lambdaInvocationsPercentage)).append("\n"); + sb.append(" lambdaInvocationsUsage: ").append(toIndentedString(lambdaInvocationsUsage)).append("\n"); sb.append(" npmHostPercentage: ").append(toIndentedString(npmHostPercentage)).append("\n"); sb.append(" npmHostUsage: ").append(toIndentedString(npmHostUsage)).append("\n"); - sb.append(" profiledContainerPercentage: ") - .append(toIndentedString(profiledContainerPercentage)) - .append("\n"); - sb.append(" profiledContainerUsage: ") - .append(toIndentedString(profiledContainerUsage)) - .append("\n"); - sb.append(" profiledHostsPercentage: ") - .append(toIndentedString(profiledHostsPercentage)) - .append("\n"); + sb.append(" profiledContainerPercentage: ").append(toIndentedString(profiledContainerPercentage)).append("\n"); + sb.append(" profiledContainerUsage: ").append(toIndentedString(profiledContainerUsage)).append("\n"); + sb.append(" profiledHostsPercentage: ").append(toIndentedString(profiledHostsPercentage)).append("\n"); sb.append(" profiledHostsUsage: ").append(toIndentedString(profiledHostsUsage)).append("\n"); sb.append(" snmpPercentage: ").append(toIndentedString(snmpPercentage)).append("\n"); sb.append(" snmpUsage: ").append(toIndentedString(snmpUsage)).append("\n"); @@ -1597,7 +1318,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsHour.java index 1e21574734a..45a7639fe5c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Audit logs usage for a given organization for a given hour. */ + +/** + *

Audit logs usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageAuditLogsHour.JSON_PROPERTY_HOUR, UsageAuditLogsHour.JSON_PROPERTY_LINES_INDEXED, UsageAuditLogsHour.JSON_PROPERTY_ORG_NAME, UsageAuditLogsHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAuditLogsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageAuditLogsHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageAuditLogsHour linesIndexed(Long linesIndexed) { this.linesIndexed = linesIndexed; return this; } /** - * The total number of audit logs lines indexed during a given hour. - * + *

The total number of audit logs lines indexed during a given hour.

* @return linesIndexed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINES_INDEXED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLinesIndexed() { - return linesIndexed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINES_INDEXED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLinesIndexed() { + return linesIndexed; + } public void setLinesIndexed(Long linesIndexed) { this.linesIndexed = linesIndexed; } - public UsageAuditLogsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageAuditLogsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageAuditLogsHour object is equal to o. */ + /** + * Return true if this UsageAuditLogsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageAuditLogsHour usageAuditLogsHour = (UsageAuditLogsHour) o; - return Objects.equals(this.hour, usageAuditLogsHour.hour) - && Objects.equals(this.linesIndexed, usageAuditLogsHour.linesIndexed) - && Objects.equals(this.orgName, usageAuditLogsHour.orgName) - && Objects.equals(this.publicId, usageAuditLogsHour.publicId); + return Objects.equals(this.hour, usageAuditLogsHour.hour) && Objects.equals(this.linesIndexed, usageAuditLogsHour.linesIndexed) && Objects.equals(this.orgName, usageAuditLogsHour.orgName) && Objects.equals(this.publicId, usageAuditLogsHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, linesIndexed, orgName, publicId); + return Objects.hash(hour,linesIndexed,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsResponse.java index 208dab23d39..371202018ad 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageAuditLogsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the audit logs usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageAuditLogsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the audit logs usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageAuditLogsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAuditLogsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageAuditLogsResponse usage(List usage) { } return this; } - public UsageAuditLogsResponse addUsageItem(UsageAuditLogsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageAuditLogsResponse addUsageItem(UsageAuditLogsHour usageItem) { } /** - * Get hourly usage for audit logs. - * + *

Get hourly usage for audit logs.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageAuditLogsResponse object is equal to o. */ + /** + * Return true if this UsageAuditLogsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageAuditLogsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryBody.java b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryBody.java index 9bc7b805c01..e2d5537efbe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryBody.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryBody.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with properties for each aggregated usage type. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with properties for each aggregated usage type.

+ */ @JsonPropertyOrder({ UsageBillableSummaryBody.JSON_PROPERTY_ACCOUNT_BILLABLE_USAGE, UsageBillableSummaryBody.JSON_PROPERTY_ELAPSED_USAGE_HOURS, @@ -25,10 +42,10 @@ UsageBillableSummaryBody.JSON_PROPERTY_PERCENTAGE_IN_ACCOUNT, UsageBillableSummaryBody.JSON_PROPERTY_USAGE_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageBillableSummaryBody { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_BILLABLE_USAGE = "account_billable_usage"; private Long accountBillableUsage; @@ -36,12 +53,10 @@ public class UsageBillableSummaryBody { private Long elapsedUsageHours; public static final String JSON_PROPERTY_FIRST_BILLABLE_USAGE_HOUR = "first_billable_usage_hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime firstBillableUsageHour; public static final String JSON_PROPERTY_LAST_BILLABLE_USAGE_HOUR = "last_billable_usage_hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime lastBillableUsageHour; @@ -60,148 +75,137 @@ public UsageBillableSummaryBody accountBillableUsage(Long accountBillableUsage) } /** - * The total account usage. - * + *

The total account usage.

* @return accountBillableUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_BILLABLE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAccountBillableUsage() { - return accountBillableUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_BILLABLE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAccountBillableUsage() { + return accountBillableUsage; + } public void setAccountBillableUsage(Long accountBillableUsage) { this.accountBillableUsage = accountBillableUsage; } - public UsageBillableSummaryBody elapsedUsageHours(Long elapsedUsageHours) { this.elapsedUsageHours = elapsedUsageHours; return this; } /** - * Elapsed usage hours for some billable product. - * + *

Elapsed usage hours for some billable product.

* @return elapsedUsageHours - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED_USAGE_HOURS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsedUsageHours() { - return elapsedUsageHours; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED_USAGE_HOURS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsedUsageHours() { + return elapsedUsageHours; + } public void setElapsedUsageHours(Long elapsedUsageHours) { this.elapsedUsageHours = elapsedUsageHours; } - public UsageBillableSummaryBody firstBillableUsageHour(OffsetDateTime firstBillableUsageHour) { this.firstBillableUsageHour = firstBillableUsageHour; return this; } /** - * The first billable hour for the org. - * + *

The first billable hour for the org.

* @return firstBillableUsageHour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIRST_BILLABLE_USAGE_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getFirstBillableUsageHour() { - return firstBillableUsageHour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_BILLABLE_USAGE_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getFirstBillableUsageHour() { + return firstBillableUsageHour; + } public void setFirstBillableUsageHour(OffsetDateTime firstBillableUsageHour) { this.firstBillableUsageHour = firstBillableUsageHour; } - public UsageBillableSummaryBody lastBillableUsageHour(OffsetDateTime lastBillableUsageHour) { this.lastBillableUsageHour = lastBillableUsageHour; return this; } /** - * The last billable hour for the org. - * + *

The last billable hour for the org.

* @return lastBillableUsageHour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_BILLABLE_USAGE_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getLastBillableUsageHour() { - return lastBillableUsageHour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_BILLABLE_USAGE_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastBillableUsageHour() { + return lastBillableUsageHour; + } public void setLastBillableUsageHour(OffsetDateTime lastBillableUsageHour) { this.lastBillableUsageHour = lastBillableUsageHour; } - public UsageBillableSummaryBody orgBillableUsage(Long orgBillableUsage) { this.orgBillableUsage = orgBillableUsage; return this; } /** - * The number of units used within the billable timeframe. - * + *

The number of units used within the billable timeframe.

* @return orgBillableUsage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_BILLABLE_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOrgBillableUsage() { - return orgBillableUsage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_BILLABLE_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrgBillableUsage() { + return orgBillableUsage; + } public void setOrgBillableUsage(Long orgBillableUsage) { this.orgBillableUsage = orgBillableUsage; } - public UsageBillableSummaryBody percentageInAccount(Double percentageInAccount) { this.percentageInAccount = percentageInAccount; return this; } /** - * The percentage of account usage the org represents. - * + *

The percentage of account usage the org represents.

* @return percentageInAccount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PERCENTAGE_IN_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getPercentageInAccount() { - return percentageInAccount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERCENTAGE_IN_ACCOUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getPercentageInAccount() { + return percentageInAccount; + } public void setPercentageInAccount(Double percentageInAccount) { this.percentageInAccount = percentageInAccount; } - public UsageBillableSummaryBody usageUnit(String usageUnit) { this.usageUnit = usageUnit; return this; } /** - * Units pertaining to the usage. - * + *

Units pertaining to the usage.

* @return usageUnit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUsageUnit() { - return usageUnit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUsageUnit() { + return usageUnit; + } public void setUsageUnit(String usageUnit) { this.usageUnit = usageUnit; } - /** Return true if this UsageBillableSummaryBody object is equal to o. */ + /** + * Return true if this UsageBillableSummaryBody object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -211,54 +215,33 @@ public boolean equals(Object o) { return false; } UsageBillableSummaryBody usageBillableSummaryBody = (UsageBillableSummaryBody) o; - return Objects.equals(this.accountBillableUsage, usageBillableSummaryBody.accountBillableUsage) - && Objects.equals(this.elapsedUsageHours, usageBillableSummaryBody.elapsedUsageHours) - && Objects.equals( - this.firstBillableUsageHour, usageBillableSummaryBody.firstBillableUsageHour) - && Objects.equals( - this.lastBillableUsageHour, usageBillableSummaryBody.lastBillableUsageHour) - && Objects.equals(this.orgBillableUsage, usageBillableSummaryBody.orgBillableUsage) - && Objects.equals(this.percentageInAccount, usageBillableSummaryBody.percentageInAccount) - && Objects.equals(this.usageUnit, usageBillableSummaryBody.usageUnit); + return Objects.equals(this.accountBillableUsage, usageBillableSummaryBody.accountBillableUsage) && Objects.equals(this.elapsedUsageHours, usageBillableSummaryBody.elapsedUsageHours) && Objects.equals(this.firstBillableUsageHour, usageBillableSummaryBody.firstBillableUsageHour) && Objects.equals(this.lastBillableUsageHour, usageBillableSummaryBody.lastBillableUsageHour) && Objects.equals(this.orgBillableUsage, usageBillableSummaryBody.orgBillableUsage) && Objects.equals(this.percentageInAccount, usageBillableSummaryBody.percentageInAccount) && Objects.equals(this.usageUnit, usageBillableSummaryBody.usageUnit); } + @Override public int hashCode() { - return Objects.hash( - accountBillableUsage, - elapsedUsageHours, - firstBillableUsageHour, - lastBillableUsageHour, - orgBillableUsage, - percentageInAccount, - usageUnit); + return Objects.hash(accountBillableUsage,elapsedUsageHours,firstBillableUsageHour,lastBillableUsageHour,orgBillableUsage,percentageInAccount,usageUnit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageBillableSummaryBody {\n"); - sb.append(" accountBillableUsage: ") - .append(toIndentedString(accountBillableUsage)) - .append("\n"); + sb.append(" accountBillableUsage: ").append(toIndentedString(accountBillableUsage)).append("\n"); sb.append(" elapsedUsageHours: ").append(toIndentedString(elapsedUsageHours)).append("\n"); - sb.append(" firstBillableUsageHour: ") - .append(toIndentedString(firstBillableUsageHour)) - .append("\n"); - sb.append(" lastBillableUsageHour: ") - .append(toIndentedString(lastBillableUsageHour)) - .append("\n"); + sb.append(" firstBillableUsageHour: ").append(toIndentedString(firstBillableUsageHour)).append("\n"); + sb.append(" lastBillableUsageHour: ").append(toIndentedString(lastBillableUsageHour)).append("\n"); sb.append(" orgBillableUsage: ").append(toIndentedString(orgBillableUsage)).append("\n"); - sb.append(" percentageInAccount: ") - .append(toIndentedString(percentageInAccount)) - .append("\n"); + sb.append(" percentageInAccount: ").append(toIndentedString(percentageInAccount)).append("\n"); sb.append(" usageUnit: ").append(toIndentedString(usageUnit)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryHour.java index 88846f4fa5e..8fb553e66c7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with monthly summary of data billed by Datadog. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with monthly summary of data billed by Datadog.

+ */ @JsonPropertyOrder({ UsageBillableSummaryHour.JSON_PROPERTY_BILLING_PLAN, UsageBillableSummaryHour.JSON_PROPERTY_END_DATE, @@ -27,15 +44,14 @@ UsageBillableSummaryHour.JSON_PROPERTY_START_DATE, UsageBillableSummaryHour.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageBillableSummaryHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BILLING_PLAN = "billing_plan"; private String billingPlan; public static final String JSON_PROPERTY_END_DATE = "end_date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime endDate; @@ -55,7 +71,6 @@ public class UsageBillableSummaryHour { private String region; public static final String JSON_PROPERTY_START_DATE = "start_date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime startDate; @@ -68,168 +83,152 @@ public UsageBillableSummaryHour billingPlan(String billingPlan) { } /** - * The billing plan. - * + *

The billing plan.

* @return billingPlan - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLING_PLAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBillingPlan() { - return billingPlan; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLING_PLAN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getBillingPlan() { + return billingPlan; + } public void setBillingPlan(String billingPlan) { this.billingPlan = billingPlan; } - public UsageBillableSummaryHour endDate(OffsetDateTime endDate) { this.endDate = endDate; return this; } /** - * Shows the last date of usage. - * + *

Shows the last date of usage.

* @return endDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getEndDate() { - return endDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getEndDate() { + return endDate; + } public void setEndDate(OffsetDateTime endDate) { this.endDate = endDate; } - public UsageBillableSummaryHour numOrgs(Long numOrgs) { this.numOrgs = numOrgs; return this; } /** - * The number of organizations. - * + *

The number of organizations.

* @return numOrgs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUM_ORGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumOrgs() { - return numOrgs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ORGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumOrgs() { + return numOrgs; + } public void setNumOrgs(Long numOrgs) { this.numOrgs = numOrgs; } - public UsageBillableSummaryHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageBillableSummaryHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageBillableSummaryHour ratioInMonth(Double ratioInMonth) { this.ratioInMonth = ratioInMonth; return this; } /** - * Shows usage aggregation for a billing period. - * + *

Shows usage aggregation for a billing period.

* @return ratioInMonth - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RATIO_IN_MONTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getRatioInMonth() { - return ratioInMonth; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RATIO_IN_MONTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getRatioInMonth() { + return ratioInMonth; + } public void setRatioInMonth(Double ratioInMonth) { this.ratioInMonth = ratioInMonth; } - public UsageBillableSummaryHour region(String region) { this.region = region; return this; } /** - * The region of the organization. - * + *

The region of the organization.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } public void setRegion(String region) { this.region = region; } - public UsageBillableSummaryHour startDate(OffsetDateTime startDate) { this.startDate = startDate; return this; } /** - * Shows the first date of usage. - * + *

Shows the first date of usage.

* @return startDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getStartDate() { - return startDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStartDate() { + return startDate; + } public void setStartDate(OffsetDateTime startDate) { this.startDate = startDate; } - public UsageBillableSummaryHour usage(UsageBillableSummaryKeys usage) { this.usage = usage; this.unparsed |= usage.unparsed; @@ -237,22 +236,23 @@ public UsageBillableSummaryHour usage(UsageBillableSummaryKeys usage) { } /** - * Response with aggregated usage types. - * + *

Response with aggregated usage types.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryKeys getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryKeys getUsage() { + return usage; + } public void setUsage(UsageBillableSummaryKeys usage) { this.usage = usage; } - /** Return true if this UsageBillableSummaryHour object is equal to o. */ + /** + * Return true if this UsageBillableSummaryHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -262,21 +262,13 @@ public boolean equals(Object o) { return false; } UsageBillableSummaryHour usageBillableSummaryHour = (UsageBillableSummaryHour) o; - return Objects.equals(this.billingPlan, usageBillableSummaryHour.billingPlan) - && Objects.equals(this.endDate, usageBillableSummaryHour.endDate) - && Objects.equals(this.numOrgs, usageBillableSummaryHour.numOrgs) - && Objects.equals(this.orgName, usageBillableSummaryHour.orgName) - && Objects.equals(this.publicId, usageBillableSummaryHour.publicId) - && Objects.equals(this.ratioInMonth, usageBillableSummaryHour.ratioInMonth) - && Objects.equals(this.region, usageBillableSummaryHour.region) - && Objects.equals(this.startDate, usageBillableSummaryHour.startDate) - && Objects.equals(this.usage, usageBillableSummaryHour.usage); + return Objects.equals(this.billingPlan, usageBillableSummaryHour.billingPlan) && Objects.equals(this.endDate, usageBillableSummaryHour.endDate) && Objects.equals(this.numOrgs, usageBillableSummaryHour.numOrgs) && Objects.equals(this.orgName, usageBillableSummaryHour.orgName) && Objects.equals(this.publicId, usageBillableSummaryHour.publicId) && Objects.equals(this.ratioInMonth, usageBillableSummaryHour.ratioInMonth) && Objects.equals(this.region, usageBillableSummaryHour.region) && Objects.equals(this.startDate, usageBillableSummaryHour.startDate) && Objects.equals(this.usage, usageBillableSummaryHour.usage); } + @Override public int hashCode() { - return Objects.hash( - billingPlan, endDate, numOrgs, orgName, publicId, ratioInMonth, region, startDate, usage); + return Objects.hash(billingPlan,endDate,numOrgs,orgName,publicId,ratioInMonth,region,startDate,usage); } @Override @@ -297,7 +289,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryKeys.java b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryKeys.java index a1fcefbc76e..05f6b4f0bc9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryKeys.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryKeys.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response with aggregated usage types. */ + +/** + *

Response with aggregated usage types.

+ */ @JsonPropertyOrder({ UsageBillableSummaryKeys.JSON_PROPERTY_APM_FARGATE_AVERAGE, UsageBillableSummaryKeys.JSON_PROPERTY_APM_FARGATE_SUM, @@ -103,10 +123,10 @@ UsageBillableSummaryKeys.JSON_PROPERTY_TIMESERIES_AVERAGE, UsageBillableSummaryKeys.JSON_PROPERTY_TIMESERIES_SUM }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageBillableSummaryKeys { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_FARGATE_AVERAGE = "apm_fargate_average"; private UsageBillableSummaryBody apmFargateAverage; @@ -128,20 +148,16 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_APM_TRACE_SEARCH_SUM = "apm_trace_search_sum"; private UsageBillableSummaryBody apmTraceSearchSum; - public static final String JSON_PROPERTY_APPLICATION_SECURITY_FARGATE_AVERAGE = - "application_security_fargate_average"; + public static final String JSON_PROPERTY_APPLICATION_SECURITY_FARGATE_AVERAGE = "application_security_fargate_average"; private UsageBillableSummaryBody applicationSecurityFargateAverage; - public static final String JSON_PROPERTY_APPLICATION_SECURITY_HOST_SUM = - "application_security_host_sum"; + public static final String JSON_PROPERTY_APPLICATION_SECURITY_HOST_SUM = "application_security_host_sum"; private UsageBillableSummaryBody applicationSecurityHostSum; - public static final String JSON_PROPERTY_APPLICATION_SECURITY_HOST_TOP99 = - "application_security_host_top99"; + public static final String JSON_PROPERTY_APPLICATION_SECURITY_HOST_TOP99 = "application_security_host_top99"; private UsageBillableSummaryBody applicationSecurityHostTop99; - public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM = - "ci_pipeline_indexed_spans_sum"; + public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM = "ci_pipeline_indexed_spans_sum"; private UsageBillableSummaryBody ciPipelineIndexedSpansSum; public static final String JSON_PROPERTY_CI_PIPELINE_MAXIMUM = "ci_pipeline_maximum"; @@ -159,8 +175,7 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_CI_TESTING_SUM = "ci_testing_sum"; private UsageBillableSummaryBody ciTestingSum; - public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_AVERAGE = - "cloud_cost_management_average"; + public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_AVERAGE = "cloud_cost_management_average"; private UsageBillableSummaryBody cloudCostManagementAverage; public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_SUM = "cloud_cost_management_sum"; @@ -193,38 +208,31 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_DBM_HOST_TOP99P = "dbm_host_top99p"; private UsageBillableSummaryBody dbmHostTop99p; - public static final String JSON_PROPERTY_DBM_NORMALIZED_QUERIES_AVERAGE = - "dbm_normalized_queries_average"; + public static final String JSON_PROPERTY_DBM_NORMALIZED_QUERIES_AVERAGE = "dbm_normalized_queries_average"; private UsageBillableSummaryBody dbmNormalizedQueriesAverage; - public static final String JSON_PROPERTY_DBM_NORMALIZED_QUERIES_SUM = - "dbm_normalized_queries_sum"; + public static final String JSON_PROPERTY_DBM_NORMALIZED_QUERIES_SUM = "dbm_normalized_queries_sum"; private UsageBillableSummaryBody dbmNormalizedQueriesSum; - public static final String JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_AVERAGE = - "fargate_container_apm_and_profiler_average"; + public static final String JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_AVERAGE = "fargate_container_apm_and_profiler_average"; private UsageBillableSummaryBody fargateContainerApmAndProfilerAverage; - public static final String JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_SUM = - "fargate_container_apm_and_profiler_sum"; + public static final String JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_SUM = "fargate_container_apm_and_profiler_sum"; private UsageBillableSummaryBody fargateContainerApmAndProfilerSum; public static final String JSON_PROPERTY_FARGATE_CONTAINER_AVERAGE = "fargate_container_average"; private UsageBillableSummaryBody fargateContainerAverage; - public static final String JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_AVERAGE = - "fargate_container_profiler_average"; + public static final String JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_AVERAGE = "fargate_container_profiler_average"; private UsageBillableSummaryBody fargateContainerProfilerAverage; - public static final String JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_SUM = - "fargate_container_profiler_sum"; + public static final String JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_SUM = "fargate_container_profiler_sum"; private UsageBillableSummaryBody fargateContainerProfilerSum; public static final String JSON_PROPERTY_FARGATE_CONTAINER_SUM = "fargate_container_sum"; private UsageBillableSummaryBody fargateContainerSum; - public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MAXIMUM = - "incident_management_maximum"; + public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MAXIMUM = "incident_management_maximum"; private UsageBillableSummaryBody incidentManagementMaximum; public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_SUM = "incident_management_sum"; @@ -248,8 +256,7 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_INGESTED_SPANS_SUM = "ingested_spans_sum"; private UsageBillableSummaryBody ingestedSpansSum; - public static final String JSON_PROPERTY_INGESTED_TIMESERIES_AVERAGE = - "ingested_timeseries_average"; + public static final String JSON_PROPERTY_INGESTED_TIMESERIES_AVERAGE = "ingested_timeseries_average"; private UsageBillableSummaryBody ingestedTimeseriesAverage; public static final String JSON_PROPERTY_INGESTED_TIMESERIES_SUM = "ingested_timeseries_sum"; @@ -297,8 +304,7 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_LOGS_INDEXED90DAY_SUM = "logs_indexed_90day_sum"; private UsageBillableSummaryBody logsIndexed90daySum; - public static final String JSON_PROPERTY_LOGS_INDEXED_CUSTOM_RETENTION_SUM = - "logs_indexed_custom_retention_sum"; + public static final String JSON_PROPERTY_LOGS_INDEXED_CUSTOM_RETENTION_SUM = "logs_indexed_custom_retention_sum"; private UsageBillableSummaryBody logsIndexedCustomRetentionSum; public static final String JSON_PROPERTY_LOGS_INDEXED_SUM = "logs_indexed_sum"; @@ -322,8 +328,7 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_NPM_HOST_TOP99P = "npm_host_top99p"; private UsageBillableSummaryBody npmHostTop99p; - public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINE_SUM = - "observability_pipeline_sum"; + public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINE_SUM = "observability_pipeline_sum"; private UsageBillableSummaryBody observabilityPipelineSum; public static final String JSON_PROPERTY_ONLINE_ARCHIVE_SUM = "online_archive_sum"; @@ -350,8 +355,7 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_RUM_UNITS_SUM = "rum_units_sum"; private UsageBillableSummaryBody rumUnitsSum; - public static final String JSON_PROPERTY_SENSITIVE_DATA_SCANNER_SUM = - "sensitive_data_scanner_sum"; + public static final String JSON_PROPERTY_SENSITIVE_DATA_SCANNER_SUM = "sensitive_data_scanner_sum"; private UsageBillableSummaryBody sensitiveDataScannerSum; public static final String JSON_PROPERTY_SERVERLESS_APM_SUM = "serverless_apm_sum"; @@ -369,19 +373,16 @@ public class UsageBillableSummaryKeys { public static final String JSON_PROPERTY_SIEM_SUM = "siem_sum"; private UsageBillableSummaryBody siemSum; - public static final String JSON_PROPERTY_STANDARD_TIMESERIES_AVERAGE = - "standard_timeseries_average"; + public static final String JSON_PROPERTY_STANDARD_TIMESERIES_AVERAGE = "standard_timeseries_average"; private UsageBillableSummaryBody standardTimeseriesAverage; public static final String JSON_PROPERTY_SYNTHETICS_API_TESTS_SUM = "synthetics_api_tests_sum"; private UsageBillableSummaryBody syntheticsApiTestsSum; - public static final String JSON_PROPERTY_SYNTHETICS_APP_TESTING_MAXIMUM = - "synthetics_app_testing_maximum"; + public static final String JSON_PROPERTY_SYNTHETICS_APP_TESTING_MAXIMUM = "synthetics_app_testing_maximum"; private UsageBillableSummaryBody syntheticsAppTestingMaximum; - public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECKS_SUM = - "synthetics_browser_checks_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECKS_SUM = "synthetics_browser_checks_sum"; private UsageBillableSummaryBody syntheticsBrowserChecksSum; public static final String JSON_PROPERTY_TIMESERIES_AVERAGE = "timeseries_average"; @@ -397,21 +398,19 @@ public UsageBillableSummaryKeys apmFargateAverage(UsageBillableSummaryBody apmFa } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmFargateAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmFargateAverage() { - return apmFargateAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmFargateAverage() { + return apmFargateAverage; + } public void setApmFargateAverage(UsageBillableSummaryBody apmFargateAverage) { this.apmFargateAverage = apmFargateAverage; } - public UsageBillableSummaryKeys apmFargateSum(UsageBillableSummaryBody apmFargateSum) { this.apmFargateSum = apmFargateSum; this.unparsed |= apmFargateSum.unparsed; @@ -419,21 +418,19 @@ public UsageBillableSummaryKeys apmFargateSum(UsageBillableSummaryBody apmFargat } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmFargateSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmFargateSum() { - return apmFargateSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmFargateSum() { + return apmFargateSum; + } public void setApmFargateSum(UsageBillableSummaryBody apmFargateSum) { this.apmFargateSum = apmFargateSum; } - public UsageBillableSummaryKeys apmHostSum(UsageBillableSummaryBody apmHostSum) { this.apmHostSum = apmHostSum; this.unparsed |= apmHostSum.unparsed; @@ -441,21 +438,19 @@ public UsageBillableSummaryKeys apmHostSum(UsageBillableSummaryBody apmHostSum) } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmHostSum() { - return apmHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmHostSum() { + return apmHostSum; + } public void setApmHostSum(UsageBillableSummaryBody apmHostSum) { this.apmHostSum = apmHostSum; } - public UsageBillableSummaryKeys apmHostTop99p(UsageBillableSummaryBody apmHostTop99p) { this.apmHostTop99p = apmHostTop99p; this.unparsed |= apmHostTop99p.unparsed; @@ -463,21 +458,19 @@ public UsageBillableSummaryKeys apmHostTop99p(UsageBillableSummaryBody apmHostTo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmHostTop99p() { - return apmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmHostTop99p() { + return apmHostTop99p; + } public void setApmHostTop99p(UsageBillableSummaryBody apmHostTop99p) { this.apmHostTop99p = apmHostTop99p; } - public UsageBillableSummaryKeys apmProfilerHostSum(UsageBillableSummaryBody apmProfilerHostSum) { this.apmProfilerHostSum = apmProfilerHostSum; this.unparsed |= apmProfilerHostSum.unparsed; @@ -485,44 +478,39 @@ public UsageBillableSummaryKeys apmProfilerHostSum(UsageBillableSummaryBody apmP } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmProfilerHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_PROFILER_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmProfilerHostSum() { - return apmProfilerHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_PROFILER_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmProfilerHostSum() { + return apmProfilerHostSum; + } public void setApmProfilerHostSum(UsageBillableSummaryBody apmProfilerHostSum) { this.apmProfilerHostSum = apmProfilerHostSum; } - - public UsageBillableSummaryKeys apmProfilerHostTop99p( - UsageBillableSummaryBody apmProfilerHostTop99p) { + public UsageBillableSummaryKeys apmProfilerHostTop99p(UsageBillableSummaryBody apmProfilerHostTop99p) { this.apmProfilerHostTop99p = apmProfilerHostTop99p; this.unparsed |= apmProfilerHostTop99p.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmProfilerHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_PROFILER_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmProfilerHostTop99p() { - return apmProfilerHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_PROFILER_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmProfilerHostTop99p() { + return apmProfilerHostTop99p; + } public void setApmProfilerHostTop99p(UsageBillableSummaryBody apmProfilerHostTop99p) { this.apmProfilerHostTop99p = apmProfilerHostTop99p; } - public UsageBillableSummaryKeys apmTraceSearchSum(UsageBillableSummaryBody apmTraceSearchSum) { this.apmTraceSearchSum = apmTraceSearchSum; this.unparsed |= apmTraceSearchSum.unparsed; @@ -530,115 +518,99 @@ public UsageBillableSummaryKeys apmTraceSearchSum(UsageBillableSummaryBody apmTr } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return apmTraceSearchSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_TRACE_SEARCH_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApmTraceSearchSum() { - return apmTraceSearchSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_TRACE_SEARCH_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApmTraceSearchSum() { + return apmTraceSearchSum; + } public void setApmTraceSearchSum(UsageBillableSummaryBody apmTraceSearchSum) { this.apmTraceSearchSum = apmTraceSearchSum; } - - public UsageBillableSummaryKeys applicationSecurityFargateAverage( - UsageBillableSummaryBody applicationSecurityFargateAverage) { + public UsageBillableSummaryKeys applicationSecurityFargateAverage(UsageBillableSummaryBody applicationSecurityFargateAverage) { this.applicationSecurityFargateAverage = applicationSecurityFargateAverage; this.unparsed |= applicationSecurityFargateAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return applicationSecurityFargateAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_SECURITY_FARGATE_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApplicationSecurityFargateAverage() { - return applicationSecurityFargateAverage; - } - - public void setApplicationSecurityFargateAverage( - UsageBillableSummaryBody applicationSecurityFargateAverage) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_SECURITY_FARGATE_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApplicationSecurityFargateAverage() { + return applicationSecurityFargateAverage; + } + public void setApplicationSecurityFargateAverage(UsageBillableSummaryBody applicationSecurityFargateAverage) { this.applicationSecurityFargateAverage = applicationSecurityFargateAverage; } - - public UsageBillableSummaryKeys applicationSecurityHostSum( - UsageBillableSummaryBody applicationSecurityHostSum) { + public UsageBillableSummaryKeys applicationSecurityHostSum(UsageBillableSummaryBody applicationSecurityHostSum) { this.applicationSecurityHostSum = applicationSecurityHostSum; this.unparsed |= applicationSecurityHostSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return applicationSecurityHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_SECURITY_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApplicationSecurityHostSum() { - return applicationSecurityHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_SECURITY_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApplicationSecurityHostSum() { + return applicationSecurityHostSum; + } public void setApplicationSecurityHostSum(UsageBillableSummaryBody applicationSecurityHostSum) { this.applicationSecurityHostSum = applicationSecurityHostSum; } - - public UsageBillableSummaryKeys applicationSecurityHostTop99( - UsageBillableSummaryBody applicationSecurityHostTop99) { + public UsageBillableSummaryKeys applicationSecurityHostTop99(UsageBillableSummaryBody applicationSecurityHostTop99) { this.applicationSecurityHostTop99 = applicationSecurityHostTop99; this.unparsed |= applicationSecurityHostTop99.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return applicationSecurityHostTop99 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_SECURITY_HOST_TOP99) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getApplicationSecurityHostTop99() { - return applicationSecurityHostTop99; - } - - public void setApplicationSecurityHostTop99( - UsageBillableSummaryBody applicationSecurityHostTop99) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_SECURITY_HOST_TOP99) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getApplicationSecurityHostTop99() { + return applicationSecurityHostTop99; + } + public void setApplicationSecurityHostTop99(UsageBillableSummaryBody applicationSecurityHostTop99) { this.applicationSecurityHostTop99 = applicationSecurityHostTop99; } - - public UsageBillableSummaryKeys ciPipelineIndexedSpansSum( - UsageBillableSummaryBody ciPipelineIndexedSpansSum) { + public UsageBillableSummaryKeys ciPipelineIndexedSpansSum(UsageBillableSummaryBody ciPipelineIndexedSpansSum) { this.ciPipelineIndexedSpansSum = ciPipelineIndexedSpansSum; this.unparsed |= ciPipelineIndexedSpansSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ciPipelineIndexedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCiPipelineIndexedSpansSum() { - return ciPipelineIndexedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCiPipelineIndexedSpansSum() { + return ciPipelineIndexedSpansSum; + } public void setCiPipelineIndexedSpansSum(UsageBillableSummaryBody ciPipelineIndexedSpansSum) { this.ciPipelineIndexedSpansSum = ciPipelineIndexedSpansSum; } - public UsageBillableSummaryKeys ciPipelineMaximum(UsageBillableSummaryBody ciPipelineMaximum) { this.ciPipelineMaximum = ciPipelineMaximum; this.unparsed |= ciPipelineMaximum.unparsed; @@ -646,21 +618,19 @@ public UsageBillableSummaryKeys ciPipelineMaximum(UsageBillableSummaryBody ciPip } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ciPipelineMaximum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_MAXIMUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCiPipelineMaximum() { - return ciPipelineMaximum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_MAXIMUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCiPipelineMaximum() { + return ciPipelineMaximum; + } public void setCiPipelineMaximum(UsageBillableSummaryBody ciPipelineMaximum) { this.ciPipelineMaximum = ciPipelineMaximum; } - public UsageBillableSummaryKeys ciPipelineSum(UsageBillableSummaryBody ciPipelineSum) { this.ciPipelineSum = ciPipelineSum; this.unparsed |= ciPipelineSum.unparsed; @@ -668,44 +638,39 @@ public UsageBillableSummaryKeys ciPipelineSum(UsageBillableSummaryBody ciPipelin } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ciPipelineSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCiPipelineSum() { - return ciPipelineSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCiPipelineSum() { + return ciPipelineSum; + } public void setCiPipelineSum(UsageBillableSummaryBody ciPipelineSum) { this.ciPipelineSum = ciPipelineSum; } - - public UsageBillableSummaryKeys ciTestIndexedSpansSum( - UsageBillableSummaryBody ciTestIndexedSpansSum) { + public UsageBillableSummaryKeys ciTestIndexedSpansSum(UsageBillableSummaryBody ciTestIndexedSpansSum) { this.ciTestIndexedSpansSum = ciTestIndexedSpansSum; this.unparsed |= ciTestIndexedSpansSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ciTestIndexedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCiTestIndexedSpansSum() { - return ciTestIndexedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCiTestIndexedSpansSum() { + return ciTestIndexedSpansSum; + } public void setCiTestIndexedSpansSum(UsageBillableSummaryBody ciTestIndexedSpansSum) { this.ciTestIndexedSpansSum = ciTestIndexedSpansSum; } - public UsageBillableSummaryKeys ciTestingMaximum(UsageBillableSummaryBody ciTestingMaximum) { this.ciTestingMaximum = ciTestingMaximum; this.unparsed |= ciTestingMaximum.unparsed; @@ -713,21 +678,19 @@ public UsageBillableSummaryKeys ciTestingMaximum(UsageBillableSummaryBody ciTest } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ciTestingMaximum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TESTING_MAXIMUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCiTestingMaximum() { - return ciTestingMaximum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TESTING_MAXIMUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCiTestingMaximum() { + return ciTestingMaximum; + } public void setCiTestingMaximum(UsageBillableSummaryBody ciTestingMaximum) { this.ciTestingMaximum = ciTestingMaximum; } - public UsageBillableSummaryKeys ciTestingSum(UsageBillableSummaryBody ciTestingSum) { this.ciTestingSum = ciTestingSum; this.unparsed |= ciTestingSum.unparsed; @@ -735,67 +698,59 @@ public UsageBillableSummaryKeys ciTestingSum(UsageBillableSummaryBody ciTestingS } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ciTestingSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TESTING_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCiTestingSum() { - return ciTestingSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TESTING_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCiTestingSum() { + return ciTestingSum; + } public void setCiTestingSum(UsageBillableSummaryBody ciTestingSum) { this.ciTestingSum = ciTestingSum; } - - public UsageBillableSummaryKeys cloudCostManagementAverage( - UsageBillableSummaryBody cloudCostManagementAverage) { + public UsageBillableSummaryKeys cloudCostManagementAverage(UsageBillableSummaryBody cloudCostManagementAverage) { this.cloudCostManagementAverage = cloudCostManagementAverage; this.unparsed |= cloudCostManagementAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cloudCostManagementAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCloudCostManagementAverage() { - return cloudCostManagementAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCloudCostManagementAverage() { + return cloudCostManagementAverage; + } public void setCloudCostManagementAverage(UsageBillableSummaryBody cloudCostManagementAverage) { this.cloudCostManagementAverage = cloudCostManagementAverage; } - - public UsageBillableSummaryKeys cloudCostManagementSum( - UsageBillableSummaryBody cloudCostManagementSum) { + public UsageBillableSummaryKeys cloudCostManagementSum(UsageBillableSummaryBody cloudCostManagementSum) { this.cloudCostManagementSum = cloudCostManagementSum; this.unparsed |= cloudCostManagementSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cloudCostManagementSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCloudCostManagementSum() { - return cloudCostManagementSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCloudCostManagementSum() { + return cloudCostManagementSum; + } public void setCloudCostManagementSum(UsageBillableSummaryBody cloudCostManagementSum) { this.cloudCostManagementSum = cloudCostManagementSum; } - public UsageBillableSummaryKeys cspmContainerSum(UsageBillableSummaryBody cspmContainerSum) { this.cspmContainerSum = cspmContainerSum; this.unparsed |= cspmContainerSum.unparsed; @@ -803,21 +758,19 @@ public UsageBillableSummaryKeys cspmContainerSum(UsageBillableSummaryBody cspmCo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cspmContainerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCspmContainerSum() { - return cspmContainerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCspmContainerSum() { + return cspmContainerSum; + } public void setCspmContainerSum(UsageBillableSummaryBody cspmContainerSum) { this.cspmContainerSum = cspmContainerSum; } - public UsageBillableSummaryKeys cspmHostSum(UsageBillableSummaryBody cspmHostSum) { this.cspmHostSum = cspmHostSum; this.unparsed |= cspmHostSum.unparsed; @@ -825,21 +778,19 @@ public UsageBillableSummaryKeys cspmHostSum(UsageBillableSummaryBody cspmHostSum } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cspmHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCspmHostSum() { - return cspmHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCspmHostSum() { + return cspmHostSum; + } public void setCspmHostSum(UsageBillableSummaryBody cspmHostSum) { this.cspmHostSum = cspmHostSum; } - public UsageBillableSummaryKeys cspmHostTop99p(UsageBillableSummaryBody cspmHostTop99p) { this.cspmHostTop99p = cspmHostTop99p; this.unparsed |= cspmHostTop99p.unparsed; @@ -847,21 +798,19 @@ public UsageBillableSummaryKeys cspmHostTop99p(UsageBillableSummaryBody cspmHost } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cspmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCspmHostTop99p() { - return cspmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCspmHostTop99p() { + return cspmHostTop99p; + } public void setCspmHostTop99p(UsageBillableSummaryBody cspmHostTop99p) { this.cspmHostTop99p = cspmHostTop99p; } - public UsageBillableSummaryKeys customEventSum(UsageBillableSummaryBody customEventSum) { this.customEventSum = customEventSum; this.unparsed |= customEventSum.unparsed; @@ -869,21 +818,19 @@ public UsageBillableSummaryKeys customEventSum(UsageBillableSummaryBody customEv } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return customEventSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_EVENT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCustomEventSum() { - return customEventSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_EVENT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCustomEventSum() { + return customEventSum; + } public void setCustomEventSum(UsageBillableSummaryBody customEventSum) { this.customEventSum = customEventSum; } - public UsageBillableSummaryKeys cwsContainerSum(UsageBillableSummaryBody cwsContainerSum) { this.cwsContainerSum = cwsContainerSum; this.unparsed |= cwsContainerSum.unparsed; @@ -891,21 +838,19 @@ public UsageBillableSummaryKeys cwsContainerSum(UsageBillableSummaryBody cwsCont } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cwsContainerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCwsContainerSum() { - return cwsContainerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCwsContainerSum() { + return cwsContainerSum; + } public void setCwsContainerSum(UsageBillableSummaryBody cwsContainerSum) { this.cwsContainerSum = cwsContainerSum; } - public UsageBillableSummaryKeys cwsHostSum(UsageBillableSummaryBody cwsHostSum) { this.cwsHostSum = cwsHostSum; this.unparsed |= cwsHostSum.unparsed; @@ -913,21 +858,19 @@ public UsageBillableSummaryKeys cwsHostSum(UsageBillableSummaryBody cwsHostSum) } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cwsHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCwsHostSum() { - return cwsHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCwsHostSum() { + return cwsHostSum; + } public void setCwsHostSum(UsageBillableSummaryBody cwsHostSum) { this.cwsHostSum = cwsHostSum; } - public UsageBillableSummaryKeys cwsHostTop99p(UsageBillableSummaryBody cwsHostTop99p) { this.cwsHostTop99p = cwsHostTop99p; this.unparsed |= cwsHostTop99p.unparsed; @@ -935,21 +878,19 @@ public UsageBillableSummaryKeys cwsHostTop99p(UsageBillableSummaryBody cwsHostTo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return cwsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getCwsHostTop99p() { - return cwsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getCwsHostTop99p() { + return cwsHostTop99p; + } public void setCwsHostTop99p(UsageBillableSummaryBody cwsHostTop99p) { this.cwsHostTop99p = cwsHostTop99p; } - public UsageBillableSummaryKeys dbmHostSum(UsageBillableSummaryBody dbmHostSum) { this.dbmHostSum = dbmHostSum; this.unparsed |= dbmHostSum.unparsed; @@ -957,21 +898,19 @@ public UsageBillableSummaryKeys dbmHostSum(UsageBillableSummaryBody dbmHostSum) } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return dbmHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getDbmHostSum() { - return dbmHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getDbmHostSum() { + return dbmHostSum; + } public void setDbmHostSum(UsageBillableSummaryBody dbmHostSum) { this.dbmHostSum = dbmHostSum; } - public UsageBillableSummaryKeys dbmHostTop99p(UsageBillableSummaryBody dbmHostTop99p) { this.dbmHostTop99p = dbmHostTop99p; this.unparsed |= dbmHostTop99p.unparsed; @@ -979,254 +918,219 @@ public UsageBillableSummaryKeys dbmHostTop99p(UsageBillableSummaryBody dbmHostTo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return dbmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getDbmHostTop99p() { - return dbmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getDbmHostTop99p() { + return dbmHostTop99p; + } public void setDbmHostTop99p(UsageBillableSummaryBody dbmHostTop99p) { this.dbmHostTop99p = dbmHostTop99p; } - - public UsageBillableSummaryKeys dbmNormalizedQueriesAverage( - UsageBillableSummaryBody dbmNormalizedQueriesAverage) { + public UsageBillableSummaryKeys dbmNormalizedQueriesAverage(UsageBillableSummaryBody dbmNormalizedQueriesAverage) { this.dbmNormalizedQueriesAverage = dbmNormalizedQueriesAverage; this.unparsed |= dbmNormalizedQueriesAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return dbmNormalizedQueriesAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_NORMALIZED_QUERIES_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getDbmNormalizedQueriesAverage() { - return dbmNormalizedQueriesAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_NORMALIZED_QUERIES_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getDbmNormalizedQueriesAverage() { + return dbmNormalizedQueriesAverage; + } public void setDbmNormalizedQueriesAverage(UsageBillableSummaryBody dbmNormalizedQueriesAverage) { this.dbmNormalizedQueriesAverage = dbmNormalizedQueriesAverage; } - - public UsageBillableSummaryKeys dbmNormalizedQueriesSum( - UsageBillableSummaryBody dbmNormalizedQueriesSum) { + public UsageBillableSummaryKeys dbmNormalizedQueriesSum(UsageBillableSummaryBody dbmNormalizedQueriesSum) { this.dbmNormalizedQueriesSum = dbmNormalizedQueriesSum; this.unparsed |= dbmNormalizedQueriesSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return dbmNormalizedQueriesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_NORMALIZED_QUERIES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getDbmNormalizedQueriesSum() { - return dbmNormalizedQueriesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_NORMALIZED_QUERIES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getDbmNormalizedQueriesSum() { + return dbmNormalizedQueriesSum; + } public void setDbmNormalizedQueriesSum(UsageBillableSummaryBody dbmNormalizedQueriesSum) { this.dbmNormalizedQueriesSum = dbmNormalizedQueriesSum; } - - public UsageBillableSummaryKeys fargateContainerApmAndProfilerAverage( - UsageBillableSummaryBody fargateContainerApmAndProfilerAverage) { + public UsageBillableSummaryKeys fargateContainerApmAndProfilerAverage(UsageBillableSummaryBody fargateContainerApmAndProfilerAverage) { this.fargateContainerApmAndProfilerAverage = fargateContainerApmAndProfilerAverage; this.unparsed |= fargateContainerApmAndProfilerAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return fargateContainerApmAndProfilerAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getFargateContainerApmAndProfilerAverage() { - return fargateContainerApmAndProfilerAverage; - } - - public void setFargateContainerApmAndProfilerAverage( - UsageBillableSummaryBody fargateContainerApmAndProfilerAverage) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getFargateContainerApmAndProfilerAverage() { + return fargateContainerApmAndProfilerAverage; + } + public void setFargateContainerApmAndProfilerAverage(UsageBillableSummaryBody fargateContainerApmAndProfilerAverage) { this.fargateContainerApmAndProfilerAverage = fargateContainerApmAndProfilerAverage; } - - public UsageBillableSummaryKeys fargateContainerApmAndProfilerSum( - UsageBillableSummaryBody fargateContainerApmAndProfilerSum) { + public UsageBillableSummaryKeys fargateContainerApmAndProfilerSum(UsageBillableSummaryBody fargateContainerApmAndProfilerSum) { this.fargateContainerApmAndProfilerSum = fargateContainerApmAndProfilerSum; this.unparsed |= fargateContainerApmAndProfilerSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return fargateContainerApmAndProfilerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getFargateContainerApmAndProfilerSum() { - return fargateContainerApmAndProfilerSum; - } - - public void setFargateContainerApmAndProfilerSum( - UsageBillableSummaryBody fargateContainerApmAndProfilerSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_APM_AND_PROFILER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getFargateContainerApmAndProfilerSum() { + return fargateContainerApmAndProfilerSum; + } + public void setFargateContainerApmAndProfilerSum(UsageBillableSummaryBody fargateContainerApmAndProfilerSum) { this.fargateContainerApmAndProfilerSum = fargateContainerApmAndProfilerSum; } - - public UsageBillableSummaryKeys fargateContainerAverage( - UsageBillableSummaryBody fargateContainerAverage) { + public UsageBillableSummaryKeys fargateContainerAverage(UsageBillableSummaryBody fargateContainerAverage) { this.fargateContainerAverage = fargateContainerAverage; this.unparsed |= fargateContainerAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return fargateContainerAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getFargateContainerAverage() { - return fargateContainerAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getFargateContainerAverage() { + return fargateContainerAverage; + } public void setFargateContainerAverage(UsageBillableSummaryBody fargateContainerAverage) { this.fargateContainerAverage = fargateContainerAverage; } - - public UsageBillableSummaryKeys fargateContainerProfilerAverage( - UsageBillableSummaryBody fargateContainerProfilerAverage) { + public UsageBillableSummaryKeys fargateContainerProfilerAverage(UsageBillableSummaryBody fargateContainerProfilerAverage) { this.fargateContainerProfilerAverage = fargateContainerProfilerAverage; this.unparsed |= fargateContainerProfilerAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return fargateContainerProfilerAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getFargateContainerProfilerAverage() { - return fargateContainerProfilerAverage; - } - - public void setFargateContainerProfilerAverage( - UsageBillableSummaryBody fargateContainerProfilerAverage) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getFargateContainerProfilerAverage() { + return fargateContainerProfilerAverage; + } + public void setFargateContainerProfilerAverage(UsageBillableSummaryBody fargateContainerProfilerAverage) { this.fargateContainerProfilerAverage = fargateContainerProfilerAverage; } - - public UsageBillableSummaryKeys fargateContainerProfilerSum( - UsageBillableSummaryBody fargateContainerProfilerSum) { + public UsageBillableSummaryKeys fargateContainerProfilerSum(UsageBillableSummaryBody fargateContainerProfilerSum) { this.fargateContainerProfilerSum = fargateContainerProfilerSum; this.unparsed |= fargateContainerProfilerSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return fargateContainerProfilerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getFargateContainerProfilerSum() { - return fargateContainerProfilerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_PROFILER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getFargateContainerProfilerSum() { + return fargateContainerProfilerSum; + } public void setFargateContainerProfilerSum(UsageBillableSummaryBody fargateContainerProfilerSum) { this.fargateContainerProfilerSum = fargateContainerProfilerSum; } - - public UsageBillableSummaryKeys fargateContainerSum( - UsageBillableSummaryBody fargateContainerSum) { + public UsageBillableSummaryKeys fargateContainerSum(UsageBillableSummaryBody fargateContainerSum) { this.fargateContainerSum = fargateContainerSum; this.unparsed |= fargateContainerSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return fargateContainerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getFargateContainerSum() { - return fargateContainerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_CONTAINER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getFargateContainerSum() { + return fargateContainerSum; + } public void setFargateContainerSum(UsageBillableSummaryBody fargateContainerSum) { this.fargateContainerSum = fargateContainerSum; } - - public UsageBillableSummaryKeys incidentManagementMaximum( - UsageBillableSummaryBody incidentManagementMaximum) { + public UsageBillableSummaryKeys incidentManagementMaximum(UsageBillableSummaryBody incidentManagementMaximum) { this.incidentManagementMaximum = incidentManagementMaximum; this.unparsed |= incidentManagementMaximum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return incidentManagementMaximum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MAXIMUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIncidentManagementMaximum() { - return incidentManagementMaximum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MAXIMUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIncidentManagementMaximum() { + return incidentManagementMaximum; + } public void setIncidentManagementMaximum(UsageBillableSummaryBody incidentManagementMaximum) { this.incidentManagementMaximum = incidentManagementMaximum; } - - public UsageBillableSummaryKeys incidentManagementSum( - UsageBillableSummaryBody incidentManagementSum) { + public UsageBillableSummaryKeys incidentManagementSum(UsageBillableSummaryBody incidentManagementSum) { this.incidentManagementSum = incidentManagementSum; this.unparsed |= incidentManagementSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return incidentManagementSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIncidentManagementSum() { - return incidentManagementSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIncidentManagementSum() { + return incidentManagementSum; + } public void setIncidentManagementSum(UsageBillableSummaryBody incidentManagementSum) { this.incidentManagementSum = incidentManagementSum; } - public UsageBillableSummaryKeys infraAndApmHostSum(UsageBillableSummaryBody infraAndApmHostSum) { this.infraAndApmHostSum = infraAndApmHostSum; this.unparsed |= infraAndApmHostSum.unparsed; @@ -1234,44 +1138,39 @@ public UsageBillableSummaryKeys infraAndApmHostSum(UsageBillableSummaryBody infr } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return infraAndApmHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_AND_APM_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getInfraAndApmHostSum() { - return infraAndApmHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_AND_APM_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getInfraAndApmHostSum() { + return infraAndApmHostSum; + } public void setInfraAndApmHostSum(UsageBillableSummaryBody infraAndApmHostSum) { this.infraAndApmHostSum = infraAndApmHostSum; } - - public UsageBillableSummaryKeys infraAndApmHostTop99p( - UsageBillableSummaryBody infraAndApmHostTop99p) { + public UsageBillableSummaryKeys infraAndApmHostTop99p(UsageBillableSummaryBody infraAndApmHostTop99p) { this.infraAndApmHostTop99p = infraAndApmHostTop99p; this.unparsed |= infraAndApmHostTop99p.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return infraAndApmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_AND_APM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getInfraAndApmHostTop99p() { - return infraAndApmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_AND_APM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getInfraAndApmHostTop99p() { + return infraAndApmHostTop99p; + } public void setInfraAndApmHostTop99p(UsageBillableSummaryBody infraAndApmHostTop99p) { this.infraAndApmHostTop99p = infraAndApmHostTop99p; } - public UsageBillableSummaryKeys infraContainerSum(UsageBillableSummaryBody infraContainerSum) { this.infraContainerSum = infraContainerSum; this.unparsed |= infraContainerSum.unparsed; @@ -1279,21 +1178,19 @@ public UsageBillableSummaryKeys infraContainerSum(UsageBillableSummaryBody infra } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return infraContainerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_CONTAINER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getInfraContainerSum() { - return infraContainerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CONTAINER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getInfraContainerSum() { + return infraContainerSum; + } public void setInfraContainerSum(UsageBillableSummaryBody infraContainerSum) { this.infraContainerSum = infraContainerSum; } - public UsageBillableSummaryKeys infraHostSum(UsageBillableSummaryBody infraHostSum) { this.infraHostSum = infraHostSum; this.unparsed |= infraHostSum.unparsed; @@ -1301,21 +1198,19 @@ public UsageBillableSummaryKeys infraHostSum(UsageBillableSummaryBody infraHostS } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return infraHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getInfraHostSum() { - return infraHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getInfraHostSum() { + return infraHostSum; + } public void setInfraHostSum(UsageBillableSummaryBody infraHostSum) { this.infraHostSum = infraHostSum; } - public UsageBillableSummaryKeys infraHostTop99p(UsageBillableSummaryBody infraHostTop99p) { this.infraHostTop99p = infraHostTop99p; this.unparsed |= infraHostTop99p.unparsed; @@ -1323,21 +1218,19 @@ public UsageBillableSummaryKeys infraHostTop99p(UsageBillableSummaryBody infraHo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return infraHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getInfraHostTop99p() { - return infraHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getInfraHostTop99p() { + return infraHostTop99p; + } public void setInfraHostTop99p(UsageBillableSummaryBody infraHostTop99p) { this.infraHostTop99p = infraHostTop99p; } - public UsageBillableSummaryKeys ingestedSpansSum(UsageBillableSummaryBody ingestedSpansSum) { this.ingestedSpansSum = ingestedSpansSum; this.unparsed |= ingestedSpansSum.unparsed; @@ -1345,67 +1238,59 @@ public UsageBillableSummaryKeys ingestedSpansSum(UsageBillableSummaryBody ingest } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ingestedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIngestedSpansSum() { - return ingestedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIngestedSpansSum() { + return ingestedSpansSum; + } public void setIngestedSpansSum(UsageBillableSummaryBody ingestedSpansSum) { this.ingestedSpansSum = ingestedSpansSum; } - - public UsageBillableSummaryKeys ingestedTimeseriesAverage( - UsageBillableSummaryBody ingestedTimeseriesAverage) { + public UsageBillableSummaryKeys ingestedTimeseriesAverage(UsageBillableSummaryBody ingestedTimeseriesAverage) { this.ingestedTimeseriesAverage = ingestedTimeseriesAverage; this.unparsed |= ingestedTimeseriesAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ingestedTimeseriesAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_TIMESERIES_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIngestedTimeseriesAverage() { - return ingestedTimeseriesAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_TIMESERIES_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIngestedTimeseriesAverage() { + return ingestedTimeseriesAverage; + } public void setIngestedTimeseriesAverage(UsageBillableSummaryBody ingestedTimeseriesAverage) { this.ingestedTimeseriesAverage = ingestedTimeseriesAverage; } - - public UsageBillableSummaryKeys ingestedTimeseriesSum( - UsageBillableSummaryBody ingestedTimeseriesSum) { + public UsageBillableSummaryKeys ingestedTimeseriesSum(UsageBillableSummaryBody ingestedTimeseriesSum) { this.ingestedTimeseriesSum = ingestedTimeseriesSum; this.unparsed |= ingestedTimeseriesSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return ingestedTimeseriesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_TIMESERIES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIngestedTimeseriesSum() { - return ingestedTimeseriesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_TIMESERIES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIngestedTimeseriesSum() { + return ingestedTimeseriesSum; + } public void setIngestedTimeseriesSum(UsageBillableSummaryBody ingestedTimeseriesSum) { this.ingestedTimeseriesSum = ingestedTimeseriesSum; } - public UsageBillableSummaryKeys iotSum(UsageBillableSummaryBody iotSum) { this.iotSum = iotSum; this.unparsed |= iotSum.unparsed; @@ -1413,21 +1298,19 @@ public UsageBillableSummaryKeys iotSum(UsageBillableSummaryBody iotSum) { } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return iotSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIotSum() { - return iotSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIotSum() { + return iotSum; + } public void setIotSum(UsageBillableSummaryBody iotSum) { this.iotSum = iotSum; } - public UsageBillableSummaryKeys iotTop99p(UsageBillableSummaryBody iotTop99p) { this.iotTop99p = iotTop99p; this.unparsed |= iotTop99p.unparsed; @@ -1435,44 +1318,39 @@ public UsageBillableSummaryKeys iotTop99p(UsageBillableSummaryBody iotTop99p) { } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return iotTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getIotTop99p() { - return iotTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getIotTop99p() { + return iotTop99p; + } public void setIotTop99p(UsageBillableSummaryBody iotTop99p) { this.iotTop99p = iotTop99p; } - - public UsageBillableSummaryKeys lambdaFunctionAverage( - UsageBillableSummaryBody lambdaFunctionAverage) { + public UsageBillableSummaryKeys lambdaFunctionAverage(UsageBillableSummaryBody lambdaFunctionAverage) { this.lambdaFunctionAverage = lambdaFunctionAverage; this.unparsed |= lambdaFunctionAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return lambdaFunctionAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTION_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLambdaFunctionAverage() { - return lambdaFunctionAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTION_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLambdaFunctionAverage() { + return lambdaFunctionAverage; + } public void setLambdaFunctionAverage(UsageBillableSummaryBody lambdaFunctionAverage) { this.lambdaFunctionAverage = lambdaFunctionAverage; } - public UsageBillableSummaryKeys lambdaFunctionSum(UsageBillableSummaryBody lambdaFunctionSum) { this.lambdaFunctionSum = lambdaFunctionSum; this.unparsed |= lambdaFunctionSum.unparsed; @@ -1480,21 +1358,19 @@ public UsageBillableSummaryKeys lambdaFunctionSum(UsageBillableSummaryBody lambd } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return lambdaFunctionSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTION_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLambdaFunctionSum() { - return lambdaFunctionSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAMBDA_FUNCTION_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLambdaFunctionSum() { + return lambdaFunctionSum; + } public void setLambdaFunctionSum(UsageBillableSummaryBody lambdaFunctionSum) { this.lambdaFunctionSum = lambdaFunctionSum; } - public UsageBillableSummaryKeys logsForwardingSum(UsageBillableSummaryBody logsForwardingSum) { this.logsForwardingSum = logsForwardingSum; this.unparsed |= logsForwardingSum.unparsed; @@ -1502,113 +1378,99 @@ public UsageBillableSummaryKeys logsForwardingSum(UsageBillableSummaryBody logsF } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsForwardingSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_FORWARDING_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsForwardingSum() { - return logsForwardingSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_FORWARDING_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsForwardingSum() { + return logsForwardingSum; + } public void setLogsForwardingSum(UsageBillableSummaryBody logsForwardingSum) { this.logsForwardingSum = logsForwardingSum; } - - public UsageBillableSummaryKeys logsIndexed15daySum( - UsageBillableSummaryBody logsIndexed15daySum) { + public UsageBillableSummaryKeys logsIndexed15daySum(UsageBillableSummaryBody logsIndexed15daySum) { this.logsIndexed15daySum = logsIndexed15daySum; this.unparsed |= logsIndexed15daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed15daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED15DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed15daySum() { - return logsIndexed15daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED15DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed15daySum() { + return logsIndexed15daySum; + } public void setLogsIndexed15daySum(UsageBillableSummaryBody logsIndexed15daySum) { this.logsIndexed15daySum = logsIndexed15daySum; } - - public UsageBillableSummaryKeys logsIndexed180daySum( - UsageBillableSummaryBody logsIndexed180daySum) { + public UsageBillableSummaryKeys logsIndexed180daySum(UsageBillableSummaryBody logsIndexed180daySum) { this.logsIndexed180daySum = logsIndexed180daySum; this.unparsed |= logsIndexed180daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed180daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED180DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed180daySum() { - return logsIndexed180daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED180DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed180daySum() { + return logsIndexed180daySum; + } public void setLogsIndexed180daySum(UsageBillableSummaryBody logsIndexed180daySum) { this.logsIndexed180daySum = logsIndexed180daySum; } - - public UsageBillableSummaryKeys logsIndexed30daySum( - UsageBillableSummaryBody logsIndexed30daySum) { + public UsageBillableSummaryKeys logsIndexed30daySum(UsageBillableSummaryBody logsIndexed30daySum) { this.logsIndexed30daySum = logsIndexed30daySum; this.unparsed |= logsIndexed30daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed30daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED30DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed30daySum() { - return logsIndexed30daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED30DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed30daySum() { + return logsIndexed30daySum; + } public void setLogsIndexed30daySum(UsageBillableSummaryBody logsIndexed30daySum) { this.logsIndexed30daySum = logsIndexed30daySum; } - - public UsageBillableSummaryKeys logsIndexed360daySum( - UsageBillableSummaryBody logsIndexed360daySum) { + public UsageBillableSummaryKeys logsIndexed360daySum(UsageBillableSummaryBody logsIndexed360daySum) { this.logsIndexed360daySum = logsIndexed360daySum; this.unparsed |= logsIndexed360daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed360daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_360DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed360daySum() { - return logsIndexed360daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_360DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed360daySum() { + return logsIndexed360daySum; + } public void setLogsIndexed360daySum(UsageBillableSummaryBody logsIndexed360daySum) { this.logsIndexed360daySum = logsIndexed360daySum; } - public UsageBillableSummaryKeys logsIndexed3daySum(UsageBillableSummaryBody logsIndexed3daySum) { this.logsIndexed3daySum = logsIndexed3daySum; this.unparsed |= logsIndexed3daySum.unparsed; @@ -1616,67 +1478,59 @@ public UsageBillableSummaryKeys logsIndexed3daySum(UsageBillableSummaryBody logs } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed3daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED3DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed3daySum() { - return logsIndexed3daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED3DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed3daySum() { + return logsIndexed3daySum; + } public void setLogsIndexed3daySum(UsageBillableSummaryBody logsIndexed3daySum) { this.logsIndexed3daySum = logsIndexed3daySum; } - - public UsageBillableSummaryKeys logsIndexed45daySum( - UsageBillableSummaryBody logsIndexed45daySum) { + public UsageBillableSummaryKeys logsIndexed45daySum(UsageBillableSummaryBody logsIndexed45daySum) { this.logsIndexed45daySum = logsIndexed45daySum; this.unparsed |= logsIndexed45daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed45daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED45DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed45daySum() { - return logsIndexed45daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED45DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed45daySum() { + return logsIndexed45daySum; + } public void setLogsIndexed45daySum(UsageBillableSummaryBody logsIndexed45daySum) { this.logsIndexed45daySum = logsIndexed45daySum; } - - public UsageBillableSummaryKeys logsIndexed60daySum( - UsageBillableSummaryBody logsIndexed60daySum) { + public UsageBillableSummaryKeys logsIndexed60daySum(UsageBillableSummaryBody logsIndexed60daySum) { this.logsIndexed60daySum = logsIndexed60daySum; this.unparsed |= logsIndexed60daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed60daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED60DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed60daySum() { - return logsIndexed60daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED60DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed60daySum() { + return logsIndexed60daySum; + } public void setLogsIndexed60daySum(UsageBillableSummaryBody logsIndexed60daySum) { this.logsIndexed60daySum = logsIndexed60daySum; } - public UsageBillableSummaryKeys logsIndexed7daySum(UsageBillableSummaryBody logsIndexed7daySum) { this.logsIndexed7daySum = logsIndexed7daySum; this.unparsed |= logsIndexed7daySum.unparsed; @@ -1684,68 +1538,59 @@ public UsageBillableSummaryKeys logsIndexed7daySum(UsageBillableSummaryBody logs } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed7daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED7DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed7daySum() { - return logsIndexed7daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED7DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed7daySum() { + return logsIndexed7daySum; + } public void setLogsIndexed7daySum(UsageBillableSummaryBody logsIndexed7daySum) { this.logsIndexed7daySum = logsIndexed7daySum; } - - public UsageBillableSummaryKeys logsIndexed90daySum( - UsageBillableSummaryBody logsIndexed90daySum) { + public UsageBillableSummaryKeys logsIndexed90daySum(UsageBillableSummaryBody logsIndexed90daySum) { this.logsIndexed90daySum = logsIndexed90daySum; this.unparsed |= logsIndexed90daySum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexed90daySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED90DAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexed90daySum() { - return logsIndexed90daySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED90DAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexed90daySum() { + return logsIndexed90daySum; + } public void setLogsIndexed90daySum(UsageBillableSummaryBody logsIndexed90daySum) { this.logsIndexed90daySum = logsIndexed90daySum; } - - public UsageBillableSummaryKeys logsIndexedCustomRetentionSum( - UsageBillableSummaryBody logsIndexedCustomRetentionSum) { + public UsageBillableSummaryKeys logsIndexedCustomRetentionSum(UsageBillableSummaryBody logsIndexedCustomRetentionSum) { this.logsIndexedCustomRetentionSum = logsIndexedCustomRetentionSum; this.unparsed |= logsIndexedCustomRetentionSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexedCustomRetentionSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_CUSTOM_RETENTION_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexedCustomRetentionSum() { - return logsIndexedCustomRetentionSum; - } - - public void setLogsIndexedCustomRetentionSum( - UsageBillableSummaryBody logsIndexedCustomRetentionSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_CUSTOM_RETENTION_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexedCustomRetentionSum() { + return logsIndexedCustomRetentionSum; + } + public void setLogsIndexedCustomRetentionSum(UsageBillableSummaryBody logsIndexedCustomRetentionSum) { this.logsIndexedCustomRetentionSum = logsIndexedCustomRetentionSum; } - public UsageBillableSummaryKeys logsIndexedSum(UsageBillableSummaryBody logsIndexedSum) { this.logsIndexedSum = logsIndexedSum; this.unparsed |= logsIndexedSum.unparsed; @@ -1753,21 +1598,19 @@ public UsageBillableSummaryKeys logsIndexedSum(UsageBillableSummaryBody logsInde } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIndexedSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIndexedSum() { - return logsIndexedSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INDEXED_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIndexedSum() { + return logsIndexedSum; + } public void setLogsIndexedSum(UsageBillableSummaryBody logsIndexedSum) { this.logsIndexedSum = logsIndexedSum; } - public UsageBillableSummaryKeys logsIngestedSum(UsageBillableSummaryBody logsIngestedSum) { this.logsIngestedSum = logsIngestedSum; this.unparsed |= logsIngestedSum.unparsed; @@ -1775,21 +1618,19 @@ public UsageBillableSummaryKeys logsIngestedSum(UsageBillableSummaryBody logsIng } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return logsIngestedSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_INGESTED_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getLogsIngestedSum() { - return logsIngestedSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_INGESTED_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getLogsIngestedSum() { + return logsIngestedSum; + } public void setLogsIngestedSum(UsageBillableSummaryBody logsIngestedSum) { this.logsIngestedSum = logsIngestedSum; } - public UsageBillableSummaryKeys networkDeviceSum(UsageBillableSummaryBody networkDeviceSum) { this.networkDeviceSum = networkDeviceSum; this.unparsed |= networkDeviceSum.unparsed; @@ -1797,44 +1638,39 @@ public UsageBillableSummaryKeys networkDeviceSum(UsageBillableSummaryBody networ } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return networkDeviceSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_DEVICE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getNetworkDeviceSum() { - return networkDeviceSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_DEVICE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getNetworkDeviceSum() { + return networkDeviceSum; + } public void setNetworkDeviceSum(UsageBillableSummaryBody networkDeviceSum) { this.networkDeviceSum = networkDeviceSum; } - - public UsageBillableSummaryKeys networkDeviceTop99p( - UsageBillableSummaryBody networkDeviceTop99p) { + public UsageBillableSummaryKeys networkDeviceTop99p(UsageBillableSummaryBody networkDeviceTop99p) { this.networkDeviceTop99p = networkDeviceTop99p; this.unparsed |= networkDeviceTop99p.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return networkDeviceTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_DEVICE_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getNetworkDeviceTop99p() { - return networkDeviceTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_DEVICE_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getNetworkDeviceTop99p() { + return networkDeviceTop99p; + } public void setNetworkDeviceTop99p(UsageBillableSummaryBody networkDeviceTop99p) { this.networkDeviceTop99p = networkDeviceTop99p; } - public UsageBillableSummaryKeys npmFlowSum(UsageBillableSummaryBody npmFlowSum) { this.npmFlowSum = npmFlowSum; this.unparsed |= npmFlowSum.unparsed; @@ -1842,21 +1678,19 @@ public UsageBillableSummaryKeys npmFlowSum(UsageBillableSummaryBody npmFlowSum) } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return npmFlowSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_FLOW_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getNpmFlowSum() { - return npmFlowSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_FLOW_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getNpmFlowSum() { + return npmFlowSum; + } public void setNpmFlowSum(UsageBillableSummaryBody npmFlowSum) { this.npmFlowSum = npmFlowSum; } - public UsageBillableSummaryKeys npmHostSum(UsageBillableSummaryBody npmHostSum) { this.npmHostSum = npmHostSum; this.unparsed |= npmHostSum.unparsed; @@ -1864,21 +1698,19 @@ public UsageBillableSummaryKeys npmHostSum(UsageBillableSummaryBody npmHostSum) } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return npmHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getNpmHostSum() { - return npmHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getNpmHostSum() { + return npmHostSum; + } public void setNpmHostSum(UsageBillableSummaryBody npmHostSum) { this.npmHostSum = npmHostSum; } - public UsageBillableSummaryKeys npmHostTop99p(UsageBillableSummaryBody npmHostTop99p) { this.npmHostTop99p = npmHostTop99p; this.unparsed |= npmHostTop99p.unparsed; @@ -1886,44 +1718,39 @@ public UsageBillableSummaryKeys npmHostTop99p(UsageBillableSummaryBody npmHostTo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return npmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getNpmHostTop99p() { - return npmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getNpmHostTop99p() { + return npmHostTop99p; + } public void setNpmHostTop99p(UsageBillableSummaryBody npmHostTop99p) { this.npmHostTop99p = npmHostTop99p; } - - public UsageBillableSummaryKeys observabilityPipelineSum( - UsageBillableSummaryBody observabilityPipelineSum) { + public UsageBillableSummaryKeys observabilityPipelineSum(UsageBillableSummaryBody observabilityPipelineSum) { this.observabilityPipelineSum = observabilityPipelineSum; this.unparsed |= observabilityPipelineSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return observabilityPipelineSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getObservabilityPipelineSum() { - return observabilityPipelineSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getObservabilityPipelineSum() { + return observabilityPipelineSum; + } public void setObservabilityPipelineSum(UsageBillableSummaryBody observabilityPipelineSum) { this.observabilityPipelineSum = observabilityPipelineSum; } - public UsageBillableSummaryKeys onlineArchiveSum(UsageBillableSummaryBody onlineArchiveSum) { this.onlineArchiveSum = onlineArchiveSum; this.unparsed |= onlineArchiveSum.unparsed; @@ -1931,21 +1758,19 @@ public UsageBillableSummaryKeys onlineArchiveSum(UsageBillableSummaryBody online } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return onlineArchiveSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getOnlineArchiveSum() { - return onlineArchiveSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getOnlineArchiveSum() { + return onlineArchiveSum; + } public void setOnlineArchiveSum(UsageBillableSummaryBody onlineArchiveSum) { this.onlineArchiveSum = onlineArchiveSum; } - public UsageBillableSummaryKeys profContainerSum(UsageBillableSummaryBody profContainerSum) { this.profContainerSum = profContainerSum; this.unparsed |= profContainerSum.unparsed; @@ -1953,21 +1778,19 @@ public UsageBillableSummaryKeys profContainerSum(UsageBillableSummaryBody profCo } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return profContainerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROF_CONTAINER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getProfContainerSum() { - return profContainerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROF_CONTAINER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getProfContainerSum() { + return profContainerSum; + } public void setProfContainerSum(UsageBillableSummaryBody profContainerSum) { this.profContainerSum = profContainerSum; } - public UsageBillableSummaryKeys profHostSum(UsageBillableSummaryBody profHostSum) { this.profHostSum = profHostSum; this.unparsed |= profHostSum.unparsed; @@ -1975,21 +1798,19 @@ public UsageBillableSummaryKeys profHostSum(UsageBillableSummaryBody profHostSum } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return profHostSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROF_HOST_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getProfHostSum() { - return profHostSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROF_HOST_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getProfHostSum() { + return profHostSum; + } public void setProfHostSum(UsageBillableSummaryBody profHostSum) { this.profHostSum = profHostSum; } - public UsageBillableSummaryKeys profHostTop99p(UsageBillableSummaryBody profHostTop99p) { this.profHostTop99p = profHostTop99p; this.unparsed |= profHostTop99p.unparsed; @@ -1997,21 +1818,19 @@ public UsageBillableSummaryKeys profHostTop99p(UsageBillableSummaryBody profHost } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return profHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROF_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getProfHostTop99p() { - return profHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROF_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getProfHostTop99p() { + return profHostTop99p; + } public void setProfHostTop99p(UsageBillableSummaryBody profHostTop99p) { this.profHostTop99p = profHostTop99p; } - public UsageBillableSummaryKeys rumLiteSum(UsageBillableSummaryBody rumLiteSum) { this.rumLiteSum = rumLiteSum; this.unparsed |= rumLiteSum.unparsed; @@ -2019,21 +1838,19 @@ public UsageBillableSummaryKeys rumLiteSum(UsageBillableSummaryBody rumLiteSum) } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return rumLiteSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_LITE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getRumLiteSum() { - return rumLiteSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_LITE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getRumLiteSum() { + return rumLiteSum; + } public void setRumLiteSum(UsageBillableSummaryBody rumLiteSum) { this.rumLiteSum = rumLiteSum; } - public UsageBillableSummaryKeys rumReplaySum(UsageBillableSummaryBody rumReplaySum) { this.rumReplaySum = rumReplaySum; this.unparsed |= rumReplaySum.unparsed; @@ -2041,21 +1858,19 @@ public UsageBillableSummaryKeys rumReplaySum(UsageBillableSummaryBody rumReplayS } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return rumReplaySum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_REPLAY_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getRumReplaySum() { - return rumReplaySum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_REPLAY_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getRumReplaySum() { + return rumReplaySum; + } public void setRumReplaySum(UsageBillableSummaryBody rumReplaySum) { this.rumReplaySum = rumReplaySum; } - public UsageBillableSummaryKeys rumSum(UsageBillableSummaryBody rumSum) { this.rumSum = rumSum; this.unparsed |= rumSum.unparsed; @@ -2063,21 +1878,19 @@ public UsageBillableSummaryKeys rumSum(UsageBillableSummaryBody rumSum) { } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return rumSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getRumSum() { - return rumSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getRumSum() { + return rumSum; + } public void setRumSum(UsageBillableSummaryBody rumSum) { this.rumSum = rumSum; } - public UsageBillableSummaryKeys rumUnitsSum(UsageBillableSummaryBody rumUnitsSum) { this.rumUnitsSum = rumUnitsSum; this.unparsed |= rumUnitsSum.unparsed; @@ -2085,44 +1898,39 @@ public UsageBillableSummaryKeys rumUnitsSum(UsageBillableSummaryBody rumUnitsSum } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return rumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getRumUnitsSum() { - return rumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getRumUnitsSum() { + return rumUnitsSum; + } public void setRumUnitsSum(UsageBillableSummaryBody rumUnitsSum) { this.rumUnitsSum = rumUnitsSum; } - - public UsageBillableSummaryKeys sensitiveDataScannerSum( - UsageBillableSummaryBody sensitiveDataScannerSum) { + public UsageBillableSummaryKeys sensitiveDataScannerSum(UsageBillableSummaryBody sensitiveDataScannerSum) { this.sensitiveDataScannerSum = sensitiveDataScannerSum; this.unparsed |= sensitiveDataScannerSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return sensitiveDataScannerSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SENSITIVE_DATA_SCANNER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getSensitiveDataScannerSum() { - return sensitiveDataScannerSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENSITIVE_DATA_SCANNER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getSensitiveDataScannerSum() { + return sensitiveDataScannerSum; + } public void setSensitiveDataScannerSum(UsageBillableSummaryBody sensitiveDataScannerSum) { this.sensitiveDataScannerSum = sensitiveDataScannerSum; } - public UsageBillableSummaryKeys serverlessApmSum(UsageBillableSummaryBody serverlessApmSum) { this.serverlessApmSum = serverlessApmSum; this.unparsed |= serverlessApmSum.unparsed; @@ -2130,44 +1938,39 @@ public UsageBillableSummaryKeys serverlessApmSum(UsageBillableSummaryBody server } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return serverlessApmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERLESS_APM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getServerlessApmSum() { - return serverlessApmSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERLESS_APM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getServerlessApmSum() { + return serverlessApmSum; + } public void setServerlessApmSum(UsageBillableSummaryBody serverlessApmSum) { this.serverlessApmSum = serverlessApmSum; } - - public UsageBillableSummaryKeys serverlessInfraAverage( - UsageBillableSummaryBody serverlessInfraAverage) { + public UsageBillableSummaryKeys serverlessInfraAverage(UsageBillableSummaryBody serverlessInfraAverage) { this.serverlessInfraAverage = serverlessInfraAverage; this.unparsed |= serverlessInfraAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return serverlessInfraAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERLESS_INFRA_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getServerlessInfraAverage() { - return serverlessInfraAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERLESS_INFRA_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getServerlessInfraAverage() { + return serverlessInfraAverage; + } public void setServerlessInfraAverage(UsageBillableSummaryBody serverlessInfraAverage) { this.serverlessInfraAverage = serverlessInfraAverage; } - public UsageBillableSummaryKeys serverlessInfraSum(UsageBillableSummaryBody serverlessInfraSum) { this.serverlessInfraSum = serverlessInfraSum; this.unparsed |= serverlessInfraSum.unparsed; @@ -2175,44 +1978,39 @@ public UsageBillableSummaryKeys serverlessInfraSum(UsageBillableSummaryBody serv } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return serverlessInfraSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERLESS_INFRA_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getServerlessInfraSum() { - return serverlessInfraSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERLESS_INFRA_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getServerlessInfraSum() { + return serverlessInfraSum; + } public void setServerlessInfraSum(UsageBillableSummaryBody serverlessInfraSum) { this.serverlessInfraSum = serverlessInfraSum; } - - public UsageBillableSummaryKeys serverlessInvocationSum( - UsageBillableSummaryBody serverlessInvocationSum) { + public UsageBillableSummaryKeys serverlessInvocationSum(UsageBillableSummaryBody serverlessInvocationSum) { this.serverlessInvocationSum = serverlessInvocationSum; this.unparsed |= serverlessInvocationSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return serverlessInvocationSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVERLESS_INVOCATION_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getServerlessInvocationSum() { - return serverlessInvocationSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERLESS_INVOCATION_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getServerlessInvocationSum() { + return serverlessInvocationSum; + } public void setServerlessInvocationSum(UsageBillableSummaryBody serverlessInvocationSum) { this.serverlessInvocationSum = serverlessInvocationSum; } - public UsageBillableSummaryKeys siemSum(UsageBillableSummaryBody siemSum) { this.siemSum = siemSum; this.unparsed |= siemSum.unparsed; @@ -2220,113 +2018,99 @@ public UsageBillableSummaryKeys siemSum(UsageBillableSummaryBody siemSum) { } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return siemSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIEM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getSiemSum() { - return siemSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIEM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getSiemSum() { + return siemSum; + } public void setSiemSum(UsageBillableSummaryBody siemSum) { this.siemSum = siemSum; } - - public UsageBillableSummaryKeys standardTimeseriesAverage( - UsageBillableSummaryBody standardTimeseriesAverage) { + public UsageBillableSummaryKeys standardTimeseriesAverage(UsageBillableSummaryBody standardTimeseriesAverage) { this.standardTimeseriesAverage = standardTimeseriesAverage; this.unparsed |= standardTimeseriesAverage.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return standardTimeseriesAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STANDARD_TIMESERIES_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getStandardTimeseriesAverage() { - return standardTimeseriesAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STANDARD_TIMESERIES_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getStandardTimeseriesAverage() { + return standardTimeseriesAverage; + } public void setStandardTimeseriesAverage(UsageBillableSummaryBody standardTimeseriesAverage) { this.standardTimeseriesAverage = standardTimeseriesAverage; } - - public UsageBillableSummaryKeys syntheticsApiTestsSum( - UsageBillableSummaryBody syntheticsApiTestsSum) { + public UsageBillableSummaryKeys syntheticsApiTestsSum(UsageBillableSummaryBody syntheticsApiTestsSum) { this.syntheticsApiTestsSum = syntheticsApiTestsSum; this.unparsed |= syntheticsApiTestsSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return syntheticsApiTestsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_API_TESTS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getSyntheticsApiTestsSum() { - return syntheticsApiTestsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_API_TESTS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getSyntheticsApiTestsSum() { + return syntheticsApiTestsSum; + } public void setSyntheticsApiTestsSum(UsageBillableSummaryBody syntheticsApiTestsSum) { this.syntheticsApiTestsSum = syntheticsApiTestsSum; } - - public UsageBillableSummaryKeys syntheticsAppTestingMaximum( - UsageBillableSummaryBody syntheticsAppTestingMaximum) { + public UsageBillableSummaryKeys syntheticsAppTestingMaximum(UsageBillableSummaryBody syntheticsAppTestingMaximum) { this.syntheticsAppTestingMaximum = syntheticsAppTestingMaximum; this.unparsed |= syntheticsAppTestingMaximum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return syntheticsAppTestingMaximum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_APP_TESTING_MAXIMUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getSyntheticsAppTestingMaximum() { - return syntheticsAppTestingMaximum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_APP_TESTING_MAXIMUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getSyntheticsAppTestingMaximum() { + return syntheticsAppTestingMaximum; + } public void setSyntheticsAppTestingMaximum(UsageBillableSummaryBody syntheticsAppTestingMaximum) { this.syntheticsAppTestingMaximum = syntheticsAppTestingMaximum; } - - public UsageBillableSummaryKeys syntheticsBrowserChecksSum( - UsageBillableSummaryBody syntheticsBrowserChecksSum) { + public UsageBillableSummaryKeys syntheticsBrowserChecksSum(UsageBillableSummaryBody syntheticsBrowserChecksSum) { this.syntheticsBrowserChecksSum = syntheticsBrowserChecksSum; this.unparsed |= syntheticsBrowserChecksSum.unparsed; return this; } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return syntheticsBrowserChecksSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECKS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getSyntheticsBrowserChecksSum() { - return syntheticsBrowserChecksSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECKS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getSyntheticsBrowserChecksSum() { + return syntheticsBrowserChecksSum; + } public void setSyntheticsBrowserChecksSum(UsageBillableSummaryBody syntheticsBrowserChecksSum) { this.syntheticsBrowserChecksSum = syntheticsBrowserChecksSum; } - public UsageBillableSummaryKeys timeseriesAverage(UsageBillableSummaryBody timeseriesAverage) { this.timeseriesAverage = timeseriesAverage; this.unparsed |= timeseriesAverage.unparsed; @@ -2334,21 +2118,19 @@ public UsageBillableSummaryKeys timeseriesAverage(UsageBillableSummaryBody times } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return timeseriesAverage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESERIES_AVERAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getTimeseriesAverage() { - return timeseriesAverage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESERIES_AVERAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getTimeseriesAverage() { + return timeseriesAverage; + } public void setTimeseriesAverage(UsageBillableSummaryBody timeseriesAverage) { this.timeseriesAverage = timeseriesAverage; } - public UsageBillableSummaryKeys timeseriesSum(UsageBillableSummaryBody timeseriesSum) { this.timeseriesSum = timeseriesSum; this.unparsed |= timeseriesSum.unparsed; @@ -2356,22 +2138,23 @@ public UsageBillableSummaryKeys timeseriesSum(UsageBillableSummaryBody timeserie } /** - * Response with properties for each aggregated usage type. - * + *

Response with properties for each aggregated usage type.

* @return timeseriesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESERIES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageBillableSummaryBody getTimeseriesSum() { - return timeseriesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESERIES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageBillableSummaryBody getTimeseriesSum() { + return timeseriesSum; + } public void setTimeseriesSum(UsageBillableSummaryBody timeseriesSum) { this.timeseriesSum = timeseriesSum; } - /** Return true if this UsageBillableSummaryKeys object is equal to o. */ + /** + * Return true if this UsageBillableSummaryKeys object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -2381,223 +2164,13 @@ public boolean equals(Object o) { return false; } UsageBillableSummaryKeys usageBillableSummaryKeys = (UsageBillableSummaryKeys) o; - return Objects.equals(this.apmFargateAverage, usageBillableSummaryKeys.apmFargateAverage) - && Objects.equals(this.apmFargateSum, usageBillableSummaryKeys.apmFargateSum) - && Objects.equals(this.apmHostSum, usageBillableSummaryKeys.apmHostSum) - && Objects.equals(this.apmHostTop99p, usageBillableSummaryKeys.apmHostTop99p) - && Objects.equals(this.apmProfilerHostSum, usageBillableSummaryKeys.apmProfilerHostSum) - && Objects.equals( - this.apmProfilerHostTop99p, usageBillableSummaryKeys.apmProfilerHostTop99p) - && Objects.equals(this.apmTraceSearchSum, usageBillableSummaryKeys.apmTraceSearchSum) - && Objects.equals( - this.applicationSecurityFargateAverage, - usageBillableSummaryKeys.applicationSecurityFargateAverage) - && Objects.equals( - this.applicationSecurityHostSum, usageBillableSummaryKeys.applicationSecurityHostSum) - && Objects.equals( - this.applicationSecurityHostTop99, - usageBillableSummaryKeys.applicationSecurityHostTop99) - && Objects.equals( - this.ciPipelineIndexedSpansSum, usageBillableSummaryKeys.ciPipelineIndexedSpansSum) - && Objects.equals(this.ciPipelineMaximum, usageBillableSummaryKeys.ciPipelineMaximum) - && Objects.equals(this.ciPipelineSum, usageBillableSummaryKeys.ciPipelineSum) - && Objects.equals( - this.ciTestIndexedSpansSum, usageBillableSummaryKeys.ciTestIndexedSpansSum) - && Objects.equals(this.ciTestingMaximum, usageBillableSummaryKeys.ciTestingMaximum) - && Objects.equals(this.ciTestingSum, usageBillableSummaryKeys.ciTestingSum) - && Objects.equals( - this.cloudCostManagementAverage, usageBillableSummaryKeys.cloudCostManagementAverage) - && Objects.equals( - this.cloudCostManagementSum, usageBillableSummaryKeys.cloudCostManagementSum) - && Objects.equals(this.cspmContainerSum, usageBillableSummaryKeys.cspmContainerSum) - && Objects.equals(this.cspmHostSum, usageBillableSummaryKeys.cspmHostSum) - && Objects.equals(this.cspmHostTop99p, usageBillableSummaryKeys.cspmHostTop99p) - && Objects.equals(this.customEventSum, usageBillableSummaryKeys.customEventSum) - && Objects.equals(this.cwsContainerSum, usageBillableSummaryKeys.cwsContainerSum) - && Objects.equals(this.cwsHostSum, usageBillableSummaryKeys.cwsHostSum) - && Objects.equals(this.cwsHostTop99p, usageBillableSummaryKeys.cwsHostTop99p) - && Objects.equals(this.dbmHostSum, usageBillableSummaryKeys.dbmHostSum) - && Objects.equals(this.dbmHostTop99p, usageBillableSummaryKeys.dbmHostTop99p) - && Objects.equals( - this.dbmNormalizedQueriesAverage, usageBillableSummaryKeys.dbmNormalizedQueriesAverage) - && Objects.equals( - this.dbmNormalizedQueriesSum, usageBillableSummaryKeys.dbmNormalizedQueriesSum) - && Objects.equals( - this.fargateContainerApmAndProfilerAverage, - usageBillableSummaryKeys.fargateContainerApmAndProfilerAverage) - && Objects.equals( - this.fargateContainerApmAndProfilerSum, - usageBillableSummaryKeys.fargateContainerApmAndProfilerSum) - && Objects.equals( - this.fargateContainerAverage, usageBillableSummaryKeys.fargateContainerAverage) - && Objects.equals( - this.fargateContainerProfilerAverage, - usageBillableSummaryKeys.fargateContainerProfilerAverage) - && Objects.equals( - this.fargateContainerProfilerSum, usageBillableSummaryKeys.fargateContainerProfilerSum) - && Objects.equals(this.fargateContainerSum, usageBillableSummaryKeys.fargateContainerSum) - && Objects.equals( - this.incidentManagementMaximum, usageBillableSummaryKeys.incidentManagementMaximum) - && Objects.equals( - this.incidentManagementSum, usageBillableSummaryKeys.incidentManagementSum) - && Objects.equals(this.infraAndApmHostSum, usageBillableSummaryKeys.infraAndApmHostSum) - && Objects.equals( - this.infraAndApmHostTop99p, usageBillableSummaryKeys.infraAndApmHostTop99p) - && Objects.equals(this.infraContainerSum, usageBillableSummaryKeys.infraContainerSum) - && Objects.equals(this.infraHostSum, usageBillableSummaryKeys.infraHostSum) - && Objects.equals(this.infraHostTop99p, usageBillableSummaryKeys.infraHostTop99p) - && Objects.equals(this.ingestedSpansSum, usageBillableSummaryKeys.ingestedSpansSum) - && Objects.equals( - this.ingestedTimeseriesAverage, usageBillableSummaryKeys.ingestedTimeseriesAverage) - && Objects.equals( - this.ingestedTimeseriesSum, usageBillableSummaryKeys.ingestedTimeseriesSum) - && Objects.equals(this.iotSum, usageBillableSummaryKeys.iotSum) - && Objects.equals(this.iotTop99p, usageBillableSummaryKeys.iotTop99p) - && Objects.equals( - this.lambdaFunctionAverage, usageBillableSummaryKeys.lambdaFunctionAverage) - && Objects.equals(this.lambdaFunctionSum, usageBillableSummaryKeys.lambdaFunctionSum) - && Objects.equals(this.logsForwardingSum, usageBillableSummaryKeys.logsForwardingSum) - && Objects.equals(this.logsIndexed15daySum, usageBillableSummaryKeys.logsIndexed15daySum) - && Objects.equals(this.logsIndexed180daySum, usageBillableSummaryKeys.logsIndexed180daySum) - && Objects.equals(this.logsIndexed30daySum, usageBillableSummaryKeys.logsIndexed30daySum) - && Objects.equals(this.logsIndexed360daySum, usageBillableSummaryKeys.logsIndexed360daySum) - && Objects.equals(this.logsIndexed3daySum, usageBillableSummaryKeys.logsIndexed3daySum) - && Objects.equals(this.logsIndexed45daySum, usageBillableSummaryKeys.logsIndexed45daySum) - && Objects.equals(this.logsIndexed60daySum, usageBillableSummaryKeys.logsIndexed60daySum) - && Objects.equals(this.logsIndexed7daySum, usageBillableSummaryKeys.logsIndexed7daySum) - && Objects.equals(this.logsIndexed90daySum, usageBillableSummaryKeys.logsIndexed90daySum) - && Objects.equals( - this.logsIndexedCustomRetentionSum, - usageBillableSummaryKeys.logsIndexedCustomRetentionSum) - && Objects.equals(this.logsIndexedSum, usageBillableSummaryKeys.logsIndexedSum) - && Objects.equals(this.logsIngestedSum, usageBillableSummaryKeys.logsIngestedSum) - && Objects.equals(this.networkDeviceSum, usageBillableSummaryKeys.networkDeviceSum) - && Objects.equals(this.networkDeviceTop99p, usageBillableSummaryKeys.networkDeviceTop99p) - && Objects.equals(this.npmFlowSum, usageBillableSummaryKeys.npmFlowSum) - && Objects.equals(this.npmHostSum, usageBillableSummaryKeys.npmHostSum) - && Objects.equals(this.npmHostTop99p, usageBillableSummaryKeys.npmHostTop99p) - && Objects.equals( - this.observabilityPipelineSum, usageBillableSummaryKeys.observabilityPipelineSum) - && Objects.equals(this.onlineArchiveSum, usageBillableSummaryKeys.onlineArchiveSum) - && Objects.equals(this.profContainerSum, usageBillableSummaryKeys.profContainerSum) - && Objects.equals(this.profHostSum, usageBillableSummaryKeys.profHostSum) - && Objects.equals(this.profHostTop99p, usageBillableSummaryKeys.profHostTop99p) - && Objects.equals(this.rumLiteSum, usageBillableSummaryKeys.rumLiteSum) - && Objects.equals(this.rumReplaySum, usageBillableSummaryKeys.rumReplaySum) - && Objects.equals(this.rumSum, usageBillableSummaryKeys.rumSum) - && Objects.equals(this.rumUnitsSum, usageBillableSummaryKeys.rumUnitsSum) - && Objects.equals( - this.sensitiveDataScannerSum, usageBillableSummaryKeys.sensitiveDataScannerSum) - && Objects.equals(this.serverlessApmSum, usageBillableSummaryKeys.serverlessApmSum) - && Objects.equals( - this.serverlessInfraAverage, usageBillableSummaryKeys.serverlessInfraAverage) - && Objects.equals(this.serverlessInfraSum, usageBillableSummaryKeys.serverlessInfraSum) - && Objects.equals( - this.serverlessInvocationSum, usageBillableSummaryKeys.serverlessInvocationSum) - && Objects.equals(this.siemSum, usageBillableSummaryKeys.siemSum) - && Objects.equals( - this.standardTimeseriesAverage, usageBillableSummaryKeys.standardTimeseriesAverage) - && Objects.equals( - this.syntheticsApiTestsSum, usageBillableSummaryKeys.syntheticsApiTestsSum) - && Objects.equals( - this.syntheticsAppTestingMaximum, usageBillableSummaryKeys.syntheticsAppTestingMaximum) - && Objects.equals( - this.syntheticsBrowserChecksSum, usageBillableSummaryKeys.syntheticsBrowserChecksSum) - && Objects.equals(this.timeseriesAverage, usageBillableSummaryKeys.timeseriesAverage) - && Objects.equals(this.timeseriesSum, usageBillableSummaryKeys.timeseriesSum); + return Objects.equals(this.apmFargateAverage, usageBillableSummaryKeys.apmFargateAverage) && Objects.equals(this.apmFargateSum, usageBillableSummaryKeys.apmFargateSum) && Objects.equals(this.apmHostSum, usageBillableSummaryKeys.apmHostSum) && Objects.equals(this.apmHostTop99p, usageBillableSummaryKeys.apmHostTop99p) && Objects.equals(this.apmProfilerHostSum, usageBillableSummaryKeys.apmProfilerHostSum) && Objects.equals(this.apmProfilerHostTop99p, usageBillableSummaryKeys.apmProfilerHostTop99p) && Objects.equals(this.apmTraceSearchSum, usageBillableSummaryKeys.apmTraceSearchSum) && Objects.equals(this.applicationSecurityFargateAverage, usageBillableSummaryKeys.applicationSecurityFargateAverage) && Objects.equals(this.applicationSecurityHostSum, usageBillableSummaryKeys.applicationSecurityHostSum) && Objects.equals(this.applicationSecurityHostTop99, usageBillableSummaryKeys.applicationSecurityHostTop99) && Objects.equals(this.ciPipelineIndexedSpansSum, usageBillableSummaryKeys.ciPipelineIndexedSpansSum) && Objects.equals(this.ciPipelineMaximum, usageBillableSummaryKeys.ciPipelineMaximum) && Objects.equals(this.ciPipelineSum, usageBillableSummaryKeys.ciPipelineSum) && Objects.equals(this.ciTestIndexedSpansSum, usageBillableSummaryKeys.ciTestIndexedSpansSum) && Objects.equals(this.ciTestingMaximum, usageBillableSummaryKeys.ciTestingMaximum) && Objects.equals(this.ciTestingSum, usageBillableSummaryKeys.ciTestingSum) && Objects.equals(this.cloudCostManagementAverage, usageBillableSummaryKeys.cloudCostManagementAverage) && Objects.equals(this.cloudCostManagementSum, usageBillableSummaryKeys.cloudCostManagementSum) && Objects.equals(this.cspmContainerSum, usageBillableSummaryKeys.cspmContainerSum) && Objects.equals(this.cspmHostSum, usageBillableSummaryKeys.cspmHostSum) && Objects.equals(this.cspmHostTop99p, usageBillableSummaryKeys.cspmHostTop99p) && Objects.equals(this.customEventSum, usageBillableSummaryKeys.customEventSum) && Objects.equals(this.cwsContainerSum, usageBillableSummaryKeys.cwsContainerSum) && Objects.equals(this.cwsHostSum, usageBillableSummaryKeys.cwsHostSum) && Objects.equals(this.cwsHostTop99p, usageBillableSummaryKeys.cwsHostTop99p) && Objects.equals(this.dbmHostSum, usageBillableSummaryKeys.dbmHostSum) && Objects.equals(this.dbmHostTop99p, usageBillableSummaryKeys.dbmHostTop99p) && Objects.equals(this.dbmNormalizedQueriesAverage, usageBillableSummaryKeys.dbmNormalizedQueriesAverage) && Objects.equals(this.dbmNormalizedQueriesSum, usageBillableSummaryKeys.dbmNormalizedQueriesSum) && Objects.equals(this.fargateContainerApmAndProfilerAverage, usageBillableSummaryKeys.fargateContainerApmAndProfilerAverage) && Objects.equals(this.fargateContainerApmAndProfilerSum, usageBillableSummaryKeys.fargateContainerApmAndProfilerSum) && Objects.equals(this.fargateContainerAverage, usageBillableSummaryKeys.fargateContainerAverage) && Objects.equals(this.fargateContainerProfilerAverage, usageBillableSummaryKeys.fargateContainerProfilerAverage) && Objects.equals(this.fargateContainerProfilerSum, usageBillableSummaryKeys.fargateContainerProfilerSum) && Objects.equals(this.fargateContainerSum, usageBillableSummaryKeys.fargateContainerSum) && Objects.equals(this.incidentManagementMaximum, usageBillableSummaryKeys.incidentManagementMaximum) && Objects.equals(this.incidentManagementSum, usageBillableSummaryKeys.incidentManagementSum) && Objects.equals(this.infraAndApmHostSum, usageBillableSummaryKeys.infraAndApmHostSum) && Objects.equals(this.infraAndApmHostTop99p, usageBillableSummaryKeys.infraAndApmHostTop99p) && Objects.equals(this.infraContainerSum, usageBillableSummaryKeys.infraContainerSum) && Objects.equals(this.infraHostSum, usageBillableSummaryKeys.infraHostSum) && Objects.equals(this.infraHostTop99p, usageBillableSummaryKeys.infraHostTop99p) && Objects.equals(this.ingestedSpansSum, usageBillableSummaryKeys.ingestedSpansSum) && Objects.equals(this.ingestedTimeseriesAverage, usageBillableSummaryKeys.ingestedTimeseriesAverage) && Objects.equals(this.ingestedTimeseriesSum, usageBillableSummaryKeys.ingestedTimeseriesSum) && Objects.equals(this.iotSum, usageBillableSummaryKeys.iotSum) && Objects.equals(this.iotTop99p, usageBillableSummaryKeys.iotTop99p) && Objects.equals(this.lambdaFunctionAverage, usageBillableSummaryKeys.lambdaFunctionAverage) && Objects.equals(this.lambdaFunctionSum, usageBillableSummaryKeys.lambdaFunctionSum) && Objects.equals(this.logsForwardingSum, usageBillableSummaryKeys.logsForwardingSum) && Objects.equals(this.logsIndexed15daySum, usageBillableSummaryKeys.logsIndexed15daySum) && Objects.equals(this.logsIndexed180daySum, usageBillableSummaryKeys.logsIndexed180daySum) && Objects.equals(this.logsIndexed30daySum, usageBillableSummaryKeys.logsIndexed30daySum) && Objects.equals(this.logsIndexed360daySum, usageBillableSummaryKeys.logsIndexed360daySum) && Objects.equals(this.logsIndexed3daySum, usageBillableSummaryKeys.logsIndexed3daySum) && Objects.equals(this.logsIndexed45daySum, usageBillableSummaryKeys.logsIndexed45daySum) && Objects.equals(this.logsIndexed60daySum, usageBillableSummaryKeys.logsIndexed60daySum) && Objects.equals(this.logsIndexed7daySum, usageBillableSummaryKeys.logsIndexed7daySum) && Objects.equals(this.logsIndexed90daySum, usageBillableSummaryKeys.logsIndexed90daySum) && Objects.equals(this.logsIndexedCustomRetentionSum, usageBillableSummaryKeys.logsIndexedCustomRetentionSum) && Objects.equals(this.logsIndexedSum, usageBillableSummaryKeys.logsIndexedSum) && Objects.equals(this.logsIngestedSum, usageBillableSummaryKeys.logsIngestedSum) && Objects.equals(this.networkDeviceSum, usageBillableSummaryKeys.networkDeviceSum) && Objects.equals(this.networkDeviceTop99p, usageBillableSummaryKeys.networkDeviceTop99p) && Objects.equals(this.npmFlowSum, usageBillableSummaryKeys.npmFlowSum) && Objects.equals(this.npmHostSum, usageBillableSummaryKeys.npmHostSum) && Objects.equals(this.npmHostTop99p, usageBillableSummaryKeys.npmHostTop99p) && Objects.equals(this.observabilityPipelineSum, usageBillableSummaryKeys.observabilityPipelineSum) && Objects.equals(this.onlineArchiveSum, usageBillableSummaryKeys.onlineArchiveSum) && Objects.equals(this.profContainerSum, usageBillableSummaryKeys.profContainerSum) && Objects.equals(this.profHostSum, usageBillableSummaryKeys.profHostSum) && Objects.equals(this.profHostTop99p, usageBillableSummaryKeys.profHostTop99p) && Objects.equals(this.rumLiteSum, usageBillableSummaryKeys.rumLiteSum) && Objects.equals(this.rumReplaySum, usageBillableSummaryKeys.rumReplaySum) && Objects.equals(this.rumSum, usageBillableSummaryKeys.rumSum) && Objects.equals(this.rumUnitsSum, usageBillableSummaryKeys.rumUnitsSum) && Objects.equals(this.sensitiveDataScannerSum, usageBillableSummaryKeys.sensitiveDataScannerSum) && Objects.equals(this.serverlessApmSum, usageBillableSummaryKeys.serverlessApmSum) && Objects.equals(this.serverlessInfraAverage, usageBillableSummaryKeys.serverlessInfraAverage) && Objects.equals(this.serverlessInfraSum, usageBillableSummaryKeys.serverlessInfraSum) && Objects.equals(this.serverlessInvocationSum, usageBillableSummaryKeys.serverlessInvocationSum) && Objects.equals(this.siemSum, usageBillableSummaryKeys.siemSum) && Objects.equals(this.standardTimeseriesAverage, usageBillableSummaryKeys.standardTimeseriesAverage) && Objects.equals(this.syntheticsApiTestsSum, usageBillableSummaryKeys.syntheticsApiTestsSum) && Objects.equals(this.syntheticsAppTestingMaximum, usageBillableSummaryKeys.syntheticsAppTestingMaximum) && Objects.equals(this.syntheticsBrowserChecksSum, usageBillableSummaryKeys.syntheticsBrowserChecksSum) && Objects.equals(this.timeseriesAverage, usageBillableSummaryKeys.timeseriesAverage) && Objects.equals(this.timeseriesSum, usageBillableSummaryKeys.timeseriesSum); } + @Override public int hashCode() { - return Objects.hash( - apmFargateAverage, - apmFargateSum, - apmHostSum, - apmHostTop99p, - apmProfilerHostSum, - apmProfilerHostTop99p, - apmTraceSearchSum, - applicationSecurityFargateAverage, - applicationSecurityHostSum, - applicationSecurityHostTop99, - ciPipelineIndexedSpansSum, - ciPipelineMaximum, - ciPipelineSum, - ciTestIndexedSpansSum, - ciTestingMaximum, - ciTestingSum, - cloudCostManagementAverage, - cloudCostManagementSum, - cspmContainerSum, - cspmHostSum, - cspmHostTop99p, - customEventSum, - cwsContainerSum, - cwsHostSum, - cwsHostTop99p, - dbmHostSum, - dbmHostTop99p, - dbmNormalizedQueriesAverage, - dbmNormalizedQueriesSum, - fargateContainerApmAndProfilerAverage, - fargateContainerApmAndProfilerSum, - fargateContainerAverage, - fargateContainerProfilerAverage, - fargateContainerProfilerSum, - fargateContainerSum, - incidentManagementMaximum, - incidentManagementSum, - infraAndApmHostSum, - infraAndApmHostTop99p, - infraContainerSum, - infraHostSum, - infraHostTop99p, - ingestedSpansSum, - ingestedTimeseriesAverage, - ingestedTimeseriesSum, - iotSum, - iotTop99p, - lambdaFunctionAverage, - lambdaFunctionSum, - logsForwardingSum, - logsIndexed15daySum, - logsIndexed180daySum, - logsIndexed30daySum, - logsIndexed360daySum, - logsIndexed3daySum, - logsIndexed45daySum, - logsIndexed60daySum, - logsIndexed7daySum, - logsIndexed90daySum, - logsIndexedCustomRetentionSum, - logsIndexedSum, - logsIngestedSum, - networkDeviceSum, - networkDeviceTop99p, - npmFlowSum, - npmHostSum, - npmHostTop99p, - observabilityPipelineSum, - onlineArchiveSum, - profContainerSum, - profHostSum, - profHostTop99p, - rumLiteSum, - rumReplaySum, - rumSum, - rumUnitsSum, - sensitiveDataScannerSum, - serverlessApmSum, - serverlessInfraAverage, - serverlessInfraSum, - serverlessInvocationSum, - siemSum, - standardTimeseriesAverage, - syntheticsApiTestsSum, - syntheticsAppTestingMaximum, - syntheticsBrowserChecksSum, - timeseriesAverage, - timeseriesSum); + return Objects.hash(apmFargateAverage,apmFargateSum,apmHostSum,apmHostTop99p,apmProfilerHostSum,apmProfilerHostTop99p,apmTraceSearchSum,applicationSecurityFargateAverage,applicationSecurityHostSum,applicationSecurityHostTop99,ciPipelineIndexedSpansSum,ciPipelineMaximum,ciPipelineSum,ciTestIndexedSpansSum,ciTestingMaximum,ciTestingSum,cloudCostManagementAverage,cloudCostManagementSum,cspmContainerSum,cspmHostSum,cspmHostTop99p,customEventSum,cwsContainerSum,cwsHostSum,cwsHostTop99p,dbmHostSum,dbmHostTop99p,dbmNormalizedQueriesAverage,dbmNormalizedQueriesSum,fargateContainerApmAndProfilerAverage,fargateContainerApmAndProfilerSum,fargateContainerAverage,fargateContainerProfilerAverage,fargateContainerProfilerSum,fargateContainerSum,incidentManagementMaximum,incidentManagementSum,infraAndApmHostSum,infraAndApmHostTop99p,infraContainerSum,infraHostSum,infraHostTop99p,ingestedSpansSum,ingestedTimeseriesAverage,ingestedTimeseriesSum,iotSum,iotTop99p,lambdaFunctionAverage,lambdaFunctionSum,logsForwardingSum,logsIndexed15daySum,logsIndexed180daySum,logsIndexed30daySum,logsIndexed360daySum,logsIndexed3daySum,logsIndexed45daySum,logsIndexed60daySum,logsIndexed7daySum,logsIndexed90daySum,logsIndexedCustomRetentionSum,logsIndexedSum,logsIngestedSum,networkDeviceSum,networkDeviceTop99p,npmFlowSum,npmHostSum,npmHostTop99p,observabilityPipelineSum,onlineArchiveSum,profContainerSum,profHostSum,profHostTop99p,rumLiteSum,rumReplaySum,rumSum,rumUnitsSum,sensitiveDataScannerSum,serverlessApmSum,serverlessInfraAverage,serverlessInfraSum,serverlessInvocationSum,siemSum,standardTimeseriesAverage,syntheticsApiTestsSum,syntheticsAppTestingMaximum,syntheticsBrowserChecksSum,timeseriesAverage,timeseriesSum); } @Override @@ -2609,35 +2182,19 @@ public String toString() { sb.append(" apmHostSum: ").append(toIndentedString(apmHostSum)).append("\n"); sb.append(" apmHostTop99p: ").append(toIndentedString(apmHostTop99p)).append("\n"); sb.append(" apmProfilerHostSum: ").append(toIndentedString(apmProfilerHostSum)).append("\n"); - sb.append(" apmProfilerHostTop99p: ") - .append(toIndentedString(apmProfilerHostTop99p)) - .append("\n"); + sb.append(" apmProfilerHostTop99p: ").append(toIndentedString(apmProfilerHostTop99p)).append("\n"); sb.append(" apmTraceSearchSum: ").append(toIndentedString(apmTraceSearchSum)).append("\n"); - sb.append(" applicationSecurityFargateAverage: ") - .append(toIndentedString(applicationSecurityFargateAverage)) - .append("\n"); - sb.append(" applicationSecurityHostSum: ") - .append(toIndentedString(applicationSecurityHostSum)) - .append("\n"); - sb.append(" applicationSecurityHostTop99: ") - .append(toIndentedString(applicationSecurityHostTop99)) - .append("\n"); - sb.append(" ciPipelineIndexedSpansSum: ") - .append(toIndentedString(ciPipelineIndexedSpansSum)) - .append("\n"); + sb.append(" applicationSecurityFargateAverage: ").append(toIndentedString(applicationSecurityFargateAverage)).append("\n"); + sb.append(" applicationSecurityHostSum: ").append(toIndentedString(applicationSecurityHostSum)).append("\n"); + sb.append(" applicationSecurityHostTop99: ").append(toIndentedString(applicationSecurityHostTop99)).append("\n"); + sb.append(" ciPipelineIndexedSpansSum: ").append(toIndentedString(ciPipelineIndexedSpansSum)).append("\n"); sb.append(" ciPipelineMaximum: ").append(toIndentedString(ciPipelineMaximum)).append("\n"); sb.append(" ciPipelineSum: ").append(toIndentedString(ciPipelineSum)).append("\n"); - sb.append(" ciTestIndexedSpansSum: ") - .append(toIndentedString(ciTestIndexedSpansSum)) - .append("\n"); + sb.append(" ciTestIndexedSpansSum: ").append(toIndentedString(ciTestIndexedSpansSum)).append("\n"); sb.append(" ciTestingMaximum: ").append(toIndentedString(ciTestingMaximum)).append("\n"); sb.append(" ciTestingSum: ").append(toIndentedString(ciTestingSum)).append("\n"); - sb.append(" cloudCostManagementAverage: ") - .append(toIndentedString(cloudCostManagementAverage)) - .append("\n"); - sb.append(" cloudCostManagementSum: ") - .append(toIndentedString(cloudCostManagementSum)) - .append("\n"); + sb.append(" cloudCostManagementAverage: ").append(toIndentedString(cloudCostManagementAverage)).append("\n"); + sb.append(" cloudCostManagementSum: ").append(toIndentedString(cloudCostManagementSum)).append("\n"); sb.append(" cspmContainerSum: ").append(toIndentedString(cspmContainerSum)).append("\n"); sb.append(" cspmHostSum: ").append(toIndentedString(cspmHostSum)).append("\n"); sb.append(" cspmHostTop99p: ").append(toIndentedString(cspmHostTop99p)).append("\n"); @@ -2647,95 +2204,47 @@ public String toString() { sb.append(" cwsHostTop99p: ").append(toIndentedString(cwsHostTop99p)).append("\n"); sb.append(" dbmHostSum: ").append(toIndentedString(dbmHostSum)).append("\n"); sb.append(" dbmHostTop99p: ").append(toIndentedString(dbmHostTop99p)).append("\n"); - sb.append(" dbmNormalizedQueriesAverage: ") - .append(toIndentedString(dbmNormalizedQueriesAverage)) - .append("\n"); - sb.append(" dbmNormalizedQueriesSum: ") - .append(toIndentedString(dbmNormalizedQueriesSum)) - .append("\n"); - sb.append(" fargateContainerApmAndProfilerAverage: ") - .append(toIndentedString(fargateContainerApmAndProfilerAverage)) - .append("\n"); - sb.append(" fargateContainerApmAndProfilerSum: ") - .append(toIndentedString(fargateContainerApmAndProfilerSum)) - .append("\n"); - sb.append(" fargateContainerAverage: ") - .append(toIndentedString(fargateContainerAverage)) - .append("\n"); - sb.append(" fargateContainerProfilerAverage: ") - .append(toIndentedString(fargateContainerProfilerAverage)) - .append("\n"); - sb.append(" fargateContainerProfilerSum: ") - .append(toIndentedString(fargateContainerProfilerSum)) - .append("\n"); - sb.append(" fargateContainerSum: ") - .append(toIndentedString(fargateContainerSum)) - .append("\n"); - sb.append(" incidentManagementMaximum: ") - .append(toIndentedString(incidentManagementMaximum)) - .append("\n"); - sb.append(" incidentManagementSum: ") - .append(toIndentedString(incidentManagementSum)) - .append("\n"); + sb.append(" dbmNormalizedQueriesAverage: ").append(toIndentedString(dbmNormalizedQueriesAverage)).append("\n"); + sb.append(" dbmNormalizedQueriesSum: ").append(toIndentedString(dbmNormalizedQueriesSum)).append("\n"); + sb.append(" fargateContainerApmAndProfilerAverage: ").append(toIndentedString(fargateContainerApmAndProfilerAverage)).append("\n"); + sb.append(" fargateContainerApmAndProfilerSum: ").append(toIndentedString(fargateContainerApmAndProfilerSum)).append("\n"); + sb.append(" fargateContainerAverage: ").append(toIndentedString(fargateContainerAverage)).append("\n"); + sb.append(" fargateContainerProfilerAverage: ").append(toIndentedString(fargateContainerProfilerAverage)).append("\n"); + sb.append(" fargateContainerProfilerSum: ").append(toIndentedString(fargateContainerProfilerSum)).append("\n"); + sb.append(" fargateContainerSum: ").append(toIndentedString(fargateContainerSum)).append("\n"); + sb.append(" incidentManagementMaximum: ").append(toIndentedString(incidentManagementMaximum)).append("\n"); + sb.append(" incidentManagementSum: ").append(toIndentedString(incidentManagementSum)).append("\n"); sb.append(" infraAndApmHostSum: ").append(toIndentedString(infraAndApmHostSum)).append("\n"); - sb.append(" infraAndApmHostTop99p: ") - .append(toIndentedString(infraAndApmHostTop99p)) - .append("\n"); + sb.append(" infraAndApmHostTop99p: ").append(toIndentedString(infraAndApmHostTop99p)).append("\n"); sb.append(" infraContainerSum: ").append(toIndentedString(infraContainerSum)).append("\n"); sb.append(" infraHostSum: ").append(toIndentedString(infraHostSum)).append("\n"); sb.append(" infraHostTop99p: ").append(toIndentedString(infraHostTop99p)).append("\n"); sb.append(" ingestedSpansSum: ").append(toIndentedString(ingestedSpansSum)).append("\n"); - sb.append(" ingestedTimeseriesAverage: ") - .append(toIndentedString(ingestedTimeseriesAverage)) - .append("\n"); - sb.append(" ingestedTimeseriesSum: ") - .append(toIndentedString(ingestedTimeseriesSum)) - .append("\n"); + sb.append(" ingestedTimeseriesAverage: ").append(toIndentedString(ingestedTimeseriesAverage)).append("\n"); + sb.append(" ingestedTimeseriesSum: ").append(toIndentedString(ingestedTimeseriesSum)).append("\n"); sb.append(" iotSum: ").append(toIndentedString(iotSum)).append("\n"); sb.append(" iotTop99p: ").append(toIndentedString(iotTop99p)).append("\n"); - sb.append(" lambdaFunctionAverage: ") - .append(toIndentedString(lambdaFunctionAverage)) - .append("\n"); + sb.append(" lambdaFunctionAverage: ").append(toIndentedString(lambdaFunctionAverage)).append("\n"); sb.append(" lambdaFunctionSum: ").append(toIndentedString(lambdaFunctionSum)).append("\n"); sb.append(" logsForwardingSum: ").append(toIndentedString(logsForwardingSum)).append("\n"); - sb.append(" logsIndexed15daySum: ") - .append(toIndentedString(logsIndexed15daySum)) - .append("\n"); - sb.append(" logsIndexed180daySum: ") - .append(toIndentedString(logsIndexed180daySum)) - .append("\n"); - sb.append(" logsIndexed30daySum: ") - .append(toIndentedString(logsIndexed30daySum)) - .append("\n"); - sb.append(" logsIndexed360daySum: ") - .append(toIndentedString(logsIndexed360daySum)) - .append("\n"); + sb.append(" logsIndexed15daySum: ").append(toIndentedString(logsIndexed15daySum)).append("\n"); + sb.append(" logsIndexed180daySum: ").append(toIndentedString(logsIndexed180daySum)).append("\n"); + sb.append(" logsIndexed30daySum: ").append(toIndentedString(logsIndexed30daySum)).append("\n"); + sb.append(" logsIndexed360daySum: ").append(toIndentedString(logsIndexed360daySum)).append("\n"); sb.append(" logsIndexed3daySum: ").append(toIndentedString(logsIndexed3daySum)).append("\n"); - sb.append(" logsIndexed45daySum: ") - .append(toIndentedString(logsIndexed45daySum)) - .append("\n"); - sb.append(" logsIndexed60daySum: ") - .append(toIndentedString(logsIndexed60daySum)) - .append("\n"); + sb.append(" logsIndexed45daySum: ").append(toIndentedString(logsIndexed45daySum)).append("\n"); + sb.append(" logsIndexed60daySum: ").append(toIndentedString(logsIndexed60daySum)).append("\n"); sb.append(" logsIndexed7daySum: ").append(toIndentedString(logsIndexed7daySum)).append("\n"); - sb.append(" logsIndexed90daySum: ") - .append(toIndentedString(logsIndexed90daySum)) - .append("\n"); - sb.append(" logsIndexedCustomRetentionSum: ") - .append(toIndentedString(logsIndexedCustomRetentionSum)) - .append("\n"); + sb.append(" logsIndexed90daySum: ").append(toIndentedString(logsIndexed90daySum)).append("\n"); + sb.append(" logsIndexedCustomRetentionSum: ").append(toIndentedString(logsIndexedCustomRetentionSum)).append("\n"); sb.append(" logsIndexedSum: ").append(toIndentedString(logsIndexedSum)).append("\n"); sb.append(" logsIngestedSum: ").append(toIndentedString(logsIngestedSum)).append("\n"); sb.append(" networkDeviceSum: ").append(toIndentedString(networkDeviceSum)).append("\n"); - sb.append(" networkDeviceTop99p: ") - .append(toIndentedString(networkDeviceTop99p)) - .append("\n"); + sb.append(" networkDeviceTop99p: ").append(toIndentedString(networkDeviceTop99p)).append("\n"); sb.append(" npmFlowSum: ").append(toIndentedString(npmFlowSum)).append("\n"); sb.append(" npmHostSum: ").append(toIndentedString(npmHostSum)).append("\n"); sb.append(" npmHostTop99p: ").append(toIndentedString(npmHostTop99p)).append("\n"); - sb.append(" observabilityPipelineSum: ") - .append(toIndentedString(observabilityPipelineSum)) - .append("\n"); + sb.append(" observabilityPipelineSum: ").append(toIndentedString(observabilityPipelineSum)).append("\n"); sb.append(" onlineArchiveSum: ").append(toIndentedString(onlineArchiveSum)).append("\n"); sb.append(" profContainerSum: ").append(toIndentedString(profContainerSum)).append("\n"); sb.append(" profHostSum: ").append(toIndentedString(profHostSum)).append("\n"); @@ -2744,30 +2253,16 @@ public String toString() { sb.append(" rumReplaySum: ").append(toIndentedString(rumReplaySum)).append("\n"); sb.append(" rumSum: ").append(toIndentedString(rumSum)).append("\n"); sb.append(" rumUnitsSum: ").append(toIndentedString(rumUnitsSum)).append("\n"); - sb.append(" sensitiveDataScannerSum: ") - .append(toIndentedString(sensitiveDataScannerSum)) - .append("\n"); + sb.append(" sensitiveDataScannerSum: ").append(toIndentedString(sensitiveDataScannerSum)).append("\n"); sb.append(" serverlessApmSum: ").append(toIndentedString(serverlessApmSum)).append("\n"); - sb.append(" serverlessInfraAverage: ") - .append(toIndentedString(serverlessInfraAverage)) - .append("\n"); + sb.append(" serverlessInfraAverage: ").append(toIndentedString(serverlessInfraAverage)).append("\n"); sb.append(" serverlessInfraSum: ").append(toIndentedString(serverlessInfraSum)).append("\n"); - sb.append(" serverlessInvocationSum: ") - .append(toIndentedString(serverlessInvocationSum)) - .append("\n"); + sb.append(" serverlessInvocationSum: ").append(toIndentedString(serverlessInvocationSum)).append("\n"); sb.append(" siemSum: ").append(toIndentedString(siemSum)).append("\n"); - sb.append(" standardTimeseriesAverage: ") - .append(toIndentedString(standardTimeseriesAverage)) - .append("\n"); - sb.append(" syntheticsApiTestsSum: ") - .append(toIndentedString(syntheticsApiTestsSum)) - .append("\n"); - sb.append(" syntheticsAppTestingMaximum: ") - .append(toIndentedString(syntheticsAppTestingMaximum)) - .append("\n"); - sb.append(" syntheticsBrowserChecksSum: ") - .append(toIndentedString(syntheticsBrowserChecksSum)) - .append("\n"); + sb.append(" standardTimeseriesAverage: ").append(toIndentedString(standardTimeseriesAverage)).append("\n"); + sb.append(" syntheticsApiTestsSum: ").append(toIndentedString(syntheticsApiTestsSum)).append("\n"); + sb.append(" syntheticsAppTestingMaximum: ").append(toIndentedString(syntheticsAppTestingMaximum)).append("\n"); + sb.append(" syntheticsBrowserChecksSum: ").append(toIndentedString(syntheticsBrowserChecksSum)).append("\n"); sb.append(" timeseriesAverage: ").append(toIndentedString(timeseriesAverage)).append("\n"); sb.append(" timeseriesSum: ").append(toIndentedString(timeseriesSum)).append("\n"); sb.append("}"); @@ -2775,7 +2270,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryResponse.java index a35a97559f3..322ff195e53 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageBillableSummaryResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response with monthly summary of data billed by Datadog. */ -@JsonPropertyOrder({UsageBillableSummaryResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response with monthly summary of data billed by Datadog.

+ */ +@JsonPropertyOrder({ + UsageBillableSummaryResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageBillableSummaryResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageBillableSummaryResponse usage(List usage) } return this; } - public UsageBillableSummaryResponse addUsageItem(UsageBillableSummaryHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageBillableSummaryResponse addUsageItem(UsageBillableSummaryHour usageI } /** - * An array of objects regarding usage of billable summary. - * + *

An array of objects regarding usage of billable summary.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageBillableSummaryResponse object is equal to o. */ + /** + * Return true if this UsageBillableSummaryResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageBillableSummaryResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityHour.java index f48d5a1160f..b92f6cf6fc5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityHour.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** CI visibility usage in a given hour. */ +/** + *

CI visibility usage in a given hour.

+ */ @JsonPropertyOrder({ UsageCIVisibilityHour.JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS, UsageCIVisibilityHour.JSON_PROPERTY_CI_TEST_INDEXED_SPANS, @@ -21,22 +41,20 @@ UsageCIVisibilityHour.JSON_PROPERTY_ORG_NAME, UsageCIVisibilityHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCIVisibilityHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS = "ci_pipeline_indexed_spans"; private Long ciPipelineIndexedSpans; public static final String JSON_PROPERTY_CI_TEST_INDEXED_SPANS = "ci_test_indexed_spans"; private Long ciTestIndexedSpans; - public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS = - "ci_visibility_pipeline_committers"; + public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS = "ci_visibility_pipeline_committers"; private Long ciVisibilityPipelineCommitters; - public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS = - "ci_visibility_test_committers"; + public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS = "ci_visibility_test_committers"; private Long ciVisibilityTestCommitters; public static final String JSON_PROPERTY_ORG_NAME = "org_name"; @@ -51,129 +69,118 @@ public UsageCIVisibilityHour ciPipelineIndexedSpans(Long ciPipelineIndexedSpans) } /** - * The number of spans for pipelines in the queried hour. - * + *

The number of spans for pipelines in the queried hour.

* @return ciPipelineIndexedSpans - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiPipelineIndexedSpans() { - return ciPipelineIndexedSpans; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiPipelineIndexedSpans() { + return ciPipelineIndexedSpans; + } public void setCiPipelineIndexedSpans(Long ciPipelineIndexedSpans) { this.ciPipelineIndexedSpans = ciPipelineIndexedSpans; } - public UsageCIVisibilityHour ciTestIndexedSpans(Long ciTestIndexedSpans) { this.ciTestIndexedSpans = ciTestIndexedSpans; return this; } /** - * The number of spans for tests in the queried hour. - * + *

The number of spans for tests in the queried hour.

* @return ciTestIndexedSpans - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiTestIndexedSpans() { - return ciTestIndexedSpans; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiTestIndexedSpans() { + return ciTestIndexedSpans; + } public void setCiTestIndexedSpans(Long ciTestIndexedSpans) { this.ciTestIndexedSpans = ciTestIndexedSpans; } - public UsageCIVisibilityHour ciVisibilityPipelineCommitters(Long ciVisibilityPipelineCommitters) { this.ciVisibilityPipelineCommitters = ciVisibilityPipelineCommitters; return this; } /** - * Shows the total count of all active Git committers for Pipelines in the current month. A - * committer is active if they commit at least 3 times in a given month. - * + *

Shows the total count of all active Git committers for Pipelines in the current month. A committer is active if they commit at least 3 times in a given month.

* @return ciVisibilityPipelineCommitters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityPipelineCommitters() { - return ciVisibilityPipelineCommitters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityPipelineCommitters() { + return ciVisibilityPipelineCommitters; + } public void setCiVisibilityPipelineCommitters(Long ciVisibilityPipelineCommitters) { this.ciVisibilityPipelineCommitters = ciVisibilityPipelineCommitters; } - public UsageCIVisibilityHour ciVisibilityTestCommitters(Long ciVisibilityTestCommitters) { this.ciVisibilityTestCommitters = ciVisibilityTestCommitters; return this; } /** - * The total count of all active Git committers for tests in the current month. A committer is - * active if they commit at least 3 times in a given month. - * + *

The total count of all active Git committers for tests in the current month. A committer is active if they commit at least 3 times in a given month.

* @return ciVisibilityTestCommitters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityTestCommitters() { - return ciVisibilityTestCommitters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityTestCommitters() { + return ciVisibilityTestCommitters; + } public void setCiVisibilityTestCommitters(Long ciVisibilityTestCommitters) { this.ciVisibilityTestCommitters = ciVisibilityTestCommitters; } - public UsageCIVisibilityHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageCIVisibilityHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageCIVisibilityHour object is equal to o. */ + /** + * Return true if this UsageCIVisibilityHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,42 +190,23 @@ public boolean equals(Object o) { return false; } UsageCIVisibilityHour usageCiVisibilityHour = (UsageCIVisibilityHour) o; - return Objects.equals(this.ciPipelineIndexedSpans, usageCiVisibilityHour.ciPipelineIndexedSpans) - && Objects.equals(this.ciTestIndexedSpans, usageCiVisibilityHour.ciTestIndexedSpans) - && Objects.equals( - this.ciVisibilityPipelineCommitters, - usageCiVisibilityHour.ciVisibilityPipelineCommitters) - && Objects.equals( - this.ciVisibilityTestCommitters, usageCiVisibilityHour.ciVisibilityTestCommitters) - && Objects.equals(this.orgName, usageCiVisibilityHour.orgName) - && Objects.equals(this.publicId, usageCiVisibilityHour.publicId); + return Objects.equals(this.ciPipelineIndexedSpans, usageCiVisibilityHour.ciPipelineIndexedSpans) && Objects.equals(this.ciTestIndexedSpans, usageCiVisibilityHour.ciTestIndexedSpans) && Objects.equals(this.ciVisibilityPipelineCommitters, usageCiVisibilityHour.ciVisibilityPipelineCommitters) && Objects.equals(this.ciVisibilityTestCommitters, usageCiVisibilityHour.ciVisibilityTestCommitters) && Objects.equals(this.orgName, usageCiVisibilityHour.orgName) && Objects.equals(this.publicId, usageCiVisibilityHour.publicId); } + @Override public int hashCode() { - return Objects.hash( - ciPipelineIndexedSpans, - ciTestIndexedSpans, - ciVisibilityPipelineCommitters, - ciVisibilityTestCommitters, - orgName, - publicId); + return Objects.hash(ciPipelineIndexedSpans,ciTestIndexedSpans,ciVisibilityPipelineCommitters,ciVisibilityTestCommitters,orgName,publicId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageCIVisibilityHour {\n"); - sb.append(" ciPipelineIndexedSpans: ") - .append(toIndentedString(ciPipelineIndexedSpans)) - .append("\n"); + sb.append(" ciPipelineIndexedSpans: ").append(toIndentedString(ciPipelineIndexedSpans)).append("\n"); sb.append(" ciTestIndexedSpans: ").append(toIndentedString(ciTestIndexedSpans)).append("\n"); - sb.append(" ciVisibilityPipelineCommitters: ") - .append(toIndentedString(ciVisibilityPipelineCommitters)) - .append("\n"); - sb.append(" ciVisibilityTestCommitters: ") - .append(toIndentedString(ciVisibilityTestCommitters)) - .append("\n"); + sb.append(" ciVisibilityPipelineCommitters: ").append(toIndentedString(ciVisibilityPipelineCommitters)).append("\n"); + sb.append(" ciVisibilityTestCommitters: ").append(toIndentedString(ciVisibilityTestCommitters)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append("}"); @@ -226,7 +214,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityResponse.java index 152ca97c4f2..6ecf7bdb2a5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCIVisibilityResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** CI visibility usage response */ -@JsonPropertyOrder({UsageCIVisibilityResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

CI visibility usage response

+ */ +@JsonPropertyOrder({ + UsageCIVisibilityResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCIVisibilityResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageCIVisibilityResponse usage(List usage) { } return this; } - public UsageCIVisibilityResponse addUsageItem(UsageCIVisibilityHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageCIVisibilityResponse addUsageItem(UsageCIVisibilityHour usageItem) { } /** - * Response containing CI visibility usage. - * + *

Response containing CI visibility usage.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageCIVisibilityResponse object is equal to o. */ + /** + * Return true if this UsageCIVisibilityResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageCiVisibilityResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCWSHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageCWSHour.java index a9daa82fae4..058e920e186 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCWSHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCWSHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Cloud Workload Security usage for a given organization for a given hour. */ +/** + *

Cloud Workload Security usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageCWSHour.JSON_PROPERTY_CWS_CONTAINER_COUNT, UsageCWSHour.JSON_PROPERTY_CWS_HOST_COUNT, @@ -23,10 +40,10 @@ UsageCWSHour.JSON_PROPERTY_ORG_NAME, UsageCWSHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCWSHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CWS_CONTAINER_COUNT = "cws_container_count"; private Long cwsContainerCount; @@ -34,7 +51,6 @@ public class UsageCWSHour { private Long cwsHostCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -50,108 +66,99 @@ public UsageCWSHour cwsContainerCount(Long cwsContainerCount) { } /** - * The total number of Cloud Workload Security container hours from the start of the given hour’s - * month until the given hour. - * + *

The total number of Cloud Workload Security container hours from the start of the given hour’s month until the given hour.

* @return cwsContainerCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsContainerCount() { - return cwsContainerCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsContainerCount() { + return cwsContainerCount; + } public void setCwsContainerCount(Long cwsContainerCount) { this.cwsContainerCount = cwsContainerCount; } - public UsageCWSHour cwsHostCount(Long cwsHostCount) { this.cwsHostCount = cwsHostCount; return this; } /** - * The total number of Cloud Workload Security host hours from the start of the given hour’s month - * until the given hour. - * + *

The total number of Cloud Workload Security host hours from the start of the given hour’s month until the given hour.

* @return cwsHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsHostCount() { - return cwsHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsHostCount() { + return cwsHostCount; + } public void setCwsHostCount(Long cwsHostCount) { this.cwsHostCount = cwsHostCount; } - public UsageCWSHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageCWSHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageCWSHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageCWSHour object is equal to o. */ + /** + * Return true if this UsageCWSHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -161,16 +168,13 @@ public boolean equals(Object o) { return false; } UsageCWSHour usageCwsHour = (UsageCWSHour) o; - return Objects.equals(this.cwsContainerCount, usageCwsHour.cwsContainerCount) - && Objects.equals(this.cwsHostCount, usageCwsHour.cwsHostCount) - && Objects.equals(this.hour, usageCwsHour.hour) - && Objects.equals(this.orgName, usageCwsHour.orgName) - && Objects.equals(this.publicId, usageCwsHour.publicId); + return Objects.equals(this.cwsContainerCount, usageCwsHour.cwsContainerCount) && Objects.equals(this.cwsHostCount, usageCwsHour.cwsHostCount) && Objects.equals(this.hour, usageCwsHour.hour) && Objects.equals(this.orgName, usageCwsHour.orgName) && Objects.equals(this.publicId, usageCwsHour.publicId); } + @Override public int hashCode() { - return Objects.hash(cwsContainerCount, cwsHostCount, hour, orgName, publicId); + return Objects.hash(cwsContainerCount,cwsHostCount,hour,orgName,publicId); } @Override @@ -187,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCWSResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageCWSResponse.java index ffaf52aa6be..9e8361e22a1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCWSResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCWSResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the Cloud Workload Security usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageCWSResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the Cloud Workload Security usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageCWSResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCWSResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageCWSResponse usage(List usage) { } return this; } - public UsageCWSResponse addUsageItem(UsageCWSHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageCWSResponse addUsageItem(UsageCWSHour usageItem) { } /** - * Get hourly usage for Cloud Workload Security. - * + *

Get hourly usage for Cloud Workload Security.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageCWSResponse object is equal to o. */ + /** + * Return true if this UsageCWSResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageCwsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementHour.java index 0e876b8b1d6..6fc0b99aad1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementHour.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Cloud Security Posture Management usage for a given organization for a given hour. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Cloud Security Posture Management usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageCloudSecurityPostureManagementHour.JSON_PROPERTY_AAS_HOST_COUNT, UsageCloudSecurityPostureManagementHour.JSON_PROPERTY_AWS_HOST_COUNT, @@ -29,10 +45,10 @@ UsageCloudSecurityPostureManagementHour.JSON_PROPERTY_ORG_NAME, UsageCloudSecurityPostureManagementHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCloudSecurityPostureManagementHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AAS_HOST_COUNT = "aas_host_count"; private JsonNullable aasHostCount = JsonNullable.undefined(); @@ -55,7 +71,6 @@ public class UsageCloudSecurityPostureManagementHour { private JsonNullable hostCount = JsonNullable.undefined(); public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -71,281 +86,243 @@ public UsageCloudSecurityPostureManagementHour aasHostCount(Double aasHostCount) } /** - * The number of Cloud Security Posture Management Azure app services hosts during a given hour. - * + *

The number of Cloud Security Posture Management Azure app services hosts during a given hour.

* @return aasHostCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getAasHostCount() { - return aasHostCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getAasHostCount() { + return aasHostCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_AAS_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getAasHostCount_JsonNullable() { return aasHostCount; } - - @JsonProperty(JSON_PROPERTY_AAS_HOST_COUNT) - public void setAasHostCount_JsonNullable(JsonNullable aasHostCount) { + @JsonProperty(JSON_PROPERTY_AAS_HOST_COUNT)public void setAasHostCount_JsonNullable(JsonNullable aasHostCount) { this.aasHostCount = aasHostCount; } - public void setAasHostCount(Double aasHostCount) { this.aasHostCount = JsonNullable.of(aasHostCount); } - public UsageCloudSecurityPostureManagementHour awsHostCount(Double awsHostCount) { this.awsHostCount = JsonNullable.of(awsHostCount); return this; } /** - * The number of Cloud Security Posture Management AWS hosts during a given hour. - * + *

The number of Cloud Security Posture Management AWS hosts during a given hour.

* @return awsHostCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getAwsHostCount() { - return awsHostCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getAwsHostCount() { + return awsHostCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_AWS_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getAwsHostCount_JsonNullable() { return awsHostCount; } - - @JsonProperty(JSON_PROPERTY_AWS_HOST_COUNT) - public void setAwsHostCount_JsonNullable(JsonNullable awsHostCount) { + @JsonProperty(JSON_PROPERTY_AWS_HOST_COUNT)public void setAwsHostCount_JsonNullable(JsonNullable awsHostCount) { this.awsHostCount = awsHostCount; } - public void setAwsHostCount(Double awsHostCount) { this.awsHostCount = JsonNullable.of(awsHostCount); } - public UsageCloudSecurityPostureManagementHour azureHostCount(Double azureHostCount) { this.azureHostCount = JsonNullable.of(azureHostCount); return this; } /** - * The number of Cloud Security Posture Management Azure hosts during a given hour. - * + *

The number of Cloud Security Posture Management Azure hosts during a given hour.

* @return azureHostCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getAzureHostCount() { - return azureHostCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getAzureHostCount() { + return azureHostCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_AZURE_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getAzureHostCount_JsonNullable() { return azureHostCount; } - - @JsonProperty(JSON_PROPERTY_AZURE_HOST_COUNT) - public void setAzureHostCount_JsonNullable(JsonNullable azureHostCount) { + @JsonProperty(JSON_PROPERTY_AZURE_HOST_COUNT)public void setAzureHostCount_JsonNullable(JsonNullable azureHostCount) { this.azureHostCount = azureHostCount; } - public void setAzureHostCount(Double azureHostCount) { this.azureHostCount = JsonNullable.of(azureHostCount); } - public UsageCloudSecurityPostureManagementHour complianceHostCount(Double complianceHostCount) { this.complianceHostCount = JsonNullable.of(complianceHostCount); return this; } /** - * The number of Cloud Security Posture Management hosts during a given hour. - * + *

The number of Cloud Security Posture Management hosts during a given hour.

* @return complianceHostCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getComplianceHostCount() { - return complianceHostCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getComplianceHostCount() { + return complianceHostCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_COMPLIANCE_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getComplianceHostCount_JsonNullable() { return complianceHostCount; } - - @JsonProperty(JSON_PROPERTY_COMPLIANCE_HOST_COUNT) - public void setComplianceHostCount_JsonNullable(JsonNullable complianceHostCount) { + @JsonProperty(JSON_PROPERTY_COMPLIANCE_HOST_COUNT)public void setComplianceHostCount_JsonNullable(JsonNullable complianceHostCount) { this.complianceHostCount = complianceHostCount; } - public void setComplianceHostCount(Double complianceHostCount) { this.complianceHostCount = JsonNullable.of(complianceHostCount); } - public UsageCloudSecurityPostureManagementHour containerCount(Double containerCount) { this.containerCount = JsonNullable.of(containerCount); return this; } /** - * The total number of Cloud Security Posture Management containers during a given hour. - * + *

The total number of Cloud Security Posture Management containers during a given hour.

* @return containerCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getContainerCount() { - return containerCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getContainerCount() { + return containerCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_CONTAINER_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getContainerCount_JsonNullable() { return containerCount; } - - @JsonProperty(JSON_PROPERTY_CONTAINER_COUNT) - public void setContainerCount_JsonNullable(JsonNullable containerCount) { + @JsonProperty(JSON_PROPERTY_CONTAINER_COUNT)public void setContainerCount_JsonNullable(JsonNullable containerCount) { this.containerCount = containerCount; } - public void setContainerCount(Double containerCount) { this.containerCount = JsonNullable.of(containerCount); } - public UsageCloudSecurityPostureManagementHour gcpHostCount(Double gcpHostCount) { this.gcpHostCount = JsonNullable.of(gcpHostCount); return this; } /** - * The number of Cloud Security Posture Management GCP hosts during a given hour. - * + *

The number of Cloud Security Posture Management GCP hosts during a given hour.

* @return gcpHostCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getGcpHostCount() { - return gcpHostCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getGcpHostCount() { + return gcpHostCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_GCP_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getGcpHostCount_JsonNullable() { return gcpHostCount; } - - @JsonProperty(JSON_PROPERTY_GCP_HOST_COUNT) - public void setGcpHostCount_JsonNullable(JsonNullable gcpHostCount) { + @JsonProperty(JSON_PROPERTY_GCP_HOST_COUNT)public void setGcpHostCount_JsonNullable(JsonNullable gcpHostCount) { this.gcpHostCount = gcpHostCount; } - public void setGcpHostCount(Double gcpHostCount) { this.gcpHostCount = JsonNullable.of(gcpHostCount); } - public UsageCloudSecurityPostureManagementHour hostCount(Double hostCount) { this.hostCount = JsonNullable.of(hostCount); return this; } /** - * The total number of Cloud Security Posture Management hosts during a given hour. - * + *

The total number of Cloud Security Posture Management hosts during a given hour.

* @return hostCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getHostCount() { - return hostCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getHostCount() { + return hostCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getHostCount_JsonNullable() { return hostCount; } - - @JsonProperty(JSON_PROPERTY_HOST_COUNT) - public void setHostCount_JsonNullable(JsonNullable hostCount) { + @JsonProperty(JSON_PROPERTY_HOST_COUNT)public void setHostCount_JsonNullable(JsonNullable hostCount) { this.hostCount = hostCount; } - public void setHostCount(Double hostCount) { this.hostCount = JsonNullable.of(hostCount); } - public UsageCloudSecurityPostureManagementHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageCloudSecurityPostureManagementHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageCloudSecurityPostureManagementHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageCloudSecurityPostureManagementHour object is equal to o. */ + /** + * Return true if this UsageCloudSecurityPostureManagementHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -354,36 +331,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageCloudSecurityPostureManagementHour usageCloudSecurityPostureManagementHour = - (UsageCloudSecurityPostureManagementHour) o; - return Objects.equals(this.aasHostCount, usageCloudSecurityPostureManagementHour.aasHostCount) - && Objects.equals(this.awsHostCount, usageCloudSecurityPostureManagementHour.awsHostCount) - && Objects.equals( - this.azureHostCount, usageCloudSecurityPostureManagementHour.azureHostCount) - && Objects.equals( - this.complianceHostCount, usageCloudSecurityPostureManagementHour.complianceHostCount) - && Objects.equals( - this.containerCount, usageCloudSecurityPostureManagementHour.containerCount) - && Objects.equals(this.gcpHostCount, usageCloudSecurityPostureManagementHour.gcpHostCount) - && Objects.equals(this.hostCount, usageCloudSecurityPostureManagementHour.hostCount) - && Objects.equals(this.hour, usageCloudSecurityPostureManagementHour.hour) - && Objects.equals(this.orgName, usageCloudSecurityPostureManagementHour.orgName) - && Objects.equals(this.publicId, usageCloudSecurityPostureManagementHour.publicId); + UsageCloudSecurityPostureManagementHour usageCloudSecurityPostureManagementHour = (UsageCloudSecurityPostureManagementHour) o; + return Objects.equals(this.aasHostCount, usageCloudSecurityPostureManagementHour.aasHostCount) && Objects.equals(this.awsHostCount, usageCloudSecurityPostureManagementHour.awsHostCount) && Objects.equals(this.azureHostCount, usageCloudSecurityPostureManagementHour.azureHostCount) && Objects.equals(this.complianceHostCount, usageCloudSecurityPostureManagementHour.complianceHostCount) && Objects.equals(this.containerCount, usageCloudSecurityPostureManagementHour.containerCount) && Objects.equals(this.gcpHostCount, usageCloudSecurityPostureManagementHour.gcpHostCount) && Objects.equals(this.hostCount, usageCloudSecurityPostureManagementHour.hostCount) && Objects.equals(this.hour, usageCloudSecurityPostureManagementHour.hour) && Objects.equals(this.orgName, usageCloudSecurityPostureManagementHour.orgName) && Objects.equals(this.publicId, usageCloudSecurityPostureManagementHour.publicId); } + @Override public int hashCode() { - return Objects.hash( - aasHostCount, - awsHostCount, - azureHostCount, - complianceHostCount, - containerCount, - gcpHostCount, - hostCount, - hour, - orgName, - publicId); + return Objects.hash(aasHostCount,awsHostCount,azureHostCount,complianceHostCount,containerCount,gcpHostCount,hostCount,hour,orgName,publicId); } @Override @@ -393,9 +348,7 @@ public String toString() { sb.append(" aasHostCount: ").append(toIndentedString(aasHostCount)).append("\n"); sb.append(" awsHostCount: ").append(toIndentedString(awsHostCount)).append("\n"); sb.append(" azureHostCount: ").append(toIndentedString(azureHostCount)).append("\n"); - sb.append(" complianceHostCount: ") - .append(toIndentedString(complianceHostCount)) - .append("\n"); + sb.append(" complianceHostCount: ").append(toIndentedString(complianceHostCount)).append("\n"); sb.append(" containerCount: ").append(toIndentedString(containerCount)).append("\n"); sb.append(" gcpHostCount: ").append(toIndentedString(gcpHostCount)).append("\n"); sb.append(" hostCount: ").append(toIndentedString(hostCount)).append("\n"); @@ -407,7 +360,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementResponse.java index 2d443861353..72eb12a9bbb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCloudSecurityPostureManagementResponse.java @@ -6,37 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The response containing the Cloud Security Posture Management usage for each hour for a given - * organization. + *

The response containing the Cloud Security Posture Management usage for each hour for a given organization.

*/ -@JsonPropertyOrder({UsageCloudSecurityPostureManagementResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageCloudSecurityPostureManagementResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCloudSecurityPostureManagementResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; - public UsageCloudSecurityPostureManagementResponse usage( - List usage) { + public UsageCloudSecurityPostureManagementResponse usage(List usage) { this.usage = usage; for (UsageCloudSecurityPostureManagementHour item : usage) { this.unparsed |= item.unparsed; } return this; } - - public UsageCloudSecurityPostureManagementResponse addUsageItem( - UsageCloudSecurityPostureManagementHour usageItem) { + public UsageCloudSecurityPostureManagementResponse addUsageItem(UsageCloudSecurityPostureManagementHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); } @@ -46,22 +60,23 @@ public UsageCloudSecurityPostureManagementResponse addUsageItem( } /** - * Get hourly usage for Cloud Security Posture Management. - * + *

Get hourly usage for Cloud Security Posture Management.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageCloudSecurityPostureManagementResponse object is equal to o. */ + /** + * Return true if this UsageCloudSecurityPostureManagementResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -70,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageCloudSecurityPostureManagementResponse usageCloudSecurityPostureManagementResponse = - (UsageCloudSecurityPostureManagementResponse) o; + UsageCloudSecurityPostureManagementResponse usageCloudSecurityPostureManagementResponse = (UsageCloudSecurityPostureManagementResponse) o; return Objects.equals(this.usage, usageCloudSecurityPostureManagementResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -90,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsAttributes.java b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsAttributes.java index 7ed2418ba49..eb51546d723 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The response containing attributes for custom reports. */ +/** + *

The response containing attributes for custom reports.

+ */ @JsonPropertyOrder({ UsageCustomReportsAttributes.JSON_PROPERTY_COMPUTED_ON, UsageCustomReportsAttributes.JSON_PROPERTY_END_DATE, @@ -22,10 +40,10 @@ UsageCustomReportsAttributes.JSON_PROPERTY_START_DATE, UsageCustomReportsAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCustomReportsAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTED_ON = "computed_on"; private String computedOn; @@ -47,89 +65,80 @@ public UsageCustomReportsAttributes computedOn(String computedOn) { } /** - * The date the specified custom report was computed. - * + *

The date the specified custom report was computed.

* @return computedOn - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTED_ON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getComputedOn() { - return computedOn; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTED_ON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getComputedOn() { + return computedOn; + } public void setComputedOn(String computedOn) { this.computedOn = computedOn; } - public UsageCustomReportsAttributes endDate(String endDate) { this.endDate = endDate; return this; } /** - * The ending date of custom report. - * + *

The ending date of custom report.

* @return endDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEndDate() { - return endDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEndDate() { + return endDate; + } public void setEndDate(String endDate) { this.endDate = endDate; } - public UsageCustomReportsAttributes size(Long size) { this.size = size; return this; } /** - * size - * + *

size

* @return size - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSize() { - return size; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } public void setSize(Long size) { this.size = size; } - public UsageCustomReportsAttributes startDate(String startDate) { this.startDate = startDate; return this; } /** - * The starting date of custom report. - * + *

The starting date of custom report.

* @return startDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStartDate() { - return startDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStartDate() { + return startDate; + } public void setStartDate(String startDate) { this.startDate = startDate; } - public UsageCustomReportsAttributes tags(List tags) { this.tags = tags; return this; } - public UsageCustomReportsAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -139,22 +148,23 @@ public UsageCustomReportsAttributes addTagsItem(String tagsItem) { } /** - * A list of tags to apply to custom reports. - * + *

A list of tags to apply to custom reports.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this UsageCustomReportsAttributes object is equal to o. */ + /** + * Return true if this UsageCustomReportsAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -164,16 +174,13 @@ public boolean equals(Object o) { return false; } UsageCustomReportsAttributes usageCustomReportsAttributes = (UsageCustomReportsAttributes) o; - return Objects.equals(this.computedOn, usageCustomReportsAttributes.computedOn) - && Objects.equals(this.endDate, usageCustomReportsAttributes.endDate) - && Objects.equals(this.size, usageCustomReportsAttributes.size) - && Objects.equals(this.startDate, usageCustomReportsAttributes.startDate) - && Objects.equals(this.tags, usageCustomReportsAttributes.tags); + return Objects.equals(this.computedOn, usageCustomReportsAttributes.computedOn) && Objects.equals(this.endDate, usageCustomReportsAttributes.endDate) && Objects.equals(this.size, usageCustomReportsAttributes.size) && Objects.equals(this.startDate, usageCustomReportsAttributes.startDate) && Objects.equals(this.tags, usageCustomReportsAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(computedOn, endDate, size, startDate, tags); + return Objects.hash(computedOn,endDate,size,startDate,tags); } @Override @@ -190,7 +197,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsData.java b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsData.java index 0f973f673a7..b34f7202457 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsData.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response containing the date and type for custom reports. */ + +/** + *

The response containing the date and type for custom reports.

+ */ @JsonPropertyOrder({ UsageCustomReportsData.JSON_PROPERTY_ATTRIBUTES, UsageCustomReportsData.JSON_PROPERTY_ID, UsageCustomReportsData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCustomReportsData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UsageCustomReportsAttributes attributes; @@ -38,42 +58,38 @@ public UsageCustomReportsData attributes(UsageCustomReportsAttributes attributes } /** - * The response containing attributes for custom reports. - * + *

The response containing attributes for custom reports.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageCustomReportsAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageCustomReportsAttributes getAttributes() { + return attributes; + } public void setAttributes(UsageCustomReportsAttributes attributes) { this.attributes = attributes; } - public UsageCustomReportsData id(String id) { this.id = id; return this; } /** - * The date for specified custom reports. - * + *

The date for specified custom reports.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public UsageCustomReportsData type(UsageReportsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public UsageCustomReportsData type(UsageReportsType type) { } /** - * The type of reports. - * + *

The type of reports.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageReportsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageReportsType getType() { + return type; + } public void setType(UsageReportsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UsageCustomReportsData object is equal to o. */ + /** + * Return true if this UsageCustomReportsData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } UsageCustomReportsData usageCustomReportsData = (UsageCustomReportsData) o; - return Objects.equals(this.attributes, usageCustomReportsData.attributes) - && Objects.equals(this.id, usageCustomReportsData.id) - && Objects.equals(this.type, usageCustomReportsData.type); + return Objects.equals(this.attributes, usageCustomReportsData.attributes) && Objects.equals(this.id, usageCustomReportsData.id) && Objects.equals(this.type, usageCustomReportsData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsMeta.java b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsMeta.java index bb77491eaac..0ff5ce482e0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsMeta.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing document metadata. */ -@JsonPropertyOrder({UsageCustomReportsMeta.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing document metadata.

+ */ +@JsonPropertyOrder({ + UsageCustomReportsMeta.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCustomReportsMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private UsageCustomReportsPage page; @@ -28,22 +50,23 @@ public UsageCustomReportsMeta page(UsageCustomReportsPage page) { } /** - * The object containing page total count. - * + *

The object containing page total count.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageCustomReportsPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageCustomReportsPage getPage() { + return page; + } public void setPage(UsageCustomReportsPage page) { this.page = page; } - /** Return true if this UsageCustomReportsMeta object is equal to o. */ + /** + * Return true if this UsageCustomReportsMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.page, usageCustomReportsMeta.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsPage.java b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsPage.java index 27eccab862b..ab14a6798d0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsPage.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsPage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing page total count. */ -@JsonPropertyOrder({UsageCustomReportsPage.JSON_PROPERTY_TOTAL_COUNT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing page total count.

+ */ +@JsonPropertyOrder({ + UsageCustomReportsPage.JSON_PROPERTY_TOTAL_COUNT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCustomReportsPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; @@ -27,22 +49,23 @@ public UsageCustomReportsPage totalCount(Long totalCount) { } /** - * Total page count. - * + *

Total page count.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } - /** Return true if this UsageCustomReportsPage object is equal to o. */ + /** + * Return true if this UsageCustomReportsPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.totalCount, usageCustomReportsPage.totalCount); } + @Override public int hashCode() { return Objects.hash(totalCount); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsResponse.java index 23bb51aceb8..a80541fa211 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageCustomReportsResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing available custom reports. */ +/** + *

Response containing available custom reports.

+ */ @JsonPropertyOrder({ UsageCustomReportsResponse.JSON_PROPERTY_DATA, UsageCustomReportsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageCustomReportsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -36,7 +54,6 @@ public UsageCustomReportsResponse data(List data) { } return this; } - public UsageCustomReportsResponse addDataItem(UsageCustomReportsData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -47,21 +64,19 @@ public UsageCustomReportsResponse addDataItem(UsageCustomReportsData dataItem) { } /** - * An array of available custom reports. - * + *

An array of available custom reports.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public UsageCustomReportsResponse meta(UsageCustomReportsMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -69,22 +84,23 @@ public UsageCustomReportsResponse meta(UsageCustomReportsMeta meta) { } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageCustomReportsMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageCustomReportsMeta getMeta() { + return meta; + } public void setMeta(UsageCustomReportsMeta meta) { this.meta = meta; } - /** Return true if this UsageCustomReportsResponse object is equal to o. */ + /** + * Return true if this UsageCustomReportsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } UsageCustomReportsResponse usageCustomReportsResponse = (UsageCustomReportsResponse) o; - return Objects.equals(this.data, usageCustomReportsResponse.data) - && Objects.equals(this.meta, usageCustomReportsResponse.meta); + return Objects.equals(this.data, usageCustomReportsResponse.data) && Objects.equals(this.meta, usageCustomReportsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageDBMHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageDBMHour.java index 16c66c52600..bed163592ac 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageDBMHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageDBMHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Database Monitoring usage for a given organization for a given hour. */ +/** + *

Database Monitoring usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageDBMHour.JSON_PROPERTY_DBM_HOST_COUNT, UsageDBMHour.JSON_PROPERTY_DBM_QUERIES_COUNT, @@ -23,10 +40,10 @@ UsageDBMHour.JSON_PROPERTY_ORG_NAME, UsageDBMHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageDBMHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DBM_HOST_COUNT = "dbm_host_count"; private Long dbmHostCount; @@ -34,7 +51,6 @@ public class UsageDBMHour { private Long dbmQueriesCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -50,108 +66,99 @@ public UsageDBMHour dbmHostCount(Long dbmHostCount) { } /** - * The total number of Database Monitoring host hours from the start of the given hour’s month - * until the given hour. - * + *

The total number of Database Monitoring host hours from the start of the given hour’s month until the given hour.

* @return dbmHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmHostCount() { - return dbmHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmHostCount() { + return dbmHostCount; + } public void setDbmHostCount(Long dbmHostCount) { this.dbmHostCount = dbmHostCount; } - public UsageDBMHour dbmQueriesCount(Long dbmQueriesCount) { this.dbmQueriesCount = dbmQueriesCount; return this; } /** - * The total number of normalized Database Monitoring queries from the start of the given hour’s - * month until the given hour. - * + *

The total number of normalized Database Monitoring queries from the start of the given hour’s month until the given hour.

* @return dbmQueriesCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmQueriesCount() { - return dbmQueriesCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmQueriesCount() { + return dbmQueriesCount; + } public void setDbmQueriesCount(Long dbmQueriesCount) { this.dbmQueriesCount = dbmQueriesCount; } - public UsageDBMHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageDBMHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageDBMHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageDBMHour object is equal to o. */ + /** + * Return true if this UsageDBMHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -161,16 +168,13 @@ public boolean equals(Object o) { return false; } UsageDBMHour usageDbmHour = (UsageDBMHour) o; - return Objects.equals(this.dbmHostCount, usageDbmHour.dbmHostCount) - && Objects.equals(this.dbmQueriesCount, usageDbmHour.dbmQueriesCount) - && Objects.equals(this.hour, usageDbmHour.hour) - && Objects.equals(this.orgName, usageDbmHour.orgName) - && Objects.equals(this.publicId, usageDbmHour.publicId); + return Objects.equals(this.dbmHostCount, usageDbmHour.dbmHostCount) && Objects.equals(this.dbmQueriesCount, usageDbmHour.dbmQueriesCount) && Objects.equals(this.hour, usageDbmHour.hour) && Objects.equals(this.orgName, usageDbmHour.orgName) && Objects.equals(this.publicId, usageDbmHour.publicId); } + @Override public int hashCode() { - return Objects.hash(dbmHostCount, dbmQueriesCount, hour, orgName, publicId); + return Objects.hash(dbmHostCount,dbmQueriesCount,hour,orgName,publicId); } @Override @@ -187,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageDBMResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageDBMResponse.java index 3d8f34c4c30..c9fc29e2b71 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageDBMResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageDBMResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the Database Monitoring usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageDBMResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the Database Monitoring usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageDBMResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageDBMResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageDBMResponse usage(List usage) { } return this; } - public UsageDBMResponse addUsageItem(UsageDBMHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageDBMResponse addUsageItem(UsageDBMHour usageItem) { } /** - * Get hourly usage for Database Monitoring - * + *

Get hourly usage for Database Monitoring

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageDBMResponse object is equal to o. */ + /** + * Return true if this UsageDBMResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageDbmResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageFargateHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageFargateHour.java index 49568dfe637..0513683af13 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageFargateHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageFargateHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Number of Fargate tasks run and hourly usage. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Number of Fargate tasks run and hourly usage.

+ */ @JsonPropertyOrder({ UsageFargateHour.JSON_PROPERTY_APM_FARGATE_COUNT, UsageFargateHour.JSON_PROPERTY_APPSEC_FARGATE_COUNT, @@ -25,22 +42,20 @@ UsageFargateHour.JSON_PROPERTY_PUBLIC_ID, UsageFargateHour.JSON_PROPERTY_TASKS_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageFargateHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_FARGATE_COUNT = "apm_fargate_count"; private Long apmFargateCount; public static final String JSON_PROPERTY_APPSEC_FARGATE_COUNT = "appsec_fargate_count"; private Long appsecFargateCount; - public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = - "avg_profiled_fargate_tasks"; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = "avg_profiled_fargate_tasks"; private Long avgProfiledFargateTasks; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -59,148 +74,137 @@ public UsageFargateHour apmFargateCount(Long apmFargateCount) { } /** - * The high-water mark of APM ECS Fargate tasks during the given hour. - * + *

The high-water mark of APM ECS Fargate tasks during the given hour.

* @return apmFargateCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmFargateCount() { - return apmFargateCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmFargateCount() { + return apmFargateCount; + } public void setApmFargateCount(Long apmFargateCount) { this.apmFargateCount = apmFargateCount; } - public UsageFargateHour appsecFargateCount(Long appsecFargateCount) { this.appsecFargateCount = appsecFargateCount; return this; } /** - * The Application Security Monitoring ECS Fargate tasks during the given hour. - * + *

The Application Security Monitoring ECS Fargate tasks during the given hour.

* @return appsecFargateCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAppsecFargateCount() { - return appsecFargateCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAppsecFargateCount() { + return appsecFargateCount; + } public void setAppsecFargateCount(Long appsecFargateCount) { this.appsecFargateCount = appsecFargateCount; } - public UsageFargateHour avgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; return this; } /** - * The average profiled task count for Fargate Profiling. - * + *

The average profiled task count for Fargate Profiling.

* @return avgProfiledFargateTasks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAvgProfiledFargateTasks() { - return avgProfiledFargateTasks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAvgProfiledFargateTasks() { + return avgProfiledFargateTasks; + } public void setAvgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; } - public UsageFargateHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageFargateHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageFargateHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageFargateHour tasksCount(Long tasksCount) { this.tasksCount = tasksCount; return this; } /** - * The number of Fargate tasks run. - * + *

The number of Fargate tasks run.

* @return tasksCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TASKS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTasksCount() { - return tasksCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TASKS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTasksCount() { + return tasksCount; + } public void setTasksCount(Long tasksCount) { this.tasksCount = tasksCount; } - /** Return true if this UsageFargateHour object is equal to o. */ + /** + * Return true if this UsageFargateHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -210,25 +214,13 @@ public boolean equals(Object o) { return false; } UsageFargateHour usageFargateHour = (UsageFargateHour) o; - return Objects.equals(this.apmFargateCount, usageFargateHour.apmFargateCount) - && Objects.equals(this.appsecFargateCount, usageFargateHour.appsecFargateCount) - && Objects.equals(this.avgProfiledFargateTasks, usageFargateHour.avgProfiledFargateTasks) - && Objects.equals(this.hour, usageFargateHour.hour) - && Objects.equals(this.orgName, usageFargateHour.orgName) - && Objects.equals(this.publicId, usageFargateHour.publicId) - && Objects.equals(this.tasksCount, usageFargateHour.tasksCount); + return Objects.equals(this.apmFargateCount, usageFargateHour.apmFargateCount) && Objects.equals(this.appsecFargateCount, usageFargateHour.appsecFargateCount) && Objects.equals(this.avgProfiledFargateTasks, usageFargateHour.avgProfiledFargateTasks) && Objects.equals(this.hour, usageFargateHour.hour) && Objects.equals(this.orgName, usageFargateHour.orgName) && Objects.equals(this.publicId, usageFargateHour.publicId) && Objects.equals(this.tasksCount, usageFargateHour.tasksCount); } + @Override public int hashCode() { - return Objects.hash( - apmFargateCount, - appsecFargateCount, - avgProfiledFargateTasks, - hour, - orgName, - publicId, - tasksCount); + return Objects.hash(apmFargateCount,appsecFargateCount,avgProfiledFargateTasks,hour,orgName,publicId,tasksCount); } @Override @@ -237,9 +229,7 @@ public String toString() { sb.append("class UsageFargateHour {\n"); sb.append(" apmFargateCount: ").append(toIndentedString(apmFargateCount)).append("\n"); sb.append(" appsecFargateCount: ").append(toIndentedString(appsecFargateCount)).append("\n"); - sb.append(" avgProfiledFargateTasks: ") - .append(toIndentedString(avgProfiledFargateTasks)) - .append("\n"); + sb.append(" avgProfiledFargateTasks: ").append(toIndentedString(avgProfiledFargateTasks)).append("\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); @@ -249,7 +239,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageFargateResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageFargateResponse.java index cc9e76099e0..233599f96a0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageFargateResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageFargateResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of Fargate tasks run and hourly usage. */ -@JsonPropertyOrder({UsageFargateResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of Fargate tasks run and hourly usage.

+ */ +@JsonPropertyOrder({ + UsageFargateResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageFargateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageFargateResponse usage(List usage) { } return this; } - public UsageFargateResponse addUsageItem(UsageFargateHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageFargateResponse addUsageItem(UsageFargateHour usageItem) { } /** - * Array with the number of hourly Fargate tasks recorded for a given organization. - * + *

Array with the number of hourly Fargate tasks recorded for a given organization.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageFargateResponse object is equal to o. */ + /** + * Return true if this UsageFargateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageFargateResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageHostHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageHostHour.java index 0895f7f1f9a..4ee559f0289 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageHostHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageHostHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Number of hosts/containers recorded for each hour for a given organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Number of hosts/containers recorded for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageHostHour.JSON_PROPERTY_AGENT_HOST_COUNT, UsageHostHour.JSON_PROPERTY_ALIBABA_HOST_COUNT, @@ -35,18 +52,17 @@ UsageHostHour.JSON_PROPERTY_PUBLIC_ID, UsageHostHour.JSON_PROPERTY_VSPHERE_HOST_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageHostHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGENT_HOST_COUNT = "agent_host_count"; private Long agentHostCount; public static final String JSON_PROPERTY_ALIBABA_HOST_COUNT = "alibaba_host_count"; private Long alibabaHostCount; - public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_COUNT = - "apm_azure_app_service_host_count"; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_COUNT = "apm_azure_app_service_host_count"; private Long apmAzureAppServiceHostCount; public static final String JSON_PROPERTY_APM_HOST_COUNT = "apm_host_count"; @@ -71,15 +87,13 @@ public class UsageHostHour { private Long hostCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; public static final String JSON_PROPERTY_INFRA_AZURE_APP_SERVICE = "infra_azure_app_service"; private Long infraAzureAppService; - public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_COUNT = - "opentelemetry_apm_host_count"; + public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_COUNT = "opentelemetry_apm_host_count"; private Long opentelemetryApmHostCount; public static final String JSON_PROPERTY_OPENTELEMETRY_HOST_COUNT = "opentelemetry_host_count"; @@ -100,370 +114,336 @@ public UsageHostHour agentHostCount(Long agentHostCount) { } /** - * Contains the total number of infrastructure hosts reporting during a given hour that were - * running the Datadog Agent. - * + *

Contains the total number of infrastructure hosts reporting + * during a given hour that were running the Datadog Agent.

* @return agentHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAgentHostCount() { - return agentHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAgentHostCount() { + return agentHostCount; + } public void setAgentHostCount(Long agentHostCount) { this.agentHostCount = agentHostCount; } - public UsageHostHour alibabaHostCount(Long alibabaHostCount) { this.alibabaHostCount = alibabaHostCount; return this; } /** - * Contains the total number of hosts that reported through Alibaba integration (and were NOT - * running the Datadog Agent). - * + *

Contains the total number of hosts that reported through Alibaba integration + * (and were NOT running the Datadog Agent).

* @return alibabaHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIBABA_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAlibabaHostCount() { - return alibabaHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIBABA_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAlibabaHostCount() { + return alibabaHostCount; + } public void setAlibabaHostCount(Long alibabaHostCount) { this.alibabaHostCount = alibabaHostCount; } - public UsageHostHour apmAzureAppServiceHostCount(Long apmAzureAppServiceHostCount) { this.apmAzureAppServiceHostCount = apmAzureAppServiceHostCount; return this; } /** - * Contains the total number of Azure App Services hosts using APM. - * + *

Contains the total number of Azure App Services hosts using APM.

* @return apmAzureAppServiceHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmAzureAppServiceHostCount() { - return apmAzureAppServiceHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmAzureAppServiceHostCount() { + return apmAzureAppServiceHostCount; + } public void setApmAzureAppServiceHostCount(Long apmAzureAppServiceHostCount) { this.apmAzureAppServiceHostCount = apmAzureAppServiceHostCount; } - public UsageHostHour apmHostCount(Long apmHostCount) { this.apmHostCount = apmHostCount; return this; } /** - * Shows the total number of hosts using APM during the hour, these are counted as billable - * (except during trial periods). - * + *

Shows the total number of hosts using APM during the hour, + * these are counted as billable (except during trial periods).

* @return apmHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmHostCount() { - return apmHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmHostCount() { + return apmHostCount; + } public void setApmHostCount(Long apmHostCount) { this.apmHostCount = apmHostCount; } - public UsageHostHour awsHostCount(Long awsHostCount) { this.awsHostCount = awsHostCount; return this; } /** - * Contains the total number of hosts that reported through the AWS integration (and were NOT - * running the Datadog Agent). - * + *

Contains the total number of hosts that reported through the AWS integration + * (and were NOT running the Datadog Agent).

* @return awsHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsHostCount() { - return awsHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsHostCount() { + return awsHostCount; + } public void setAwsHostCount(Long awsHostCount) { this.awsHostCount = awsHostCount; } - public UsageHostHour azureHostCount(Long azureHostCount) { this.azureHostCount = azureHostCount; return this; } /** - * Contains the total number of hosts that reported through Azure integration (and were NOT - * running the Datadog Agent). - * + *

Contains the total number of hosts that reported through Azure integration + * (and were NOT running the Datadog Agent).

* @return azureHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AZURE_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAzureHostCount() { - return azureHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAzureHostCount() { + return azureHostCount; + } public void setAzureHostCount(Long azureHostCount) { this.azureHostCount = azureHostCount; } - public UsageHostHour containerCount(Long containerCount) { this.containerCount = containerCount; return this; } /** - * Shows the total number of containers reported by the Docker integration during the hour. - * + *

Shows the total number of containers reported by the Docker integration during the hour.

* @return containerCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerCount() { - return containerCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerCount() { + return containerCount; + } public void setContainerCount(Long containerCount) { this.containerCount = containerCount; } - public UsageHostHour gcpHostCount(Long gcpHostCount) { this.gcpHostCount = gcpHostCount; return this; } /** - * Contains the total number of hosts that reported through the Google Cloud integration (and were - * NOT running the Datadog Agent). - * + *

Contains the total number of hosts that reported through the Google Cloud integration + * (and were NOT running the Datadog Agent).

* @return gcpHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GCP_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getGcpHostCount() { - return gcpHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GCP_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getGcpHostCount() { + return gcpHostCount; + } public void setGcpHostCount(Long gcpHostCount) { this.gcpHostCount = gcpHostCount; } - public UsageHostHour herokuHostCount(Long herokuHostCount) { this.herokuHostCount = herokuHostCount; return this; } /** - * Contains the total number of Heroku dynos reported by the Datadog Agent. - * + *

Contains the total number of Heroku dynos reported by the Datadog Agent.

* @return herokuHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEROKU_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHerokuHostCount() { - return herokuHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEROKU_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHerokuHostCount() { + return herokuHostCount; + } public void setHerokuHostCount(Long herokuHostCount) { this.herokuHostCount = herokuHostCount; } - public UsageHostHour hostCount(Long hostCount) { this.hostCount = hostCount; return this; } /** - * Contains the total number of billable infrastructure hosts reporting during a given hour. This - * is the sum of agent_host_count, aws_host_count, and - * gcp_host_count. - * + *

Contains the total number of billable infrastructure hosts reporting during a given hour. + * This is the sum of agent_host_count, aws_host_count, and gcp_host_count.

* @return hostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHostCount() { - return hostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHostCount() { + return hostCount; + } public void setHostCount(Long hostCount) { this.hostCount = hostCount; } - public UsageHostHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageHostHour infraAzureAppService(Long infraAzureAppService) { this.infraAzureAppService = infraAzureAppService; return this; } /** - * Contains the total number of hosts that reported through the Azure App Services integration - * (and were NOT running the Datadog Agent). - * + *

Contains the total number of hosts that reported through the Azure App Services integration + * (and were NOT running the Datadog Agent).

* @return infraAzureAppService - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_AZURE_APP_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraAzureAppService() { - return infraAzureAppService; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_AZURE_APP_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraAzureAppService() { + return infraAzureAppService; + } public void setInfraAzureAppService(Long infraAzureAppService) { this.infraAzureAppService = infraAzureAppService; } - public UsageHostHour opentelemetryApmHostCount(Long opentelemetryApmHostCount) { this.opentelemetryApmHostCount = opentelemetryApmHostCount; return this; } /** - * Contains the total number of hosts using APM reported by Datadog exporter for the OpenTelemetry - * Collector. - * + *

Contains the total number of hosts using APM reported by Datadog exporter for the OpenTelemetry Collector.

* @return opentelemetryApmHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryApmHostCount() { - return opentelemetryApmHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryApmHostCount() { + return opentelemetryApmHostCount; + } public void setOpentelemetryApmHostCount(Long opentelemetryApmHostCount) { this.opentelemetryApmHostCount = opentelemetryApmHostCount; } - public UsageHostHour opentelemetryHostCount(Long opentelemetryHostCount) { this.opentelemetryHostCount = opentelemetryHostCount; return this; } /** - * Contains the total number of hosts reported by Datadog exporter for the OpenTelemetry - * Collector. - * + *

Contains the total number of hosts reported by Datadog exporter for the OpenTelemetry Collector.

* @return opentelemetryHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryHostCount() { - return opentelemetryHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryHostCount() { + return opentelemetryHostCount; + } public void setOpentelemetryHostCount(Long opentelemetryHostCount) { this.opentelemetryHostCount = opentelemetryHostCount; } - public UsageHostHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageHostHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageHostHour vsphereHostCount(Long vsphereHostCount) { this.vsphereHostCount = vsphereHostCount; return this; } /** - * Contains the total number of hosts that reported through vSphere integration (and were NOT - * running the Datadog Agent). - * + *

Contains the total number of hosts that reported through vSphere integration + * (and were NOT running the Datadog Agent).

* @return vsphereHostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVsphereHostCount() { - return vsphereHostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVsphereHostCount() { + return vsphereHostCount; + } public void setVsphereHostCount(Long vsphereHostCount) { this.vsphereHostCount = vsphereHostCount; } - /** Return true if this UsageHostHour object is equal to o. */ + /** + * Return true if this UsageHostHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -473,46 +453,13 @@ public boolean equals(Object o) { return false; } UsageHostHour usageHostHour = (UsageHostHour) o; - return Objects.equals(this.agentHostCount, usageHostHour.agentHostCount) - && Objects.equals(this.alibabaHostCount, usageHostHour.alibabaHostCount) - && Objects.equals( - this.apmAzureAppServiceHostCount, usageHostHour.apmAzureAppServiceHostCount) - && Objects.equals(this.apmHostCount, usageHostHour.apmHostCount) - && Objects.equals(this.awsHostCount, usageHostHour.awsHostCount) - && Objects.equals(this.azureHostCount, usageHostHour.azureHostCount) - && Objects.equals(this.containerCount, usageHostHour.containerCount) - && Objects.equals(this.gcpHostCount, usageHostHour.gcpHostCount) - && Objects.equals(this.herokuHostCount, usageHostHour.herokuHostCount) - && Objects.equals(this.hostCount, usageHostHour.hostCount) - && Objects.equals(this.hour, usageHostHour.hour) - && Objects.equals(this.infraAzureAppService, usageHostHour.infraAzureAppService) - && Objects.equals(this.opentelemetryApmHostCount, usageHostHour.opentelemetryApmHostCount) - && Objects.equals(this.opentelemetryHostCount, usageHostHour.opentelemetryHostCount) - && Objects.equals(this.orgName, usageHostHour.orgName) - && Objects.equals(this.publicId, usageHostHour.publicId) - && Objects.equals(this.vsphereHostCount, usageHostHour.vsphereHostCount); + return Objects.equals(this.agentHostCount, usageHostHour.agentHostCount) && Objects.equals(this.alibabaHostCount, usageHostHour.alibabaHostCount) && Objects.equals(this.apmAzureAppServiceHostCount, usageHostHour.apmAzureAppServiceHostCount) && Objects.equals(this.apmHostCount, usageHostHour.apmHostCount) && Objects.equals(this.awsHostCount, usageHostHour.awsHostCount) && Objects.equals(this.azureHostCount, usageHostHour.azureHostCount) && Objects.equals(this.containerCount, usageHostHour.containerCount) && Objects.equals(this.gcpHostCount, usageHostHour.gcpHostCount) && Objects.equals(this.herokuHostCount, usageHostHour.herokuHostCount) && Objects.equals(this.hostCount, usageHostHour.hostCount) && Objects.equals(this.hour, usageHostHour.hour) && Objects.equals(this.infraAzureAppService, usageHostHour.infraAzureAppService) && Objects.equals(this.opentelemetryApmHostCount, usageHostHour.opentelemetryApmHostCount) && Objects.equals(this.opentelemetryHostCount, usageHostHour.opentelemetryHostCount) && Objects.equals(this.orgName, usageHostHour.orgName) && Objects.equals(this.publicId, usageHostHour.publicId) && Objects.equals(this.vsphereHostCount, usageHostHour.vsphereHostCount); } + @Override public int hashCode() { - return Objects.hash( - agentHostCount, - alibabaHostCount, - apmAzureAppServiceHostCount, - apmHostCount, - awsHostCount, - azureHostCount, - containerCount, - gcpHostCount, - herokuHostCount, - hostCount, - hour, - infraAzureAppService, - opentelemetryApmHostCount, - opentelemetryHostCount, - orgName, - publicId, - vsphereHostCount); + return Objects.hash(agentHostCount,alibabaHostCount,apmAzureAppServiceHostCount,apmHostCount,awsHostCount,azureHostCount,containerCount,gcpHostCount,herokuHostCount,hostCount,hour,infraAzureAppService,opentelemetryApmHostCount,opentelemetryHostCount,orgName,publicId,vsphereHostCount); } @Override @@ -521,9 +468,7 @@ public String toString() { sb.append("class UsageHostHour {\n"); sb.append(" agentHostCount: ").append(toIndentedString(agentHostCount)).append("\n"); sb.append(" alibabaHostCount: ").append(toIndentedString(alibabaHostCount)).append("\n"); - sb.append(" apmAzureAppServiceHostCount: ") - .append(toIndentedString(apmAzureAppServiceHostCount)) - .append("\n"); + sb.append(" apmAzureAppServiceHostCount: ").append(toIndentedString(apmAzureAppServiceHostCount)).append("\n"); sb.append(" apmHostCount: ").append(toIndentedString(apmHostCount)).append("\n"); sb.append(" awsHostCount: ").append(toIndentedString(awsHostCount)).append("\n"); sb.append(" azureHostCount: ").append(toIndentedString(azureHostCount)).append("\n"); @@ -532,15 +477,9 @@ public String toString() { sb.append(" herokuHostCount: ").append(toIndentedString(herokuHostCount)).append("\n"); sb.append(" hostCount: ").append(toIndentedString(hostCount)).append("\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" infraAzureAppService: ") - .append(toIndentedString(infraAzureAppService)) - .append("\n"); - sb.append(" opentelemetryApmHostCount: ") - .append(toIndentedString(opentelemetryApmHostCount)) - .append("\n"); - sb.append(" opentelemetryHostCount: ") - .append(toIndentedString(opentelemetryHostCount)) - .append("\n"); + sb.append(" infraAzureAppService: ").append(toIndentedString(infraAzureAppService)).append("\n"); + sb.append(" opentelemetryApmHostCount: ").append(toIndentedString(opentelemetryApmHostCount)).append("\n"); + sb.append(" opentelemetryHostCount: ").append(toIndentedString(opentelemetryHostCount)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append(" vsphereHostCount: ").append(toIndentedString(vsphereHostCount)).append("\n"); @@ -549,7 +488,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageHostsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageHostsResponse.java index 3a39a89eb0c..db247821809 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageHostsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageHostsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Host usage response. */ -@JsonPropertyOrder({UsageHostsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Host usage response.

+ */ +@JsonPropertyOrder({ + UsageHostsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageHostsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageHostsResponse usage(List usage) { } return this; } - public UsageHostsResponse addUsageItem(UsageHostHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageHostsResponse addUsageItem(UsageHostHour usageItem) { } /** - * An array of objects related to host usage. - * + *

An array of objects related to host usage.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageHostsResponse object is equal to o. */ + /** + * Return true if this UsageHostsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageHostsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementHour.java index 3a3a1a9fd69..446a0c33091 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident management usage for a given organization for a given hour. */ + +/** + *

Incident management usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageIncidentManagementHour.JSON_PROPERTY_HOUR, UsageIncidentManagementHour.JSON_PROPERTY_MONTHLY_ACTIVE_USERS, UsageIncidentManagementHour.JSON_PROPERTY_ORG_NAME, UsageIncidentManagementHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIncidentManagementHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,86 +62,80 @@ public UsageIncidentManagementHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageIncidentManagementHour monthlyActiveUsers(Long monthlyActiveUsers) { this.monthlyActiveUsers = monthlyActiveUsers; return this; } /** - * Contains the total number monthly active users from the start of the given hour's month until - * the given hour. - * + *

Contains the total number monthly active users from the start of the given hour's month until the given hour.

* @return monthlyActiveUsers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONTHLY_ACTIVE_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMonthlyActiveUsers() { - return monthlyActiveUsers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHLY_ACTIVE_USERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonthlyActiveUsers() { + return monthlyActiveUsers; + } public void setMonthlyActiveUsers(Long monthlyActiveUsers) { this.monthlyActiveUsers = monthlyActiveUsers; } - public UsageIncidentManagementHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageIncidentManagementHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageIncidentManagementHour object is equal to o. */ + /** + * Return true if this UsageIncidentManagementHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageIncidentManagementHour usageIncidentManagementHour = (UsageIncidentManagementHour) o; - return Objects.equals(this.hour, usageIncidentManagementHour.hour) - && Objects.equals(this.monthlyActiveUsers, usageIncidentManagementHour.monthlyActiveUsers) - && Objects.equals(this.orgName, usageIncidentManagementHour.orgName) - && Objects.equals(this.publicId, usageIncidentManagementHour.publicId); + return Objects.equals(this.hour, usageIncidentManagementHour.hour) && Objects.equals(this.monthlyActiveUsers, usageIncidentManagementHour.monthlyActiveUsers) && Objects.equals(this.orgName, usageIncidentManagementHour.orgName) && Objects.equals(this.publicId, usageIncidentManagementHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, monthlyActiveUsers, orgName, publicId); + return Objects.hash(hour,monthlyActiveUsers,orgName,publicId); } @Override @@ -159,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementResponse.java index d4b9d3c3a12..7baf21ed85b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIncidentManagementResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the incident management usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageIncidentManagementResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the incident management usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageIncidentManagementResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIncidentManagementResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageIncidentManagementResponse usage(List u } return this; } - public UsageIncidentManagementResponse addUsageItem(UsageIncidentManagementHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageIncidentManagementResponse addUsageItem(UsageIncidentManagementHour } /** - * Get hourly usage for incident management. - * + *

Get hourly usage for incident management.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageIncidentManagementResponse object is equal to o. */ + /** + * Return true if this UsageIncidentManagementResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageIncidentManagementResponse usageIncidentManagementResponse = - (UsageIncidentManagementResponse) o; + UsageIncidentManagementResponse usageIncidentManagementResponse = (UsageIncidentManagementResponse) o; return Objects.equals(this.usage, usageIncidentManagementResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansHour.java index 3563ca2da2f..97a1ba44564 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The hours of indexed spans usage. */ + +/** + *

The hours of indexed spans usage.

+ */ @JsonPropertyOrder({ UsageIndexedSpansHour.JSON_PROPERTY_HOUR, UsageIndexedSpansHour.JSON_PROPERTY_INDEXED_EVENTS_COUNT, UsageIndexedSpansHour.JSON_PROPERTY_ORG_NAME, UsageIndexedSpansHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIndexedSpansHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageIndexedSpansHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageIndexedSpansHour indexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; return this; } /** - * Contains the number of spans indexed. - * + *

Contains the number of spans indexed.

* @return indexedEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCount() { - return indexedEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCount() { + return indexedEventsCount; + } public void setIndexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; } - public UsageIndexedSpansHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageIndexedSpansHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageIndexedSpansHour object is equal to o. */ + /** + * Return true if this UsageIndexedSpansHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageIndexedSpansHour usageIndexedSpansHour = (UsageIndexedSpansHour) o; - return Objects.equals(this.hour, usageIndexedSpansHour.hour) - && Objects.equals(this.indexedEventsCount, usageIndexedSpansHour.indexedEventsCount) - && Objects.equals(this.orgName, usageIndexedSpansHour.orgName) - && Objects.equals(this.publicId, usageIndexedSpansHour.publicId); + return Objects.equals(this.hour, usageIndexedSpansHour.hour) && Objects.equals(this.indexedEventsCount, usageIndexedSpansHour.indexedEventsCount) && Objects.equals(this.orgName, usageIndexedSpansHour.orgName) && Objects.equals(this.publicId, usageIndexedSpansHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, indexedEventsCount, orgName, publicId); + return Objects.hash(hour,indexedEventsCount,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansResponse.java index 534dc20711e..e74b6109d39 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIndexedSpansResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A response containing indexed spans usage. */ -@JsonPropertyOrder({UsageIndexedSpansResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

A response containing indexed spans usage.

+ */ +@JsonPropertyOrder({ + UsageIndexedSpansResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIndexedSpansResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageIndexedSpansResponse usage(List usage) { } return this; } - public UsageIndexedSpansResponse addUsageItem(UsageIndexedSpansHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageIndexedSpansResponse addUsageItem(UsageIndexedSpansHour usageItem) { } /** - * Array with the number of hourly traces indexed for a given organization. - * + *

Array with the number of hourly traces indexed for a given organization.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageIndexedSpansResponse object is equal to o. */ + /** + * Return true if this UsageIndexedSpansResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageIndexedSpansResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansHour.java index 97db5c178c5..2092f28732e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Ingested spans usage for a given organization for a given hour. */ + +/** + *

Ingested spans usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageIngestedSpansHour.JSON_PROPERTY_HOUR, UsageIngestedSpansHour.JSON_PROPERTY_INGESTED_EVENTS_BYTES, UsageIngestedSpansHour.JSON_PROPERTY_ORG_NAME, UsageIngestedSpansHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIngestedSpansHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageIngestedSpansHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageIngestedSpansHour ingestedEventsBytes(Long ingestedEventsBytes) { this.ingestedEventsBytes = ingestedEventsBytes; return this; } /** - * Contains the total number of bytes ingested for APM spans during a given hour. - * + *

Contains the total number of bytes ingested for APM spans during a given hour.

* @return ingestedEventsBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytes() { - return ingestedEventsBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestedEventsBytes() { + return ingestedEventsBytes; + } public void setIngestedEventsBytes(Long ingestedEventsBytes) { this.ingestedEventsBytes = ingestedEventsBytes; } - public UsageIngestedSpansHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageIngestedSpansHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageIngestedSpansHour object is equal to o. */ + /** + * Return true if this UsageIngestedSpansHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageIngestedSpansHour usageIngestedSpansHour = (UsageIngestedSpansHour) o; - return Objects.equals(this.hour, usageIngestedSpansHour.hour) - && Objects.equals(this.ingestedEventsBytes, usageIngestedSpansHour.ingestedEventsBytes) - && Objects.equals(this.orgName, usageIngestedSpansHour.orgName) - && Objects.equals(this.publicId, usageIngestedSpansHour.publicId); + return Objects.equals(this.hour, usageIngestedSpansHour.hour) && Objects.equals(this.ingestedEventsBytes, usageIngestedSpansHour.ingestedEventsBytes) && Objects.equals(this.orgName, usageIngestedSpansHour.orgName) && Objects.equals(this.publicId, usageIngestedSpansHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, ingestedEventsBytes, orgName, publicId); + return Objects.hash(hour,ingestedEventsBytes,orgName,publicId); } @Override @@ -150,9 +159,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageIngestedSpansHour {\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" ingestedEventsBytes: ") - .append(toIndentedString(ingestedEventsBytes)) - .append("\n"); + sb.append(" ingestedEventsBytes: ").append(toIndentedString(ingestedEventsBytes)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append("}"); @@ -160,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansResponse.java index 1b7e64f8da1..000dda8c7af 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIngestedSpansResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the ingested spans usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageIngestedSpansResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the ingested spans usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageIngestedSpansResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIngestedSpansResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageIngestedSpansResponse usage(List usage) { } return this; } - public UsageIngestedSpansResponse addUsageItem(UsageIngestedSpansHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageIngestedSpansResponse addUsageItem(UsageIngestedSpansHour usageItem) } /** - * Get hourly usage for ingested spans. - * + *

Get hourly usage for ingested spans.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageIngestedSpansResponse object is equal to o. */ + /** + * Return true if this UsageIngestedSpansResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageIngestedSpansResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIoTHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageIoTHour.java index 7eb635fd767..5272d353a37 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIoTHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIoTHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** IoT usage for a given organization for a given hour. */ + +/** + *

IoT usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageIoTHour.JSON_PROPERTY_HOUR, UsageIoTHour.JSON_PROPERTY_IOT_DEVICE_COUNT, UsageIoTHour.JSON_PROPERTY_ORG_NAME, UsageIoTHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIoTHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageIoTHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageIoTHour iotDeviceCount(Long iotDeviceCount) { this.iotDeviceCount = iotDeviceCount; return this; } /** - * The total number of IoT devices during a given hour. - * + *

The total number of IoT devices during a given hour.

* @return iotDeviceCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceCount() { - return iotDeviceCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceCount() { + return iotDeviceCount; + } public void setIotDeviceCount(Long iotDeviceCount) { this.iotDeviceCount = iotDeviceCount; } - public UsageIoTHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageIoTHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageIoTHour object is equal to o. */ + /** + * Return true if this UsageIoTHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageIoTHour usageIoTHour = (UsageIoTHour) o; - return Objects.equals(this.hour, usageIoTHour.hour) - && Objects.equals(this.iotDeviceCount, usageIoTHour.iotDeviceCount) - && Objects.equals(this.orgName, usageIoTHour.orgName) - && Objects.equals(this.publicId, usageIoTHour.publicId); + return Objects.equals(this.hour, usageIoTHour.hour) && Objects.equals(this.iotDeviceCount, usageIoTHour.iotDeviceCount) && Objects.equals(this.orgName, usageIoTHour.orgName) && Objects.equals(this.publicId, usageIoTHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, iotDeviceCount, orgName, publicId); + return Objects.hash(hour,iotDeviceCount,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageIoTResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageIoTResponse.java index f1eed2e0c2f..5b0048597f5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageIoTResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageIoTResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the IoT usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageIoTResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the IoT usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageIoTResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageIoTResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageIoTResponse usage(List usage) { } return this; } - public UsageIoTResponse addUsageItem(UsageIoTHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageIoTResponse addUsageItem(UsageIoTHour usageItem) { } /** - * Get hourly usage for IoT. - * + *

Get hourly usage for IoT.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageIoTResponse object is equal to o. */ + /** + * Return true if this UsageIoTResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageIoTResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLambdaHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageLambdaHour.java index 8ca77bc845c..92ceec04d70 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLambdaHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLambdaHour.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Number of lambda functions and sum of the invocations of all lambda functions for each hour for a - * given organization. + *

Number of lambda functions and sum of the invocations of all lambda functions + * for each hour for a given organization.

*/ @JsonPropertyOrder({ UsageLambdaHour.JSON_PROPERTY_FUNC_COUNT, @@ -26,15 +41,14 @@ UsageLambdaHour.JSON_PROPERTY_ORG_NAME, UsageLambdaHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLambdaHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FUNC_COUNT = "func_count"; private Long funcCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -53,106 +67,99 @@ public UsageLambdaHour funcCount(Long funcCount) { } /** - * Contains the number of different functions for each region and AWS account. - * + *

Contains the number of different functions for each region and AWS account.

* @return funcCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FUNC_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFuncCount() { - return funcCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNC_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFuncCount() { + return funcCount; + } public void setFuncCount(Long funcCount) { this.funcCount = funcCount; } - public UsageLambdaHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageLambdaHour invocationsSum(Long invocationsSum) { this.invocationsSum = invocationsSum; return this; } /** - * Contains the sum of invocations of all functions. - * + *

Contains the sum of invocations of all functions.

* @return invocationsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INVOCATIONS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInvocationsSum() { - return invocationsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVOCATIONS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInvocationsSum() { + return invocationsSum; + } public void setInvocationsSum(Long invocationsSum) { this.invocationsSum = invocationsSum; } - public UsageLambdaHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageLambdaHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageLambdaHour object is equal to o. */ + /** + * Return true if this UsageLambdaHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -162,16 +169,13 @@ public boolean equals(Object o) { return false; } UsageLambdaHour usageLambdaHour = (UsageLambdaHour) o; - return Objects.equals(this.funcCount, usageLambdaHour.funcCount) - && Objects.equals(this.hour, usageLambdaHour.hour) - && Objects.equals(this.invocationsSum, usageLambdaHour.invocationsSum) - && Objects.equals(this.orgName, usageLambdaHour.orgName) - && Objects.equals(this.publicId, usageLambdaHour.publicId); + return Objects.equals(this.funcCount, usageLambdaHour.funcCount) && Objects.equals(this.hour, usageLambdaHour.hour) && Objects.equals(this.invocationsSum, usageLambdaHour.invocationsSum) && Objects.equals(this.orgName, usageLambdaHour.orgName) && Objects.equals(this.publicId, usageLambdaHour.publicId); } + @Override public int hashCode() { - return Objects.hash(funcCount, hour, invocationsSum, orgName, publicId); + return Objects.hash(funcCount,hour,invocationsSum,orgName,publicId); } @Override @@ -188,7 +192,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLambdaResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageLambdaResponse.java index 56ff5127b17..69acb87085f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLambdaResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLambdaResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the number of lambda functions and sum of the invocations of all lambda - * functions for each hour for a given organization. + *

Response containing the number of lambda functions and sum of the invocations of all lambda functions + * for each hour for a given organization.

*/ -@JsonPropertyOrder({UsageLambdaResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageLambdaResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLambdaResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -33,7 +51,6 @@ public UsageLambdaResponse usage(List usage) { } return this; } - public UsageLambdaResponse addUsageItem(UsageLambdaHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -44,22 +61,23 @@ public UsageLambdaResponse addUsageItem(UsageLambdaHour usageItem) { } /** - * Get hourly usage for Lambda. - * + *

Get hourly usage for Lambda.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageLambdaResponse object is equal to o. */ + /** + * Return true if this UsageLambdaResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,6 +90,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageLambdaResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -87,7 +106,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexHour.java index b497d799b82..50b23f1677a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Number of indexed logs for each hour and index for a given organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Number of indexed logs for each hour and index for a given organization.

+ */ @JsonPropertyOrder({ UsageLogsByIndexHour.JSON_PROPERTY_EVENT_COUNT, UsageLogsByIndexHour.JSON_PROPERTY_HOUR, @@ -25,15 +42,14 @@ UsageLogsByIndexHour.JSON_PROPERTY_PUBLIC_ID, UsageLogsByIndexHour.JSON_PROPERTY_RETENTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLogsByIndexHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EVENT_COUNT = "event_count"; private Long eventCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -58,148 +74,137 @@ public UsageLogsByIndexHour eventCount(Long eventCount) { } /** - * The total number of indexed logs for the queried hour. - * + *

The total number of indexed logs for the queried hour.

* @return eventCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEventCount() { - return eventCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEventCount() { + return eventCount; + } public void setEventCount(Long eventCount) { this.eventCount = eventCount; } - public UsageLogsByIndexHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageLogsByIndexHour indexId(String indexId) { this.indexId = indexId; return this; } /** - * The index ID for this usage. - * + *

The index ID for this usage.

* @return indexId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEX_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIndexId() { - return indexId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEX_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIndexId() { + return indexId; + } public void setIndexId(String indexId) { this.indexId = indexId; } - public UsageLogsByIndexHour indexName(String indexName) { this.indexName = indexName; return this; } /** - * The user specified name for this index ID. - * + *

The user specified name for this index ID.

* @return indexName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEX_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIndexName() { - return indexName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEX_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIndexName() { + return indexName; + } public void setIndexName(String indexName) { this.indexName = indexName; } - public UsageLogsByIndexHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageLogsByIndexHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageLogsByIndexHour retention(Long retention) { this.retention = retention; return this; } /** - * The retention period (in days) for this index ID. - * + *

The retention period (in days) for this index ID.

* @return retention - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETENTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRetention() { - return retention; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRetention() { + return retention; + } public void setRetention(Long retention) { this.retention = retention; } - /** Return true if this UsageLogsByIndexHour object is equal to o. */ + /** + * Return true if this UsageLogsByIndexHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -209,18 +214,13 @@ public boolean equals(Object o) { return false; } UsageLogsByIndexHour usageLogsByIndexHour = (UsageLogsByIndexHour) o; - return Objects.equals(this.eventCount, usageLogsByIndexHour.eventCount) - && Objects.equals(this.hour, usageLogsByIndexHour.hour) - && Objects.equals(this.indexId, usageLogsByIndexHour.indexId) - && Objects.equals(this.indexName, usageLogsByIndexHour.indexName) - && Objects.equals(this.orgName, usageLogsByIndexHour.orgName) - && Objects.equals(this.publicId, usageLogsByIndexHour.publicId) - && Objects.equals(this.retention, usageLogsByIndexHour.retention); + return Objects.equals(this.eventCount, usageLogsByIndexHour.eventCount) && Objects.equals(this.hour, usageLogsByIndexHour.hour) && Objects.equals(this.indexId, usageLogsByIndexHour.indexId) && Objects.equals(this.indexName, usageLogsByIndexHour.indexName) && Objects.equals(this.orgName, usageLogsByIndexHour.orgName) && Objects.equals(this.publicId, usageLogsByIndexHour.publicId) && Objects.equals(this.retention, usageLogsByIndexHour.retention); } + @Override public int hashCode() { - return Objects.hash(eventCount, hour, indexId, indexName, orgName, publicId, retention); + return Objects.hash(eventCount,hour,indexId,indexName,orgName,publicId,retention); } @Override @@ -239,7 +239,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexResponse.java index f8867a51d17..c98f5540763 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByIndexResponse.java @@ -6,22 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the number of indexed logs for each hour and index for a given organization. + *

Response containing the number of indexed logs for each hour and index for a given organization.

*/ -@JsonPropertyOrder({UsageLogsByIndexResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageLogsByIndexResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLogsByIndexResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -32,7 +50,6 @@ public UsageLogsByIndexResponse usage(List usage) { } return this; } - public UsageLogsByIndexResponse addUsageItem(UsageLogsByIndexHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -43,22 +60,23 @@ public UsageLogsByIndexResponse addUsageItem(UsageLogsByIndexHour usageItem) { } /** - * An array of objects regarding hourly usage of logs by index response. - * + *

An array of objects regarding hourly usage of logs by index response.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageLogsByIndexResponse object is equal to o. */ + /** + * Return true if this UsageLogsByIndexResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -71,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageLogsByIndexResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionHour.java index 09b8a5eefcf..438d5ae8bea 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionHour.java @@ -6,15 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The number of indexed logs for each hour for a given organization broken down by retention - * period. + *

The number of indexed logs for each hour for a given organization broken down by retention period.

*/ @JsonPropertyOrder({ UsageLogsByRetentionHour.JSON_PROPERTY_INDEXED_EVENTS_COUNT, @@ -24,10 +41,10 @@ UsageLogsByRetentionHour.JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_COUNT, UsageLogsByRetentionHour.JSON_PROPERTY_RETENTION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLogsByRetentionHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT = "indexed_events_count"; private Long indexedEventsCount; @@ -40,8 +57,7 @@ public class UsageLogsByRetentionHour { public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; private String publicId; - public static final String JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_COUNT = - "rehydrated_indexed_events_count"; + public static final String JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_COUNT = "rehydrated_indexed_events_count"; private Long rehydratedIndexedEventsCount; public static final String JSON_PROPERTY_RETENTION = "retention"; @@ -53,127 +69,118 @@ public UsageLogsByRetentionHour indexedEventsCount(Long indexedEventsCount) { } /** - * Total logs indexed with this retention period during a given hour. - * + *

Total logs indexed with this retention period during a given hour.

* @return indexedEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCount() { - return indexedEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCount() { + return indexedEventsCount; + } public void setIndexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; } - public UsageLogsByRetentionHour liveIndexedEventsCount(Long liveIndexedEventsCount) { this.liveIndexedEventsCount = liveIndexedEventsCount; return this; } /** - * Live logs indexed with this retention period during a given hour. - * + *

Live logs indexed with this retention period during a given hour.

* @return liveIndexedEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIVE_INDEXED_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLiveIndexedEventsCount() { - return liveIndexedEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVE_INDEXED_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLiveIndexedEventsCount() { + return liveIndexedEventsCount; + } public void setLiveIndexedEventsCount(Long liveIndexedEventsCount) { this.liveIndexedEventsCount = liveIndexedEventsCount; } - public UsageLogsByRetentionHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageLogsByRetentionHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageLogsByRetentionHour rehydratedIndexedEventsCount(Long rehydratedIndexedEventsCount) { this.rehydratedIndexedEventsCount = rehydratedIndexedEventsCount; return this; } /** - * Rehydrated logs indexed with this retention period during a given hour. - * + *

Rehydrated logs indexed with this retention period during a given hour.

* @return rehydratedIndexedEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRehydratedIndexedEventsCount() { - return rehydratedIndexedEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRehydratedIndexedEventsCount() { + return rehydratedIndexedEventsCount; + } public void setRehydratedIndexedEventsCount(Long rehydratedIndexedEventsCount) { this.rehydratedIndexedEventsCount = rehydratedIndexedEventsCount; } - public UsageLogsByRetentionHour retention(String retention) { this.retention = retention; return this; } /** - * The retention period in days or "custom" for all custom retention usage. - * + *

The retention period in days or "custom" for all custom retention usage.

* @return retention - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETENTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRetention() { - return retention; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRetention() { + return retention; + } public void setRetention(String retention) { this.retention = retention; } - /** Return true if this UsageLogsByRetentionHour object is equal to o. */ + /** + * Return true if this UsageLogsByRetentionHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,26 +190,13 @@ public boolean equals(Object o) { return false; } UsageLogsByRetentionHour usageLogsByRetentionHour = (UsageLogsByRetentionHour) o; - return Objects.equals(this.indexedEventsCount, usageLogsByRetentionHour.indexedEventsCount) - && Objects.equals( - this.liveIndexedEventsCount, usageLogsByRetentionHour.liveIndexedEventsCount) - && Objects.equals(this.orgName, usageLogsByRetentionHour.orgName) - && Objects.equals(this.publicId, usageLogsByRetentionHour.publicId) - && Objects.equals( - this.rehydratedIndexedEventsCount, - usageLogsByRetentionHour.rehydratedIndexedEventsCount) - && Objects.equals(this.retention, usageLogsByRetentionHour.retention); + return Objects.equals(this.indexedEventsCount, usageLogsByRetentionHour.indexedEventsCount) && Objects.equals(this.liveIndexedEventsCount, usageLogsByRetentionHour.liveIndexedEventsCount) && Objects.equals(this.orgName, usageLogsByRetentionHour.orgName) && Objects.equals(this.publicId, usageLogsByRetentionHour.publicId) && Objects.equals(this.rehydratedIndexedEventsCount, usageLogsByRetentionHour.rehydratedIndexedEventsCount) && Objects.equals(this.retention, usageLogsByRetentionHour.retention); } + @Override public int hashCode() { - return Objects.hash( - indexedEventsCount, - liveIndexedEventsCount, - orgName, - publicId, - rehydratedIndexedEventsCount, - retention); + return Objects.hash(indexedEventsCount,liveIndexedEventsCount,orgName,publicId,rehydratedIndexedEventsCount,retention); } @Override @@ -210,21 +204,18 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageLogsByRetentionHour {\n"); sb.append(" indexedEventsCount: ").append(toIndentedString(indexedEventsCount)).append("\n"); - sb.append(" liveIndexedEventsCount: ") - .append(toIndentedString(liveIndexedEventsCount)) - .append("\n"); + sb.append(" liveIndexedEventsCount: ").append(toIndentedString(liveIndexedEventsCount)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); - sb.append(" rehydratedIndexedEventsCount: ") - .append(toIndentedString(rehydratedIndexedEventsCount)) - .append("\n"); + sb.append(" rehydratedIndexedEventsCount: ").append(toIndentedString(rehydratedIndexedEventsCount)).append("\n"); sb.append(" retention: ").append(toIndentedString(retention)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionResponse.java index 84f3be73c90..2232b2b824b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLogsByRetentionResponse.java @@ -6,23 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the indexed logs usage broken down by retention period for an organization - * during a given hour. + *

Response containing the indexed logs usage broken down by retention period for an organization during a given hour.

*/ -@JsonPropertyOrder({UsageLogsByRetentionResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageLogsByRetentionResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLogsByRetentionResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -33,7 +50,6 @@ public UsageLogsByRetentionResponse usage(List usage) } return this; } - public UsageLogsByRetentionResponse addUsageItem(UsageLogsByRetentionHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -44,22 +60,23 @@ public UsageLogsByRetentionResponse addUsageItem(UsageLogsByRetentionHour usageI } /** - * Get hourly usage for indexed logs by retention period. - * + *

Get hourly usage for indexed logs by retention period.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageLogsByRetentionResponse object is equal to o. */ + /** + * Return true if this UsageLogsByRetentionResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageLogsByRetentionResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -87,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLogsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageLogsHour.java index 930dcf4557a..a6831cfcca2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLogsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLogsHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Hour usage for logs. */ +/** + *

Hour usage for logs.

+ */ @JsonPropertyOrder({ UsageLogsHour.JSON_PROPERTY_BILLABLE_INGESTED_BYTES, UsageLogsHour.JSON_PROPERTY_HOUR, @@ -28,15 +45,14 @@ UsageLogsHour.JSON_PROPERTY_ORG_NAME, UsageLogsHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLogsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES = "billable_ingested_bytes"; private Long billableIngestedBytes; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -52,12 +68,10 @@ public class UsageLogsHour { public static final String JSON_PROPERTY_LOGS_LIVE_INGESTED_BYTES = "logs_live_ingested_bytes"; private Long logsLiveIngestedBytes; - public static final String JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_COUNT = - "logs_rehydrated_indexed_count"; + public static final String JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_COUNT = "logs_rehydrated_indexed_count"; private Long logsRehydratedIndexedCount; - public static final String JSON_PROPERTY_LOGS_REHYDRATED_INGESTED_BYTES = - "logs_rehydrated_ingested_bytes"; + public static final String JSON_PROPERTY_LOGS_REHYDRATED_INGESTED_BYTES = "logs_rehydrated_ingested_bytes"; private Long logsRehydratedIngestedBytes; public static final String JSON_PROPERTY_ORG_NAME = "org_name"; @@ -72,211 +86,194 @@ public UsageLogsHour billableIngestedBytes(Long billableIngestedBytes) { } /** - * Contains the number of billable log bytes ingested. - * + *

Contains the number of billable log bytes ingested.

* @return billableIngestedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBillableIngestedBytes() { - return billableIngestedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBillableIngestedBytes() { + return billableIngestedBytes; + } public void setBillableIngestedBytes(Long billableIngestedBytes) { this.billableIngestedBytes = billableIngestedBytes; } - public UsageLogsHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageLogsHour indexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; return this; } /** - * Contains the number of log events indexed. - * + *

Contains the number of log events indexed.

* @return indexedEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCount() { - return indexedEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCount() { + return indexedEventsCount; + } public void setIndexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; } - public UsageLogsHour ingestedEventsBytes(Long ingestedEventsBytes) { this.ingestedEventsBytes = ingestedEventsBytes; return this; } /** - * Contains the number of log bytes ingested. - * + *

Contains the number of log bytes ingested.

* @return ingestedEventsBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytes() { - return ingestedEventsBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestedEventsBytes() { + return ingestedEventsBytes; + } public void setIngestedEventsBytes(Long ingestedEventsBytes) { this.ingestedEventsBytes = ingestedEventsBytes; } - public UsageLogsHour logsLiveIndexedCount(Long logsLiveIndexedCount) { this.logsLiveIndexedCount = logsLiveIndexedCount; return this; } /** - * Contains the number of live log events indexed (data available as of December 1, 2020). - * + *

Contains the number of live log events indexed (data available as of December 1, 2020).

* @return logsLiveIndexedCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INDEXED_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsLiveIndexedCount() { - return logsLiveIndexedCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INDEXED_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsLiveIndexedCount() { + return logsLiveIndexedCount; + } public void setLogsLiveIndexedCount(Long logsLiveIndexedCount) { this.logsLiveIndexedCount = logsLiveIndexedCount; } - public UsageLogsHour logsLiveIngestedBytes(Long logsLiveIngestedBytes) { this.logsLiveIngestedBytes = logsLiveIngestedBytes; return this; } /** - * Contains the number of live log bytes ingested (data available as of December 1, 2020). - * + *

Contains the number of live log bytes ingested (data available as of December 1, 2020).

* @return logsLiveIngestedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INGESTED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsLiveIngestedBytes() { - return logsLiveIngestedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_LIVE_INGESTED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsLiveIngestedBytes() { + return logsLiveIngestedBytes; + } public void setLogsLiveIngestedBytes(Long logsLiveIngestedBytes) { this.logsLiveIngestedBytes = logsLiveIngestedBytes; } - public UsageLogsHour logsRehydratedIndexedCount(Long logsRehydratedIndexedCount) { this.logsRehydratedIndexedCount = logsRehydratedIndexedCount; return this; } /** - * Contains the number of rehydrated log events indexed (data available as of December 1, 2020). - * + *

Contains the number of rehydrated log events indexed (data available as of December 1, 2020).

* @return logsRehydratedIndexedCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsRehydratedIndexedCount() { - return logsRehydratedIndexedCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INDEXED_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsRehydratedIndexedCount() { + return logsRehydratedIndexedCount; + } public void setLogsRehydratedIndexedCount(Long logsRehydratedIndexedCount) { this.logsRehydratedIndexedCount = logsRehydratedIndexedCount; } - public UsageLogsHour logsRehydratedIngestedBytes(Long logsRehydratedIngestedBytes) { this.logsRehydratedIngestedBytes = logsRehydratedIngestedBytes; return this; } /** - * Contains the number of rehydrated log bytes ingested (data available as of December 1, 2020). - * + *

Contains the number of rehydrated log bytes ingested (data available as of December 1, 2020).

* @return logsRehydratedIngestedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INGESTED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsRehydratedIngestedBytes() { - return logsRehydratedIngestedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_REHYDRATED_INGESTED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsRehydratedIngestedBytes() { + return logsRehydratedIngestedBytes; + } public void setLogsRehydratedIngestedBytes(Long logsRehydratedIngestedBytes) { this.logsRehydratedIngestedBytes = logsRehydratedIngestedBytes; } - public UsageLogsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageLogsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageLogsHour object is equal to o. */ + /** + * Return true if this UsageLogsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -286,58 +283,27 @@ public boolean equals(Object o) { return false; } UsageLogsHour usageLogsHour = (UsageLogsHour) o; - return Objects.equals(this.billableIngestedBytes, usageLogsHour.billableIngestedBytes) - && Objects.equals(this.hour, usageLogsHour.hour) - && Objects.equals(this.indexedEventsCount, usageLogsHour.indexedEventsCount) - && Objects.equals(this.ingestedEventsBytes, usageLogsHour.ingestedEventsBytes) - && Objects.equals(this.logsLiveIndexedCount, usageLogsHour.logsLiveIndexedCount) - && Objects.equals(this.logsLiveIngestedBytes, usageLogsHour.logsLiveIngestedBytes) - && Objects.equals(this.logsRehydratedIndexedCount, usageLogsHour.logsRehydratedIndexedCount) - && Objects.equals( - this.logsRehydratedIngestedBytes, usageLogsHour.logsRehydratedIngestedBytes) - && Objects.equals(this.orgName, usageLogsHour.orgName) - && Objects.equals(this.publicId, usageLogsHour.publicId); + return Objects.equals(this.billableIngestedBytes, usageLogsHour.billableIngestedBytes) && Objects.equals(this.hour, usageLogsHour.hour) && Objects.equals(this.indexedEventsCount, usageLogsHour.indexedEventsCount) && Objects.equals(this.ingestedEventsBytes, usageLogsHour.ingestedEventsBytes) && Objects.equals(this.logsLiveIndexedCount, usageLogsHour.logsLiveIndexedCount) && Objects.equals(this.logsLiveIngestedBytes, usageLogsHour.logsLiveIngestedBytes) && Objects.equals(this.logsRehydratedIndexedCount, usageLogsHour.logsRehydratedIndexedCount) && Objects.equals(this.logsRehydratedIngestedBytes, usageLogsHour.logsRehydratedIngestedBytes) && Objects.equals(this.orgName, usageLogsHour.orgName) && Objects.equals(this.publicId, usageLogsHour.publicId); } + @Override public int hashCode() { - return Objects.hash( - billableIngestedBytes, - hour, - indexedEventsCount, - ingestedEventsBytes, - logsLiveIndexedCount, - logsLiveIngestedBytes, - logsRehydratedIndexedCount, - logsRehydratedIngestedBytes, - orgName, - publicId); + return Objects.hash(billableIngestedBytes,hour,indexedEventsCount,ingestedEventsBytes,logsLiveIndexedCount,logsLiveIngestedBytes,logsRehydratedIndexedCount,logsRehydratedIngestedBytes,orgName,publicId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageLogsHour {\n"); - sb.append(" billableIngestedBytes: ") - .append(toIndentedString(billableIngestedBytes)) - .append("\n"); + sb.append(" billableIngestedBytes: ").append(toIndentedString(billableIngestedBytes)).append("\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); sb.append(" indexedEventsCount: ").append(toIndentedString(indexedEventsCount)).append("\n"); - sb.append(" ingestedEventsBytes: ") - .append(toIndentedString(ingestedEventsBytes)) - .append("\n"); - sb.append(" logsLiveIndexedCount: ") - .append(toIndentedString(logsLiveIndexedCount)) - .append("\n"); - sb.append(" logsLiveIngestedBytes: ") - .append(toIndentedString(logsLiveIngestedBytes)) - .append("\n"); - sb.append(" logsRehydratedIndexedCount: ") - .append(toIndentedString(logsRehydratedIndexedCount)) - .append("\n"); - sb.append(" logsRehydratedIngestedBytes: ") - .append(toIndentedString(logsRehydratedIngestedBytes)) - .append("\n"); + sb.append(" ingestedEventsBytes: ").append(toIndentedString(ingestedEventsBytes)).append("\n"); + sb.append(" logsLiveIndexedCount: ").append(toIndentedString(logsLiveIndexedCount)).append("\n"); + sb.append(" logsLiveIngestedBytes: ").append(toIndentedString(logsLiveIngestedBytes)).append("\n"); + sb.append(" logsRehydratedIndexedCount: ").append(toIndentedString(logsRehydratedIndexedCount)).append("\n"); + sb.append(" logsRehydratedIngestedBytes: ").append(toIndentedString(logsRehydratedIngestedBytes)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append("}"); @@ -345,7 +311,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageLogsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageLogsResponse.java index 0637e3fb7f0..909a6ce0949 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageLogsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageLogsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of logs for each hour. */ -@JsonPropertyOrder({UsageLogsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of logs for each hour.

+ */ +@JsonPropertyOrder({ + UsageLogsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLogsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageLogsResponse usage(List usage) { } return this; } - public UsageLogsResponse addUsageItem(UsageLogsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageLogsResponse addUsageItem(UsageLogsHour usageItem) { } /** - * An array of objects regarding hourly usage of logs. - * + *

An array of objects regarding hourly usage of logs.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageLogsResponse object is equal to o. */ + /** + * Return true if this UsageLogsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageLogsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageMetricCategory.java b/src/main/java/com/datadog/api/client/v1/model/UsageMetricCategory.java index 22566892ce4..8d72293065d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageMetricCategory.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageMetricCategory.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Contains the metric category. */ +/** + *

Contains the metric category.

+ */ @JsonSerialize(using = UsageMetricCategory.UsageMetricCategorySerializer.class) public class UsageMetricCategory { public static final UsageMetricCategory STANDARD = new UsageMetricCategory("standard"); public static final UsageMetricCategory CUSTOM = new UsageMetricCategory("custom"); - private static final Set allowedValues = - new HashSet(Arrays.asList("standard", "custom")); + private static final Set allowedValues = new HashSet(Arrays.asList("standard", "custom")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class UsageMetricCategorySerializer extends StdSerializer { - public UsageMetricCategorySerializer(Class t) { - super(t); - } - - public UsageMetricCategorySerializer() { - this(null); - } - - @Override - public void serialize( - UsageMetricCategory value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsageMetricCategorySerializer(Class t) { + super(t); + } + + public UsageMetricCategorySerializer() { + this(null); + } + + @Override + public void serialize(UsageMetricCategory value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageMetricCategory object is equal to o. */ + /** + * Return true if this UsageMetricCategory object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsHour.java index 6d1a20790c7..ebe5f0a884f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Number of netflow events indexed for each hour for a given organization. */ + +/** + *

Number of netflow events indexed for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageNetworkFlowsHour.JSON_PROPERTY_HOUR, UsageNetworkFlowsHour.JSON_PROPERTY_INDEXED_EVENTS_COUNT, UsageNetworkFlowsHour.JSON_PROPERTY_ORG_NAME, UsageNetworkFlowsHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageNetworkFlowsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageNetworkFlowsHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageNetworkFlowsHour indexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; return this; } /** - * Contains the number of netflow events indexed. - * + *

Contains the number of netflow events indexed.

* @return indexedEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCount() { - return indexedEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCount() { + return indexedEventsCount; + } public void setIndexedEventsCount(Long indexedEventsCount) { this.indexedEventsCount = indexedEventsCount; } - public UsageNetworkFlowsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageNetworkFlowsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageNetworkFlowsHour object is equal to o. */ + /** + * Return true if this UsageNetworkFlowsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageNetworkFlowsHour usageNetworkFlowsHour = (UsageNetworkFlowsHour) o; - return Objects.equals(this.hour, usageNetworkFlowsHour.hour) - && Objects.equals(this.indexedEventsCount, usageNetworkFlowsHour.indexedEventsCount) - && Objects.equals(this.orgName, usageNetworkFlowsHour.orgName) - && Objects.equals(this.publicId, usageNetworkFlowsHour.publicId); + return Objects.equals(this.hour, usageNetworkFlowsHour.hour) && Objects.equals(this.indexedEventsCount, usageNetworkFlowsHour.indexedEventsCount) && Objects.equals(this.orgName, usageNetworkFlowsHour.orgName) && Objects.equals(this.publicId, usageNetworkFlowsHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, indexedEventsCount, orgName, publicId); + return Objects.hash(hour,indexedEventsCount,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsResponse.java index 0f54a7e8ebd..51ebbc355d7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkFlowsResponse.java @@ -6,22 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the number of netflow events indexed for each hour for a given organization. + *

Response containing the number of netflow events indexed for each hour for a given organization.

*/ -@JsonPropertyOrder({UsageNetworkFlowsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageNetworkFlowsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageNetworkFlowsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -32,7 +50,6 @@ public UsageNetworkFlowsResponse usage(List usage) { } return this; } - public UsageNetworkFlowsResponse addUsageItem(UsageNetworkFlowsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -43,22 +60,23 @@ public UsageNetworkFlowsResponse addUsageItem(UsageNetworkFlowsHour usageItem) { } /** - * Get hourly usage for Network Flows. - * + *

Get hourly usage for Network Flows.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageNetworkFlowsResponse object is equal to o. */ + /** + * Return true if this UsageNetworkFlowsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -71,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageNetworkFlowsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsHour.java index 058319c0d5d..36cfcfb0c3f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsHour.java @@ -6,31 +6,47 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Number of active NPM hosts for each hour for a given organization. */ + +/** + *

Number of active NPM hosts for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageNetworkHostsHour.JSON_PROPERTY_HOST_COUNT, UsageNetworkHostsHour.JSON_PROPERTY_HOUR, UsageNetworkHostsHour.JSON_PROPERTY_ORG_NAME, UsageNetworkHostsHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageNetworkHostsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOST_COUNT = "host_count"; private Long hostCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageNetworkHostsHour hostCount(Long hostCount) { } /** - * Contains the number of active NPM hosts. - * + *

Contains the number of active NPM hosts.

* @return hostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHostCount() { - return hostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHostCount() { + return hostCount; + } public void setHostCount(Long hostCount) { this.hostCount = hostCount; } - public UsageNetworkHostsHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageNetworkHostsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageNetworkHostsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageNetworkHostsHour object is equal to o. */ + /** + * Return true if this UsageNetworkHostsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageNetworkHostsHour usageNetworkHostsHour = (UsageNetworkHostsHour) o; - return Objects.equals(this.hostCount, usageNetworkHostsHour.hostCount) - && Objects.equals(this.hour, usageNetworkHostsHour.hour) - && Objects.equals(this.orgName, usageNetworkHostsHour.orgName) - && Objects.equals(this.publicId, usageNetworkHostsHour.publicId); + return Objects.equals(this.hostCount, usageNetworkHostsHour.hostCount) && Objects.equals(this.hour, usageNetworkHostsHour.hour) && Objects.equals(this.orgName, usageNetworkHostsHour.orgName) && Objects.equals(this.publicId, usageNetworkHostsHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hostCount, hour, orgName, publicId); + return Objects.hash(hostCount,hour,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsResponse.java index ae889c660a9..557e67bd474 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageNetworkHostsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of active NPM hosts for each hour for a given organization. */ -@JsonPropertyOrder({UsageNetworkHostsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of active NPM hosts for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageNetworkHostsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageNetworkHostsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageNetworkHostsResponse usage(List usage) { } return this; } - public UsageNetworkHostsResponse addUsageItem(UsageNetworkHostsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageNetworkHostsResponse addUsageItem(UsageNetworkHostsHour usageItem) { } /** - * Get hourly usage for NPM hosts. - * + *

Get hourly usage for NPM hosts.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageNetworkHostsResponse object is equal to o. */ + /** + * Return true if this UsageNetworkHostsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageNetworkHostsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveHour.java index 255fbd4e878..a82859e6602 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveHour.java @@ -6,33 +6,48 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Online Archive usage in a given hour. */ + +/** + *

Online Archive usage in a given hour.

+ */ @JsonPropertyOrder({ UsageOnlineArchiveHour.JSON_PROPERTY_HOUR, UsageOnlineArchiveHour.JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT, UsageOnlineArchiveHour.JSON_PROPERTY_ORG_NAME, UsageOnlineArchiveHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageOnlineArchiveHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; - public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT = - "online_archive_events_count"; + public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT = "online_archive_events_count"; private Long onlineArchiveEventsCount; public static final String JSON_PROPERTY_ORG_NAME = "org_name"; @@ -47,85 +62,80 @@ public UsageOnlineArchiveHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageOnlineArchiveHour onlineArchiveEventsCount(Long onlineArchiveEventsCount) { this.onlineArchiveEventsCount = onlineArchiveEventsCount; return this; } /** - * Total count of online archived events within the hour. - * + *

Total count of online archived events within the hour.

* @return onlineArchiveEventsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOnlineArchiveEventsCount() { - return onlineArchiveEventsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOnlineArchiveEventsCount() { + return onlineArchiveEventsCount; + } public void setOnlineArchiveEventsCount(Long onlineArchiveEventsCount) { this.onlineArchiveEventsCount = onlineArchiveEventsCount; } - public UsageOnlineArchiveHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageOnlineArchiveHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageOnlineArchiveHour object is equal to o. */ + /** + * Return true if this UsageOnlineArchiveHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,16 +145,13 @@ public boolean equals(Object o) { return false; } UsageOnlineArchiveHour usageOnlineArchiveHour = (UsageOnlineArchiveHour) o; - return Objects.equals(this.hour, usageOnlineArchiveHour.hour) - && Objects.equals( - this.onlineArchiveEventsCount, usageOnlineArchiveHour.onlineArchiveEventsCount) - && Objects.equals(this.orgName, usageOnlineArchiveHour.orgName) - && Objects.equals(this.publicId, usageOnlineArchiveHour.publicId); + return Objects.equals(this.hour, usageOnlineArchiveHour.hour) && Objects.equals(this.onlineArchiveEventsCount, usageOnlineArchiveHour.onlineArchiveEventsCount) && Objects.equals(this.orgName, usageOnlineArchiveHour.orgName) && Objects.equals(this.publicId, usageOnlineArchiveHour.publicId); } + @Override public int hashCode() { - return Objects.hash(hour, onlineArchiveEventsCount, orgName, publicId); + return Objects.hash(hour,onlineArchiveEventsCount,orgName,publicId); } @Override @@ -152,9 +159,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageOnlineArchiveHour {\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" onlineArchiveEventsCount: ") - .append(toIndentedString(onlineArchiveEventsCount)) - .append("\n"); + sb.append(" onlineArchiveEventsCount: ").append(toIndentedString(onlineArchiveEventsCount)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append("}"); @@ -162,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveResponse.java index 5d162fa19e0..c16ec06eccd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageOnlineArchiveResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Online Archive usage response. */ -@JsonPropertyOrder({UsageOnlineArchiveResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Online Archive usage response.

+ */ +@JsonPropertyOrder({ + UsageOnlineArchiveResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageOnlineArchiveResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageOnlineArchiveResponse usage(List usage) { } return this; } - public UsageOnlineArchiveResponse addUsageItem(UsageOnlineArchiveHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageOnlineArchiveResponse addUsageItem(UsageOnlineArchiveHour usageItem) } /** - * Response containing Online Archive usage. - * + *

Response containing Online Archive usage.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageOnlineArchiveResponse object is equal to o. */ + /** + * Return true if this UsageOnlineArchiveResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageOnlineArchiveResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageProfilingHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageProfilingHour.java index e6cb1f7192c..21c7a74ac5e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageProfilingHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageProfilingHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The number of profiled hosts for each hour for a given organization. */ +/** + *

The number of profiled hosts for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageProfilingHour.JSON_PROPERTY_AVG_CONTAINER_AGENT_COUNT, UsageProfilingHour.JSON_PROPERTY_HOST_COUNT, @@ -23,10 +40,10 @@ UsageProfilingHour.JSON_PROPERTY_ORG_NAME, UsageProfilingHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageProfilingHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AVG_CONTAINER_AGENT_COUNT = "avg_container_agent_count"; private Long avgContainerAgentCount; @@ -34,7 +51,6 @@ public class UsageProfilingHour { private Long hostCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -50,106 +66,99 @@ public UsageProfilingHour avgContainerAgentCount(Long avgContainerAgentCount) { } /** - * Get average number of container agents for that hour. - * + *

Get average number of container agents for that hour.

* @return avgContainerAgentCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AVG_CONTAINER_AGENT_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAvgContainerAgentCount() { - return avgContainerAgentCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_CONTAINER_AGENT_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAvgContainerAgentCount() { + return avgContainerAgentCount; + } public void setAvgContainerAgentCount(Long avgContainerAgentCount) { this.avgContainerAgentCount = avgContainerAgentCount; } - public UsageProfilingHour hostCount(Long hostCount) { this.hostCount = hostCount; return this; } /** - * Contains the total number of profiled hosts reporting during a given hour. - * + *

Contains the total number of profiled hosts reporting during a given hour.

* @return hostCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHostCount() { - return hostCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHostCount() { + return hostCount; + } public void setHostCount(Long hostCount) { this.hostCount = hostCount; } - public UsageProfilingHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageProfilingHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageProfilingHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageProfilingHour object is equal to o. */ + /** + * Return true if this UsageProfilingHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -159,25 +168,20 @@ public boolean equals(Object o) { return false; } UsageProfilingHour usageProfilingHour = (UsageProfilingHour) o; - return Objects.equals(this.avgContainerAgentCount, usageProfilingHour.avgContainerAgentCount) - && Objects.equals(this.hostCount, usageProfilingHour.hostCount) - && Objects.equals(this.hour, usageProfilingHour.hour) - && Objects.equals(this.orgName, usageProfilingHour.orgName) - && Objects.equals(this.publicId, usageProfilingHour.publicId); + return Objects.equals(this.avgContainerAgentCount, usageProfilingHour.avgContainerAgentCount) && Objects.equals(this.hostCount, usageProfilingHour.hostCount) && Objects.equals(this.hour, usageProfilingHour.hour) && Objects.equals(this.orgName, usageProfilingHour.orgName) && Objects.equals(this.publicId, usageProfilingHour.publicId); } + @Override public int hashCode() { - return Objects.hash(avgContainerAgentCount, hostCount, hour, orgName, publicId); + return Objects.hash(avgContainerAgentCount,hostCount,hour,orgName,publicId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageProfilingHour {\n"); - sb.append(" avgContainerAgentCount: ") - .append(toIndentedString(avgContainerAgentCount)) - .append("\n"); + sb.append(" avgContainerAgentCount: ").append(toIndentedString(avgContainerAgentCount)).append("\n"); sb.append(" hostCount: ").append(toIndentedString(hostCount)).append("\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); @@ -187,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageProfilingResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageProfilingResponse.java index b3a4924b8f1..5e5183fd5e8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageProfilingResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageProfilingResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of profiled hosts for each hour for a given organization. */ -@JsonPropertyOrder({UsageProfilingResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of profiled hosts for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageProfilingResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageProfilingResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageProfilingResponse usage(List usage) { } return this; } - public UsageProfilingResponse addUsageItem(UsageProfilingHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageProfilingResponse addUsageItem(UsageProfilingHour usageItem) { } /** - * Get hourly usage for profiled hosts. - * + *

Get hourly usage for profiled hosts.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageProfilingResponse object is equal to o. */ + /** + * Return true if this UsageProfilingResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageProfilingResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageReportsType.java b/src/main/java/com/datadog/api/client/v1/model/UsageReportsType.java index b46118a8022..00bfa72e73a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageReportsType.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageReportsType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of reports. */ +/** + *

The type of reports.

+ */ @JsonSerialize(using = UsageReportsType.UsageReportsTypeSerializer.class) public class UsageReportsType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class UsageReportsTypeSerializer extends StdSerializer { - public UsageReportsTypeSerializer(Class t) { - super(t); - } - - public UsageReportsTypeSerializer() { - this(null); - } - - @Override - public void serialize(UsageReportsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsageReportsTypeSerializer(Class t) { + super(t); + } + + public UsageReportsTypeSerializer() { + this(null); + } + + @Override + public void serialize(UsageReportsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageReportsType object is equal to o. */ + /** + * Return true if this UsageReportsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsHour.java index e4b58e45948..0d7fbc24d0c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsHour.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Number of RUM Sessions recorded for each hour for a given organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Number of RUM Sessions recorded for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageRumSessionsHour.JSON_PROPERTY_HOUR, UsageRumSessionsHour.JSON_PROPERTY_ORG_NAME, @@ -28,12 +44,11 @@ UsageRumSessionsHour.JSON_PROPERTY_SESSION_COUNT_IOS, UsageRumSessionsHour.JSON_PROPERTY_SESSION_COUNT_REACTNATIVE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageRumSessionsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -67,242 +82,210 @@ public UsageRumSessionsHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageRumSessionsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageRumSessionsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageRumSessionsHour replaySessionCount(Long replaySessionCount) { this.replaySessionCount = replaySessionCount; return this; } /** - * Contains the number of RUM Replay Sessions (data available beginning November 1, 2021). - * + *

Contains the number of RUM Replay Sessions (data available beginning November 1, 2021).

* @return replaySessionCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REPLAY_SESSION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getReplaySessionCount() { - return replaySessionCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPLAY_SESSION_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getReplaySessionCount() { + return replaySessionCount; + } public void setReplaySessionCount(Long replaySessionCount) { this.replaySessionCount = replaySessionCount; } - public UsageRumSessionsHour sessionCount(Long sessionCount) { this.sessionCount = JsonNullable.of(sessionCount); return this; } /** - * Contains the number of browser RUM Lite Sessions. - * + *

Contains the number of browser RUM Lite Sessions.

* @return sessionCount - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSessionCount() { - return sessionCount.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSessionCount() { + return sessionCount.orElse(null); + } @JsonProperty(JSON_PROPERTY_SESSION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSessionCount_JsonNullable() { return sessionCount; } - - @JsonProperty(JSON_PROPERTY_SESSION_COUNT) - public void setSessionCount_JsonNullable(JsonNullable sessionCount) { + @JsonProperty(JSON_PROPERTY_SESSION_COUNT)public void setSessionCount_JsonNullable(JsonNullable sessionCount) { this.sessionCount = sessionCount; } - public void setSessionCount(Long sessionCount) { this.sessionCount = JsonNullable.of(sessionCount); } - public UsageRumSessionsHour sessionCountAndroid(Long sessionCountAndroid) { this.sessionCountAndroid = JsonNullable.of(sessionCountAndroid); return this; } /** - * Contains the number of mobile RUM Sessions on Android (data available beginning December 1, - * 2020). - * + *

Contains the number of mobile RUM Sessions on Android (data available beginning December 1, 2020).

* @return sessionCountAndroid - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSessionCountAndroid() { - return sessionCountAndroid.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSessionCountAndroid() { + return sessionCountAndroid.orElse(null); + } @JsonProperty(JSON_PROPERTY_SESSION_COUNT_ANDROID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSessionCountAndroid_JsonNullable() { return sessionCountAndroid; } - - @JsonProperty(JSON_PROPERTY_SESSION_COUNT_ANDROID) - public void setSessionCountAndroid_JsonNullable(JsonNullable sessionCountAndroid) { + @JsonProperty(JSON_PROPERTY_SESSION_COUNT_ANDROID)public void setSessionCountAndroid_JsonNullable(JsonNullable sessionCountAndroid) { this.sessionCountAndroid = sessionCountAndroid; } - public void setSessionCountAndroid(Long sessionCountAndroid) { this.sessionCountAndroid = JsonNullable.of(sessionCountAndroid); } - public UsageRumSessionsHour sessionCountFlutter(Long sessionCountFlutter) { this.sessionCountFlutter = JsonNullable.of(sessionCountFlutter); return this; } /** - * Contains the number of mobile RUM Sessions on Flutter (data available beginning March 1, 2023). - * + *

Contains the number of mobile RUM Sessions on Flutter (data available beginning March 1, 2023).

* @return sessionCountFlutter - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSessionCountFlutter() { - return sessionCountFlutter.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSessionCountFlutter() { + return sessionCountFlutter.orElse(null); + } @JsonProperty(JSON_PROPERTY_SESSION_COUNT_FLUTTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSessionCountFlutter_JsonNullable() { return sessionCountFlutter; } - - @JsonProperty(JSON_PROPERTY_SESSION_COUNT_FLUTTER) - public void setSessionCountFlutter_JsonNullable(JsonNullable sessionCountFlutter) { + @JsonProperty(JSON_PROPERTY_SESSION_COUNT_FLUTTER)public void setSessionCountFlutter_JsonNullable(JsonNullable sessionCountFlutter) { this.sessionCountFlutter = sessionCountFlutter; } - public void setSessionCountFlutter(Long sessionCountFlutter) { this.sessionCountFlutter = JsonNullable.of(sessionCountFlutter); } - public UsageRumSessionsHour sessionCountIos(Long sessionCountIos) { this.sessionCountIos = JsonNullable.of(sessionCountIos); return this; } /** - * Contains the number of mobile RUM Sessions on iOS (data available beginning December 1, 2020). - * + *

Contains the number of mobile RUM Sessions on iOS (data available beginning December 1, 2020).

* @return sessionCountIos - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSessionCountIos() { - return sessionCountIos.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSessionCountIos() { + return sessionCountIos.orElse(null); + } @JsonProperty(JSON_PROPERTY_SESSION_COUNT_IOS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSessionCountIos_JsonNullable() { return sessionCountIos; } - - @JsonProperty(JSON_PROPERTY_SESSION_COUNT_IOS) - public void setSessionCountIos_JsonNullable(JsonNullable sessionCountIos) { + @JsonProperty(JSON_PROPERTY_SESSION_COUNT_IOS)public void setSessionCountIos_JsonNullable(JsonNullable sessionCountIos) { this.sessionCountIos = sessionCountIos; } - public void setSessionCountIos(Long sessionCountIos) { this.sessionCountIos = JsonNullable.of(sessionCountIos); } - public UsageRumSessionsHour sessionCountReactnative(Long sessionCountReactnative) { this.sessionCountReactnative = JsonNullable.of(sessionCountReactnative); return this; } /** - * Contains the number of mobile RUM Sessions on React Native (data available beginning May 1, - * 2022). - * + *

Contains the number of mobile RUM Sessions on React Native (data available beginning May 1, 2022).

* @return sessionCountReactnative - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getSessionCountReactnative() { - return sessionCountReactnative.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSessionCountReactnative() { + return sessionCountReactnative.orElse(null); + } @JsonProperty(JSON_PROPERTY_SESSION_COUNT_REACTNATIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getSessionCountReactnative_JsonNullable() { return sessionCountReactnative; } - - @JsonProperty(JSON_PROPERTY_SESSION_COUNT_REACTNATIVE) - public void setSessionCountReactnative_JsonNullable(JsonNullable sessionCountReactnative) { + @JsonProperty(JSON_PROPERTY_SESSION_COUNT_REACTNATIVE)public void setSessionCountReactnative_JsonNullable(JsonNullable sessionCountReactnative) { this.sessionCountReactnative = sessionCountReactnative; } - public void setSessionCountReactnative(Long sessionCountReactnative) { this.sessionCountReactnative = JsonNullable.of(sessionCountReactnative); } - /** Return true if this UsageRumSessionsHour object is equal to o. */ + /** + * Return true if this UsageRumSessionsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -312,30 +295,13 @@ public boolean equals(Object o) { return false; } UsageRumSessionsHour usageRumSessionsHour = (UsageRumSessionsHour) o; - return Objects.equals(this.hour, usageRumSessionsHour.hour) - && Objects.equals(this.orgName, usageRumSessionsHour.orgName) - && Objects.equals(this.publicId, usageRumSessionsHour.publicId) - && Objects.equals(this.replaySessionCount, usageRumSessionsHour.replaySessionCount) - && Objects.equals(this.sessionCount, usageRumSessionsHour.sessionCount) - && Objects.equals(this.sessionCountAndroid, usageRumSessionsHour.sessionCountAndroid) - && Objects.equals(this.sessionCountFlutter, usageRumSessionsHour.sessionCountFlutter) - && Objects.equals(this.sessionCountIos, usageRumSessionsHour.sessionCountIos) - && Objects.equals( - this.sessionCountReactnative, usageRumSessionsHour.sessionCountReactnative); + return Objects.equals(this.hour, usageRumSessionsHour.hour) && Objects.equals(this.orgName, usageRumSessionsHour.orgName) && Objects.equals(this.publicId, usageRumSessionsHour.publicId) && Objects.equals(this.replaySessionCount, usageRumSessionsHour.replaySessionCount) && Objects.equals(this.sessionCount, usageRumSessionsHour.sessionCount) && Objects.equals(this.sessionCountAndroid, usageRumSessionsHour.sessionCountAndroid) && Objects.equals(this.sessionCountFlutter, usageRumSessionsHour.sessionCountFlutter) && Objects.equals(this.sessionCountIos, usageRumSessionsHour.sessionCountIos) && Objects.equals(this.sessionCountReactnative, usageRumSessionsHour.sessionCountReactnative); } + @Override public int hashCode() { - return Objects.hash( - hour, - orgName, - publicId, - replaySessionCount, - sessionCount, - sessionCountAndroid, - sessionCountFlutter, - sessionCountIos, - sessionCountReactnative); + return Objects.hash(hour,orgName,publicId,replaySessionCount,sessionCount,sessionCountAndroid,sessionCountFlutter,sessionCountIos,sessionCountReactnative); } @Override @@ -347,22 +313,17 @@ public String toString() { sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append(" replaySessionCount: ").append(toIndentedString(replaySessionCount)).append("\n"); sb.append(" sessionCount: ").append(toIndentedString(sessionCount)).append("\n"); - sb.append(" sessionCountAndroid: ") - .append(toIndentedString(sessionCountAndroid)) - .append("\n"); - sb.append(" sessionCountFlutter: ") - .append(toIndentedString(sessionCountFlutter)) - .append("\n"); + sb.append(" sessionCountAndroid: ").append(toIndentedString(sessionCountAndroid)).append("\n"); + sb.append(" sessionCountFlutter: ").append(toIndentedString(sessionCountFlutter)).append("\n"); sb.append(" sessionCountIos: ").append(toIndentedString(sessionCountIos)).append("\n"); - sb.append(" sessionCountReactnative: ") - .append(toIndentedString(sessionCountReactnative)) - .append("\n"); + sb.append(" sessionCountReactnative: ").append(toIndentedString(sessionCountReactnative)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsResponse.java index d62c66120bc..e7b80c2c10d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageRumSessionsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of RUM Sessions for each hour for a given organization. */ -@JsonPropertyOrder({UsageRumSessionsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of RUM Sessions for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageRumSessionsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageRumSessionsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageRumSessionsResponse usage(List usage) { } return this; } - public UsageRumSessionsResponse addUsageItem(UsageRumSessionsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageRumSessionsResponse addUsageItem(UsageRumSessionsHour usageItem) { } /** - * Get hourly usage for RUM Sessions. - * + *

Get hourly usage for RUM Sessions.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageRumSessionsResponse object is equal to o. */ + /** + * Return true if this UsageRumSessionsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageRumSessionsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsHour.java index abc50beb7f2..3b8915d0fce 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsHour.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * Number of RUM Units used for each hour for a given organization (data available as of November 1, - * 2021). + *

Number of RUM Units used for each hour for a given organization (data available as of November 1, 2021).

*/ @JsonPropertyOrder({ UsageRumUnitsHour.JSON_PROPERTY_BROWSER_RUM_UNITS, @@ -24,10 +40,10 @@ UsageRumUnitsHour.JSON_PROPERTY_PUBLIC_ID, UsageRumUnitsHour.JSON_PROPERTY_RUM_UNITS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageRumUnitsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BROWSER_RUM_UNITS = "browser_rum_units"; private Long browserRumUnits; @@ -49,116 +65,106 @@ public UsageRumUnitsHour browserRumUnits(Long browserRumUnits) { } /** - * The number of browser RUM units. - * + *

The number of browser RUM units.

* @return browserRumUnits - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumUnits() { - return browserRumUnits; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumUnits() { + return browserRumUnits; + } public void setBrowserRumUnits(Long browserRumUnits) { this.browserRumUnits = browserRumUnits; } - public UsageRumUnitsHour mobileRumUnits(Long mobileRumUnits) { this.mobileRumUnits = mobileRumUnits; return this; } /** - * The number of mobile RUM units. - * + *

The number of mobile RUM units.

* @return mobileRumUnits - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumUnits() { - return mobileRumUnits; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumUnits() { + return mobileRumUnits; + } public void setMobileRumUnits(Long mobileRumUnits) { this.mobileRumUnits = mobileRumUnits; } - public UsageRumUnitsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageRumUnitsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageRumUnitsHour rumUnits(Long rumUnits) { this.rumUnits = JsonNullable.of(rumUnits); return this; } /** - * Total RUM units across mobile and browser RUM. - * + *

Total RUM units across mobile and browser RUM.

* @return rumUnits - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getRumUnits() { - return rumUnits.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRumUnits() { + return rumUnits.orElse(null); + } @JsonProperty(JSON_PROPERTY_RUM_UNITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRumUnits_JsonNullable() { return rumUnits; } - - @JsonProperty(JSON_PROPERTY_RUM_UNITS) - public void setRumUnits_JsonNullable(JsonNullable rumUnits) { + @JsonProperty(JSON_PROPERTY_RUM_UNITS)public void setRumUnits_JsonNullable(JsonNullable rumUnits) { this.rumUnits = rumUnits; } - public void setRumUnits(Long rumUnits) { this.rumUnits = JsonNullable.of(rumUnits); } - /** Return true if this UsageRumUnitsHour object is equal to o. */ + /** + * Return true if this UsageRumUnitsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -168,16 +174,13 @@ public boolean equals(Object o) { return false; } UsageRumUnitsHour usageRumUnitsHour = (UsageRumUnitsHour) o; - return Objects.equals(this.browserRumUnits, usageRumUnitsHour.browserRumUnits) - && Objects.equals(this.mobileRumUnits, usageRumUnitsHour.mobileRumUnits) - && Objects.equals(this.orgName, usageRumUnitsHour.orgName) - && Objects.equals(this.publicId, usageRumUnitsHour.publicId) - && Objects.equals(this.rumUnits, usageRumUnitsHour.rumUnits); + return Objects.equals(this.browserRumUnits, usageRumUnitsHour.browserRumUnits) && Objects.equals(this.mobileRumUnits, usageRumUnitsHour.mobileRumUnits) && Objects.equals(this.orgName, usageRumUnitsHour.orgName) && Objects.equals(this.publicId, usageRumUnitsHour.publicId) && Objects.equals(this.rumUnits, usageRumUnitsHour.rumUnits); } + @Override public int hashCode() { - return Objects.hash(browserRumUnits, mobileRumUnits, orgName, publicId, rumUnits); + return Objects.hash(browserRumUnits,mobileRumUnits,orgName,publicId,rumUnits); } @Override @@ -194,7 +197,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsResponse.java index 549cf36b4cd..c09e4b061d5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageRumUnitsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of RUM Units for each hour for a given organization. */ -@JsonPropertyOrder({UsageRumUnitsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of RUM Units for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageRumUnitsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageRumUnitsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageRumUnitsResponse usage(List usage) { } return this; } - public UsageRumUnitsResponse addUsageItem(UsageRumUnitsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageRumUnitsResponse addUsageItem(UsageRumUnitsHour usageItem) { } /** - * Get hourly usage for RUM Units. - * + *

Get hourly usage for RUM Units.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageRumUnitsResponse object is equal to o. */ + /** + * Return true if this UsageRumUnitsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageRumUnitsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSDSHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageSDSHour.java index 37f18f14908..63370377785 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSDSHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSDSHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Sensitive Data Scanner usage for a given organization for a given hour. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Sensitive Data Scanner usage for a given organization for a given hour.

+ */ @JsonPropertyOrder({ UsageSDSHour.JSON_PROPERTY_APM_SCANNED_BYTES, UsageSDSHour.JSON_PROPERTY_EVENTS_SCANNED_BYTES, @@ -26,10 +43,10 @@ UsageSDSHour.JSON_PROPERTY_RUM_SCANNED_BYTES, UsageSDSHour.JSON_PROPERTY_TOTAL_SCANNED_BYTES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSDSHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APM_SCANNED_BYTES = "apm_scanned_bytes"; private Long apmScannedBytes; @@ -37,7 +54,6 @@ public class UsageSDSHour { private Long eventsScannedBytes; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -62,174 +78,156 @@ public UsageSDSHour apmScannedBytes(Long apmScannedBytes) { } /** - * The total number of bytes scanned of APM usage across all usage types by the Sensitive Data - * Scanner from the start of the given hour’s month until the given hour. - * + *

The total number of bytes scanned of APM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.

* @return apmScannedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_SCANNED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmScannedBytes() { - return apmScannedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_SCANNED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmScannedBytes() { + return apmScannedBytes; + } public void setApmScannedBytes(Long apmScannedBytes) { this.apmScannedBytes = apmScannedBytes; } - public UsageSDSHour eventsScannedBytes(Long eventsScannedBytes) { this.eventsScannedBytes = eventsScannedBytes; return this; } /** - * The total number of bytes scanned of Events usage across all usage types by the Sensitive Data - * Scanner from the start of the given hour’s month until the given hour. - * + *

The total number of bytes scanned of Events usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.

* @return eventsScannedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENTS_SCANNED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEventsScannedBytes() { - return eventsScannedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS_SCANNED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEventsScannedBytes() { + return eventsScannedBytes; + } public void setEventsScannedBytes(Long eventsScannedBytes) { this.eventsScannedBytes = eventsScannedBytes; } - public UsageSDSHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageSDSHour logsScannedBytes(Long logsScannedBytes) { this.logsScannedBytes = logsScannedBytes; return this; } /** - * The total number of bytes scanned of logs usage by the Sensitive Data Scanner from the start of - * the given hour’s month until the given hour. - * + *

The total number of bytes scanned of logs usage by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.

* @return logsScannedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_SCANNED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLogsScannedBytes() { - return logsScannedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_SCANNED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsScannedBytes() { + return logsScannedBytes; + } public void setLogsScannedBytes(Long logsScannedBytes) { this.logsScannedBytes = logsScannedBytes; } - public UsageSDSHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageSDSHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageSDSHour rumScannedBytes(Long rumScannedBytes) { this.rumScannedBytes = rumScannedBytes; return this; } /** - * The total number of bytes scanned of RUM usage across all usage types by the Sensitive Data - * Scanner from the start of the given hour’s month until the given hour. - * + *

The total number of bytes scanned of RUM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.

* @return rumScannedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_SCANNED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumScannedBytes() { - return rumScannedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_SCANNED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumScannedBytes() { + return rumScannedBytes; + } public void setRumScannedBytes(Long rumScannedBytes) { this.rumScannedBytes = rumScannedBytes; } - public UsageSDSHour totalScannedBytes(Long totalScannedBytes) { this.totalScannedBytes = totalScannedBytes; return this; } /** - * The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the - * start of the given hour’s month until the given hour. - * + *

The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.

* @return totalScannedBytes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_SCANNED_BYTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalScannedBytes() { - return totalScannedBytes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SCANNED_BYTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalScannedBytes() { + return totalScannedBytes; + } public void setTotalScannedBytes(Long totalScannedBytes) { this.totalScannedBytes = totalScannedBytes; } - /** Return true if this UsageSDSHour object is equal to o. */ + /** + * Return true if this UsageSDSHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -239,27 +237,13 @@ public boolean equals(Object o) { return false; } UsageSDSHour usageSdsHour = (UsageSDSHour) o; - return Objects.equals(this.apmScannedBytes, usageSdsHour.apmScannedBytes) - && Objects.equals(this.eventsScannedBytes, usageSdsHour.eventsScannedBytes) - && Objects.equals(this.hour, usageSdsHour.hour) - && Objects.equals(this.logsScannedBytes, usageSdsHour.logsScannedBytes) - && Objects.equals(this.orgName, usageSdsHour.orgName) - && Objects.equals(this.publicId, usageSdsHour.publicId) - && Objects.equals(this.rumScannedBytes, usageSdsHour.rumScannedBytes) - && Objects.equals(this.totalScannedBytes, usageSdsHour.totalScannedBytes); + return Objects.equals(this.apmScannedBytes, usageSdsHour.apmScannedBytes) && Objects.equals(this.eventsScannedBytes, usageSdsHour.eventsScannedBytes) && Objects.equals(this.hour, usageSdsHour.hour) && Objects.equals(this.logsScannedBytes, usageSdsHour.logsScannedBytes) && Objects.equals(this.orgName, usageSdsHour.orgName) && Objects.equals(this.publicId, usageSdsHour.publicId) && Objects.equals(this.rumScannedBytes, usageSdsHour.rumScannedBytes) && Objects.equals(this.totalScannedBytes, usageSdsHour.totalScannedBytes); } + @Override public int hashCode() { - return Objects.hash( - apmScannedBytes, - eventsScannedBytes, - hour, - logsScannedBytes, - orgName, - publicId, - rumScannedBytes, - totalScannedBytes); + return Objects.hash(apmScannedBytes,eventsScannedBytes,hour,logsScannedBytes,orgName,publicId,rumScannedBytes,totalScannedBytes); } @Override @@ -279,7 +263,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSDSResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSDSResponse.java index 113b3324d07..5934a5393d0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSDSResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSDSResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the Sensitive Data Scanner usage for each hour for a given organization. */ -@JsonPropertyOrder({UsageSDSResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the Sensitive Data Scanner usage for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageSDSResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSDSResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageSDSResponse usage(List usage) { } return this; } - public UsageSDSResponse addUsageItem(UsageSDSHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageSDSResponse addUsageItem(UsageSDSHour usageItem) { } /** - * Get hourly usage for Sensitive Data Scanner. - * + *

Get hourly usage for Sensitive Data Scanner.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageSDSResponse object is equal to o. */ + /** + * Return true if this UsageSDSResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageSdsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSNMPHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageSNMPHour.java index 4bc7b405aad..11fe34bb01a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSNMPHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSNMPHour.java @@ -6,28 +6,44 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The number of SNMP devices for each hour for a given organization. */ + +/** + *

The number of SNMP devices for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageSNMPHour.JSON_PROPERTY_HOUR, UsageSNMPHour.JSON_PROPERTY_ORG_NAME, UsageSNMPHour.JSON_PROPERTY_PUBLIC_ID, UsageSNMPHour.JSON_PROPERTY_SNMP_DEVICES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSNMPHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageSNMPHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageSNMPHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageSNMPHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageSNMPHour snmpDevices(Long snmpDevices) { this.snmpDevices = snmpDevices; return this; } /** - * Contains the number of SNMP devices. - * + *

Contains the number of SNMP devices.

* @return snmpDevices - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNMP_DEVICES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSnmpDevices() { - return snmpDevices; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDevices() { + return snmpDevices; + } public void setSnmpDevices(Long snmpDevices) { this.snmpDevices = snmpDevices; } - /** Return true if this UsageSNMPHour object is equal to o. */ + /** + * Return true if this UsageSNMPHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageSNMPHour usageSnmpHour = (UsageSNMPHour) o; - return Objects.equals(this.hour, usageSnmpHour.hour) - && Objects.equals(this.orgName, usageSnmpHour.orgName) - && Objects.equals(this.publicId, usageSnmpHour.publicId) - && Objects.equals(this.snmpDevices, usageSnmpHour.snmpDevices); + return Objects.equals(this.hour, usageSnmpHour.hour) && Objects.equals(this.orgName, usageSnmpHour.orgName) && Objects.equals(this.publicId, usageSnmpHour.publicId) && Objects.equals(this.snmpDevices, usageSnmpHour.snmpDevices); } + @Override public int hashCode() { - return Objects.hash(hour, orgName, publicId, snmpDevices); + return Objects.hash(hour,orgName,publicId,snmpDevices); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSNMPResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSNMPResponse.java index 39c18e920ca..98777d91df5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSNMPResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSNMPResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of SNMP devices for each hour for a given organization. */ -@JsonPropertyOrder({UsageSNMPResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing the number of SNMP devices for each hour for a given organization.

+ */ +@JsonPropertyOrder({ + UsageSNMPResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSNMPResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageSNMPResponse usage(List usage) { } return this; } - public UsageSNMPResponse addUsageItem(UsageSNMPHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageSNMPResponse addUsageItem(UsageSNMPHour usageItem) { } /** - * Get hourly usage for SNMP devices. - * + *

Get hourly usage for SNMP devices.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageSNMPResponse object is equal to o. */ + /** + * Return true if this UsageSNMPResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageSnmpResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSort.java b/src/main/java/com/datadog/api/client/v1/model/UsageSort.java index 727dc3f5e5a..298bde65a29 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSort.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSort.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The field to sort by. */ +/** + *

The field to sort by.

+ */ @JsonSerialize(using = UsageSort.UsageSortSerializer.class) public class UsageSort { @@ -28,8 +52,7 @@ public class UsageSort { public static final UsageSort START_DATE = new UsageSort("start_date"); public static final UsageSort END_DATE = new UsageSort("end_date"); - private static final Set allowedValues = - new HashSet(Arrays.asList("computed_on", "size", "start_date", "end_date")); + private static final Set allowedValues = new HashSet(Arrays.asList("computed_on", "size", "start_date", "end_date")); private String value; @@ -42,19 +65,18 @@ public boolean isValid() { } public static class UsageSortSerializer extends StdSerializer { - public UsageSortSerializer(Class t) { - super(t); - } - - public UsageSortSerializer() { - this(null); - } - - @Override - public void serialize(UsageSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsageSortSerializer(Class t) { + super(t); + } + + public UsageSortSerializer() { + this(null); + } + + @Override + public void serialize(UsageSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageSort object is equal to o. */ + /** + * Return true if this UsageSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSortDirection.java b/src/main/java/com/datadog/api/client/v1/model/UsageSortDirection.java index 9f01d9cec2b..b14f0220f74 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSortDirection.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSortDirection.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The direction to sort by. */ +/** + *

The direction to sort by.

+ */ @JsonSerialize(using = UsageSortDirection.UsageSortDirectionSerializer.class) public class UsageSortDirection { public static final UsageSortDirection DESC = new UsageSortDirection("desc"); public static final UsageSortDirection ASC = new UsageSortDirection("asc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("desc", "asc")); + private static final Set allowedValues = new HashSet(Arrays.asList("desc", "asc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class UsageSortDirectionSerializer extends StdSerializer { - public UsageSortDirectionSerializer(Class t) { - super(t); - } - - public UsageSortDirectionSerializer() { - this(null); - } - - @Override - public void serialize(UsageSortDirection value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsageSortDirectionSerializer(Class t) { + super(t); + } + + public UsageSortDirectionSerializer() { + this(null); + } + + @Override + public void serialize(UsageSortDirection value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageSortDirection object is equal to o. */ + /** + * Return true if this UsageSortDirection object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsAttributes.java b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsAttributes.java index e64bad18894..8a48920b617 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsAttributes.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response containing attributes for specified custom reports. */ + +/** + *

The response containing attributes for specified custom reports.

+ */ @JsonPropertyOrder({ UsageSpecifiedCustomReportsAttributes.JSON_PROPERTY_COMPUTED_ON, UsageSpecifiedCustomReportsAttributes.JSON_PROPERTY_END_DATE, @@ -23,10 +41,10 @@ UsageSpecifiedCustomReportsAttributes.JSON_PROPERTY_START_DATE, UsageSpecifiedCustomReportsAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSpecifiedCustomReportsAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTED_ON = "computed_on"; private String computedOn; @@ -51,110 +69,99 @@ public UsageSpecifiedCustomReportsAttributes computedOn(String computedOn) { } /** - * The date the specified custom report was computed. - * + *

The date the specified custom report was computed.

* @return computedOn - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTED_ON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getComputedOn() { - return computedOn; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTED_ON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getComputedOn() { + return computedOn; + } public void setComputedOn(String computedOn) { this.computedOn = computedOn; } - public UsageSpecifiedCustomReportsAttributes endDate(String endDate) { this.endDate = endDate; return this; } /** - * The ending date of specified custom report. - * + *

The ending date of specified custom report.

* @return endDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEndDate() { - return endDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEndDate() { + return endDate; + } public void setEndDate(String endDate) { this.endDate = endDate; } - public UsageSpecifiedCustomReportsAttributes location(String location) { this.location = location; return this; } /** - * A downloadable file for the specified custom reporting file. - * + *

A downloadable file for the specified custom reporting file.

* @return location - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLocation() { - return location; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLocation() { + return location; + } public void setLocation(String location) { this.location = location; } - public UsageSpecifiedCustomReportsAttributes size(Long size) { this.size = size; return this; } /** - * size - * + *

size

* @return size - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSize() { - return size; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } public void setSize(Long size) { this.size = size; } - public UsageSpecifiedCustomReportsAttributes startDate(String startDate) { this.startDate = startDate; return this; } /** - * The starting date of specified custom report. - * + *

The starting date of specified custom report.

* @return startDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStartDate() { - return startDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStartDate() { + return startDate; + } public void setStartDate(String startDate) { this.startDate = startDate; } - public UsageSpecifiedCustomReportsAttributes tags(List tags) { this.tags = tags; return this; } - public UsageSpecifiedCustomReportsAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -164,22 +171,23 @@ public UsageSpecifiedCustomReportsAttributes addTagsItem(String tagsItem) { } /** - * A list of tags to apply to specified custom reports. - * + *

A list of tags to apply to specified custom reports.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this UsageSpecifiedCustomReportsAttributes object is equal to o. */ + /** + * Return true if this UsageSpecifiedCustomReportsAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -188,19 +196,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageSpecifiedCustomReportsAttributes usageSpecifiedCustomReportsAttributes = - (UsageSpecifiedCustomReportsAttributes) o; - return Objects.equals(this.computedOn, usageSpecifiedCustomReportsAttributes.computedOn) - && Objects.equals(this.endDate, usageSpecifiedCustomReportsAttributes.endDate) - && Objects.equals(this.location, usageSpecifiedCustomReportsAttributes.location) - && Objects.equals(this.size, usageSpecifiedCustomReportsAttributes.size) - && Objects.equals(this.startDate, usageSpecifiedCustomReportsAttributes.startDate) - && Objects.equals(this.tags, usageSpecifiedCustomReportsAttributes.tags); + UsageSpecifiedCustomReportsAttributes usageSpecifiedCustomReportsAttributes = (UsageSpecifiedCustomReportsAttributes) o; + return Objects.equals(this.computedOn, usageSpecifiedCustomReportsAttributes.computedOn) && Objects.equals(this.endDate, usageSpecifiedCustomReportsAttributes.endDate) && Objects.equals(this.location, usageSpecifiedCustomReportsAttributes.location) && Objects.equals(this.size, usageSpecifiedCustomReportsAttributes.size) && Objects.equals(this.startDate, usageSpecifiedCustomReportsAttributes.startDate) && Objects.equals(this.tags, usageSpecifiedCustomReportsAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(computedOn, endDate, location, size, startDate, tags); + return Objects.hash(computedOn,endDate,location,size,startDate,tags); } @Override @@ -218,7 +221,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsData.java b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsData.java index a15dae0f27b..7261ac665eb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsData.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response containing date and type for specified custom reports. */ + +/** + *

Response containing date and type for specified custom reports.

+ */ @JsonPropertyOrder({ UsageSpecifiedCustomReportsData.JSON_PROPERTY_ATTRIBUTES, UsageSpecifiedCustomReportsData.JSON_PROPERTY_ID, UsageSpecifiedCustomReportsData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSpecifiedCustomReportsData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UsageSpecifiedCustomReportsAttributes attributes; @@ -31,50 +51,45 @@ public class UsageSpecifiedCustomReportsData { public static final String JSON_PROPERTY_TYPE = "type"; private UsageReportsType type = UsageReportsType.REPORTS; - public UsageSpecifiedCustomReportsData attributes( - UsageSpecifiedCustomReportsAttributes attributes) { + public UsageSpecifiedCustomReportsData attributes(UsageSpecifiedCustomReportsAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * The response containing attributes for specified custom reports. - * + *

The response containing attributes for specified custom reports.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageSpecifiedCustomReportsAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageSpecifiedCustomReportsAttributes getAttributes() { + return attributes; + } public void setAttributes(UsageSpecifiedCustomReportsAttributes attributes) { this.attributes = attributes; } - public UsageSpecifiedCustomReportsData id(String id) { this.id = id; return this; } /** - * The date for specified custom reports. - * + *

The date for specified custom reports.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public UsageSpecifiedCustomReportsData type(UsageReportsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -82,25 +97,26 @@ public UsageSpecifiedCustomReportsData type(UsageReportsType type) { } /** - * The type of reports. - * + *

The type of reports.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageReportsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageReportsType getType() { + return type; + } public void setType(UsageReportsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UsageSpecifiedCustomReportsData object is equal to o. */ + /** + * Return true if this UsageSpecifiedCustomReportsData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,16 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageSpecifiedCustomReportsData usageSpecifiedCustomReportsData = - (UsageSpecifiedCustomReportsData) o; - return Objects.equals(this.attributes, usageSpecifiedCustomReportsData.attributes) - && Objects.equals(this.id, usageSpecifiedCustomReportsData.id) - && Objects.equals(this.type, usageSpecifiedCustomReportsData.type); + UsageSpecifiedCustomReportsData usageSpecifiedCustomReportsData = (UsageSpecifiedCustomReportsData) o; + return Objects.equals(this.attributes, usageSpecifiedCustomReportsData.attributes) && Objects.equals(this.id, usageSpecifiedCustomReportsData.id) && Objects.equals(this.type, usageSpecifiedCustomReportsData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -133,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsMeta.java b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsMeta.java index 35ce4c63636..6d751706ebf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsMeta.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing document metadata. */ -@JsonPropertyOrder({UsageSpecifiedCustomReportsMeta.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing document metadata.

+ */ +@JsonPropertyOrder({ + UsageSpecifiedCustomReportsMeta.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSpecifiedCustomReportsMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private UsageSpecifiedCustomReportsPage page; @@ -28,22 +50,23 @@ public UsageSpecifiedCustomReportsMeta page(UsageSpecifiedCustomReportsPage page } /** - * The object containing page total count for specified ID. - * + *

The object containing page total count for specified ID.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageSpecifiedCustomReportsPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageSpecifiedCustomReportsPage getPage() { + return page; + } public void setPage(UsageSpecifiedCustomReportsPage page) { this.page = page; } - /** Return true if this UsageSpecifiedCustomReportsMeta object is equal to o. */ + /** + * Return true if this UsageSpecifiedCustomReportsMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageSpecifiedCustomReportsMeta usageSpecifiedCustomReportsMeta = - (UsageSpecifiedCustomReportsMeta) o; + UsageSpecifiedCustomReportsMeta usageSpecifiedCustomReportsMeta = (UsageSpecifiedCustomReportsMeta) o; return Objects.equals(this.page, usageSpecifiedCustomReportsMeta.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsPage.java b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsPage.java index b9ff7825b29..1636e020d27 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsPage.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsPage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing page total count for specified ID. */ -@JsonPropertyOrder({UsageSpecifiedCustomReportsPage.JSON_PROPERTY_TOTAL_COUNT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing page total count for specified ID.

+ */ +@JsonPropertyOrder({ + UsageSpecifiedCustomReportsPage.JSON_PROPERTY_TOTAL_COUNT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSpecifiedCustomReportsPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; @@ -27,22 +49,23 @@ public UsageSpecifiedCustomReportsPage totalCount(Long totalCount) { } /** - * Total page count. - * + *

Total page count.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } - /** Return true if this UsageSpecifiedCustomReportsPage object is equal to o. */ + /** + * Return true if this UsageSpecifiedCustomReportsPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageSpecifiedCustomReportsPage usageSpecifiedCustomReportsPage = - (UsageSpecifiedCustomReportsPage) o; + UsageSpecifiedCustomReportsPage usageSpecifiedCustomReportsPage = (UsageSpecifiedCustomReportsPage) o; return Objects.equals(this.totalCount, usageSpecifiedCustomReportsPage.totalCount); } + @Override public int hashCode() { return Objects.hash(totalCount); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsResponse.java index e346d409f30..6090c2d0254 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSpecifiedCustomReportsResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Returns available specified custom reports. */ + +/** + *

Returns available specified custom reports.

+ */ @JsonPropertyOrder({ UsageSpecifiedCustomReportsResponse.JSON_PROPERTY_DATA, UsageSpecifiedCustomReportsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSpecifiedCustomReportsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private UsageSpecifiedCustomReportsData data; @@ -34,21 +54,19 @@ public UsageSpecifiedCustomReportsResponse data(UsageSpecifiedCustomReportsData } /** - * Response containing date and type for specified custom reports. - * + *

Response containing date and type for specified custom reports.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageSpecifiedCustomReportsData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageSpecifiedCustomReportsData getData() { + return data; + } public void setData(UsageSpecifiedCustomReportsData data) { this.data = data; } - public UsageSpecifiedCustomReportsResponse meta(UsageSpecifiedCustomReportsMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -56,22 +74,23 @@ public UsageSpecifiedCustomReportsResponse meta(UsageSpecifiedCustomReportsMeta } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageSpecifiedCustomReportsMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageSpecifiedCustomReportsMeta getMeta() { + return meta; + } public void setMeta(UsageSpecifiedCustomReportsMeta meta) { this.meta = meta; } - /** Return true if this UsageSpecifiedCustomReportsResponse object is equal to o. */ + /** + * Return true if this UsageSpecifiedCustomReportsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageSpecifiedCustomReportsResponse usageSpecifiedCustomReportsResponse = - (UsageSpecifiedCustomReportsResponse) o; - return Objects.equals(this.data, usageSpecifiedCustomReportsResponse.data) - && Objects.equals(this.meta, usageSpecifiedCustomReportsResponse.meta); + UsageSpecifiedCustomReportsResponse usageSpecifiedCustomReportsResponse = (UsageSpecifiedCustomReportsResponse) o; + return Objects.equals(this.data, usageSpecifiedCustomReportsResponse.data) && Objects.equals(this.meta, usageSpecifiedCustomReportsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDate.java b/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDate.java index 4c2a2ed94a4..a52ab007727 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDate.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDate.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with hourly report of all data billed by Datadog all organizations. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with hourly report of all data billed by Datadog all organizations.

+ */ @JsonPropertyOrder({ UsageSummaryDate.JSON_PROPERTY_AGENT_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P, @@ -96,15 +111,14 @@ UsageSummaryDate.JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM, UsageSummaryDate.JSON_PROPERTY_VSPHERE_HOST_TOP99P }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSummaryDate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGENT_HOST_TOP99P = "agent_host_top99p"; private Long agentHostTop99p; - public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P = - "apm_azure_app_service_host_top99p"; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P = "apm_azure_app_service_host_top99p"; private Long apmAzureAppServiceHostTop99p; public static final String JSON_PROPERTY_APM_FARGATE_COUNT_AVG = "apm_fargate_count_avg"; @@ -116,12 +130,10 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG = "appsec_fargate_count_avg"; private Long appsecFargateCountAvg; - public static final String JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM = - "audit_logs_lines_indexed_sum"; + public static final String JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM = "audit_logs_lines_indexed_sum"; private Long auditLogsLinesIndexedSum; - public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = - "avg_profiled_fargate_tasks"; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = "avg_profiled_fargate_tasks"; private Long avgProfiledFargateTasks; public static final String JSON_PROPERTY_AWS_HOST_TOP99P = "aws_host_top99p"; @@ -130,45 +142,37 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT = "aws_lambda_func_count"; private Long awsLambdaFuncCount; - public static final String JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM = - "aws_lambda_invocations_sum"; + public static final String JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM = "aws_lambda_invocations_sum"; private Long awsLambdaInvocationsSum; public static final String JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P = "azure_app_service_top99p"; private Long azureAppServiceTop99p; - public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM = - "billable_ingested_bytes_sum"; + public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM = "billable_ingested_bytes_sum"; private Long billableIngestedBytesSum; - public static final String JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM = - "browser_rum_lite_session_count_sum"; + public static final String JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM = "browser_rum_lite_session_count_sum"; private Long browserRumLiteSessionCountSum; - public static final String JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM = - "browser_rum_replay_session_count_sum"; + public static final String JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM = "browser_rum_replay_session_count_sum"; private Long browserRumReplaySessionCountSum; public static final String JSON_PROPERTY_BROWSER_RUM_UNITS_SUM = "browser_rum_units_sum"; private Long browserRumUnitsSum; - public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM = - "ci_pipeline_indexed_spans_sum"; + public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM = "ci_pipeline_indexed_spans_sum"; private Long ciPipelineIndexedSpansSum; public static final String JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM = "ci_test_indexed_spans_sum"; private Long ciTestIndexedSpansSum; - public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM = - "ci_visibility_pipeline_committers_hwm"; + public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM = "ci_visibility_pipeline_committers_hwm"; private Long ciVisibilityPipelineCommittersHwm; - public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM = - "ci_visibility_test_committers_hwm"; + public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM = "ci_visibility_test_committers_hwm"; private Long ciVisibilityTestCommittersHwm; - public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG = - "cloud_cost_management_host_count_avg"; + public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG = "cloud_cost_management_host_count_avg"; private Long cloudCostManagementHostCountAvg; public static final String JSON_PROPERTY_CONTAINER_AVG = "container_avg"; @@ -211,7 +215,6 @@ public class UsageSummaryDate { private Long cwsHostTop99p; public static final String JSON_PROPERTY_DATE = "date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime date; @@ -233,8 +236,7 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_HEROKU_HOST_TOP99P = "heroku_host_top99p"; private Long herokuHostTop99p; - public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM = - "incident_management_monthly_active_users_hwm"; + public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM = "incident_management_monthly_active_users_hwm"; private Long incidentManagementMonthlyActiveUsersHwm; public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM = "indexed_events_count_sum"; @@ -252,50 +254,40 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P = "iot_device_top99p"; private Long iotDeviceTop99p; - public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM = - "mobile_rum_lite_session_count_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM = "mobile_rum_lite_session_count_sum"; private Long mobileRumLiteSessionCountSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM = - "mobile_rum_session_count_android_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM = "mobile_rum_session_count_android_sum"; private Long mobileRumSessionCountAndroidSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM = - "mobile_rum_session_count_flutter_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM = "mobile_rum_session_count_flutter_sum"; private Long mobileRumSessionCountFlutterSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM = - "mobile_rum_session_count_ios_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM = "mobile_rum_session_count_ios_sum"; private Long mobileRumSessionCountIosSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM = - "mobile_rum_session_count_reactnative_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM = "mobile_rum_session_count_reactnative_sum"; private Long mobileRumSessionCountReactnativeSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM = - "mobile_rum_session_count_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM = "mobile_rum_session_count_sum"; private Long mobileRumSessionCountSum; public static final String JSON_PROPERTY_MOBILE_RUM_UNITS_SUM = "mobile_rum_units_sum"; private Long mobileRumUnitsSum; - public static final String JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM = - "netflow_indexed_events_count_sum"; + public static final String JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM = "netflow_indexed_events_count_sum"; private Long netflowIndexedEventsCountSum; public static final String JSON_PROPERTY_NPM_HOST_TOP99P = "npm_host_top99p"; private Long npmHostTop99p; - public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM = - "observability_pipelines_bytes_processed_sum"; + public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM = "observability_pipelines_bytes_processed_sum"; private Long observabilityPipelinesBytesProcessedSum; - public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM = - "online_archive_events_count_sum"; + public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM = "online_archive_events_count_sum"; private Long onlineArchiveEventsCountSum; - public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P = - "opentelemetry_apm_host_top99p"; + public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P = "opentelemetry_apm_host_top99p"; private Long opentelemetryApmHostTop99p; public static final String JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P = "opentelemetry_host_top99p"; @@ -307,15 +299,13 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_PROFILING_HOST_TOP99P = "profiling_host_top99p"; private Long profilingHostTop99p; - public static final String JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT = - "rum_browser_and_mobile_session_count"; + public static final String JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT = "rum_browser_and_mobile_session_count"; private Long rumBrowserAndMobileSessionCount; public static final String JSON_PROPERTY_RUM_SESSION_COUNT_SUM = "rum_session_count_sum"; private Long rumSessionCountSum; - public static final String JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM = - "rum_total_session_count_sum"; + public static final String JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM = "rum_total_session_count_sum"; private Long rumTotalSessionCountSum; public static final String JSON_PROPERTY_RUM_UNITS_SUM = "rum_units_sum"; @@ -324,39 +314,31 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM = "sds_apm_scanned_bytes_sum"; private Long sdsApmScannedBytesSum; - public static final String JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM = - "sds_events_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM = "sds_events_scanned_bytes_sum"; private Long sdsEventsScannedBytesSum; - public static final String JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM = - "sds_logs_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM = "sds_logs_scanned_bytes_sum"; private Long sdsLogsScannedBytesSum; public static final String JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM = "sds_rum_scanned_bytes_sum"; private Long sdsRumScannedBytesSum; - public static final String JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM = - "sds_total_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM = "sds_total_scanned_bytes_sum"; private Long sdsTotalScannedBytesSum; - public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM = - "synthetics_browser_check_calls_count_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM = "synthetics_browser_check_calls_count_sum"; private Long syntheticsBrowserCheckCallsCountSum; - public static final String JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM = - "synthetics_check_calls_count_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM = "synthetics_check_calls_count_sum"; private Long syntheticsCheckCallsCountSum; - public static final String JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM = - "synthetics_parallel_testing_max_slots_hwm"; + public static final String JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM = "synthetics_parallel_testing_max_slots_hwm"; private Long syntheticsParallelTestingMaxSlotsHwm; - public static final String JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM = - "trace_search_indexed_events_count_sum"; + public static final String JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM = "trace_search_indexed_events_count_sum"; private Long traceSearchIndexedEventsCountSum; - public static final String JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM = - "twol_ingested_events_bytes_sum"; + public static final String JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM = "twol_ingested_events_bytes_sum"; private Long twolIngestedEventsBytesSum; public static final String JSON_PROPERTY_VSPHERE_HOST_TOP99P = "vsphere_host_top99p"; @@ -368,1298 +350,1121 @@ public UsageSummaryDate agentHostTop99p(Long agentHostTop99p) { } /** - * Shows the 99th percentile of all agent hosts over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations.

* @return agentHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAgentHostTop99p() { - return agentHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAgentHostTop99p() { + return agentHostTop99p; + } public void setAgentHostTop99p(Long agentHostTop99p) { this.agentHostTop99p = agentHostTop99p; } - public UsageSummaryDate apmAzureAppServiceHostTop99p(Long apmAzureAppServiceHostTop99p) { this.apmAzureAppServiceHostTop99p = apmAzureAppServiceHostTop99p; return this; } /** - * Shows the 99th percentile of all Azure app services using APM over all hours in the current - * date all organizations. - * + *

Shows the 99th percentile of all Azure app services using APM over all hours in the current date all organizations.

* @return apmAzureAppServiceHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmAzureAppServiceHostTop99p() { - return apmAzureAppServiceHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmAzureAppServiceHostTop99p() { + return apmAzureAppServiceHostTop99p; + } public void setApmAzureAppServiceHostTop99p(Long apmAzureAppServiceHostTop99p) { this.apmAzureAppServiceHostTop99p = apmAzureAppServiceHostTop99p; } - public UsageSummaryDate apmFargateCountAvg(Long apmFargateCountAvg) { this.apmFargateCountAvg = apmFargateCountAvg; return this; } /** - * Shows the average of all APM ECS Fargate tasks over all hours in the current date for all - * organizations. - * + *

Shows the average of all APM ECS Fargate tasks over all hours in the current date for all organizations.

* @return apmFargateCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmFargateCountAvg() { - return apmFargateCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmFargateCountAvg() { + return apmFargateCountAvg; + } public void setApmFargateCountAvg(Long apmFargateCountAvg) { this.apmFargateCountAvg = apmFargateCountAvg; } - public UsageSummaryDate apmHostTop99p(Long apmHostTop99p) { this.apmHostTop99p = apmHostTop99p; return this; } /** - * Shows the 99th percentile of all distinct APM hosts over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all distinct APM hosts over all hours in the current date for all organizations.

* @return apmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmHostTop99p() { - return apmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmHostTop99p() { + return apmHostTop99p; + } public void setApmHostTop99p(Long apmHostTop99p) { this.apmHostTop99p = apmHostTop99p; } - public UsageSummaryDate appsecFargateCountAvg(Long appsecFargateCountAvg) { this.appsecFargateCountAvg = appsecFargateCountAvg; return this; } /** - * Shows the average of all Application Security Monitoring ECS Fargate tasks over all hours in - * the current date for all organizations. - * + *

Shows the average of all Application Security Monitoring ECS Fargate tasks over all hours in the current date for all organizations.

* @return appsecFargateCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAppsecFargateCountAvg() { - return appsecFargateCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAppsecFargateCountAvg() { + return appsecFargateCountAvg; + } public void setAppsecFargateCountAvg(Long appsecFargateCountAvg) { this.appsecFargateCountAvg = appsecFargateCountAvg; } - public UsageSummaryDate auditLogsLinesIndexedSum(Long auditLogsLinesIndexedSum) { this.auditLogsLinesIndexedSum = auditLogsLinesIndexedSum; return this; } /** - * Shows the sum of audit logs lines indexed over all hours in the current date for all - * organizations. - * + *

Shows the sum of audit logs lines indexed over all hours in the current date for all organizations.

* @return auditLogsLinesIndexedSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAuditLogsLinesIndexedSum() { - return auditLogsLinesIndexedSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAuditLogsLinesIndexedSum() { + return auditLogsLinesIndexedSum; + } public void setAuditLogsLinesIndexedSum(Long auditLogsLinesIndexedSum) { this.auditLogsLinesIndexedSum = auditLogsLinesIndexedSum; } - public UsageSummaryDate avgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; return this; } /** - * The average profiled task count for Fargate Profiling. - * + *

The average profiled task count for Fargate Profiling.

* @return avgProfiledFargateTasks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAvgProfiledFargateTasks() { - return avgProfiledFargateTasks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAvgProfiledFargateTasks() { + return avgProfiledFargateTasks; + } public void setAvgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; } - public UsageSummaryDate awsHostTop99p(Long awsHostTop99p) { this.awsHostTop99p = awsHostTop99p; return this; } /** - * Shows the 99th percentile of all AWS hosts over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all AWS hosts over all hours in the current date for all organizations.

* @return awsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsHostTop99p() { - return awsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsHostTop99p() { + return awsHostTop99p; + } public void setAwsHostTop99p(Long awsHostTop99p) { this.awsHostTop99p = awsHostTop99p; } - public UsageSummaryDate awsLambdaFuncCount(Long awsLambdaFuncCount) { this.awsLambdaFuncCount = awsLambdaFuncCount; return this; } /** - * Shows the average of the number of functions that executed 1 or more times each hour in the - * current date for all organizations. - * + *

Shows the average of the number of functions that executed 1 or more times each hour in the current date for all organizations.

* @return awsLambdaFuncCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsLambdaFuncCount() { - return awsLambdaFuncCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsLambdaFuncCount() { + return awsLambdaFuncCount; + } public void setAwsLambdaFuncCount(Long awsLambdaFuncCount) { this.awsLambdaFuncCount = awsLambdaFuncCount; } - public UsageSummaryDate awsLambdaInvocationsSum(Long awsLambdaInvocationsSum) { this.awsLambdaInvocationsSum = awsLambdaInvocationsSum; return this; } /** - * Shows the sum of all AWS Lambda invocations over all hours in the current date for all - * organizations. - * + *

Shows the sum of all AWS Lambda invocations over all hours in the current date for all organizations.

* @return awsLambdaInvocationsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsLambdaInvocationsSum() { - return awsLambdaInvocationsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsLambdaInvocationsSum() { + return awsLambdaInvocationsSum; + } public void setAwsLambdaInvocationsSum(Long awsLambdaInvocationsSum) { this.awsLambdaInvocationsSum = awsLambdaInvocationsSum; } - public UsageSummaryDate azureAppServiceTop99p(Long azureAppServiceTop99p) { this.azureAppServiceTop99p = azureAppServiceTop99p; return this; } /** - * Shows the 99th percentile of all Azure app services over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all Azure app services over all hours in the current date for all organizations.

* @return azureAppServiceTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAzureAppServiceTop99p() { - return azureAppServiceTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAzureAppServiceTop99p() { + return azureAppServiceTop99p; + } public void setAzureAppServiceTop99p(Long azureAppServiceTop99p) { this.azureAppServiceTop99p = azureAppServiceTop99p; } - public UsageSummaryDate billableIngestedBytesSum(Long billableIngestedBytesSum) { this.billableIngestedBytesSum = billableIngestedBytesSum; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current date for all - * organizations. - * + *

Shows the sum of all log bytes ingested over all hours in the current date for all organizations.

* @return billableIngestedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBillableIngestedBytesSum() { - return billableIngestedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBillableIngestedBytesSum() { + return billableIngestedBytesSum; + } public void setBillableIngestedBytesSum(Long billableIngestedBytesSum) { this.billableIngestedBytesSum = billableIngestedBytesSum; } - public UsageSummaryDate browserRumLiteSessionCountSum(Long browserRumLiteSessionCountSum) { this.browserRumLiteSessionCountSum = browserRumLiteSessionCountSum; return this; } /** - * Shows the sum of all browser lite sessions over all hours in the current date for all - * organizations. - * + *

Shows the sum of all browser lite sessions over all hours in the current date for all organizations.

* @return browserRumLiteSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumLiteSessionCountSum() { - return browserRumLiteSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumLiteSessionCountSum() { + return browserRumLiteSessionCountSum; + } public void setBrowserRumLiteSessionCountSum(Long browserRumLiteSessionCountSum) { this.browserRumLiteSessionCountSum = browserRumLiteSessionCountSum; } - public UsageSummaryDate browserRumReplaySessionCountSum(Long browserRumReplaySessionCountSum) { this.browserRumReplaySessionCountSum = browserRumReplaySessionCountSum; return this; } /** - * Shows the sum of all browser replay sessions over all hours in the current date for all - * organizations. - * + *

Shows the sum of all browser replay sessions over all hours in the current date for all organizations.

* @return browserRumReplaySessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumReplaySessionCountSum() { - return browserRumReplaySessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumReplaySessionCountSum() { + return browserRumReplaySessionCountSum; + } public void setBrowserRumReplaySessionCountSum(Long browserRumReplaySessionCountSum) { this.browserRumReplaySessionCountSum = browserRumReplaySessionCountSum; } - public UsageSummaryDate browserRumUnitsSum(Long browserRumUnitsSum) { this.browserRumUnitsSum = browserRumUnitsSum; return this; } /** - * Shows the sum of all browser RUM units over all hours in the current date for all - * organizations. - * + *

Shows the sum of all browser RUM units over all hours in the current date for all organizations.

* @return browserRumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumUnitsSum() { - return browserRumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumUnitsSum() { + return browserRumUnitsSum; + } public void setBrowserRumUnitsSum(Long browserRumUnitsSum) { this.browserRumUnitsSum = browserRumUnitsSum; } - public UsageSummaryDate ciPipelineIndexedSpansSum(Long ciPipelineIndexedSpansSum) { this.ciPipelineIndexedSpansSum = ciPipelineIndexedSpansSum; return this; } /** - * Shows the sum of all CI pipeline indexed spans over all hours in the current month for all - * organizations. - * + *

Shows the sum of all CI pipeline indexed spans over all hours in the current month for all organizations.

* @return ciPipelineIndexedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiPipelineIndexedSpansSum() { - return ciPipelineIndexedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiPipelineIndexedSpansSum() { + return ciPipelineIndexedSpansSum; + } public void setCiPipelineIndexedSpansSum(Long ciPipelineIndexedSpansSum) { this.ciPipelineIndexedSpansSum = ciPipelineIndexedSpansSum; } - public UsageSummaryDate ciTestIndexedSpansSum(Long ciTestIndexedSpansSum) { this.ciTestIndexedSpansSum = ciTestIndexedSpansSum; return this; } /** - * Shows the sum of all CI test indexed spans over all hours in the current month for all - * organizations. - * + *

Shows the sum of all CI test indexed spans over all hours in the current month for all organizations.

* @return ciTestIndexedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiTestIndexedSpansSum() { - return ciTestIndexedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiTestIndexedSpansSum() { + return ciTestIndexedSpansSum; + } public void setCiTestIndexedSpansSum(Long ciTestIndexedSpansSum) { this.ciTestIndexedSpansSum = ciTestIndexedSpansSum; } - - public UsageSummaryDate ciVisibilityPipelineCommittersHwm( - Long ciVisibilityPipelineCommittersHwm) { + public UsageSummaryDate ciVisibilityPipelineCommittersHwm(Long ciVisibilityPipelineCommittersHwm) { this.ciVisibilityPipelineCommittersHwm = ciVisibilityPipelineCommittersHwm; return this; } /** - * Shows the high-water mark of all CI visibility pipeline committers over all hours in the - * current month for all organizations. - * + *

Shows the high-water mark of all CI visibility pipeline committers over all hours in the current month for all organizations.

* @return ciVisibilityPipelineCommittersHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityPipelineCommittersHwm() { - return ciVisibilityPipelineCommittersHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityPipelineCommittersHwm() { + return ciVisibilityPipelineCommittersHwm; + } public void setCiVisibilityPipelineCommittersHwm(Long ciVisibilityPipelineCommittersHwm) { this.ciVisibilityPipelineCommittersHwm = ciVisibilityPipelineCommittersHwm; } - public UsageSummaryDate ciVisibilityTestCommittersHwm(Long ciVisibilityTestCommittersHwm) { this.ciVisibilityTestCommittersHwm = ciVisibilityTestCommittersHwm; return this; } /** - * Shows the high-water mark of all CI visibility test committers over all hours in the current - * month for all organizations. - * + *

Shows the high-water mark of all CI visibility test committers over all hours in the current month for all organizations.

* @return ciVisibilityTestCommittersHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityTestCommittersHwm() { - return ciVisibilityTestCommittersHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityTestCommittersHwm() { + return ciVisibilityTestCommittersHwm; + } public void setCiVisibilityTestCommittersHwm(Long ciVisibilityTestCommittersHwm) { this.ciVisibilityTestCommittersHwm = ciVisibilityTestCommittersHwm; } - public UsageSummaryDate cloudCostManagementHostCountAvg(Long cloudCostManagementHostCountAvg) { this.cloudCostManagementHostCountAvg = cloudCostManagementHostCountAvg; return this; } /** - * Host count average of Cloud Cost Management for the given date and given organization. - * + *

Host count average of Cloud Cost Management for the given date and given organization.

* @return cloudCostManagementHostCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCloudCostManagementHostCountAvg() { - return cloudCostManagementHostCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCloudCostManagementHostCountAvg() { + return cloudCostManagementHostCountAvg; + } public void setCloudCostManagementHostCountAvg(Long cloudCostManagementHostCountAvg) { this.cloudCostManagementHostCountAvg = cloudCostManagementHostCountAvg; } - public UsageSummaryDate containerAvg(Long containerAvg) { this.containerAvg = containerAvg; return this; } /** - * Shows the average of all distinct containers over all hours in the current date for all - * organizations. - * + *

Shows the average of all distinct containers over all hours in the current date for all organizations.

* @return containerAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerAvg() { - return containerAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerAvg() { + return containerAvg; + } public void setContainerAvg(Long containerAvg) { this.containerAvg = containerAvg; } - public UsageSummaryDate containerExclAgentAvg(Long containerExclAgentAvg) { this.containerExclAgentAvg = containerExclAgentAvg; return this; } /** - * Shows the average of containers without the Datadog Agent over all hours in the current date - * for all organizations. - * + *

Shows the average of containers without the Datadog Agent over all hours in the current date for all organizations.

* @return containerExclAgentAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerExclAgentAvg() { - return containerExclAgentAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerExclAgentAvg() { + return containerExclAgentAvg; + } public void setContainerExclAgentAvg(Long containerExclAgentAvg) { this.containerExclAgentAvg = containerExclAgentAvg; } - public UsageSummaryDate containerHwm(Long containerHwm) { this.containerHwm = containerHwm; return this; } /** - * Shows the high-water mark of all distinct containers over all hours in the current date for all - * organizations. - * + *

Shows the high-water mark of all distinct containers over all hours in the current date for all organizations.

* @return containerHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerHwm() { - return containerHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerHwm() { + return containerHwm; + } public void setContainerHwm(Long containerHwm) { this.containerHwm = containerHwm; } - public UsageSummaryDate cspmAasHostTop99p(Long cspmAasHostTop99p) { this.cspmAasHostTop99p = cspmAasHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts - * over all hours in the current date for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current date for all organizations.

* @return cspmAasHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AAS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAasHostTop99p() { - return cspmAasHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AAS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAasHostTop99p() { + return cspmAasHostTop99p; + } public void setCspmAasHostTop99p(Long cspmAasHostTop99p) { this.cspmAasHostTop99p = cspmAasHostTop99p; } - public UsageSummaryDate cspmAwsHostTop99p(Long cspmAwsHostTop99p) { this.cspmAwsHostTop99p = cspmAwsHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management AWS hosts over all hours in - * the current date for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management AWS hosts over all hours in the current date for all organizations.

* @return cspmAwsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAwsHostTop99p() { - return cspmAwsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAwsHostTop99p() { + return cspmAwsHostTop99p; + } public void setCspmAwsHostTop99p(Long cspmAwsHostTop99p) { this.cspmAwsHostTop99p = cspmAwsHostTop99p; } - public UsageSummaryDate cspmAzureHostTop99p(Long cspmAzureHostTop99p) { this.cspmAzureHostTop99p = cspmAzureHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours - * in the current date for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current date for all organizations.

* @return cspmAzureHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAzureHostTop99p() { - return cspmAzureHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAzureHostTop99p() { + return cspmAzureHostTop99p; + } public void setCspmAzureHostTop99p(Long cspmAzureHostTop99p) { this.cspmAzureHostTop99p = cspmAzureHostTop99p; } - public UsageSummaryDate cspmContainerAvg(Long cspmContainerAvg) { this.cspmContainerAvg = cspmContainerAvg; return this; } /** - * Shows the average number of Cloud Security Posture Management containers over all hours in the - * current date for all organizations. - * + *

Shows the average number of Cloud Security Posture Management containers over all hours in the current date for all organizations.

* @return cspmContainerAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmContainerAvg() { - return cspmContainerAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmContainerAvg() { + return cspmContainerAvg; + } public void setCspmContainerAvg(Long cspmContainerAvg) { this.cspmContainerAvg = cspmContainerAvg; } - public UsageSummaryDate cspmContainerHwm(Long cspmContainerHwm) { this.cspmContainerHwm = cspmContainerHwm; return this; } /** - * Shows the high-water mark of Cloud Security Posture Management containers over all hours in the - * current date for all organizations. - * + *

Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for all organizations.

* @return cspmContainerHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmContainerHwm() { - return cspmContainerHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmContainerHwm() { + return cspmContainerHwm; + } public void setCspmContainerHwm(Long cspmContainerHwm) { this.cspmContainerHwm = cspmContainerHwm; } - public UsageSummaryDate cspmGcpHostTop99p(Long cspmGcpHostTop99p) { this.cspmGcpHostTop99p = cspmGcpHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in - * the current date for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in the current date for all organizations.

* @return cspmGcpHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_GCP_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmGcpHostTop99p() { - return cspmGcpHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_GCP_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmGcpHostTop99p() { + return cspmGcpHostTop99p; + } public void setCspmGcpHostTop99p(Long cspmGcpHostTop99p) { this.cspmGcpHostTop99p = cspmGcpHostTop99p; } - public UsageSummaryDate cspmHostTop99p(Long cspmHostTop99p) { this.cspmHostTop99p = cspmHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the - * current date for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for all organizations.

* @return cspmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmHostTop99p() { - return cspmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmHostTop99p() { + return cspmHostTop99p; + } public void setCspmHostTop99p(Long cspmHostTop99p) { this.cspmHostTop99p = cspmHostTop99p; } - public UsageSummaryDate customTsAvg(Long customTsAvg) { this.customTsAvg = customTsAvg; return this; } /** - * Shows the average number of distinct custom metrics over all hours in the current date for all - * organizations. - * + *

Shows the average number of distinct custom metrics over all hours in the current date for all organizations.

* @return customTsAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TS_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCustomTsAvg() { - return customTsAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TS_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCustomTsAvg() { + return customTsAvg; + } public void setCustomTsAvg(Long customTsAvg) { this.customTsAvg = customTsAvg; } - public UsageSummaryDate cwsContainerCountAvg(Long cwsContainerCountAvg) { this.cwsContainerCountAvg = cwsContainerCountAvg; return this; } /** - * Shows the average of all distinct Cloud Workload Security containers over all hours in the - * current date for all organizations. - * + *

Shows the average of all distinct Cloud Workload Security containers over all hours in the current date for all organizations.

* @return cwsContainerCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsContainerCountAvg() { - return cwsContainerCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsContainerCountAvg() { + return cwsContainerCountAvg; + } public void setCwsContainerCountAvg(Long cwsContainerCountAvg) { this.cwsContainerCountAvg = cwsContainerCountAvg; } - public UsageSummaryDate cwsHostTop99p(Long cwsHostTop99p) { this.cwsHostTop99p = cwsHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current - * date for all organizations. - * + *

Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current date for all organizations.

* @return cwsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsHostTop99p() { - return cwsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsHostTop99p() { + return cwsHostTop99p; + } public void setCwsHostTop99p(Long cwsHostTop99p) { this.cwsHostTop99p = cwsHostTop99p; } - public UsageSummaryDate date(OffsetDateTime date) { this.date = date; return this; } /** - * The date for the usage. - * + *

The date for the usage.

* @return date - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getDate() { - return date; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDate() { + return date; + } public void setDate(OffsetDateTime date) { this.date = date; } - public UsageSummaryDate dbmHostTop99p(Long dbmHostTop99p) { this.dbmHostTop99p = dbmHostTop99p; return this; } /** - * Shows the 99th percentile of all Database Monitoring hosts over all hours in the current date - * for all organizations. - * + *

Shows the 99th percentile of all Database Monitoring hosts over all hours in the current date for all organizations.

* @return dbmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmHostTop99p() { - return dbmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmHostTop99p() { + return dbmHostTop99p; + } public void setDbmHostTop99p(Long dbmHostTop99p) { this.dbmHostTop99p = dbmHostTop99p; } - public UsageSummaryDate dbmQueriesCountAvg(Long dbmQueriesCountAvg) { this.dbmQueriesCountAvg = dbmQueriesCountAvg; return this; } /** - * Shows the average of all normalized Database Monitoring queries over all hours in the current - * date for all organizations. - * + *

Shows the average of all normalized Database Monitoring queries over all hours in the current date for all organizations.

* @return dbmQueriesCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmQueriesCountAvg() { - return dbmQueriesCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmQueriesCountAvg() { + return dbmQueriesCountAvg; + } public void setDbmQueriesCountAvg(Long dbmQueriesCountAvg) { this.dbmQueriesCountAvg = dbmQueriesCountAvg; } - public UsageSummaryDate fargateTasksCountAvg(Long fargateTasksCountAvg) { this.fargateTasksCountAvg = fargateTasksCountAvg; return this; } /** - * Shows the high-watermark of all Fargate tasks over all hours in the current date for all - * organizations. - * + *

Shows the high-watermark of all Fargate tasks over all hours in the current date for all organizations.

* @return fargateTasksCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFargateTasksCountAvg() { - return fargateTasksCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFargateTasksCountAvg() { + return fargateTasksCountAvg; + } public void setFargateTasksCountAvg(Long fargateTasksCountAvg) { this.fargateTasksCountAvg = fargateTasksCountAvg; } - public UsageSummaryDate fargateTasksCountHwm(Long fargateTasksCountHwm) { this.fargateTasksCountHwm = fargateTasksCountHwm; return this; } /** - * Shows the average of all Fargate tasks over all hours in the current date for all - * organizations. - * + *

Shows the average of all Fargate tasks over all hours in the current date for all organizations.

* @return fargateTasksCountHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFargateTasksCountHwm() { - return fargateTasksCountHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFargateTasksCountHwm() { + return fargateTasksCountHwm; + } public void setFargateTasksCountHwm(Long fargateTasksCountHwm) { this.fargateTasksCountHwm = fargateTasksCountHwm; } - public UsageSummaryDate gcpHostTop99p(Long gcpHostTop99p) { this.gcpHostTop99p = gcpHostTop99p; return this; } /** - * Shows the 99th percentile of all GCP hosts over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all GCP hosts over all hours in the current date for all organizations.

* @return gcpHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GCP_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getGcpHostTop99p() { - return gcpHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GCP_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getGcpHostTop99p() { + return gcpHostTop99p; + } public void setGcpHostTop99p(Long gcpHostTop99p) { this.gcpHostTop99p = gcpHostTop99p; } - public UsageSummaryDate herokuHostTop99p(Long herokuHostTop99p) { this.herokuHostTop99p = herokuHostTop99p; return this; } /** - * Shows the 99th percentile of all Heroku dynos over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all Heroku dynos over all hours in the current date for all organizations.

* @return herokuHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEROKU_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHerokuHostTop99p() { - return herokuHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEROKU_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHerokuHostTop99p() { + return herokuHostTop99p; + } public void setHerokuHostTop99p(Long herokuHostTop99p) { this.herokuHostTop99p = herokuHostTop99p; } - - public UsageSummaryDate incidentManagementMonthlyActiveUsersHwm( - Long incidentManagementMonthlyActiveUsersHwm) { + public UsageSummaryDate incidentManagementMonthlyActiveUsersHwm(Long incidentManagementMonthlyActiveUsersHwm) { this.incidentManagementMonthlyActiveUsersHwm = incidentManagementMonthlyActiveUsersHwm; return this; } /** - * Shows the high-water mark of incident management monthly active users over all hours in the - * current date for all organizations. - * + *

Shows the high-water mark of incident management monthly active users over all hours in the current date for all organizations.

* @return incidentManagementMonthlyActiveUsersHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIncidentManagementMonthlyActiveUsersHwm() { - return incidentManagementMonthlyActiveUsersHwm; - } - - public void setIncidentManagementMonthlyActiveUsersHwm( - Long incidentManagementMonthlyActiveUsersHwm) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIncidentManagementMonthlyActiveUsersHwm() { + return incidentManagementMonthlyActiveUsersHwm; + } + public void setIncidentManagementMonthlyActiveUsersHwm(Long incidentManagementMonthlyActiveUsersHwm) { this.incidentManagementMonthlyActiveUsersHwm = incidentManagementMonthlyActiveUsersHwm; } - public UsageSummaryDate indexedEventsCountSum(Long indexedEventsCountSum) { this.indexedEventsCountSum = indexedEventsCountSum; return this; } /** - * Shows the sum of all log events indexed over all hours in the current date for all - * organizations. - * + *

Shows the sum of all log events indexed over all hours in the current date for all organizations.

* @return indexedEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCountSum() { - return indexedEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCountSum() { + return indexedEventsCountSum; + } public void setIndexedEventsCountSum(Long indexedEventsCountSum) { this.indexedEventsCountSum = indexedEventsCountSum; } - public UsageSummaryDate infraHostTop99p(Long infraHostTop99p) { this.infraHostTop99p = infraHostTop99p; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current - * date for all organizations. - * + *

Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for all organizations.

* @return infraHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostTop99p() { - return infraHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostTop99p() { + return infraHostTop99p; + } public void setInfraHostTop99p(Long infraHostTop99p) { this.infraHostTop99p = infraHostTop99p; } - public UsageSummaryDate ingestedEventsBytesSum(Long ingestedEventsBytesSum) { this.ingestedEventsBytesSum = ingestedEventsBytesSum; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current date for all - * organizations. - * + *

Shows the sum of all log bytes ingested over all hours in the current date for all organizations.

* @return ingestedEventsBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytesSum() { - return ingestedEventsBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestedEventsBytesSum() { + return ingestedEventsBytesSum; + } public void setIngestedEventsBytesSum(Long ingestedEventsBytesSum) { this.ingestedEventsBytesSum = ingestedEventsBytesSum; } - public UsageSummaryDate iotDeviceSum(Long iotDeviceSum) { this.iotDeviceSum = iotDeviceSum; return this; } /** - * Shows the sum of all IoT devices over all hours in the current date for all organizations. - * + *

Shows the sum of all IoT devices over all hours in the current date for all organizations.

* @return iotDeviceSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceSum() { - return iotDeviceSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceSum() { + return iotDeviceSum; + } public void setIotDeviceSum(Long iotDeviceSum) { this.iotDeviceSum = iotDeviceSum; } - public UsageSummaryDate iotDeviceTop99p(Long iotDeviceTop99p) { this.iotDeviceTop99p = iotDeviceTop99p; return this; } /** - * Shows the 99th percentile of all IoT devices over all hours in the current date all - * organizations. - * + *

Shows the 99th percentile of all IoT devices over all hours in the current date all organizations.

* @return iotDeviceTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceTop99p() { - return iotDeviceTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceTop99p() { + return iotDeviceTop99p; + } public void setIotDeviceTop99p(Long iotDeviceTop99p) { this.iotDeviceTop99p = iotDeviceTop99p; } - public UsageSummaryDate mobileRumLiteSessionCountSum(Long mobileRumLiteSessionCountSum) { this.mobileRumLiteSessionCountSum = mobileRumLiteSessionCountSum; return this; } /** - * Shows the sum of all mobile lite sessions over all hours in the current date for all - * organizations. - * + *

Shows the sum of all mobile lite sessions over all hours in the current date for all organizations.

* @return mobileRumLiteSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumLiteSessionCountSum() { - return mobileRumLiteSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumLiteSessionCountSum() { + return mobileRumLiteSessionCountSum; + } public void setMobileRumLiteSessionCountSum(Long mobileRumLiteSessionCountSum) { this.mobileRumLiteSessionCountSum = mobileRumLiteSessionCountSum; } - public UsageSummaryDate mobileRumSessionCountAndroidSum(Long mobileRumSessionCountAndroidSum) { this.mobileRumSessionCountAndroidSum = mobileRumSessionCountAndroidSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all - * organizations. - * + *

Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations.

* @return mobileRumSessionCountAndroidSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountAndroidSum() { - return mobileRumSessionCountAndroidSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountAndroidSum() { + return mobileRumSessionCountAndroidSum; + } public void setMobileRumSessionCountAndroidSum(Long mobileRumSessionCountAndroidSum) { this.mobileRumSessionCountAndroidSum = mobileRumSessionCountAndroidSum; } - public UsageSummaryDate mobileRumSessionCountFlutterSum(Long mobileRumSessionCountFlutterSum) { this.mobileRumSessionCountFlutterSum = mobileRumSessionCountFlutterSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on Flutter over all hours in the current date for all - * organizations. - * + *

Shows the sum of all mobile RUM Sessions on Flutter over all hours in the current date for all organizations.

* @return mobileRumSessionCountFlutterSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountFlutterSum() { - return mobileRumSessionCountFlutterSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountFlutterSum() { + return mobileRumSessionCountFlutterSum; + } public void setMobileRumSessionCountFlutterSum(Long mobileRumSessionCountFlutterSum) { this.mobileRumSessionCountFlutterSum = mobileRumSessionCountFlutterSum; } - public UsageSummaryDate mobileRumSessionCountIosSum(Long mobileRumSessionCountIosSum) { this.mobileRumSessionCountIosSum = mobileRumSessionCountIosSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for all - * organizations. - * + *

Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for all organizations.

* @return mobileRumSessionCountIosSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountIosSum() { - return mobileRumSessionCountIosSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountIosSum() { + return mobileRumSessionCountIosSum; + } public void setMobileRumSessionCountIosSum(Long mobileRumSessionCountIosSum) { this.mobileRumSessionCountIosSum = mobileRumSessionCountIosSum; } - - public UsageSummaryDate mobileRumSessionCountReactnativeSum( - Long mobileRumSessionCountReactnativeSum) { + public UsageSummaryDate mobileRumSessionCountReactnativeSum(Long mobileRumSessionCountReactnativeSum) { this.mobileRumSessionCountReactnativeSum = mobileRumSessionCountReactnativeSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on React Native over all hours in the current date for - * all organizations. - * + *

Shows the sum of all mobile RUM Sessions on React Native over all hours in the current date for all organizations.

* @return mobileRumSessionCountReactnativeSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountReactnativeSum() { - return mobileRumSessionCountReactnativeSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountReactnativeSum() { + return mobileRumSessionCountReactnativeSum; + } public void setMobileRumSessionCountReactnativeSum(Long mobileRumSessionCountReactnativeSum) { this.mobileRumSessionCountReactnativeSum = mobileRumSessionCountReactnativeSum; } - public UsageSummaryDate mobileRumSessionCountSum(Long mobileRumSessionCountSum) { this.mobileRumSessionCountSum = mobileRumSessionCountSum; return this; } /** - * Shows the sum of all mobile RUM Sessions over all hours in the current date for all - * organizations - * + *

Shows the sum of all mobile RUM Sessions over all hours in the current date for all organizations

* @return mobileRumSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountSum() { - return mobileRumSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountSum() { + return mobileRumSessionCountSum; + } public void setMobileRumSessionCountSum(Long mobileRumSessionCountSum) { this.mobileRumSessionCountSum = mobileRumSessionCountSum; } - public UsageSummaryDate mobileRumUnitsSum(Long mobileRumUnitsSum) { this.mobileRumUnitsSum = mobileRumUnitsSum; return this; } /** - * Shows the sum of all mobile RUM units over all hours in the current date for all organizations. - * + *

Shows the sum of all mobile RUM units over all hours in the current date for all organizations.

* @return mobileRumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumUnitsSum() { - return mobileRumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumUnitsSum() { + return mobileRumUnitsSum; + } public void setMobileRumUnitsSum(Long mobileRumUnitsSum) { this.mobileRumUnitsSum = mobileRumUnitsSum; } - public UsageSummaryDate netflowIndexedEventsCountSum(Long netflowIndexedEventsCountSum) { this.netflowIndexedEventsCountSum = netflowIndexedEventsCountSum; return this; } /** - * Shows the sum of all Network flows indexed over all hours in the current date for all - * organizations. - * + *

Shows the sum of all Network flows indexed over all hours in the current date for all organizations.

* @return netflowIndexedEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNetflowIndexedEventsCountSum() { - return netflowIndexedEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNetflowIndexedEventsCountSum() { + return netflowIndexedEventsCountSum; + } public void setNetflowIndexedEventsCountSum(Long netflowIndexedEventsCountSum) { this.netflowIndexedEventsCountSum = netflowIndexedEventsCountSum; } - public UsageSummaryDate npmHostTop99p(Long npmHostTop99p) { this.npmHostTop99p = npmHostTop99p; return this; } /** - * Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for - * all organizations. - * + *

Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for all organizations.

* @return npmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNpmHostTop99p() { - return npmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNpmHostTop99p() { + return npmHostTop99p; + } public void setNpmHostTop99p(Long npmHostTop99p) { this.npmHostTop99p = npmHostTop99p; } - - public UsageSummaryDate observabilityPipelinesBytesProcessedSum( - Long observabilityPipelinesBytesProcessedSum) { + public UsageSummaryDate observabilityPipelinesBytesProcessedSum(Long observabilityPipelinesBytesProcessedSum) { this.observabilityPipelinesBytesProcessedSum = observabilityPipelinesBytesProcessedSum; return this; } /** - * Sum of all observability pipelines bytes processed over all hours in the current date for the - * given org. - * + *

Sum of all observability pipelines bytes processed over all hours in the current date for the given org.

* @return observabilityPipelinesBytesProcessedSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getObservabilityPipelinesBytesProcessedSum() { - return observabilityPipelinesBytesProcessedSum; - } - - public void setObservabilityPipelinesBytesProcessedSum( - Long observabilityPipelinesBytesProcessedSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getObservabilityPipelinesBytesProcessedSum() { + return observabilityPipelinesBytesProcessedSum; + } + public void setObservabilityPipelinesBytesProcessedSum(Long observabilityPipelinesBytesProcessedSum) { this.observabilityPipelinesBytesProcessedSum = observabilityPipelinesBytesProcessedSum; } - public UsageSummaryDate onlineArchiveEventsCountSum(Long onlineArchiveEventsCountSum) { this.onlineArchiveEventsCountSum = onlineArchiveEventsCountSum; return this; } /** - * Sum of all online archived events over all hours in the current date for all organizations. - * + *

Sum of all online archived events over all hours in the current date for all organizations.

* @return onlineArchiveEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOnlineArchiveEventsCountSum() { - return onlineArchiveEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOnlineArchiveEventsCountSum() { + return onlineArchiveEventsCountSum; + } public void setOnlineArchiveEventsCountSum(Long onlineArchiveEventsCountSum) { this.onlineArchiveEventsCountSum = onlineArchiveEventsCountSum; } - public UsageSummaryDate opentelemetryApmHostTop99p(Long opentelemetryApmHostTop99p) { this.opentelemetryApmHostTop99p = opentelemetryApmHostTop99p; return this; } /** - * Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry - * Collector over all hours in the current date for all organizations. - * + *

Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for all organizations.

* @return opentelemetryApmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryApmHostTop99p() { - return opentelemetryApmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryApmHostTop99p() { + return opentelemetryApmHostTop99p; + } public void setOpentelemetryApmHostTop99p(Long opentelemetryApmHostTop99p) { this.opentelemetryApmHostTop99p = opentelemetryApmHostTop99p; } - public UsageSummaryDate opentelemetryHostTop99p(Long opentelemetryHostTop99p) { this.opentelemetryHostTop99p = opentelemetryHostTop99p; return this; } /** - * Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry - * Collector over all hours in the current date for all organizations. - * + *

Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for all organizations.

* @return opentelemetryHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryHostTop99p() { - return opentelemetryHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryHostTop99p() { + return opentelemetryHostTop99p; + } public void setOpentelemetryHostTop99p(Long opentelemetryHostTop99p) { this.opentelemetryHostTop99p = opentelemetryHostTop99p; } - public UsageSummaryDate orgs(List orgs) { this.orgs = orgs; for (UsageSummaryDateOrg item : orgs) { @@ -1667,7 +1472,6 @@ public UsageSummaryDate orgs(List orgs) { } return this; } - public UsageSummaryDate addOrgsItem(UsageSummaryDateOrg orgsItem) { if (this.orgs == null) { this.orgs = new ArrayList<>(); @@ -1678,376 +1482,327 @@ public UsageSummaryDate addOrgsItem(UsageSummaryDateOrg orgsItem) { } /** - * Organizations associated with a user. - * + *

Organizations associated with a user.

* @return orgs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOrgs() { - return orgs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getOrgs() { + return orgs; + } public void setOrgs(List orgs) { this.orgs = orgs; } - public UsageSummaryDate profilingHostTop99p(Long profilingHostTop99p) { this.profilingHostTop99p = profilingHostTop99p; return this; } /** - * Shows the 99th percentile of all profiled hosts over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all profiled hosts over all hours in the current date for all organizations.

* @return profilingHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILING_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getProfilingHostTop99p() { - return profilingHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILING_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getProfilingHostTop99p() { + return profilingHostTop99p; + } public void setProfilingHostTop99p(Long profilingHostTop99p) { this.profilingHostTop99p = profilingHostTop99p; } - public UsageSummaryDate rumBrowserAndMobileSessionCount(Long rumBrowserAndMobileSessionCount) { this.rumBrowserAndMobileSessionCount = rumBrowserAndMobileSessionCount; return this; } /** - * Shows the sum of all mobile sessions and all browser lite and legacy sessions over all hours in - * the current month for all organizations. - * + *

Shows the sum of all mobile sessions and all browser lite and legacy sessions over all hours in the current month for all organizations.

* @return rumBrowserAndMobileSessionCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumBrowserAndMobileSessionCount() { - return rumBrowserAndMobileSessionCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumBrowserAndMobileSessionCount() { + return rumBrowserAndMobileSessionCount; + } public void setRumBrowserAndMobileSessionCount(Long rumBrowserAndMobileSessionCount) { this.rumBrowserAndMobileSessionCount = rumBrowserAndMobileSessionCount; } - public UsageSummaryDate rumSessionCountSum(Long rumSessionCountSum) { this.rumSessionCountSum = rumSessionCountSum; return this; } /** - * Shows the sum of all browser RUM Lite Sessions over all hours in the current date for all - * organizations - * + *

Shows the sum of all browser RUM Lite Sessions over all hours in the current date for all organizations

* @return rumSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumSessionCountSum() { - return rumSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumSessionCountSum() { + return rumSessionCountSum; + } public void setRumSessionCountSum(Long rumSessionCountSum) { this.rumSessionCountSum = rumSessionCountSum; } - public UsageSummaryDate rumTotalSessionCountSum(Long rumTotalSessionCountSum) { this.rumTotalSessionCountSum = rumTotalSessionCountSum; return this; } /** - * Shows the sum of RUM Sessions (browser and mobile) over all hours in the current date for all - * organizations. - * + *

Shows the sum of RUM Sessions (browser and mobile) over all hours in the current date for all organizations.

* @return rumTotalSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumTotalSessionCountSum() { - return rumTotalSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumTotalSessionCountSum() { + return rumTotalSessionCountSum; + } public void setRumTotalSessionCountSum(Long rumTotalSessionCountSum) { this.rumTotalSessionCountSum = rumTotalSessionCountSum; } - public UsageSummaryDate rumUnitsSum(Long rumUnitsSum) { this.rumUnitsSum = rumUnitsSum; return this; } /** - * Shows the sum of all browser and mobile RUM units over all hours in the current date for all - * organizations. - * + *

Shows the sum of all browser and mobile RUM units over all hours in the current date for all organizations.

* @return rumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumUnitsSum() { - return rumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumUnitsSum() { + return rumUnitsSum; + } public void setRumUnitsSum(Long rumUnitsSum) { this.rumUnitsSum = rumUnitsSum; } - public UsageSummaryDate sdsApmScannedBytesSum(Long sdsApmScannedBytesSum) { this.sdsApmScannedBytesSum = sdsApmScannedBytesSum; return this; } /** - * Sum of all APM bytes scanned with sensitive data scanner over all hours in the current date for - * all organizations. - * + *

Sum of all APM bytes scanned with sensitive data scanner over all hours in the current date for all organizations.

* @return sdsApmScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsApmScannedBytesSum() { - return sdsApmScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsApmScannedBytesSum() { + return sdsApmScannedBytesSum; + } public void setSdsApmScannedBytesSum(Long sdsApmScannedBytesSum) { this.sdsApmScannedBytesSum = sdsApmScannedBytesSum; } - public UsageSummaryDate sdsEventsScannedBytesSum(Long sdsEventsScannedBytesSum) { this.sdsEventsScannedBytesSum = sdsEventsScannedBytesSum; return this; } /** - * Sum of all event stream events bytes scanned with sensitive data scanner over all hours in the - * current date for all organizations. - * + *

Sum of all event stream events bytes scanned with sensitive data scanner over all hours in the current date for all organizations.

* @return sdsEventsScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsEventsScannedBytesSum() { - return sdsEventsScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsEventsScannedBytesSum() { + return sdsEventsScannedBytesSum; + } public void setSdsEventsScannedBytesSum(Long sdsEventsScannedBytesSum) { this.sdsEventsScannedBytesSum = sdsEventsScannedBytesSum; } - public UsageSummaryDate sdsLogsScannedBytesSum(Long sdsLogsScannedBytesSum) { this.sdsLogsScannedBytesSum = sdsLogsScannedBytesSum; return this; } /** - * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours - * in the current month for all organizations. - * + *

Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations.

* @return sdsLogsScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsLogsScannedBytesSum() { - return sdsLogsScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsLogsScannedBytesSum() { + return sdsLogsScannedBytesSum; + } public void setSdsLogsScannedBytesSum(Long sdsLogsScannedBytesSum) { this.sdsLogsScannedBytesSum = sdsLogsScannedBytesSum; } - public UsageSummaryDate sdsRumScannedBytesSum(Long sdsRumScannedBytesSum) { this.sdsRumScannedBytesSum = sdsRumScannedBytesSum; return this; } /** - * Sum of all RUM bytes scanned with sensitive data scanner over all hours in the current date for - * all organizations. - * + *

Sum of all RUM bytes scanned with sensitive data scanner over all hours in the current date for all organizations.

* @return sdsRumScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsRumScannedBytesSum() { - return sdsRumScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsRumScannedBytesSum() { + return sdsRumScannedBytesSum; + } public void setSdsRumScannedBytesSum(Long sdsRumScannedBytesSum) { this.sdsRumScannedBytesSum = sdsRumScannedBytesSum; } - public UsageSummaryDate sdsTotalScannedBytesSum(Long sdsTotalScannedBytesSum) { this.sdsTotalScannedBytesSum = sdsTotalScannedBytesSum; return this; } /** - * Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over - * all hours in the current month for all organizations. - * + *

Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for all organizations.

* @return sdsTotalScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsTotalScannedBytesSum() { - return sdsTotalScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsTotalScannedBytesSum() { + return sdsTotalScannedBytesSum; + } public void setSdsTotalScannedBytesSum(Long sdsTotalScannedBytesSum) { this.sdsTotalScannedBytesSum = sdsTotalScannedBytesSum; } - - public UsageSummaryDate syntheticsBrowserCheckCallsCountSum( - Long syntheticsBrowserCheckCallsCountSum) { + public UsageSummaryDate syntheticsBrowserCheckCallsCountSum(Long syntheticsBrowserCheckCallsCountSum) { this.syntheticsBrowserCheckCallsCountSum = syntheticsBrowserCheckCallsCountSum; return this; } /** - * Shows the sum of all Synthetic browser tests over all hours in the current date for all - * organizations. - * + *

Shows the sum of all Synthetic browser tests over all hours in the current date for all organizations.

* @return syntheticsBrowserCheckCallsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsBrowserCheckCallsCountSum() { - return syntheticsBrowserCheckCallsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsBrowserCheckCallsCountSum() { + return syntheticsBrowserCheckCallsCountSum; + } public void setSyntheticsBrowserCheckCallsCountSum(Long syntheticsBrowserCheckCallsCountSum) { this.syntheticsBrowserCheckCallsCountSum = syntheticsBrowserCheckCallsCountSum; } - public UsageSummaryDate syntheticsCheckCallsCountSum(Long syntheticsCheckCallsCountSum) { this.syntheticsCheckCallsCountSum = syntheticsCheckCallsCountSum; return this; } /** - * Shows the sum of all Synthetic API tests over all hours in the current date for all - * organizations. - * + *

Shows the sum of all Synthetic API tests over all hours in the current date for all organizations.

* @return syntheticsCheckCallsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsCheckCallsCountSum() { - return syntheticsCheckCallsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsCheckCallsCountSum() { + return syntheticsCheckCallsCountSum; + } public void setSyntheticsCheckCallsCountSum(Long syntheticsCheckCallsCountSum) { this.syntheticsCheckCallsCountSum = syntheticsCheckCallsCountSum; } - - public UsageSummaryDate syntheticsParallelTestingMaxSlotsHwm( - Long syntheticsParallelTestingMaxSlotsHwm) { + public UsageSummaryDate syntheticsParallelTestingMaxSlotsHwm(Long syntheticsParallelTestingMaxSlotsHwm) { this.syntheticsParallelTestingMaxSlotsHwm = syntheticsParallelTestingMaxSlotsHwm; return this; } /** - * Shows the high-water mark of used synthetics parallel testing slots over all hours in the - * current date for all organizations. - * + *

Shows the high-water mark of used synthetics parallel testing slots over all hours in the current date for all organizations.

* @return syntheticsParallelTestingMaxSlotsHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsParallelTestingMaxSlotsHwm() { - return syntheticsParallelTestingMaxSlotsHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsParallelTestingMaxSlotsHwm() { + return syntheticsParallelTestingMaxSlotsHwm; + } public void setSyntheticsParallelTestingMaxSlotsHwm(Long syntheticsParallelTestingMaxSlotsHwm) { this.syntheticsParallelTestingMaxSlotsHwm = syntheticsParallelTestingMaxSlotsHwm; } - public UsageSummaryDate traceSearchIndexedEventsCountSum(Long traceSearchIndexedEventsCountSum) { this.traceSearchIndexedEventsCountSum = traceSearchIndexedEventsCountSum; return this; } /** - * Shows the sum of all Indexed Spans indexed over all hours in the current date for all - * organizations. - * + *

Shows the sum of all Indexed Spans indexed over all hours in the current date for all organizations.

* @return traceSearchIndexedEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTraceSearchIndexedEventsCountSum() { - return traceSearchIndexedEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTraceSearchIndexedEventsCountSum() { + return traceSearchIndexedEventsCountSum; + } public void setTraceSearchIndexedEventsCountSum(Long traceSearchIndexedEventsCountSum) { this.traceSearchIndexedEventsCountSum = traceSearchIndexedEventsCountSum; } - public UsageSummaryDate twolIngestedEventsBytesSum(Long twolIngestedEventsBytesSum) { this.twolIngestedEventsBytesSum = twolIngestedEventsBytesSum; return this; } /** - * Shows the sum of all ingested APM span bytes over all hours in the current date for all - * organizations. - * + *

Shows the sum of all ingested APM span bytes over all hours in the current date for all organizations.

* @return twolIngestedEventsBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTwolIngestedEventsBytesSum() { - return twolIngestedEventsBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTwolIngestedEventsBytesSum() { + return twolIngestedEventsBytesSum; + } public void setTwolIngestedEventsBytesSum(Long twolIngestedEventsBytesSum) { this.twolIngestedEventsBytesSum = twolIngestedEventsBytesSum; } - public UsageSummaryDate vsphereHostTop99p(Long vsphereHostTop99p) { this.vsphereHostTop99p = vsphereHostTop99p; return this; } /** - * Shows the 99th percentile of all vSphere hosts over all hours in the current date for all - * organizations. - * + *

Shows the 99th percentile of all vSphere hosts over all hours in the current date for all organizations.

* @return vsphereHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVsphereHostTop99p() { - return vsphereHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVsphereHostTop99p() { + return vsphereHostTop99p; + } public void setVsphereHostTop99p(Long vsphereHostTop99p) { this.vsphereHostTop99p = vsphereHostTop99p; } - /** Return true if this UsageSummaryDate object is equal to o. */ + /** + * Return true if this UsageSummaryDate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -2057,193 +1812,13 @@ public boolean equals(Object o) { return false; } UsageSummaryDate usageSummaryDate = (UsageSummaryDate) o; - return Objects.equals(this.agentHostTop99p, usageSummaryDate.agentHostTop99p) - && Objects.equals( - this.apmAzureAppServiceHostTop99p, usageSummaryDate.apmAzureAppServiceHostTop99p) - && Objects.equals(this.apmFargateCountAvg, usageSummaryDate.apmFargateCountAvg) - && Objects.equals(this.apmHostTop99p, usageSummaryDate.apmHostTop99p) - && Objects.equals(this.appsecFargateCountAvg, usageSummaryDate.appsecFargateCountAvg) - && Objects.equals(this.auditLogsLinesIndexedSum, usageSummaryDate.auditLogsLinesIndexedSum) - && Objects.equals(this.avgProfiledFargateTasks, usageSummaryDate.avgProfiledFargateTasks) - && Objects.equals(this.awsHostTop99p, usageSummaryDate.awsHostTop99p) - && Objects.equals(this.awsLambdaFuncCount, usageSummaryDate.awsLambdaFuncCount) - && Objects.equals(this.awsLambdaInvocationsSum, usageSummaryDate.awsLambdaInvocationsSum) - && Objects.equals(this.azureAppServiceTop99p, usageSummaryDate.azureAppServiceTop99p) - && Objects.equals(this.billableIngestedBytesSum, usageSummaryDate.billableIngestedBytesSum) - && Objects.equals( - this.browserRumLiteSessionCountSum, usageSummaryDate.browserRumLiteSessionCountSum) - && Objects.equals( - this.browserRumReplaySessionCountSum, usageSummaryDate.browserRumReplaySessionCountSum) - && Objects.equals(this.browserRumUnitsSum, usageSummaryDate.browserRumUnitsSum) - && Objects.equals( - this.ciPipelineIndexedSpansSum, usageSummaryDate.ciPipelineIndexedSpansSum) - && Objects.equals(this.ciTestIndexedSpansSum, usageSummaryDate.ciTestIndexedSpansSum) - && Objects.equals( - this.ciVisibilityPipelineCommittersHwm, - usageSummaryDate.ciVisibilityPipelineCommittersHwm) - && Objects.equals( - this.ciVisibilityTestCommittersHwm, usageSummaryDate.ciVisibilityTestCommittersHwm) - && Objects.equals( - this.cloudCostManagementHostCountAvg, usageSummaryDate.cloudCostManagementHostCountAvg) - && Objects.equals(this.containerAvg, usageSummaryDate.containerAvg) - && Objects.equals(this.containerExclAgentAvg, usageSummaryDate.containerExclAgentAvg) - && Objects.equals(this.containerHwm, usageSummaryDate.containerHwm) - && Objects.equals(this.cspmAasHostTop99p, usageSummaryDate.cspmAasHostTop99p) - && Objects.equals(this.cspmAwsHostTop99p, usageSummaryDate.cspmAwsHostTop99p) - && Objects.equals(this.cspmAzureHostTop99p, usageSummaryDate.cspmAzureHostTop99p) - && Objects.equals(this.cspmContainerAvg, usageSummaryDate.cspmContainerAvg) - && Objects.equals(this.cspmContainerHwm, usageSummaryDate.cspmContainerHwm) - && Objects.equals(this.cspmGcpHostTop99p, usageSummaryDate.cspmGcpHostTop99p) - && Objects.equals(this.cspmHostTop99p, usageSummaryDate.cspmHostTop99p) - && Objects.equals(this.customTsAvg, usageSummaryDate.customTsAvg) - && Objects.equals(this.cwsContainerCountAvg, usageSummaryDate.cwsContainerCountAvg) - && Objects.equals(this.cwsHostTop99p, usageSummaryDate.cwsHostTop99p) - && Objects.equals(this.date, usageSummaryDate.date) - && Objects.equals(this.dbmHostTop99p, usageSummaryDate.dbmHostTop99p) - && Objects.equals(this.dbmQueriesCountAvg, usageSummaryDate.dbmQueriesCountAvg) - && Objects.equals(this.fargateTasksCountAvg, usageSummaryDate.fargateTasksCountAvg) - && Objects.equals(this.fargateTasksCountHwm, usageSummaryDate.fargateTasksCountHwm) - && Objects.equals(this.gcpHostTop99p, usageSummaryDate.gcpHostTop99p) - && Objects.equals(this.herokuHostTop99p, usageSummaryDate.herokuHostTop99p) - && Objects.equals( - this.incidentManagementMonthlyActiveUsersHwm, - usageSummaryDate.incidentManagementMonthlyActiveUsersHwm) - && Objects.equals(this.indexedEventsCountSum, usageSummaryDate.indexedEventsCountSum) - && Objects.equals(this.infraHostTop99p, usageSummaryDate.infraHostTop99p) - && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDate.ingestedEventsBytesSum) - && Objects.equals(this.iotDeviceSum, usageSummaryDate.iotDeviceSum) - && Objects.equals(this.iotDeviceTop99p, usageSummaryDate.iotDeviceTop99p) - && Objects.equals( - this.mobileRumLiteSessionCountSum, usageSummaryDate.mobileRumLiteSessionCountSum) - && Objects.equals( - this.mobileRumSessionCountAndroidSum, usageSummaryDate.mobileRumSessionCountAndroidSum) - && Objects.equals( - this.mobileRumSessionCountFlutterSum, usageSummaryDate.mobileRumSessionCountFlutterSum) - && Objects.equals( - this.mobileRumSessionCountIosSum, usageSummaryDate.mobileRumSessionCountIosSum) - && Objects.equals( - this.mobileRumSessionCountReactnativeSum, - usageSummaryDate.mobileRumSessionCountReactnativeSum) - && Objects.equals(this.mobileRumSessionCountSum, usageSummaryDate.mobileRumSessionCountSum) - && Objects.equals(this.mobileRumUnitsSum, usageSummaryDate.mobileRumUnitsSum) - && Objects.equals( - this.netflowIndexedEventsCountSum, usageSummaryDate.netflowIndexedEventsCountSum) - && Objects.equals(this.npmHostTop99p, usageSummaryDate.npmHostTop99p) - && Objects.equals( - this.observabilityPipelinesBytesProcessedSum, - usageSummaryDate.observabilityPipelinesBytesProcessedSum) - && Objects.equals( - this.onlineArchiveEventsCountSum, usageSummaryDate.onlineArchiveEventsCountSum) - && Objects.equals( - this.opentelemetryApmHostTop99p, usageSummaryDate.opentelemetryApmHostTop99p) - && Objects.equals(this.opentelemetryHostTop99p, usageSummaryDate.opentelemetryHostTop99p) - && Objects.equals(this.orgs, usageSummaryDate.orgs) - && Objects.equals(this.profilingHostTop99p, usageSummaryDate.profilingHostTop99p) - && Objects.equals( - this.rumBrowserAndMobileSessionCount, usageSummaryDate.rumBrowserAndMobileSessionCount) - && Objects.equals(this.rumSessionCountSum, usageSummaryDate.rumSessionCountSum) - && Objects.equals(this.rumTotalSessionCountSum, usageSummaryDate.rumTotalSessionCountSum) - && Objects.equals(this.rumUnitsSum, usageSummaryDate.rumUnitsSum) - && Objects.equals(this.sdsApmScannedBytesSum, usageSummaryDate.sdsApmScannedBytesSum) - && Objects.equals(this.sdsEventsScannedBytesSum, usageSummaryDate.sdsEventsScannedBytesSum) - && Objects.equals(this.sdsLogsScannedBytesSum, usageSummaryDate.sdsLogsScannedBytesSum) - && Objects.equals(this.sdsRumScannedBytesSum, usageSummaryDate.sdsRumScannedBytesSum) - && Objects.equals(this.sdsTotalScannedBytesSum, usageSummaryDate.sdsTotalScannedBytesSum) - && Objects.equals( - this.syntheticsBrowserCheckCallsCountSum, - usageSummaryDate.syntheticsBrowserCheckCallsCountSum) - && Objects.equals( - this.syntheticsCheckCallsCountSum, usageSummaryDate.syntheticsCheckCallsCountSum) - && Objects.equals( - this.syntheticsParallelTestingMaxSlotsHwm, - usageSummaryDate.syntheticsParallelTestingMaxSlotsHwm) - && Objects.equals( - this.traceSearchIndexedEventsCountSum, - usageSummaryDate.traceSearchIndexedEventsCountSum) - && Objects.equals( - this.twolIngestedEventsBytesSum, usageSummaryDate.twolIngestedEventsBytesSum) - && Objects.equals(this.vsphereHostTop99p, usageSummaryDate.vsphereHostTop99p); + return Objects.equals(this.agentHostTop99p, usageSummaryDate.agentHostTop99p) && Objects.equals(this.apmAzureAppServiceHostTop99p, usageSummaryDate.apmAzureAppServiceHostTop99p) && Objects.equals(this.apmFargateCountAvg, usageSummaryDate.apmFargateCountAvg) && Objects.equals(this.apmHostTop99p, usageSummaryDate.apmHostTop99p) && Objects.equals(this.appsecFargateCountAvg, usageSummaryDate.appsecFargateCountAvg) && Objects.equals(this.auditLogsLinesIndexedSum, usageSummaryDate.auditLogsLinesIndexedSum) && Objects.equals(this.avgProfiledFargateTasks, usageSummaryDate.avgProfiledFargateTasks) && Objects.equals(this.awsHostTop99p, usageSummaryDate.awsHostTop99p) && Objects.equals(this.awsLambdaFuncCount, usageSummaryDate.awsLambdaFuncCount) && Objects.equals(this.awsLambdaInvocationsSum, usageSummaryDate.awsLambdaInvocationsSum) && Objects.equals(this.azureAppServiceTop99p, usageSummaryDate.azureAppServiceTop99p) && Objects.equals(this.billableIngestedBytesSum, usageSummaryDate.billableIngestedBytesSum) && Objects.equals(this.browserRumLiteSessionCountSum, usageSummaryDate.browserRumLiteSessionCountSum) && Objects.equals(this.browserRumReplaySessionCountSum, usageSummaryDate.browserRumReplaySessionCountSum) && Objects.equals(this.browserRumUnitsSum, usageSummaryDate.browserRumUnitsSum) && Objects.equals(this.ciPipelineIndexedSpansSum, usageSummaryDate.ciPipelineIndexedSpansSum) && Objects.equals(this.ciTestIndexedSpansSum, usageSummaryDate.ciTestIndexedSpansSum) && Objects.equals(this.ciVisibilityPipelineCommittersHwm, usageSummaryDate.ciVisibilityPipelineCommittersHwm) && Objects.equals(this.ciVisibilityTestCommittersHwm, usageSummaryDate.ciVisibilityTestCommittersHwm) && Objects.equals(this.cloudCostManagementHostCountAvg, usageSummaryDate.cloudCostManagementHostCountAvg) && Objects.equals(this.containerAvg, usageSummaryDate.containerAvg) && Objects.equals(this.containerExclAgentAvg, usageSummaryDate.containerExclAgentAvg) && Objects.equals(this.containerHwm, usageSummaryDate.containerHwm) && Objects.equals(this.cspmAasHostTop99p, usageSummaryDate.cspmAasHostTop99p) && Objects.equals(this.cspmAwsHostTop99p, usageSummaryDate.cspmAwsHostTop99p) && Objects.equals(this.cspmAzureHostTop99p, usageSummaryDate.cspmAzureHostTop99p) && Objects.equals(this.cspmContainerAvg, usageSummaryDate.cspmContainerAvg) && Objects.equals(this.cspmContainerHwm, usageSummaryDate.cspmContainerHwm) && Objects.equals(this.cspmGcpHostTop99p, usageSummaryDate.cspmGcpHostTop99p) && Objects.equals(this.cspmHostTop99p, usageSummaryDate.cspmHostTop99p) && Objects.equals(this.customTsAvg, usageSummaryDate.customTsAvg) && Objects.equals(this.cwsContainerCountAvg, usageSummaryDate.cwsContainerCountAvg) && Objects.equals(this.cwsHostTop99p, usageSummaryDate.cwsHostTop99p) && Objects.equals(this.date, usageSummaryDate.date) && Objects.equals(this.dbmHostTop99p, usageSummaryDate.dbmHostTop99p) && Objects.equals(this.dbmQueriesCountAvg, usageSummaryDate.dbmQueriesCountAvg) && Objects.equals(this.fargateTasksCountAvg, usageSummaryDate.fargateTasksCountAvg) && Objects.equals(this.fargateTasksCountHwm, usageSummaryDate.fargateTasksCountHwm) && Objects.equals(this.gcpHostTop99p, usageSummaryDate.gcpHostTop99p) && Objects.equals(this.herokuHostTop99p, usageSummaryDate.herokuHostTop99p) && Objects.equals(this.incidentManagementMonthlyActiveUsersHwm, usageSummaryDate.incidentManagementMonthlyActiveUsersHwm) && Objects.equals(this.indexedEventsCountSum, usageSummaryDate.indexedEventsCountSum) && Objects.equals(this.infraHostTop99p, usageSummaryDate.infraHostTop99p) && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDate.ingestedEventsBytesSum) && Objects.equals(this.iotDeviceSum, usageSummaryDate.iotDeviceSum) && Objects.equals(this.iotDeviceTop99p, usageSummaryDate.iotDeviceTop99p) && Objects.equals(this.mobileRumLiteSessionCountSum, usageSummaryDate.mobileRumLiteSessionCountSum) && Objects.equals(this.mobileRumSessionCountAndroidSum, usageSummaryDate.mobileRumSessionCountAndroidSum) && Objects.equals(this.mobileRumSessionCountFlutterSum, usageSummaryDate.mobileRumSessionCountFlutterSum) && Objects.equals(this.mobileRumSessionCountIosSum, usageSummaryDate.mobileRumSessionCountIosSum) && Objects.equals(this.mobileRumSessionCountReactnativeSum, usageSummaryDate.mobileRumSessionCountReactnativeSum) && Objects.equals(this.mobileRumSessionCountSum, usageSummaryDate.mobileRumSessionCountSum) && Objects.equals(this.mobileRumUnitsSum, usageSummaryDate.mobileRumUnitsSum) && Objects.equals(this.netflowIndexedEventsCountSum, usageSummaryDate.netflowIndexedEventsCountSum) && Objects.equals(this.npmHostTop99p, usageSummaryDate.npmHostTop99p) && Objects.equals(this.observabilityPipelinesBytesProcessedSum, usageSummaryDate.observabilityPipelinesBytesProcessedSum) && Objects.equals(this.onlineArchiveEventsCountSum, usageSummaryDate.onlineArchiveEventsCountSum) && Objects.equals(this.opentelemetryApmHostTop99p, usageSummaryDate.opentelemetryApmHostTop99p) && Objects.equals(this.opentelemetryHostTop99p, usageSummaryDate.opentelemetryHostTop99p) && Objects.equals(this.orgs, usageSummaryDate.orgs) && Objects.equals(this.profilingHostTop99p, usageSummaryDate.profilingHostTop99p) && Objects.equals(this.rumBrowserAndMobileSessionCount, usageSummaryDate.rumBrowserAndMobileSessionCount) && Objects.equals(this.rumSessionCountSum, usageSummaryDate.rumSessionCountSum) && Objects.equals(this.rumTotalSessionCountSum, usageSummaryDate.rumTotalSessionCountSum) && Objects.equals(this.rumUnitsSum, usageSummaryDate.rumUnitsSum) && Objects.equals(this.sdsApmScannedBytesSum, usageSummaryDate.sdsApmScannedBytesSum) && Objects.equals(this.sdsEventsScannedBytesSum, usageSummaryDate.sdsEventsScannedBytesSum) && Objects.equals(this.sdsLogsScannedBytesSum, usageSummaryDate.sdsLogsScannedBytesSum) && Objects.equals(this.sdsRumScannedBytesSum, usageSummaryDate.sdsRumScannedBytesSum) && Objects.equals(this.sdsTotalScannedBytesSum, usageSummaryDate.sdsTotalScannedBytesSum) && Objects.equals(this.syntheticsBrowserCheckCallsCountSum, usageSummaryDate.syntheticsBrowserCheckCallsCountSum) && Objects.equals(this.syntheticsCheckCallsCountSum, usageSummaryDate.syntheticsCheckCallsCountSum) && Objects.equals(this.syntheticsParallelTestingMaxSlotsHwm, usageSummaryDate.syntheticsParallelTestingMaxSlotsHwm) && Objects.equals(this.traceSearchIndexedEventsCountSum, usageSummaryDate.traceSearchIndexedEventsCountSum) && Objects.equals(this.twolIngestedEventsBytesSum, usageSummaryDate.twolIngestedEventsBytesSum) && Objects.equals(this.vsphereHostTop99p, usageSummaryDate.vsphereHostTop99p); } + @Override public int hashCode() { - return Objects.hash( - agentHostTop99p, - apmAzureAppServiceHostTop99p, - apmFargateCountAvg, - apmHostTop99p, - appsecFargateCountAvg, - auditLogsLinesIndexedSum, - avgProfiledFargateTasks, - awsHostTop99p, - awsLambdaFuncCount, - awsLambdaInvocationsSum, - azureAppServiceTop99p, - billableIngestedBytesSum, - browserRumLiteSessionCountSum, - browserRumReplaySessionCountSum, - browserRumUnitsSum, - ciPipelineIndexedSpansSum, - ciTestIndexedSpansSum, - ciVisibilityPipelineCommittersHwm, - ciVisibilityTestCommittersHwm, - cloudCostManagementHostCountAvg, - containerAvg, - containerExclAgentAvg, - containerHwm, - cspmAasHostTop99p, - cspmAwsHostTop99p, - cspmAzureHostTop99p, - cspmContainerAvg, - cspmContainerHwm, - cspmGcpHostTop99p, - cspmHostTop99p, - customTsAvg, - cwsContainerCountAvg, - cwsHostTop99p, - date, - dbmHostTop99p, - dbmQueriesCountAvg, - fargateTasksCountAvg, - fargateTasksCountHwm, - gcpHostTop99p, - herokuHostTop99p, - incidentManagementMonthlyActiveUsersHwm, - indexedEventsCountSum, - infraHostTop99p, - ingestedEventsBytesSum, - iotDeviceSum, - iotDeviceTop99p, - mobileRumLiteSessionCountSum, - mobileRumSessionCountAndroidSum, - mobileRumSessionCountFlutterSum, - mobileRumSessionCountIosSum, - mobileRumSessionCountReactnativeSum, - mobileRumSessionCountSum, - mobileRumUnitsSum, - netflowIndexedEventsCountSum, - npmHostTop99p, - observabilityPipelinesBytesProcessedSum, - onlineArchiveEventsCountSum, - opentelemetryApmHostTop99p, - opentelemetryHostTop99p, - orgs, - profilingHostTop99p, - rumBrowserAndMobileSessionCount, - rumSessionCountSum, - rumTotalSessionCountSum, - rumUnitsSum, - sdsApmScannedBytesSum, - sdsEventsScannedBytesSum, - sdsLogsScannedBytesSum, - sdsRumScannedBytesSum, - sdsTotalScannedBytesSum, - syntheticsBrowserCheckCallsCountSum, - syntheticsCheckCallsCountSum, - syntheticsParallelTestingMaxSlotsHwm, - traceSearchIndexedEventsCountSum, - twolIngestedEventsBytesSum, - vsphereHostTop99p); + return Objects.hash(agentHostTop99p,apmAzureAppServiceHostTop99p,apmFargateCountAvg,apmHostTop99p,appsecFargateCountAvg,auditLogsLinesIndexedSum,avgProfiledFargateTasks,awsHostTop99p,awsLambdaFuncCount,awsLambdaInvocationsSum,azureAppServiceTop99p,billableIngestedBytesSum,browserRumLiteSessionCountSum,browserRumReplaySessionCountSum,browserRumUnitsSum,ciPipelineIndexedSpansSum,ciTestIndexedSpansSum,ciVisibilityPipelineCommittersHwm,ciVisibilityTestCommittersHwm,cloudCostManagementHostCountAvg,containerAvg,containerExclAgentAvg,containerHwm,cspmAasHostTop99p,cspmAwsHostTop99p,cspmAzureHostTop99p,cspmContainerAvg,cspmContainerHwm,cspmGcpHostTop99p,cspmHostTop99p,customTsAvg,cwsContainerCountAvg,cwsHostTop99p,date,dbmHostTop99p,dbmQueriesCountAvg,fargateTasksCountAvg,fargateTasksCountHwm,gcpHostTop99p,herokuHostTop99p,incidentManagementMonthlyActiveUsersHwm,indexedEventsCountSum,infraHostTop99p,ingestedEventsBytesSum,iotDeviceSum,iotDeviceTop99p,mobileRumLiteSessionCountSum,mobileRumSessionCountAndroidSum,mobileRumSessionCountFlutterSum,mobileRumSessionCountIosSum,mobileRumSessionCountReactnativeSum,mobileRumSessionCountSum,mobileRumUnitsSum,netflowIndexedEventsCountSum,npmHostTop99p,observabilityPipelinesBytesProcessedSum,onlineArchiveEventsCountSum,opentelemetryApmHostTop99p,opentelemetryHostTop99p,orgs,profilingHostTop99p,rumBrowserAndMobileSessionCount,rumSessionCountSum,rumTotalSessionCountSum,rumUnitsSum,sdsApmScannedBytesSum,sdsEventsScannedBytesSum,sdsLogsScannedBytesSum,sdsRumScannedBytesSum,sdsTotalScannedBytesSum,syntheticsBrowserCheckCallsCountSum,syntheticsCheckCallsCountSum,syntheticsParallelTestingMaxSlotsHwm,traceSearchIndexedEventsCountSum,twolIngestedEventsBytesSum,vsphereHostTop99p); } @Override @@ -2251,179 +1826,88 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSummaryDate {\n"); sb.append(" agentHostTop99p: ").append(toIndentedString(agentHostTop99p)).append("\n"); - sb.append(" apmAzureAppServiceHostTop99p: ") - .append(toIndentedString(apmAzureAppServiceHostTop99p)) - .append("\n"); + sb.append(" apmAzureAppServiceHostTop99p: ").append(toIndentedString(apmAzureAppServiceHostTop99p)).append("\n"); sb.append(" apmFargateCountAvg: ").append(toIndentedString(apmFargateCountAvg)).append("\n"); sb.append(" apmHostTop99p: ").append(toIndentedString(apmHostTop99p)).append("\n"); - sb.append(" appsecFargateCountAvg: ") - .append(toIndentedString(appsecFargateCountAvg)) - .append("\n"); - sb.append(" auditLogsLinesIndexedSum: ") - .append(toIndentedString(auditLogsLinesIndexedSum)) - .append("\n"); - sb.append(" avgProfiledFargateTasks: ") - .append(toIndentedString(avgProfiledFargateTasks)) - .append("\n"); + sb.append(" appsecFargateCountAvg: ").append(toIndentedString(appsecFargateCountAvg)).append("\n"); + sb.append(" auditLogsLinesIndexedSum: ").append(toIndentedString(auditLogsLinesIndexedSum)).append("\n"); + sb.append(" avgProfiledFargateTasks: ").append(toIndentedString(avgProfiledFargateTasks)).append("\n"); sb.append(" awsHostTop99p: ").append(toIndentedString(awsHostTop99p)).append("\n"); sb.append(" awsLambdaFuncCount: ").append(toIndentedString(awsLambdaFuncCount)).append("\n"); - sb.append(" awsLambdaInvocationsSum: ") - .append(toIndentedString(awsLambdaInvocationsSum)) - .append("\n"); - sb.append(" azureAppServiceTop99p: ") - .append(toIndentedString(azureAppServiceTop99p)) - .append("\n"); - sb.append(" billableIngestedBytesSum: ") - .append(toIndentedString(billableIngestedBytesSum)) - .append("\n"); - sb.append(" browserRumLiteSessionCountSum: ") - .append(toIndentedString(browserRumLiteSessionCountSum)) - .append("\n"); - sb.append(" browserRumReplaySessionCountSum: ") - .append(toIndentedString(browserRumReplaySessionCountSum)) - .append("\n"); + sb.append(" awsLambdaInvocationsSum: ").append(toIndentedString(awsLambdaInvocationsSum)).append("\n"); + sb.append(" azureAppServiceTop99p: ").append(toIndentedString(azureAppServiceTop99p)).append("\n"); + sb.append(" billableIngestedBytesSum: ").append(toIndentedString(billableIngestedBytesSum)).append("\n"); + sb.append(" browserRumLiteSessionCountSum: ").append(toIndentedString(browserRumLiteSessionCountSum)).append("\n"); + sb.append(" browserRumReplaySessionCountSum: ").append(toIndentedString(browserRumReplaySessionCountSum)).append("\n"); sb.append(" browserRumUnitsSum: ").append(toIndentedString(browserRumUnitsSum)).append("\n"); - sb.append(" ciPipelineIndexedSpansSum: ") - .append(toIndentedString(ciPipelineIndexedSpansSum)) - .append("\n"); - sb.append(" ciTestIndexedSpansSum: ") - .append(toIndentedString(ciTestIndexedSpansSum)) - .append("\n"); - sb.append(" ciVisibilityPipelineCommittersHwm: ") - .append(toIndentedString(ciVisibilityPipelineCommittersHwm)) - .append("\n"); - sb.append(" ciVisibilityTestCommittersHwm: ") - .append(toIndentedString(ciVisibilityTestCommittersHwm)) - .append("\n"); - sb.append(" cloudCostManagementHostCountAvg: ") - .append(toIndentedString(cloudCostManagementHostCountAvg)) - .append("\n"); + sb.append(" ciPipelineIndexedSpansSum: ").append(toIndentedString(ciPipelineIndexedSpansSum)).append("\n"); + sb.append(" ciTestIndexedSpansSum: ").append(toIndentedString(ciTestIndexedSpansSum)).append("\n"); + sb.append(" ciVisibilityPipelineCommittersHwm: ").append(toIndentedString(ciVisibilityPipelineCommittersHwm)).append("\n"); + sb.append(" ciVisibilityTestCommittersHwm: ").append(toIndentedString(ciVisibilityTestCommittersHwm)).append("\n"); + sb.append(" cloudCostManagementHostCountAvg: ").append(toIndentedString(cloudCostManagementHostCountAvg)).append("\n"); sb.append(" containerAvg: ").append(toIndentedString(containerAvg)).append("\n"); - sb.append(" containerExclAgentAvg: ") - .append(toIndentedString(containerExclAgentAvg)) - .append("\n"); + sb.append(" containerExclAgentAvg: ").append(toIndentedString(containerExclAgentAvg)).append("\n"); sb.append(" containerHwm: ").append(toIndentedString(containerHwm)).append("\n"); sb.append(" cspmAasHostTop99p: ").append(toIndentedString(cspmAasHostTop99p)).append("\n"); sb.append(" cspmAwsHostTop99p: ").append(toIndentedString(cspmAwsHostTop99p)).append("\n"); - sb.append(" cspmAzureHostTop99p: ") - .append(toIndentedString(cspmAzureHostTop99p)) - .append("\n"); + sb.append(" cspmAzureHostTop99p: ").append(toIndentedString(cspmAzureHostTop99p)).append("\n"); sb.append(" cspmContainerAvg: ").append(toIndentedString(cspmContainerAvg)).append("\n"); sb.append(" cspmContainerHwm: ").append(toIndentedString(cspmContainerHwm)).append("\n"); sb.append(" cspmGcpHostTop99p: ").append(toIndentedString(cspmGcpHostTop99p)).append("\n"); sb.append(" cspmHostTop99p: ").append(toIndentedString(cspmHostTop99p)).append("\n"); sb.append(" customTsAvg: ").append(toIndentedString(customTsAvg)).append("\n"); - sb.append(" cwsContainerCountAvg: ") - .append(toIndentedString(cwsContainerCountAvg)) - .append("\n"); + sb.append(" cwsContainerCountAvg: ").append(toIndentedString(cwsContainerCountAvg)).append("\n"); sb.append(" cwsHostTop99p: ").append(toIndentedString(cwsHostTop99p)).append("\n"); sb.append(" date: ").append(toIndentedString(date)).append("\n"); sb.append(" dbmHostTop99p: ").append(toIndentedString(dbmHostTop99p)).append("\n"); sb.append(" dbmQueriesCountAvg: ").append(toIndentedString(dbmQueriesCountAvg)).append("\n"); - sb.append(" fargateTasksCountAvg: ") - .append(toIndentedString(fargateTasksCountAvg)) - .append("\n"); - sb.append(" fargateTasksCountHwm: ") - .append(toIndentedString(fargateTasksCountHwm)) - .append("\n"); + sb.append(" fargateTasksCountAvg: ").append(toIndentedString(fargateTasksCountAvg)).append("\n"); + sb.append(" fargateTasksCountHwm: ").append(toIndentedString(fargateTasksCountHwm)).append("\n"); sb.append(" gcpHostTop99p: ").append(toIndentedString(gcpHostTop99p)).append("\n"); sb.append(" herokuHostTop99p: ").append(toIndentedString(herokuHostTop99p)).append("\n"); - sb.append(" incidentManagementMonthlyActiveUsersHwm: ") - .append(toIndentedString(incidentManagementMonthlyActiveUsersHwm)) - .append("\n"); - sb.append(" indexedEventsCountSum: ") - .append(toIndentedString(indexedEventsCountSum)) - .append("\n"); + sb.append(" incidentManagementMonthlyActiveUsersHwm: ").append(toIndentedString(incidentManagementMonthlyActiveUsersHwm)).append("\n"); + sb.append(" indexedEventsCountSum: ").append(toIndentedString(indexedEventsCountSum)).append("\n"); sb.append(" infraHostTop99p: ").append(toIndentedString(infraHostTop99p)).append("\n"); - sb.append(" ingestedEventsBytesSum: ") - .append(toIndentedString(ingestedEventsBytesSum)) - .append("\n"); + sb.append(" ingestedEventsBytesSum: ").append(toIndentedString(ingestedEventsBytesSum)).append("\n"); sb.append(" iotDeviceSum: ").append(toIndentedString(iotDeviceSum)).append("\n"); sb.append(" iotDeviceTop99p: ").append(toIndentedString(iotDeviceTop99p)).append("\n"); - sb.append(" mobileRumLiteSessionCountSum: ") - .append(toIndentedString(mobileRumLiteSessionCountSum)) - .append("\n"); - sb.append(" mobileRumSessionCountAndroidSum: ") - .append(toIndentedString(mobileRumSessionCountAndroidSum)) - .append("\n"); - sb.append(" mobileRumSessionCountFlutterSum: ") - .append(toIndentedString(mobileRumSessionCountFlutterSum)) - .append("\n"); - sb.append(" mobileRumSessionCountIosSum: ") - .append(toIndentedString(mobileRumSessionCountIosSum)) - .append("\n"); - sb.append(" mobileRumSessionCountReactnativeSum: ") - .append(toIndentedString(mobileRumSessionCountReactnativeSum)) - .append("\n"); - sb.append(" mobileRumSessionCountSum: ") - .append(toIndentedString(mobileRumSessionCountSum)) - .append("\n"); + sb.append(" mobileRumLiteSessionCountSum: ").append(toIndentedString(mobileRumLiteSessionCountSum)).append("\n"); + sb.append(" mobileRumSessionCountAndroidSum: ").append(toIndentedString(mobileRumSessionCountAndroidSum)).append("\n"); + sb.append(" mobileRumSessionCountFlutterSum: ").append(toIndentedString(mobileRumSessionCountFlutterSum)).append("\n"); + sb.append(" mobileRumSessionCountIosSum: ").append(toIndentedString(mobileRumSessionCountIosSum)).append("\n"); + sb.append(" mobileRumSessionCountReactnativeSum: ").append(toIndentedString(mobileRumSessionCountReactnativeSum)).append("\n"); + sb.append(" mobileRumSessionCountSum: ").append(toIndentedString(mobileRumSessionCountSum)).append("\n"); sb.append(" mobileRumUnitsSum: ").append(toIndentedString(mobileRumUnitsSum)).append("\n"); - sb.append(" netflowIndexedEventsCountSum: ") - .append(toIndentedString(netflowIndexedEventsCountSum)) - .append("\n"); + sb.append(" netflowIndexedEventsCountSum: ").append(toIndentedString(netflowIndexedEventsCountSum)).append("\n"); sb.append(" npmHostTop99p: ").append(toIndentedString(npmHostTop99p)).append("\n"); - sb.append(" observabilityPipelinesBytesProcessedSum: ") - .append(toIndentedString(observabilityPipelinesBytesProcessedSum)) - .append("\n"); - sb.append(" onlineArchiveEventsCountSum: ") - .append(toIndentedString(onlineArchiveEventsCountSum)) - .append("\n"); - sb.append(" opentelemetryApmHostTop99p: ") - .append(toIndentedString(opentelemetryApmHostTop99p)) - .append("\n"); - sb.append(" opentelemetryHostTop99p: ") - .append(toIndentedString(opentelemetryHostTop99p)) - .append("\n"); + sb.append(" observabilityPipelinesBytesProcessedSum: ").append(toIndentedString(observabilityPipelinesBytesProcessedSum)).append("\n"); + sb.append(" onlineArchiveEventsCountSum: ").append(toIndentedString(onlineArchiveEventsCountSum)).append("\n"); + sb.append(" opentelemetryApmHostTop99p: ").append(toIndentedString(opentelemetryApmHostTop99p)).append("\n"); + sb.append(" opentelemetryHostTop99p: ").append(toIndentedString(opentelemetryHostTop99p)).append("\n"); sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); - sb.append(" profilingHostTop99p: ") - .append(toIndentedString(profilingHostTop99p)) - .append("\n"); - sb.append(" rumBrowserAndMobileSessionCount: ") - .append(toIndentedString(rumBrowserAndMobileSessionCount)) - .append("\n"); + sb.append(" profilingHostTop99p: ").append(toIndentedString(profilingHostTop99p)).append("\n"); + sb.append(" rumBrowserAndMobileSessionCount: ").append(toIndentedString(rumBrowserAndMobileSessionCount)).append("\n"); sb.append(" rumSessionCountSum: ").append(toIndentedString(rumSessionCountSum)).append("\n"); - sb.append(" rumTotalSessionCountSum: ") - .append(toIndentedString(rumTotalSessionCountSum)) - .append("\n"); + sb.append(" rumTotalSessionCountSum: ").append(toIndentedString(rumTotalSessionCountSum)).append("\n"); sb.append(" rumUnitsSum: ").append(toIndentedString(rumUnitsSum)).append("\n"); - sb.append(" sdsApmScannedBytesSum: ") - .append(toIndentedString(sdsApmScannedBytesSum)) - .append("\n"); - sb.append(" sdsEventsScannedBytesSum: ") - .append(toIndentedString(sdsEventsScannedBytesSum)) - .append("\n"); - sb.append(" sdsLogsScannedBytesSum: ") - .append(toIndentedString(sdsLogsScannedBytesSum)) - .append("\n"); - sb.append(" sdsRumScannedBytesSum: ") - .append(toIndentedString(sdsRumScannedBytesSum)) - .append("\n"); - sb.append(" sdsTotalScannedBytesSum: ") - .append(toIndentedString(sdsTotalScannedBytesSum)) - .append("\n"); - sb.append(" syntheticsBrowserCheckCallsCountSum: ") - .append(toIndentedString(syntheticsBrowserCheckCallsCountSum)) - .append("\n"); - sb.append(" syntheticsCheckCallsCountSum: ") - .append(toIndentedString(syntheticsCheckCallsCountSum)) - .append("\n"); - sb.append(" syntheticsParallelTestingMaxSlotsHwm: ") - .append(toIndentedString(syntheticsParallelTestingMaxSlotsHwm)) - .append("\n"); - sb.append(" traceSearchIndexedEventsCountSum: ") - .append(toIndentedString(traceSearchIndexedEventsCountSum)) - .append("\n"); - sb.append(" twolIngestedEventsBytesSum: ") - .append(toIndentedString(twolIngestedEventsBytesSum)) - .append("\n"); + sb.append(" sdsApmScannedBytesSum: ").append(toIndentedString(sdsApmScannedBytesSum)).append("\n"); + sb.append(" sdsEventsScannedBytesSum: ").append(toIndentedString(sdsEventsScannedBytesSum)).append("\n"); + sb.append(" sdsLogsScannedBytesSum: ").append(toIndentedString(sdsLogsScannedBytesSum)).append("\n"); + sb.append(" sdsRumScannedBytesSum: ").append(toIndentedString(sdsRumScannedBytesSum)).append("\n"); + sb.append(" sdsTotalScannedBytesSum: ").append(toIndentedString(sdsTotalScannedBytesSum)).append("\n"); + sb.append(" syntheticsBrowserCheckCallsCountSum: ").append(toIndentedString(syntheticsBrowserCheckCallsCountSum)).append("\n"); + sb.append(" syntheticsCheckCallsCountSum: ").append(toIndentedString(syntheticsCheckCallsCountSum)).append("\n"); + sb.append(" syntheticsParallelTestingMaxSlotsHwm: ").append(toIndentedString(syntheticsParallelTestingMaxSlotsHwm)).append("\n"); + sb.append(" traceSearchIndexedEventsCountSum: ").append(toIndentedString(traceSearchIndexedEventsCountSum)).append("\n"); + sb.append(" twolIngestedEventsBytesSum: ").append(toIndentedString(twolIngestedEventsBytesSum)).append("\n"); sb.append(" vsphereHostTop99p: ").append(toIndentedString(vsphereHostTop99p)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDateOrg.java b/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDateOrg.java index 27ffbcad2b0..dd0e2da1a22 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDateOrg.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSummaryDateOrg.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Global hourly report of all data billed by Datadog for a given organization. */ + +/** + *

Global hourly report of all data billed by Datadog for a given organization.

+ */ @JsonPropertyOrder({ UsageSummaryDateOrg.JSON_PROPERTY_AGENT_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P, @@ -93,15 +113,14 @@ UsageSummaryDateOrg.JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM, UsageSummaryDateOrg.JSON_PROPERTY_VSPHERE_HOST_TOP99P }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSummaryDateOrg { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGENT_HOST_TOP99P = "agent_host_top99p"; private Long agentHostTop99p; - public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P = - "apm_azure_app_service_host_top99p"; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P = "apm_azure_app_service_host_top99p"; private Long apmAzureAppServiceHostTop99p; public static final String JSON_PROPERTY_APM_FARGATE_COUNT_AVG = "apm_fargate_count_avg"; @@ -113,12 +132,10 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG = "appsec_fargate_count_avg"; private Long appsecFargateCountAvg; - public static final String JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM = - "audit_logs_lines_indexed_sum"; + public static final String JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM = "audit_logs_lines_indexed_sum"; private Long auditLogsLinesIndexedSum; - public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = - "avg_profiled_fargate_tasks"; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = "avg_profiled_fargate_tasks"; private Long avgProfiledFargateTasks; public static final String JSON_PROPERTY_AWS_HOST_TOP99P = "aws_host_top99p"; @@ -127,45 +144,37 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT = "aws_lambda_func_count"; private Long awsLambdaFuncCount; - public static final String JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM = - "aws_lambda_invocations_sum"; + public static final String JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM = "aws_lambda_invocations_sum"; private Long awsLambdaInvocationsSum; public static final String JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P = "azure_app_service_top99p"; private Long azureAppServiceTop99p; - public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM = - "billable_ingested_bytes_sum"; + public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM = "billable_ingested_bytes_sum"; private Long billableIngestedBytesSum; - public static final String JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM = - "browser_rum_lite_session_count_sum"; + public static final String JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM = "browser_rum_lite_session_count_sum"; private Long browserRumLiteSessionCountSum; - public static final String JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM = - "browser_rum_replay_session_count_sum"; + public static final String JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM = "browser_rum_replay_session_count_sum"; private Long browserRumReplaySessionCountSum; public static final String JSON_PROPERTY_BROWSER_RUM_UNITS_SUM = "browser_rum_units_sum"; private Long browserRumUnitsSum; - public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM = - "ci_pipeline_indexed_spans_sum"; + public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM = "ci_pipeline_indexed_spans_sum"; private Long ciPipelineIndexedSpansSum; public static final String JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM = "ci_test_indexed_spans_sum"; private Long ciTestIndexedSpansSum; - public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM = - "ci_visibility_pipeline_committers_hwm"; + public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM = "ci_visibility_pipeline_committers_hwm"; private Long ciVisibilityPipelineCommittersHwm; - public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM = - "ci_visibility_test_committers_hwm"; + public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM = "ci_visibility_test_committers_hwm"; private Long ciVisibilityTestCommittersHwm; - public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG = - "cloud_cost_management_host_count_avg"; + public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG = "cloud_cost_management_host_count_avg"; private Long cloudCostManagementHostCountAvg; public static final String JSON_PROPERTY_CONTAINER_AVG = "container_avg"; @@ -228,8 +237,7 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_ID = "id"; private String id; - public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM = - "incident_management_monthly_active_users_hwm"; + public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM = "incident_management_monthly_active_users_hwm"; private Long incidentManagementMonthlyActiveUsersHwm; public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM = "indexed_events_count_sum"; @@ -247,28 +255,22 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM = "iot_device_top99p_sum"; private Long iotDeviceTop99pSum; - public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM = - "mobile_rum_lite_session_count_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM = "mobile_rum_lite_session_count_sum"; private Long mobileRumLiteSessionCountSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM = - "mobile_rum_session_count_android_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM = "mobile_rum_session_count_android_sum"; private Long mobileRumSessionCountAndroidSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM = - "mobile_rum_session_count_flutter_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM = "mobile_rum_session_count_flutter_sum"; private Long mobileRumSessionCountFlutterSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM = - "mobile_rum_session_count_ios_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM = "mobile_rum_session_count_ios_sum"; private Long mobileRumSessionCountIosSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM = - "mobile_rum_session_count_reactnative_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM = "mobile_rum_session_count_reactnative_sum"; private Long mobileRumSessionCountReactnativeSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM = - "mobile_rum_session_count_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM = "mobile_rum_session_count_sum"; private Long mobileRumSessionCountSum; public static final String JSON_PROPERTY_MOBILE_RUM_UNITS_SUM = "mobile_rum_units_sum"; @@ -277,23 +279,19 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_NAME = "name"; private String name; - public static final String JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM = - "netflow_indexed_events_count_sum"; + public static final String JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM = "netflow_indexed_events_count_sum"; private Long netflowIndexedEventsCountSum; public static final String JSON_PROPERTY_NPM_HOST_TOP99P = "npm_host_top99p"; private Long npmHostTop99p; - public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM = - "observability_pipelines_bytes_processed_sum"; + public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM = "observability_pipelines_bytes_processed_sum"; private Long observabilityPipelinesBytesProcessedSum; - public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM = - "online_archive_events_count_sum"; + public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM = "online_archive_events_count_sum"; private Long onlineArchiveEventsCountSum; - public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P = - "opentelemetry_apm_host_top99p"; + public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P = "opentelemetry_apm_host_top99p"; private Long opentelemetryApmHostTop99p; public static final String JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P = "opentelemetry_host_top99p"; @@ -308,15 +306,13 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_REGION = "region"; private String region; - public static final String JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT = - "rum_browser_and_mobile_session_count"; + public static final String JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT = "rum_browser_and_mobile_session_count"; private Long rumBrowserAndMobileSessionCount; public static final String JSON_PROPERTY_RUM_SESSION_COUNT_SUM = "rum_session_count_sum"; private Long rumSessionCountSum; - public static final String JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM = - "rum_total_session_count_sum"; + public static final String JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM = "rum_total_session_count_sum"; private Long rumTotalSessionCountSum; public static final String JSON_PROPERTY_RUM_UNITS_SUM = "rum_units_sum"; @@ -325,39 +321,31 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM = "sds_apm_scanned_bytes_sum"; private Long sdsApmScannedBytesSum; - public static final String JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM = - "sds_events_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM = "sds_events_scanned_bytes_sum"; private Long sdsEventsScannedBytesSum; - public static final String JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM = - "sds_logs_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM = "sds_logs_scanned_bytes_sum"; private Long sdsLogsScannedBytesSum; public static final String JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM = "sds_rum_scanned_bytes_sum"; private Long sdsRumScannedBytesSum; - public static final String JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM = - "sds_total_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM = "sds_total_scanned_bytes_sum"; private Long sdsTotalScannedBytesSum; - public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM = - "synthetics_browser_check_calls_count_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM = "synthetics_browser_check_calls_count_sum"; private Long syntheticsBrowserCheckCallsCountSum; - public static final String JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM = - "synthetics_check_calls_count_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM = "synthetics_check_calls_count_sum"; private Long syntheticsCheckCallsCountSum; - public static final String JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM = - "synthetics_parallel_testing_max_slots_hwm"; + public static final String JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM = "synthetics_parallel_testing_max_slots_hwm"; private Long syntheticsParallelTestingMaxSlotsHwm; - public static final String JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM = - "trace_search_indexed_events_count_sum"; + public static final String JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM = "trace_search_indexed_events_count_sum"; private Long traceSearchIndexedEventsCountSum; - public static final String JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM = - "twol_ingested_events_bytes_sum"; + public static final String JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM = "twol_ingested_events_bytes_sum"; private Long twolIngestedEventsBytesSum; public static final String JSON_PROPERTY_VSPHERE_HOST_TOP99P = "vsphere_host_top99p"; @@ -369,1709 +357,1486 @@ public UsageSummaryDateOrg agentHostTop99p(Long agentHostTop99p) { } /** - * Shows the 99th percentile of all agent hosts over all hours in the current date for the given - * org. - * + *

Shows the 99th percentile of all agent hosts over all hours in the current date for the given org.

* @return agentHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAgentHostTop99p() { - return agentHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAgentHostTop99p() { + return agentHostTop99p; + } public void setAgentHostTop99p(Long agentHostTop99p) { this.agentHostTop99p = agentHostTop99p; } - public UsageSummaryDateOrg apmAzureAppServiceHostTop99p(Long apmAzureAppServiceHostTop99p) { this.apmAzureAppServiceHostTop99p = apmAzureAppServiceHostTop99p; return this; } /** - * Shows the 99th percentile of all Azure app services using APM over all hours in the current - * date for the given org. - * + *

Shows the 99th percentile of all Azure app services using APM over all hours in the current date for the given org.

* @return apmAzureAppServiceHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmAzureAppServiceHostTop99p() { - return apmAzureAppServiceHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmAzureAppServiceHostTop99p() { + return apmAzureAppServiceHostTop99p; + } public void setApmAzureAppServiceHostTop99p(Long apmAzureAppServiceHostTop99p) { this.apmAzureAppServiceHostTop99p = apmAzureAppServiceHostTop99p; } - public UsageSummaryDateOrg apmFargateCountAvg(Long apmFargateCountAvg) { this.apmFargateCountAvg = apmFargateCountAvg; return this; } /** - * Shows the average of all APM ECS Fargate tasks over all hours in the current months for the - * given org. - * + *

Shows the average of all APM ECS Fargate tasks over all hours in the current months for the given org.

* @return apmFargateCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmFargateCountAvg() { - return apmFargateCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmFargateCountAvg() { + return apmFargateCountAvg; + } public void setApmFargateCountAvg(Long apmFargateCountAvg) { this.apmFargateCountAvg = apmFargateCountAvg; } - public UsageSummaryDateOrg apmHostTop99p(Long apmHostTop99p) { this.apmHostTop99p = apmHostTop99p; return this; } /** - * Shows the 99th percentile of all distinct APM hosts over all hours in the current date for the - * given org. - * + *

Shows the 99th percentile of all distinct APM hosts over all hours in the current date for the given org.

* @return apmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmHostTop99p() { - return apmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmHostTop99p() { + return apmHostTop99p; + } public void setApmHostTop99p(Long apmHostTop99p) { this.apmHostTop99p = apmHostTop99p; } - public UsageSummaryDateOrg appsecFargateCountAvg(Long appsecFargateCountAvg) { this.appsecFargateCountAvg = appsecFargateCountAvg; return this; } /** - * Shows the average of all Application Security Monitoring ECS Fargate tasks over all hours in - * the current months for the given org. - * + *

Shows the average of all Application Security Monitoring ECS Fargate tasks over all hours in the current months for the given org.

* @return appsecFargateCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAppsecFargateCountAvg() { - return appsecFargateCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAppsecFargateCountAvg() { + return appsecFargateCountAvg; + } public void setAppsecFargateCountAvg(Long appsecFargateCountAvg) { this.appsecFargateCountAvg = appsecFargateCountAvg; } - public UsageSummaryDateOrg auditLogsLinesIndexedSum(Long auditLogsLinesIndexedSum) { this.auditLogsLinesIndexedSum = auditLogsLinesIndexedSum; return this; } /** - * Shows the sum of all audit logs lines indexed over all hours in the current date for the given - * org. - * + *

Shows the sum of all audit logs lines indexed over all hours in the current date for the given org.

* @return auditLogsLinesIndexedSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAuditLogsLinesIndexedSum() { - return auditLogsLinesIndexedSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAuditLogsLinesIndexedSum() { + return auditLogsLinesIndexedSum; + } public void setAuditLogsLinesIndexedSum(Long auditLogsLinesIndexedSum) { this.auditLogsLinesIndexedSum = auditLogsLinesIndexedSum; } - public UsageSummaryDateOrg avgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; return this; } /** - * The average profiled task count for Fargate Profiling. - * + *

The average profiled task count for Fargate Profiling.

* @return avgProfiledFargateTasks - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAvgProfiledFargateTasks() { - return avgProfiledFargateTasks; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAvgProfiledFargateTasks() { + return avgProfiledFargateTasks; + } public void setAvgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; } - public UsageSummaryDateOrg awsHostTop99p(Long awsHostTop99p) { this.awsHostTop99p = awsHostTop99p; return this; } /** - * Shows the 99th percentile of all AWS hosts over all hours in the current date for the given - * org. - * + *

Shows the 99th percentile of all AWS hosts over all hours in the current date for the given org.

* @return awsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsHostTop99p() { - return awsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsHostTop99p() { + return awsHostTop99p; + } public void setAwsHostTop99p(Long awsHostTop99p) { this.awsHostTop99p = awsHostTop99p; } - public UsageSummaryDateOrg awsLambdaFuncCount(Long awsLambdaFuncCount) { this.awsLambdaFuncCount = awsLambdaFuncCount; return this; } /** - * Shows the sum of all AWS Lambda invocations over all hours in the current date for the given - * org. - * + *

Shows the sum of all AWS Lambda invocations over all hours in the current date for the given org.

* @return awsLambdaFuncCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsLambdaFuncCount() { - return awsLambdaFuncCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsLambdaFuncCount() { + return awsLambdaFuncCount; + } public void setAwsLambdaFuncCount(Long awsLambdaFuncCount) { this.awsLambdaFuncCount = awsLambdaFuncCount; } - public UsageSummaryDateOrg awsLambdaInvocationsSum(Long awsLambdaInvocationsSum) { this.awsLambdaInvocationsSum = awsLambdaInvocationsSum; return this; } /** - * Shows the sum of all AWS Lambda invocations over all hours in the current date for the given - * org. - * + *

Shows the sum of all AWS Lambda invocations over all hours in the current date for the given org.

* @return awsLambdaInvocationsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsLambdaInvocationsSum() { - return awsLambdaInvocationsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsLambdaInvocationsSum() { + return awsLambdaInvocationsSum; + } public void setAwsLambdaInvocationsSum(Long awsLambdaInvocationsSum) { this.awsLambdaInvocationsSum = awsLambdaInvocationsSum; } - public UsageSummaryDateOrg azureAppServiceTop99p(Long azureAppServiceTop99p) { this.azureAppServiceTop99p = azureAppServiceTop99p; return this; } /** - * Shows the 99th percentile of all Azure app services over all hours in the current date for the - * given org. - * + *

Shows the 99th percentile of all Azure app services over all hours in the current date for the given org.

* @return azureAppServiceTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAzureAppServiceTop99p() { - return azureAppServiceTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAzureAppServiceTop99p() { + return azureAppServiceTop99p; + } public void setAzureAppServiceTop99p(Long azureAppServiceTop99p) { this.azureAppServiceTop99p = azureAppServiceTop99p; } - public UsageSummaryDateOrg billableIngestedBytesSum(Long billableIngestedBytesSum) { this.billableIngestedBytesSum = billableIngestedBytesSum; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current date for the given org. - * + *

Shows the sum of all log bytes ingested over all hours in the current date for the given org.

* @return billableIngestedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBillableIngestedBytesSum() { - return billableIngestedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBillableIngestedBytesSum() { + return billableIngestedBytesSum; + } public void setBillableIngestedBytesSum(Long billableIngestedBytesSum) { this.billableIngestedBytesSum = billableIngestedBytesSum; } - public UsageSummaryDateOrg browserRumLiteSessionCountSum(Long browserRumLiteSessionCountSum) { this.browserRumLiteSessionCountSum = browserRumLiteSessionCountSum; return this; } /** - * Shows the sum of all browser lite sessions over all hours in the current date for the given - * org. - * + *

Shows the sum of all browser lite sessions over all hours in the current date for the given org.

* @return browserRumLiteSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumLiteSessionCountSum() { - return browserRumLiteSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumLiteSessionCountSum() { + return browserRumLiteSessionCountSum; + } public void setBrowserRumLiteSessionCountSum(Long browserRumLiteSessionCountSum) { this.browserRumLiteSessionCountSum = browserRumLiteSessionCountSum; } - public UsageSummaryDateOrg browserRumReplaySessionCountSum(Long browserRumReplaySessionCountSum) { this.browserRumReplaySessionCountSum = browserRumReplaySessionCountSum; return this; } /** - * Shows the sum of all browser replay sessions over all hours in the current date for the given - * org. - * + *

Shows the sum of all browser replay sessions over all hours in the current date for the given org.

* @return browserRumReplaySessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumReplaySessionCountSum() { - return browserRumReplaySessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumReplaySessionCountSum() { + return browserRumReplaySessionCountSum; + } public void setBrowserRumReplaySessionCountSum(Long browserRumReplaySessionCountSum) { this.browserRumReplaySessionCountSum = browserRumReplaySessionCountSum; } - public UsageSummaryDateOrg browserRumUnitsSum(Long browserRumUnitsSum) { this.browserRumUnitsSum = browserRumUnitsSum; return this; } /** - * Shows the sum of all browser RUM units over all hours in the current date for the given org. - * + *

Shows the sum of all browser RUM units over all hours in the current date for the given org.

* @return browserRumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumUnitsSum() { - return browserRumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumUnitsSum() { + return browserRumUnitsSum; + } public void setBrowserRumUnitsSum(Long browserRumUnitsSum) { this.browserRumUnitsSum = browserRumUnitsSum; } - public UsageSummaryDateOrg ciPipelineIndexedSpansSum(Long ciPipelineIndexedSpansSum) { this.ciPipelineIndexedSpansSum = ciPipelineIndexedSpansSum; return this; } /** - * Shows the sum of all CI pipeline indexed spans over all hours in the current date for the given - * org. - * + *

Shows the sum of all CI pipeline indexed spans over all hours in the current date for the given org.

* @return ciPipelineIndexedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiPipelineIndexedSpansSum() { - return ciPipelineIndexedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiPipelineIndexedSpansSum() { + return ciPipelineIndexedSpansSum; + } public void setCiPipelineIndexedSpansSum(Long ciPipelineIndexedSpansSum) { this.ciPipelineIndexedSpansSum = ciPipelineIndexedSpansSum; } - public UsageSummaryDateOrg ciTestIndexedSpansSum(Long ciTestIndexedSpansSum) { this.ciTestIndexedSpansSum = ciTestIndexedSpansSum; return this; } /** - * Shows the sum of all CI test indexed spans over all hours in the current date for the given - * org. - * + *

Shows the sum of all CI test indexed spans over all hours in the current date for the given org.

* @return ciTestIndexedSpansSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiTestIndexedSpansSum() { - return ciTestIndexedSpansSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiTestIndexedSpansSum() { + return ciTestIndexedSpansSum; + } public void setCiTestIndexedSpansSum(Long ciTestIndexedSpansSum) { this.ciTestIndexedSpansSum = ciTestIndexedSpansSum; } - - public UsageSummaryDateOrg ciVisibilityPipelineCommittersHwm( - Long ciVisibilityPipelineCommittersHwm) { + public UsageSummaryDateOrg ciVisibilityPipelineCommittersHwm(Long ciVisibilityPipelineCommittersHwm) { this.ciVisibilityPipelineCommittersHwm = ciVisibilityPipelineCommittersHwm; return this; } /** - * Shows the high-water mark of all CI visibility pipeline committers over all hours in the - * current date for the given org. - * + *

Shows the high-water mark of all CI visibility pipeline committers over all hours in the current date for the given org.

* @return ciVisibilityPipelineCommittersHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityPipelineCommittersHwm() { - return ciVisibilityPipelineCommittersHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityPipelineCommittersHwm() { + return ciVisibilityPipelineCommittersHwm; + } public void setCiVisibilityPipelineCommittersHwm(Long ciVisibilityPipelineCommittersHwm) { this.ciVisibilityPipelineCommittersHwm = ciVisibilityPipelineCommittersHwm; } - public UsageSummaryDateOrg ciVisibilityTestCommittersHwm(Long ciVisibilityTestCommittersHwm) { this.ciVisibilityTestCommittersHwm = ciVisibilityTestCommittersHwm; return this; } /** - * Shows the high-water mark of all CI visibility test committers over all hours in the current - * date for the given org. - * + *

Shows the high-water mark of all CI visibility test committers over all hours in the current date for the given org.

* @return ciVisibilityTestCommittersHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityTestCommittersHwm() { - return ciVisibilityTestCommittersHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityTestCommittersHwm() { + return ciVisibilityTestCommittersHwm; + } public void setCiVisibilityTestCommittersHwm(Long ciVisibilityTestCommittersHwm) { this.ciVisibilityTestCommittersHwm = ciVisibilityTestCommittersHwm; } - public UsageSummaryDateOrg cloudCostManagementHostCountAvg(Long cloudCostManagementHostCountAvg) { this.cloudCostManagementHostCountAvg = cloudCostManagementHostCountAvg; return this; } /** - * Host count average of Cloud Cost Management for the given date and given org. - * + *

Host count average of Cloud Cost Management for the given date and given org.

* @return cloudCostManagementHostCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCloudCostManagementHostCountAvg() { - return cloudCostManagementHostCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCloudCostManagementHostCountAvg() { + return cloudCostManagementHostCountAvg; + } public void setCloudCostManagementHostCountAvg(Long cloudCostManagementHostCountAvg) { this.cloudCostManagementHostCountAvg = cloudCostManagementHostCountAvg; } - public UsageSummaryDateOrg containerAvg(Long containerAvg) { this.containerAvg = containerAvg; return this; } /** - * Shows the average of all distinct containers over all hours in the current date for the given - * org. - * + *

Shows the average of all distinct containers over all hours in the current date for the given org.

* @return containerAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerAvg() { - return containerAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerAvg() { + return containerAvg; + } public void setContainerAvg(Long containerAvg) { this.containerAvg = containerAvg; } - public UsageSummaryDateOrg containerExclAgentAvg(Long containerExclAgentAvg) { this.containerExclAgentAvg = containerExclAgentAvg; return this; } /** - * Shows the average of containers without the Datadog Agent over all hours in the current date - * for the given organization. - * + *

Shows the average of containers without the Datadog Agent over all hours in the current date for the given organization.

* @return containerExclAgentAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerExclAgentAvg() { - return containerExclAgentAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerExclAgentAvg() { + return containerExclAgentAvg; + } public void setContainerExclAgentAvg(Long containerExclAgentAvg) { this.containerExclAgentAvg = containerExclAgentAvg; } - public UsageSummaryDateOrg containerHwm(Long containerHwm) { this.containerHwm = containerHwm; return this; } /** - * Shows the high-water mark of all distinct containers over all hours in the current date for the - * given org. - * + *

Shows the high-water mark of all distinct containers over all hours in the current date for the given org.

* @return containerHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerHwm() { - return containerHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerHwm() { + return containerHwm; + } public void setContainerHwm(Long containerHwm) { this.containerHwm = containerHwm; } - public UsageSummaryDateOrg cspmAasHostTop99p(Long cspmAasHostTop99p) { this.cspmAasHostTop99p = cspmAasHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts - * over all hours in the current date for the given org. - * + *

Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current date for the given org.

* @return cspmAasHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AAS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAasHostTop99p() { - return cspmAasHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AAS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAasHostTop99p() { + return cspmAasHostTop99p; + } public void setCspmAasHostTop99p(Long cspmAasHostTop99p) { this.cspmAasHostTop99p = cspmAasHostTop99p; } - public UsageSummaryDateOrg cspmAwsHostTop99p(Long cspmAwsHostTop99p) { this.cspmAwsHostTop99p = cspmAwsHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management AWS hosts over all hours in - * the current date for the given org. - * + *

Shows the 99th percentile of all Cloud Security Posture Management AWS hosts over all hours in the current date for the given org.

* @return cspmAwsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAwsHostTop99p() { - return cspmAwsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAwsHostTop99p() { + return cspmAwsHostTop99p; + } public void setCspmAwsHostTop99p(Long cspmAwsHostTop99p) { this.cspmAwsHostTop99p = cspmAwsHostTop99p; } - public UsageSummaryDateOrg cspmAzureHostTop99p(Long cspmAzureHostTop99p) { this.cspmAzureHostTop99p = cspmAzureHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours - * in the current date for the given org. - * + *

Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current date for the given org.

* @return cspmAzureHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAzureHostTop99p() { - return cspmAzureHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAzureHostTop99p() { + return cspmAzureHostTop99p; + } public void setCspmAzureHostTop99p(Long cspmAzureHostTop99p) { this.cspmAzureHostTop99p = cspmAzureHostTop99p; } - public UsageSummaryDateOrg cspmContainerAvg(Long cspmContainerAvg) { this.cspmContainerAvg = cspmContainerAvg; return this; } /** - * Shows the average number of Cloud Security Posture Management containers over all hours in the - * current date for the given org. - * + *

Shows the average number of Cloud Security Posture Management containers over all hours in the current date for the given org.

* @return cspmContainerAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmContainerAvg() { - return cspmContainerAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmContainerAvg() { + return cspmContainerAvg; + } public void setCspmContainerAvg(Long cspmContainerAvg) { this.cspmContainerAvg = cspmContainerAvg; } - public UsageSummaryDateOrg cspmContainerHwm(Long cspmContainerHwm) { this.cspmContainerHwm = cspmContainerHwm; return this; } /** - * Shows the high-water mark of Cloud Security Posture Management containers over all hours in the - * current date for the given org. - * + *

Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for the given org.

* @return cspmContainerHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmContainerHwm() { - return cspmContainerHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmContainerHwm() { + return cspmContainerHwm; + } public void setCspmContainerHwm(Long cspmContainerHwm) { this.cspmContainerHwm = cspmContainerHwm; } - public UsageSummaryDateOrg cspmGcpHostTop99p(Long cspmGcpHostTop99p) { this.cspmGcpHostTop99p = cspmGcpHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in - * the current date for the given org. - * + *

Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in the current date for the given org.

* @return cspmGcpHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_GCP_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmGcpHostTop99p() { - return cspmGcpHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_GCP_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmGcpHostTop99p() { + return cspmGcpHostTop99p; + } public void setCspmGcpHostTop99p(Long cspmGcpHostTop99p) { this.cspmGcpHostTop99p = cspmGcpHostTop99p; } - public UsageSummaryDateOrg cspmHostTop99p(Long cspmHostTop99p) { this.cspmHostTop99p = cspmHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the - * current date for the given org. - * + *

Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for the given org.

* @return cspmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmHostTop99p() { - return cspmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmHostTop99p() { + return cspmHostTop99p; + } public void setCspmHostTop99p(Long cspmHostTop99p) { this.cspmHostTop99p = cspmHostTop99p; } - public UsageSummaryDateOrg customTsAvg(Long customTsAvg) { this.customTsAvg = customTsAvg; return this; } /** - * Shows the average number of distinct custom metrics over all hours in the current date for the - * given org. - * + *

Shows the average number of distinct custom metrics over all hours in the current date for the given org.

* @return customTsAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TS_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCustomTsAvg() { - return customTsAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TS_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCustomTsAvg() { + return customTsAvg; + } public void setCustomTsAvg(Long customTsAvg) { this.customTsAvg = customTsAvg; } - public UsageSummaryDateOrg cwsContainerCountAvg(Long cwsContainerCountAvg) { this.cwsContainerCountAvg = cwsContainerCountAvg; return this; } /** - * Shows the average of all distinct Cloud Workload Security containers over all hours in the - * current date for the given org. - * + *

Shows the average of all distinct Cloud Workload Security containers over all hours in the current date for the given org.

* @return cwsContainerCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsContainerCountAvg() { - return cwsContainerCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINER_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsContainerCountAvg() { + return cwsContainerCountAvg; + } public void setCwsContainerCountAvg(Long cwsContainerCountAvg) { this.cwsContainerCountAvg = cwsContainerCountAvg; } - public UsageSummaryDateOrg cwsHostTop99p(Long cwsHostTop99p) { this.cwsHostTop99p = cwsHostTop99p; return this; } /** - * Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current - * date for the given org. - * + *

Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current date for the given org.

* @return cwsHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsHostTop99p() { - return cwsHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsHostTop99p() { + return cwsHostTop99p; + } public void setCwsHostTop99p(Long cwsHostTop99p) { this.cwsHostTop99p = cwsHostTop99p; } - public UsageSummaryDateOrg dbmHostTop99pSum(Long dbmHostTop99pSum) { this.dbmHostTop99pSum = dbmHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month - * for the given org. - * + *

Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for the given org.

* @return dbmHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmHostTop99pSum() { - return dbmHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmHostTop99pSum() { + return dbmHostTop99pSum; + } public void setDbmHostTop99pSum(Long dbmHostTop99pSum) { this.dbmHostTop99pSum = dbmHostTop99pSum; } - public UsageSummaryDateOrg dbmQueriesAvgSum(Long dbmQueriesAvgSum) { this.dbmQueriesAvgSum = dbmQueriesAvgSum; return this; } /** - * Shows the average of all distinct Database Monitoring normalized queries over all hours in the - * current month for the given org. - * + *

Shows the average of all distinct Database Monitoring normalized queries over all hours in the current month for the given org.

* @return dbmQueriesAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmQueriesAvgSum() { - return dbmQueriesAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmQueriesAvgSum() { + return dbmQueriesAvgSum; + } public void setDbmQueriesAvgSum(Long dbmQueriesAvgSum) { this.dbmQueriesAvgSum = dbmQueriesAvgSum; } - public UsageSummaryDateOrg fargateTasksCountAvg(Long fargateTasksCountAvg) { this.fargateTasksCountAvg = fargateTasksCountAvg; return this; } /** - * The average task count for Fargate. - * + *

The average task count for Fargate.

* @return fargateTasksCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFargateTasksCountAvg() { - return fargateTasksCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFargateTasksCountAvg() { + return fargateTasksCountAvg; + } public void setFargateTasksCountAvg(Long fargateTasksCountAvg) { this.fargateTasksCountAvg = fargateTasksCountAvg; } - public UsageSummaryDateOrg fargateTasksCountHwm(Long fargateTasksCountHwm) { this.fargateTasksCountHwm = fargateTasksCountHwm; return this; } /** - * Shows the high-water mark of all Fargate tasks over all hours in the current date for the given - * org. - * + *

Shows the high-water mark of all Fargate tasks over all hours in the current date for the given org.

* @return fargateTasksCountHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFargateTasksCountHwm() { - return fargateTasksCountHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFargateTasksCountHwm() { + return fargateTasksCountHwm; + } public void setFargateTasksCountHwm(Long fargateTasksCountHwm) { this.fargateTasksCountHwm = fargateTasksCountHwm; } - public UsageSummaryDateOrg gcpHostTop99p(Long gcpHostTop99p) { this.gcpHostTop99p = gcpHostTop99p; return this; } /** - * Shows the 99th percentile of all GCP hosts over all hours in the current date for the given - * org. - * + *

Shows the 99th percentile of all GCP hosts over all hours in the current date for the given org.

* @return gcpHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GCP_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getGcpHostTop99p() { - return gcpHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GCP_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getGcpHostTop99p() { + return gcpHostTop99p; + } public void setGcpHostTop99p(Long gcpHostTop99p) { this.gcpHostTop99p = gcpHostTop99p; } - public UsageSummaryDateOrg herokuHostTop99p(Long herokuHostTop99p) { this.herokuHostTop99p = herokuHostTop99p; return this; } /** - * Shows the 99th percentile of all Heroku dynos over all hours in the current date for the given - * org. - * + *

Shows the 99th percentile of all Heroku dynos over all hours in the current date for the given org.

* @return herokuHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEROKU_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHerokuHostTop99p() { - return herokuHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEROKU_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHerokuHostTop99p() { + return herokuHostTop99p; + } public void setHerokuHostTop99p(Long herokuHostTop99p) { this.herokuHostTop99p = herokuHostTop99p; } - public UsageSummaryDateOrg id(String id) { this.id = id; return this; } /** - * The organization id. - * + *

The organization id.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public UsageSummaryDateOrg incidentManagementMonthlyActiveUsersHwm( - Long incidentManagementMonthlyActiveUsersHwm) { + public UsageSummaryDateOrg incidentManagementMonthlyActiveUsersHwm(Long incidentManagementMonthlyActiveUsersHwm) { this.incidentManagementMonthlyActiveUsersHwm = incidentManagementMonthlyActiveUsersHwm; return this; } /** - * Shows the high-water mark of incident management monthly active users over all hours in the - * current date for the given org. - * + *

Shows the high-water mark of incident management monthly active users over all hours in the current date for the given org.

* @return incidentManagementMonthlyActiveUsersHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIncidentManagementMonthlyActiveUsersHwm() { - return incidentManagementMonthlyActiveUsersHwm; - } - - public void setIncidentManagementMonthlyActiveUsersHwm( - Long incidentManagementMonthlyActiveUsersHwm) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIncidentManagementMonthlyActiveUsersHwm() { + return incidentManagementMonthlyActiveUsersHwm; + } + public void setIncidentManagementMonthlyActiveUsersHwm(Long incidentManagementMonthlyActiveUsersHwm) { this.incidentManagementMonthlyActiveUsersHwm = incidentManagementMonthlyActiveUsersHwm; } - public UsageSummaryDateOrg indexedEventsCountSum(Long indexedEventsCountSum) { this.indexedEventsCountSum = indexedEventsCountSum; return this; } /** - * Shows the sum of all log events indexed over all hours in the current date for the given org. - * + *

Shows the sum of all log events indexed over all hours in the current date for the given org.

* @return indexedEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCountSum() { - return indexedEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCountSum() { + return indexedEventsCountSum; + } public void setIndexedEventsCountSum(Long indexedEventsCountSum) { this.indexedEventsCountSum = indexedEventsCountSum; } - public UsageSummaryDateOrg infraHostTop99p(Long infraHostTop99p) { this.infraHostTop99p = infraHostTop99p; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current - * date for the given org. - * + *

Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for the given org.

* @return infraHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostTop99p() { - return infraHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostTop99p() { + return infraHostTop99p; + } public void setInfraHostTop99p(Long infraHostTop99p) { this.infraHostTop99p = infraHostTop99p; } - public UsageSummaryDateOrg ingestedEventsBytesSum(Long ingestedEventsBytesSum) { this.ingestedEventsBytesSum = ingestedEventsBytesSum; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current date for the given org. - * + *

Shows the sum of all log bytes ingested over all hours in the current date for the given org.

* @return ingestedEventsBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytesSum() { - return ingestedEventsBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestedEventsBytesSum() { + return ingestedEventsBytesSum; + } public void setIngestedEventsBytesSum(Long ingestedEventsBytesSum) { this.ingestedEventsBytesSum = ingestedEventsBytesSum; } - public UsageSummaryDateOrg iotDeviceAggSum(Long iotDeviceAggSum) { this.iotDeviceAggSum = iotDeviceAggSum; return this; } /** - * Shows the sum of all IoT devices over all hours in the current date for the given org. - * + *

Shows the sum of all IoT devices over all hours in the current date for the given org.

* @return iotDeviceAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceAggSum() { - return iotDeviceAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceAggSum() { + return iotDeviceAggSum; + } public void setIotDeviceAggSum(Long iotDeviceAggSum) { this.iotDeviceAggSum = iotDeviceAggSum; } - public UsageSummaryDateOrg iotDeviceTop99pSum(Long iotDeviceTop99pSum) { this.iotDeviceTop99pSum = iotDeviceTop99pSum; return this; } /** - * Shows the 99th percentile of all IoT devices over all hours in the current date for the given - * org. - * + *

Shows the 99th percentile of all IoT devices over all hours in the current date for the given org.

* @return iotDeviceTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceTop99pSum() { - return iotDeviceTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceTop99pSum() { + return iotDeviceTop99pSum; + } public void setIotDeviceTop99pSum(Long iotDeviceTop99pSum) { this.iotDeviceTop99pSum = iotDeviceTop99pSum; } - public UsageSummaryDateOrg mobileRumLiteSessionCountSum(Long mobileRumLiteSessionCountSum) { this.mobileRumLiteSessionCountSum = mobileRumLiteSessionCountSum; return this; } /** - * Shows the sum of all mobile lite sessions over all hours in the current date for the given org. - * + *

Shows the sum of all mobile lite sessions over all hours in the current date for the given org.

* @return mobileRumLiteSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumLiteSessionCountSum() { - return mobileRumLiteSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumLiteSessionCountSum() { + return mobileRumLiteSessionCountSum; + } public void setMobileRumLiteSessionCountSum(Long mobileRumLiteSessionCountSum) { this.mobileRumLiteSessionCountSum = mobileRumLiteSessionCountSum; } - public UsageSummaryDateOrg mobileRumSessionCountAndroidSum(Long mobileRumSessionCountAndroidSum) { this.mobileRumSessionCountAndroidSum = mobileRumSessionCountAndroidSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the - * given org. - * + *

Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org.

* @return mobileRumSessionCountAndroidSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountAndroidSum() { - return mobileRumSessionCountAndroidSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountAndroidSum() { + return mobileRumSessionCountAndroidSum; + } public void setMobileRumSessionCountAndroidSum(Long mobileRumSessionCountAndroidSum) { this.mobileRumSessionCountAndroidSum = mobileRumSessionCountAndroidSum; } - public UsageSummaryDateOrg mobileRumSessionCountFlutterSum(Long mobileRumSessionCountFlutterSum) { this.mobileRumSessionCountFlutterSum = mobileRumSessionCountFlutterSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on Flutter over all hours in the current date for the - * given org. - * + *

Shows the sum of all mobile RUM Sessions on Flutter over all hours in the current date for the given org.

* @return mobileRumSessionCountFlutterSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountFlutterSum() { - return mobileRumSessionCountFlutterSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountFlutterSum() { + return mobileRumSessionCountFlutterSum; + } public void setMobileRumSessionCountFlutterSum(Long mobileRumSessionCountFlutterSum) { this.mobileRumSessionCountFlutterSum = mobileRumSessionCountFlutterSum; } - public UsageSummaryDateOrg mobileRumSessionCountIosSum(Long mobileRumSessionCountIosSum) { this.mobileRumSessionCountIosSum = mobileRumSessionCountIosSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for the - * given org. - * + *

Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for the given org.

* @return mobileRumSessionCountIosSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountIosSum() { - return mobileRumSessionCountIosSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountIosSum() { + return mobileRumSessionCountIosSum; + } public void setMobileRumSessionCountIosSum(Long mobileRumSessionCountIosSum) { this.mobileRumSessionCountIosSum = mobileRumSessionCountIosSum; } - - public UsageSummaryDateOrg mobileRumSessionCountReactnativeSum( - Long mobileRumSessionCountReactnativeSum) { + public UsageSummaryDateOrg mobileRumSessionCountReactnativeSum(Long mobileRumSessionCountReactnativeSum) { this.mobileRumSessionCountReactnativeSum = mobileRumSessionCountReactnativeSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on React Native over all hours in the current date for - * the given org. - * + *

Shows the sum of all mobile RUM Sessions on React Native over all hours in the current date for the given org.

* @return mobileRumSessionCountReactnativeSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountReactnativeSum() { - return mobileRumSessionCountReactnativeSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountReactnativeSum() { + return mobileRumSessionCountReactnativeSum; + } public void setMobileRumSessionCountReactnativeSum(Long mobileRumSessionCountReactnativeSum) { this.mobileRumSessionCountReactnativeSum = mobileRumSessionCountReactnativeSum; } - public UsageSummaryDateOrg mobileRumSessionCountSum(Long mobileRumSessionCountSum) { this.mobileRumSessionCountSum = mobileRumSessionCountSum; return this; } /** - * Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org. - * + *

Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org.

* @return mobileRumSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountSum() { - return mobileRumSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountSum() { + return mobileRumSessionCountSum; + } public void setMobileRumSessionCountSum(Long mobileRumSessionCountSum) { this.mobileRumSessionCountSum = mobileRumSessionCountSum; } - public UsageSummaryDateOrg mobileRumUnitsSum(Long mobileRumUnitsSum) { this.mobileRumUnitsSum = mobileRumUnitsSum; return this; } /** - * Shows the sum of all mobile RUM units over all hours in the current date for the given org. - * + *

Shows the sum of all mobile RUM units over all hours in the current date for the given org.

* @return mobileRumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumUnitsSum() { - return mobileRumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumUnitsSum() { + return mobileRumUnitsSum; + } public void setMobileRumUnitsSum(Long mobileRumUnitsSum) { this.mobileRumUnitsSum = mobileRumUnitsSum; } - public UsageSummaryDateOrg name(String name) { this.name = name; return this; } /** - * The organization name. - * + *

The organization name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public UsageSummaryDateOrg netflowIndexedEventsCountSum(Long netflowIndexedEventsCountSum) { this.netflowIndexedEventsCountSum = netflowIndexedEventsCountSum; return this; } /** - * Shows the sum of all Network flows indexed over all hours in the current date for the given - * org. - * + *

Shows the sum of all Network flows indexed over all hours in the current date for the given org.

* @return netflowIndexedEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNetflowIndexedEventsCountSum() { - return netflowIndexedEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNetflowIndexedEventsCountSum() { + return netflowIndexedEventsCountSum; + } public void setNetflowIndexedEventsCountSum(Long netflowIndexedEventsCountSum) { this.netflowIndexedEventsCountSum = netflowIndexedEventsCountSum; } - public UsageSummaryDateOrg npmHostTop99p(Long npmHostTop99p) { this.npmHostTop99p = npmHostTop99p; return this; } /** - * Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for - * the given org. - * + *

Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for the given org.

* @return npmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNpmHostTop99p() { - return npmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNpmHostTop99p() { + return npmHostTop99p; + } public void setNpmHostTop99p(Long npmHostTop99p) { this.npmHostTop99p = npmHostTop99p; } - - public UsageSummaryDateOrg observabilityPipelinesBytesProcessedSum( - Long observabilityPipelinesBytesProcessedSum) { + public UsageSummaryDateOrg observabilityPipelinesBytesProcessedSum(Long observabilityPipelinesBytesProcessedSum) { this.observabilityPipelinesBytesProcessedSum = observabilityPipelinesBytesProcessedSum; return this; } /** - * Sum of all observability pipelines bytes processed over all hours in the current date for the - * given org. - * + *

Sum of all observability pipelines bytes processed over all hours in the current date for the given org.

* @return observabilityPipelinesBytesProcessedSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getObservabilityPipelinesBytesProcessedSum() { - return observabilityPipelinesBytesProcessedSum; - } - - public void setObservabilityPipelinesBytesProcessedSum( - Long observabilityPipelinesBytesProcessedSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getObservabilityPipelinesBytesProcessedSum() { + return observabilityPipelinesBytesProcessedSum; + } + public void setObservabilityPipelinesBytesProcessedSum(Long observabilityPipelinesBytesProcessedSum) { this.observabilityPipelinesBytesProcessedSum = observabilityPipelinesBytesProcessedSum; } - public UsageSummaryDateOrg onlineArchiveEventsCountSum(Long onlineArchiveEventsCountSum) { this.onlineArchiveEventsCountSum = onlineArchiveEventsCountSum; return this; } /** - * Sum of all online archived events over all hours in the current date for the given org. - * + *

Sum of all online archived events over all hours in the current date for the given org.

* @return onlineArchiveEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOnlineArchiveEventsCountSum() { - return onlineArchiveEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOnlineArchiveEventsCountSum() { + return onlineArchiveEventsCountSum; + } public void setOnlineArchiveEventsCountSum(Long onlineArchiveEventsCountSum) { this.onlineArchiveEventsCountSum = onlineArchiveEventsCountSum; } - public UsageSummaryDateOrg opentelemetryApmHostTop99p(Long opentelemetryApmHostTop99p) { this.opentelemetryApmHostTop99p = opentelemetryApmHostTop99p; return this; } /** - * Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry - * Collector over all hours in the current date for the given org. - * + *

Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for the given org.

* @return opentelemetryApmHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryApmHostTop99p() { - return opentelemetryApmHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryApmHostTop99p() { + return opentelemetryApmHostTop99p; + } public void setOpentelemetryApmHostTop99p(Long opentelemetryApmHostTop99p) { this.opentelemetryApmHostTop99p = opentelemetryApmHostTop99p; } - public UsageSummaryDateOrg opentelemetryHostTop99p(Long opentelemetryHostTop99p) { this.opentelemetryHostTop99p = opentelemetryHostTop99p; return this; } /** - * Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry - * Collector over all hours in the current date for the given org. - * + *

Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for the given org.

* @return opentelemetryHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryHostTop99p() { - return opentelemetryHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryHostTop99p() { + return opentelemetryHostTop99p; + } public void setOpentelemetryHostTop99p(Long opentelemetryHostTop99p) { this.opentelemetryHostTop99p = opentelemetryHostTop99p; } - public UsageSummaryDateOrg profilingHostTop99p(Long profilingHostTop99p) { this.profilingHostTop99p = profilingHostTop99p; return this; } /** - * Shows the 99th percentile of all profiled hosts over all hours in the current date for the - * given org. - * + *

Shows the 99th percentile of all profiled hosts over all hours in the current date for the given org.

* @return profilingHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILING_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getProfilingHostTop99p() { - return profilingHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILING_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getProfilingHostTop99p() { + return profilingHostTop99p; + } public void setProfilingHostTop99p(Long profilingHostTop99p) { this.profilingHostTop99p = profilingHostTop99p; } - public UsageSummaryDateOrg publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public id. - * + *

The organization public id.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageSummaryDateOrg region(String region) { this.region = region; return this; } /** - * The region of the organization. - * + *

The region of the organization.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } public void setRegion(String region) { this.region = region; } - public UsageSummaryDateOrg rumBrowserAndMobileSessionCount(Long rumBrowserAndMobileSessionCount) { this.rumBrowserAndMobileSessionCount = rumBrowserAndMobileSessionCount; return this; } /** - * Shows the sum of all mobile sessions and all browser lite and legacy sessions over all hours in - * the current date for the given org. - * + *

Shows the sum of all mobile sessions and all browser lite and legacy sessions over all hours in the current date for the given org.

* @return rumBrowserAndMobileSessionCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumBrowserAndMobileSessionCount() { - return rumBrowserAndMobileSessionCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumBrowserAndMobileSessionCount() { + return rumBrowserAndMobileSessionCount; + } public void setRumBrowserAndMobileSessionCount(Long rumBrowserAndMobileSessionCount) { this.rumBrowserAndMobileSessionCount = rumBrowserAndMobileSessionCount; } - public UsageSummaryDateOrg rumSessionCountSum(Long rumSessionCountSum) { this.rumSessionCountSum = rumSessionCountSum; return this; } /** - * Shows the sum of all browser RUM Lite Sessions over all hours in the current date for the given - * org. - * + *

Shows the sum of all browser RUM Lite Sessions over all hours in the current date for the given org.

* @return rumSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumSessionCountSum() { - return rumSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumSessionCountSum() { + return rumSessionCountSum; + } public void setRumSessionCountSum(Long rumSessionCountSum) { this.rumSessionCountSum = rumSessionCountSum; } - public UsageSummaryDateOrg rumTotalSessionCountSum(Long rumTotalSessionCountSum) { this.rumTotalSessionCountSum = rumTotalSessionCountSum; return this; } /** - * Shows the sum of RUM Sessions (browser and mobile) over all hours in the current date for the - * given org. - * + *

Shows the sum of RUM Sessions (browser and mobile) over all hours in the current date for the given org.

* @return rumTotalSessionCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumTotalSessionCountSum() { - return rumTotalSessionCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumTotalSessionCountSum() { + return rumTotalSessionCountSum; + } public void setRumTotalSessionCountSum(Long rumTotalSessionCountSum) { this.rumTotalSessionCountSum = rumTotalSessionCountSum; } - public UsageSummaryDateOrg rumUnitsSum(Long rumUnitsSum) { this.rumUnitsSum = rumUnitsSum; return this; } /** - * Shows the sum of all browser and mobile RUM units over all hours in the current date for the - * given org. - * + *

Shows the sum of all browser and mobile RUM units over all hours in the current date for the given org.

* @return rumUnitsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_UNITS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumUnitsSum() { - return rumUnitsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_UNITS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumUnitsSum() { + return rumUnitsSum; + } public void setRumUnitsSum(Long rumUnitsSum) { this.rumUnitsSum = rumUnitsSum; } - public UsageSummaryDateOrg sdsApmScannedBytesSum(Long sdsApmScannedBytesSum) { this.sdsApmScannedBytesSum = sdsApmScannedBytesSum; return this; } /** - * Sum of all APM bytes scanned with sensitive data scanner over all hours in the current date for - * the given org. - * + *

Sum of all APM bytes scanned with sensitive data scanner over all hours in the current date for the given org.

* @return sdsApmScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsApmScannedBytesSum() { - return sdsApmScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsApmScannedBytesSum() { + return sdsApmScannedBytesSum; + } public void setSdsApmScannedBytesSum(Long sdsApmScannedBytesSum) { this.sdsApmScannedBytesSum = sdsApmScannedBytesSum; } - public UsageSummaryDateOrg sdsEventsScannedBytesSum(Long sdsEventsScannedBytesSum) { this.sdsEventsScannedBytesSum = sdsEventsScannedBytesSum; return this; } /** - * Sum of all event stream events bytes scanned with sensitive data scanner over all hours in the - * current date for the given org. - * + *

Sum of all event stream events bytes scanned with sensitive data scanner over all hours in the current date for the given org.

* @return sdsEventsScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsEventsScannedBytesSum() { - return sdsEventsScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsEventsScannedBytesSum() { + return sdsEventsScannedBytesSum; + } public void setSdsEventsScannedBytesSum(Long sdsEventsScannedBytesSum) { this.sdsEventsScannedBytesSum = sdsEventsScannedBytesSum; } - public UsageSummaryDateOrg sdsLogsScannedBytesSum(Long sdsLogsScannedBytesSum) { this.sdsLogsScannedBytesSum = sdsLogsScannedBytesSum; return this; } /** - * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours - * in the current month for the given org. - * + *

Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for the given org.

* @return sdsLogsScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsLogsScannedBytesSum() { - return sdsLogsScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsLogsScannedBytesSum() { + return sdsLogsScannedBytesSum; + } public void setSdsLogsScannedBytesSum(Long sdsLogsScannedBytesSum) { this.sdsLogsScannedBytesSum = sdsLogsScannedBytesSum; } - public UsageSummaryDateOrg sdsRumScannedBytesSum(Long sdsRumScannedBytesSum) { this.sdsRumScannedBytesSum = sdsRumScannedBytesSum; return this; } /** - * Sum of all RUM bytes scanned with sensitive data scanner over all hours in the current date for - * the given org. - * + *

Sum of all RUM bytes scanned with sensitive data scanner over all hours in the current date for the given org.

* @return sdsRumScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsRumScannedBytesSum() { - return sdsRumScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsRumScannedBytesSum() { + return sdsRumScannedBytesSum; + } public void setSdsRumScannedBytesSum(Long sdsRumScannedBytesSum) { this.sdsRumScannedBytesSum = sdsRumScannedBytesSum; } - public UsageSummaryDateOrg sdsTotalScannedBytesSum(Long sdsTotalScannedBytesSum) { this.sdsTotalScannedBytesSum = sdsTotalScannedBytesSum; return this; } /** - * Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over - * all hours in the current month for the given org. - * + *

Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for the given org.

* @return sdsTotalScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsTotalScannedBytesSum() { - return sdsTotalScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsTotalScannedBytesSum() { + return sdsTotalScannedBytesSum; + } public void setSdsTotalScannedBytesSum(Long sdsTotalScannedBytesSum) { this.sdsTotalScannedBytesSum = sdsTotalScannedBytesSum; } - - public UsageSummaryDateOrg syntheticsBrowserCheckCallsCountSum( - Long syntheticsBrowserCheckCallsCountSum) { + public UsageSummaryDateOrg syntheticsBrowserCheckCallsCountSum(Long syntheticsBrowserCheckCallsCountSum) { this.syntheticsBrowserCheckCallsCountSum = syntheticsBrowserCheckCallsCountSum; return this; } /** - * Shows the sum of all Synthetic browser tests over all hours in the current date for the given - * org. - * + *

Shows the sum of all Synthetic browser tests over all hours in the current date for the given org.

* @return syntheticsBrowserCheckCallsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsBrowserCheckCallsCountSum() { - return syntheticsBrowserCheckCallsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsBrowserCheckCallsCountSum() { + return syntheticsBrowserCheckCallsCountSum; + } public void setSyntheticsBrowserCheckCallsCountSum(Long syntheticsBrowserCheckCallsCountSum) { this.syntheticsBrowserCheckCallsCountSum = syntheticsBrowserCheckCallsCountSum; } - public UsageSummaryDateOrg syntheticsCheckCallsCountSum(Long syntheticsCheckCallsCountSum) { this.syntheticsCheckCallsCountSum = syntheticsCheckCallsCountSum; return this; } /** - * Shows the sum of all Synthetic API tests over all hours in the current date for the given org. - * + *

Shows the sum of all Synthetic API tests over all hours in the current date for the given org.

* @return syntheticsCheckCallsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsCheckCallsCountSum() { - return syntheticsCheckCallsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsCheckCallsCountSum() { + return syntheticsCheckCallsCountSum; + } public void setSyntheticsCheckCallsCountSum(Long syntheticsCheckCallsCountSum) { this.syntheticsCheckCallsCountSum = syntheticsCheckCallsCountSum; } - - public UsageSummaryDateOrg syntheticsParallelTestingMaxSlotsHwm( - Long syntheticsParallelTestingMaxSlotsHwm) { + public UsageSummaryDateOrg syntheticsParallelTestingMaxSlotsHwm(Long syntheticsParallelTestingMaxSlotsHwm) { this.syntheticsParallelTestingMaxSlotsHwm = syntheticsParallelTestingMaxSlotsHwm; return this; } /** - * Shows the high-water mark of used synthetics parallel testing slots over all hours in the - * current date for the given org. - * + *

Shows the high-water mark of used synthetics parallel testing slots over all hours in the current date for the given org.

* @return syntheticsParallelTestingMaxSlotsHwm - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsParallelTestingMaxSlotsHwm() { - return syntheticsParallelTestingMaxSlotsHwm; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsParallelTestingMaxSlotsHwm() { + return syntheticsParallelTestingMaxSlotsHwm; + } public void setSyntheticsParallelTestingMaxSlotsHwm(Long syntheticsParallelTestingMaxSlotsHwm) { this.syntheticsParallelTestingMaxSlotsHwm = syntheticsParallelTestingMaxSlotsHwm; } - - public UsageSummaryDateOrg traceSearchIndexedEventsCountSum( - Long traceSearchIndexedEventsCountSum) { + public UsageSummaryDateOrg traceSearchIndexedEventsCountSum(Long traceSearchIndexedEventsCountSum) { this.traceSearchIndexedEventsCountSum = traceSearchIndexedEventsCountSum; return this; } /** - * Shows the sum of all Indexed Spans indexed over all hours in the current date for the given - * org. - * + *

Shows the sum of all Indexed Spans indexed over all hours in the current date for the given org.

* @return traceSearchIndexedEventsCountSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTraceSearchIndexedEventsCountSum() { - return traceSearchIndexedEventsCountSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTraceSearchIndexedEventsCountSum() { + return traceSearchIndexedEventsCountSum; + } public void setTraceSearchIndexedEventsCountSum(Long traceSearchIndexedEventsCountSum) { this.traceSearchIndexedEventsCountSum = traceSearchIndexedEventsCountSum; } - public UsageSummaryDateOrg twolIngestedEventsBytesSum(Long twolIngestedEventsBytesSum) { this.twolIngestedEventsBytesSum = twolIngestedEventsBytesSum; return this; } /** - * Shows the sum of all ingested APM span bytes over all hours in the current date for the given - * org. - * + *

Shows the sum of all ingested APM span bytes over all hours in the current date for the given org.

* @return twolIngestedEventsBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTwolIngestedEventsBytesSum() { - return twolIngestedEventsBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTwolIngestedEventsBytesSum() { + return twolIngestedEventsBytesSum; + } public void setTwolIngestedEventsBytesSum(Long twolIngestedEventsBytesSum) { this.twolIngestedEventsBytesSum = twolIngestedEventsBytesSum; } - public UsageSummaryDateOrg vsphereHostTop99p(Long vsphereHostTop99p) { this.vsphereHostTop99p = vsphereHostTop99p; return this; } /** - * Shows the 99th percentile of all vSphere hosts over all hours in the current date for the given - * org. - * + *

Shows the 99th percentile of all vSphere hosts over all hours in the current date for the given org.

* @return vsphereHostTop99p - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_TOP99P) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVsphereHostTop99p() { - return vsphereHostTop99p; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_TOP99P) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVsphereHostTop99p() { + return vsphereHostTop99p; + } public void setVsphereHostTop99p(Long vsphereHostTop99p) { this.vsphereHostTop99p = vsphereHostTop99p; } - /** Return true if this UsageSummaryDateOrg object is equal to o. */ + /** + * Return true if this UsageSummaryDateOrg object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -2081,206 +1846,13 @@ public boolean equals(Object o) { return false; } UsageSummaryDateOrg usageSummaryDateOrg = (UsageSummaryDateOrg) o; - return Objects.equals(this.agentHostTop99p, usageSummaryDateOrg.agentHostTop99p) - && Objects.equals( - this.apmAzureAppServiceHostTop99p, usageSummaryDateOrg.apmAzureAppServiceHostTop99p) - && Objects.equals(this.apmFargateCountAvg, usageSummaryDateOrg.apmFargateCountAvg) - && Objects.equals(this.apmHostTop99p, usageSummaryDateOrg.apmHostTop99p) - && Objects.equals(this.appsecFargateCountAvg, usageSummaryDateOrg.appsecFargateCountAvg) - && Objects.equals( - this.auditLogsLinesIndexedSum, usageSummaryDateOrg.auditLogsLinesIndexedSum) - && Objects.equals(this.avgProfiledFargateTasks, usageSummaryDateOrg.avgProfiledFargateTasks) - && Objects.equals(this.awsHostTop99p, usageSummaryDateOrg.awsHostTop99p) - && Objects.equals(this.awsLambdaFuncCount, usageSummaryDateOrg.awsLambdaFuncCount) - && Objects.equals(this.awsLambdaInvocationsSum, usageSummaryDateOrg.awsLambdaInvocationsSum) - && Objects.equals(this.azureAppServiceTop99p, usageSummaryDateOrg.azureAppServiceTop99p) - && Objects.equals( - this.billableIngestedBytesSum, usageSummaryDateOrg.billableIngestedBytesSum) - && Objects.equals( - this.browserRumLiteSessionCountSum, usageSummaryDateOrg.browserRumLiteSessionCountSum) - && Objects.equals( - this.browserRumReplaySessionCountSum, - usageSummaryDateOrg.browserRumReplaySessionCountSum) - && Objects.equals(this.browserRumUnitsSum, usageSummaryDateOrg.browserRumUnitsSum) - && Objects.equals( - this.ciPipelineIndexedSpansSum, usageSummaryDateOrg.ciPipelineIndexedSpansSum) - && Objects.equals(this.ciTestIndexedSpansSum, usageSummaryDateOrg.ciTestIndexedSpansSum) - && Objects.equals( - this.ciVisibilityPipelineCommittersHwm, - usageSummaryDateOrg.ciVisibilityPipelineCommittersHwm) - && Objects.equals( - this.ciVisibilityTestCommittersHwm, usageSummaryDateOrg.ciVisibilityTestCommittersHwm) - && Objects.equals( - this.cloudCostManagementHostCountAvg, - usageSummaryDateOrg.cloudCostManagementHostCountAvg) - && Objects.equals(this.containerAvg, usageSummaryDateOrg.containerAvg) - && Objects.equals(this.containerExclAgentAvg, usageSummaryDateOrg.containerExclAgentAvg) - && Objects.equals(this.containerHwm, usageSummaryDateOrg.containerHwm) - && Objects.equals(this.cspmAasHostTop99p, usageSummaryDateOrg.cspmAasHostTop99p) - && Objects.equals(this.cspmAwsHostTop99p, usageSummaryDateOrg.cspmAwsHostTop99p) - && Objects.equals(this.cspmAzureHostTop99p, usageSummaryDateOrg.cspmAzureHostTop99p) - && Objects.equals(this.cspmContainerAvg, usageSummaryDateOrg.cspmContainerAvg) - && Objects.equals(this.cspmContainerHwm, usageSummaryDateOrg.cspmContainerHwm) - && Objects.equals(this.cspmGcpHostTop99p, usageSummaryDateOrg.cspmGcpHostTop99p) - && Objects.equals(this.cspmHostTop99p, usageSummaryDateOrg.cspmHostTop99p) - && Objects.equals(this.customTsAvg, usageSummaryDateOrg.customTsAvg) - && Objects.equals(this.cwsContainerCountAvg, usageSummaryDateOrg.cwsContainerCountAvg) - && Objects.equals(this.cwsHostTop99p, usageSummaryDateOrg.cwsHostTop99p) - && Objects.equals(this.dbmHostTop99pSum, usageSummaryDateOrg.dbmHostTop99pSum) - && Objects.equals(this.dbmQueriesAvgSum, usageSummaryDateOrg.dbmQueriesAvgSum) - && Objects.equals(this.fargateTasksCountAvg, usageSummaryDateOrg.fargateTasksCountAvg) - && Objects.equals(this.fargateTasksCountHwm, usageSummaryDateOrg.fargateTasksCountHwm) - && Objects.equals(this.gcpHostTop99p, usageSummaryDateOrg.gcpHostTop99p) - && Objects.equals(this.herokuHostTop99p, usageSummaryDateOrg.herokuHostTop99p) - && Objects.equals(this.id, usageSummaryDateOrg.id) - && Objects.equals( - this.incidentManagementMonthlyActiveUsersHwm, - usageSummaryDateOrg.incidentManagementMonthlyActiveUsersHwm) - && Objects.equals(this.indexedEventsCountSum, usageSummaryDateOrg.indexedEventsCountSum) - && Objects.equals(this.infraHostTop99p, usageSummaryDateOrg.infraHostTop99p) - && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDateOrg.ingestedEventsBytesSum) - && Objects.equals(this.iotDeviceAggSum, usageSummaryDateOrg.iotDeviceAggSum) - && Objects.equals(this.iotDeviceTop99pSum, usageSummaryDateOrg.iotDeviceTop99pSum) - && Objects.equals( - this.mobileRumLiteSessionCountSum, usageSummaryDateOrg.mobileRumLiteSessionCountSum) - && Objects.equals( - this.mobileRumSessionCountAndroidSum, - usageSummaryDateOrg.mobileRumSessionCountAndroidSum) - && Objects.equals( - this.mobileRumSessionCountFlutterSum, - usageSummaryDateOrg.mobileRumSessionCountFlutterSum) - && Objects.equals( - this.mobileRumSessionCountIosSum, usageSummaryDateOrg.mobileRumSessionCountIosSum) - && Objects.equals( - this.mobileRumSessionCountReactnativeSum, - usageSummaryDateOrg.mobileRumSessionCountReactnativeSum) - && Objects.equals( - this.mobileRumSessionCountSum, usageSummaryDateOrg.mobileRumSessionCountSum) - && Objects.equals(this.mobileRumUnitsSum, usageSummaryDateOrg.mobileRumUnitsSum) - && Objects.equals(this.name, usageSummaryDateOrg.name) - && Objects.equals( - this.netflowIndexedEventsCountSum, usageSummaryDateOrg.netflowIndexedEventsCountSum) - && Objects.equals(this.npmHostTop99p, usageSummaryDateOrg.npmHostTop99p) - && Objects.equals( - this.observabilityPipelinesBytesProcessedSum, - usageSummaryDateOrg.observabilityPipelinesBytesProcessedSum) - && Objects.equals( - this.onlineArchiveEventsCountSum, usageSummaryDateOrg.onlineArchiveEventsCountSum) - && Objects.equals( - this.opentelemetryApmHostTop99p, usageSummaryDateOrg.opentelemetryApmHostTop99p) - && Objects.equals(this.opentelemetryHostTop99p, usageSummaryDateOrg.opentelemetryHostTop99p) - && Objects.equals(this.profilingHostTop99p, usageSummaryDateOrg.profilingHostTop99p) - && Objects.equals(this.publicId, usageSummaryDateOrg.publicId) - && Objects.equals(this.region, usageSummaryDateOrg.region) - && Objects.equals( - this.rumBrowserAndMobileSessionCount, - usageSummaryDateOrg.rumBrowserAndMobileSessionCount) - && Objects.equals(this.rumSessionCountSum, usageSummaryDateOrg.rumSessionCountSum) - && Objects.equals(this.rumTotalSessionCountSum, usageSummaryDateOrg.rumTotalSessionCountSum) - && Objects.equals(this.rumUnitsSum, usageSummaryDateOrg.rumUnitsSum) - && Objects.equals(this.sdsApmScannedBytesSum, usageSummaryDateOrg.sdsApmScannedBytesSum) - && Objects.equals( - this.sdsEventsScannedBytesSum, usageSummaryDateOrg.sdsEventsScannedBytesSum) - && Objects.equals(this.sdsLogsScannedBytesSum, usageSummaryDateOrg.sdsLogsScannedBytesSum) - && Objects.equals(this.sdsRumScannedBytesSum, usageSummaryDateOrg.sdsRumScannedBytesSum) - && Objects.equals(this.sdsTotalScannedBytesSum, usageSummaryDateOrg.sdsTotalScannedBytesSum) - && Objects.equals( - this.syntheticsBrowserCheckCallsCountSum, - usageSummaryDateOrg.syntheticsBrowserCheckCallsCountSum) - && Objects.equals( - this.syntheticsCheckCallsCountSum, usageSummaryDateOrg.syntheticsCheckCallsCountSum) - && Objects.equals( - this.syntheticsParallelTestingMaxSlotsHwm, - usageSummaryDateOrg.syntheticsParallelTestingMaxSlotsHwm) - && Objects.equals( - this.traceSearchIndexedEventsCountSum, - usageSummaryDateOrg.traceSearchIndexedEventsCountSum) - && Objects.equals( - this.twolIngestedEventsBytesSum, usageSummaryDateOrg.twolIngestedEventsBytesSum) - && Objects.equals(this.vsphereHostTop99p, usageSummaryDateOrg.vsphereHostTop99p); + return Objects.equals(this.agentHostTop99p, usageSummaryDateOrg.agentHostTop99p) && Objects.equals(this.apmAzureAppServiceHostTop99p, usageSummaryDateOrg.apmAzureAppServiceHostTop99p) && Objects.equals(this.apmFargateCountAvg, usageSummaryDateOrg.apmFargateCountAvg) && Objects.equals(this.apmHostTop99p, usageSummaryDateOrg.apmHostTop99p) && Objects.equals(this.appsecFargateCountAvg, usageSummaryDateOrg.appsecFargateCountAvg) && Objects.equals(this.auditLogsLinesIndexedSum, usageSummaryDateOrg.auditLogsLinesIndexedSum) && Objects.equals(this.avgProfiledFargateTasks, usageSummaryDateOrg.avgProfiledFargateTasks) && Objects.equals(this.awsHostTop99p, usageSummaryDateOrg.awsHostTop99p) && Objects.equals(this.awsLambdaFuncCount, usageSummaryDateOrg.awsLambdaFuncCount) && Objects.equals(this.awsLambdaInvocationsSum, usageSummaryDateOrg.awsLambdaInvocationsSum) && Objects.equals(this.azureAppServiceTop99p, usageSummaryDateOrg.azureAppServiceTop99p) && Objects.equals(this.billableIngestedBytesSum, usageSummaryDateOrg.billableIngestedBytesSum) && Objects.equals(this.browserRumLiteSessionCountSum, usageSummaryDateOrg.browserRumLiteSessionCountSum) && Objects.equals(this.browserRumReplaySessionCountSum, usageSummaryDateOrg.browserRumReplaySessionCountSum) && Objects.equals(this.browserRumUnitsSum, usageSummaryDateOrg.browserRumUnitsSum) && Objects.equals(this.ciPipelineIndexedSpansSum, usageSummaryDateOrg.ciPipelineIndexedSpansSum) && Objects.equals(this.ciTestIndexedSpansSum, usageSummaryDateOrg.ciTestIndexedSpansSum) && Objects.equals(this.ciVisibilityPipelineCommittersHwm, usageSummaryDateOrg.ciVisibilityPipelineCommittersHwm) && Objects.equals(this.ciVisibilityTestCommittersHwm, usageSummaryDateOrg.ciVisibilityTestCommittersHwm) && Objects.equals(this.cloudCostManagementHostCountAvg, usageSummaryDateOrg.cloudCostManagementHostCountAvg) && Objects.equals(this.containerAvg, usageSummaryDateOrg.containerAvg) && Objects.equals(this.containerExclAgentAvg, usageSummaryDateOrg.containerExclAgentAvg) && Objects.equals(this.containerHwm, usageSummaryDateOrg.containerHwm) && Objects.equals(this.cspmAasHostTop99p, usageSummaryDateOrg.cspmAasHostTop99p) && Objects.equals(this.cspmAwsHostTop99p, usageSummaryDateOrg.cspmAwsHostTop99p) && Objects.equals(this.cspmAzureHostTop99p, usageSummaryDateOrg.cspmAzureHostTop99p) && Objects.equals(this.cspmContainerAvg, usageSummaryDateOrg.cspmContainerAvg) && Objects.equals(this.cspmContainerHwm, usageSummaryDateOrg.cspmContainerHwm) && Objects.equals(this.cspmGcpHostTop99p, usageSummaryDateOrg.cspmGcpHostTop99p) && Objects.equals(this.cspmHostTop99p, usageSummaryDateOrg.cspmHostTop99p) && Objects.equals(this.customTsAvg, usageSummaryDateOrg.customTsAvg) && Objects.equals(this.cwsContainerCountAvg, usageSummaryDateOrg.cwsContainerCountAvg) && Objects.equals(this.cwsHostTop99p, usageSummaryDateOrg.cwsHostTop99p) && Objects.equals(this.dbmHostTop99pSum, usageSummaryDateOrg.dbmHostTop99pSum) && Objects.equals(this.dbmQueriesAvgSum, usageSummaryDateOrg.dbmQueriesAvgSum) && Objects.equals(this.fargateTasksCountAvg, usageSummaryDateOrg.fargateTasksCountAvg) && Objects.equals(this.fargateTasksCountHwm, usageSummaryDateOrg.fargateTasksCountHwm) && Objects.equals(this.gcpHostTop99p, usageSummaryDateOrg.gcpHostTop99p) && Objects.equals(this.herokuHostTop99p, usageSummaryDateOrg.herokuHostTop99p) && Objects.equals(this.id, usageSummaryDateOrg.id) && Objects.equals(this.incidentManagementMonthlyActiveUsersHwm, usageSummaryDateOrg.incidentManagementMonthlyActiveUsersHwm) && Objects.equals(this.indexedEventsCountSum, usageSummaryDateOrg.indexedEventsCountSum) && Objects.equals(this.infraHostTop99p, usageSummaryDateOrg.infraHostTop99p) && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDateOrg.ingestedEventsBytesSum) && Objects.equals(this.iotDeviceAggSum, usageSummaryDateOrg.iotDeviceAggSum) && Objects.equals(this.iotDeviceTop99pSum, usageSummaryDateOrg.iotDeviceTop99pSum) && Objects.equals(this.mobileRumLiteSessionCountSum, usageSummaryDateOrg.mobileRumLiteSessionCountSum) && Objects.equals(this.mobileRumSessionCountAndroidSum, usageSummaryDateOrg.mobileRumSessionCountAndroidSum) && Objects.equals(this.mobileRumSessionCountFlutterSum, usageSummaryDateOrg.mobileRumSessionCountFlutterSum) && Objects.equals(this.mobileRumSessionCountIosSum, usageSummaryDateOrg.mobileRumSessionCountIosSum) && Objects.equals(this.mobileRumSessionCountReactnativeSum, usageSummaryDateOrg.mobileRumSessionCountReactnativeSum) && Objects.equals(this.mobileRumSessionCountSum, usageSummaryDateOrg.mobileRumSessionCountSum) && Objects.equals(this.mobileRumUnitsSum, usageSummaryDateOrg.mobileRumUnitsSum) && Objects.equals(this.name, usageSummaryDateOrg.name) && Objects.equals(this.netflowIndexedEventsCountSum, usageSummaryDateOrg.netflowIndexedEventsCountSum) && Objects.equals(this.npmHostTop99p, usageSummaryDateOrg.npmHostTop99p) && Objects.equals(this.observabilityPipelinesBytesProcessedSum, usageSummaryDateOrg.observabilityPipelinesBytesProcessedSum) && Objects.equals(this.onlineArchiveEventsCountSum, usageSummaryDateOrg.onlineArchiveEventsCountSum) && Objects.equals(this.opentelemetryApmHostTop99p, usageSummaryDateOrg.opentelemetryApmHostTop99p) && Objects.equals(this.opentelemetryHostTop99p, usageSummaryDateOrg.opentelemetryHostTop99p) && Objects.equals(this.profilingHostTop99p, usageSummaryDateOrg.profilingHostTop99p) && Objects.equals(this.publicId, usageSummaryDateOrg.publicId) && Objects.equals(this.region, usageSummaryDateOrg.region) && Objects.equals(this.rumBrowserAndMobileSessionCount, usageSummaryDateOrg.rumBrowserAndMobileSessionCount) && Objects.equals(this.rumSessionCountSum, usageSummaryDateOrg.rumSessionCountSum) && Objects.equals(this.rumTotalSessionCountSum, usageSummaryDateOrg.rumTotalSessionCountSum) && Objects.equals(this.rumUnitsSum, usageSummaryDateOrg.rumUnitsSum) && Objects.equals(this.sdsApmScannedBytesSum, usageSummaryDateOrg.sdsApmScannedBytesSum) && Objects.equals(this.sdsEventsScannedBytesSum, usageSummaryDateOrg.sdsEventsScannedBytesSum) && Objects.equals(this.sdsLogsScannedBytesSum, usageSummaryDateOrg.sdsLogsScannedBytesSum) && Objects.equals(this.sdsRumScannedBytesSum, usageSummaryDateOrg.sdsRumScannedBytesSum) && Objects.equals(this.sdsTotalScannedBytesSum, usageSummaryDateOrg.sdsTotalScannedBytesSum) && Objects.equals(this.syntheticsBrowserCheckCallsCountSum, usageSummaryDateOrg.syntheticsBrowserCheckCallsCountSum) && Objects.equals(this.syntheticsCheckCallsCountSum, usageSummaryDateOrg.syntheticsCheckCallsCountSum) && Objects.equals(this.syntheticsParallelTestingMaxSlotsHwm, usageSummaryDateOrg.syntheticsParallelTestingMaxSlotsHwm) && Objects.equals(this.traceSearchIndexedEventsCountSum, usageSummaryDateOrg.traceSearchIndexedEventsCountSum) && Objects.equals(this.twolIngestedEventsBytesSum, usageSummaryDateOrg.twolIngestedEventsBytesSum) && Objects.equals(this.vsphereHostTop99p, usageSummaryDateOrg.vsphereHostTop99p); } + @Override public int hashCode() { - return Objects.hash( - agentHostTop99p, - apmAzureAppServiceHostTop99p, - apmFargateCountAvg, - apmHostTop99p, - appsecFargateCountAvg, - auditLogsLinesIndexedSum, - avgProfiledFargateTasks, - awsHostTop99p, - awsLambdaFuncCount, - awsLambdaInvocationsSum, - azureAppServiceTop99p, - billableIngestedBytesSum, - browserRumLiteSessionCountSum, - browserRumReplaySessionCountSum, - browserRumUnitsSum, - ciPipelineIndexedSpansSum, - ciTestIndexedSpansSum, - ciVisibilityPipelineCommittersHwm, - ciVisibilityTestCommittersHwm, - cloudCostManagementHostCountAvg, - containerAvg, - containerExclAgentAvg, - containerHwm, - cspmAasHostTop99p, - cspmAwsHostTop99p, - cspmAzureHostTop99p, - cspmContainerAvg, - cspmContainerHwm, - cspmGcpHostTop99p, - cspmHostTop99p, - customTsAvg, - cwsContainerCountAvg, - cwsHostTop99p, - dbmHostTop99pSum, - dbmQueriesAvgSum, - fargateTasksCountAvg, - fargateTasksCountHwm, - gcpHostTop99p, - herokuHostTop99p, - id, - incidentManagementMonthlyActiveUsersHwm, - indexedEventsCountSum, - infraHostTop99p, - ingestedEventsBytesSum, - iotDeviceAggSum, - iotDeviceTop99pSum, - mobileRumLiteSessionCountSum, - mobileRumSessionCountAndroidSum, - mobileRumSessionCountFlutterSum, - mobileRumSessionCountIosSum, - mobileRumSessionCountReactnativeSum, - mobileRumSessionCountSum, - mobileRumUnitsSum, - name, - netflowIndexedEventsCountSum, - npmHostTop99p, - observabilityPipelinesBytesProcessedSum, - onlineArchiveEventsCountSum, - opentelemetryApmHostTop99p, - opentelemetryHostTop99p, - profilingHostTop99p, - publicId, - region, - rumBrowserAndMobileSessionCount, - rumSessionCountSum, - rumTotalSessionCountSum, - rumUnitsSum, - sdsApmScannedBytesSum, - sdsEventsScannedBytesSum, - sdsLogsScannedBytesSum, - sdsRumScannedBytesSum, - sdsTotalScannedBytesSum, - syntheticsBrowserCheckCallsCountSum, - syntheticsCheckCallsCountSum, - syntheticsParallelTestingMaxSlotsHwm, - traceSearchIndexedEventsCountSum, - twolIngestedEventsBytesSum, - vsphereHostTop99p); + return Objects.hash(agentHostTop99p,apmAzureAppServiceHostTop99p,apmFargateCountAvg,apmHostTop99p,appsecFargateCountAvg,auditLogsLinesIndexedSum,avgProfiledFargateTasks,awsHostTop99p,awsLambdaFuncCount,awsLambdaInvocationsSum,azureAppServiceTop99p,billableIngestedBytesSum,browserRumLiteSessionCountSum,browserRumReplaySessionCountSum,browserRumUnitsSum,ciPipelineIndexedSpansSum,ciTestIndexedSpansSum,ciVisibilityPipelineCommittersHwm,ciVisibilityTestCommittersHwm,cloudCostManagementHostCountAvg,containerAvg,containerExclAgentAvg,containerHwm,cspmAasHostTop99p,cspmAwsHostTop99p,cspmAzureHostTop99p,cspmContainerAvg,cspmContainerHwm,cspmGcpHostTop99p,cspmHostTop99p,customTsAvg,cwsContainerCountAvg,cwsHostTop99p,dbmHostTop99pSum,dbmQueriesAvgSum,fargateTasksCountAvg,fargateTasksCountHwm,gcpHostTop99p,herokuHostTop99p,id,incidentManagementMonthlyActiveUsersHwm,indexedEventsCountSum,infraHostTop99p,ingestedEventsBytesSum,iotDeviceAggSum,iotDeviceTop99pSum,mobileRumLiteSessionCountSum,mobileRumSessionCountAndroidSum,mobileRumSessionCountFlutterSum,mobileRumSessionCountIosSum,mobileRumSessionCountReactnativeSum,mobileRumSessionCountSum,mobileRumUnitsSum,name,netflowIndexedEventsCountSum,npmHostTop99p,observabilityPipelinesBytesProcessedSum,onlineArchiveEventsCountSum,opentelemetryApmHostTop99p,opentelemetryHostTop99p,profilingHostTop99p,publicId,region,rumBrowserAndMobileSessionCount,rumSessionCountSum,rumTotalSessionCountSum,rumUnitsSum,sdsApmScannedBytesSum,sdsEventsScannedBytesSum,sdsLogsScannedBytesSum,sdsRumScannedBytesSum,sdsTotalScannedBytesSum,syntheticsBrowserCheckCallsCountSum,syntheticsCheckCallsCountSum,syntheticsParallelTestingMaxSlotsHwm,traceSearchIndexedEventsCountSum,twolIngestedEventsBytesSum,vsphereHostTop99p); } @Override @@ -2288,181 +1860,90 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSummaryDateOrg {\n"); sb.append(" agentHostTop99p: ").append(toIndentedString(agentHostTop99p)).append("\n"); - sb.append(" apmAzureAppServiceHostTop99p: ") - .append(toIndentedString(apmAzureAppServiceHostTop99p)) - .append("\n"); + sb.append(" apmAzureAppServiceHostTop99p: ").append(toIndentedString(apmAzureAppServiceHostTop99p)).append("\n"); sb.append(" apmFargateCountAvg: ").append(toIndentedString(apmFargateCountAvg)).append("\n"); sb.append(" apmHostTop99p: ").append(toIndentedString(apmHostTop99p)).append("\n"); - sb.append(" appsecFargateCountAvg: ") - .append(toIndentedString(appsecFargateCountAvg)) - .append("\n"); - sb.append(" auditLogsLinesIndexedSum: ") - .append(toIndentedString(auditLogsLinesIndexedSum)) - .append("\n"); - sb.append(" avgProfiledFargateTasks: ") - .append(toIndentedString(avgProfiledFargateTasks)) - .append("\n"); + sb.append(" appsecFargateCountAvg: ").append(toIndentedString(appsecFargateCountAvg)).append("\n"); + sb.append(" auditLogsLinesIndexedSum: ").append(toIndentedString(auditLogsLinesIndexedSum)).append("\n"); + sb.append(" avgProfiledFargateTasks: ").append(toIndentedString(avgProfiledFargateTasks)).append("\n"); sb.append(" awsHostTop99p: ").append(toIndentedString(awsHostTop99p)).append("\n"); sb.append(" awsLambdaFuncCount: ").append(toIndentedString(awsLambdaFuncCount)).append("\n"); - sb.append(" awsLambdaInvocationsSum: ") - .append(toIndentedString(awsLambdaInvocationsSum)) - .append("\n"); - sb.append(" azureAppServiceTop99p: ") - .append(toIndentedString(azureAppServiceTop99p)) - .append("\n"); - sb.append(" billableIngestedBytesSum: ") - .append(toIndentedString(billableIngestedBytesSum)) - .append("\n"); - sb.append(" browserRumLiteSessionCountSum: ") - .append(toIndentedString(browserRumLiteSessionCountSum)) - .append("\n"); - sb.append(" browserRumReplaySessionCountSum: ") - .append(toIndentedString(browserRumReplaySessionCountSum)) - .append("\n"); + sb.append(" awsLambdaInvocationsSum: ").append(toIndentedString(awsLambdaInvocationsSum)).append("\n"); + sb.append(" azureAppServiceTop99p: ").append(toIndentedString(azureAppServiceTop99p)).append("\n"); + sb.append(" billableIngestedBytesSum: ").append(toIndentedString(billableIngestedBytesSum)).append("\n"); + sb.append(" browserRumLiteSessionCountSum: ").append(toIndentedString(browserRumLiteSessionCountSum)).append("\n"); + sb.append(" browserRumReplaySessionCountSum: ").append(toIndentedString(browserRumReplaySessionCountSum)).append("\n"); sb.append(" browserRumUnitsSum: ").append(toIndentedString(browserRumUnitsSum)).append("\n"); - sb.append(" ciPipelineIndexedSpansSum: ") - .append(toIndentedString(ciPipelineIndexedSpansSum)) - .append("\n"); - sb.append(" ciTestIndexedSpansSum: ") - .append(toIndentedString(ciTestIndexedSpansSum)) - .append("\n"); - sb.append(" ciVisibilityPipelineCommittersHwm: ") - .append(toIndentedString(ciVisibilityPipelineCommittersHwm)) - .append("\n"); - sb.append(" ciVisibilityTestCommittersHwm: ") - .append(toIndentedString(ciVisibilityTestCommittersHwm)) - .append("\n"); - sb.append(" cloudCostManagementHostCountAvg: ") - .append(toIndentedString(cloudCostManagementHostCountAvg)) - .append("\n"); + sb.append(" ciPipelineIndexedSpansSum: ").append(toIndentedString(ciPipelineIndexedSpansSum)).append("\n"); + sb.append(" ciTestIndexedSpansSum: ").append(toIndentedString(ciTestIndexedSpansSum)).append("\n"); + sb.append(" ciVisibilityPipelineCommittersHwm: ").append(toIndentedString(ciVisibilityPipelineCommittersHwm)).append("\n"); + sb.append(" ciVisibilityTestCommittersHwm: ").append(toIndentedString(ciVisibilityTestCommittersHwm)).append("\n"); + sb.append(" cloudCostManagementHostCountAvg: ").append(toIndentedString(cloudCostManagementHostCountAvg)).append("\n"); sb.append(" containerAvg: ").append(toIndentedString(containerAvg)).append("\n"); - sb.append(" containerExclAgentAvg: ") - .append(toIndentedString(containerExclAgentAvg)) - .append("\n"); + sb.append(" containerExclAgentAvg: ").append(toIndentedString(containerExclAgentAvg)).append("\n"); sb.append(" containerHwm: ").append(toIndentedString(containerHwm)).append("\n"); sb.append(" cspmAasHostTop99p: ").append(toIndentedString(cspmAasHostTop99p)).append("\n"); sb.append(" cspmAwsHostTop99p: ").append(toIndentedString(cspmAwsHostTop99p)).append("\n"); - sb.append(" cspmAzureHostTop99p: ") - .append(toIndentedString(cspmAzureHostTop99p)) - .append("\n"); + sb.append(" cspmAzureHostTop99p: ").append(toIndentedString(cspmAzureHostTop99p)).append("\n"); sb.append(" cspmContainerAvg: ").append(toIndentedString(cspmContainerAvg)).append("\n"); sb.append(" cspmContainerHwm: ").append(toIndentedString(cspmContainerHwm)).append("\n"); sb.append(" cspmGcpHostTop99p: ").append(toIndentedString(cspmGcpHostTop99p)).append("\n"); sb.append(" cspmHostTop99p: ").append(toIndentedString(cspmHostTop99p)).append("\n"); sb.append(" customTsAvg: ").append(toIndentedString(customTsAvg)).append("\n"); - sb.append(" cwsContainerCountAvg: ") - .append(toIndentedString(cwsContainerCountAvg)) - .append("\n"); + sb.append(" cwsContainerCountAvg: ").append(toIndentedString(cwsContainerCountAvg)).append("\n"); sb.append(" cwsHostTop99p: ").append(toIndentedString(cwsHostTop99p)).append("\n"); sb.append(" dbmHostTop99pSum: ").append(toIndentedString(dbmHostTop99pSum)).append("\n"); sb.append(" dbmQueriesAvgSum: ").append(toIndentedString(dbmQueriesAvgSum)).append("\n"); - sb.append(" fargateTasksCountAvg: ") - .append(toIndentedString(fargateTasksCountAvg)) - .append("\n"); - sb.append(" fargateTasksCountHwm: ") - .append(toIndentedString(fargateTasksCountHwm)) - .append("\n"); + sb.append(" fargateTasksCountAvg: ").append(toIndentedString(fargateTasksCountAvg)).append("\n"); + sb.append(" fargateTasksCountHwm: ").append(toIndentedString(fargateTasksCountHwm)).append("\n"); sb.append(" gcpHostTop99p: ").append(toIndentedString(gcpHostTop99p)).append("\n"); sb.append(" herokuHostTop99p: ").append(toIndentedString(herokuHostTop99p)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" incidentManagementMonthlyActiveUsersHwm: ") - .append(toIndentedString(incidentManagementMonthlyActiveUsersHwm)) - .append("\n"); - sb.append(" indexedEventsCountSum: ") - .append(toIndentedString(indexedEventsCountSum)) - .append("\n"); + sb.append(" incidentManagementMonthlyActiveUsersHwm: ").append(toIndentedString(incidentManagementMonthlyActiveUsersHwm)).append("\n"); + sb.append(" indexedEventsCountSum: ").append(toIndentedString(indexedEventsCountSum)).append("\n"); sb.append(" infraHostTop99p: ").append(toIndentedString(infraHostTop99p)).append("\n"); - sb.append(" ingestedEventsBytesSum: ") - .append(toIndentedString(ingestedEventsBytesSum)) - .append("\n"); + sb.append(" ingestedEventsBytesSum: ").append(toIndentedString(ingestedEventsBytesSum)).append("\n"); sb.append(" iotDeviceAggSum: ").append(toIndentedString(iotDeviceAggSum)).append("\n"); sb.append(" iotDeviceTop99pSum: ").append(toIndentedString(iotDeviceTop99pSum)).append("\n"); - sb.append(" mobileRumLiteSessionCountSum: ") - .append(toIndentedString(mobileRumLiteSessionCountSum)) - .append("\n"); - sb.append(" mobileRumSessionCountAndroidSum: ") - .append(toIndentedString(mobileRumSessionCountAndroidSum)) - .append("\n"); - sb.append(" mobileRumSessionCountFlutterSum: ") - .append(toIndentedString(mobileRumSessionCountFlutterSum)) - .append("\n"); - sb.append(" mobileRumSessionCountIosSum: ") - .append(toIndentedString(mobileRumSessionCountIosSum)) - .append("\n"); - sb.append(" mobileRumSessionCountReactnativeSum: ") - .append(toIndentedString(mobileRumSessionCountReactnativeSum)) - .append("\n"); - sb.append(" mobileRumSessionCountSum: ") - .append(toIndentedString(mobileRumSessionCountSum)) - .append("\n"); + sb.append(" mobileRumLiteSessionCountSum: ").append(toIndentedString(mobileRumLiteSessionCountSum)).append("\n"); + sb.append(" mobileRumSessionCountAndroidSum: ").append(toIndentedString(mobileRumSessionCountAndroidSum)).append("\n"); + sb.append(" mobileRumSessionCountFlutterSum: ").append(toIndentedString(mobileRumSessionCountFlutterSum)).append("\n"); + sb.append(" mobileRumSessionCountIosSum: ").append(toIndentedString(mobileRumSessionCountIosSum)).append("\n"); + sb.append(" mobileRumSessionCountReactnativeSum: ").append(toIndentedString(mobileRumSessionCountReactnativeSum)).append("\n"); + sb.append(" mobileRumSessionCountSum: ").append(toIndentedString(mobileRumSessionCountSum)).append("\n"); sb.append(" mobileRumUnitsSum: ").append(toIndentedString(mobileRumUnitsSum)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" netflowIndexedEventsCountSum: ") - .append(toIndentedString(netflowIndexedEventsCountSum)) - .append("\n"); + sb.append(" netflowIndexedEventsCountSum: ").append(toIndentedString(netflowIndexedEventsCountSum)).append("\n"); sb.append(" npmHostTop99p: ").append(toIndentedString(npmHostTop99p)).append("\n"); - sb.append(" observabilityPipelinesBytesProcessedSum: ") - .append(toIndentedString(observabilityPipelinesBytesProcessedSum)) - .append("\n"); - sb.append(" onlineArchiveEventsCountSum: ") - .append(toIndentedString(onlineArchiveEventsCountSum)) - .append("\n"); - sb.append(" opentelemetryApmHostTop99p: ") - .append(toIndentedString(opentelemetryApmHostTop99p)) - .append("\n"); - sb.append(" opentelemetryHostTop99p: ") - .append(toIndentedString(opentelemetryHostTop99p)) - .append("\n"); - sb.append(" profilingHostTop99p: ") - .append(toIndentedString(profilingHostTop99p)) - .append("\n"); + sb.append(" observabilityPipelinesBytesProcessedSum: ").append(toIndentedString(observabilityPipelinesBytesProcessedSum)).append("\n"); + sb.append(" onlineArchiveEventsCountSum: ").append(toIndentedString(onlineArchiveEventsCountSum)).append("\n"); + sb.append(" opentelemetryApmHostTop99p: ").append(toIndentedString(opentelemetryApmHostTop99p)).append("\n"); + sb.append(" opentelemetryHostTop99p: ").append(toIndentedString(opentelemetryHostTop99p)).append("\n"); + sb.append(" profilingHostTop99p: ").append(toIndentedString(profilingHostTop99p)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append(" region: ").append(toIndentedString(region)).append("\n"); - sb.append(" rumBrowserAndMobileSessionCount: ") - .append(toIndentedString(rumBrowserAndMobileSessionCount)) - .append("\n"); + sb.append(" rumBrowserAndMobileSessionCount: ").append(toIndentedString(rumBrowserAndMobileSessionCount)).append("\n"); sb.append(" rumSessionCountSum: ").append(toIndentedString(rumSessionCountSum)).append("\n"); - sb.append(" rumTotalSessionCountSum: ") - .append(toIndentedString(rumTotalSessionCountSum)) - .append("\n"); + sb.append(" rumTotalSessionCountSum: ").append(toIndentedString(rumTotalSessionCountSum)).append("\n"); sb.append(" rumUnitsSum: ").append(toIndentedString(rumUnitsSum)).append("\n"); - sb.append(" sdsApmScannedBytesSum: ") - .append(toIndentedString(sdsApmScannedBytesSum)) - .append("\n"); - sb.append(" sdsEventsScannedBytesSum: ") - .append(toIndentedString(sdsEventsScannedBytesSum)) - .append("\n"); - sb.append(" sdsLogsScannedBytesSum: ") - .append(toIndentedString(sdsLogsScannedBytesSum)) - .append("\n"); - sb.append(" sdsRumScannedBytesSum: ") - .append(toIndentedString(sdsRumScannedBytesSum)) - .append("\n"); - sb.append(" sdsTotalScannedBytesSum: ") - .append(toIndentedString(sdsTotalScannedBytesSum)) - .append("\n"); - sb.append(" syntheticsBrowserCheckCallsCountSum: ") - .append(toIndentedString(syntheticsBrowserCheckCallsCountSum)) - .append("\n"); - sb.append(" syntheticsCheckCallsCountSum: ") - .append(toIndentedString(syntheticsCheckCallsCountSum)) - .append("\n"); - sb.append(" syntheticsParallelTestingMaxSlotsHwm: ") - .append(toIndentedString(syntheticsParallelTestingMaxSlotsHwm)) - .append("\n"); - sb.append(" traceSearchIndexedEventsCountSum: ") - .append(toIndentedString(traceSearchIndexedEventsCountSum)) - .append("\n"); - sb.append(" twolIngestedEventsBytesSum: ") - .append(toIndentedString(twolIngestedEventsBytesSum)) - .append("\n"); + sb.append(" sdsApmScannedBytesSum: ").append(toIndentedString(sdsApmScannedBytesSum)).append("\n"); + sb.append(" sdsEventsScannedBytesSum: ").append(toIndentedString(sdsEventsScannedBytesSum)).append("\n"); + sb.append(" sdsLogsScannedBytesSum: ").append(toIndentedString(sdsLogsScannedBytesSum)).append("\n"); + sb.append(" sdsRumScannedBytesSum: ").append(toIndentedString(sdsRumScannedBytesSum)).append("\n"); + sb.append(" sdsTotalScannedBytesSum: ").append(toIndentedString(sdsTotalScannedBytesSum)).append("\n"); + sb.append(" syntheticsBrowserCheckCallsCountSum: ").append(toIndentedString(syntheticsBrowserCheckCallsCountSum)).append("\n"); + sb.append(" syntheticsCheckCallsCountSum: ").append(toIndentedString(syntheticsCheckCallsCountSum)).append("\n"); + sb.append(" syntheticsParallelTestingMaxSlotsHwm: ").append(toIndentedString(syntheticsParallelTestingMaxSlotsHwm)).append("\n"); + sb.append(" traceSearchIndexedEventsCountSum: ").append(toIndentedString(traceSearchIndexedEventsCountSum)).append("\n"); + sb.append(" twolIngestedEventsBytesSum: ").append(toIndentedString(twolIngestedEventsBytesSum)).append("\n"); sb.append(" vsphereHostTop99p: ").append(toIndentedString(vsphereHostTop99p)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSummaryResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSummaryResponse.java index 4bea21eb0e5..f54899c5315 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSummaryResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSummaryResponse.java @@ -6,20 +6,32 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response summarizing all usage aggregated across the months in the request for all organizations, - * and broken down by month and by organization. + *

Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization.

*/ @JsonPropertyOrder({ UsageSummaryResponse.JSON_PROPERTY_AGENT_HOST_TOP99P_SUM, @@ -108,15 +120,14 @@ UsageSummaryResponse.JSON_PROPERTY_USAGE, UsageSummaryResponse.JSON_PROPERTY_VSPHERE_HOST_TOP99P_SUM }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSummaryResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGENT_HOST_TOP99P_SUM = "agent_host_top99p_sum"; private Long agentHostTop99pSum; - public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P_SUM = - "apm_azure_app_service_host_top99p_sum"; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P_SUM = "apm_azure_app_service_host_top99p_sum"; private Long apmAzureAppServiceHostTop99pSum; public static final String JSON_PROPERTY_APM_FARGATE_COUNT_AVG_SUM = "apm_fargate_count_avg_sum"; @@ -125,16 +136,13 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_APM_HOST_TOP99P_SUM = "apm_host_top99p_sum"; private Long apmHostTop99pSum; - public static final String JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG_SUM = - "appsec_fargate_count_avg_sum"; + public static final String JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG_SUM = "appsec_fargate_count_avg_sum"; private Long appsecFargateCountAvgSum; - public static final String JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_AGG_SUM = - "audit_logs_lines_indexed_agg_sum"; + public static final String JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_AGG_SUM = "audit_logs_lines_indexed_agg_sum"; private Long auditLogsLinesIndexedAggSum; - public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS_SUM = - "avg_profiled_fargate_tasks_sum"; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS_SUM = "avg_profiled_fargate_tasks_sum"; private Long avgProfiledFargateTasksSum; public static final String JSON_PROPERTY_AWS_HOST_TOP99P_SUM = "aws_host_top99p_sum"; @@ -143,57 +151,46 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT = "aws_lambda_func_count"; private Long awsLambdaFuncCount; - public static final String JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM = - "aws_lambda_invocations_sum"; + public static final String JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM = "aws_lambda_invocations_sum"; private Long awsLambdaInvocationsSum; - public static final String JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P_SUM = - "azure_app_service_top99p_sum"; + public static final String JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P_SUM = "azure_app_service_top99p_sum"; private Long azureAppServiceTop99pSum; public static final String JSON_PROPERTY_AZURE_HOST_TOP99P_SUM = "azure_host_top99p_sum"; private Long azureHostTop99pSum; - public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES_AGG_SUM = - "billable_ingested_bytes_agg_sum"; + public static final String JSON_PROPERTY_BILLABLE_INGESTED_BYTES_AGG_SUM = "billable_ingested_bytes_agg_sum"; private Long billableIngestedBytesAggSum; - public static final String JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_AGG_SUM = - "browser_rum_lite_session_count_agg_sum"; + public static final String JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_AGG_SUM = "browser_rum_lite_session_count_agg_sum"; private Long browserRumLiteSessionCountAggSum; - public static final String JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_AGG_SUM = - "browser_rum_replay_session_count_agg_sum"; + public static final String JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_AGG_SUM = "browser_rum_replay_session_count_agg_sum"; private Long browserRumReplaySessionCountAggSum; public static final String JSON_PROPERTY_BROWSER_RUM_UNITS_AGG_SUM = "browser_rum_units_agg_sum"; private Long browserRumUnitsAggSum; - public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_AGG_SUM = - "ci_pipeline_indexed_spans_agg_sum"; + public static final String JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_AGG_SUM = "ci_pipeline_indexed_spans_agg_sum"; private Long ciPipelineIndexedSpansAggSum; - public static final String JSON_PROPERTY_CI_TEST_INDEXED_SPANS_AGG_SUM = - "ci_test_indexed_spans_agg_sum"; + public static final String JSON_PROPERTY_CI_TEST_INDEXED_SPANS_AGG_SUM = "ci_test_indexed_spans_agg_sum"; private Long ciTestIndexedSpansAggSum; - public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM_SUM = - "ci_visibility_pipeline_committers_hwm_sum"; + public static final String JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM_SUM = "ci_visibility_pipeline_committers_hwm_sum"; private Long ciVisibilityPipelineCommittersHwmSum; - public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM_SUM = - "ci_visibility_test_committers_hwm_sum"; + public static final String JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM_SUM = "ci_visibility_test_committers_hwm_sum"; private Long ciVisibilityTestCommittersHwmSum; - public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG_SUM = - "cloud_cost_management_host_count_avg_sum"; + public static final String JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG_SUM = "cloud_cost_management_host_count_avg_sum"; private Long cloudCostManagementHostCountAvgSum; public static final String JSON_PROPERTY_CONTAINER_AVG_SUM = "container_avg_sum"; private Long containerAvgSum; - public static final String JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG_SUM = - "container_excl_agent_avg_sum"; + public static final String JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG_SUM = "container_excl_agent_avg_sum"; private Long containerExclAgentAvgSum; public static final String JSON_PROPERTY_CONTAINER_HWM_SUM = "container_hwm_sum"; @@ -205,8 +202,7 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_CSPM_AWS_HOST_TOP99P_SUM = "cspm_aws_host_top99p_sum"; private Long cspmAwsHostTop99pSum; - public static final String JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P_SUM = - "cspm_azure_host_top99p_sum"; + public static final String JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P_SUM = "cspm_azure_host_top99p_sum"; private Long cspmAzureHostTop99pSum; public static final String JSON_PROPERTY_CSPM_CONTAINER_AVG_SUM = "cspm_container_avg_sum"; @@ -237,16 +233,13 @@ public class UsageSummaryResponse { private Long dbmQueriesAvgSum; public static final String JSON_PROPERTY_END_DATE = "end_date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime endDate; - public static final String JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG_SUM = - "fargate_tasks_count_avg_sum"; + public static final String JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG_SUM = "fargate_tasks_count_avg_sum"; private Long fargateTasksCountAvgSum; - public static final String JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM_SUM = - "fargate_tasks_count_hwm_sum"; + public static final String JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM_SUM = "fargate_tasks_count_hwm_sum"; private Long fargateTasksCountHwmSum; public static final String JSON_PROPERTY_GCP_HOST_TOP99P_SUM = "gcp_host_top99p_sum"; @@ -255,19 +248,16 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_HEROKU_HOST_TOP99P_SUM = "heroku_host_top99p_sum"; private Long herokuHostTop99pSum; - public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM_SUM = - "incident_management_monthly_active_users_hwm_sum"; + public static final String JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM_SUM = "incident_management_monthly_active_users_hwm_sum"; private Long incidentManagementMonthlyActiveUsersHwmSum; - public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM = - "indexed_events_count_agg_sum"; + public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM = "indexed_events_count_agg_sum"; private Long indexedEventsCountAggSum; public static final String JSON_PROPERTY_INFRA_HOST_TOP99P_SUM = "infra_host_top99p_sum"; private Long infraHostTop99pSum; - public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM = - "ingested_events_bytes_agg_sum"; + public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM = "ingested_events_bytes_agg_sum"; private Long ingestedEventsBytesAggSum; public static final String JSON_PROPERTY_IOT_DEVICE_AGG_SUM = "iot_device_agg_sum"; @@ -277,96 +267,76 @@ public class UsageSummaryResponse { private Long iotDeviceTop99pSum; public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime lastUpdated; - public static final String JSON_PROPERTY_LIVE_INDEXED_EVENTS_AGG_SUM = - "live_indexed_events_agg_sum"; + public static final String JSON_PROPERTY_LIVE_INDEXED_EVENTS_AGG_SUM = "live_indexed_events_agg_sum"; private Long liveIndexedEventsAggSum; - public static final String JSON_PROPERTY_LIVE_INGESTED_BYTES_AGG_SUM = - "live_ingested_bytes_agg_sum"; + public static final String JSON_PROPERTY_LIVE_INGESTED_BYTES_AGG_SUM = "live_ingested_bytes_agg_sum"; private Long liveIngestedBytesAggSum; public static final String JSON_PROPERTY_LOGS_BY_RETENTION = "logs_by_retention"; private LogsByRetention logsByRetention; - public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_AGG_SUM = - "mobile_rum_lite_session_count_agg_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_AGG_SUM = "mobile_rum_lite_session_count_agg_sum"; private Long mobileRumLiteSessionCountAggSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_AGG_SUM = - "mobile_rum_session_count_agg_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_AGG_SUM = "mobile_rum_session_count_agg_sum"; private Long mobileRumSessionCountAggSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_AGG_SUM = - "mobile_rum_session_count_android_agg_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_AGG_SUM = "mobile_rum_session_count_android_agg_sum"; private Long mobileRumSessionCountAndroidAggSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_AGG_SUM = - "mobile_rum_session_count_flutter_agg_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_AGG_SUM = "mobile_rum_session_count_flutter_agg_sum"; private Long mobileRumSessionCountFlutterAggSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_AGG_SUM = - "mobile_rum_session_count_ios_agg_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_AGG_SUM = "mobile_rum_session_count_ios_agg_sum"; private Long mobileRumSessionCountIosAggSum; - public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_AGG_SUM = - "mobile_rum_session_count_reactnative_agg_sum"; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_AGG_SUM = "mobile_rum_session_count_reactnative_agg_sum"; private Long mobileRumSessionCountReactnativeAggSum; public static final String JSON_PROPERTY_MOBILE_RUM_UNITS_AGG_SUM = "mobile_rum_units_agg_sum"; private Long mobileRumUnitsAggSum; - public static final String JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_AGG_SUM = - "netflow_indexed_events_count_agg_sum"; + public static final String JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_AGG_SUM = "netflow_indexed_events_count_agg_sum"; private Long netflowIndexedEventsCountAggSum; public static final String JSON_PROPERTY_NPM_HOST_TOP99P_SUM = "npm_host_top99p_sum"; private Long npmHostTop99pSum; - public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_AGG_SUM = - "observability_pipelines_bytes_processed_agg_sum"; + public static final String JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_AGG_SUM = "observability_pipelines_bytes_processed_agg_sum"; private Long observabilityPipelinesBytesProcessedAggSum; - public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_AGG_SUM = - "online_archive_events_count_agg_sum"; + public static final String JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_AGG_SUM = "online_archive_events_count_agg_sum"; private Long onlineArchiveEventsCountAggSum; - public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P_SUM = - "opentelemetry_apm_host_top99p_sum"; + public static final String JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P_SUM = "opentelemetry_apm_host_top99p_sum"; private Long opentelemetryApmHostTop99pSum; - public static final String JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P_SUM = - "opentelemetry_host_top99p_sum"; + public static final String JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P_SUM = "opentelemetry_host_top99p_sum"; private Long opentelemetryHostTop99pSum; - public static final String JSON_PROPERTY_PROFILING_CONTAINER_AGENT_COUNT_AVG = - "profiling_container_agent_count_avg"; + public static final String JSON_PROPERTY_PROFILING_CONTAINER_AGENT_COUNT_AVG = "profiling_container_agent_count_avg"; private Long profilingContainerAgentCountAvg; - public static final String JSON_PROPERTY_PROFILING_HOST_COUNT_TOP99P_SUM = - "profiling_host_count_top99p_sum"; + public static final String JSON_PROPERTY_PROFILING_HOST_COUNT_TOP99P_SUM = "profiling_host_count_top99p_sum"; private Long profilingHostCountTop99pSum; - public static final String JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_AGG_SUM = - "rehydrated_indexed_events_agg_sum"; + public static final String JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_AGG_SUM = "rehydrated_indexed_events_agg_sum"; private Long rehydratedIndexedEventsAggSum; - public static final String JSON_PROPERTY_REHYDRATED_INGESTED_BYTES_AGG_SUM = - "rehydrated_ingested_bytes_agg_sum"; + public static final String JSON_PROPERTY_REHYDRATED_INGESTED_BYTES_AGG_SUM = "rehydrated_ingested_bytes_agg_sum"; private Long rehydratedIngestedBytesAggSum; - public static final String JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT = - "rum_browser_and_mobile_session_count"; + public static final String JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT = "rum_browser_and_mobile_session_count"; private Long rumBrowserAndMobileSessionCount; public static final String JSON_PROPERTY_RUM_SESSION_COUNT_AGG_SUM = "rum_session_count_agg_sum"; private Long rumSessionCountAggSum; - public static final String JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_AGG_SUM = - "rum_total_session_count_agg_sum"; + public static final String JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_AGG_SUM = "rum_total_session_count_agg_sum"; private Long rumTotalSessionCountAggSum; public static final String JSON_PROPERTY_RUM_UNITS_AGG_SUM = "rum_units_agg_sum"; @@ -375,44 +345,35 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM = "sds_apm_scanned_bytes_sum"; private Long sdsApmScannedBytesSum; - public static final String JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM = - "sds_events_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM = "sds_events_scanned_bytes_sum"; private Long sdsEventsScannedBytesSum; - public static final String JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM = - "sds_logs_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM = "sds_logs_scanned_bytes_sum"; private Long sdsLogsScannedBytesSum; public static final String JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM = "sds_rum_scanned_bytes_sum"; private Long sdsRumScannedBytesSum; - public static final String JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM = - "sds_total_scanned_bytes_sum"; + public static final String JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM = "sds_total_scanned_bytes_sum"; private Long sdsTotalScannedBytesSum; public static final String JSON_PROPERTY_START_DATE = "start_date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime startDate; - public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_AGG_SUM = - "synthetics_browser_check_calls_count_agg_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_AGG_SUM = "synthetics_browser_check_calls_count_agg_sum"; private Long syntheticsBrowserCheckCallsCountAggSum; - public static final String JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_AGG_SUM = - "synthetics_check_calls_count_agg_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_AGG_SUM = "synthetics_check_calls_count_agg_sum"; private Long syntheticsCheckCallsCountAggSum; - public static final String JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM_SUM = - "synthetics_parallel_testing_max_slots_hwm_sum"; + public static final String JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM_SUM = "synthetics_parallel_testing_max_slots_hwm_sum"; private Long syntheticsParallelTestingMaxSlotsHwmSum; - public static final String JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_AGG_SUM = - "trace_search_indexed_events_count_agg_sum"; + public static final String JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_AGG_SUM = "trace_search_indexed_events_count_agg_sum"; private Long traceSearchIndexedEventsCountAggSum; - public static final String JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_AGG_SUM = - "twol_ingested_events_bytes_agg_sum"; + public static final String JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_AGG_SUM = "twol_ingested_events_bytes_agg_sum"; private Long twolIngestedEventsBytesAggSum; public static final String JSON_PROPERTY_USAGE = "usage"; @@ -427,1105 +388,950 @@ public UsageSummaryResponse agentHostTop99pSum(Long agentHostTop99pSum) { } /** - * Shows the 99th percentile of all agent hosts over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all agent hosts over all hours in the current months for all organizations.

* @return agentHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAgentHostTop99pSum() { - return agentHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAgentHostTop99pSum() { + return agentHostTop99pSum; + } public void setAgentHostTop99pSum(Long agentHostTop99pSum) { this.agentHostTop99pSum = agentHostTop99pSum; } - - public UsageSummaryResponse apmAzureAppServiceHostTop99pSum( - Long apmAzureAppServiceHostTop99pSum) { + public UsageSummaryResponse apmAzureAppServiceHostTop99pSum(Long apmAzureAppServiceHostTop99pSum) { this.apmAzureAppServiceHostTop99pSum = apmAzureAppServiceHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Azure app services using APM over all hours in the current - * months all organizations. - * + *

Shows the 99th percentile of all Azure app services using APM over all hours in the current months all organizations.

* @return apmAzureAppServiceHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmAzureAppServiceHostTop99pSum() { - return apmAzureAppServiceHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmAzureAppServiceHostTop99pSum() { + return apmAzureAppServiceHostTop99pSum; + } public void setApmAzureAppServiceHostTop99pSum(Long apmAzureAppServiceHostTop99pSum) { this.apmAzureAppServiceHostTop99pSum = apmAzureAppServiceHostTop99pSum; } - public UsageSummaryResponse apmFargateCountAvgSum(Long apmFargateCountAvgSum) { this.apmFargateCountAvgSum = apmFargateCountAvgSum; return this; } /** - * Shows the average of all APM ECS Fargate tasks over all hours in the current months for all - * organizations. - * + *

Shows the average of all APM ECS Fargate tasks over all hours in the current months for all organizations.

* @return apmFargateCountAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmFargateCountAvgSum() { - return apmFargateCountAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_FARGATE_COUNT_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmFargateCountAvgSum() { + return apmFargateCountAvgSum; + } public void setApmFargateCountAvgSum(Long apmFargateCountAvgSum) { this.apmFargateCountAvgSum = apmFargateCountAvgSum; } - public UsageSummaryResponse apmHostTop99pSum(Long apmHostTop99pSum) { this.apmHostTop99pSum = apmHostTop99pSum; return this; } /** - * Shows the 99th percentile of all distinct APM hosts over all hours in the current months for - * all organizations. - * + *

Shows the 99th percentile of all distinct APM hosts over all hours in the current months for all organizations.

* @return apmHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getApmHostTop99pSum() { - return apmHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getApmHostTop99pSum() { + return apmHostTop99pSum; + } public void setApmHostTop99pSum(Long apmHostTop99pSum) { this.apmHostTop99pSum = apmHostTop99pSum; } - public UsageSummaryResponse appsecFargateCountAvgSum(Long appsecFargateCountAvgSum) { this.appsecFargateCountAvgSum = appsecFargateCountAvgSum; return this; } /** - * Shows the average of all Application Security Monitoring ECS Fargate tasks over all hours in - * the current months for all organizations. - * + *

Shows the average of all Application Security Monitoring ECS Fargate tasks over all hours in the current months for all organizations.

* @return appsecFargateCountAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAppsecFargateCountAvgSum() { - return appsecFargateCountAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPSEC_FARGATE_COUNT_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAppsecFargateCountAvgSum() { + return appsecFargateCountAvgSum; + } public void setAppsecFargateCountAvgSum(Long appsecFargateCountAvgSum) { this.appsecFargateCountAvgSum = appsecFargateCountAvgSum; } - public UsageSummaryResponse auditLogsLinesIndexedAggSum(Long auditLogsLinesIndexedAggSum) { this.auditLogsLinesIndexedAggSum = auditLogsLinesIndexedAggSum; return this; } /** - * Shows the sum of all audit logs lines indexed over all hours in the current months for all - * organizations. - * + *

Shows the sum of all audit logs lines indexed over all hours in the current months for all organizations.

* @return auditLogsLinesIndexedAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAuditLogsLinesIndexedAggSum() { - return auditLogsLinesIndexedAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAuditLogsLinesIndexedAggSum() { + return auditLogsLinesIndexedAggSum; + } public void setAuditLogsLinesIndexedAggSum(Long auditLogsLinesIndexedAggSum) { this.auditLogsLinesIndexedAggSum = auditLogsLinesIndexedAggSum; } - public UsageSummaryResponse avgProfiledFargateTasksSum(Long avgProfiledFargateTasksSum) { this.avgProfiledFargateTasksSum = avgProfiledFargateTasksSum; return this; } /** - * Shows the average of all profiled Fargate tasks over all hours in the current months for all - * organizations. - * + *

Shows the average of all profiled Fargate tasks over all hours in the current months for all organizations.

* @return avgProfiledFargateTasksSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAvgProfiledFargateTasksSum() { - return avgProfiledFargateTasksSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAvgProfiledFargateTasksSum() { + return avgProfiledFargateTasksSum; + } public void setAvgProfiledFargateTasksSum(Long avgProfiledFargateTasksSum) { this.avgProfiledFargateTasksSum = avgProfiledFargateTasksSum; } - public UsageSummaryResponse awsHostTop99pSum(Long awsHostTop99pSum) { this.awsHostTop99pSum = awsHostTop99pSum; return this; } /** - * Shows the 99th percentile of all AWS hosts over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all AWS hosts over all hours in the current months for all organizations.

* @return awsHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsHostTop99pSum() { - return awsHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsHostTop99pSum() { + return awsHostTop99pSum; + } public void setAwsHostTop99pSum(Long awsHostTop99pSum) { this.awsHostTop99pSum = awsHostTop99pSum; } - public UsageSummaryResponse awsLambdaFuncCount(Long awsLambdaFuncCount) { this.awsLambdaFuncCount = awsLambdaFuncCount; return this; } /** - * Shows the average of the number of functions that executed 1 or more times each hour in the - * current months for all organizations. - * + *

Shows the average of the number of functions that executed 1 or more times each hour in the current months for all organizations.

* @return awsLambdaFuncCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsLambdaFuncCount() { - return awsLambdaFuncCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsLambdaFuncCount() { + return awsLambdaFuncCount; + } public void setAwsLambdaFuncCount(Long awsLambdaFuncCount) { this.awsLambdaFuncCount = awsLambdaFuncCount; } - public UsageSummaryResponse awsLambdaInvocationsSum(Long awsLambdaInvocationsSum) { this.awsLambdaInvocationsSum = awsLambdaInvocationsSum; return this; } /** - * Shows the sum of all AWS Lambda invocations over all hours in the current months for all - * organizations. - * + *

Shows the sum of all AWS Lambda invocations over all hours in the current months for all organizations.

* @return awsLambdaInvocationsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAwsLambdaInvocationsSum() { - return awsLambdaInvocationsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AWS_LAMBDA_INVOCATIONS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAwsLambdaInvocationsSum() { + return awsLambdaInvocationsSum; + } public void setAwsLambdaInvocationsSum(Long awsLambdaInvocationsSum) { this.awsLambdaInvocationsSum = awsLambdaInvocationsSum; } - public UsageSummaryResponse azureAppServiceTop99pSum(Long azureAppServiceTop99pSum) { this.azureAppServiceTop99pSum = azureAppServiceTop99pSum; return this; } /** - * Shows the 99th percentile of all Azure app services over all hours in the current months for - * all organizations. - * + *

Shows the 99th percentile of all Azure app services over all hours in the current months for all organizations.

* @return azureAppServiceTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAzureAppServiceTop99pSum() { - return azureAppServiceTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_APP_SERVICE_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAzureAppServiceTop99pSum() { + return azureAppServiceTop99pSum; + } public void setAzureAppServiceTop99pSum(Long azureAppServiceTop99pSum) { this.azureAppServiceTop99pSum = azureAppServiceTop99pSum; } - public UsageSummaryResponse azureHostTop99pSum(Long azureHostTop99pSum) { this.azureHostTop99pSum = azureHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Azure hosts over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all Azure hosts over all hours in the current months for all organizations.

* @return azureHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AZURE_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAzureHostTop99pSum() { - return azureHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAzureHostTop99pSum() { + return azureHostTop99pSum; + } public void setAzureHostTop99pSum(Long azureHostTop99pSum) { this.azureHostTop99pSum = azureHostTop99pSum; } - public UsageSummaryResponse billableIngestedBytesAggSum(Long billableIngestedBytesAggSum) { this.billableIngestedBytesAggSum = billableIngestedBytesAggSum; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current months for all - * organizations. - * + *

Shows the sum of all log bytes ingested over all hours in the current months for all organizations.

* @return billableIngestedBytesAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBillableIngestedBytesAggSum() { - return billableIngestedBytesAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLABLE_INGESTED_BYTES_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBillableIngestedBytesAggSum() { + return billableIngestedBytesAggSum; + } public void setBillableIngestedBytesAggSum(Long billableIngestedBytesAggSum) { this.billableIngestedBytesAggSum = billableIngestedBytesAggSum; } - - public UsageSummaryResponse browserRumLiteSessionCountAggSum( - Long browserRumLiteSessionCountAggSum) { + public UsageSummaryResponse browserRumLiteSessionCountAggSum(Long browserRumLiteSessionCountAggSum) { this.browserRumLiteSessionCountAggSum = browserRumLiteSessionCountAggSum; return this; } /** - * Shows the sum of all browser lite sessions over all hours in the current months for all - * organizations. - * + *

Shows the sum of all browser lite sessions over all hours in the current months for all organizations.

* @return browserRumLiteSessionCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumLiteSessionCountAggSum() { - return browserRumLiteSessionCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_LITE_SESSION_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumLiteSessionCountAggSum() { + return browserRumLiteSessionCountAggSum; + } public void setBrowserRumLiteSessionCountAggSum(Long browserRumLiteSessionCountAggSum) { this.browserRumLiteSessionCountAggSum = browserRumLiteSessionCountAggSum; } - - public UsageSummaryResponse browserRumReplaySessionCountAggSum( - Long browserRumReplaySessionCountAggSum) { + public UsageSummaryResponse browserRumReplaySessionCountAggSum(Long browserRumReplaySessionCountAggSum) { this.browserRumReplaySessionCountAggSum = browserRumReplaySessionCountAggSum; return this; } /** - * Shows the sum of all browser replay sessions over all hours in the current months for all - * organizations. - * + *

Shows the sum of all browser replay sessions over all hours in the current months for all organizations.

* @return browserRumReplaySessionCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumReplaySessionCountAggSum() { - return browserRumReplaySessionCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_REPLAY_SESSION_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumReplaySessionCountAggSum() { + return browserRumReplaySessionCountAggSum; + } public void setBrowserRumReplaySessionCountAggSum(Long browserRumReplaySessionCountAggSum) { this.browserRumReplaySessionCountAggSum = browserRumReplaySessionCountAggSum; } - public UsageSummaryResponse browserRumUnitsAggSum(Long browserRumUnitsAggSum) { this.browserRumUnitsAggSum = browserRumUnitsAggSum; return this; } /** - * Shows the sum of all browser RUM units over all hours in the current months for all - * organizations. - * + *

Shows the sum of all browser RUM units over all hours in the current months for all organizations.

* @return browserRumUnitsAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserRumUnitsAggSum() { - return browserRumUnitsAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_RUM_UNITS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserRumUnitsAggSum() { + return browserRumUnitsAggSum; + } public void setBrowserRumUnitsAggSum(Long browserRumUnitsAggSum) { this.browserRumUnitsAggSum = browserRumUnitsAggSum; } - public UsageSummaryResponse ciPipelineIndexedSpansAggSum(Long ciPipelineIndexedSpansAggSum) { this.ciPipelineIndexedSpansAggSum = ciPipelineIndexedSpansAggSum; return this; } /** - * Shows the sum of all CI pipeline indexed spans over all hours in the current months for all - * organizations. - * + *

Shows the sum of all CI pipeline indexed spans over all hours in the current months for all organizations.

* @return ciPipelineIndexedSpansAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiPipelineIndexedSpansAggSum() { - return ciPipelineIndexedSpansAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_PIPELINE_INDEXED_SPANS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiPipelineIndexedSpansAggSum() { + return ciPipelineIndexedSpansAggSum; + } public void setCiPipelineIndexedSpansAggSum(Long ciPipelineIndexedSpansAggSum) { this.ciPipelineIndexedSpansAggSum = ciPipelineIndexedSpansAggSum; } - public UsageSummaryResponse ciTestIndexedSpansAggSum(Long ciTestIndexedSpansAggSum) { this.ciTestIndexedSpansAggSum = ciTestIndexedSpansAggSum; return this; } /** - * Shows the sum of all CI test indexed spans over all hours in the current months for all - * organizations. - * + *

Shows the sum of all CI test indexed spans over all hours in the current months for all organizations.

* @return ciTestIndexedSpansAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiTestIndexedSpansAggSum() { - return ciTestIndexedSpansAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_TEST_INDEXED_SPANS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiTestIndexedSpansAggSum() { + return ciTestIndexedSpansAggSum; + } public void setCiTestIndexedSpansAggSum(Long ciTestIndexedSpansAggSum) { this.ciTestIndexedSpansAggSum = ciTestIndexedSpansAggSum; } - - public UsageSummaryResponse ciVisibilityPipelineCommittersHwmSum( - Long ciVisibilityPipelineCommittersHwmSum) { + public UsageSummaryResponse ciVisibilityPipelineCommittersHwmSum(Long ciVisibilityPipelineCommittersHwmSum) { this.ciVisibilityPipelineCommittersHwmSum = ciVisibilityPipelineCommittersHwmSum; return this; } /** - * Shows the high-water mark of all CI visibility pipeline committers over all hours in the - * current months for all organizations. - * + *

Shows the high-water mark of all CI visibility pipeline committers over all hours in the current months for all organizations.

* @return ciVisibilityPipelineCommittersHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityPipelineCommittersHwmSum() { - return ciVisibilityPipelineCommittersHwmSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_PIPELINE_COMMITTERS_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityPipelineCommittersHwmSum() { + return ciVisibilityPipelineCommittersHwmSum; + } public void setCiVisibilityPipelineCommittersHwmSum(Long ciVisibilityPipelineCommittersHwmSum) { this.ciVisibilityPipelineCommittersHwmSum = ciVisibilityPipelineCommittersHwmSum; } - - public UsageSummaryResponse ciVisibilityTestCommittersHwmSum( - Long ciVisibilityTestCommittersHwmSum) { + public UsageSummaryResponse ciVisibilityTestCommittersHwmSum(Long ciVisibilityTestCommittersHwmSum) { this.ciVisibilityTestCommittersHwmSum = ciVisibilityTestCommittersHwmSum; return this; } /** - * Shows the high-water mark of all CI visibility test committers over all hours in the current - * months for all organizations. - * + *

Shows the high-water mark of all CI visibility test committers over all hours in the current months for all organizations.

* @return ciVisibilityTestCommittersHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCiVisibilityTestCommittersHwmSum() { - return ciVisibilityTestCommittersHwmSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CI_VISIBILITY_TEST_COMMITTERS_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCiVisibilityTestCommittersHwmSum() { + return ciVisibilityTestCommittersHwmSum; + } public void setCiVisibilityTestCommittersHwmSum(Long ciVisibilityTestCommittersHwmSum) { this.ciVisibilityTestCommittersHwmSum = ciVisibilityTestCommittersHwmSum; } - - public UsageSummaryResponse cloudCostManagementHostCountAvgSum( - Long cloudCostManagementHostCountAvgSum) { + public UsageSummaryResponse cloudCostManagementHostCountAvgSum(Long cloudCostManagementHostCountAvgSum) { this.cloudCostManagementHostCountAvgSum = cloudCostManagementHostCountAvgSum; return this; } /** - * Sum of the host count average for Cloud Cost Management. - * + *

Sum of the host count average for Cloud Cost Management.

* @return cloudCostManagementHostCountAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCloudCostManagementHostCountAvgSum() { - return cloudCostManagementHostCountAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_COST_MANAGEMENT_HOST_COUNT_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCloudCostManagementHostCountAvgSum() { + return cloudCostManagementHostCountAvgSum; + } public void setCloudCostManagementHostCountAvgSum(Long cloudCostManagementHostCountAvgSum) { this.cloudCostManagementHostCountAvgSum = cloudCostManagementHostCountAvgSum; } - public UsageSummaryResponse containerAvgSum(Long containerAvgSum) { this.containerAvgSum = containerAvgSum; return this; } /** - * Shows the average of all distinct containers over all hours in the current months for all - * organizations. - * + *

Shows the average of all distinct containers over all hours in the current months for all organizations.

* @return containerAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerAvgSum() { - return containerAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerAvgSum() { + return containerAvgSum; + } public void setContainerAvgSum(Long containerAvgSum) { this.containerAvgSum = containerAvgSum; } - public UsageSummaryResponse containerExclAgentAvgSum(Long containerExclAgentAvgSum) { this.containerExclAgentAvgSum = containerExclAgentAvgSum; return this; } /** - * Shows the average of the containers without the Datadog Agent over all hours in the current - * month for all organizations. - * + *

Shows the average of the containers without the Datadog Agent over all hours in the current month for all organizations.

* @return containerExclAgentAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerExclAgentAvgSum() { - return containerExclAgentAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_EXCL_AGENT_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerExclAgentAvgSum() { + return containerExclAgentAvgSum; + } public void setContainerExclAgentAvgSum(Long containerExclAgentAvgSum) { this.containerExclAgentAvgSum = containerExclAgentAvgSum; } - public UsageSummaryResponse containerHwmSum(Long containerHwmSum) { this.containerHwmSum = containerHwmSum; return this; } /** - * Shows the sum of the high-water marks of all distinct containers over all hours in the current - * months for all organizations. - * + *

Shows the sum of the high-water marks of all distinct containers over all hours in the current months for all organizations.

* @return containerHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTAINER_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getContainerHwmSum() { - return containerHwmSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTAINER_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getContainerHwmSum() { + return containerHwmSum; + } public void setContainerHwmSum(Long containerHwmSum) { this.containerHwmSum = containerHwmSum; } - public UsageSummaryResponse cspmAasHostTop99pSum(Long cspmAasHostTop99pSum) { this.cspmAasHostTop99pSum = cspmAasHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts - * over all hours in the current months for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current months for all organizations.

* @return cspmAasHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AAS_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAasHostTop99pSum() { - return cspmAasHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AAS_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAasHostTop99pSum() { + return cspmAasHostTop99pSum; + } public void setCspmAasHostTop99pSum(Long cspmAasHostTop99pSum) { this.cspmAasHostTop99pSum = cspmAasHostTop99pSum; } - public UsageSummaryResponse cspmAwsHostTop99pSum(Long cspmAwsHostTop99pSum) { this.cspmAwsHostTop99pSum = cspmAwsHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management AWS hosts over all hours in - * the current months for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management AWS hosts over all hours in the current months for all organizations.

* @return cspmAwsHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AWS_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAwsHostTop99pSum() { - return cspmAwsHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AWS_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAwsHostTop99pSum() { + return cspmAwsHostTop99pSum; + } public void setCspmAwsHostTop99pSum(Long cspmAwsHostTop99pSum) { this.cspmAwsHostTop99pSum = cspmAwsHostTop99pSum; } - public UsageSummaryResponse cspmAzureHostTop99pSum(Long cspmAzureHostTop99pSum) { this.cspmAzureHostTop99pSum = cspmAzureHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours - * in the current months for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current months for all organizations.

* @return cspmAzureHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmAzureHostTop99pSum() { - return cspmAzureHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_AZURE_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmAzureHostTop99pSum() { + return cspmAzureHostTop99pSum; + } public void setCspmAzureHostTop99pSum(Long cspmAzureHostTop99pSum) { this.cspmAzureHostTop99pSum = cspmAzureHostTop99pSum; } - public UsageSummaryResponse cspmContainerAvgSum(Long cspmContainerAvgSum) { this.cspmContainerAvgSum = cspmContainerAvgSum; return this; } /** - * Shows the average number of Cloud Security Posture Management containers over all hours in the - * current months for all organizations. - * + *

Shows the average number of Cloud Security Posture Management containers over all hours in the current months for all organizations.

* @return cspmContainerAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmContainerAvgSum() { - return cspmContainerAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmContainerAvgSum() { + return cspmContainerAvgSum; + } public void setCspmContainerAvgSum(Long cspmContainerAvgSum) { this.cspmContainerAvgSum = cspmContainerAvgSum; } - public UsageSummaryResponse cspmContainerHwmSum(Long cspmContainerHwmSum) { this.cspmContainerHwmSum = cspmContainerHwmSum; return this; } /** - * Shows the sum of the the high-water marks of Cloud Security Posture Management containers over - * all hours in the current months for all organizations. - * + *

Shows the sum of the the high-water marks of Cloud Security Posture Management containers over all hours in the current months for all organizations.

* @return cspmContainerHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmContainerHwmSum() { - return cspmContainerHwmSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_CONTAINER_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmContainerHwmSum() { + return cspmContainerHwmSum; + } public void setCspmContainerHwmSum(Long cspmContainerHwmSum) { this.cspmContainerHwmSum = cspmContainerHwmSum; } - public UsageSummaryResponse cspmGcpHostTop99pSum(Long cspmGcpHostTop99pSum) { this.cspmGcpHostTop99pSum = cspmGcpHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in - * the current months for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in the current months for all organizations.

* @return cspmGcpHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_GCP_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmGcpHostTop99pSum() { - return cspmGcpHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_GCP_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmGcpHostTop99pSum() { + return cspmGcpHostTop99pSum; + } public void setCspmGcpHostTop99pSum(Long cspmGcpHostTop99pSum) { this.cspmGcpHostTop99pSum = cspmGcpHostTop99pSum; } - public UsageSummaryResponse cspmHostTop99pSum(Long cspmHostTop99pSum) { this.cspmHostTop99pSum = cspmHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the - * current months for all organizations. - * + *

Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current months for all organizations.

* @return cspmHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCspmHostTop99pSum() { - return cspmHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSPM_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCspmHostTop99pSum() { + return cspmHostTop99pSum; + } public void setCspmHostTop99pSum(Long cspmHostTop99pSum) { this.cspmHostTop99pSum = cspmHostTop99pSum; } - public UsageSummaryResponse customTsSum(Long customTsSum) { this.customTsSum = customTsSum; return this; } /** - * Shows the average number of distinct custom metrics over all hours in the current months for - * all organizations. - * + *

Shows the average number of distinct custom metrics over all hours in the current months for all organizations.

* @return customTsSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_TS_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCustomTsSum() { - return customTsSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TS_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCustomTsSum() { + return customTsSum; + } public void setCustomTsSum(Long customTsSum) { this.customTsSum = customTsSum; } - public UsageSummaryResponse cwsContainersAvgSum(Long cwsContainersAvgSum) { this.cwsContainersAvgSum = cwsContainersAvgSum; return this; } /** - * Shows the average of all distinct Cloud Workload Security containers over all hours in the - * current months for all organizations. - * + *

Shows the average of all distinct Cloud Workload Security containers over all hours in the current months for all organizations.

* @return cwsContainersAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_CONTAINERS_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsContainersAvgSum() { - return cwsContainersAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_CONTAINERS_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsContainersAvgSum() { + return cwsContainersAvgSum; + } public void setCwsContainersAvgSum(Long cwsContainersAvgSum) { this.cwsContainersAvgSum = cwsContainersAvgSum; } - public UsageSummaryResponse cwsHostTop99pSum(Long cwsHostTop99pSum) { this.cwsHostTop99pSum = cwsHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current - * months for all organizations. - * + *

Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current months for all organizations.

* @return cwsHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCwsHostTop99pSum() { - return cwsHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWS_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCwsHostTop99pSum() { + return cwsHostTop99pSum; + } public void setCwsHostTop99pSum(Long cwsHostTop99pSum) { this.cwsHostTop99pSum = cwsHostTop99pSum; } - public UsageSummaryResponse dbmHostTop99pSum(Long dbmHostTop99pSum) { this.dbmHostTop99pSum = dbmHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month - * for all organizations. - * + *

Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for all organizations.

* @return dbmHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmHostTop99pSum() { - return dbmHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmHostTop99pSum() { + return dbmHostTop99pSum; + } public void setDbmHostTop99pSum(Long dbmHostTop99pSum) { this.dbmHostTop99pSum = dbmHostTop99pSum; } - public UsageSummaryResponse dbmQueriesAvgSum(Long dbmQueriesAvgSum) { this.dbmQueriesAvgSum = dbmQueriesAvgSum; return this; } /** - * Shows the average of all distinct Database Monitoring Normalized Queries over all hours in the - * current month for all organizations. - * + *

Shows the average of all distinct Database Monitoring Normalized Queries over all hours in the current month for all organizations.

* @return dbmQueriesAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DBM_QUERIES_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDbmQueriesAvgSum() { - return dbmQueriesAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBM_QUERIES_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDbmQueriesAvgSum() { + return dbmQueriesAvgSum; + } public void setDbmQueriesAvgSum(Long dbmQueriesAvgSum) { this.dbmQueriesAvgSum = dbmQueriesAvgSum; } - public UsageSummaryResponse endDate(OffsetDateTime endDate) { this.endDate = endDate; return this; } /** - * Shows the last date of usage in the current months for all organizations. - * + *

Shows the last date of usage in the current months for all organizations.

* @return endDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getEndDate() { - return endDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getEndDate() { + return endDate; + } public void setEndDate(OffsetDateTime endDate) { this.endDate = endDate; } - public UsageSummaryResponse fargateTasksCountAvgSum(Long fargateTasksCountAvgSum) { this.fargateTasksCountAvgSum = fargateTasksCountAvgSum; return this; } /** - * Shows the average of all Fargate tasks over all hours in the current months for all - * organizations. - * + *

Shows the average of all Fargate tasks over all hours in the current months for all organizations.

* @return fargateTasksCountAvgSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFargateTasksCountAvgSum() { - return fargateTasksCountAvgSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_AVG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFargateTasksCountAvgSum() { + return fargateTasksCountAvgSum; + } public void setFargateTasksCountAvgSum(Long fargateTasksCountAvgSum) { this.fargateTasksCountAvgSum = fargateTasksCountAvgSum; } - public UsageSummaryResponse fargateTasksCountHwmSum(Long fargateTasksCountHwmSum) { this.fargateTasksCountHwmSum = fargateTasksCountHwmSum; return this; } /** - * Shows the sum of the high-water marks of all Fargate tasks over all hours in the current months - * for all organizations. - * + *

Shows the sum of the high-water marks of all Fargate tasks over all hours in the current months for all organizations.

* @return fargateTasksCountHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFargateTasksCountHwmSum() { - return fargateTasksCountHwmSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FARGATE_TASKS_COUNT_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getFargateTasksCountHwmSum() { + return fargateTasksCountHwmSum; + } public void setFargateTasksCountHwmSum(Long fargateTasksCountHwmSum) { this.fargateTasksCountHwmSum = fargateTasksCountHwmSum; } - public UsageSummaryResponse gcpHostTop99pSum(Long gcpHostTop99pSum) { this.gcpHostTop99pSum = gcpHostTop99pSum; return this; } /** - * Shows the 99th percentile of all GCP hosts over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all GCP hosts over all hours in the current months for all organizations.

* @return gcpHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GCP_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getGcpHostTop99pSum() { - return gcpHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GCP_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getGcpHostTop99pSum() { + return gcpHostTop99pSum; + } public void setGcpHostTop99pSum(Long gcpHostTop99pSum) { this.gcpHostTop99pSum = gcpHostTop99pSum; } - public UsageSummaryResponse herokuHostTop99pSum(Long herokuHostTop99pSum) { this.herokuHostTop99pSum = herokuHostTop99pSum; return this; } /** - * Shows the 99th percentile of all Heroku dynos over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all Heroku dynos over all hours in the current months for all organizations.

* @return herokuHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HEROKU_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getHerokuHostTop99pSum() { - return herokuHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEROKU_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getHerokuHostTop99pSum() { + return herokuHostTop99pSum; + } public void setHerokuHostTop99pSum(Long herokuHostTop99pSum) { this.herokuHostTop99pSum = herokuHostTop99pSum; } - - public UsageSummaryResponse incidentManagementMonthlyActiveUsersHwmSum( - Long incidentManagementMonthlyActiveUsersHwmSum) { + public UsageSummaryResponse incidentManagementMonthlyActiveUsersHwmSum(Long incidentManagementMonthlyActiveUsersHwmSum) { this.incidentManagementMonthlyActiveUsersHwmSum = incidentManagementMonthlyActiveUsersHwmSum; return this; } /** - * Shows sum of the the high-water marks of incident management monthly active users in the - * current months for all organizations. - * + *

Shows sum of the the high-water marks of incident management monthly active users in the current months for all organizations.

* @return incidentManagementMonthlyActiveUsersHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIncidentManagementMonthlyActiveUsersHwmSum() { - return incidentManagementMonthlyActiveUsersHwmSum; - } - - public void setIncidentManagementMonthlyActiveUsersHwmSum( - Long incidentManagementMonthlyActiveUsersHwmSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIncidentManagementMonthlyActiveUsersHwmSum() { + return incidentManagementMonthlyActiveUsersHwmSum; + } + public void setIncidentManagementMonthlyActiveUsersHwmSum(Long incidentManagementMonthlyActiveUsersHwmSum) { this.incidentManagementMonthlyActiveUsersHwmSum = incidentManagementMonthlyActiveUsersHwmSum; } - public UsageSummaryResponse indexedEventsCountAggSum(Long indexedEventsCountAggSum) { this.indexedEventsCountAggSum = indexedEventsCountAggSum; return this; } /** - * Shows the sum of all log events indexed over all hours in the current months for all - * organizations. - * + *

Shows the sum of all log events indexed over all hours in the current months for all organizations.

* @return indexedEventsCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCountAggSum() { - return indexedEventsCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCountAggSum() { + return indexedEventsCountAggSum; + } public void setIndexedEventsCountAggSum(Long indexedEventsCountAggSum) { this.indexedEventsCountAggSum = indexedEventsCountAggSum; } - public UsageSummaryResponse infraHostTop99pSum(Long infraHostTop99pSum) { this.infraHostTop99pSum = infraHostTop99pSum; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current - * months for all organizations. - * + *

Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current months for all organizations.

* @return infraHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostTop99pSum() { - return infraHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostTop99pSum() { + return infraHostTop99pSum; + } public void setInfraHostTop99pSum(Long infraHostTop99pSum) { this.infraHostTop99pSum = infraHostTop99pSum; } - public UsageSummaryResponse ingestedEventsBytesAggSum(Long ingestedEventsBytesAggSum) { this.ingestedEventsBytesAggSum = ingestedEventsBytesAggSum; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current months for all - * organizations. - * + *

Shows the sum of all log bytes ingested over all hours in the current months for all organizations.

* @return ingestedEventsBytesAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytesAggSum() { - return ingestedEventsBytesAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestedEventsBytesAggSum() { + return ingestedEventsBytesAggSum; + } public void setIngestedEventsBytesAggSum(Long ingestedEventsBytesAggSum) { this.ingestedEventsBytesAggSum = ingestedEventsBytesAggSum; } - public UsageSummaryResponse iotDeviceAggSum(Long iotDeviceAggSum) { this.iotDeviceAggSum = iotDeviceAggSum; return this; } /** - * Shows the sum of all IoT devices over all hours in the current months for all organizations. - * + *

Shows the sum of all IoT devices over all hours in the current months for all organizations.

* @return iotDeviceAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceAggSum() { - return iotDeviceAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceAggSum() { + return iotDeviceAggSum; + } public void setIotDeviceAggSum(Long iotDeviceAggSum) { this.iotDeviceAggSum = iotDeviceAggSum; } - public UsageSummaryResponse iotDeviceTop99pSum(Long iotDeviceTop99pSum) { this.iotDeviceTop99pSum = iotDeviceTop99pSum; return this; } /** - * Shows the 99th percentile of all IoT devices over all hours in the current months of all - * organizations. - * + *

Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations.

* @return iotDeviceTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceTop99pSum() { - return iotDeviceTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotDeviceTop99pSum() { + return iotDeviceTop99pSum; + } public void setIotDeviceTop99pSum(Long iotDeviceTop99pSum) { this.iotDeviceTop99pSum = iotDeviceTop99pSum; } - public UsageSummaryResponse lastUpdated(OffsetDateTime lastUpdated) { this.lastUpdated = lastUpdated; return this; } /** - * Shows the the most recent hour in the current months for all organizations for which all usages - * were calculated. - * + *

Shows the the most recent hour in the current months for all organizations for which all usages were calculated.

* @return lastUpdated - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_UPDATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getLastUpdated() { - return lastUpdated; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastUpdated() { + return lastUpdated; + } public void setLastUpdated(OffsetDateTime lastUpdated) { this.lastUpdated = lastUpdated; } - public UsageSummaryResponse liveIndexedEventsAggSum(Long liveIndexedEventsAggSum) { this.liveIndexedEventsAggSum = liveIndexedEventsAggSum; return this; } /** - * Shows the sum of all live logs indexed over all hours in the current months for all - * organizations (data available as of December 1, 2020). - * + *

Shows the sum of all live logs indexed over all hours in the current months for all organizations (data available as of December 1, 2020).

* @return liveIndexedEventsAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIVE_INDEXED_EVENTS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLiveIndexedEventsAggSum() { - return liveIndexedEventsAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVE_INDEXED_EVENTS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLiveIndexedEventsAggSum() { + return liveIndexedEventsAggSum; + } public void setLiveIndexedEventsAggSum(Long liveIndexedEventsAggSum) { this.liveIndexedEventsAggSum = liveIndexedEventsAggSum; } - public UsageSummaryResponse liveIngestedBytesAggSum(Long liveIngestedBytesAggSum) { this.liveIngestedBytesAggSum = liveIngestedBytesAggSum; return this; } /** - * Shows the sum of all live logs bytes ingested over all hours in the current months for all - * organizations (data available as of December 1, 2020). - * + *

Shows the sum of all live logs bytes ingested over all hours in the current months for all organizations (data available as of December 1, 2020).

* @return liveIngestedBytesAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIVE_INGESTED_BYTES_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLiveIngestedBytesAggSum() { - return liveIngestedBytesAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVE_INGESTED_BYTES_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLiveIngestedBytesAggSum() { + return liveIngestedBytesAggSum; + } public void setLiveIngestedBytesAggSum(Long liveIngestedBytesAggSum) { this.liveIngestedBytesAggSum = liveIngestedBytesAggSum; } - public UsageSummaryResponse logsByRetention(LogsByRetention logsByRetention) { this.logsByRetention = logsByRetention; this.unparsed |= logsByRetention.unparsed; @@ -1533,739 +1339,627 @@ public UsageSummaryResponse logsByRetention(LogsByRetention logsByRetention) { } /** - * Object containing logs usage data broken down by retention period. - * + *

Object containing logs usage data broken down by retention period.

* @return logsByRetention - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LOGS_BY_RETENTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsByRetention getLogsByRetention() { - return logsByRetention; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_BY_RETENTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsByRetention getLogsByRetention() { + return logsByRetention; + } public void setLogsByRetention(LogsByRetention logsByRetention) { this.logsByRetention = logsByRetention; } - - public UsageSummaryResponse mobileRumLiteSessionCountAggSum( - Long mobileRumLiteSessionCountAggSum) { + public UsageSummaryResponse mobileRumLiteSessionCountAggSum(Long mobileRumLiteSessionCountAggSum) { this.mobileRumLiteSessionCountAggSum = mobileRumLiteSessionCountAggSum; return this; } /** - * Shows the sum of all mobile lite sessions over all hours in the current months for all - * organizations. - * + *

Shows the sum of all mobile lite sessions over all hours in the current months for all organizations.

* @return mobileRumLiteSessionCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumLiteSessionCountAggSum() { - return mobileRumLiteSessionCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumLiteSessionCountAggSum() { + return mobileRumLiteSessionCountAggSum; + } public void setMobileRumLiteSessionCountAggSum(Long mobileRumLiteSessionCountAggSum) { this.mobileRumLiteSessionCountAggSum = mobileRumLiteSessionCountAggSum; } - public UsageSummaryResponse mobileRumSessionCountAggSum(Long mobileRumSessionCountAggSum) { this.mobileRumSessionCountAggSum = mobileRumSessionCountAggSum; return this; } /** - * Shows the sum of all mobile RUM Sessions over all hours in the current months for all - * organizations. - * + *

Shows the sum of all mobile RUM Sessions over all hours in the current months for all organizations.

* @return mobileRumSessionCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountAggSum() { - return mobileRumSessionCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountAggSum() { + return mobileRumSessionCountAggSum; + } public void setMobileRumSessionCountAggSum(Long mobileRumSessionCountAggSum) { this.mobileRumSessionCountAggSum = mobileRumSessionCountAggSum; } - - public UsageSummaryResponse mobileRumSessionCountAndroidAggSum( - Long mobileRumSessionCountAndroidAggSum) { + public UsageSummaryResponse mobileRumSessionCountAndroidAggSum(Long mobileRumSessionCountAndroidAggSum) { this.mobileRumSessionCountAndroidAggSum = mobileRumSessionCountAndroidAggSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on Android over all hours in the current months for - * all organizations. - * + *

Shows the sum of all mobile RUM Sessions on Android over all hours in the current months for all organizations.

* @return mobileRumSessionCountAndroidAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountAndroidAggSum() { - return mobileRumSessionCountAndroidAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountAndroidAggSum() { + return mobileRumSessionCountAndroidAggSum; + } public void setMobileRumSessionCountAndroidAggSum(Long mobileRumSessionCountAndroidAggSum) { this.mobileRumSessionCountAndroidAggSum = mobileRumSessionCountAndroidAggSum; } - - public UsageSummaryResponse mobileRumSessionCountFlutterAggSum( - Long mobileRumSessionCountFlutterAggSum) { + public UsageSummaryResponse mobileRumSessionCountFlutterAggSum(Long mobileRumSessionCountFlutterAggSum) { this.mobileRumSessionCountFlutterAggSum = mobileRumSessionCountFlutterAggSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on Flutter over all hours in the current months for - * all organizations. - * + *

Shows the sum of all mobile RUM Sessions on Flutter over all hours in the current months for all organizations.

* @return mobileRumSessionCountFlutterAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountFlutterAggSum() { - return mobileRumSessionCountFlutterAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountFlutterAggSum() { + return mobileRumSessionCountFlutterAggSum; + } public void setMobileRumSessionCountFlutterAggSum(Long mobileRumSessionCountFlutterAggSum) { this.mobileRumSessionCountFlutterAggSum = mobileRumSessionCountFlutterAggSum; } - public UsageSummaryResponse mobileRumSessionCountIosAggSum(Long mobileRumSessionCountIosAggSum) { this.mobileRumSessionCountIosAggSum = mobileRumSessionCountIosAggSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on iOS over all hours in the current months for all - * organizations. - * + *

Shows the sum of all mobile RUM Sessions on iOS over all hours in the current months for all organizations.

* @return mobileRumSessionCountIosAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountIosAggSum() { - return mobileRumSessionCountIosAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountIosAggSum() { + return mobileRumSessionCountIosAggSum; + } public void setMobileRumSessionCountIosAggSum(Long mobileRumSessionCountIosAggSum) { this.mobileRumSessionCountIosAggSum = mobileRumSessionCountIosAggSum; } - - public UsageSummaryResponse mobileRumSessionCountReactnativeAggSum( - Long mobileRumSessionCountReactnativeAggSum) { + public UsageSummaryResponse mobileRumSessionCountReactnativeAggSum(Long mobileRumSessionCountReactnativeAggSum) { this.mobileRumSessionCountReactnativeAggSum = mobileRumSessionCountReactnativeAggSum; return this; } /** - * Shows the sum of all mobile RUM Sessions on React Native over all hours in the current months - * for all organizations. - * + *

Shows the sum of all mobile RUM Sessions on React Native over all hours in the current months for all organizations.

* @return mobileRumSessionCountReactnativeAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumSessionCountReactnativeAggSum() { - return mobileRumSessionCountReactnativeAggSum; - } - - public void setMobileRumSessionCountReactnativeAggSum( - Long mobileRumSessionCountReactnativeAggSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_REACTNATIVE_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumSessionCountReactnativeAggSum() { + return mobileRumSessionCountReactnativeAggSum; + } + public void setMobileRumSessionCountReactnativeAggSum(Long mobileRumSessionCountReactnativeAggSum) { this.mobileRumSessionCountReactnativeAggSum = mobileRumSessionCountReactnativeAggSum; } - public UsageSummaryResponse mobileRumUnitsAggSum(Long mobileRumUnitsAggSum) { this.mobileRumUnitsAggSum = mobileRumUnitsAggSum; return this; } /** - * Shows the sum of all mobile RUM units over all hours in the current months for all - * organizations. - * + *

Shows the sum of all mobile RUM units over all hours in the current months for all organizations.

* @return mobileRumUnitsAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMobileRumUnitsAggSum() { - return mobileRumUnitsAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOBILE_RUM_UNITS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMobileRumUnitsAggSum() { + return mobileRumUnitsAggSum; + } public void setMobileRumUnitsAggSum(Long mobileRumUnitsAggSum) { this.mobileRumUnitsAggSum = mobileRumUnitsAggSum; } - - public UsageSummaryResponse netflowIndexedEventsCountAggSum( - Long netflowIndexedEventsCountAggSum) { + public UsageSummaryResponse netflowIndexedEventsCountAggSum(Long netflowIndexedEventsCountAggSum) { this.netflowIndexedEventsCountAggSum = netflowIndexedEventsCountAggSum; return this; } /** - * Shows the sum of all Network flows indexed over all hours in the current months for all - * organizations. - * + *

Shows the sum of all Network flows indexed over all hours in the current months for all organizations.

* @return netflowIndexedEventsCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNetflowIndexedEventsCountAggSum() { - return netflowIndexedEventsCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETFLOW_INDEXED_EVENTS_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNetflowIndexedEventsCountAggSum() { + return netflowIndexedEventsCountAggSum; + } public void setNetflowIndexedEventsCountAggSum(Long netflowIndexedEventsCountAggSum) { this.netflowIndexedEventsCountAggSum = netflowIndexedEventsCountAggSum; } - public UsageSummaryResponse npmHostTop99pSum(Long npmHostTop99pSum) { this.npmHostTop99pSum = npmHostTop99pSum; return this; } /** - * Shows the 99th percentile of all distinct Networks hosts over all hours in the current months - * for all organizations. - * + *

Shows the 99th percentile of all distinct Networks hosts over all hours in the current months for all organizations.

* @return npmHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNpmHostTop99pSum() { - return npmHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NPM_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNpmHostTop99pSum() { + return npmHostTop99pSum; + } public void setNpmHostTop99pSum(Long npmHostTop99pSum) { this.npmHostTop99pSum = npmHostTop99pSum; } - - public UsageSummaryResponse observabilityPipelinesBytesProcessedAggSum( - Long observabilityPipelinesBytesProcessedAggSum) { + public UsageSummaryResponse observabilityPipelinesBytesProcessedAggSum(Long observabilityPipelinesBytesProcessedAggSum) { this.observabilityPipelinesBytesProcessedAggSum = observabilityPipelinesBytesProcessedAggSum; return this; } /** - * Sum of all observability pipelines bytes processed over all hours in the current months for all - * organizations. - * + *

Sum of all observability pipelines bytes processed over all hours in the current months for all organizations.

* @return observabilityPipelinesBytesProcessedAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getObservabilityPipelinesBytesProcessedAggSum() { - return observabilityPipelinesBytesProcessedAggSum; - } - - public void setObservabilityPipelinesBytesProcessedAggSum( - Long observabilityPipelinesBytesProcessedAggSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PIPELINES_BYTES_PROCESSED_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getObservabilityPipelinesBytesProcessedAggSum() { + return observabilityPipelinesBytesProcessedAggSum; + } + public void setObservabilityPipelinesBytesProcessedAggSum(Long observabilityPipelinesBytesProcessedAggSum) { this.observabilityPipelinesBytesProcessedAggSum = observabilityPipelinesBytesProcessedAggSum; } - public UsageSummaryResponse onlineArchiveEventsCountAggSum(Long onlineArchiveEventsCountAggSum) { this.onlineArchiveEventsCountAggSum = onlineArchiveEventsCountAggSum; return this; } /** - * Sum of all online archived events over all hours in the current months for all organizations. - * + *

Sum of all online archived events over all hours in the current months for all organizations.

* @return onlineArchiveEventsCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOnlineArchiveEventsCountAggSum() { - return onlineArchiveEventsCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONLINE_ARCHIVE_EVENTS_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOnlineArchiveEventsCountAggSum() { + return onlineArchiveEventsCountAggSum; + } public void setOnlineArchiveEventsCountAggSum(Long onlineArchiveEventsCountAggSum) { this.onlineArchiveEventsCountAggSum = onlineArchiveEventsCountAggSum; } - public UsageSummaryResponse opentelemetryApmHostTop99pSum(Long opentelemetryApmHostTop99pSum) { this.opentelemetryApmHostTop99pSum = opentelemetryApmHostTop99pSum; return this; } /** - * Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry - * Collector over all hours in the current months for all organizations. - * + *

Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current months for all organizations.

* @return opentelemetryApmHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryApmHostTop99pSum() { - return opentelemetryApmHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_APM_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryApmHostTop99pSum() { + return opentelemetryApmHostTop99pSum; + } public void setOpentelemetryApmHostTop99pSum(Long opentelemetryApmHostTop99pSum) { this.opentelemetryApmHostTop99pSum = opentelemetryApmHostTop99pSum; } - public UsageSummaryResponse opentelemetryHostTop99pSum(Long opentelemetryHostTop99pSum) { this.opentelemetryHostTop99pSum = opentelemetryHostTop99pSum; return this; } /** - * Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry - * Collector over all hours in the current months for all organizations. - * + *

Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current months for all organizations.

* @return opentelemetryHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOpentelemetryHostTop99pSum() { - return opentelemetryHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENTELEMETRY_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOpentelemetryHostTop99pSum() { + return opentelemetryHostTop99pSum; + } public void setOpentelemetryHostTop99pSum(Long opentelemetryHostTop99pSum) { this.opentelemetryHostTop99pSum = opentelemetryHostTop99pSum; } - - public UsageSummaryResponse profilingContainerAgentCountAvg( - Long profilingContainerAgentCountAvg) { + public UsageSummaryResponse profilingContainerAgentCountAvg(Long profilingContainerAgentCountAvg) { this.profilingContainerAgentCountAvg = profilingContainerAgentCountAvg; return this; } /** - * Shows the average number of profiled containers over all hours in the current months for all - * organizations. - * + *

Shows the average number of profiled containers over all hours in the current months for all organizations.

* @return profilingContainerAgentCountAvg - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILING_CONTAINER_AGENT_COUNT_AVG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getProfilingContainerAgentCountAvg() { - return profilingContainerAgentCountAvg; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILING_CONTAINER_AGENT_COUNT_AVG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getProfilingContainerAgentCountAvg() { + return profilingContainerAgentCountAvg; + } public void setProfilingContainerAgentCountAvg(Long profilingContainerAgentCountAvg) { this.profilingContainerAgentCountAvg = profilingContainerAgentCountAvg; } - public UsageSummaryResponse profilingHostCountTop99pSum(Long profilingHostCountTop99pSum) { this.profilingHostCountTop99pSum = profilingHostCountTop99pSum; return this; } /** - * Shows the 99th percentile of all profiled hosts over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all profiled hosts over all hours in the current months for all organizations.

* @return profilingHostCountTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROFILING_HOST_COUNT_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getProfilingHostCountTop99pSum() { - return profilingHostCountTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILING_HOST_COUNT_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getProfilingHostCountTop99pSum() { + return profilingHostCountTop99pSum; + } public void setProfilingHostCountTop99pSum(Long profilingHostCountTop99pSum) { this.profilingHostCountTop99pSum = profilingHostCountTop99pSum; } - public UsageSummaryResponse rehydratedIndexedEventsAggSum(Long rehydratedIndexedEventsAggSum) { this.rehydratedIndexedEventsAggSum = rehydratedIndexedEventsAggSum; return this; } /** - * Shows the sum of all rehydrated logs indexed over all hours in the current months for all - * organizations (data available as of December 1, 2020). - * + *

Shows the sum of all rehydrated logs indexed over all hours in the current months for all organizations (data available as of December 1, 2020).

* @return rehydratedIndexedEventsAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRehydratedIndexedEventsAggSum() { - return rehydratedIndexedEventsAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REHYDRATED_INDEXED_EVENTS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRehydratedIndexedEventsAggSum() { + return rehydratedIndexedEventsAggSum; + } public void setRehydratedIndexedEventsAggSum(Long rehydratedIndexedEventsAggSum) { this.rehydratedIndexedEventsAggSum = rehydratedIndexedEventsAggSum; } - public UsageSummaryResponse rehydratedIngestedBytesAggSum(Long rehydratedIngestedBytesAggSum) { this.rehydratedIngestedBytesAggSum = rehydratedIngestedBytesAggSum; return this; } /** - * Shows the sum of all rehydrated logs bytes ingested over all hours in the current months for - * all organizations (data available as of December 1, 2020). - * + *

Shows the sum of all rehydrated logs bytes ingested over all hours in the current months for all organizations (data available as of December 1, 2020).

* @return rehydratedIngestedBytesAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REHYDRATED_INGESTED_BYTES_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRehydratedIngestedBytesAggSum() { - return rehydratedIngestedBytesAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REHYDRATED_INGESTED_BYTES_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRehydratedIngestedBytesAggSum() { + return rehydratedIngestedBytesAggSum; + } public void setRehydratedIngestedBytesAggSum(Long rehydratedIngestedBytesAggSum) { this.rehydratedIngestedBytesAggSum = rehydratedIngestedBytesAggSum; } - - public UsageSummaryResponse rumBrowserAndMobileSessionCount( - Long rumBrowserAndMobileSessionCount) { + public UsageSummaryResponse rumBrowserAndMobileSessionCount(Long rumBrowserAndMobileSessionCount) { this.rumBrowserAndMobileSessionCount = rumBrowserAndMobileSessionCount; return this; } /** - * Shows the sum of all mobile sessions and all browser lite and legacy sessions over all hours in - * the current month for all organizations. - * + *

Shows the sum of all mobile sessions and all browser lite and legacy sessions over all hours in the current month for all organizations.

* @return rumBrowserAndMobileSessionCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumBrowserAndMobileSessionCount() { - return rumBrowserAndMobileSessionCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_BROWSER_AND_MOBILE_SESSION_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumBrowserAndMobileSessionCount() { + return rumBrowserAndMobileSessionCount; + } public void setRumBrowserAndMobileSessionCount(Long rumBrowserAndMobileSessionCount) { this.rumBrowserAndMobileSessionCount = rumBrowserAndMobileSessionCount; } - public UsageSummaryResponse rumSessionCountAggSum(Long rumSessionCountAggSum) { this.rumSessionCountAggSum = rumSessionCountAggSum; return this; } /** - * Shows the sum of all browser RUM Lite Sessions over all hours in the current months for all - * organizations. - * + *

Shows the sum of all browser RUM Lite Sessions over all hours in the current months for all organizations.

* @return rumSessionCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_SESSION_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumSessionCountAggSum() { - return rumSessionCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_SESSION_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumSessionCountAggSum() { + return rumSessionCountAggSum; + } public void setRumSessionCountAggSum(Long rumSessionCountAggSum) { this.rumSessionCountAggSum = rumSessionCountAggSum; } - public UsageSummaryResponse rumTotalSessionCountAggSum(Long rumTotalSessionCountAggSum) { this.rumTotalSessionCountAggSum = rumTotalSessionCountAggSum; return this; } /** - * Shows the sum of RUM Sessions (browser and mobile) over all hours in the current months for all - * organizations. - * + *

Shows the sum of RUM Sessions (browser and mobile) over all hours in the current months for all organizations.

* @return rumTotalSessionCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumTotalSessionCountAggSum() { - return rumTotalSessionCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_TOTAL_SESSION_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumTotalSessionCountAggSum() { + return rumTotalSessionCountAggSum; + } public void setRumTotalSessionCountAggSum(Long rumTotalSessionCountAggSum) { this.rumTotalSessionCountAggSum = rumTotalSessionCountAggSum; } - public UsageSummaryResponse rumUnitsAggSum(Long rumUnitsAggSum) { this.rumUnitsAggSum = rumUnitsAggSum; return this; } /** - * Shows the sum of all browser and mobile RUM units over all hours in the current months for all - * organizations. - * + *

Shows the sum of all browser and mobile RUM units over all hours in the current months for all organizations.

* @return rumUnitsAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RUM_UNITS_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRumUnitsAggSum() { - return rumUnitsAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_UNITS_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRumUnitsAggSum() { + return rumUnitsAggSum; + } public void setRumUnitsAggSum(Long rumUnitsAggSum) { this.rumUnitsAggSum = rumUnitsAggSum; } - public UsageSummaryResponse sdsApmScannedBytesSum(Long sdsApmScannedBytesSum) { this.sdsApmScannedBytesSum = sdsApmScannedBytesSum; return this; } /** - * Sum of all APM bytes scanned with sensitive data scanner in the current months for all - * organizations. - * + *

Sum of all APM bytes scanned with sensitive data scanner in the current months for all organizations.

* @return sdsApmScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsApmScannedBytesSum() { - return sdsApmScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_APM_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsApmScannedBytesSum() { + return sdsApmScannedBytesSum; + } public void setSdsApmScannedBytesSum(Long sdsApmScannedBytesSum) { this.sdsApmScannedBytesSum = sdsApmScannedBytesSum; } - public UsageSummaryResponse sdsEventsScannedBytesSum(Long sdsEventsScannedBytesSum) { this.sdsEventsScannedBytesSum = sdsEventsScannedBytesSum; return this; } /** - * Sum of all event stream events bytes scanned with sensitive data scanner in the current months - * for all organizations. - * + *

Sum of all event stream events bytes scanned with sensitive data scanner in the current months for all organizations.

* @return sdsEventsScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsEventsScannedBytesSum() { - return sdsEventsScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_EVENTS_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsEventsScannedBytesSum() { + return sdsEventsScannedBytesSum; + } public void setSdsEventsScannedBytesSum(Long sdsEventsScannedBytesSum) { this.sdsEventsScannedBytesSum = sdsEventsScannedBytesSum; } - public UsageSummaryResponse sdsLogsScannedBytesSum(Long sdsLogsScannedBytesSum) { this.sdsLogsScannedBytesSum = sdsLogsScannedBytesSum; return this; } /** - * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours - * in the current month for all organizations. - * + *

Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations.

* @return sdsLogsScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsLogsScannedBytesSum() { - return sdsLogsScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_LOGS_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsLogsScannedBytesSum() { + return sdsLogsScannedBytesSum; + } public void setSdsLogsScannedBytesSum(Long sdsLogsScannedBytesSum) { this.sdsLogsScannedBytesSum = sdsLogsScannedBytesSum; } - public UsageSummaryResponse sdsRumScannedBytesSum(Long sdsRumScannedBytesSum) { this.sdsRumScannedBytesSum = sdsRumScannedBytesSum; return this; } /** - * Sum of all RUM bytes scanned with sensitive data scanner in the current months for all - * organizations. - * + *

Sum of all RUM bytes scanned with sensitive data scanner in the current months for all organizations.

* @return sdsRumScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsRumScannedBytesSum() { - return sdsRumScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_RUM_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsRumScannedBytesSum() { + return sdsRumScannedBytesSum; + } public void setSdsRumScannedBytesSum(Long sdsRumScannedBytesSum) { this.sdsRumScannedBytesSum = sdsRumScannedBytesSum; } - public UsageSummaryResponse sdsTotalScannedBytesSum(Long sdsTotalScannedBytesSum) { this.sdsTotalScannedBytesSum = sdsTotalScannedBytesSum; return this; } /** - * Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over - * all hours in the current month for all organizations. - * + *

Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for all organizations.

* @return sdsTotalScannedBytesSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSdsTotalScannedBytesSum() { - return sdsTotalScannedBytesSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_TOTAL_SCANNED_BYTES_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSdsTotalScannedBytesSum() { + return sdsTotalScannedBytesSum; + } public void setSdsTotalScannedBytesSum(Long sdsTotalScannedBytesSum) { this.sdsTotalScannedBytesSum = sdsTotalScannedBytesSum; } - public UsageSummaryResponse startDate(OffsetDateTime startDate) { this.startDate = startDate; return this; } /** - * Shows the first date of usage in the current months for all organizations. - * + *

Shows the first date of usage in the current months for all organizations.

* @return startDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getStartDate() { - return startDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStartDate() { + return startDate; + } public void setStartDate(OffsetDateTime startDate) { this.startDate = startDate; } - - public UsageSummaryResponse syntheticsBrowserCheckCallsCountAggSum( - Long syntheticsBrowserCheckCallsCountAggSum) { + public UsageSummaryResponse syntheticsBrowserCheckCallsCountAggSum(Long syntheticsBrowserCheckCallsCountAggSum) { this.syntheticsBrowserCheckCallsCountAggSum = syntheticsBrowserCheckCallsCountAggSum; return this; } /** - * Shows the sum of all Synthetic browser tests over all hours in the current months for all - * organizations. - * + *

Shows the sum of all Synthetic browser tests over all hours in the current months for all organizations.

* @return syntheticsBrowserCheckCallsCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsBrowserCheckCallsCountAggSum() { - return syntheticsBrowserCheckCallsCountAggSum; - } - - public void setSyntheticsBrowserCheckCallsCountAggSum( - Long syntheticsBrowserCheckCallsCountAggSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsBrowserCheckCallsCountAggSum() { + return syntheticsBrowserCheckCallsCountAggSum; + } + public void setSyntheticsBrowserCheckCallsCountAggSum(Long syntheticsBrowserCheckCallsCountAggSum) { this.syntheticsBrowserCheckCallsCountAggSum = syntheticsBrowserCheckCallsCountAggSum; } - - public UsageSummaryResponse syntheticsCheckCallsCountAggSum( - Long syntheticsCheckCallsCountAggSum) { + public UsageSummaryResponse syntheticsCheckCallsCountAggSum(Long syntheticsCheckCallsCountAggSum) { this.syntheticsCheckCallsCountAggSum = syntheticsCheckCallsCountAggSum; return this; } /** - * Shows the sum of all Synthetic API tests over all hours in the current months for all - * organizations. - * + *

Shows the sum of all Synthetic API tests over all hours in the current months for all organizations.

* @return syntheticsCheckCallsCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsCheckCallsCountAggSum() { - return syntheticsCheckCallsCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsCheckCallsCountAggSum() { + return syntheticsCheckCallsCountAggSum; + } public void setSyntheticsCheckCallsCountAggSum(Long syntheticsCheckCallsCountAggSum) { this.syntheticsCheckCallsCountAggSum = syntheticsCheckCallsCountAggSum; } - - public UsageSummaryResponse syntheticsParallelTestingMaxSlotsHwmSum( - Long syntheticsParallelTestingMaxSlotsHwmSum) { + public UsageSummaryResponse syntheticsParallelTestingMaxSlotsHwmSum(Long syntheticsParallelTestingMaxSlotsHwmSum) { this.syntheticsParallelTestingMaxSlotsHwmSum = syntheticsParallelTestingMaxSlotsHwmSum; return this; } /** - * Shows the sum of the high-water marks of used synthetics parallel testing slots over all hours - * in the current month for all organizations. - * + *

Shows the sum of the high-water marks of used synthetics parallel testing slots over all hours in the current month for all organizations.

* @return syntheticsParallelTestingMaxSlotsHwmSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSyntheticsParallelTestingMaxSlotsHwmSum() { - return syntheticsParallelTestingMaxSlotsHwmSum; - } - - public void setSyntheticsParallelTestingMaxSlotsHwmSum( - Long syntheticsParallelTestingMaxSlotsHwmSum) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETICS_PARALLEL_TESTING_MAX_SLOTS_HWM_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSyntheticsParallelTestingMaxSlotsHwmSum() { + return syntheticsParallelTestingMaxSlotsHwmSum; + } + public void setSyntheticsParallelTestingMaxSlotsHwmSum(Long syntheticsParallelTestingMaxSlotsHwmSum) { this.syntheticsParallelTestingMaxSlotsHwmSum = syntheticsParallelTestingMaxSlotsHwmSum; } - - public UsageSummaryResponse traceSearchIndexedEventsCountAggSum( - Long traceSearchIndexedEventsCountAggSum) { + public UsageSummaryResponse traceSearchIndexedEventsCountAggSum(Long traceSearchIndexedEventsCountAggSum) { this.traceSearchIndexedEventsCountAggSum = traceSearchIndexedEventsCountAggSum; return this; } /** - * Shows the sum of all Indexed Spans indexed over all hours in the current months for all - * organizations. - * + *

Shows the sum of all Indexed Spans indexed over all hours in the current months for all organizations.

* @return traceSearchIndexedEventsCountAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTraceSearchIndexedEventsCountAggSum() { - return traceSearchIndexedEventsCountAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_SEARCH_INDEXED_EVENTS_COUNT_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTraceSearchIndexedEventsCountAggSum() { + return traceSearchIndexedEventsCountAggSum; + } public void setTraceSearchIndexedEventsCountAggSum(Long traceSearchIndexedEventsCountAggSum) { this.traceSearchIndexedEventsCountAggSum = traceSearchIndexedEventsCountAggSum; } - public UsageSummaryResponse twolIngestedEventsBytesAggSum(Long twolIngestedEventsBytesAggSum) { this.twolIngestedEventsBytesAggSum = twolIngestedEventsBytesAggSum; return this; } /** - * Shows the sum of all ingested APM span bytes over all hours in the current months for all - * organizations. - * + *

Shows the sum of all ingested APM span bytes over all hours in the current months for all organizations.

* @return twolIngestedEventsBytesAggSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_AGG_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTwolIngestedEventsBytesAggSum() { - return twolIngestedEventsBytesAggSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWOL_INGESTED_EVENTS_BYTES_AGG_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTwolIngestedEventsBytesAggSum() { + return twolIngestedEventsBytesAggSum; + } public void setTwolIngestedEventsBytesAggSum(Long twolIngestedEventsBytesAggSum) { this.twolIngestedEventsBytesAggSum = twolIngestedEventsBytesAggSum; } - public UsageSummaryResponse usage(List usage) { this.usage = usage; for (UsageSummaryDate item : usage) { @@ -2273,7 +1967,6 @@ public UsageSummaryResponse usage(List usage) { } return this; } - public UsageSummaryResponse addUsageItem(UsageSummaryDate usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -2284,44 +1977,42 @@ public UsageSummaryResponse addUsageItem(UsageSummaryDate usageItem) { } /** - * An array of objects regarding hourly usage. - * + *

An array of objects regarding hourly usage.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - public UsageSummaryResponse vsphereHostTop99pSum(Long vsphereHostTop99pSum) { this.vsphereHostTop99pSum = vsphereHostTop99pSum; return this; } /** - * Shows the 99th percentile of all vSphere hosts over all hours in the current months for all - * organizations. - * + *

Shows the 99th percentile of all vSphere hosts over all hours in the current months for all organizations.

* @return vsphereHostTop99pSum - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_TOP99P_SUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVsphereHostTop99pSum() { - return vsphereHostTop99pSum; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VSPHERE_HOST_TOP99P_SUM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVsphereHostTop99pSum() { + return vsphereHostTop99pSum; + } public void setVsphereHostTop99pSum(Long vsphereHostTop99pSum) { this.vsphereHostTop99pSum = vsphereHostTop99pSum; } - /** Return true if this UsageSummaryResponse object is equal to o. */ + /** + * Return true if this UsageSummaryResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -2331,248 +2022,13 @@ public boolean equals(Object o) { return false; } UsageSummaryResponse usageSummaryResponse = (UsageSummaryResponse) o; - return Objects.equals(this.agentHostTop99pSum, usageSummaryResponse.agentHostTop99pSum) - && Objects.equals( - this.apmAzureAppServiceHostTop99pSum, - usageSummaryResponse.apmAzureAppServiceHostTop99pSum) - && Objects.equals(this.apmFargateCountAvgSum, usageSummaryResponse.apmFargateCountAvgSum) - && Objects.equals(this.apmHostTop99pSum, usageSummaryResponse.apmHostTop99pSum) - && Objects.equals( - this.appsecFargateCountAvgSum, usageSummaryResponse.appsecFargateCountAvgSum) - && Objects.equals( - this.auditLogsLinesIndexedAggSum, usageSummaryResponse.auditLogsLinesIndexedAggSum) - && Objects.equals( - this.avgProfiledFargateTasksSum, usageSummaryResponse.avgProfiledFargateTasksSum) - && Objects.equals(this.awsHostTop99pSum, usageSummaryResponse.awsHostTop99pSum) - && Objects.equals(this.awsLambdaFuncCount, usageSummaryResponse.awsLambdaFuncCount) - && Objects.equals( - this.awsLambdaInvocationsSum, usageSummaryResponse.awsLambdaInvocationsSum) - && Objects.equals( - this.azureAppServiceTop99pSum, usageSummaryResponse.azureAppServiceTop99pSum) - && Objects.equals(this.azureHostTop99pSum, usageSummaryResponse.azureHostTop99pSum) - && Objects.equals( - this.billableIngestedBytesAggSum, usageSummaryResponse.billableIngestedBytesAggSum) - && Objects.equals( - this.browserRumLiteSessionCountAggSum, - usageSummaryResponse.browserRumLiteSessionCountAggSum) - && Objects.equals( - this.browserRumReplaySessionCountAggSum, - usageSummaryResponse.browserRumReplaySessionCountAggSum) - && Objects.equals(this.browserRumUnitsAggSum, usageSummaryResponse.browserRumUnitsAggSum) - && Objects.equals( - this.ciPipelineIndexedSpansAggSum, usageSummaryResponse.ciPipelineIndexedSpansAggSum) - && Objects.equals( - this.ciTestIndexedSpansAggSum, usageSummaryResponse.ciTestIndexedSpansAggSum) - && Objects.equals( - this.ciVisibilityPipelineCommittersHwmSum, - usageSummaryResponse.ciVisibilityPipelineCommittersHwmSum) - && Objects.equals( - this.ciVisibilityTestCommittersHwmSum, - usageSummaryResponse.ciVisibilityTestCommittersHwmSum) - && Objects.equals( - this.cloudCostManagementHostCountAvgSum, - usageSummaryResponse.cloudCostManagementHostCountAvgSum) - && Objects.equals(this.containerAvgSum, usageSummaryResponse.containerAvgSum) - && Objects.equals( - this.containerExclAgentAvgSum, usageSummaryResponse.containerExclAgentAvgSum) - && Objects.equals(this.containerHwmSum, usageSummaryResponse.containerHwmSum) - && Objects.equals(this.cspmAasHostTop99pSum, usageSummaryResponse.cspmAasHostTop99pSum) - && Objects.equals(this.cspmAwsHostTop99pSum, usageSummaryResponse.cspmAwsHostTop99pSum) - && Objects.equals(this.cspmAzureHostTop99pSum, usageSummaryResponse.cspmAzureHostTop99pSum) - && Objects.equals(this.cspmContainerAvgSum, usageSummaryResponse.cspmContainerAvgSum) - && Objects.equals(this.cspmContainerHwmSum, usageSummaryResponse.cspmContainerHwmSum) - && Objects.equals(this.cspmGcpHostTop99pSum, usageSummaryResponse.cspmGcpHostTop99pSum) - && Objects.equals(this.cspmHostTop99pSum, usageSummaryResponse.cspmHostTop99pSum) - && Objects.equals(this.customTsSum, usageSummaryResponse.customTsSum) - && Objects.equals(this.cwsContainersAvgSum, usageSummaryResponse.cwsContainersAvgSum) - && Objects.equals(this.cwsHostTop99pSum, usageSummaryResponse.cwsHostTop99pSum) - && Objects.equals(this.dbmHostTop99pSum, usageSummaryResponse.dbmHostTop99pSum) - && Objects.equals(this.dbmQueriesAvgSum, usageSummaryResponse.dbmQueriesAvgSum) - && Objects.equals(this.endDate, usageSummaryResponse.endDate) - && Objects.equals( - this.fargateTasksCountAvgSum, usageSummaryResponse.fargateTasksCountAvgSum) - && Objects.equals( - this.fargateTasksCountHwmSum, usageSummaryResponse.fargateTasksCountHwmSum) - && Objects.equals(this.gcpHostTop99pSum, usageSummaryResponse.gcpHostTop99pSum) - && Objects.equals(this.herokuHostTop99pSum, usageSummaryResponse.herokuHostTop99pSum) - && Objects.equals( - this.incidentManagementMonthlyActiveUsersHwmSum, - usageSummaryResponse.incidentManagementMonthlyActiveUsersHwmSum) - && Objects.equals( - this.indexedEventsCountAggSum, usageSummaryResponse.indexedEventsCountAggSum) - && Objects.equals(this.infraHostTop99pSum, usageSummaryResponse.infraHostTop99pSum) - && Objects.equals( - this.ingestedEventsBytesAggSum, usageSummaryResponse.ingestedEventsBytesAggSum) - && Objects.equals(this.iotDeviceAggSum, usageSummaryResponse.iotDeviceAggSum) - && Objects.equals(this.iotDeviceTop99pSum, usageSummaryResponse.iotDeviceTop99pSum) - && Objects.equals(this.lastUpdated, usageSummaryResponse.lastUpdated) - && Objects.equals( - this.liveIndexedEventsAggSum, usageSummaryResponse.liveIndexedEventsAggSum) - && Objects.equals( - this.liveIngestedBytesAggSum, usageSummaryResponse.liveIngestedBytesAggSum) - && Objects.equals(this.logsByRetention, usageSummaryResponse.logsByRetention) - && Objects.equals( - this.mobileRumLiteSessionCountAggSum, - usageSummaryResponse.mobileRumLiteSessionCountAggSum) - && Objects.equals( - this.mobileRumSessionCountAggSum, usageSummaryResponse.mobileRumSessionCountAggSum) - && Objects.equals( - this.mobileRumSessionCountAndroidAggSum, - usageSummaryResponse.mobileRumSessionCountAndroidAggSum) - && Objects.equals( - this.mobileRumSessionCountFlutterAggSum, - usageSummaryResponse.mobileRumSessionCountFlutterAggSum) - && Objects.equals( - this.mobileRumSessionCountIosAggSum, - usageSummaryResponse.mobileRumSessionCountIosAggSum) - && Objects.equals( - this.mobileRumSessionCountReactnativeAggSum, - usageSummaryResponse.mobileRumSessionCountReactnativeAggSum) - && Objects.equals(this.mobileRumUnitsAggSum, usageSummaryResponse.mobileRumUnitsAggSum) - && Objects.equals( - this.netflowIndexedEventsCountAggSum, - usageSummaryResponse.netflowIndexedEventsCountAggSum) - && Objects.equals(this.npmHostTop99pSum, usageSummaryResponse.npmHostTop99pSum) - && Objects.equals( - this.observabilityPipelinesBytesProcessedAggSum, - usageSummaryResponse.observabilityPipelinesBytesProcessedAggSum) - && Objects.equals( - this.onlineArchiveEventsCountAggSum, - usageSummaryResponse.onlineArchiveEventsCountAggSum) - && Objects.equals( - this.opentelemetryApmHostTop99pSum, usageSummaryResponse.opentelemetryApmHostTop99pSum) - && Objects.equals( - this.opentelemetryHostTop99pSum, usageSummaryResponse.opentelemetryHostTop99pSum) - && Objects.equals( - this.profilingContainerAgentCountAvg, - usageSummaryResponse.profilingContainerAgentCountAvg) - && Objects.equals( - this.profilingHostCountTop99pSum, usageSummaryResponse.profilingHostCountTop99pSum) - && Objects.equals( - this.rehydratedIndexedEventsAggSum, usageSummaryResponse.rehydratedIndexedEventsAggSum) - && Objects.equals( - this.rehydratedIngestedBytesAggSum, usageSummaryResponse.rehydratedIngestedBytesAggSum) - && Objects.equals( - this.rumBrowserAndMobileSessionCount, - usageSummaryResponse.rumBrowserAndMobileSessionCount) - && Objects.equals(this.rumSessionCountAggSum, usageSummaryResponse.rumSessionCountAggSum) - && Objects.equals( - this.rumTotalSessionCountAggSum, usageSummaryResponse.rumTotalSessionCountAggSum) - && Objects.equals(this.rumUnitsAggSum, usageSummaryResponse.rumUnitsAggSum) - && Objects.equals(this.sdsApmScannedBytesSum, usageSummaryResponse.sdsApmScannedBytesSum) - && Objects.equals( - this.sdsEventsScannedBytesSum, usageSummaryResponse.sdsEventsScannedBytesSum) - && Objects.equals(this.sdsLogsScannedBytesSum, usageSummaryResponse.sdsLogsScannedBytesSum) - && Objects.equals(this.sdsRumScannedBytesSum, usageSummaryResponse.sdsRumScannedBytesSum) - && Objects.equals( - this.sdsTotalScannedBytesSum, usageSummaryResponse.sdsTotalScannedBytesSum) - && Objects.equals(this.startDate, usageSummaryResponse.startDate) - && Objects.equals( - this.syntheticsBrowserCheckCallsCountAggSum, - usageSummaryResponse.syntheticsBrowserCheckCallsCountAggSum) - && Objects.equals( - this.syntheticsCheckCallsCountAggSum, - usageSummaryResponse.syntheticsCheckCallsCountAggSum) - && Objects.equals( - this.syntheticsParallelTestingMaxSlotsHwmSum, - usageSummaryResponse.syntheticsParallelTestingMaxSlotsHwmSum) - && Objects.equals( - this.traceSearchIndexedEventsCountAggSum, - usageSummaryResponse.traceSearchIndexedEventsCountAggSum) - && Objects.equals( - this.twolIngestedEventsBytesAggSum, usageSummaryResponse.twolIngestedEventsBytesAggSum) - && Objects.equals(this.usage, usageSummaryResponse.usage) - && Objects.equals(this.vsphereHostTop99pSum, usageSummaryResponse.vsphereHostTop99pSum); + return Objects.equals(this.agentHostTop99pSum, usageSummaryResponse.agentHostTop99pSum) && Objects.equals(this.apmAzureAppServiceHostTop99pSum, usageSummaryResponse.apmAzureAppServiceHostTop99pSum) && Objects.equals(this.apmFargateCountAvgSum, usageSummaryResponse.apmFargateCountAvgSum) && Objects.equals(this.apmHostTop99pSum, usageSummaryResponse.apmHostTop99pSum) && Objects.equals(this.appsecFargateCountAvgSum, usageSummaryResponse.appsecFargateCountAvgSum) && Objects.equals(this.auditLogsLinesIndexedAggSum, usageSummaryResponse.auditLogsLinesIndexedAggSum) && Objects.equals(this.avgProfiledFargateTasksSum, usageSummaryResponse.avgProfiledFargateTasksSum) && Objects.equals(this.awsHostTop99pSum, usageSummaryResponse.awsHostTop99pSum) && Objects.equals(this.awsLambdaFuncCount, usageSummaryResponse.awsLambdaFuncCount) && Objects.equals(this.awsLambdaInvocationsSum, usageSummaryResponse.awsLambdaInvocationsSum) && Objects.equals(this.azureAppServiceTop99pSum, usageSummaryResponse.azureAppServiceTop99pSum) && Objects.equals(this.azureHostTop99pSum, usageSummaryResponse.azureHostTop99pSum) && Objects.equals(this.billableIngestedBytesAggSum, usageSummaryResponse.billableIngestedBytesAggSum) && Objects.equals(this.browserRumLiteSessionCountAggSum, usageSummaryResponse.browserRumLiteSessionCountAggSum) && Objects.equals(this.browserRumReplaySessionCountAggSum, usageSummaryResponse.browserRumReplaySessionCountAggSum) && Objects.equals(this.browserRumUnitsAggSum, usageSummaryResponse.browserRumUnitsAggSum) && Objects.equals(this.ciPipelineIndexedSpansAggSum, usageSummaryResponse.ciPipelineIndexedSpansAggSum) && Objects.equals(this.ciTestIndexedSpansAggSum, usageSummaryResponse.ciTestIndexedSpansAggSum) && Objects.equals(this.ciVisibilityPipelineCommittersHwmSum, usageSummaryResponse.ciVisibilityPipelineCommittersHwmSum) && Objects.equals(this.ciVisibilityTestCommittersHwmSum, usageSummaryResponse.ciVisibilityTestCommittersHwmSum) && Objects.equals(this.cloudCostManagementHostCountAvgSum, usageSummaryResponse.cloudCostManagementHostCountAvgSum) && Objects.equals(this.containerAvgSum, usageSummaryResponse.containerAvgSum) && Objects.equals(this.containerExclAgentAvgSum, usageSummaryResponse.containerExclAgentAvgSum) && Objects.equals(this.containerHwmSum, usageSummaryResponse.containerHwmSum) && Objects.equals(this.cspmAasHostTop99pSum, usageSummaryResponse.cspmAasHostTop99pSum) && Objects.equals(this.cspmAwsHostTop99pSum, usageSummaryResponse.cspmAwsHostTop99pSum) && Objects.equals(this.cspmAzureHostTop99pSum, usageSummaryResponse.cspmAzureHostTop99pSum) && Objects.equals(this.cspmContainerAvgSum, usageSummaryResponse.cspmContainerAvgSum) && Objects.equals(this.cspmContainerHwmSum, usageSummaryResponse.cspmContainerHwmSum) && Objects.equals(this.cspmGcpHostTop99pSum, usageSummaryResponse.cspmGcpHostTop99pSum) && Objects.equals(this.cspmHostTop99pSum, usageSummaryResponse.cspmHostTop99pSum) && Objects.equals(this.customTsSum, usageSummaryResponse.customTsSum) && Objects.equals(this.cwsContainersAvgSum, usageSummaryResponse.cwsContainersAvgSum) && Objects.equals(this.cwsHostTop99pSum, usageSummaryResponse.cwsHostTop99pSum) && Objects.equals(this.dbmHostTop99pSum, usageSummaryResponse.dbmHostTop99pSum) && Objects.equals(this.dbmQueriesAvgSum, usageSummaryResponse.dbmQueriesAvgSum) && Objects.equals(this.endDate, usageSummaryResponse.endDate) && Objects.equals(this.fargateTasksCountAvgSum, usageSummaryResponse.fargateTasksCountAvgSum) && Objects.equals(this.fargateTasksCountHwmSum, usageSummaryResponse.fargateTasksCountHwmSum) && Objects.equals(this.gcpHostTop99pSum, usageSummaryResponse.gcpHostTop99pSum) && Objects.equals(this.herokuHostTop99pSum, usageSummaryResponse.herokuHostTop99pSum) && Objects.equals(this.incidentManagementMonthlyActiveUsersHwmSum, usageSummaryResponse.incidentManagementMonthlyActiveUsersHwmSum) && Objects.equals(this.indexedEventsCountAggSum, usageSummaryResponse.indexedEventsCountAggSum) && Objects.equals(this.infraHostTop99pSum, usageSummaryResponse.infraHostTop99pSum) && Objects.equals(this.ingestedEventsBytesAggSum, usageSummaryResponse.ingestedEventsBytesAggSum) && Objects.equals(this.iotDeviceAggSum, usageSummaryResponse.iotDeviceAggSum) && Objects.equals(this.iotDeviceTop99pSum, usageSummaryResponse.iotDeviceTop99pSum) && Objects.equals(this.lastUpdated, usageSummaryResponse.lastUpdated) && Objects.equals(this.liveIndexedEventsAggSum, usageSummaryResponse.liveIndexedEventsAggSum) && Objects.equals(this.liveIngestedBytesAggSum, usageSummaryResponse.liveIngestedBytesAggSum) && Objects.equals(this.logsByRetention, usageSummaryResponse.logsByRetention) && Objects.equals(this.mobileRumLiteSessionCountAggSum, usageSummaryResponse.mobileRumLiteSessionCountAggSum) && Objects.equals(this.mobileRumSessionCountAggSum, usageSummaryResponse.mobileRumSessionCountAggSum) && Objects.equals(this.mobileRumSessionCountAndroidAggSum, usageSummaryResponse.mobileRumSessionCountAndroidAggSum) && Objects.equals(this.mobileRumSessionCountFlutterAggSum, usageSummaryResponse.mobileRumSessionCountFlutterAggSum) && Objects.equals(this.mobileRumSessionCountIosAggSum, usageSummaryResponse.mobileRumSessionCountIosAggSum) && Objects.equals(this.mobileRumSessionCountReactnativeAggSum, usageSummaryResponse.mobileRumSessionCountReactnativeAggSum) && Objects.equals(this.mobileRumUnitsAggSum, usageSummaryResponse.mobileRumUnitsAggSum) && Objects.equals(this.netflowIndexedEventsCountAggSum, usageSummaryResponse.netflowIndexedEventsCountAggSum) && Objects.equals(this.npmHostTop99pSum, usageSummaryResponse.npmHostTop99pSum) && Objects.equals(this.observabilityPipelinesBytesProcessedAggSum, usageSummaryResponse.observabilityPipelinesBytesProcessedAggSum) && Objects.equals(this.onlineArchiveEventsCountAggSum, usageSummaryResponse.onlineArchiveEventsCountAggSum) && Objects.equals(this.opentelemetryApmHostTop99pSum, usageSummaryResponse.opentelemetryApmHostTop99pSum) && Objects.equals(this.opentelemetryHostTop99pSum, usageSummaryResponse.opentelemetryHostTop99pSum) && Objects.equals(this.profilingContainerAgentCountAvg, usageSummaryResponse.profilingContainerAgentCountAvg) && Objects.equals(this.profilingHostCountTop99pSum, usageSummaryResponse.profilingHostCountTop99pSum) && Objects.equals(this.rehydratedIndexedEventsAggSum, usageSummaryResponse.rehydratedIndexedEventsAggSum) && Objects.equals(this.rehydratedIngestedBytesAggSum, usageSummaryResponse.rehydratedIngestedBytesAggSum) && Objects.equals(this.rumBrowserAndMobileSessionCount, usageSummaryResponse.rumBrowserAndMobileSessionCount) && Objects.equals(this.rumSessionCountAggSum, usageSummaryResponse.rumSessionCountAggSum) && Objects.equals(this.rumTotalSessionCountAggSum, usageSummaryResponse.rumTotalSessionCountAggSum) && Objects.equals(this.rumUnitsAggSum, usageSummaryResponse.rumUnitsAggSum) && Objects.equals(this.sdsApmScannedBytesSum, usageSummaryResponse.sdsApmScannedBytesSum) && Objects.equals(this.sdsEventsScannedBytesSum, usageSummaryResponse.sdsEventsScannedBytesSum) && Objects.equals(this.sdsLogsScannedBytesSum, usageSummaryResponse.sdsLogsScannedBytesSum) && Objects.equals(this.sdsRumScannedBytesSum, usageSummaryResponse.sdsRumScannedBytesSum) && Objects.equals(this.sdsTotalScannedBytesSum, usageSummaryResponse.sdsTotalScannedBytesSum) && Objects.equals(this.startDate, usageSummaryResponse.startDate) && Objects.equals(this.syntheticsBrowserCheckCallsCountAggSum, usageSummaryResponse.syntheticsBrowserCheckCallsCountAggSum) && Objects.equals(this.syntheticsCheckCallsCountAggSum, usageSummaryResponse.syntheticsCheckCallsCountAggSum) && Objects.equals(this.syntheticsParallelTestingMaxSlotsHwmSum, usageSummaryResponse.syntheticsParallelTestingMaxSlotsHwmSum) && Objects.equals(this.traceSearchIndexedEventsCountAggSum, usageSummaryResponse.traceSearchIndexedEventsCountAggSum) && Objects.equals(this.twolIngestedEventsBytesAggSum, usageSummaryResponse.twolIngestedEventsBytesAggSum) && Objects.equals(this.usage, usageSummaryResponse.usage) && Objects.equals(this.vsphereHostTop99pSum, usageSummaryResponse.vsphereHostTop99pSum); } + @Override public int hashCode() { - return Objects.hash( - agentHostTop99pSum, - apmAzureAppServiceHostTop99pSum, - apmFargateCountAvgSum, - apmHostTop99pSum, - appsecFargateCountAvgSum, - auditLogsLinesIndexedAggSum, - avgProfiledFargateTasksSum, - awsHostTop99pSum, - awsLambdaFuncCount, - awsLambdaInvocationsSum, - azureAppServiceTop99pSum, - azureHostTop99pSum, - billableIngestedBytesAggSum, - browserRumLiteSessionCountAggSum, - browserRumReplaySessionCountAggSum, - browserRumUnitsAggSum, - ciPipelineIndexedSpansAggSum, - ciTestIndexedSpansAggSum, - ciVisibilityPipelineCommittersHwmSum, - ciVisibilityTestCommittersHwmSum, - cloudCostManagementHostCountAvgSum, - containerAvgSum, - containerExclAgentAvgSum, - containerHwmSum, - cspmAasHostTop99pSum, - cspmAwsHostTop99pSum, - cspmAzureHostTop99pSum, - cspmContainerAvgSum, - cspmContainerHwmSum, - cspmGcpHostTop99pSum, - cspmHostTop99pSum, - customTsSum, - cwsContainersAvgSum, - cwsHostTop99pSum, - dbmHostTop99pSum, - dbmQueriesAvgSum, - endDate, - fargateTasksCountAvgSum, - fargateTasksCountHwmSum, - gcpHostTop99pSum, - herokuHostTop99pSum, - incidentManagementMonthlyActiveUsersHwmSum, - indexedEventsCountAggSum, - infraHostTop99pSum, - ingestedEventsBytesAggSum, - iotDeviceAggSum, - iotDeviceTop99pSum, - lastUpdated, - liveIndexedEventsAggSum, - liveIngestedBytesAggSum, - logsByRetention, - mobileRumLiteSessionCountAggSum, - mobileRumSessionCountAggSum, - mobileRumSessionCountAndroidAggSum, - mobileRumSessionCountFlutterAggSum, - mobileRumSessionCountIosAggSum, - mobileRumSessionCountReactnativeAggSum, - mobileRumUnitsAggSum, - netflowIndexedEventsCountAggSum, - npmHostTop99pSum, - observabilityPipelinesBytesProcessedAggSum, - onlineArchiveEventsCountAggSum, - opentelemetryApmHostTop99pSum, - opentelemetryHostTop99pSum, - profilingContainerAgentCountAvg, - profilingHostCountTop99pSum, - rehydratedIndexedEventsAggSum, - rehydratedIngestedBytesAggSum, - rumBrowserAndMobileSessionCount, - rumSessionCountAggSum, - rumTotalSessionCountAggSum, - rumUnitsAggSum, - sdsApmScannedBytesSum, - sdsEventsScannedBytesSum, - sdsLogsScannedBytesSum, - sdsRumScannedBytesSum, - sdsTotalScannedBytesSum, - startDate, - syntheticsBrowserCheckCallsCountAggSum, - syntheticsCheckCallsCountAggSum, - syntheticsParallelTestingMaxSlotsHwmSum, - traceSearchIndexedEventsCountAggSum, - twolIngestedEventsBytesAggSum, - usage, - vsphereHostTop99pSum); + return Objects.hash(agentHostTop99pSum,apmAzureAppServiceHostTop99pSum,apmFargateCountAvgSum,apmHostTop99pSum,appsecFargateCountAvgSum,auditLogsLinesIndexedAggSum,avgProfiledFargateTasksSum,awsHostTop99pSum,awsLambdaFuncCount,awsLambdaInvocationsSum,azureAppServiceTop99pSum,azureHostTop99pSum,billableIngestedBytesAggSum,browserRumLiteSessionCountAggSum,browserRumReplaySessionCountAggSum,browserRumUnitsAggSum,ciPipelineIndexedSpansAggSum,ciTestIndexedSpansAggSum,ciVisibilityPipelineCommittersHwmSum,ciVisibilityTestCommittersHwmSum,cloudCostManagementHostCountAvgSum,containerAvgSum,containerExclAgentAvgSum,containerHwmSum,cspmAasHostTop99pSum,cspmAwsHostTop99pSum,cspmAzureHostTop99pSum,cspmContainerAvgSum,cspmContainerHwmSum,cspmGcpHostTop99pSum,cspmHostTop99pSum,customTsSum,cwsContainersAvgSum,cwsHostTop99pSum,dbmHostTop99pSum,dbmQueriesAvgSum,endDate,fargateTasksCountAvgSum,fargateTasksCountHwmSum,gcpHostTop99pSum,herokuHostTop99pSum,incidentManagementMonthlyActiveUsersHwmSum,indexedEventsCountAggSum,infraHostTop99pSum,ingestedEventsBytesAggSum,iotDeviceAggSum,iotDeviceTop99pSum,lastUpdated,liveIndexedEventsAggSum,liveIngestedBytesAggSum,logsByRetention,mobileRumLiteSessionCountAggSum,mobileRumSessionCountAggSum,mobileRumSessionCountAndroidAggSum,mobileRumSessionCountFlutterAggSum,mobileRumSessionCountIosAggSum,mobileRumSessionCountReactnativeAggSum,mobileRumUnitsAggSum,netflowIndexedEventsCountAggSum,npmHostTop99pSum,observabilityPipelinesBytesProcessedAggSum,onlineArchiveEventsCountAggSum,opentelemetryApmHostTop99pSum,opentelemetryHostTop99pSum,profilingContainerAgentCountAvg,profilingHostCountTop99pSum,rehydratedIndexedEventsAggSum,rehydratedIngestedBytesAggSum,rumBrowserAndMobileSessionCount,rumSessionCountAggSum,rumTotalSessionCountAggSum,rumUnitsAggSum,sdsApmScannedBytesSum,sdsEventsScannedBytesSum,sdsLogsScannedBytesSum,sdsRumScannedBytesSum,sdsTotalScannedBytesSum,startDate,syntheticsBrowserCheckCallsCountAggSum,syntheticsCheckCallsCountAggSum,syntheticsParallelTestingMaxSlotsHwmSum,traceSearchIndexedEventsCountAggSum,twolIngestedEventsBytesAggSum,usage,vsphereHostTop99pSum); } @Override @@ -2580,220 +2036,97 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSummaryResponse {\n"); sb.append(" agentHostTop99pSum: ").append(toIndentedString(agentHostTop99pSum)).append("\n"); - sb.append(" apmAzureAppServiceHostTop99pSum: ") - .append(toIndentedString(apmAzureAppServiceHostTop99pSum)) - .append("\n"); - sb.append(" apmFargateCountAvgSum: ") - .append(toIndentedString(apmFargateCountAvgSum)) - .append("\n"); + sb.append(" apmAzureAppServiceHostTop99pSum: ").append(toIndentedString(apmAzureAppServiceHostTop99pSum)).append("\n"); + sb.append(" apmFargateCountAvgSum: ").append(toIndentedString(apmFargateCountAvgSum)).append("\n"); sb.append(" apmHostTop99pSum: ").append(toIndentedString(apmHostTop99pSum)).append("\n"); - sb.append(" appsecFargateCountAvgSum: ") - .append(toIndentedString(appsecFargateCountAvgSum)) - .append("\n"); - sb.append(" auditLogsLinesIndexedAggSum: ") - .append(toIndentedString(auditLogsLinesIndexedAggSum)) - .append("\n"); - sb.append(" avgProfiledFargateTasksSum: ") - .append(toIndentedString(avgProfiledFargateTasksSum)) - .append("\n"); + sb.append(" appsecFargateCountAvgSum: ").append(toIndentedString(appsecFargateCountAvgSum)).append("\n"); + sb.append(" auditLogsLinesIndexedAggSum: ").append(toIndentedString(auditLogsLinesIndexedAggSum)).append("\n"); + sb.append(" avgProfiledFargateTasksSum: ").append(toIndentedString(avgProfiledFargateTasksSum)).append("\n"); sb.append(" awsHostTop99pSum: ").append(toIndentedString(awsHostTop99pSum)).append("\n"); sb.append(" awsLambdaFuncCount: ").append(toIndentedString(awsLambdaFuncCount)).append("\n"); - sb.append(" awsLambdaInvocationsSum: ") - .append(toIndentedString(awsLambdaInvocationsSum)) - .append("\n"); - sb.append(" azureAppServiceTop99pSum: ") - .append(toIndentedString(azureAppServiceTop99pSum)) - .append("\n"); + sb.append(" awsLambdaInvocationsSum: ").append(toIndentedString(awsLambdaInvocationsSum)).append("\n"); + sb.append(" azureAppServiceTop99pSum: ").append(toIndentedString(azureAppServiceTop99pSum)).append("\n"); sb.append(" azureHostTop99pSum: ").append(toIndentedString(azureHostTop99pSum)).append("\n"); - sb.append(" billableIngestedBytesAggSum: ") - .append(toIndentedString(billableIngestedBytesAggSum)) - .append("\n"); - sb.append(" browserRumLiteSessionCountAggSum: ") - .append(toIndentedString(browserRumLiteSessionCountAggSum)) - .append("\n"); - sb.append(" browserRumReplaySessionCountAggSum: ") - .append(toIndentedString(browserRumReplaySessionCountAggSum)) - .append("\n"); - sb.append(" browserRumUnitsAggSum: ") - .append(toIndentedString(browserRumUnitsAggSum)) - .append("\n"); - sb.append(" ciPipelineIndexedSpansAggSum: ") - .append(toIndentedString(ciPipelineIndexedSpansAggSum)) - .append("\n"); - sb.append(" ciTestIndexedSpansAggSum: ") - .append(toIndentedString(ciTestIndexedSpansAggSum)) - .append("\n"); - sb.append(" ciVisibilityPipelineCommittersHwmSum: ") - .append(toIndentedString(ciVisibilityPipelineCommittersHwmSum)) - .append("\n"); - sb.append(" ciVisibilityTestCommittersHwmSum: ") - .append(toIndentedString(ciVisibilityTestCommittersHwmSum)) - .append("\n"); - sb.append(" cloudCostManagementHostCountAvgSum: ") - .append(toIndentedString(cloudCostManagementHostCountAvgSum)) - .append("\n"); + sb.append(" billableIngestedBytesAggSum: ").append(toIndentedString(billableIngestedBytesAggSum)).append("\n"); + sb.append(" browserRumLiteSessionCountAggSum: ").append(toIndentedString(browserRumLiteSessionCountAggSum)).append("\n"); + sb.append(" browserRumReplaySessionCountAggSum: ").append(toIndentedString(browserRumReplaySessionCountAggSum)).append("\n"); + sb.append(" browserRumUnitsAggSum: ").append(toIndentedString(browserRumUnitsAggSum)).append("\n"); + sb.append(" ciPipelineIndexedSpansAggSum: ").append(toIndentedString(ciPipelineIndexedSpansAggSum)).append("\n"); + sb.append(" ciTestIndexedSpansAggSum: ").append(toIndentedString(ciTestIndexedSpansAggSum)).append("\n"); + sb.append(" ciVisibilityPipelineCommittersHwmSum: ").append(toIndentedString(ciVisibilityPipelineCommittersHwmSum)).append("\n"); + sb.append(" ciVisibilityTestCommittersHwmSum: ").append(toIndentedString(ciVisibilityTestCommittersHwmSum)).append("\n"); + sb.append(" cloudCostManagementHostCountAvgSum: ").append(toIndentedString(cloudCostManagementHostCountAvgSum)).append("\n"); sb.append(" containerAvgSum: ").append(toIndentedString(containerAvgSum)).append("\n"); - sb.append(" containerExclAgentAvgSum: ") - .append(toIndentedString(containerExclAgentAvgSum)) - .append("\n"); + sb.append(" containerExclAgentAvgSum: ").append(toIndentedString(containerExclAgentAvgSum)).append("\n"); sb.append(" containerHwmSum: ").append(toIndentedString(containerHwmSum)).append("\n"); - sb.append(" cspmAasHostTop99pSum: ") - .append(toIndentedString(cspmAasHostTop99pSum)) - .append("\n"); - sb.append(" cspmAwsHostTop99pSum: ") - .append(toIndentedString(cspmAwsHostTop99pSum)) - .append("\n"); - sb.append(" cspmAzureHostTop99pSum: ") - .append(toIndentedString(cspmAzureHostTop99pSum)) - .append("\n"); - sb.append(" cspmContainerAvgSum: ") - .append(toIndentedString(cspmContainerAvgSum)) - .append("\n"); - sb.append(" cspmContainerHwmSum: ") - .append(toIndentedString(cspmContainerHwmSum)) - .append("\n"); - sb.append(" cspmGcpHostTop99pSum: ") - .append(toIndentedString(cspmGcpHostTop99pSum)) - .append("\n"); + sb.append(" cspmAasHostTop99pSum: ").append(toIndentedString(cspmAasHostTop99pSum)).append("\n"); + sb.append(" cspmAwsHostTop99pSum: ").append(toIndentedString(cspmAwsHostTop99pSum)).append("\n"); + sb.append(" cspmAzureHostTop99pSum: ").append(toIndentedString(cspmAzureHostTop99pSum)).append("\n"); + sb.append(" cspmContainerAvgSum: ").append(toIndentedString(cspmContainerAvgSum)).append("\n"); + sb.append(" cspmContainerHwmSum: ").append(toIndentedString(cspmContainerHwmSum)).append("\n"); + sb.append(" cspmGcpHostTop99pSum: ").append(toIndentedString(cspmGcpHostTop99pSum)).append("\n"); sb.append(" cspmHostTop99pSum: ").append(toIndentedString(cspmHostTop99pSum)).append("\n"); sb.append(" customTsSum: ").append(toIndentedString(customTsSum)).append("\n"); - sb.append(" cwsContainersAvgSum: ") - .append(toIndentedString(cwsContainersAvgSum)) - .append("\n"); + sb.append(" cwsContainersAvgSum: ").append(toIndentedString(cwsContainersAvgSum)).append("\n"); sb.append(" cwsHostTop99pSum: ").append(toIndentedString(cwsHostTop99pSum)).append("\n"); sb.append(" dbmHostTop99pSum: ").append(toIndentedString(dbmHostTop99pSum)).append("\n"); sb.append(" dbmQueriesAvgSum: ").append(toIndentedString(dbmQueriesAvgSum)).append("\n"); sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" fargateTasksCountAvgSum: ") - .append(toIndentedString(fargateTasksCountAvgSum)) - .append("\n"); - sb.append(" fargateTasksCountHwmSum: ") - .append(toIndentedString(fargateTasksCountHwmSum)) - .append("\n"); + sb.append(" fargateTasksCountAvgSum: ").append(toIndentedString(fargateTasksCountAvgSum)).append("\n"); + sb.append(" fargateTasksCountHwmSum: ").append(toIndentedString(fargateTasksCountHwmSum)).append("\n"); sb.append(" gcpHostTop99pSum: ").append(toIndentedString(gcpHostTop99pSum)).append("\n"); - sb.append(" herokuHostTop99pSum: ") - .append(toIndentedString(herokuHostTop99pSum)) - .append("\n"); - sb.append(" incidentManagementMonthlyActiveUsersHwmSum: ") - .append(toIndentedString(incidentManagementMonthlyActiveUsersHwmSum)) - .append("\n"); - sb.append(" indexedEventsCountAggSum: ") - .append(toIndentedString(indexedEventsCountAggSum)) - .append("\n"); + sb.append(" herokuHostTop99pSum: ").append(toIndentedString(herokuHostTop99pSum)).append("\n"); + sb.append(" incidentManagementMonthlyActiveUsersHwmSum: ").append(toIndentedString(incidentManagementMonthlyActiveUsersHwmSum)).append("\n"); + sb.append(" indexedEventsCountAggSum: ").append(toIndentedString(indexedEventsCountAggSum)).append("\n"); sb.append(" infraHostTop99pSum: ").append(toIndentedString(infraHostTop99pSum)).append("\n"); - sb.append(" ingestedEventsBytesAggSum: ") - .append(toIndentedString(ingestedEventsBytesAggSum)) - .append("\n"); + sb.append(" ingestedEventsBytesAggSum: ").append(toIndentedString(ingestedEventsBytesAggSum)).append("\n"); sb.append(" iotDeviceAggSum: ").append(toIndentedString(iotDeviceAggSum)).append("\n"); sb.append(" iotDeviceTop99pSum: ").append(toIndentedString(iotDeviceTop99pSum)).append("\n"); sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); - sb.append(" liveIndexedEventsAggSum: ") - .append(toIndentedString(liveIndexedEventsAggSum)) - .append("\n"); - sb.append(" liveIngestedBytesAggSum: ") - .append(toIndentedString(liveIngestedBytesAggSum)) - .append("\n"); + sb.append(" liveIndexedEventsAggSum: ").append(toIndentedString(liveIndexedEventsAggSum)).append("\n"); + sb.append(" liveIngestedBytesAggSum: ").append(toIndentedString(liveIngestedBytesAggSum)).append("\n"); sb.append(" logsByRetention: ").append(toIndentedString(logsByRetention)).append("\n"); - sb.append(" mobileRumLiteSessionCountAggSum: ") - .append(toIndentedString(mobileRumLiteSessionCountAggSum)) - .append("\n"); - sb.append(" mobileRumSessionCountAggSum: ") - .append(toIndentedString(mobileRumSessionCountAggSum)) - .append("\n"); - sb.append(" mobileRumSessionCountAndroidAggSum: ") - .append(toIndentedString(mobileRumSessionCountAndroidAggSum)) - .append("\n"); - sb.append(" mobileRumSessionCountFlutterAggSum: ") - .append(toIndentedString(mobileRumSessionCountFlutterAggSum)) - .append("\n"); - sb.append(" mobileRumSessionCountIosAggSum: ") - .append(toIndentedString(mobileRumSessionCountIosAggSum)) - .append("\n"); - sb.append(" mobileRumSessionCountReactnativeAggSum: ") - .append(toIndentedString(mobileRumSessionCountReactnativeAggSum)) - .append("\n"); - sb.append(" mobileRumUnitsAggSum: ") - .append(toIndentedString(mobileRumUnitsAggSum)) - .append("\n"); - sb.append(" netflowIndexedEventsCountAggSum: ") - .append(toIndentedString(netflowIndexedEventsCountAggSum)) - .append("\n"); + sb.append(" mobileRumLiteSessionCountAggSum: ").append(toIndentedString(mobileRumLiteSessionCountAggSum)).append("\n"); + sb.append(" mobileRumSessionCountAggSum: ").append(toIndentedString(mobileRumSessionCountAggSum)).append("\n"); + sb.append(" mobileRumSessionCountAndroidAggSum: ").append(toIndentedString(mobileRumSessionCountAndroidAggSum)).append("\n"); + sb.append(" mobileRumSessionCountFlutterAggSum: ").append(toIndentedString(mobileRumSessionCountFlutterAggSum)).append("\n"); + sb.append(" mobileRumSessionCountIosAggSum: ").append(toIndentedString(mobileRumSessionCountIosAggSum)).append("\n"); + sb.append(" mobileRumSessionCountReactnativeAggSum: ").append(toIndentedString(mobileRumSessionCountReactnativeAggSum)).append("\n"); + sb.append(" mobileRumUnitsAggSum: ").append(toIndentedString(mobileRumUnitsAggSum)).append("\n"); + sb.append(" netflowIndexedEventsCountAggSum: ").append(toIndentedString(netflowIndexedEventsCountAggSum)).append("\n"); sb.append(" npmHostTop99pSum: ").append(toIndentedString(npmHostTop99pSum)).append("\n"); - sb.append(" observabilityPipelinesBytesProcessedAggSum: ") - .append(toIndentedString(observabilityPipelinesBytesProcessedAggSum)) - .append("\n"); - sb.append(" onlineArchiveEventsCountAggSum: ") - .append(toIndentedString(onlineArchiveEventsCountAggSum)) - .append("\n"); - sb.append(" opentelemetryApmHostTop99pSum: ") - .append(toIndentedString(opentelemetryApmHostTop99pSum)) - .append("\n"); - sb.append(" opentelemetryHostTop99pSum: ") - .append(toIndentedString(opentelemetryHostTop99pSum)) - .append("\n"); - sb.append(" profilingContainerAgentCountAvg: ") - .append(toIndentedString(profilingContainerAgentCountAvg)) - .append("\n"); - sb.append(" profilingHostCountTop99pSum: ") - .append(toIndentedString(profilingHostCountTop99pSum)) - .append("\n"); - sb.append(" rehydratedIndexedEventsAggSum: ") - .append(toIndentedString(rehydratedIndexedEventsAggSum)) - .append("\n"); - sb.append(" rehydratedIngestedBytesAggSum: ") - .append(toIndentedString(rehydratedIngestedBytesAggSum)) - .append("\n"); - sb.append(" rumBrowserAndMobileSessionCount: ") - .append(toIndentedString(rumBrowserAndMobileSessionCount)) - .append("\n"); - sb.append(" rumSessionCountAggSum: ") - .append(toIndentedString(rumSessionCountAggSum)) - .append("\n"); - sb.append(" rumTotalSessionCountAggSum: ") - .append(toIndentedString(rumTotalSessionCountAggSum)) - .append("\n"); + sb.append(" observabilityPipelinesBytesProcessedAggSum: ").append(toIndentedString(observabilityPipelinesBytesProcessedAggSum)).append("\n"); + sb.append(" onlineArchiveEventsCountAggSum: ").append(toIndentedString(onlineArchiveEventsCountAggSum)).append("\n"); + sb.append(" opentelemetryApmHostTop99pSum: ").append(toIndentedString(opentelemetryApmHostTop99pSum)).append("\n"); + sb.append(" opentelemetryHostTop99pSum: ").append(toIndentedString(opentelemetryHostTop99pSum)).append("\n"); + sb.append(" profilingContainerAgentCountAvg: ").append(toIndentedString(profilingContainerAgentCountAvg)).append("\n"); + sb.append(" profilingHostCountTop99pSum: ").append(toIndentedString(profilingHostCountTop99pSum)).append("\n"); + sb.append(" rehydratedIndexedEventsAggSum: ").append(toIndentedString(rehydratedIndexedEventsAggSum)).append("\n"); + sb.append(" rehydratedIngestedBytesAggSum: ").append(toIndentedString(rehydratedIngestedBytesAggSum)).append("\n"); + sb.append(" rumBrowserAndMobileSessionCount: ").append(toIndentedString(rumBrowserAndMobileSessionCount)).append("\n"); + sb.append(" rumSessionCountAggSum: ").append(toIndentedString(rumSessionCountAggSum)).append("\n"); + sb.append(" rumTotalSessionCountAggSum: ").append(toIndentedString(rumTotalSessionCountAggSum)).append("\n"); sb.append(" rumUnitsAggSum: ").append(toIndentedString(rumUnitsAggSum)).append("\n"); - sb.append(" sdsApmScannedBytesSum: ") - .append(toIndentedString(sdsApmScannedBytesSum)) - .append("\n"); - sb.append(" sdsEventsScannedBytesSum: ") - .append(toIndentedString(sdsEventsScannedBytesSum)) - .append("\n"); - sb.append(" sdsLogsScannedBytesSum: ") - .append(toIndentedString(sdsLogsScannedBytesSum)) - .append("\n"); - sb.append(" sdsRumScannedBytesSum: ") - .append(toIndentedString(sdsRumScannedBytesSum)) - .append("\n"); - sb.append(" sdsTotalScannedBytesSum: ") - .append(toIndentedString(sdsTotalScannedBytesSum)) - .append("\n"); + sb.append(" sdsApmScannedBytesSum: ").append(toIndentedString(sdsApmScannedBytesSum)).append("\n"); + sb.append(" sdsEventsScannedBytesSum: ").append(toIndentedString(sdsEventsScannedBytesSum)).append("\n"); + sb.append(" sdsLogsScannedBytesSum: ").append(toIndentedString(sdsLogsScannedBytesSum)).append("\n"); + sb.append(" sdsRumScannedBytesSum: ").append(toIndentedString(sdsRumScannedBytesSum)).append("\n"); + sb.append(" sdsTotalScannedBytesSum: ").append(toIndentedString(sdsTotalScannedBytesSum)).append("\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" syntheticsBrowserCheckCallsCountAggSum: ") - .append(toIndentedString(syntheticsBrowserCheckCallsCountAggSum)) - .append("\n"); - sb.append(" syntheticsCheckCallsCountAggSum: ") - .append(toIndentedString(syntheticsCheckCallsCountAggSum)) - .append("\n"); - sb.append(" syntheticsParallelTestingMaxSlotsHwmSum: ") - .append(toIndentedString(syntheticsParallelTestingMaxSlotsHwmSum)) - .append("\n"); - sb.append(" traceSearchIndexedEventsCountAggSum: ") - .append(toIndentedString(traceSearchIndexedEventsCountAggSum)) - .append("\n"); - sb.append(" twolIngestedEventsBytesAggSum: ") - .append(toIndentedString(twolIngestedEventsBytesAggSum)) - .append("\n"); + sb.append(" syntheticsBrowserCheckCallsCountAggSum: ").append(toIndentedString(syntheticsBrowserCheckCallsCountAggSum)).append("\n"); + sb.append(" syntheticsCheckCallsCountAggSum: ").append(toIndentedString(syntheticsCheckCallsCountAggSum)).append("\n"); + sb.append(" syntheticsParallelTestingMaxSlotsHwmSum: ").append(toIndentedString(syntheticsParallelTestingMaxSlotsHwmSum)).append("\n"); + sb.append(" traceSearchIndexedEventsCountAggSum: ").append(toIndentedString(traceSearchIndexedEventsCountAggSum)).append("\n"); + sb.append(" twolIngestedEventsBytesAggSum: ").append(toIndentedString(twolIngestedEventsBytesAggSum)).append("\n"); sb.append(" usage: ").append(toIndentedString(usage)).append("\n"); - sb.append(" vsphereHostTop99pSum: ") - .append(toIndentedString(vsphereHostTop99pSum)) - .append("\n"); + sb.append(" vsphereHostTop99pSum: ").append(toIndentedString(vsphereHostTop99pSum)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIHour.java index d63b2657e13..6aae7e0e0aa 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIHour.java @@ -6,31 +6,47 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Number of Synthetics API tests run for each hour for a given organization. */ + +/** + *

Number of Synthetics API tests run for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageSyntheticsAPIHour.JSON_PROPERTY_CHECK_CALLS_COUNT, UsageSyntheticsAPIHour.JSON_PROPERTY_HOUR, UsageSyntheticsAPIHour.JSON_PROPERTY_ORG_NAME, UsageSyntheticsAPIHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSyntheticsAPIHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK_CALLS_COUNT = "check_calls_count"; private Long checkCallsCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageSyntheticsAPIHour checkCallsCount(Long checkCallsCount) { } /** - * Contains the number of Synthetics API tests run. - * + *

Contains the number of Synthetics API tests run.

* @return checkCallsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_CALLS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCheckCallsCount() { - return checkCallsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_CALLS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCheckCallsCount() { + return checkCallsCount; + } public void setCheckCallsCount(Long checkCallsCount) { this.checkCallsCount = checkCallsCount; } - public UsageSyntheticsAPIHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageSyntheticsAPIHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageSyntheticsAPIHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageSyntheticsAPIHour object is equal to o. */ + /** + * Return true if this UsageSyntheticsAPIHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageSyntheticsAPIHour usageSyntheticsApiHour = (UsageSyntheticsAPIHour) o; - return Objects.equals(this.checkCallsCount, usageSyntheticsApiHour.checkCallsCount) - && Objects.equals(this.hour, usageSyntheticsApiHour.hour) - && Objects.equals(this.orgName, usageSyntheticsApiHour.orgName) - && Objects.equals(this.publicId, usageSyntheticsApiHour.publicId); + return Objects.equals(this.checkCallsCount, usageSyntheticsApiHour.checkCallsCount) && Objects.equals(this.hour, usageSyntheticsApiHour.hour) && Objects.equals(this.orgName, usageSyntheticsApiHour.orgName) && Objects.equals(this.publicId, usageSyntheticsApiHour.publicId); } + @Override public int hashCode() { - return Objects.hash(checkCallsCount, hour, orgName, publicId); + return Objects.hash(checkCallsCount,hour,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIResponse.java index ffe61257471..624b814a08b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsAPIResponse.java @@ -6,23 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the number of Synthetics API tests run for each hour for a given - * organization. + *

Response containing the number of Synthetics API tests run for each hour for a given organization.

*/ -@JsonPropertyOrder({UsageSyntheticsAPIResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageSyntheticsAPIResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSyntheticsAPIResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -33,7 +50,6 @@ public UsageSyntheticsAPIResponse usage(List usage) { } return this; } - public UsageSyntheticsAPIResponse addUsageItem(UsageSyntheticsAPIHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -44,22 +60,23 @@ public UsageSyntheticsAPIResponse addUsageItem(UsageSyntheticsAPIHour usageItem) } /** - * Get hourly usage for Synthetics API tests. - * + *

Get hourly usage for Synthetics API tests.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageSyntheticsAPIResponse object is equal to o. */ + /** + * Return true if this UsageSyntheticsAPIResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageSyntheticsApiResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -87,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserHour.java index 7b6907aa848..107801501de 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserHour.java @@ -6,31 +6,47 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Number of Synthetics Browser tests run for each hour for a given organization. */ + +/** + *

Number of Synthetics Browser tests run for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageSyntheticsBrowserHour.JSON_PROPERTY_BROWSER_CHECK_CALLS_COUNT, UsageSyntheticsBrowserHour.JSON_PROPERTY_HOUR, UsageSyntheticsBrowserHour.JSON_PROPERTY_ORG_NAME, UsageSyntheticsBrowserHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSyntheticsBrowserHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BROWSER_CHECK_CALLS_COUNT = "browser_check_calls_count"; private Long browserCheckCallsCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageSyntheticsBrowserHour browserCheckCallsCount(Long browserCheckCallsC } /** - * Contains the number of Synthetics Browser tests run. - * + *

Contains the number of Synthetics Browser tests run.

* @return browserCheckCallsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BROWSER_CHECK_CALLS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getBrowserCheckCallsCount() { - return browserCheckCallsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BROWSER_CHECK_CALLS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getBrowserCheckCallsCount() { + return browserCheckCallsCount; + } public void setBrowserCheckCallsCount(Long browserCheckCallsCount) { this.browserCheckCallsCount = browserCheckCallsCount; } - public UsageSyntheticsBrowserHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageSyntheticsBrowserHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageSyntheticsBrowserHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageSyntheticsBrowserHour object is equal to o. */ + /** + * Return true if this UsageSyntheticsBrowserHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,25 +145,20 @@ public boolean equals(Object o) { return false; } UsageSyntheticsBrowserHour usageSyntheticsBrowserHour = (UsageSyntheticsBrowserHour) o; - return Objects.equals( - this.browserCheckCallsCount, usageSyntheticsBrowserHour.browserCheckCallsCount) - && Objects.equals(this.hour, usageSyntheticsBrowserHour.hour) - && Objects.equals(this.orgName, usageSyntheticsBrowserHour.orgName) - && Objects.equals(this.publicId, usageSyntheticsBrowserHour.publicId); + return Objects.equals(this.browserCheckCallsCount, usageSyntheticsBrowserHour.browserCheckCallsCount) && Objects.equals(this.hour, usageSyntheticsBrowserHour.hour) && Objects.equals(this.orgName, usageSyntheticsBrowserHour.orgName) && Objects.equals(this.publicId, usageSyntheticsBrowserHour.publicId); } + @Override public int hashCode() { - return Objects.hash(browserCheckCallsCount, hour, orgName, publicId); + return Objects.hash(browserCheckCallsCount,hour,orgName,publicId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSyntheticsBrowserHour {\n"); - sb.append(" browserCheckCallsCount: ") - .append(toIndentedString(browserCheckCallsCount)) - .append("\n"); + sb.append(" browserCheckCallsCount: ").append(toIndentedString(browserCheckCallsCount)).append("\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); @@ -161,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserResponse.java index 718a2f6af7c..59fdebb138d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsBrowserResponse.java @@ -6,23 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the number of Synthetics Browser tests run for each hour for a given - * organization. + *

Response containing the number of Synthetics Browser tests run for each hour for a given organization.

*/ -@JsonPropertyOrder({UsageSyntheticsBrowserResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageSyntheticsBrowserResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSyntheticsBrowserResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -33,7 +50,6 @@ public UsageSyntheticsBrowserResponse usage(List usa } return this; } - public UsageSyntheticsBrowserResponse addUsageItem(UsageSyntheticsBrowserHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -44,22 +60,23 @@ public UsageSyntheticsBrowserResponse addUsageItem(UsageSyntheticsBrowserHour us } /** - * Get hourly usage for Synthetics Browser tests. - * + *

Get hourly usage for Synthetics Browser tests.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageSyntheticsBrowserResponse object is equal to o. */ + /** + * Return true if this UsageSyntheticsBrowserResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -68,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageSyntheticsBrowserResponse usageSyntheticsBrowserResponse = - (UsageSyntheticsBrowserResponse) o; + UsageSyntheticsBrowserResponse usageSyntheticsBrowserResponse = (UsageSyntheticsBrowserResponse) o; return Objects.equals(this.usage, usageSyntheticsBrowserResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -88,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsHour.java index 61d0ce9782e..310058d4015 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsHour.java @@ -6,31 +6,47 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The number of synthetics tests run for each hour for a given organization. */ + +/** + *

The number of synthetics tests run for each hour for a given organization.

+ */ @JsonPropertyOrder({ UsageSyntheticsHour.JSON_PROPERTY_CHECK_CALLS_COUNT, UsageSyntheticsHour.JSON_PROPERTY_HOUR, UsageSyntheticsHour.JSON_PROPERTY_ORG_NAME, UsageSyntheticsHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSyntheticsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHECK_CALLS_COUNT = "check_calls_count"; private Long checkCallsCount; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; @@ -46,85 +62,80 @@ public UsageSyntheticsHour checkCallsCount(Long checkCallsCount) { } /** - * Contains the number of Synthetics API tests run. - * + *

Contains the number of Synthetics API tests run.

* @return checkCallsCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHECK_CALLS_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCheckCallsCount() { - return checkCallsCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_CALLS_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCheckCallsCount() { + return checkCallsCount; + } public void setCheckCallsCount(Long checkCallsCount) { this.checkCallsCount = checkCallsCount; } - public UsageSyntheticsHour hour(OffsetDateTime hour) { this.hour = hour; return this; } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageSyntheticsHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageSyntheticsHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageSyntheticsHour object is equal to o. */ + /** + * Return true if this UsageSyntheticsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +145,13 @@ public boolean equals(Object o) { return false; } UsageSyntheticsHour usageSyntheticsHour = (UsageSyntheticsHour) o; - return Objects.equals(this.checkCallsCount, usageSyntheticsHour.checkCallsCount) - && Objects.equals(this.hour, usageSyntheticsHour.hour) - && Objects.equals(this.orgName, usageSyntheticsHour.orgName) - && Objects.equals(this.publicId, usageSyntheticsHour.publicId); + return Objects.equals(this.checkCallsCount, usageSyntheticsHour.checkCallsCount) && Objects.equals(this.hour, usageSyntheticsHour.hour) && Objects.equals(this.orgName, usageSyntheticsHour.orgName) && Objects.equals(this.publicId, usageSyntheticsHour.publicId); } + @Override public int hashCode() { - return Objects.hash(checkCallsCount, hour, orgName, publicId); + return Objects.hash(checkCallsCount,hour,orgName,publicId); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsResponse.java index 744070f8201..ffbdc8fb5a0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageSyntheticsResponse.java @@ -6,23 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Response containing the number of Synthetics API tests run for each hour for a given - * organization. + *

Response containing the number of Synthetics API tests run for each hour for a given organization.

*/ -@JsonPropertyOrder({UsageSyntheticsResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + UsageSyntheticsResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageSyntheticsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -33,7 +50,6 @@ public UsageSyntheticsResponse usage(List usage) { } return this; } - public UsageSyntheticsResponse addUsageItem(UsageSyntheticsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -44,22 +60,23 @@ public UsageSyntheticsResponse addUsageItem(UsageSyntheticsHour usageItem) { } /** - * Array with the number of hourly Synthetics test run for a given organization. - * + *

Array with the number of hourly Synthetics test run for a given organization.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageSyntheticsResponse object is equal to o. */ + /** + * Return true if this UsageSyntheticsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageSyntheticsResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -87,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesHour.java index b8cf7fb2c3c..40cb3b6ad5e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesHour.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The hourly usage of timeseries. */ + +/** + *

The hourly usage of timeseries.

+ */ @JsonPropertyOrder({ UsageTimeseriesHour.JSON_PROPERTY_HOUR, UsageTimeseriesHour.JSON_PROPERTY_NUM_CUSTOM_INPUT_TIMESERIES, @@ -24,21 +41,18 @@ UsageTimeseriesHour.JSON_PROPERTY_ORG_NAME, UsageTimeseriesHour.JSON_PROPERTY_PUBLIC_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTimeseriesHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HOUR = "hour"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime hour; - public static final String JSON_PROPERTY_NUM_CUSTOM_INPUT_TIMESERIES = - "num_custom_input_timeseries"; + public static final String JSON_PROPERTY_NUM_CUSTOM_INPUT_TIMESERIES = "num_custom_input_timeseries"; private Long numCustomInputTimeseries; - public static final String JSON_PROPERTY_NUM_CUSTOM_OUTPUT_TIMESERIES = - "num_custom_output_timeseries"; + public static final String JSON_PROPERTY_NUM_CUSTOM_OUTPUT_TIMESERIES = "num_custom_output_timeseries"; private Long numCustomOutputTimeseries; public static final String JSON_PROPERTY_NUM_CUSTOM_TIMESERIES = "num_custom_timeseries"; @@ -56,130 +70,118 @@ public UsageTimeseriesHour hour(OffsetDateTime hour) { } /** - * The hour for the usage. - * + *

The hour for the usage.

* @return hour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getHour() { - return hour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getHour() { + return hour; + } public void setHour(OffsetDateTime hour) { this.hour = hour; } - public UsageTimeseriesHour numCustomInputTimeseries(Long numCustomInputTimeseries) { this.numCustomInputTimeseries = numCustomInputTimeseries; return this; } /** - * Contains the number of custom metrics that are inputs for aggregations (metric configured is - * custom). - * + *

Contains the number of custom metrics that are inputs for aggregations (metric configured is custom).

* @return numCustomInputTimeseries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUM_CUSTOM_INPUT_TIMESERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumCustomInputTimeseries() { - return numCustomInputTimeseries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_CUSTOM_INPUT_TIMESERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumCustomInputTimeseries() { + return numCustomInputTimeseries; + } public void setNumCustomInputTimeseries(Long numCustomInputTimeseries) { this.numCustomInputTimeseries = numCustomInputTimeseries; } - public UsageTimeseriesHour numCustomOutputTimeseries(Long numCustomOutputTimeseries) { this.numCustomOutputTimeseries = numCustomOutputTimeseries; return this; } /** - * Contains the number of custom metrics that are outputs for aggregations (metric configured is - * custom). - * + *

Contains the number of custom metrics that are outputs for aggregations (metric configured is custom).

* @return numCustomOutputTimeseries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUM_CUSTOM_OUTPUT_TIMESERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumCustomOutputTimeseries() { - return numCustomOutputTimeseries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_CUSTOM_OUTPUT_TIMESERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumCustomOutputTimeseries() { + return numCustomOutputTimeseries; + } public void setNumCustomOutputTimeseries(Long numCustomOutputTimeseries) { this.numCustomOutputTimeseries = numCustomOutputTimeseries; } - public UsageTimeseriesHour numCustomTimeseries(Long numCustomTimeseries) { this.numCustomTimeseries = numCustomTimeseries; return this; } /** - * Contains sum of non-aggregation custom metrics and custom metrics that are outputs for - * aggregations. - * + *

Contains sum of non-aggregation custom metrics and custom metrics that are outputs for aggregations.

* @return numCustomTimeseries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUM_CUSTOM_TIMESERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumCustomTimeseries() { - return numCustomTimeseries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_CUSTOM_TIMESERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumCustomTimeseries() { + return numCustomTimeseries; + } public void setNumCustomTimeseries(Long numCustomTimeseries) { this.numCustomTimeseries = numCustomTimeseries; } - public UsageTimeseriesHour orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageTimeseriesHour publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - /** Return true if this UsageTimeseriesHour object is equal to o. */ + /** + * Return true if this UsageTimeseriesHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -189,25 +191,13 @@ public boolean equals(Object o) { return false; } UsageTimeseriesHour usageTimeseriesHour = (UsageTimeseriesHour) o; - return Objects.equals(this.hour, usageTimeseriesHour.hour) - && Objects.equals( - this.numCustomInputTimeseries, usageTimeseriesHour.numCustomInputTimeseries) - && Objects.equals( - this.numCustomOutputTimeseries, usageTimeseriesHour.numCustomOutputTimeseries) - && Objects.equals(this.numCustomTimeseries, usageTimeseriesHour.numCustomTimeseries) - && Objects.equals(this.orgName, usageTimeseriesHour.orgName) - && Objects.equals(this.publicId, usageTimeseriesHour.publicId); + return Objects.equals(this.hour, usageTimeseriesHour.hour) && Objects.equals(this.numCustomInputTimeseries, usageTimeseriesHour.numCustomInputTimeseries) && Objects.equals(this.numCustomOutputTimeseries, usageTimeseriesHour.numCustomOutputTimeseries) && Objects.equals(this.numCustomTimeseries, usageTimeseriesHour.numCustomTimeseries) && Objects.equals(this.orgName, usageTimeseriesHour.orgName) && Objects.equals(this.publicId, usageTimeseriesHour.publicId); } + @Override public int hashCode() { - return Objects.hash( - hour, - numCustomInputTimeseries, - numCustomOutputTimeseries, - numCustomTimeseries, - orgName, - publicId); + return Objects.hash(hour,numCustomInputTimeseries,numCustomOutputTimeseries,numCustomTimeseries,orgName,publicId); } @Override @@ -215,15 +205,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageTimeseriesHour {\n"); sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" numCustomInputTimeseries: ") - .append(toIndentedString(numCustomInputTimeseries)) - .append("\n"); - sb.append(" numCustomOutputTimeseries: ") - .append(toIndentedString(numCustomOutputTimeseries)) - .append("\n"); - sb.append(" numCustomTimeseries: ") - .append(toIndentedString(numCustomTimeseries)) - .append("\n"); + sb.append(" numCustomInputTimeseries: ").append(toIndentedString(numCustomInputTimeseries)).append("\n"); + sb.append(" numCustomOutputTimeseries: ").append(toIndentedString(numCustomOutputTimeseries)).append("\n"); + sb.append(" numCustomTimeseries: ").append(toIndentedString(numCustomTimeseries)).append("\n"); sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append("}"); @@ -231,7 +215,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesResponse.java index 97568c2ef6b..35075e0a32e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageTimeseriesResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing hourly usage of timeseries. */ -@JsonPropertyOrder({UsageTimeseriesResponse.JSON_PROPERTY_USAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing hourly usage of timeseries.

+ */ +@JsonPropertyOrder({ + UsageTimeseriesResponse.JSON_PROPERTY_USAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTimeseriesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE = "usage"; private List usage = null; @@ -30,7 +50,6 @@ public UsageTimeseriesResponse usage(List usage) { } return this; } - public UsageTimeseriesResponse addUsageItem(UsageTimeseriesHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageTimeseriesResponse addUsageItem(UsageTimeseriesHour usageItem) { } /** - * An array of objects regarding hourly usage of timeseries. - * + *

An array of objects regarding hourly usage of timeseries.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageTimeseriesResponse object is equal to o. */ + /** + * Return true if this UsageTimeseriesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.usage, usageTimeseriesResponse.usage); } + @Override public int hashCode() { return Objects.hash(usage); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsHour.java b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsHour.java index 20a13b77297..712222c6bc6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsHour.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsHour.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Number of hourly recorded custom metrics for a given organization. */ + +/** + *

Number of hourly recorded custom metrics for a given organization.

+ */ @JsonPropertyOrder({ UsageTopAvgMetricsHour.JSON_PROPERTY_AVG_METRIC_HOUR, UsageTopAvgMetricsHour.JSON_PROPERTY_MAX_METRIC_HOUR, UsageTopAvgMetricsHour.JSON_PROPERTY_METRIC_CATEGORY, UsageTopAvgMetricsHour.JSON_PROPERTY_METRIC_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTopAvgMetricsHour { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AVG_METRIC_HOUR = "avg_metric_hour"; private Long avgMetricHour; @@ -41,42 +61,38 @@ public UsageTopAvgMetricsHour avgMetricHour(Long avgMetricHour) { } /** - * Average number of timeseries per hour in which the metric occurs. - * + *

Average number of timeseries per hour in which the metric occurs.

* @return avgMetricHour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AVG_METRIC_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getAvgMetricHour() { - return avgMetricHour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_METRIC_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getAvgMetricHour() { + return avgMetricHour; + } public void setAvgMetricHour(Long avgMetricHour) { this.avgMetricHour = avgMetricHour; } - public UsageTopAvgMetricsHour maxMetricHour(Long maxMetricHour) { this.maxMetricHour = maxMetricHour; return this; } /** - * Maximum number of timeseries per hour in which the metric occurs. - * + *

Maximum number of timeseries per hour in which the metric occurs.

* @return maxMetricHour - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAX_METRIC_HOUR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getMaxMetricHour() { - return maxMetricHour; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_METRIC_HOUR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxMetricHour() { + return maxMetricHour; + } public void setMaxMetricHour(Long maxMetricHour) { this.maxMetricHour = maxMetricHour; } - public UsageTopAvgMetricsHour metricCategory(UsageMetricCategory metricCategory) { this.metricCategory = metricCategory; this.unparsed |= !metricCategory.isValid(); @@ -84,46 +100,45 @@ public UsageTopAvgMetricsHour metricCategory(UsageMetricCategory metricCategory) } /** - * Contains the metric category. - * + *

Contains the metric category.

* @return metricCategory - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageMetricCategory getMetricCategory() { - return metricCategory; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_CATEGORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageMetricCategory getMetricCategory() { + return metricCategory; + } public void setMetricCategory(UsageMetricCategory metricCategory) { if (!metricCategory.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.metricCategory = metricCategory; } - public UsageTopAvgMetricsHour metricName(String metricName) { this.metricName = metricName; return this; } /** - * Contains the custom metric name. - * + *

Contains the custom metric name.

* @return metricName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetricName() { - return metricName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetricName() { + return metricName; + } public void setMetricName(String metricName) { this.metricName = metricName; } - /** Return true if this UsageTopAvgMetricsHour object is equal to o. */ + /** + * Return true if this UsageTopAvgMetricsHour object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,15 +148,13 @@ public boolean equals(Object o) { return false; } UsageTopAvgMetricsHour usageTopAvgMetricsHour = (UsageTopAvgMetricsHour) o; - return Objects.equals(this.avgMetricHour, usageTopAvgMetricsHour.avgMetricHour) - && Objects.equals(this.maxMetricHour, usageTopAvgMetricsHour.maxMetricHour) - && Objects.equals(this.metricCategory, usageTopAvgMetricsHour.metricCategory) - && Objects.equals(this.metricName, usageTopAvgMetricsHour.metricName); + return Objects.equals(this.avgMetricHour, usageTopAvgMetricsHour.avgMetricHour) && Objects.equals(this.maxMetricHour, usageTopAvgMetricsHour.maxMetricHour) && Objects.equals(this.metricCategory, usageTopAvgMetricsHour.metricCategory) && Objects.equals(this.metricName, usageTopAvgMetricsHour.metricName); } + @Override public int hashCode() { - return Objects.hash(avgMetricHour, maxMetricHour, metricCategory, metricName); + return Objects.hash(avgMetricHour,maxMetricHour,metricCategory,metricName); } @Override @@ -157,7 +170,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsMetadata.java b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsMetadata.java index c5c60e40aa7..2a30cb7d0d3 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsMetadata.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsMetadata.java @@ -6,32 +6,47 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing document metadata. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing document metadata.

+ */ @JsonPropertyOrder({ UsageTopAvgMetricsMetadata.JSON_PROPERTY_DAY, UsageTopAvgMetricsMetadata.JSON_PROPERTY_MONTH, UsageTopAvgMetricsMetadata.JSON_PROPERTY_PAGINATION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTopAvgMetricsMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DAY = "day"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime day; public static final String JSON_PROPERTY_MONTH = "month"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime month; @@ -44,44 +59,38 @@ public UsageTopAvgMetricsMetadata day(OffsetDateTime day) { } /** - * The day value from the user request that contains the returned usage data. (If day was used the - * request) - * + *

The day value from the user request that contains the returned usage data. (If day was used the request)

* @return day - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getDay() { - return day; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDay() { + return day; + } public void setDay(OffsetDateTime day) { this.day = day; } - public UsageTopAvgMetricsMetadata month(OffsetDateTime month) { this.month = month; return this; } /** - * The month value from the user request that contains the returned usage data. (If month was used - * the request) - * + *

The month value from the user request that contains the returned usage data. (If month was used the request)

* @return month - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MONTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getMonth() { - return month; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getMonth() { + return month; + } public void setMonth(OffsetDateTime month) { this.month = month; } - public UsageTopAvgMetricsMetadata pagination(UsageTopAvgMetricsPagination pagination) { this.pagination = pagination; this.unparsed |= pagination.unparsed; @@ -89,22 +98,23 @@ public UsageTopAvgMetricsMetadata pagination(UsageTopAvgMetricsPagination pagina } /** - * The metadata for the current pagination. - * + *

The metadata for the current pagination.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageTopAvgMetricsPagination getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageTopAvgMetricsPagination getPagination() { + return pagination; + } public void setPagination(UsageTopAvgMetricsPagination pagination) { this.pagination = pagination; } - /** Return true if this UsageTopAvgMetricsMetadata object is equal to o. */ + /** + * Return true if this UsageTopAvgMetricsMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -114,14 +124,13 @@ public boolean equals(Object o) { return false; } UsageTopAvgMetricsMetadata usageTopAvgMetricsMetadata = (UsageTopAvgMetricsMetadata) o; - return Objects.equals(this.day, usageTopAvgMetricsMetadata.day) - && Objects.equals(this.month, usageTopAvgMetricsMetadata.month) - && Objects.equals(this.pagination, usageTopAvgMetricsMetadata.pagination); + return Objects.equals(this.day, usageTopAvgMetricsMetadata.day) && Objects.equals(this.month, usageTopAvgMetricsMetadata.month) && Objects.equals(this.pagination, usageTopAvgMetricsMetadata.pagination); } + @Override public int hashCode() { - return Objects.hash(day, month, pagination); + return Objects.hash(day,month,pagination); } @Override @@ -136,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsPagination.java b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsPagination.java index 383989625fa..60fcce96cc2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsPagination.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsPagination.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The metadata for the current pagination. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata for the current pagination.

+ */ @JsonPropertyOrder({ UsageTopAvgMetricsPagination.JSON_PROPERTY_LIMIT, UsageTopAvgMetricsPagination.JSON_PROPERTY_NEXT_RECORD_ID, UsageTopAvgMetricsPagination.JSON_PROPERTY_TOTAL_NUMBER_OF_RECORDS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTopAvgMetricsPagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LIMIT = "limit"; private Long limit; @@ -38,75 +57,68 @@ public UsageTopAvgMetricsPagination limit(Long limit) { } /** - * Maximum amount of records to be returned. - * + *

Maximum amount of records to be returned.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public UsageTopAvgMetricsPagination nextRecordId(String nextRecordId) { this.nextRecordId = JsonNullable.of(nextRecordId); return this; } /** - * The cursor to get the next results (if any). To make the next request, use the same parameters - * and add next_record_id. - * + *

The cursor to get the next results (if any). To make the next request, use the same parameters and add next_record_id.

* @return nextRecordId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getNextRecordId() { - return nextRecordId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextRecordId() { + return nextRecordId.orElse(null); + } @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNextRecordId_JsonNullable() { return nextRecordId; } - - @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { + @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID)public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { this.nextRecordId = nextRecordId; } - public void setNextRecordId(String nextRecordId) { this.nextRecordId = JsonNullable.of(nextRecordId); } - public UsageTopAvgMetricsPagination totalNumberOfRecords(Long totalNumberOfRecords) { this.totalNumberOfRecords = totalNumberOfRecords; return this; } /** - * Total number of records. - * + *

Total number of records.

* @return totalNumberOfRecords - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_RECORDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalNumberOfRecords() { - return totalNumberOfRecords; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_RECORDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalNumberOfRecords() { + return totalNumberOfRecords; + } public void setTotalNumberOfRecords(Long totalNumberOfRecords) { this.totalNumberOfRecords = totalNumberOfRecords; } - /** Return true if this UsageTopAvgMetricsPagination object is equal to o. */ + /** + * Return true if this UsageTopAvgMetricsPagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -116,15 +128,13 @@ public boolean equals(Object o) { return false; } UsageTopAvgMetricsPagination usageTopAvgMetricsPagination = (UsageTopAvgMetricsPagination) o; - return Objects.equals(this.limit, usageTopAvgMetricsPagination.limit) - && Objects.equals(this.nextRecordId, usageTopAvgMetricsPagination.nextRecordId) - && Objects.equals( - this.totalNumberOfRecords, usageTopAvgMetricsPagination.totalNumberOfRecords); + return Objects.equals(this.limit, usageTopAvgMetricsPagination.limit) && Objects.equals(this.nextRecordId, usageTopAvgMetricsPagination.nextRecordId) && Objects.equals(this.totalNumberOfRecords, usageTopAvgMetricsPagination.totalNumberOfRecords); } + @Override public int hashCode() { - return Objects.hash(limit, nextRecordId, totalNumberOfRecords); + return Objects.hash(limit,nextRecordId,totalNumberOfRecords); } @Override @@ -133,15 +143,14 @@ public String toString() { sb.append("class UsageTopAvgMetricsPagination {\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" nextRecordId: ").append(toIndentedString(nextRecordId)).append("\n"); - sb.append(" totalNumberOfRecords: ") - .append(toIndentedString(totalNumberOfRecords)) - .append("\n"); + sb.append(" totalNumberOfRecords: ").append(toIndentedString(totalNumberOfRecords)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsResponse.java b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsResponse.java index 308298fb3a8..fd2ed7aa956 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UsageTopAvgMetricsResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing the number of hourly recorded custom metrics for a given organization. */ +/** + *

Response containing the number of hourly recorded custom metrics for a given organization.

+ */ @JsonPropertyOrder({ UsageTopAvgMetricsResponse.JSON_PROPERTY_METADATA, UsageTopAvgMetricsResponse.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTopAvgMetricsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METADATA = "metadata"; private UsageTopAvgMetricsMetadata metadata; @@ -36,21 +54,19 @@ public UsageTopAvgMetricsResponse metadata(UsageTopAvgMetricsMetadata metadata) } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageTopAvgMetricsMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageTopAvgMetricsMetadata getMetadata() { + return metadata; + } public void setMetadata(UsageTopAvgMetricsMetadata metadata) { this.metadata = metadata; } - public UsageTopAvgMetricsResponse usage(List usage) { this.usage = usage; for (UsageTopAvgMetricsHour item : usage) { @@ -58,7 +74,6 @@ public UsageTopAvgMetricsResponse usage(List usage) { } return this; } - public UsageTopAvgMetricsResponse addUsageItem(UsageTopAvgMetricsHour usageItem) { if (this.usage == null) { this.usage = new ArrayList<>(); @@ -69,22 +84,23 @@ public UsageTopAvgMetricsResponse addUsageItem(UsageTopAvgMetricsHour usageItem) } /** - * Number of hourly recorded custom metrics for a given organization. - * + *

Number of hourly recorded custom metrics for a given organization.

* @return usage - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsage() { - return usage; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsage() { + return usage; + } public void setUsage(List usage) { this.usage = usage; } - /** Return true if this UsageTopAvgMetricsResponse object is equal to o. */ + /** + * Return true if this UsageTopAvgMetricsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } UsageTopAvgMetricsResponse usageTopAvgMetricsResponse = (UsageTopAvgMetricsResponse) o; - return Objects.equals(this.metadata, usageTopAvgMetricsResponse.metadata) - && Objects.equals(this.usage, usageTopAvgMetricsResponse.usage); + return Objects.equals(this.metadata, usageTopAvgMetricsResponse.metadata) && Objects.equals(this.usage, usageTopAvgMetricsResponse.usage); } + @Override public int hashCode() { - return Objects.hash(metadata, usage); + return Objects.hash(metadata,usage); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/User.java b/src/main/java/com/datadog/api/client/v1/model/User.java index 7ada866196d..7d63d244623 100644 --- a/src/main/java/com/datadog/api/client/v1/model/User.java +++ b/src/main/java/com/datadog/api/client/v1/model/User.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Create, edit, and disable users. */ +/** + *

Create, edit, and disable users.

+ */ @JsonPropertyOrder({ User.JSON_PROPERTY_ACCESS_ROLE, User.JSON_PROPERTY_DISABLED, @@ -22,10 +42,10 @@ User.JSON_PROPERTY_NAME, User.JSON_PROPERTY_VERIFIED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class User { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCESS_ROLE = "access_role"; private AccessRole accessRole = AccessRole.STANDARD; @@ -54,134 +74,126 @@ public User accessRole(AccessRole accessRole) { } /** - * The access role of the user. Options are st (standard user), - * adm (admin user), or ro (read-only user). - * + *

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user).

* @return accessRole - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCESS_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AccessRole getAccessRole() { - return accessRole; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCESS_ROLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AccessRole getAccessRole() { + return accessRole; + } public void setAccessRole(AccessRole accessRole) { if (!accessRole.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.accessRole = accessRole; } - public User disabled(Boolean disabled) { this.disabled = disabled; return this; } /** - * The new disabled status of the user. - * + *

The new disabled status of the user.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } - public User email(String email) { this.email = email; return this; } /** - * The new email of the user. - * + *

The new email of the user.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public User handle(String handle) { this.handle = handle; return this; } /** - * The user handle, must be a valid email. - * + *

The user handle, must be a valid email.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } /** - * Gravatar icon associated to the user. - * + *

Gravatar icon associated to the user.

* @return icon - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ICON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIcon() { - return icon; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ICON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIcon() { + return icon; + } public User name(String name) { this.name = name; return this; } /** - * The name of the user. - * + *

The name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } /** - * Whether or not the user logged in Datadog at least once. - * + *

Whether or not the user logged in Datadog at least once.

* @return verified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVerified() { - return verified; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVerified() { + return verified; + } - /** Return true if this User object is equal to o. */ + /** + * Return true if this User object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -191,18 +203,13 @@ public boolean equals(Object o) { return false; } User user = (User) o; - return Objects.equals(this.accessRole, user.accessRole) - && Objects.equals(this.disabled, user.disabled) - && Objects.equals(this.email, user.email) - && Objects.equals(this.handle, user.handle) - && Objects.equals(this.icon, user.icon) - && Objects.equals(this.name, user.name) - && Objects.equals(this.verified, user.verified); + return Objects.equals(this.accessRole, user.accessRole) && Objects.equals(this.disabled, user.disabled) && Objects.equals(this.email, user.email) && Objects.equals(this.handle, user.handle) && Objects.equals(this.icon, user.icon) && Objects.equals(this.name, user.name) && Objects.equals(this.verified, user.verified); } + @Override public int hashCode() { - return Objects.hash(accessRole, disabled, email, handle, icon, name, verified); + return Objects.hash(accessRole,disabled,email,handle,icon,name,verified); } @Override @@ -221,7 +228,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UserDisableResponse.java b/src/main/java/com/datadog/api/client/v1/model/UserDisableResponse.java index 618cdeccffc..16738594c38 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UserDisableResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UserDisableResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Array of user disabled for a given organization. */ -@JsonPropertyOrder({UserDisableResponse.JSON_PROPERTY_MESSAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Array of user disabled for a given organization.

+ */ +@JsonPropertyOrder({ + UserDisableResponse.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserDisableResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; @@ -27,22 +49,23 @@ public UserDisableResponse message(String message) { } /** - * Information pertaining to a user disabled for a given organization. - * + *

Information pertaining to a user disabled for a given organization.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - /** Return true if this UserDisableResponse object is equal to o. */ + /** + * Return true if this UserDisableResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.message, userDisableResponse.message); } + @Override public int hashCode() { return Objects.hash(message); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UserListResponse.java b/src/main/java/com/datadog/api/client/v1/model/UserListResponse.java index c5743f9f9ee..ec750033c6d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UserListResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UserListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Array of Datadog users for a given organization. */ -@JsonPropertyOrder({UserListResponse.JSON_PROPERTY_USERS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Array of Datadog users for a given organization.

+ */ +@JsonPropertyOrder({ + UserListResponse.JSON_PROPERTY_USERS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USERS = "users"; private List users = null; @@ -30,7 +50,6 @@ public UserListResponse users(List users) { } return this; } - public UserListResponse addUsersItem(User usersItem) { if (this.users == null) { this.users = new ArrayList<>(); @@ -41,22 +60,23 @@ public UserListResponse addUsersItem(User usersItem) { } /** - * Array of users. - * + *

Array of users.

* @return users - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUsers() { - return users; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUsers() { + return users; + } public void setUsers(List users) { this.users = users; } - /** Return true if this UserListResponse object is equal to o. */ + /** + * Return true if this UserListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.users, userListResponse.users); } + @Override public int hashCode() { return Objects.hash(users); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/UserResponse.java b/src/main/java/com/datadog/api/client/v1/model/UserResponse.java index ac47b206e2d..7126ff1cff2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/UserResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/UserResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A Datadog User. */ -@JsonPropertyOrder({UserResponse.JSON_PROPERTY_USER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A Datadog User.

+ */ +@JsonPropertyOrder({ + UserResponse.JSON_PROPERTY_USER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USER = "user"; private User user; @@ -28,22 +50,23 @@ public UserResponse user(User user) { } /** - * Create, edit, and disable users. - * + *

Create, edit, and disable users.

* @return user - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public User getUser() { - return user; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public User getUser() { + return user; + } public void setUser(User user) { this.user = user; } - /** Return true if this UserResponse object is equal to o. */ + /** + * Return true if this UserResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.user, userResponse.user); } + @Override public int hashCode() { return Objects.hash(user); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegration.java b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegration.java index e9e3ccd5d8f..825313ef346 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegration.java +++ b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegration.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Datadog-Webhooks integration. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Datadog-Webhooks integration.

+ */ @JsonPropertyOrder({ WebhooksIntegration.JSON_PROPERTY_CUSTOM_HEADERS, WebhooksIntegration.JSON_PROPERTY_ENCODE_AS, @@ -22,10 +40,10 @@ WebhooksIntegration.JSON_PROPERTY_PAYLOAD, WebhooksIntegration.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WebhooksIntegration { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "custom_headers"; private JsonNullable customHeaders = JsonNullable.undefined(); @@ -45,44 +63,38 @@ public WebhooksIntegration() {} @JsonCreator public WebhooksIntegration( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.name = name; - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.name = name; + this.url = url; } - public WebhooksIntegration customHeaders(String customHeaders) { this.customHeaders = JsonNullable.of(customHeaders); return this; } /** - * If null, uses no header. If given a JSON payload, these will be headers attached - * to your webhook. - * + *

If null, uses no header. + * If given a JSON payload, these will be headers attached to your webhook.

* @return customHeaders - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getCustomHeaders() { - return customHeaders.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCustomHeaders() { + return customHeaders.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomHeaders_JsonNullable() { return customHeaders; } - - @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) - public void setCustomHeaders_JsonNullable(JsonNullable customHeaders) { + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS)public void setCustomHeaders_JsonNullable(JsonNullable customHeaders) { this.customHeaders = customHeaders; } - public void setCustomHeaders(String customHeaders) { this.customHeaders = JsonNullable.of(customHeaders); } - public WebhooksIntegration encodeAs(WebhooksIntegrationEncoding encodeAs) { this.encodeAs = encodeAs; this.unparsed |= !encodeAs.isValid(); @@ -90,100 +102,93 @@ public WebhooksIntegration encodeAs(WebhooksIntegrationEncoding encodeAs) { } /** - * Encoding type. Can be given either json or form. - * + *

Encoding type. Can be given either json or form.

* @return encodeAs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENCODE_AS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WebhooksIntegrationEncoding getEncodeAs() { - return encodeAs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENCODE_AS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WebhooksIntegrationEncoding getEncodeAs() { + return encodeAs; + } public void setEncodeAs(WebhooksIntegrationEncoding encodeAs) { if (!encodeAs.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.encodeAs = encodeAs; } - public WebhooksIntegration name(String name) { this.name = name; return this; } /** - * The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on - * how to use it in monitor - * notifications. - * + *

The name of the webhook. It corresponds with <WEBHOOK_NAME>. + * Learn more on how to use it in + * monitor notifications.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public WebhooksIntegration payload(String payload) { this.payload = JsonNullable.of(payload); return this; } /** - * If null, uses the default payload. If given a JSON payload, the webhook returns - * the payload specified by the given payload. Webhooks variable usage. - * + *

If null, uses the default payload. + * If given a JSON payload, the webhook returns the payload + * specified by the given payload. + * Webhooks variable usage.

* @return payload - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getPayload() { - return payload.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPayload() { + return payload.orElse(null); + } @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPayload_JsonNullable() { return payload; } - - @JsonProperty(JSON_PROPERTY_PAYLOAD) - public void setPayload_JsonNullable(JsonNullable payload) { + @JsonProperty(JSON_PROPERTY_PAYLOAD)public void setPayload_JsonNullable(JsonNullable payload) { this.payload = payload; } - public void setPayload(String payload) { this.payload = JsonNullable.of(payload); } - public WebhooksIntegration url(String url) { this.url = url; return this; } /** - * URL of the webhook. - * + *

URL of the webhook.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this WebhooksIntegration object is equal to o. */ + /** + * Return true if this WebhooksIntegration object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -193,16 +198,13 @@ public boolean equals(Object o) { return false; } WebhooksIntegration webhooksIntegration = (WebhooksIntegration) o; - return Objects.equals(this.customHeaders, webhooksIntegration.customHeaders) - && Objects.equals(this.encodeAs, webhooksIntegration.encodeAs) - && Objects.equals(this.name, webhooksIntegration.name) - && Objects.equals(this.payload, webhooksIntegration.payload) - && Objects.equals(this.url, webhooksIntegration.url); + return Objects.equals(this.customHeaders, webhooksIntegration.customHeaders) && Objects.equals(this.encodeAs, webhooksIntegration.encodeAs) && Objects.equals(this.name, webhooksIntegration.name) && Objects.equals(this.payload, webhooksIntegration.payload) && Objects.equals(this.url, webhooksIntegration.url); } + @Override public int hashCode() { - return Objects.hash(customHeaders, encodeAs, name, payload, url); + return Objects.hash(customHeaders,encodeAs,name,payload,url); } @Override @@ -219,7 +221,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariable.java b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariable.java index 1d9e71920df..3ba838b19e4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariable.java +++ b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariable.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Custom variable for Webhook integration. */ + +/** + *

Custom variable for Webhook integration.

+ */ @JsonPropertyOrder({ WebhooksIntegrationCustomVariable.JSON_PROPERTY_IS_SECRET, WebhooksIntegrationCustomVariable.JSON_PROPERTY_NAME, WebhooksIntegrationCustomVariable.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WebhooksIntegrationCustomVariable { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_SECRET = "is_secret"; private Boolean isSecret; @@ -36,76 +55,72 @@ public WebhooksIntegrationCustomVariable() {} @JsonCreator public WebhooksIntegrationCustomVariable( - @JsonProperty(required = true, value = JSON_PROPERTY_IS_SECRET) Boolean isSecret, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { - this.isSecret = isSecret; - this.name = name; - this.value = value; + @JsonProperty(required=true, value=JSON_PROPERTY_IS_SECRET)Boolean isSecret, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_VALUE)String value) { + this.isSecret = isSecret; + this.name = name; + this.value = value; } - public WebhooksIntegrationCustomVariable isSecret(Boolean isSecret) { this.isSecret = isSecret; return this; } /** - * Make custom variable is secret or not. If the custom variable is secret, the value is not - * returned in the response payload. - * + *

Make custom variable is secret or not. + * If the custom variable is secret, the value is not returned in the response payload.

* @return isSecret - */ - @JsonProperty(JSON_PROPERTY_IS_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsSecret() { - return isSecret; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_SECRET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsSecret() { + return isSecret; + } public void setIsSecret(Boolean isSecret) { this.isSecret = isSecret; } - public WebhooksIntegrationCustomVariable name(String name) { this.name = name; return this; } /** - * The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>. - * + *

The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public WebhooksIntegrationCustomVariable value(String value) { this.value = value; return this; } /** - * Value of the custom variable. - * + *

Value of the custom variable.

* @return value - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getValue() { - return value; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this WebhooksIntegrationCustomVariable object is equal to o. */ + /** + * Return true if this WebhooksIntegrationCustomVariable object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -114,16 +129,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WebhooksIntegrationCustomVariable webhooksIntegrationCustomVariable = - (WebhooksIntegrationCustomVariable) o; - return Objects.equals(this.isSecret, webhooksIntegrationCustomVariable.isSecret) - && Objects.equals(this.name, webhooksIntegrationCustomVariable.name) - && Objects.equals(this.value, webhooksIntegrationCustomVariable.value); + WebhooksIntegrationCustomVariable webhooksIntegrationCustomVariable = (WebhooksIntegrationCustomVariable) o; + return Objects.equals(this.isSecret, webhooksIntegrationCustomVariable.isSecret) && Objects.equals(this.name, webhooksIntegrationCustomVariable.name) && Objects.equals(this.value, webhooksIntegrationCustomVariable.value); } + @Override public int hashCode() { - return Objects.hash(isSecret, name, value); + return Objects.hash(isSecret,name,value); } @Override @@ -138,7 +151,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableResponse.java b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableResponse.java index 54cfe06057c..09212344edf 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableResponse.java +++ b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableResponse.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Custom variable for Webhook integration. */ + +/** + *

Custom variable for Webhook integration.

+ */ @JsonPropertyOrder({ WebhooksIntegrationCustomVariableResponse.JSON_PROPERTY_IS_SECRET, WebhooksIntegrationCustomVariableResponse.JSON_PROPERTY_NAME, WebhooksIntegrationCustomVariableResponse.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WebhooksIntegrationCustomVariableResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_SECRET = "is_secret"; private Boolean isSecret; @@ -36,76 +55,71 @@ public WebhooksIntegrationCustomVariableResponse() {} @JsonCreator public WebhooksIntegrationCustomVariableResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_IS_SECRET) Boolean isSecret, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.isSecret = isSecret; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_IS_SECRET)Boolean isSecret, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.isSecret = isSecret; + this.name = name; } - public WebhooksIntegrationCustomVariableResponse isSecret(Boolean isSecret) { this.isSecret = isSecret; return this; } /** - * Make custom variable is secret or not. If the custom variable is secret, the value is not - * returned in the response payload. - * + *

Make custom variable is secret or not. + * If the custom variable is secret, the value is not returned in the response payload.

* @return isSecret - */ - @JsonProperty(JSON_PROPERTY_IS_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsSecret() { - return isSecret; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_SECRET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsSecret() { + return isSecret; + } public void setIsSecret(Boolean isSecret) { this.isSecret = isSecret; } - public WebhooksIntegrationCustomVariableResponse name(String name) { this.name = name; return this; } /** - * The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>. It - * must only contains upper-case characters, integers or underscores. - * + *

The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>. It must only contains upper-case characters, integers or underscores.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public WebhooksIntegrationCustomVariableResponse value(String value) { this.value = value; return this; } /** - * Value of the custom variable. It won't be returned if the variable is secret. - * + *

Value of the custom variable. It won't be returned if the variable is secret.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this WebhooksIntegrationCustomVariableResponse object is equal to o. */ + /** + * Return true if this WebhooksIntegrationCustomVariableResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -114,16 +128,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WebhooksIntegrationCustomVariableResponse webhooksIntegrationCustomVariableResponse = - (WebhooksIntegrationCustomVariableResponse) o; - return Objects.equals(this.isSecret, webhooksIntegrationCustomVariableResponse.isSecret) - && Objects.equals(this.name, webhooksIntegrationCustomVariableResponse.name) - && Objects.equals(this.value, webhooksIntegrationCustomVariableResponse.value); + WebhooksIntegrationCustomVariableResponse webhooksIntegrationCustomVariableResponse = (WebhooksIntegrationCustomVariableResponse) o; + return Objects.equals(this.isSecret, webhooksIntegrationCustomVariableResponse.isSecret) && Objects.equals(this.name, webhooksIntegrationCustomVariableResponse.name) && Objects.equals(this.value, webhooksIntegrationCustomVariableResponse.value); } + @Override public int hashCode() { - return Objects.hash(isSecret, name, value); + return Objects.hash(isSecret,name,value); } @Override @@ -138,7 +150,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableUpdateRequest.java index e6db4c0afc8..231cdfd4d7d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationCustomVariableUpdateRequest.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Update request of a custom variable object. - * - *

All properties are optional. + *

Update request of a custom variable object.

+ *

All properties are optional.

*/ @JsonPropertyOrder({ WebhooksIntegrationCustomVariableUpdateRequest.JSON_PROPERTY_IS_SECRET, WebhooksIntegrationCustomVariableUpdateRequest.JSON_PROPERTY_NAME, WebhooksIntegrationCustomVariableUpdateRequest.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WebhooksIntegrationCustomVariableUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_SECRET = "is_secret"; private Boolean isSecret; @@ -41,66 +58,62 @@ public WebhooksIntegrationCustomVariableUpdateRequest isSecret(Boolean isSecret) } /** - * Make custom variable is secret or not. If the custom variable is secret, the value is not - * returned in the response payload. - * + *

Make custom variable is secret or not. + * If the custom variable is secret, the value is not returned in the response payload.

* @return isSecret - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsSecret() { - return isSecret; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SECRET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsSecret() { + return isSecret; + } public void setIsSecret(Boolean isSecret) { this.isSecret = isSecret; } - public WebhooksIntegrationCustomVariableUpdateRequest name(String name) { this.name = name; return this; } /** - * The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>. It - * must only contains upper-case characters, integers or underscores. - * + *

The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>. It must only contains upper-case characters, integers or underscores.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public WebhooksIntegrationCustomVariableUpdateRequest value(String value) { this.value = value; return this; } /** - * Value of the custom variable. - * + *

Value of the custom variable.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this WebhooksIntegrationCustomVariableUpdateRequest object is equal to o. */ + /** + * Return true if this WebhooksIntegrationCustomVariableUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,16 +122,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WebhooksIntegrationCustomVariableUpdateRequest webhooksIntegrationCustomVariableUpdateRequest = - (WebhooksIntegrationCustomVariableUpdateRequest) o; - return Objects.equals(this.isSecret, webhooksIntegrationCustomVariableUpdateRequest.isSecret) - && Objects.equals(this.name, webhooksIntegrationCustomVariableUpdateRequest.name) - && Objects.equals(this.value, webhooksIntegrationCustomVariableUpdateRequest.value); + WebhooksIntegrationCustomVariableUpdateRequest webhooksIntegrationCustomVariableUpdateRequest = (WebhooksIntegrationCustomVariableUpdateRequest) o; + return Objects.equals(this.isSecret, webhooksIntegrationCustomVariableUpdateRequest.isSecret) && Objects.equals(this.name, webhooksIntegrationCustomVariableUpdateRequest.name) && Objects.equals(this.value, webhooksIntegrationCustomVariableUpdateRequest.value); } + @Override public int hashCode() { - return Objects.hash(isSecret, name, value); + return Objects.hash(isSecret,name,value); } @Override @@ -133,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationEncoding.java b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationEncoding.java index ff79f657711..c9a960b5952 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationEncoding.java +++ b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationEncoding.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Encoding type. Can be given either json or form. */ +/** + *

Encoding type. Can be given either json or form.

+ */ @JsonSerialize(using = WebhooksIntegrationEncoding.WebhooksIntegrationEncodingSerializer.class) public class WebhooksIntegrationEncoding { public static final WebhooksIntegrationEncoding JSON = new WebhooksIntegrationEncoding("json"); public static final WebhooksIntegrationEncoding FORM = new WebhooksIntegrationEncoding("form"); - private static final Set allowedValues = - new HashSet(Arrays.asList("json", "form")); + private static final Set allowedValues = new HashSet(Arrays.asList("json", "form")); private String value; @@ -39,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class WebhooksIntegrationEncodingSerializer - extends StdSerializer { - public WebhooksIntegrationEncodingSerializer(Class t) { - super(t); - } + public static class WebhooksIntegrationEncodingSerializer extends StdSerializer { + public WebhooksIntegrationEncodingSerializer(Class t) { + super(t); + } - public WebhooksIntegrationEncodingSerializer() { - this(null); - } + public WebhooksIntegrationEncodingSerializer() { + this(null); + } - @Override - public void serialize( - WebhooksIntegrationEncoding value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(WebhooksIntegrationEncoding value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WebhooksIntegrationEncoding object is equal to o. */ + /** + * Return true if this WebhooksIntegrationEncoding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationUpdateRequest.java b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationUpdateRequest.java index 9678ff8fa5b..1d3cca28c64 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/WebhooksIntegrationUpdateRequest.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; +import com.datadog.api.client.JsonTimeSerializer; + + /** - * Update request of a Webhooks integration object. - * - *

All properties are optional. + *

Update request of a Webhooks integration object.

+ *

All properties are optional.

*/ @JsonPropertyOrder({ WebhooksIntegrationUpdateRequest.JSON_PROPERTY_CUSTOM_HEADERS, @@ -25,10 +41,10 @@ WebhooksIntegrationUpdateRequest.JSON_PROPERTY_PAYLOAD, WebhooksIntegrationUpdateRequest.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WebhooksIntegrationUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_HEADERS = "custom_headers"; private String customHeaders; @@ -50,22 +66,20 @@ public WebhooksIntegrationUpdateRequest customHeaders(String customHeaders) { } /** - * If null, uses no header. If given a JSON payload, these will be headers attached - * to your webhook. - * + *

If null, uses no header. + * If given a JSON payload, these will be headers attached to your webhook.

* @return customHeaders - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomHeaders() { - return customHeaders; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_HEADERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomHeaders() { + return customHeaders; + } public void setCustomHeaders(String customHeaders) { this.customHeaders = customHeaders; } - public WebhooksIntegrationUpdateRequest encodeAs(WebhooksIntegrationEncoding encodeAs) { this.encodeAs = encodeAs; this.unparsed |= !encodeAs.isValid(); @@ -73,102 +87,95 @@ public WebhooksIntegrationUpdateRequest encodeAs(WebhooksIntegrationEncoding enc } /** - * Encoding type. Can be given either json or form. - * + *

Encoding type. Can be given either json or form.

* @return encodeAs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENCODE_AS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WebhooksIntegrationEncoding getEncodeAs() { - return encodeAs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENCODE_AS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WebhooksIntegrationEncoding getEncodeAs() { + return encodeAs; + } public void setEncodeAs(WebhooksIntegrationEncoding encodeAs) { if (!encodeAs.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.encodeAs = encodeAs; } - public WebhooksIntegrationUpdateRequest name(String name) { this.name = name; return this; } /** - * The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on - * how to use it in monitor - * notifications. - * + *

The name of the webhook. It corresponds with <WEBHOOK_NAME>. + * Learn more on how to use it in + * monitor notifications.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public WebhooksIntegrationUpdateRequest payload(String payload) { this.payload = JsonNullable.of(payload); return this; } /** - * If null, uses the default payload. If given a JSON payload, the webhook returns - * the payload specified by the given payload. Webhooks variable usage. - * + *

If null, uses the default payload. + * If given a JSON payload, the webhook returns the payload + * specified by the given payload. + * Webhooks variable usage.

* @return payload - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getPayload() { - return payload.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPayload() { + return payload.orElse(null); + } @JsonProperty(JSON_PROPERTY_PAYLOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPayload_JsonNullable() { return payload; } - - @JsonProperty(JSON_PROPERTY_PAYLOAD) - public void setPayload_JsonNullable(JsonNullable payload) { + @JsonProperty(JSON_PROPERTY_PAYLOAD)public void setPayload_JsonNullable(JsonNullable payload) { this.payload = payload; } - public void setPayload(String payload) { this.payload = JsonNullable.of(payload); } - public WebhooksIntegrationUpdateRequest url(String url) { this.url = url; return this; } /** - * URL of the webhook. - * + *

URL of the webhook.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this WebhooksIntegrationUpdateRequest object is equal to o. */ + /** + * Return true if this WebhooksIntegrationUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -177,18 +184,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WebhooksIntegrationUpdateRequest webhooksIntegrationUpdateRequest = - (WebhooksIntegrationUpdateRequest) o; - return Objects.equals(this.customHeaders, webhooksIntegrationUpdateRequest.customHeaders) - && Objects.equals(this.encodeAs, webhooksIntegrationUpdateRequest.encodeAs) - && Objects.equals(this.name, webhooksIntegrationUpdateRequest.name) - && Objects.equals(this.payload, webhooksIntegrationUpdateRequest.payload) - && Objects.equals(this.url, webhooksIntegrationUpdateRequest.url); + WebhooksIntegrationUpdateRequest webhooksIntegrationUpdateRequest = (WebhooksIntegrationUpdateRequest) o; + return Objects.equals(this.customHeaders, webhooksIntegrationUpdateRequest.customHeaders) && Objects.equals(this.encodeAs, webhooksIntegrationUpdateRequest.encodeAs) && Objects.equals(this.name, webhooksIntegrationUpdateRequest.name) && Objects.equals(this.payload, webhooksIntegrationUpdateRequest.payload) && Objects.equals(this.url, webhooksIntegrationUpdateRequest.url); } + @Override public int hashCode() { - return Objects.hash(customHeaders, encodeAs, name, payload, url); + return Objects.hash(customHeaders,encodeAs,name,payload,url); } @Override @@ -205,7 +208,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/Widget.java b/src/main/java/com/datadog/api/client/v1/model/Widget.java index 0c56527981d..e4f64b2dd23 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Widget.java +++ b/src/main/java/com/datadog/api/client/v1/model/Widget.java @@ -6,31 +6,46 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Information about widget. - * - *

Note: The layout property is required for widgets in dashboards - * with free layout_type. For the new dashboard layout, - * the layout property depends on the reflow_type of the dashboard. - If - * reflow_type is fixed, layout is required. - If - * reflow_type is auto, layout should not be set. + *

Information about widget.

+ *

Note: The layout property is required for widgets in dashboards with free layout_type. + * For the new dashboard layout, the layout property depends on the reflow_type of the dashboard. + * - If reflow_type is fixed, layout is required. + * - If reflow_type is auto, layout should not be set.

*/ @JsonPropertyOrder({ Widget.JSON_PROPERTY_DEFINITION, Widget.JSON_PROPERTY_ID, Widget.JSON_PROPERTY_LAYOUT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Widget { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DEFINITION = "definition"; private WidgetDefinition definition; @@ -44,12 +59,10 @@ public Widget() {} @JsonCreator public Widget( - @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) - WidgetDefinition definition) { - this.definition = definition; - this.unparsed |= definition.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DEFINITION)WidgetDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; } - public Widget definition(WidgetDefinition definition) { this.definition = definition; this.unparsed |= definition.unparsed; @@ -57,41 +70,37 @@ public Widget definition(WidgetDefinition definition) { } /** - * Definition of the widget. - * + *

Definition of the widget.

* @return definition - */ - @JsonProperty(JSON_PROPERTY_DEFINITION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetDefinition getDefinition() { - return definition; - } - + **/ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetDefinition getDefinition() { + return definition; + } public void setDefinition(WidgetDefinition definition) { this.definition = definition; } - public Widget id(Long id) { this.id = id; return this; } /** - * ID of the widget. - * + *

ID of the widget.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public Widget layout(WidgetLayout layout) { this.layout = layout; this.unparsed |= layout.unparsed; @@ -99,23 +108,23 @@ public Widget layout(WidgetLayout layout) { } /** - * The layout for a widget on a free or new dashboard layout - * dashboard. - * + *

The layout for a widget on a free or new dashboard layout dashboard.

* @return layout - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAYOUT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetLayout getLayout() { - return layout; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAYOUT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetLayout getLayout() { + return layout; + } public void setLayout(WidgetLayout layout) { this.layout = layout; } - /** Return true if this Widget object is equal to o. */ + /** + * Return true if this Widget object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -125,14 +134,13 @@ public boolean equals(Object o) { return false; } Widget widget = (Widget) o; - return Objects.equals(this.definition, widget.definition) - && Objects.equals(this.id, widget.id) - && Objects.equals(this.layout, widget.layout); + return Objects.equals(this.definition, widget.definition) && Objects.equals(this.id, widget.id) && Objects.equals(this.layout, widget.layout); } + @Override public int hashCode() { - return Objects.hash(definition, id, layout); + return Objects.hash(definition,id,layout); } @Override @@ -147,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetAggregator.java b/src/main/java/com/datadog/api/client/v1/model/WidgetAggregator.java index f9d50d13f85..29db5bd73ed 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetAggregator.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetAggregator.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Aggregator used for the request. */ +/** + *

Aggregator used for the request.

+ */ @JsonSerialize(using = WidgetAggregator.WidgetAggregatorSerializer.class) public class WidgetAggregator { @@ -30,8 +54,7 @@ public class WidgetAggregator { public static final WidgetAggregator SUM = new WidgetAggregator("sum"); public static final WidgetAggregator PERCENTILE = new WidgetAggregator("percentile"); - private static final Set allowedValues = - new HashSet(Arrays.asList("avg", "last", "max", "min", "sum", "percentile")); + private static final Set allowedValues = new HashSet(Arrays.asList("avg", "last", "max", "min", "sum", "percentile")); private String value; @@ -44,19 +67,18 @@ public boolean isValid() { } public static class WidgetAggregatorSerializer extends StdSerializer { - public WidgetAggregatorSerializer(Class t) { - super(t); - } - - public WidgetAggregatorSerializer() { - this(null); - } - - @Override - public void serialize(WidgetAggregator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetAggregatorSerializer(Class t) { + super(t); + } + + public WidgetAggregatorSerializer() { + this(null); + } + + @Override + public void serialize(WidgetAggregator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetAggregator object is equal to o. */ + /** + * Return true if this WidgetAggregator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetAxis.java b/src/main/java/com/datadog/api/client/v1/model/WidgetAxis.java index e8291744283..3eba126c34e 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetAxis.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetAxis.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Axis controls for the widget. */ +/** + *

Axis controls for the widget.

+ */ @JsonPropertyOrder({ WidgetAxis.JSON_PROPERTY_INCLUDE_ZERO, WidgetAxis.JSON_PROPERTY_LABEL, @@ -20,10 +40,10 @@ WidgetAxis.JSON_PROPERTY_MIN, WidgetAxis.JSON_PROPERTY_SCALE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetAxis { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INCLUDE_ZERO = "include_zero"; private Boolean includeZero; @@ -45,108 +65,99 @@ public WidgetAxis includeZero(Boolean includeZero) { } /** - * True includes zero. - * + *

True includes zero.

* @return includeZero - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_ZERO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeZero() { - return includeZero; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_ZERO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeZero() { + return includeZero; + } public void setIncludeZero(Boolean includeZero) { this.includeZero = includeZero; } - public WidgetAxis label(String label) { this.label = label; return this; } /** - * The label of the axis to display on the graph. - * + *

The label of the axis to display on the graph.

* @return label - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLabel() { - return label; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLabel() { + return label; + } public void setLabel(String label) { this.label = label; } - public WidgetAxis max(String max) { this.max = max; return this; } /** - * Specifies the maximum value to show on the y-axis. It takes a number, or auto for default - * behavior. - * + *

Specifies the maximum value to show on the y-axis. It takes a number, or auto for default behavior.

* @return max - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMax() { - return max; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMax() { + return max; + } public void setMax(String max) { this.max = max; } - public WidgetAxis min(String min) { this.min = min; return this; } /** - * Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior. - * + *

Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior.

* @return min - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMin() { - return min; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMin() { + return min; + } public void setMin(String min) { this.min = min; } - public WidgetAxis scale(String scale) { this.scale = scale; return this; } /** - * Specifies the scale type. Possible values are linear, log, sqrt - * , pow## (for example pow2, pow0.5 etc.). - * + *

Specifies the scale type. Possible values are linear, log, sqrt, pow## (for example pow2, pow0.5 etc.).

* @return scale - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getScale() { - return scale; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCALE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getScale() { + return scale; + } public void setScale(String scale) { this.scale = scale; } - /** Return true if this WidgetAxis object is equal to o. */ + /** + * Return true if this WidgetAxis object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -156,16 +167,13 @@ public boolean equals(Object o) { return false; } WidgetAxis widgetAxis = (WidgetAxis) o; - return Objects.equals(this.includeZero, widgetAxis.includeZero) - && Objects.equals(this.label, widgetAxis.label) - && Objects.equals(this.max, widgetAxis.max) - && Objects.equals(this.min, widgetAxis.min) - && Objects.equals(this.scale, widgetAxis.scale); + return Objects.equals(this.includeZero, widgetAxis.includeZero) && Objects.equals(this.label, widgetAxis.label) && Objects.equals(this.max, widgetAxis.max) && Objects.equals(this.min, widgetAxis.min) && Objects.equals(this.scale, widgetAxis.scale); } + @Override public int hashCode() { - return Objects.hash(includeZero, label, max, min, scale); + return Objects.hash(includeZero,label,max,min,scale); } @Override @@ -182,7 +190,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetChangeType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetChangeType.java index 38d6a6ff770..9cd8fc09ba6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetChangeType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetChangeType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Show the absolute or the relative change. */ +/** + *

Show the absolute or the relative change.

+ */ @JsonSerialize(using = WidgetChangeType.WidgetChangeTypeSerializer.class) public class WidgetChangeType { public static final WidgetChangeType ABSOLUTE = new WidgetChangeType("absolute"); public static final WidgetChangeType RELATIVE = new WidgetChangeType("relative"); - private static final Set allowedValues = - new HashSet(Arrays.asList("absolute", "relative")); + private static final Set allowedValues = new HashSet(Arrays.asList("absolute", "relative")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class WidgetChangeTypeSerializer extends StdSerializer { - public WidgetChangeTypeSerializer(Class t) { - super(t); - } - - public WidgetChangeTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetChangeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetChangeTypeSerializer(Class t) { + super(t); + } + + public WidgetChangeTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetChangeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetChangeType object is equal to o. */ + /** + * Return true if this WidgetChangeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetColorPreference.java b/src/main/java/com/datadog/api/client/v1/model/WidgetColorPreference.java index 62ffa9a8415..057eb0a79a0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetColorPreference.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetColorPreference.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Which color to use on the widget. */ +/** + *

Which color to use on the widget.

+ */ @JsonSerialize(using = WidgetColorPreference.WidgetColorPreferenceSerializer.class) public class WidgetColorPreference { public static final WidgetColorPreference BACKGROUND = new WidgetColorPreference("background"); public static final WidgetColorPreference TEXT = new WidgetColorPreference("text"); - private static final Set allowedValues = - new HashSet(Arrays.asList("background", "text")); + private static final Set allowedValues = new HashSet(Arrays.asList("background", "text")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class WidgetColorPreferenceSerializer extends StdSerializer { - public WidgetColorPreferenceSerializer(Class t) { - super(t); - } - - public WidgetColorPreferenceSerializer() { - this(null); - } - - @Override - public void serialize( - WidgetColorPreference value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetColorPreferenceSerializer(Class t) { + super(t); + } + + public WidgetColorPreferenceSerializer() { + this(null); + } + + @Override + public void serialize(WidgetColorPreference value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetColorPreference object is equal to o. */ + /** + * Return true if this WidgetColorPreference object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetComparator.java b/src/main/java/com/datadog/api/client/v1/model/WidgetComparator.java index e7490797bf4..d28b697a6eb 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetComparator.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetComparator.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Comparator to apply. */ +/** + *

Comparator to apply.

+ */ @JsonSerialize(using = WidgetComparator.WidgetComparatorSerializer.class) public class WidgetComparator { @@ -28,8 +52,7 @@ public class WidgetComparator { public static final WidgetComparator LESS_THAN = new WidgetComparator("<"); public static final WidgetComparator LESS_THAN_OR_EQUAL_TO = new WidgetComparator("<="); - private static final Set allowedValues = - new HashSet(Arrays.asList(">", ">=", "<", "<=")); + private static final Set allowedValues = new HashSet(Arrays.asList(">", ">=", "<", "<=")); private String value; @@ -42,19 +65,18 @@ public boolean isValid() { } public static class WidgetComparatorSerializer extends StdSerializer { - public WidgetComparatorSerializer(Class t) { - super(t); - } - - public WidgetComparatorSerializer() { - this(null); - } - - @Override - public void serialize(WidgetComparator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetComparatorSerializer(Class t) { + super(t); + } + + public WidgetComparatorSerializer() { + this(null); + } + + @Override + public void serialize(WidgetComparator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetComparator object is equal to o. */ + /** + * Return true if this WidgetComparator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetCompareTo.java b/src/main/java/com/datadog/api/client/v1/model/WidgetCompareTo.java index fbd261bb6c1..a1916d976c9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetCompareTo.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetCompareTo.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Timeframe used for the change comparison. */ +/** + *

Timeframe used for the change comparison.

+ */ @JsonSerialize(using = WidgetCompareTo.WidgetCompareToSerializer.class) public class WidgetCompareTo { @@ -28,9 +52,7 @@ public class WidgetCompareTo { public static final WidgetCompareTo WEEK_BEFORE = new WidgetCompareTo("week_before"); public static final WidgetCompareTo MONTH_BEFORE = new WidgetCompareTo("month_before"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("hour_before", "day_before", "week_before", "month_before")); + private static final Set allowedValues = new HashSet(Arrays.asList("hour_before", "day_before", "week_before", "month_before")); private String value; @@ -43,19 +65,18 @@ public boolean isValid() { } public static class WidgetCompareToSerializer extends StdSerializer { - public WidgetCompareToSerializer(Class t) { - super(t); - } - - public WidgetCompareToSerializer() { - this(null); - } - - @Override - public void serialize(WidgetCompareTo value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetCompareToSerializer(Class t) { + super(t); + } + + public WidgetCompareToSerializer() { + this(null); + } + + @Override + public void serialize(WidgetCompareTo value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetCompareTo object is equal to o. */ + /** + * Return true if this WidgetCompareTo object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetConditionalFormat.java b/src/main/java/com/datadog/api/client/v1/model/WidgetConditionalFormat.java index 4fa615e6483..6fa54038c88 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetConditionalFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetConditionalFormat.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Define a conditional format for the widget. */ +/** + *

Define a conditional format for the widget.

+ */ @JsonPropertyOrder({ WidgetConditionalFormat.JSON_PROPERTY_COMPARATOR, WidgetConditionalFormat.JSON_PROPERTY_CUSTOM_BG_COLOR, @@ -25,10 +44,10 @@ WidgetConditionalFormat.JSON_PROPERTY_TIMEFRAME, WidgetConditionalFormat.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetConditionalFormat { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPARATOR = "comparator"; private WidgetComparator comparator; @@ -60,16 +79,15 @@ public WidgetConditionalFormat() {} @JsonCreator public WidgetConditionalFormat( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPARATOR) WidgetComparator comparator, - @JsonProperty(required = true, value = JSON_PROPERTY_PALETTE) WidgetPalette palette, - @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) Double value) { - this.comparator = comparator; - this.unparsed |= !comparator.isValid(); - this.palette = palette; - this.unparsed |= !palette.isValid(); - this.value = value; + @JsonProperty(required=true, value=JSON_PROPERTY_COMPARATOR)WidgetComparator comparator, + @JsonProperty(required=true, value=JSON_PROPERTY_PALETTE)WidgetPalette palette, + @JsonProperty(required=true, value=JSON_PROPERTY_VALUE)Double value) { + this.comparator = comparator; + this.unparsed |= !comparator.isValid(); + this.palette = palette; + this.unparsed |= !palette.isValid(); + this.value = value; } - public WidgetConditionalFormat comparator(WidgetComparator comparator) { this.comparator = comparator; this.unparsed |= !comparator.isValid(); @@ -77,128 +95,116 @@ public WidgetConditionalFormat comparator(WidgetComparator comparator) { } /** - * Comparator to apply. - * + *

Comparator to apply.

* @return comparator - */ - @JsonProperty(JSON_PROPERTY_COMPARATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetComparator getComparator() { - return comparator; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMPARATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetComparator getComparator() { + return comparator; + } public void setComparator(WidgetComparator comparator) { if (!comparator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.comparator = comparator; } - public WidgetConditionalFormat customBgColor(String customBgColor) { this.customBgColor = customBgColor; return this; } /** - * Color palette to apply to the background, same values available as palette. - * + *

Color palette to apply to the background, same values available as palette.

* @return customBgColor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_BG_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomBgColor() { - return customBgColor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_BG_COLOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomBgColor() { + return customBgColor; + } public void setCustomBgColor(String customBgColor) { this.customBgColor = customBgColor; } - public WidgetConditionalFormat customFgColor(String customFgColor) { this.customFgColor = customFgColor; return this; } /** - * Color palette to apply to the foreground, same values available as palette. - * + *

Color palette to apply to the foreground, same values available as palette.

* @return customFgColor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_FG_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomFgColor() { - return customFgColor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_FG_COLOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomFgColor() { + return customFgColor; + } public void setCustomFgColor(String customFgColor) { this.customFgColor = customFgColor; } - public WidgetConditionalFormat hideValue(Boolean hideValue) { this.hideValue = hideValue; return this; } /** - * True hides values. - * + *

True hides values.

* @return hideValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HIDE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideValue() { - return hideValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideValue() { + return hideValue; + } public void setHideValue(Boolean hideValue) { this.hideValue = hideValue; } - public WidgetConditionalFormat imageUrl(String imageUrl) { this.imageUrl = imageUrl; return this; } /** - * Displays an image as the background. - * + *

Displays an image as the background.

* @return imageUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IMAGE_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getImageUrl() { - return imageUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMAGE_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getImageUrl() { + return imageUrl; + } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } - public WidgetConditionalFormat metric(String metric) { this.metric = metric; return this; } /** - * Metric from the request to correlate this conditional format with. - * + *

Metric from the request to correlate this conditional format with.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public WidgetConditionalFormat palette(WidgetPalette palette) { this.palette = palette; this.unparsed |= !palette.isValid(); @@ -206,65 +212,62 @@ public WidgetConditionalFormat palette(WidgetPalette palette) { } /** - * Color palette to apply. - * + *

Color palette to apply.

* @return palette - */ - @JsonProperty(JSON_PROPERTY_PALETTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetPalette getPalette() { - return palette; - } - + **/ + @JsonProperty(JSON_PROPERTY_PALETTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetPalette getPalette() { + return palette; + } public void setPalette(WidgetPalette palette) { if (!palette.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.palette = palette; } - public WidgetConditionalFormat timeframe(String timeframe) { this.timeframe = timeframe; return this; } /** - * Defines the displayed timeframe. - * + *

Defines the displayed timeframe.

* @return timeframe - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEFRAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimeframe() { - return timeframe; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimeframe() { + return timeframe; + } public void setTimeframe(String timeframe) { this.timeframe = timeframe; } - public WidgetConditionalFormat value(Double value) { this.value = value; return this; } /** - * Value for the comparator. - * + *

Value for the comparator.

* @return value - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getValue() { - return value; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this WidgetConditionalFormat object is equal to o. */ + /** + * Return true if this WidgetConditionalFormat object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -274,29 +277,13 @@ public boolean equals(Object o) { return false; } WidgetConditionalFormat widgetConditionalFormat = (WidgetConditionalFormat) o; - return Objects.equals(this.comparator, widgetConditionalFormat.comparator) - && Objects.equals(this.customBgColor, widgetConditionalFormat.customBgColor) - && Objects.equals(this.customFgColor, widgetConditionalFormat.customFgColor) - && Objects.equals(this.hideValue, widgetConditionalFormat.hideValue) - && Objects.equals(this.imageUrl, widgetConditionalFormat.imageUrl) - && Objects.equals(this.metric, widgetConditionalFormat.metric) - && Objects.equals(this.palette, widgetConditionalFormat.palette) - && Objects.equals(this.timeframe, widgetConditionalFormat.timeframe) - && Objects.equals(this.value, widgetConditionalFormat.value); + return Objects.equals(this.comparator, widgetConditionalFormat.comparator) && Objects.equals(this.customBgColor, widgetConditionalFormat.customBgColor) && Objects.equals(this.customFgColor, widgetConditionalFormat.customFgColor) && Objects.equals(this.hideValue, widgetConditionalFormat.hideValue) && Objects.equals(this.imageUrl, widgetConditionalFormat.imageUrl) && Objects.equals(this.metric, widgetConditionalFormat.metric) && Objects.equals(this.palette, widgetConditionalFormat.palette) && Objects.equals(this.timeframe, widgetConditionalFormat.timeframe) && Objects.equals(this.value, widgetConditionalFormat.value); } + @Override public int hashCode() { - return Objects.hash( - comparator, - customBgColor, - customFgColor, - hideValue, - imageUrl, - metric, - palette, - timeframe, - value); + return Objects.hash(comparator,customBgColor,customFgColor,hideValue,imageUrl,metric,palette,timeframe,value); } @Override @@ -317,7 +304,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetCustomLink.java b/src/main/java/com/datadog/api/client/v1/model/WidgetCustomLink.java index 5566cfc2674..6984f6fb4e8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetCustomLink.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetCustomLink.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Custom links help you connect a data value to a URL, like a Datadog page or your AWS console. */ + +/** + *

Custom links help you connect a data value to a URL, like a Datadog page or your AWS console.

+ */ @JsonPropertyOrder({ WidgetCustomLink.JSON_PROPERTY_IS_HIDDEN, WidgetCustomLink.JSON_PROPERTY_LABEL, WidgetCustomLink.JSON_PROPERTY_LINK, WidgetCustomLink.JSON_PROPERTY_OVERRIDE_LABEL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetCustomLink { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IS_HIDDEN = "is_hidden"; private Boolean isHidden; @@ -41,89 +61,80 @@ public WidgetCustomLink isHidden(Boolean isHidden) { } /** - * The flag for toggling context menu link visibility. - * + *

The flag for toggling context menu link visibility.

* @return isHidden - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_HIDDEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsHidden() { - return isHidden; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_HIDDEN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsHidden() { + return isHidden; + } public void setIsHidden(Boolean isHidden) { this.isHidden = isHidden; } - public WidgetCustomLink label(String label) { this.label = label; return this; } /** - * The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags - * as variables. - * + *

The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables.

* @return label - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLabel() { - return label; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLabel() { + return label; + } public void setLabel(String label) { this.label = label; } - public WidgetCustomLink link(String link) { this.link = link; return this; } /** - * The URL of the custom link. URL must include http or https. A - * relative URL must start with /. - * + *

The URL of the custom link. URL must include http or https. A relative URL must start with /.

* @return link - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLink() { + return link; + } public void setLink(String link) { this.link = link; } - public WidgetCustomLink overrideLabel(String overrideLabel) { this.overrideLabel = overrideLabel; return this; } /** - * The label ID that refers to a context menu link. Can be logs, hosts, - * traces, profiles, processes, containers, or - * rum. - * + *

The label ID that refers to a context menu link. Can be logs, hosts, traces, profiles, processes, containers, or rum.

* @return overrideLabel - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OVERRIDE_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOverrideLabel() { - return overrideLabel; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERRIDE_LABEL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOverrideLabel() { + return overrideLabel; + } public void setOverrideLabel(String overrideLabel) { this.overrideLabel = overrideLabel; } - /** Return true if this WidgetCustomLink object is equal to o. */ + /** + * Return true if this WidgetCustomLink object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,15 +144,13 @@ public boolean equals(Object o) { return false; } WidgetCustomLink widgetCustomLink = (WidgetCustomLink) o; - return Objects.equals(this.isHidden, widgetCustomLink.isHidden) - && Objects.equals(this.label, widgetCustomLink.label) - && Objects.equals(this.link, widgetCustomLink.link) - && Objects.equals(this.overrideLabel, widgetCustomLink.overrideLabel); + return Objects.equals(this.isHidden, widgetCustomLink.isHidden) && Objects.equals(this.label, widgetCustomLink.label) && Objects.equals(this.link, widgetCustomLink.link) && Objects.equals(this.overrideLabel, widgetCustomLink.overrideLabel); } + @Override public int hashCode() { - return Objects.hash(isHidden, label, link, overrideLabel); + return Objects.hash(isHidden,label,link,overrideLabel); } @Override @@ -157,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java index bd535913ac3..8b433a8c0d8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java @@ -6,2302 +6,1761 @@ package com.datadog.api.client.v1.model; -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = WidgetDefinition.WidgetDefinitionDeserializer.class) @JsonSerialize(using = WidgetDefinition.WidgetDefinitionSerializer.class) public class WidgetDefinition extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(WidgetDefinition.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class WidgetDefinitionSerializer extends StdSerializer { - public WidgetDefinitionSerializer(Class t) { - super(t); - } - - public WidgetDefinitionSerializer() { - this(null); - } - - @Override - public void serialize(WidgetDefinition value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + private static final Logger log = Logger.getLogger(WidgetDefinition.class.getName()); - public static class WidgetDefinitionDeserializer extends StdDeserializer { - public WidgetDefinitionDeserializer() { - this(WidgetDefinition.class); - } - - public WidgetDefinitionDeserializer(Class vc) { - super(vc); - } + @JsonIgnore + public boolean unparsed = false; - @Override - public WidgetDefinition 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 AlertGraphWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (AlertGraphWidgetDefinition.class.equals(Integer.class) - || AlertGraphWidgetDefinition.class.equals(Long.class) - || AlertGraphWidgetDefinition.class.equals(Float.class) - || AlertGraphWidgetDefinition.class.equals(Double.class) - || AlertGraphWidgetDefinition.class.equals(Boolean.class) - || AlertGraphWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((AlertGraphWidgetDefinition.class.equals(Integer.class) - || AlertGraphWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((AlertGraphWidgetDefinition.class.equals(Float.class) - || AlertGraphWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (AlertGraphWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (AlertGraphWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public static class WidgetDefinitionSerializer extends StdSerializer { + public WidgetDefinitionSerializer(Class t) { + super(t); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(AlertGraphWidgetDefinition.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 (!((AlertGraphWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'AlertGraphWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'AlertGraphWidgetDefinition'", e); - } - // deserialize AlertValueWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (AlertValueWidgetDefinition.class.equals(Integer.class) - || AlertValueWidgetDefinition.class.equals(Long.class) - || AlertValueWidgetDefinition.class.equals(Float.class) - || AlertValueWidgetDefinition.class.equals(Double.class) - || AlertValueWidgetDefinition.class.equals(Boolean.class) - || AlertValueWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((AlertValueWidgetDefinition.class.equals(Integer.class) - || AlertValueWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((AlertValueWidgetDefinition.class.equals(Float.class) - || AlertValueWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (AlertValueWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (AlertValueWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(AlertValueWidgetDefinition.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 (!((AlertValueWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'AlertValueWidgetDefinition'"); + public WidgetDefinitionSerializer() { + this(null); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'AlertValueWidgetDefinition'", e); - } - // deserialize ChangeWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ChangeWidgetDefinition.class.equals(Integer.class) - || ChangeWidgetDefinition.class.equals(Long.class) - || ChangeWidgetDefinition.class.equals(Float.class) - || ChangeWidgetDefinition.class.equals(Double.class) - || ChangeWidgetDefinition.class.equals(Boolean.class) - || ChangeWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ChangeWidgetDefinition.class.equals(Integer.class) - || ChangeWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ChangeWidgetDefinition.class.equals(Float.class) - || ChangeWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ChangeWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ChangeWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ChangeWidgetDefinition.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 (!((ChangeWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ChangeWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ChangeWidgetDefinition'", e); - } - - // deserialize CheckStatusWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CheckStatusWidgetDefinition.class.equals(Integer.class) - || CheckStatusWidgetDefinition.class.equals(Long.class) - || CheckStatusWidgetDefinition.class.equals(Float.class) - || CheckStatusWidgetDefinition.class.equals(Double.class) - || CheckStatusWidgetDefinition.class.equals(Boolean.class) - || CheckStatusWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CheckStatusWidgetDefinition.class.equals(Integer.class) - || CheckStatusWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CheckStatusWidgetDefinition.class.equals(Float.class) - || CheckStatusWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (CheckStatusWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CheckStatusWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(CheckStatusWidgetDefinition.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 (!((CheckStatusWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'CheckStatusWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'CheckStatusWidgetDefinition'", e); - } - - // deserialize DistributionWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (DistributionWidgetDefinition.class.equals(Integer.class) - || DistributionWidgetDefinition.class.equals(Long.class) - || DistributionWidgetDefinition.class.equals(Float.class) - || DistributionWidgetDefinition.class.equals(Double.class) - || DistributionWidgetDefinition.class.equals(Boolean.class) - || DistributionWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((DistributionWidgetDefinition.class.equals(Integer.class) - || DistributionWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((DistributionWidgetDefinition.class.equals(Float.class) - || DistributionWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (DistributionWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (DistributionWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(DistributionWidgetDefinition.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 (!((DistributionWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'DistributionWidgetDefinition'"); + @Override + public void serialize(WidgetDefinition value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'DistributionWidgetDefinition'", e); - } - - // deserialize EventStreamWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (EventStreamWidgetDefinition.class.equals(Integer.class) - || EventStreamWidgetDefinition.class.equals(Long.class) - || EventStreamWidgetDefinition.class.equals(Float.class) - || EventStreamWidgetDefinition.class.equals(Double.class) - || EventStreamWidgetDefinition.class.equals(Boolean.class) - || EventStreamWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((EventStreamWidgetDefinition.class.equals(Integer.class) - || EventStreamWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((EventStreamWidgetDefinition.class.equals(Float.class) - || EventStreamWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (EventStreamWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (EventStreamWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(EventStreamWidgetDefinition.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 (!((EventStreamWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'EventStreamWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'EventStreamWidgetDefinition'", e); - } - - // deserialize EventTimelineWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (EventTimelineWidgetDefinition.class.equals(Integer.class) - || EventTimelineWidgetDefinition.class.equals(Long.class) - || EventTimelineWidgetDefinition.class.equals(Float.class) - || EventTimelineWidgetDefinition.class.equals(Double.class) - || EventTimelineWidgetDefinition.class.equals(Boolean.class) - || EventTimelineWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((EventTimelineWidgetDefinition.class.equals(Integer.class) - || EventTimelineWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((EventTimelineWidgetDefinition.class.equals(Float.class) - || EventTimelineWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (EventTimelineWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (EventTimelineWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(EventTimelineWidgetDefinition.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 (!((EventTimelineWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'EventTimelineWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'EventTimelineWidgetDefinition'", e); - } - - // deserialize FreeTextWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FreeTextWidgetDefinition.class.equals(Integer.class) - || FreeTextWidgetDefinition.class.equals(Long.class) - || FreeTextWidgetDefinition.class.equals(Float.class) - || FreeTextWidgetDefinition.class.equals(Double.class) - || FreeTextWidgetDefinition.class.equals(Boolean.class) - || FreeTextWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FreeTextWidgetDefinition.class.equals(Integer.class) - || FreeTextWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FreeTextWidgetDefinition.class.equals(Float.class) - || FreeTextWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FreeTextWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FreeTextWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(FreeTextWidgetDefinition.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 (!((FreeTextWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'FreeTextWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'FreeTextWidgetDefinition'", e); - } - - // deserialize GeomapWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (GeomapWidgetDefinition.class.equals(Integer.class) - || GeomapWidgetDefinition.class.equals(Long.class) - || GeomapWidgetDefinition.class.equals(Float.class) - || GeomapWidgetDefinition.class.equals(Double.class) - || GeomapWidgetDefinition.class.equals(Boolean.class) - || GeomapWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((GeomapWidgetDefinition.class.equals(Integer.class) - || GeomapWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((GeomapWidgetDefinition.class.equals(Float.class) - || GeomapWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (GeomapWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (GeomapWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(GeomapWidgetDefinition.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 (!((GeomapWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'GeomapWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'GeomapWidgetDefinition'", e); - } - - // deserialize GroupWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (GroupWidgetDefinition.class.equals(Integer.class) - || GroupWidgetDefinition.class.equals(Long.class) - || GroupWidgetDefinition.class.equals(Float.class) - || GroupWidgetDefinition.class.equals(Double.class) - || GroupWidgetDefinition.class.equals(Boolean.class) - || GroupWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((GroupWidgetDefinition.class.equals(Integer.class) - || GroupWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((GroupWidgetDefinition.class.equals(Float.class) - || GroupWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (GroupWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (GroupWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(GroupWidgetDefinition.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 (!((GroupWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'GroupWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'GroupWidgetDefinition'", e); - } + } - // deserialize HeatMapWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (HeatMapWidgetDefinition.class.equals(Integer.class) - || HeatMapWidgetDefinition.class.equals(Long.class) - || HeatMapWidgetDefinition.class.equals(Float.class) - || HeatMapWidgetDefinition.class.equals(Double.class) - || HeatMapWidgetDefinition.class.equals(Boolean.class) - || HeatMapWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((HeatMapWidgetDefinition.class.equals(Integer.class) - || HeatMapWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((HeatMapWidgetDefinition.class.equals(Float.class) - || HeatMapWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (HeatMapWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (HeatMapWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(HeatMapWidgetDefinition.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 (!((HeatMapWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'HeatMapWidgetDefinition'"); + public static class WidgetDefinitionDeserializer extends StdDeserializer { + public WidgetDefinitionDeserializer() { + this(WidgetDefinition.class); + } + + public WidgetDefinitionDeserializer(Class vc) { + super(vc); + } + + @Override + public WidgetDefinition 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 AlertGraphWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AlertGraphWidgetDefinition.class.equals(Integer.class) || AlertGraphWidgetDefinition.class.equals(Long.class) || AlertGraphWidgetDefinition.class.equals(Float.class) || AlertGraphWidgetDefinition.class.equals(Double.class) || AlertGraphWidgetDefinition.class.equals(Boolean.class) || AlertGraphWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AlertGraphWidgetDefinition.class.equals(Integer.class) || AlertGraphWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AlertGraphWidgetDefinition.class.equals(Float.class) || AlertGraphWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (AlertGraphWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AlertGraphWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(AlertGraphWidgetDefinition.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 (!((AlertGraphWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'AlertGraphWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AlertGraphWidgetDefinition'", e); + } + + // deserialize AlertValueWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AlertValueWidgetDefinition.class.equals(Integer.class) || AlertValueWidgetDefinition.class.equals(Long.class) || AlertValueWidgetDefinition.class.equals(Float.class) || AlertValueWidgetDefinition.class.equals(Double.class) || AlertValueWidgetDefinition.class.equals(Boolean.class) || AlertValueWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((AlertValueWidgetDefinition.class.equals(Integer.class) || AlertValueWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((AlertValueWidgetDefinition.class.equals(Float.class) || AlertValueWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (AlertValueWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (AlertValueWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(AlertValueWidgetDefinition.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 (!((AlertValueWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'AlertValueWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AlertValueWidgetDefinition'", e); + } + + // deserialize ChangeWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ChangeWidgetDefinition.class.equals(Integer.class) || ChangeWidgetDefinition.class.equals(Long.class) || ChangeWidgetDefinition.class.equals(Float.class) || ChangeWidgetDefinition.class.equals(Double.class) || ChangeWidgetDefinition.class.equals(Boolean.class) || ChangeWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ChangeWidgetDefinition.class.equals(Integer.class) || ChangeWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ChangeWidgetDefinition.class.equals(Float.class) || ChangeWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ChangeWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ChangeWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ChangeWidgetDefinition.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 (!((ChangeWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ChangeWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ChangeWidgetDefinition'", e); + } + + // deserialize CheckStatusWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CheckStatusWidgetDefinition.class.equals(Integer.class) || CheckStatusWidgetDefinition.class.equals(Long.class) || CheckStatusWidgetDefinition.class.equals(Float.class) || CheckStatusWidgetDefinition.class.equals(Double.class) || CheckStatusWidgetDefinition.class.equals(Boolean.class) || CheckStatusWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CheckStatusWidgetDefinition.class.equals(Integer.class) || CheckStatusWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CheckStatusWidgetDefinition.class.equals(Float.class) || CheckStatusWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (CheckStatusWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CheckStatusWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(CheckStatusWidgetDefinition.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 (!((CheckStatusWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'CheckStatusWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CheckStatusWidgetDefinition'", e); + } + + // deserialize DistributionWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DistributionWidgetDefinition.class.equals(Integer.class) || DistributionWidgetDefinition.class.equals(Long.class) || DistributionWidgetDefinition.class.equals(Float.class) || DistributionWidgetDefinition.class.equals(Double.class) || DistributionWidgetDefinition.class.equals(Boolean.class) || DistributionWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DistributionWidgetDefinition.class.equals(Integer.class) || DistributionWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DistributionWidgetDefinition.class.equals(Float.class) || DistributionWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (DistributionWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DistributionWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(DistributionWidgetDefinition.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 (!((DistributionWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'DistributionWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DistributionWidgetDefinition'", e); + } + + // deserialize EventStreamWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EventStreamWidgetDefinition.class.equals(Integer.class) || EventStreamWidgetDefinition.class.equals(Long.class) || EventStreamWidgetDefinition.class.equals(Float.class) || EventStreamWidgetDefinition.class.equals(Double.class) || EventStreamWidgetDefinition.class.equals(Boolean.class) || EventStreamWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EventStreamWidgetDefinition.class.equals(Integer.class) || EventStreamWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EventStreamWidgetDefinition.class.equals(Float.class) || EventStreamWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (EventStreamWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EventStreamWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(EventStreamWidgetDefinition.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 (!((EventStreamWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'EventStreamWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EventStreamWidgetDefinition'", e); + } + + // deserialize EventTimelineWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EventTimelineWidgetDefinition.class.equals(Integer.class) || EventTimelineWidgetDefinition.class.equals(Long.class) || EventTimelineWidgetDefinition.class.equals(Float.class) || EventTimelineWidgetDefinition.class.equals(Double.class) || EventTimelineWidgetDefinition.class.equals(Boolean.class) || EventTimelineWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EventTimelineWidgetDefinition.class.equals(Integer.class) || EventTimelineWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EventTimelineWidgetDefinition.class.equals(Float.class) || EventTimelineWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (EventTimelineWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EventTimelineWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(EventTimelineWidgetDefinition.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 (!((EventTimelineWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'EventTimelineWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EventTimelineWidgetDefinition'", e); + } + + // deserialize FreeTextWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FreeTextWidgetDefinition.class.equals(Integer.class) || FreeTextWidgetDefinition.class.equals(Long.class) || FreeTextWidgetDefinition.class.equals(Float.class) || FreeTextWidgetDefinition.class.equals(Double.class) || FreeTextWidgetDefinition.class.equals(Boolean.class) || FreeTextWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FreeTextWidgetDefinition.class.equals(Integer.class) || FreeTextWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FreeTextWidgetDefinition.class.equals(Float.class) || FreeTextWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FreeTextWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FreeTextWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FreeTextWidgetDefinition.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 (!((FreeTextWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FreeTextWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FreeTextWidgetDefinition'", e); + } + + // deserialize GeomapWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (GeomapWidgetDefinition.class.equals(Integer.class) || GeomapWidgetDefinition.class.equals(Long.class) || GeomapWidgetDefinition.class.equals(Float.class) || GeomapWidgetDefinition.class.equals(Double.class) || GeomapWidgetDefinition.class.equals(Boolean.class) || GeomapWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((GeomapWidgetDefinition.class.equals(Integer.class) || GeomapWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((GeomapWidgetDefinition.class.equals(Float.class) || GeomapWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (GeomapWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (GeomapWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(GeomapWidgetDefinition.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 (!((GeomapWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'GeomapWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'GeomapWidgetDefinition'", e); + } + + // deserialize GroupWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (GroupWidgetDefinition.class.equals(Integer.class) || GroupWidgetDefinition.class.equals(Long.class) || GroupWidgetDefinition.class.equals(Float.class) || GroupWidgetDefinition.class.equals(Double.class) || GroupWidgetDefinition.class.equals(Boolean.class) || GroupWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((GroupWidgetDefinition.class.equals(Integer.class) || GroupWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((GroupWidgetDefinition.class.equals(Float.class) || GroupWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (GroupWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (GroupWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(GroupWidgetDefinition.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 (!((GroupWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'GroupWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'GroupWidgetDefinition'", e); + } + + // deserialize HeatMapWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (HeatMapWidgetDefinition.class.equals(Integer.class) || HeatMapWidgetDefinition.class.equals(Long.class) || HeatMapWidgetDefinition.class.equals(Float.class) || HeatMapWidgetDefinition.class.equals(Double.class) || HeatMapWidgetDefinition.class.equals(Boolean.class) || HeatMapWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((HeatMapWidgetDefinition.class.equals(Integer.class) || HeatMapWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((HeatMapWidgetDefinition.class.equals(Float.class) || HeatMapWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (HeatMapWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (HeatMapWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(HeatMapWidgetDefinition.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 (!((HeatMapWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'HeatMapWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'HeatMapWidgetDefinition'", e); + } + + // deserialize HostMapWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (HostMapWidgetDefinition.class.equals(Integer.class) || HostMapWidgetDefinition.class.equals(Long.class) || HostMapWidgetDefinition.class.equals(Float.class) || HostMapWidgetDefinition.class.equals(Double.class) || HostMapWidgetDefinition.class.equals(Boolean.class) || HostMapWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((HostMapWidgetDefinition.class.equals(Integer.class) || HostMapWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((HostMapWidgetDefinition.class.equals(Float.class) || HostMapWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (HostMapWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (HostMapWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(HostMapWidgetDefinition.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 (!((HostMapWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'HostMapWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'HostMapWidgetDefinition'", e); + } + + // deserialize IFrameWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IFrameWidgetDefinition.class.equals(Integer.class) || IFrameWidgetDefinition.class.equals(Long.class) || IFrameWidgetDefinition.class.equals(Float.class) || IFrameWidgetDefinition.class.equals(Double.class) || IFrameWidgetDefinition.class.equals(Boolean.class) || IFrameWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IFrameWidgetDefinition.class.equals(Integer.class) || IFrameWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IFrameWidgetDefinition.class.equals(Float.class) || IFrameWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IFrameWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IFrameWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IFrameWidgetDefinition.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 (!((IFrameWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IFrameWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IFrameWidgetDefinition'", e); + } + + // deserialize ImageWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ImageWidgetDefinition.class.equals(Integer.class) || ImageWidgetDefinition.class.equals(Long.class) || ImageWidgetDefinition.class.equals(Float.class) || ImageWidgetDefinition.class.equals(Double.class) || ImageWidgetDefinition.class.equals(Boolean.class) || ImageWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ImageWidgetDefinition.class.equals(Integer.class) || ImageWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ImageWidgetDefinition.class.equals(Float.class) || ImageWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ImageWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ImageWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ImageWidgetDefinition.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 (!((ImageWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ImageWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ImageWidgetDefinition'", e); + } + + // deserialize LogStreamWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogStreamWidgetDefinition.class.equals(Integer.class) || LogStreamWidgetDefinition.class.equals(Long.class) || LogStreamWidgetDefinition.class.equals(Float.class) || LogStreamWidgetDefinition.class.equals(Double.class) || LogStreamWidgetDefinition.class.equals(Boolean.class) || LogStreamWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogStreamWidgetDefinition.class.equals(Integer.class) || LogStreamWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogStreamWidgetDefinition.class.equals(Float.class) || LogStreamWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogStreamWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogStreamWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogStreamWidgetDefinition.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 (!((LogStreamWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogStreamWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogStreamWidgetDefinition'", e); + } + + // deserialize MonitorSummaryWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MonitorSummaryWidgetDefinition.class.equals(Integer.class) || MonitorSummaryWidgetDefinition.class.equals(Long.class) || MonitorSummaryWidgetDefinition.class.equals(Float.class) || MonitorSummaryWidgetDefinition.class.equals(Double.class) || MonitorSummaryWidgetDefinition.class.equals(Boolean.class) || MonitorSummaryWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MonitorSummaryWidgetDefinition.class.equals(Integer.class) || MonitorSummaryWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MonitorSummaryWidgetDefinition.class.equals(Float.class) || MonitorSummaryWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MonitorSummaryWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MonitorSummaryWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MonitorSummaryWidgetDefinition.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 (!((MonitorSummaryWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MonitorSummaryWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MonitorSummaryWidgetDefinition'", e); + } + + // deserialize NoteWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NoteWidgetDefinition.class.equals(Integer.class) || NoteWidgetDefinition.class.equals(Long.class) || NoteWidgetDefinition.class.equals(Float.class) || NoteWidgetDefinition.class.equals(Double.class) || NoteWidgetDefinition.class.equals(Boolean.class) || NoteWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((NoteWidgetDefinition.class.equals(Integer.class) || NoteWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((NoteWidgetDefinition.class.equals(Float.class) || NoteWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (NoteWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (NoteWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NoteWidgetDefinition.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 (!((NoteWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NoteWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NoteWidgetDefinition'", e); + } + + // deserialize QueryValueWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QueryValueWidgetDefinition.class.equals(Integer.class) || QueryValueWidgetDefinition.class.equals(Long.class) || QueryValueWidgetDefinition.class.equals(Float.class) || QueryValueWidgetDefinition.class.equals(Double.class) || QueryValueWidgetDefinition.class.equals(Boolean.class) || QueryValueWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((QueryValueWidgetDefinition.class.equals(Integer.class) || QueryValueWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((QueryValueWidgetDefinition.class.equals(Float.class) || QueryValueWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (QueryValueWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (QueryValueWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(QueryValueWidgetDefinition.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 (!((QueryValueWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'QueryValueWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'QueryValueWidgetDefinition'", e); + } + + // deserialize RunWorkflowWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RunWorkflowWidgetDefinition.class.equals(Integer.class) || RunWorkflowWidgetDefinition.class.equals(Long.class) || RunWorkflowWidgetDefinition.class.equals(Float.class) || RunWorkflowWidgetDefinition.class.equals(Double.class) || RunWorkflowWidgetDefinition.class.equals(Boolean.class) || RunWorkflowWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RunWorkflowWidgetDefinition.class.equals(Integer.class) || RunWorkflowWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RunWorkflowWidgetDefinition.class.equals(Float.class) || RunWorkflowWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (RunWorkflowWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RunWorkflowWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(RunWorkflowWidgetDefinition.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 (!((RunWorkflowWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'RunWorkflowWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RunWorkflowWidgetDefinition'", e); + } + + // deserialize ScatterPlotWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ScatterPlotWidgetDefinition.class.equals(Integer.class) || ScatterPlotWidgetDefinition.class.equals(Long.class) || ScatterPlotWidgetDefinition.class.equals(Float.class) || ScatterPlotWidgetDefinition.class.equals(Double.class) || ScatterPlotWidgetDefinition.class.equals(Boolean.class) || ScatterPlotWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ScatterPlotWidgetDefinition.class.equals(Integer.class) || ScatterPlotWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ScatterPlotWidgetDefinition.class.equals(Float.class) || ScatterPlotWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ScatterPlotWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ScatterPlotWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ScatterPlotWidgetDefinition.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 (!((ScatterPlotWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ScatterPlotWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ScatterPlotWidgetDefinition'", e); + } + + // deserialize SLOWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SLOWidgetDefinition.class.equals(Integer.class) || SLOWidgetDefinition.class.equals(Long.class) || SLOWidgetDefinition.class.equals(Float.class) || SLOWidgetDefinition.class.equals(Double.class) || SLOWidgetDefinition.class.equals(Boolean.class) || SLOWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SLOWidgetDefinition.class.equals(Integer.class) || SLOWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SLOWidgetDefinition.class.equals(Float.class) || SLOWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SLOWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SLOWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SLOWidgetDefinition.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 (!((SLOWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SLOWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SLOWidgetDefinition'", e); + } + + // deserialize SLOListWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SLOListWidgetDefinition.class.equals(Integer.class) || SLOListWidgetDefinition.class.equals(Long.class) || SLOListWidgetDefinition.class.equals(Float.class) || SLOListWidgetDefinition.class.equals(Double.class) || SLOListWidgetDefinition.class.equals(Boolean.class) || SLOListWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SLOListWidgetDefinition.class.equals(Integer.class) || SLOListWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SLOListWidgetDefinition.class.equals(Float.class) || SLOListWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SLOListWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SLOListWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SLOListWidgetDefinition.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 (!((SLOListWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SLOListWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SLOListWidgetDefinition'", e); + } + + // deserialize ServiceMapWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceMapWidgetDefinition.class.equals(Integer.class) || ServiceMapWidgetDefinition.class.equals(Long.class) || ServiceMapWidgetDefinition.class.equals(Float.class) || ServiceMapWidgetDefinition.class.equals(Double.class) || ServiceMapWidgetDefinition.class.equals(Boolean.class) || ServiceMapWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceMapWidgetDefinition.class.equals(Integer.class) || ServiceMapWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceMapWidgetDefinition.class.equals(Float.class) || ServiceMapWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceMapWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceMapWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceMapWidgetDefinition.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 (!((ServiceMapWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceMapWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceMapWidgetDefinition'", e); + } + + // deserialize ServiceSummaryWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceSummaryWidgetDefinition.class.equals(Integer.class) || ServiceSummaryWidgetDefinition.class.equals(Long.class) || ServiceSummaryWidgetDefinition.class.equals(Float.class) || ServiceSummaryWidgetDefinition.class.equals(Double.class) || ServiceSummaryWidgetDefinition.class.equals(Boolean.class) || ServiceSummaryWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceSummaryWidgetDefinition.class.equals(Integer.class) || ServiceSummaryWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceSummaryWidgetDefinition.class.equals(Float.class) || ServiceSummaryWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceSummaryWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceSummaryWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceSummaryWidgetDefinition.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 (!((ServiceSummaryWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceSummaryWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceSummaryWidgetDefinition'", e); + } + + // deserialize SunburstWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SunburstWidgetDefinition.class.equals(Integer.class) || SunburstWidgetDefinition.class.equals(Long.class) || SunburstWidgetDefinition.class.equals(Float.class) || SunburstWidgetDefinition.class.equals(Double.class) || SunburstWidgetDefinition.class.equals(Boolean.class) || SunburstWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SunburstWidgetDefinition.class.equals(Integer.class) || SunburstWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SunburstWidgetDefinition.class.equals(Float.class) || SunburstWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SunburstWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SunburstWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SunburstWidgetDefinition.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 (!((SunburstWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SunburstWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SunburstWidgetDefinition'", e); + } + + // deserialize TableWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TableWidgetDefinition.class.equals(Integer.class) || TableWidgetDefinition.class.equals(Long.class) || TableWidgetDefinition.class.equals(Float.class) || TableWidgetDefinition.class.equals(Double.class) || TableWidgetDefinition.class.equals(Boolean.class) || TableWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TableWidgetDefinition.class.equals(Integer.class) || TableWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TableWidgetDefinition.class.equals(Float.class) || TableWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (TableWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TableWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(TableWidgetDefinition.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 (!((TableWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'TableWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TableWidgetDefinition'", e); + } + + // deserialize TimeseriesWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TimeseriesWidgetDefinition.class.equals(Integer.class) || TimeseriesWidgetDefinition.class.equals(Long.class) || TimeseriesWidgetDefinition.class.equals(Float.class) || TimeseriesWidgetDefinition.class.equals(Double.class) || TimeseriesWidgetDefinition.class.equals(Boolean.class) || TimeseriesWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TimeseriesWidgetDefinition.class.equals(Integer.class) || TimeseriesWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TimeseriesWidgetDefinition.class.equals(Float.class) || TimeseriesWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (TimeseriesWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TimeseriesWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(TimeseriesWidgetDefinition.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 (!((TimeseriesWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'TimeseriesWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TimeseriesWidgetDefinition'", e); + } + + // deserialize ToplistWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ToplistWidgetDefinition.class.equals(Integer.class) || ToplistWidgetDefinition.class.equals(Long.class) || ToplistWidgetDefinition.class.equals(Float.class) || ToplistWidgetDefinition.class.equals(Double.class) || ToplistWidgetDefinition.class.equals(Boolean.class) || ToplistWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ToplistWidgetDefinition.class.equals(Integer.class) || ToplistWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ToplistWidgetDefinition.class.equals(Float.class) || ToplistWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ToplistWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ToplistWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ToplistWidgetDefinition.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 (!((ToplistWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ToplistWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ToplistWidgetDefinition'", e); + } + + // deserialize TreeMapWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TreeMapWidgetDefinition.class.equals(Integer.class) || TreeMapWidgetDefinition.class.equals(Long.class) || TreeMapWidgetDefinition.class.equals(Float.class) || TreeMapWidgetDefinition.class.equals(Double.class) || TreeMapWidgetDefinition.class.equals(Boolean.class) || TreeMapWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TreeMapWidgetDefinition.class.equals(Integer.class) || TreeMapWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TreeMapWidgetDefinition.class.equals(Float.class) || TreeMapWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (TreeMapWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TreeMapWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(TreeMapWidgetDefinition.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 (!((TreeMapWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'TreeMapWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TreeMapWidgetDefinition'", e); + } + + // deserialize ListStreamWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ListStreamWidgetDefinition.class.equals(Integer.class) || ListStreamWidgetDefinition.class.equals(Long.class) || ListStreamWidgetDefinition.class.equals(Float.class) || ListStreamWidgetDefinition.class.equals(Double.class) || ListStreamWidgetDefinition.class.equals(Boolean.class) || ListStreamWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ListStreamWidgetDefinition.class.equals(Integer.class) || ListStreamWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ListStreamWidgetDefinition.class.equals(Float.class) || ListStreamWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ListStreamWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ListStreamWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ListStreamWidgetDefinition.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 (!((ListStreamWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ListStreamWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ListStreamWidgetDefinition'", e); + } + + // deserialize FunnelWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FunnelWidgetDefinition.class.equals(Integer.class) || FunnelWidgetDefinition.class.equals(Long.class) || FunnelWidgetDefinition.class.equals(Float.class) || FunnelWidgetDefinition.class.equals(Double.class) || FunnelWidgetDefinition.class.equals(Boolean.class) || FunnelWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FunnelWidgetDefinition.class.equals(Integer.class) || FunnelWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FunnelWidgetDefinition.class.equals(Float.class) || FunnelWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (FunnelWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FunnelWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FunnelWidgetDefinition.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 (!((FunnelWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FunnelWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FunnelWidgetDefinition'", e); + } + + // deserialize TopologyMapWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (TopologyMapWidgetDefinition.class.equals(Integer.class) || TopologyMapWidgetDefinition.class.equals(Long.class) || TopologyMapWidgetDefinition.class.equals(Float.class) || TopologyMapWidgetDefinition.class.equals(Double.class) || TopologyMapWidgetDefinition.class.equals(Boolean.class) || TopologyMapWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((TopologyMapWidgetDefinition.class.equals(Integer.class) || TopologyMapWidgetDefinition.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((TopologyMapWidgetDefinition.class.equals(Float.class) || TopologyMapWidgetDefinition.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (TopologyMapWidgetDefinition.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (TopologyMapWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(TopologyMapWidgetDefinition.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 (!((TopologyMapWidgetDefinition)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'TopologyMapWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'TopologyMapWidgetDefinition'", e); + } + + WidgetDefinition ret = new WidgetDefinition(); + 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 WidgetDefinition getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "WidgetDefinition cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'HeatMapWidgetDefinition'", e); - } + } - // deserialize HostMapWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (HostMapWidgetDefinition.class.equals(Integer.class) - || HostMapWidgetDefinition.class.equals(Long.class) - || HostMapWidgetDefinition.class.equals(Float.class) - || HostMapWidgetDefinition.class.equals(Double.class) - || HostMapWidgetDefinition.class.equals(Boolean.class) - || HostMapWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((HostMapWidgetDefinition.class.equals(Integer.class) - || HostMapWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((HostMapWidgetDefinition.class.equals(Float.class) - || HostMapWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (HostMapWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (HostMapWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(HostMapWidgetDefinition.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 (!((HostMapWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'HostMapWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'HostMapWidgetDefinition'", e); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - // deserialize IFrameWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IFrameWidgetDefinition.class.equals(Integer.class) - || IFrameWidgetDefinition.class.equals(Long.class) - || IFrameWidgetDefinition.class.equals(Float.class) - || IFrameWidgetDefinition.class.equals(Double.class) - || IFrameWidgetDefinition.class.equals(Boolean.class) - || IFrameWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IFrameWidgetDefinition.class.equals(Integer.class) - || IFrameWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IFrameWidgetDefinition.class.equals(Float.class) - || IFrameWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IFrameWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IFrameWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(IFrameWidgetDefinition.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 (!((IFrameWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'IFrameWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'IFrameWidgetDefinition'", e); - } + public WidgetDefinition() { + super("oneOf", Boolean.FALSE); + } + public WidgetDefinition(AlertGraphWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(AlertValueWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ChangeWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(CheckStatusWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(DistributionWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(EventStreamWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(EventTimelineWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(FreeTextWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(GeomapWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(GroupWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(HeatMapWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(HostMapWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(IFrameWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ImageWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(LogStreamWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(MonitorSummaryWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(NoteWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(QueryValueWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(RunWorkflowWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ScatterPlotWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(SLOWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(SLOListWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ServiceMapWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ServiceSummaryWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(SunburstWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(TableWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(TimeseriesWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ToplistWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(TreeMapWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ListStreamWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(FunnelWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(TopologyMapWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - // deserialize ImageWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ImageWidgetDefinition.class.equals(Integer.class) - || ImageWidgetDefinition.class.equals(Long.class) - || ImageWidgetDefinition.class.equals(Float.class) - || ImageWidgetDefinition.class.equals(Double.class) - || ImageWidgetDefinition.class.equals(Boolean.class) - || ImageWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ImageWidgetDefinition.class.equals(Integer.class) - || ImageWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ImageWidgetDefinition.class.equals(Float.class) - || ImageWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ImageWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ImageWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ImageWidgetDefinition.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 (!((ImageWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ImageWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ImageWidgetDefinition'", e); - } + static { + schemas.put("AlertGraphWidgetDefinition", new GenericType() { + }); + schemas.put("AlertValueWidgetDefinition", new GenericType() { + }); + schemas.put("ChangeWidgetDefinition", new GenericType() { + }); + schemas.put("CheckStatusWidgetDefinition", new GenericType() { + }); + schemas.put("DistributionWidgetDefinition", new GenericType() { + }); + schemas.put("EventStreamWidgetDefinition", new GenericType() { + }); + schemas.put("EventTimelineWidgetDefinition", new GenericType() { + }); + schemas.put("FreeTextWidgetDefinition", new GenericType() { + }); + schemas.put("GeomapWidgetDefinition", new GenericType() { + }); + schemas.put("GroupWidgetDefinition", new GenericType() { + }); + schemas.put("HeatMapWidgetDefinition", new GenericType() { + }); + schemas.put("HostMapWidgetDefinition", new GenericType() { + }); + schemas.put("IFrameWidgetDefinition", new GenericType() { + }); + schemas.put("ImageWidgetDefinition", new GenericType() { + }); + schemas.put("LogStreamWidgetDefinition", new GenericType() { + }); + schemas.put("MonitorSummaryWidgetDefinition", new GenericType() { + }); + schemas.put("NoteWidgetDefinition", new GenericType() { + }); + schemas.put("QueryValueWidgetDefinition", new GenericType() { + }); + schemas.put("RunWorkflowWidgetDefinition", new GenericType() { + }); + schemas.put("ScatterPlotWidgetDefinition", new GenericType() { + }); + schemas.put("SLOWidgetDefinition", new GenericType() { + }); + schemas.put("SLOListWidgetDefinition", new GenericType() { + }); + schemas.put("ServiceMapWidgetDefinition", new GenericType() { + }); + schemas.put("ServiceSummaryWidgetDefinition", new GenericType() { + }); + schemas.put("SunburstWidgetDefinition", new GenericType() { + }); + schemas.put("TableWidgetDefinition", new GenericType() { + }); + schemas.put("TimeseriesWidgetDefinition", new GenericType() { + }); + schemas.put("ToplistWidgetDefinition", new GenericType() { + }); + schemas.put("TreeMapWidgetDefinition", new GenericType() { + }); + schemas.put("ListStreamWidgetDefinition", new GenericType() { + }); + schemas.put("FunnelWidgetDefinition", new GenericType() { + }); + schemas.put("TopologyMapWidgetDefinition", new GenericType() { + }); + JSON.registerDescendants(WidgetDefinition.class, Collections.unmodifiableMap(schemas)); + } - // deserialize LogStreamWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogStreamWidgetDefinition.class.equals(Integer.class) - || LogStreamWidgetDefinition.class.equals(Long.class) - || LogStreamWidgetDefinition.class.equals(Float.class) - || LogStreamWidgetDefinition.class.equals(Double.class) - || LogStreamWidgetDefinition.class.equals(Boolean.class) - || LogStreamWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogStreamWidgetDefinition.class.equals(Integer.class) - || LogStreamWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogStreamWidgetDefinition.class.equals(Float.class) - || LogStreamWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogStreamWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogStreamWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogStreamWidgetDefinition.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 (!((LogStreamWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogStreamWidgetDefinition'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogStreamWidgetDefinition'", e); - } + @Override + public Map getSchemas() { + return WidgetDefinition.schemas; + } - // deserialize MonitorSummaryWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MonitorSummaryWidgetDefinition.class.equals(Integer.class) - || MonitorSummaryWidgetDefinition.class.equals(Long.class) - || MonitorSummaryWidgetDefinition.class.equals(Float.class) - || MonitorSummaryWidgetDefinition.class.equals(Double.class) - || MonitorSummaryWidgetDefinition.class.equals(Boolean.class) - || MonitorSummaryWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MonitorSummaryWidgetDefinition.class.equals(Integer.class) - || MonitorSummaryWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MonitorSummaryWidgetDefinition.class.equals(Float.class) - || MonitorSummaryWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MonitorSummaryWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MonitorSummaryWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * AlertGraphWidgetDefinition, AlertValueWidgetDefinition, ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, EventStreamWidgetDefinition, EventTimelineWidgetDefinition, FreeTextWidgetDefinition, GeomapWidgetDefinition, GroupWidgetDefinition, HeatMapWidgetDefinition, HostMapWidgetDefinition, IFrameWidgetDefinition, ImageWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, ScatterPlotWidgetDefinition, SLOWidgetDefinition, SLOListWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, TreeMapWidgetDefinition, ListStreamWidgetDefinition, FunnelWidgetDefinition, TopologyMapWidgetDefinition + * + * 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(AlertGraphWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MonitorSummaryWidgetDefinition.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 (!((MonitorSummaryWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MonitorSummaryWidgetDefinition'"); + if (JSON.isInstanceOf(AlertValueWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'MonitorSummaryWidgetDefinition'", e); - } - - // deserialize NoteWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (NoteWidgetDefinition.class.equals(Integer.class) - || NoteWidgetDefinition.class.equals(Long.class) - || NoteWidgetDefinition.class.equals(Float.class) - || NoteWidgetDefinition.class.equals(Double.class) - || NoteWidgetDefinition.class.equals(Boolean.class) - || NoteWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((NoteWidgetDefinition.class.equals(Integer.class) - || NoteWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((NoteWidgetDefinition.class.equals(Float.class) - || NoteWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (NoteWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (NoteWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(ChangeWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(NoteWidgetDefinition.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 (!((NoteWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'NoteWidgetDefinition'"); + if (JSON.isInstanceOf(CheckStatusWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'NoteWidgetDefinition'", e); - } - - // deserialize QueryValueWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (QueryValueWidgetDefinition.class.equals(Integer.class) - || QueryValueWidgetDefinition.class.equals(Long.class) - || QueryValueWidgetDefinition.class.equals(Float.class) - || QueryValueWidgetDefinition.class.equals(Double.class) - || QueryValueWidgetDefinition.class.equals(Boolean.class) - || QueryValueWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((QueryValueWidgetDefinition.class.equals(Integer.class) - || QueryValueWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((QueryValueWidgetDefinition.class.equals(Float.class) - || QueryValueWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (QueryValueWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (QueryValueWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(DistributionWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(QueryValueWidgetDefinition.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 (!((QueryValueWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'QueryValueWidgetDefinition'"); + if (JSON.isInstanceOf(EventStreamWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'QueryValueWidgetDefinition'", e); - } - - // deserialize RunWorkflowWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (RunWorkflowWidgetDefinition.class.equals(Integer.class) - || RunWorkflowWidgetDefinition.class.equals(Long.class) - || RunWorkflowWidgetDefinition.class.equals(Float.class) - || RunWorkflowWidgetDefinition.class.equals(Double.class) - || RunWorkflowWidgetDefinition.class.equals(Boolean.class) - || RunWorkflowWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((RunWorkflowWidgetDefinition.class.equals(Integer.class) - || RunWorkflowWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((RunWorkflowWidgetDefinition.class.equals(Float.class) - || RunWorkflowWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (RunWorkflowWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (RunWorkflowWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(EventTimelineWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(RunWorkflowWidgetDefinition.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 (!((RunWorkflowWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'RunWorkflowWidgetDefinition'"); + if (JSON.isInstanceOf(FreeTextWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'RunWorkflowWidgetDefinition'", e); - } - - // deserialize ScatterPlotWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ScatterPlotWidgetDefinition.class.equals(Integer.class) - || ScatterPlotWidgetDefinition.class.equals(Long.class) - || ScatterPlotWidgetDefinition.class.equals(Float.class) - || ScatterPlotWidgetDefinition.class.equals(Double.class) - || ScatterPlotWidgetDefinition.class.equals(Boolean.class) - || ScatterPlotWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ScatterPlotWidgetDefinition.class.equals(Integer.class) - || ScatterPlotWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ScatterPlotWidgetDefinition.class.equals(Float.class) - || ScatterPlotWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ScatterPlotWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ScatterPlotWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(GeomapWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ScatterPlotWidgetDefinition.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 (!((ScatterPlotWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ScatterPlotWidgetDefinition'"); + if (JSON.isInstanceOf(GroupWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ScatterPlotWidgetDefinition'", e); - } - - // deserialize SLOWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SLOWidgetDefinition.class.equals(Integer.class) - || SLOWidgetDefinition.class.equals(Long.class) - || SLOWidgetDefinition.class.equals(Float.class) - || SLOWidgetDefinition.class.equals(Double.class) - || SLOWidgetDefinition.class.equals(Boolean.class) - || SLOWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SLOWidgetDefinition.class.equals(Integer.class) - || SLOWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SLOWidgetDefinition.class.equals(Float.class) - || SLOWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SLOWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SLOWidgetDefinition.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(HeatMapWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SLOWidgetDefinition.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 (!((SLOWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SLOWidgetDefinition'"); + if (JSON.isInstanceOf(HostMapWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SLOWidgetDefinition'", e); - } - - // deserialize SLOListWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SLOListWidgetDefinition.class.equals(Integer.class) - || SLOListWidgetDefinition.class.equals(Long.class) - || SLOListWidgetDefinition.class.equals(Float.class) - || SLOListWidgetDefinition.class.equals(Double.class) - || SLOListWidgetDefinition.class.equals(Boolean.class) - || SLOListWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SLOListWidgetDefinition.class.equals(Integer.class) - || SLOListWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SLOListWidgetDefinition.class.equals(Float.class) - || SLOListWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SLOListWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SLOListWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(IFrameWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SLOListWidgetDefinition.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 (!((SLOListWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SLOListWidgetDefinition'"); + if (JSON.isInstanceOf(ImageWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SLOListWidgetDefinition'", e); - } - - // deserialize ServiceMapWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceMapWidgetDefinition.class.equals(Integer.class) - || ServiceMapWidgetDefinition.class.equals(Long.class) - || ServiceMapWidgetDefinition.class.equals(Float.class) - || ServiceMapWidgetDefinition.class.equals(Double.class) - || ServiceMapWidgetDefinition.class.equals(Boolean.class) - || ServiceMapWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceMapWidgetDefinition.class.equals(Integer.class) - || ServiceMapWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceMapWidgetDefinition.class.equals(Float.class) - || ServiceMapWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceMapWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceMapWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogStreamWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceMapWidgetDefinition.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 (!((ServiceMapWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceMapWidgetDefinition'"); + if (JSON.isInstanceOf(MonitorSummaryWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ServiceMapWidgetDefinition'", e); - } - - // deserialize ServiceSummaryWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceSummaryWidgetDefinition.class.equals(Integer.class) - || ServiceSummaryWidgetDefinition.class.equals(Long.class) - || ServiceSummaryWidgetDefinition.class.equals(Float.class) - || ServiceSummaryWidgetDefinition.class.equals(Double.class) - || ServiceSummaryWidgetDefinition.class.equals(Boolean.class) - || ServiceSummaryWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceSummaryWidgetDefinition.class.equals(Integer.class) - || ServiceSummaryWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceSummaryWidgetDefinition.class.equals(Float.class) - || ServiceSummaryWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceSummaryWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceSummaryWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(NoteWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceSummaryWidgetDefinition.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 (!((ServiceSummaryWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceSummaryWidgetDefinition'"); + if (JSON.isInstanceOf(QueryValueWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'ServiceSummaryWidgetDefinition'", e); - } - - // deserialize SunburstWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SunburstWidgetDefinition.class.equals(Integer.class) - || SunburstWidgetDefinition.class.equals(Long.class) - || SunburstWidgetDefinition.class.equals(Float.class) - || SunburstWidgetDefinition.class.equals(Double.class) - || SunburstWidgetDefinition.class.equals(Boolean.class) - || SunburstWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SunburstWidgetDefinition.class.equals(Integer.class) - || SunburstWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SunburstWidgetDefinition.class.equals(Float.class) - || SunburstWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SunburstWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SunburstWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(RunWorkflowWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SunburstWidgetDefinition.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 (!((SunburstWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SunburstWidgetDefinition'"); + if (JSON.isInstanceOf(ScatterPlotWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SunburstWidgetDefinition'", e); - } - - // deserialize TableWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (TableWidgetDefinition.class.equals(Integer.class) - || TableWidgetDefinition.class.equals(Long.class) - || TableWidgetDefinition.class.equals(Float.class) - || TableWidgetDefinition.class.equals(Double.class) - || TableWidgetDefinition.class.equals(Boolean.class) - || TableWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((TableWidgetDefinition.class.equals(Integer.class) - || TableWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((TableWidgetDefinition.class.equals(Float.class) - || TableWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (TableWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (TableWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(SLOWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(TableWidgetDefinition.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 (!((TableWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'TableWidgetDefinition'"); + if (JSON.isInstanceOf(SLOListWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'TableWidgetDefinition'", e); - } - - // deserialize TimeseriesWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (TimeseriesWidgetDefinition.class.equals(Integer.class) - || TimeseriesWidgetDefinition.class.equals(Long.class) - || TimeseriesWidgetDefinition.class.equals(Float.class) - || TimeseriesWidgetDefinition.class.equals(Double.class) - || TimeseriesWidgetDefinition.class.equals(Boolean.class) - || TimeseriesWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((TimeseriesWidgetDefinition.class.equals(Integer.class) - || TimeseriesWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((TimeseriesWidgetDefinition.class.equals(Float.class) - || TimeseriesWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (TimeseriesWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (TimeseriesWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(ServiceMapWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(TimeseriesWidgetDefinition.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 (!((TimeseriesWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'TimeseriesWidgetDefinition'"); + if (JSON.isInstanceOf(ServiceSummaryWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'TimeseriesWidgetDefinition'", e); - } - - // deserialize ToplistWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ToplistWidgetDefinition.class.equals(Integer.class) - || ToplistWidgetDefinition.class.equals(Long.class) - || ToplistWidgetDefinition.class.equals(Float.class) - || ToplistWidgetDefinition.class.equals(Double.class) - || ToplistWidgetDefinition.class.equals(Boolean.class) - || ToplistWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ToplistWidgetDefinition.class.equals(Integer.class) - || ToplistWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ToplistWidgetDefinition.class.equals(Float.class) - || ToplistWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ToplistWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ToplistWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(SunburstWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ToplistWidgetDefinition.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 (!((ToplistWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ToplistWidgetDefinition'"); + if (JSON.isInstanceOf(TableWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ToplistWidgetDefinition'", e); - } - - // deserialize TreeMapWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (TreeMapWidgetDefinition.class.equals(Integer.class) - || TreeMapWidgetDefinition.class.equals(Long.class) - || TreeMapWidgetDefinition.class.equals(Float.class) - || TreeMapWidgetDefinition.class.equals(Double.class) - || TreeMapWidgetDefinition.class.equals(Boolean.class) - || TreeMapWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((TreeMapWidgetDefinition.class.equals(Integer.class) - || TreeMapWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((TreeMapWidgetDefinition.class.equals(Float.class) - || TreeMapWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (TreeMapWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (TreeMapWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(TimeseriesWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(TreeMapWidgetDefinition.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 (!((TreeMapWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'TreeMapWidgetDefinition'"); + if (JSON.isInstanceOf(ToplistWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'TreeMapWidgetDefinition'", e); - } - - // deserialize ListStreamWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ListStreamWidgetDefinition.class.equals(Integer.class) - || ListStreamWidgetDefinition.class.equals(Long.class) - || ListStreamWidgetDefinition.class.equals(Float.class) - || ListStreamWidgetDefinition.class.equals(Double.class) - || ListStreamWidgetDefinition.class.equals(Boolean.class) - || ListStreamWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ListStreamWidgetDefinition.class.equals(Integer.class) - || ListStreamWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ListStreamWidgetDefinition.class.equals(Float.class) - || ListStreamWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ListStreamWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ListStreamWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(TreeMapWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ListStreamWidgetDefinition.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 (!((ListStreamWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ListStreamWidgetDefinition'"); + if (JSON.isInstanceOf(ListStreamWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ListStreamWidgetDefinition'", e); - } - - // deserialize FunnelWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (FunnelWidgetDefinition.class.equals(Integer.class) - || FunnelWidgetDefinition.class.equals(Long.class) - || FunnelWidgetDefinition.class.equals(Float.class) - || FunnelWidgetDefinition.class.equals(Double.class) - || FunnelWidgetDefinition.class.equals(Boolean.class) - || FunnelWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((FunnelWidgetDefinition.class.equals(Integer.class) - || FunnelWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((FunnelWidgetDefinition.class.equals(Float.class) - || FunnelWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (FunnelWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (FunnelWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(FunnelWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(FunnelWidgetDefinition.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 (!((FunnelWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'FunnelWidgetDefinition'"); + if (JSON.isInstanceOf(TopologyMapWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'FunnelWidgetDefinition'", e); - } - // deserialize TopologyMapWidgetDefinition - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (TopologyMapWidgetDefinition.class.equals(Integer.class) - || TopologyMapWidgetDefinition.class.equals(Long.class) - || TopologyMapWidgetDefinition.class.equals(Float.class) - || TopologyMapWidgetDefinition.class.equals(Double.class) - || TopologyMapWidgetDefinition.class.equals(Boolean.class) - || TopologyMapWidgetDefinition.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((TopologyMapWidgetDefinition.class.equals(Integer.class) - || TopologyMapWidgetDefinition.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((TopologyMapWidgetDefinition.class.equals(Float.class) - || TopologyMapWidgetDefinition.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (TopologyMapWidgetDefinition.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (TopologyMapWidgetDefinition.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(TopologyMapWidgetDefinition.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 (!((TopologyMapWidgetDefinition) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'TopologyMapWidgetDefinition'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'TopologyMapWidgetDefinition'", e); - } - - WidgetDefinition ret = new WidgetDefinition(); - 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; + throw new RuntimeException("Invalid instance type. Must be AlertGraphWidgetDefinition, AlertValueWidgetDefinition, ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, EventStreamWidgetDefinition, EventTimelineWidgetDefinition, FreeTextWidgetDefinition, GeomapWidgetDefinition, GroupWidgetDefinition, HeatMapWidgetDefinition, HostMapWidgetDefinition, IFrameWidgetDefinition, ImageWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, ScatterPlotWidgetDefinition, SLOWidgetDefinition, SLOListWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, TreeMapWidgetDefinition, ListStreamWidgetDefinition, FunnelWidgetDefinition, TopologyMapWidgetDefinition"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * AlertGraphWidgetDefinition, AlertValueWidgetDefinition, ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, EventStreamWidgetDefinition, EventTimelineWidgetDefinition, FreeTextWidgetDefinition, GeomapWidgetDefinition, GroupWidgetDefinition, HeatMapWidgetDefinition, HostMapWidgetDefinition, IFrameWidgetDefinition, ImageWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, ScatterPlotWidgetDefinition, SLOWidgetDefinition, SLOListWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, TreeMapWidgetDefinition, ListStreamWidgetDefinition, FunnelWidgetDefinition, TopologyMapWidgetDefinition + * + * @return The actual instance (AlertGraphWidgetDefinition, AlertValueWidgetDefinition, ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, EventStreamWidgetDefinition, EventTimelineWidgetDefinition, FreeTextWidgetDefinition, GeomapWidgetDefinition, GroupWidgetDefinition, HeatMapWidgetDefinition, HostMapWidgetDefinition, IFrameWidgetDefinition, ImageWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, ScatterPlotWidgetDefinition, SLOWidgetDefinition, SLOListWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, TreeMapWidgetDefinition, ListStreamWidgetDefinition, FunnelWidgetDefinition, TopologyMapWidgetDefinition) + */ @Override - public WidgetDefinition getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "WidgetDefinition cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public WidgetDefinition() { - super("oneOf", Boolean.FALSE); - } - - public WidgetDefinition(AlertGraphWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(AlertValueWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(ChangeWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(CheckStatusWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(DistributionWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(EventStreamWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(EventTimelineWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(FreeTextWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(GeomapWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(GroupWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(HeatMapWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(HostMapWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(IFrameWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(ImageWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(LogStreamWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(MonitorSummaryWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(NoteWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(QueryValueWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(RunWorkflowWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(ScatterPlotWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(SLOWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(SLOListWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(ServiceMapWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public WidgetDefinition(ServiceSummaryWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(SunburstWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(TableWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(TimeseriesWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(ToplistWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(TreeMapWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(ListStreamWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(FunnelWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public WidgetDefinition(TopologyMapWidgetDefinition o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("AlertGraphWidgetDefinition", new GenericType() {}); - schemas.put("AlertValueWidgetDefinition", new GenericType() {}); - schemas.put("ChangeWidgetDefinition", new GenericType() {}); - schemas.put("CheckStatusWidgetDefinition", new GenericType() {}); - schemas.put("DistributionWidgetDefinition", new GenericType() {}); - schemas.put("EventStreamWidgetDefinition", new GenericType() {}); - schemas.put( - "EventTimelineWidgetDefinition", new GenericType() {}); - schemas.put("FreeTextWidgetDefinition", new GenericType() {}); - schemas.put("GeomapWidgetDefinition", new GenericType() {}); - schemas.put("GroupWidgetDefinition", new GenericType() {}); - schemas.put("HeatMapWidgetDefinition", new GenericType() {}); - schemas.put("HostMapWidgetDefinition", new GenericType() {}); - schemas.put("IFrameWidgetDefinition", new GenericType() {}); - schemas.put("ImageWidgetDefinition", new GenericType() {}); - schemas.put("LogStreamWidgetDefinition", new GenericType() {}); - schemas.put( - "MonitorSummaryWidgetDefinition", new GenericType() {}); - schemas.put("NoteWidgetDefinition", new GenericType() {}); - schemas.put("QueryValueWidgetDefinition", new GenericType() {}); - schemas.put("RunWorkflowWidgetDefinition", new GenericType() {}); - schemas.put("ScatterPlotWidgetDefinition", new GenericType() {}); - schemas.put("SLOWidgetDefinition", new GenericType() {}); - schemas.put("SLOListWidgetDefinition", new GenericType() {}); - schemas.put("ServiceMapWidgetDefinition", new GenericType() {}); - schemas.put( - "ServiceSummaryWidgetDefinition", new GenericType() {}); - schemas.put("SunburstWidgetDefinition", new GenericType() {}); - schemas.put("TableWidgetDefinition", new GenericType() {}); - schemas.put("TimeseriesWidgetDefinition", new GenericType() {}); - schemas.put("ToplistWidgetDefinition", new GenericType() {}); - schemas.put("TreeMapWidgetDefinition", new GenericType() {}); - schemas.put("ListStreamWidgetDefinition", new GenericType() {}); - schemas.put("FunnelWidgetDefinition", new GenericType() {}); - schemas.put("TopologyMapWidgetDefinition", new GenericType() {}); - JSON.registerDescendants(WidgetDefinition.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return WidgetDefinition.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: AlertGraphWidgetDefinition, AlertValueWidgetDefinition, - * ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, - * EventStreamWidgetDefinition, EventTimelineWidgetDefinition, FreeTextWidgetDefinition, - * GeomapWidgetDefinition, GroupWidgetDefinition, HeatMapWidgetDefinition, - * HostMapWidgetDefinition, IFrameWidgetDefinition, ImageWidgetDefinition, - * LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, - * QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, ScatterPlotWidgetDefinition, - * SLOWidgetDefinition, SLOListWidgetDefinition, ServiceMapWidgetDefinition, - * ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, - * TimeseriesWidgetDefinition, ToplistWidgetDefinition, TreeMapWidgetDefinition, - * ListStreamWidgetDefinition, FunnelWidgetDefinition, TopologyMapWidgetDefinition - * - *

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(AlertGraphWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(AlertValueWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ChangeWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(CheckStatusWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(DistributionWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(EventStreamWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(EventTimelineWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(FreeTextWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(GeomapWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(GroupWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(HeatMapWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(HostMapWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(IFrameWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ImageWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogStreamWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - MonitorSummaryWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(NoteWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(QueryValueWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(RunWorkflowWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ScatterPlotWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SLOWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SLOListWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ServiceMapWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - ServiceSummaryWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(SunburstWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(TableWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(TimeseriesWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `AlertGraphWidgetDefinition`. If the actual instance is not `AlertGraphWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AlertGraphWidgetDefinition` + * @throws ClassCastException if the instance is not `AlertGraphWidgetDefinition` + */ + public AlertGraphWidgetDefinition getAlertGraphWidgetDefinition() throws ClassCastException { + return (AlertGraphWidgetDefinition)super.getActualInstance(); } - if (JSON.isInstanceOf(ToplistWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(TreeMapWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ListStreamWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(FunnelWidgetDefinition.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(TopologyMapWidgetDefinition.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 AlertGraphWidgetDefinition, AlertValueWidgetDefinition," - + " ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition," - + " EventStreamWidgetDefinition, EventTimelineWidgetDefinition," - + " FreeTextWidgetDefinition, GeomapWidgetDefinition, GroupWidgetDefinition," - + " HeatMapWidgetDefinition, HostMapWidgetDefinition, IFrameWidgetDefinition," - + " ImageWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition," - + " NoteWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition," - + " ScatterPlotWidgetDefinition, SLOWidgetDefinition, SLOListWidgetDefinition," - + " ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition," - + " SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition," - + " ToplistWidgetDefinition, TreeMapWidgetDefinition, ListStreamWidgetDefinition," - + " FunnelWidgetDefinition, TopologyMapWidgetDefinition"); - } - - /** - * Get the actual instance, which can be the following: AlertGraphWidgetDefinition, - * AlertValueWidgetDefinition, ChangeWidgetDefinition, CheckStatusWidgetDefinition, - * DistributionWidgetDefinition, EventStreamWidgetDefinition, EventTimelineWidgetDefinition, - * FreeTextWidgetDefinition, GeomapWidgetDefinition, GroupWidgetDefinition, - * HeatMapWidgetDefinition, HostMapWidgetDefinition, IFrameWidgetDefinition, - * ImageWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, - * NoteWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, - * ScatterPlotWidgetDefinition, SLOWidgetDefinition, SLOListWidgetDefinition, - * ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, - * TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, - * TreeMapWidgetDefinition, ListStreamWidgetDefinition, FunnelWidgetDefinition, - * TopologyMapWidgetDefinition - * - * @return The actual instance (AlertGraphWidgetDefinition, AlertValueWidgetDefinition, - * ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, - * EventStreamWidgetDefinition, EventTimelineWidgetDefinition, FreeTextWidgetDefinition, - * GeomapWidgetDefinition, GroupWidgetDefinition, HeatMapWidgetDefinition, - * HostMapWidgetDefinition, IFrameWidgetDefinition, ImageWidgetDefinition, - * LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, - * QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, ScatterPlotWidgetDefinition, - * SLOWidgetDefinition, SLOListWidgetDefinition, ServiceMapWidgetDefinition, - * ServiceSummaryWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, - * TimeseriesWidgetDefinition, ToplistWidgetDefinition, TreeMapWidgetDefinition, - * ListStreamWidgetDefinition, FunnelWidgetDefinition, TopologyMapWidgetDefinition) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - /** - * Get the actual instance of `AlertGraphWidgetDefinition`. If the actual instance is not - * `AlertGraphWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `AlertGraphWidgetDefinition` - * @throws ClassCastException if the instance is not `AlertGraphWidgetDefinition` - */ - public AlertGraphWidgetDefinition getAlertGraphWidgetDefinition() throws ClassCastException { - return (AlertGraphWidgetDefinition) super.getActualInstance(); - } - - /** - * Get the actual instance of `AlertValueWidgetDefinition`. If the actual instance is not - * `AlertValueWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `AlertValueWidgetDefinition` - * @throws ClassCastException if the instance is not `AlertValueWidgetDefinition` - */ - public AlertValueWidgetDefinition getAlertValueWidgetDefinition() throws ClassCastException { - return (AlertValueWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `AlertValueWidgetDefinition`. If the actual instance is not `AlertValueWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AlertValueWidgetDefinition` + * @throws ClassCastException if the instance is not `AlertValueWidgetDefinition` + */ + public AlertValueWidgetDefinition getAlertValueWidgetDefinition() throws ClassCastException { + return (AlertValueWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ChangeWidgetDefinition`. If the actual instance is not - * `ChangeWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ChangeWidgetDefinition` - * @throws ClassCastException if the instance is not `ChangeWidgetDefinition` - */ - public ChangeWidgetDefinition getChangeWidgetDefinition() throws ClassCastException { - return (ChangeWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ChangeWidgetDefinition`. If the actual instance is not `ChangeWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ChangeWidgetDefinition` + * @throws ClassCastException if the instance is not `ChangeWidgetDefinition` + */ + public ChangeWidgetDefinition getChangeWidgetDefinition() throws ClassCastException { + return (ChangeWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `CheckStatusWidgetDefinition`. If the actual instance is not - * `CheckStatusWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `CheckStatusWidgetDefinition` - * @throws ClassCastException if the instance is not `CheckStatusWidgetDefinition` - */ - public CheckStatusWidgetDefinition getCheckStatusWidgetDefinition() throws ClassCastException { - return (CheckStatusWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `CheckStatusWidgetDefinition`. If the actual instance is not `CheckStatusWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CheckStatusWidgetDefinition` + * @throws ClassCastException if the instance is not `CheckStatusWidgetDefinition` + */ + public CheckStatusWidgetDefinition getCheckStatusWidgetDefinition() throws ClassCastException { + return (CheckStatusWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `DistributionWidgetDefinition`. If the actual instance is not - * `DistributionWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `DistributionWidgetDefinition` - * @throws ClassCastException if the instance is not `DistributionWidgetDefinition` - */ - public DistributionWidgetDefinition getDistributionWidgetDefinition() throws ClassCastException { - return (DistributionWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `DistributionWidgetDefinition`. If the actual instance is not `DistributionWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DistributionWidgetDefinition` + * @throws ClassCastException if the instance is not `DistributionWidgetDefinition` + */ + public DistributionWidgetDefinition getDistributionWidgetDefinition() throws ClassCastException { + return (DistributionWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `EventStreamWidgetDefinition`. If the actual instance is not - * `EventStreamWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `EventStreamWidgetDefinition` - * @throws ClassCastException if the instance is not `EventStreamWidgetDefinition` - */ - public EventStreamWidgetDefinition getEventStreamWidgetDefinition() throws ClassCastException { - return (EventStreamWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `EventStreamWidgetDefinition`. If the actual instance is not `EventStreamWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EventStreamWidgetDefinition` + * @throws ClassCastException if the instance is not `EventStreamWidgetDefinition` + */ + public EventStreamWidgetDefinition getEventStreamWidgetDefinition() throws ClassCastException { + return (EventStreamWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `EventTimelineWidgetDefinition`. If the actual instance is not - * `EventTimelineWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `EventTimelineWidgetDefinition` - * @throws ClassCastException if the instance is not `EventTimelineWidgetDefinition` - */ - public EventTimelineWidgetDefinition getEventTimelineWidgetDefinition() - throws ClassCastException { - return (EventTimelineWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `EventTimelineWidgetDefinition`. If the actual instance is not `EventTimelineWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EventTimelineWidgetDefinition` + * @throws ClassCastException if the instance is not `EventTimelineWidgetDefinition` + */ + public EventTimelineWidgetDefinition getEventTimelineWidgetDefinition() throws ClassCastException { + return (EventTimelineWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `FreeTextWidgetDefinition`. If the actual instance is not - * `FreeTextWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FreeTextWidgetDefinition` - * @throws ClassCastException if the instance is not `FreeTextWidgetDefinition` - */ - public FreeTextWidgetDefinition getFreeTextWidgetDefinition() throws ClassCastException { - return (FreeTextWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `FreeTextWidgetDefinition`. If the actual instance is not `FreeTextWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FreeTextWidgetDefinition` + * @throws ClassCastException if the instance is not `FreeTextWidgetDefinition` + */ + public FreeTextWidgetDefinition getFreeTextWidgetDefinition() throws ClassCastException { + return (FreeTextWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `GeomapWidgetDefinition`. If the actual instance is not - * `GeomapWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `GeomapWidgetDefinition` - * @throws ClassCastException if the instance is not `GeomapWidgetDefinition` - */ - public GeomapWidgetDefinition getGeomapWidgetDefinition() throws ClassCastException { - return (GeomapWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `GeomapWidgetDefinition`. If the actual instance is not `GeomapWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `GeomapWidgetDefinition` + * @throws ClassCastException if the instance is not `GeomapWidgetDefinition` + */ + public GeomapWidgetDefinition getGeomapWidgetDefinition() throws ClassCastException { + return (GeomapWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `GroupWidgetDefinition`. If the actual instance is not - * `GroupWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `GroupWidgetDefinition` - * @throws ClassCastException if the instance is not `GroupWidgetDefinition` - */ - public GroupWidgetDefinition getGroupWidgetDefinition() throws ClassCastException { - return (GroupWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `GroupWidgetDefinition`. If the actual instance is not `GroupWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `GroupWidgetDefinition` + * @throws ClassCastException if the instance is not `GroupWidgetDefinition` + */ + public GroupWidgetDefinition getGroupWidgetDefinition() throws ClassCastException { + return (GroupWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `HeatMapWidgetDefinition`. If the actual instance is not - * `HeatMapWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `HeatMapWidgetDefinition` - * @throws ClassCastException if the instance is not `HeatMapWidgetDefinition` - */ - public HeatMapWidgetDefinition getHeatMapWidgetDefinition() throws ClassCastException { - return (HeatMapWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `HeatMapWidgetDefinition`. If the actual instance is not `HeatMapWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `HeatMapWidgetDefinition` + * @throws ClassCastException if the instance is not `HeatMapWidgetDefinition` + */ + public HeatMapWidgetDefinition getHeatMapWidgetDefinition() throws ClassCastException { + return (HeatMapWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `HostMapWidgetDefinition`. If the actual instance is not - * `HostMapWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `HostMapWidgetDefinition` - * @throws ClassCastException if the instance is not `HostMapWidgetDefinition` - */ - public HostMapWidgetDefinition getHostMapWidgetDefinition() throws ClassCastException { - return (HostMapWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `HostMapWidgetDefinition`. If the actual instance is not `HostMapWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `HostMapWidgetDefinition` + * @throws ClassCastException if the instance is not `HostMapWidgetDefinition` + */ + public HostMapWidgetDefinition getHostMapWidgetDefinition() throws ClassCastException { + return (HostMapWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `IFrameWidgetDefinition`. If the actual instance is not - * `IFrameWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `IFrameWidgetDefinition` - * @throws ClassCastException if the instance is not `IFrameWidgetDefinition` - */ - public IFrameWidgetDefinition getIFrameWidgetDefinition() throws ClassCastException { - return (IFrameWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `IFrameWidgetDefinition`. If the actual instance is not `IFrameWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IFrameWidgetDefinition` + * @throws ClassCastException if the instance is not `IFrameWidgetDefinition` + */ + public IFrameWidgetDefinition getIFrameWidgetDefinition() throws ClassCastException { + return (IFrameWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ImageWidgetDefinition`. If the actual instance is not - * `ImageWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ImageWidgetDefinition` - * @throws ClassCastException if the instance is not `ImageWidgetDefinition` - */ - public ImageWidgetDefinition getImageWidgetDefinition() throws ClassCastException { - return (ImageWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ImageWidgetDefinition`. If the actual instance is not `ImageWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ImageWidgetDefinition` + * @throws ClassCastException if the instance is not `ImageWidgetDefinition` + */ + public ImageWidgetDefinition getImageWidgetDefinition() throws ClassCastException { + return (ImageWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `LogStreamWidgetDefinition`. If the actual instance is not - * `LogStreamWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogStreamWidgetDefinition` - * @throws ClassCastException if the instance is not `LogStreamWidgetDefinition` - */ - public LogStreamWidgetDefinition getLogStreamWidgetDefinition() throws ClassCastException { - return (LogStreamWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `LogStreamWidgetDefinition`. If the actual instance is not `LogStreamWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogStreamWidgetDefinition` + * @throws ClassCastException if the instance is not `LogStreamWidgetDefinition` + */ + public LogStreamWidgetDefinition getLogStreamWidgetDefinition() throws ClassCastException { + return (LogStreamWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `MonitorSummaryWidgetDefinition`. If the actual instance is not - * `MonitorSummaryWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `MonitorSummaryWidgetDefinition` - * @throws ClassCastException if the instance is not `MonitorSummaryWidgetDefinition` - */ - public MonitorSummaryWidgetDefinition getMonitorSummaryWidgetDefinition() - throws ClassCastException { - return (MonitorSummaryWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `MonitorSummaryWidgetDefinition`. If the actual instance is not `MonitorSummaryWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MonitorSummaryWidgetDefinition` + * @throws ClassCastException if the instance is not `MonitorSummaryWidgetDefinition` + */ + public MonitorSummaryWidgetDefinition getMonitorSummaryWidgetDefinition() throws ClassCastException { + return (MonitorSummaryWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `NoteWidgetDefinition`. If the actual instance is not - * `NoteWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `NoteWidgetDefinition` - * @throws ClassCastException if the instance is not `NoteWidgetDefinition` - */ - public NoteWidgetDefinition getNoteWidgetDefinition() throws ClassCastException { - return (NoteWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `NoteWidgetDefinition`. If the actual instance is not `NoteWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NoteWidgetDefinition` + * @throws ClassCastException if the instance is not `NoteWidgetDefinition` + */ + public NoteWidgetDefinition getNoteWidgetDefinition() throws ClassCastException { + return (NoteWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `QueryValueWidgetDefinition`. If the actual instance is not - * `QueryValueWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `QueryValueWidgetDefinition` - * @throws ClassCastException if the instance is not `QueryValueWidgetDefinition` - */ - public QueryValueWidgetDefinition getQueryValueWidgetDefinition() throws ClassCastException { - return (QueryValueWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `QueryValueWidgetDefinition`. If the actual instance is not `QueryValueWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `QueryValueWidgetDefinition` + * @throws ClassCastException if the instance is not `QueryValueWidgetDefinition` + */ + public QueryValueWidgetDefinition getQueryValueWidgetDefinition() throws ClassCastException { + return (QueryValueWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `RunWorkflowWidgetDefinition`. If the actual instance is not - * `RunWorkflowWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `RunWorkflowWidgetDefinition` - * @throws ClassCastException if the instance is not `RunWorkflowWidgetDefinition` - */ - public RunWorkflowWidgetDefinition getRunWorkflowWidgetDefinition() throws ClassCastException { - return (RunWorkflowWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `RunWorkflowWidgetDefinition`. If the actual instance is not `RunWorkflowWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RunWorkflowWidgetDefinition` + * @throws ClassCastException if the instance is not `RunWorkflowWidgetDefinition` + */ + public RunWorkflowWidgetDefinition getRunWorkflowWidgetDefinition() throws ClassCastException { + return (RunWorkflowWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ScatterPlotWidgetDefinition`. If the actual instance is not - * `ScatterPlotWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ScatterPlotWidgetDefinition` - * @throws ClassCastException if the instance is not `ScatterPlotWidgetDefinition` - */ - public ScatterPlotWidgetDefinition getScatterPlotWidgetDefinition() throws ClassCastException { - return (ScatterPlotWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ScatterPlotWidgetDefinition`. If the actual instance is not `ScatterPlotWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ScatterPlotWidgetDefinition` + * @throws ClassCastException if the instance is not `ScatterPlotWidgetDefinition` + */ + public ScatterPlotWidgetDefinition getScatterPlotWidgetDefinition() throws ClassCastException { + return (ScatterPlotWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `SLOWidgetDefinition`. If the actual instance is not - * `SLOWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `SLOWidgetDefinition` - * @throws ClassCastException if the instance is not `SLOWidgetDefinition` - */ - public SLOWidgetDefinition getSLOWidgetDefinition() throws ClassCastException { - return (SLOWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `SLOWidgetDefinition`. If the actual instance is not `SLOWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SLOWidgetDefinition` + * @throws ClassCastException if the instance is not `SLOWidgetDefinition` + */ + public SLOWidgetDefinition getSLOWidgetDefinition() throws ClassCastException { + return (SLOWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `SLOListWidgetDefinition`. If the actual instance is not - * `SLOListWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `SLOListWidgetDefinition` - * @throws ClassCastException if the instance is not `SLOListWidgetDefinition` - */ - public SLOListWidgetDefinition getSLOListWidgetDefinition() throws ClassCastException { - return (SLOListWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `SLOListWidgetDefinition`. If the actual instance is not `SLOListWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SLOListWidgetDefinition` + * @throws ClassCastException if the instance is not `SLOListWidgetDefinition` + */ + public SLOListWidgetDefinition getSLOListWidgetDefinition() throws ClassCastException { + return (SLOListWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ServiceMapWidgetDefinition`. If the actual instance is not - * `ServiceMapWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceMapWidgetDefinition` - * @throws ClassCastException if the instance is not `ServiceMapWidgetDefinition` - */ - public ServiceMapWidgetDefinition getServiceMapWidgetDefinition() throws ClassCastException { - return (ServiceMapWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ServiceMapWidgetDefinition`. If the actual instance is not `ServiceMapWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceMapWidgetDefinition` + * @throws ClassCastException if the instance is not `ServiceMapWidgetDefinition` + */ + public ServiceMapWidgetDefinition getServiceMapWidgetDefinition() throws ClassCastException { + return (ServiceMapWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ServiceSummaryWidgetDefinition`. If the actual instance is not - * `ServiceSummaryWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceSummaryWidgetDefinition` - * @throws ClassCastException if the instance is not `ServiceSummaryWidgetDefinition` - */ - public ServiceSummaryWidgetDefinition getServiceSummaryWidgetDefinition() - throws ClassCastException { - return (ServiceSummaryWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ServiceSummaryWidgetDefinition`. If the actual instance is not `ServiceSummaryWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceSummaryWidgetDefinition` + * @throws ClassCastException if the instance is not `ServiceSummaryWidgetDefinition` + */ + public ServiceSummaryWidgetDefinition getServiceSummaryWidgetDefinition() throws ClassCastException { + return (ServiceSummaryWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `SunburstWidgetDefinition`. If the actual instance is not - * `SunburstWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `SunburstWidgetDefinition` - * @throws ClassCastException if the instance is not `SunburstWidgetDefinition` - */ - public SunburstWidgetDefinition getSunburstWidgetDefinition() throws ClassCastException { - return (SunburstWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `SunburstWidgetDefinition`. If the actual instance is not `SunburstWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SunburstWidgetDefinition` + * @throws ClassCastException if the instance is not `SunburstWidgetDefinition` + */ + public SunburstWidgetDefinition getSunburstWidgetDefinition() throws ClassCastException { + return (SunburstWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `TableWidgetDefinition`. If the actual instance is not - * `TableWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `TableWidgetDefinition` - * @throws ClassCastException if the instance is not `TableWidgetDefinition` - */ - public TableWidgetDefinition getTableWidgetDefinition() throws ClassCastException { - return (TableWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `TableWidgetDefinition`. If the actual instance is not `TableWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TableWidgetDefinition` + * @throws ClassCastException if the instance is not `TableWidgetDefinition` + */ + public TableWidgetDefinition getTableWidgetDefinition() throws ClassCastException { + return (TableWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `TimeseriesWidgetDefinition`. If the actual instance is not - * `TimeseriesWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `TimeseriesWidgetDefinition` - * @throws ClassCastException if the instance is not `TimeseriesWidgetDefinition` - */ - public TimeseriesWidgetDefinition getTimeseriesWidgetDefinition() throws ClassCastException { - return (TimeseriesWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `TimeseriesWidgetDefinition`. If the actual instance is not `TimeseriesWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TimeseriesWidgetDefinition` + * @throws ClassCastException if the instance is not `TimeseriesWidgetDefinition` + */ + public TimeseriesWidgetDefinition getTimeseriesWidgetDefinition() throws ClassCastException { + return (TimeseriesWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ToplistWidgetDefinition`. If the actual instance is not - * `ToplistWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ToplistWidgetDefinition` - * @throws ClassCastException if the instance is not `ToplistWidgetDefinition` - */ - public ToplistWidgetDefinition getToplistWidgetDefinition() throws ClassCastException { - return (ToplistWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ToplistWidgetDefinition`. If the actual instance is not `ToplistWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ToplistWidgetDefinition` + * @throws ClassCastException if the instance is not `ToplistWidgetDefinition` + */ + public ToplistWidgetDefinition getToplistWidgetDefinition() throws ClassCastException { + return (ToplistWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `TreeMapWidgetDefinition`. If the actual instance is not - * `TreeMapWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `TreeMapWidgetDefinition` - * @throws ClassCastException if the instance is not `TreeMapWidgetDefinition` - */ - public TreeMapWidgetDefinition getTreeMapWidgetDefinition() throws ClassCastException { - return (TreeMapWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `TreeMapWidgetDefinition`. If the actual instance is not `TreeMapWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TreeMapWidgetDefinition` + * @throws ClassCastException if the instance is not `TreeMapWidgetDefinition` + */ + public TreeMapWidgetDefinition getTreeMapWidgetDefinition() throws ClassCastException { + return (TreeMapWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `ListStreamWidgetDefinition`. If the actual instance is not - * `ListStreamWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `ListStreamWidgetDefinition` - * @throws ClassCastException if the instance is not `ListStreamWidgetDefinition` - */ - public ListStreamWidgetDefinition getListStreamWidgetDefinition() throws ClassCastException { - return (ListStreamWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `ListStreamWidgetDefinition`. If the actual instance is not `ListStreamWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ListStreamWidgetDefinition` + * @throws ClassCastException if the instance is not `ListStreamWidgetDefinition` + */ + public ListStreamWidgetDefinition getListStreamWidgetDefinition() throws ClassCastException { + return (ListStreamWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `FunnelWidgetDefinition`. If the actual instance is not - * `FunnelWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `FunnelWidgetDefinition` - * @throws ClassCastException if the instance is not `FunnelWidgetDefinition` - */ - public FunnelWidgetDefinition getFunnelWidgetDefinition() throws ClassCastException { - return (FunnelWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `FunnelWidgetDefinition`. If the actual instance is not `FunnelWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FunnelWidgetDefinition` + * @throws ClassCastException if the instance is not `FunnelWidgetDefinition` + */ + public FunnelWidgetDefinition getFunnelWidgetDefinition() throws ClassCastException { + return (FunnelWidgetDefinition)super.getActualInstance(); + } - /** - * Get the actual instance of `TopologyMapWidgetDefinition`. If the actual instance is not - * `TopologyMapWidgetDefinition`, the ClassCastException will be thrown. - * - * @return The actual instance of `TopologyMapWidgetDefinition` - * @throws ClassCastException if the instance is not `TopologyMapWidgetDefinition` - */ - public TopologyMapWidgetDefinition getTopologyMapWidgetDefinition() throws ClassCastException { - return (TopologyMapWidgetDefinition) super.getActualInstance(); - } + /** + * Get the actual instance of `TopologyMapWidgetDefinition`. If the actual instance is not `TopologyMapWidgetDefinition`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `TopologyMapWidgetDefinition` + * @throws ClassCastException if the instance is not `TopologyMapWidgetDefinition` + */ + public TopologyMapWidgetDefinition getTopologyMapWidgetDefinition() throws ClassCastException { + return (TopologyMapWidgetDefinition)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetDisplayType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetDisplayType.java index aebf51ae4fc..10a2e894f64 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetDisplayType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetDisplayType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of display to use for the request. */ +/** + *

Type of display to use for the request.

+ */ @JsonSerialize(using = WidgetDisplayType.WidgetDisplayTypeSerializer.class) public class WidgetDisplayType { @@ -27,8 +51,7 @@ public class WidgetDisplayType { public static final WidgetDisplayType BARS = new WidgetDisplayType("bars"); public static final WidgetDisplayType LINE = new WidgetDisplayType("line"); - private static final Set allowedValues = - new HashSet(Arrays.asList("area", "bars", "line")); + private static final Set allowedValues = new HashSet(Arrays.asList("area", "bars", "line")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetDisplayTypeSerializer extends StdSerializer { - public WidgetDisplayTypeSerializer(Class t) { - super(t); - } - - public WidgetDisplayTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetDisplayType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetDisplayTypeSerializer(Class t) { + super(t); + } + + public WidgetDisplayTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetDisplayType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetDisplayType object is equal to o. */ + /** + * Return true if this WidgetDisplayType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetEvent.java b/src/main/java/com/datadog/api/client/v1/model/WidgetEvent.java index 7c8ca0b4acf..86f5cc193e6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetEvent.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetEvent.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Event overlay control options. - * - *

See the dedicated Events JSON - * schema documentation to learn how to build the <EVENTS_SCHEMA>. + *

Event overlay control options.

+ *

See the dedicated Events JSON schema documentation + * to learn how to build the <EVENTS_SCHEMA>.

*/ -@JsonPropertyOrder({WidgetEvent.JSON_PROPERTY_Q, WidgetEvent.JSON_PROPERTY_TAGS_EXECUTION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonPropertyOrder({ + WidgetEvent.JSON_PROPERTY_Q, + WidgetEvent.JSON_PROPERTY_TAGS_EXECUTION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetEvent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_Q = "q"; private String q; @@ -34,52 +52,51 @@ public class WidgetEvent { public WidgetEvent() {} @JsonCreator - public WidgetEvent(@JsonProperty(required = true, value = JSON_PROPERTY_Q) String q) { - this.q = q; + public WidgetEvent( + @JsonProperty(required=true, value=JSON_PROPERTY_Q)String q) { + this.q = q; } - public WidgetEvent q(String q) { this.q = q; return this; } /** - * Query definition. - * + *

Query definition.

* @return q - */ - @JsonProperty(JSON_PROPERTY_Q) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQ() { - return q; - } - + **/ + @JsonProperty(JSON_PROPERTY_Q) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQ() { + return q; + } public void setQ(String q) { this.q = q; } - public WidgetEvent tagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; return this; } /** - * The execution method for multi-value filters. - * + *

The execution method for multi-value filters.

* @return tagsExecution - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagsExecution() { - return tagsExecution; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS_EXECUTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagsExecution() { + return tagsExecution; + } public void setTagsExecution(String tagsExecution) { this.tagsExecution = tagsExecution; } - /** Return true if this WidgetEvent object is equal to o. */ + /** + * Return true if this WidgetEvent object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,13 +106,13 @@ public boolean equals(Object o) { return false; } WidgetEvent widgetEvent = (WidgetEvent) o; - return Objects.equals(this.q, widgetEvent.q) - && Objects.equals(this.tagsExecution, widgetEvent.tagsExecution); + return Objects.equals(this.q, widgetEvent.q) && Objects.equals(this.tagsExecution, widgetEvent.tagsExecution); } + @Override public int hashCode() { - return Objects.hash(q, tagsExecution); + return Objects.hash(q,tagsExecution); } @Override @@ -109,7 +126,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetEventSize.java b/src/main/java/com/datadog/api/client/v1/model/WidgetEventSize.java index 4975e19d28c..5e86719e2a6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetEventSize.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetEventSize.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Size to use to display an event. */ +/** + *

Size to use to display an event.

+ */ @JsonSerialize(using = WidgetEventSize.WidgetEventSizeSerializer.class) public class WidgetEventSize { @@ -39,19 +63,18 @@ public boolean isValid() { } public static class WidgetEventSizeSerializer extends StdSerializer { - public WidgetEventSizeSerializer(Class t) { - super(t); - } - - public WidgetEventSizeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetEventSize value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetEventSizeSerializer(Class t) { + super(t); + } + + public WidgetEventSizeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetEventSize value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetEventSize object is equal to o. */ + /** + * Return true if this WidgetEventSize object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetFieldSort.java b/src/main/java/com/datadog/api/client/v1/model/WidgetFieldSort.java index f13296990d7..b77f2e37153 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetFieldSort.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetFieldSort.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Which column and order to sort by */ -@JsonPropertyOrder({WidgetFieldSort.JSON_PROPERTY_COLUMN, WidgetFieldSort.JSON_PROPERTY_ORDER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Which column and order to sort by

+ */ +@JsonPropertyOrder({ + WidgetFieldSort.JSON_PROPERTY_COLUMN, + WidgetFieldSort.JSON_PROPERTY_ORDER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetFieldSort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLUMN = "column"; private String column; @@ -29,33 +51,30 @@ public WidgetFieldSort() {} @JsonCreator public WidgetFieldSort( - @JsonProperty(required = true, value = JSON_PROPERTY_COLUMN) String column, - @JsonProperty(required = true, value = JSON_PROPERTY_ORDER) WidgetSort order) { - this.column = column; - this.order = order; - this.unparsed |= !order.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_COLUMN)String column, + @JsonProperty(required=true, value=JSON_PROPERTY_ORDER)WidgetSort order) { + this.column = column; + this.order = order; + this.unparsed |= !order.isValid(); } - public WidgetFieldSort column(String column) { this.column = column; return this; } /** - * Facet path for the column - * + *

Facet path for the column

* @return column - */ - @JsonProperty(JSON_PROPERTY_COLUMN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getColumn() { - return column; - } - + **/ + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getColumn() { + return column; + } public void setColumn(String column) { this.column = column; } - public WidgetFieldSort order(WidgetSort order) { this.order = order; this.unparsed |= !order.isValid(); @@ -63,24 +82,25 @@ public WidgetFieldSort order(WidgetSort order) { } /** - * Widget sorting methods. - * + *

Widget sorting methods.

* @return order - */ - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WidgetSort getOrder() { - return order; - } - + **/ + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public WidgetSort getOrder() { + return order; + } public void setOrder(WidgetSort order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this WidgetFieldSort object is equal to o. */ + /** + * Return true if this WidgetFieldSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,13 +110,13 @@ public boolean equals(Object o) { return false; } WidgetFieldSort widgetFieldSort = (WidgetFieldSort) o; - return Objects.equals(this.column, widgetFieldSort.column) - && Objects.equals(this.order, widgetFieldSort.order); + return Objects.equals(this.column, widgetFieldSort.column) && Objects.equals(this.order, widgetFieldSort.order); } + @Override public int hashCode() { - return Objects.hash(column, order); + return Objects.hash(column,order); } @Override @@ -110,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetFormula.java b/src/main/java/com/datadog/api/client/v1/model/WidgetFormula.java index 4b987e28c59..70bf4d1277c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetFormula.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetFormula.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Formula to be used in a widget query. */ + +/** + *

Formula to be used in a widget query.

+ */ @JsonPropertyOrder({ WidgetFormula.JSON_PROPERTY_ALIAS, WidgetFormula.JSON_PROPERTY_CELL_DISPLAY_MODE, @@ -24,10 +41,10 @@ WidgetFormula.JSON_PROPERTY_LIMIT, WidgetFormula.JSON_PROPERTY_STYLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetFormula { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ALIAS = "alias"; private String alias; @@ -50,31 +67,28 @@ public WidgetFormula() {} @JsonCreator public WidgetFormula( - @JsonProperty(required = true, value = JSON_PROPERTY_FORMULA) String formula) { - this.formula = formula; + @JsonProperty(required=true, value=JSON_PROPERTY_FORMULA)String formula) { + this.formula = formula; } - public WidgetFormula alias(String alias) { this.alias = alias; return this; } /** - * Expression alias. - * + *

Expression alias.

* @return alias - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ALIAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlias() { - return alias; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALIAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAlias() { + return alias; + } public void setAlias(String alias) { this.alias = alias; } - public WidgetFormula cellDisplayMode(TableWidgetCellDisplayMode cellDisplayMode) { this.cellDisplayMode = cellDisplayMode; this.unparsed |= !cellDisplayMode.isValid(); @@ -82,24 +96,22 @@ public WidgetFormula cellDisplayMode(TableWidgetCellDisplayMode cellDisplayMode) } /** - * Define a display mode for the table cell. - * + *

Define a display mode for the table cell.

* @return cellDisplayMode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CELL_DISPLAY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TableWidgetCellDisplayMode getCellDisplayMode() { - return cellDisplayMode; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_DISPLAY_MODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TableWidgetCellDisplayMode getCellDisplayMode() { + return cellDisplayMode; + } public void setCellDisplayMode(TableWidgetCellDisplayMode cellDisplayMode) { if (!cellDisplayMode.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.cellDisplayMode = cellDisplayMode; } - public WidgetFormula conditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; for (WidgetConditionalFormat item : conditionalFormats) { @@ -107,7 +119,6 @@ public WidgetFormula conditionalFormats(List conditiona } return this; } - public WidgetFormula addConditionalFormatsItem(WidgetConditionalFormat conditionalFormatsItem) { if (this.conditionalFormats == null) { this.conditionalFormats = new ArrayList<>(); @@ -118,41 +129,37 @@ public WidgetFormula addConditionalFormatsItem(WidgetConditionalFormat condition } /** - * List of conditional formats. - * + *

List of conditional formats.

* @return conditionalFormats - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getConditionalFormats() { - return conditionalFormats; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getConditionalFormats() { + return conditionalFormats; + } public void setConditionalFormats(List conditionalFormats) { this.conditionalFormats = conditionalFormats; } - public WidgetFormula formula(String formula) { this.formula = formula; return this; } /** - * String expression built from queries, formulas, and functions. - * + *

String expression built from queries, formulas, and functions.

* @return formula - */ - @JsonProperty(JSON_PROPERTY_FORMULA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFormula() { - return formula; - } - + **/ + @JsonProperty(JSON_PROPERTY_FORMULA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFormula() { + return formula; + } public void setFormula(String formula) { this.formula = formula; } - public WidgetFormula limit(WidgetFormulaLimit limit) { this.limit = limit; this.unparsed |= limit.unparsed; @@ -160,21 +167,19 @@ public WidgetFormula limit(WidgetFormulaLimit limit) { } /** - * Options for limiting results returned. - * + *

Options for limiting results returned.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetFormulaLimit getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetFormulaLimit getLimit() { + return limit; + } public void setLimit(WidgetFormulaLimit limit) { this.limit = limit; } - public WidgetFormula style(WidgetFormulaStyle style) { this.style = style; this.unparsed |= style.unparsed; @@ -182,22 +187,23 @@ public WidgetFormula style(WidgetFormulaStyle style) { } /** - * Styling options for widget formulas. - * + *

Styling options for widget formulas.

* @return style - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STYLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetFormulaStyle getStyle() { - return style; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetFormulaStyle getStyle() { + return style; + } public void setStyle(WidgetFormulaStyle style) { this.style = style; } - /** Return true if this WidgetFormula object is equal to o. */ + /** + * Return true if this WidgetFormula object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -207,17 +213,13 @@ public boolean equals(Object o) { return false; } WidgetFormula widgetFormula = (WidgetFormula) o; - return Objects.equals(this.alias, widgetFormula.alias) - && Objects.equals(this.cellDisplayMode, widgetFormula.cellDisplayMode) - && Objects.equals(this.conditionalFormats, widgetFormula.conditionalFormats) - && Objects.equals(this.formula, widgetFormula.formula) - && Objects.equals(this.limit, widgetFormula.limit) - && Objects.equals(this.style, widgetFormula.style); + return Objects.equals(this.alias, widgetFormula.alias) && Objects.equals(this.cellDisplayMode, widgetFormula.cellDisplayMode) && Objects.equals(this.conditionalFormats, widgetFormula.conditionalFormats) && Objects.equals(this.formula, widgetFormula.formula) && Objects.equals(this.limit, widgetFormula.limit) && Objects.equals(this.style, widgetFormula.style); } + @Override public int hashCode() { - return Objects.hash(alias, cellDisplayMode, conditionalFormats, formula, limit, style); + return Objects.hash(alias,cellDisplayMode,conditionalFormats,formula,limit,style); } @Override @@ -235,7 +237,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaLimit.java b/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaLimit.java index 36028e00e29..5875f9731bc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaLimit.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaLimit.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Options for limiting results returned. */ -@JsonPropertyOrder({WidgetFormulaLimit.JSON_PROPERTY_COUNT, WidgetFormulaLimit.JSON_PROPERTY_ORDER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Options for limiting results returned.

+ */ +@JsonPropertyOrder({ + WidgetFormulaLimit.JSON_PROPERTY_COUNT, + WidgetFormulaLimit.JSON_PROPERTY_ORDER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetFormulaLimit { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Long count; @@ -30,21 +53,19 @@ public WidgetFormulaLimit count(Long count) { } /** - * Number of results to return. - * + *

Number of results to return.

* @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } public void setCount(Long count) { this.count = count; } - public WidgetFormulaLimit order(QuerySortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -52,25 +73,26 @@ public WidgetFormulaLimit order(QuerySortOrder order) { } /** - * Direction of sort. - * + *

Direction of sort.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public QuerySortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public QuerySortOrder getOrder() { + return order; + } public void setOrder(QuerySortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this WidgetFormulaLimit object is equal to o. */ + /** + * Return true if this WidgetFormulaLimit object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +102,13 @@ public boolean equals(Object o) { return false; } WidgetFormulaLimit widgetFormulaLimit = (WidgetFormulaLimit) o; - return Objects.equals(this.count, widgetFormulaLimit.count) - && Objects.equals(this.order, widgetFormulaLimit.order); + return Objects.equals(this.count, widgetFormulaLimit.count) && Objects.equals(this.order, widgetFormulaLimit.order); } + @Override public int hashCode() { - return Objects.hash(count, order); + return Objects.hash(count,order); } @Override @@ -100,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaStyle.java b/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaStyle.java index b32bd07ddf7..3ec468c0be5 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaStyle.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetFormulaStyle.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Styling options for widget formulas. */ + +/** + *

Styling options for widget formulas.

+ */ @JsonPropertyOrder({ WidgetFormulaStyle.JSON_PROPERTY_PALETTE, WidgetFormulaStyle.JSON_PROPERTY_PALETTE_INDEX }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetFormulaStyle { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PALETTE = "palette"; private String palette; @@ -33,44 +53,42 @@ public WidgetFormulaStyle palette(String palette) { } /** - * The color palette used to display the formula. A guide to the available color palettes can be - * found at https://docs.datadoghq.com/dashboards/guide/widget_colors - * + *

The color palette used to display the formula. A guide to the available color palettes can be found at https://docs.datadoghq.com/dashboards/guide/widget_colors

* @return palette - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PALETTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPalette() { - return palette; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PALETTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPalette() { + return palette; + } public void setPalette(String palette) { this.palette = palette; } - public WidgetFormulaStyle paletteIndex(Long paletteIndex) { this.paletteIndex = paletteIndex; return this; } /** - * Index specifying which color to use within the palette. - * + *

Index specifying which color to use within the palette.

* @return paletteIndex - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PALETTE_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPaletteIndex() { - return paletteIndex; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PALETTE_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPaletteIndex() { + return paletteIndex; + } public void setPaletteIndex(Long paletteIndex) { this.paletteIndex = paletteIndex; } - /** Return true if this WidgetFormulaStyle object is equal to o. */ + /** + * Return true if this WidgetFormulaStyle object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +98,13 @@ public boolean equals(Object o) { return false; } WidgetFormulaStyle widgetFormulaStyle = (WidgetFormulaStyle) o; - return Objects.equals(this.palette, widgetFormulaStyle.palette) - && Objects.equals(this.paletteIndex, widgetFormulaStyle.paletteIndex); + return Objects.equals(this.palette, widgetFormulaStyle.palette) && Objects.equals(this.paletteIndex, widgetFormulaStyle.paletteIndex); } + @Override public int hashCode() { - return Objects.hash(palette, paletteIndex); + return Objects.hash(palette,paletteIndex); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetGrouping.java b/src/main/java/com/datadog/api/client/v1/model/WidgetGrouping.java index 57bb93f0d6a..fd11606355b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetGrouping.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetGrouping.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The kind of grouping to use. */ +/** + *

The kind of grouping to use.

+ */ @JsonSerialize(using = WidgetGrouping.WidgetGroupingSerializer.class) public class WidgetGrouping { public static final WidgetGrouping CHECK = new WidgetGrouping("check"); public static final WidgetGrouping CLUSTER = new WidgetGrouping("cluster"); - private static final Set allowedValues = - new HashSet(Arrays.asList("check", "cluster")); + private static final Set allowedValues = new HashSet(Arrays.asList("check", "cluster")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class WidgetGroupingSerializer extends StdSerializer { - public WidgetGroupingSerializer(Class t) { - super(t); - } - - public WidgetGroupingSerializer() { - this(null); - } - - @Override - public void serialize(WidgetGrouping value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetGroupingSerializer(Class t) { + super(t); + } + + public WidgetGroupingSerializer() { + this(null); + } + + @Override + public void serialize(WidgetGrouping value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetGrouping object is equal to o. */ + /** + * Return true if this WidgetGrouping object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetHorizontalAlign.java b/src/main/java/com/datadog/api/client/v1/model/WidgetHorizontalAlign.java index 0aaf758f8d0..6c20bf5a89c 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetHorizontalAlign.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetHorizontalAlign.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Horizontal alignment. */ +/** + *

Horizontal alignment.

+ */ @JsonSerialize(using = WidgetHorizontalAlign.WidgetHorizontalAlignSerializer.class) public class WidgetHorizontalAlign { @@ -27,8 +51,7 @@ public class WidgetHorizontalAlign { public static final WidgetHorizontalAlign LEFT = new WidgetHorizontalAlign("left"); public static final WidgetHorizontalAlign RIGHT = new WidgetHorizontalAlign("right"); - private static final Set allowedValues = - new HashSet(Arrays.asList("center", "left", "right")); + private static final Set allowedValues = new HashSet(Arrays.asList("center", "left", "right")); private String value; @@ -41,20 +64,18 @@ public boolean isValid() { } public static class WidgetHorizontalAlignSerializer extends StdSerializer { - public WidgetHorizontalAlignSerializer(Class t) { - super(t); - } - - public WidgetHorizontalAlignSerializer() { - this(null); - } - - @Override - public void serialize( - WidgetHorizontalAlign value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetHorizontalAlignSerializer(Class t) { + super(t); + } + + public WidgetHorizontalAlignSerializer() { + this(null); + } + + @Override + public void serialize(WidgetHorizontalAlign value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetHorizontalAlign object is equal to o. */ + /** + * Return true if this WidgetHorizontalAlign object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetImageSizing.java b/src/main/java/com/datadog/api/client/v1/model/WidgetImageSizing.java index 9037145b5ff..facbb0a0d20 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetImageSizing.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetImageSizing.java @@ -6,23 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * How to size the image on the widget. The values are based on the image object-fit - * CSS properties. Note: zoom, fit and center - * values are deprecated. + *

How to size the image on the widget. The values are based on the image object-fit CSS properties. + * Note: zoom, fit and center values are deprecated.

*/ @JsonSerialize(using = WidgetImageSizing.WidgetImageSizingSerializer.class) public class WidgetImageSizing { @@ -36,9 +57,7 @@ public class WidgetImageSizing { public static final WidgetImageSizing FIT = new WidgetImageSizing("fit"); public static final WidgetImageSizing CENTER = new WidgetImageSizing("center"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("fill", "contain", "cover", "none", "scale-down", "zoom", "fit", "center")); + private static final Set allowedValues = new HashSet(Arrays.asList("fill", "contain", "cover", "none", "scale-down", "zoom", "fit", "center")); private String value; @@ -51,19 +70,18 @@ public boolean isValid() { } public static class WidgetImageSizingSerializer extends StdSerializer { - public WidgetImageSizingSerializer(Class t) { - super(t); - } - - public WidgetImageSizingSerializer() { - this(null); - } - - @Override - public void serialize(WidgetImageSizing value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetImageSizingSerializer(Class t) { + super(t); + } + + public WidgetImageSizingSerializer() { + this(null); + } + + @Override + public void serialize(WidgetImageSizing value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -75,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetImageSizing object is equal to o. */ + /** + * Return true if this WidgetImageSizing object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetLayout.java b/src/main/java/com/datadog/api/client/v1/model/WidgetLayout.java index 605f33650ee..c1e41237b9d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetLayout.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetLayout.java @@ -6,16 +6,32 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The layout for a widget on a free or new dashboard layout - * dashboard. + *

The layout for a widget on a free or new dashboard layout dashboard.

*/ @JsonPropertyOrder({ WidgetLayout.JSON_PROPERTY_HEIGHT, @@ -24,10 +40,10 @@ WidgetLayout.JSON_PROPERTY_X, WidgetLayout.JSON_PROPERTY_Y }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetLayout { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HEIGHT = "height"; private Long height; @@ -47,122 +63,115 @@ public WidgetLayout() {} @JsonCreator public WidgetLayout( - @JsonProperty(required = true, value = JSON_PROPERTY_HEIGHT) Long height, - @JsonProperty(required = true, value = JSON_PROPERTY_WIDTH) Long width, - @JsonProperty(required = true, value = JSON_PROPERTY_X) Long x, - @JsonProperty(required = true, value = JSON_PROPERTY_Y) Long y) { - this.height = height; - this.width = width; - this.x = x; - this.y = y; + @JsonProperty(required=true, value=JSON_PROPERTY_HEIGHT)Long height, + @JsonProperty(required=true, value=JSON_PROPERTY_WIDTH)Long width, + @JsonProperty(required=true, value=JSON_PROPERTY_X)Long x, + @JsonProperty(required=true, value=JSON_PROPERTY_Y)Long y) { + this.height = height; + this.width = width; + this.x = x; + this.y = y; } - public WidgetLayout height(Long height) { this.height = height; return this; } /** - * The height of the widget. Should be a non-negative integer. minimum: 0 - * + *

The height of the widget. Should be a non-negative integer.

+ * minimum: 0 * @return height - */ - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getHeight() { - return height; - } - + **/ + @JsonProperty(JSON_PROPERTY_HEIGHT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getHeight() { + return height; + } public void setHeight(Long height) { this.height = height; } - public WidgetLayout isColumnBreak(Boolean isColumnBreak) { this.isColumnBreak = isColumnBreak; return this; } /** - * Whether the widget should be the first one on the second column in high density or not. - * Note: Only for the new dashboard layout and only one widget - * in the dashboard should have this property set to true. - * + *

Whether the widget should be the first one on the second column in high density or not. + * Note: Only for the new dashboard layout and only one widget in the dashboard should have this property set to true.

* @return isColumnBreak - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_COLUMN_BREAK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsColumnBreak() { - return isColumnBreak; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_COLUMN_BREAK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsColumnBreak() { + return isColumnBreak; + } public void setIsColumnBreak(Boolean isColumnBreak) { this.isColumnBreak = isColumnBreak; } - public WidgetLayout width(Long width) { this.width = width; return this; } /** - * The width of the widget. Should be a non-negative integer. minimum: 0 - * + *

The width of the widget. Should be a non-negative integer.

+ * minimum: 0 * @return width - */ - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getWidth() { - return width; - } - + **/ + @JsonProperty(JSON_PROPERTY_WIDTH) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getWidth() { + return width; + } public void setWidth(Long width) { this.width = width; } - public WidgetLayout x(Long x) { this.x = x; return this; } /** - * The position of the widget on the x (horizontal) axis. Should be a non-negative integer. + *

The position of the widget on the x (horizontal) axis. Should be a non-negative integer.

* minimum: 0 - * * @return x - */ - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getX() { - return x; - } - + **/ + @JsonProperty(JSON_PROPERTY_X) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getX() { + return x; + } public void setX(Long x) { this.x = x; } - public WidgetLayout y(Long y) { this.y = y; return this; } /** - * The position of the widget on the y (vertical) axis. Should be a non-negative integer. minimum: - * 0 - * + *

The position of the widget on the y (vertical) axis. Should be a non-negative integer.

+ * minimum: 0 * @return y - */ - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getY() { - return y; - } - + **/ + @JsonProperty(JSON_PROPERTY_Y) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getY() { + return y; + } public void setY(Long y) { this.y = y; } - /** Return true if this WidgetLayout object is equal to o. */ + /** + * Return true if this WidgetLayout object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -172,16 +181,13 @@ public boolean equals(Object o) { return false; } WidgetLayout widgetLayout = (WidgetLayout) o; - return Objects.equals(this.height, widgetLayout.height) - && Objects.equals(this.isColumnBreak, widgetLayout.isColumnBreak) - && Objects.equals(this.width, widgetLayout.width) - && Objects.equals(this.x, widgetLayout.x) - && Objects.equals(this.y, widgetLayout.y); + return Objects.equals(this.height, widgetLayout.height) && Objects.equals(this.isColumnBreak, widgetLayout.isColumnBreak) && Objects.equals(this.width, widgetLayout.width) && Objects.equals(this.x, widgetLayout.x) && Objects.equals(this.y, widgetLayout.y); } + @Override public int hashCode() { - return Objects.hash(height, isColumnBreak, width, x, y); + return Objects.hash(height,isColumnBreak,width,x,y); } @Override @@ -198,7 +204,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetLayoutType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetLayoutType.java index dd00c0c361f..cf2f2c00e2b 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetLayoutType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetLayoutType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Layout type of the group. */ +/** + *

Layout type of the group.

+ */ @JsonSerialize(using = WidgetLayoutType.WidgetLayoutTypeSerializer.class) public class WidgetLayoutType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class WidgetLayoutTypeSerializer extends StdSerializer { - public WidgetLayoutTypeSerializer(Class t) { - super(t); - } - - public WidgetLayoutTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetLayoutType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetLayoutTypeSerializer(Class t) { + super(t); + } + + public WidgetLayoutTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetLayoutType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetLayoutType object is equal to o. */ + /** + * Return true if this WidgetLayoutType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetLineType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetLineType.java index c197ba431b6..bacc161fbe0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetLineType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetLineType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of lines displayed. */ +/** + *

Type of lines displayed.

+ */ @JsonSerialize(using = WidgetLineType.WidgetLineTypeSerializer.class) public class WidgetLineType { @@ -27,8 +51,7 @@ public class WidgetLineType { public static final WidgetLineType DOTTED = new WidgetLineType("dotted"); public static final WidgetLineType SOLID = new WidgetLineType("solid"); - private static final Set allowedValues = - new HashSet(Arrays.asList("dashed", "dotted", "solid")); + private static final Set allowedValues = new HashSet(Arrays.asList("dashed", "dotted", "solid")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetLineTypeSerializer extends StdSerializer { - public WidgetLineTypeSerializer(Class t) { - super(t); - } - - public WidgetLineTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetLineType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetLineTypeSerializer(Class t) { + super(t); + } + + public WidgetLineTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetLineType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetLineType object is equal to o. */ + /** + * Return true if this WidgetLineType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetLineWidth.java b/src/main/java/com/datadog/api/client/v1/model/WidgetLineWidth.java index b89ff9176b9..068a0b8774a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetLineWidth.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetLineWidth.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Width of line displayed. */ +/** + *

Width of line displayed.

+ */ @JsonSerialize(using = WidgetLineWidth.WidgetLineWidthSerializer.class) public class WidgetLineWidth { @@ -27,8 +51,7 @@ public class WidgetLineWidth { public static final WidgetLineWidth THICK = new WidgetLineWidth("thick"); public static final WidgetLineWidth THIN = new WidgetLineWidth("thin"); - private static final Set allowedValues = - new HashSet(Arrays.asList("normal", "thick", "thin")); + private static final Set allowedValues = new HashSet(Arrays.asList("normal", "thick", "thin")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetLineWidthSerializer extends StdSerializer { - public WidgetLineWidthSerializer(Class t) { - super(t); - } - - public WidgetLineWidthSerializer() { - this(null); - } - - @Override - public void serialize(WidgetLineWidth value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetLineWidthSerializer(Class t) { + super(t); + } + + public WidgetLineWidthSerializer() { + this(null); + } + + @Override + public void serialize(WidgetLineWidth value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetLineWidth object is equal to o. */ + /** + * Return true if this WidgetLineWidth object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetLiveSpan.java b/src/main/java/com/datadog/api/client/v1/model/WidgetLiveSpan.java index 4e4368f1ffa..d2f76d66222 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetLiveSpan.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetLiveSpan.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The available timeframes depend on the widget you are using. */ +/** + *

The available timeframes depend on the widget you are using.

+ */ @JsonSerialize(using = WidgetLiveSpan.WidgetLiveSpanSerializer.class) public class WidgetLiveSpan { @@ -39,11 +63,7 @@ public class WidgetLiveSpan { public static final WidgetLiveSpan PAST_ONE_YEAR = new WidgetLiveSpan("1y"); public static final WidgetLiveSpan ALERT = new WidgetLiveSpan("alert"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "1m", "5m", "10m", "15m", "30m", "1h", "4h", "1d", "2d", "1w", "1mo", "3mo", "6mo", - "1y", "alert")); + private static final Set allowedValues = new HashSet(Arrays.asList("1m", "5m", "10m", "15m", "30m", "1h", "4h", "1d", "2d", "1w", "1mo", "3mo", "6mo", "1y", "alert")); private String value; @@ -56,19 +76,18 @@ public boolean isValid() { } public static class WidgetLiveSpanSerializer extends StdSerializer { - public WidgetLiveSpanSerializer(Class t) { - super(t); - } - - public WidgetLiveSpanSerializer() { - this(null); - } - - @Override - public void serialize(WidgetLiveSpan value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetLiveSpanSerializer(Class t) { + super(t); + } + + public WidgetLiveSpanSerializer() { + this(null); + } + + @Override + public void serialize(WidgetLiveSpan value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -80,7 +99,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetLiveSpan object is equal to o. */ + /** + * Return true if this WidgetLiveSpan object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,7 +115,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetMargin.java b/src/main/java/com/datadog/api/client/v1/model/WidgetMargin.java index bfe5c7012d2..caa0d528afe 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetMargin.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetMargin.java @@ -6,22 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Size of the margins around the image. Note: small and large - * values are deprecated. + *

Size of the margins around the image. + * Note: small and large values are deprecated.

*/ @JsonSerialize(using = WidgetMargin.WidgetMarginSerializer.class) public class WidgetMargin { @@ -32,8 +54,7 @@ public class WidgetMargin { public static final WidgetMargin SMALL = new WidgetMargin("small"); public static final WidgetMargin LARGE = new WidgetMargin("large"); - private static final Set allowedValues = - new HashSet(Arrays.asList("sm", "md", "lg", "small", "large")); + private static final Set allowedValues = new HashSet(Arrays.asList("sm", "md", "lg", "small", "large")); private String value; @@ -46,19 +67,18 @@ public boolean isValid() { } public static class WidgetMarginSerializer extends StdSerializer { - public WidgetMarginSerializer(Class t) { - super(t); - } - - public WidgetMarginSerializer() { - this(null); - } - - @Override - public void serialize(WidgetMargin value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetMarginSerializer(Class t) { + super(t); + } + + public WidgetMarginSerializer() { + this(null); + } + + @Override + public void serialize(WidgetMargin value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetMargin object is equal to o. */ + /** + * Return true if this WidgetMargin object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetMarker.java b/src/main/java/com/datadog/api/client/v1/model/WidgetMarker.java index 5c02991677b..924b752cf31 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetMarker.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetMarker.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Markers allow you to add visual conditional formatting for your graphs. */ +/** + *

Markers allow you to add visual conditional formatting for your graphs.

+ */ @JsonPropertyOrder({ WidgetMarker.JSON_PROPERTY_DISPLAY_TYPE, WidgetMarker.JSON_PROPERTY_LABEL, WidgetMarker.JSON_PROPERTY_TIME, WidgetMarker.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetMarker { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DISPLAY_TYPE = "display_type"; private String displayType; @@ -39,95 +58,92 @@ public class WidgetMarker { public WidgetMarker() {} @JsonCreator - public WidgetMarker(@JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { - this.value = value; + public WidgetMarker( + @JsonProperty(required=true, value=JSON_PROPERTY_VALUE)String value) { + this.value = value; } - public WidgetMarker displayType(String displayType) { this.displayType = displayType; return this; } /** - * Combination of: - A severity error, warning, ok, or info - A line type: dashed, solid, or bold - * In this case of a Distribution widget, this can be set to be x_axis_percentile. - * + *

Combination of: + * - A severity error, warning, ok, or info + * - A line type: dashed, solid, or bold + * In this case of a Distribution widget, this can be set to be x_axis_percentile.

* @return displayType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDisplayType() { - return displayType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayType() { + return displayType; + } public void setDisplayType(String displayType) { this.displayType = displayType; } - public WidgetMarker label(String label) { this.label = label; return this; } /** - * Label to display over the marker. - * + *

Label to display over the marker.

* @return label - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLabel() { - return label; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLabel() { + return label; + } public void setLabel(String label) { this.label = label; } - public WidgetMarker time(String time) { this.time = time; return this; } /** - * Timestamp for the widget. - * + *

Timestamp for the widget.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTime() { + return time; + } public void setTime(String time) { this.time = time; } - public WidgetMarker value(String value) { this.value = value; return this; } /** - * Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. - * + *

Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10.

* @return value - */ - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getValue() { - return value; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } public void setValue(String value) { this.value = value; } - /** Return true if this WidgetMarker object is equal to o. */ + /** + * Return true if this WidgetMarker object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +153,13 @@ public boolean equals(Object o) { return false; } WidgetMarker widgetMarker = (WidgetMarker) o; - return Objects.equals(this.displayType, widgetMarker.displayType) - && Objects.equals(this.label, widgetMarker.label) - && Objects.equals(this.time, widgetMarker.time) - && Objects.equals(this.value, widgetMarker.value); + return Objects.equals(this.displayType, widgetMarker.displayType) && Objects.equals(this.label, widgetMarker.label) && Objects.equals(this.time, widgetMarker.time) && Objects.equals(this.value, widgetMarker.value); } + @Override public int hashCode() { - return Objects.hash(displayType, label, time, value); + return Objects.hash(displayType,label,time,value); } @Override @@ -161,7 +175,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetMessageDisplay.java b/src/main/java/com/datadog/api/client/v1/model/WidgetMessageDisplay.java index 80f05400b2d..77883f9c124 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetMessageDisplay.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetMessageDisplay.java @@ -6,30 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Amount of log lines to display */ +/** + *

Amount of log lines to display

+ */ @JsonSerialize(using = WidgetMessageDisplay.WidgetMessageDisplaySerializer.class) public class WidgetMessageDisplay { public static final WidgetMessageDisplay INLINE = new WidgetMessageDisplay("inline"); - public static final WidgetMessageDisplay EXPANDED_MEDIUM = - new WidgetMessageDisplay("expanded-md"); + public static final WidgetMessageDisplay EXPANDED_MEDIUM = new WidgetMessageDisplay("expanded-md"); public static final WidgetMessageDisplay EXPANDED_LARGE = new WidgetMessageDisplay("expanded-lg"); - private static final Set allowedValues = - new HashSet(Arrays.asList("inline", "expanded-md", "expanded-lg")); + private static final Set allowedValues = new HashSet(Arrays.asList("inline", "expanded-md", "expanded-lg")); private String value; @@ -42,20 +64,18 @@ public boolean isValid() { } public static class WidgetMessageDisplaySerializer extends StdSerializer { - public WidgetMessageDisplaySerializer(Class t) { - super(t); - } - - public WidgetMessageDisplaySerializer() { - this(null); - } - - @Override - public void serialize( - WidgetMessageDisplay value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetMessageDisplaySerializer(Class t) { + super(t); + } + + public WidgetMessageDisplaySerializer() { + this(null); + } + + @Override + public void serialize(WidgetMessageDisplay value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetMessageDisplay object is equal to o. */ + /** + * Return true if this WidgetMessageDisplay object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummaryDisplayFormat.java b/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummaryDisplayFormat.java index 4ddac92cc7a..294862278e1 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummaryDisplayFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummaryDisplayFormat.java @@ -6,33 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** What to display on the widget. */ -@JsonSerialize( - using = WidgetMonitorSummaryDisplayFormat.WidgetMonitorSummaryDisplayFormatSerializer.class) +/** + *

What to display on the widget.

+ */ +@JsonSerialize(using = WidgetMonitorSummaryDisplayFormat.WidgetMonitorSummaryDisplayFormatSerializer.class) public class WidgetMonitorSummaryDisplayFormat { - public static final WidgetMonitorSummaryDisplayFormat COUNTS = - new WidgetMonitorSummaryDisplayFormat("counts"); - public static final WidgetMonitorSummaryDisplayFormat COUNTS_AND_LIST = - new WidgetMonitorSummaryDisplayFormat("countsAndList"); - public static final WidgetMonitorSummaryDisplayFormat LIST = - new WidgetMonitorSummaryDisplayFormat("list"); + public static final WidgetMonitorSummaryDisplayFormat COUNTS = new WidgetMonitorSummaryDisplayFormat("counts"); + public static final WidgetMonitorSummaryDisplayFormat COUNTS_AND_LIST = new WidgetMonitorSummaryDisplayFormat("countsAndList"); + public static final WidgetMonitorSummaryDisplayFormat LIST = new WidgetMonitorSummaryDisplayFormat("list"); - private static final Set allowedValues = - new HashSet(Arrays.asList("counts", "countsAndList", "list")); + private static final Set allowedValues = new HashSet(Arrays.asList("counts", "countsAndList", "list")); private String value; @@ -44,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class WidgetMonitorSummaryDisplayFormatSerializer - extends StdSerializer { - public WidgetMonitorSummaryDisplayFormatSerializer(Class t) { - super(t); - } + public static class WidgetMonitorSummaryDisplayFormatSerializer extends StdSerializer { + public WidgetMonitorSummaryDisplayFormatSerializer(Class t) { + super(t); + } - public WidgetMonitorSummaryDisplayFormatSerializer() { - this(null); - } + public WidgetMonitorSummaryDisplayFormatSerializer() { + this(null); + } - @Override - public void serialize( - WidgetMonitorSummaryDisplayFormat value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(WidgetMonitorSummaryDisplayFormat value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetMonitorSummaryDisplayFormat object is equal to o. */ + /** + * Return true if this WidgetMonitorSummaryDisplayFormat object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummarySort.java b/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummarySort.java index 8a386372473..a096f4836e8 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummarySort.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetMonitorSummarySort.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget sorting methods. */ +/** + *

Widget sorting methods.

+ */ @JsonSerialize(using = WidgetMonitorSummarySort.WidgetMonitorSummarySortSerializer.class) public class WidgetMonitorSummarySort { @@ -27,53 +51,21 @@ public class WidgetMonitorSummarySort { public static final WidgetMonitorSummarySort GROUP = new WidgetMonitorSummarySort("group"); public static final WidgetMonitorSummarySort STATUS = new WidgetMonitorSummarySort("status"); public static final WidgetMonitorSummarySort TAGS = new WidgetMonitorSummarySort("tags"); - public static final WidgetMonitorSummarySort TRIGGERED = - new WidgetMonitorSummarySort("triggered"); - public static final WidgetMonitorSummarySort GROUP_ASCENDING = - new WidgetMonitorSummarySort("group,asc"); - public static final WidgetMonitorSummarySort GROUP_DESCENDING = - new WidgetMonitorSummarySort("group,desc"); - public static final WidgetMonitorSummarySort NAME_ASCENDING = - new WidgetMonitorSummarySort("name,asc"); - public static final WidgetMonitorSummarySort NAME_DESCENDING = - new WidgetMonitorSummarySort("name,desc"); - public static final WidgetMonitorSummarySort STATUS_ASCENDING = - new WidgetMonitorSummarySort("status,asc"); - public static final WidgetMonitorSummarySort STATUS_DESCENDING = - new WidgetMonitorSummarySort("status,desc"); - public static final WidgetMonitorSummarySort TAGS_ASCENDING = - new WidgetMonitorSummarySort("tags,asc"); - public static final WidgetMonitorSummarySort TAGS_DESCENDING = - new WidgetMonitorSummarySort("tags,desc"); - public static final WidgetMonitorSummarySort TRIGGERED_ASCENDING = - new WidgetMonitorSummarySort("triggered,asc"); - public static final WidgetMonitorSummarySort TRIGGERED_DESCENDING = - new WidgetMonitorSummarySort("triggered,desc"); - public static final WidgetMonitorSummarySort PRIORITY_ASCENDING = - new WidgetMonitorSummarySort("priority,asc"); - public static final WidgetMonitorSummarySort PRIORITY_DESCENDING = - new WidgetMonitorSummarySort("priority,desc"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "name", - "group", - "status", - "tags", - "triggered", - "group,asc", - "group,desc", - "name,asc", - "name,desc", - "status,asc", - "status,desc", - "tags,asc", - "tags,desc", - "triggered,asc", - "triggered,desc", - "priority,asc", - "priority,desc")); + public static final WidgetMonitorSummarySort TRIGGERED = new WidgetMonitorSummarySort("triggered"); + public static final WidgetMonitorSummarySort GROUP_ASCENDING = new WidgetMonitorSummarySort("group,asc"); + public static final WidgetMonitorSummarySort GROUP_DESCENDING = new WidgetMonitorSummarySort("group,desc"); + public static final WidgetMonitorSummarySort NAME_ASCENDING = new WidgetMonitorSummarySort("name,asc"); + public static final WidgetMonitorSummarySort NAME_DESCENDING = new WidgetMonitorSummarySort("name,desc"); + public static final WidgetMonitorSummarySort STATUS_ASCENDING = new WidgetMonitorSummarySort("status,asc"); + public static final WidgetMonitorSummarySort STATUS_DESCENDING = new WidgetMonitorSummarySort("status,desc"); + public static final WidgetMonitorSummarySort TAGS_ASCENDING = new WidgetMonitorSummarySort("tags,asc"); + public static final WidgetMonitorSummarySort TAGS_DESCENDING = new WidgetMonitorSummarySort("tags,desc"); + public static final WidgetMonitorSummarySort TRIGGERED_ASCENDING = new WidgetMonitorSummarySort("triggered,asc"); + public static final WidgetMonitorSummarySort TRIGGERED_DESCENDING = new WidgetMonitorSummarySort("triggered,desc"); + public static final WidgetMonitorSummarySort PRIORITY_ASCENDING = new WidgetMonitorSummarySort("priority,asc"); + public static final WidgetMonitorSummarySort PRIORITY_DESCENDING = new WidgetMonitorSummarySort("priority,desc"); + + private static final Set allowedValues = new HashSet(Arrays.asList("name", "group", "status", "tags", "triggered", "group,asc", "group,desc", "name,asc", "name,desc", "status,asc", "status,desc", "tags,asc", "tags,desc", "triggered,asc", "triggered,desc", "priority,asc", "priority,desc")); private String value; @@ -85,22 +77,19 @@ public boolean isValid() { this.value = value; } - public static class WidgetMonitorSummarySortSerializer - extends StdSerializer { - public WidgetMonitorSummarySortSerializer(Class t) { - super(t); - } + public static class WidgetMonitorSummarySortSerializer extends StdSerializer { + public WidgetMonitorSummarySortSerializer(Class t) { + super(t); + } - public WidgetMonitorSummarySortSerializer() { - this(null); - } + public WidgetMonitorSummarySortSerializer() { + this(null); + } - @Override - public void serialize( - WidgetMonitorSummarySort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(WidgetMonitorSummarySort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -112,7 +101,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetMonitorSummarySort object is equal to o. */ + /** + * Return true if this WidgetMonitorSummarySort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,7 +117,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetNodeType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetNodeType.java index 1ce3cbf024a..092205657f6 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetNodeType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetNodeType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Which type of node to use in the map. */ +/** + *

Which type of node to use in the map.

+ */ @JsonSerialize(using = WidgetNodeType.WidgetNodeTypeSerializer.class) public class WidgetNodeType { public static final WidgetNodeType HOST = new WidgetNodeType("host"); public static final WidgetNodeType CONTAINER = new WidgetNodeType("container"); - private static final Set allowedValues = - new HashSet(Arrays.asList("host", "container")); + private static final Set allowedValues = new HashSet(Arrays.asList("host", "container")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class WidgetNodeTypeSerializer extends StdSerializer { - public WidgetNodeTypeSerializer(Class t) { - super(t); - } - - public WidgetNodeTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetNodeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetNodeTypeSerializer(Class t) { + super(t); + } + + public WidgetNodeTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetNodeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetNodeType object is equal to o. */ + /** + * Return true if this WidgetNodeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetOrderBy.java b/src/main/java/com/datadog/api/client/v1/model/WidgetOrderBy.java index 63c5ce4e7a3..d8aa3d8eaa2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetOrderBy.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetOrderBy.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** What to order by. */ +/** + *

What to order by.

+ */ @JsonSerialize(using = WidgetOrderBy.WidgetOrderBySerializer.class) public class WidgetOrderBy { @@ -28,8 +52,7 @@ public class WidgetOrderBy { public static final WidgetOrderBy PRESENT = new WidgetOrderBy("present"); public static final WidgetOrderBy PAST = new WidgetOrderBy("past"); - private static final Set allowedValues = - new HashSet(Arrays.asList("change", "name", "present", "past")); + private static final Set allowedValues = new HashSet(Arrays.asList("change", "name", "present", "past")); private String value; @@ -42,19 +65,18 @@ public boolean isValid() { } public static class WidgetOrderBySerializer extends StdSerializer { - public WidgetOrderBySerializer(Class t) { - super(t); - } - - public WidgetOrderBySerializer() { - this(null); - } - - @Override - public void serialize(WidgetOrderBy value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetOrderBySerializer(Class t) { + super(t); + } + + public WidgetOrderBySerializer() { + this(null); + } + + @Override + public void serialize(WidgetOrderBy value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetOrderBy object is equal to o. */ + /** + * Return true if this WidgetOrderBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetPalette.java b/src/main/java/com/datadog/api/client/v1/model/WidgetPalette.java index abd3436381e..f0008b79f34 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetPalette.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetPalette.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Color palette to apply. */ +/** + *

Color palette to apply.

+ */ @JsonSerialize(using = WidgetPalette.WidgetPaletteSerializer.class) public class WidgetPalette { @@ -39,34 +63,11 @@ public class WidgetPalette { public static final WidgetPalette WHITE_ON_RED = new WidgetPalette("white_on_red"); public static final WidgetPalette WHITE_ON_YELLOW = new WidgetPalette("white_on_yellow"); public static final WidgetPalette YELLOW_ON_WHITE = new WidgetPalette("yellow_on_white"); - public static final WidgetPalette BLACK_ON_LIGHT_YELLOW = - new WidgetPalette("black_on_light_yellow"); - public static final WidgetPalette BLACK_ON_LIGHT_GREEN = - new WidgetPalette("black_on_light_green"); + public static final WidgetPalette BLACK_ON_LIGHT_YELLOW = new WidgetPalette("black_on_light_yellow"); + public static final WidgetPalette BLACK_ON_LIGHT_GREEN = new WidgetPalette("black_on_light_green"); public static final WidgetPalette BLACK_ON_LIGHT_RED = new WidgetPalette("black_on_light_red"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "blue", - "custom_bg", - "custom_image", - "custom_text", - "gray_on_white", - "grey", - "green", - "orange", - "red", - "red_on_white", - "white_on_gray", - "white_on_green", - "green_on_white", - "white_on_red", - "white_on_yellow", - "yellow_on_white", - "black_on_light_yellow", - "black_on_light_green", - "black_on_light_red")); + private static final Set allowedValues = new HashSet(Arrays.asList("blue", "custom_bg", "custom_image", "custom_text", "gray_on_white", "grey", "green", "orange", "red", "red_on_white", "white_on_gray", "white_on_green", "green_on_white", "white_on_red", "white_on_yellow", "yellow_on_white", "black_on_light_yellow", "black_on_light_green", "black_on_light_red")); private String value; @@ -79,19 +80,18 @@ public boolean isValid() { } public static class WidgetPaletteSerializer extends StdSerializer { - public WidgetPaletteSerializer(Class t) { - super(t); - } - - public WidgetPaletteSerializer() { - this(null); - } - - @Override - public void serialize(WidgetPalette value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetPaletteSerializer(Class t) { + super(t); + } + + public WidgetPaletteSerializer() { + this(null); + } + + @Override + public void serialize(WidgetPalette value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -103,7 +103,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetPalette object is equal to o. */ + /** + * Return true if this WidgetPalette object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,7 +119,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetRequestStyle.java b/src/main/java/com/datadog/api/client/v1/model/WidgetRequestStyle.java index 530bc96abc6..a1a07420cd2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetRequestStyle.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetRequestStyle.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Define request widget style. */ + +/** + *

Define request widget style.

+ */ @JsonPropertyOrder({ WidgetRequestStyle.JSON_PROPERTY_LINE_TYPE, WidgetRequestStyle.JSON_PROPERTY_LINE_WIDTH, WidgetRequestStyle.JSON_PROPERTY_PALETTE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetRequestStyle { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LINE_TYPE = "line_type"; private WidgetLineType lineType; @@ -38,24 +58,22 @@ public WidgetRequestStyle lineType(WidgetLineType lineType) { } /** - * Type of lines displayed. - * + *

Type of lines displayed.

* @return lineType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetLineType getLineType() { - return lineType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetLineType getLineType() { + return lineType; + } public void setLineType(WidgetLineType lineType) { if (!lineType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.lineType = lineType; } - public WidgetRequestStyle lineWidth(WidgetLineWidth lineWidth) { this.lineWidth = lineWidth; this.unparsed |= !lineWidth.isValid(); @@ -63,46 +81,45 @@ public WidgetRequestStyle lineWidth(WidgetLineWidth lineWidth) { } /** - * Width of line displayed. - * + *

Width of line displayed.

* @return lineWidth - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINE_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetLineWidth getLineWidth() { - return lineWidth; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINE_WIDTH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetLineWidth getLineWidth() { + return lineWidth; + } public void setLineWidth(WidgetLineWidth lineWidth) { if (!lineWidth.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.lineWidth = lineWidth; } - public WidgetRequestStyle palette(String palette) { this.palette = palette; return this; } /** - * Color palette to apply to the widget. - * + *

Color palette to apply to the widget.

* @return palette - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PALETTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPalette() { - return palette; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PALETTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPalette() { + return palette; + } public void setPalette(String palette) { this.palette = palette; } - /** Return true if this WidgetRequestStyle object is equal to o. */ + /** + * Return true if this WidgetRequestStyle object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,14 +129,13 @@ public boolean equals(Object o) { return false; } WidgetRequestStyle widgetRequestStyle = (WidgetRequestStyle) o; - return Objects.equals(this.lineType, widgetRequestStyle.lineType) - && Objects.equals(this.lineWidth, widgetRequestStyle.lineWidth) - && Objects.equals(this.palette, widgetRequestStyle.palette); + return Objects.equals(this.lineType, widgetRequestStyle.lineType) && Objects.equals(this.lineWidth, widgetRequestStyle.lineWidth) && Objects.equals(this.palette, widgetRequestStyle.palette); } + @Override public int hashCode() { - return Objects.hash(lineType, lineWidth, palette); + return Objects.hash(lineType,lineWidth,palette); } @Override @@ -134,7 +150,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetServiceSummaryDisplayFormat.java b/src/main/java/com/datadog/api/client/v1/model/WidgetServiceSummaryDisplayFormat.java index 13a93d86d62..0be41572f55 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetServiceSummaryDisplayFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetServiceSummaryDisplayFormat.java @@ -6,33 +6,52 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Number of columns to display. */ -@JsonSerialize( - using = WidgetServiceSummaryDisplayFormat.WidgetServiceSummaryDisplayFormatSerializer.class) +/** + *

Number of columns to display.

+ */ +@JsonSerialize(using = WidgetServiceSummaryDisplayFormat.WidgetServiceSummaryDisplayFormatSerializer.class) public class WidgetServiceSummaryDisplayFormat { - public static final WidgetServiceSummaryDisplayFormat ONE_COLUMN = - new WidgetServiceSummaryDisplayFormat("one_column"); - public static final WidgetServiceSummaryDisplayFormat TWO_COLUMN = - new WidgetServiceSummaryDisplayFormat("two_column"); - public static final WidgetServiceSummaryDisplayFormat THREE_COLUMN = - new WidgetServiceSummaryDisplayFormat("three_column"); + public static final WidgetServiceSummaryDisplayFormat ONE_COLUMN = new WidgetServiceSummaryDisplayFormat("one_column"); + public static final WidgetServiceSummaryDisplayFormat TWO_COLUMN = new WidgetServiceSummaryDisplayFormat("two_column"); + public static final WidgetServiceSummaryDisplayFormat THREE_COLUMN = new WidgetServiceSummaryDisplayFormat("three_column"); - private static final Set allowedValues = - new HashSet(Arrays.asList("one_column", "two_column", "three_column")); + private static final Set allowedValues = new HashSet(Arrays.asList("one_column", "two_column", "three_column")); private String value; @@ -44,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class WidgetServiceSummaryDisplayFormatSerializer - extends StdSerializer { - public WidgetServiceSummaryDisplayFormatSerializer(Class t) { - super(t); - } + public static class WidgetServiceSummaryDisplayFormatSerializer extends StdSerializer { + public WidgetServiceSummaryDisplayFormatSerializer(Class t) { + super(t); + } - public WidgetServiceSummaryDisplayFormatSerializer() { - this(null); - } + public WidgetServiceSummaryDisplayFormatSerializer() { + this(null); + } - @Override - public void serialize( - WidgetServiceSummaryDisplayFormat value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(WidgetServiceSummaryDisplayFormat value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetServiceSummaryDisplayFormat object is equal to o. */ + /** + * Return true if this WidgetServiceSummaryDisplayFormat object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetSizeFormat.java b/src/main/java/com/datadog/api/client/v1/model/WidgetSizeFormat.java index 37e335d08aa..d6c82cdcc3f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetSizeFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetSizeFormat.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Size of the widget. */ +/** + *

Size of the widget.

+ */ @JsonSerialize(using = WidgetSizeFormat.WidgetSizeFormatSerializer.class) public class WidgetSizeFormat { @@ -27,8 +51,7 @@ public class WidgetSizeFormat { public static final WidgetSizeFormat MEDIUM = new WidgetSizeFormat("medium"); public static final WidgetSizeFormat LARGE = new WidgetSizeFormat("large"); - private static final Set allowedValues = - new HashSet(Arrays.asList("small", "medium", "large")); + private static final Set allowedValues = new HashSet(Arrays.asList("small", "medium", "large")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetSizeFormatSerializer extends StdSerializer { - public WidgetSizeFormatSerializer(Class t) { - super(t); - } - - public WidgetSizeFormatSerializer() { - this(null); - } - - @Override - public void serialize(WidgetSizeFormat value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetSizeFormatSerializer(Class t) { + super(t); + } + + public WidgetSizeFormatSerializer() { + this(null); + } + + @Override + public void serialize(WidgetSizeFormat value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetSizeFormat object is equal to o. */ + /** + * Return true if this WidgetSizeFormat object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetSort.java b/src/main/java/com/datadog/api/client/v1/model/WidgetSort.java index 59ccfa1a0ca..5a9e8cd7f5a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetSort.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Widget sorting methods. */ +/** + *

Widget sorting methods.

+ */ @JsonSerialize(using = WidgetSort.WidgetSortSerializer.class) public class WidgetSort { public static final WidgetSort ASCENDING = new WidgetSort("asc"); public static final WidgetSort DESCENDING = new WidgetSort("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class WidgetSortSerializer extends StdSerializer { - public WidgetSortSerializer(Class t) { - super(t); - } - - public WidgetSortSerializer() { - this(null); - } - - @Override - public void serialize(WidgetSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetSortSerializer(Class t) { + super(t); + } + + public WidgetSortSerializer() { + this(null); + } + + @Override + public void serialize(WidgetSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetSort object is equal to o. */ + /** + * Return true if this WidgetSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetStyle.java b/src/main/java/com/datadog/api/client/v1/model/WidgetStyle.java index b3f77a44f9a..748c7151b1f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetStyle.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetStyle.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Widget style definition. */ -@JsonPropertyOrder({WidgetStyle.JSON_PROPERTY_PALETTE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Widget style definition.

+ */ +@JsonPropertyOrder({ + WidgetStyle.JSON_PROPERTY_PALETTE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetStyle { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PALETTE = "palette"; private String palette; @@ -27,22 +49,23 @@ public WidgetStyle palette(String palette) { } /** - * Color palette to apply to the widget. - * + *

Color palette to apply to the widget.

* @return palette - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PALETTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPalette() { - return palette; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PALETTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPalette() { + return palette; + } public void setPalette(String palette) { this.palette = palette; } - /** Return true if this WidgetStyle object is equal to o. */ + /** + * Return true if this WidgetStyle object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.palette, widgetStyle.palette); } + @Override public int hashCode() { return Objects.hash(palette); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetSummaryType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetSummaryType.java index 60b32dfdb15..ed696b68033 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetSummaryType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetSummaryType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Which summary type should be used. */ +/** + *

Which summary type should be used.

+ */ @JsonSerialize(using = WidgetSummaryType.WidgetSummaryTypeSerializer.class) public class WidgetSummaryType { @@ -27,8 +51,7 @@ public class WidgetSummaryType { public static final WidgetSummaryType GROUPS = new WidgetSummaryType("groups"); public static final WidgetSummaryType COMBINED = new WidgetSummaryType("combined"); - private static final Set allowedValues = - new HashSet(Arrays.asList("monitors", "groups", "combined")); + private static final Set allowedValues = new HashSet(Arrays.asList("monitors", "groups", "combined")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetSummaryTypeSerializer extends StdSerializer { - public WidgetSummaryTypeSerializer(Class t) { - super(t); - } - - public WidgetSummaryTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetSummaryType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetSummaryTypeSerializer(Class t) { + super(t); + } + + public WidgetSummaryTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetSummaryType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetSummaryType object is equal to o. */ + /** + * Return true if this WidgetSummaryType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetTextAlign.java b/src/main/java/com/datadog/api/client/v1/model/WidgetTextAlign.java index 5c0636db75f..c6b25cd548a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetTextAlign.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetTextAlign.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** How to align the text on the widget. */ +/** + *

How to align the text on the widget.

+ */ @JsonSerialize(using = WidgetTextAlign.WidgetTextAlignSerializer.class) public class WidgetTextAlign { @@ -27,8 +51,7 @@ public class WidgetTextAlign { public static final WidgetTextAlign LEFT = new WidgetTextAlign("left"); public static final WidgetTextAlign RIGHT = new WidgetTextAlign("right"); - private static final Set allowedValues = - new HashSet(Arrays.asList("center", "left", "right")); + private static final Set allowedValues = new HashSet(Arrays.asList("center", "left", "right")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetTextAlignSerializer extends StdSerializer { - public WidgetTextAlignSerializer(Class t) { - super(t); - } - - public WidgetTextAlignSerializer() { - this(null); - } - - @Override - public void serialize(WidgetTextAlign value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetTextAlignSerializer(Class t) { + super(t); + } + + public WidgetTextAlignSerializer() { + this(null); + } + + @Override + public void serialize(WidgetTextAlign value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetTextAlign object is equal to o. */ + /** + * Return true if this WidgetTextAlign object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetTickEdge.java b/src/main/java/com/datadog/api/client/v1/model/WidgetTickEdge.java index 24de448e2bb..89b0f4be314 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetTickEdge.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetTickEdge.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Define how you want to align the text on the widget. */ +/** + *

Define how you want to align the text on the widget.

+ */ @JsonSerialize(using = WidgetTickEdge.WidgetTickEdgeSerializer.class) public class WidgetTickEdge { @@ -28,8 +52,7 @@ public class WidgetTickEdge { public static final WidgetTickEdge RIGHT = new WidgetTickEdge("right"); public static final WidgetTickEdge TOP = new WidgetTickEdge("top"); - private static final Set allowedValues = - new HashSet(Arrays.asList("bottom", "left", "right", "top")); + private static final Set allowedValues = new HashSet(Arrays.asList("bottom", "left", "right", "top")); private String value; @@ -42,19 +65,18 @@ public boolean isValid() { } public static class WidgetTickEdgeSerializer extends StdSerializer { - public WidgetTickEdgeSerializer(Class t) { - super(t); - } - - public WidgetTickEdgeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetTickEdge value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetTickEdgeSerializer(Class t) { + super(t); + } + + public WidgetTickEdgeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetTickEdge value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetTickEdge object is equal to o. */ + /** + * Return true if this WidgetTickEdge object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetTime.java b/src/main/java/com/datadog/api/client/v1/model/WidgetTime.java index 3c00c67b66a..bce87b48ab7 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetTime.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetTime.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Time setting for the widget. */ -@JsonPropertyOrder({WidgetTime.JSON_PROPERTY_LIVE_SPAN}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Time setting for the widget.

+ */ +@JsonPropertyOrder({ + WidgetTime.JSON_PROPERTY_LIVE_SPAN +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetTime { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LIVE_SPAN = "live_span"; private WidgetLiveSpan liveSpan; @@ -28,25 +50,26 @@ public WidgetTime liveSpan(WidgetLiveSpan liveSpan) { } /** - * The available timeframes depend on the widget you are using. - * + *

The available timeframes depend on the widget you are using.

* @return liveSpan - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIVE_SPAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WidgetLiveSpan getLiveSpan() { - return liveSpan; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVE_SPAN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public WidgetLiveSpan getLiveSpan() { + return liveSpan; + } public void setLiveSpan(WidgetLiveSpan liveSpan) { if (!liveSpan.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.liveSpan = liveSpan; } - /** Return true if this WidgetTime object is equal to o. */ + /** + * Return true if this WidgetTime object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -59,6 +82,7 @@ public boolean equals(Object o) { return Objects.equals(this.liveSpan, widgetTime.liveSpan); } + @Override public int hashCode() { return Objects.hash(liveSpan); @@ -74,7 +98,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetTimeWindows.java b/src/main/java/com/datadog/api/client/v1/model/WidgetTimeWindows.java index ba338a0aa44..34436672222 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetTimeWindows.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetTimeWindows.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Define a time window. */ +/** + *

Define a time window.

+ */ @JsonSerialize(using = WidgetTimeWindows.WidgetTimeWindowsSerializer.class) public class WidgetTimeWindows { @@ -32,17 +56,7 @@ public class WidgetTimeWindows { public static final WidgetTimeWindows PREVIOUS_MONTH = new WidgetTimeWindows("previous_month"); public static final WidgetTimeWindows GLOBAL_TIME = new WidgetTimeWindows("global_time"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "7d", - "30d", - "90d", - "week_to_date", - "previous_week", - "month_to_date", - "previous_month", - "global_time")); + private static final Set allowedValues = new HashSet(Arrays.asList("7d", "30d", "90d", "week_to_date", "previous_week", "month_to_date", "previous_month", "global_time")); private String value; @@ -55,19 +69,18 @@ public boolean isValid() { } public static class WidgetTimeWindowsSerializer extends StdSerializer { - public WidgetTimeWindowsSerializer(Class t) { - super(t); - } - - public WidgetTimeWindowsSerializer() { - this(null); - } - - @Override - public void serialize(WidgetTimeWindows value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetTimeWindowsSerializer(Class t) { + super(t); + } + + public WidgetTimeWindowsSerializer() { + this(null); + } + + @Override + public void serialize(WidgetTimeWindows value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -79,7 +92,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetTimeWindows object is equal to o. */ + /** + * Return true if this WidgetTimeWindows object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,7 +108,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetVerticalAlign.java b/src/main/java/com/datadog/api/client/v1/model/WidgetVerticalAlign.java index f3f7a4c9614..9dbe38d26d2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetVerticalAlign.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetVerticalAlign.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Vertical alignment. */ +/** + *

Vertical alignment.

+ */ @JsonSerialize(using = WidgetVerticalAlign.WidgetVerticalAlignSerializer.class) public class WidgetVerticalAlign { @@ -27,8 +51,7 @@ public class WidgetVerticalAlign { public static final WidgetVerticalAlign TOP = new WidgetVerticalAlign("top"); public static final WidgetVerticalAlign BOTTOM = new WidgetVerticalAlign("bottom"); - private static final Set allowedValues = - new HashSet(Arrays.asList("center", "top", "bottom")); + private static final Set allowedValues = new HashSet(Arrays.asList("center", "top", "bottom")); private String value; @@ -41,20 +64,18 @@ public boolean isValid() { } public static class WidgetVerticalAlignSerializer extends StdSerializer { - public WidgetVerticalAlignSerializer(Class t) { - super(t); - } - - public WidgetVerticalAlignSerializer() { - this(null); - } - - @Override - public void serialize( - WidgetVerticalAlign value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetVerticalAlignSerializer(Class t) { + super(t); + } + + public WidgetVerticalAlignSerializer() { + this(null); + } + + @Override + public void serialize(WidgetVerticalAlign value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetVerticalAlign object is equal to o. */ + /** + * Return true if this WidgetVerticalAlign object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetViewMode.java b/src/main/java/com/datadog/api/client/v1/model/WidgetViewMode.java index 29022a9c421..14e47cc6a9d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetViewMode.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetViewMode.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Define how you want the SLO to be displayed. */ +/** + *

Define how you want the SLO to be displayed.

+ */ @JsonSerialize(using = WidgetViewMode.WidgetViewModeSerializer.class) public class WidgetViewMode { @@ -27,8 +51,7 @@ public class WidgetViewMode { public static final WidgetViewMode COMPONENT = new WidgetViewMode("component"); public static final WidgetViewMode BOTH = new WidgetViewMode("both"); - private static final Set allowedValues = - new HashSet(Arrays.asList("overall", "component", "both")); + private static final Set allowedValues = new HashSet(Arrays.asList("overall", "component", "both")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class WidgetViewModeSerializer extends StdSerializer { - public WidgetViewModeSerializer(Class t) { - super(t); - } - - public WidgetViewModeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetViewMode value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetViewModeSerializer(Class t) { + super(t); + } + + public WidgetViewModeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetViewMode value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetViewMode object is equal to o. */ + /** + * Return true if this WidgetViewMode object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetVizType.java b/src/main/java/com/datadog/api/client/v1/model/WidgetVizType.java index 9c9573c3f68..77f58c3a4a2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetVizType.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetVizType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v1.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Whether to display the Alert Graph as a timeseries or a top list. */ +/** + *

Whether to display the Alert Graph as a timeseries or a top list.

+ */ @JsonSerialize(using = WidgetVizType.WidgetVizTypeSerializer.class) public class WidgetVizType { public static final WidgetVizType TIMESERIES = new WidgetVizType("timeseries"); public static final WidgetVizType TOPLIST = new WidgetVizType("toplist"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries", "toplist")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries", "toplist")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class WidgetVizTypeSerializer extends StdSerializer { - public WidgetVizTypeSerializer(Class t) { - super(t); - } - - public WidgetVizTypeSerializer() { - this(null); - } - - @Override - public void serialize(WidgetVizType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public WidgetVizTypeSerializer(Class t) { + super(t); + } + + public WidgetVizTypeSerializer() { + this(null); + } + + @Override + public void serialize(WidgetVizType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this WidgetVizType object is equal to o. */ + /** + * Return true if this WidgetVizType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/api/AuditApi.java b/src/main/java/com/datadog/api/client/v2/api/AuditApi.java index 67b4f05bbc3..144fefb4c06 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AuditApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AuditApi.java @@ -1,30 +1,36 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.AuditLogsEvent; -import com.datadog.api.client.v2.model.AuditLogsEventsResponse; -import com.datadog.api.client.v2.model.AuditLogsQueryPageOptions; -import com.datadog.api.client.v2.model.AuditLogsSearchEventsRequest; -import com.datadog.api.client.v2.model.AuditLogsSort; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.AuditLogsEventsResponse; +import com.datadog.api.client.v2.model.AuditLogsSort; +import com.datadog.api.client.v2.model.AuditLogsSearchEventsRequest; +import com.datadog.api.client.v2.model.AuditLogsEvent; +import com.datadog.api.client.v2.model.AuditLogsEvent; +import com.datadog.api.client.v2.model.AuditLogsSearchEventsRequest; +import com.datadog.api.client.v2.model.AuditLogsQueryPageOptions; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditApi { private ApiClient apiClient; - public AuditApi() { this(ApiClient.getDefaultApiClient()); } @@ -51,7 +57,9 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to listAuditLogs. */ + /** + * Manage optional parameters to listAuditLogs. + */ public static class ListAuditLogsOptionalParameters { private String filterQuery; private OffsetDateTime filterFrom; @@ -62,7 +70,6 @@ public static class ListAuditLogsOptionalParameters { /** * Set filterQuery. - * * @param filterQuery Search query following Audit Logs syntax. (optional) * @return ListAuditLogsOptionalParameters */ @@ -73,7 +80,6 @@ public ListAuditLogsOptionalParameters filterQuery(String filterQuery) { /** * Set filterFrom. - * * @param filterFrom Minimum timestamp for requested events. (optional) * @return ListAuditLogsOptionalParameters */ @@ -84,7 +90,6 @@ public ListAuditLogsOptionalParameters filterFrom(OffsetDateTime filterFrom) { /** * Set filterTo. - * * @param filterTo Maximum timestamp for requested events. (optional) * @return ListAuditLogsOptionalParameters */ @@ -95,7 +100,6 @@ public ListAuditLogsOptionalParameters filterTo(OffsetDateTime filterTo) { /** * Set sort. - * * @param sort Order of events in results. (optional) * @return ListAuditLogsOptionalParameters */ @@ -106,9 +110,7 @@ public ListAuditLogsOptionalParameters sort(AuditLogsSort sort) { /** * Set pageCursor. - * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor List following results with a cursor provided in the previous query. (optional) * @return ListAuditLogsOptionalParameters */ public ListAuditLogsOptionalParameters pageCursor(String pageCursor) { @@ -118,7 +120,6 @@ public ListAuditLogsOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. - * * @param pageLimit Maximum number of events in the response. (optional, default to 10) * @return ListAuditLogsOptionalParameters */ @@ -129,126 +130,112 @@ public ListAuditLogsOptionalParameters pageLimit(Integer pageLimit) { } /** - * Get a list of Audit Logs events. - * - *

See {@link #listAuditLogsWithHttpInfo}. - * - * @return AuditLogsEventsResponse - * @throws ApiException if fails to make API call - */ - public AuditLogsEventsResponse listAuditLogs() throws ApiException { + * Get a list of Audit Logs events. + * + * See {@link #listAuditLogsWithHttpInfo}. + * + * @return AuditLogsEventsResponse + * @throws ApiException if fails to make API call + */ + public AuditLogsEventsResponse listAuditLogs () throws ApiException { return listAuditLogsWithHttpInfo(new ListAuditLogsOptionalParameters()).getData(); } /** - * Get a list of Audit Logs events. - * - *

See {@link #listAuditLogsWithHttpInfoAsync}. - * - * @return CompletableFuture<AuditLogsEventsResponse> - */ - public CompletableFuture listAuditLogsAsync() { - return listAuditLogsWithHttpInfoAsync(new ListAuditLogsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of Audit Logs events. + * + * See {@link #listAuditLogsWithHttpInfoAsync}. + * + * @return CompletableFuture<AuditLogsEventsResponse> + */ + public CompletableFuturelistAuditLogsAsync() { + return listAuditLogsWithHttpInfoAsync(new ListAuditLogsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of Audit Logs events. - * - *

See {@link #listAuditLogsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return AuditLogsEventsResponse - * @throws ApiException if fails to make API call - */ - public AuditLogsEventsResponse listAuditLogs(ListAuditLogsOptionalParameters parameters) - throws ApiException { + * Get a list of Audit Logs events. + * + * See {@link #listAuditLogsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return AuditLogsEventsResponse + * @throws ApiException if fails to make API call + */ + public AuditLogsEventsResponse listAuditLogs(ListAuditLogsOptionalParameters parameters) throws ApiException { return listAuditLogsWithHttpInfo(parameters).getData(); } /** - * Get a list of Audit Logs events. - * - *

See {@link #listAuditLogsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<AuditLogsEventsResponse> - */ - public CompletableFuture listAuditLogsAsync( - ListAuditLogsOptionalParameters parameters) { - return listAuditLogsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of Audit Logs events. + * + * See {@link #listAuditLogsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AuditLogsEventsResponse> + */ + public CompletableFuturelistAuditLogsAsync(ListAuditLogsOptionalParameters parameters) { + return listAuditLogsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of Audit Logs events. - * - *

See {@link #listAuditLogsWithHttpInfo}. - * - * @return PaginationIterable<AuditLogsEvent> - */ + * Get a list of Audit Logs events. + * + * See {@link #listAuditLogsWithHttpInfo}. + * + * @return PaginationIterable<AuditLogsEvent> + */ public PaginationIterable listAuditLogsWithPagination() { ListAuditLogsOptionalParameters parameters = new ListAuditLogsOptionalParameters(); return listAuditLogsWithPagination(parameters); } /** - * Get a list of Audit Logs events. - * - *

See {@link #listAuditLogsWithHttpInfo}. - * - * @return AuditLogsEventsResponse - */ - public PaginationIterable listAuditLogsWithPagination( - ListAuditLogsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a list of Audit Logs events. + * + * See {@link #listAuditLogsWithHttpInfo}. + * + * @return AuditLogsEventsResponse + */ + public PaginationIterable listAuditLogsWithPagination(ListAuditLogsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + + + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "listAuditLogs", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listAuditLogs", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + return iterator; } + /** - * List endpoint returns events that match a Audit Logs search query. Results are - * paginated. - * - *

Use this endpoint to see your latest Audit Logs events. + *

List endpoint returns events that match a Audit Logs search query. + * Results are paginated.

+ *

Use this endpoint to see your latest Audit Logs events.

* * @param parameters Optional parameters for the request. * @return ApiResponse<AuditLogsEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -257,8 +244,7 @@ public PaginationIterable listAuditLogsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listAuditLogsWithHttpInfo( - ListAuditLogsOptionalParameters parameters) throws ApiException { + public ApiResponse listAuditLogsWithHttpInfo(ListAuditLogsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -269,6 +255,7 @@ public ApiResponse listAuditLogsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/audit/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -279,36 +266,19 @@ public ApiResponse listAuditLogsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuditApi.listAuditLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.AuditApi.listAuditLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of Audit Logs events. * - *

See {@link #listAuditLogsWithHttpInfo}. + * See {@link #listAuditLogsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<AuditLogsEventsResponse>> */ - public CompletableFuture> listAuditLogsWithHttpInfoAsync( - ListAuditLogsOptionalParameters parameters) { + public CompletableFuture> listAuditLogsWithHttpInfoAsync(ListAuditLogsOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -319,6 +289,7 @@ public CompletableFuture> listAuditLogsWith // create path and map variables String localVarPath = "/api/v2/audit/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -331,39 +302,24 @@ public CompletableFuture> listAuditLogsWith Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuditApi.listAuditLogs", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuditApi.listAuditLogs", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchAuditLogs. */ + /** + * Manage optional parameters to searchAuditLogs. + */ public static class SearchAuditLogsOptionalParameters { private AuditLogsSearchEventsRequest body; /** * Set body. - * - * @param body (optional) + * @param body (optional) * @return SearchAuditLogsOptionalParameters */ public SearchAuditLogsOptionalParameters body(AuditLogsSearchEventsRequest body) { @@ -373,134 +329,122 @@ public SearchAuditLogsOptionalParameters body(AuditLogsSearchEventsRequest body) } /** - * Search Audit Logs events. - * - *

See {@link #searchAuditLogsWithHttpInfo}. - * - * @return AuditLogsEventsResponse - * @throws ApiException if fails to make API call - */ - public AuditLogsEventsResponse searchAuditLogs() throws ApiException { + * Search Audit Logs events. + * + * See {@link #searchAuditLogsWithHttpInfo}. + * + * @return AuditLogsEventsResponse + * @throws ApiException if fails to make API call + */ + public AuditLogsEventsResponse searchAuditLogs () throws ApiException { return searchAuditLogsWithHttpInfo(new SearchAuditLogsOptionalParameters()).getData(); } /** - * Search Audit Logs events. - * - *

See {@link #searchAuditLogsWithHttpInfoAsync}. - * - * @return CompletableFuture<AuditLogsEventsResponse> - */ - public CompletableFuture searchAuditLogsAsync() { - return searchAuditLogsWithHttpInfoAsync(new SearchAuditLogsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search Audit Logs events. + * + * See {@link #searchAuditLogsWithHttpInfoAsync}. + * + * @return CompletableFuture<AuditLogsEventsResponse> + */ + public CompletableFuturesearchAuditLogsAsync() { + return searchAuditLogsWithHttpInfoAsync(new SearchAuditLogsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search Audit Logs events. - * - *

See {@link #searchAuditLogsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return AuditLogsEventsResponse - * @throws ApiException if fails to make API call - */ - public AuditLogsEventsResponse searchAuditLogs(SearchAuditLogsOptionalParameters parameters) - throws ApiException { + * Search Audit Logs events. + * + * See {@link #searchAuditLogsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return AuditLogsEventsResponse + * @throws ApiException if fails to make API call + */ + public AuditLogsEventsResponse searchAuditLogs(SearchAuditLogsOptionalParameters parameters) throws ApiException { return searchAuditLogsWithHttpInfo(parameters).getData(); } /** - * Search Audit Logs events. - * - *

See {@link #searchAuditLogsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<AuditLogsEventsResponse> - */ - public CompletableFuture searchAuditLogsAsync( - SearchAuditLogsOptionalParameters parameters) { - return searchAuditLogsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search Audit Logs events. + * + * See {@link #searchAuditLogsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AuditLogsEventsResponse> + */ + public CompletableFuturesearchAuditLogsAsync(SearchAuditLogsOptionalParameters parameters) { + return searchAuditLogsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Search Audit Logs events. - * - *

See {@link #searchAuditLogsWithHttpInfo}. - * - * @return PaginationIterable<AuditLogsEvent> - */ + * Search Audit Logs events. + * + * See {@link #searchAuditLogsWithHttpInfo}. + * + * @return PaginationIterable<AuditLogsEvent> + */ public PaginationIterable searchAuditLogsWithPagination() { SearchAuditLogsOptionalParameters parameters = new SearchAuditLogsOptionalParameters(); return searchAuditLogsWithPagination(parameters); } /** - * Search Audit Logs events. - * - *

See {@link #searchAuditLogsWithHttpInfo}. - * - * @return AuditLogsEventsResponse - */ - public PaginationIterable searchAuditLogsWithPagination( - SearchAuditLogsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { + * Search Audit Logs events. + * + * See {@link #searchAuditLogsWithHttpInfo}. + * + * @return AuditLogsEventsResponse + */ + public PaginationIterable searchAuditLogsWithPagination(SearchAuditLogsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.body == null) { parameters.body(new AuditLogsSearchEventsRequest()); - } + } - if (parameters.body.getPage() == null) { + if(parameters.body.getPage() == null) { parameters.body.setPage(new AuditLogsQueryPageOptions()); - } + } - if (parameters.body.getPage().getLimit() == null) { + + + + if (parameters.body.getPage().getLimit() == null) { limit = 10; parameters.body.getPage().setLimit(limit); - } else { + } else { limit = parameters.body.getPage().getLimit(); - } + } - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchAuditLogs", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "searchAuditLogs", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * List endpoint returns Audit Logs events that match an Audit search query. Results are - * paginated. - * - *

Use this endpoint to build complex Audit Logs events filtering and search. + *

List endpoint returns Audit Logs events that match an Audit search query. + * Results are paginated.

+ *

Use this endpoint to build complex Audit Logs events filtering and search.

* * @param parameters Optional parameters for the request. * @return ApiResponse<AuditLogsEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -509,74 +453,44 @@ public PaginationIterable searchAuditLogsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchAuditLogsWithHttpInfo( - SearchAuditLogsOptionalParameters parameters) throws ApiException { + public ApiResponse searchAuditLogsWithHttpInfo(SearchAuditLogsOptionalParameters parameters) throws ApiException { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/audit/events/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuditApi.searchAuditLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.AuditApi.searchAuditLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search Audit Logs events. * - *

See {@link #searchAuditLogsWithHttpInfo}. + * See {@link #searchAuditLogsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<AuditLogsEventsResponse>> */ - public CompletableFuture> searchAuditLogsWithHttpInfoAsync( - SearchAuditLogsOptionalParameters parameters) { + public CompletableFuture> searchAuditLogsWithHttpInfoAsync(SearchAuditLogsOptionalParameters parameters) { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/audit/events/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuditApi.searchAuditLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuditApi.searchAuditLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/AuthNMappingsApi.java b/src/main/java/com/datadog/api/client/v2/api/AuthNMappingsApi.java index 89769245822..a542b798d62 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AuthNMappingsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AuthNMappingsApi.java @@ -1,27 +1,34 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.AuthNMappingCreateRequest; -import com.datadog.api.client.v2.model.AuthNMappingResponse; -import com.datadog.api.client.v2.model.AuthNMappingUpdateRequest; -import com.datadog.api.client.v2.model.AuthNMappingsResponse; -import com.datadog.api.client.v2.model.AuthNMappingsSort; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.AuthNMappingsResponse; +import com.datadog.api.client.v2.model.AuthNMappingsSort; +import com.datadog.api.client.v2.model.AuthNMappingResponse; +import com.datadog.api.client.v2.model.AuthNMappingCreateRequest; +import com.datadog.api.client.v2.model.AuthNMappingUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingsApi { private ApiClient apiClient; - public AuthNMappingsApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,44 +56,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an AuthN Mapping. - * - *

See {@link #createAuthNMappingWithHttpInfo}. - * - * @param body (required) - * @return AuthNMappingResponse - * @throws ApiException if fails to make API call - */ - public AuthNMappingResponse createAuthNMapping(AuthNMappingCreateRequest body) - throws ApiException { + * Create an AuthN Mapping. + * + * See {@link #createAuthNMappingWithHttpInfo}. + * + * @param body (required) + * @return AuthNMappingResponse + * @throws ApiException if fails to make API call + */ + public AuthNMappingResponse createAuthNMapping(AuthNMappingCreateRequest body) throws ApiException { return createAuthNMappingWithHttpInfo(body).getData(); } /** - * Create an AuthN Mapping. - * - *

See {@link #createAuthNMappingWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<AuthNMappingResponse> - */ - public CompletableFuture createAuthNMappingAsync( - AuthNMappingCreateRequest body) { - return createAuthNMappingWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an AuthN Mapping. + * + * See {@link #createAuthNMappingWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AuthNMappingResponse> + */ + public CompletableFuturecreateAuthNMappingAsync(AuthNMappingCreateRequest body) { + return createAuthNMappingWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an AuthN Mapping. + *

Create an AuthN Mapping.

* - * @param body (required) + * @param body (required) * @return ApiResponse<AuthNMappingResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -96,128 +100,94 @@ public CompletableFuture createAuthNMappingAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createAuthNMappingWithHttpInfo( - AuthNMappingCreateRequest body) throws ApiException { + public ApiResponse createAuthNMappingWithHttpInfo(AuthNMappingCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAuthNMapping"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAuthNMapping"); } // create path and map variables String localVarPath = "/api/v2/authn_mappings"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.createAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.AuthNMappingsApi.createAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an AuthN Mapping. * - *

See {@link #createAuthNMappingWithHttpInfo}. + * See {@link #createAuthNMappingWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<AuthNMappingResponse>> */ - public CompletableFuture> createAuthNMappingWithHttpInfoAsync( - AuthNMappingCreateRequest body) { + public CompletableFuture> createAuthNMappingWithHttpInfoAsync(AuthNMappingCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createAuthNMapping")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAuthNMapping")); + return result; } // create path and map variables String localVarPath = "/api/v2/authn_mappings"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.createAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuthNMappingsApi.createAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an AuthN Mapping. - * - *

See {@link #deleteAuthNMappingWithHttpInfo}. - * - * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @throws ApiException if fails to make API call - */ - public void deleteAuthNMapping(String authnMappingId) throws ApiException { + * Delete an AuthN Mapping. + * + * See {@link #deleteAuthNMappingWithHttpInfo}. + * + * @param authnMappingId The UUID of the AuthN Mapping. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAuthNMapping(String authnMappingId) throws ApiException { deleteAuthNMappingWithHttpInfo(authnMappingId); } /** - * Delete an AuthN Mapping. - * - *

See {@link #deleteAuthNMappingWithHttpInfoAsync}. - * - * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteAuthNMappingAsync(String authnMappingId) { - return deleteAuthNMappingWithHttpInfoAsync(authnMappingId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an AuthN Mapping. + * + * See {@link #deleteAuthNMappingWithHttpInfoAsync}. + * + * @param authnMappingId The UUID of the AuthN Mapping. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteAuthNMappingAsync(String authnMappingId) { + return deleteAuthNMappingWithHttpInfoAsync(authnMappingId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an AuthN Mapping specified by AuthN Mapping UUID. + *

Delete an AuthN Mapping specified by AuthN Mapping UUID.

* * @param authnMappingId The UUID of the AuthN Mapping. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -226,138 +196,97 @@ public CompletableFuture deleteAuthNMappingAsync(String authnMappingId) { * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteAuthNMappingWithHttpInfo(String authnMappingId) - throws ApiException { + public ApiResponse deleteAuthNMappingWithHttpInfo(String authnMappingId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'authnMappingId' is set if (authnMappingId == null) { - throw new ApiException( - 400, "Missing the required parameter 'authnMappingId' when calling deleteAuthNMapping"); + throw new ApiException(400, "Missing the required parameter 'authnMappingId' when calling deleteAuthNMapping"); } // create path and map variables - String localVarPath = - "/api/v2/authn_mappings/{authn_mapping_id}" - .replaceAll( - "\\{" + "authn_mapping_id" + "\\}", - apiClient.escapeString(authnMappingId.toString())); + String localVarPath = "/api/v2/authn_mappings/{authn_mapping_id}" + .replaceAll("\\{" + "authn_mapping_id" + "\\}", apiClient.escapeString(authnMappingId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.deleteAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.AuthNMappingsApi.deleteAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an AuthN Mapping. * - *

See {@link #deleteAuthNMappingWithHttpInfo}. + * See {@link #deleteAuthNMappingWithHttpInfo}. * * @param authnMappingId The UUID of the AuthN Mapping. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteAuthNMappingWithHttpInfoAsync( - String authnMappingId) { + public CompletableFuture> deleteAuthNMappingWithHttpInfoAsync(String authnMappingId) { Object localVarPostBody = null; // verify the required parameter 'authnMappingId' is set if (authnMappingId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'authnMappingId' when calling deleteAuthNMapping")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'authnMappingId' when calling deleteAuthNMapping")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/authn_mappings/{authn_mapping_id}" - .replaceAll( - "\\{" + "authn_mapping_id" + "\\}", - apiClient.escapeString(authnMappingId.toString())); + String localVarPath = "/api/v2/authn_mappings/{authn_mapping_id}" + .replaceAll("\\{" + "authn_mapping_id" + "\\}", apiClient.escapeString(authnMappingId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.deleteAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuthNMappingsApi.deleteAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get an AuthN Mapping by UUID. - * - *

See {@link #getAuthNMappingWithHttpInfo}. - * - * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @return AuthNMappingResponse - * @throws ApiException if fails to make API call - */ - public AuthNMappingResponse getAuthNMapping(String authnMappingId) throws ApiException { + * Get an AuthN Mapping by UUID. + * + * See {@link #getAuthNMappingWithHttpInfo}. + * + * @param authnMappingId The UUID of the AuthN Mapping. (required) + * @return AuthNMappingResponse + * @throws ApiException if fails to make API call + */ + public AuthNMappingResponse getAuthNMapping(String authnMappingId) throws ApiException { return getAuthNMappingWithHttpInfo(authnMappingId).getData(); } /** - * Get an AuthN Mapping by UUID. - * - *

See {@link #getAuthNMappingWithHttpInfoAsync}. - * - * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @return CompletableFuture<AuthNMappingResponse> - */ - public CompletableFuture getAuthNMappingAsync(String authnMappingId) { - return getAuthNMappingWithHttpInfoAsync(authnMappingId) - .thenApply( - response -> { - return response.getData(); - }); + * Get an AuthN Mapping by UUID. + * + * See {@link #getAuthNMappingWithHttpInfoAsync}. + * + * @param authnMappingId The UUID of the AuthN Mapping. (required) + * @return CompletableFuture<AuthNMappingResponse> + */ + public CompletableFuturegetAuthNMappingAsync(String authnMappingId) { + return getAuthNMappingWithHttpInfoAsync(authnMappingId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get an AuthN Mapping specified by the AuthN Mapping UUID. + *

Get an AuthN Mapping specified by the AuthN Mapping UUID.

* * @param authnMappingId The UUID of the AuthN Mapping. (required) * @return ApiResponse<AuthNMappingResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -366,101 +295,64 @@ public CompletableFuture getAuthNMappingAsync(String authn * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getAuthNMappingWithHttpInfo(String authnMappingId) - throws ApiException { + public ApiResponse getAuthNMappingWithHttpInfo(String authnMappingId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'authnMappingId' is set if (authnMappingId == null) { - throw new ApiException( - 400, "Missing the required parameter 'authnMappingId' when calling getAuthNMapping"); + throw new ApiException(400, "Missing the required parameter 'authnMappingId' when calling getAuthNMapping"); } // create path and map variables - String localVarPath = - "/api/v2/authn_mappings/{authn_mapping_id}" - .replaceAll( - "\\{" + "authn_mapping_id" + "\\}", - apiClient.escapeString(authnMappingId.toString())); + String localVarPath = "/api/v2/authn_mappings/{authn_mapping_id}" + .replaceAll("\\{" + "authn_mapping_id" + "\\}", apiClient.escapeString(authnMappingId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.getAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.AuthNMappingsApi.getAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an AuthN Mapping by UUID. * - *

See {@link #getAuthNMappingWithHttpInfo}. + * See {@link #getAuthNMappingWithHttpInfo}. * * @param authnMappingId The UUID of the AuthN Mapping. (required) * @return CompletableFuture<ApiResponse<AuthNMappingResponse>> */ - public CompletableFuture> getAuthNMappingWithHttpInfoAsync( - String authnMappingId) { + public CompletableFuture> getAuthNMappingWithHttpInfoAsync(String authnMappingId) { Object localVarPostBody = null; // verify the required parameter 'authnMappingId' is set if (authnMappingId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'authnMappingId' when calling getAuthNMapping")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'authnMappingId' when calling getAuthNMapping")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/authn_mappings/{authn_mapping_id}" - .replaceAll( - "\\{" + "authn_mapping_id" + "\\}", - apiClient.escapeString(authnMappingId.toString())); + String localVarPath = "/api/v2/authn_mappings/{authn_mapping_id}" + .replaceAll("\\{" + "authn_mapping_id" + "\\}", apiClient.escapeString(authnMappingId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.getAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuthNMappingsApi.getAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listAuthNMappings. */ + /** + * Manage optional parameters to listAuthNMappings. + */ public static class ListAuthNMappingsOptionalParameters { private Long pageSize; private Long pageNumber; @@ -469,9 +361,7 @@ public static class ListAuthNMappingsOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListAuthNMappingsOptionalParameters */ public ListAuthNMappingsOptionalParameters pageSize(Long pageSize) { @@ -481,7 +371,6 @@ public ListAuthNMappingsOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListAuthNMappingsOptionalParameters */ @@ -492,7 +381,6 @@ public ListAuthNMappingsOptionalParameters pageNumber(Long pageNumber) { /** * Set sort. - * * @param sort Sort AuthN Mappings depending on the given field. (optional) * @return ListAuthNMappingsOptionalParameters */ @@ -503,7 +391,6 @@ public ListAuthNMappingsOptionalParameters sort(AuthNMappingsSort sort) { /** * Set filter. - * * @param filter Filter all mappings by the given string. (optional) * @return ListAuthNMappingsOptionalParameters */ @@ -514,71 +401,66 @@ public ListAuthNMappingsOptionalParameters filter(String filter) { } /** - * List all AuthN Mappings. - * - *

See {@link #listAuthNMappingsWithHttpInfo}. - * - * @return AuthNMappingsResponse - * @throws ApiException if fails to make API call - */ - public AuthNMappingsResponse listAuthNMappings() throws ApiException { + * List all AuthN Mappings. + * + * See {@link #listAuthNMappingsWithHttpInfo}. + * + * @return AuthNMappingsResponse + * @throws ApiException if fails to make API call + */ + public AuthNMappingsResponse listAuthNMappings () throws ApiException { return listAuthNMappingsWithHttpInfo(new ListAuthNMappingsOptionalParameters()).getData(); } /** - * List all AuthN Mappings. - * - *

See {@link #listAuthNMappingsWithHttpInfoAsync}. - * - * @return CompletableFuture<AuthNMappingsResponse> - */ - public CompletableFuture listAuthNMappingsAsync() { - return listAuthNMappingsWithHttpInfoAsync(new ListAuthNMappingsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * List all AuthN Mappings. + * + * See {@link #listAuthNMappingsWithHttpInfoAsync}. + * + * @return CompletableFuture<AuthNMappingsResponse> + */ + public CompletableFuturelistAuthNMappingsAsync() { + return listAuthNMappingsWithHttpInfoAsync(new ListAuthNMappingsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * List all AuthN Mappings. - * - *

See {@link #listAuthNMappingsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return AuthNMappingsResponse - * @throws ApiException if fails to make API call - */ - public AuthNMappingsResponse listAuthNMappings(ListAuthNMappingsOptionalParameters parameters) - throws ApiException { + * List all AuthN Mappings. + * + * See {@link #listAuthNMappingsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return AuthNMappingsResponse + * @throws ApiException if fails to make API call + */ + public AuthNMappingsResponse listAuthNMappings(ListAuthNMappingsOptionalParameters parameters) throws ApiException { return listAuthNMappingsWithHttpInfo(parameters).getData(); } /** - * List all AuthN Mappings. - * - *

See {@link #listAuthNMappingsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<AuthNMappingsResponse> - */ - public CompletableFuture listAuthNMappingsAsync( - ListAuthNMappingsOptionalParameters parameters) { - return listAuthNMappingsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List all AuthN Mappings. + * + * See {@link #listAuthNMappingsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<AuthNMappingsResponse> + */ + public CompletableFuturelistAuthNMappingsAsync(ListAuthNMappingsOptionalParameters parameters) { + return listAuthNMappingsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List all AuthN Mappings in the org. + *

List all AuthN Mappings in the org.

* * @param parameters Optional parameters for the request. * @return ApiResponse<AuthNMappingsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -586,8 +468,7 @@ public CompletableFuture listAuthNMappingsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listAuthNMappingsWithHttpInfo( - ListAuthNMappingsOptionalParameters parameters) throws ApiException { + public ApiResponse listAuthNMappingsWithHttpInfo(ListAuthNMappingsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -596,6 +477,7 @@ public ApiResponse listAuthNMappingsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/authn_mappings"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -604,36 +486,19 @@ public ApiResponse listAuthNMappingsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.listAuthNMappings", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.AuthNMappingsApi.listAuthNMappings", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List all AuthN Mappings. * - *

See {@link #listAuthNMappingsWithHttpInfo}. + * See {@link #listAuthNMappingsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<AuthNMappingsResponse>> */ - public CompletableFuture> listAuthNMappingsWithHttpInfoAsync( - ListAuthNMappingsOptionalParameters parameters) { + public CompletableFuture> listAuthNMappingsWithHttpInfoAsync(ListAuthNMappingsOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -642,6 +507,7 @@ public CompletableFuture> listAuthNMappingsWi // create path and map variables String localVarPath = "/api/v2/authn_mappings"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -652,73 +518,54 @@ public CompletableFuture> listAuthNMappingsWi Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.listAuthNMappings", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuthNMappingsApi.listAuthNMappings", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an AuthN Mapping. - * - *

See {@link #updateAuthNMappingWithHttpInfo}. - * - * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @param body (required) - * @return AuthNMappingResponse - * @throws ApiException if fails to make API call - */ - public AuthNMappingResponse updateAuthNMapping( - String authnMappingId, AuthNMappingUpdateRequest body) throws ApiException { + * Edit an AuthN Mapping. + * + * See {@link #updateAuthNMappingWithHttpInfo}. + * + * @param authnMappingId The UUID of the AuthN Mapping. (required) + * @param body (required) + * @return AuthNMappingResponse + * @throws ApiException if fails to make API call + */ + public AuthNMappingResponse updateAuthNMapping(String authnMappingId, AuthNMappingUpdateRequest body) throws ApiException { return updateAuthNMappingWithHttpInfo(authnMappingId, body).getData(); } /** - * Edit an AuthN Mapping. - * - *

See {@link #updateAuthNMappingWithHttpInfoAsync}. - * - * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @param body (required) - * @return CompletableFuture<AuthNMappingResponse> - */ - public CompletableFuture updateAuthNMappingAsync( - String authnMappingId, AuthNMappingUpdateRequest body) { - return updateAuthNMappingWithHttpInfoAsync(authnMappingId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an AuthN Mapping. + * + * See {@link #updateAuthNMappingWithHttpInfoAsync}. + * + * @param authnMappingId The UUID of the AuthN Mapping. (required) + * @param body (required) + * @return CompletableFuture<AuthNMappingResponse> + */ + public CompletableFutureupdateAuthNMappingAsync(String authnMappingId, AuthNMappingUpdateRequest body) { + return updateAuthNMappingWithHttpInfoAsync(authnMappingId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit an AuthN Mapping. + *

Edit an AuthN Mapping.

* * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<AuthNMappingResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -730,114 +577,71 @@ public CompletableFuture updateAuthNMappingAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAuthNMappingWithHttpInfo( - String authnMappingId, AuthNMappingUpdateRequest body) throws ApiException { + public ApiResponse updateAuthNMappingWithHttpInfo(String authnMappingId, AuthNMappingUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'authnMappingId' is set if (authnMappingId == null) { - throw new ApiException( - 400, "Missing the required parameter 'authnMappingId' when calling updateAuthNMapping"); + throw new ApiException(400, "Missing the required parameter 'authnMappingId' when calling updateAuthNMapping"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAuthNMapping"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAuthNMapping"); } // create path and map variables - String localVarPath = - "/api/v2/authn_mappings/{authn_mapping_id}" - .replaceAll( - "\\{" + "authn_mapping_id" + "\\}", - apiClient.escapeString(authnMappingId.toString())); + String localVarPath = "/api/v2/authn_mappings/{authn_mapping_id}" + .replaceAll("\\{" + "authn_mapping_id" + "\\}", apiClient.escapeString(authnMappingId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.updateAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.AuthNMappingsApi.updateAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an AuthN Mapping. * - *

See {@link #updateAuthNMappingWithHttpInfo}. + * See {@link #updateAuthNMappingWithHttpInfo}. * * @param authnMappingId The UUID of the AuthN Mapping. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<AuthNMappingResponse>> */ - public CompletableFuture> updateAuthNMappingWithHttpInfoAsync( - String authnMappingId, AuthNMappingUpdateRequest body) { + public CompletableFuture> updateAuthNMappingWithHttpInfoAsync(String authnMappingId, AuthNMappingUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'authnMappingId' is set if (authnMappingId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'authnMappingId' when calling updateAuthNMapping")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'authnMappingId' when calling updateAuthNMapping")); + 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 updateAuthNMapping")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAuthNMapping")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/authn_mappings/{authn_mapping_id}" - .replaceAll( - "\\{" + "authn_mapping_id" + "\\}", - apiClient.escapeString(authnMappingId.toString())); + String localVarPath = "/api/v2/authn_mappings/{authn_mapping_id}" + .replaceAll("\\{" + "authn_mapping_id" + "\\}", apiClient.escapeString(authnMappingId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.AuthNMappingsApi.updateAuthNMapping", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.AuthNMappingsApi.updateAuthNMapping", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/CiVisibilityPipelinesApi.java b/src/main/java/com/datadog/api/client/v2/api/CiVisibilityPipelinesApi.java index ab02055f151..dcec11a5729 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CiVisibilityPipelinesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CiVisibilityPipelinesApi.java @@ -1,32 +1,38 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.CIAppPipelineEvent; -import com.datadog.api.client.v2.model.CIAppPipelineEventsRequest; -import com.datadog.api.client.v2.model.CIAppPipelineEventsResponse; -import com.datadog.api.client.v2.model.CIAppPipelinesAggregateRequest; -import com.datadog.api.client.v2.model.CIAppPipelinesAnalyticsAggregateResponse; -import com.datadog.api.client.v2.model.CIAppQueryPageOptions; -import com.datadog.api.client.v2.model.CIAppSort; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.CIAppPipelinesAnalyticsAggregateResponse; +import com.datadog.api.client.v2.model.CIAppPipelinesAggregateRequest; +import com.datadog.api.client.v2.model.CIAppPipelineEventsResponse; +import com.datadog.api.client.v2.model.CIAppSort; +import com.datadog.api.client.v2.model.CIAppPipelineEventsRequest; +import com.datadog.api.client.v2.model.CIAppPipelineEvent; +import com.datadog.api.client.v2.model.CIAppPipelineEvent; +import com.datadog.api.client.v2.model.CIAppPipelineEventsRequest; +import com.datadog.api.client.v2.model.CIAppQueryPageOptions; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CiVisibilityPipelinesApi { private ApiClient apiClient; - public CiVisibilityPipelinesApi() { this(ApiClient.getDefaultApiClient()); } @@ -54,45 +60,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Aggregate pipelines events. - * - *

See {@link #aggregateCIAppPipelineEventsWithHttpInfo}. - * - * @param body (required) - * @return CIAppPipelinesAnalyticsAggregateResponse - * @throws ApiException if fails to make API call - */ - public CIAppPipelinesAnalyticsAggregateResponse aggregateCIAppPipelineEvents( - CIAppPipelinesAggregateRequest body) throws ApiException { + * Aggregate pipelines events. + * + * See {@link #aggregateCIAppPipelineEventsWithHttpInfo}. + * + * @param body (required) + * @return CIAppPipelinesAnalyticsAggregateResponse + * @throws ApiException if fails to make API call + */ + public CIAppPipelinesAnalyticsAggregateResponse aggregateCIAppPipelineEvents(CIAppPipelinesAggregateRequest body) throws ApiException { return aggregateCIAppPipelineEventsWithHttpInfo(body).getData(); } /** - * Aggregate pipelines events. - * - *

See {@link #aggregateCIAppPipelineEventsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<CIAppPipelinesAnalyticsAggregateResponse> - */ - public CompletableFuture - aggregateCIAppPipelineEventsAsync(CIAppPipelinesAggregateRequest body) { - return aggregateCIAppPipelineEventsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Aggregate pipelines events. + * + * See {@link #aggregateCIAppPipelineEventsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<CIAppPipelinesAnalyticsAggregateResponse> + */ + public CompletableFutureaggregateCIAppPipelineEventsAsync(CIAppPipelinesAggregateRequest body) { + return aggregateCIAppPipelineEventsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * The API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics - * and timeseries. + *

The API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries.

* - * @param body (required) + * @param body (required) * @return ApiResponse<CIAppPipelinesAnalyticsAggregateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -101,97 +103,62 @@ public CIAppPipelinesAnalyticsAggregateResponse aggregateCIAppPipelineEvents( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - aggregateCIAppPipelineEventsWithHttpInfo(CIAppPipelinesAggregateRequest body) - throws ApiException { + public ApiResponse aggregateCIAppPipelineEventsWithHttpInfo(CIAppPipelinesAggregateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateCIAppPipelineEvents"); + throw new ApiException(400, "Missing the required parameter 'body' when calling aggregateCIAppPipelineEvents"); } // create path and map variables String localVarPath = "/api/v2/ci/pipelines/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CiVisibilityPipelinesApi.aggregateCIAppPipelineEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CiVisibilityPipelinesApi.aggregateCIAppPipelineEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Aggregate pipelines events. * - *

See {@link #aggregateCIAppPipelineEventsWithHttpInfo}. + * See {@link #aggregateCIAppPipelineEventsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<CIAppPipelinesAnalyticsAggregateResponse>> */ - public CompletableFuture> - aggregateCIAppPipelineEventsWithHttpInfoAsync(CIAppPipelinesAggregateRequest body) { + public CompletableFuture> aggregateCIAppPipelineEventsWithHttpInfoAsync(CIAppPipelinesAggregateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling aggregateCIAppPipelineEvents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling aggregateCIAppPipelineEvents")); + return result; } // create path and map variables String localVarPath = "/api/v2/ci/pipelines/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CiVisibilityPipelinesApi.aggregateCIAppPipelineEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CiVisibilityPipelinesApi.aggregateCIAppPipelineEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listCIAppPipelineEvents. */ + /** + * Manage optional parameters to listCIAppPipelineEvents. + */ public static class ListCIAppPipelineEventsOptionalParameters { private String filterQuery; private OffsetDateTime filterFrom; @@ -202,7 +169,6 @@ public static class ListCIAppPipelineEventsOptionalParameters { /** * Set filterQuery. - * * @param filterQuery Search query following log syntax. (optional) * @return ListCIAppPipelineEventsOptionalParameters */ @@ -213,7 +179,6 @@ public ListCIAppPipelineEventsOptionalParameters filterQuery(String filterQuery) /** * Set filterFrom. - * * @param filterFrom Minimum timestamp for requested events. (optional) * @return ListCIAppPipelineEventsOptionalParameters */ @@ -224,7 +189,6 @@ public ListCIAppPipelineEventsOptionalParameters filterFrom(OffsetDateTime filte /** * Set filterTo. - * * @param filterTo Maximum timestamp for requested events. (optional) * @return ListCIAppPipelineEventsOptionalParameters */ @@ -235,7 +199,6 @@ public ListCIAppPipelineEventsOptionalParameters filterTo(OffsetDateTime filterT /** * Set sort. - * * @param sort Order of events in results. (optional) * @return ListCIAppPipelineEventsOptionalParameters */ @@ -246,9 +209,7 @@ public ListCIAppPipelineEventsOptionalParameters sort(CIAppSort sort) { /** * Set pageCursor. - * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor List following results with a cursor provided in the previous query. (optional) * @return ListCIAppPipelineEventsOptionalParameters */ public ListCIAppPipelineEventsOptionalParameters pageCursor(String pageCursor) { @@ -258,7 +219,6 @@ public ListCIAppPipelineEventsOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. - * * @param pageLimit Maximum number of events in the response. (optional, default to 10) * @return ListCIAppPipelineEventsOptionalParameters */ @@ -269,128 +229,112 @@ public ListCIAppPipelineEventsOptionalParameters pageLimit(Integer pageLimit) { } /** - * Get a list of pipelines events. - * - *

See {@link #listCIAppPipelineEventsWithHttpInfo}. - * - * @return CIAppPipelineEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppPipelineEventsResponse listCIAppPipelineEvents() throws ApiException { - return listCIAppPipelineEventsWithHttpInfo(new ListCIAppPipelineEventsOptionalParameters()) - .getData(); + * Get a list of pipelines events. + * + * See {@link #listCIAppPipelineEventsWithHttpInfo}. + * + * @return CIAppPipelineEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppPipelineEventsResponse listCIAppPipelineEvents () throws ApiException { + return listCIAppPipelineEventsWithHttpInfo(new ListCIAppPipelineEventsOptionalParameters()).getData(); } /** - * Get a list of pipelines events. - * - *

See {@link #listCIAppPipelineEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<CIAppPipelineEventsResponse> - */ - public CompletableFuture listCIAppPipelineEventsAsync() { - return listCIAppPipelineEventsWithHttpInfoAsync(new ListCIAppPipelineEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of pipelines events. + * + * See {@link #listCIAppPipelineEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<CIAppPipelineEventsResponse> + */ + public CompletableFuturelistCIAppPipelineEventsAsync() { + return listCIAppPipelineEventsWithHttpInfoAsync(new ListCIAppPipelineEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of pipelines events. - * - *

See {@link #listCIAppPipelineEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CIAppPipelineEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppPipelineEventsResponse listCIAppPipelineEvents( - ListCIAppPipelineEventsOptionalParameters parameters) throws ApiException { + * Get a list of pipelines events. + * + * See {@link #listCIAppPipelineEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CIAppPipelineEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppPipelineEventsResponse listCIAppPipelineEvents(ListCIAppPipelineEventsOptionalParameters parameters) throws ApiException { return listCIAppPipelineEventsWithHttpInfo(parameters).getData(); } /** - * Get a list of pipelines events. - * - *

See {@link #listCIAppPipelineEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CIAppPipelineEventsResponse> - */ - public CompletableFuture listCIAppPipelineEventsAsync( - ListCIAppPipelineEventsOptionalParameters parameters) { - return listCIAppPipelineEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of pipelines events. + * + * See {@link #listCIAppPipelineEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CIAppPipelineEventsResponse> + */ + public CompletableFuturelistCIAppPipelineEventsAsync(ListCIAppPipelineEventsOptionalParameters parameters) { + return listCIAppPipelineEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of pipelines events. - * - *

See {@link #listCIAppPipelineEventsWithHttpInfo}. - * - * @return PaginationIterable<CIAppPipelineEvent> - */ + * Get a list of pipelines events. + * + * See {@link #listCIAppPipelineEventsWithHttpInfo}. + * + * @return PaginationIterable<CIAppPipelineEvent> + */ public PaginationIterable listCIAppPipelineEventsWithPagination() { - ListCIAppPipelineEventsOptionalParameters parameters = - new ListCIAppPipelineEventsOptionalParameters(); + ListCIAppPipelineEventsOptionalParameters parameters = new ListCIAppPipelineEventsOptionalParameters(); return listCIAppPipelineEventsWithPagination(parameters); } /** - * Get a list of pipelines events. - * - *

See {@link #listCIAppPipelineEventsWithHttpInfo}. - * - * @return CIAppPipelineEventsResponse - */ - public PaginationIterable listCIAppPipelineEventsWithPagination( - ListCIAppPipelineEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a list of pipelines events. + * + * See {@link #listCIAppPipelineEventsWithHttpInfo}. + * + * @return CIAppPipelineEventsResponse + */ + public PaginationIterable listCIAppPipelineEventsWithPagination(ListCIAppPipelineEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + + + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "listCIAppPipelineEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listCIAppPipelineEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + return iterator; } + /** - * List endpoint returns CI Visibility pipeline events that match a log search query. Results are - * paginated similarly to logs. - * - *

Use this endpoint to see your latest pipeline events. + *

List endpoint returns CI Visibility pipeline events that match a log search query. + * Results are paginated similarly to logs.

+ *

Use this endpoint to see your latest pipeline events.

* * @param parameters Optional parameters for the request. * @return ApiResponse<CIAppPipelineEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -399,8 +343,7 @@ public PaginationIterable listCIAppPipelineEventsWithPaginat * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listCIAppPipelineEventsWithHttpInfo( - ListCIAppPipelineEventsOptionalParameters parameters) throws ApiException { + public ApiResponse listCIAppPipelineEventsWithHttpInfo(ListCIAppPipelineEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -411,6 +354,7 @@ public ApiResponse listCIAppPipelineEventsWithHttpI // create path and map variables String localVarPath = "/api/v2/ci/pipelines/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -421,37 +365,19 @@ public ApiResponse listCIAppPipelineEventsWithHttpI localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CiVisibilityPipelinesApi.listCIAppPipelineEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.CiVisibilityPipelinesApi.listCIAppPipelineEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of pipelines events. * - *

See {@link #listCIAppPipelineEventsWithHttpInfo}. + * See {@link #listCIAppPipelineEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CIAppPipelineEventsResponse>> */ - public CompletableFuture> - listCIAppPipelineEventsWithHttpInfoAsync( - ListCIAppPipelineEventsOptionalParameters parameters) { + public CompletableFuture> listCIAppPipelineEventsWithHttpInfoAsync(ListCIAppPipelineEventsOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -462,6 +388,7 @@ public ApiResponse listCIAppPipelineEventsWithHttpI // create path and map variables String localVarPath = "/api/v2/ci/pipelines/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -474,40 +401,24 @@ public ApiResponse listCIAppPipelineEventsWithHttpI Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CiVisibilityPipelinesApi.listCIAppPipelineEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CiVisibilityPipelinesApi.listCIAppPipelineEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchCIAppPipelineEvents. */ + /** + * Manage optional parameters to searchCIAppPipelineEvents. + */ public static class SearchCIAppPipelineEventsOptionalParameters { private CIAppPipelineEventsRequest body; /** * Set body. - * - * @param body (optional) + * @param body (optional) * @return SearchCIAppPipelineEventsOptionalParameters */ public SearchCIAppPipelineEventsOptionalParameters body(CIAppPipelineEventsRequest body) { @@ -517,137 +428,122 @@ public SearchCIAppPipelineEventsOptionalParameters body(CIAppPipelineEventsReque } /** - * Search pipelines events. - * - *

See {@link #searchCIAppPipelineEventsWithHttpInfo}. - * - * @return CIAppPipelineEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppPipelineEventsResponse searchCIAppPipelineEvents() throws ApiException { - return searchCIAppPipelineEventsWithHttpInfo(new SearchCIAppPipelineEventsOptionalParameters()) - .getData(); + * Search pipelines events. + * + * See {@link #searchCIAppPipelineEventsWithHttpInfo}. + * + * @return CIAppPipelineEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppPipelineEventsResponse searchCIAppPipelineEvents () throws ApiException { + return searchCIAppPipelineEventsWithHttpInfo(new SearchCIAppPipelineEventsOptionalParameters()).getData(); } /** - * Search pipelines events. - * - *

See {@link #searchCIAppPipelineEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<CIAppPipelineEventsResponse> - */ - public CompletableFuture searchCIAppPipelineEventsAsync() { - return searchCIAppPipelineEventsWithHttpInfoAsync( - new SearchCIAppPipelineEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search pipelines events. + * + * See {@link #searchCIAppPipelineEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<CIAppPipelineEventsResponse> + */ + public CompletableFuturesearchCIAppPipelineEventsAsync() { + return searchCIAppPipelineEventsWithHttpInfoAsync(new SearchCIAppPipelineEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search pipelines events. - * - *

See {@link #searchCIAppPipelineEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CIAppPipelineEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppPipelineEventsResponse searchCIAppPipelineEvents( - SearchCIAppPipelineEventsOptionalParameters parameters) throws ApiException { + * Search pipelines events. + * + * See {@link #searchCIAppPipelineEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CIAppPipelineEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppPipelineEventsResponse searchCIAppPipelineEvents(SearchCIAppPipelineEventsOptionalParameters parameters) throws ApiException { return searchCIAppPipelineEventsWithHttpInfo(parameters).getData(); } /** - * Search pipelines events. - * - *

See {@link #searchCIAppPipelineEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CIAppPipelineEventsResponse> - */ - public CompletableFuture searchCIAppPipelineEventsAsync( - SearchCIAppPipelineEventsOptionalParameters parameters) { - return searchCIAppPipelineEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search pipelines events. + * + * See {@link #searchCIAppPipelineEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CIAppPipelineEventsResponse> + */ + public CompletableFuturesearchCIAppPipelineEventsAsync(SearchCIAppPipelineEventsOptionalParameters parameters) { + return searchCIAppPipelineEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Search pipelines events. - * - *

See {@link #searchCIAppPipelineEventsWithHttpInfo}. - * - * @return PaginationIterable<CIAppPipelineEvent> - */ + * Search pipelines events. + * + * See {@link #searchCIAppPipelineEventsWithHttpInfo}. + * + * @return PaginationIterable<CIAppPipelineEvent> + */ public PaginationIterable searchCIAppPipelineEventsWithPagination() { - SearchCIAppPipelineEventsOptionalParameters parameters = - new SearchCIAppPipelineEventsOptionalParameters(); + SearchCIAppPipelineEventsOptionalParameters parameters = new SearchCIAppPipelineEventsOptionalParameters(); return searchCIAppPipelineEventsWithPagination(parameters); } /** - * Search pipelines events. - * - *

See {@link #searchCIAppPipelineEventsWithHttpInfo}. - * - * @return CIAppPipelineEventsResponse - */ - public PaginationIterable searchCIAppPipelineEventsWithPagination( - SearchCIAppPipelineEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { + * Search pipelines events. + * + * See {@link #searchCIAppPipelineEventsWithHttpInfo}. + * + * @return CIAppPipelineEventsResponse + */ + public PaginationIterable searchCIAppPipelineEventsWithPagination(SearchCIAppPipelineEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.body == null) { parameters.body(new CIAppPipelineEventsRequest()); - } + } - if (parameters.body.getPage() == null) { + if(parameters.body.getPage() == null) { parameters.body.setPage(new CIAppQueryPageOptions()); - } + } - if (parameters.body.getPage().getLimit() == null) { + + + + if (parameters.body.getPage().getLimit() == null) { limit = 10; parameters.body.getPage().setLimit(limit); - } else { + } else { limit = parameters.body.getPage().getLimit(); - } + } + + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchCIAppPipelineEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + PaginationIterable iterator = new PaginationIterable(this, "searchCIAppPipelineEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * List endpoint returns CI Visibility pipeline events that match a log search query. Results are - * paginated similarly to logs. - * - *

Use this endpoint to build complex events filtering and search. + *

List endpoint returns CI Visibility pipeline events that match a log search query. + * Results are paginated similarly to logs.

+ *

Use this endpoint to build complex events filtering and search.

* * @param parameters Optional parameters for the request. * @return ApiResponse<CIAppPipelineEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -656,76 +552,44 @@ public PaginationIterable searchCIAppPipelineEventsWithPagin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchCIAppPipelineEventsWithHttpInfo( - SearchCIAppPipelineEventsOptionalParameters parameters) throws ApiException { + public ApiResponse searchCIAppPipelineEventsWithHttpInfo(SearchCIAppPipelineEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/ci/pipelines/events/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CiVisibilityPipelinesApi.searchCIAppPipelineEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CiVisibilityPipelinesApi.searchCIAppPipelineEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search pipelines events. * - *

See {@link #searchCIAppPipelineEventsWithHttpInfo}. + * See {@link #searchCIAppPipelineEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CIAppPipelineEventsResponse>> */ - public CompletableFuture> - searchCIAppPipelineEventsWithHttpInfoAsync( - SearchCIAppPipelineEventsOptionalParameters parameters) { + public CompletableFuture> searchCIAppPipelineEventsWithHttpInfoAsync(SearchCIAppPipelineEventsOptionalParameters parameters) { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/ci/pipelines/events/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CiVisibilityPipelinesApi.searchCIAppPipelineEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CiVisibilityPipelinesApi.searchCIAppPipelineEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/CiVisibilityTestsApi.java b/src/main/java/com/datadog/api/client/v2/api/CiVisibilityTestsApi.java index 6d1e77d0b9a..8f242695514 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CiVisibilityTestsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CiVisibilityTestsApi.java @@ -1,32 +1,38 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.CIAppQueryPageOptions; -import com.datadog.api.client.v2.model.CIAppSort; -import com.datadog.api.client.v2.model.CIAppTestEvent; -import com.datadog.api.client.v2.model.CIAppTestEventsRequest; -import com.datadog.api.client.v2.model.CIAppTestEventsResponse; -import com.datadog.api.client.v2.model.CIAppTestsAggregateRequest; -import com.datadog.api.client.v2.model.CIAppTestsAnalyticsAggregateResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.CIAppTestsAnalyticsAggregateResponse; +import com.datadog.api.client.v2.model.CIAppTestsAggregateRequest; +import com.datadog.api.client.v2.model.CIAppTestEventsResponse; +import com.datadog.api.client.v2.model.CIAppSort; +import com.datadog.api.client.v2.model.CIAppTestEventsRequest; +import com.datadog.api.client.v2.model.CIAppTestEvent; +import com.datadog.api.client.v2.model.CIAppTestEvent; +import com.datadog.api.client.v2.model.CIAppTestEventsRequest; +import com.datadog.api.client.v2.model.CIAppQueryPageOptions; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CiVisibilityTestsApi { private ApiClient apiClient; - public CiVisibilityTestsApi() { this(ApiClient.getDefaultApiClient()); } @@ -54,45 +60,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Aggregate tests events. - * - *

See {@link #aggregateCIAppTestEventsWithHttpInfo}. - * - * @param body (required) - * @return CIAppTestsAnalyticsAggregateResponse - * @throws ApiException if fails to make API call - */ - public CIAppTestsAnalyticsAggregateResponse aggregateCIAppTestEvents( - CIAppTestsAggregateRequest body) throws ApiException { + * Aggregate tests events. + * + * See {@link #aggregateCIAppTestEventsWithHttpInfo}. + * + * @param body (required) + * @return CIAppTestsAnalyticsAggregateResponse + * @throws ApiException if fails to make API call + */ + public CIAppTestsAnalyticsAggregateResponse aggregateCIAppTestEvents(CIAppTestsAggregateRequest body) throws ApiException { return aggregateCIAppTestEventsWithHttpInfo(body).getData(); } /** - * Aggregate tests events. - * - *

See {@link #aggregateCIAppTestEventsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<CIAppTestsAnalyticsAggregateResponse> - */ - public CompletableFuture aggregateCIAppTestEventsAsync( - CIAppTestsAggregateRequest body) { - return aggregateCIAppTestEventsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Aggregate tests events. + * + * See {@link #aggregateCIAppTestEventsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<CIAppTestsAnalyticsAggregateResponse> + */ + public CompletableFutureaggregateCIAppTestEventsAsync(CIAppTestsAggregateRequest body) { + return aggregateCIAppTestEventsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and - * timeseries. + *

The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries.

* - * @param body (required) + * @param body (required) * @return ApiResponse<CIAppTestsAnalyticsAggregateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -101,95 +103,62 @@ public CompletableFuture aggregateCIAppTes * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse aggregateCIAppTestEventsWithHttpInfo( - CIAppTestsAggregateRequest body) throws ApiException { + public ApiResponse aggregateCIAppTestEventsWithHttpInfo(CIAppTestsAggregateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateCIAppTestEvents"); + throw new ApiException(400, "Missing the required parameter 'body' when calling aggregateCIAppTestEvents"); } // create path and map variables String localVarPath = "/api/v2/ci/tests/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CiVisibilityTestsApi.aggregateCIAppTestEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CiVisibilityTestsApi.aggregateCIAppTestEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Aggregate tests events. * - *

See {@link #aggregateCIAppTestEventsWithHttpInfo}. + * See {@link #aggregateCIAppTestEventsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<CIAppTestsAnalyticsAggregateResponse>> */ - public CompletableFuture> - aggregateCIAppTestEventsWithHttpInfoAsync(CIAppTestsAggregateRequest body) { + public CompletableFuture> aggregateCIAppTestEventsWithHttpInfoAsync(CIAppTestsAggregateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateCIAppTestEvents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling aggregateCIAppTestEvents")); + return result; } // create path and map variables String localVarPath = "/api/v2/ci/tests/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CiVisibilityTestsApi.aggregateCIAppTestEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CiVisibilityTestsApi.aggregateCIAppTestEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listCIAppTestEvents. */ + /** + * Manage optional parameters to listCIAppTestEvents. + */ public static class ListCIAppTestEventsOptionalParameters { private String filterQuery; private OffsetDateTime filterFrom; @@ -200,7 +169,6 @@ public static class ListCIAppTestEventsOptionalParameters { /** * Set filterQuery. - * * @param filterQuery Search query following log syntax. (optional) * @return ListCIAppTestEventsOptionalParameters */ @@ -211,7 +179,6 @@ public ListCIAppTestEventsOptionalParameters filterQuery(String filterQuery) { /** * Set filterFrom. - * * @param filterFrom Minimum timestamp for requested events. (optional) * @return ListCIAppTestEventsOptionalParameters */ @@ -222,7 +189,6 @@ public ListCIAppTestEventsOptionalParameters filterFrom(OffsetDateTime filterFro /** * Set filterTo. - * * @param filterTo Maximum timestamp for requested events. (optional) * @return ListCIAppTestEventsOptionalParameters */ @@ -233,7 +199,6 @@ public ListCIAppTestEventsOptionalParameters filterTo(OffsetDateTime filterTo) { /** * Set sort. - * * @param sort Order of events in results. (optional) * @return ListCIAppTestEventsOptionalParameters */ @@ -244,9 +209,7 @@ public ListCIAppTestEventsOptionalParameters sort(CIAppSort sort) { /** * Set pageCursor. - * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor List following results with a cursor provided in the previous query. (optional) * @return ListCIAppTestEventsOptionalParameters */ public ListCIAppTestEventsOptionalParameters pageCursor(String pageCursor) { @@ -256,7 +219,6 @@ public ListCIAppTestEventsOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. - * * @param pageLimit Maximum number of events in the response. (optional, default to 10) * @return ListCIAppTestEventsOptionalParameters */ @@ -267,126 +229,112 @@ public ListCIAppTestEventsOptionalParameters pageLimit(Integer pageLimit) { } /** - * Get a list of tests events. - * - *

See {@link #listCIAppTestEventsWithHttpInfo}. - * - * @return CIAppTestEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppTestEventsResponse listCIAppTestEvents() throws ApiException { + * Get a list of tests events. + * + * See {@link #listCIAppTestEventsWithHttpInfo}. + * + * @return CIAppTestEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppTestEventsResponse listCIAppTestEvents () throws ApiException { return listCIAppTestEventsWithHttpInfo(new ListCIAppTestEventsOptionalParameters()).getData(); } /** - * Get a list of tests events. - * - *

See {@link #listCIAppTestEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<CIAppTestEventsResponse> - */ - public CompletableFuture listCIAppTestEventsAsync() { - return listCIAppTestEventsWithHttpInfoAsync(new ListCIAppTestEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of tests events. + * + * See {@link #listCIAppTestEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<CIAppTestEventsResponse> + */ + public CompletableFuturelistCIAppTestEventsAsync() { + return listCIAppTestEventsWithHttpInfoAsync(new ListCIAppTestEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of tests events. - * - *

See {@link #listCIAppTestEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CIAppTestEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppTestEventsResponse listCIAppTestEvents( - ListCIAppTestEventsOptionalParameters parameters) throws ApiException { + * Get a list of tests events. + * + * See {@link #listCIAppTestEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CIAppTestEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppTestEventsResponse listCIAppTestEvents(ListCIAppTestEventsOptionalParameters parameters) throws ApiException { return listCIAppTestEventsWithHttpInfo(parameters).getData(); } /** - * Get a list of tests events. - * - *

See {@link #listCIAppTestEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CIAppTestEventsResponse> - */ - public CompletableFuture listCIAppTestEventsAsync( - ListCIAppTestEventsOptionalParameters parameters) { - return listCIAppTestEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of tests events. + * + * See {@link #listCIAppTestEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CIAppTestEventsResponse> + */ + public CompletableFuturelistCIAppTestEventsAsync(ListCIAppTestEventsOptionalParameters parameters) { + return listCIAppTestEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of tests events. - * - *

See {@link #listCIAppTestEventsWithHttpInfo}. - * - * @return PaginationIterable<CIAppTestEvent> - */ + * Get a list of tests events. + * + * See {@link #listCIAppTestEventsWithHttpInfo}. + * + * @return PaginationIterable<CIAppTestEvent> + */ public PaginationIterable listCIAppTestEventsWithPagination() { ListCIAppTestEventsOptionalParameters parameters = new ListCIAppTestEventsOptionalParameters(); return listCIAppTestEventsWithPagination(parameters); } /** - * Get a list of tests events. - * - *

See {@link #listCIAppTestEventsWithHttpInfo}. - * - * @return CIAppTestEventsResponse - */ - public PaginationIterable listCIAppTestEventsWithPagination( - ListCIAppTestEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a list of tests events. + * + * See {@link #listCIAppTestEventsWithHttpInfo}. + * + * @return CIAppTestEventsResponse + */ + public PaginationIterable listCIAppTestEventsWithPagination(ListCIAppTestEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + + + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "listCIAppTestEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listCIAppTestEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + return iterator; } + /** - * List endpoint returns CI Visibility test events that match a log search query. Results are - * paginated similarly to logs. - * - *

Use this endpoint to see your latest test events. + *

List endpoint returns CI Visibility test events that match a log search query. + * Results are paginated similarly to logs.

+ *

Use this endpoint to see your latest test events.

* * @param parameters Optional parameters for the request. * @return ApiResponse<CIAppTestEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -395,8 +343,7 @@ public PaginationIterable listCIAppTestEventsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listCIAppTestEventsWithHttpInfo( - ListCIAppTestEventsOptionalParameters parameters) throws ApiException { + public ApiResponse listCIAppTestEventsWithHttpInfo(ListCIAppTestEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -407,6 +354,7 @@ public ApiResponse listCIAppTestEventsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/ci/tests/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -417,36 +365,19 @@ public ApiResponse listCIAppTestEventsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CiVisibilityTestsApi.listCIAppTestEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.CiVisibilityTestsApi.listCIAppTestEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of tests events. * - *

See {@link #listCIAppTestEventsWithHttpInfo}. + * See {@link #listCIAppTestEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CIAppTestEventsResponse>> */ - public CompletableFuture> - listCIAppTestEventsWithHttpInfoAsync(ListCIAppTestEventsOptionalParameters parameters) { + public CompletableFuture> listCIAppTestEventsWithHttpInfoAsync(ListCIAppTestEventsOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -457,6 +388,7 @@ public ApiResponse listCIAppTestEventsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/ci/tests/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -469,39 +401,24 @@ public ApiResponse listCIAppTestEventsWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CiVisibilityTestsApi.listCIAppTestEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CiVisibilityTestsApi.listCIAppTestEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchCIAppTestEvents. */ + /** + * Manage optional parameters to searchCIAppTestEvents. + */ public static class SearchCIAppTestEventsOptionalParameters { private CIAppTestEventsRequest body; /** * Set body. - * - * @param body (optional) + * @param body (optional) * @return SearchCIAppTestEventsOptionalParameters */ public SearchCIAppTestEventsOptionalParameters body(CIAppTestEventsRequest body) { @@ -511,136 +428,122 @@ public SearchCIAppTestEventsOptionalParameters body(CIAppTestEventsRequest body) } /** - * Search tests events. - * - *

See {@link #searchCIAppTestEventsWithHttpInfo}. - * - * @return CIAppTestEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppTestEventsResponse searchCIAppTestEvents() throws ApiException { - return searchCIAppTestEventsWithHttpInfo(new SearchCIAppTestEventsOptionalParameters()) - .getData(); + * Search tests events. + * + * See {@link #searchCIAppTestEventsWithHttpInfo}. + * + * @return CIAppTestEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppTestEventsResponse searchCIAppTestEvents () throws ApiException { + return searchCIAppTestEventsWithHttpInfo(new SearchCIAppTestEventsOptionalParameters()).getData(); } /** - * Search tests events. - * - *

See {@link #searchCIAppTestEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<CIAppTestEventsResponse> - */ - public CompletableFuture searchCIAppTestEventsAsync() { - return searchCIAppTestEventsWithHttpInfoAsync(new SearchCIAppTestEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search tests events. + * + * See {@link #searchCIAppTestEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<CIAppTestEventsResponse> + */ + public CompletableFuturesearchCIAppTestEventsAsync() { + return searchCIAppTestEventsWithHttpInfoAsync(new SearchCIAppTestEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search tests events. - * - *

See {@link #searchCIAppTestEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CIAppTestEventsResponse - * @throws ApiException if fails to make API call - */ - public CIAppTestEventsResponse searchCIAppTestEvents( - SearchCIAppTestEventsOptionalParameters parameters) throws ApiException { + * Search tests events. + * + * See {@link #searchCIAppTestEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CIAppTestEventsResponse + * @throws ApiException if fails to make API call + */ + public CIAppTestEventsResponse searchCIAppTestEvents(SearchCIAppTestEventsOptionalParameters parameters) throws ApiException { return searchCIAppTestEventsWithHttpInfo(parameters).getData(); } /** - * Search tests events. - * - *

See {@link #searchCIAppTestEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CIAppTestEventsResponse> - */ - public CompletableFuture searchCIAppTestEventsAsync( - SearchCIAppTestEventsOptionalParameters parameters) { - return searchCIAppTestEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search tests events. + * + * See {@link #searchCIAppTestEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CIAppTestEventsResponse> + */ + public CompletableFuturesearchCIAppTestEventsAsync(SearchCIAppTestEventsOptionalParameters parameters) { + return searchCIAppTestEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Search tests events. - * - *

See {@link #searchCIAppTestEventsWithHttpInfo}. - * - * @return PaginationIterable<CIAppTestEvent> - */ + * Search tests events. + * + * See {@link #searchCIAppTestEventsWithHttpInfo}. + * + * @return PaginationIterable<CIAppTestEvent> + */ public PaginationIterable searchCIAppTestEventsWithPagination() { - SearchCIAppTestEventsOptionalParameters parameters = - new SearchCIAppTestEventsOptionalParameters(); + SearchCIAppTestEventsOptionalParameters parameters = new SearchCIAppTestEventsOptionalParameters(); return searchCIAppTestEventsWithPagination(parameters); } /** - * Search tests events. - * - *

See {@link #searchCIAppTestEventsWithHttpInfo}. - * - * @return CIAppTestEventsResponse - */ - public PaginationIterable searchCIAppTestEventsWithPagination( - SearchCIAppTestEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { + * Search tests events. + * + * See {@link #searchCIAppTestEventsWithHttpInfo}. + * + * @return CIAppTestEventsResponse + */ + public PaginationIterable searchCIAppTestEventsWithPagination(SearchCIAppTestEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.body == null) { parameters.body(new CIAppTestEventsRequest()); - } + } - if (parameters.body.getPage() == null) { + if(parameters.body.getPage() == null) { parameters.body.setPage(new CIAppQueryPageOptions()); - } + } - if (parameters.body.getPage().getLimit() == null) { + + + + if (parameters.body.getPage().getLimit() == null) { limit = 10; parameters.body.getPage().setLimit(limit); - } else { + } else { limit = parameters.body.getPage().getLimit(); - } + } + + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchCIAppTestEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + PaginationIterable iterator = new PaginationIterable(this, "searchCIAppTestEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * List endpoint returns CI Visibility test events that match a log search query. Results are - * paginated similarly to logs. - * - *

Use this endpoint to build complex events filtering and search. + *

List endpoint returns CI Visibility test events that match a log search query. + * Results are paginated similarly to logs.

+ *

Use this endpoint to build complex events filtering and search.

* * @param parameters Optional parameters for the request. * @return ApiResponse<CIAppTestEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -649,74 +552,44 @@ public PaginationIterable searchCIAppTestEventsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchCIAppTestEventsWithHttpInfo( - SearchCIAppTestEventsOptionalParameters parameters) throws ApiException { + public ApiResponse searchCIAppTestEventsWithHttpInfo(SearchCIAppTestEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/ci/tests/events/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CiVisibilityTestsApi.searchCIAppTestEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CiVisibilityTestsApi.searchCIAppTestEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search tests events. * - *

See {@link #searchCIAppTestEventsWithHttpInfo}. + * See {@link #searchCIAppTestEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CIAppTestEventsResponse>> */ - public CompletableFuture> - searchCIAppTestEventsWithHttpInfoAsync(SearchCIAppTestEventsOptionalParameters parameters) { + public CompletableFuture> searchCIAppTestEventsWithHttpInfoAsync(SearchCIAppTestEventsOptionalParameters parameters) { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/ci/tests/events/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CiVisibilityTestsApi.searchCIAppTestEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CiVisibilityTestsApi.searchCIAppTestEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudWorkloadSecurityApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudWorkloadSecurityApi.java index 592fc92864e..4dd7f6a5957 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudWorkloadSecurityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudWorkloadSecurityApi.java @@ -1,26 +1,33 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateRequest; -import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse; -import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateRequest; -import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRulesListResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRulesListResponse; +import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse; +import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateRequest; +import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateRequest; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityApi { private ApiClient apiClient; - public CloudWorkloadSecurityApi() { this(ApiClient.getDefaultApiClient()); } @@ -48,44 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a Cloud Workload Security Agent rule. - * - *

See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfo}. - * - * @param body The definition of the new Agent rule. (required) - * @return CloudWorkloadSecurityAgentRuleResponse - * @throws ApiException if fails to make API call - */ - public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRule( - CloudWorkloadSecurityAgentRuleCreateRequest body) throws ApiException { + * Create a Cloud Workload Security Agent rule. + * + * See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * + * @param body The definition of the new Agent rule. (required) + * @return CloudWorkloadSecurityAgentRuleResponse + * @throws ApiException if fails to make API call + */ + public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRule(CloudWorkloadSecurityAgentRuleCreateRequest body) throws ApiException { return createCloudWorkloadSecurityAgentRuleWithHttpInfo(body).getData(); } /** - * Create a Cloud Workload Security Agent rule. - * - *

See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. - * - * @param body The definition of the new Agent rule. (required) - * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse> - */ - public CompletableFuture - createCloudWorkloadSecurityAgentRuleAsync(CloudWorkloadSecurityAgentRuleCreateRequest body) { - return createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a Cloud Workload Security Agent rule. + * + * See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. + * + * @param body The definition of the new Agent rule. (required) + * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse> + */ + public CompletableFuturecreateCloudWorkloadSecurityAgentRuleAsync(CloudWorkloadSecurityAgentRuleCreateRequest body) { + return createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a new Agent rule with the given parameters. + *

Create a new Agent rule with the given parameters.

* * @param body The definition of the new Agent rule. (required) * @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -95,136 +99,94 @@ public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRu * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - createCloudWorkloadSecurityAgentRuleWithHttpInfo( - CloudWorkloadSecurityAgentRuleCreateRequest body) throws ApiException { + public ApiResponse createCloudWorkloadSecurityAgentRuleWithHttpInfo(CloudWorkloadSecurityAgentRuleCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createCloudWorkloadSecurityAgentRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createCloudWorkloadSecurityAgentRule"); } // create path and map variables String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.createCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.createCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a Cloud Workload Security Agent rule. * - *

See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfo}. * * @param body The definition of the new Agent rule. (required) * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>> */ - public CompletableFuture> - createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync( - CloudWorkloadSecurityAgentRuleCreateRequest body) { + public CompletableFuture> createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(CloudWorkloadSecurityAgentRuleCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createCloudWorkloadSecurityAgentRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createCloudWorkloadSecurityAgentRule")); + return result; } // create path and map variables String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.createCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.createCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a Cloud Workload Security Agent rule. - * - *

See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfo}. - * - * @param agentRuleId The ID of the Agent rule. (required) - * @throws ApiException if fails to make API call - */ - public void deleteCloudWorkloadSecurityAgentRule(String agentRuleId) throws ApiException { + * Delete a Cloud Workload Security Agent rule. + * + * See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * + * @param agentRuleId The ID of the Agent rule. (required) + * @throws ApiException if fails to make API call + */ + public void deleteCloudWorkloadSecurityAgentRule(String agentRuleId) throws ApiException { deleteCloudWorkloadSecurityAgentRuleWithHttpInfo(agentRuleId); } /** - * Delete a Cloud Workload Security Agent rule. - * - *

See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. - * - * @param agentRuleId The ID of the Agent rule. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteCloudWorkloadSecurityAgentRuleAsync(String agentRuleId) { - return deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(agentRuleId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a Cloud Workload Security Agent rule. + * + * See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. + * + * @param agentRuleId The ID of the Agent rule. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteCloudWorkloadSecurityAgentRuleAsync(String agentRuleId) { + return deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(agentRuleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a specific Agent rule. + *

Delete a specific Agent rule.

* * @param agentRuleId The ID of the Agent rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -233,138 +195,96 @@ public CompletableFuture deleteCloudWorkloadSecurityAgentRuleAsync(String * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteCloudWorkloadSecurityAgentRuleWithHttpInfo(String agentRuleId) - throws ApiException { + public ApiResponse deleteCloudWorkloadSecurityAgentRuleWithHttpInfo(String agentRuleId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'agentRuleId' is set if (agentRuleId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'agentRuleId' when calling" - + " deleteCloudWorkloadSecurityAgentRule"); + throw new ApiException(400, "Missing the required parameter 'agentRuleId' when calling deleteCloudWorkloadSecurityAgentRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" - .replaceAll( - "\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" + .replaceAll("\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.deleteCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.deleteCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a Cloud Workload Security Agent rule. * - *

See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfo}. * * @param agentRuleId The ID of the Agent rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync( - String agentRuleId) { + public CompletableFuture> deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(String agentRuleId) { Object localVarPostBody = null; // verify the required parameter 'agentRuleId' is set if (agentRuleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'agentRuleId' when calling" - + " deleteCloudWorkloadSecurityAgentRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'agentRuleId' when calling deleteCloudWorkloadSecurityAgentRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" - .replaceAll( - "\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" + .replaceAll("\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.deleteCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.deleteCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get the latest Cloud Workload Security policy. - * - *

See {@link #downloadCloudWorkloadPolicyFileWithHttpInfo}. - * - * @return File - * @throws ApiException if fails to make API call - */ - public File downloadCloudWorkloadPolicyFile() throws ApiException { + * Get the latest Cloud Workload Security policy. + * + * See {@link #downloadCloudWorkloadPolicyFileWithHttpInfo}. + * + * @return File + * @throws ApiException if fails to make API call + */ + public File downloadCloudWorkloadPolicyFile() throws ApiException { return downloadCloudWorkloadPolicyFileWithHttpInfo().getData(); } /** - * Get the latest Cloud Workload Security policy. - * - *

See {@link #downloadCloudWorkloadPolicyFileWithHttpInfoAsync}. - * - * @return CompletableFuture<File> - */ - public CompletableFuture downloadCloudWorkloadPolicyFileAsync() { - return downloadCloudWorkloadPolicyFileWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get the latest Cloud Workload Security policy. + * + * See {@link #downloadCloudWorkloadPolicyFileWithHttpInfoAsync}. + * + * @return CompletableFuture<File> + */ + public CompletableFuturedownloadCloudWorkloadPolicyFileAsync() { + return downloadCloudWorkloadPolicyFileWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * The download endpoint generates a Cloud Workload Security policy file from your currently - * active Cloud Workload Security rules, and downloads them as a .policy file. This file can then - * be deployed to your Agents to update the policy running in your environment. + *

The download endpoint generates a Cloud Workload Security policy file from your currently active + * Cloud Workload Security rules, and downloads them as a .policy file. This file can then be deployed to + * your Agents to update the policy running in your environment.

* * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -377,32 +297,18 @@ public ApiResponse downloadCloudWorkloadPolicyFileWithHttpInfo() throws Ap // create path and map variables String localVarPath = "/api/v2/security/cloud_workload/policy/download"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.downloadCloudWorkloadPolicyFile", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/yaml", "application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.downloadCloudWorkloadPolicyFile", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/yaml", "application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the latest Cloud Workload Security policy. * - *

See {@link #downloadCloudWorkloadPolicyFileWithHttpInfo}. + * See {@link #downloadCloudWorkloadPolicyFileWithHttpInfo}. * * @return CompletableFuture<ApiResponse<File>> */ @@ -411,74 +317,57 @@ public CompletableFuture> downloadCloudWorkloadPolicyFileWithH // create path and map variables String localVarPath = "/api/v2/security/cloud_workload/policy/download"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.downloadCloudWorkloadPolicyFile", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/yaml", "application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.downloadCloudWorkloadPolicyFile", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/yaml", "application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a Cloud Workload Security Agent rule. - * - *

See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfo}. - * - * @param agentRuleId The ID of the Agent rule. (required) - * @return CloudWorkloadSecurityAgentRuleResponse - * @throws ApiException if fails to make API call - */ - public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule( - String agentRuleId) throws ApiException { + * Get a Cloud Workload Security Agent rule. + * + * See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * + * @param agentRuleId The ID of the Agent rule. (required) + * @return CloudWorkloadSecurityAgentRuleResponse + * @throws ApiException if fails to make API call + */ + public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule(String agentRuleId) throws ApiException { return getCloudWorkloadSecurityAgentRuleWithHttpInfo(agentRuleId).getData(); } /** - * Get a Cloud Workload Security Agent rule. - * - *

See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. - * - * @param agentRuleId The ID of the Agent rule. (required) - * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse> - */ - public CompletableFuture - getCloudWorkloadSecurityAgentRuleAsync(String agentRuleId) { - return getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(agentRuleId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a Cloud Workload Security Agent rule. + * + * See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. + * + * @param agentRuleId The ID of the Agent rule. (required) + * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse> + */ + public CompletableFuturegetCloudWorkloadSecurityAgentRuleAsync(String agentRuleId) { + return getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(agentRuleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the details of a specific Agent rule. + *

Get the details of a specific Agent rule.

* * @param agentRuleId The ID of the Agent rule. (required) * @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -487,140 +376,94 @@ public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getCloudWorkloadSecurityAgentRuleWithHttpInfo(String agentRuleId) throws ApiException { + public ApiResponse getCloudWorkloadSecurityAgentRuleWithHttpInfo(String agentRuleId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'agentRuleId' is set if (agentRuleId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'agentRuleId' when calling" - + " getCloudWorkloadSecurityAgentRule"); + throw new ApiException(400, "Missing the required parameter 'agentRuleId' when calling getCloudWorkloadSecurityAgentRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" - .replaceAll( - "\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" + .replaceAll("\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.getCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.getCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a Cloud Workload Security Agent rule. * - *

See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfo}. * * @param agentRuleId The ID of the Agent rule. (required) * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>> */ - public CompletableFuture> - getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(String agentRuleId) { + public CompletableFuture> getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(String agentRuleId) { Object localVarPostBody = null; // verify the required parameter 'agentRuleId' is set if (agentRuleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'agentRuleId' when calling" - + " getCloudWorkloadSecurityAgentRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'agentRuleId' when calling getCloudWorkloadSecurityAgentRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" - .replaceAll( - "\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" + .replaceAll("\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.getCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.getCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all Cloud Workload Security Agent rules. - * - *

See {@link #listCloudWorkloadSecurityAgentRulesWithHttpInfo}. - * - * @return CloudWorkloadSecurityAgentRulesListResponse - * @throws ApiException if fails to make API call - */ - public CloudWorkloadSecurityAgentRulesListResponse listCloudWorkloadSecurityAgentRules() - throws ApiException { + * Get all Cloud Workload Security Agent rules. + * + * See {@link #listCloudWorkloadSecurityAgentRulesWithHttpInfo}. + * + * @return CloudWorkloadSecurityAgentRulesListResponse + * @throws ApiException if fails to make API call + */ + public CloudWorkloadSecurityAgentRulesListResponse listCloudWorkloadSecurityAgentRules() throws ApiException { return listCloudWorkloadSecurityAgentRulesWithHttpInfo().getData(); } /** - * Get all Cloud Workload Security Agent rules. - * - *

See {@link #listCloudWorkloadSecurityAgentRulesWithHttpInfoAsync}. - * - * @return CompletableFuture<CloudWorkloadSecurityAgentRulesListResponse> - */ - public CompletableFuture - listCloudWorkloadSecurityAgentRulesAsync() { - return listCloudWorkloadSecurityAgentRulesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all Cloud Workload Security Agent rules. + * + * See {@link #listCloudWorkloadSecurityAgentRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<CloudWorkloadSecurityAgentRulesListResponse> + */ + public CompletableFuturelistCloudWorkloadSecurityAgentRulesAsync() { + return listCloudWorkloadSecurityAgentRulesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of Agent rules. + *

Get the list of Agent rules.

* * @return ApiResponse<CloudWorkloadSecurityAgentRulesListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -628,120 +471,86 @@ public CloudWorkloadSecurityAgentRulesListResponse listCloudWorkloadSecurityAgen * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - listCloudWorkloadSecurityAgentRulesWithHttpInfo() throws ApiException { + public ApiResponse listCloudWorkloadSecurityAgentRulesWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.listCloudWorkloadSecurityAgentRules", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.listCloudWorkloadSecurityAgentRules", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all Cloud Workload Security Agent rules. * - *

See {@link #listCloudWorkloadSecurityAgentRulesWithHttpInfo}. + * See {@link #listCloudWorkloadSecurityAgentRulesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRulesListResponse>> */ - public CompletableFuture> - listCloudWorkloadSecurityAgentRulesWithHttpInfoAsync() { + public CompletableFuture> listCloudWorkloadSecurityAgentRulesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.listCloudWorkloadSecurityAgentRules", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.listCloudWorkloadSecurityAgentRules", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a Cloud Workload Security Agent rule. - * - *

See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfo}. - * - * @param agentRuleId The ID of the Agent rule. (required) - * @param body New definition of the Agent rule. (required) - * @return CloudWorkloadSecurityAgentRuleResponse - * @throws ApiException if fails to make API call - */ - public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRule( - String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) throws ApiException { + * Update a Cloud Workload Security Agent rule. + * + * See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * + * @param agentRuleId The ID of the Agent rule. (required) + * @param body New definition of the Agent rule. (required) + * @return CloudWorkloadSecurityAgentRuleResponse + * @throws ApiException if fails to make API call + */ + public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRule(String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) throws ApiException { return updateCloudWorkloadSecurityAgentRuleWithHttpInfo(agentRuleId, body).getData(); } /** - * Update a Cloud Workload Security Agent rule. - * - *

See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. - * - * @param agentRuleId The ID of the Agent rule. (required) - * @param body New definition of the Agent rule. (required) - * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse> - */ - public CompletableFuture - updateCloudWorkloadSecurityAgentRuleAsync( - String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) { - return updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(agentRuleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a Cloud Workload Security Agent rule. + * + * See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}. + * + * @param agentRuleId The ID of the Agent rule. (required) + * @param body New definition of the Agent rule. (required) + * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse> + */ + public CompletableFutureupdateCloudWorkloadSecurityAgentRuleAsync(String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) { + return updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(agentRuleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a specific Agent rule. Returns the Agent rule object when the request is successful. + *

Update a specific Agent rule. + * Returns the Agent rule object when the request is successful.

* * @param agentRuleId The ID of the Agent rule. (required) * @param body New definition of the Agent rule. (required) * @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -752,125 +561,71 @@ public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRu * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - updateCloudWorkloadSecurityAgentRuleWithHttpInfo( - String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) - throws ApiException { + public ApiResponse updateCloudWorkloadSecurityAgentRuleWithHttpInfo(String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'agentRuleId' is set if (agentRuleId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'agentRuleId' when calling" - + " updateCloudWorkloadSecurityAgentRule"); + throw new ApiException(400, "Missing the required parameter 'agentRuleId' when calling updateCloudWorkloadSecurityAgentRule"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " updateCloudWorkloadSecurityAgentRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateCloudWorkloadSecurityAgentRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" - .replaceAll( - "\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" + .replaceAll("\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.updateCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.updateCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a Cloud Workload Security Agent rule. * - *

See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfo}. + * See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfo}. * * @param agentRuleId The ID of the Agent rule. (required) * @param body New definition of the Agent rule. (required) * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>> */ - public CompletableFuture> - updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync( - String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) { + public CompletableFuture> updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'agentRuleId' is set if (agentRuleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'agentRuleId' when calling" - + " updateCloudWorkloadSecurityAgentRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'agentRuleId' when calling updateCloudWorkloadSecurityAgentRule")); + 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" - + " updateCloudWorkloadSecurityAgentRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateCloudWorkloadSecurityAgentRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" - .replaceAll( - "\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + String localVarPath = "/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}" + .replaceAll("\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudWorkloadSecurityApi.updateCloudWorkloadSecurityAgentRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudWorkloadSecurityApi.updateCloudWorkloadSecurityAgentRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudflareIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudflareIntegrationApi.java index a0bf511c438..8ed03f3733f 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudflareIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudflareIntegrationApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.CloudflareAccountCreateRequest; -import com.datadog.api.client.v2.model.CloudflareAccountResponse; -import com.datadog.api.client.v2.model.CloudflareAccountUpdateRequest; -import com.datadog.api.client.v2.model.CloudflareAccountsResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.CloudflareAccountsResponse; +import com.datadog.api.client.v2.model.CloudflareAccountResponse; +import com.datadog.api.client.v2.model.CloudflareAccountCreateRequest; +import com.datadog.api.client.v2.model.CloudflareAccountUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareIntegrationApi { private ApiClient apiClient; - public CloudflareIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,44 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Cloudflare account. - * - *

See {@link #createCloudflareAccountWithHttpInfo}. - * - * @param body (required) - * @return CloudflareAccountResponse - * @throws ApiException if fails to make API call - */ - public CloudflareAccountResponse createCloudflareAccount(CloudflareAccountCreateRequest body) - throws ApiException { + * Add Cloudflare account. + * + * See {@link #createCloudflareAccountWithHttpInfo}. + * + * @param body (required) + * @return CloudflareAccountResponse + * @throws ApiException if fails to make API call + */ + public CloudflareAccountResponse createCloudflareAccount(CloudflareAccountCreateRequest body) throws ApiException { return createCloudflareAccountWithHttpInfo(body).getData(); } /** - * Add Cloudflare account. - * - *

See {@link #createCloudflareAccountWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<CloudflareAccountResponse> - */ - public CompletableFuture createCloudflareAccountAsync( - CloudflareAccountCreateRequest body) { - return createCloudflareAccountWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Add Cloudflare account. + * + * See {@link #createCloudflareAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<CloudflareAccountResponse> + */ + public CompletableFuturecreateCloudflareAccountAsync(CloudflareAccountCreateRequest body) { + return createCloudflareAccountWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Cloudflare account. + *

Create a Cloudflare account.

* - * @param body (required) + * @param body (required) * @return ApiResponse<CloudflareAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -94,128 +99,94 @@ public CompletableFuture createCloudflareAccountAsync * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createCloudflareAccountWithHttpInfo( - CloudflareAccountCreateRequest body) throws ApiException { + public ApiResponse createCloudflareAccountWithHttpInfo(CloudflareAccountCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createCloudflareAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createCloudflareAccount"); } // create path and map variables String localVarPath = "/api/v2/integrations/cloudflare/accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.createCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.createCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add Cloudflare account. * - *

See {@link #createCloudflareAccountWithHttpInfo}. + * See {@link #createCloudflareAccountWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<CloudflareAccountResponse>> */ - public CompletableFuture> - createCloudflareAccountWithHttpInfoAsync(CloudflareAccountCreateRequest body) { + public CompletableFuture> createCloudflareAccountWithHttpInfoAsync(CloudflareAccountCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createCloudflareAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createCloudflareAccount")); + return result; } // create path and map variables String localVarPath = "/api/v2/integrations/cloudflare/accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.createCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.createCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete Cloudflare account. - * - *

See {@link #deleteCloudflareAccountWithHttpInfo}. - * - * @param accountId None (required) - * @throws ApiException if fails to make API call - */ - public void deleteCloudflareAccount(String accountId) throws ApiException { + * Delete Cloudflare account. + * + * See {@link #deleteCloudflareAccountWithHttpInfo}. + * + * @param accountId None (required) + * @throws ApiException if fails to make API call + */ + public void deleteCloudflareAccount(String accountId) throws ApiException { deleteCloudflareAccountWithHttpInfo(accountId); } /** - * Delete Cloudflare account. - * - *

See {@link #deleteCloudflareAccountWithHttpInfoAsync}. - * - * @param accountId None (required) - * @return CompletableFuture - */ - public CompletableFuture deleteCloudflareAccountAsync(String accountId) { - return deleteCloudflareAccountWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete Cloudflare account. + * + * See {@link #deleteCloudflareAccountWithHttpInfoAsync}. + * + * @param accountId None (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteCloudflareAccountAsync(String accountId) { + return deleteCloudflareAccountWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Cloudflare account. + *

Delete a Cloudflare account.

* * @param accountId None (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -225,134 +196,97 @@ public CompletableFuture deleteCloudflareAccountAsync(String accountId) { * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteCloudflareAccountWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse deleteCloudflareAccountWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteCloudflareAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteCloudflareAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/cloudflare/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/cloudflare/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.deleteCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.deleteCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete Cloudflare account. * - *

See {@link #deleteCloudflareAccountWithHttpInfo}. + * See {@link #deleteCloudflareAccountWithHttpInfo}. * * @param accountId None (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCloudflareAccountWithHttpInfoAsync( - String accountId) { + public CompletableFuture> deleteCloudflareAccountWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling deleteCloudflareAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling deleteCloudflareAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/cloudflare/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/cloudflare/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.deleteCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.deleteCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get Cloudflare account. - * - *

See {@link #getCloudflareAccountWithHttpInfo}. - * - * @param accountId None (required) - * @return CloudflareAccountResponse - * @throws ApiException if fails to make API call - */ - public CloudflareAccountResponse getCloudflareAccount(String accountId) throws ApiException { + * Get Cloudflare account. + * + * See {@link #getCloudflareAccountWithHttpInfo}. + * + * @param accountId None (required) + * @return CloudflareAccountResponse + * @throws ApiException if fails to make API call + */ + public CloudflareAccountResponse getCloudflareAccount(String accountId) throws ApiException { return getCloudflareAccountWithHttpInfo(accountId).getData(); } /** - * Get Cloudflare account. - * - *

See {@link #getCloudflareAccountWithHttpInfoAsync}. - * - * @param accountId None (required) - * @return CompletableFuture<CloudflareAccountResponse> - */ - public CompletableFuture getCloudflareAccountAsync(String accountId) { - return getCloudflareAccountWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Get Cloudflare account. + * + * See {@link #getCloudflareAccountWithHttpInfoAsync}. + * + * @param accountId None (required) + * @return CompletableFuture<CloudflareAccountResponse> + */ + public CompletableFuturegetCloudflareAccountAsync(String accountId) { + return getCloudflareAccountWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a Cloudflare account. + *

Get a Cloudflare account.

* * @param accountId None (required) * @return ApiResponse<CloudflareAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -362,130 +296,94 @@ public CompletableFuture getCloudflareAccountAsync(St * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getCloudflareAccountWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse getCloudflareAccountWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling getCloudflareAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling getCloudflareAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/cloudflare/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/cloudflare/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.getCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.getCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get Cloudflare account. * - *

See {@link #getCloudflareAccountWithHttpInfo}. + * See {@link #getCloudflareAccountWithHttpInfo}. * * @param accountId None (required) * @return CompletableFuture<ApiResponse<CloudflareAccountResponse>> */ - public CompletableFuture> - getCloudflareAccountWithHttpInfoAsync(String accountId) { + public CompletableFuture> getCloudflareAccountWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling getCloudflareAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling getCloudflareAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/cloudflare/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/cloudflare/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.getCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.getCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List Cloudflare accounts. - * - *

See {@link #listCloudflareAccountsWithHttpInfo}. - * - * @return CloudflareAccountsResponse - * @throws ApiException if fails to make API call - */ - public CloudflareAccountsResponse listCloudflareAccounts() throws ApiException { + * List Cloudflare accounts. + * + * See {@link #listCloudflareAccountsWithHttpInfo}. + * + * @return CloudflareAccountsResponse + * @throws ApiException if fails to make API call + */ + public CloudflareAccountsResponse listCloudflareAccounts() throws ApiException { return listCloudflareAccountsWithHttpInfo().getData(); } /** - * List Cloudflare accounts. - * - *

See {@link #listCloudflareAccountsWithHttpInfoAsync}. - * - * @return CompletableFuture<CloudflareAccountsResponse> - */ - public CompletableFuture listCloudflareAccountsAsync() { - return listCloudflareAccountsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List Cloudflare accounts. + * + * See {@link #listCloudflareAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<CloudflareAccountsResponse> + */ + public CompletableFuturelistCloudflareAccountsAsync() { + return listCloudflareAccountsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List Cloudflare accounts. + *

List Cloudflare accounts.

* * @return ApiResponse<CloudflareAccountsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -495,118 +393,85 @@ public CompletableFuture listCloudflareAccountsAsync * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listCloudflareAccountsWithHttpInfo() - throws ApiException { + public ApiResponse listCloudflareAccountsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integrations/cloudflare/accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.listCloudflareAccounts", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.listCloudflareAccounts", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List Cloudflare accounts. * - *

See {@link #listCloudflareAccountsWithHttpInfo}. + * See {@link #listCloudflareAccountsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<CloudflareAccountsResponse>> */ - public CompletableFuture> - listCloudflareAccountsWithHttpInfoAsync() { + public CompletableFuture> listCloudflareAccountsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integrations/cloudflare/accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.listCloudflareAccounts", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.listCloudflareAccounts", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update Cloudflare account. - * - *

See {@link #updateCloudflareAccountWithHttpInfo}. - * - * @param accountId None (required) - * @param body (required) - * @return CloudflareAccountResponse - * @throws ApiException if fails to make API call - */ - public CloudflareAccountResponse updateCloudflareAccount( - String accountId, CloudflareAccountUpdateRequest body) throws ApiException { + * Update Cloudflare account. + * + * See {@link #updateCloudflareAccountWithHttpInfo}. + * + * @param accountId None (required) + * @param body (required) + * @return CloudflareAccountResponse + * @throws ApiException if fails to make API call + */ + public CloudflareAccountResponse updateCloudflareAccount(String accountId, CloudflareAccountUpdateRequest body) throws ApiException { return updateCloudflareAccountWithHttpInfo(accountId, body).getData(); } /** - * Update Cloudflare account. - * - *

See {@link #updateCloudflareAccountWithHttpInfoAsync}. - * - * @param accountId None (required) - * @param body (required) - * @return CompletableFuture<CloudflareAccountResponse> - */ - public CompletableFuture updateCloudflareAccountAsync( - String accountId, CloudflareAccountUpdateRequest body) { - return updateCloudflareAccountWithHttpInfoAsync(accountId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Cloudflare account. + * + * See {@link #updateCloudflareAccountWithHttpInfoAsync}. + * + * @param accountId None (required) + * @param body (required) + * @return CompletableFuture<CloudflareAccountResponse> + */ + public CompletableFutureupdateCloudflareAccountAsync(String accountId, CloudflareAccountUpdateRequest body) { + return updateCloudflareAccountWithHttpInfoAsync(accountId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Cloudflare account. + *

Update a Cloudflare account.

* * @param accountId None (required) - * @param body (required) + * @param body (required) * @return ApiResponse<CloudflareAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -616,111 +481,71 @@ public CompletableFuture updateCloudflareAccountAsync * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateCloudflareAccountWithHttpInfo( - String accountId, CloudflareAccountUpdateRequest body) throws ApiException { + public ApiResponse updateCloudflareAccountWithHttpInfo(String accountId, CloudflareAccountUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateCloudflareAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling updateCloudflareAccount"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateCloudflareAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateCloudflareAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/cloudflare/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/cloudflare/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.updateCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.updateCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Cloudflare account. * - *

See {@link #updateCloudflareAccountWithHttpInfo}. + * See {@link #updateCloudflareAccountWithHttpInfo}. * * @param accountId None (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<CloudflareAccountResponse>> */ - public CompletableFuture> - updateCloudflareAccountWithHttpInfoAsync( - String accountId, CloudflareAccountUpdateRequest body) { + public CompletableFuture> updateCloudflareAccountWithHttpInfoAsync(String accountId, CloudflareAccountUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling updateCloudflareAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling updateCloudflareAccount")); + 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 updateCloudflareAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateCloudflareAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/cloudflare/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/cloudflare/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.CloudflareIntegrationApi.updateCloudflareAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.CloudflareIntegrationApi.updateCloudflareAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/ConfluentCloudApi.java b/src/main/java/com/datadog/api/client/v2/api/ConfluentCloudApi.java index 4b106e7caf3..455997c2bfc 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ConfluentCloudApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ConfluentCloudApi.java @@ -1,28 +1,36 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.ConfluentAccountCreateRequest; -import com.datadog.api.client.v2.model.ConfluentAccountResponse; -import com.datadog.api.client.v2.model.ConfluentAccountUpdateRequest; -import com.datadog.api.client.v2.model.ConfluentAccountsResponse; -import com.datadog.api.client.v2.model.ConfluentResourceRequest; -import com.datadog.api.client.v2.model.ConfluentResourceResponse; -import com.datadog.api.client.v2.model.ConfluentResourcesResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.ConfluentAccountsResponse; +import com.datadog.api.client.v2.model.ConfluentAccountResponse; +import com.datadog.api.client.v2.model.ConfluentAccountCreateRequest; +import com.datadog.api.client.v2.model.ConfluentAccountUpdateRequest; +import com.datadog.api.client.v2.model.ConfluentResourcesResponse; +import com.datadog.api.client.v2.model.ConfluentResourceResponse; +import com.datadog.api.client.v2.model.ConfluentResourceRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentCloudApi { private ApiClient apiClient; - public ConfluentCloudApi() { this(ApiClient.getDefaultApiClient()); } @@ -50,44 +58,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Confluent account. - * - *

See {@link #createConfluentAccountWithHttpInfo}. - * - * @param body Confluent payload (required) - * @return ConfluentAccountResponse - * @throws ApiException if fails to make API call - */ - public ConfluentAccountResponse createConfluentAccount(ConfluentAccountCreateRequest body) - throws ApiException { + * Add Confluent account. + * + * See {@link #createConfluentAccountWithHttpInfo}. + * + * @param body Confluent payload (required) + * @return ConfluentAccountResponse + * @throws ApiException if fails to make API call + */ + public ConfluentAccountResponse createConfluentAccount(ConfluentAccountCreateRequest body) throws ApiException { return createConfluentAccountWithHttpInfo(body).getData(); } /** - * Add Confluent account. - * - *

See {@link #createConfluentAccountWithHttpInfoAsync}. - * - * @param body Confluent payload (required) - * @return CompletableFuture<ConfluentAccountResponse> - */ - public CompletableFuture createConfluentAccountAsync( - ConfluentAccountCreateRequest body) { - return createConfluentAccountWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Add Confluent account. + * + * See {@link #createConfluentAccountWithHttpInfoAsync}. + * + * @param body Confluent payload (required) + * @return CompletableFuture<ConfluentAccountResponse> + */ + public CompletableFuturecreateConfluentAccountAsync(ConfluentAccountCreateRequest body) { + return createConfluentAccountWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Confluent account. + *

Create a Confluent account.

* * @param body Confluent payload (required) * @return ApiResponse<ConfluentAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,134 +102,98 @@ public CompletableFuture createConfluentAccountAsync( * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse createConfluentAccountWithHttpInfo( - ConfluentAccountCreateRequest body) throws ApiException { + public ApiResponse createConfluentAccountWithHttpInfo(ConfluentAccountCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createConfluentAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createConfluentAccount"); } // create path and map variables String localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.createConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.createConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add Confluent account. * - *

See {@link #createConfluentAccountWithHttpInfo}. + * See {@link #createConfluentAccountWithHttpInfo}. * * @param body Confluent payload (required) * @return CompletableFuture<ApiResponse<ConfluentAccountResponse>> */ - public CompletableFuture> - createConfluentAccountWithHttpInfoAsync(ConfluentAccountCreateRequest body) { + public CompletableFuture> createConfluentAccountWithHttpInfoAsync(ConfluentAccountCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createConfluentAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createConfluentAccount")); + return result; } // create path and map variables String localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.createConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.createConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Add resource to Confluent account. - * - *

See {@link #createConfluentResourceWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @param body Confluent payload (required) - * @return ConfluentResourceResponse - * @throws ApiException if fails to make API call - */ - public ConfluentResourceResponse createConfluentResource( - String accountId, ConfluentResourceRequest body) throws ApiException { + * Add resource to Confluent account. + * + * See {@link #createConfluentResourceWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @param body Confluent payload (required) + * @return ConfluentResourceResponse + * @throws ApiException if fails to make API call + */ + public ConfluentResourceResponse createConfluentResource(String accountId, ConfluentResourceRequest body) throws ApiException { return createConfluentResourceWithHttpInfo(accountId, body).getData(); } /** - * Add resource to Confluent account. - * - *

See {@link #createConfluentResourceWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @param body Confluent payload (required) - * @return CompletableFuture<ConfluentResourceResponse> - */ - public CompletableFuture createConfluentResourceAsync( - String accountId, ConfluentResourceRequest body) { - return createConfluentResourceWithHttpInfoAsync(accountId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Add resource to Confluent account. + * + * See {@link #createConfluentResourceWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @param body Confluent payload (required) + * @return CompletableFuture<ConfluentResourceResponse> + */ + public CompletableFuturecreateConfluentResourceAsync(String accountId, ConfluentResourceRequest body) { + return createConfluentResourceWithHttpInfoAsync(accountId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Confluent resource for the account associated with the provided ID. + *

Create a Confluent resource for the account associated with the provided ID.

* * @param accountId Confluent Account id. (required) * @param body Confluent payload (required) * @return ApiResponse<ConfluentResourceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -234,149 +203,109 @@ public CompletableFuture createConfluentResourceAsync * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse createConfluentResourceWithHttpInfo( - String accountId, ConfluentResourceRequest body) throws ApiException { + public ApiResponse createConfluentResourceWithHttpInfo(String accountId, ConfluentResourceRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling createConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling createConfluentResource"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createConfluentResource"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.createConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.createConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add resource to Confluent account. * - *

See {@link #createConfluentResourceWithHttpInfo}. + * See {@link #createConfluentResourceWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @param body Confluent payload (required) * @return CompletableFuture<ApiResponse<ConfluentResourceResponse>> */ - public CompletableFuture> - createConfluentResourceWithHttpInfoAsync(String accountId, ConfluentResourceRequest body) { + public CompletableFuture> createConfluentResourceWithHttpInfoAsync(String accountId, ConfluentResourceRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling createConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling createConfluentResource")); + 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 createConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createConfluentResource")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.createConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.createConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete Confluent account. - * - *

See {@link #deleteConfluentAccountWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @throws ApiException if fails to make API call - */ - public void deleteConfluentAccount(String accountId) throws ApiException { + * Delete Confluent account. + * + * See {@link #deleteConfluentAccountWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @throws ApiException if fails to make API call + */ + public void deleteConfluentAccount(String accountId) throws ApiException { deleteConfluentAccountWithHttpInfo(accountId); } /** - * Delete Confluent account. - * - *

See {@link #deleteConfluentAccountWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteConfluentAccountAsync(String accountId) { - return deleteConfluentAccountWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete Confluent account. + * + * See {@link #deleteConfluentAccountWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteConfluentAccountAsync(String accountId) { + return deleteConfluentAccountWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Confluent account with the provided account ID. + *

Delete a Confluent account with the provided account ID.

* * @param accountId Confluent Account id. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -386,137 +315,99 @@ public CompletableFuture deleteConfluentAccountAsync(String accountId) { * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteConfluentAccountWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse deleteConfluentAccountWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteConfluentAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteConfluentAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.deleteConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.deleteConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete Confluent account. * - *

See {@link #deleteConfluentAccountWithHttpInfo}. + * See {@link #deleteConfluentAccountWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteConfluentAccountWithHttpInfoAsync( - String accountId) { + public CompletableFuture> deleteConfluentAccountWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling deleteConfluentAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling deleteConfluentAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.deleteConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.deleteConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete resource from Confluent account. - * - *

See {@link #deleteConfluentResourceWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @param resourceId Confluent Account Resource ID. (required) - * @throws ApiException if fails to make API call - */ - public void deleteConfluentResource(String accountId, String resourceId) throws ApiException { + * Delete resource from Confluent account. + * + * See {@link #deleteConfluentResourceWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @param resourceId Confluent Account Resource ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteConfluentResource(String accountId, String resourceId) throws ApiException { deleteConfluentResourceWithHttpInfo(accountId, resourceId); } /** - * Delete resource from Confluent account. - * - *

See {@link #deleteConfluentResourceWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @param resourceId Confluent Account Resource ID. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteConfluentResourceAsync(String accountId, String resourceId) { - return deleteConfluentResourceWithHttpInfoAsync(accountId, resourceId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete resource from Confluent account. + * + * See {@link #deleteConfluentResourceWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @param resourceId Confluent Account Resource ID. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteConfluentResourceAsync(String accountId, String resourceId) { + return deleteConfluentResourceWithHttpInfoAsync(accountId, resourceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Confluent resource with the provided resource id for the account associated with the - * provided account ID. + *

Delete a Confluent resource with the provided resource id for the account associated with the provided account ID.

* * @param accountId Confluent Account id. (required) * @param resourceId Confluent Account Resource ID. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -526,155 +417,112 @@ public CompletableFuture deleteConfluentResourceAsync(String accountId, St * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteConfluentResourceWithHttpInfo(String accountId, String resourceId) - throws ApiException { + public ApiResponse deleteConfluentResourceWithHttpInfo(String accountId, String resourceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteConfluentResource"); } // verify the required parameter 'resourceId' is set if (resourceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resourceId' when calling deleteConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'resourceId' when calling deleteConfluentResource"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.deleteConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.deleteConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete resource from Confluent account. * - *

See {@link #deleteConfluentResourceWithHttpInfo}. + * See {@link #deleteConfluentResourceWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @param resourceId Confluent Account Resource ID. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteConfluentResourceWithHttpInfoAsync( - String accountId, String resourceId) { + public CompletableFuture> deleteConfluentResourceWithHttpInfoAsync(String accountId, String resourceId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling deleteConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling deleteConfluentResource")); + return result; } // verify the required parameter 'resourceId' is set if (resourceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'resourceId' when calling deleteConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resourceId' when calling deleteConfluentResource")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.deleteConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.deleteConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get Confluent account. - * - *

See {@link #getConfluentAccountWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @return ConfluentAccountResponse - * @throws ApiException if fails to make API call - */ - public ConfluentAccountResponse getConfluentAccount(String accountId) throws ApiException { + * Get Confluent account. + * + * See {@link #getConfluentAccountWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @return ConfluentAccountResponse + * @throws ApiException if fails to make API call + */ + public ConfluentAccountResponse getConfluentAccount(String accountId) throws ApiException { return getConfluentAccountWithHttpInfo(accountId).getData(); } /** - * Get Confluent account. - * - *

See {@link #getConfluentAccountWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @return CompletableFuture<ConfluentAccountResponse> - */ - public CompletableFuture getConfluentAccountAsync(String accountId) { - return getConfluentAccountWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Get Confluent account. + * + * See {@link #getConfluentAccountWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @return CompletableFuture<ConfluentAccountResponse> + */ + public CompletableFuturegetConfluentAccountAsync(String accountId) { + return getConfluentAccountWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the Confluent account with the provided account ID. + *

Get the Confluent account with the provided account ID.

* * @param accountId Confluent Account id. (required) * @return ApiResponse<ConfluentAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -684,139 +532,100 @@ public CompletableFuture getConfluentAccountAsync(Stri * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getConfluentAccountWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse getConfluentAccountWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling getConfluentAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling getConfluentAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.getConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.getConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get Confluent account. * - *

See {@link #getConfluentAccountWithHttpInfo}. + * See {@link #getConfluentAccountWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @return CompletableFuture<ApiResponse<ConfluentAccountResponse>> */ - public CompletableFuture> - getConfluentAccountWithHttpInfoAsync(String accountId) { + public CompletableFuture> getConfluentAccountWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling getConfluentAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling getConfluentAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.getConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.getConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get resource from Confluent account. - * - *

See {@link #getConfluentResourceWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @param resourceId Confluent Account Resource ID. (required) - * @return ConfluentResourceResponse - * @throws ApiException if fails to make API call - */ - public ConfluentResourceResponse getConfluentResource(String accountId, String resourceId) - throws ApiException { + * Get resource from Confluent account. + * + * See {@link #getConfluentResourceWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @param resourceId Confluent Account Resource ID. (required) + * @return ConfluentResourceResponse + * @throws ApiException if fails to make API call + */ + public ConfluentResourceResponse getConfluentResource(String accountId, String resourceId) throws ApiException { return getConfluentResourceWithHttpInfo(accountId, resourceId).getData(); } /** - * Get resource from Confluent account. - * - *

See {@link #getConfluentResourceWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @param resourceId Confluent Account Resource ID. (required) - * @return CompletableFuture<ConfluentResourceResponse> - */ - public CompletableFuture getConfluentResourceAsync( - String accountId, String resourceId) { - return getConfluentResourceWithHttpInfoAsync(accountId, resourceId) - .thenApply( - response -> { - return response.getData(); - }); + * Get resource from Confluent account. + * + * See {@link #getConfluentResourceWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @param resourceId Confluent Account Resource ID. (required) + * @return CompletableFuture<ConfluentResourceResponse> + */ + public CompletableFuturegetConfluentResourceAsync(String accountId, String resourceId) { + return getConfluentResourceWithHttpInfoAsync(accountId, resourceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a Confluent resource with the provided resource id for the account associated with the - * provided account ID. + *

Get a Confluent resource with the provided resource id for the account associated with the provided account ID.

* * @param accountId Confluent Account id. (required) * @param resourceId Confluent Account Resource ID. (required) * @return ApiResponse<ConfluentResourceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -826,151 +635,109 @@ public CompletableFuture getConfluentResourceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getConfluentResourceWithHttpInfo( - String accountId, String resourceId) throws ApiException { + public ApiResponse getConfluentResourceWithHttpInfo(String accountId, String resourceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling getConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling getConfluentResource"); } // verify the required parameter 'resourceId' is set if (resourceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resourceId' when calling getConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'resourceId' when calling getConfluentResource"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.getConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.getConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get resource from Confluent account. * - *

See {@link #getConfluentResourceWithHttpInfo}. + * See {@link #getConfluentResourceWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @param resourceId Confluent Account Resource ID. (required) * @return CompletableFuture<ApiResponse<ConfluentResourceResponse>> */ - public CompletableFuture> - getConfluentResourceWithHttpInfoAsync(String accountId, String resourceId) { + public CompletableFuture> getConfluentResourceWithHttpInfoAsync(String accountId, String resourceId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling getConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling getConfluentResource")); + return result; } // verify the required parameter 'resourceId' is set if (resourceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'resourceId' when calling getConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resourceId' when calling getConfluentResource")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.getConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.getConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List Confluent accounts. - * - *

See {@link #listConfluentAccountWithHttpInfo}. - * - * @return ConfluentAccountsResponse - * @throws ApiException if fails to make API call - */ - public ConfluentAccountsResponse listConfluentAccount() throws ApiException { + * List Confluent accounts. + * + * See {@link #listConfluentAccountWithHttpInfo}. + * + * @return ConfluentAccountsResponse + * @throws ApiException if fails to make API call + */ + public ConfluentAccountsResponse listConfluentAccount() throws ApiException { return listConfluentAccountWithHttpInfo().getData(); } /** - * List Confluent accounts. - * - *

See {@link #listConfluentAccountWithHttpInfoAsync}. - * - * @return CompletableFuture<ConfluentAccountsResponse> - */ - public CompletableFuture listConfluentAccountAsync() { - return listConfluentAccountWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List Confluent accounts. + * + * See {@link #listConfluentAccountWithHttpInfoAsync}. + * + * @return CompletableFuture<ConfluentAccountsResponse> + */ + public CompletableFuturelistConfluentAccountAsync() { + return listConfluentAccountWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List Confluent accounts. + *

List Confluent accounts.

* * @return ApiResponse<ConfluentAccountsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -980,114 +747,82 @@ public CompletableFuture listConfluentAccountAsync() * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listConfluentAccountWithHttpInfo() - throws ApiException { + public ApiResponse listConfluentAccountWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.listConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.listConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List Confluent accounts. * - *

See {@link #listConfluentAccountWithHttpInfo}. + * See {@link #listConfluentAccountWithHttpInfo}. * * @return CompletableFuture<ApiResponse<ConfluentAccountsResponse>> */ - public CompletableFuture> - listConfluentAccountWithHttpInfoAsync() { + public CompletableFuture> listConfluentAccountWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integrations/confluent-cloud/accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.listConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.listConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List Confluent Account resources. - * - *

See {@link #listConfluentResourceWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @return ConfluentResourcesResponse - * @throws ApiException if fails to make API call - */ - public ConfluentResourcesResponse listConfluentResource(String accountId) throws ApiException { + * List Confluent Account resources. + * + * See {@link #listConfluentResourceWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @return ConfluentResourcesResponse + * @throws ApiException if fails to make API call + */ + public ConfluentResourcesResponse listConfluentResource(String accountId) throws ApiException { return listConfluentResourceWithHttpInfo(accountId).getData(); } /** - * List Confluent Account resources. - * - *

See {@link #listConfluentResourceWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @return CompletableFuture<ConfluentResourcesResponse> - */ - public CompletableFuture listConfluentResourceAsync( - String accountId) { - return listConfluentResourceWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * List Confluent Account resources. + * + * See {@link #listConfluentResourceWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @return CompletableFuture<ConfluentResourcesResponse> + */ + public CompletableFuturelistConfluentResourceAsync(String accountId) { + return listConfluentResourceWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a Confluent resource for the account associated with the provided ID. + *

Get a Confluent resource for the account associated with the provided ID.

* * @param accountId Confluent Account id. (required) * @return ApiResponse<ConfluentResourcesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1097,139 +832,100 @@ public CompletableFuture listConfluentResourceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listConfluentResourceWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse listConfluentResourceWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling listConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling listConfluentResource"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.listConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.listConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List Confluent Account resources. * - *

See {@link #listConfluentResourceWithHttpInfo}. + * See {@link #listConfluentResourceWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @return CompletableFuture<ApiResponse<ConfluentResourcesResponse>> */ - public CompletableFuture> - listConfluentResourceWithHttpInfoAsync(String accountId) { + public CompletableFuture> listConfluentResourceWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling listConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling listConfluentResource")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.listConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.listConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update Confluent account. - * - *

See {@link #updateConfluentAccountWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @param body Confluent payload (required) - * @return ConfluentAccountResponse - * @throws ApiException if fails to make API call - */ - public ConfluentAccountResponse updateConfluentAccount( - String accountId, ConfluentAccountUpdateRequest body) throws ApiException { + * Update Confluent account. + * + * See {@link #updateConfluentAccountWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @param body Confluent payload (required) + * @return ConfluentAccountResponse + * @throws ApiException if fails to make API call + */ + public ConfluentAccountResponse updateConfluentAccount(String accountId, ConfluentAccountUpdateRequest body) throws ApiException { return updateConfluentAccountWithHttpInfo(accountId, body).getData(); } /** - * Update Confluent account. - * - *

See {@link #updateConfluentAccountWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @param body Confluent payload (required) - * @return CompletableFuture<ConfluentAccountResponse> - */ - public CompletableFuture updateConfluentAccountAsync( - String accountId, ConfluentAccountUpdateRequest body) { - return updateConfluentAccountWithHttpInfoAsync(accountId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Confluent account. + * + * See {@link #updateConfluentAccountWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @param body Confluent payload (required) + * @return CompletableFuture<ConfluentAccountResponse> + */ + public CompletableFutureupdateConfluentAccountAsync(String accountId, ConfluentAccountUpdateRequest body) { + return updateConfluentAccountWithHttpInfoAsync(accountId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the Confluent account with the provided account ID. + *

Update the Confluent account with the provided account ID.

* * @param accountId Confluent Account id. (required) * @param body Confluent payload (required) * @return ApiResponse<ConfluentAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1239,152 +935,108 @@ public CompletableFuture updateConfluentAccountAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateConfluentAccountWithHttpInfo( - String accountId, ConfluentAccountUpdateRequest body) throws ApiException { + public ApiResponse updateConfluentAccountWithHttpInfo(String accountId, ConfluentAccountUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateConfluentAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling updateConfluentAccount"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateConfluentAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateConfluentAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.updateConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.updateConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Confluent account. * - *

See {@link #updateConfluentAccountWithHttpInfo}. + * See {@link #updateConfluentAccountWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @param body Confluent payload (required) * @return CompletableFuture<ApiResponse<ConfluentAccountResponse>> */ - public CompletableFuture> - updateConfluentAccountWithHttpInfoAsync( - String accountId, ConfluentAccountUpdateRequest body) { + public CompletableFuture> updateConfluentAccountWithHttpInfoAsync(String accountId, ConfluentAccountUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling updateConfluentAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling updateConfluentAccount")); + 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 updateConfluentAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateConfluentAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.updateConfluentAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.updateConfluentAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update resource in Confluent account. - * - *

See {@link #updateConfluentResourceWithHttpInfo}. - * - * @param accountId Confluent Account id. (required) - * @param resourceId Confluent Account Resource ID. (required) - * @param body Confluent payload (required) - * @return ConfluentResourceResponse - * @throws ApiException if fails to make API call - */ - public ConfluentResourceResponse updateConfluentResource( - String accountId, String resourceId, ConfluentResourceRequest body) throws ApiException { + * Update resource in Confluent account. + * + * See {@link #updateConfluentResourceWithHttpInfo}. + * + * @param accountId Confluent Account id. (required) + * @param resourceId Confluent Account Resource ID. (required) + * @param body Confluent payload (required) + * @return ConfluentResourceResponse + * @throws ApiException if fails to make API call + */ + public ConfluentResourceResponse updateConfluentResource(String accountId, String resourceId, ConfluentResourceRequest body) throws ApiException { return updateConfluentResourceWithHttpInfo(accountId, resourceId, body).getData(); } /** - * Update resource in Confluent account. - * - *

See {@link #updateConfluentResourceWithHttpInfoAsync}. - * - * @param accountId Confluent Account id. (required) - * @param resourceId Confluent Account Resource ID. (required) - * @param body Confluent payload (required) - * @return CompletableFuture<ConfluentResourceResponse> - */ - public CompletableFuture updateConfluentResourceAsync( - String accountId, String resourceId, ConfluentResourceRequest body) { - return updateConfluentResourceWithHttpInfoAsync(accountId, resourceId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update resource in Confluent account. + * + * See {@link #updateConfluentResourceWithHttpInfoAsync}. + * + * @param accountId Confluent Account id. (required) + * @param resourceId Confluent Account Resource ID. (required) + * @param body Confluent payload (required) + * @return CompletableFuture<ConfluentResourceResponse> + */ + public CompletableFutureupdateConfluentResourceAsync(String accountId, String resourceId, ConfluentResourceRequest body) { + return updateConfluentResourceWithHttpInfoAsync(accountId, resourceId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Confluent resource with the provided resource id for the account associated with the - * provided account ID. + *

Update a Confluent resource with the provided resource id for the account associated with the provided account ID.

* * @param accountId Confluent Account id. (required) * @param resourceId Confluent Account Resource ID. (required) @@ -1392,7 +1044,7 @@ public CompletableFuture updateConfluentResourceAsync * @return ApiResponse<ConfluentResourceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1402,132 +1054,86 @@ public CompletableFuture updateConfluentResourceAsync * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateConfluentResourceWithHttpInfo( - String accountId, String resourceId, ConfluentResourceRequest body) throws ApiException { + public ApiResponse updateConfluentResourceWithHttpInfo(String accountId, String resourceId, ConfluentResourceRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling updateConfluentResource"); } // verify the required parameter 'resourceId' is set if (resourceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resourceId' when calling updateConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'resourceId' when calling updateConfluentResource"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateConfluentResource"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateConfluentResource"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.updateConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ConfluentCloudApi.updateConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update resource in Confluent account. * - *

See {@link #updateConfluentResourceWithHttpInfo}. + * See {@link #updateConfluentResourceWithHttpInfo}. * * @param accountId Confluent Account id. (required) * @param resourceId Confluent Account Resource ID. (required) * @param body Confluent payload (required) * @return CompletableFuture<ApiResponse<ConfluentResourceResponse>> */ - public CompletableFuture> - updateConfluentResourceWithHttpInfoAsync( - String accountId, String resourceId, ConfluentResourceRequest body) { + public CompletableFuture> updateConfluentResourceWithHttpInfoAsync(String accountId, String resourceId, ConfluentResourceRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'accountId' when calling updateConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling updateConfluentResource")); + return result; } // verify the required parameter 'resourceId' is set if (resourceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'resourceId' when calling updateConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resourceId' when calling updateConfluentResource")); + 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 updateConfluentResource")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateConfluentResource")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ConfluentCloudApi.updateConfluentResource", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ConfluentCloudApi.updateConfluentResource", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/DashboardListsApi.java b/src/main/java/com/datadog/api/client/v2/api/DashboardListsApi.java index f571ffadd7c..ad4ab4f5948 100644 --- a/src/main/java/com/datadog/api/client/v2/api/DashboardListsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/DashboardListsApi.java @@ -1,28 +1,36 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; -import com.datadog.api.client.v2.model.DashboardListAddItemsResponse; -import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; -import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse; -import com.datadog.api.client.v2.model.DashboardListItems; -import com.datadog.api.client.v2.model.DashboardListUpdateItemsRequest; -import com.datadog.api.client.v2.model.DashboardListUpdateItemsResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse; +import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest; +import com.datadog.api.client.v2.model.DashboardListItems; +import com.datadog.api.client.v2.model.DashboardListAddItemsResponse; +import com.datadog.api.client.v2.model.DashboardListAddItemsRequest; +import com.datadog.api.client.v2.model.DashboardListUpdateItemsResponse; +import com.datadog.api.client.v2.model.DashboardListUpdateItemsRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListsApi { private ApiClient apiClient; - public DashboardListsApi() { this(ApiClient.getDefaultApiClient()); } @@ -50,47 +58,44 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Items to a Dashboard List. - * - *

See {@link #createDashboardListItemsWithHttpInfo}. - * - * @param dashboardListId ID of the dashboard list to add items to. (required) - * @param body Dashboards to add to the dashboard list. (required) - * @return DashboardListAddItemsResponse - * @throws ApiException if fails to make API call - */ - public DashboardListAddItemsResponse createDashboardListItems( - Long dashboardListId, DashboardListAddItemsRequest body) throws ApiException { + * Add Items to a Dashboard List. + * + * See {@link #createDashboardListItemsWithHttpInfo}. + * + * @param dashboardListId ID of the dashboard list to add items to. (required) + * @param body Dashboards to add to the dashboard list. (required) + * @return DashboardListAddItemsResponse + * @throws ApiException if fails to make API call + */ + public DashboardListAddItemsResponse createDashboardListItems(Long dashboardListId, DashboardListAddItemsRequest body) throws ApiException { return createDashboardListItemsWithHttpInfo(dashboardListId, body).getData(); } /** - * Add Items to a Dashboard List. - * - *

See {@link #createDashboardListItemsWithHttpInfoAsync}. - * - * @param dashboardListId ID of the dashboard list to add items to. (required) - * @param body Dashboards to add to the dashboard list. (required) - * @return CompletableFuture<DashboardListAddItemsResponse> - */ - public CompletableFuture createDashboardListItemsAsync( - Long dashboardListId, DashboardListAddItemsRequest body) { - return createDashboardListItemsWithHttpInfoAsync(dashboardListId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Add Items to a Dashboard List. + * + * See {@link #createDashboardListItemsWithHttpInfoAsync}. + * + * @param dashboardListId ID of the dashboard list to add items to. (required) + * @param body Dashboards to add to the dashboard list. (required) + * @return CompletableFuture<DashboardListAddItemsResponse> + */ + public CompletableFuturecreateDashboardListItemsAsync(Long dashboardListId, DashboardListAddItemsRequest body) { + return createDashboardListItemsWithHttpInfoAsync(dashboardListId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Add dashboards to an existing dashboard list. + *

Add dashboards to an existing dashboard list.

* * @param dashboardListId ID of the dashboard list to add items to. (required) * @param body Dashboards to add to the dashboard list. (required) * @return ApiResponse<DashboardListAddItemsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -100,165 +105,113 @@ public CompletableFuture createDashboardListItems * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createDashboardListItemsWithHttpInfo( - Long dashboardListId, DashboardListAddItemsRequest body) throws ApiException { + public ApiResponse createDashboardListItemsWithHttpInfo(Long dashboardListId, DashboardListAddItemsRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling createDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'dashboardListId' when calling createDashboardListItems"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createDashboardListItems"); } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.DashboardListsApi.createDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.DashboardListsApi.createDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add Items to a Dashboard List. * - *

See {@link #createDashboardListItemsWithHttpInfo}. + * See {@link #createDashboardListItemsWithHttpInfo}. * * @param dashboardListId ID of the dashboard list to add items to. (required) * @param body Dashboards to add to the dashboard list. (required) * @return CompletableFuture<ApiResponse<DashboardListAddItemsResponse>> */ - public CompletableFuture> - createDashboardListItemsWithHttpInfoAsync( - Long dashboardListId, DashboardListAddItemsRequest body) { + public CompletableFuture> createDashboardListItemsWithHttpInfoAsync(Long dashboardListId, DashboardListAddItemsRequest body) { Object localVarPostBody = body; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling" - + " createDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardListId' when calling createDashboardListItems")); + 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 createDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createDashboardListItems")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.DashboardListsApi.createDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.DashboardListsApi.createDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete items from a dashboard list. - * - *

See {@link #deleteDashboardListItemsWithHttpInfo}. - * - * @param dashboardListId ID of the dashboard list to delete items from. (required) - * @param body Dashboards to delete from the dashboard list. (required) - * @return DashboardListDeleteItemsResponse - * @throws ApiException if fails to make API call - */ - public DashboardListDeleteItemsResponse deleteDashboardListItems( - Long dashboardListId, DashboardListDeleteItemsRequest body) throws ApiException { + * Delete items from a dashboard list. + * + * See {@link #deleteDashboardListItemsWithHttpInfo}. + * + * @param dashboardListId ID of the dashboard list to delete items from. (required) + * @param body Dashboards to delete from the dashboard list. (required) + * @return DashboardListDeleteItemsResponse + * @throws ApiException if fails to make API call + */ + public DashboardListDeleteItemsResponse deleteDashboardListItems(Long dashboardListId, DashboardListDeleteItemsRequest body) throws ApiException { return deleteDashboardListItemsWithHttpInfo(dashboardListId, body).getData(); } /** - * Delete items from a dashboard list. - * - *

See {@link #deleteDashboardListItemsWithHttpInfoAsync}. - * - * @param dashboardListId ID of the dashboard list to delete items from. (required) - * @param body Dashboards to delete from the dashboard list. (required) - * @return CompletableFuture<DashboardListDeleteItemsResponse> - */ - public CompletableFuture deleteDashboardListItemsAsync( - Long dashboardListId, DashboardListDeleteItemsRequest body) { - return deleteDashboardListItemsWithHttpInfoAsync(dashboardListId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete items from a dashboard list. + * + * See {@link #deleteDashboardListItemsWithHttpInfoAsync}. + * + * @param dashboardListId ID of the dashboard list to delete items from. (required) + * @param body Dashboards to delete from the dashboard list. (required) + * @return CompletableFuture<DashboardListDeleteItemsResponse> + */ + public CompletableFuturedeleteDashboardListItemsAsync(Long dashboardListId, DashboardListDeleteItemsRequest body) { + return deleteDashboardListItemsWithHttpInfoAsync(dashboardListId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete dashboards from an existing dashboard list. + *

Delete dashboards from an existing dashboard list.

* * @param dashboardListId ID of the dashboard list to delete items from. (required) * @param body Dashboards to delete from the dashboard list. (required) * @return ApiResponse<DashboardListDeleteItemsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -268,160 +221,110 @@ public CompletableFuture deleteDashboardListIt * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteDashboardListItemsWithHttpInfo( - Long dashboardListId, DashboardListDeleteItemsRequest body) throws ApiException { + public ApiResponse deleteDashboardListItemsWithHttpInfo(Long dashboardListId, DashboardListDeleteItemsRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling deleteDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'dashboardListId' when calling deleteDashboardListItems"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteDashboardListItems"); } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.DashboardListsApi.deleteDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.DashboardListsApi.deleteDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete items from a dashboard list. * - *

See {@link #deleteDashboardListItemsWithHttpInfo}. + * See {@link #deleteDashboardListItemsWithHttpInfo}. * * @param dashboardListId ID of the dashboard list to delete items from. (required) * @param body Dashboards to delete from the dashboard list. (required) * @return CompletableFuture<ApiResponse<DashboardListDeleteItemsResponse>> */ - public CompletableFuture> - deleteDashboardListItemsWithHttpInfoAsync( - Long dashboardListId, DashboardListDeleteItemsRequest body) { + public CompletableFuture> deleteDashboardListItemsWithHttpInfoAsync(Long dashboardListId, DashboardListDeleteItemsRequest body) { Object localVarPostBody = body; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling" - + " deleteDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardListId' when calling deleteDashboardListItems")); + 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 deleteDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteDashboardListItems")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.DashboardListsApi.deleteDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.DashboardListsApi.deleteDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get items of a Dashboard List. - * - *

See {@link #getDashboardListItemsWithHttpInfo}. - * - * @param dashboardListId ID of the dashboard list to get items from. (required) - * @return DashboardListItems - * @throws ApiException if fails to make API call - */ - public DashboardListItems getDashboardListItems(Long dashboardListId) throws ApiException { + * Get items of a Dashboard List. + * + * See {@link #getDashboardListItemsWithHttpInfo}. + * + * @param dashboardListId ID of the dashboard list to get items from. (required) + * @return DashboardListItems + * @throws ApiException if fails to make API call + */ + public DashboardListItems getDashboardListItems(Long dashboardListId) throws ApiException { return getDashboardListItemsWithHttpInfo(dashboardListId).getData(); } /** - * Get items of a Dashboard List. - * - *

See {@link #getDashboardListItemsWithHttpInfoAsync}. - * - * @param dashboardListId ID of the dashboard list to get items from. (required) - * @return CompletableFuture<DashboardListItems> - */ - public CompletableFuture getDashboardListItemsAsync(Long dashboardListId) { - return getDashboardListItemsWithHttpInfoAsync(dashboardListId) - .thenApply( - response -> { - return response.getData(); - }); + * Get items of a Dashboard List. + * + * See {@link #getDashboardListItemsWithHttpInfoAsync}. + * + * @param dashboardListId ID of the dashboard list to get items from. (required) + * @return CompletableFuture<DashboardListItems> + */ + public CompletableFuturegetDashboardListItemsAsync(Long dashboardListId) { + return getDashboardListItemsWithHttpInfoAsync(dashboardListId).thenApply(response -> { + return response.getData(); + }); } + /** - * Fetch the dashboard list’s dashboard definitions. + *

Fetch the dashboard list’s dashboard definitions.

* * @param dashboardListId ID of the dashboard list to get items from. (required) * @return ApiResponse<DashboardListItems> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -430,145 +333,100 @@ public CompletableFuture getDashboardListItemsAsync(Long das * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getDashboardListItemsWithHttpInfo(Long dashboardListId) - throws ApiException { + public ApiResponse getDashboardListItemsWithHttpInfo(Long dashboardListId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling getDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'dashboardListId' when calling getDashboardListItems"); } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.DashboardListsApi.getDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.DashboardListsApi.getDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get items of a Dashboard List. * - *

See {@link #getDashboardListItemsWithHttpInfo}. + * See {@link #getDashboardListItemsWithHttpInfo}. * * @param dashboardListId ID of the dashboard list to get items from. (required) * @return CompletableFuture<ApiResponse<DashboardListItems>> */ - public CompletableFuture> getDashboardListItemsWithHttpInfoAsync( - Long dashboardListId) { + public CompletableFuture> getDashboardListItemsWithHttpInfoAsync(Long dashboardListId) { Object localVarPostBody = null; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling" - + " getDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardListId' when calling getDashboardListItems")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.DashboardListsApi.getDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.DashboardListsApi.getDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update items of a dashboard list. - * - *

See {@link #updateDashboardListItemsWithHttpInfo}. - * - * @param dashboardListId ID of the dashboard list to update items from. (required) - * @param body New dashboards of the dashboard list. (required) - * @return DashboardListUpdateItemsResponse - * @throws ApiException if fails to make API call - */ - public DashboardListUpdateItemsResponse updateDashboardListItems( - Long dashboardListId, DashboardListUpdateItemsRequest body) throws ApiException { + * Update items of a dashboard list. + * + * See {@link #updateDashboardListItemsWithHttpInfo}. + * + * @param dashboardListId ID of the dashboard list to update items from. (required) + * @param body New dashboards of the dashboard list. (required) + * @return DashboardListUpdateItemsResponse + * @throws ApiException if fails to make API call + */ + public DashboardListUpdateItemsResponse updateDashboardListItems(Long dashboardListId, DashboardListUpdateItemsRequest body) throws ApiException { return updateDashboardListItemsWithHttpInfo(dashboardListId, body).getData(); } /** - * Update items of a dashboard list. - * - *

See {@link #updateDashboardListItemsWithHttpInfoAsync}. - * - * @param dashboardListId ID of the dashboard list to update items from. (required) - * @param body New dashboards of the dashboard list. (required) - * @return CompletableFuture<DashboardListUpdateItemsResponse> - */ - public CompletableFuture updateDashboardListItemsAsync( - Long dashboardListId, DashboardListUpdateItemsRequest body) { - return updateDashboardListItemsWithHttpInfoAsync(dashboardListId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update items of a dashboard list. + * + * See {@link #updateDashboardListItemsWithHttpInfoAsync}. + * + * @param dashboardListId ID of the dashboard list to update items from. (required) + * @param body New dashboards of the dashboard list. (required) + * @return CompletableFuture<DashboardListUpdateItemsResponse> + */ + public CompletableFutureupdateDashboardListItemsAsync(Long dashboardListId, DashboardListUpdateItemsRequest body) { + return updateDashboardListItemsWithHttpInfoAsync(dashboardListId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update dashboards of an existing dashboard list. + *

Update dashboards of an existing dashboard list.

* * @param dashboardListId ID of the dashboard list to update items from. (required) * @param body New dashboards of the dashboard list. (required) * @return ApiResponse<DashboardListUpdateItemsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -578,120 +436,71 @@ public CompletableFuture updateDashboardListIt * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateDashboardListItemsWithHttpInfo( - Long dashboardListId, DashboardListUpdateItemsRequest body) throws ApiException { + public ApiResponse updateDashboardListItemsWithHttpInfo(Long dashboardListId, DashboardListUpdateItemsRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling updateDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'dashboardListId' when calling updateDashboardListItems"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateDashboardListItems"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateDashboardListItems"); } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.DashboardListsApi.updateDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.DashboardListsApi.updateDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update items of a dashboard list. * - *

See {@link #updateDashboardListItemsWithHttpInfo}. + * See {@link #updateDashboardListItemsWithHttpInfo}. * * @param dashboardListId ID of the dashboard list to update items from. (required) * @param body New dashboards of the dashboard list. (required) * @return CompletableFuture<ApiResponse<DashboardListUpdateItemsResponse>> */ - public CompletableFuture> - updateDashboardListItemsWithHttpInfoAsync( - Long dashboardListId, DashboardListUpdateItemsRequest body) { + public CompletableFuture> updateDashboardListItemsWithHttpInfoAsync(Long dashboardListId, DashboardListUpdateItemsRequest body) { Object localVarPostBody = body; // verify the required parameter 'dashboardListId' is set if (dashboardListId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'dashboardListId' when calling" - + " updateDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'dashboardListId' when calling updateDashboardListItems")); + 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 updateDashboardListItems")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateDashboardListItems")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" - .replaceAll( - "\\{" + "dashboard_list_id" + "\\}", - apiClient.escapeString(dashboardListId.toString())); + String localVarPath = "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + .replaceAll("\\{" + "dashboard_list_id" + "\\}", apiClient.escapeString(dashboardListId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.DashboardListsApi.updateDashboardListItems", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.DashboardListsApi.updateDashboardListItems", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/EventsApi.java b/src/main/java/com/datadog/api/client/v2/api/EventsApi.java index 7fa193a094c..adde0ad8401 100644 --- a/src/main/java/com/datadog/api/client/v2/api/EventsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/EventsApi.java @@ -1,29 +1,36 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.EventResponse; -import com.datadog.api.client.v2.model.EventsListRequest; -import com.datadog.api.client.v2.model.EventsListResponse; -import com.datadog.api.client.v2.model.EventsRequestPage; -import com.datadog.api.client.v2.model.EventsSort; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.EventsListResponse; +import com.datadog.api.client.v2.model.EventsSort; +import com.datadog.api.client.v2.model.EventsListRequest; +import com.datadog.api.client.v2.model.EventResponse; +import com.datadog.api.client.v2.model.EventResponse; +import com.datadog.api.client.v2.model.EventsListRequest; +import com.datadog.api.client.v2.model.EventsRequestPage; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsApi { private ApiClient apiClient; - public EventsApi() { this(ApiClient.getDefaultApiClient()); } @@ -50,7 +57,9 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to listEvents. */ + /** + * Manage optional parameters to listEvents. + */ public static class ListEventsOptionalParameters { private String filterQuery; private String filterFrom; @@ -61,7 +70,6 @@ public static class ListEventsOptionalParameters { /** * Set filterQuery. - * * @param filterQuery Search query following events syntax. (optional) * @return ListEventsOptionalParameters */ @@ -72,7 +80,6 @@ public ListEventsOptionalParameters filterQuery(String filterQuery) { /** * Set filterFrom. - * * @param filterFrom Minimum timestamp for requested events. (optional) * @return ListEventsOptionalParameters */ @@ -83,7 +90,6 @@ public ListEventsOptionalParameters filterFrom(String filterFrom) { /** * Set filterTo. - * * @param filterTo Maximum timestamp for requested events. (optional) * @return ListEventsOptionalParameters */ @@ -94,7 +100,6 @@ public ListEventsOptionalParameters filterTo(String filterTo) { /** * Set sort. - * * @param sort Order of events in results. (optional) * @return ListEventsOptionalParameters */ @@ -105,9 +110,7 @@ public ListEventsOptionalParameters sort(EventsSort sort) { /** * Set pageCursor. - * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor List following results with a cursor provided in the previous query. (optional) * @return ListEventsOptionalParameters */ public ListEventsOptionalParameters pageCursor(String pageCursor) { @@ -117,7 +120,6 @@ public ListEventsOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. - * * @param pageLimit Maximum number of events in the response. (optional, default to 10) * @return ListEventsOptionalParameters */ @@ -128,126 +130,112 @@ public ListEventsOptionalParameters pageLimit(Integer pageLimit) { } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfo}. - * - * @return EventsListResponse - * @throws ApiException if fails to make API call - */ - public EventsListResponse listEvents() throws ApiException { + * Get a list of events. + * + * See {@link #listEventsWithHttpInfo}. + * + * @return EventsListResponse + * @throws ApiException if fails to make API call + */ + public EventsListResponse listEvents () throws ApiException { return listEventsWithHttpInfo(new ListEventsOptionalParameters()).getData(); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<EventsListResponse> - */ - public CompletableFuture listEventsAsync() { - return listEventsWithHttpInfoAsync(new ListEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of events. + * + * See {@link #listEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<EventsListResponse> + */ + public CompletableFuturelistEventsAsync() { + return listEventsWithHttpInfoAsync(new ListEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return EventsListResponse - * @throws ApiException if fails to make API call - */ - public EventsListResponse listEvents(ListEventsOptionalParameters parameters) - throws ApiException { + * Get a list of events. + * + * See {@link #listEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return EventsListResponse + * @throws ApiException if fails to make API call + */ + public EventsListResponse listEvents(ListEventsOptionalParameters parameters) throws ApiException { return listEventsWithHttpInfo(parameters).getData(); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<EventsListResponse> - */ - public CompletableFuture listEventsAsync( - ListEventsOptionalParameters parameters) { - return listEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of events. + * + * See {@link #listEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<EventsListResponse> + */ + public CompletableFuturelistEventsAsync(ListEventsOptionalParameters parameters) { + return listEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfo}. - * - * @return PaginationIterable<EventResponse> - */ + * Get a list of events. + * + * See {@link #listEventsWithHttpInfo}. + * + * @return PaginationIterable<EventResponse> + */ public PaginationIterable listEventsWithPagination() { ListEventsOptionalParameters parameters = new ListEventsOptionalParameters(); return listEventsWithPagination(parameters); } /** - * Get a list of events. - * - *

See {@link #listEventsWithHttpInfo}. - * - * @return EventsListResponse - */ - public PaginationIterable listEventsWithPagination( - ListEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a list of events. + * + * See {@link #listEventsWithHttpInfo}. + * + * @return EventsListResponse + */ + public PaginationIterable listEventsWithPagination(ListEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "listEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * List endpoint returns events that match an events search query. Results are - * paginated similarly to logs. - * - *

Use this endpoint to see your latest events. + *

List endpoint returns events that match an events search query. + * Results are paginated similarly to logs.

+ *

Use this endpoint to see your latest events.

* * @param parameters Optional parameters for the request. * @return ApiResponse<EventsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -256,8 +244,7 @@ public PaginationIterable listEventsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listEventsWithHttpInfo( - ListEventsOptionalParameters parameters) throws ApiException { + public ApiResponse listEventsWithHttpInfo(ListEventsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "listEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -275,6 +262,7 @@ public ApiResponse listEventsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -285,44 +273,26 @@ public ApiResponse listEventsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.EventsApi.listEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.EventsApi.listEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of events. * - *

See {@link #listEventsWithHttpInfo}. + * See {@link #listEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<EventsListResponse>> */ - public CompletableFuture> listEventsWithHttpInfoAsync( - ListEventsOptionalParameters parameters) { + public CompletableFuture> listEventsWithHttpInfoAsync(ListEventsOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "listEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; @@ -335,6 +305,7 @@ public CompletableFuture> listEventsWithHttpInfo // create path and map variables String localVarPath = "/api/v2/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -347,39 +318,24 @@ public CompletableFuture> listEventsWithHttpInfo Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.EventsApi.listEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.EventsApi.listEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchEvents. */ + /** + * Manage optional parameters to searchEvents. + */ public static class SearchEventsOptionalParameters { private EventsListRequest body; /** * Set body. - * - * @param body (optional) + * @param body (optional) * @return SearchEventsOptionalParameters */ public SearchEventsOptionalParameters body(EventsListRequest body) { @@ -389,134 +345,122 @@ public SearchEventsOptionalParameters body(EventsListRequest body) { } /** - * Search events. - * - *

See {@link #searchEventsWithHttpInfo}. - * - * @return EventsListResponse - * @throws ApiException if fails to make API call - */ - public EventsListResponse searchEvents() throws ApiException { + * Search events. + * + * See {@link #searchEventsWithHttpInfo}. + * + * @return EventsListResponse + * @throws ApiException if fails to make API call + */ + public EventsListResponse searchEvents () throws ApiException { return searchEventsWithHttpInfo(new SearchEventsOptionalParameters()).getData(); } /** - * Search events. - * - *

See {@link #searchEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<EventsListResponse> - */ - public CompletableFuture searchEventsAsync() { - return searchEventsWithHttpInfoAsync(new SearchEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search events. + * + * See {@link #searchEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<EventsListResponse> + */ + public CompletableFuturesearchEventsAsync() { + return searchEventsWithHttpInfoAsync(new SearchEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search events. - * - *

See {@link #searchEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return EventsListResponse - * @throws ApiException if fails to make API call - */ - public EventsListResponse searchEvents(SearchEventsOptionalParameters parameters) - throws ApiException { + * Search events. + * + * See {@link #searchEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return EventsListResponse + * @throws ApiException if fails to make API call + */ + public EventsListResponse searchEvents(SearchEventsOptionalParameters parameters) throws ApiException { return searchEventsWithHttpInfo(parameters).getData(); } /** - * Search events. - * - *

See {@link #searchEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<EventsListResponse> - */ - public CompletableFuture searchEventsAsync( - SearchEventsOptionalParameters parameters) { - return searchEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search events. + * + * See {@link #searchEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<EventsListResponse> + */ + public CompletableFuturesearchEventsAsync(SearchEventsOptionalParameters parameters) { + return searchEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Search events. - * - *

See {@link #searchEventsWithHttpInfo}. - * - * @return PaginationIterable<EventResponse> - */ + * Search events. + * + * See {@link #searchEventsWithHttpInfo}. + * + * @return PaginationIterable<EventResponse> + */ public PaginationIterable searchEventsWithPagination() { SearchEventsOptionalParameters parameters = new SearchEventsOptionalParameters(); return searchEventsWithPagination(parameters); } /** - * Search events. - * - *

See {@link #searchEventsWithHttpInfo}. - * - * @return EventsListResponse - */ - public PaginationIterable searchEventsWithPagination( - SearchEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { + * Search events. + * + * See {@link #searchEventsWithHttpInfo}. + * + * @return EventsListResponse + */ + public PaginationIterable searchEventsWithPagination(SearchEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.body == null) { parameters.body(new EventsListRequest()); - } + } - if (parameters.body.getPage() == null) { + if(parameters.body.getPage() == null) { parameters.body.setPage(new EventsRequestPage()); - } + } + + - if (parameters.body.getPage().getLimit() == null) { + + if (parameters.body.getPage().getLimit() == null) { limit = 10; parameters.body.getPage().setLimit(limit); - } else { + } else { limit = parameters.body.getPage().getLimit(); - } + } - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "searchEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * List endpoint returns events that match an events search query. Results are - * paginated similarly to logs. - * - *

Use this endpoint to build complex events filtering and search. + *

List endpoint returns events that match an events search query. + * Results are paginated similarly to logs.

+ *

Use this endpoint to build complex events filtering and search.

* * @param parameters Optional parameters for the request. * @return ApiResponse<EventsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -525,8 +469,7 @@ public PaginationIterable searchEventsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchEventsWithHttpInfo( - SearchEventsOptionalParameters parameters) throws ApiException { + public ApiResponse searchEventsWithHttpInfo(SearchEventsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "searchEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -538,78 +481,48 @@ public ApiResponse searchEventsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/events/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.EventsApi.searchEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.EventsApi.searchEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search events. * - *

See {@link #searchEventsWithHttpInfo}. + * See {@link #searchEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<EventsListResponse>> */ - public CompletableFuture> searchEventsWithHttpInfoAsync( - SearchEventsOptionalParameters parameters) { + public CompletableFuture> searchEventsWithHttpInfoAsync(SearchEventsOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "searchEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/events/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.EventsApi.searchEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.EventsApi.searchEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/FastlyIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/FastlyIntegrationApi.java index a46bb0d284a..79e243c239a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/FastlyIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/FastlyIntegrationApi.java @@ -1,28 +1,36 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.FastlyAccountCreateRequest; -import com.datadog.api.client.v2.model.FastlyAccountResponse; -import com.datadog.api.client.v2.model.FastlyAccountUpdateRequest; -import com.datadog.api.client.v2.model.FastlyAccountsResponse; -import com.datadog.api.client.v2.model.FastlyServiceRequest; -import com.datadog.api.client.v2.model.FastlyServiceResponse; -import com.datadog.api.client.v2.model.FastlyServicesResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.FastlyAccountsResponse; +import com.datadog.api.client.v2.model.FastlyAccountResponse; +import com.datadog.api.client.v2.model.FastlyAccountCreateRequest; +import com.datadog.api.client.v2.model.FastlyAccountUpdateRequest; +import com.datadog.api.client.v2.model.FastlyServicesResponse; +import com.datadog.api.client.v2.model.FastlyServiceResponse; +import com.datadog.api.client.v2.model.FastlyServiceRequest; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyIntegrationApi { private ApiClient apiClient; - public FastlyIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -50,44 +58,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Fastly account. - * - *

See {@link #createFastlyAccountWithHttpInfo}. - * - * @param body (required) - * @return FastlyAccountResponse - * @throws ApiException if fails to make API call - */ - public FastlyAccountResponse createFastlyAccount(FastlyAccountCreateRequest body) - throws ApiException { + * Add Fastly account. + * + * See {@link #createFastlyAccountWithHttpInfo}. + * + * @param body (required) + * @return FastlyAccountResponse + * @throws ApiException if fails to make API call + */ + public FastlyAccountResponse createFastlyAccount(FastlyAccountCreateRequest body) throws ApiException { return createFastlyAccountWithHttpInfo(body).getData(); } /** - * Add Fastly account. - * - *

See {@link #createFastlyAccountWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<FastlyAccountResponse> - */ - public CompletableFuture createFastlyAccountAsync( - FastlyAccountCreateRequest body) { - return createFastlyAccountWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Add Fastly account. + * + * See {@link #createFastlyAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FastlyAccountResponse> + */ + public CompletableFuturecreateFastlyAccountAsync(FastlyAccountCreateRequest body) { + return createFastlyAccountWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Fastly account. + *

Create a Fastly account.

* - * @param body (required) + * @param body (required) * @return ApiResponse<FastlyAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,134 +102,98 @@ public CompletableFuture createFastlyAccountAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createFastlyAccountWithHttpInfo( - FastlyAccountCreateRequest body) throws ApiException { + public ApiResponse createFastlyAccountWithHttpInfo(FastlyAccountCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createFastlyAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createFastlyAccount"); } // create path and map variables String localVarPath = "/api/v2/integrations/fastly/accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.createFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.createFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add Fastly account. * - *

See {@link #createFastlyAccountWithHttpInfo}. + * See {@link #createFastlyAccountWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<FastlyAccountResponse>> */ - public CompletableFuture> createFastlyAccountWithHttpInfoAsync( - FastlyAccountCreateRequest body) { + public CompletableFuture> createFastlyAccountWithHttpInfoAsync(FastlyAccountCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createFastlyAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createFastlyAccount")); + return result; } // create path and map variables String localVarPath = "/api/v2/integrations/fastly/accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.createFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.createFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Add Fastly service. - * - *

See {@link #createFastlyServiceWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @param body (required) - * @return FastlyServiceResponse - * @throws ApiException if fails to make API call - */ - public FastlyServiceResponse createFastlyService(String accountId, FastlyServiceRequest body) - throws ApiException { + * Add Fastly service. + * + * See {@link #createFastlyServiceWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @param body (required) + * @return FastlyServiceResponse + * @throws ApiException if fails to make API call + */ + public FastlyServiceResponse createFastlyService(String accountId, FastlyServiceRequest body) throws ApiException { return createFastlyServiceWithHttpInfo(accountId, body).getData(); } /** - * Add Fastly service. - * - *

See {@link #createFastlyServiceWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @param body (required) - * @return CompletableFuture<FastlyServiceResponse> - */ - public CompletableFuture createFastlyServiceAsync( - String accountId, FastlyServiceRequest body) { - return createFastlyServiceWithHttpInfoAsync(accountId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Add Fastly service. + * + * See {@link #createFastlyServiceWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @param body (required) + * @return CompletableFuture<FastlyServiceResponse> + */ + public CompletableFuturecreateFastlyServiceAsync(String accountId, FastlyServiceRequest body) { + return createFastlyServiceWithHttpInfoAsync(accountId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a Fastly service for an account. + *

Create a Fastly service for an account.

* * @param accountId Fastly Account id. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<FastlyServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -234,148 +203,109 @@ public CompletableFuture createFastlyServiceAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createFastlyServiceWithHttpInfo( - String accountId, FastlyServiceRequest body) throws ApiException { + public ApiResponse createFastlyServiceWithHttpInfo(String accountId, FastlyServiceRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling createFastlyService"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling createFastlyService"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createFastlyService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createFastlyService"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.createFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.createFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add Fastly service. * - *

See {@link #createFastlyServiceWithHttpInfo}. + * See {@link #createFastlyServiceWithHttpInfo}. * * @param accountId Fastly Account id. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<FastlyServiceResponse>> */ - public CompletableFuture> createFastlyServiceWithHttpInfoAsync( - String accountId, FastlyServiceRequest body) { + public CompletableFuture> createFastlyServiceWithHttpInfoAsync(String accountId, FastlyServiceRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling createFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling createFastlyService")); + 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 createFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createFastlyService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.createFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.createFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete Fastly account. - * - *

See {@link #deleteFastlyAccountWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @throws ApiException if fails to make API call - */ - public void deleteFastlyAccount(String accountId) throws ApiException { + * Delete Fastly account. + * + * See {@link #deleteFastlyAccountWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @throws ApiException if fails to make API call + */ + public void deleteFastlyAccount(String accountId) throws ApiException { deleteFastlyAccountWithHttpInfo(accountId); } /** - * Delete Fastly account. - * - *

See {@link #deleteFastlyAccountWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteFastlyAccountAsync(String accountId) { - return deleteFastlyAccountWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete Fastly account. + * + * See {@link #deleteFastlyAccountWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteFastlyAccountAsync(String accountId) { + return deleteFastlyAccountWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Fastly account. + *

Delete a Fastly account.

* * @param accountId Fastly Account id. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -390,129 +320,94 @@ public ApiResponse deleteFastlyAccountWithHttpInfo(String accountId) throw // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteFastlyAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteFastlyAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.deleteFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.deleteFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete Fastly account. * - *

See {@link #deleteFastlyAccountWithHttpInfo}. + * See {@link #deleteFastlyAccountWithHttpInfo}. * * @param accountId Fastly Account id. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteFastlyAccountWithHttpInfoAsync( - String accountId) { + public CompletableFuture> deleteFastlyAccountWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteFastlyAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling deleteFastlyAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.deleteFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.deleteFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete Fastly service. - * - *

See {@link #deleteFastlyServiceWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @param serviceId Fastly Service ID. (required) - * @throws ApiException if fails to make API call - */ - public void deleteFastlyService(String accountId, String serviceId) throws ApiException { + * Delete Fastly service. + * + * See {@link #deleteFastlyServiceWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @param serviceId Fastly Service ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteFastlyService(String accountId, String serviceId) throws ApiException { deleteFastlyServiceWithHttpInfo(accountId, serviceId); } /** - * Delete Fastly service. - * - *

See {@link #deleteFastlyServiceWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @param serviceId Fastly Service ID. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteFastlyServiceAsync(String accountId, String serviceId) { - return deleteFastlyServiceWithHttpInfoAsync(accountId, serviceId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete Fastly service. + * + * See {@link #deleteFastlyServiceWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @param serviceId Fastly Service ID. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteFastlyServiceAsync(String accountId, String serviceId) { + return deleteFastlyServiceWithHttpInfoAsync(accountId, serviceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a Fastly service for an account. + *

Delete a Fastly service for an account.

* * @param accountId Fastly Account id. (required) * @param serviceId Fastly Service ID. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -522,151 +417,112 @@ public CompletableFuture deleteFastlyServiceAsync(String accountId, String * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteFastlyServiceWithHttpInfo(String accountId, String serviceId) - throws ApiException { + public ApiResponse deleteFastlyServiceWithHttpInfo(String accountId, String serviceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteFastlyService"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteFastlyService"); } // verify the required parameter 'serviceId' is set if (serviceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceId' when calling deleteFastlyService"); + throw new ApiException(400, "Missing the required parameter 'serviceId' when calling deleteFastlyService"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.deleteFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.deleteFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete Fastly service. * - *

See {@link #deleteFastlyServiceWithHttpInfo}. + * See {@link #deleteFastlyServiceWithHttpInfo}. * * @param accountId Fastly Account id. (required) * @param serviceId Fastly Service ID. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteFastlyServiceWithHttpInfoAsync( - String accountId, String serviceId) { + public CompletableFuture> deleteFastlyServiceWithHttpInfoAsync(String accountId, String serviceId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling deleteFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling deleteFastlyService")); + return result; } // verify the required parameter 'serviceId' is set if (serviceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'serviceId' when calling deleteFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceId' when calling deleteFastlyService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.deleteFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.deleteFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get Fastly account. - * - *

See {@link #getFastlyAccountWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @return FastlyAccountResponse - * @throws ApiException if fails to make API call - */ - public FastlyAccountResponse getFastlyAccount(String accountId) throws ApiException { + * Get Fastly account. + * + * See {@link #getFastlyAccountWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @return FastlyAccountResponse + * @throws ApiException if fails to make API call + */ + public FastlyAccountResponse getFastlyAccount(String accountId) throws ApiException { return getFastlyAccountWithHttpInfo(accountId).getData(); } /** - * Get Fastly account. - * - *

See {@link #getFastlyAccountWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @return CompletableFuture<FastlyAccountResponse> - */ - public CompletableFuture getFastlyAccountAsync(String accountId) { - return getFastlyAccountWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * Get Fastly account. + * + * See {@link #getFastlyAccountWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @return CompletableFuture<FastlyAccountResponse> + */ + public CompletableFuturegetFastlyAccountAsync(String accountId) { + return getFastlyAccountWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a Fastly account. + *

Get a Fastly account.

* * @param accountId Fastly Account id. (required) * @return ApiResponse<FastlyAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -676,138 +532,100 @@ public CompletableFuture getFastlyAccountAsync(String acc * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getFastlyAccountWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse getFastlyAccountWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling getFastlyAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling getFastlyAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.getFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.getFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get Fastly account. * - *

See {@link #getFastlyAccountWithHttpInfo}. + * See {@link #getFastlyAccountWithHttpInfo}. * * @param accountId Fastly Account id. (required) * @return CompletableFuture<ApiResponse<FastlyAccountResponse>> */ - public CompletableFuture> getFastlyAccountWithHttpInfoAsync( - String accountId) { + public CompletableFuture> getFastlyAccountWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling getFastlyAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling getFastlyAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.getFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.getFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get Fastly service. - * - *

See {@link #getFastlyServiceWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @param serviceId Fastly Service ID. (required) - * @return FastlyServiceResponse - * @throws ApiException if fails to make API call - */ - public FastlyServiceResponse getFastlyService(String accountId, String serviceId) - throws ApiException { + * Get Fastly service. + * + * See {@link #getFastlyServiceWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @param serviceId Fastly Service ID. (required) + * @return FastlyServiceResponse + * @throws ApiException if fails to make API call + */ + public FastlyServiceResponse getFastlyService(String accountId, String serviceId) throws ApiException { return getFastlyServiceWithHttpInfo(accountId, serviceId).getData(); } /** - * Get Fastly service. - * - *

See {@link #getFastlyServiceWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @param serviceId Fastly Service ID. (required) - * @return CompletableFuture<FastlyServiceResponse> - */ - public CompletableFuture getFastlyServiceAsync( - String accountId, String serviceId) { - return getFastlyServiceWithHttpInfoAsync(accountId, serviceId) - .thenApply( - response -> { - return response.getData(); - }); + * Get Fastly service. + * + * See {@link #getFastlyServiceWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @param serviceId Fastly Service ID. (required) + * @return CompletableFuture<FastlyServiceResponse> + */ + public CompletableFuturegetFastlyServiceAsync(String accountId, String serviceId) { + return getFastlyServiceWithHttpInfoAsync(accountId, serviceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a Fastly service for an account. + *

Get a Fastly service for an account.

* * @param accountId Fastly Account id. (required) * @param serviceId Fastly Service ID. (required) * @return ApiResponse<FastlyServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -817,148 +635,109 @@ public CompletableFuture getFastlyServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getFastlyServiceWithHttpInfo( - String accountId, String serviceId) throws ApiException { + public ApiResponse getFastlyServiceWithHttpInfo(String accountId, String serviceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling getFastlyService"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling getFastlyService"); } // verify the required parameter 'serviceId' is set if (serviceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceId' when calling getFastlyService"); + throw new ApiException(400, "Missing the required parameter 'serviceId' when calling getFastlyService"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.getFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.getFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get Fastly service. * - *

See {@link #getFastlyServiceWithHttpInfo}. + * See {@link #getFastlyServiceWithHttpInfo}. * * @param accountId Fastly Account id. (required) * @param serviceId Fastly Service ID. (required) * @return CompletableFuture<ApiResponse<FastlyServiceResponse>> */ - public CompletableFuture> getFastlyServiceWithHttpInfoAsync( - String accountId, String serviceId) { + public CompletableFuture> getFastlyServiceWithHttpInfoAsync(String accountId, String serviceId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling getFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling getFastlyService")); + return result; } // verify the required parameter 'serviceId' is set if (serviceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'serviceId' when calling getFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceId' when calling getFastlyService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.getFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.getFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List Fastly accounts. - * - *

See {@link #listFastlyAccountsWithHttpInfo}. - * - * @return FastlyAccountsResponse - * @throws ApiException if fails to make API call - */ - public FastlyAccountsResponse listFastlyAccounts() throws ApiException { + * List Fastly accounts. + * + * See {@link #listFastlyAccountsWithHttpInfo}. + * + * @return FastlyAccountsResponse + * @throws ApiException if fails to make API call + */ + public FastlyAccountsResponse listFastlyAccounts() throws ApiException { return listFastlyAccountsWithHttpInfo().getData(); } /** - * List Fastly accounts. - * - *

See {@link #listFastlyAccountsWithHttpInfoAsync}. - * - * @return CompletableFuture<FastlyAccountsResponse> - */ - public CompletableFuture listFastlyAccountsAsync() { - return listFastlyAccountsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List Fastly accounts. + * + * See {@link #listFastlyAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<FastlyAccountsResponse> + */ + public CompletableFuturelistFastlyAccountsAsync() { + return listFastlyAccountsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List Fastly accounts. + *

List Fastly accounts.

* * @return ApiResponse<FastlyAccountsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -973,107 +752,77 @@ public ApiResponse listFastlyAccountsWithHttpInfo() thro // create path and map variables String localVarPath = "/api/v2/integrations/fastly/accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.listFastlyAccounts", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.listFastlyAccounts", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List Fastly accounts. * - *

See {@link #listFastlyAccountsWithHttpInfo}. + * See {@link #listFastlyAccountsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<FastlyAccountsResponse>> */ - public CompletableFuture> - listFastlyAccountsWithHttpInfoAsync() { + public CompletableFuture> listFastlyAccountsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integrations/fastly/accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.listFastlyAccounts", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.listFastlyAccounts", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List Fastly services. - * - *

See {@link #listFastlyServicesWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @return FastlyServicesResponse - * @throws ApiException if fails to make API call - */ - public FastlyServicesResponse listFastlyServices(String accountId) throws ApiException { + * List Fastly services. + * + * See {@link #listFastlyServicesWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @return FastlyServicesResponse + * @throws ApiException if fails to make API call + */ + public FastlyServicesResponse listFastlyServices(String accountId) throws ApiException { return listFastlyServicesWithHttpInfo(accountId).getData(); } /** - * List Fastly services. - * - *

See {@link #listFastlyServicesWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @return CompletableFuture<FastlyServicesResponse> - */ - public CompletableFuture listFastlyServicesAsync(String accountId) { - return listFastlyServicesWithHttpInfoAsync(accountId) - .thenApply( - response -> { - return response.getData(); - }); + * List Fastly services. + * + * See {@link #listFastlyServicesWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @return CompletableFuture<FastlyServicesResponse> + */ + public CompletableFuturelistFastlyServicesAsync(String accountId) { + return listFastlyServicesWithHttpInfoAsync(accountId).thenApply(response -> { + return response.getData(); + }); } + /** - * List Fastly services for an account. + *

List Fastly services for an account.

* * @param accountId Fastly Account id. (required) * @return ApiResponse<FastlyServicesResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -1083,138 +832,100 @@ public CompletableFuture listFastlyServicesAsync(String * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listFastlyServicesWithHttpInfo(String accountId) - throws ApiException { + public ApiResponse listFastlyServicesWithHttpInfo(String accountId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling listFastlyServices"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling listFastlyServices"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.listFastlyServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.listFastlyServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List Fastly services. * - *

See {@link #listFastlyServicesWithHttpInfo}. + * See {@link #listFastlyServicesWithHttpInfo}. * * @param accountId Fastly Account id. (required) * @return CompletableFuture<ApiResponse<FastlyServicesResponse>> */ - public CompletableFuture> listFastlyServicesWithHttpInfoAsync( - String accountId) { + public CompletableFuture> listFastlyServicesWithHttpInfoAsync(String accountId) { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling listFastlyServices")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling listFastlyServices")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.listFastlyServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.listFastlyServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update Fastly account. - * - *

See {@link #updateFastlyAccountWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @param body (required) - * @return FastlyAccountResponse - * @throws ApiException if fails to make API call - */ - public FastlyAccountResponse updateFastlyAccount( - String accountId, FastlyAccountUpdateRequest body) throws ApiException { + * Update Fastly account. + * + * See {@link #updateFastlyAccountWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @param body (required) + * @return FastlyAccountResponse + * @throws ApiException if fails to make API call + */ + public FastlyAccountResponse updateFastlyAccount(String accountId, FastlyAccountUpdateRequest body) throws ApiException { return updateFastlyAccountWithHttpInfo(accountId, body).getData(); } /** - * Update Fastly account. - * - *

See {@link #updateFastlyAccountWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @param body (required) - * @return CompletableFuture<FastlyAccountResponse> - */ - public CompletableFuture updateFastlyAccountAsync( - String accountId, FastlyAccountUpdateRequest body) { - return updateFastlyAccountWithHttpInfoAsync(accountId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Fastly account. + * + * See {@link #updateFastlyAccountWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @param body (required) + * @return CompletableFuture<FastlyAccountResponse> + */ + public CompletableFutureupdateFastlyAccountAsync(String accountId, FastlyAccountUpdateRequest body) { + return updateFastlyAccountWithHttpInfoAsync(accountId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Fastly account. + *

Update a Fastly account.

* * @param accountId Fastly Account id. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<FastlyAccountResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1224,157 +935,116 @@ public CompletableFuture updateFastlyAccountAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateFastlyAccountWithHttpInfo( - String accountId, FastlyAccountUpdateRequest body) throws ApiException { + public ApiResponse updateFastlyAccountWithHttpInfo(String accountId, FastlyAccountUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateFastlyAccount"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling updateFastlyAccount"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateFastlyAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateFastlyAccount"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.updateFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.updateFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Fastly account. * - *

See {@link #updateFastlyAccountWithHttpInfo}. + * See {@link #updateFastlyAccountWithHttpInfo}. * * @param accountId Fastly Account id. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<FastlyAccountResponse>> */ - public CompletableFuture> updateFastlyAccountWithHttpInfoAsync( - String accountId, FastlyAccountUpdateRequest body) { + public CompletableFuture> updateFastlyAccountWithHttpInfoAsync(String accountId, FastlyAccountUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateFastlyAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling updateFastlyAccount")); + 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 updateFastlyAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateFastlyAccount")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.updateFastlyAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.updateFastlyAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update Fastly service. - * - *

See {@link #updateFastlyServiceWithHttpInfo}. - * - * @param accountId Fastly Account id. (required) - * @param serviceId Fastly Service ID. (required) - * @param body (required) - * @return FastlyServiceResponse - * @throws ApiException if fails to make API call - */ - public FastlyServiceResponse updateFastlyService( - String accountId, String serviceId, FastlyServiceRequest body) throws ApiException { + * Update Fastly service. + * + * See {@link #updateFastlyServiceWithHttpInfo}. + * + * @param accountId Fastly Account id. (required) + * @param serviceId Fastly Service ID. (required) + * @param body (required) + * @return FastlyServiceResponse + * @throws ApiException if fails to make API call + */ + public FastlyServiceResponse updateFastlyService(String accountId, String serviceId, FastlyServiceRequest body) throws ApiException { return updateFastlyServiceWithHttpInfo(accountId, serviceId, body).getData(); } /** - * Update Fastly service. - * - *

See {@link #updateFastlyServiceWithHttpInfoAsync}. - * - * @param accountId Fastly Account id. (required) - * @param serviceId Fastly Service ID. (required) - * @param body (required) - * @return CompletableFuture<FastlyServiceResponse> - */ - public CompletableFuture updateFastlyServiceAsync( - String accountId, String serviceId, FastlyServiceRequest body) { - return updateFastlyServiceWithHttpInfoAsync(accountId, serviceId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Fastly service. + * + * See {@link #updateFastlyServiceWithHttpInfoAsync}. + * + * @param accountId Fastly Account id. (required) + * @param serviceId Fastly Service ID. (required) + * @param body (required) + * @return CompletableFuture<FastlyServiceResponse> + */ + public CompletableFutureupdateFastlyServiceAsync(String accountId, String serviceId, FastlyServiceRequest body) { + return updateFastlyServiceWithHttpInfoAsync(accountId, serviceId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a Fastly service for an account. + *

Update a Fastly service for an account.

* * @param accountId Fastly Account id. (required) * @param serviceId Fastly Service ID. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<FastlyServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1384,127 +1054,86 @@ public CompletableFuture updateFastlyServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateFastlyServiceWithHttpInfo( - String accountId, String serviceId, FastlyServiceRequest body) throws ApiException { + public ApiResponse updateFastlyServiceWithHttpInfo(String accountId, String serviceId, FastlyServiceRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateFastlyService"); + throw new ApiException(400, "Missing the required parameter 'accountId' when calling updateFastlyService"); } // verify the required parameter 'serviceId' is set if (serviceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceId' when calling updateFastlyService"); + throw new ApiException(400, "Missing the required parameter 'serviceId' when calling updateFastlyService"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateFastlyService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateFastlyService"); } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.updateFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.FastlyIntegrationApi.updateFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Fastly service. * - *

See {@link #updateFastlyServiceWithHttpInfo}. + * See {@link #updateFastlyServiceWithHttpInfo}. * * @param accountId Fastly Account id. (required) * @param serviceId Fastly Service ID. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<FastlyServiceResponse>> */ - public CompletableFuture> updateFastlyServiceWithHttpInfoAsync( - String accountId, String serviceId, FastlyServiceRequest body) { + public CompletableFuture> updateFastlyServiceWithHttpInfoAsync(String accountId, String serviceId, FastlyServiceRequest body) { Object localVarPostBody = body; // verify the required parameter 'accountId' is set if (accountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'accountId' when calling updateFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'accountId' when calling updateFastlyService")); + return result; } // verify the required parameter 'serviceId' is set if (serviceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'serviceId' when calling updateFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceId' when calling updateFastlyService")); + 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 updateFastlyService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateFastlyService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())) + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.FastlyIntegrationApi.updateFastlyService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.FastlyIntegrationApi.updateFastlyService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/IncidentServicesApi.java b/src/main/java/com/datadog/api/client/v2/api/IncidentServicesApi.java index f134397aae9..5d3b37e4587 100644 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentServicesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/IncidentServicesApi.java @@ -1,27 +1,34 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.IncidentRelatedObject; -import com.datadog.api.client.v2.model.IncidentServiceCreateRequest; -import com.datadog.api.client.v2.model.IncidentServiceResponse; -import com.datadog.api.client.v2.model.IncidentServiceUpdateRequest; -import com.datadog.api.client.v2.model.IncidentServicesResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.IncidentServicesResponse; +import com.datadog.api.client.v2.model.IncidentRelatedObject; +import com.datadog.api.client.v2.model.IncidentServiceResponse; +import com.datadog.api.client.v2.model.IncidentServiceCreateRequest; +import com.datadog.api.client.v2.model.IncidentServiceUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServicesApi { private ApiClient apiClient; - public IncidentServicesApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,44 +56,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a new incident service. - * - *

See {@link #createIncidentServiceWithHttpInfo}. - * - * @param body Incident Service Payload. (required) - * @return IncidentServiceResponse - * @throws ApiException if fails to make API call - */ - public IncidentServiceResponse createIncidentService(IncidentServiceCreateRequest body) - throws ApiException { + * Create a new incident service. + * + * See {@link #createIncidentServiceWithHttpInfo}. + * + * @param body Incident Service Payload. (required) + * @return IncidentServiceResponse + * @throws ApiException if fails to make API call + */ + public IncidentServiceResponse createIncidentService(IncidentServiceCreateRequest body) throws ApiException { return createIncidentServiceWithHttpInfo(body).getData(); } /** - * Create a new incident service. - * - *

See {@link #createIncidentServiceWithHttpInfoAsync}. - * - * @param body Incident Service Payload. (required) - * @return CompletableFuture<IncidentServiceResponse> - */ - public CompletableFuture createIncidentServiceAsync( - IncidentServiceCreateRequest body) { - return createIncidentServiceWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new incident service. + * + * See {@link #createIncidentServiceWithHttpInfoAsync}. + * + * @param body Incident Service Payload. (required) + * @return CompletableFuture<IncidentServiceResponse> + */ + public CompletableFuturecreateIncidentServiceAsync(IncidentServiceCreateRequest body) { + return createIncidentServiceWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Creates a new incident service. + *

Creates a new incident service.

* * @param body Incident Service Payload. (required) * @return ApiResponse<IncidentServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,8 +101,7 @@ public CompletableFuture createIncidentServiceAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createIncidentServiceWithHttpInfo( - IncidentServiceCreateRequest body) throws ApiException { + public ApiResponse createIncidentServiceWithHttpInfo(IncidentServiceCreateRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "createIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -110,132 +113,98 @@ public ApiResponse createIncidentServiceWithHttpInfo( // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createIncidentService"); } // create path and map variables String localVarPath = "/api/v2/services"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.createIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentServicesApi.createIncidentService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new incident service. * - *

See {@link #createIncidentServiceWithHttpInfo}. + * See {@link #createIncidentServiceWithHttpInfo}. * * @param body Incident Service Payload. (required) * @return CompletableFuture<ApiResponse<IncidentServiceResponse>> */ - public CompletableFuture> - createIncidentServiceWithHttpInfoAsync(IncidentServiceCreateRequest body) { + public CompletableFuture> createIncidentServiceWithHttpInfoAsync(IncidentServiceCreateRequest body) { // Check if unstable operation is enabled String operationId = "createIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createIncidentService")); + return result; } // create path and map variables String localVarPath = "/api/v2/services"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.createIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentServicesApi.createIncidentService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an existing incident service. - * - *

See {@link #deleteIncidentServiceWithHttpInfo}. - * - * @param serviceId The ID of the incident service. (required) - * @throws ApiException if fails to make API call - */ - public void deleteIncidentService(String serviceId) throws ApiException { + * Delete an existing incident service. + * + * See {@link #deleteIncidentServiceWithHttpInfo}. + * + * @param serviceId The ID of the incident service. (required) + * @throws ApiException if fails to make API call + */ + public void deleteIncidentService(String serviceId) throws ApiException { deleteIncidentServiceWithHttpInfo(serviceId); } /** - * Delete an existing incident service. - * - *

See {@link #deleteIncidentServiceWithHttpInfoAsync}. - * - * @param serviceId The ID of the incident service. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteIncidentServiceAsync(String serviceId) { - return deleteIncidentServiceWithHttpInfoAsync(serviceId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an existing incident service. + * + * See {@link #deleteIncidentServiceWithHttpInfoAsync}. + * + * @param serviceId The ID of the incident service. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteIncidentServiceAsync(String serviceId) { + return deleteIncidentServiceWithHttpInfoAsync(serviceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Deletes an existing incident service. + *

Deletes an existing incident service.

* * @param serviceId The ID of the incident service. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -258,110 +227,74 @@ public ApiResponse deleteIncidentServiceWithHttpInfo(String serviceId) thr // verify the required parameter 'serviceId' is set if (serviceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceId' when calling deleteIncidentService"); + throw new ApiException(400, "Missing the required parameter 'serviceId' when calling deleteIncidentService"); } // create path and map variables - String localVarPath = - "/api/v2/services/{service_id}" - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/services/{service_id}" + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.deleteIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentServicesApi.deleteIncidentService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an existing incident service. * - *

See {@link #deleteIncidentServiceWithHttpInfo}. + * See {@link #deleteIncidentServiceWithHttpInfo}. * * @param serviceId The ID of the incident service. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteIncidentServiceWithHttpInfoAsync( - String serviceId) { + public CompletableFuture> deleteIncidentServiceWithHttpInfoAsync(String serviceId) { // Check if unstable operation is enabled String operationId = "deleteIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'serviceId' is set if (serviceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceId' when calling deleteIncidentService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceId' when calling deleteIncidentService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/services/{service_id}" - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/services/{service_id}" + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.deleteIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentServicesApi.deleteIncidentService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } - /** Manage optional parameters to getIncidentService. */ + /** + * Manage optional parameters to getIncidentService. + */ public static class GetIncidentServiceOptionalParameters { private IncidentRelatedObject include; /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return GetIncidentServiceOptionalParameters */ public GetIncidentServiceOptionalParameters include(IncidentRelatedObject include) { @@ -371,79 +304,72 @@ public GetIncidentServiceOptionalParameters include(IncidentRelatedObject includ } /** - * Get details of an incident service. - * - *

See {@link #getIncidentServiceWithHttpInfo}. - * - * @param serviceId The ID of the incident service. (required) - * @return IncidentServiceResponse - * @throws ApiException if fails to make API call - */ - public IncidentServiceResponse getIncidentService(String serviceId) throws ApiException { - return getIncidentServiceWithHttpInfo(serviceId, new GetIncidentServiceOptionalParameters()) - .getData(); + * Get details of an incident service. + * + * See {@link #getIncidentServiceWithHttpInfo}. + * + * @param serviceId The ID of the incident service. (required) + * @return IncidentServiceResponse + * @throws ApiException if fails to make API call + */ + public IncidentServiceResponse getIncidentService (String serviceId) throws ApiException { + return getIncidentServiceWithHttpInfo( serviceId, new GetIncidentServiceOptionalParameters()).getData(); } /** - * Get details of an incident service. - * - *

See {@link #getIncidentServiceWithHttpInfoAsync}. - * - * @param serviceId The ID of the incident service. (required) - * @return CompletableFuture<IncidentServiceResponse> - */ - public CompletableFuture getIncidentServiceAsync(String serviceId) { - return getIncidentServiceWithHttpInfoAsync( - serviceId, new GetIncidentServiceOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get details of an incident service. + * + * See {@link #getIncidentServiceWithHttpInfoAsync}. + * + * @param serviceId The ID of the incident service. (required) + * @return CompletableFuture<IncidentServiceResponse> + */ + public CompletableFuturegetIncidentServiceAsync(String serviceId) { + return getIncidentServiceWithHttpInfoAsync(serviceId, new GetIncidentServiceOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get details of an incident service. - * - *

See {@link #getIncidentServiceWithHttpInfo}. - * - * @param serviceId The ID of the incident service. (required) - * @param parameters Optional parameters for the request. - * @return IncidentServiceResponse - * @throws ApiException if fails to make API call - */ - public IncidentServiceResponse getIncidentService( - String serviceId, GetIncidentServiceOptionalParameters parameters) throws ApiException { + * Get details of an incident service. + * + * See {@link #getIncidentServiceWithHttpInfo}. + * + * @param serviceId The ID of the incident service. (required) + * @param parameters Optional parameters for the request. + * @return IncidentServiceResponse + * @throws ApiException if fails to make API call + */ + public IncidentServiceResponse getIncidentService(String serviceId, GetIncidentServiceOptionalParameters parameters) throws ApiException { return getIncidentServiceWithHttpInfo(serviceId, parameters).getData(); } /** - * Get details of an incident service. - * - *

See {@link #getIncidentServiceWithHttpInfoAsync}. - * - * @param serviceId The ID of the incident service. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentServiceResponse> - */ - public CompletableFuture getIncidentServiceAsync( - String serviceId, GetIncidentServiceOptionalParameters parameters) { - return getIncidentServiceWithHttpInfoAsync(serviceId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get details of an incident service. + * + * See {@link #getIncidentServiceWithHttpInfoAsync}. + * + * @param serviceId The ID of the incident service. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentServiceResponse> + */ + public CompletableFuturegetIncidentServiceAsync( String serviceId, GetIncidentServiceOptionalParameters parameters) { + return getIncidentServiceWithHttpInfoAsync(serviceId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get details of an incident service. If the include[users] query parameter is - * provided, the included attribute will contain the users related to these incident services. + *

Get details of an incident service. If the include[users] query parameter is provided, + * the included attribute will contain the users related to these incident services.

* * @param serviceId The ID of the incident service. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -454,8 +380,7 @@ public CompletableFuture getIncidentServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getIncidentServiceWithHttpInfo( - String serviceId, GetIncidentServiceOptionalParameters parameters) throws ApiException { + public ApiResponse getIncidentServiceWithHttpInfo(String serviceId, GetIncidentServiceOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "getIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -467,78 +392,56 @@ public ApiResponse getIncidentServiceWithHttpInfo( // verify the required parameter 'serviceId' is set if (serviceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceId' when calling getIncidentService"); + throw new ApiException(400, "Missing the required parameter 'serviceId' when calling getIncidentService"); } IncidentRelatedObject include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/services/{service_id}" - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/services/{service_id}" + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.getIncidentService", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentServicesApi.getIncidentService", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get details of an incident service. * - *

See {@link #getIncidentServiceWithHttpInfo}. + * See {@link #getIncidentServiceWithHttpInfo}. * * @param serviceId The ID of the incident service. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentServiceResponse>> */ - public CompletableFuture> - getIncidentServiceWithHttpInfoAsync( - String serviceId, GetIncidentServiceOptionalParameters parameters) { + public CompletableFuture> getIncidentServiceWithHttpInfoAsync(String serviceId, GetIncidentServiceOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "getIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'serviceId' is set if (serviceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'serviceId' when calling getIncidentService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceId' when calling getIncidentService")); + return result; } IncidentRelatedObject include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/services/{service_id}" - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/services/{service_id}" + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -546,32 +449,18 @@ public ApiResponse getIncidentServiceWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.getIncidentService", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentServicesApi.getIncidentService", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listIncidentServices. */ + /** + * Manage optional parameters to listIncidentServices. + */ public static class ListIncidentServicesOptionalParameters { private IncidentRelatedObject include; private Long pageSize; @@ -580,9 +469,7 @@ public static class ListIncidentServicesOptionalParameters { /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return ListIncidentServicesOptionalParameters */ public ListIncidentServicesOptionalParameters include(IncidentRelatedObject include) { @@ -592,9 +479,7 @@ public ListIncidentServicesOptionalParameters include(IncidentRelatedObject incl /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListIncidentServicesOptionalParameters */ public ListIncidentServicesOptionalParameters pageSize(Long pageSize) { @@ -604,9 +489,7 @@ public ListIncidentServicesOptionalParameters pageSize(Long pageSize) { /** * Set pageOffset. - * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) + * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, default to 0) * @return ListIncidentServicesOptionalParameters */ public ListIncidentServicesOptionalParameters pageOffset(Long pageOffset) { @@ -616,7 +499,6 @@ public ListIncidentServicesOptionalParameters pageOffset(Long pageOffset) { /** * Set filter. - * * @param filter A search query that filters services by name. (optional) * @return ListIncidentServicesOptionalParameters */ @@ -627,73 +509,66 @@ public ListIncidentServicesOptionalParameters filter(String filter) { } /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfo}. - * - * @return IncidentServicesResponse - * @throws ApiException if fails to make API call - */ - public IncidentServicesResponse listIncidentServices() throws ApiException { + * Get a list of all incident services. + * + * See {@link #listIncidentServicesWithHttpInfo}. + * + * @return IncidentServicesResponse + * @throws ApiException if fails to make API call + */ + public IncidentServicesResponse listIncidentServices () throws ApiException { return listIncidentServicesWithHttpInfo(new ListIncidentServicesOptionalParameters()).getData(); } /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentServicesResponse> - */ - public CompletableFuture listIncidentServicesAsync() { - return listIncidentServicesWithHttpInfoAsync(new ListIncidentServicesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of all incident services. + * + * See {@link #listIncidentServicesWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentServicesResponse> + */ + public CompletableFuturelistIncidentServicesAsync() { + return listIncidentServicesWithHttpInfoAsync(new ListIncidentServicesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return IncidentServicesResponse - * @throws ApiException if fails to make API call - */ - public IncidentServicesResponse listIncidentServices( - ListIncidentServicesOptionalParameters parameters) throws ApiException { + * Get a list of all incident services. + * + * See {@link #listIncidentServicesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentServicesResponse + * @throws ApiException if fails to make API call + */ + public IncidentServicesResponse listIncidentServices(ListIncidentServicesOptionalParameters parameters) throws ApiException { return listIncidentServicesWithHttpInfo(parameters).getData(); } /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentServicesResponse> - */ - public CompletableFuture listIncidentServicesAsync( - ListIncidentServicesOptionalParameters parameters) { - return listIncidentServicesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of all incident services. + * + * See {@link #listIncidentServicesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentServicesResponse> + */ + public CompletableFuturelistIncidentServicesAsync(ListIncidentServicesOptionalParameters parameters) { + return listIncidentServicesWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all incident services uploaded for the requesting user's organization. If the - * include[users] query parameter is provided, the included attribute will contain the - * users related to these incident services. + *

Get all incident services uploaded for the requesting user's organization. If the include[users] query parameter is provided, the included attribute will contain the users related to these incident services.

* * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentServicesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -704,8 +579,7 @@ public CompletableFuture listIncidentServicesAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listIncidentServicesWithHttpInfo( - ListIncidentServicesOptionalParameters parameters) throws ApiException { + public ApiResponse listIncidentServicesWithHttpInfo(ListIncidentServicesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "listIncidentServices"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -721,6 +595,7 @@ public ApiResponse listIncidentServicesWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/services"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -729,44 +604,26 @@ public ApiResponse listIncidentServicesWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.listIncidentServices", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentServicesApi.listIncidentServices", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of all incident services. * - *

See {@link #listIncidentServicesWithHttpInfo}. + * See {@link #listIncidentServicesWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentServicesResponse>> */ - public CompletableFuture> - listIncidentServicesWithHttpInfoAsync(ListIncidentServicesOptionalParameters parameters) { + public CompletableFuture> listIncidentServicesWithHttpInfoAsync(ListIncidentServicesOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "listIncidentServices"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; @@ -777,6 +634,7 @@ public ApiResponse listIncidentServicesWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/services"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -787,74 +645,54 @@ public ApiResponse listIncidentServicesWithHttpInfo( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.listIncidentServices", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentServicesApi.listIncidentServices", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an existing incident service. - * - *

See {@link #updateIncidentServiceWithHttpInfo}. - * - * @param serviceId The ID of the incident service. (required) - * @param body Incident Service Payload. (required) - * @return IncidentServiceResponse - * @throws ApiException if fails to make API call - */ - public IncidentServiceResponse updateIncidentService( - String serviceId, IncidentServiceUpdateRequest body) throws ApiException { + * Update an existing incident service. + * + * See {@link #updateIncidentServiceWithHttpInfo}. + * + * @param serviceId The ID of the incident service. (required) + * @param body Incident Service Payload. (required) + * @return IncidentServiceResponse + * @throws ApiException if fails to make API call + */ + public IncidentServiceResponse updateIncidentService(String serviceId, IncidentServiceUpdateRequest body) throws ApiException { return updateIncidentServiceWithHttpInfo(serviceId, body).getData(); } /** - * Update an existing incident service. - * - *

See {@link #updateIncidentServiceWithHttpInfoAsync}. - * - * @param serviceId The ID of the incident service. (required) - * @param body Incident Service Payload. (required) - * @return CompletableFuture<IncidentServiceResponse> - */ - public CompletableFuture updateIncidentServiceAsync( - String serviceId, IncidentServiceUpdateRequest body) { - return updateIncidentServiceWithHttpInfoAsync(serviceId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an existing incident service. + * + * See {@link #updateIncidentServiceWithHttpInfoAsync}. + * + * @param serviceId The ID of the incident service. (required) + * @param body Incident Service Payload. (required) + * @return CompletableFuture<IncidentServiceResponse> + */ + public CompletableFutureupdateIncidentServiceAsync(String serviceId, IncidentServiceUpdateRequest body) { + return updateIncidentServiceWithHttpInfoAsync(serviceId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Updates an existing incident service. Only provide the attributes which should be updated as - * this request is a partial update. + *

Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update.

* * @param serviceId The ID of the incident service. (required) * @param body Incident Service Payload. (required) * @return ApiResponse<IncidentServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -865,8 +703,7 @@ public CompletableFuture updateIncidentServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateIncidentServiceWithHttpInfo( - String serviceId, IncidentServiceUpdateRequest body) throws ApiException { + public ApiResponse updateIncidentServiceWithHttpInfo(String serviceId, IncidentServiceUpdateRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "updateIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -878,114 +715,75 @@ public ApiResponse updateIncidentServiceWithHttpInfo( // verify the required parameter 'serviceId' is set if (serviceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceId' when calling updateIncidentService"); + throw new ApiException(400, "Missing the required parameter 'serviceId' when calling updateIncidentService"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentService"); } // create path and map variables - String localVarPath = - "/api/v2/services/{service_id}" - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/services/{service_id}" + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.updateIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentServicesApi.updateIncidentService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an existing incident service. * - *

See {@link #updateIncidentServiceWithHttpInfo}. + * See {@link #updateIncidentServiceWithHttpInfo}. * * @param serviceId The ID of the incident service. (required) * @param body Incident Service Payload. (required) * @return CompletableFuture<ApiResponse<IncidentServiceResponse>> */ - public CompletableFuture> - updateIncidentServiceWithHttpInfoAsync(String serviceId, IncidentServiceUpdateRequest body) { + public CompletableFuture> updateIncidentServiceWithHttpInfoAsync(String serviceId, IncidentServiceUpdateRequest body) { // Check if unstable operation is enabled String operationId = "updateIncidentService"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'serviceId' is set if (serviceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceId' when calling updateIncidentService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceId' when calling updateIncidentService")); + 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 updateIncidentService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/services/{service_id}" - .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + String localVarPath = "/api/v2/services/{service_id}" + .replaceAll("\\{" + "service_id" + "\\}", apiClient.escapeString(serviceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.updateIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentServicesApi.updateIncidentService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java b/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java index 72fc5c7840f..f357acc5ff3 100644 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java @@ -1,27 +1,34 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.IncidentRelatedObject; -import com.datadog.api.client.v2.model.IncidentTeamCreateRequest; -import com.datadog.api.client.v2.model.IncidentTeamResponse; -import com.datadog.api.client.v2.model.IncidentTeamUpdateRequest; -import com.datadog.api.client.v2.model.IncidentTeamsResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.IncidentTeamsResponse; +import com.datadog.api.client.v2.model.IncidentRelatedObject; +import com.datadog.api.client.v2.model.IncidentTeamResponse; +import com.datadog.api.client.v2.model.IncidentTeamCreateRequest; +import com.datadog.api.client.v2.model.IncidentTeamUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamsApi { private ApiClient apiClient; - public IncidentTeamsApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,44 +56,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a new incident team. - * - *

See {@link #createIncidentTeamWithHttpInfo}. - * - * @param body Incident Team Payload. (required) - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - */ - public IncidentTeamResponse createIncidentTeam(IncidentTeamCreateRequest body) - throws ApiException { + * Create a new incident team. + * + * See {@link #createIncidentTeamWithHttpInfo}. + * + * @param body Incident Team Payload. (required) + * @return IncidentTeamResponse + * @throws ApiException if fails to make API call + */ + public IncidentTeamResponse createIncidentTeam(IncidentTeamCreateRequest body) throws ApiException { return createIncidentTeamWithHttpInfo(body).getData(); } /** - * Create a new incident team. - * - *

See {@link #createIncidentTeamWithHttpInfoAsync}. - * - * @param body Incident Team Payload. (required) - * @return CompletableFuture<IncidentTeamResponse> - */ - public CompletableFuture createIncidentTeamAsync( - IncidentTeamCreateRequest body) { - return createIncidentTeamWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new incident team. + * + * See {@link #createIncidentTeamWithHttpInfoAsync}. + * + * @param body Incident Team Payload. (required) + * @return CompletableFuture<IncidentTeamResponse> + */ + public CompletableFuturecreateIncidentTeamAsync(IncidentTeamCreateRequest body) { + return createIncidentTeamWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Creates a new incident team. + *

Creates a new incident team.

* * @param body Incident Team Payload. (required) * @return ApiResponse<IncidentTeamResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,8 +101,7 @@ public CompletableFuture createIncidentTeamAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createIncidentTeamWithHttpInfo( - IncidentTeamCreateRequest body) throws ApiException { + public ApiResponse createIncidentTeamWithHttpInfo(IncidentTeamCreateRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "createIncidentTeam"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -110,132 +113,98 @@ public ApiResponse createIncidentTeamWithHttpInfo( // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentTeam"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createIncidentTeam"); } // create path and map variables String localVarPath = "/api/v2/teams"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.createIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentTeamsApi.createIncidentTeam", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new incident team. * - *

See {@link #createIncidentTeamWithHttpInfo}. + * See {@link #createIncidentTeamWithHttpInfo}. * * @param body Incident Team Payload. (required) * @return CompletableFuture<ApiResponse<IncidentTeamResponse>> */ - public CompletableFuture> createIncidentTeamWithHttpInfoAsync( - IncidentTeamCreateRequest body) { + public CompletableFuture> createIncidentTeamWithHttpInfoAsync(IncidentTeamCreateRequest body) { // Check if unstable operation is enabled String operationId = "createIncidentTeam"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentTeam")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createIncidentTeam")); + return result; } // create path and map variables String localVarPath = "/api/v2/teams"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.createIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentTeamsApi.createIncidentTeam", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an existing incident team. - * - *

See {@link #deleteIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @throws ApiException if fails to make API call - */ - public void deleteIncidentTeam(String teamId) throws ApiException { + * Delete an existing incident team. + * + * See {@link #deleteIncidentTeamWithHttpInfo}. + * + * @param teamId The ID of the incident team. (required) + * @throws ApiException if fails to make API call + */ + public void deleteIncidentTeam(String teamId) throws ApiException { deleteIncidentTeamWithHttpInfo(teamId); } /** - * Delete an existing incident team. - * - *

See {@link #deleteIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteIncidentTeamAsync(String teamId) { - return deleteIncidentTeamWithHttpInfoAsync(teamId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an existing incident team. + * + * See {@link #deleteIncidentTeamWithHttpInfoAsync}. + * + * @param teamId The ID of the incident team. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteIncidentTeamAsync(String teamId) { + return deleteIncidentTeamWithHttpInfoAsync(teamId).thenApply(response -> { + return response.getData(); + }); } + /** - * Deletes an existing incident team. + *

Deletes an existing incident team.

* * @param teamId The ID of the incident team. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -258,40 +227,24 @@ public ApiResponse deleteIncidentTeamWithHttpInfo(String teamId) throws Ap // verify the required parameter 'teamId' is set if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling deleteIncidentTeam"); + throw new ApiException(400, "Missing the required parameter 'teamId' when calling deleteIncidentTeam"); } // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + String localVarPath = "/api/v2/teams/{team_id}" + .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.deleteIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentTeamsApi.deleteIncidentTeam", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an existing incident team. * - *

See {@link #deleteIncidentTeamWithHttpInfo}. + * See {@link #deleteIncidentTeamWithHttpInfo}. * * @param teamId The ID of the incident team. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -303,63 +256,45 @@ public CompletableFuture> deleteIncidentTeamWithHttpInfoAsync( apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'teamId' is set if (teamId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'teamId' when calling deleteIncidentTeam")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'teamId' when calling deleteIncidentTeam")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + String localVarPath = "/api/v2/teams/{team_id}" + .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.deleteIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentTeamsApi.deleteIncidentTeam", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } - /** Manage optional parameters to getIncidentTeam. */ + /** + * Manage optional parameters to getIncidentTeam. + */ public static class GetIncidentTeamOptionalParameters { private IncidentRelatedObject include; /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return GetIncidentTeamOptionalParameters */ public GetIncidentTeamOptionalParameters include(IncidentRelatedObject include) { @@ -369,77 +304,72 @@ public GetIncidentTeamOptionalParameters include(IncidentRelatedObject include) } /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - */ - public IncidentTeamResponse getIncidentTeam(String teamId) throws ApiException { - return getIncidentTeamWithHttpInfo(teamId, new GetIncidentTeamOptionalParameters()).getData(); + * Get details of an incident team. + * + * See {@link #getIncidentTeamWithHttpInfo}. + * + * @param teamId The ID of the incident team. (required) + * @return IncidentTeamResponse + * @throws ApiException if fails to make API call + */ + public IncidentTeamResponse getIncidentTeam (String teamId) throws ApiException { + return getIncidentTeamWithHttpInfo( teamId, new GetIncidentTeamOptionalParameters()).getData(); } /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @return CompletableFuture<IncidentTeamResponse> - */ - public CompletableFuture getIncidentTeamAsync(String teamId) { - return getIncidentTeamWithHttpInfoAsync(teamId, new GetIncidentTeamOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get details of an incident team. + * + * See {@link #getIncidentTeamWithHttpInfoAsync}. + * + * @param teamId The ID of the incident team. (required) + * @return CompletableFuture<IncidentTeamResponse> + */ + public CompletableFuturegetIncidentTeamAsync(String teamId) { + return getIncidentTeamWithHttpInfoAsync(teamId, new GetIncidentTeamOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @param parameters Optional parameters for the request. - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - */ - public IncidentTeamResponse getIncidentTeam( - String teamId, GetIncidentTeamOptionalParameters parameters) throws ApiException { + * Get details of an incident team. + * + * See {@link #getIncidentTeamWithHttpInfo}. + * + * @param teamId The ID of the incident team. (required) + * @param parameters Optional parameters for the request. + * @return IncidentTeamResponse + * @throws ApiException if fails to make API call + */ + public IncidentTeamResponse getIncidentTeam(String teamId, GetIncidentTeamOptionalParameters parameters) throws ApiException { return getIncidentTeamWithHttpInfo(teamId, parameters).getData(); } /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentTeamResponse> - */ - public CompletableFuture getIncidentTeamAsync( - String teamId, GetIncidentTeamOptionalParameters parameters) { - return getIncidentTeamWithHttpInfoAsync(teamId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get details of an incident team. + * + * See {@link #getIncidentTeamWithHttpInfoAsync}. + * + * @param teamId The ID of the incident team. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentTeamResponse> + */ + public CompletableFuturegetIncidentTeamAsync( String teamId, GetIncidentTeamOptionalParameters parameters) { + return getIncidentTeamWithHttpInfoAsync(teamId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get details of an incident team. If the include[users] query parameter is - * provided, the included attribute will contain the users related to these incident teams. + *

Get details of an incident team. If the include[users] query parameter is provided, + * the included attribute will contain the users related to these incident teams.

* * @param teamId The ID of the incident team. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentTeamResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -450,8 +380,7 @@ public CompletableFuture getIncidentTeamAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getIncidentTeamWithHttpInfo( - String teamId, GetIncidentTeamOptionalParameters parameters) throws ApiException { + public ApiResponse getIncidentTeamWithHttpInfo(String teamId, GetIncidentTeamOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "getIncidentTeam"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -463,77 +392,56 @@ public ApiResponse getIncidentTeamWithHttpInfo( // verify the required parameter 'teamId' is set if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling getIncidentTeam"); + throw new ApiException(400, "Missing the required parameter 'teamId' when calling getIncidentTeam"); } IncidentRelatedObject include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + String localVarPath = "/api/v2/teams/{team_id}" + .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.getIncidentTeam", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentTeamsApi.getIncidentTeam", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get details of an incident team. * - *

See {@link #getIncidentTeamWithHttpInfo}. + * See {@link #getIncidentTeamWithHttpInfo}. * * @param teamId The ID of the incident team. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentTeamResponse>> */ - public CompletableFuture> getIncidentTeamWithHttpInfoAsync( - String teamId, GetIncidentTeamOptionalParameters parameters) { + public CompletableFuture> getIncidentTeamWithHttpInfoAsync(String teamId, GetIncidentTeamOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "getIncidentTeam"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'teamId' is set if (teamId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'teamId' when calling getIncidentTeam")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'teamId' when calling getIncidentTeam")); + return result; } IncidentRelatedObject include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + String localVarPath = "/api/v2/teams/{team_id}" + .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -541,32 +449,18 @@ public CompletableFuture> getIncidentTeamWithH Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.getIncidentTeam", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentTeamsApi.getIncidentTeam", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listIncidentTeams. */ + /** + * Manage optional parameters to listIncidentTeams. + */ public static class ListIncidentTeamsOptionalParameters { private IncidentRelatedObject include; private Long pageSize; @@ -575,9 +469,7 @@ public static class ListIncidentTeamsOptionalParameters { /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return ListIncidentTeamsOptionalParameters */ public ListIncidentTeamsOptionalParameters include(IncidentRelatedObject include) { @@ -587,9 +479,7 @@ public ListIncidentTeamsOptionalParameters include(IncidentRelatedObject include /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListIncidentTeamsOptionalParameters */ public ListIncidentTeamsOptionalParameters pageSize(Long pageSize) { @@ -599,9 +489,7 @@ public ListIncidentTeamsOptionalParameters pageSize(Long pageSize) { /** * Set pageOffset. - * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) + * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, default to 0) * @return ListIncidentTeamsOptionalParameters */ public ListIncidentTeamsOptionalParameters pageOffset(Long pageOffset) { @@ -611,7 +499,6 @@ public ListIncidentTeamsOptionalParameters pageOffset(Long pageOffset) { /** * Set filter. - * * @param filter A search query that filters teams by name. (optional) * @return ListIncidentTeamsOptionalParameters */ @@ -622,73 +509,66 @@ public ListIncidentTeamsOptionalParameters filter(String filter) { } /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfo}. - * - * @return IncidentTeamsResponse - * @throws ApiException if fails to make API call - */ - public IncidentTeamsResponse listIncidentTeams() throws ApiException { + * Get a list of all incident teams. + * + * See {@link #listIncidentTeamsWithHttpInfo}. + * + * @return IncidentTeamsResponse + * @throws ApiException if fails to make API call + */ + public IncidentTeamsResponse listIncidentTeams () throws ApiException { return listIncidentTeamsWithHttpInfo(new ListIncidentTeamsOptionalParameters()).getData(); } /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentTeamsResponse> - */ - public CompletableFuture listIncidentTeamsAsync() { - return listIncidentTeamsWithHttpInfoAsync(new ListIncidentTeamsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of all incident teams. + * + * See {@link #listIncidentTeamsWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentTeamsResponse> + */ + public CompletableFuturelistIncidentTeamsAsync() { + return listIncidentTeamsWithHttpInfoAsync(new ListIncidentTeamsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return IncidentTeamsResponse - * @throws ApiException if fails to make API call - */ - public IncidentTeamsResponse listIncidentTeams(ListIncidentTeamsOptionalParameters parameters) - throws ApiException { + * Get a list of all incident teams. + * + * See {@link #listIncidentTeamsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentTeamsResponse + * @throws ApiException if fails to make API call + */ + public IncidentTeamsResponse listIncidentTeams(ListIncidentTeamsOptionalParameters parameters) throws ApiException { return listIncidentTeamsWithHttpInfo(parameters).getData(); } /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentTeamsResponse> - */ - public CompletableFuture listIncidentTeamsAsync( - ListIncidentTeamsOptionalParameters parameters) { - return listIncidentTeamsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of all incident teams. + * + * See {@link #listIncidentTeamsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentTeamsResponse> + */ + public CompletableFuturelistIncidentTeamsAsync(ListIncidentTeamsOptionalParameters parameters) { + return listIncidentTeamsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get all incident teams for the requesting user's organization. If the include[users] - * query parameter is provided, the included attribute will contain the users related to - * these incident teams. + *

Get all incident teams for the requesting user's organization. If the include[users] query parameter is provided, the included attribute will contain the users related to these incident teams.

* * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentTeamsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -699,8 +579,7 @@ public CompletableFuture listIncidentTeamsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listIncidentTeamsWithHttpInfo( - ListIncidentTeamsOptionalParameters parameters) throws ApiException { + public ApiResponse listIncidentTeamsWithHttpInfo(ListIncidentTeamsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "listIncidentTeams"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -716,6 +595,7 @@ public ApiResponse listIncidentTeamsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/teams"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -724,44 +604,26 @@ public ApiResponse listIncidentTeamsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.listIncidentTeams", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentTeamsApi.listIncidentTeams", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of all incident teams. * - *

See {@link #listIncidentTeamsWithHttpInfo}. + * See {@link #listIncidentTeamsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentTeamsResponse>> */ - public CompletableFuture> listIncidentTeamsWithHttpInfoAsync( - ListIncidentTeamsOptionalParameters parameters) { + public CompletableFuture> listIncidentTeamsWithHttpInfoAsync(ListIncidentTeamsOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "listIncidentTeams"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; @@ -772,6 +634,7 @@ public CompletableFuture> listIncidentTeamsWi // create path and map variables String localVarPath = "/api/v2/teams"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -782,74 +645,54 @@ public CompletableFuture> listIncidentTeamsWi Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.listIncidentTeams", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentTeamsApi.listIncidentTeams", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an existing incident team. - * - *

See {@link #updateIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @param body Incident Team Payload. (required) - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - */ - public IncidentTeamResponse updateIncidentTeam(String teamId, IncidentTeamUpdateRequest body) - throws ApiException { + * Update an existing incident team. + * + * See {@link #updateIncidentTeamWithHttpInfo}. + * + * @param teamId The ID of the incident team. (required) + * @param body Incident Team Payload. (required) + * @return IncidentTeamResponse + * @throws ApiException if fails to make API call + */ + public IncidentTeamResponse updateIncidentTeam(String teamId, IncidentTeamUpdateRequest body) throws ApiException { return updateIncidentTeamWithHttpInfo(teamId, body).getData(); } /** - * Update an existing incident team. - * - *

See {@link #updateIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @param body Incident Team Payload. (required) - * @return CompletableFuture<IncidentTeamResponse> - */ - public CompletableFuture updateIncidentTeamAsync( - String teamId, IncidentTeamUpdateRequest body) { - return updateIncidentTeamWithHttpInfoAsync(teamId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an existing incident team. + * + * See {@link #updateIncidentTeamWithHttpInfoAsync}. + * + * @param teamId The ID of the incident team. (required) + * @param body Incident Team Payload. (required) + * @return CompletableFuture<IncidentTeamResponse> + */ + public CompletableFutureupdateIncidentTeamAsync(String teamId, IncidentTeamUpdateRequest body) { + return updateIncidentTeamWithHttpInfoAsync(teamId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Updates an existing incident team. Only provide the attributes which should be updated as this - * request is a partial update. + *

Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update.

* * @param teamId The ID of the incident team. (required) * @param body Incident Team Payload. (required) * @return ApiResponse<IncidentTeamResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -860,8 +703,7 @@ public CompletableFuture updateIncidentTeamAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateIncidentTeamWithHttpInfo( - String teamId, IncidentTeamUpdateRequest body) throws ApiException { + public ApiResponse updateIncidentTeamWithHttpInfo(String teamId, IncidentTeamUpdateRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "updateIncidentTeam"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -873,113 +715,75 @@ public ApiResponse updateIncidentTeamWithHttpInfo( // verify the required parameter 'teamId' is set if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling updateIncidentTeam"); + throw new ApiException(400, "Missing the required parameter 'teamId' when calling updateIncidentTeam"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentTeam"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentTeam"); } // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + String localVarPath = "/api/v2/teams/{team_id}" + .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.updateIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentTeamsApi.updateIncidentTeam", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an existing incident team. * - *

See {@link #updateIncidentTeamWithHttpInfo}. + * See {@link #updateIncidentTeamWithHttpInfo}. * * @param teamId The ID of the incident team. (required) * @param body Incident Team Payload. (required) * @return CompletableFuture<ApiResponse<IncidentTeamResponse>> */ - public CompletableFuture> updateIncidentTeamWithHttpInfoAsync( - String teamId, IncidentTeamUpdateRequest body) { + public CompletableFuture> updateIncidentTeamWithHttpInfoAsync(String teamId, IncidentTeamUpdateRequest body) { // Check if unstable operation is enabled String operationId = "updateIncidentTeam"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'teamId' is set if (teamId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'teamId' when calling updateIncidentTeam")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'teamId' when calling updateIncidentTeam")); + 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 updateIncidentTeam")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentTeam")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + String localVarPath = "/api/v2/teams/{team_id}" + .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.updateIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentTeamsApi.updateIncidentTeam", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java b/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java index ceab99c4cfb..0460964025c 100644 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java @@ -1,37 +1,46 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.IncidentAttachmentAttachmentType; -import com.datadog.api.client.v2.model.IncidentAttachmentRelatedObject; -import com.datadog.api.client.v2.model.IncidentAttachmentUpdateRequest; -import com.datadog.api.client.v2.model.IncidentAttachmentUpdateResponse; -import com.datadog.api.client.v2.model.IncidentAttachmentsResponse; -import com.datadog.api.client.v2.model.IncidentCreateRequest; -import com.datadog.api.client.v2.model.IncidentRelatedObject; -import com.datadog.api.client.v2.model.IncidentResponse; -import com.datadog.api.client.v2.model.IncidentResponseData; -import com.datadog.api.client.v2.model.IncidentSearchResponse; -import com.datadog.api.client.v2.model.IncidentSearchSortOrder; -import com.datadog.api.client.v2.model.IncidentUpdateRequest; -import com.datadog.api.client.v2.model.IncidentsResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.IncidentsResponse; +import com.datadog.api.client.v2.model.IncidentRelatedObject; +import com.datadog.api.client.v2.model.IncidentResponse; +import com.datadog.api.client.v2.model.IncidentCreateRequest; +import com.datadog.api.client.v2.model.IncidentSearchResponse; +import com.datadog.api.client.v2.model.IncidentSearchSortOrder; +import com.datadog.api.client.v2.model.IncidentUpdateRequest; +import com.datadog.api.client.v2.model.IncidentAttachmentsResponse; +import com.datadog.api.client.v2.model.IncidentAttachmentRelatedObject; +import com.datadog.api.client.v2.model.IncidentAttachmentAttachmentType; +import com.datadog.api.client.v2.model.IncidentAttachmentUpdateResponse; +import com.datadog.api.client.v2.model.IncidentAttachmentUpdateRequest; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataListResponse; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataResponse; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataCreateRequest; +import com.datadog.api.client.v2.model.IncidentIntegrationMetadataPatchRequest; +import com.datadog.api.client.v2.model.IncidentResponseData; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentsApi { private ApiClient apiClient; - public IncidentsApi() { this(ApiClient.getDefaultApiClient()); } @@ -59,42 +68,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an incident. - * - *

See {@link #createIncidentWithHttpInfo}. - * - * @param body Incident payload. (required) - * @return IncidentResponse - * @throws ApiException if fails to make API call - */ - public IncidentResponse createIncident(IncidentCreateRequest body) throws ApiException { + * Create an incident. + * + * See {@link #createIncidentWithHttpInfo}. + * + * @param body Incident payload. (required) + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse createIncident(IncidentCreateRequest body) throws ApiException { return createIncidentWithHttpInfo(body).getData(); } /** - * Create an incident. - * - *

See {@link #createIncidentWithHttpInfoAsync}. - * - * @param body Incident payload. (required) - * @return CompletableFuture<IncidentResponse> - */ - public CompletableFuture createIncidentAsync(IncidentCreateRequest body) { - return createIncidentWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an incident. + * + * See {@link #createIncidentWithHttpInfoAsync}. + * + * @param body Incident payload. (required) + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFuturecreateIncidentAsync(IncidentCreateRequest body) { + return createIncidentWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an incident. + *

Create an incident.

* * @param body Incident payload. (required) * @return ApiResponse<IncidentResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -105,8 +113,7 @@ public CompletableFuture createIncidentAsync(IncidentCreateReq * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createIncidentWithHttpInfo(IncidentCreateRequest body) - throws ApiException { + public ApiResponse createIncidentWithHttpInfo(IncidentCreateRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "createIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -118,132 +125,231 @@ public ApiResponse createIncidentWithHttpInfo(IncidentCreateRe // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncident"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createIncident"); } // create path and map variables String localVarPath = "/api/v2/incidents"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.createIncident", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.createIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an incident. * - *

See {@link #createIncidentWithHttpInfo}. + * See {@link #createIncidentWithHttpInfo}. * * @param body Incident payload. (required) * @return CompletableFuture<ApiResponse<IncidentResponse>> */ - public CompletableFuture> createIncidentWithHttpInfoAsync( - IncidentCreateRequest body) { + public CompletableFuture> createIncidentWithHttpInfoAsync(IncidentCreateRequest body) { // Check if unstable operation is enabled String operationId = "createIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createIncident")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createIncident")); + return result; } // create path and map variables String localVarPath = "/api/v2/incidents"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.createIncident", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.createIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an existing incident. - * - *

See {@link #deleteIncidentWithHttpInfo}. + * Create an incident integration metadata. + * + * See {@link #createIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return IncidentIntegrationMetadataResponse + * @throws ApiException if fails to make API call + */ + public IncidentIntegrationMetadataResponse createIncidentIntegration(String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { + return createIncidentIntegrationWithHttpInfo(incidentId, body).getData(); + } + + /** + * Create an incident integration metadata. + * + * See {@link #createIncidentIntegrationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> + */ + public CompletableFuturecreateIncidentIntegrationAsync(String incidentId, IncidentIntegrationMetadataCreateRequest body) { + return createIncidentIntegrationWithHttpInfoAsync(incidentId, body).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Create an incident integration metadata.

* * @param incidentId The UUID of the incident. (required) + * @param body Incident integration metadata payload. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public void deleteIncident(String incidentId) throws ApiException { - deleteIncidentWithHttpInfo(incidentId); + public ApiResponse createIncidentIntegrationWithHttpInfo(String incidentId, IncidentIntegrationMetadataCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling createIncidentIntegration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling createIncidentIntegration"); + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.createIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an existing incident. + * Create an incident integration metadata. * - *

See {@link #deleteIncidentWithHttpInfoAsync}. + * See {@link #createIncidentIntegrationWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> */ - public CompletableFuture deleteIncidentAsync(String incidentId) { - return deleteIncidentWithHttpInfoAsync(incidentId) - .thenApply( - response -> { - return response.getData(); - }); + public CompletableFuture> createIncidentIntegrationWithHttpInfoAsync(String incidentId, IncidentIntegrationMetadataCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling createIncidentIntegration")); + 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 createIncidentIntegration")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder; + try { + builder = apiClient.createBuilder("v2.IncidentsApi.createIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Delete an existing incident. + * + * See {@link #deleteIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @throws ApiException if fails to make API call + */ + public void deleteIncident(String incidentId) throws ApiException { + deleteIncidentWithHttpInfo(incidentId); } /** - * Deletes an existing incident from the users organization. + * Delete an existing incident. + * + * See {@link #deleteIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteIncidentAsync(String incidentId) { + return deleteIncidentWithHttpInfoAsync(incidentId).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Deletes an existing incident from the users organization.

* * @param incidentId The UUID of the incident. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -266,41 +372,24 @@ public ApiResponse deleteIncidentWithHttpInfo(String incidentId) throws Ap // verify the required parameter 'incidentId' is set if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncident"); + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling deleteIncident"); } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.deleteIncident", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.deleteIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an existing incident. * - *

See {@link #deleteIncidentWithHttpInfo}. + * See {@link #deleteIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -312,64 +401,179 @@ public CompletableFuture> deleteIncidentWithHttpInfoAsync(Stri apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling deleteIncident")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder; + try { + builder = apiClient.createBuilder("v2.IncidentsApi.deleteIncident", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + } 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 an incident integration metadata. + * + * See {@link #deleteIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @throws ApiException if fails to make API call + */ + public void deleteIncidentIntegration(String incidentId, String integrationMetadataId) throws ApiException { + deleteIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId); + } + + /** + * Delete an incident integration metadata. + * + * See {@link #deleteIncidentIntegrationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteIncidentIntegrationAsync(String incidentId, String integrationMetadataId) { + return deleteIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Delete an incident integration metadata.

+ * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + *
Response details
Status Code Description Response Headers
204 OK -
+ * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteIncidentIntegrationWithHttpInfo(String incidentId, String integrationMetadataId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling deleteIncidentIntegration"); + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + throw new ApiException(400, "Missing the required parameter 'integrationMetadataId' when calling deleteIncidentIntegration"); + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "integration_metadata_id" + "\\}", apiClient.escapeString(integrationMetadataId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.deleteIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); + } + + /** + * Delete an incident integration metadata. + * + * See {@link #deleteIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId) { + // Check if unstable operation is enabled + String operationId = "deleteIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'incidentId' when calling deleteIncident")); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling deleteIncidentIntegration")); + return result; + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'integrationMetadataId' when calling deleteIncidentIntegration")); + return result; + } // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "integration_metadata_id" + "\\}", apiClient.escapeString(integrationMetadataId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.deleteIncident", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.deleteIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } - /** Manage optional parameters to getIncident. */ + /** + * Manage optional parameters to getIncident. + */ public static class GetIncidentOptionalParameters { private List include; /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return GetIncidentOptionalParameters */ public GetIncidentOptionalParameters include(List include) { @@ -379,76 +583,71 @@ public GetIncidentOptionalParameters include(List include } /** - * Get the details of an incident. - * - *

See {@link #getIncidentWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @return IncidentResponse - * @throws ApiException if fails to make API call - */ - public IncidentResponse getIncident(String incidentId) throws ApiException { - return getIncidentWithHttpInfo(incidentId, new GetIncidentOptionalParameters()).getData(); + * Get the details of an incident. + * + * See {@link #getIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse getIncident (String incidentId) throws ApiException { + return getIncidentWithHttpInfo( incidentId, new GetIncidentOptionalParameters()).getData(); } /** - * Get the details of an incident. - * - *

See {@link #getIncidentWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentResponse> - */ - public CompletableFuture getIncidentAsync(String incidentId) { - return getIncidentWithHttpInfoAsync(incidentId, new GetIncidentOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get the details of an incident. + * + * See {@link #getIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFuturegetIncidentAsync(String incidentId) { + return getIncidentWithHttpInfoAsync(incidentId, new GetIncidentOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get the details of an incident. - * - *

See {@link #getIncidentWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return IncidentResponse - * @throws ApiException if fails to make API call - */ - public IncidentResponse getIncident(String incidentId, GetIncidentOptionalParameters parameters) - throws ApiException { + * Get the details of an incident. + * + * See {@link #getIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse getIncident(String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { return getIncidentWithHttpInfo(incidentId, parameters).getData(); } /** - * Get the details of an incident. - * - *

See {@link #getIncidentWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentResponse> - */ - public CompletableFuture getIncidentAsync( - String incidentId, GetIncidentOptionalParameters parameters) { - return getIncidentWithHttpInfoAsync(incidentId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get the details of an incident. + * + * See {@link #getIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFuturegetIncidentAsync( String incidentId, GetIncidentOptionalParameters parameters) { + return getIncidentWithHttpInfoAsync(incidentId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the details of an incident by incident_id. + *

Get the details of an incident by incident_id.

* * @param incidentId The UUID of the incident. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -459,8 +658,7 @@ public CompletableFuture getIncidentAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getIncidentWithHttpInfo( - String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { + public ApiResponse getIncidentWithHttpInfo(String incidentId, GetIncidentOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "getIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -472,79 +670,56 @@ public ApiResponse getIncidentWithHttpInfo( // verify the required parameter 'incidentId' is set if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncident"); + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling getIncident"); } List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.getIncident", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.getIncident", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the details of an incident. * - *

See {@link #getIncidentWithHttpInfo}. + * See {@link #getIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentResponse>> */ - public CompletableFuture> getIncidentWithHttpInfoAsync( - String incidentId, GetIncidentOptionalParameters parameters) { + public CompletableFuture> getIncidentWithHttpInfoAsync(String incidentId, GetIncidentOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "getIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'incidentId' when calling getIncident")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling getIncident")); + return result; } List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -552,139 +727,372 @@ public CompletableFuture> getIncidentWithHttpInfoA Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.getIncident", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.getIncident", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Get incident integration metadata details. + * + * See {@link #getIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return IncidentIntegrationMetadataResponse + * @throws ApiException if fails to make API call + */ + public IncidentIntegrationMetadataResponse getIncidentIntegration(String incidentId, String integrationMetadataId) throws ApiException { + return getIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId).getData(); + } + + /** + * Get incident integration metadata details. + * + * See {@link #getIncidentIntegrationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> + */ + public CompletableFuturegetIncidentIntegrationAsync(String incidentId, String integrationMetadataId) { + return getIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get incident integration metadata details.

+ * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getIncidentIntegrationWithHttpInfo(String incidentId, String integrationMetadataId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling getIncidentIntegration"); + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + throw new ApiException(400, "Missing the required parameter 'integrationMetadataId' when calling getIncidentIntegration"); + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "integration_metadata_id" + "\\}", apiClient.escapeString(integrationMetadataId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.getIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Get incident integration metadata details. + * + * See {@link #getIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + */ + public CompletableFuture> getIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId) { + // Check if unstable operation is enabled + String operationId = "getIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling getIncidentIntegration")); + return result; + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'integrationMetadataId' when calling getIncidentIntegration")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "integration_metadata_id" + "\\}", apiClient.escapeString(integrationMetadataId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder; + try { + builder = apiClient.createBuilder("v2.IncidentsApi.getIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listIncidentAttachments. */ + /** + * Manage optional parameters to listIncidentAttachments. + */ public static class ListIncidentAttachmentsOptionalParameters { private List include; private List filterAttachmentType; /** * Set include. - * - * @param include Specifies which types of related objects are included in the response. - * (optional) + * @param include Specifies which types of related objects are included in the response. (optional) * @return ListIncidentAttachmentsOptionalParameters */ - public ListIncidentAttachmentsOptionalParameters include( - List include) { + public ListIncidentAttachmentsOptionalParameters include(List include) { this.include = include; return this; } /** * Set filterAttachmentType. - * - * @param filterAttachmentType Specifies which types of attachments are included in the - * response. (optional) + * @param filterAttachmentType Specifies which types of attachments are included in the response. (optional) * @return ListIncidentAttachmentsOptionalParameters */ - public ListIncidentAttachmentsOptionalParameters filterAttachmentType( - List filterAttachmentType) { + public ListIncidentAttachmentsOptionalParameters filterAttachmentType(List filterAttachmentType) { this.filterAttachmentType = filterAttachmentType; return this; } } /** - * Get a list of attachments. - * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @return IncidentAttachmentsResponse - * @throws ApiException if fails to make API call - */ - public IncidentAttachmentsResponse listIncidentAttachments(String incidentId) - throws ApiException { - return listIncidentAttachmentsWithHttpInfo( - incidentId, new ListIncidentAttachmentsOptionalParameters()) - .getData(); - } - - /** - * Get a list of attachments. - * - *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @return CompletableFuture<IncidentAttachmentsResponse> - */ - public CompletableFuture listIncidentAttachmentsAsync( - String incidentId) { - return listIncidentAttachmentsWithHttpInfoAsync( - incidentId, new ListIncidentAttachmentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of attachments. + * + * See {@link #listIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentAttachmentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentAttachmentsResponse listIncidentAttachments (String incidentId) throws ApiException { + return listIncidentAttachmentsWithHttpInfo( incidentId, new ListIncidentAttachmentsOptionalParameters()).getData(); + } + + /** + * Get a list of attachments. + * + * See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentAttachmentsResponse> + */ + public CompletableFuturelistIncidentAttachmentsAsync(String incidentId) { + return listIncidentAttachmentsWithHttpInfoAsync(incidentId, new ListIncidentAttachmentsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Get a list of attachments. + * + * See {@link #listIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return IncidentAttachmentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentAttachmentsResponse listIncidentAttachments(String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + return listIncidentAttachmentsWithHttpInfo(incidentId, parameters).getData(); + } + + /** + * Get a list of attachments. + * + * See {@link #listIncidentAttachmentsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentAttachmentsResponse> + */ + public CompletableFuturelistIncidentAttachmentsAsync( String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + return listIncidentAttachmentsWithHttpInfoAsync(incidentId, parameters).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Get all attachments for a given incident.

+ * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<IncidentAttachmentsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listIncidentAttachmentsWithHttpInfo(String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listIncidentAttachments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling listIncidentAttachments"); + } + List include = parameters.include; + List filterAttachmentType = parameters.filterAttachmentType; + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/attachments" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "filter[attachment_type]", filterAttachmentType)); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.listIncidentAttachments", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Get a list of attachments. + * + * See {@link #listIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<IncidentAttachmentsResponse>> + */ + public CompletableFuture> listIncidentAttachmentsWithHttpInfoAsync(String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listIncidentAttachments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling listIncidentAttachments")); + return result; + } + List include = parameters.include; + List filterAttachmentType = parameters.filterAttachmentType; + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/attachments" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "filter[attachment_type]", filterAttachmentType)); + + Invocation.Builder builder; + try { + builder = apiClient.createBuilder("v2.IncidentsApi.listIncidentAttachments", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Get a list of an incident's integration metadata. + * + * See {@link #listIncidentIntegrationsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @return IncidentIntegrationMetadataListResponse + * @throws ApiException if fails to make API call + */ + public IncidentIntegrationMetadataListResponse listIncidentIntegrations(String incidentId) throws ApiException { + return listIncidentIntegrationsWithHttpInfo(incidentId).getData(); } /** - * Get a list of attachments. - * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return IncidentAttachmentsResponse - * @throws ApiException if fails to make API call - */ - public IncidentAttachmentsResponse listIncidentAttachments( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { - return listIncidentAttachmentsWithHttpInfo(incidentId, parameters).getData(); + * Get a list of an incident's integration metadata. + * + * See {@link #listIncidentIntegrationsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @return CompletableFuture<IncidentIntegrationMetadataListResponse> + */ + public CompletableFuturelistIncidentIntegrationsAsync(String incidentId) { + return listIncidentIntegrationsWithHttpInfoAsync(incidentId).thenApply(response -> { + return response.getData(); + }); } - /** - * Get a list of attachments. - * - *

See {@link #listIncidentAttachmentsWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentAttachmentsResponse> - */ - public CompletableFuture listIncidentAttachmentsAsync( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { - return listIncidentAttachmentsWithHttpInfoAsync(incidentId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } /** - * Get all attachments for a given incident. + *

Get all integration metadata for an incident.

* * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentAttachmentsResponse> + * @return ApiResponse<IncidentIntegrationMetadataListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -695,10 +1103,9 @@ public CompletableFuture listIncidentAttachmentsAsy * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listIncidentAttachmentsWithHttpInfo( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) throws ApiException { + public ApiResponse listIncidentIntegrationsWithHttpInfo(String incidentId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listIncidentAttachments"; + String operationId = "listIncidentIntegrations"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -708,123 +1115,68 @@ public ApiResponse listIncidentAttachmentsWithHttpI // verify the required parameter 'incidentId' is set if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling listIncidentAttachments"); + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling listIncidentIntegrations"); } - List include = parameters.include; - List filterAttachmentType = parameters.filterAttachmentType; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("csv", "filter[attachment_type]", filterAttachmentType)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.listIncidentAttachments", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.listIncidentIntegrations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a list of attachments. + * Get a list of an incident's integration metadata. * - *

See {@link #listIncidentAttachmentsWithHttpInfo}. + * See {@link #listIncidentIntegrationsWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentAttachmentsResponse>> + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataListResponse>> */ - public CompletableFuture> - listIncidentAttachmentsWithHttpInfoAsync( - String incidentId, ListIncidentAttachmentsOptionalParameters parameters) { + public CompletableFuture> listIncidentIntegrationsWithHttpInfoAsync(String incidentId) { // Check if unstable operation is enabled - String operationId = "listIncidentAttachments"; + String operationId = "listIncidentIntegrations"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling listIncidentAttachments")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling listIncidentIntegrations")); + return result; } - List include = parameters.include; - List filterAttachmentType = parameters.filterAttachmentType; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); - List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("csv", "filter[attachment_type]", filterAttachmentType)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.listIncidentAttachments", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.listIncidentIntegrations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listIncidents. */ + /** + * Manage optional parameters to listIncidents. + */ public static class ListIncidentsOptionalParameters { private List include; private Long pageSize; @@ -832,9 +1184,7 @@ public static class ListIncidentsOptionalParameters { /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return ListIncidentsOptionalParameters */ public ListIncidentsOptionalParameters include(List include) { @@ -844,9 +1194,7 @@ public ListIncidentsOptionalParameters include(List inclu /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListIncidentsOptionalParameters */ public ListIncidentsOptionalParameters pageSize(Long pageSize) { @@ -856,9 +1204,7 @@ public ListIncidentsOptionalParameters pageSize(Long pageSize) { /** * Set pageOffset. - * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) + * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, default to 0) * @return ListIncidentsOptionalParameters */ public ListIncidentsOptionalParameters pageOffset(Long pageOffset) { @@ -868,122 +1214,110 @@ public ListIncidentsOptionalParameters pageOffset(Long pageOffset) { } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @return IncidentsResponse - * @throws ApiException if fails to make API call - */ - public IncidentsResponse listIncidents() throws ApiException { + * Get a list of incidents. + * + * See {@link #listIncidentsWithHttpInfo}. + * + * @return IncidentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentsResponse listIncidents () throws ApiException { return listIncidentsWithHttpInfo(new ListIncidentsOptionalParameters()).getData(); } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentsResponse> - */ - public CompletableFuture listIncidentsAsync() { - return listIncidentsWithHttpInfoAsync(new ListIncidentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of incidents. + * + * See {@link #listIncidentsWithHttpInfoAsync}. + * + * @return CompletableFuture<IncidentsResponse> + */ + public CompletableFuturelistIncidentsAsync() { + return listIncidentsWithHttpInfoAsync(new ListIncidentsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return IncidentsResponse - * @throws ApiException if fails to make API call - */ - public IncidentsResponse listIncidents(ListIncidentsOptionalParameters parameters) - throws ApiException { + * Get a list of incidents. + * + * See {@link #listIncidentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return IncidentsResponse + * @throws ApiException if fails to make API call + */ + public IncidentsResponse listIncidents(ListIncidentsOptionalParameters parameters) throws ApiException { return listIncidentsWithHttpInfo(parameters).getData(); } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentsResponse> - */ - public CompletableFuture listIncidentsAsync( - ListIncidentsOptionalParameters parameters) { - return listIncidentsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of incidents. + * + * See {@link #listIncidentsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentsResponse> + */ + public CompletableFuturelistIncidentsAsync(ListIncidentsOptionalParameters parameters) { + return listIncidentsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @return PaginationIterable<IncidentResponseData> - */ + * Get a list of incidents. + * + * See {@link #listIncidentsWithHttpInfo}. + * + * @return PaginationIterable<IncidentResponseData> + */ public PaginationIterable listIncidentsWithPagination() { ListIncidentsOptionalParameters parameters = new ListIncidentsOptionalParameters(); return listIncidentsWithPagination(parameters); } /** - * Get a list of incidents. - * - *

See {@link #listIncidentsWithHttpInfo}. - * - * @return IncidentsResponse - */ - public PaginationIterable listIncidentsWithPagination( - ListIncidentsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = ""; - String valueSetterPath = "pageOffset"; - Boolean valueSetterParamOptional = true; - Long limit; - - if (parameters.pageSize == null) { + * Get a list of incidents. + * + * See {@link #listIncidentsWithHttpInfo}. + * + * @return IncidentsResponse + */ + public PaginationIterable listIncidentsWithPagination(ListIncidentsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = ""; + String valueSetterPath = "pageOffset"; + Boolean valueSetterParamOptional = true; + Long limit; + + + if (parameters.pageSize == null) { limit = 10l; parameters.pageSize(limit); - } else { + } else { limit = parameters.pageSize; - } + } + - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - PaginationIterable iterator = - new PaginationIterable( - this, - "listIncidents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); + PaginationIterable iterator = new PaginationIterable(this, "listIncidents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - return iterator; + return iterator; } + /** - * Get all incidents for the user's organization. + *

Get all incidents for the user's organization.

* * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -994,8 +1328,7 @@ public PaginationIterable listIncidentsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listIncidentsWithHttpInfo( - ListIncidentsOptionalParameters parameters) throws ApiException { + public ApiResponse listIncidentsWithHttpInfo(ListIncidentsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "listIncidents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -1010,6 +1343,7 @@ public ApiResponse listIncidentsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/incidents"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1017,44 +1351,26 @@ public ApiResponse listIncidentsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.listIncidents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.listIncidents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of incidents. * - *

See {@link #listIncidentsWithHttpInfo}. + * See {@link #listIncidentsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentsResponse>> */ - public CompletableFuture> listIncidentsWithHttpInfoAsync( - ListIncidentsOptionalParameters parameters) { + public CompletableFuture> listIncidentsWithHttpInfoAsync(ListIncidentsOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "listIncidents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; @@ -1064,6 +1380,7 @@ public CompletableFuture> listIncidentsWithHttpIn // create path and map variables String localVarPath = "/api/v2/incidents"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1073,41 +1390,25 @@ public CompletableFuture> listIncidentsWithHttpIn Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.listIncidents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.listIncidents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to searchIncidents. */ + /** + * Manage optional parameters to searchIncidents. + */ public static class SearchIncidentsOptionalParameters { private IncidentRelatedObject include; private IncidentSearchSortOrder sort; /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return SearchIncidentsOptionalParameters */ public SearchIncidentsOptionalParameters include(IncidentRelatedObject include) { @@ -1117,7 +1418,6 @@ public SearchIncidentsOptionalParameters include(IncidentRelatedObject include) /** * Set sort. - * * @param sort Specifies the order of returned incidents. (optional) * @return SearchIncidentsOptionalParameters */ @@ -1128,101 +1428,71 @@ public SearchIncidentsOptionalParameters sort(IncidentSearchSortOrder sort) { } /** - * Search for incidents. - * - *

See {@link #searchIncidentsWithHttpInfo}. - * - * @param query Specifies which incidents should be returned. After entering a search query in - * your Incidents page, use the query - * parameter value in the URL of the page as the value for this parameter. The query can - * contain any number of incident facets joined by ANDs, along with multiple - * values for each of those facets joined by ORs, for instance: - * query="state:active AND severity:(SEV-2 OR SEV-1)". (required) - * @return IncidentSearchResponse - * @throws ApiException if fails to make API call - */ - public IncidentSearchResponse searchIncidents(String query) throws ApiException { - return searchIncidentsWithHttpInfo(query, new SearchIncidentsOptionalParameters()).getData(); + * Search for incidents. + * + * See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. After entering a search query in your Incidents page, use the query parameter value in the URL of the page as the value for this parameter. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined by ORs, for instance: query="state:active AND severity:(SEV-2 OR SEV-1)". (required) + * @return IncidentSearchResponse + * @throws ApiException if fails to make API call + */ + public IncidentSearchResponse searchIncidents (String query) throws ApiException { + return searchIncidentsWithHttpInfo( query, new SearchIncidentsOptionalParameters()).getData(); } /** - * Search for incidents. - * - *

See {@link #searchIncidentsWithHttpInfoAsync}. - * - * @param query Specifies which incidents should be returned. After entering a search query in - * your Incidents page, use the query - * parameter value in the URL of the page as the value for this parameter. The query can - * contain any number of incident facets joined by ANDs, along with multiple - * values for each of those facets joined by ORs, for instance: - * query="state:active AND severity:(SEV-2 OR SEV-1)". (required) - * @return CompletableFuture<IncidentSearchResponse> - */ - public CompletableFuture searchIncidentsAsync(String query) { - return searchIncidentsWithHttpInfoAsync(query, new SearchIncidentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search for incidents. + * + * See {@link #searchIncidentsWithHttpInfoAsync}. + * + * @param query Specifies which incidents should be returned. After entering a search query in your Incidents page, use the query parameter value in the URL of the page as the value for this parameter. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined by ORs, for instance: query="state:active AND severity:(SEV-2 OR SEV-1)". (required) + * @return CompletableFuture<IncidentSearchResponse> + */ + public CompletableFuturesearchIncidentsAsync(String query) { + return searchIncidentsWithHttpInfoAsync(query, new SearchIncidentsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search for incidents. - * - *

See {@link #searchIncidentsWithHttpInfo}. - * - * @param query Specifies which incidents should be returned. After entering a search query in - * your Incidents page, use the query - * parameter value in the URL of the page as the value for this parameter. The query can - * contain any number of incident facets joined by ANDs, along with multiple - * values for each of those facets joined by ORs, for instance: - * query="state:active AND severity:(SEV-2 OR SEV-1)". (required) - * @param parameters Optional parameters for the request. - * @return IncidentSearchResponse - * @throws ApiException if fails to make API call - */ - public IncidentSearchResponse searchIncidents( - String query, SearchIncidentsOptionalParameters parameters) throws ApiException { + * Search for incidents. + * + * See {@link #searchIncidentsWithHttpInfo}. + * + * @param query Specifies which incidents should be returned. After entering a search query in your Incidents page, use the query parameter value in the URL of the page as the value for this parameter. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined by ORs, for instance: query="state:active AND severity:(SEV-2 OR SEV-1)". (required) + * @param parameters Optional parameters for the request. + * @return IncidentSearchResponse + * @throws ApiException if fails to make API call + */ + public IncidentSearchResponse searchIncidents(String query, SearchIncidentsOptionalParameters parameters) throws ApiException { return searchIncidentsWithHttpInfo(query, parameters).getData(); } /** - * Search for incidents. - * - *

See {@link #searchIncidentsWithHttpInfoAsync}. - * - * @param query Specifies which incidents should be returned. After entering a search query in - * your Incidents page, use the query - * parameter value in the URL of the page as the value for this parameter. The query can - * contain any number of incident facets joined by ANDs, along with multiple - * values for each of those facets joined by ORs, for instance: - * query="state:active AND severity:(SEV-2 OR SEV-1)". (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentSearchResponse> - */ - public CompletableFuture searchIncidentsAsync( - String query, SearchIncidentsOptionalParameters parameters) { - return searchIncidentsWithHttpInfoAsync(query, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search for incidents. + * + * See {@link #searchIncidentsWithHttpInfoAsync}. + * + * @param query Specifies which incidents should be returned. After entering a search query in your Incidents page, use the query parameter value in the URL of the page as the value for this parameter. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined by ORs, for instance: query="state:active AND severity:(SEV-2 OR SEV-1)". (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentSearchResponse> + */ + public CompletableFuturesearchIncidentsAsync( String query, SearchIncidentsOptionalParameters parameters) { + return searchIncidentsWithHttpInfoAsync(query, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Search for incidents matching a certain query. + *

Search for incidents matching a certain query.

* - * @param query Specifies which incidents should be returned. After entering a search query in - * your Incidents page, use the query - * parameter value in the URL of the page as the value for this parameter. The query can - * contain any number of incident facets joined by ANDs, along with multiple - * values for each of those facets joined by ORs, for instance: - * query="state:active AND severity:(SEV-2 OR SEV-1)". (required) + * @param query Specifies which incidents should be returned. After entering a search query in your Incidents page, use the query parameter value in the URL of the page as the value for this parameter. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined by ORs, for instance: query="state:active AND severity:(SEV-2 OR SEV-1)". (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IncidentSearchResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1233,8 +1503,7 @@ public CompletableFuture searchIncidentsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchIncidentsWithHttpInfo( - String query, SearchIncidentsOptionalParameters parameters) throws ApiException { + public ApiResponse searchIncidentsWithHttpInfo(String query, SearchIncidentsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "searchIncidents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -1246,14 +1515,14 @@ public ApiResponse searchIncidentsWithHttpInfo( // verify the required parameter 'query' is set if (query == null) { - throw new ApiException( - 400, "Missing the required parameter 'query' when calling searchIncidents"); + throw new ApiException(400, "Missing the required parameter 'query' when calling searchIncidents"); } IncidentRelatedObject include = parameters.include; IncidentSearchSortOrder sort = parameters.sort; // create path and map variables String localVarPath = "/api/v2/incidents/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1261,67 +1530,43 @@ public ApiResponse searchIncidentsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.searchIncidents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.searchIncidents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search for incidents. * - *

See {@link #searchIncidentsWithHttpInfo}. + * See {@link #searchIncidentsWithHttpInfo}. * - * @param query Specifies which incidents should be returned. After entering a search query in - * your Incidents page, use the query - * parameter value in the URL of the page as the value for this parameter. The query can - * contain any number of incident facets joined by ANDs, along with multiple - * values for each of those facets joined by ORs, for instance: - * query="state:active AND severity:(SEV-2 OR SEV-1)". (required) + * @param query Specifies which incidents should be returned. After entering a search query in your Incidents page, use the query parameter value in the URL of the page as the value for this parameter. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined by ORs, for instance: query="state:active AND severity:(SEV-2 OR SEV-1)". (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentSearchResponse>> */ - public CompletableFuture> searchIncidentsWithHttpInfoAsync( - String query, SearchIncidentsOptionalParameters parameters) { + public CompletableFuture> searchIncidentsWithHttpInfoAsync(String query, SearchIncidentsOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "searchIncidents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; // verify the required parameter 'query' is set if (query == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'query' when calling searchIncidents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'query' when calling searchIncidents")); + return result; } IncidentRelatedObject include = parameters.include; IncidentSearchSortOrder sort = parameters.sort; // create path and map variables String localVarPath = "/api/v2/incidents/search"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1331,40 +1576,24 @@ public CompletableFuture> searchIncidentsWit Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.searchIncidents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.searchIncidents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to updateIncident. */ + /** + * Manage optional parameters to updateIncident. + */ public static class UpdateIncidentOptionalParameters { private List include; /** * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) + * @param include Specifies which types of related objects should be included in the response. (optional) * @return UpdateIncidentOptionalParameters */ public UpdateIncidentOptionalParameters include(List include) { @@ -1374,78 +1603,68 @@ public UpdateIncidentOptionalParameters include(List incl } /** - * Update an existing incident. - * - *

See {@link #updateIncidentWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @return IncidentResponse - * @throws ApiException if fails to make API call - */ - public IncidentResponse updateIncident(String incidentId, IncidentUpdateRequest body) - throws ApiException { - return updateIncidentWithHttpInfo(incidentId, body, new UpdateIncidentOptionalParameters()) - .getData(); + * Update an existing incident. + * + * See {@link #updateIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse updateIncident (String incidentId, IncidentUpdateRequest body) throws ApiException { + return updateIncidentWithHttpInfo( incidentId, body, new UpdateIncidentOptionalParameters()).getData(); } /** - * Update an existing incident. - * - *

See {@link #updateIncidentWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @return CompletableFuture<IncidentResponse> - */ - public CompletableFuture updateIncidentAsync( - String incidentId, IncidentUpdateRequest body) { - return updateIncidentWithHttpInfoAsync(incidentId, body, new UpdateIncidentOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Update an existing incident. + * + * See {@link #updateIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFutureupdateIncidentAsync(String incidentId, IncidentUpdateRequest body) { + return updateIncidentWithHttpInfoAsync(incidentId, body, new UpdateIncidentOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Update an existing incident. - * - *

See {@link #updateIncidentWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentResponse - * @throws ApiException if fails to make API call - */ - public IncidentResponse updateIncident( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) - throws ApiException { + * Update an existing incident. + * + * See {@link #updateIncidentWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentResponse + * @throws ApiException if fails to make API call + */ + public IncidentResponse updateIncident(String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) throws ApiException { return updateIncidentWithHttpInfo(incidentId, body, parameters).getData(); } /** - * Update an existing incident. - * - *

See {@link #updateIncidentWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentResponse> - */ - public CompletableFuture updateIncidentAsync( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { - return updateIncidentWithHttpInfoAsync(incidentId, body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Update an existing incident. + * + * See {@link #updateIncidentWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentResponse> + */ + public CompletableFutureupdateIncidentAsync( String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { + return updateIncidentWithHttpInfoAsync(incidentId, body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Updates an incident. Provide only the attributes that should be updated as this request is a - * partial update. + *

Updates an incident. Provide only the attributes that should be updated as this request is a partial update.

* * @param incidentId The UUID of the incident. (required) * @param body Incident Payload. (required) @@ -1453,7 +1672,7 @@ public CompletableFuture updateIncidentAsync( * @return ApiResponse<IncidentResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1464,9 +1683,7 @@ public CompletableFuture updateIncidentAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateIncidentWithHttpInfo( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) - throws ApiException { + public ApiResponse updateIncidentWithHttpInfo(String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "updateIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -1478,95 +1695,69 @@ public ApiResponse updateIncidentWithHttpInfo( // verify the required parameter 'incidentId' is set if (incidentId == null) { - throw new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncident"); + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling updateIncident"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncident"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateIncident"); } List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.updateIncident", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.updateIncident", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an existing incident. * - *

See {@link #updateIncidentWithHttpInfo}. + * See {@link #updateIncidentWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) * @param body Incident Payload. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentResponse>> */ - public CompletableFuture> updateIncidentWithHttpInfoAsync( - String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { + public CompletableFuture> updateIncidentWithHttpInfoAsync(String incidentId, IncidentUpdateRequest body, UpdateIncidentOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "updateIncident"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'incidentId' when calling updateIncident")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling updateIncident")); + 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 updateIncident")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateIncident")); + return result; } List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1574,127 +1765,95 @@ public CompletableFuture> updateIncidentWithHttpIn Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.updateIncident", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.updateIncident", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to updateIncidentAttachments. */ + /** + * Manage optional parameters to updateIncidentAttachments. + */ public static class UpdateIncidentAttachmentsOptionalParameters { private List include; /** * Set include. - * - * @param include Specifies which types of related objects are included in the response. - * (optional) + * @param include Specifies which types of related objects are included in the response. (optional) * @return UpdateIncidentAttachmentsOptionalParameters */ - public UpdateIncidentAttachmentsOptionalParameters include( - List include) { + public UpdateIncidentAttachmentsOptionalParameters include(List include) { this.include = include; return this; } } /** - * Create, update, and delete incident attachments. - * - *

See {@link #updateIncidentAttachmentsWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Attachment Payload. (required) - * @return IncidentAttachmentUpdateResponse - * @throws ApiException if fails to make API call - */ - public IncidentAttachmentUpdateResponse updateIncidentAttachments( - String incidentId, IncidentAttachmentUpdateRequest body) throws ApiException { - return updateIncidentAttachmentsWithHttpInfo( - incidentId, body, new UpdateIncidentAttachmentsOptionalParameters()) - .getData(); + * Create, update, and delete incident attachments. + * + * See {@link #updateIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Attachment Payload. (required) + * @return IncidentAttachmentUpdateResponse + * @throws ApiException if fails to make API call + */ + public IncidentAttachmentUpdateResponse updateIncidentAttachments (String incidentId, IncidentAttachmentUpdateRequest body) throws ApiException { + return updateIncidentAttachmentsWithHttpInfo( incidentId, body, new UpdateIncidentAttachmentsOptionalParameters()).getData(); } /** - * Create, update, and delete incident attachments. - * - *

See {@link #updateIncidentAttachmentsWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Attachment Payload. (required) - * @return CompletableFuture<IncidentAttachmentUpdateResponse> - */ - public CompletableFuture updateIncidentAttachmentsAsync( - String incidentId, IncidentAttachmentUpdateRequest body) { - return updateIncidentAttachmentsWithHttpInfoAsync( - incidentId, body, new UpdateIncidentAttachmentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Create, update, and delete incident attachments. + * + * See {@link #updateIncidentAttachmentsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Attachment Payload. (required) + * @return CompletableFuture<IncidentAttachmentUpdateResponse> + */ + public CompletableFutureupdateIncidentAttachmentsAsync(String incidentId, IncidentAttachmentUpdateRequest body) { + return updateIncidentAttachmentsWithHttpInfoAsync(incidentId, body, new UpdateIncidentAttachmentsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Create, update, and delete incident attachments. - * - *

See {@link #updateIncidentAttachmentsWithHttpInfo}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Attachment Payload. (required) - * @param parameters Optional parameters for the request. - * @return IncidentAttachmentUpdateResponse - * @throws ApiException if fails to make API call - */ - public IncidentAttachmentUpdateResponse updateIncidentAttachments( - String incidentId, - IncidentAttachmentUpdateRequest body, - UpdateIncidentAttachmentsOptionalParameters parameters) - throws ApiException { + * Create, update, and delete incident attachments. + * + * See {@link #updateIncidentAttachmentsWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Attachment Payload. (required) + * @param parameters Optional parameters for the request. + * @return IncidentAttachmentUpdateResponse + * @throws ApiException if fails to make API call + */ + public IncidentAttachmentUpdateResponse updateIncidentAttachments(String incidentId, IncidentAttachmentUpdateRequest body, UpdateIncidentAttachmentsOptionalParameters parameters) throws ApiException { return updateIncidentAttachmentsWithHttpInfo(incidentId, body, parameters).getData(); } /** - * Create, update, and delete incident attachments. - * - *

See {@link #updateIncidentAttachmentsWithHttpInfoAsync}. - * - * @param incidentId The UUID of the incident. (required) - * @param body Incident Attachment Payload. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentAttachmentUpdateResponse> - */ - public CompletableFuture updateIncidentAttachmentsAsync( - String incidentId, - IncidentAttachmentUpdateRequest body, - UpdateIncidentAttachmentsOptionalParameters parameters) { - return updateIncidentAttachmentsWithHttpInfoAsync(incidentId, body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Create, update, and delete incident attachments. + * + * See {@link #updateIncidentAttachmentsWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param body Incident Attachment Payload. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IncidentAttachmentUpdateResponse> + */ + public CompletableFutureupdateIncidentAttachmentsAsync( String incidentId, IncidentAttachmentUpdateRequest body, UpdateIncidentAttachmentsOptionalParameters parameters) { + return updateIncidentAttachmentsWithHttpInfoAsync(incidentId, body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * The bulk update endpoint for creating, updating, and deleting attachments for a given incident. + *

The bulk update endpoint for creating, updating, and deleting attachments for a given incident.

* * @param incidentId The UUID of the incident. (required) * @param body Incident Attachment Payload. (required) @@ -1702,7 +1861,7 @@ public CompletableFuture updateIncidentAttachm * @return ApiResponse<IncidentAttachmentUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1713,11 +1872,7 @@ public CompletableFuture updateIncidentAttachm * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateIncidentAttachmentsWithHttpInfo( - String incidentId, - IncidentAttachmentUpdateRequest body, - UpdateIncidentAttachmentsOptionalParameters parameters) - throws ApiException { + public ApiResponse updateIncidentAttachmentsWithHttpInfo(String incidentId, IncidentAttachmentUpdateRequest body, UpdateIncidentAttachmentsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "updateIncidentAttachments"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -1729,104 +1884,69 @@ public ApiResponse updateIncidentAttachmentsWi // verify the required parameter 'incidentId' is set if (incidentId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling updateIncidentAttachments"); + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling updateIncidentAttachments"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentAttachments"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentAttachments"); } List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}/attachments" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentAttachments", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.updateIncidentAttachments", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create, update, and delete incident attachments. * - *

See {@link #updateIncidentAttachmentsWithHttpInfo}. + * See {@link #updateIncidentAttachmentsWithHttpInfo}. * * @param incidentId The UUID of the incident. (required) * @param body Incident Attachment Payload. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IncidentAttachmentUpdateResponse>> */ - public CompletableFuture> - updateIncidentAttachmentsWithHttpInfoAsync( - String incidentId, - IncidentAttachmentUpdateRequest body, - UpdateIncidentAttachmentsOptionalParameters parameters) { + public CompletableFuture> updateIncidentAttachmentsWithHttpInfoAsync(String incidentId, IncidentAttachmentUpdateRequest body, UpdateIncidentAttachmentsOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "updateIncidentAttachments"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'incidentId' is set if (incidentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'incidentId' when calling" - + " updateIncidentAttachments")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling updateIncidentAttachments")); + 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 updateIncidentAttachments")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentAttachments")); + return result; } List include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/incidents/{incident_id}/attachments" - .replaceAll( - "\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + String localVarPath = "/api/v2/incidents/{incident_id}/attachments" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1834,29 +1954,163 @@ public ApiResponse updateIncidentAttachmentsWi Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IncidentsApi.updateIncidentAttachments", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IncidentsApi.updateIncidentAttachments", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Update an existing incident integration metadata. + * + * See {@link #updateIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return IncidentIntegrationMetadataResponse + * @throws ApiException if fails to make API call + */ + public IncidentIntegrationMetadataResponse updateIncidentIntegration(String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) throws ApiException { + return updateIncidentIntegrationWithHttpInfo(incidentId, integrationMetadataId, body).getData(); + } + + /** + * Update an existing incident integration metadata. + * + * See {@link #updateIncidentIntegrationWithHttpInfoAsync}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<IncidentIntegrationMetadataResponse> + */ + public CompletableFutureupdateIncidentIntegrationAsync(String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) { + return updateIncidentIntegrationWithHttpInfoAsync(incidentId, integrationMetadataId, body).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Update an existing incident integration metadata.

+ * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return ApiResponse<IncidentIntegrationMetadataResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateIncidentIntegrationWithHttpInfo(String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + throw new ApiException(400, "Missing the required parameter 'incidentId' when calling updateIncidentIntegration"); + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + throw new ApiException(400, "Missing the required parameter 'integrationMetadataId' when calling updateIncidentIntegration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling updateIncidentIntegration"); + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "integration_metadata_id" + "\\}", apiClient.escapeString(integrationMetadataId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder = apiClient.createBuilder("v2.IncidentsApi.updateIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Update an existing incident integration metadata. + * + * See {@link #updateIncidentIntegrationWithHttpInfo}. + * + * @param incidentId The UUID of the incident. (required) + * @param integrationMetadataId The UUID of the incident integration metadata. (required) + * @param body Incident integration metadata payload. (required) + * @return CompletableFuture<ApiResponse<IncidentIntegrationMetadataResponse>> + */ + public CompletableFuture> updateIncidentIntegrationWithHttpInfoAsync(String incidentId, String integrationMetadataId, IncidentIntegrationMetadataPatchRequest body) { + // Check if unstable operation is enabled + String operationId = "updateIncidentIntegration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'incidentId' is set + if (incidentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'incidentId' when calling updateIncidentIntegration")); + return result; + } + + // verify the required parameter 'integrationMetadataId' is set + if (integrationMetadataId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'integrationMetadataId' when calling updateIncidentIntegration")); + 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 updateIncidentIntegration")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replaceAll("\\{" + "incident_id" + "\\}", apiClient.escapeString(incidentId.toString())) + .replaceAll("\\{" + "integration_metadata_id" + "\\}", apiClient.escapeString(integrationMetadataId.toString())); + + + Map localVarHeaderParams = new HashMap(); + + + Invocation.Builder builder; + try { + builder = apiClient.createBuilder("v2.IncidentsApi.updateIncidentIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/IpAllowlistApi.java b/src/main/java/com/datadog/api/client/v2/api/IpAllowlistApi.java index b7a7c29903e..d8d7cd434e3 100644 --- a/src/main/java/com/datadog/api/client/v2/api/IpAllowlistApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/IpAllowlistApi.java @@ -1,23 +1,31 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.IPAllowlistResponse; -import com.datadog.api.client.v2.model.IPAllowlistUpdateRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.IPAllowlistResponse; +import com.datadog.api.client.v2.model.IPAllowlistUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IpAllowlistApi { private ApiClient apiClient; - public IpAllowlistApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,39 +53,38 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get IP Allowlist. - * - *

See {@link #getIPAllowlistWithHttpInfo}. - * - * @return IPAllowlistResponse - * @throws ApiException if fails to make API call - */ - public IPAllowlistResponse getIPAllowlist() throws ApiException { + * Get IP Allowlist. + * + * See {@link #getIPAllowlistWithHttpInfo}. + * + * @return IPAllowlistResponse + * @throws ApiException if fails to make API call + */ + public IPAllowlistResponse getIPAllowlist() throws ApiException { return getIPAllowlistWithHttpInfo().getData(); } /** - * Get IP Allowlist. - * - *

See {@link #getIPAllowlistWithHttpInfoAsync}. - * - * @return CompletableFuture<IPAllowlistResponse> - */ - public CompletableFuture getIPAllowlistAsync() { - return getIPAllowlistWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get IP Allowlist. + * + * See {@link #getIPAllowlistWithHttpInfoAsync}. + * + * @return CompletableFuture<IPAllowlistResponse> + */ + public CompletableFuturegetIPAllowlistAsync() { + return getIPAllowlistWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Returns the IP allowlist and its enabled or disabled state. + *

Returns the IP allowlist and its enabled or disabled state.

* * @return ApiResponse<IPAllowlistResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -91,32 +98,18 @@ public ApiResponse getIPAllowlistWithHttpInfo() throws ApiE // create path and map variables String localVarPath = "/api/v2/ip_allowlist"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IpAllowlistApi.getIPAllowlist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IpAllowlistApi.getIPAllowlist", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get IP Allowlist. * - *

See {@link #getIPAllowlistWithHttpInfo}. + * See {@link #getIPAllowlistWithHttpInfo}. * * @return CompletableFuture<ApiResponse<IPAllowlistResponse>> */ @@ -125,73 +118,57 @@ public CompletableFuture> getIPAllowlistWithHtt // create path and map variables String localVarPath = "/api/v2/ip_allowlist"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IpAllowlistApi.getIPAllowlist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IpAllowlistApi.getIPAllowlist", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update IP Allowlist. - * - *

See {@link #updateIPAllowlistWithHttpInfo}. - * - * @param body (required) - * @return IPAllowlistResponse - * @throws ApiException if fails to make API call - */ - public IPAllowlistResponse updateIPAllowlist(IPAllowlistUpdateRequest body) throws ApiException { + * Update IP Allowlist. + * + * See {@link #updateIPAllowlistWithHttpInfo}. + * + * @param body (required) + * @return IPAllowlistResponse + * @throws ApiException if fails to make API call + */ + public IPAllowlistResponse updateIPAllowlist(IPAllowlistUpdateRequest body) throws ApiException { return updateIPAllowlistWithHttpInfo(body).getData(); } /** - * Update IP Allowlist. - * - *

See {@link #updateIPAllowlistWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<IPAllowlistResponse> - */ - public CompletableFuture updateIPAllowlistAsync( - IPAllowlistUpdateRequest body) { - return updateIPAllowlistWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update IP Allowlist. + * + * See {@link #updateIPAllowlistWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<IPAllowlistResponse> + */ + public CompletableFutureupdateIPAllowlistAsync(IPAllowlistUpdateRequest body) { + return updateIPAllowlistWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit the entries in the IP allowlist, and enable or disable it. + *

Edit the entries in the IP allowlist, and enable or disable it.

* - * @param body (required) + * @param body (required) * @return ApiResponse<IPAllowlistResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -201,89 +178,56 @@ public CompletableFuture updateIPAllowlistAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateIPAllowlistWithHttpInfo( - IPAllowlistUpdateRequest body) throws ApiException { + public ApiResponse updateIPAllowlistWithHttpInfo(IPAllowlistUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIPAllowlist"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateIPAllowlist"); } // create path and map variables String localVarPath = "/api/v2/ip_allowlist"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IpAllowlistApi.updateIPAllowlist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.IpAllowlistApi.updateIPAllowlist", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update IP Allowlist. * - *

See {@link #updateIPAllowlistWithHttpInfo}. + * See {@link #updateIPAllowlistWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<IPAllowlistResponse>> */ - public CompletableFuture> updateIPAllowlistWithHttpInfoAsync( - IPAllowlistUpdateRequest body) { + public CompletableFuture> updateIPAllowlistWithHttpInfoAsync(IPAllowlistUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateIPAllowlist")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateIPAllowlist")); + return result; } // create path and map variables String localVarPath = "/api/v2/ip_allowlist"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.IpAllowlistApi.updateIPAllowlist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.IpAllowlistApi.updateIPAllowlist", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java index 7f4f05c6c35..17710b1da4c 100644 --- a/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java @@ -1,32 +1,39 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.APIKeyCreateRequest; -import com.datadog.api.client.v2.model.APIKeyResponse; -import com.datadog.api.client.v2.model.APIKeyUpdateRequest; -import com.datadog.api.client.v2.model.APIKeysResponse; -import com.datadog.api.client.v2.model.APIKeysSort; -import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; -import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -import com.datadog.api.client.v2.model.ApplicationKeysSort; -import com.datadog.api.client.v2.model.ListApplicationKeysResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.APIKeysResponse; +import com.datadog.api.client.v2.model.APIKeysSort; +import com.datadog.api.client.v2.model.APIKeyResponse; +import com.datadog.api.client.v2.model.APIKeyCreateRequest; +import com.datadog.api.client.v2.model.APIKeyUpdateRequest; +import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import com.datadog.api.client.v2.model.ApplicationKeysSort; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; +import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class KeyManagementApi { private ApiClient apiClient; - public KeyManagementApi() { this(ApiClient.getDefaultApiClient()); } @@ -54,42 +61,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create an API key. - * - *

See {@link #createAPIKeyWithHttpInfo}. - * - * @param body (required) - * @return APIKeyResponse - * @throws ApiException if fails to make API call - */ - public APIKeyResponse createAPIKey(APIKeyCreateRequest body) throws ApiException { + * Create an API key. + * + * See {@link #createAPIKeyWithHttpInfo}. + * + * @param body (required) + * @return APIKeyResponse + * @throws ApiException if fails to make API call + */ + public APIKeyResponse createAPIKey(APIKeyCreateRequest body) throws ApiException { return createAPIKeyWithHttpInfo(body).getData(); } /** - * Create an API key. - * - *

See {@link #createAPIKeyWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<APIKeyResponse> - */ - public CompletableFuture createAPIKeyAsync(APIKeyCreateRequest body) { - return createAPIKeyWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an API key. + * + * See {@link #createAPIKeyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<APIKeyResponse> + */ + public CompletableFuturecreateAPIKeyAsync(APIKeyCreateRequest body) { + return createAPIKeyWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an API key. + *

Create an API key.

* - * @param body (required) + * @param body (required) * @return ApiResponse<APIKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -98,130 +104,95 @@ public CompletableFuture createAPIKeyAsync(APIKeyCreateRequest b * *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
*/ - public ApiResponse createAPIKeyWithHttpInfo(APIKeyCreateRequest body) - throws ApiException { + public ApiResponse createAPIKeyWithHttpInfo(APIKeyCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createAPIKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createAPIKey"); } // create path and map variables String localVarPath = "/api/v2/api_keys"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.createAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.createAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an API key. * - *

See {@link #createAPIKeyWithHttpInfo}. + * See {@link #createAPIKeyWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<APIKeyResponse>> */ - public CompletableFuture> createAPIKeyWithHttpInfoAsync( - APIKeyCreateRequest body) { + public CompletableFuture> createAPIKeyWithHttpInfoAsync(APIKeyCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling createAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createAPIKey")); + return result; } // create path and map variables String localVarPath = "/api/v2/api_keys"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.createAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.createAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create an application key for current user. - * - *

See {@link #createCurrentUserApplicationKeyWithHttpInfo}. - * - * @param body (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse createCurrentUserApplicationKey(ApplicationKeyCreateRequest body) - throws ApiException { + * Create an application key for current user. + * + * See {@link #createCurrentUserApplicationKeyWithHttpInfo}. + * + * @param body (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse createCurrentUserApplicationKey(ApplicationKeyCreateRequest body) throws ApiException { return createCurrentUserApplicationKeyWithHttpInfo(body).getData(); } /** - * Create an application key for current user. - * - *

See {@link #createCurrentUserApplicationKeyWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture createCurrentUserApplicationKeyAsync( - ApplicationKeyCreateRequest body) { - return createCurrentUserApplicationKeyWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an application key for current user. + * + * See {@link #createCurrentUserApplicationKeyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturecreateCurrentUserApplicationKeyAsync(ApplicationKeyCreateRequest body) { + return createCurrentUserApplicationKeyWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an application key for current user + *

Create an application key for current user

* - * @param body (required) + * @param body (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -230,131 +201,94 @@ public CompletableFuture createCurrentUserApplicationKey * *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
*/ - public ApiResponse createCurrentUserApplicationKeyWithHttpInfo( - ApplicationKeyCreateRequest body) throws ApiException { + public ApiResponse createCurrentUserApplicationKeyWithHttpInfo(ApplicationKeyCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createCurrentUserApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createCurrentUserApplicationKey"); } // create path and map variables String localVarPath = "/api/v2/current_user/application_keys"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.createCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.createCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an application key for current user. * - *

See {@link #createCurrentUserApplicationKeyWithHttpInfo}. + * See {@link #createCurrentUserApplicationKeyWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - createCurrentUserApplicationKeyWithHttpInfoAsync(ApplicationKeyCreateRequest body) { + public CompletableFuture> createCurrentUserApplicationKeyWithHttpInfoAsync(ApplicationKeyCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createCurrentUserApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createCurrentUserApplicationKey")); + return result; } // create path and map variables String localVarPath = "/api/v2/current_user/application_keys"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.createCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.createCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an API key. - * - *

See {@link #deleteAPIKeyWithHttpInfo}. - * - * @param apiKeyId The ID of the API key. (required) - * @throws ApiException if fails to make API call - */ - public void deleteAPIKey(String apiKeyId) throws ApiException { + * Delete an API key. + * + * See {@link #deleteAPIKeyWithHttpInfo}. + * + * @param apiKeyId The ID of the API key. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAPIKey(String apiKeyId) throws ApiException { deleteAPIKeyWithHttpInfo(apiKeyId); } /** - * Delete an API key. - * - *

See {@link #deleteAPIKeyWithHttpInfoAsync}. - * - * @param apiKeyId The ID of the API key. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteAPIKeyAsync(String apiKeyId) { - return deleteAPIKeyWithHttpInfoAsync(apiKeyId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an API key. + * + * See {@link #deleteAPIKeyWithHttpInfoAsync}. + * + * @param apiKeyId The ID of the API key. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteAPIKeyAsync(String apiKeyId) { + return deleteAPIKeyWithHttpInfoAsync(apiKeyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an API key. + *

Delete an API key.

* * @param apiKeyId The ID of the API key. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -368,40 +302,24 @@ public ApiResponse deleteAPIKeyWithHttpInfo(String apiKeyId) throws ApiExc // verify the required parameter 'apiKeyId' is set if (apiKeyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'apiKeyId' when calling deleteAPIKey"); + throw new ApiException(400, "Missing the required parameter 'apiKeyId' when calling deleteAPIKey"); } // create path and map variables - String localVarPath = - "/api/v2/api_keys/{api_key_id}" - .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + String localVarPath = "/api/v2/api_keys/{api_key_id}" + .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.deleteAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.deleteAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an API key. * - *

See {@link #deleteAPIKeyWithHttpInfo}. + * See {@link #deleteAPIKeyWithHttpInfo}. * * @param apiKeyId The ID of the API key. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -411,82 +329,64 @@ public CompletableFuture> deleteAPIKeyWithHttpInfoAsync(String // verify the required parameter 'apiKeyId' is set if (apiKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'apiKeyId' when calling deleteAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'apiKeyId' when calling deleteAPIKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/api_keys/{api_key_id}" - .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + String localVarPath = "/api/v2/api_keys/{api_key_id}" + .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.deleteAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.deleteAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete an application key. - * - *

See {@link #deleteApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @throws ApiException if fails to make API call - */ - public void deleteApplicationKey(String appKeyId) throws ApiException { + * Delete an application key. + * + * See {@link #deleteApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @throws ApiException if fails to make API call + */ + public void deleteApplicationKey(String appKeyId) throws ApiException { deleteApplicationKeyWithHttpInfo(appKeyId); } /** - * Delete an application key. - * - *

See {@link #deleteApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteApplicationKeyAsync(String appKeyId) { - return deleteApplicationKeyWithHttpInfoAsync(appKeyId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an application key. + * + * See {@link #deleteApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteApplicationKeyAsync(String appKeyId) { + return deleteApplicationKeyWithHttpInfoAsync(appKeyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an application key + *

Delete an application key

* * @param appKeyId The ID of the application key. (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 -
+ *
* * * @@ -500,126 +400,91 @@ public ApiResponse deleteApplicationKeyWithHttpInfo(String appKeyId) throw // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'appKeyId' when calling deleteApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling deleteApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.deleteApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.deleteApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an application key. * - *

See {@link #deleteApplicationKeyWithHttpInfo}. + * See {@link #deleteApplicationKeyWithHttpInfo}. * * @param appKeyId The ID of the application key. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteApplicationKeyWithHttpInfoAsync( - String appKeyId) { + public CompletableFuture> deleteApplicationKeyWithHttpInfoAsync(String appKeyId) { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'appKeyId' when calling deleteApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling deleteApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.deleteApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.deleteApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete an application key owned by current user. - * - *

See {@link #deleteCurrentUserApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @throws ApiException if fails to make API call - */ - public void deleteCurrentUserApplicationKey(String appKeyId) throws ApiException { + * Delete an application key owned by current user. + * + * See {@link #deleteCurrentUserApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @throws ApiException if fails to make API call + */ + public void deleteCurrentUserApplicationKey(String appKeyId) throws ApiException { deleteCurrentUserApplicationKeyWithHttpInfo(appKeyId); } /** - * Delete an application key owned by current user. - * - *

See {@link #deleteCurrentUserApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteCurrentUserApplicationKeyAsync(String appKeyId) { - return deleteCurrentUserApplicationKeyWithHttpInfoAsync(appKeyId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an application key owned by current user. + * + * See {@link #deleteCurrentUserApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteCurrentUserApplicationKeyAsync(String appKeyId) { + return deleteCurrentUserApplicationKeyWithHttpInfoAsync(appKeyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an application key owned by current user + *

Delete an application key owned by current user

* * @param appKeyId The ID of the application key. (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 -
+ *
* * * @@ -628,109 +493,70 @@ public CompletableFuture deleteCurrentUserApplicationKeyAsync(String appKe * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
*/ - public ApiResponse deleteCurrentUserApplicationKeyWithHttpInfo(String appKeyId) - throws ApiException { + public ApiResponse deleteCurrentUserApplicationKeyWithHttpInfo(String appKeyId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling deleteCurrentUserApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling deleteCurrentUserApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/current_user/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/current_user/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.deleteCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.deleteCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an application key owned by current user. * - *

See {@link #deleteCurrentUserApplicationKeyWithHttpInfo}. + * See {@link #deleteCurrentUserApplicationKeyWithHttpInfo}. * * @param appKeyId The ID of the application key. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCurrentUserApplicationKeyWithHttpInfoAsync( - String appKeyId) { + public CompletableFuture> deleteCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId) { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " deleteCurrentUserApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling deleteCurrentUserApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/current_user/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/current_user/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.deleteCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.deleteCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } - /** Manage optional parameters to getAPIKey. */ + /** + * Manage optional parameters to getAPIKey. + */ public static class GetAPIKeyOptionalParameters { private String include; /** * Set include. - * - * @param include Comma separated list of resource paths for related resources to include in the - * response. Supported resource paths are created_by and modified_by - * . (optional) + * @param include Comma separated list of resource paths for related resources to include in the response. Supported resource paths are created_by and modified_by. (optional) * @return GetAPIKeyOptionalParameters */ public GetAPIKeyOptionalParameters include(String include) { @@ -740,76 +566,71 @@ public GetAPIKeyOptionalParameters include(String include) { } /** - * Get API key. - * - *

See {@link #getAPIKeyWithHttpInfo}. - * - * @param apiKeyId The ID of the API key. (required) - * @return APIKeyResponse - * @throws ApiException if fails to make API call - */ - public APIKeyResponse getAPIKey(String apiKeyId) throws ApiException { - return getAPIKeyWithHttpInfo(apiKeyId, new GetAPIKeyOptionalParameters()).getData(); + * Get API key. + * + * See {@link #getAPIKeyWithHttpInfo}. + * + * @param apiKeyId The ID of the API key. (required) + * @return APIKeyResponse + * @throws ApiException if fails to make API call + */ + public APIKeyResponse getAPIKey (String apiKeyId) throws ApiException { + return getAPIKeyWithHttpInfo( apiKeyId, new GetAPIKeyOptionalParameters()).getData(); } /** - * Get API key. - * - *

See {@link #getAPIKeyWithHttpInfoAsync}. - * - * @param apiKeyId The ID of the API key. (required) - * @return CompletableFuture<APIKeyResponse> - */ - public CompletableFuture getAPIKeyAsync(String apiKeyId) { - return getAPIKeyWithHttpInfoAsync(apiKeyId, new GetAPIKeyOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get API key. + * + * See {@link #getAPIKeyWithHttpInfoAsync}. + * + * @param apiKeyId The ID of the API key. (required) + * @return CompletableFuture<APIKeyResponse> + */ + public CompletableFuturegetAPIKeyAsync(String apiKeyId) { + return getAPIKeyWithHttpInfoAsync(apiKeyId, new GetAPIKeyOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get API key. - * - *

See {@link #getAPIKeyWithHttpInfo}. - * - * @param apiKeyId The ID of the API key. (required) - * @param parameters Optional parameters for the request. - * @return APIKeyResponse - * @throws ApiException if fails to make API call - */ - public APIKeyResponse getAPIKey(String apiKeyId, GetAPIKeyOptionalParameters parameters) - throws ApiException { + * Get API key. + * + * See {@link #getAPIKeyWithHttpInfo}. + * + * @param apiKeyId The ID of the API key. (required) + * @param parameters Optional parameters for the request. + * @return APIKeyResponse + * @throws ApiException if fails to make API call + */ + public APIKeyResponse getAPIKey(String apiKeyId, GetAPIKeyOptionalParameters parameters) throws ApiException { return getAPIKeyWithHttpInfo(apiKeyId, parameters).getData(); } /** - * Get API key. - * - *

See {@link #getAPIKeyWithHttpInfoAsync}. - * - * @param apiKeyId The ID of the API key. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<APIKeyResponse> - */ - public CompletableFuture getAPIKeyAsync( - String apiKeyId, GetAPIKeyOptionalParameters parameters) { - return getAPIKeyWithHttpInfoAsync(apiKeyId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get API key. + * + * See {@link #getAPIKeyWithHttpInfoAsync}. + * + * @param apiKeyId The ID of the API key. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<APIKeyResponse> + */ + public CompletableFuturegetAPIKeyAsync( String apiKeyId, GetAPIKeyOptionalParameters parameters) { + return getAPIKeyWithHttpInfoAsync(apiKeyId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get an API key. + *

Get an API key.

* * @param apiKeyId The ID of the API key. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<APIKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -818,73 +639,52 @@ public CompletableFuture getAPIKeyAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getAPIKeyWithHttpInfo( - String apiKeyId, GetAPIKeyOptionalParameters parameters) throws ApiException { + public ApiResponse getAPIKeyWithHttpInfo(String apiKeyId, GetAPIKeyOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'apiKeyId' is set if (apiKeyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'apiKeyId' when calling getAPIKey"); + throw new ApiException(400, "Missing the required parameter 'apiKeyId' when calling getAPIKey"); } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/api_keys/{api_key_id}" - .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + String localVarPath = "/api/v2/api_keys/{api_key_id}" + .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.getAPIKey", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.getAPIKey", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get API key. * - *

See {@link #getAPIKeyWithHttpInfo}. + * See {@link #getAPIKeyWithHttpInfo}. * * @param apiKeyId The ID of the API key. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<APIKeyResponse>> */ - public CompletableFuture> getAPIKeyWithHttpInfoAsync( - String apiKeyId, GetAPIKeyOptionalParameters parameters) { + public CompletableFuture> getAPIKeyWithHttpInfoAsync(String apiKeyId, GetAPIKeyOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'apiKeyId' is set if (apiKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'apiKeyId' when calling getAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'apiKeyId' when calling getAPIKey")); + return result; } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/api_keys/{api_key_id}" - .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + String localVarPath = "/api/v2/api_keys/{api_key_id}" + .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -892,40 +692,24 @@ public CompletableFuture> getAPIKeyWithHttpInfoAsync Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.getAPIKey", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.getAPIKey", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getApplicationKey. */ + /** + * Manage optional parameters to getApplicationKey. + */ public static class GetApplicationKeyOptionalParameters { private String include; /** * Set include. - * - * @param include Resource path for related resources to include in the response. Only - * owned_by is supported. (optional) + * @param include Resource path for related resources to include in the response. Only owned_by is supported. (optional) * @return GetApplicationKeyOptionalParameters */ public GetApplicationKeyOptionalParameters include(String include) { @@ -935,77 +719,71 @@ public GetApplicationKeyOptionalParameters include(String include) { } /** - * Get an application key. - * - *

See {@link #getApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse getApplicationKey(String appKeyId) throws ApiException { - return getApplicationKeyWithHttpInfo(appKeyId, new GetApplicationKeyOptionalParameters()) - .getData(); + * Get an application key. + * + * See {@link #getApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse getApplicationKey (String appKeyId) throws ApiException { + return getApplicationKeyWithHttpInfo( appKeyId, new GetApplicationKeyOptionalParameters()).getData(); } /** - * Get an application key. - * - *

See {@link #getApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture getApplicationKeyAsync(String appKeyId) { - return getApplicationKeyWithHttpInfoAsync(appKeyId, new GetApplicationKeyOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get an application key. + * + * See {@link #getApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturegetApplicationKeyAsync(String appKeyId) { + return getApplicationKeyWithHttpInfoAsync(appKeyId, new GetApplicationKeyOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get an application key. - * - *

See {@link #getApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @param parameters Optional parameters for the request. - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse getApplicationKey( - String appKeyId, GetApplicationKeyOptionalParameters parameters) throws ApiException { + * Get an application key. + * + * See {@link #getApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @param parameters Optional parameters for the request. + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse getApplicationKey(String appKeyId, GetApplicationKeyOptionalParameters parameters) throws ApiException { return getApplicationKeyWithHttpInfo(appKeyId, parameters).getData(); } /** - * Get an application key. - * - *

See {@link #getApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture getApplicationKeyAsync( - String appKeyId, GetApplicationKeyOptionalParameters parameters) { - return getApplicationKeyWithHttpInfoAsync(appKeyId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get an application key. + * + * See {@link #getApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturegetApplicationKeyAsync( String appKeyId, GetApplicationKeyOptionalParameters parameters) { + return getApplicationKeyWithHttpInfoAsync(appKeyId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get an application key for your org. + *

Get an application key for your org.

* * @param appKeyId The ID of the application key. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1015,73 +793,52 @@ public CompletableFuture getApplicationKeyAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getApplicationKeyWithHttpInfo( - String appKeyId, GetApplicationKeyOptionalParameters parameters) throws ApiException { + public ApiResponse getApplicationKeyWithHttpInfo(String appKeyId, GetApplicationKeyOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'appKeyId' when calling getApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling getApplicationKey"); } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.getApplicationKey", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.getApplicationKey", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an application key. * - *

See {@link #getApplicationKeyWithHttpInfo}. + * See {@link #getApplicationKeyWithHttpInfo}. * * @param appKeyId The ID of the application key. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> getApplicationKeyWithHttpInfoAsync( - String appKeyId, GetApplicationKeyOptionalParameters parameters) { + public CompletableFuture> getApplicationKeyWithHttpInfoAsync(String appKeyId, GetApplicationKeyOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'appKeyId' when calling getApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling getApplicationKey")); + return result; } String include = parameters.include; // create path and map variables - String localVarPath = - "/api/v2/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1089,69 +846,51 @@ public CompletableFuture> getApplicationKeyW Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.getApplicationKey", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.getApplicationKey", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get one application key owned by current user. - * - *

See {@link #getCurrentUserApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse getCurrentUserApplicationKey(String appKeyId) throws ApiException { + * Get one application key owned by current user. + * + * See {@link #getCurrentUserApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse getCurrentUserApplicationKey(String appKeyId) throws ApiException { return getCurrentUserApplicationKeyWithHttpInfo(appKeyId).getData(); } /** - * Get one application key owned by current user. - * - *

See {@link #getCurrentUserApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture getCurrentUserApplicationKeyAsync( - String appKeyId) { - return getCurrentUserApplicationKeyWithHttpInfoAsync(appKeyId) - .thenApply( - response -> { - return response.getData(); - }); + * Get one application key owned by current user. + * + * See {@link #getCurrentUserApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturegetCurrentUserApplicationKeyAsync(String appKeyId) { + return getCurrentUserApplicationKeyWithHttpInfoAsync(appKeyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get an application key owned by current user + *

Get an application key owned by current user

* * @param appKeyId The ID of the application key. (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1160,100 +899,64 @@ public CompletableFuture getCurrentUserApplicationKeyAsy * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getCurrentUserApplicationKeyWithHttpInfo( - String appKeyId) throws ApiException { + public ApiResponse getCurrentUserApplicationKeyWithHttpInfo(String appKeyId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling getCurrentUserApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling getCurrentUserApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/current_user/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/current_user/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.getCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.getCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get one application key owned by current user. * - *

See {@link #getCurrentUserApplicationKeyWithHttpInfo}. + * See {@link #getCurrentUserApplicationKeyWithHttpInfo}. * * @param appKeyId The ID of the application key. (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - getCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId) { + public CompletableFuture> getCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId) { Object localVarPostBody = null; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " getCurrentUserApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling getCurrentUserApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/current_user/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/current_user/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.getCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.getCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listAPIKeys. */ + /** + * Manage optional parameters to listAPIKeys. + */ public static class ListAPIKeysOptionalParameters { private Long pageSize; private Long pageNumber; @@ -1267,9 +970,7 @@ public static class ListAPIKeysOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters pageSize(Long pageSize) { @@ -1279,7 +980,6 @@ public ListAPIKeysOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListAPIKeysOptionalParameters */ @@ -1290,10 +990,7 @@ public ListAPIKeysOptionalParameters pageNumber(Long pageNumber) { /** * Set sort. - * - * @param sort API key attribute used to sort results. Sort order is ascending by default. In - * order to specify a descending sort, prefix the attribute with a minus sign. (optional, - * default to "name") + * @param sort API key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign. (optional, default to "name") * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters sort(APIKeysSort sort) { @@ -1303,7 +1000,6 @@ public ListAPIKeysOptionalParameters sort(APIKeysSort sort) { /** * Set filter. - * * @param filter Filter API keys by the specified string. (optional) * @return ListAPIKeysOptionalParameters */ @@ -1314,9 +1010,7 @@ public ListAPIKeysOptionalParameters filter(String filter) { /** * Set filterCreatedAtStart. - * - * @param filterCreatedAtStart Only include API keys created on or after the specified date. - * (optional) + * @param filterCreatedAtStart Only include API keys created on or after the specified date. (optional) * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters filterCreatedAtStart(String filterCreatedAtStart) { @@ -1326,9 +1020,7 @@ public ListAPIKeysOptionalParameters filterCreatedAtStart(String filterCreatedAt /** * Set filterCreatedAtEnd. - * - * @param filterCreatedAtEnd Only include API keys created on or before the specified date. - * (optional) + * @param filterCreatedAtEnd Only include API keys created on or before the specified date. (optional) * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters filterCreatedAtEnd(String filterCreatedAtEnd) { @@ -1338,9 +1030,7 @@ public ListAPIKeysOptionalParameters filterCreatedAtEnd(String filterCreatedAtEn /** * Set filterModifiedAtStart. - * - * @param filterModifiedAtStart Only include API keys modified on or after the specified date. - * (optional) + * @param filterModifiedAtStart Only include API keys modified on or after the specified date. (optional) * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters filterModifiedAtStart(String filterModifiedAtStart) { @@ -1350,9 +1040,7 @@ public ListAPIKeysOptionalParameters filterModifiedAtStart(String filterModified /** * Set filterModifiedAtEnd. - * - * @param filterModifiedAtEnd Only include API keys modified on or before the specified date. - * (optional) + * @param filterModifiedAtEnd Only include API keys modified on or before the specified date. (optional) * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters filterModifiedAtEnd(String filterModifiedAtEnd) { @@ -1362,10 +1050,7 @@ public ListAPIKeysOptionalParameters filterModifiedAtEnd(String filterModifiedAt /** * Set include. - * - * @param include Comma separated list of resource paths for related resources to include in the - * response. Supported resource paths are created_by and modified_by - * . (optional) + * @param include Comma separated list of resource paths for related resources to include in the response. Supported resource paths are created_by and modified_by. (optional) * @return ListAPIKeysOptionalParameters */ public ListAPIKeysOptionalParameters include(String include) { @@ -1375,70 +1060,66 @@ public ListAPIKeysOptionalParameters include(String include) { } /** - * Get all API keys. - * - *

See {@link #listAPIKeysWithHttpInfo}. - * - * @return APIKeysResponse - * @throws ApiException if fails to make API call - */ - public APIKeysResponse listAPIKeys() throws ApiException { + * Get all API keys. + * + * See {@link #listAPIKeysWithHttpInfo}. + * + * @return APIKeysResponse + * @throws ApiException if fails to make API call + */ + public APIKeysResponse listAPIKeys () throws ApiException { return listAPIKeysWithHttpInfo(new ListAPIKeysOptionalParameters()).getData(); } /** - * Get all API keys. - * - *

See {@link #listAPIKeysWithHttpInfoAsync}. - * - * @return CompletableFuture<APIKeysResponse> - */ - public CompletableFuture listAPIKeysAsync() { - return listAPIKeysWithHttpInfoAsync(new ListAPIKeysOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all API keys. + * + * See {@link #listAPIKeysWithHttpInfoAsync}. + * + * @return CompletableFuture<APIKeysResponse> + */ + public CompletableFuturelistAPIKeysAsync() { + return listAPIKeysWithHttpInfoAsync(new ListAPIKeysOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all API keys. - * - *

See {@link #listAPIKeysWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return APIKeysResponse - * @throws ApiException if fails to make API call - */ + * Get all API keys. + * + * See {@link #listAPIKeysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return APIKeysResponse + * @throws ApiException if fails to make API call + */ public APIKeysResponse listAPIKeys(ListAPIKeysOptionalParameters parameters) throws ApiException { return listAPIKeysWithHttpInfo(parameters).getData(); } /** - * Get all API keys. - * - *

See {@link #listAPIKeysWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<APIKeysResponse> - */ - public CompletableFuture listAPIKeysAsync( - ListAPIKeysOptionalParameters parameters) { - return listAPIKeysWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all API keys. + * + * See {@link #listAPIKeysWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<APIKeysResponse> + */ + public CompletableFuturelistAPIKeysAsync(ListAPIKeysOptionalParameters parameters) { + return listAPIKeysWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List all API keys available for your account. + *

List all API keys available for your account.

* * @param parameters Optional parameters for the request. * @return ApiResponse<APIKeysResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1447,8 +1128,7 @@ public CompletableFuture listAPIKeysAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listAPIKeysWithHttpInfo( - ListAPIKeysOptionalParameters parameters) throws ApiException { + public ApiResponse listAPIKeysWithHttpInfo(ListAPIKeysOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1462,6 +1142,7 @@ public ApiResponse listAPIKeysWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/api_keys"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1469,46 +1150,25 @@ public ApiResponse listAPIKeysWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[modified_at][start]", filterModifiedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[modified_at][end]", filterModifiedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[modified_at][start]", filterModifiedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[modified_at][end]", filterModifiedAtEnd)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.listAPIKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.listAPIKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all API keys. * - *

See {@link #listAPIKeysWithHttpInfo}. + * See {@link #listAPIKeysWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<APIKeysResponse>> */ - public CompletableFuture> listAPIKeysWithHttpInfoAsync( - ListAPIKeysOptionalParameters parameters) { + public CompletableFuture> listAPIKeysWithHttpInfoAsync(ListAPIKeysOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1522,6 +1182,7 @@ public CompletableFuture> listAPIKeysWithHttpInfoAs // create path and map variables String localVarPath = "/api/v2/api_keys"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1529,44 +1190,26 @@ public CompletableFuture> listAPIKeysWithHttpInfoAs localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[modified_at][start]", filterModifiedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[modified_at][end]", filterModifiedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[modified_at][start]", filterModifiedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[modified_at][end]", filterModifiedAtEnd)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.listAPIKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.listAPIKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listApplicationKeys. */ + /** + * Manage optional parameters to listApplicationKeys. + */ public static class ListApplicationKeysOptionalParameters { private Long pageSize; private Long pageNumber; @@ -1577,9 +1220,7 @@ public static class ListApplicationKeysOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListApplicationKeysOptionalParameters */ public ListApplicationKeysOptionalParameters pageSize(Long pageSize) { @@ -1589,7 +1230,6 @@ public ListApplicationKeysOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListApplicationKeysOptionalParameters */ @@ -1600,10 +1240,7 @@ public ListApplicationKeysOptionalParameters pageNumber(Long pageNumber) { /** * Set sort. - * - * @param sort Application key attribute used to sort results. Sort order is ascending by - * default. In order to specify a descending sort, prefix the attribute with a minus sign. - * (optional, default to "name") + * @param sort Application key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign. (optional, default to "name") * @return ListApplicationKeysOptionalParameters */ public ListApplicationKeysOptionalParameters sort(ApplicationKeysSort sort) { @@ -1613,7 +1250,6 @@ public ListApplicationKeysOptionalParameters sort(ApplicationKeysSort sort) { /** * Set filter. - * * @param filter Filter application keys by the specified string. (optional) * @return ListApplicationKeysOptionalParameters */ @@ -1624,9 +1260,7 @@ public ListApplicationKeysOptionalParameters filter(String filter) { /** * Set filterCreatedAtStart. - * - * @param filterCreatedAtStart Only include application keys created on or after the specified - * date. (optional) + * @param filterCreatedAtStart Only include application keys created on or after the specified date. (optional) * @return ListApplicationKeysOptionalParameters */ public ListApplicationKeysOptionalParameters filterCreatedAtStart(String filterCreatedAtStart) { @@ -1636,9 +1270,7 @@ public ListApplicationKeysOptionalParameters filterCreatedAtStart(String filterC /** * Set filterCreatedAtEnd. - * - * @param filterCreatedAtEnd Only include application keys created on or before the specified - * date. (optional) + * @param filterCreatedAtEnd Only include application keys created on or before the specified date. (optional) * @return ListApplicationKeysOptionalParameters */ public ListApplicationKeysOptionalParameters filterCreatedAtEnd(String filterCreatedAtEnd) { @@ -1648,71 +1280,66 @@ public ListApplicationKeysOptionalParameters filterCreatedAtEnd(String filterCre } /** - * Get all application keys. - * - *

See {@link #listApplicationKeysWithHttpInfo}. - * - * @return ListApplicationKeysResponse - * @throws ApiException if fails to make API call - */ - public ListApplicationKeysResponse listApplicationKeys() throws ApiException { + * Get all application keys. + * + * See {@link #listApplicationKeysWithHttpInfo}. + * + * @return ListApplicationKeysResponse + * @throws ApiException if fails to make API call + */ + public ListApplicationKeysResponse listApplicationKeys () throws ApiException { return listApplicationKeysWithHttpInfo(new ListApplicationKeysOptionalParameters()).getData(); } /** - * Get all application keys. - * - *

See {@link #listApplicationKeysWithHttpInfoAsync}. - * - * @return CompletableFuture<ListApplicationKeysResponse> - */ - public CompletableFuture listApplicationKeysAsync() { - return listApplicationKeysWithHttpInfoAsync(new ListApplicationKeysOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all application keys. + * + * See {@link #listApplicationKeysWithHttpInfoAsync}. + * + * @return CompletableFuture<ListApplicationKeysResponse> + */ + public CompletableFuturelistApplicationKeysAsync() { + return listApplicationKeysWithHttpInfoAsync(new ListApplicationKeysOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all application keys. - * - *

See {@link #listApplicationKeysWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return ListApplicationKeysResponse - * @throws ApiException if fails to make API call - */ - public ListApplicationKeysResponse listApplicationKeys( - ListApplicationKeysOptionalParameters parameters) throws ApiException { + * Get all application keys. + * + * See {@link #listApplicationKeysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListApplicationKeysResponse + * @throws ApiException if fails to make API call + */ + public ListApplicationKeysResponse listApplicationKeys(ListApplicationKeysOptionalParameters parameters) throws ApiException { return listApplicationKeysWithHttpInfo(parameters).getData(); } /** - * Get all application keys. - * - *

See {@link #listApplicationKeysWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListApplicationKeysResponse> - */ - public CompletableFuture listApplicationKeysAsync( - ListApplicationKeysOptionalParameters parameters) { - return listApplicationKeysWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all application keys. + * + * See {@link #listApplicationKeysWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListApplicationKeysResponse> + */ + public CompletableFuturelistApplicationKeysAsync(ListApplicationKeysOptionalParameters parameters) { + return listApplicationKeysWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List all application keys available for your org + *

List all application keys available for your org

* * @param parameters Optional parameters for the request. * @return ApiResponse<ListApplicationKeysResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1722,8 +1349,7 @@ public CompletableFuture listApplicationKeysAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listApplicationKeysWithHttpInfo( - ListApplicationKeysOptionalParameters parameters) throws ApiException { + public ApiResponse listApplicationKeysWithHttpInfo(ListApplicationKeysOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1734,6 +1360,7 @@ public ApiResponse listApplicationKeysWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/application_keys"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1741,41 +1368,22 @@ public ApiResponse listApplicationKeysWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.listApplicationKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.listApplicationKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all application keys. * - *

See {@link #listApplicationKeysWithHttpInfo}. + * See {@link #listApplicationKeysWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<ListApplicationKeysResponse>> */ - public CompletableFuture> - listApplicationKeysWithHttpInfoAsync(ListApplicationKeysOptionalParameters parameters) { + public CompletableFuture> listApplicationKeysWithHttpInfoAsync(ListApplicationKeysOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1786,6 +1394,7 @@ public ApiResponse listApplicationKeysWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/application_keys"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1793,40 +1402,23 @@ public ApiResponse listApplicationKeysWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.listApplicationKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.listApplicationKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listCurrentUserApplicationKeys. */ + /** + * Manage optional parameters to listCurrentUserApplicationKeys. + */ public static class ListCurrentUserApplicationKeysOptionalParameters { private Long pageSize; private Long pageNumber; @@ -1837,9 +1429,7 @@ public static class ListCurrentUserApplicationKeysOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListCurrentUserApplicationKeysOptionalParameters */ public ListCurrentUserApplicationKeysOptionalParameters pageSize(Long pageSize) { @@ -1849,7 +1439,6 @@ public ListCurrentUserApplicationKeysOptionalParameters pageSize(Long pageSize) /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListCurrentUserApplicationKeysOptionalParameters */ @@ -1860,10 +1449,7 @@ public ListCurrentUserApplicationKeysOptionalParameters pageNumber(Long pageNumb /** * Set sort. - * - * @param sort Application key attribute used to sort results. Sort order is ascending by - * default. In order to specify a descending sort, prefix the attribute with a minus sign. - * (optional, default to "name") + * @param sort Application key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign. (optional, default to "name") * @return ListCurrentUserApplicationKeysOptionalParameters */ public ListCurrentUserApplicationKeysOptionalParameters sort(ApplicationKeysSort sort) { @@ -1873,7 +1459,6 @@ public ListCurrentUserApplicationKeysOptionalParameters sort(ApplicationKeysSort /** * Set filter. - * * @param filter Filter application keys by the specified string. (optional) * @return ListCurrentUserApplicationKeysOptionalParameters */ @@ -1884,100 +1469,86 @@ public ListCurrentUserApplicationKeysOptionalParameters filter(String filter) { /** * Set filterCreatedAtStart. - * - * @param filterCreatedAtStart Only include application keys created on or after the specified - * date. (optional) + * @param filterCreatedAtStart Only include application keys created on or after the specified date. (optional) * @return ListCurrentUserApplicationKeysOptionalParameters */ - public ListCurrentUserApplicationKeysOptionalParameters filterCreatedAtStart( - String filterCreatedAtStart) { + public ListCurrentUserApplicationKeysOptionalParameters filterCreatedAtStart(String filterCreatedAtStart) { this.filterCreatedAtStart = filterCreatedAtStart; return this; } /** * Set filterCreatedAtEnd. - * - * @param filterCreatedAtEnd Only include application keys created on or before the specified - * date. (optional) + * @param filterCreatedAtEnd Only include application keys created on or before the specified date. (optional) * @return ListCurrentUserApplicationKeysOptionalParameters */ - public ListCurrentUserApplicationKeysOptionalParameters filterCreatedAtEnd( - String filterCreatedAtEnd) { + public ListCurrentUserApplicationKeysOptionalParameters filterCreatedAtEnd(String filterCreatedAtEnd) { this.filterCreatedAtEnd = filterCreatedAtEnd; return this; } } /** - * Get all application keys owned by current user. - * - *

See {@link #listCurrentUserApplicationKeysWithHttpInfo}. - * - * @return ListApplicationKeysResponse - * @throws ApiException if fails to make API call - */ - public ListApplicationKeysResponse listCurrentUserApplicationKeys() throws ApiException { - return listCurrentUserApplicationKeysWithHttpInfo( - new ListCurrentUserApplicationKeysOptionalParameters()) - .getData(); + * Get all application keys owned by current user. + * + * See {@link #listCurrentUserApplicationKeysWithHttpInfo}. + * + * @return ListApplicationKeysResponse + * @throws ApiException if fails to make API call + */ + public ListApplicationKeysResponse listCurrentUserApplicationKeys () throws ApiException { + return listCurrentUserApplicationKeysWithHttpInfo(new ListCurrentUserApplicationKeysOptionalParameters()).getData(); } /** - * Get all application keys owned by current user. - * - *

See {@link #listCurrentUserApplicationKeysWithHttpInfoAsync}. - * - * @return CompletableFuture<ListApplicationKeysResponse> - */ - public CompletableFuture listCurrentUserApplicationKeysAsync() { - return listCurrentUserApplicationKeysWithHttpInfoAsync( - new ListCurrentUserApplicationKeysOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all application keys owned by current user. + * + * See {@link #listCurrentUserApplicationKeysWithHttpInfoAsync}. + * + * @return CompletableFuture<ListApplicationKeysResponse> + */ + public CompletableFuturelistCurrentUserApplicationKeysAsync() { + return listCurrentUserApplicationKeysWithHttpInfoAsync(new ListCurrentUserApplicationKeysOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all application keys owned by current user. - * - *

See {@link #listCurrentUserApplicationKeysWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return ListApplicationKeysResponse - * @throws ApiException if fails to make API call - */ - public ListApplicationKeysResponse listCurrentUserApplicationKeys( - ListCurrentUserApplicationKeysOptionalParameters parameters) throws ApiException { + * Get all application keys owned by current user. + * + * See {@link #listCurrentUserApplicationKeysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListApplicationKeysResponse + * @throws ApiException if fails to make API call + */ + public ListApplicationKeysResponse listCurrentUserApplicationKeys(ListCurrentUserApplicationKeysOptionalParameters parameters) throws ApiException { return listCurrentUserApplicationKeysWithHttpInfo(parameters).getData(); } /** - * Get all application keys owned by current user. - * - *

See {@link #listCurrentUserApplicationKeysWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListApplicationKeysResponse> - */ - public CompletableFuture listCurrentUserApplicationKeysAsync( - ListCurrentUserApplicationKeysOptionalParameters parameters) { - return listCurrentUserApplicationKeysWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all application keys owned by current user. + * + * See {@link #listCurrentUserApplicationKeysWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListApplicationKeysResponse> + */ + public CompletableFuturelistCurrentUserApplicationKeysAsync(ListCurrentUserApplicationKeysOptionalParameters parameters) { + return listCurrentUserApplicationKeysWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List all application keys available for current user + *

List all application keys available for current user

* * @param parameters Optional parameters for the request. * @return ApiResponse<ListApplicationKeysResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1987,8 +1558,7 @@ public CompletableFuture listCurrentUserApplication * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listCurrentUserApplicationKeysWithHttpInfo( - ListCurrentUserApplicationKeysOptionalParameters parameters) throws ApiException { + public ApiResponse listCurrentUserApplicationKeysWithHttpInfo(ListCurrentUserApplicationKeysOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1999,6 +1569,7 @@ public ApiResponse listCurrentUserApplicationKeysWi // create path and map variables String localVarPath = "/api/v2/current_user/application_keys"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2006,42 +1577,22 @@ public ApiResponse listCurrentUserApplicationKeysWi localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.listCurrentUserApplicationKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.listCurrentUserApplicationKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all application keys owned by current user. * - *

See {@link #listCurrentUserApplicationKeysWithHttpInfo}. + * See {@link #listCurrentUserApplicationKeysWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<ListApplicationKeysResponse>> */ - public CompletableFuture> - listCurrentUserApplicationKeysWithHttpInfoAsync( - ListCurrentUserApplicationKeysOptionalParameters parameters) { + public CompletableFuture> listCurrentUserApplicationKeysWithHttpInfoAsync(ListCurrentUserApplicationKeysOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -2052,6 +1603,7 @@ public ApiResponse listCurrentUserApplicationKeysWi // create path and map variables String localVarPath = "/api/v2/current_user/application_keys"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2059,81 +1611,59 @@ public ApiResponse listCurrentUserApplicationKeysWi localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.listCurrentUserApplicationKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.listCurrentUserApplicationKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an API key. - * - *

See {@link #updateAPIKeyWithHttpInfo}. - * - * @param apiKeyId The ID of the API key. (required) - * @param body (required) - * @return APIKeyResponse - * @throws ApiException if fails to make API call - */ - public APIKeyResponse updateAPIKey(String apiKeyId, APIKeyUpdateRequest body) - throws ApiException { + * Edit an API key. + * + * See {@link #updateAPIKeyWithHttpInfo}. + * + * @param apiKeyId The ID of the API key. (required) + * @param body (required) + * @return APIKeyResponse + * @throws ApiException if fails to make API call + */ + public APIKeyResponse updateAPIKey(String apiKeyId, APIKeyUpdateRequest body) throws ApiException { return updateAPIKeyWithHttpInfo(apiKeyId, body).getData(); } /** - * Edit an API key. - * - *

See {@link #updateAPIKeyWithHttpInfoAsync}. - * - * @param apiKeyId The ID of the API key. (required) - * @param body (required) - * @return CompletableFuture<APIKeyResponse> - */ - public CompletableFuture updateAPIKeyAsync( - String apiKeyId, APIKeyUpdateRequest body) { - return updateAPIKeyWithHttpInfoAsync(apiKeyId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an API key. + * + * See {@link #updateAPIKeyWithHttpInfoAsync}. + * + * @param apiKeyId The ID of the API key. (required) + * @param body (required) + * @return CompletableFuture<APIKeyResponse> + */ + public CompletableFutureupdateAPIKeyAsync(String apiKeyId, APIKeyUpdateRequest body) { + return updateAPIKeyWithHttpInfoAsync(apiKeyId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update an API key. + *

Update an API key.

* * @param apiKeyId The ID of the API key. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<APIKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2143,153 +1673,113 @@ public CompletableFuture updateAPIKeyAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateAPIKeyWithHttpInfo( - String apiKeyId, APIKeyUpdateRequest body) throws ApiException { + public ApiResponse updateAPIKeyWithHttpInfo(String apiKeyId, APIKeyUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'apiKeyId' is set if (apiKeyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'apiKeyId' when calling updateAPIKey"); + throw new ApiException(400, "Missing the required parameter 'apiKeyId' when calling updateAPIKey"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateAPIKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateAPIKey"); } // create path and map variables - String localVarPath = - "/api/v2/api_keys/{api_key_id}" - .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + String localVarPath = "/api/v2/api_keys/{api_key_id}" + .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.updateAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.updateAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an API key. * - *

See {@link #updateAPIKeyWithHttpInfo}. + * See {@link #updateAPIKeyWithHttpInfo}. * * @param apiKeyId The ID of the API key. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<APIKeyResponse>> */ - public CompletableFuture> updateAPIKeyWithHttpInfoAsync( - String apiKeyId, APIKeyUpdateRequest body) { + public CompletableFuture> updateAPIKeyWithHttpInfoAsync(String apiKeyId, APIKeyUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'apiKeyId' is set if (apiKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'apiKeyId' when calling updateAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'apiKeyId' when calling updateAPIKey")); + 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 updateAPIKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateAPIKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/api_keys/{api_key_id}" - .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + String localVarPath = "/api/v2/api_keys/{api_key_id}" + .replaceAll("\\{" + "api_key_id" + "\\}", apiClient.escapeString(apiKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.updateAPIKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.updateAPIKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an application key. - * - *

See {@link #updateApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @param body (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse updateApplicationKey( - String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { + * Edit an application key. + * + * See {@link #updateApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @param body (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse updateApplicationKey(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { return updateApplicationKeyWithHttpInfo(appKeyId, body).getData(); } /** - * Edit an application key. - * - *

See {@link #updateApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @param body (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture updateApplicationKeyAsync( - String appKeyId, ApplicationKeyUpdateRequest body) { - return updateApplicationKeyWithHttpInfoAsync(appKeyId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an application key. + * + * See {@link #updateApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @param body (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFutureupdateApplicationKeyAsync(String appKeyId, ApplicationKeyUpdateRequest body) { + return updateApplicationKeyWithHttpInfoAsync(appKeyId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit an application key + *

Edit an application key

* * @param appKeyId The ID of the application key. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2299,154 +1789,113 @@ public CompletableFuture updateApplicationKeyAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateApplicationKeyWithHttpInfo( - String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { + public ApiResponse updateApplicationKeyWithHttpInfo(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'appKeyId' when calling updateApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling updateApplicationKey"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.updateApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.updateApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an application key. * - *

See {@link #updateApplicationKeyWithHttpInfo}. + * See {@link #updateApplicationKeyWithHttpInfo}. * * @param appKeyId The ID of the application key. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - updateApplicationKeyWithHttpInfoAsync(String appKeyId, ApplicationKeyUpdateRequest body) { + public CompletableFuture> updateApplicationKeyWithHttpInfoAsync(String appKeyId, ApplicationKeyUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'appKeyId' when calling updateApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling updateApplicationKey")); + 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 updateApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.updateApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.updateApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an application key owned by current user. - * - *

See {@link #updateCurrentUserApplicationKeyWithHttpInfo}. - * - * @param appKeyId The ID of the application key. (required) - * @param body (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse updateCurrentUserApplicationKey( - String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { + * Edit an application key owned by current user. + * + * See {@link #updateCurrentUserApplicationKeyWithHttpInfo}. + * + * @param appKeyId The ID of the application key. (required) + * @param body (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse updateCurrentUserApplicationKey(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { return updateCurrentUserApplicationKeyWithHttpInfo(appKeyId, body).getData(); } /** - * Edit an application key owned by current user. - * - *

See {@link #updateCurrentUserApplicationKeyWithHttpInfoAsync}. - * - * @param appKeyId The ID of the application key. (required) - * @param body (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture updateCurrentUserApplicationKeyAsync( - String appKeyId, ApplicationKeyUpdateRequest body) { - return updateCurrentUserApplicationKeyWithHttpInfoAsync(appKeyId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an application key owned by current user. + * + * See {@link #updateCurrentUserApplicationKeyWithHttpInfoAsync}. + * + * @param appKeyId The ID of the application key. (required) + * @param body (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFutureupdateCurrentUserApplicationKeyAsync(String appKeyId, ApplicationKeyUpdateRequest body) { + return updateCurrentUserApplicationKeyWithHttpInfoAsync(appKeyId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit an application key owned by current user + *

Edit an application key owned by current user

* * @param appKeyId The ID of the application key. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2456,116 +1905,71 @@ public CompletableFuture updateCurrentUserApplicationKey * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateCurrentUserApplicationKeyWithHttpInfo( - String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { + public ApiResponse updateCurrentUserApplicationKeyWithHttpInfo(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling updateCurrentUserApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling updateCurrentUserApplicationKey"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling updateCurrentUserApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateCurrentUserApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/current_user/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/current_user/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.KeyManagementApi.updateCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.KeyManagementApi.updateCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an application key owned by current user. * - *

See {@link #updateCurrentUserApplicationKeyWithHttpInfo}. + * See {@link #updateCurrentUserApplicationKeyWithHttpInfo}. * * @param appKeyId The ID of the application key. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - updateCurrentUserApplicationKeyWithHttpInfoAsync( - String appKeyId, ApplicationKeyUpdateRequest body) { + public CompletableFuture> updateCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId, ApplicationKeyUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " updateCurrentUserApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling updateCurrentUserApplicationKey")); + 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" - + " updateCurrentUserApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateCurrentUserApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/current_user/application_keys/{app_key_id}" - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/current_user/application_keys/{app_key_id}" + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.KeyManagementApi.updateCurrentUserApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.KeyManagementApi.updateCurrentUserApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/LogsApi.java b/src/main/java/com/datadog/api/client/v2/api/LogsApi.java index d3bf6658566..823ddfcf676 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LogsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LogsApi.java @@ -1,35 +1,41 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.ContentEncoding; -import com.datadog.api.client.v2.model.HTTPLogItem; -import com.datadog.api.client.v2.model.Log; -import com.datadog.api.client.v2.model.LogsAggregateRequest; -import com.datadog.api.client.v2.model.LogsAggregateResponse; -import com.datadog.api.client.v2.model.LogsListRequest; -import com.datadog.api.client.v2.model.LogsListRequestPage; -import com.datadog.api.client.v2.model.LogsListResponse; -import com.datadog.api.client.v2.model.LogsSort; -import com.datadog.api.client.v2.model.LogsStorageTier; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.ContentEncoding; +import com.datadog.api.client.v2.model.HTTPLogItem; +import com.datadog.api.client.v2.model.LogsAggregateResponse; +import com.datadog.api.client.v2.model.LogsAggregateRequest; +import com.datadog.api.client.v2.model.LogsListResponse; +import com.datadog.api.client.v2.model.LogsStorageTier; +import com.datadog.api.client.v2.model.LogsSort; +import com.datadog.api.client.v2.model.LogsListRequest; +import com.datadog.api.client.v2.model.Log; +import com.datadog.api.client.v2.model.LogsListRequest; +import com.datadog.api.client.v2.model.LogsListRequestPage; +import com.datadog.api.client.v2.model.Log; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsApi { private ApiClient apiClient; - public LogsApi() { this(ApiClient.getDefaultApiClient()); } @@ -57,42 +63,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Aggregate events. - * - *

See {@link #aggregateLogsWithHttpInfo}. - * - * @param body (required) - * @return LogsAggregateResponse - * @throws ApiException if fails to make API call - */ - public LogsAggregateResponse aggregateLogs(LogsAggregateRequest body) throws ApiException { + * Aggregate events. + * + * See {@link #aggregateLogsWithHttpInfo}. + * + * @param body (required) + * @return LogsAggregateResponse + * @throws ApiException if fails to make API call + */ + public LogsAggregateResponse aggregateLogs(LogsAggregateRequest body) throws ApiException { return aggregateLogsWithHttpInfo(body).getData(); } /** - * Aggregate events. - * - *

See {@link #aggregateLogsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<LogsAggregateResponse> - */ - public CompletableFuture aggregateLogsAsync(LogsAggregateRequest body) { - return aggregateLogsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Aggregate events. + * + * See {@link #aggregateLogsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<LogsAggregateResponse> + */ + public CompletableFutureaggregateLogsAsync(LogsAggregateRequest body) { + return aggregateLogsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * The API endpoint to aggregate events into buckets and compute metrics and timeseries. + *

The API endpoint to aggregate events into buckets and compute metrics and timeseries.

* - * @param body (required) + * @param body (required) * @return ApiResponse<LogsAggregateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -101,100 +106,68 @@ public CompletableFuture aggregateLogsAsync(LogsAggregate * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse aggregateLogsWithHttpInfo(LogsAggregateRequest body) - throws ApiException { + public ApiResponse aggregateLogsWithHttpInfo(LogsAggregateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateLogs"); + throw new ApiException(400, "Missing the required parameter 'body' when calling aggregateLogs"); } // create path and map variables String localVarPath = "/api/v2/logs/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsApi.aggregateLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsApi.aggregateLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Aggregate events. * - *

See {@link #aggregateLogsWithHttpInfo}. + * See {@link #aggregateLogsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<LogsAggregateResponse>> */ - public CompletableFuture> aggregateLogsWithHttpInfoAsync( - LogsAggregateRequest body) { + public CompletableFuture> aggregateLogsWithHttpInfoAsync(LogsAggregateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateLogs")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling aggregateLogs")); + return result; } // create path and map variables String localVarPath = "/api/v2/logs/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsApi.aggregateLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsApi.aggregateLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listLogs. */ + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to listLogs. + */ public static class ListLogsOptionalParameters { private LogsListRequest body; /** * Set body. - * - * @param body (optional) + * @param body (optional) * @return ListLogsOptionalParameters */ public ListLogsOptionalParameters body(LogsListRequest body) { @@ -204,135 +177,125 @@ public ListLogsOptionalParameters body(LogsListRequest body) { } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfo}. - * - * @return LogsListResponse - * @throws ApiException if fails to make API call - */ - public LogsListResponse listLogs() throws ApiException { + * Search logs. + * + * See {@link #listLogsWithHttpInfo}. + * + * @return LogsListResponse + * @throws ApiException if fails to make API call + */ + public LogsListResponse listLogs () throws ApiException { return listLogsWithHttpInfo(new ListLogsOptionalParameters()).getData(); } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsListResponse> - */ - public CompletableFuture listLogsAsync() { - return listLogsWithHttpInfoAsync(new ListLogsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Search logs. + * + * See {@link #listLogsWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsListResponse> + */ + public CompletableFuturelistLogsAsync() { + return listLogsWithHttpInfoAsync(new ListLogsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return LogsListResponse - * @throws ApiException if fails to make API call - */ + * Search logs. + * + * See {@link #listLogsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LogsListResponse + * @throws ApiException if fails to make API call + */ public LogsListResponse listLogs(ListLogsOptionalParameters parameters) throws ApiException { return listLogsWithHttpInfo(parameters).getData(); } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LogsListResponse> - */ - public CompletableFuture listLogsAsync(ListLogsOptionalParameters parameters) { - return listLogsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Search logs. + * + * See {@link #listLogsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LogsListResponse> + */ + public CompletableFuturelistLogsAsync(ListLogsOptionalParameters parameters) { + return listLogsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfo}. - * - * @return PaginationIterable<Log> - */ + * Search logs. + * + * See {@link #listLogsWithHttpInfo}. + * + * @return PaginationIterable<Log> + */ public PaginationIterable listLogsWithPagination() { ListLogsOptionalParameters parameters = new ListLogsOptionalParameters(); return listLogsWithPagination(parameters); } /** - * Search logs. - * - *

See {@link #listLogsWithHttpInfo}. - * - * @return LogsListResponse - */ + * Search logs. + * + * See {@link #listLogsWithHttpInfo}. + * + * @return LogsListResponse + */ public PaginationIterable listLogsWithPagination(ListLogsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.body == null) { parameters.body(new LogsListRequest()); - } + } - if (parameters.body.getPage() == null) { + if(parameters.body.getPage() == null) { parameters.body.setPage(new LogsListRequestPage()); - } + } + + - if (parameters.body.getPage().getLimit() == null) { + + if (parameters.body.getPage().getLimit() == null) { limit = 10; parameters.body.getPage().setLimit(limit); - } else { + } else { limit = parameters.body.getPage().getLimit(); - } + } - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - PaginationIterable iterator = - new PaginationIterable( - this, - "listLogs", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); + PaginationIterable iterator = new PaginationIterable(this, "listLogs", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - return iterator; + return iterator; } + /** - * List endpoint returns logs that match a log search query. Results are paginated. - * - *

Use this endpoint to build complex logs filtering and search. - * - *

If you are considering archiving logs for your organization, consider use of the - * Datadog archive capabilities instead of the log list API. See Datadog Logs Archive - * documentation. + *

List endpoint returns logs that match a log search query. + * Results are paginated.

+ *

Use this endpoint to build complex logs filtering and search.

+ *

If you are considering archiving logs for your organization, + * consider use of the Datadog archive capabilities instead of the log list API. + * See Datadog Logs Archive documentation.

* * @param parameters Optional parameters for the request. * @return ApiResponse<LogsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -341,78 +304,50 @@ public PaginationIterable listLogsWithPagination(ListLogsOptionalParameters * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listLogsWithHttpInfo(ListLogsOptionalParameters parameters) - throws ApiException { + public ApiResponse listLogsWithHttpInfo(ListLogsOptionalParameters parameters) throws ApiException { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/logs/events/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsApi.listLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsApi.listLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search logs. * - *

See {@link #listLogsWithHttpInfo}. + * See {@link #listLogsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<LogsListResponse>> */ - public CompletableFuture> listLogsWithHttpInfoAsync( - ListLogsOptionalParameters parameters) { + public CompletableFuture> listLogsWithHttpInfoAsync(ListLogsOptionalParameters parameters) { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/logs/events/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsApi.listLogs", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsApi.listLogs", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listLogsGet. */ + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to listLogsGet. + */ public static class ListLogsGetOptionalParameters { private String filterQuery; private String filterIndex; @@ -425,7 +360,6 @@ public static class ListLogsGetOptionalParameters { /** * Set filterQuery. - * * @param filterQuery Search query following logs syntax. (optional) * @return ListLogsGetOptionalParameters */ @@ -436,9 +370,7 @@ public ListLogsGetOptionalParameters filterQuery(String filterQuery) { /** * Set filterIndex. - * - * @param filterIndex For customers with multiple indexes, the indexes to search Defaults to '*' - * which means all indexes (optional) + * @param filterIndex For customers with multiple indexes, the indexes to search Defaults to '*' which means all indexes (optional) * @return ListLogsGetOptionalParameters */ public ListLogsGetOptionalParameters filterIndex(String filterIndex) { @@ -448,7 +380,6 @@ public ListLogsGetOptionalParameters filterIndex(String filterIndex) { /** * Set filterFrom. - * * @param filterFrom Minimum timestamp for requested logs. (optional) * @return ListLogsGetOptionalParameters */ @@ -459,7 +390,6 @@ public ListLogsGetOptionalParameters filterFrom(OffsetDateTime filterFrom) { /** * Set filterTo. - * * @param filterTo Maximum timestamp for requested logs. (optional) * @return ListLogsGetOptionalParameters */ @@ -470,9 +400,7 @@ public ListLogsGetOptionalParameters filterTo(OffsetDateTime filterTo) { /** * Set filterStorageTier. - * - * @param filterStorageTier Specifies the storage type to be used (optional, default to - * "indexes") + * @param filterStorageTier Specifies the storage type to be used (optional, default to "indexes") * @return ListLogsGetOptionalParameters */ public ListLogsGetOptionalParameters filterStorageTier(LogsStorageTier filterStorageTier) { @@ -482,7 +410,6 @@ public ListLogsGetOptionalParameters filterStorageTier(LogsStorageTier filterSto /** * Set sort. - * * @param sort Order of logs in results. (optional) * @return ListLogsGetOptionalParameters */ @@ -493,9 +420,7 @@ public ListLogsGetOptionalParameters sort(LogsSort sort) { /** * Set pageCursor. - * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor List following results with a cursor provided in the previous query. (optional) * @return ListLogsGetOptionalParameters */ public ListLogsGetOptionalParameters pageCursor(String pageCursor) { @@ -505,7 +430,6 @@ public ListLogsGetOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. - * * @param pageLimit Maximum number of logs in the response. (optional, default to 10) * @return ListLogsGetOptionalParameters */ @@ -516,130 +440,115 @@ public ListLogsGetOptionalParameters pageLimit(Integer pageLimit) { } /** - * Get a list of logs. - * - *

See {@link #listLogsGetWithHttpInfo}. - * - * @return LogsListResponse - * @throws ApiException if fails to make API call - */ - public LogsListResponse listLogsGet() throws ApiException { + * Get a list of logs. + * + * See {@link #listLogsGetWithHttpInfo}. + * + * @return LogsListResponse + * @throws ApiException if fails to make API call + */ + public LogsListResponse listLogsGet () throws ApiException { return listLogsGetWithHttpInfo(new ListLogsGetOptionalParameters()).getData(); } /** - * Get a list of logs. - * - *

See {@link #listLogsGetWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsListResponse> - */ - public CompletableFuture listLogsGetAsync() { - return listLogsGetWithHttpInfoAsync(new ListLogsGetOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of logs. + * + * See {@link #listLogsGetWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsListResponse> + */ + public CompletableFuturelistLogsGetAsync() { + return listLogsGetWithHttpInfoAsync(new ListLogsGetOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of logs. - * - *

See {@link #listLogsGetWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return LogsListResponse - * @throws ApiException if fails to make API call - */ - public LogsListResponse listLogsGet(ListLogsGetOptionalParameters parameters) - throws ApiException { + * Get a list of logs. + * + * See {@link #listLogsGetWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LogsListResponse + * @throws ApiException if fails to make API call + */ + public LogsListResponse listLogsGet(ListLogsGetOptionalParameters parameters) throws ApiException { return listLogsGetWithHttpInfo(parameters).getData(); } /** - * Get a list of logs. - * - *

See {@link #listLogsGetWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LogsListResponse> - */ - public CompletableFuture listLogsGetAsync( - ListLogsGetOptionalParameters parameters) { - return listLogsGetWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of logs. + * + * See {@link #listLogsGetWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LogsListResponse> + */ + public CompletableFuturelistLogsGetAsync(ListLogsGetOptionalParameters parameters) { + return listLogsGetWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of logs. - * - *

See {@link #listLogsGetWithHttpInfo}. - * - * @return PaginationIterable<Log> - */ + * Get a list of logs. + * + * See {@link #listLogsGetWithHttpInfo}. + * + * @return PaginationIterable<Log> + */ public PaginationIterable listLogsGetWithPagination() { ListLogsGetOptionalParameters parameters = new ListLogsGetOptionalParameters(); return listLogsGetWithPagination(parameters); } /** - * Get a list of logs. - * - *

See {@link #listLogsGetWithHttpInfo}. - * - * @return LogsListResponse - */ - public PaginationIterable listLogsGetWithPagination( - ListLogsGetOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a list of logs. + * + * See {@link #listLogsGetWithHttpInfo}. + * + * @return LogsListResponse + */ + public PaginationIterable listLogsGetWithPagination(ListLogsGetOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - PaginationIterable iterator = - new PaginationIterable( - this, - "listLogsGet", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); + PaginationIterable iterator = new PaginationIterable(this, "listLogsGet", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - return iterator; + return iterator; } + /** - * List endpoint returns logs that match a log search query. Results are paginated. - * - *

Use this endpoint to see your latest logs. - * - *

If you are considering archiving logs for your organization, consider use of the - * Datadog archive capabilities instead of the log list API. See Datadog Logs Archive - * documentation. + *

List endpoint returns logs that match a log search query. + * Results are paginated.

+ *

Use this endpoint to see your latest logs.

+ *

If you are considering archiving logs for your organization, + * consider use of the Datadog archive capabilities instead of the log list API. + * See Datadog Logs Archive documentation.

* * @param parameters Optional parameters for the request. * @return ApiResponse<LogsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -648,8 +557,7 @@ public PaginationIterable listLogsGetWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listLogsGetWithHttpInfo( - ListLogsGetOptionalParameters parameters) throws ApiException { + public ApiResponse listLogsGetWithHttpInfo(ListLogsGetOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; String filterIndex = parameters.filterIndex; @@ -662,6 +570,7 @@ public ApiResponse listLogsGetWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/logs/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -669,42 +578,24 @@ public ApiResponse listLogsGetWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[index]", filterIndex)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[storage_tier]", filterStorageTier)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[storage_tier]", filterStorageTier)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsApi.listLogsGet", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.LogsApi.listLogsGet", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of logs. * - *

See {@link #listLogsGetWithHttpInfo}. + * See {@link #listLogsGetWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<LogsListResponse>> */ - public CompletableFuture> listLogsGetWithHttpInfoAsync( - ListLogsGetOptionalParameters parameters) { + public CompletableFuture> listLogsGetWithHttpInfoAsync(ListLogsGetOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; String filterIndex = parameters.filterIndex; @@ -717,6 +608,7 @@ public CompletableFuture> listLogsGetWithHttpInfoA // create path and map variables String localVarPath = "/api/v2/logs/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -724,47 +616,31 @@ public CompletableFuture> listLogsGetWithHttpInfoA localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[index]", filterIndex)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[storage_tier]", filterStorageTier)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[storage_tier]", filterStorageTier)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsApi.listLogsGet", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsApi.listLogsGet", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to submitLog. */ + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to submitLog. + */ public static class SubmitLogOptionalParameters { private ContentEncoding contentEncoding; private String ddtags; /** * Set contentEncoding. - * * @param contentEncoding HTTP header used to compress the media-type. (optional) * @return SubmitLogOptionalParameters */ @@ -775,9 +651,7 @@ public SubmitLogOptionalParameters contentEncoding(ContentEncoding contentEncodi /** * Set ddtags. - * - * @param ddtags Log tags can be passed as query parameters with text/plain content - * type. (optional) + * @param ddtags Log tags can be passed as query parameters with text/plain content type. (optional) * @return SubmitLogOptionalParameters */ public SubmitLogOptionalParameters ddtags(String ddtags) { @@ -787,100 +661,92 @@ public SubmitLogOptionalParameters ddtags(String ddtags) { } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfo}. - * - * @param body Log to send (JSON format). (required) - * @return Object - * @throws ApiException if fails to make API call - */ - public Object submitLog(List body) throws ApiException { - return submitLogWithHttpInfo(body, new SubmitLogOptionalParameters()).getData(); + * Send logs. + * + * See {@link #submitLogWithHttpInfo}. + * + * @param body Log to send (JSON format). (required) + * @return Object + * @throws ApiException if fails to make API call + */ + public Object submitLog (List body) throws ApiException { + return submitLogWithHttpInfo( body, new SubmitLogOptionalParameters()).getData(); } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfoAsync}. - * - * @param body Log to send (JSON format). (required) - * @return CompletableFuture<Object> - */ - public CompletableFuture submitLogAsync(List body) { - return submitLogWithHttpInfoAsync(body, new SubmitLogOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Send logs. + * + * See {@link #submitLogWithHttpInfoAsync}. + * + * @param body Log to send (JSON format). (required) + * @return CompletableFuture<Object> + */ + public CompletableFuturesubmitLogAsync(List body) { + return submitLogWithHttpInfoAsync(body, new SubmitLogOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfo}. - * - * @param body Log to send (JSON format). (required) - * @param parameters Optional parameters for the request. - * @return Object - * @throws ApiException if fails to make API call - */ - public Object submitLog(List body, SubmitLogOptionalParameters parameters) - throws ApiException { + * Send logs. + * + * See {@link #submitLogWithHttpInfo}. + * + * @param body Log to send (JSON format). (required) + * @param parameters Optional parameters for the request. + * @return Object + * @throws ApiException if fails to make API call + */ + public Object submitLog(List body, SubmitLogOptionalParameters parameters) throws ApiException { return submitLogWithHttpInfo(body, parameters).getData(); } /** - * Send logs. - * - *

See {@link #submitLogWithHttpInfoAsync}. - * - * @param body Log to send (JSON format). (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<Object> - */ - public CompletableFuture submitLogAsync( - List body, SubmitLogOptionalParameters parameters) { - return submitLogWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Send logs. + * + * See {@link #submitLogWithHttpInfoAsync}. + * + * @param body Log to send (JSON format). (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Object> + */ + public CompletableFuturesubmitLogAsync( List body, SubmitLogOptionalParameters parameters) { + return submitLogWithHttpInfoAsync(body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Send your logs to your Datadog platform over HTTP. Limits per HTTP request are: - * + *

Send your logs to your Datadog platform over HTTP. Limits per HTTP request are:

*
    - *
  • Maximum content size per payload (uncompressed): 5MB - *
  • Maximum size for a single log: 1MB - *
  • Maximum array size if sending multiple logs in an array: 1000 entries + *
  • Maximum content size per payload (uncompressed): 5MB
  • + *
  • Maximum size for a single log: 1MB
  • + *
  • Maximum array size if sending multiple logs in an array: 1000 entries
  • *
- * - *

Any log exceeding 1MB is accepted and truncated by Datadog: - For a single log request, the - * API truncates the log at 1MB and returns a 2xx. - For a multi-logs request, the API processes - * all logs, truncates only logs larger than 1MB, and returns a 2xx. - * - *

Datadog recommends sending your logs compressed. Add the Content-Encoding: gzip - * header to the request when sending compressed logs. Log events can be submitted up to 18 hours - * in the past and 2 hours in the future. - * - *

The status codes answered by the HTTP API are: - 202: Accepted: the request has been - * accepted for processing - 400: Bad request (likely an issue in the payload formatting) - 401: - * Unauthorized (likely a missing API Key) - 403: Permission issue (likely using an invalid API - * Key) - 408: Request Timeout, request should be retried after some time - 413: Payload too large - * (batch is above 5MB uncompressed) - 429: Too Many Requests, request should be retried after - * some time - 500: Internal Server Error, the server encountered an unexpected condition that - * prevented it from fulfilling the request, request should be retried after some time - 503: - * Service Unavailable, the server is not ready to handle the request probably because it is - * overloaded, request should be retried after some time + *

Any log exceeding 1MB is accepted and truncated by Datadog: + * - For a single log request, the API truncates the log at 1MB and returns a 2xx. + * - For a multi-logs request, the API processes all logs, truncates only logs larger than 1MB, and returns a 2xx.

+ *

Datadog recommends sending your logs compressed. + * Add the Content-Encoding: gzip header to the request when sending compressed logs. + * Log events can be submitted up to 18 hours in the past and 2 hours in the future.

+ *

The status codes answered by the HTTP API are: + * - 202: Accepted: the request has been accepted for processing + * - 400: Bad request (likely an issue in the payload formatting) + * - 401: Unauthorized (likely a missing API Key) + * - 403: Permission issue (likely using an invalid API Key) + * - 408: Request Timeout, request should be retried after some time + * - 413: Payload too large (batch is above 5MB uncompressed) + * - 429: Too Many Requests, request should be retried after some time + * - 500: Internal Server Error, the server encountered an unexpected condition that prevented it from fulfilling the request, request should be retried after some time + * - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time

* * @param body Log to send (JSON format). (required) * @param parameters Optional parameters for the request. * @return ApiResponse<Object> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -894,8 +760,7 @@ public CompletableFuture submitLogAsync( * *
Response details
Status Code Description Response Headers
202 Request accepted for processing (always 202 empty JSON). -
503 Service Unavailable -
*/ - public ApiResponse submitLogWithHttpInfo( - List body, SubmitLogOptionalParameters parameters) throws ApiException { + public ApiResponse submitLogWithHttpInfo(List body, SubmitLogOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -907,89 +772,55 @@ public ApiResponse submitLogWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "ddtags", ddtags)); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsApi.submitLog", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json", "application/logplex-1", "text/plain"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsApi.submitLog", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json", "application/logplex-1", "text/plain" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Send logs. * - *

See {@link #submitLogWithHttpInfo}. + * See {@link #submitLogWithHttpInfo}. * * @param body Log to send (JSON format). (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<Object>> */ - public CompletableFuture> submitLogWithHttpInfoAsync( - List body, SubmitLogOptionalParameters parameters) { + public CompletableFuture> submitLogWithHttpInfoAsync(List body, SubmitLogOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling submitLog")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling submitLog")); + return result; } ContentEncoding contentEncoding = parameters.contentEncoding; String ddtags = parameters.ddtags; // create path and map variables String localVarPath = "/api/v2/logs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "ddtags", ddtags)); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsApi.submitLog", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsApi.submitLog", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json", "application/logplex-1", "text/plain"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json", "application/logplex-1", "text/plain" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/LogsArchivesApi.java b/src/main/java/com/datadog/api/client/v2/api/LogsArchivesApi.java index 27c03a0bf3e..6a1451a02f8 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LogsArchivesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LogsArchivesApi.java @@ -1,27 +1,35 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.LogsArchive; -import com.datadog.api.client.v2.model.LogsArchiveCreateRequest; -import com.datadog.api.client.v2.model.LogsArchiveOrder; -import com.datadog.api.client.v2.model.LogsArchives; -import com.datadog.api.client.v2.model.RelationshipToRole; -import com.datadog.api.client.v2.model.RolesResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.LogsArchiveOrder; +import com.datadog.api.client.v2.model.LogsArchives; +import com.datadog.api.client.v2.model.LogsArchive; +import com.datadog.api.client.v2.model.LogsArchiveCreateRequest; +import com.datadog.api.client.v2.model.RelationshipToRole; +import com.datadog.api.client.v2.model.RolesResponse; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchivesApi { private ApiClient apiClient; - public LogsArchivesApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,46 +57,43 @@ public void setApiClient(ApiClient apiClient) { } /** - * Grant role to an archive. - * - *

See {@link #addReadRoleToArchiveWithHttpInfo}. - * - * @param archiveId The ID of the archive. (required) - * @param body (required) - * @throws ApiException if fails to make API call - */ - public void addReadRoleToArchive(String archiveId, RelationshipToRole body) throws ApiException { + * Grant role to an archive. + * + * See {@link #addReadRoleToArchiveWithHttpInfo}. + * + * @param archiveId The ID of the archive. (required) + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void addReadRoleToArchive(String archiveId, RelationshipToRole body) throws ApiException { addReadRoleToArchiveWithHttpInfo(archiveId, body); } /** - * Grant role to an archive. - * - *

See {@link #addReadRoleToArchiveWithHttpInfoAsync}. - * - * @param archiveId The ID of the archive. (required) - * @param body (required) - * @return CompletableFuture - */ - public CompletableFuture addReadRoleToArchiveAsync( - String archiveId, RelationshipToRole body) { - return addReadRoleToArchiveWithHttpInfoAsync(archiveId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Grant role to an archive. + * + * See {@link #addReadRoleToArchiveWithHttpInfoAsync}. + * + * @param archiveId The ID of the archive. (required) + * @param body (required) + * @return CompletableFuture + */ + public CompletableFutureaddReadRoleToArchiveAsync(String archiveId, RelationshipToRole body) { + return addReadRoleToArchiveWithHttpInfoAsync(archiveId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Adds a read role to an archive. (Roles - * API) + *

Adds a read role to an archive. (Roles API)

* * @param archiveId The ID of the archive. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -98,149 +103,110 @@ public CompletableFuture addReadRoleToArchiveAsync( * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse addReadRoleToArchiveWithHttpInfo( - String archiveId, RelationshipToRole body) throws ApiException { + public ApiResponse addReadRoleToArchiveWithHttpInfo(String archiveId, RelationshipToRole body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'archiveId' is set if (archiveId == null) { - throw new ApiException( - 400, "Missing the required parameter 'archiveId' when calling addReadRoleToArchive"); + throw new ApiException(400, "Missing the required parameter 'archiveId' when calling addReadRoleToArchive"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling addReadRoleToArchive"); + throw new ApiException(400, "Missing the required parameter 'body' when calling addReadRoleToArchive"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}/readers" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}/readers" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.addReadRoleToArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.addReadRoleToArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** * Grant role to an archive. * - *

See {@link #addReadRoleToArchiveWithHttpInfo}. + * See {@link #addReadRoleToArchiveWithHttpInfo}. * * @param archiveId The ID of the archive. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> addReadRoleToArchiveWithHttpInfoAsync( - String archiveId, RelationshipToRole body) { + public CompletableFuture> addReadRoleToArchiveWithHttpInfoAsync(String archiveId, RelationshipToRole body) { Object localVarPostBody = body; // verify the required parameter 'archiveId' is set if (archiveId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'archiveId' when calling addReadRoleToArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'archiveId' when calling addReadRoleToArchive")); + 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 addReadRoleToArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling addReadRoleToArchive")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}/readers" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}/readers" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.addReadRoleToArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.addReadRoleToArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** - * Create an archive. - * - *

See {@link #createLogsArchiveWithHttpInfo}. - * - * @param body The definition of the new archive. (required) - * @return LogsArchive - * @throws ApiException if fails to make API call - */ - public LogsArchive createLogsArchive(LogsArchiveCreateRequest body) throws ApiException { + * Create an archive. + * + * See {@link #createLogsArchiveWithHttpInfo}. + * + * @param body The definition of the new archive. (required) + * @return LogsArchive + * @throws ApiException if fails to make API call + */ + public LogsArchive createLogsArchive(LogsArchiveCreateRequest body) throws ApiException { return createLogsArchiveWithHttpInfo(body).getData(); } /** - * Create an archive. - * - *

See {@link #createLogsArchiveWithHttpInfoAsync}. - * - * @param body The definition of the new archive. (required) - * @return CompletableFuture<LogsArchive> - */ - public CompletableFuture createLogsArchiveAsync(LogsArchiveCreateRequest body) { - return createLogsArchiveWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an archive. + * + * See {@link #createLogsArchiveWithHttpInfoAsync}. + * + * @param body The definition of the new archive. (required) + * @return CompletableFuture<LogsArchive> + */ + public CompletableFuturecreateLogsArchiveAsync(LogsArchiveCreateRequest body) { + return createLogsArchiveWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an archive in your organization. + *

Create an archive in your organization.

* * @param body The definition of the new archive. (required) * @return ApiResponse<LogsArchive> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -249,128 +215,94 @@ public CompletableFuture createLogsArchiveAsync(LogsArchiveCreateRe * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createLogsArchiveWithHttpInfo(LogsArchiveCreateRequest body) - throws ApiException { + public ApiResponse createLogsArchiveWithHttpInfo(LogsArchiveCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsArchive"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createLogsArchive"); } // create path and map variables String localVarPath = "/api/v2/logs/config/archives"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.createLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.createLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an archive. * - *

See {@link #createLogsArchiveWithHttpInfo}. + * See {@link #createLogsArchiveWithHttpInfo}. * * @param body The definition of the new archive. (required) * @return CompletableFuture<ApiResponse<LogsArchive>> */ - public CompletableFuture> createLogsArchiveWithHttpInfoAsync( - LogsArchiveCreateRequest body) { + public CompletableFuture> createLogsArchiveWithHttpInfoAsync(LogsArchiveCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createLogsArchive")); + return result; } // create path and map variables String localVarPath = "/api/v2/logs/config/archives"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.createLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.createLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an archive. - * - *

See {@link #deleteLogsArchiveWithHttpInfo}. - * - * @param archiveId The ID of the archive. (required) - * @throws ApiException if fails to make API call - */ - public void deleteLogsArchive(String archiveId) throws ApiException { + * Delete an archive. + * + * See {@link #deleteLogsArchiveWithHttpInfo}. + * + * @param archiveId The ID of the archive. (required) + * @throws ApiException if fails to make API call + */ + public void deleteLogsArchive(String archiveId) throws ApiException { deleteLogsArchiveWithHttpInfo(archiveId); } /** - * Delete an archive. - * - *

See {@link #deleteLogsArchiveWithHttpInfoAsync}. - * - * @param archiveId The ID of the archive. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteLogsArchiveAsync(String archiveId) { - return deleteLogsArchiveWithHttpInfoAsync(archiveId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an archive. + * + * See {@link #deleteLogsArchiveWithHttpInfoAsync}. + * + * @param archiveId The ID of the archive. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteLogsArchiveAsync(String archiveId) { + return deleteLogsArchiveWithHttpInfoAsync(archiveId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given archive from your organization. + *

Delete a given archive from your organization.

* * @param archiveId The ID of the archive. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -385,40 +317,24 @@ public ApiResponse deleteLogsArchiveWithHttpInfo(String archiveId) throws // verify the required parameter 'archiveId' is set if (archiveId == null) { - throw new ApiException( - 400, "Missing the required parameter 'archiveId' when calling deleteLogsArchive"); + throw new ApiException(400, "Missing the required parameter 'archiveId' when calling deleteLogsArchive"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.deleteLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.deleteLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an archive. * - *

See {@link #deleteLogsArchiveWithHttpInfo}. + * See {@link #deleteLogsArchiveWithHttpInfo}. * * @param archiveId The ID of the archive. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -428,83 +344,65 @@ public CompletableFuture> deleteLogsArchiveWithHttpInfoAsync(S // verify the required parameter 'archiveId' is set if (archiveId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'archiveId' when calling deleteLogsArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'archiveId' when calling deleteLogsArchive")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.deleteLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.deleteLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get an archive. - * - *

See {@link #getLogsArchiveWithHttpInfo}. - * - * @param archiveId The ID of the archive. (required) - * @return LogsArchive - * @throws ApiException if fails to make API call - */ - public LogsArchive getLogsArchive(String archiveId) throws ApiException { + * Get an archive. + * + * See {@link #getLogsArchiveWithHttpInfo}. + * + * @param archiveId The ID of the archive. (required) + * @return LogsArchive + * @throws ApiException if fails to make API call + */ + public LogsArchive getLogsArchive(String archiveId) throws ApiException { return getLogsArchiveWithHttpInfo(archiveId).getData(); } /** - * Get an archive. - * - *

See {@link #getLogsArchiveWithHttpInfoAsync}. - * - * @param archiveId The ID of the archive. (required) - * @return CompletableFuture<LogsArchive> - */ - public CompletableFuture getLogsArchiveAsync(String archiveId) { - return getLogsArchiveWithHttpInfoAsync(archiveId) - .thenApply( - response -> { - return response.getData(); - }); + * Get an archive. + * + * See {@link #getLogsArchiveWithHttpInfoAsync}. + * + * @param archiveId The ID of the archive. (required) + * @return CompletableFuture<LogsArchive> + */ + public CompletableFuturegetLogsArchiveAsync(String archiveId) { + return getLogsArchiveWithHttpInfoAsync(archiveId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a specific archive from your organization. + *

Get a specific archive from your organization.

* * @param archiveId The ID of the archive. (required) * @return ApiResponse<LogsArchive> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -519,124 +417,90 @@ public ApiResponse getLogsArchiveWithHttpInfo(String archiveId) thr // verify the required parameter 'archiveId' is set if (archiveId == null) { - throw new ApiException( - 400, "Missing the required parameter 'archiveId' when calling getLogsArchive"); + throw new ApiException(400, "Missing the required parameter 'archiveId' when calling getLogsArchive"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.getLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.getLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get an archive. * - *

See {@link #getLogsArchiveWithHttpInfo}. + * See {@link #getLogsArchiveWithHttpInfo}. * * @param archiveId The ID of the archive. (required) * @return CompletableFuture<ApiResponse<LogsArchive>> */ - public CompletableFuture> getLogsArchiveWithHttpInfoAsync( - String archiveId) { + public CompletableFuture> getLogsArchiveWithHttpInfoAsync(String archiveId) { Object localVarPostBody = null; // verify the required parameter 'archiveId' is set if (archiveId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'archiveId' when calling getLogsArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'archiveId' when calling getLogsArchive")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.getLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.getLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get archive order. - * - *

See {@link #getLogsArchiveOrderWithHttpInfo}. - * - * @return LogsArchiveOrder - * @throws ApiException if fails to make API call - */ - public LogsArchiveOrder getLogsArchiveOrder() throws ApiException { + * Get archive order. + * + * See {@link #getLogsArchiveOrderWithHttpInfo}. + * + * @return LogsArchiveOrder + * @throws ApiException if fails to make API call + */ + public LogsArchiveOrder getLogsArchiveOrder() throws ApiException { return getLogsArchiveOrderWithHttpInfo().getData(); } /** - * Get archive order. - * - *

See {@link #getLogsArchiveOrderWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsArchiveOrder> - */ - public CompletableFuture getLogsArchiveOrderAsync() { - return getLogsArchiveOrderWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get archive order. + * + * See {@link #getLogsArchiveOrderWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsArchiveOrder> + */ + public CompletableFuturegetLogsArchiveOrderAsync() { + return getLogsArchiveOrderWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the current order of your archives. This endpoint takes no JSON arguments. + *

Get the current order of your archives. + * This endpoint takes no JSON arguments.

* * @return ApiResponse<LogsArchiveOrder> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -649,32 +513,18 @@ public ApiResponse getLogsArchiveOrderWithHttpInfo() throws Ap // create path and map variables String localVarPath = "/api/v2/logs/config/archive-order"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.getLogsArchiveOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.getLogsArchiveOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get archive order. * - *

See {@link #getLogsArchiveOrderWithHttpInfo}. + * See {@link #getLogsArchiveOrderWithHttpInfo}. * * @return CompletableFuture<ApiResponse<LogsArchiveOrder>> */ @@ -683,72 +533,57 @@ public CompletableFuture> getLogsArchiveOrderWithH // create path and map variables String localVarPath = "/api/v2/logs/config/archive-order"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.getLogsArchiveOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.getLogsArchiveOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List read roles for an archive. - * - *

See {@link #listArchiveReadRolesWithHttpInfo}. - * - * @param archiveId The ID of the archive. (required) - * @return RolesResponse - * @throws ApiException if fails to make API call - */ - public RolesResponse listArchiveReadRoles(String archiveId) throws ApiException { + * List read roles for an archive. + * + * See {@link #listArchiveReadRolesWithHttpInfo}. + * + * @param archiveId The ID of the archive. (required) + * @return RolesResponse + * @throws ApiException if fails to make API call + */ + public RolesResponse listArchiveReadRoles(String archiveId) throws ApiException { return listArchiveReadRolesWithHttpInfo(archiveId).getData(); } /** - * List read roles for an archive. - * - *

See {@link #listArchiveReadRolesWithHttpInfoAsync}. - * - * @param archiveId The ID of the archive. (required) - * @return CompletableFuture<RolesResponse> - */ - public CompletableFuture listArchiveReadRolesAsync(String archiveId) { - return listArchiveReadRolesWithHttpInfoAsync(archiveId) - .thenApply( - response -> { - return response.getData(); - }); + * List read roles for an archive. + * + * See {@link #listArchiveReadRolesWithHttpInfoAsync}. + * + * @param archiveId The ID of the archive. (required) + * @return CompletableFuture<RolesResponse> + */ + public CompletableFuturelistArchiveReadRolesAsync(String archiveId) { + return listArchiveReadRolesWithHttpInfoAsync(archiveId).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns all read roles a given archive is restricted to. + *

Returns all read roles a given archive is restricted to.

* * @param archiveId The ID of the archive. (required) * @return ApiResponse<RolesResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -758,130 +593,94 @@ public CompletableFuture listArchiveReadRolesAsync(String archive * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listArchiveReadRolesWithHttpInfo(String archiveId) - throws ApiException { + public ApiResponse listArchiveReadRolesWithHttpInfo(String archiveId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'archiveId' is set if (archiveId == null) { - throw new ApiException( - 400, "Missing the required parameter 'archiveId' when calling listArchiveReadRoles"); + throw new ApiException(400, "Missing the required parameter 'archiveId' when calling listArchiveReadRoles"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}/readers" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}/readers" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.listArchiveReadRoles", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.listArchiveReadRoles", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List read roles for an archive. * - *

See {@link #listArchiveReadRolesWithHttpInfo}. + * See {@link #listArchiveReadRolesWithHttpInfo}. * * @param archiveId The ID of the archive. (required) * @return CompletableFuture<ApiResponse<RolesResponse>> */ - public CompletableFuture> listArchiveReadRolesWithHttpInfoAsync( - String archiveId) { + public CompletableFuture> listArchiveReadRolesWithHttpInfoAsync(String archiveId) { Object localVarPostBody = null; // verify the required parameter 'archiveId' is set if (archiveId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'archiveId' when calling listArchiveReadRoles")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'archiveId' when calling listArchiveReadRoles")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}/readers" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}/readers" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.listArchiveReadRoles", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.listArchiveReadRoles", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all archives. - * - *

See {@link #listLogsArchivesWithHttpInfo}. - * - * @return LogsArchives - * @throws ApiException if fails to make API call - */ - public LogsArchives listLogsArchives() throws ApiException { + * Get all archives. + * + * See {@link #listLogsArchivesWithHttpInfo}. + * + * @return LogsArchives + * @throws ApiException if fails to make API call + */ + public LogsArchives listLogsArchives() throws ApiException { return listLogsArchivesWithHttpInfo().getData(); } /** - * Get all archives. - * - *

See {@link #listLogsArchivesWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsArchives> - */ - public CompletableFuture listLogsArchivesAsync() { - return listLogsArchivesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all archives. + * + * See {@link #listLogsArchivesWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsArchives> + */ + public CompletableFuturelistLogsArchivesAsync() { + return listLogsArchivesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of configured logs archives with their definitions. + *

Get the list of configured logs archives with their definitions.

* * @return ApiResponse<LogsArchives> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -894,32 +693,18 @@ public ApiResponse listLogsArchivesWithHttpInfo() throws ApiExcept // create path and map variables String localVarPath = "/api/v2/logs/config/archives"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.listLogsArchives", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.listLogsArchives", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all archives. * - *

See {@link #listLogsArchivesWithHttpInfo}. + * See {@link #listLogsArchivesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<LogsArchives>> */ @@ -928,76 +713,59 @@ public CompletableFuture> listLogsArchivesWithHttpInfo // create path and map variables String localVarPath = "/api/v2/logs/config/archives"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.listLogsArchives", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.listLogsArchives", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Revoke role from an archive. - * - *

See {@link #removeRoleFromArchiveWithHttpInfo}. - * - * @param archiveId The ID of the archive. (required) - * @param body (required) - * @throws ApiException if fails to make API call - */ - public void removeRoleFromArchive(String archiveId, RelationshipToRole body) throws ApiException { + * Revoke role from an archive. + * + * See {@link #removeRoleFromArchiveWithHttpInfo}. + * + * @param archiveId The ID of the archive. (required) + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void removeRoleFromArchive(String archiveId, RelationshipToRole body) throws ApiException { removeRoleFromArchiveWithHttpInfo(archiveId, body); } /** - * Revoke role from an archive. - * - *

See {@link #removeRoleFromArchiveWithHttpInfoAsync}. - * - * @param archiveId The ID of the archive. (required) - * @param body (required) - * @return CompletableFuture - */ - public CompletableFuture removeRoleFromArchiveAsync( - String archiveId, RelationshipToRole body) { - return removeRoleFromArchiveWithHttpInfoAsync(archiveId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Revoke role from an archive. + * + * See {@link #removeRoleFromArchiveWithHttpInfoAsync}. + * + * @param archiveId The ID of the archive. (required) + * @param body (required) + * @return CompletableFuture + */ + public CompletableFutureremoveRoleFromArchiveAsync(String archiveId, RelationshipToRole body) { + return removeRoleFromArchiveWithHttpInfoAsync(archiveId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Removes a role from an archive. (Roles - * API) + *

Removes a role from an archive. (Roles API)

* * @param archiveId The ID of the archive. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -1007,159 +775,115 @@ public CompletableFuture removeRoleFromArchiveAsync( * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse removeRoleFromArchiveWithHttpInfo( - String archiveId, RelationshipToRole body) throws ApiException { + public ApiResponse removeRoleFromArchiveWithHttpInfo(String archiveId, RelationshipToRole body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'archiveId' is set if (archiveId == null) { - throw new ApiException( - 400, "Missing the required parameter 'archiveId' when calling removeRoleFromArchive"); + throw new ApiException(400, "Missing the required parameter 'archiveId' when calling removeRoleFromArchive"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling removeRoleFromArchive"); + throw new ApiException(400, "Missing the required parameter 'body' when calling removeRoleFromArchive"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}/readers" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}/readers" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.removeRoleFromArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.removeRoleFromArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** * Revoke role from an archive. * - *

See {@link #removeRoleFromArchiveWithHttpInfo}. + * See {@link #removeRoleFromArchiveWithHttpInfo}. * * @param archiveId The ID of the archive. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> removeRoleFromArchiveWithHttpInfoAsync( - String archiveId, RelationshipToRole body) { + public CompletableFuture> removeRoleFromArchiveWithHttpInfoAsync(String archiveId, RelationshipToRole body) { Object localVarPostBody = body; // verify the required parameter 'archiveId' is set if (archiveId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'archiveId' when calling removeRoleFromArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'archiveId' when calling removeRoleFromArchive")); + 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 removeRoleFromArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling removeRoleFromArchive")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}/readers" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}/readers" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.removeRoleFromArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.removeRoleFromArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, null); } /** - * Update an archive. - * - *

See {@link #updateLogsArchiveWithHttpInfo}. - * - * @param archiveId The ID of the archive. (required) - * @param body New definition of the archive. (required) - * @return LogsArchive - * @throws ApiException if fails to make API call - */ - public LogsArchive updateLogsArchive(String archiveId, LogsArchiveCreateRequest body) - throws ApiException { + * Update an archive. + * + * See {@link #updateLogsArchiveWithHttpInfo}. + * + * @param archiveId The ID of the archive. (required) + * @param body New definition of the archive. (required) + * @return LogsArchive + * @throws ApiException if fails to make API call + */ + public LogsArchive updateLogsArchive(String archiveId, LogsArchiveCreateRequest body) throws ApiException { return updateLogsArchiveWithHttpInfo(archiveId, body).getData(); } /** - * Update an archive. - * - *

See {@link #updateLogsArchiveWithHttpInfoAsync}. - * - * @param archiveId The ID of the archive. (required) - * @param body New definition of the archive. (required) - * @return CompletableFuture<LogsArchive> - */ - public CompletableFuture updateLogsArchiveAsync( - String archiveId, LogsArchiveCreateRequest body) { - return updateLogsArchiveWithHttpInfoAsync(archiveId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an archive. + * + * See {@link #updateLogsArchiveWithHttpInfoAsync}. + * + * @param archiveId The ID of the archive. (required) + * @param body New definition of the archive. (required) + * @return CompletableFuture<LogsArchive> + */ + public CompletableFutureupdateLogsArchiveAsync(String archiveId, LogsArchiveCreateRequest body) { + return updateLogsArchiveWithHttpInfoAsync(archiveId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a given archive configuration. - * - *

Note: Using this method updates your archive configuration by - * replacing your current configuration with the new one sent to your Datadog - * organization. + *

Update a given archive configuration.

+ *

Note: Using this method updates your archive configuration by replacing + * your current configuration with the new one sent to your Datadog organization.

* * @param archiveId The ID of the archive. (required) * @param body New definition of the archive. (required) * @return ApiResponse<LogsArchive> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1169,153 +893,113 @@ public CompletableFuture updateLogsArchiveAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateLogsArchiveWithHttpInfo( - String archiveId, LogsArchiveCreateRequest body) throws ApiException { + public ApiResponse updateLogsArchiveWithHttpInfo(String archiveId, LogsArchiveCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'archiveId' is set if (archiveId == null) { - throw new ApiException( - 400, "Missing the required parameter 'archiveId' when calling updateLogsArchive"); + throw new ApiException(400, "Missing the required parameter 'archiveId' when calling updateLogsArchive"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsArchive"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsArchive"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.updateLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.updateLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an archive. * - *

See {@link #updateLogsArchiveWithHttpInfo}. + * See {@link #updateLogsArchiveWithHttpInfo}. * * @param archiveId The ID of the archive. (required) * @param body New definition of the archive. (required) * @return CompletableFuture<ApiResponse<LogsArchive>> */ - public CompletableFuture> updateLogsArchiveWithHttpInfoAsync( - String archiveId, LogsArchiveCreateRequest body) { + public CompletableFuture> updateLogsArchiveWithHttpInfoAsync(String archiveId, LogsArchiveCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'archiveId' is set if (archiveId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'archiveId' when calling updateLogsArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'archiveId' when calling updateLogsArchive")); + 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 updateLogsArchive")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsArchive")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/archives/{archive_id}" - .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + String localVarPath = "/api/v2/logs/config/archives/{archive_id}" + .replaceAll("\\{" + "archive_id" + "\\}", apiClient.escapeString(archiveId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.updateLogsArchive", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.updateLogsArchive", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update archive order. - * - *

See {@link #updateLogsArchiveOrderWithHttpInfo}. - * - * @param body An object containing the new ordered list of archive IDs. (required) - * @return LogsArchiveOrder - * @throws ApiException if fails to make API call - */ - public LogsArchiveOrder updateLogsArchiveOrder(LogsArchiveOrder body) throws ApiException { + * Update archive order. + * + * See {@link #updateLogsArchiveOrderWithHttpInfo}. + * + * @param body An object containing the new ordered list of archive IDs. (required) + * @return LogsArchiveOrder + * @throws ApiException if fails to make API call + */ + public LogsArchiveOrder updateLogsArchiveOrder(LogsArchiveOrder body) throws ApiException { return updateLogsArchiveOrderWithHttpInfo(body).getData(); } /** - * Update archive order. - * - *

See {@link #updateLogsArchiveOrderWithHttpInfoAsync}. - * - * @param body An object containing the new ordered list of archive IDs. (required) - * @return CompletableFuture<LogsArchiveOrder> - */ - public CompletableFuture updateLogsArchiveOrderAsync(LogsArchiveOrder body) { - return updateLogsArchiveOrderWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Update archive order. + * + * See {@link #updateLogsArchiveOrderWithHttpInfoAsync}. + * + * @param body An object containing the new ordered list of archive IDs. (required) + * @return CompletableFuture<LogsArchiveOrder> + */ + public CompletableFutureupdateLogsArchiveOrderAsync(LogsArchiveOrder body) { + return updateLogsArchiveOrderWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the order of your archives. Since logs are processed sequentially, reordering an archive - * may change the structure and content of the data processed by other archives. - * - *

Note: Using the PUT method updates your archive's order by - * replacing the current order with the new one. + *

Update the order of your archives. Since logs are processed sequentially, reordering an archive may change + * the structure and content of the data processed by other archives.

+ *

Note: Using the PUT method updates your archive's order by replacing the current order + * with the new one.

* * @param body An object containing the new ordered list of archive IDs. (required) * @return ApiResponse<LogsArchiveOrder> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1325,89 +1009,56 @@ public CompletableFuture updateLogsArchiveOrderAsync(LogsArchi * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateLogsArchiveOrderWithHttpInfo(LogsArchiveOrder body) - throws ApiException { + public ApiResponse updateLogsArchiveOrderWithHttpInfo(LogsArchiveOrder body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsArchiveOrder"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsArchiveOrder"); } // create path and map variables String localVarPath = "/api/v2/logs/config/archive-order"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.updateLogsArchiveOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsArchivesApi.updateLogsArchiveOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update archive order. * - *

See {@link #updateLogsArchiveOrderWithHttpInfo}. + * See {@link #updateLogsArchiveOrderWithHttpInfo}. * * @param body An object containing the new ordered list of archive IDs. (required) * @return CompletableFuture<ApiResponse<LogsArchiveOrder>> */ - public CompletableFuture> updateLogsArchiveOrderWithHttpInfoAsync( - LogsArchiveOrder body) { + public CompletableFuture> updateLogsArchiveOrderWithHttpInfoAsync(LogsArchiveOrder body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsArchiveOrder")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsArchiveOrder")); + return result; } // create path and map variables String localVarPath = "/api/v2/logs/config/archive-order"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsArchivesApi.updateLogsArchiveOrder", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsArchivesApi.updateLogsArchiveOrder", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/LogsMetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/LogsMetricsApi.java index b7fb500eb35..9a6ac84751a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LogsMetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LogsMetricsApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.LogsMetricCreateRequest; -import com.datadog.api.client.v2.model.LogsMetricResponse; -import com.datadog.api.client.v2.model.LogsMetricUpdateRequest; -import com.datadog.api.client.v2.model.LogsMetricsResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.LogsMetricsResponse; +import com.datadog.api.client.v2.model.LogsMetricResponse; +import com.datadog.api.client.v2.model.LogsMetricCreateRequest; +import com.datadog.api.client.v2.model.LogsMetricUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricsApi { private ApiClient apiClient; - public LogsMetricsApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,43 +55,42 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a log-based metric. - * - *

See {@link #createLogsMetricWithHttpInfo}. - * - * @param body The definition of the new log-based metric. (required) - * @return LogsMetricResponse - * @throws ApiException if fails to make API call - */ - public LogsMetricResponse createLogsMetric(LogsMetricCreateRequest body) throws ApiException { + * Create a log-based metric. + * + * See {@link #createLogsMetricWithHttpInfo}. + * + * @param body The definition of the new log-based metric. (required) + * @return LogsMetricResponse + * @throws ApiException if fails to make API call + */ + public LogsMetricResponse createLogsMetric(LogsMetricCreateRequest body) throws ApiException { return createLogsMetricWithHttpInfo(body).getData(); } /** - * Create a log-based metric. - * - *

See {@link #createLogsMetricWithHttpInfoAsync}. - * - * @param body The definition of the new log-based metric. (required) - * @return CompletableFuture<LogsMetricResponse> - */ - public CompletableFuture createLogsMetricAsync(LogsMetricCreateRequest body) { - return createLogsMetricWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a log-based metric. + * + * See {@link #createLogsMetricWithHttpInfoAsync}. + * + * @param body The definition of the new log-based metric. (required) + * @return CompletableFuture<LogsMetricResponse> + */ + public CompletableFuturecreateLogsMetricAsync(LogsMetricCreateRequest body) { + return createLogsMetricWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a metric based on your ingested logs in your organization. Returns the log-based metric - * object from the request body when the request is successful. + *

Create a metric based on your ingested logs in your organization. + * Returns the log-based metric object from the request body when the request is successful.

* * @param body The definition of the new log-based metric. (required) * @return ApiResponse<LogsMetricResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -93,128 +100,94 @@ public CompletableFuture createLogsMetricAsync(LogsMetricCre * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createLogsMetricWithHttpInfo(LogsMetricCreateRequest body) - throws ApiException { + public ApiResponse createLogsMetricWithHttpInfo(LogsMetricCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsMetric"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createLogsMetric"); } // create path and map variables String localVarPath = "/api/v2/logs/config/metrics"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.createLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsMetricsApi.createLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a log-based metric. * - *

See {@link #createLogsMetricWithHttpInfo}. + * See {@link #createLogsMetricWithHttpInfo}. * * @param body The definition of the new log-based metric. (required) * @return CompletableFuture<ApiResponse<LogsMetricResponse>> */ - public CompletableFuture> createLogsMetricWithHttpInfoAsync( - LogsMetricCreateRequest body) { + public CompletableFuture> createLogsMetricWithHttpInfoAsync(LogsMetricCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createLogsMetric")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createLogsMetric")); + return result; } // create path and map variables String localVarPath = "/api/v2/logs/config/metrics"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.createLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsMetricsApi.createLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a log-based metric. - * - *

See {@link #deleteLogsMetricWithHttpInfo}. - * - * @param metricId The name of the log-based metric. (required) - * @throws ApiException if fails to make API call - */ - public void deleteLogsMetric(String metricId) throws ApiException { + * Delete a log-based metric. + * + * See {@link #deleteLogsMetricWithHttpInfo}. + * + * @param metricId The name of the log-based metric. (required) + * @throws ApiException if fails to make API call + */ + public void deleteLogsMetric(String metricId) throws ApiException { deleteLogsMetricWithHttpInfo(metricId); } /** - * Delete a log-based metric. - * - *

See {@link #deleteLogsMetricWithHttpInfoAsync}. - * - * @param metricId The name of the log-based metric. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteLogsMetricAsync(String metricId) { - return deleteLogsMetricWithHttpInfoAsync(metricId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a log-based metric. + * + * See {@link #deleteLogsMetricWithHttpInfoAsync}. + * + * @param metricId The name of the log-based metric. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteLogsMetricAsync(String metricId) { + return deleteLogsMetricWithHttpInfoAsync(metricId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a specific log-based metric from your organization. + *

Delete a specific log-based metric from your organization.

* * @param metricId The name of the log-based metric. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -228,40 +201,24 @@ public ApiResponse deleteLogsMetricWithHttpInfo(String metricId) throws Ap // verify the required parameter 'metricId' is set if (metricId == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricId' when calling deleteLogsMetric"); + throw new ApiException(400, "Missing the required parameter 'metricId' when calling deleteLogsMetric"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/metrics/{metric_id}" - .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + String localVarPath = "/api/v2/logs/config/metrics/{metric_id}" + .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.deleteLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsMetricsApi.deleteLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a log-based metric. * - *

See {@link #deleteLogsMetricWithHttpInfo}. + * See {@link #deleteLogsMetricWithHttpInfo}. * * @param metricId The name of the log-based metric. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -271,83 +228,65 @@ public CompletableFuture> deleteLogsMetricWithHttpInfoAsync(St // verify the required parameter 'metricId' is set if (metricId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'metricId' when calling deleteLogsMetric")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricId' when calling deleteLogsMetric")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/metrics/{metric_id}" - .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + String localVarPath = "/api/v2/logs/config/metrics/{metric_id}" + .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.deleteLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsMetricsApi.deleteLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a log-based metric. - * - *

See {@link #getLogsMetricWithHttpInfo}. - * - * @param metricId The name of the log-based metric. (required) - * @return LogsMetricResponse - * @throws ApiException if fails to make API call - */ - public LogsMetricResponse getLogsMetric(String metricId) throws ApiException { + * Get a log-based metric. + * + * See {@link #getLogsMetricWithHttpInfo}. + * + * @param metricId The name of the log-based metric. (required) + * @return LogsMetricResponse + * @throws ApiException if fails to make API call + */ + public LogsMetricResponse getLogsMetric(String metricId) throws ApiException { return getLogsMetricWithHttpInfo(metricId).getData(); } /** - * Get a log-based metric. - * - *

See {@link #getLogsMetricWithHttpInfoAsync}. - * - * @param metricId The name of the log-based metric. (required) - * @return CompletableFuture<LogsMetricResponse> - */ - public CompletableFuture getLogsMetricAsync(String metricId) { - return getLogsMetricWithHttpInfoAsync(metricId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a log-based metric. + * + * See {@link #getLogsMetricWithHttpInfoAsync}. + * + * @param metricId The name of the log-based metric. (required) + * @return CompletableFuture<LogsMetricResponse> + */ + public CompletableFuturegetLogsMetricAsync(String metricId) { + return getLogsMetricWithHttpInfoAsync(metricId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a specific log-based metric from your organization. + *

Get a specific log-based metric from your organization.

* * @param metricId The name of the log-based metric. (required) * @return ApiResponse<LogsMetricResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -356,130 +295,94 @@ public CompletableFuture getLogsMetricAsync(String metricId) * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getLogsMetricWithHttpInfo(String metricId) - throws ApiException { + public ApiResponse getLogsMetricWithHttpInfo(String metricId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricId' is set if (metricId == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricId' when calling getLogsMetric"); + throw new ApiException(400, "Missing the required parameter 'metricId' when calling getLogsMetric"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/metrics/{metric_id}" - .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + String localVarPath = "/api/v2/logs/config/metrics/{metric_id}" + .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.getLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsMetricsApi.getLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a log-based metric. * - *

See {@link #getLogsMetricWithHttpInfo}. + * See {@link #getLogsMetricWithHttpInfo}. * * @param metricId The name of the log-based metric. (required) * @return CompletableFuture<ApiResponse<LogsMetricResponse>> */ - public CompletableFuture> getLogsMetricWithHttpInfoAsync( - String metricId) { + public CompletableFuture> getLogsMetricWithHttpInfoAsync(String metricId) { Object localVarPostBody = null; // verify the required parameter 'metricId' is set if (metricId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'metricId' when calling getLogsMetric")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricId' when calling getLogsMetric")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/metrics/{metric_id}" - .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + String localVarPath = "/api/v2/logs/config/metrics/{metric_id}" + .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.getLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsMetricsApi.getLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all log-based metrics. - * - *

See {@link #listLogsMetricsWithHttpInfo}. - * - * @return LogsMetricsResponse - * @throws ApiException if fails to make API call - */ - public LogsMetricsResponse listLogsMetrics() throws ApiException { + * Get all log-based metrics. + * + * See {@link #listLogsMetricsWithHttpInfo}. + * + * @return LogsMetricsResponse + * @throws ApiException if fails to make API call + */ + public LogsMetricsResponse listLogsMetrics() throws ApiException { return listLogsMetricsWithHttpInfo().getData(); } /** - * Get all log-based metrics. - * - *

See {@link #listLogsMetricsWithHttpInfoAsync}. - * - * @return CompletableFuture<LogsMetricsResponse> - */ - public CompletableFuture listLogsMetricsAsync() { - return listLogsMetricsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all log-based metrics. + * + * See {@link #listLogsMetricsWithHttpInfoAsync}. + * + * @return CompletableFuture<LogsMetricsResponse> + */ + public CompletableFuturelistLogsMetricsAsync() { + return listLogsMetricsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of configured log-based metrics with their definitions. + *

Get the list of configured log-based metrics with their definitions.

* * @return ApiResponse<LogsMetricsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -492,32 +395,18 @@ public ApiResponse listLogsMetricsWithHttpInfo() throws Api // create path and map variables String localVarPath = "/api/v2/logs/config/metrics"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.listLogsMetrics", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsMetricsApi.listLogsMetrics", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all log-based metrics. * - *

See {@link #listLogsMetricsWithHttpInfo}. + * See {@link #listLogsMetricsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<LogsMetricsResponse>> */ @@ -526,78 +415,61 @@ public CompletableFuture> listLogsMetricsWithHt // create path and map variables String localVarPath = "/api/v2/logs/config/metrics"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.listLogsMetrics", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsMetricsApi.listLogsMetrics", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a log-based metric. - * - *

See {@link #updateLogsMetricWithHttpInfo}. - * - * @param metricId The name of the log-based metric. (required) - * @param body New definition of the log-based metric. (required) - * @return LogsMetricResponse - * @throws ApiException if fails to make API call - */ - public LogsMetricResponse updateLogsMetric(String metricId, LogsMetricUpdateRequest body) - throws ApiException { + * Update a log-based metric. + * + * See {@link #updateLogsMetricWithHttpInfo}. + * + * @param metricId The name of the log-based metric. (required) + * @param body New definition of the log-based metric. (required) + * @return LogsMetricResponse + * @throws ApiException if fails to make API call + */ + public LogsMetricResponse updateLogsMetric(String metricId, LogsMetricUpdateRequest body) throws ApiException { return updateLogsMetricWithHttpInfo(metricId, body).getData(); } /** - * Update a log-based metric. - * - *

See {@link #updateLogsMetricWithHttpInfoAsync}. - * - * @param metricId The name of the log-based metric. (required) - * @param body New definition of the log-based metric. (required) - * @return CompletableFuture<LogsMetricResponse> - */ - public CompletableFuture updateLogsMetricAsync( - String metricId, LogsMetricUpdateRequest body) { - return updateLogsMetricWithHttpInfoAsync(metricId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a log-based metric. + * + * See {@link #updateLogsMetricWithHttpInfoAsync}. + * + * @param metricId The name of the log-based metric. (required) + * @param body New definition of the log-based metric. (required) + * @return CompletableFuture<LogsMetricResponse> + */ + public CompletableFutureupdateLogsMetricAsync(String metricId, LogsMetricUpdateRequest body) { + return updateLogsMetricWithHttpInfoAsync(metricId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a specific log-based metric from your organization. Returns the log-based metric object - * from the request body when the request is successful. + *

Update a specific log-based metric from your organization. + * Returns the log-based metric object from the request body when the request is successful.

* * @param metricId The name of the log-based metric. (required) * @param body New definition of the log-based metric. (required) * @return ApiResponse<LogsMetricResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -607,109 +479,71 @@ public CompletableFuture updateLogsMetricAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateLogsMetricWithHttpInfo( - String metricId, LogsMetricUpdateRequest body) throws ApiException { + public ApiResponse updateLogsMetricWithHttpInfo(String metricId, LogsMetricUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'metricId' is set if (metricId == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricId' when calling updateLogsMetric"); + throw new ApiException(400, "Missing the required parameter 'metricId' when calling updateLogsMetric"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLogsMetric"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateLogsMetric"); } // create path and map variables - String localVarPath = - "/api/v2/logs/config/metrics/{metric_id}" - .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + String localVarPath = "/api/v2/logs/config/metrics/{metric_id}" + .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.updateLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.LogsMetricsApi.updateLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a log-based metric. * - *

See {@link #updateLogsMetricWithHttpInfo}. + * See {@link #updateLogsMetricWithHttpInfo}. * * @param metricId The name of the log-based metric. (required) * @param body New definition of the log-based metric. (required) * @return CompletableFuture<ApiResponse<LogsMetricResponse>> */ - public CompletableFuture> updateLogsMetricWithHttpInfoAsync( - String metricId, LogsMetricUpdateRequest body) { + public CompletableFuture> updateLogsMetricWithHttpInfoAsync(String metricId, LogsMetricUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'metricId' is set if (metricId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'metricId' when calling updateLogsMetric")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricId' when calling updateLogsMetric")); + 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 updateLogsMetric")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateLogsMetric")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/logs/config/metrics/{metric_id}" - .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + String localVarPath = "/api/v2/logs/config/metrics/{metric_id}" + .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.LogsMetricsApi.updateLogsMetric", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.LogsMetricsApi.updateLogsMetric", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java index ff7adfb00a8..691533bb412 100644 --- a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java @@ -1,41 +1,48 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.IntakePayloadAccepted; -import com.datadog.api.client.v2.model.MetricAllTagsResponse; -import com.datadog.api.client.v2.model.MetricBulkTagConfigCreateRequest; -import com.datadog.api.client.v2.model.MetricBulkTagConfigDeleteRequest; +import com.datadog.api.client.PaginationIterable; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.LinkedHashMap; +import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; +import com.datadog.api.client.v2.model.MetricTagConfigurationMetricTypes; import com.datadog.api.client.v2.model.MetricBulkTagConfigResponse; -import com.datadog.api.client.v2.model.MetricContentEncoding; -import com.datadog.api.client.v2.model.MetricEstimateResponse; -import com.datadog.api.client.v2.model.MetricPayload; +import com.datadog.api.client.v2.model.MetricBulkTagConfigDeleteRequest; +import com.datadog.api.client.v2.model.MetricBulkTagConfigCreateRequest; import com.datadog.api.client.v2.model.MetricSuggestedTagsAndAggregationsResponse; -import com.datadog.api.client.v2.model.MetricTagConfigurationCreateRequest; -import com.datadog.api.client.v2.model.MetricTagConfigurationMetricTypes; +import com.datadog.api.client.v2.model.MetricAllTagsResponse; +import com.datadog.api.client.v2.model.MetricEstimateResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateRequest; +import com.datadog.api.client.v2.model.MetricTagConfigurationCreateRequest; import com.datadog.api.client.v2.model.MetricVolumesResponse; -import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; -import com.datadog.api.client.v2.model.ScalarFormulaQueryRequest; import com.datadog.api.client.v2.model.ScalarFormulaQueryResponse; -import com.datadog.api.client.v2.model.TimeseriesFormulaQueryRequest; +import com.datadog.api.client.v2.model.ScalarFormulaQueryRequest; import com.datadog.api.client.v2.model.TimeseriesFormulaQueryResponse; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; +import com.datadog.api.client.v2.model.TimeseriesFormulaQueryRequest; +import com.datadog.api.client.v2.model.IntakePayloadAccepted; +import com.datadog.api.client.v2.model.MetricContentEncoding; +import com.datadog.api.client.v2.model.MetricPayload; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsApi { private ApiClient apiClient; - public MetricsApi() { this(ApiClient.getDefaultApiClient()); } @@ -63,50 +70,46 @@ public void setApiClient(ApiClient apiClient) { } /** - * Configure tags for multiple metrics. - * - *

See {@link #createBulkTagsMetricsConfigurationWithHttpInfo}. - * - * @param body (required) - * @return MetricBulkTagConfigResponse - * @throws ApiException if fails to make API call - */ - public MetricBulkTagConfigResponse createBulkTagsMetricsConfiguration( - MetricBulkTagConfigCreateRequest body) throws ApiException { + * Configure tags for multiple metrics. + * + * See {@link #createBulkTagsMetricsConfigurationWithHttpInfo}. + * + * @param body (required) + * @return MetricBulkTagConfigResponse + * @throws ApiException if fails to make API call + */ + public MetricBulkTagConfigResponse createBulkTagsMetricsConfiguration(MetricBulkTagConfigCreateRequest body) throws ApiException { return createBulkTagsMetricsConfigurationWithHttpInfo(body).getData(); } /** - * Configure tags for multiple metrics. - * - *

See {@link #createBulkTagsMetricsConfigurationWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<MetricBulkTagConfigResponse> - */ - public CompletableFuture createBulkTagsMetricsConfigurationAsync( - MetricBulkTagConfigCreateRequest body) { - return createBulkTagsMetricsConfigurationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and - * distribution metrics. Metrics are selected by passing a metric name prefix. Use the Delete - * method of this API path to remove tag configurations. Results can be sent to a set of account - * email addresses, just like the same operation in the Datadog web app. If multiple calls include - * the same metric, the last configuration applied (not by submit order) is used, do not expect - * deterministic ordering of concurrent calls. Can only be used with application keys of users - * with the Manage Tags for Metrics permission. + * Configure tags for multiple metrics. + * + * See {@link #createBulkTagsMetricsConfigurationWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<MetricBulkTagConfigResponse> + */ + public CompletableFuturecreateBulkTagsMetricsConfigurationAsync(MetricBulkTagConfigCreateRequest body) { + return createBulkTagsMetricsConfigurationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); + } + + + /** + *

Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. + * Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations. + * Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. + * If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not + * expect deterministic ordering of concurrent calls. + * Can only be used with application keys of users with the Manage Tags for Metrics permission.

* - * @param body (required) + * @param body (required) * @return ApiResponse<MetricBulkTagConfigResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -116,142 +119,101 @@ public CompletableFuture createBulkTagsMetricsConfi * *
Response details
Status Code Description Response Headers
202 Accepted -
429 Too Many Requests -
*/ - public ApiResponse createBulkTagsMetricsConfigurationWithHttpInfo( - MetricBulkTagConfigCreateRequest body) throws ApiException { + public ApiResponse createBulkTagsMetricsConfigurationWithHttpInfo(MetricBulkTagConfigCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createBulkTagsMetricsConfiguration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createBulkTagsMetricsConfiguration"); } // create path and map variables String localVarPath = "/api/v2/metrics/config/bulk-tags"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.createBulkTagsMetricsConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.createBulkTagsMetricsConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Configure tags for multiple metrics. * - *

See {@link #createBulkTagsMetricsConfigurationWithHttpInfo}. + * See {@link #createBulkTagsMetricsConfigurationWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<MetricBulkTagConfigResponse>> */ - public CompletableFuture> - createBulkTagsMetricsConfigurationWithHttpInfoAsync(MetricBulkTagConfigCreateRequest body) { + public CompletableFuture> createBulkTagsMetricsConfigurationWithHttpInfoAsync(MetricBulkTagConfigCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createBulkTagsMetricsConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createBulkTagsMetricsConfiguration")); + return result; } // create path and map variables String localVarPath = "/api/v2/metrics/config/bulk-tags"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.createBulkTagsMetricsConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.createBulkTagsMetricsConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a tag configuration. - * - *

See {@link #createTagConfigurationWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @param body (required) - * @return MetricTagConfigurationResponse - * @throws ApiException if fails to make API call - */ - public MetricTagConfigurationResponse createTagConfiguration( - String metricName, MetricTagConfigurationCreateRequest body) throws ApiException { + * Create a tag configuration. + * + * See {@link #createTagConfigurationWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return MetricTagConfigurationResponse + * @throws ApiException if fails to make API call + */ + public MetricTagConfigurationResponse createTagConfiguration(String metricName, MetricTagConfigurationCreateRequest body) throws ApiException { return createTagConfigurationWithHttpInfo(metricName, body).getData(); } /** - * Create a tag configuration. - * - *

See {@link #createTagConfigurationWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @param body (required) - * @return CompletableFuture<MetricTagConfigurationResponse> - */ - public CompletableFuture createTagConfigurationAsync( - String metricName, MetricTagConfigurationCreateRequest body) { - return createTagConfigurationWithHttpInfoAsync(metricName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a tag configuration. + * + * See {@link #createTagConfigurationWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return CompletableFuture<MetricTagConfigurationResponse> + */ + public CompletableFuturecreateTagConfigurationAsync(String metricName, MetricTagConfigurationCreateRequest body) { + return createTagConfigurationWithHttpInfoAsync(metricName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution - * metric. Optionally, include percentile aggregations on any distribution metric or configure - * custom aggregations on any count, rate, or gauge metric. Can only be used with application keys - * of users with the Manage Tags for Metrics permission. + *

Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. + * Optionally, include percentile aggregations on any distribution metric or configure custom aggregations + * on any count, rate, or gauge metric. + * Can only be used with application keys of users with the Manage Tags for Metrics permission.

* * @param metricName The name of the metric. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<MetricTagConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -261,162 +223,113 @@ public CompletableFuture createTagConfigurationA * *
Response details
Status Code Description Response Headers
201 Created -
429 Too Many Requests -
*/ - public ApiResponse createTagConfigurationWithHttpInfo( - String metricName, MetricTagConfigurationCreateRequest body) throws ApiException { + public ApiResponse createTagConfigurationWithHttpInfo(String metricName, MetricTagConfigurationCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling createTagConfiguration"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling createTagConfiguration"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createTagConfiguration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createTagConfiguration"); } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.createTagConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.createTagConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a tag configuration. * - *

See {@link #createTagConfigurationWithHttpInfo}. + * See {@link #createTagConfigurationWithHttpInfo}. * * @param metricName The name of the metric. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<MetricTagConfigurationResponse>> */ - public CompletableFuture> - createTagConfigurationWithHttpInfoAsync( - String metricName, MetricTagConfigurationCreateRequest body) { + public CompletableFuture> createTagConfigurationWithHttpInfoAsync(String metricName, MetricTagConfigurationCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling createTagConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling createTagConfiguration")); + 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 createTagConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createTagConfiguration")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.createTagConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.createTagConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Configure tags for multiple metrics. - * - *

See {@link #deleteBulkTagsMetricsConfigurationWithHttpInfo}. - * - * @param body (required) - * @return MetricBulkTagConfigResponse - * @throws ApiException if fails to make API call - */ - public MetricBulkTagConfigResponse deleteBulkTagsMetricsConfiguration( - MetricBulkTagConfigDeleteRequest body) throws ApiException { + * Configure tags for multiple metrics. + * + * See {@link #deleteBulkTagsMetricsConfigurationWithHttpInfo}. + * + * @param body (required) + * @return MetricBulkTagConfigResponse + * @throws ApiException if fails to make API call + */ + public MetricBulkTagConfigResponse deleteBulkTagsMetricsConfiguration(MetricBulkTagConfigDeleteRequest body) throws ApiException { return deleteBulkTagsMetricsConfigurationWithHttpInfo(body).getData(); } /** - * Configure tags for multiple metrics. - * - *

See {@link #deleteBulkTagsMetricsConfigurationWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<MetricBulkTagConfigResponse> - */ - public CompletableFuture deleteBulkTagsMetricsConfigurationAsync( - MetricBulkTagConfigDeleteRequest body) { - return deleteBulkTagsMetricsConfigurationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Configure tags for multiple metrics. + * + * See {@link #deleteBulkTagsMetricsConfigurationWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<MetricBulkTagConfigResponse> + */ + public CompletableFuturedeleteBulkTagsMetricsConfigurationAsync(MetricBulkTagConfigDeleteRequest body) { + return deleteBulkTagsMetricsConfigurationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and - * distribution metrics. Metrics are selected by passing a metric name prefix. Results can be sent - * to a set of account email addresses, just like the same operation in the Datadog web app. Can - * only be used with application keys of users with the Manage Tags for Metrics - * permission. + *

Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. + * Metrics are selected by passing a metric name prefix. + * Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. + * Can only be used with application keys of users with the Manage Tags for Metrics permission.

* - * @param body (required) + * @param body (required) * @return ApiResponse<MetricBulkTagConfigResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -426,134 +339,95 @@ public CompletableFuture deleteBulkTagsMetricsConfi * *
Response details
Status Code Description Response Headers
202 Accepted -
429 Too Many Requests -
*/ - public ApiResponse deleteBulkTagsMetricsConfigurationWithHttpInfo( - MetricBulkTagConfigDeleteRequest body) throws ApiException { + public ApiResponse deleteBulkTagsMetricsConfigurationWithHttpInfo(MetricBulkTagConfigDeleteRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling deleteBulkTagsMetricsConfiguration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteBulkTagsMetricsConfiguration"); } // create path and map variables String localVarPath = "/api/v2/metrics/config/bulk-tags"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.deleteBulkTagsMetricsConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.deleteBulkTagsMetricsConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Configure tags for multiple metrics. * - *

See {@link #deleteBulkTagsMetricsConfigurationWithHttpInfo}. + * See {@link #deleteBulkTagsMetricsConfigurationWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<MetricBulkTagConfigResponse>> */ - public CompletableFuture> - deleteBulkTagsMetricsConfigurationWithHttpInfoAsync(MetricBulkTagConfigDeleteRequest body) { + public CompletableFuture> deleteBulkTagsMetricsConfigurationWithHttpInfoAsync(MetricBulkTagConfigDeleteRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " deleteBulkTagsMetricsConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteBulkTagsMetricsConfiguration")); + return result; } // create path and map variables String localVarPath = "/api/v2/metrics/config/bulk-tags"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.deleteBulkTagsMetricsConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.deleteBulkTagsMetricsConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a tag configuration. - * - *

See {@link #deleteTagConfigurationWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @throws ApiException if fails to make API call - */ - public void deleteTagConfiguration(String metricName) throws ApiException { + * Delete a tag configuration. + * + * See {@link #deleteTagConfigurationWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTagConfiguration(String metricName) throws ApiException { deleteTagConfigurationWithHttpInfo(metricName); } /** - * Delete a tag configuration. - * - *

See {@link #deleteTagConfigurationWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteTagConfigurationAsync(String metricName) { - return deleteTagConfigurationWithHttpInfoAsync(metricName) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a tag configuration. + * + * See {@link #deleteTagConfigurationWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteTagConfigurationAsync(String metricName) { + return deleteTagConfigurationWithHttpInfoAsync(metricName).thenApply(response -> { + return response.getData(); + }); } + /** - * Deletes a metric's tag configuration. Can only be used with application keys from users with - * the Manage Tags for Metrics permission. + *

Deletes a metric's tag configuration. Can only be used with application + * keys from users with the Manage Tags for Metrics permission.

* * @param metricName The name of the metric. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -562,100 +436,64 @@ public CompletableFuture deleteTagConfigurationAsync(String metricName) { * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too Many Requests -
*/ - public ApiResponse deleteTagConfigurationWithHttpInfo(String metricName) - throws ApiException { + public ApiResponse deleteTagConfigurationWithHttpInfo(String metricName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling deleteTagConfiguration"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling deleteTagConfiguration"); } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.deleteTagConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.deleteTagConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a tag configuration. * - *

See {@link #deleteTagConfigurationWithHttpInfo}. + * See {@link #deleteTagConfigurationWithHttpInfo}. * * @param metricName The name of the metric. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteTagConfigurationWithHttpInfoAsync( - String metricName) { + public CompletableFuture> deleteTagConfigurationWithHttpInfoAsync(String metricName) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling deleteTagConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling deleteTagConfiguration")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.deleteTagConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.deleteTagConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); - } - - /** Manage optional parameters to estimateMetricsOutputSeries. */ + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); + } + + /** + * Manage optional parameters to estimateMetricsOutputSeries. + */ public static class EstimateMetricsOutputSeriesOptionalParameters { private String filterGroups; private Integer filterHoursAgo; @@ -665,7 +503,6 @@ public static class EstimateMetricsOutputSeriesOptionalParameters { /** * Set filterGroups. - * * @param filterGroups Filtered tag keys that the metric is configured to query with. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ @@ -676,9 +513,7 @@ public EstimateMetricsOutputSeriesOptionalParameters filterGroups(String filterG /** * Set filterHoursAgo. - * - * @param filterHoursAgo The number of hours of look back (from now) to estimate cardinality - * with. (optional) + * @param filterHoursAgo The number of hours of look back (from now) to estimate cardinality with. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ public EstimateMetricsOutputSeriesOptionalParameters filterHoursAgo(Integer filterHoursAgo) { @@ -688,23 +523,17 @@ public EstimateMetricsOutputSeriesOptionalParameters filterHoursAgo(Integer filt /** * Set filterNumAggregations. - * - * @param filterNumAggregations The number of aggregations that a count, rate - * , or gauge metric is configured to use. Max number of aggregation - * combos is 9. (optional) + * @param filterNumAggregations The number of aggregations that a count, rate, or gauge metric is configured to use. Max number of aggregation combos is 9. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ - public EstimateMetricsOutputSeriesOptionalParameters filterNumAggregations( - Integer filterNumAggregations) { + public EstimateMetricsOutputSeriesOptionalParameters filterNumAggregations(Integer filterNumAggregations) { this.filterNumAggregations = filterNumAggregations; return this; } /** * Set filterPct. - * - * @param filterPct A boolean, for distribution metrics only, to estimate cardinality if the - * metric includes additional percentile aggregators. (optional) + * @param filterPct A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ public EstimateMetricsOutputSeriesOptionalParameters filterPct(Boolean filterPct) { @@ -714,9 +543,7 @@ public EstimateMetricsOutputSeriesOptionalParameters filterPct(Boolean filterPct /** * Set filterTimespanH. - * - * @param filterTimespanH A window, in hours, from the look back to estimate cardinality with. - * (optional) + * @param filterTimespanH A window, in hours, from the look back to estimate cardinality with. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ public EstimateMetricsOutputSeriesOptionalParameters filterTimespanH(Integer filterTimespanH) { @@ -726,82 +553,71 @@ public EstimateMetricsOutputSeriesOptionalParameters filterTimespanH(Integer fil } /** - * Tag Configuration Cardinality Estimator. - * - *

See {@link #estimateMetricsOutputSeriesWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @return MetricEstimateResponse - * @throws ApiException if fails to make API call - */ - public MetricEstimateResponse estimateMetricsOutputSeries(String metricName) throws ApiException { - return estimateMetricsOutputSeriesWithHttpInfo( - metricName, new EstimateMetricsOutputSeriesOptionalParameters()) - .getData(); - } - - /** - * Tag Configuration Cardinality Estimator. - * - *

See {@link #estimateMetricsOutputSeriesWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @return CompletableFuture<MetricEstimateResponse> - */ - public CompletableFuture estimateMetricsOutputSeriesAsync( - String metricName) { - return estimateMetricsOutputSeriesWithHttpInfoAsync( - metricName, new EstimateMetricsOutputSeriesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Tag Configuration Cardinality Estimator. - * - *

See {@link #estimateMetricsOutputSeriesWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @param parameters Optional parameters for the request. - * @return MetricEstimateResponse - * @throws ApiException if fails to make API call - */ - public MetricEstimateResponse estimateMetricsOutputSeries( - String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) - throws ApiException { + * Tag Configuration Cardinality Estimator. + * + * See {@link #estimateMetricsOutputSeriesWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return MetricEstimateResponse + * @throws ApiException if fails to make API call + */ + public MetricEstimateResponse estimateMetricsOutputSeries (String metricName) throws ApiException { + return estimateMetricsOutputSeriesWithHttpInfo( metricName, new EstimateMetricsOutputSeriesOptionalParameters()).getData(); + } + + /** + * Tag Configuration Cardinality Estimator. + * + * See {@link #estimateMetricsOutputSeriesWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<MetricEstimateResponse> + */ + public CompletableFutureestimateMetricsOutputSeriesAsync(String metricName) { + return estimateMetricsOutputSeriesWithHttpInfoAsync(metricName, new EstimateMetricsOutputSeriesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Tag Configuration Cardinality Estimator. + * + * See {@link #estimateMetricsOutputSeriesWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @param parameters Optional parameters for the request. + * @return MetricEstimateResponse + * @throws ApiException if fails to make API call + */ + public MetricEstimateResponse estimateMetricsOutputSeries(String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) throws ApiException { return estimateMetricsOutputSeriesWithHttpInfo(metricName, parameters).getData(); } /** - * Tag Configuration Cardinality Estimator. - * - *

See {@link #estimateMetricsOutputSeriesWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MetricEstimateResponse> - */ - public CompletableFuture estimateMetricsOutputSeriesAsync( - String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) { - return estimateMetricsOutputSeriesWithHttpInfoAsync(metricName, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Tag Configuration Cardinality Estimator. + * + * See {@link #estimateMetricsOutputSeriesWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MetricEstimateResponse> + */ + public CompletableFutureestimateMetricsOutputSeriesAsync( String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) { + return estimateMetricsOutputSeriesWithHttpInfoAsync(metricName, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns the estimated cardinality for a metric with a given tag, percentile and number of - * aggregations configuration using Metrics without Limits™. + *

Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™.

* * @param metricName The name of the metric. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<MetricEstimateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -811,16 +627,12 @@ public CompletableFuture estimateMetricsOutputSeriesAsyn * *
Response details
Status Code Description Response Headers
200 Success -
429 Too Many Requests -
*/ - public ApiResponse estimateMetricsOutputSeriesWithHttpInfo( - String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) - throws ApiException { + public ApiResponse estimateMetricsOutputSeriesWithHttpInfo(String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'metricName' when calling estimateMetricsOutputSeries"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling estimateMetricsOutputSeries"); } String filterGroups = parameters.filterGroups; Integer filterHoursAgo = parameters.filterHoursAgo; @@ -828,65 +640,40 @@ public ApiResponse estimateMetricsOutputSeriesWithHttpIn Boolean filterPct = parameters.filterPct; Integer filterTimespanH = parameters.filterTimespanH; // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/estimate" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/estimate" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[groups]", filterGroups)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[hours_ago]", filterHoursAgo)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[num_aggregations]", filterNumAggregations)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[num_aggregations]", filterNumAggregations)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[pct]", filterPct)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[timespan_h]", filterTimespanH)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.estimateMetricsOutputSeries", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[timespan_h]", filterTimespanH)); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.estimateMetricsOutputSeries", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Tag Configuration Cardinality Estimator. * - *

See {@link #estimateMetricsOutputSeriesWithHttpInfo}. + * See {@link #estimateMetricsOutputSeriesWithHttpInfo}. * * @param metricName The name of the metric. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MetricEstimateResponse>> */ - public CompletableFuture> - estimateMetricsOutputSeriesWithHttpInfoAsync( - String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) { + public CompletableFuture> estimateMetricsOutputSeriesWithHttpInfoAsync(String metricName, EstimateMetricsOutputSeriesOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling" - + " estimateMetricsOutputSeries")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling estimateMetricsOutputSeries")); + return result; } String filterGroups = parameters.filterGroups; Integer filterHoursAgo = parameters.filterHoursAgo; @@ -894,59 +681,39 @@ public ApiResponse estimateMetricsOutputSeriesWithHttpIn Boolean filterPct = parameters.filterPct; Integer filterTimespanH = parameters.filterTimespanH; // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/estimate" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/estimate" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[groups]", filterGroups)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[hours_ago]", filterHoursAgo)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[num_aggregations]", filterNumAggregations)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[num_aggregations]", filterNumAggregations)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[pct]", filterPct)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[timespan_h]", filterTimespanH)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[timespan_h]", filterTimespanH)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.estimateMetricsOutputSeries", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.estimateMetricsOutputSeries", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listActiveMetricConfigurations. */ + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to listActiveMetricConfigurations. + */ public static class ListActiveMetricConfigurationsOptionalParameters { private Long windowSeconds; /** * Set windowSeconds. - * - * @param windowSeconds The number of seconds of look back (from now). Default value is 604,800 - * (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). - * (optional) + * @param windowSeconds The number of seconds of look back (from now). Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). (optional) * @return ListActiveMetricConfigurationsOptionalParameters */ public ListActiveMetricConfigurationsOptionalParameters windowSeconds(Long windowSeconds) { @@ -956,84 +723,71 @@ public ListActiveMetricConfigurationsOptionalParameters windowSeconds(Long windo } /** - * List active tags and aggregations. - * - *

See {@link #listActiveMetricConfigurationsWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @return MetricSuggestedTagsAndAggregationsResponse - * @throws ApiException if fails to make API call - */ - public MetricSuggestedTagsAndAggregationsResponse listActiveMetricConfigurations( - String metricName) throws ApiException { - return listActiveMetricConfigurationsWithHttpInfo( - metricName, new ListActiveMetricConfigurationsOptionalParameters()) - .getData(); - } - - /** - * List active tags and aggregations. - * - *

See {@link #listActiveMetricConfigurationsWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @return CompletableFuture<MetricSuggestedTagsAndAggregationsResponse> - */ - public CompletableFuture - listActiveMetricConfigurationsAsync(String metricName) { - return listActiveMetricConfigurationsWithHttpInfoAsync( - metricName, new ListActiveMetricConfigurationsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List active tags and aggregations. - * - *

See {@link #listActiveMetricConfigurationsWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @param parameters Optional parameters for the request. - * @return MetricSuggestedTagsAndAggregationsResponse - * @throws ApiException if fails to make API call - */ - public MetricSuggestedTagsAndAggregationsResponse listActiveMetricConfigurations( - String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) - throws ApiException { + * List active tags and aggregations. + * + * See {@link #listActiveMetricConfigurationsWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return MetricSuggestedTagsAndAggregationsResponse + * @throws ApiException if fails to make API call + */ + public MetricSuggestedTagsAndAggregationsResponse listActiveMetricConfigurations (String metricName) throws ApiException { + return listActiveMetricConfigurationsWithHttpInfo( metricName, new ListActiveMetricConfigurationsOptionalParameters()).getData(); + } + + /** + * List active tags and aggregations. + * + * See {@link #listActiveMetricConfigurationsWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<MetricSuggestedTagsAndAggregationsResponse> + */ + public CompletableFuturelistActiveMetricConfigurationsAsync(String metricName) { + return listActiveMetricConfigurationsWithHttpInfoAsync(metricName, new ListActiveMetricConfigurationsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * List active tags and aggregations. + * + * See {@link #listActiveMetricConfigurationsWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @param parameters Optional parameters for the request. + * @return MetricSuggestedTagsAndAggregationsResponse + * @throws ApiException if fails to make API call + */ + public MetricSuggestedTagsAndAggregationsResponse listActiveMetricConfigurations(String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) throws ApiException { return listActiveMetricConfigurationsWithHttpInfo(metricName, parameters).getData(); } /** - * List active tags and aggregations. - * - *

See {@link #listActiveMetricConfigurationsWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MetricSuggestedTagsAndAggregationsResponse> - */ - public CompletableFuture - listActiveMetricConfigurationsAsync( - String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) { - return listActiveMetricConfigurationsWithHttpInfoAsync(metricName, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List active tags and aggregations. + * + * See {@link #listActiveMetricConfigurationsWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MetricSuggestedTagsAndAggregationsResponse> + */ + public CompletableFuturelistActiveMetricConfigurationsAsync( String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) { + return listActiveMetricConfigurationsWithHttpInfoAsync(metricName, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List tags and aggregations that are actively queried on dashboards and monitors for a given - * metric name. + *

List tags and aggregations that are actively queried on dashboards and monitors for a given metric name.

* * @param metricName The name of the metric. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<MetricSuggestedTagsAndAggregationsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1043,83 +797,52 @@ public MetricSuggestedTagsAndAggregationsResponse listActiveMetricConfigurations * *
Response details
Status Code Description Response Headers
200 Success -
429 Too Many Requests -
*/ - public ApiResponse - listActiveMetricConfigurationsWithHttpInfo( - String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) - throws ApiException { + public ApiResponse listActiveMetricConfigurationsWithHttpInfo(String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'metricName' when calling" - + " listActiveMetricConfigurations"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling listActiveMetricConfigurations"); } Long windowSeconds = parameters.windowSeconds; // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/active-configurations" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/active-configurations" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.listActiveMetricConfigurations", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.listActiveMetricConfigurations", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List active tags and aggregations. * - *

See {@link #listActiveMetricConfigurationsWithHttpInfo}. + * See {@link #listActiveMetricConfigurationsWithHttpInfo}. * * @param metricName The name of the metric. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MetricSuggestedTagsAndAggregationsResponse>> */ - public CompletableFuture> - listActiveMetricConfigurationsWithHttpInfoAsync( - String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) { + public CompletableFuture> listActiveMetricConfigurationsWithHttpInfoAsync(String metricName, ListActiveMetricConfigurationsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling" - + " listActiveMetricConfigurations")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling listActiveMetricConfigurations")); + return result; } Long windowSeconds = parameters.windowSeconds; // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/active-configurations" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/active-configurations" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1127,71 +850,51 @@ public MetricSuggestedTagsAndAggregationsResponse listActiveMetricConfigurations Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.listActiveMetricConfigurations", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.listActiveMetricConfigurations", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List tag configuration by name. - * - *

See {@link #listTagConfigurationByNameWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @return MetricTagConfigurationResponse - * @throws ApiException if fails to make API call - */ - public MetricTagConfigurationResponse listTagConfigurationByName(String metricName) - throws ApiException { + * List tag configuration by name. + * + * See {@link #listTagConfigurationByNameWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return MetricTagConfigurationResponse + * @throws ApiException if fails to make API call + */ + public MetricTagConfigurationResponse listTagConfigurationByName(String metricName) throws ApiException { return listTagConfigurationByNameWithHttpInfo(metricName).getData(); } /** - * List tag configuration by name. - * - *

See {@link #listTagConfigurationByNameWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @return CompletableFuture<MetricTagConfigurationResponse> - */ - public CompletableFuture listTagConfigurationByNameAsync( - String metricName) { - return listTagConfigurationByNameWithHttpInfoAsync(metricName) - .thenApply( - response -> { - return response.getData(); - }); + * List tag configuration by name. + * + * See {@link #listTagConfigurationByNameWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<MetricTagConfigurationResponse> + */ + public CompletableFuturelistTagConfigurationByNameAsync(String metricName) { + return listTagConfigurationByNameWithHttpInfoAsync(metricName).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns the tag configuration for the given metric name. + *

Returns the tag configuration for the given metric name.

* * @param metricName The name of the metric. (required) * @return ApiResponse<MetricTagConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1200,104 +903,64 @@ public CompletableFuture listTagConfigurationByN * *
Response details
Status Code Description Response Headers
200 Success -
429 Too Many Requests -
*/ - public ApiResponse listTagConfigurationByNameWithHttpInfo( - String metricName) throws ApiException { + public ApiResponse listTagConfigurationByNameWithHttpInfo(String metricName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'metricName' when calling listTagConfigurationByName"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling listTagConfigurationByName"); } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.listTagConfigurationByName", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.listTagConfigurationByName", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List tag configuration by name. * - *

See {@link #listTagConfigurationByNameWithHttpInfo}. + * See {@link #listTagConfigurationByNameWithHttpInfo}. * * @param metricName The name of the metric. (required) * @return CompletableFuture<ApiResponse<MetricTagConfigurationResponse>> */ - public CompletableFuture> - listTagConfigurationByNameWithHttpInfoAsync(String metricName) { + public CompletableFuture> listTagConfigurationByNameWithHttpInfoAsync(String metricName) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling" - + " listTagConfigurationByName")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling listTagConfigurationByName")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.listTagConfigurationByName", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.listTagConfigurationByName", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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 listTagConfigurations. */ + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to listTagConfigurations. + */ public static class ListTagConfigurationsOptionalParameters { private Boolean filterConfigured; private String filterTagsConfigured; @@ -1309,7 +972,6 @@ public static class ListTagConfigurationsOptionalParameters { /** * Set filterConfigured. - * * @param filterConfigured Filter custom metrics that have configured tags. (optional) * @return ListTagConfigurationsOptionalParameters */ @@ -1320,47 +982,37 @@ public ListTagConfigurationsOptionalParameters filterConfigured(Boolean filterCo /** * Set filterTagsConfigured. - * * @param filterTagsConfigured Filter tag configurations by configured tags. (optional) * @return ListTagConfigurationsOptionalParameters */ - public ListTagConfigurationsOptionalParameters filterTagsConfigured( - String filterTagsConfigured) { + public ListTagConfigurationsOptionalParameters filterTagsConfigured(String filterTagsConfigured) { this.filterTagsConfigured = filterTagsConfigured; return this; } /** * Set filterMetricType. - * * @param filterMetricType Filter metrics by metric type. (optional, default to "gauge") * @return ListTagConfigurationsOptionalParameters */ - public ListTagConfigurationsOptionalParameters filterMetricType( - MetricTagConfigurationMetricTypes filterMetricType) { + public ListTagConfigurationsOptionalParameters filterMetricType(MetricTagConfigurationMetricTypes filterMetricType) { this.filterMetricType = filterMetricType; return this; } /** * Set filterIncludePercentiles. - * - * @param filterIncludePercentiles Filter distributions with additional percentile aggregations - * enabled or disabled. (optional) + * @param filterIncludePercentiles Filter distributions with additional percentile aggregations enabled or disabled. (optional) * @return ListTagConfigurationsOptionalParameters */ - public ListTagConfigurationsOptionalParameters filterIncludePercentiles( - Boolean filterIncludePercentiles) { + public ListTagConfigurationsOptionalParameters filterIncludePercentiles(Boolean filterIncludePercentiles) { this.filterIncludePercentiles = filterIncludePercentiles; return this; } /** * Set filterQueried. - * - * @param filterQueried Filter custom metrics that have or have not been queried in the - * specified window[seconds]. If no window is provided or the window is less than 2 hours, a - * default of 2 hours will be applied. (optional) + * @param filterQueried Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied. (optional) * @return ListTagConfigurationsOptionalParameters */ public ListTagConfigurationsOptionalParameters filterQueried(Boolean filterQueried) { @@ -1370,10 +1022,7 @@ public ListTagConfigurationsOptionalParameters filterQueried(Boolean filterQueri /** * Set filterTags. - * - * @param filterTags Filter metrics that have been submitted with the given tags. Supports - * boolean and wildcard expressions. Can only be combined with the filter[queried] filter. - * (optional) + * @param filterTags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Can only be combined with the filter[queried] filter. (optional) * @return ListTagConfigurationsOptionalParameters */ public ListTagConfigurationsOptionalParameters filterTags(String filterTags) { @@ -1383,10 +1032,7 @@ public ListTagConfigurationsOptionalParameters filterTags(String filterTags) { /** * Set windowSeconds. - * - * @param windowSeconds The number of seconds of look back (from now) to apply to a filter[tag] - * or filter[queried] query. Defaults value is 3600 (1 hour), maximum value is 1,209,600 (2 - * weeks). (optional) + * @param windowSeconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Defaults value is 3600 (1 hour), maximum value is 1,209,600 (2 weeks). (optional) * @return ListTagConfigurationsOptionalParameters */ public ListTagConfigurationsOptionalParameters windowSeconds(Long windowSeconds) { @@ -1396,73 +1042,66 @@ public ListTagConfigurationsOptionalParameters windowSeconds(Long windowSeconds) } /** - * Get a list of metrics. - * - *

See {@link #listTagConfigurationsWithHttpInfo}. - * - * @return MetricsAndMetricTagConfigurationsResponse - * @throws ApiException if fails to make API call - */ - public MetricsAndMetricTagConfigurationsResponse listTagConfigurations() throws ApiException { - return listTagConfigurationsWithHttpInfo(new ListTagConfigurationsOptionalParameters()) - .getData(); + * Get a list of metrics. + * + * See {@link #listTagConfigurationsWithHttpInfo}. + * + * @return MetricsAndMetricTagConfigurationsResponse + * @throws ApiException if fails to make API call + */ + public MetricsAndMetricTagConfigurationsResponse listTagConfigurations () throws ApiException { + return listTagConfigurationsWithHttpInfo(new ListTagConfigurationsOptionalParameters()).getData(); } /** - * Get a list of metrics. - * - *

See {@link #listTagConfigurationsWithHttpInfoAsync}. - * - * @return CompletableFuture<MetricsAndMetricTagConfigurationsResponse> - */ - public CompletableFuture listTagConfigurationsAsync() { - return listTagConfigurationsWithHttpInfoAsync(new ListTagConfigurationsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of metrics. + * + * See {@link #listTagConfigurationsWithHttpInfoAsync}. + * + * @return CompletableFuture<MetricsAndMetricTagConfigurationsResponse> + */ + public CompletableFuturelistTagConfigurationsAsync() { + return listTagConfigurationsWithHttpInfoAsync(new ListTagConfigurationsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of metrics. - * - *

See {@link #listTagConfigurationsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return MetricsAndMetricTagConfigurationsResponse - * @throws ApiException if fails to make API call - */ - public MetricsAndMetricTagConfigurationsResponse listTagConfigurations( - ListTagConfigurationsOptionalParameters parameters) throws ApiException { + * Get a list of metrics. + * + * See {@link #listTagConfigurationsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return MetricsAndMetricTagConfigurationsResponse + * @throws ApiException if fails to make API call + */ + public MetricsAndMetricTagConfigurationsResponse listTagConfigurations(ListTagConfigurationsOptionalParameters parameters) throws ApiException { return listTagConfigurationsWithHttpInfo(parameters).getData(); } /** - * Get a list of metrics. - * - *

See {@link #listTagConfigurationsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MetricsAndMetricTagConfigurationsResponse> - */ - public CompletableFuture listTagConfigurationsAsync( - ListTagConfigurationsOptionalParameters parameters) { - return listTagConfigurationsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of metrics. + * + * See {@link #listTagConfigurationsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<MetricsAndMetricTagConfigurationsResponse> + */ + public CompletableFuturelistTagConfigurationsAsync(ListTagConfigurationsOptionalParameters parameters) { + return listTagConfigurationsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns all metrics that can be configured in the Metrics Summary page or with Metrics without - * Limits™ (matching additional filters if specified). + *

Returns all metrics that can be configured in the Metrics Summary page or with Metrics without Limits™ (matching additional filters if specified).

* * @param parameters Optional parameters for the request. * @return ApiResponse<MetricsAndMetricTagConfigurationsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1471,8 +1110,7 @@ public CompletableFuture listTagConfi * *
Response details
Status Code Description Response Headers
200 Success -
429 Too Many Requests -
*/ - public ApiResponse listTagConfigurationsWithHttpInfo( - ListTagConfigurationsOptionalParameters parameters) throws ApiException { + public ApiResponse listTagConfigurationsWithHttpInfo(ListTagConfigurationsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Boolean filterConfigured = parameters.filterConfigured; String filterTagsConfigured = parameters.filterTagsConfigured; @@ -1484,51 +1122,31 @@ public ApiResponse listTagConfigurati // create path and map variables String localVarPath = "/api/v2/metrics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[configured]", filterConfigured)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[metric_type]", filterMetricType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[include_percentiles]", filterIncludePercentiles)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[configured]", filterConfigured)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metric_type]", filterMetricType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[include_percentiles]", filterIncludePercentiles)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[queried]", filterQueried)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.listTagConfigurations", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.listTagConfigurations", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of metrics. * - *

See {@link #listTagConfigurationsWithHttpInfo}. + * See {@link #listTagConfigurationsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<MetricsAndMetricTagConfigurationsResponse>> */ - public CompletableFuture> - listTagConfigurationsWithHttpInfoAsync(ListTagConfigurationsOptionalParameters parameters) { + public CompletableFuture> listTagConfigurationsWithHttpInfoAsync(ListTagConfigurationsOptionalParameters parameters) { Object localVarPostBody = null; Boolean filterConfigured = parameters.filterConfigured; String filterTagsConfigured = parameters.filterTagsConfigured; @@ -1540,86 +1158,65 @@ public ApiResponse listTagConfigurati // create path and map variables String localVarPath = "/api/v2/metrics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[configured]", filterConfigured)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[metric_type]", filterMetricType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[include_percentiles]", filterIncludePercentiles)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[configured]", filterConfigured)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metric_type]", filterMetricType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[include_percentiles]", filterIncludePercentiles)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[queried]", filterQueried)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.listTagConfigurations", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.listTagConfigurations", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List tags by metric name. - * - *

See {@link #listTagsByMetricNameWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @return MetricAllTagsResponse - * @throws ApiException if fails to make API call - */ - public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiException { + * List tags by metric name. + * + * See {@link #listTagsByMetricNameWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return MetricAllTagsResponse + * @throws ApiException if fails to make API call + */ + public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiException { return listTagsByMetricNameWithHttpInfo(metricName).getData(); } /** - * List tags by metric name. - * - *

See {@link #listTagsByMetricNameWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @return CompletableFuture<MetricAllTagsResponse> - */ - public CompletableFuture listTagsByMetricNameAsync(String metricName) { - return listTagsByMetricNameWithHttpInfoAsync(metricName) - .thenApply( - response -> { - return response.getData(); - }); + * List tags by metric name. + * + * See {@link #listTagsByMetricNameWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<MetricAllTagsResponse> + */ + public CompletableFuturelistTagsByMetricNameAsync(String metricName) { + return listTagsByMetricNameWithHttpInfoAsync(metricName).thenApply(response -> { + return response.getData(); + }); } + /** - * View indexed tag key-value pairs for a given metric name. + *

View indexed tag key-value pairs for a given metric name.

* * @param metricName The name of the metric. (required) * @return ApiResponse<MetricAllTagsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1629,139 +1226,98 @@ public CompletableFuture listTagsByMetricNameAsync(String * *
Response details
Status Code Description Response Headers
200 Success -
429 Too Many Requests -
*/ - public ApiResponse listTagsByMetricNameWithHttpInfo(String metricName) - throws ApiException { + public ApiResponse listTagsByMetricNameWithHttpInfo(String metricName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling listTagsByMetricName"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling listTagsByMetricName"); } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/all-tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/all-tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.listTagsByMetricName", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.listTagsByMetricName", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List tags by metric name. * - *

See {@link #listTagsByMetricNameWithHttpInfo}. + * See {@link #listTagsByMetricNameWithHttpInfo}. * * @param metricName The name of the metric. (required) * @return CompletableFuture<ApiResponse<MetricAllTagsResponse>> */ - public CompletableFuture> - listTagsByMetricNameWithHttpInfoAsync(String metricName) { + public CompletableFuture> listTagsByMetricNameWithHttpInfoAsync(String metricName) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling listTagsByMetricName")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling listTagsByMetricName")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/all-tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/all-tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.listTagsByMetricName", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.listTagsByMetricName", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List distinct metric volumes by metric name. - * - *

See {@link #listVolumesByMetricNameWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @return MetricVolumesResponse - * @throws ApiException if fails to make API call - */ - public MetricVolumesResponse listVolumesByMetricName(String metricName) throws ApiException { + * List distinct metric volumes by metric name. + * + * See {@link #listVolumesByMetricNameWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return MetricVolumesResponse + * @throws ApiException if fails to make API call + */ + public MetricVolumesResponse listVolumesByMetricName(String metricName) throws ApiException { return listVolumesByMetricNameWithHttpInfo(metricName).getData(); } /** - * List distinct metric volumes by metric name. - * - *

See {@link #listVolumesByMetricNameWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @return CompletableFuture<MetricVolumesResponse> - */ - public CompletableFuture listVolumesByMetricNameAsync(String metricName) { - return listVolumesByMetricNameWithHttpInfoAsync(metricName) - .thenApply( - response -> { - return response.getData(); - }); + * List distinct metric volumes by metric name. + * + * See {@link #listVolumesByMetricNameWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<MetricVolumesResponse> + */ + public CompletableFuturelistVolumesByMetricNameAsync(String metricName) { + return listVolumesByMetricNameWithHttpInfoAsync(metricName).thenApply(response -> { + return response.getData(); + }); } + /** - * View distinct metrics volumes for the given metric name. - * - *

Custom metrics generated in-app from other products will return null for - * ingested volumes. + *

View distinct metrics volumes for the given metric name.

+ *

Custom metrics generated in-app from other products will return null for ingested volumes.

* * @param metricName The name of the metric. (required) * @return ApiResponse<MetricVolumesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1771,139 +1327,99 @@ public CompletableFuture listVolumesByMetricNameAsync(Str * *
Response details
Status Code Description Response Headers
200 Success -
429 Too Many Requests -
*/ - public ApiResponse listVolumesByMetricNameWithHttpInfo(String metricName) - throws ApiException { + public ApiResponse listVolumesByMetricNameWithHttpInfo(String metricName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling listVolumesByMetricName"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling listVolumesByMetricName"); } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/volumes" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/volumes" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.listVolumesByMetricName", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.listVolumesByMetricName", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List distinct metric volumes by metric name. * - *

See {@link #listVolumesByMetricNameWithHttpInfo}. + * See {@link #listVolumesByMetricNameWithHttpInfo}. * * @param metricName The name of the metric. (required) * @return CompletableFuture<ApiResponse<MetricVolumesResponse>> */ - public CompletableFuture> - listVolumesByMetricNameWithHttpInfoAsync(String metricName) { + public CompletableFuture> listVolumesByMetricNameWithHttpInfoAsync(String metricName) { Object localVarPostBody = null; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling listVolumesByMetricName")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling listVolumesByMetricName")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/volumes" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/volumes" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.listVolumesByMetricName", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.listVolumesByMetricName", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Query scalar data across multiple products. - * - *

See {@link #queryScalarDataWithHttpInfo}. - * - * @param body (required) - * @return ScalarFormulaQueryResponse - * @throws ApiException if fails to make API call - */ - public ScalarFormulaQueryResponse queryScalarData(ScalarFormulaQueryRequest body) - throws ApiException { + * Query scalar data across multiple products. + * + * See {@link #queryScalarDataWithHttpInfo}. + * + * @param body (required) + * @return ScalarFormulaQueryResponse + * @throws ApiException if fails to make API call + */ + public ScalarFormulaQueryResponse queryScalarData(ScalarFormulaQueryRequest body) throws ApiException { return queryScalarDataWithHttpInfo(body).getData(); } /** - * Query scalar data across multiple products. - * - *

See {@link #queryScalarDataWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<ScalarFormulaQueryResponse> - */ - public CompletableFuture queryScalarDataAsync( - ScalarFormulaQueryRequest body) { - return queryScalarDataWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Query scalar data across multiple products. + * + * See {@link #queryScalarDataWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ScalarFormulaQueryResponse> + */ + public CompletableFuturequeryScalarDataAsync(ScalarFormulaQueryRequest body) { + return queryScalarDataWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Query scalar values (as seen on Query Value, Table and Toplist widgets). Multiple data sources - * are supported with the ability to process the data using formulas and functions. + *

Query scalar values (as seen on Query Value, Table and Toplist widgets). + * Multiple data sources are supported with the ability to + * process the data using formulas and functions.

* - * @param body (required) + * @param body (required) * @return ApiResponse<ScalarFormulaQueryResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1913,8 +1429,7 @@ public CompletableFuture queryScalarDataAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse queryScalarDataWithHttpInfo( - ScalarFormulaQueryRequest body) throws ApiException { + public ApiResponse queryScalarDataWithHttpInfo(ScalarFormulaQueryRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "queryScalarData"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -1926,136 +1441,100 @@ public ApiResponse queryScalarDataWithHttpInfo( // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling queryScalarData"); + throw new ApiException(400, "Missing the required parameter 'body' when calling queryScalarData"); } // create path and map variables String localVarPath = "/api/v2/query/scalar"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.queryScalarData", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.queryScalarData", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Query scalar data across multiple products. * - *

See {@link #queryScalarDataWithHttpInfo}. + * See {@link #queryScalarDataWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ScalarFormulaQueryResponse>> */ - public CompletableFuture> - queryScalarDataWithHttpInfoAsync(ScalarFormulaQueryRequest body) { + public CompletableFuture> queryScalarDataWithHttpInfoAsync(ScalarFormulaQueryRequest body) { // Check if unstable operation is enabled String operationId = "queryScalarData"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling queryScalarData")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling queryScalarData")); + return result; } // create path and map variables String localVarPath = "/api/v2/query/scalar"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.queryScalarData", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.queryScalarData", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Query timeseries data across multiple products. - * - *

See {@link #queryTimeseriesDataWithHttpInfo}. - * - * @param body (required) - * @return TimeseriesFormulaQueryResponse - * @throws ApiException if fails to make API call - */ - public TimeseriesFormulaQueryResponse queryTimeseriesData(TimeseriesFormulaQueryRequest body) - throws ApiException { + * Query timeseries data across multiple products. + * + * See {@link #queryTimeseriesDataWithHttpInfo}. + * + * @param body (required) + * @return TimeseriesFormulaQueryResponse + * @throws ApiException if fails to make API call + */ + public TimeseriesFormulaQueryResponse queryTimeseriesData(TimeseriesFormulaQueryRequest body) throws ApiException { return queryTimeseriesDataWithHttpInfo(body).getData(); } /** - * Query timeseries data across multiple products. - * - *

See {@link #queryTimeseriesDataWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<TimeseriesFormulaQueryResponse> - */ - public CompletableFuture queryTimeseriesDataAsync( - TimeseriesFormulaQueryRequest body) { - return queryTimeseriesDataWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Query timeseries data across multiple products. + * + * See {@link #queryTimeseriesDataWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<TimeseriesFormulaQueryResponse> + */ + public CompletableFuturequeryTimeseriesDataAsync(TimeseriesFormulaQueryRequest body) { + return queryTimeseriesDataWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Query timeseries data across various data sources and process the data by applying formulas and - * functions. + *

Query timeseries data across various data sources and + * process the data by applying formulas and functions.

* - * @param body (required) + * @param body (required) * @return ApiResponse<TimeseriesFormulaQueryResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2065,8 +1544,7 @@ public CompletableFuture queryTimeseriesDataAsyn * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse queryTimeseriesDataWithHttpInfo( - TimeseriesFormulaQueryRequest body) throws ApiException { + public ApiResponse queryTimeseriesDataWithHttpInfo(TimeseriesFormulaQueryRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "queryTimeseriesData"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -2078,108 +1556,72 @@ public ApiResponse queryTimeseriesDataWithHttpIn // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling queryTimeseriesData"); + throw new ApiException(400, "Missing the required parameter 'body' when calling queryTimeseriesData"); } // create path and map variables String localVarPath = "/api/v2/query/timeseries"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.queryTimeseriesData", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.queryTimeseriesData", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Query timeseries data across multiple products. * - *

See {@link #queryTimeseriesDataWithHttpInfo}. + * See {@link #queryTimeseriesDataWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<TimeseriesFormulaQueryResponse>> */ - public CompletableFuture> - queryTimeseriesDataWithHttpInfoAsync(TimeseriesFormulaQueryRequest body) { + public CompletableFuture> queryTimeseriesDataWithHttpInfoAsync(TimeseriesFormulaQueryRequest body) { // Check if unstable operation is enabled String operationId = "queryTimeseriesData"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling queryTimeseriesData")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling queryTimeseriesData")); + return result; } // create path and map variables String localVarPath = "/api/v2/query/timeseries"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.queryTimeseriesData", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.queryTimeseriesData", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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 submitMetrics. */ + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to submitMetrics. + */ public static class SubmitMetricsOptionalParameters { private MetricContentEncoding contentEncoding; /** * Set contentEncoding. - * - * @param contentEncoding HTTP header used to compress the media-type. (optional, default to - * "deflate") + * @param contentEncoding HTTP header used to compress the media-type. (optional, default to "deflate") * @return SubmitMetricsOptionalParameters */ public SubmitMetricsOptionalParameters contentEncoding(MetricContentEncoding contentEncoding) { @@ -2189,90 +1631,81 @@ public SubmitMetricsOptionalParameters contentEncoding(MetricContentEncoding con } /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfo}. - * - * @param body (required) - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitMetrics(MetricPayload body) throws ApiException { - return submitMetricsWithHttpInfo(body, new SubmitMetricsOptionalParameters()).getData(); - } - - /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitMetricsAsync(MetricPayload body) { - return submitMetricsWithHttpInfoAsync(body, new SubmitMetricsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfo}. - * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return IntakePayloadAccepted - * @throws ApiException if fails to make API call - */ - public IntakePayloadAccepted submitMetrics( - MetricPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfo}. + * + * @param body (required) + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitMetrics (MetricPayload body) throws ApiException { + return submitMetricsWithHttpInfo( body, new SubmitMetricsOptionalParameters()).getData(); + } + + /** + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitMetricsAsync(MetricPayload body) { + return submitMetricsWithHttpInfoAsync(body, new SubmitMetricsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); + } + + /** + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return IntakePayloadAccepted + * @throws ApiException if fails to make API call + */ + public IntakePayloadAccepted submitMetrics(MetricPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { return submitMetricsWithHttpInfo(body, parameters).getData(); } /** - * Submit metrics. - * - *

See {@link #submitMetricsWithHttpInfoAsync}. - * - * @param body (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IntakePayloadAccepted> - */ - public CompletableFuture submitMetricsAsync( - MetricPayload body, SubmitMetricsOptionalParameters parameters) { - return submitMetricsWithHttpInfoAsync(body, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Submit metrics. + * + * See {@link #submitMetricsWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<IntakePayloadAccepted> + */ + public CompletableFuturesubmitMetricsAsync( MetricPayload body, SubmitMetricsOptionalParameters parameters) { + return submitMetricsWithHttpInfoAsync(body, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * The metrics end-point allows you to post time-series data that can be graphed on Datadog’s - * dashboards. The maximum payload size is 500 kilobytes (512000 bytes). Compressed payloads must - * have a decompressed size of less than 5 megabytes (5242880 bytes). - * - *

If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect: - * + *

The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. + * The maximum payload size is 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed size of less than 5 megabytes (5242880 bytes).

+ *

If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:

*
    - *
  • 64 bits for the timestamp - *
  • 64 bits for the value - *
  • 20 bytes for the metric names - *
  • 50 bytes for the timeseries - *
  • The full payload is approximately 100 bytes. + *
  • 64 bits for the timestamp
  • + *
  • 64 bits for the value
  • + *
  • 20 bytes for the metric names
  • + *
  • 50 bytes for the timeseries
  • + *
  • The full payload is approximately 100 bytes.
  • *
+ *

Host name is one of the resources in the Resources field.

* - *

Host name is one of the resources in the Resources field. - * - * @param body (required) + * @param body (required) * @param parameters Optional parameters for the request. * @return ApiResponse<IntakePayloadAccepted> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2283,145 +1716,105 @@ public CompletableFuture submitMetricsAsync( * *
Response details
Status Code Description Response Headers
202 Payload accepted -
429 Too many requests -
*/ - public ApiResponse submitMetricsWithHttpInfo( - MetricPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { + public ApiResponse submitMetricsWithHttpInfo(MetricPayload body, SubmitMetricsOptionalParameters parameters) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling submitMetrics"); + throw new ApiException(400, "Missing the required parameter 'body' when calling submitMetrics"); } MetricContentEncoding contentEncoding = parameters.contentEncoding; // create path and map variables String localVarPath = "/api/v2/series"; + Map localVarHeaderParams = new HashMap(); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.submitMetrics", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.submitMetrics", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Submit metrics. * - *

See {@link #submitMetricsWithHttpInfo}. + * See {@link #submitMetricsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<IntakePayloadAccepted>> */ - public CompletableFuture> submitMetricsWithHttpInfoAsync( - MetricPayload body, SubmitMetricsOptionalParameters parameters) { + public CompletableFuture> submitMetricsWithHttpInfoAsync(MetricPayload body, SubmitMetricsOptionalParameters parameters) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling submitMetrics")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling submitMetrics")); + return result; } MetricContentEncoding contentEncoding = parameters.contentEncoding; // create path and map variables String localVarPath = "/api/v2/series"; + Map localVarHeaderParams = new HashMap(); - if (contentEncoding != null) - localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); + if (contentEncoding != null) localVarHeaderParams.put("Content-Encoding", apiClient.parameterToString(contentEncoding)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.submitMetrics", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.submitMetrics", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth" }); } 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a tag configuration. - * - *

See {@link #updateTagConfigurationWithHttpInfo}. - * - * @param metricName The name of the metric. (required) - * @param body (required) - * @return MetricTagConfigurationResponse - * @throws ApiException if fails to make API call - */ - public MetricTagConfigurationResponse updateTagConfiguration( - String metricName, MetricTagConfigurationUpdateRequest body) throws ApiException { + * Update a tag configuration. + * + * See {@link #updateTagConfigurationWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return MetricTagConfigurationResponse + * @throws ApiException if fails to make API call + */ + public MetricTagConfigurationResponse updateTagConfiguration(String metricName, MetricTagConfigurationUpdateRequest body) throws ApiException { return updateTagConfigurationWithHttpInfo(metricName, body).getData(); } /** - * Update a tag configuration. - * - *

See {@link #updateTagConfigurationWithHttpInfoAsync}. - * - * @param metricName The name of the metric. (required) - * @param body (required) - * @return CompletableFuture<MetricTagConfigurationResponse> - */ - public CompletableFuture updateTagConfigurationAsync( - String metricName, MetricTagConfigurationUpdateRequest body) { - return updateTagConfigurationWithHttpInfoAsync(metricName, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a tag configuration. + * + * See {@link #updateTagConfigurationWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return CompletableFuture<MetricTagConfigurationResponse> + */ + public CompletableFutureupdateTagConfigurationAsync(String metricName, MetricTagConfigurationUpdateRequest body) { + return updateTagConfigurationWithHttpInfoAsync(metricName, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the tag configuration of a metric or percentile aggregations of a distribution metric or - * custom aggregations of a count, rate, or gauge metric. Can only be used with application keys - * from users with the Manage Tags for Metrics permission. + *

Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations + * of a count, rate, or gauge metric. + * Can only be used with application keys from users with the Manage Tags for Metrics permission.

* * @param metricName The name of the metric. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<MetricTagConfigurationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2431,116 +1824,71 @@ public CompletableFuture updateTagConfigurationA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too Many Requests -
*/ - public ApiResponse updateTagConfigurationWithHttpInfo( - String metricName, MetricTagConfigurationUpdateRequest body) throws ApiException { + public ApiResponse updateTagConfigurationWithHttpInfo(String metricName, MetricTagConfigurationUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'metricName' is set if (metricName == null) { - throw new ApiException( - 400, "Missing the required parameter 'metricName' when calling updateTagConfiguration"); + throw new ApiException(400, "Missing the required parameter 'metricName' when calling updateTagConfiguration"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateTagConfiguration"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateTagConfiguration"); } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MetricsApi.updateTagConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MetricsApi.updateTagConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a tag configuration. * - *

See {@link #updateTagConfigurationWithHttpInfo}. + * See {@link #updateTagConfigurationWithHttpInfo}. * * @param metricName The name of the metric. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<MetricTagConfigurationResponse>> */ - public CompletableFuture> - updateTagConfigurationWithHttpInfoAsync( - String metricName, MetricTagConfigurationUpdateRequest body) { + public CompletableFuture> updateTagConfigurationWithHttpInfoAsync(String metricName, MetricTagConfigurationUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'metricName' is set if (metricName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'metricName' when calling updateTagConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'metricName' when calling updateTagConfiguration")); + 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 updateTagConfiguration")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateTagConfiguration")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/metrics/{metric_name}/tags" - .replaceAll( - "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + String localVarPath = "/api/v2/metrics/{metric_name}/tags" + .replaceAll("\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MetricsApi.updateTagConfiguration", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MetricsApi.updateTagConfiguration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/MonitorsApi.java b/src/main/java/com/datadog/api/client/v2/api/MonitorsApi.java index 7a70b9d2636..c783f28ee87 100644 --- a/src/main/java/com/datadog/api/client/v2/api/MonitorsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/MonitorsApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.MonitorConfigPolicyCreateRequest; -import com.datadog.api.client.v2.model.MonitorConfigPolicyEditRequest; -import com.datadog.api.client.v2.model.MonitorConfigPolicyListResponse; -import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.MonitorConfigPolicyListResponse; +import com.datadog.api.client.v2.model.MonitorConfigPolicyResponse; +import com.datadog.api.client.v2.model.MonitorConfigPolicyCreateRequest; +import com.datadog.api.client.v2.model.MonitorConfigPolicyEditRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorsApi { private ApiClient apiClient; - public MonitorsApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,44 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a monitor configuration policy. - * - *

See {@link #createMonitorConfigPolicyWithHttpInfo}. - * - * @param body Create a monitor configuration policy request body. (required) - * @return MonitorConfigPolicyResponse - * @throws ApiException if fails to make API call - */ - public MonitorConfigPolicyResponse createMonitorConfigPolicy( - MonitorConfigPolicyCreateRequest body) throws ApiException { + * Create a monitor configuration policy. + * + * See {@link #createMonitorConfigPolicyWithHttpInfo}. + * + * @param body Create a monitor configuration policy request body. (required) + * @return MonitorConfigPolicyResponse + * @throws ApiException if fails to make API call + */ + public MonitorConfigPolicyResponse createMonitorConfigPolicy(MonitorConfigPolicyCreateRequest body) throws ApiException { return createMonitorConfigPolicyWithHttpInfo(body).getData(); } /** - * Create a monitor configuration policy. - * - *

See {@link #createMonitorConfigPolicyWithHttpInfoAsync}. - * - * @param body Create a monitor configuration policy request body. (required) - * @return CompletableFuture<MonitorConfigPolicyResponse> - */ - public CompletableFuture createMonitorConfigPolicyAsync( - MonitorConfigPolicyCreateRequest body) { - return createMonitorConfigPolicyWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a monitor configuration policy. + * + * See {@link #createMonitorConfigPolicyWithHttpInfoAsync}. + * + * @param body Create a monitor configuration policy request body. (required) + * @return CompletableFuture<MonitorConfigPolicyResponse> + */ + public CompletableFuturecreateMonitorConfigPolicyAsync(MonitorConfigPolicyCreateRequest body) { + return createMonitorConfigPolicyWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a monitor configuration policy. + *

Create a monitor configuration policy.

* * @param body Create a monitor configuration policy request body. (required) * @return ApiResponse<MonitorConfigPolicyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -93,130 +98,94 @@ public CompletableFuture createMonitorConfigPolicyA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createMonitorConfigPolicyWithHttpInfo( - MonitorConfigPolicyCreateRequest body) throws ApiException { + public ApiResponse createMonitorConfigPolicyWithHttpInfo(MonitorConfigPolicyCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createMonitorConfigPolicy"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createMonitorConfigPolicy"); } // create path and map variables String localVarPath = "/api/v2/monitor/policy"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MonitorsApi.createMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MonitorsApi.createMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a monitor configuration policy. * - *

See {@link #createMonitorConfigPolicyWithHttpInfo}. + * See {@link #createMonitorConfigPolicyWithHttpInfo}. * * @param body Create a monitor configuration policy request body. (required) * @return CompletableFuture<ApiResponse<MonitorConfigPolicyResponse>> */ - public CompletableFuture> - createMonitorConfigPolicyWithHttpInfoAsync(MonitorConfigPolicyCreateRequest body) { + public CompletableFuture> createMonitorConfigPolicyWithHttpInfoAsync(MonitorConfigPolicyCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createMonitorConfigPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createMonitorConfigPolicy")); + return result; } // create path and map variables String localVarPath = "/api/v2/monitor/policy"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MonitorsApi.createMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MonitorsApi.createMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a monitor configuration policy. - * - *

See {@link #deleteMonitorConfigPolicyWithHttpInfo}. - * - * @param policyId ID of the monitor configuration policy. (required) - * @throws ApiException if fails to make API call - */ - public void deleteMonitorConfigPolicy(String policyId) throws ApiException { + * Delete a monitor configuration policy. + * + * See {@link #deleteMonitorConfigPolicyWithHttpInfo}. + * + * @param policyId ID of the monitor configuration policy. (required) + * @throws ApiException if fails to make API call + */ + public void deleteMonitorConfigPolicy(String policyId) throws ApiException { deleteMonitorConfigPolicyWithHttpInfo(policyId); } /** - * Delete a monitor configuration policy. - * - *

See {@link #deleteMonitorConfigPolicyWithHttpInfoAsync}. - * - * @param policyId ID of the monitor configuration policy. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteMonitorConfigPolicyAsync(String policyId) { - return deleteMonitorConfigPolicyWithHttpInfoAsync(policyId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a monitor configuration policy. + * + * See {@link #deleteMonitorConfigPolicyWithHttpInfoAsync}. + * + * @param policyId ID of the monitor configuration policy. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteMonitorConfigPolicyAsync(String policyId) { + return deleteMonitorConfigPolicyWithHttpInfoAsync(policyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a monitor configuration policy. + *

Delete a monitor configuration policy.

* * @param policyId ID of the monitor configuration policy. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -226,135 +195,97 @@ public CompletableFuture deleteMonitorConfigPolicyAsync(String policyId) { * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteMonitorConfigPolicyWithHttpInfo(String policyId) - throws ApiException { + public ApiResponse deleteMonitorConfigPolicyWithHttpInfo(String policyId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'policyId' is set if (policyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'policyId' when calling deleteMonitorConfigPolicy"); + throw new ApiException(400, "Missing the required parameter 'policyId' when calling deleteMonitorConfigPolicy"); } // create path and map variables - String localVarPath = - "/api/v2/monitor/policy/{policy_id}" - .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + String localVarPath = "/api/v2/monitor/policy/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MonitorsApi.deleteMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.MonitorsApi.deleteMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a monitor configuration policy. * - *

See {@link #deleteMonitorConfigPolicyWithHttpInfo}. + * See {@link #deleteMonitorConfigPolicyWithHttpInfo}. * * @param policyId ID of the monitor configuration policy. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteMonitorConfigPolicyWithHttpInfoAsync( - String policyId) { + public CompletableFuture> deleteMonitorConfigPolicyWithHttpInfoAsync(String policyId) { Object localVarPostBody = null; // 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 deleteMonitorConfigPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'policyId' when calling deleteMonitorConfigPolicy")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/monitor/policy/{policy_id}" - .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + String localVarPath = "/api/v2/monitor/policy/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MonitorsApi.deleteMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MonitorsApi.deleteMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a monitor configuration policy. - * - *

See {@link #getMonitorConfigPolicyWithHttpInfo}. - * - * @param policyId ID of the monitor configuration policy. (required) - * @return MonitorConfigPolicyResponse - * @throws ApiException if fails to make API call - */ - public MonitorConfigPolicyResponse getMonitorConfigPolicy(String policyId) throws ApiException { + * Get a monitor configuration policy. + * + * See {@link #getMonitorConfigPolicyWithHttpInfo}. + * + * @param policyId ID of the monitor configuration policy. (required) + * @return MonitorConfigPolicyResponse + * @throws ApiException if fails to make API call + */ + public MonitorConfigPolicyResponse getMonitorConfigPolicy(String policyId) throws ApiException { return getMonitorConfigPolicyWithHttpInfo(policyId).getData(); } /** - * Get a monitor configuration policy. - * - *

See {@link #getMonitorConfigPolicyWithHttpInfoAsync}. - * - * @param policyId ID of the monitor configuration policy. (required) - * @return CompletableFuture<MonitorConfigPolicyResponse> - */ - public CompletableFuture getMonitorConfigPolicyAsync( - String policyId) { - return getMonitorConfigPolicyWithHttpInfoAsync(policyId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a monitor configuration policy. + * + * See {@link #getMonitorConfigPolicyWithHttpInfoAsync}. + * + * @param policyId ID of the monitor configuration policy. (required) + * @return CompletableFuture<MonitorConfigPolicyResponse> + */ + public CompletableFuturegetMonitorConfigPolicyAsync(String policyId) { + return getMonitorConfigPolicyWithHttpInfoAsync(policyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a monitor configuration policy by policy_id. + *

Get a monitor configuration policy by policy_id.

* * @param policyId ID of the monitor configuration policy. (required) * @return ApiResponse<MonitorConfigPolicyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -363,133 +294,94 @@ public CompletableFuture getMonitorConfigPolicyAsyn * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getMonitorConfigPolicyWithHttpInfo( - String policyId) throws ApiException { + public ApiResponse getMonitorConfigPolicyWithHttpInfo(String policyId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'policyId' is set if (policyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'policyId' when calling getMonitorConfigPolicy"); + throw new ApiException(400, "Missing the required parameter 'policyId' when calling getMonitorConfigPolicy"); } // create path and map variables - String localVarPath = - "/api/v2/monitor/policy/{policy_id}" - .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + String localVarPath = "/api/v2/monitor/policy/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MonitorsApi.getMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MonitorsApi.getMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a monitor configuration policy. * - *

See {@link #getMonitorConfigPolicyWithHttpInfo}. + * See {@link #getMonitorConfigPolicyWithHttpInfo}. * * @param policyId ID of the monitor configuration policy. (required) * @return CompletableFuture<ApiResponse<MonitorConfigPolicyResponse>> */ - public CompletableFuture> - getMonitorConfigPolicyWithHttpInfoAsync(String policyId) { + public CompletableFuture> getMonitorConfigPolicyWithHttpInfoAsync(String policyId) { Object localVarPostBody = null; // 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 getMonitorConfigPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'policyId' when calling getMonitorConfigPolicy")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/monitor/policy/{policy_id}" - .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + String localVarPath = "/api/v2/monitor/policy/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MonitorsApi.getMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MonitorsApi.getMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all monitor configuration policies. - * - *

See {@link #listMonitorConfigPoliciesWithHttpInfo}. - * - * @return MonitorConfigPolicyListResponse - * @throws ApiException if fails to make API call - */ - public MonitorConfigPolicyListResponse listMonitorConfigPolicies() throws ApiException { + * Get all monitor configuration policies. + * + * See {@link #listMonitorConfigPoliciesWithHttpInfo}. + * + * @return MonitorConfigPolicyListResponse + * @throws ApiException if fails to make API call + */ + public MonitorConfigPolicyListResponse listMonitorConfigPolicies() throws ApiException { return listMonitorConfigPoliciesWithHttpInfo().getData(); } /** - * Get all monitor configuration policies. - * - *

See {@link #listMonitorConfigPoliciesWithHttpInfoAsync}. - * - * @return CompletableFuture<MonitorConfigPolicyListResponse> - */ - public CompletableFuture listMonitorConfigPoliciesAsync() { - return listMonitorConfigPoliciesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all monitor configuration policies. + * + * See {@link #listMonitorConfigPoliciesWithHttpInfoAsync}. + * + * @return CompletableFuture<MonitorConfigPolicyListResponse> + */ + public CompletableFuturelistMonitorConfigPoliciesAsync() { + return listMonitorConfigPoliciesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get all monitor configuration policies. + *

Get all monitor configuration policies.

* * @return ApiResponse<MonitorConfigPolicyListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -497,119 +389,85 @@ public CompletableFuture listMonitorConfigPolic * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listMonitorConfigPoliciesWithHttpInfo() - throws ApiException { + public ApiResponse listMonitorConfigPoliciesWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/monitor/policy"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MonitorsApi.listMonitorConfigPolicies", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MonitorsApi.listMonitorConfigPolicies", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all monitor configuration policies. * - *

See {@link #listMonitorConfigPoliciesWithHttpInfo}. + * See {@link #listMonitorConfigPoliciesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<MonitorConfigPolicyListResponse>> */ - public CompletableFuture> - listMonitorConfigPoliciesWithHttpInfoAsync() { + public CompletableFuture> listMonitorConfigPoliciesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/monitor/policy"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MonitorsApi.listMonitorConfigPolicies", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MonitorsApi.listMonitorConfigPolicies", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit a monitor configuration policy. - * - *

See {@link #updateMonitorConfigPolicyWithHttpInfo}. - * - * @param policyId ID of the monitor configuration policy. (required) - * @param body Description of the update. (required) - * @return MonitorConfigPolicyResponse - * @throws ApiException if fails to make API call - */ - public MonitorConfigPolicyResponse updateMonitorConfigPolicy( - String policyId, MonitorConfigPolicyEditRequest body) throws ApiException { + * Edit a monitor configuration policy. + * + * See {@link #updateMonitorConfigPolicyWithHttpInfo}. + * + * @param policyId ID of the monitor configuration policy. (required) + * @param body Description of the update. (required) + * @return MonitorConfigPolicyResponse + * @throws ApiException if fails to make API call + */ + public MonitorConfigPolicyResponse updateMonitorConfigPolicy(String policyId, MonitorConfigPolicyEditRequest body) throws ApiException { return updateMonitorConfigPolicyWithHttpInfo(policyId, body).getData(); } /** - * Edit a monitor configuration policy. - * - *

See {@link #updateMonitorConfigPolicyWithHttpInfoAsync}. - * - * @param policyId ID of the monitor configuration policy. (required) - * @param body Description of the update. (required) - * @return CompletableFuture<MonitorConfigPolicyResponse> - */ - public CompletableFuture updateMonitorConfigPolicyAsync( - String policyId, MonitorConfigPolicyEditRequest body) { - return updateMonitorConfigPolicyWithHttpInfoAsync(policyId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit a monitor configuration policy. + * + * See {@link #updateMonitorConfigPolicyWithHttpInfoAsync}. + * + * @param policyId ID of the monitor configuration policy. (required) + * @param body Description of the update. (required) + * @return CompletableFuture<MonitorConfigPolicyResponse> + */ + public CompletableFutureupdateMonitorConfigPolicyAsync(String policyId, MonitorConfigPolicyEditRequest body) { + return updateMonitorConfigPolicyWithHttpInfoAsync(policyId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit a monitor configuration policy. + *

Edit a monitor configuration policy.

* * @param policyId ID of the monitor configuration policy. (required) * @param body Description of the update. (required) * @return ApiResponse<MonitorConfigPolicyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -619,114 +477,71 @@ public CompletableFuture updateMonitorConfigPolicyA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateMonitorConfigPolicyWithHttpInfo( - String policyId, MonitorConfigPolicyEditRequest body) throws ApiException { + public ApiResponse updateMonitorConfigPolicyWithHttpInfo(String policyId, MonitorConfigPolicyEditRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'policyId' is set if (policyId == null) { - throw new ApiException( - 400, "Missing the required parameter 'policyId' when calling updateMonitorConfigPolicy"); + throw new ApiException(400, "Missing the required parameter 'policyId' when calling updateMonitorConfigPolicy"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateMonitorConfigPolicy"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateMonitorConfigPolicy"); } // create path and map variables - String localVarPath = - "/api/v2/monitor/policy/{policy_id}" - .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + String localVarPath = "/api/v2/monitor/policy/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.MonitorsApi.updateMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.MonitorsApi.updateMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit a monitor configuration policy. * - *

See {@link #updateMonitorConfigPolicyWithHttpInfo}. + * See {@link #updateMonitorConfigPolicyWithHttpInfo}. * * @param policyId ID of the monitor configuration policy. (required) * @param body Description of the update. (required) * @return CompletableFuture<ApiResponse<MonitorConfigPolicyResponse>> */ - public CompletableFuture> - updateMonitorConfigPolicyWithHttpInfoAsync( - String policyId, MonitorConfigPolicyEditRequest body) { + public CompletableFuture> updateMonitorConfigPolicyWithHttpInfoAsync(String policyId, MonitorConfigPolicyEditRequest body) { Object localVarPostBody = body; // 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 updateMonitorConfigPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'policyId' when calling updateMonitorConfigPolicy")); + 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 updateMonitorConfigPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateMonitorConfigPolicy")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/monitor/policy/{policy_id}" - .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + String localVarPath = "/api/v2/monitor/policy/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.MonitorsApi.updateMonitorConfigPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.MonitorsApi.updateMonitorConfigPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/OpsgenieIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/OpsgenieIntegrationApi.java index 69031856ac8..42513b61551 100644 --- a/src/main/java/com/datadog/api/client/v2/api/OpsgenieIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/OpsgenieIntegrationApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.OpsgenieServiceCreateRequest; -import com.datadog.api.client.v2.model.OpsgenieServiceResponse; -import com.datadog.api.client.v2.model.OpsgenieServiceUpdateRequest; -import com.datadog.api.client.v2.model.OpsgenieServicesResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.OpsgenieServicesResponse; +import com.datadog.api.client.v2.model.OpsgenieServiceResponse; +import com.datadog.api.client.v2.model.OpsgenieServiceCreateRequest; +import com.datadog.api.client.v2.model.OpsgenieServiceUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieIntegrationApi { private ApiClient apiClient; - public OpsgenieIntegrationApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,44 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a new service object. - * - *

See {@link #createOpsgenieServiceWithHttpInfo}. - * - * @param body Opsgenie service payload (required) - * @return OpsgenieServiceResponse - * @throws ApiException if fails to make API call - */ - public OpsgenieServiceResponse createOpsgenieService(OpsgenieServiceCreateRequest body) - throws ApiException { + * Create a new service object. + * + * See {@link #createOpsgenieServiceWithHttpInfo}. + * + * @param body Opsgenie service payload (required) + * @return OpsgenieServiceResponse + * @throws ApiException if fails to make API call + */ + public OpsgenieServiceResponse createOpsgenieService(OpsgenieServiceCreateRequest body) throws ApiException { return createOpsgenieServiceWithHttpInfo(body).getData(); } /** - * Create a new service object. - * - *

See {@link #createOpsgenieServiceWithHttpInfoAsync}. - * - * @param body Opsgenie service payload (required) - * @return CompletableFuture<OpsgenieServiceResponse> - */ - public CompletableFuture createOpsgenieServiceAsync( - OpsgenieServiceCreateRequest body) { - return createOpsgenieServiceWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new service object. + * + * See {@link #createOpsgenieServiceWithHttpInfoAsync}. + * + * @param body Opsgenie service payload (required) + * @return CompletableFuture<OpsgenieServiceResponse> + */ + public CompletableFuturecreateOpsgenieServiceAsync(OpsgenieServiceCreateRequest body) { + return createOpsgenieServiceWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a new service object in the Opsgenie integration. + *

Create a new service object in the Opsgenie integration.

* * @param body Opsgenie service payload (required) * @return ApiResponse<OpsgenieServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -94,128 +99,94 @@ public CompletableFuture createOpsgenieServiceAsync( * *
Response details
Status Code Description Response Headers
201 CREATED -
429 Too many requests -
*/ - public ApiResponse createOpsgenieServiceWithHttpInfo( - OpsgenieServiceCreateRequest body) throws ApiException { + public ApiResponse createOpsgenieServiceWithHttpInfo(OpsgenieServiceCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createOpsgenieService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createOpsgenieService"); } // create path and map variables String localVarPath = "/api/v2/integration/opsgenie/services"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.createOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.createOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new service object. * - *

See {@link #createOpsgenieServiceWithHttpInfo}. + * See {@link #createOpsgenieServiceWithHttpInfo}. * * @param body Opsgenie service payload (required) * @return CompletableFuture<ApiResponse<OpsgenieServiceResponse>> */ - public CompletableFuture> - createOpsgenieServiceWithHttpInfoAsync(OpsgenieServiceCreateRequest body) { + public CompletableFuture> createOpsgenieServiceWithHttpInfoAsync(OpsgenieServiceCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createOpsgenieService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createOpsgenieService")); + return result; } // create path and map variables String localVarPath = "/api/v2/integration/opsgenie/services"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.createOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.createOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a single service object. - * - *

See {@link #deleteOpsgenieServiceWithHttpInfo}. - * - * @param integrationServiceId The UUID of the service. (required) - * @throws ApiException if fails to make API call - */ - public void deleteOpsgenieService(String integrationServiceId) throws ApiException { + * Delete a single service object. + * + * See {@link #deleteOpsgenieServiceWithHttpInfo}. + * + * @param integrationServiceId The UUID of the service. (required) + * @throws ApiException if fails to make API call + */ + public void deleteOpsgenieService(String integrationServiceId) throws ApiException { deleteOpsgenieServiceWithHttpInfo(integrationServiceId); } /** - * Delete a single service object. - * - *

See {@link #deleteOpsgenieServiceWithHttpInfoAsync}. - * - * @param integrationServiceId The UUID of the service. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteOpsgenieServiceAsync(String integrationServiceId) { - return deleteOpsgenieServiceWithHttpInfoAsync(integrationServiceId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a single service object. + * + * See {@link #deleteOpsgenieServiceWithHttpInfoAsync}. + * + * @param integrationServiceId The UUID of the service. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteOpsgenieServiceAsync(String integrationServiceId) { + return deleteOpsgenieServiceWithHttpInfoAsync(integrationServiceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a single service object in the Datadog Opsgenie integration. + *

Delete a single service object in the Datadog Opsgenie integration.

* * @param integrationServiceId The UUID of the service. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -225,143 +196,97 @@ public CompletableFuture deleteOpsgenieServiceAsync(String integrationServ * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteOpsgenieServiceWithHttpInfo(String integrationServiceId) - throws ApiException { + public ApiResponse deleteOpsgenieServiceWithHttpInfo(String integrationServiceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'integrationServiceId' is set if (integrationServiceId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'integrationServiceId' when calling" - + " deleteOpsgenieService"); + throw new ApiException(400, "Missing the required parameter 'integrationServiceId' when calling deleteOpsgenieService"); } // create path and map variables - String localVarPath = - "/api/v2/integration/opsgenie/services/{integration_service_id}" - .replaceAll( - "\\{" + "integration_service_id" + "\\}", - apiClient.escapeString(integrationServiceId.toString())); + String localVarPath = "/api/v2/integration/opsgenie/services/{integration_service_id}" + .replaceAll("\\{" + "integration_service_id" + "\\}", apiClient.escapeString(integrationServiceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.deleteOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.deleteOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a single service object. * - *

See {@link #deleteOpsgenieServiceWithHttpInfo}. + * See {@link #deleteOpsgenieServiceWithHttpInfo}. * * @param integrationServiceId The UUID of the service. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteOpsgenieServiceWithHttpInfoAsync( - String integrationServiceId) { + public CompletableFuture> deleteOpsgenieServiceWithHttpInfoAsync(String integrationServiceId) { Object localVarPostBody = null; // verify the required parameter 'integrationServiceId' is set if (integrationServiceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'integrationServiceId' when calling" - + " deleteOpsgenieService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'integrationServiceId' when calling deleteOpsgenieService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integration/opsgenie/services/{integration_service_id}" - .replaceAll( - "\\{" + "integration_service_id" + "\\}", - apiClient.escapeString(integrationServiceId.toString())); + String localVarPath = "/api/v2/integration/opsgenie/services/{integration_service_id}" + .replaceAll("\\{" + "integration_service_id" + "\\}", apiClient.escapeString(integrationServiceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.deleteOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.deleteOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a single service object. - * - *

See {@link #getOpsgenieServiceWithHttpInfo}. - * - * @param integrationServiceId The UUID of the service. (required) - * @return OpsgenieServiceResponse - * @throws ApiException if fails to make API call - */ - public OpsgenieServiceResponse getOpsgenieService(String integrationServiceId) - throws ApiException { + * Get a single service object. + * + * See {@link #getOpsgenieServiceWithHttpInfo}. + * + * @param integrationServiceId The UUID of the service. (required) + * @return OpsgenieServiceResponse + * @throws ApiException if fails to make API call + */ + public OpsgenieServiceResponse getOpsgenieService(String integrationServiceId) throws ApiException { return getOpsgenieServiceWithHttpInfo(integrationServiceId).getData(); } /** - * Get a single service object. - * - *

See {@link #getOpsgenieServiceWithHttpInfoAsync}. - * - * @param integrationServiceId The UUID of the service. (required) - * @return CompletableFuture<OpsgenieServiceResponse> - */ - public CompletableFuture getOpsgenieServiceAsync( - String integrationServiceId) { - return getOpsgenieServiceWithHttpInfoAsync(integrationServiceId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a single service object. + * + * See {@link #getOpsgenieServiceWithHttpInfoAsync}. + * + * @param integrationServiceId The UUID of the service. (required) + * @return CompletableFuture<OpsgenieServiceResponse> + */ + public CompletableFuturegetOpsgenieServiceAsync(String integrationServiceId) { + return getOpsgenieServiceWithHttpInfoAsync(integrationServiceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a single service from the Datadog Opsgenie integration. + *

Get a single service from the Datadog Opsgenie integration.

* * @param integrationServiceId The UUID of the service. (required) * @return ApiResponse<OpsgenieServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -372,137 +297,94 @@ public CompletableFuture getOpsgenieServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getOpsgenieServiceWithHttpInfo( - String integrationServiceId) throws ApiException { + public ApiResponse getOpsgenieServiceWithHttpInfo(String integrationServiceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'integrationServiceId' is set if (integrationServiceId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'integrationServiceId' when calling getOpsgenieService"); + throw new ApiException(400, "Missing the required parameter 'integrationServiceId' when calling getOpsgenieService"); } // create path and map variables - String localVarPath = - "/api/v2/integration/opsgenie/services/{integration_service_id}" - .replaceAll( - "\\{" + "integration_service_id" + "\\}", - apiClient.escapeString(integrationServiceId.toString())); + String localVarPath = "/api/v2/integration/opsgenie/services/{integration_service_id}" + .replaceAll("\\{" + "integration_service_id" + "\\}", apiClient.escapeString(integrationServiceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.getOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.getOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a single service object. * - *

See {@link #getOpsgenieServiceWithHttpInfo}. + * See {@link #getOpsgenieServiceWithHttpInfo}. * * @param integrationServiceId The UUID of the service. (required) * @return CompletableFuture<ApiResponse<OpsgenieServiceResponse>> */ - public CompletableFuture> - getOpsgenieServiceWithHttpInfoAsync(String integrationServiceId) { + public CompletableFuture> getOpsgenieServiceWithHttpInfoAsync(String integrationServiceId) { Object localVarPostBody = null; // verify the required parameter 'integrationServiceId' is set if (integrationServiceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'integrationServiceId' when calling" - + " getOpsgenieService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'integrationServiceId' when calling getOpsgenieService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integration/opsgenie/services/{integration_service_id}" - .replaceAll( - "\\{" + "integration_service_id" + "\\}", - apiClient.escapeString(integrationServiceId.toString())); + String localVarPath = "/api/v2/integration/opsgenie/services/{integration_service_id}" + .replaceAll("\\{" + "integration_service_id" + "\\}", apiClient.escapeString(integrationServiceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.getOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.getOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all service objects. - * - *

See {@link #listOpsgenieServicesWithHttpInfo}. - * - * @return OpsgenieServicesResponse - * @throws ApiException if fails to make API call - */ - public OpsgenieServicesResponse listOpsgenieServices() throws ApiException { + * Get all service objects. + * + * See {@link #listOpsgenieServicesWithHttpInfo}. + * + * @return OpsgenieServicesResponse + * @throws ApiException if fails to make API call + */ + public OpsgenieServicesResponse listOpsgenieServices() throws ApiException { return listOpsgenieServicesWithHttpInfo().getData(); } /** - * Get all service objects. - * - *

See {@link #listOpsgenieServicesWithHttpInfoAsync}. - * - * @return CompletableFuture<OpsgenieServicesResponse> - */ - public CompletableFuture listOpsgenieServicesAsync() { - return listOpsgenieServicesWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all service objects. + * + * See {@link #listOpsgenieServicesWithHttpInfoAsync}. + * + * @return CompletableFuture<OpsgenieServicesResponse> + */ + public CompletableFuturelistOpsgenieServicesAsync() { + return listOpsgenieServicesWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get a list of all services from the Datadog Opsgenie integration. + *

Get a list of all services from the Datadog Opsgenie integration.

* * @return ApiResponse<OpsgenieServicesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -510,118 +392,85 @@ public CompletableFuture listOpsgenieServicesAsync() { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listOpsgenieServicesWithHttpInfo() - throws ApiException { + public ApiResponse listOpsgenieServicesWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integration/opsgenie/services"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.listOpsgenieServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.listOpsgenieServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all service objects. * - *

See {@link #listOpsgenieServicesWithHttpInfo}. + * See {@link #listOpsgenieServicesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<OpsgenieServicesResponse>> */ - public CompletableFuture> - listOpsgenieServicesWithHttpInfoAsync() { + public CompletableFuture> listOpsgenieServicesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/integration/opsgenie/services"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.listOpsgenieServices", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.listOpsgenieServices", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a single service object. - * - *

See {@link #updateOpsgenieServiceWithHttpInfo}. - * - * @param integrationServiceId The UUID of the service. (required) - * @param body Opsgenie service payload. (required) - * @return OpsgenieServiceResponse - * @throws ApiException if fails to make API call - */ - public OpsgenieServiceResponse updateOpsgenieService( - String integrationServiceId, OpsgenieServiceUpdateRequest body) throws ApiException { + * Update a single service object. + * + * See {@link #updateOpsgenieServiceWithHttpInfo}. + * + * @param integrationServiceId The UUID of the service. (required) + * @param body Opsgenie service payload. (required) + * @return OpsgenieServiceResponse + * @throws ApiException if fails to make API call + */ + public OpsgenieServiceResponse updateOpsgenieService(String integrationServiceId, OpsgenieServiceUpdateRequest body) throws ApiException { return updateOpsgenieServiceWithHttpInfo(integrationServiceId, body).getData(); } /** - * Update a single service object. - * - *

See {@link #updateOpsgenieServiceWithHttpInfoAsync}. - * - * @param integrationServiceId The UUID of the service. (required) - * @param body Opsgenie service payload. (required) - * @return CompletableFuture<OpsgenieServiceResponse> - */ - public CompletableFuture updateOpsgenieServiceAsync( - String integrationServiceId, OpsgenieServiceUpdateRequest body) { - return updateOpsgenieServiceWithHttpInfoAsync(integrationServiceId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a single service object. + * + * See {@link #updateOpsgenieServiceWithHttpInfoAsync}. + * + * @param integrationServiceId The UUID of the service. (required) + * @param body Opsgenie service payload. (required) + * @return CompletableFuture<OpsgenieServiceResponse> + */ + public CompletableFutureupdateOpsgenieServiceAsync(String integrationServiceId, OpsgenieServiceUpdateRequest body) { + return updateOpsgenieServiceWithHttpInfoAsync(integrationServiceId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a single service object in the Datadog Opsgenie integration. + *

Update a single service object in the Datadog Opsgenie integration.

* * @param integrationServiceId The UUID of the service. (required) * @param body Opsgenie service payload. (required) * @return ApiResponse<OpsgenieServiceResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -632,118 +481,71 @@ public CompletableFuture updateOpsgenieServiceAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateOpsgenieServiceWithHttpInfo( - String integrationServiceId, OpsgenieServiceUpdateRequest body) throws ApiException { + public ApiResponse updateOpsgenieServiceWithHttpInfo(String integrationServiceId, OpsgenieServiceUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'integrationServiceId' is set if (integrationServiceId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'integrationServiceId' when calling" - + " updateOpsgenieService"); + throw new ApiException(400, "Missing the required parameter 'integrationServiceId' when calling updateOpsgenieService"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateOpsgenieService"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateOpsgenieService"); } // create path and map variables - String localVarPath = - "/api/v2/integration/opsgenie/services/{integration_service_id}" - .replaceAll( - "\\{" + "integration_service_id" + "\\}", - apiClient.escapeString(integrationServiceId.toString())); + String localVarPath = "/api/v2/integration/opsgenie/services/{integration_service_id}" + .replaceAll("\\{" + "integration_service_id" + "\\}", apiClient.escapeString(integrationServiceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.updateOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.updateOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a single service object. * - *

See {@link #updateOpsgenieServiceWithHttpInfo}. + * See {@link #updateOpsgenieServiceWithHttpInfo}. * * @param integrationServiceId The UUID of the service. (required) * @param body Opsgenie service payload. (required) * @return CompletableFuture<ApiResponse<OpsgenieServiceResponse>> */ - public CompletableFuture> - updateOpsgenieServiceWithHttpInfoAsync( - String integrationServiceId, OpsgenieServiceUpdateRequest body) { + public CompletableFuture> updateOpsgenieServiceWithHttpInfoAsync(String integrationServiceId, OpsgenieServiceUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'integrationServiceId' is set if (integrationServiceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'integrationServiceId' when calling" - + " updateOpsgenieService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'integrationServiceId' when calling updateOpsgenieService")); + 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 updateOpsgenieService")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateOpsgenieService")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/integration/opsgenie/services/{integration_service_id}" - .replaceAll( - "\\{" + "integration_service_id" + "\\}", - apiClient.escapeString(integrationServiceId.toString())); + String localVarPath = "/api/v2/integration/opsgenie/services/{integration_service_id}" + .replaceAll("\\{" + "integration_service_id" + "\\}", apiClient.escapeString(integrationServiceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.OpsgenieIntegrationApi.updateOpsgenieService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.OpsgenieIntegrationApi.updateOpsgenieService", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/OrganizationsApi.java b/src/main/java/com/datadog/api/client/v2/api/OrganizationsApi.java index aadd12b3571..6f03d4e0a97 100644 --- a/src/main/java/com/datadog/api/client/v2/api/OrganizationsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/OrganizationsApi.java @@ -1,21 +1,30 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.PaginationIterable; + +import jakarta.ws.rs.core.GenericType; import jakarta.ws.rs.client.Invocation; + import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.IdPMetadataFormData; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationsApi { private ApiClient apiClient; - public OrganizationsApi() { this(ApiClient.getDefaultApiClient()); } @@ -42,13 +51,14 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to uploadIdPMetadata. */ + /** + * Manage optional parameters to uploadIdPMetadata. + */ public static class UploadIdPMetadataOptionalParameters { private File idpFile; /** * Set idpFile. - * * @param idpFile The IdP metadata XML file (optional) * @return UploadIdPMetadataOptionalParameters */ @@ -59,71 +69,65 @@ public UploadIdPMetadataOptionalParameters idpFile(File idpFile) { } /** - * Upload IdP metadata. - * - *

See {@link #uploadIdPMetadataWithHttpInfo}. - * - * @throws ApiException if fails to make API call - */ - public void uploadIdPMetadata() throws ApiException { - uploadIdPMetadataWithHttpInfo(new UploadIdPMetadataOptionalParameters()); + * Upload IdP metadata. + * + * See {@link #uploadIdPMetadataWithHttpInfo}. + * + * @throws ApiException if fails to make API call + */ + public void uploadIdPMetadata () throws ApiException { + uploadIdPMetadataWithHttpInfo(new UploadIdPMetadataOptionalParameters()); } /** - * Upload IdP metadata. - * - *

See {@link #uploadIdPMetadataWithHttpInfoAsync}. - * - * @return CompletableFuture - */ - public CompletableFuture uploadIdPMetadataAsync() { - return uploadIdPMetadataWithHttpInfoAsync(new UploadIdPMetadataOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Upload IdP metadata. + * + * See {@link #uploadIdPMetadataWithHttpInfoAsync}. + * + * @return CompletableFuture + */ + public CompletableFutureuploadIdPMetadataAsync() { + return uploadIdPMetadataWithHttpInfoAsync(new UploadIdPMetadataOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Upload IdP metadata. - * - *

See {@link #uploadIdPMetadataWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @throws ApiException if fails to make API call - */ - public void uploadIdPMetadata(UploadIdPMetadataOptionalParameters parameters) - throws ApiException { - uploadIdPMetadataWithHttpInfo(parameters); + * Upload IdP metadata. + * + * See {@link #uploadIdPMetadataWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void uploadIdPMetadata(UploadIdPMetadataOptionalParameters parameters) throws ApiException { + uploadIdPMetadataWithHttpInfo(parameters); } /** - * Upload IdP metadata. - * - *

See {@link #uploadIdPMetadataWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture - */ - public CompletableFuture uploadIdPMetadataAsync( - UploadIdPMetadataOptionalParameters parameters) { - return uploadIdPMetadataWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Upload IdP metadata. + * + * See {@link #uploadIdPMetadataWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFutureuploadIdPMetadataAsync(UploadIdPMetadataOptionalParameters parameters) { + return uploadIdPMetadataWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Endpoint for uploading IdP metadata for SAML setup. - * - *

Use this endpoint to upload or replace IdP metadata for SAML login configuration. + *

Endpoint for uploading IdP metadata for SAML setup.

+ *

Use this endpoint to upload or replace IdP metadata for SAML login configuration.

* * @param parameters Optional parameters for the request. * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -132,82 +136,51 @@ public CompletableFuture uploadIdPMetadataAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse uploadIdPMetadataWithHttpInfo( - UploadIdPMetadataOptionalParameters parameters) throws ApiException { + public ApiResponse uploadIdPMetadataWithHttpInfo(UploadIdPMetadataOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; File idpFile = parameters.idpFile; // create path and map variables String localVarPath = "/api/v2/saml_configurations/idp_metadata"; + Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (idpFile != null) localVarFormParams.put("idp_file", idpFile); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.OrganizationsApi.uploadIdPMetadata", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"multipart/form-data"}, - localVarPostBody, - localVarFormParams, - false, - null); + if (idpFile != null) localVarFormParams.put("idp_file", idpFile); + + Invocation.Builder builder = apiClient.createBuilder("v2.OrganizationsApi.uploadIdPMetadata", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"multipart/form-data" }, localVarPostBody,localVarFormParams , false, null); } /** * Upload IdP metadata. * - *

See {@link #uploadIdPMetadataWithHttpInfo}. + * See {@link #uploadIdPMetadataWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> uploadIdPMetadataWithHttpInfoAsync( - UploadIdPMetadataOptionalParameters parameters) { + public CompletableFuture> uploadIdPMetadataWithHttpInfoAsync(UploadIdPMetadataOptionalParameters parameters) { Object localVarPostBody = null; File idpFile = parameters.idpFile; // create path and map variables String localVarPath = "/api/v2/saml_configurations/idp_metadata"; + Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (idpFile != null) localVarFormParams.put("idp_file", idpFile); + if (idpFile != null) localVarFormParams.put("idp_file", idpFile); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.OrganizationsApi.uploadIdPMetadata", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.OrganizationsApi.uploadIdPMetadata", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"multipart/form-data"}, - localVarPostBody, - localVarFormParams, - false, - null); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"multipart/form-data" }, localVarPostBody,localVarFormParams , false, null); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/ProcessesApi.java b/src/main/java/com/datadog/api/client/v2/api/ProcessesApi.java index c9a88e31f78..60c74c444a1 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ProcessesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ProcessesApi.java @@ -1,26 +1,31 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.ProcessSummariesResponse; -import com.datadog.api.client.v2.model.ProcessSummary; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.ProcessSummariesResponse; +import com.datadog.api.client.v2.model.ProcessSummary; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessesApi { private ApiClient apiClient; - public ProcessesApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,7 +52,9 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to listProcesses. */ + /** + * Manage optional parameters to listProcesses. + */ public static class ListProcessesOptionalParameters { private String search; private String tags; @@ -58,7 +65,6 @@ public static class ListProcessesOptionalParameters { /** * Set search. - * * @param search String to search processes by. (optional) * @return ListProcessesOptionalParameters */ @@ -69,7 +75,6 @@ public ListProcessesOptionalParameters search(String search) { /** * Set tags. - * * @param tags Comma-separated list of tags to filter processes by. (optional) * @return ListProcessesOptionalParameters */ @@ -80,11 +85,7 @@ public ListProcessesOptionalParameters tags(String tags) { /** * Set from. - * - * @param from Unix timestamp (number of seconds since epoch) of the start of the query window. - * If not provided, the start of the query window will be 15 minutes before the to - * timestamp. If neither from nor to are provided, the - * query window will be [now - 15m, now]. (optional) + * @param from Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window will be 15 minutes before the to timestamp. If neither from nor to are provided, the query window will be [now - 15m, now]. (optional) * @return ListProcessesOptionalParameters */ public ListProcessesOptionalParameters from(Long from) { @@ -94,11 +95,7 @@ public ListProcessesOptionalParameters from(Long from) { /** * Set to. - * - * @param to Unix timestamp (number of seconds since epoch) of the end of the query window. If - * not provided, the end of the query window will be 15 minutes after the from - * timestamp. If neither from nor to are provided, the query - * window will be [now - 15m, now]. (optional) + * @param to Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window will be 15 minutes after the from timestamp. If neither from nor to are provided, the query window will be [now - 15m, now]. (optional) * @return ListProcessesOptionalParameters */ public ListProcessesOptionalParameters to(Long to) { @@ -108,7 +105,6 @@ public ListProcessesOptionalParameters to(Long to) { /** * Set pageLimit. - * * @param pageLimit Maximum number of results returned. (optional, default to 1000) * @return ListProcessesOptionalParameters */ @@ -119,9 +115,7 @@ public ListProcessesOptionalParameters pageLimit(Integer pageLimit) { /** * Set pageCursor. - * - * @param pageCursor String to query the next page of results. This key is provided with each - * valid response from the API in meta.page.after. (optional) + * @param pageCursor String to query the next page of results. This key is provided with each valid response from the API in meta.page.after. (optional) * @return ListProcessesOptionalParameters */ public ListProcessesOptionalParameters pageCursor(String pageCursor) { @@ -131,122 +125,110 @@ public ListProcessesOptionalParameters pageCursor(String pageCursor) { } /** - * Get all processes. - * - *

See {@link #listProcessesWithHttpInfo}. - * - * @return ProcessSummariesResponse - * @throws ApiException if fails to make API call - */ - public ProcessSummariesResponse listProcesses() throws ApiException { + * Get all processes. + * + * See {@link #listProcessesWithHttpInfo}. + * + * @return ProcessSummariesResponse + * @throws ApiException if fails to make API call + */ + public ProcessSummariesResponse listProcesses () throws ApiException { return listProcessesWithHttpInfo(new ListProcessesOptionalParameters()).getData(); } /** - * Get all processes. - * - *

See {@link #listProcessesWithHttpInfoAsync}. - * - * @return CompletableFuture<ProcessSummariesResponse> - */ - public CompletableFuture listProcessesAsync() { - return listProcessesWithHttpInfoAsync(new ListProcessesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all processes. + * + * See {@link #listProcessesWithHttpInfoAsync}. + * + * @return CompletableFuture<ProcessSummariesResponse> + */ + public CompletableFuturelistProcessesAsync() { + return listProcessesWithHttpInfoAsync(new ListProcessesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all processes. - * - *

See {@link #listProcessesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return ProcessSummariesResponse - * @throws ApiException if fails to make API call - */ - public ProcessSummariesResponse listProcesses(ListProcessesOptionalParameters parameters) - throws ApiException { + * Get all processes. + * + * See {@link #listProcessesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ProcessSummariesResponse + * @throws ApiException if fails to make API call + */ + public ProcessSummariesResponse listProcesses(ListProcessesOptionalParameters parameters) throws ApiException { return listProcessesWithHttpInfo(parameters).getData(); } /** - * Get all processes. - * - *

See {@link #listProcessesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ProcessSummariesResponse> - */ - public CompletableFuture listProcessesAsync( - ListProcessesOptionalParameters parameters) { - return listProcessesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all processes. + * + * See {@link #listProcessesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ProcessSummariesResponse> + */ + public CompletableFuturelistProcessesAsync(ListProcessesOptionalParameters parameters) { + return listProcessesWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get all processes. - * - *

See {@link #listProcessesWithHttpInfo}. - * - * @return PaginationIterable<ProcessSummary> - */ + * Get all processes. + * + * See {@link #listProcessesWithHttpInfo}. + * + * @return PaginationIterable<ProcessSummary> + */ public PaginationIterable listProcessesWithPagination() { ListProcessesOptionalParameters parameters = new ListProcessesOptionalParameters(); return listProcessesWithPagination(parameters); } /** - * Get all processes. - * - *

See {@link #listProcessesWithHttpInfo}. - * - * @return ProcessSummariesResponse - */ - public PaginationIterable listProcessesWithPagination( - ListProcessesOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get all processes. + * + * See {@link #listProcessesWithHttpInfo}. + * + * @return ProcessSummariesResponse + */ + public PaginationIterable listProcessesWithPagination(ListProcessesOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 1000; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listProcesses", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "listProcesses", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * Get all processes for your organization. + *

Get all processes for your organization.

* * @param parameters Optional parameters for the request. * @return ApiResponse<ProcessSummariesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -255,8 +237,7 @@ public PaginationIterable listProcessesWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listProcessesWithHttpInfo( - ListProcessesOptionalParameters parameters) throws ApiException { + public ApiResponse listProcessesWithHttpInfo(ListProcessesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String search = parameters.search; String tags = parameters.tags; @@ -267,6 +248,7 @@ public ApiResponse listProcessesWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/processes"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -277,36 +259,19 @@ public ApiResponse listProcessesWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ProcessesApi.listProcesses", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.ProcessesApi.listProcesses", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all processes. * - *

See {@link #listProcessesWithHttpInfo}. + * See {@link #listProcessesWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<ProcessSummariesResponse>> */ - public CompletableFuture> listProcessesWithHttpInfoAsync( - ListProcessesOptionalParameters parameters) { + public CompletableFuture> listProcessesWithHttpInfoAsync(ListProcessesOptionalParameters parameters) { Object localVarPostBody = null; String search = parameters.search; String tags = parameters.tags; @@ -317,6 +282,7 @@ public CompletableFuture> listProcessesWit // create path and map variables String localVarPath = "/api/v2/processes"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -329,28 +295,12 @@ public CompletableFuture> listProcessesWit Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ProcessesApi.listProcesses", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ProcessesApi.listProcesses", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/RestrictionPoliciesApi.java b/src/main/java/com/datadog/api/client/v2/api/RestrictionPoliciesApi.java index 8ab93c27204..f8c6940fd54 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RestrictionPoliciesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RestrictionPoliciesApi.java @@ -1,23 +1,31 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.RestrictionPolicyResponse; -import com.datadog.api.client.v2.model.RestrictionPolicyUpdateRequest; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.RestrictionPolicyResponse; +import com.datadog.api.client.v2.model.RestrictionPolicyUpdateRequest; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RestrictionPoliciesApi { private ApiClient apiClient; - public RestrictionPoliciesApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,47 +53,40 @@ public void setApiClient(ApiClient apiClient) { } /** - * Delete a restriction policy. - * - *

See {@link #deleteRestrictionPolicyWithHttpInfo}. - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) - * @throws ApiException if fails to make API call - */ - public void deleteRestrictionPolicy(String resourceId) throws ApiException { + * Delete a restriction policy. + * + * See {@link #deleteRestrictionPolicyWithHttpInfo}. + * + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRestrictionPolicy(String resourceId) throws ApiException { deleteRestrictionPolicyWithHttpInfo(resourceId); } /** - * Delete a restriction policy. - * - *

See {@link #deleteRestrictionPolicyWithHttpInfoAsync}. - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) - * @return CompletableFuture - */ - public CompletableFuture deleteRestrictionPolicyAsync(String resourceId) { - return deleteRestrictionPolicyWithHttpInfoAsync(resourceId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a restriction policy. + * + * See {@link #deleteRestrictionPolicyWithHttpInfoAsync}. + * + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteRestrictionPolicyAsync(String resourceId) { + return deleteRestrictionPolicyWithHttpInfoAsync(resourceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Deletes the restriction policy associated with a specified resource. + *

Deletes the restriction policy associated with a specified resource.

* - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -94,144 +95,97 @@ public CompletableFuture deleteRestrictionPolicyAsync(String resourceId) { * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
*/ - public ApiResponse deleteRestrictionPolicyWithHttpInfo(String resourceId) - throws ApiException { + public ApiResponse deleteRestrictionPolicyWithHttpInfo(String resourceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'resourceId' is set if (resourceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resourceId' when calling deleteRestrictionPolicy"); + throw new ApiException(400, "Missing the required parameter 'resourceId' when calling deleteRestrictionPolicy"); } // create path and map variables - String localVarPath = - "/api/v2/restriction_policy/{resource_id}" - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/restriction_policy/{resource_id}" + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RestrictionPoliciesApi.deleteRestrictionPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.RestrictionPoliciesApi.deleteRestrictionPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a restriction policy. * - *

See {@link #deleteRestrictionPolicyWithHttpInfo}. + * See {@link #deleteRestrictionPolicyWithHttpInfo}. * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteRestrictionPolicyWithHttpInfoAsync( - String resourceId) { + public CompletableFuture> deleteRestrictionPolicyWithHttpInfoAsync(String resourceId) { Object localVarPostBody = null; // verify the required parameter 'resourceId' is set if (resourceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'resourceId' when calling deleteRestrictionPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resourceId' when calling deleteRestrictionPolicy")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/restriction_policy/{resource_id}" - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/restriction_policy/{resource_id}" + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RestrictionPoliciesApi.deleteRestrictionPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RestrictionPoliciesApi.deleteRestrictionPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a restriction policy. - * - *

See {@link #getRestrictionPolicyWithHttpInfo}. - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) - * @return RestrictionPolicyResponse - * @throws ApiException if fails to make API call - */ - public RestrictionPolicyResponse getRestrictionPolicy(String resourceId) throws ApiException { + * Get a restriction policy. + * + * See {@link #getRestrictionPolicyWithHttpInfo}. + * + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) + * @return RestrictionPolicyResponse + * @throws ApiException if fails to make API call + */ + public RestrictionPolicyResponse getRestrictionPolicy(String resourceId) throws ApiException { return getRestrictionPolicyWithHttpInfo(resourceId).getData(); } /** - * Get a restriction policy. - * - *

See {@link #getRestrictionPolicyWithHttpInfoAsync}. - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) - * @return CompletableFuture<RestrictionPolicyResponse> - */ - public CompletableFuture getRestrictionPolicyAsync(String resourceId) { - return getRestrictionPolicyWithHttpInfoAsync(resourceId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a restriction policy. + * + * See {@link #getRestrictionPolicyWithHttpInfoAsync}. + * + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) + * @return CompletableFuture<RestrictionPolicyResponse> + */ + public CompletableFuturegetRestrictionPolicyAsync(String resourceId) { + return getRestrictionPolicyWithHttpInfoAsync(resourceId).thenApply(response -> { + return response.getData(); + }); } + /** - * Retrieves the restriction policy associated with a specified resource. + *

Retrieves the restriction policy associated with a specified resource.

* - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) * @return ApiResponse<RestrictionPolicyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -240,155 +194,106 @@ public CompletableFuture getRestrictionPolicyAsync(St * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getRestrictionPolicyWithHttpInfo(String resourceId) - throws ApiException { + public ApiResponse getRestrictionPolicyWithHttpInfo(String resourceId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'resourceId' is set if (resourceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resourceId' when calling getRestrictionPolicy"); + throw new ApiException(400, "Missing the required parameter 'resourceId' when calling getRestrictionPolicy"); } // create path and map variables - String localVarPath = - "/api/v2/restriction_policy/{resource_id}" - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/restriction_policy/{resource_id}" + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RestrictionPoliciesApi.getRestrictionPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RestrictionPoliciesApi.getRestrictionPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a restriction policy. * - *

See {@link #getRestrictionPolicyWithHttpInfo}. + * See {@link #getRestrictionPolicyWithHttpInfo}. * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) * @return CompletableFuture<ApiResponse<RestrictionPolicyResponse>> */ - public CompletableFuture> - getRestrictionPolicyWithHttpInfoAsync(String resourceId) { + public CompletableFuture> getRestrictionPolicyWithHttpInfoAsync(String resourceId) { Object localVarPostBody = null; // verify the required parameter 'resourceId' is set if (resourceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'resourceId' when calling getRestrictionPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resourceId' when calling getRestrictionPolicy")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/restriction_policy/{resource_id}" - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/restriction_policy/{resource_id}" + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RestrictionPoliciesApi.getRestrictionPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RestrictionPoliciesApi.getRestrictionPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a restriction policy. - * - *

See {@link #updateRestrictionPolicyWithHttpInfo}. - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) - * @param body Restriction policy payload (required) - * @return RestrictionPolicyResponse - * @throws ApiException if fails to make API call - */ - public RestrictionPolicyResponse updateRestrictionPolicy( - String resourceId, RestrictionPolicyUpdateRequest body) throws ApiException { + * Update a restriction policy. + * + * See {@link #updateRestrictionPolicyWithHttpInfo}. + * + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) + * @param body Restriction policy payload (required) + * @return RestrictionPolicyResponse + * @throws ApiException if fails to make API call + */ + public RestrictionPolicyResponse updateRestrictionPolicy(String resourceId, RestrictionPolicyUpdateRequest body) throws ApiException { return updateRestrictionPolicyWithHttpInfo(resourceId, body).getData(); } /** - * Update a restriction policy. - * - *

See {@link #updateRestrictionPolicyWithHttpInfoAsync}. - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) - * @param body Restriction policy payload (required) - * @return CompletableFuture<RestrictionPolicyResponse> - */ - public CompletableFuture updateRestrictionPolicyAsync( - String resourceId, RestrictionPolicyUpdateRequest body) { - return updateRestrictionPolicyWithHttpInfoAsync(resourceId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a restriction policy. + * + * See {@link #updateRestrictionPolicyWithHttpInfoAsync}. + * + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) + * @param body Restriction policy payload (required) + * @return CompletableFuture<RestrictionPolicyResponse> + */ + public CompletableFutureupdateRestrictionPolicyAsync(String resourceId, RestrictionPolicyUpdateRequest body) { + return updateRestrictionPolicyWithHttpInfoAsync(resourceId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Updates the restriction policy associated with a resource. - * + *

Updates the restriction policy associated with a resource.

*

Supported resources

+ *

Restriction policies can be applied to the following resources: + * - Connections: connection + * - Dashboards: dashboard + * - Notebooks: notebook + * - Security Rules: security-rule

* - *

Restriction policies can be applied to the following resources: - Connections: - * connection - Dashboards: dashboard - Notebooks: notebook - - * Security Rules: security-rule - * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) * @param body Restriction policy payload (required) * @return ApiResponse<RestrictionPolicyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -397,115 +302,71 @@ public CompletableFuture updateRestrictionPolicyAsync * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateRestrictionPolicyWithHttpInfo( - String resourceId, RestrictionPolicyUpdateRequest body) throws ApiException { + public ApiResponse updateRestrictionPolicyWithHttpInfo(String resourceId, RestrictionPolicyUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'resourceId' is set if (resourceId == null) { - throw new ApiException( - 400, "Missing the required parameter 'resourceId' when calling updateRestrictionPolicy"); + throw new ApiException(400, "Missing the required parameter 'resourceId' when calling updateRestrictionPolicy"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateRestrictionPolicy"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateRestrictionPolicy"); } // create path and map variables - String localVarPath = - "/api/v2/restriction_policy/{resource_id}" - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/restriction_policy/{resource_id}" + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RestrictionPoliciesApi.updateRestrictionPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RestrictionPoliciesApi.updateRestrictionPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a restriction policy. * - *

See {@link #updateRestrictionPolicyWithHttpInfo}. + * See {@link #updateRestrictionPolicyWithHttpInfo}. * - * @param resourceId Identifier, formatted as type:id. Supported types: - * connection, dashboard, notebook, security-rule - * . (required) + * @param resourceId Identifier, formatted as type:id. Supported types: connection, dashboard, notebook, security-rule. (required) * @param body Restriction policy payload (required) * @return CompletableFuture<ApiResponse<RestrictionPolicyResponse>> */ - public CompletableFuture> - updateRestrictionPolicyWithHttpInfoAsync( - String resourceId, RestrictionPolicyUpdateRequest body) { + public CompletableFuture> updateRestrictionPolicyWithHttpInfoAsync(String resourceId, RestrictionPolicyUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'resourceId' is set if (resourceId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'resourceId' when calling updateRestrictionPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'resourceId' when calling updateRestrictionPolicy")); + 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 updateRestrictionPolicy")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateRestrictionPolicy")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/restriction_policy/{resource_id}" - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + String localVarPath = "/api/v2/restriction_policy/{resource_id}" + .replaceAll("\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RestrictionPoliciesApi.updateRestrictionPolicy", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RestrictionPoliciesApi.updateRestrictionPolicy", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/RolesApi.java b/src/main/java/com/datadog/api/client/v2/api/RolesApi.java index c488fbda58f..df3cce0c521 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RolesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RolesApi.java @@ -1,34 +1,41 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.PermissionsResponse; -import com.datadog.api.client.v2.model.RelationshipToPermission; -import com.datadog.api.client.v2.model.RelationshipToUser; -import com.datadog.api.client.v2.model.RoleCloneRequest; -import com.datadog.api.client.v2.model.RoleCreateRequest; -import com.datadog.api.client.v2.model.RoleCreateResponse; -import com.datadog.api.client.v2.model.RoleResponse; -import com.datadog.api.client.v2.model.RoleUpdateRequest; -import com.datadog.api.client.v2.model.RoleUpdateResponse; -import com.datadog.api.client.v2.model.RolesResponse; -import com.datadog.api.client.v2.model.RolesSort; -import com.datadog.api.client.v2.model.UsersResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.PermissionsResponse; +import com.datadog.api.client.v2.model.RolesResponse; +import com.datadog.api.client.v2.model.RolesSort; +import com.datadog.api.client.v2.model.RoleCreateResponse; +import com.datadog.api.client.v2.model.RoleCreateRequest; +import com.datadog.api.client.v2.model.RoleResponse; +import com.datadog.api.client.v2.model.RoleUpdateResponse; +import com.datadog.api.client.v2.model.RoleUpdateRequest; +import com.datadog.api.client.v2.model.RoleCloneRequest; +import com.datadog.api.client.v2.model.RelationshipToPermission; +import com.datadog.api.client.v2.model.UsersResponse; +import com.datadog.api.client.v2.model.RelationshipToUser; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RolesApi { private ApiClient apiClient; - public RolesApi() { this(ApiClient.getDefaultApiClient()); } @@ -56,47 +63,44 @@ public void setApiClient(ApiClient apiClient) { } /** - * Grant permission to a role. - * - *

See {@link #addPermissionToRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return PermissionsResponse - * @throws ApiException if fails to make API call - */ - public PermissionsResponse addPermissionToRole(String roleId, RelationshipToPermission body) - throws ApiException { + * Grant permission to a role. + * + * See {@link #addPermissionToRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return PermissionsResponse + * @throws ApiException if fails to make API call + */ + public PermissionsResponse addPermissionToRole(String roleId, RelationshipToPermission body) throws ApiException { return addPermissionToRoleWithHttpInfo(roleId, body).getData(); } /** - * Grant permission to a role. - * - *

See {@link #addPermissionToRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return CompletableFuture<PermissionsResponse> - */ - public CompletableFuture addPermissionToRoleAsync( - String roleId, RelationshipToPermission body) { - return addPermissionToRoleWithHttpInfoAsync(roleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Grant permission to a role. + * + * See {@link #addPermissionToRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return CompletableFuture<PermissionsResponse> + */ + public CompletableFutureaddPermissionToRoleAsync(String roleId, RelationshipToPermission body) { + return addPermissionToRoleWithHttpInfoAsync(roleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Adds a permission to a role. + *

Adds a permission to a role.

* * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<PermissionsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -106,153 +110,113 @@ public CompletableFuture addPermissionToRoleAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse addPermissionToRoleWithHttpInfo( - String roleId, RelationshipToPermission body) throws ApiException { + public ApiResponse addPermissionToRoleWithHttpInfo(String roleId, RelationshipToPermission body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling addPermissionToRole"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling addPermissionToRole"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling addPermissionToRole"); + throw new ApiException(400, "Missing the required parameter 'body' when calling addPermissionToRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/permissions" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/permissions" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.addPermissionToRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.addPermissionToRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Grant permission to a role. * - *

See {@link #addPermissionToRoleWithHttpInfo}. + * See {@link #addPermissionToRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<PermissionsResponse>> */ - public CompletableFuture> addPermissionToRoleWithHttpInfoAsync( - String roleId, RelationshipToPermission body) { + public CompletableFuture> addPermissionToRoleWithHttpInfoAsync(String roleId, RelationshipToPermission body) { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'roleId' when calling addPermissionToRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling addPermissionToRole")); + 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 addPermissionToRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling addPermissionToRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/permissions" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/permissions" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.addPermissionToRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.addPermissionToRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Add a user to a role. - * - *

See {@link #addUserToRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return UsersResponse - * @throws ApiException if fails to make API call - */ - public UsersResponse addUserToRole(String roleId, RelationshipToUser body) throws ApiException { + * Add a user to a role. + * + * See {@link #addUserToRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return UsersResponse + * @throws ApiException if fails to make API call + */ + public UsersResponse addUserToRole(String roleId, RelationshipToUser body) throws ApiException { return addUserToRoleWithHttpInfo(roleId, body).getData(); } /** - * Add a user to a role. - * - *

See {@link #addUserToRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return CompletableFuture<UsersResponse> - */ - public CompletableFuture addUserToRoleAsync( - String roleId, RelationshipToUser body) { - return addUserToRoleWithHttpInfoAsync(roleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Add a user to a role. + * + * See {@link #addUserToRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return CompletableFuture<UsersResponse> + */ + public CompletableFutureaddUserToRoleAsync(String roleId, RelationshipToUser body) { + return addUserToRoleWithHttpInfoAsync(roleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Adds a user to a role. + *

Adds a user to a role.

* * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<UsersResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -262,152 +226,113 @@ public CompletableFuture addUserToRoleAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse addUserToRoleWithHttpInfo( - String roleId, RelationshipToUser body) throws ApiException { + public ApiResponse addUserToRoleWithHttpInfo(String roleId, RelationshipToUser body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling addUserToRole"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling addUserToRole"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling addUserToRole"); + throw new ApiException(400, "Missing the required parameter 'body' when calling addUserToRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/users" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/users" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.addUserToRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.addUserToRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Add a user to a role. * - *

See {@link #addUserToRoleWithHttpInfo}. + * See {@link #addUserToRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<UsersResponse>> */ - public CompletableFuture> addUserToRoleWithHttpInfoAsync( - String roleId, RelationshipToUser body) { + public CompletableFuture> addUserToRoleWithHttpInfoAsync(String roleId, RelationshipToUser body) { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'roleId' when calling addUserToRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling addUserToRole")); + 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 addUserToRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling addUserToRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/users" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/users" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.addUserToRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.addUserToRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a new role by cloning an existing role. - * - *

See {@link #cloneRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return RoleResponse - * @throws ApiException if fails to make API call - */ - public RoleResponse cloneRole(String roleId, RoleCloneRequest body) throws ApiException { + * Create a new role by cloning an existing role. + * + * See {@link #cloneRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return RoleResponse + * @throws ApiException if fails to make API call + */ + public RoleResponse cloneRole(String roleId, RoleCloneRequest body) throws ApiException { return cloneRoleWithHttpInfo(roleId, body).getData(); } /** - * Create a new role by cloning an existing role. - * - *

See {@link #cloneRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return CompletableFuture<RoleResponse> - */ - public CompletableFuture cloneRoleAsync(String roleId, RoleCloneRequest body) { - return cloneRoleWithHttpInfoAsync(roleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new role by cloning an existing role. + * + * See {@link #cloneRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return CompletableFuture<RoleResponse> + */ + public CompletableFuturecloneRoleAsync(String roleId, RoleCloneRequest body) { + return cloneRoleWithHttpInfoAsync(roleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Clone an existing role + *

Clone an existing role

* * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<RoleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -418,8 +343,7 @@ public CompletableFuture cloneRoleAsync(String roleId, RoleCloneRe * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse cloneRoleWithHttpInfo(String roleId, RoleCloneRequest body) - throws ApiException { + public ApiResponse cloneRoleWithHttpInfo(String roleId, RoleCloneRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'roleId' is set @@ -432,131 +356,97 @@ public ApiResponse cloneRoleWithHttpInfo(String roleId, RoleCloneR throw new ApiException(400, "Missing the required parameter 'body' when calling cloneRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/clone" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/clone" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.cloneRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.cloneRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new role by cloning an existing role. * - *

See {@link #cloneRoleWithHttpInfo}. + * See {@link #cloneRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RoleResponse>> */ - public CompletableFuture> cloneRoleWithHttpInfoAsync( - String roleId, RoleCloneRequest body) { + public CompletableFuture> cloneRoleWithHttpInfoAsync(String roleId, RoleCloneRequest body) { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'roleId' when calling cloneRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling cloneRole")); + 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 cloneRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling cloneRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/clone" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/clone" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.cloneRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.cloneRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create role. - * - *

See {@link #createRoleWithHttpInfo}. - * - * @param body (required) - * @return RoleCreateResponse - * @throws ApiException if fails to make API call - */ - public RoleCreateResponse createRole(RoleCreateRequest body) throws ApiException { + * Create role. + * + * See {@link #createRoleWithHttpInfo}. + * + * @param body (required) + * @return RoleCreateResponse + * @throws ApiException if fails to make API call + */ + public RoleCreateResponse createRole(RoleCreateRequest body) throws ApiException { return createRoleWithHttpInfo(body).getData(); } /** - * Create role. - * - *

See {@link #createRoleWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<RoleCreateResponse> - */ - public CompletableFuture createRoleAsync(RoleCreateRequest body) { - return createRoleWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create role. + * + * See {@link #createRoleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RoleCreateResponse> + */ + public CompletableFuturecreateRoleAsync(RoleCreateRequest body) { + return createRoleWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a new role for your organization. + *

Create a new role for your organization.

* - * @param body (required) + * @param body (required) * @return ApiResponse<RoleCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -565,8 +455,7 @@ public CompletableFuture createRoleAsync(RoleCreateRequest b * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createRoleWithHttpInfo(RoleCreateRequest body) - throws ApiException { + public ApiResponse createRoleWithHttpInfo(RoleCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -576,115 +465,84 @@ public ApiResponse createRoleWithHttpInfo(RoleCreateRequest // create path and map variables String localVarPath = "/api/v2/roles"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.createRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.createRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create role. * - *

See {@link #createRoleWithHttpInfo}. + * See {@link #createRoleWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RoleCreateResponse>> */ - public CompletableFuture> createRoleWithHttpInfoAsync( - RoleCreateRequest body) { + public CompletableFuture> createRoleWithHttpInfoAsync(RoleCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling createRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createRole")); + return result; } // create path and map variables String localVarPath = "/api/v2/roles"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.createRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.createRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete role. - * - *

See {@link #deleteRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @throws ApiException if fails to make API call - */ - public void deleteRole(String roleId) throws ApiException { + * Delete role. + * + * See {@link #deleteRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRole(String roleId) throws ApiException { deleteRoleWithHttpInfo(roleId); } /** - * Delete role. - * - *

See {@link #deleteRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteRoleAsync(String roleId) { - return deleteRoleWithHttpInfoAsync(roleId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete role. + * + * See {@link #deleteRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteRoleAsync(String roleId) { + return deleteRoleWithHttpInfoAsync(roleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Disables a role. + *

Disables a role.

* * @param roleId The unique identifier of the role. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -698,40 +556,24 @@ public ApiResponse deleteRoleWithHttpInfo(String roleId) throws ApiExcepti // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling deleteRole"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling deleteRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.deleteRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.deleteRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete role. * - *

See {@link #deleteRoleWithHttpInfo}. + * See {@link #deleteRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -741,82 +583,65 @@ public CompletableFuture> deleteRoleWithHttpInfoAsync(String r // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'roleId' when calling deleteRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling deleteRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.deleteRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.deleteRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a role. - * - *

See {@link #getRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @return RoleResponse - * @throws ApiException if fails to make API call - */ - public RoleResponse getRole(String roleId) throws ApiException { + * Get a role. + * + * See {@link #getRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @return RoleResponse + * @throws ApiException if fails to make API call + */ + public RoleResponse getRole(String roleId) throws ApiException { return getRoleWithHttpInfo(roleId).getData(); } /** - * Get a role. - * - *

See {@link #getRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @return CompletableFuture<RoleResponse> - */ - public CompletableFuture getRoleAsync(String roleId) { - return getRoleWithHttpInfoAsync(roleId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a role. + * + * See {@link #getRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @return CompletableFuture<RoleResponse> + */ + public CompletableFuturegetRoleAsync(String roleId) { + return getRoleWithHttpInfoAsync(roleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a role in the organization specified by the role’s role_id. + *

Get a role in the organization specified by the role’s role_id.

* * @param roleId The unique identifier of the role. (required) * @return ApiResponse<RoleResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -833,36 +658,21 @@ public ApiResponse getRoleWithHttpInfo(String roleId) throws ApiEx throw new ApiException(400, "Missing the required parameter 'roleId' when calling getRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.getRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.getRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a role. * - *

See {@link #getRoleWithHttpInfo}. + * See {@link #getRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) * @return CompletableFuture<ApiResponse<RoleResponse>> @@ -872,79 +682,62 @@ public CompletableFuture> getRoleWithHttpInfoAsync(Str // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'roleId' when calling getRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling getRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.getRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.getRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List permissions. - * - *

See {@link #listPermissionsWithHttpInfo}. - * - * @return PermissionsResponse - * @throws ApiException if fails to make API call - */ - public PermissionsResponse listPermissions() throws ApiException { + * List permissions. + * + * See {@link #listPermissionsWithHttpInfo}. + * + * @return PermissionsResponse + * @throws ApiException if fails to make API call + */ + public PermissionsResponse listPermissions() throws ApiException { return listPermissionsWithHttpInfo().getData(); } /** - * List permissions. - * - *

See {@link #listPermissionsWithHttpInfoAsync}. - * - * @return CompletableFuture<PermissionsResponse> - */ - public CompletableFuture listPermissionsAsync() { - return listPermissionsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List permissions. + * + * See {@link #listPermissionsWithHttpInfoAsync}. + * + * @return CompletableFuture<PermissionsResponse> + */ + public CompletableFuturelistPermissionsAsync() { + return listPermissionsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Returns a list of all permissions, including name, description, and ID. + *

Returns a list of all permissions, including name, description, and ID.

* * @return ApiResponse<PermissionsResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -958,32 +751,18 @@ public ApiResponse listPermissionsWithHttpInfo() throws Api // create path and map variables String localVarPath = "/api/v2/permissions"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.listPermissions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.listPermissions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List permissions. * - *

See {@link #listPermissionsWithHttpInfo}. + * See {@link #listPermissionsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<PermissionsResponse>> */ @@ -992,72 +771,57 @@ public CompletableFuture> listPermissionsWithHt // create path and map variables String localVarPath = "/api/v2/permissions"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.listPermissions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.listPermissions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List permissions for a role. - * - *

See {@link #listRolePermissionsWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @return PermissionsResponse - * @throws ApiException if fails to make API call - */ - public PermissionsResponse listRolePermissions(String roleId) throws ApiException { + * List permissions for a role. + * + * See {@link #listRolePermissionsWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @return PermissionsResponse + * @throws ApiException if fails to make API call + */ + public PermissionsResponse listRolePermissions(String roleId) throws ApiException { return listRolePermissionsWithHttpInfo(roleId).getData(); } /** - * List permissions for a role. - * - *

See {@link #listRolePermissionsWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @return CompletableFuture<PermissionsResponse> - */ - public CompletableFuture listRolePermissionsAsync(String roleId) { - return listRolePermissionsWithHttpInfoAsync(roleId) - .thenApply( - response -> { - return response.getData(); - }); + * List permissions for a role. + * + * See {@link #listRolePermissionsWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @return CompletableFuture<PermissionsResponse> + */ + public CompletableFuturelistRolePermissionsAsync(String roleId) { + return listRolePermissionsWithHttpInfoAsync(roleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns a list of all permissions for a single role. + *

Returns a list of all permissions for a single role.

* * @param roleId The unique identifier of the role. (required) * @return ApiResponse<PermissionsResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -1066,97 +830,64 @@ public CompletableFuture listRolePermissionsAsync(String ro * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listRolePermissionsWithHttpInfo(String roleId) - throws ApiException { + public ApiResponse listRolePermissionsWithHttpInfo(String roleId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling listRolePermissions"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling listRolePermissions"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/permissions" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/permissions" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.listRolePermissions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.listRolePermissions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List permissions for a role. * - *

See {@link #listRolePermissionsWithHttpInfo}. + * See {@link #listRolePermissionsWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) * @return CompletableFuture<ApiResponse<PermissionsResponse>> */ - public CompletableFuture> listRolePermissionsWithHttpInfoAsync( - String roleId) { + public CompletableFuture> listRolePermissionsWithHttpInfoAsync(String roleId) { Object localVarPostBody = null; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'roleId' when calling listRolePermissions")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling listRolePermissions")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/permissions" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/permissions" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.listRolePermissions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.listRolePermissions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listRoles. */ + /** + * Manage optional parameters to listRoles. + */ public static class ListRolesOptionalParameters { private Long pageSize; private Long pageNumber; @@ -1165,9 +896,7 @@ public static class ListRolesOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListRolesOptionalParameters */ public ListRolesOptionalParameters pageSize(Long pageSize) { @@ -1177,7 +906,6 @@ public ListRolesOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListRolesOptionalParameters */ @@ -1188,10 +916,7 @@ public ListRolesOptionalParameters pageNumber(Long pageNumber) { /** * Set sort. - * - * @param sort Sort roles depending on the given field. Sort order is ascending - * by default. Sort order is descending if the field is prefixed by a - * negative sign, for example: sort=-name. (optional, default to "name") + * @param sort Sort roles depending on the given field. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example: sort=-name. (optional, default to "name") * @return ListRolesOptionalParameters */ public ListRolesOptionalParameters sort(RolesSort sort) { @@ -1201,7 +926,6 @@ public ListRolesOptionalParameters sort(RolesSort sort) { /** * Set filter. - * * @param filter Filter all roles by the given string. (optional) * @return ListRolesOptionalParameters */ @@ -1212,69 +936,66 @@ public ListRolesOptionalParameters filter(String filter) { } /** - * List roles. - * - *

See {@link #listRolesWithHttpInfo}. - * - * @return RolesResponse - * @throws ApiException if fails to make API call - */ - public RolesResponse listRoles() throws ApiException { + * List roles. + * + * See {@link #listRolesWithHttpInfo}. + * + * @return RolesResponse + * @throws ApiException if fails to make API call + */ + public RolesResponse listRoles () throws ApiException { return listRolesWithHttpInfo(new ListRolesOptionalParameters()).getData(); } /** - * List roles. - * - *

See {@link #listRolesWithHttpInfoAsync}. - * - * @return CompletableFuture<RolesResponse> - */ - public CompletableFuture listRolesAsync() { - return listRolesWithHttpInfoAsync(new ListRolesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * List roles. + * + * See {@link #listRolesWithHttpInfoAsync}. + * + * @return CompletableFuture<RolesResponse> + */ + public CompletableFuturelistRolesAsync() { + return listRolesWithHttpInfoAsync(new ListRolesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * List roles. - * - *

See {@link #listRolesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return RolesResponse - * @throws ApiException if fails to make API call - */ + * List roles. + * + * See {@link #listRolesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return RolesResponse + * @throws ApiException if fails to make API call + */ public RolesResponse listRoles(ListRolesOptionalParameters parameters) throws ApiException { return listRolesWithHttpInfo(parameters).getData(); } /** - * List roles. - * - *

See {@link #listRolesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<RolesResponse> - */ - public CompletableFuture listRolesAsync(ListRolesOptionalParameters parameters) { - return listRolesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List roles. + * + * See {@link #listRolesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RolesResponse> + */ + public CompletableFuturelistRolesAsync(ListRolesOptionalParameters parameters) { + return listRolesWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns all roles, including their names and their unique identifiers. + *

Returns all roles, including their names and their unique identifiers.

* * @param parameters Optional parameters for the request. * @return ApiResponse<RolesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1282,8 +1003,7 @@ public CompletableFuture listRolesAsync(ListRolesOptionalParamete * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listRolesWithHttpInfo(ListRolesOptionalParameters parameters) - throws ApiException { + public ApiResponse listRolesWithHttpInfo(ListRolesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1292,6 +1012,7 @@ public ApiResponse listRolesWithHttpInfo(ListRolesOptionalParamet // create path and map variables String localVarPath = "/api/v2/roles"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1300,36 +1021,19 @@ public ApiResponse listRolesWithHttpInfo(ListRolesOptionalParamet localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.listRoles", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.listRoles", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List roles. * - *

See {@link #listRolesWithHttpInfo}. + * See {@link #listRolesWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<RolesResponse>> */ - public CompletableFuture> listRolesWithHttpInfoAsync( - ListRolesOptionalParameters parameters) { + public CompletableFuture> listRolesWithHttpInfoAsync(ListRolesOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1338,6 +1042,7 @@ public CompletableFuture> listRolesWithHttpInfoAsync( // create path and map variables String localVarPath = "/api/v2/roles"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1348,32 +1053,18 @@ public CompletableFuture> listRolesWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.listRoles", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.listRoles", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listRoleUsers. */ + /** + * Manage optional parameters to listRoleUsers. + */ public static class ListRoleUsersOptionalParameters { private Long pageSize; private Long pageNumber; @@ -1382,9 +1073,7 @@ public static class ListRoleUsersOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListRoleUsersOptionalParameters */ public ListRoleUsersOptionalParameters pageSize(Long pageSize) { @@ -1394,7 +1083,6 @@ public ListRoleUsersOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListRoleUsersOptionalParameters */ @@ -1405,11 +1093,7 @@ public ListRoleUsersOptionalParameters pageNumber(Long pageNumber) { /** * Set sort. - * - * @param sort User attribute to order results by. Sort order is ascending by - * default. Sort order is descending if the field is prefixed by a negative - * sign, for example sort=-name. Options: name, email - * , status. (optional, default to "name") + * @param sort User attribute to order results by. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example sort=-name. Options: name, email, status. (optional, default to "name") * @return ListRoleUsersOptionalParameters */ public ListRoleUsersOptionalParameters sort(String sort) { @@ -1419,7 +1103,6 @@ public ListRoleUsersOptionalParameters sort(String sort) { /** * Set filter. - * * @param filter Filter all users by the given string. Defaults to no filtering. (optional) * @return ListRoleUsersOptionalParameters */ @@ -1430,76 +1113,71 @@ public ListRoleUsersOptionalParameters filter(String filter) { } /** - * Get all users of a role. - * - *

See {@link #listRoleUsersWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @return UsersResponse - * @throws ApiException if fails to make API call - */ - public UsersResponse listRoleUsers(String roleId) throws ApiException { - return listRoleUsersWithHttpInfo(roleId, new ListRoleUsersOptionalParameters()).getData(); + * Get all users of a role. + * + * See {@link #listRoleUsersWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @return UsersResponse + * @throws ApiException if fails to make API call + */ + public UsersResponse listRoleUsers (String roleId) throws ApiException { + return listRoleUsersWithHttpInfo( roleId, new ListRoleUsersOptionalParameters()).getData(); } /** - * Get all users of a role. - * - *

See {@link #listRoleUsersWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @return CompletableFuture<UsersResponse> - */ - public CompletableFuture listRoleUsersAsync(String roleId) { - return listRoleUsersWithHttpInfoAsync(roleId, new ListRoleUsersOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get all users of a role. + * + * See {@link #listRoleUsersWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @return CompletableFuture<UsersResponse> + */ + public CompletableFuturelistRoleUsersAsync(String roleId) { + return listRoleUsersWithHttpInfoAsync(roleId, new ListRoleUsersOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get all users of a role. - * - *

See {@link #listRoleUsersWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param parameters Optional parameters for the request. - * @return UsersResponse - * @throws ApiException if fails to make API call - */ - public UsersResponse listRoleUsers(String roleId, ListRoleUsersOptionalParameters parameters) - throws ApiException { + * Get all users of a role. + * + * See {@link #listRoleUsersWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param parameters Optional parameters for the request. + * @return UsersResponse + * @throws ApiException if fails to make API call + */ + public UsersResponse listRoleUsers(String roleId, ListRoleUsersOptionalParameters parameters) throws ApiException { return listRoleUsersWithHttpInfo(roleId, parameters).getData(); } /** - * Get all users of a role. - * - *

See {@link #listRoleUsersWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsersResponse> - */ - public CompletableFuture listRoleUsersAsync( - String roleId, ListRoleUsersOptionalParameters parameters) { - return listRoleUsersWithHttpInfoAsync(roleId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get all users of a role. + * + * See {@link #listRoleUsersWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsersResponse> + */ + public CompletableFuturelistRoleUsersAsync( String roleId, ListRoleUsersOptionalParameters parameters) { + return listRoleUsersWithHttpInfoAsync(roleId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Gets all users of a role. + *

Gets all users of a role.

* * @param roleId The unique identifier of the role. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsersResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1508,24 +1186,22 @@ public CompletableFuture listRoleUsersAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listRoleUsersWithHttpInfo( - String roleId, ListRoleUsersOptionalParameters parameters) throws ApiException { + public ApiResponse listRoleUsersWithHttpInfo(String roleId, ListRoleUsersOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling listRoleUsers"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling listRoleUsers"); } Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; String sort = parameters.sort; String filter = parameters.filter; // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/users" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/users" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1534,56 +1210,37 @@ public ApiResponse listRoleUsersWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.listRoleUsers", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.listRoleUsers", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all users of a role. * - *

See {@link #listRoleUsersWithHttpInfo}. + * See {@link #listRoleUsersWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsersResponse>> */ - public CompletableFuture> listRoleUsersWithHttpInfoAsync( - String roleId, ListRoleUsersOptionalParameters parameters) { + public CompletableFuture> listRoleUsersWithHttpInfoAsync(String roleId, ListRoleUsersOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'roleId' when calling listRoleUsers")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling listRoleUsers")); + return result; } Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; String sort = parameters.sort; String filter = parameters.filter; // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/users" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/users" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1594,73 +1251,54 @@ public CompletableFuture> listRoleUsersWithHttpInfoAs Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.listRoleUsers", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.listRoleUsers", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Revoke permission. - * - *

See {@link #removePermissionFromRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return PermissionsResponse - * @throws ApiException if fails to make API call - */ - public PermissionsResponse removePermissionFromRole(String roleId, RelationshipToPermission body) - throws ApiException { + * Revoke permission. + * + * See {@link #removePermissionFromRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return PermissionsResponse + * @throws ApiException if fails to make API call + */ + public PermissionsResponse removePermissionFromRole(String roleId, RelationshipToPermission body) throws ApiException { return removePermissionFromRoleWithHttpInfo(roleId, body).getData(); } /** - * Revoke permission. - * - *

See {@link #removePermissionFromRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return CompletableFuture<PermissionsResponse> - */ - public CompletableFuture removePermissionFromRoleAsync( - String roleId, RelationshipToPermission body) { - return removePermissionFromRoleWithHttpInfoAsync(roleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Revoke permission. + * + * See {@link #removePermissionFromRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return CompletableFuture<PermissionsResponse> + */ + public CompletableFutureremovePermissionFromRoleAsync(String roleId, RelationshipToPermission body) { + return removePermissionFromRoleWithHttpInfoAsync(roleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Removes a permission from a role. + *

Removes a permission from a role.

* * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<PermissionsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1670,155 +1308,113 @@ public CompletableFuture removePermissionFromRoleAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse removePermissionFromRoleWithHttpInfo( - String roleId, RelationshipToPermission body) throws ApiException { + public ApiResponse removePermissionFromRoleWithHttpInfo(String roleId, RelationshipToPermission body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling removePermissionFromRole"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling removePermissionFromRole"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling removePermissionFromRole"); + throw new ApiException(400, "Missing the required parameter 'body' when calling removePermissionFromRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/permissions" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/permissions" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.removePermissionFromRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.removePermissionFromRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Revoke permission. * - *

See {@link #removePermissionFromRoleWithHttpInfo}. + * See {@link #removePermissionFromRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<PermissionsResponse>> */ - public CompletableFuture> - removePermissionFromRoleWithHttpInfoAsync(String roleId, RelationshipToPermission body) { + public CompletableFuture> removePermissionFromRoleWithHttpInfoAsync(String roleId, RelationshipToPermission body) { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'roleId' when calling removePermissionFromRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling removePermissionFromRole")); + 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 removePermissionFromRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling removePermissionFromRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/permissions" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/permissions" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.removePermissionFromRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.removePermissionFromRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Remove a user from a role. - * - *

See {@link #removeUserFromRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return UsersResponse - * @throws ApiException if fails to make API call - */ - public UsersResponse removeUserFromRole(String roleId, RelationshipToUser body) - throws ApiException { + * Remove a user from a role. + * + * See {@link #removeUserFromRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return UsersResponse + * @throws ApiException if fails to make API call + */ + public UsersResponse removeUserFromRole(String roleId, RelationshipToUser body) throws ApiException { return removeUserFromRoleWithHttpInfo(roleId, body).getData(); } /** - * Remove a user from a role. - * - *

See {@link #removeUserFromRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return CompletableFuture<UsersResponse> - */ - public CompletableFuture removeUserFromRoleAsync( - String roleId, RelationshipToUser body) { - return removeUserFromRoleWithHttpInfoAsync(roleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Remove a user from a role. + * + * See {@link #removeUserFromRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return CompletableFuture<UsersResponse> + */ + public CompletableFutureremoveUserFromRoleAsync(String roleId, RelationshipToUser body) { + return removeUserFromRoleWithHttpInfoAsync(roleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Removes a user from a role. + *

Removes a user from a role.

* * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<UsersResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1828,153 +1424,113 @@ public CompletableFuture removeUserFromRoleAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse removeUserFromRoleWithHttpInfo( - String roleId, RelationshipToUser body) throws ApiException { + public ApiResponse removeUserFromRoleWithHttpInfo(String roleId, RelationshipToUser body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling removeUserFromRole"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling removeUserFromRole"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling removeUserFromRole"); + throw new ApiException(400, "Missing the required parameter 'body' when calling removeUserFromRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/users" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/users" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.removeUserFromRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.removeUserFromRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Remove a user from a role. * - *

See {@link #removeUserFromRoleWithHttpInfo}. + * See {@link #removeUserFromRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<UsersResponse>> */ - public CompletableFuture> removeUserFromRoleWithHttpInfoAsync( - String roleId, RelationshipToUser body) { + public CompletableFuture> removeUserFromRoleWithHttpInfoAsync(String roleId, RelationshipToUser body) { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'roleId' when calling removeUserFromRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling removeUserFromRole")); + 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 removeUserFromRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling removeUserFromRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}/users" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}/users" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.removeUserFromRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.removeUserFromRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a role. - * - *

See {@link #updateRoleWithHttpInfo}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return RoleUpdateResponse - * @throws ApiException if fails to make API call - */ - public RoleUpdateResponse updateRole(String roleId, RoleUpdateRequest body) throws ApiException { + * Update a role. + * + * See {@link #updateRoleWithHttpInfo}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return RoleUpdateResponse + * @throws ApiException if fails to make API call + */ + public RoleUpdateResponse updateRole(String roleId, RoleUpdateRequest body) throws ApiException { return updateRoleWithHttpInfo(roleId, body).getData(); } /** - * Update a role. - * - *

See {@link #updateRoleWithHttpInfoAsync}. - * - * @param roleId The unique identifier of the role. (required) - * @param body (required) - * @return CompletableFuture<RoleUpdateResponse> - */ - public CompletableFuture updateRoleAsync( - String roleId, RoleUpdateRequest body) { - return updateRoleWithHttpInfoAsync(roleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a role. + * + * See {@link #updateRoleWithHttpInfoAsync}. + * + * @param roleId The unique identifier of the role. (required) + * @param body (required) + * @return CompletableFuture<RoleUpdateResponse> + */ + public CompletableFutureupdateRoleAsync(String roleId, RoleUpdateRequest body) { + return updateRoleWithHttpInfoAsync(roleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit a role. Can only be used with application keys belonging to administrators. + *

Edit a role. Can only be used with application keys belonging to administrators.

* * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<RoleUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1985,14 +1541,12 @@ public CompletableFuture updateRoleAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateRoleWithHttpInfo( - String roleId, RoleUpdateRequest body) throws ApiException { + public ApiResponse updateRoleWithHttpInfo(String roleId, RoleUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'roleId' when calling updateRole"); + throw new ApiException(400, "Missing the required parameter 'roleId' when calling updateRole"); } // verify the required parameter 'body' is set @@ -2000,91 +1554,58 @@ public ApiResponse updateRoleWithHttpInfo( throw new ApiException(400, "Missing the required parameter 'body' when calling updateRole"); } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RolesApi.updateRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RolesApi.updateRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a role. * - *

See {@link #updateRoleWithHttpInfo}. + * See {@link #updateRoleWithHttpInfo}. * * @param roleId The unique identifier of the role. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RoleUpdateResponse>> */ - public CompletableFuture> updateRoleWithHttpInfoAsync( - String roleId, RoleUpdateRequest body) { + public CompletableFuture> updateRoleWithHttpInfoAsync(String roleId, RoleUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'roleId' is set if (roleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'roleId' when calling updateRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'roleId' when calling updateRole")); + 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 updateRole")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateRole")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/roles/{role_id}" - .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + String localVarPath = "/api/v2/roles/{role_id}" + .replaceAll("\\{" + "role_id" + "\\}", apiClient.escapeString(roleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RolesApi.updateRole", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RolesApi.updateRole", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/RumApi.java b/src/main/java/com/datadog/api/client/v2/api/RumApi.java index ac68796a34d..0d71e81e030 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumApi.java @@ -1,36 +1,42 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.RUMAggregateRequest; -import com.datadog.api.client.v2.model.RUMAnalyticsAggregateResponse; -import com.datadog.api.client.v2.model.RUMApplicationCreateRequest; -import com.datadog.api.client.v2.model.RUMApplicationResponse; -import com.datadog.api.client.v2.model.RUMApplicationUpdateRequest; -import com.datadog.api.client.v2.model.RUMApplicationsResponse; -import com.datadog.api.client.v2.model.RUMEvent; -import com.datadog.api.client.v2.model.RUMEventsResponse; -import com.datadog.api.client.v2.model.RUMQueryPageOptions; -import com.datadog.api.client.v2.model.RUMSearchEventsRequest; -import com.datadog.api.client.v2.model.RUMSort; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.RUMAnalyticsAggregateResponse; +import com.datadog.api.client.v2.model.RUMAggregateRequest; +import com.datadog.api.client.v2.model.RUMApplicationsResponse; +import com.datadog.api.client.v2.model.RUMApplicationResponse; +import com.datadog.api.client.v2.model.RUMApplicationCreateRequest; +import com.datadog.api.client.v2.model.RUMApplicationUpdateRequest; +import com.datadog.api.client.v2.model.RUMEventsResponse; +import com.datadog.api.client.v2.model.RUMSort; +import com.datadog.api.client.v2.model.RUMSearchEventsRequest; +import com.datadog.api.client.v2.model.RUMEvent; +import com.datadog.api.client.v2.model.RUMEvent; +import com.datadog.api.client.v2.model.RUMSearchEventsRequest; +import com.datadog.api.client.v2.model.RUMQueryPageOptions; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RumApi { private ApiClient apiClient; - public RumApi() { this(ApiClient.getDefaultApiClient()); } @@ -58,44 +64,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Aggregate RUM events. - * - *

See {@link #aggregateRUMEventsWithHttpInfo}. - * - * @param body (required) - * @return RUMAnalyticsAggregateResponse - * @throws ApiException if fails to make API call - */ - public RUMAnalyticsAggregateResponse aggregateRUMEvents(RUMAggregateRequest body) - throws ApiException { + * Aggregate RUM events. + * + * See {@link #aggregateRUMEventsWithHttpInfo}. + * + * @param body (required) + * @return RUMAnalyticsAggregateResponse + * @throws ApiException if fails to make API call + */ + public RUMAnalyticsAggregateResponse aggregateRUMEvents(RUMAggregateRequest body) throws ApiException { return aggregateRUMEventsWithHttpInfo(body).getData(); } /** - * Aggregate RUM events. - * - *

See {@link #aggregateRUMEventsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<RUMAnalyticsAggregateResponse> - */ - public CompletableFuture aggregateRUMEventsAsync( - RUMAggregateRequest body) { - return aggregateRUMEventsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Aggregate RUM events. + * + * See {@link #aggregateRUMEventsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RUMAnalyticsAggregateResponse> + */ + public CompletableFutureaggregateRUMEventsAsync(RUMAggregateRequest body) { + return aggregateRUMEventsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + *

The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries.

* - * @param body (required) + * @param body (required) * @return ApiResponse<RUMAnalyticsAggregateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -104,133 +107,95 @@ public CompletableFuture aggregateRUMEventsAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse aggregateRUMEventsWithHttpInfo( - RUMAggregateRequest body) throws ApiException { + public ApiResponse aggregateRUMEventsWithHttpInfo(RUMAggregateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateRUMEvents"); + throw new ApiException(400, "Missing the required parameter 'body' when calling aggregateRUMEvents"); } // create path and map variables String localVarPath = "/api/v2/rum/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.aggregateRUMEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.aggregateRUMEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Aggregate RUM events. * - *

See {@link #aggregateRUMEventsWithHttpInfo}. + * See {@link #aggregateRUMEventsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RUMAnalyticsAggregateResponse>> */ - public CompletableFuture> - aggregateRUMEventsWithHttpInfoAsync(RUMAggregateRequest body) { + public CompletableFuture> aggregateRUMEventsWithHttpInfoAsync(RUMAggregateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling aggregateRUMEvents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling aggregateRUMEvents")); + return result; } // create path and map variables String localVarPath = "/api/v2/rum/analytics/aggregate"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.aggregateRUMEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.aggregateRUMEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a new RUM application. - * - *

See {@link #createRUMApplicationWithHttpInfo}. - * - * @param body (required) - * @return RUMApplicationResponse - * @throws ApiException if fails to make API call - */ - public RUMApplicationResponse createRUMApplication(RUMApplicationCreateRequest body) - throws ApiException { + * Create a new RUM application. + * + * See {@link #createRUMApplicationWithHttpInfo}. + * + * @param body (required) + * @return RUMApplicationResponse + * @throws ApiException if fails to make API call + */ + public RUMApplicationResponse createRUMApplication(RUMApplicationCreateRequest body) throws ApiException { return createRUMApplicationWithHttpInfo(body).getData(); } /** - * Create a new RUM application. - * - *

See {@link #createRUMApplicationWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<RUMApplicationResponse> - */ - public CompletableFuture createRUMApplicationAsync( - RUMApplicationCreateRequest body) { - return createRUMApplicationWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a new RUM application. + * + * See {@link #createRUMApplicationWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RUMApplicationResponse> + */ + public CompletableFuturecreateRUMApplicationAsync(RUMApplicationCreateRequest body) { + return createRUMApplicationWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a new RUM application in your organization. + *

Create a new RUM application in your organization.

* - * @param body (required) + * @param body (required) * @return ApiResponse<RUMApplicationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -238,128 +203,94 @@ public CompletableFuture createRUMApplicationAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createRUMApplicationWithHttpInfo( - RUMApplicationCreateRequest body) throws ApiException { + public ApiResponse createRUMApplicationWithHttpInfo(RUMApplicationCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createRUMApplication"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createRUMApplication"); } // create path and map variables String localVarPath = "/api/v2/rum/applications"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.createRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.createRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a new RUM application. * - *

See {@link #createRUMApplicationWithHttpInfo}. + * See {@link #createRUMApplicationWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RUMApplicationResponse>> */ - public CompletableFuture> - createRUMApplicationWithHttpInfoAsync(RUMApplicationCreateRequest body) { + public CompletableFuture> createRUMApplicationWithHttpInfoAsync(RUMApplicationCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createRUMApplication")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createRUMApplication")); + return result; } // create path and map variables String localVarPath = "/api/v2/rum/applications"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.createRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.createRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a RUM application. - * - *

See {@link #deleteRUMApplicationWithHttpInfo}. - * - * @param id RUM application ID. (required) - * @throws ApiException if fails to make API call - */ - public void deleteRUMApplication(String id) throws ApiException { + * Delete a RUM application. + * + * See {@link #deleteRUMApplicationWithHttpInfo}. + * + * @param id RUM application ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRUMApplication(String id) throws ApiException { deleteRUMApplicationWithHttpInfo(id); } /** - * Delete a RUM application. - * - *

See {@link #deleteRUMApplicationWithHttpInfoAsync}. - * - * @param id RUM application ID. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteRUMApplicationAsync(String id) { - return deleteRUMApplicationWithHttpInfoAsync(id) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a RUM application. + * + * See {@link #deleteRUMApplicationWithHttpInfoAsync}. + * + * @param id RUM application ID. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteRUMApplicationAsync(String id) { + return deleteRUMApplicationWithHttpInfoAsync(id).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an existing RUM application in your organization. + *

Delete an existing RUM application in your organization.

* * @param id RUM application ID. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -372,40 +303,24 @@ public ApiResponse deleteRUMApplicationWithHttpInfo(String id) throws ApiE // verify the required parameter 'id' is set if (id == null) { - throw new ApiException( - 400, "Missing the required parameter 'id' when calling deleteRUMApplication"); + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteRUMApplication"); } // create path and map variables - String localVarPath = - "/api/v2/rum/applications/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/rum/applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.deleteRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.deleteRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a RUM application. * - *

See {@link #deleteRUMApplicationWithHttpInfo}. + * See {@link #deleteRUMApplicationWithHttpInfo}. * * @param id RUM application ID. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -415,83 +330,65 @@ public CompletableFuture> deleteRUMApplicationWithHttpInfoAsyn // verify the required parameter 'id' is set if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'id' when calling deleteRUMApplication")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'id' when calling deleteRUMApplication")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/rum/applications/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/rum/applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.deleteRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.deleteRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a RUM application. - * - *

See {@link #getRUMApplicationWithHttpInfo}. - * - * @param id RUM application ID. (required) - * @return RUMApplicationResponse - * @throws ApiException if fails to make API call - */ - public RUMApplicationResponse getRUMApplication(String id) throws ApiException { + * Get a RUM application. + * + * See {@link #getRUMApplicationWithHttpInfo}. + * + * @param id RUM application ID. (required) + * @return RUMApplicationResponse + * @throws ApiException if fails to make API call + */ + public RUMApplicationResponse getRUMApplication(String id) throws ApiException { return getRUMApplicationWithHttpInfo(id).getData(); } /** - * Get a RUM application. - * - *

See {@link #getRUMApplicationWithHttpInfoAsync}. - * - * @param id RUM application ID. (required) - * @return CompletableFuture<RUMApplicationResponse> - */ - public CompletableFuture getRUMApplicationAsync(String id) { - return getRUMApplicationWithHttpInfoAsync(id) - .thenApply( - response -> { - return response.getData(); - }); + * Get a RUM application. + * + * See {@link #getRUMApplicationWithHttpInfoAsync}. + * + * @param id RUM application ID. (required) + * @return CompletableFuture<RUMApplicationResponse> + */ + public CompletableFuturegetRUMApplicationAsync(String id) { + return getRUMApplicationWithHttpInfoAsync(id).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the RUM application with given ID in your organization. + *

Get the RUM application with given ID in your organization.

* * @param id RUM application ID. (required) * @return ApiResponse<RUMApplicationResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 No Content -
+ *
* * * @@ -499,130 +396,94 @@ public CompletableFuture getRUMApplicationAsync(String i * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getRUMApplicationWithHttpInfo(String id) - throws ApiException { + public ApiResponse getRUMApplicationWithHttpInfo(String id) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { - throw new ApiException( - 400, "Missing the required parameter 'id' when calling getRUMApplication"); + throw new ApiException(400, "Missing the required parameter 'id' when calling getRUMApplication"); } // create path and map variables - String localVarPath = - "/api/v2/rum/applications/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/rum/applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.getRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.getRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a RUM application. * - *

See {@link #getRUMApplicationWithHttpInfo}. + * See {@link #getRUMApplicationWithHttpInfo}. * * @param id RUM application ID. (required) * @return CompletableFuture<ApiResponse<RUMApplicationResponse>> */ - public CompletableFuture> getRUMApplicationWithHttpInfoAsync( - String id) { + public CompletableFuture> getRUMApplicationWithHttpInfoAsync(String id) { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'id' when calling getRUMApplication")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'id' when calling getRUMApplication")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/rum/applications/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/rum/applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.getRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.getRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List all the RUM applications. - * - *

See {@link #getRUMApplicationsWithHttpInfo}. - * - * @return RUMApplicationsResponse - * @throws ApiException if fails to make API call - */ - public RUMApplicationsResponse getRUMApplications() throws ApiException { + * List all the RUM applications. + * + * See {@link #getRUMApplicationsWithHttpInfo}. + * + * @return RUMApplicationsResponse + * @throws ApiException if fails to make API call + */ + public RUMApplicationsResponse getRUMApplications() throws ApiException { return getRUMApplicationsWithHttpInfo().getData(); } /** - * List all the RUM applications. - * - *

See {@link #getRUMApplicationsWithHttpInfoAsync}. - * - * @return CompletableFuture<RUMApplicationsResponse> - */ - public CompletableFuture getRUMApplicationsAsync() { - return getRUMApplicationsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List all the RUM applications. + * + * See {@link #getRUMApplicationsWithHttpInfoAsync}. + * + * @return CompletableFuture<RUMApplicationsResponse> + */ + public CompletableFuturegetRUMApplicationsAsync() { + return getRUMApplicationsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all the RUM applications in your organization. + *

List all the RUM applications in your organization.

* * @return ApiResponse<RUMApplicationsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -635,71 +496,44 @@ public ApiResponse getRUMApplicationsWithHttpInfo() thr // create path and map variables String localVarPath = "/api/v2/rum/applications"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.getRUMApplications", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.getRUMApplications", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List all the RUM applications. * - *

See {@link #getRUMApplicationsWithHttpInfo}. + * See {@link #getRUMApplicationsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<RUMApplicationsResponse>> */ - public CompletableFuture> - getRUMApplicationsWithHttpInfoAsync() { + public CompletableFuture> getRUMApplicationsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/rum/applications"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.getRUMApplications", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.getRUMApplications", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listRUMEvents. */ + /** + * Manage optional parameters to listRUMEvents. + */ public static class ListRUMEventsOptionalParameters { private String filterQuery; private OffsetDateTime filterFrom; @@ -710,7 +544,6 @@ public static class ListRUMEventsOptionalParameters { /** * Set filterQuery. - * * @param filterQuery Search query following RUM syntax. (optional) * @return ListRUMEventsOptionalParameters */ @@ -721,7 +554,6 @@ public ListRUMEventsOptionalParameters filterQuery(String filterQuery) { /** * Set filterFrom. - * * @param filterFrom Minimum timestamp for requested events. (optional) * @return ListRUMEventsOptionalParameters */ @@ -732,7 +564,6 @@ public ListRUMEventsOptionalParameters filterFrom(OffsetDateTime filterFrom) { /** * Set filterTo. - * * @param filterTo Maximum timestamp for requested events. (optional) * @return ListRUMEventsOptionalParameters */ @@ -743,7 +574,6 @@ public ListRUMEventsOptionalParameters filterTo(OffsetDateTime filterTo) { /** * Set sort. - * * @param sort Order of events in results. (optional) * @return ListRUMEventsOptionalParameters */ @@ -754,9 +584,7 @@ public ListRUMEventsOptionalParameters sort(RUMSort sort) { /** * Set pageCursor. - * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor List following results with a cursor provided in the previous query. (optional) * @return ListRUMEventsOptionalParameters */ public ListRUMEventsOptionalParameters pageCursor(String pageCursor) { @@ -766,7 +594,6 @@ public ListRUMEventsOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. - * * @param pageLimit Maximum number of events in the response. (optional, default to 10) * @return ListRUMEventsOptionalParameters */ @@ -777,126 +604,112 @@ public ListRUMEventsOptionalParameters pageLimit(Integer pageLimit) { } /** - * Get a list of RUM events. - * - *

See {@link #listRUMEventsWithHttpInfo}. - * - * @return RUMEventsResponse - * @throws ApiException if fails to make API call - */ - public RUMEventsResponse listRUMEvents() throws ApiException { + * Get a list of RUM events. + * + * See {@link #listRUMEventsWithHttpInfo}. + * + * @return RUMEventsResponse + * @throws ApiException if fails to make API call + */ + public RUMEventsResponse listRUMEvents () throws ApiException { return listRUMEventsWithHttpInfo(new ListRUMEventsOptionalParameters()).getData(); } /** - * Get a list of RUM events. - * - *

See {@link #listRUMEventsWithHttpInfoAsync}. - * - * @return CompletableFuture<RUMEventsResponse> - */ - public CompletableFuture listRUMEventsAsync() { - return listRUMEventsWithHttpInfoAsync(new ListRUMEventsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of RUM events. + * + * See {@link #listRUMEventsWithHttpInfoAsync}. + * + * @return CompletableFuture<RUMEventsResponse> + */ + public CompletableFuturelistRUMEventsAsync() { + return listRUMEventsWithHttpInfoAsync(new ListRUMEventsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of RUM events. - * - *

See {@link #listRUMEventsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return RUMEventsResponse - * @throws ApiException if fails to make API call - */ - public RUMEventsResponse listRUMEvents(ListRUMEventsOptionalParameters parameters) - throws ApiException { + * Get a list of RUM events. + * + * See {@link #listRUMEventsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return RUMEventsResponse + * @throws ApiException if fails to make API call + */ + public RUMEventsResponse listRUMEvents(ListRUMEventsOptionalParameters parameters) throws ApiException { return listRUMEventsWithHttpInfo(parameters).getData(); } /** - * Get a list of RUM events. - * - *

See {@link #listRUMEventsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<RUMEventsResponse> - */ - public CompletableFuture listRUMEventsAsync( - ListRUMEventsOptionalParameters parameters) { - return listRUMEventsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of RUM events. + * + * See {@link #listRUMEventsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RUMEventsResponse> + */ + public CompletableFuturelistRUMEventsAsync(ListRUMEventsOptionalParameters parameters) { + return listRUMEventsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of RUM events. - * - *

See {@link #listRUMEventsWithHttpInfo}. - * - * @return PaginationIterable<RUMEvent> - */ + * Get a list of RUM events. + * + * See {@link #listRUMEventsWithHttpInfo}. + * + * @return PaginationIterable<RUMEvent> + */ public PaginationIterable listRUMEventsWithPagination() { ListRUMEventsOptionalParameters parameters = new ListRUMEventsOptionalParameters(); return listRUMEventsWithPagination(parameters); } /** - * Get a list of RUM events. - * - *

See {@link #listRUMEventsWithHttpInfo}. - * - * @return RUMEventsResponse - */ - public PaginationIterable listRUMEventsWithPagination( - ListRUMEventsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a list of RUM events. + * + * See {@link #listRUMEventsWithHttpInfo}. + * + * @return RUMEventsResponse + */ + public PaginationIterable listRUMEventsWithPagination(ListRUMEventsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + + + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = new PaginationIterable(this, "listRUMEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listRUMEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + return iterator; } + /** - * List endpoint returns events that match a RUM search query. Results are - * paginated. - * - *

Use this endpoint to see your latest RUM events. + *

List endpoint returns events that match a RUM search query. + * Results are paginated.

+ *

Use this endpoint to see your latest RUM events.

* * @param parameters Optional parameters for the request. * @return ApiResponse<RUMEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK -
+ *
* * * @@ -905,8 +718,7 @@ public PaginationIterable listRUMEventsWithPagination( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listRUMEventsWithHttpInfo( - ListRUMEventsOptionalParameters parameters) throws ApiException { + public ApiResponse listRUMEventsWithHttpInfo(ListRUMEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -917,6 +729,7 @@ public ApiResponse listRUMEventsWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/rum/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -927,36 +740,19 @@ public ApiResponse listRUMEventsWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.listRUMEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.listRUMEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of RUM events. * - *

See {@link #listRUMEventsWithHttpInfo}. + * See {@link #listRUMEventsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<RUMEventsResponse>> */ - public CompletableFuture> listRUMEventsWithHttpInfoAsync( - ListRUMEventsOptionalParameters parameters) { + public CompletableFuture> listRUMEventsWithHttpInfoAsync(ListRUMEventsOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -967,6 +763,7 @@ public CompletableFuture> listRUMEventsWithHttpIn // create path and map variables String localVarPath = "/api/v2/rum/events"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -979,115 +776,93 @@ public CompletableFuture> listRUMEventsWithHttpIn Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.listRUMEvents", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.listRUMEvents", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Search RUM events. - * - *

See {@link #searchRUMEventsWithHttpInfo}. - * - * @param body (required) - * @return RUMEventsResponse - * @throws ApiException if fails to make API call - */ - public RUMEventsResponse searchRUMEvents(RUMSearchEventsRequest body) throws ApiException { + * Search RUM events. + * + * See {@link #searchRUMEventsWithHttpInfo}. + * + * @param body (required) + * @return RUMEventsResponse + * @throws ApiException if fails to make API call + */ + public RUMEventsResponse searchRUMEvents(RUMSearchEventsRequest body) throws ApiException { return searchRUMEventsWithHttpInfo(body).getData(); } /** - * Search RUM events. - * - *

See {@link #searchRUMEventsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<RUMEventsResponse> - */ - public CompletableFuture searchRUMEventsAsync(RUMSearchEventsRequest body) { - return searchRUMEventsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Search RUM events. + * + * See {@link #searchRUMEventsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RUMEventsResponse> + */ + public CompletableFuturesearchRUMEventsAsync(RUMSearchEventsRequest body) { + return searchRUMEventsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } /** - * Search RUM events. - * - *

See {@link #searchRUMEventsWithHttpInfo}. - * - * @param body (required) - * @return PaginationIterable<RUMEvent> - */ + * Search RUM events. + * + * See {@link #searchRUMEventsWithHttpInfo}. + * + * @param body (required) + * @return PaginationIterable<RUMEvent> + */ public PaginationIterable searchRUMEventsWithPagination(RUMSearchEventsRequest body) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = false; - Integer limit; + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = false; + Integer limit; - if (body.getPage() == null) { + + + if(body.getPage() == null) { body.setPage(new RUMQueryPageOptions()); - } + } - if (body.getPage().getLimit() == null) { + + + + if (body.getPage().getLimit() == null) { limit = 10; body.getPage().setLimit(limit); - } else { + } else { limit = body.getPage().getLimit(); - } + } - LinkedHashMap args = new LinkedHashMap(); - args.put("body", body); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchRUMEvents", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); - - return iterator; + + LinkedHashMap args = new LinkedHashMap(); + args.put("body", body); + + PaginationIterable iterator = new PaginationIterable(this, "searchRUMEvents", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); + + return iterator; } + /** - * List endpoint returns RUM events that match a RUM search query. Results are - * paginated. + *

List endpoint returns RUM events that match a RUM search query. + * Results are paginated.

+ *

Use this endpoint to build complex RUM events filtering and search.

* - *

Use this endpoint to build complex RUM events filtering and search. - * - * @param body (required) + * @param body (required) * @return ApiResponse<RUMEventsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1096,134 +871,98 @@ public PaginationIterable searchRUMEventsWithPagination(RUMSearchEvent * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse searchRUMEventsWithHttpInfo(RUMSearchEventsRequest body) - throws ApiException { + public ApiResponse searchRUMEventsWithHttpInfo(RUMSearchEventsRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling searchRUMEvents"); + throw new ApiException(400, "Missing the required parameter 'body' when calling searchRUMEvents"); } // create path and map variables String localVarPath = "/api/v2/rum/events/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.searchRUMEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.searchRUMEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Search RUM events. * - *

See {@link #searchRUMEventsWithHttpInfo}. + * See {@link #searchRUMEventsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RUMEventsResponse>> */ - public CompletableFuture> searchRUMEventsWithHttpInfoAsync( - RUMSearchEventsRequest body) { + public CompletableFuture> searchRUMEventsWithHttpInfoAsync(RUMSearchEventsRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling searchRUMEvents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling searchRUMEvents")); + return result; } // create path and map variables String localVarPath = "/api/v2/rum/events/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.searchRUMEvents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.searchRUMEvents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a RUM application. - * - *

See {@link #updateRUMApplicationWithHttpInfo}. - * - * @param id RUM application ID. (required) - * @param body (required) - * @return RUMApplicationResponse - * @throws ApiException if fails to make API call - */ - public RUMApplicationResponse updateRUMApplication(String id, RUMApplicationUpdateRequest body) - throws ApiException { + * Update a RUM application. + * + * See {@link #updateRUMApplicationWithHttpInfo}. + * + * @param id RUM application ID. (required) + * @param body (required) + * @return RUMApplicationResponse + * @throws ApiException if fails to make API call + */ + public RUMApplicationResponse updateRUMApplication(String id, RUMApplicationUpdateRequest body) throws ApiException { return updateRUMApplicationWithHttpInfo(id, body).getData(); } /** - * Update a RUM application. - * - *

See {@link #updateRUMApplicationWithHttpInfoAsync}. - * - * @param id RUM application ID. (required) - * @param body (required) - * @return CompletableFuture<RUMApplicationResponse> - */ - public CompletableFuture updateRUMApplicationAsync( - String id, RUMApplicationUpdateRequest body) { - return updateRUMApplicationWithHttpInfoAsync(id, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a RUM application. + * + * See {@link #updateRUMApplicationWithHttpInfoAsync}. + * + * @param id RUM application ID. (required) + * @param body (required) + * @return CompletableFuture<RUMApplicationResponse> + */ + public CompletableFutureupdateRUMApplicationAsync(String id, RUMApplicationUpdateRequest body) { + return updateRUMApplicationWithHttpInfoAsync(id, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update the RUM application with given ID in your organization. + *

Update the RUM application with given ID in your organization.

* * @param id RUM application ID. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<RUMApplicationResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1233,109 +972,71 @@ public CompletableFuture updateRUMApplicationAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateRUMApplicationWithHttpInfo( - String id, RUMApplicationUpdateRequest body) throws ApiException { + public ApiResponse updateRUMApplicationWithHttpInfo(String id, RUMApplicationUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'id' is set if (id == null) { - throw new ApiException( - 400, "Missing the required parameter 'id' when calling updateRUMApplication"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateRUMApplication"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateRUMApplication"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateRUMApplication"); } // create path and map variables - String localVarPath = - "/api/v2/rum/applications/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/rum/applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumApi.updateRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.RumApi.updateRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a RUM application. * - *

See {@link #updateRUMApplicationWithHttpInfo}. + * See {@link #updateRUMApplicationWithHttpInfo}. * * @param id RUM application ID. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<RUMApplicationResponse>> */ - public CompletableFuture> - updateRUMApplicationWithHttpInfoAsync(String id, RUMApplicationUpdateRequest body) { + public CompletableFuture> updateRUMApplicationWithHttpInfoAsync(String id, RUMApplicationUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'id' is set if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'id' when calling updateRUMApplication")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'id' when calling updateRUMApplication")); + 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 updateRUMApplication")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateRUMApplication")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/rum/applications/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/rum/applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.RumApi.updateRUMApplication", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.RumApi.updateRUMApplication", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 32fdefc201b..ec06f8eb22a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -1,42 +1,49 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.SecurityFilterCreateRequest; +import com.datadog.api.client.PaginationIterable; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.LinkedHashMap; +import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.SecurityFiltersResponse; import com.datadog.api.client.v2.model.SecurityFilterResponse; +import com.datadog.api.client.v2.model.SecurityFilterCreateRequest; import com.datadog.api.client.v2.model.SecurityFilterUpdateRequest; -import com.datadog.api.client.v2.model.SecurityFiltersResponse; import com.datadog.api.client.v2.model.SecurityMonitoringListRulesResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleCreatePayload; import com.datadog.api.client.v2.model.SecurityMonitoringRuleUpdatePayload; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalsSort; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSignal; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSignalAssigneeUpdateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSignalIncidentsUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringSignal; +import com.datadog.api.client.v2.model.SecurityMonitoringSignal; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSignalListRequestPage; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalStateUpdateRequest; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalTriageUpdateResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalsListResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringSignalsSort; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringApi { private ApiClient apiClient; - public SecurityMonitoringApi() { this(ApiClient.getDefaultApiClient()); } @@ -64,48 +71,43 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a security filter. - * - *

See {@link #createSecurityFilterWithHttpInfo}. - * - * @param body The definition of the new security filter. (required) - * @return SecurityFilterResponse - * @throws ApiException if fails to make API call - */ - public SecurityFilterResponse createSecurityFilter(SecurityFilterCreateRequest body) - throws ApiException { + * Create a security filter. + * + * See {@link #createSecurityFilterWithHttpInfo}. + * + * @param body The definition of the new security filter. (required) + * @return SecurityFilterResponse + * @throws ApiException if fails to make API call + */ + public SecurityFilterResponse createSecurityFilter(SecurityFilterCreateRequest body) throws ApiException { return createSecurityFilterWithHttpInfo(body).getData(); } /** - * Create a security filter. - * - *

See {@link #createSecurityFilterWithHttpInfoAsync}. - * - * @param body The definition of the new security filter. (required) - * @return CompletableFuture<SecurityFilterResponse> - */ - public CompletableFuture createSecurityFilterAsync( - SecurityFilterCreateRequest body) { - return createSecurityFilterWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a security filter. + * + * See {@link #createSecurityFilterWithHttpInfoAsync}. + * + * @param body The definition of the new security filter. (required) + * @return CompletableFuture<SecurityFilterResponse> + */ + public CompletableFuturecreateSecurityFilterAsync(SecurityFilterCreateRequest body) { + return createSecurityFilterWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a security filter. - * - *

See the security - * filter guide for more examples. + *

Create a security filter.

+ *

See the security filter guide + * for more examples.

* * @param body The definition of the new security filter. (required) * @return ApiResponse<SecurityFilterResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -115,131 +117,95 @@ public CompletableFuture createSecurityFilterAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createSecurityFilterWithHttpInfo( - SecurityFilterCreateRequest body) throws ApiException { + public ApiResponse createSecurityFilterWithHttpInfo(SecurityFilterCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSecurityFilter"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createSecurityFilter"); } // create path and map variables String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.createSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a security filter. * - *

See {@link #createSecurityFilterWithHttpInfo}. + * See {@link #createSecurityFilterWithHttpInfo}. * * @param body The definition of the new security filter. (required) * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> */ - public CompletableFuture> - createSecurityFilterWithHttpInfoAsync(SecurityFilterCreateRequest body) { + public CompletableFuture> createSecurityFilterWithHttpInfoAsync(SecurityFilterCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createSecurityFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSecurityFilter")); + return result; } // create path and map variables String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.createSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create a detection rule. - * - *

See {@link #createSecurityMonitoringRuleWithHttpInfo}. - * - * @param body (required) - * @return SecurityMonitoringRuleResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringRuleResponse createSecurityMonitoringRule( - SecurityMonitoringRuleCreatePayload body) throws ApiException { + * Create a detection rule. + * + * See {@link #createSecurityMonitoringRuleWithHttpInfo}. + * + * @param body (required) + * @return SecurityMonitoringRuleResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringRuleResponse createSecurityMonitoringRule(SecurityMonitoringRuleCreatePayload body) throws ApiException { return createSecurityMonitoringRuleWithHttpInfo(body).getData(); } /** - * Create a detection rule. - * - *

See {@link #createSecurityMonitoringRuleWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<SecurityMonitoringRuleResponse> - */ - public CompletableFuture createSecurityMonitoringRuleAsync( - SecurityMonitoringRuleCreatePayload body) { - return createSecurityMonitoringRuleWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a detection rule. + * + * See {@link #createSecurityMonitoringRuleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<SecurityMonitoringRuleResponse> + */ + public CompletableFuturecreateSecurityMonitoringRuleAsync(SecurityMonitoringRuleCreatePayload body) { + return createSecurityMonitoringRuleWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a detection rule. + *

Create a detection rule.

* - * @param body (required) + * @param body (required) * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -248,131 +214,94 @@ public CompletableFuture createSecurityMonitorin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createSecurityMonitoringRuleWithHttpInfo( - SecurityMonitoringRuleCreatePayload body) throws ApiException { + public ApiResponse createSecurityMonitoringRuleWithHttpInfo(SecurityMonitoringRuleCreatePayload body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSecurityMonitoringRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createSecurityMonitoringRule"); } // create path and map variables String localVarPath = "/api/v2/security_monitoring/rules"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.createSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a detection rule. * - *

See {@link #createSecurityMonitoringRuleWithHttpInfo}. + * See {@link #createSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> */ - public CompletableFuture> - createSecurityMonitoringRuleWithHttpInfoAsync(SecurityMonitoringRuleCreatePayload body) { + public CompletableFuture> createSecurityMonitoringRuleWithHttpInfoAsync(SecurityMonitoringRuleCreatePayload body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling createSecurityMonitoringRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createSecurityMonitoringRule")); + return result; } // create path and map variables String localVarPath = "/api/v2/security_monitoring/rules"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.createSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a security filter. - * - *

See {@link #deleteSecurityFilterWithHttpInfo}. - * - * @param securityFilterId The ID of the security filter. (required) - * @throws ApiException if fails to make API call - */ - public void deleteSecurityFilter(String securityFilterId) throws ApiException { + * Delete a security filter. + * + * See {@link #deleteSecurityFilterWithHttpInfo}. + * + * @param securityFilterId The ID of the security filter. (required) + * @throws ApiException if fails to make API call + */ + public void deleteSecurityFilter(String securityFilterId) throws ApiException { deleteSecurityFilterWithHttpInfo(securityFilterId); } /** - * Delete a security filter. - * - *

See {@link #deleteSecurityFilterWithHttpInfoAsync}. - * - * @param securityFilterId The ID of the security filter. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteSecurityFilterAsync(String securityFilterId) { - return deleteSecurityFilterWithHttpInfoAsync(securityFilterId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a security filter. + * + * See {@link #deleteSecurityFilterWithHttpInfoAsync}. + * + * @param securityFilterId The ID of the security filter. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteSecurityFilterAsync(String securityFilterId) { + return deleteSecurityFilterWithHttpInfoAsync(securityFilterId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a specific security filter. + *

Delete a specific security filter.

* * @param securityFilterId The ID of the security filter. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -381,139 +310,96 @@ public CompletableFuture deleteSecurityFilterAsync(String securityFilterId * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteSecurityFilterWithHttpInfo(String securityFilterId) - throws ApiException { + public ApiResponse deleteSecurityFilterWithHttpInfo(String securityFilterId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'securityFilterId' is set if (securityFilterId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling deleteSecurityFilter"); + throw new ApiException(400, "Missing the required parameter 'securityFilterId' when calling deleteSecurityFilter"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll("\\{" + "security_filter_id" + "\\}", apiClient.escapeString(securityFilterId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.deleteSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a security filter. * - *

See {@link #deleteSecurityFilterWithHttpInfo}. + * See {@link #deleteSecurityFilterWithHttpInfo}. * * @param securityFilterId The ID of the security filter. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSecurityFilterWithHttpInfoAsync( - String securityFilterId) { + public CompletableFuture> deleteSecurityFilterWithHttpInfoAsync(String securityFilterId) { Object localVarPostBody = null; // verify the required parameter 'securityFilterId' is set if (securityFilterId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling" - + " deleteSecurityFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'securityFilterId' when calling deleteSecurityFilter")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll("\\{" + "security_filter_id" + "\\}", apiClient.escapeString(securityFilterId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.deleteSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Delete an existing rule. - * - *

See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. - * - * @param ruleId The ID of the rule. (required) - * @throws ApiException if fails to make API call - */ - public void deleteSecurityMonitoringRule(String ruleId) throws ApiException { + * Delete an existing rule. + * + * See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. + * + * @param ruleId The ID of the rule. (required) + * @throws ApiException if fails to make API call + */ + public void deleteSecurityMonitoringRule(String ruleId) throws ApiException { deleteSecurityMonitoringRuleWithHttpInfo(ruleId); } /** - * Delete an existing rule. - * - *

See {@link #deleteSecurityMonitoringRuleWithHttpInfoAsync}. - * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteSecurityMonitoringRuleAsync(String ruleId) { - return deleteSecurityMonitoringRuleWithHttpInfoAsync(ruleId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an existing rule. + * + * See {@link #deleteSecurityMonitoringRuleWithHttpInfoAsync}. + * + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteSecurityMonitoringRuleAsync(String ruleId) { + return deleteSecurityMonitoringRuleWithHttpInfoAsync(ruleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an existing rule. Default rules cannot be deleted. + *

Delete an existing rule. Default rules cannot be deleted.

* * @param ruleId The ID of the rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -522,140 +408,100 @@ public CompletableFuture deleteSecurityMonitoringRuleAsync(String ruleId) * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteSecurityMonitoringRuleWithHttpInfo(String ruleId) - throws ApiException { + public ApiResponse deleteSecurityMonitoringRuleWithHttpInfo(String ruleId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'ruleId' is set if (ruleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule"); + throw new ApiException(400, "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an existing rule. * - *

See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. + * See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. * * @param ruleId The ID of the rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSecurityMonitoringRuleWithHttpInfoAsync( - String ruleId) { + public CompletableFuture> deleteSecurityMonitoringRuleWithHttpInfoAsync(String ruleId) { Object localVarPostBody = null; // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Modify the triage assignee of a security signal. - * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalAssignee( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { + * Modify the triage assignee of a security signal. + * + * See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalAssignee(String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { return editSecurityMonitoringSignalAssigneeWithHttpInfo(signalId, body).getData(); } /** - * Modify the triage assignee of a security signal. - * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> - */ - public CompletableFuture - editSecurityMonitoringSignalAssigneeAsync( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { - return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Modify the triage assignee of a security signal. + * + * See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + */ + public CompletableFutureeditSecurityMonitoringSignalAssigneeAsync(String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { + return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Modify the triage assignee of a security signal. + *

Modify the triage assignee of a security signal.

* * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -665,169 +511,113 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalAssigneeWithHttpInfo( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { + public ApiResponse editSecurityMonitoringSignalAssigneeWithHttpInfo(String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalAssignee"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalAssignee"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalAssignee"); + throw new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalAssignee"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/assignee" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}/assignee" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Modify the triage assignee of a security signal. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + * See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - editSecurityMonitoringSignalAssigneeWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { + public CompletableFuture> editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalAssignee")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalAssignee")); + 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" - + " editSecurityMonitoringSignalAssignee")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalAssignee")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/assignee" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}/assignee" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Change the related incidents of a security signal. - * - *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalIncidents( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) throws ApiException { + * Change the related incidents of a security signal. + * + * See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalIncidents(String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) throws ApiException { return editSecurityMonitoringSignalIncidentsWithHttpInfo(signalId, body).getData(); } /** - * Change the related incidents of a security signal. - * - *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> - */ - public CompletableFuture - editSecurityMonitoringSignalIncidentsAsync( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { - return editSecurityMonitoringSignalIncidentsWithHttpInfoAsync(signalId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Change the related incidents of a security signal. + * + * See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + */ + public CompletableFutureeditSecurityMonitoringSignalIncidentsAsync(String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { + return editSecurityMonitoringSignalIncidentsWithHttpInfoAsync(signalId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Change the related incidents for a security signal. + *

Change the related incidents for a security signal.

* * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -837,170 +627,113 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalIncidentsWithHttpInfo( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) - throws ApiException { + public ApiResponse editSecurityMonitoringSignalIncidentsWithHttpInfo(String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalIncidents"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalIncidents"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalIncidents"); + throw new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalIncidents"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/incidents" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}/incidents" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Change the related incidents of a security signal. * - *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. + * See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - editSecurityMonitoringSignalIncidentsWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { + public CompletableFuture> editSecurityMonitoringSignalIncidentsWithHttpInfoAsync(String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalIncidents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalIncidents")); + 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" - + " editSecurityMonitoringSignalIncidents")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalIncidents")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/incidents" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}/incidents" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Change the triage state of a security signal. - * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalState( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { + * Change the triage state of a security signal. + * + * See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalState(String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { return editSecurityMonitoringSignalStateWithHttpInfo(signalId, body).getData(); } /** - * Change the triage state of a security signal. - * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> - */ - public CompletableFuture - editSecurityMonitoringSignalStateAsync( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) { - return editSecurityMonitoringSignalStateWithHttpInfoAsync(signalId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Change the triage state of a security signal. + * + * See {@link #editSecurityMonitoringSignalStateWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + */ + public CompletableFutureeditSecurityMonitoringSignalStateAsync(String signalId, SecurityMonitoringSignalStateUpdateRequest body) { + return editSecurityMonitoringSignalStateWithHttpInfoAsync(signalId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Change the triage state of a security signal. + *

Change the triage state of a security signal.

* * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1010,166 +743,112 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalStateWithHttpInfo( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { + public ApiResponse editSecurityMonitoringSignalStateWithHttpInfo(String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalState"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalState"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState"); + throw new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/state" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}/state" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Change the triage state of a security signal. * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. + * See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @param body Attributes describing the signal update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - editSecurityMonitoringSignalStateWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) { + public CompletableFuture> editSecurityMonitoringSignalStateWithHttpInfoAsync(String signalId, SecurityMonitoringSignalStateUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalState")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignalState")); + 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" - + " editSecurityMonitoringSignalState")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/state" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}/state" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a security filter. - * - *

See {@link #getSecurityFilterWithHttpInfo}. - * - * @param securityFilterId The ID of the security filter. (required) - * @return SecurityFilterResponse - * @throws ApiException if fails to make API call - */ - public SecurityFilterResponse getSecurityFilter(String securityFilterId) throws ApiException { + * Get a security filter. + * + * See {@link #getSecurityFilterWithHttpInfo}. + * + * @param securityFilterId The ID of the security filter. (required) + * @return SecurityFilterResponse + * @throws ApiException if fails to make API call + */ + public SecurityFilterResponse getSecurityFilter(String securityFilterId) throws ApiException { return getSecurityFilterWithHttpInfo(securityFilterId).getData(); } /** - * Get a security filter. - * - *

See {@link #getSecurityFilterWithHttpInfoAsync}. - * - * @param securityFilterId The ID of the security filter. (required) - * @return CompletableFuture<SecurityFilterResponse> - */ - public CompletableFuture getSecurityFilterAsync(String securityFilterId) { - return getSecurityFilterWithHttpInfoAsync(securityFilterId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a security filter. + * + * See {@link #getSecurityFilterWithHttpInfoAsync}. + * + * @param securityFilterId The ID of the security filter. (required) + * @return CompletableFuture<SecurityFilterResponse> + */ + public CompletableFuturegetSecurityFilterAsync(String securityFilterId) { + return getSecurityFilterWithHttpInfoAsync(securityFilterId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the details of a specific security filter. - * - *

See the security - * filter guide for more examples. + *

Get the details of a specific security filter.

+ *

See the security filter guide + * for more examples.

* * @param securityFilterId The ID of the security filter. (required) * @return ApiResponse<SecurityFilterResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1178,140 +857,97 @@ public CompletableFuture getSecurityFilterAsync(String s * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSecurityFilterWithHttpInfo(String securityFilterId) - throws ApiException { + public ApiResponse getSecurityFilterWithHttpInfo(String securityFilterId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'securityFilterId' is set if (securityFilterId == null) { - throw new ApiException( - 400, "Missing the required parameter 'securityFilterId' when calling getSecurityFilter"); + throw new ApiException(400, "Missing the required parameter 'securityFilterId' when calling getSecurityFilter"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll("\\{" + "security_filter_id" + "\\}", apiClient.escapeString(securityFilterId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.getSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a security filter. * - *

See {@link #getSecurityFilterWithHttpInfo}. + * See {@link #getSecurityFilterWithHttpInfo}. * * @param securityFilterId The ID of the security filter. (required) * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> */ - public CompletableFuture> getSecurityFilterWithHttpInfoAsync( - String securityFilterId) { + public CompletableFuture> getSecurityFilterWithHttpInfoAsync(String securityFilterId) { Object localVarPostBody = null; // verify the required parameter 'securityFilterId' is set if (securityFilterId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling getSecurityFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'securityFilterId' when calling getSecurityFilter")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll("\\{" + "security_filter_id" + "\\}", apiClient.escapeString(securityFilterId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.getSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a rule's details. - * - *

See {@link #getSecurityMonitoringRuleWithHttpInfo}. - * - * @param ruleId The ID of the rule. (required) - * @return SecurityMonitoringRuleResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringRuleResponse getSecurityMonitoringRule(String ruleId) - throws ApiException { + * Get a rule's details. + * + * See {@link #getSecurityMonitoringRuleWithHttpInfo}. + * + * @param ruleId The ID of the rule. (required) + * @return SecurityMonitoringRuleResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringRuleResponse getSecurityMonitoringRule(String ruleId) throws ApiException { return getSecurityMonitoringRuleWithHttpInfo(ruleId).getData(); } /** - * Get a rule's details. - * - *

See {@link #getSecurityMonitoringRuleWithHttpInfoAsync}. - * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<SecurityMonitoringRuleResponse> - */ - public CompletableFuture getSecurityMonitoringRuleAsync( - String ruleId) { - return getSecurityMonitoringRuleWithHttpInfoAsync(ruleId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a rule's details. + * + * See {@link #getSecurityMonitoringRuleWithHttpInfoAsync}. + * + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<SecurityMonitoringRuleResponse> + */ + public CompletableFuturegetSecurityMonitoringRuleAsync(String ruleId) { + return getSecurityMonitoringRuleWithHttpInfoAsync(ruleId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a rule's details. + *

Get a rule's details.

* * @param ruleId The ID of the rule. (required) * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1319,137 +955,97 @@ public CompletableFuture getSecurityMonitoringRu * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSecurityMonitoringRuleWithHttpInfo( - String ruleId) throws ApiException { + public ApiResponse getSecurityMonitoringRuleWithHttpInfo(String ruleId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'ruleId' is set if (ruleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule"); + throw new ApiException(400, "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.getSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a rule's details. * - *

See {@link #getSecurityMonitoringRuleWithHttpInfo}. + * See {@link #getSecurityMonitoringRuleWithHttpInfo}. * * @param ruleId The ID of the rule. (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> */ - public CompletableFuture> - getSecurityMonitoringRuleWithHttpInfoAsync(String ruleId) { + public CompletableFuture> getSecurityMonitoringRuleWithHttpInfoAsync(String ruleId) { Object localVarPostBody = null; // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.getSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a signal's details. - * - *

See {@link #getSecurityMonitoringSignalWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @return SecurityMonitoringSignal - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignal getSecurityMonitoringSignal(String signalId) throws ApiException { + * Get a signal's details. + * + * See {@link #getSecurityMonitoringSignalWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @return SecurityMonitoringSignal + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignal getSecurityMonitoringSignal(String signalId) throws ApiException { return getSecurityMonitoringSignalWithHttpInfo(signalId).getData(); } /** - * Get a signal's details. - * - *

See {@link #getSecurityMonitoringSignalWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @return CompletableFuture<SecurityMonitoringSignal> - */ - public CompletableFuture getSecurityMonitoringSignalAsync( - String signalId) { - return getSecurityMonitoringSignalWithHttpInfoAsync(signalId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a signal's details. + * + * See {@link #getSecurityMonitoringSignalWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<SecurityMonitoringSignal> + */ + public CompletableFuturegetSecurityMonitoringSignalAsync(String signalId) { + return getSecurityMonitoringSignalWithHttpInfoAsync(signalId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a signal's details. + *

Get a signal's details.

* * @param signalId The ID of the signal. (required) * @return ApiResponse<SecurityMonitoringSignal> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1457,133 +1053,94 @@ public CompletableFuture getSecurityMonitoringSignalAs * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getSecurityMonitoringSignalWithHttpInfo( - String signalId) throws ApiException { + public ApiResponse getSecurityMonitoringSignalWithHttpInfo(String signalId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'signalId' is set if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling getSecurityMonitoringSignal"); + throw new ApiException(400, "Missing the required parameter 'signalId' when calling getSecurityMonitoringSignal"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringSignal", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.getSecurityMonitoringSignal", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a signal's details. * - *

See {@link #getSecurityMonitoringSignalWithHttpInfo}. + * See {@link #getSecurityMonitoringSignalWithHttpInfo}. * * @param signalId The ID of the signal. (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringSignal>> */ - public CompletableFuture> - getSecurityMonitoringSignalWithHttpInfoAsync(String signalId) { + public CompletableFuture> getSecurityMonitoringSignalWithHttpInfoAsync(String signalId) { Object localVarPostBody = null; // verify the required parameter 'signalId' is set if (signalId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " getSecurityMonitoringSignal")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'signalId' when calling getSecurityMonitoringSignal")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security_monitoring/signals/{signal_id}" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringSignal", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.getSecurityMonitoringSignal", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all security filters. - * - *

See {@link #listSecurityFiltersWithHttpInfo}. - * - * @return SecurityFiltersResponse - * @throws ApiException if fails to make API call - */ - public SecurityFiltersResponse listSecurityFilters() throws ApiException { + * Get all security filters. + * + * See {@link #listSecurityFiltersWithHttpInfo}. + * + * @return SecurityFiltersResponse + * @throws ApiException if fails to make API call + */ + public SecurityFiltersResponse listSecurityFilters() throws ApiException { return listSecurityFiltersWithHttpInfo().getData(); } /** - * Get all security filters. - * - *

See {@link #listSecurityFiltersWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityFiltersResponse> - */ - public CompletableFuture listSecurityFiltersAsync() { - return listSecurityFiltersWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all security filters. + * + * See {@link #listSecurityFiltersWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityFiltersResponse> + */ + public CompletableFuturelistSecurityFiltersAsync() { + return listSecurityFiltersWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of configured security filters with their definitions. + *

Get the list of configured security filters with their definitions.

* * @return ApiResponse<SecurityFiltersResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1591,86 +1148,56 @@ public CompletableFuture listSecurityFiltersAsync() { * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listSecurityFiltersWithHttpInfo() - throws ApiException { + public ApiResponse listSecurityFiltersWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFilters", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.listSecurityFilters", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all security filters. * - *

See {@link #listSecurityFiltersWithHttpInfo}. + * See {@link #listSecurityFiltersWithHttpInfo}. * * @return CompletableFuture<ApiResponse<SecurityFiltersResponse>> */ - public CompletableFuture> - listSecurityFiltersWithHttpInfoAsync() { + public CompletableFuture> listSecurityFiltersWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFilters", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.listSecurityFilters", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listSecurityMonitoringRules. */ + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to listSecurityMonitoringRules. + */ public static class ListSecurityMonitoringRulesOptionalParameters { private Long pageSize; private Long pageNumber; /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListSecurityMonitoringRulesOptionalParameters */ public ListSecurityMonitoringRulesOptionalParameters pageSize(Long pageSize) { @@ -1680,7 +1207,6 @@ public ListSecurityMonitoringRulesOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListSecurityMonitoringRulesOptionalParameters */ @@ -1691,74 +1217,66 @@ public ListSecurityMonitoringRulesOptionalParameters pageNumber(Long pageNumber) } /** - * List rules. - * - *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. - * - * @return SecurityMonitoringListRulesResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringListRulesResponse listSecurityMonitoringRules() throws ApiException { - return listSecurityMonitoringRulesWithHttpInfo( - new ListSecurityMonitoringRulesOptionalParameters()) - .getData(); + * List rules. + * + * See {@link #listSecurityMonitoringRulesWithHttpInfo}. + * + * @return SecurityMonitoringListRulesResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringListRulesResponse listSecurityMonitoringRules () throws ApiException { + return listSecurityMonitoringRulesWithHttpInfo(new ListSecurityMonitoringRulesOptionalParameters()).getData(); } /** - * List rules. - * - *

See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityMonitoringListRulesResponse> - */ - public CompletableFuture listSecurityMonitoringRulesAsync() { - return listSecurityMonitoringRulesWithHttpInfoAsync( - new ListSecurityMonitoringRulesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * List rules. + * + * See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringListRulesResponse> + */ + public CompletableFuturelistSecurityMonitoringRulesAsync() { + return listSecurityMonitoringRulesWithHttpInfoAsync(new ListSecurityMonitoringRulesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * List rules. - * - *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringListRulesResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringListRulesResponse listSecurityMonitoringRules( - ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { + * List rules. + * + * See {@link #listSecurityMonitoringRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringListRulesResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringListRulesResponse listSecurityMonitoringRules(ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { return listSecurityMonitoringRulesWithHttpInfo(parameters).getData(); } /** - * List rules. - * - *

See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringListRulesResponse> - */ - public CompletableFuture listSecurityMonitoringRulesAsync( - ListSecurityMonitoringRulesOptionalParameters parameters) { - return listSecurityMonitoringRulesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List rules. + * + * See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringListRulesResponse> + */ + public CompletableFuturelistSecurityMonitoringRulesAsync(ListSecurityMonitoringRulesOptionalParameters parameters) { + return listSecurityMonitoringRulesWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List rules. + *

List rules.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SecurityMonitoringListRulesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1766,57 +1284,40 @@ public CompletableFuture listSecurityMonito * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listSecurityMonitoringRulesWithHttpInfo( - ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { + public ApiResponse listSecurityMonitoringRulesWithHttpInfo(ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/security_monitoring/rules"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringRules", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.listSecurityMonitoringRules", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List rules. * - *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. + * See {@link #listSecurityMonitoringRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SecurityMonitoringListRulesResponse>> */ - public CompletableFuture> - listSecurityMonitoringRulesWithHttpInfoAsync( - ListSecurityMonitoringRulesOptionalParameters parameters) { + public CompletableFuture> listSecurityMonitoringRulesWithHttpInfoAsync(ListSecurityMonitoringRulesOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/security_monitoring/rules"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1825,33 +1326,18 @@ public ApiResponse listSecurityMonitoringRu Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringRules", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.listSecurityMonitoringRules", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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 listSecurityMonitoringSignals. */ + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to listSecurityMonitoringSignals. + */ public static class ListSecurityMonitoringSignalsOptionalParameters { private String filterQuery; private OffsetDateTime filterFrom; @@ -1862,7 +1348,6 @@ public static class ListSecurityMonitoringSignalsOptionalParameters { /** * Set filterQuery. - * * @param filterQuery The search query for security signals. (optional) * @return ListSecurityMonitoringSignalsOptionalParameters */ @@ -1873,7 +1358,6 @@ public ListSecurityMonitoringSignalsOptionalParameters filterQuery(String filter /** * Set filterFrom. - * * @param filterFrom The minimum timestamp for requested security signals. (optional) * @return ListSecurityMonitoringSignalsOptionalParameters */ @@ -1884,7 +1368,6 @@ public ListSecurityMonitoringSignalsOptionalParameters filterFrom(OffsetDateTime /** * Set filterTo. - * * @param filterTo The maximum timestamp for requested security signals. (optional) * @return ListSecurityMonitoringSignalsOptionalParameters */ @@ -1895,21 +1378,17 @@ public ListSecurityMonitoringSignalsOptionalParameters filterTo(OffsetDateTime f /** * Set sort. - * * @param sort The order of the security signals in results. (optional) * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListSecurityMonitoringSignalsOptionalParameters sort( - SecurityMonitoringSignalsSort sort) { + public ListSecurityMonitoringSignalsOptionalParameters sort(SecurityMonitoringSignalsSort sort) { this.sort = sort; return this; } /** * Set pageCursor. - * - * @param pageCursor A list of results using the cursor provided in the previous query. - * (optional) + * @param pageCursor A list of results using the cursor provided in the previous query. (optional) * @return ListSecurityMonitoringSignalsOptionalParameters */ public ListSecurityMonitoringSignalsOptionalParameters pageCursor(String pageCursor) { @@ -1919,9 +1398,7 @@ public ListSecurityMonitoringSignalsOptionalParameters pageCursor(String pageCur /** * Set pageLimit. - * - * @param pageLimit The maximum number of security signals in the response. (optional, default - * to 10) + * @param pageLimit The maximum number of security signals in the response. (optional, default to 10) * @return ListSecurityMonitoringSignalsOptionalParameters */ public ListSecurityMonitoringSignalsOptionalParameters pageLimit(Integer pageLimit) { @@ -1931,130 +1408,112 @@ public ListSecurityMonitoringSignalsOptionalParameters pageLimit(Integer pageLim } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. - * - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals() throws ApiException { - return listSecurityMonitoringSignalsWithHttpInfo( - new ListSecurityMonitoringSignalsOptionalParameters()) - .getData(); + * Get a quick list of security signals. + * + * See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals () throws ApiException { + return listSecurityMonitoringSignalsWithHttpInfo(new ListSecurityMonitoringSignalsOptionalParameters()).getData(); } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - listSecurityMonitoringSignalsAsync() { - return listSecurityMonitoringSignalsWithHttpInfoAsync( - new ListSecurityMonitoringSignalsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a quick list of security signals. + * + * See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuturelistSecurityMonitoringSignalsAsync() { + return listSecurityMonitoringSignalsWithHttpInfoAsync(new ListSecurityMonitoringSignalsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals( - ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + * Get a quick list of security signals. + * + * See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals(ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { return listSecurityMonitoringSignalsWithHttpInfo(parameters).getData(); } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - listSecurityMonitoringSignalsAsync( - ListSecurityMonitoringSignalsOptionalParameters parameters) { - return listSecurityMonitoringSignalsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a quick list of security signals. + * + * See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuturelistSecurityMonitoringSignalsAsync(ListSecurityMonitoringSignalsOptionalParameters parameters) { + return listSecurityMonitoringSignalsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. - * - * @return PaginationIterable<SecurityMonitoringSignal> - */ - public PaginationIterable - listSecurityMonitoringSignalsWithPagination() { - ListSecurityMonitoringSignalsOptionalParameters parameters = - new ListSecurityMonitoringSignalsOptionalParameters(); + * Get a quick list of security signals. + * + * See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @return PaginationIterable<SecurityMonitoringSignal> + */ + public PaginationIterable listSecurityMonitoringSignalsWithPagination() { + ListSecurityMonitoringSignalsOptionalParameters parameters = new ListSecurityMonitoringSignalsOptionalParameters(); return listSecurityMonitoringSignalsWithPagination(parameters); } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. - * - * @return SecurityMonitoringSignalsListResponse - */ - public PaginationIterable listSecurityMonitoringSignalsWithPagination( - ListSecurityMonitoringSignalsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { + * Get a quick list of security signals. + * + * See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + */ + public PaginationIterable listSecurityMonitoringSignalsWithPagination(ListSecurityMonitoringSignalsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.pageLimit == null) { limit = 10; parameters.pageLimit(limit); - } else { + } else { limit = parameters.pageLimit; - } + } + - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - PaginationIterable iterator = - new PaginationIterable( - this, - "listSecurityMonitoringSignals", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); + PaginationIterable iterator = new PaginationIterable(this, "listSecurityMonitoringSignals", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - return iterator; + return iterator; } + /** - * The list endpoint returns security signals that match a search query. Both this endpoint and - * the POST endpoint can be used interchangeably when listing security signals. + *

The list endpoint returns security signals that match a search query. + * Both this endpoint and the POST endpoint can be used interchangeably when listing + * security signals.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SecurityMonitoringSignalsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2063,9 +1522,7 @@ public PaginationIterable listSecurityMonitoringSignal * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - listSecurityMonitoringSignalsWithHttpInfo( - ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + public ApiResponse listSecurityMonitoringSignalsWithHttpInfo(ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -2076,6 +1533,7 @@ public PaginationIterable listSecurityMonitoringSignal // create path and map variables String localVarPath = "/api/v2/security_monitoring/signals"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2086,37 +1544,19 @@ public PaginationIterable listSecurityMonitoringSignal localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringSignals", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.listSecurityMonitoringSignals", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a quick list of security signals. * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * See {@link #listSecurityMonitoringSignalsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> */ - public CompletableFuture> - listSecurityMonitoringSignalsWithHttpInfoAsync( - ListSecurityMonitoringSignalsOptionalParameters parameters) { + public CompletableFuture> listSecurityMonitoringSignalsWithHttpInfoAsync(ListSecurityMonitoringSignalsOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; OffsetDateTime filterFrom = parameters.filterFrom; @@ -2127,6 +1567,7 @@ public PaginationIterable listSecurityMonitoringSignal // create path and map variables String localVarPath = "/api/v2/security_monitoring/signals"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -2139,183 +1580,149 @@ public PaginationIterable listSecurityMonitoringSignal Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringSignals", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.listSecurityMonitoringSignals", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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 searchSecurityMonitoringSignals. */ + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } + + /** + * Manage optional parameters to searchSecurityMonitoringSignals. + */ public static class SearchSecurityMonitoringSignalsOptionalParameters { private SecurityMonitoringSignalListRequest body; /** * Set body. - * - * @param body (optional) + * @param body (optional) * @return SearchSecurityMonitoringSignalsOptionalParameters */ - public SearchSecurityMonitoringSignalsOptionalParameters body( - SecurityMonitoringSignalListRequest body) { + public SearchSecurityMonitoringSignalsOptionalParameters body(SecurityMonitoringSignalListRequest body) { this.body = body; return this; } } /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. - * - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals() - throws ApiException { - return searchSecurityMonitoringSignalsWithHttpInfo( - new SearchSecurityMonitoringSignalsOptionalParameters()) - .getData(); + * Get a list of security signals. + * + * See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals () throws ApiException { + return searchSecurityMonitoringSignalsWithHttpInfo(new SearchSecurityMonitoringSignalsOptionalParameters()).getData(); } /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - searchSecurityMonitoringSignalsAsync() { - return searchSecurityMonitoringSignalsWithHttpInfoAsync( - new SearchSecurityMonitoringSignalsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of security signals. + * + * See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuturesearchSecurityMonitoringSignalsAsync() { + return searchSecurityMonitoringSignalsWithHttpInfoAsync(new SearchSecurityMonitoringSignalsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals( - SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + * Get a list of security signals. + * + * See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals(SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { return searchSecurityMonitoringSignalsWithHttpInfo(parameters).getData(); } /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - searchSecurityMonitoringSignalsAsync( - SearchSecurityMonitoringSignalsOptionalParameters parameters) { - return searchSecurityMonitoringSignalsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get a list of security signals. + * + * See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuturesearchSecurityMonitoringSignalsAsync(SearchSecurityMonitoringSignalsOptionalParameters parameters) { + return searchSecurityMonitoringSignalsWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. - * - * @return PaginationIterable<SecurityMonitoringSignal> - */ - public PaginationIterable - searchSecurityMonitoringSignalsWithPagination() { - SearchSecurityMonitoringSignalsOptionalParameters parameters = - new SearchSecurityMonitoringSignalsOptionalParameters(); + * Get a list of security signals. + * + * See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * + * @return PaginationIterable<SecurityMonitoringSignal> + */ + public PaginationIterable searchSecurityMonitoringSignalsWithPagination() { + SearchSecurityMonitoringSignalsOptionalParameters parameters = new SearchSecurityMonitoringSignalsOptionalParameters(); return searchSecurityMonitoringSignalsWithPagination(parameters); } /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. - * - * @return SecurityMonitoringSignalsListResponse - */ - public PaginationIterable searchSecurityMonitoringSignalsWithPagination( - SearchSecurityMonitoringSignalsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { + * Get a list of security signals. + * + * See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + */ + public PaginationIterable searchSecurityMonitoringSignalsWithPagination(SearchSecurityMonitoringSignalsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + + if (parameters.body == null) { parameters.body(new SecurityMonitoringSignalListRequest()); - } + } - if (parameters.body.getPage() == null) { + if(parameters.body.getPage() == null) { parameters.body.setPage(new SecurityMonitoringSignalListRequestPage()); - } + } + + - if (parameters.body.getPage().getLimit() == null) { + + if (parameters.body.getPage().getLimit() == null) { limit = 10; parameters.body.getPage().setLimit(limit); - } else { + } else { limit = parameters.body.getPage().getLimit(); - } + } - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); - PaginationIterable iterator = - new PaginationIterable( - this, - "searchSecurityMonitoringSignals", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - limit, - args); + PaginationIterable iterator = new PaginationIterable(this, "searchSecurityMonitoringSignals", resultsPath, valueGetterPath, valueSetterPath, valueSetterParamOptional, limit, args); - return iterator; + return iterator; } + /** - * Returns security signals that match a search query. Both this endpoint and the GET endpoint can - * be used interchangeably for listing security signals. + *

Returns security signals that match a search query. + * Both this endpoint and the GET endpoint can be used interchangeably for listing + * security signals.

* * @param parameters Optional parameters for the request. * @return ApiResponse<SecurityMonitoringSignalsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2324,123 +1731,87 @@ public PaginationIterable searchSecurityMonitoringSign * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - searchSecurityMonitoringSignalsWithHttpInfo( - SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + public ApiResponse searchSecurityMonitoringSignalsWithHttpInfo(SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/security_monitoring/signals/search"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a list of security signals. * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> */ - public CompletableFuture> - searchSecurityMonitoringSignalsWithHttpInfoAsync( - SearchSecurityMonitoringSignalsOptionalParameters parameters) { + public CompletableFuture> searchSecurityMonitoringSignalsWithHttpInfoAsync(SearchSecurityMonitoringSignalsOptionalParameters parameters) { Object localVarPostBody = parameters.body; // create path and map variables String localVarPath = "/api/v2/security_monitoring/signals/search"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a security filter. - * - *

See {@link #updateSecurityFilterWithHttpInfo}. - * - * @param securityFilterId The ID of the security filter. (required) - * @param body New definition of the security filter. (required) - * @return SecurityFilterResponse - * @throws ApiException if fails to make API call - */ - public SecurityFilterResponse updateSecurityFilter( - String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { + * Update a security filter. + * + * See {@link #updateSecurityFilterWithHttpInfo}. + * + * @param securityFilterId The ID of the security filter. (required) + * @param body New definition of the security filter. (required) + * @return SecurityFilterResponse + * @throws ApiException if fails to make API call + */ + public SecurityFilterResponse updateSecurityFilter(String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { return updateSecurityFilterWithHttpInfo(securityFilterId, body).getData(); } /** - * Update a security filter. - * - *

See {@link #updateSecurityFilterWithHttpInfoAsync}. - * - * @param securityFilterId The ID of the security filter. (required) - * @param body New definition of the security filter. (required) - * @return CompletableFuture<SecurityFilterResponse> - */ - public CompletableFuture updateSecurityFilterAsync( - String securityFilterId, SecurityFilterUpdateRequest body) { - return updateSecurityFilterWithHttpInfoAsync(securityFilterId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a security filter. + * + * See {@link #updateSecurityFilterWithHttpInfoAsync}. + * + * @param securityFilterId The ID of the security filter. (required) + * @param body New definition of the security filter. (required) + * @return CompletableFuture<SecurityFilterResponse> + */ + public CompletableFutureupdateSecurityFilterAsync(String securityFilterId, SecurityFilterUpdateRequest body) { + return updateSecurityFilterWithHttpInfoAsync(securityFilterId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a specific security filter. Returns the security filter object when the request is - * successful. + *

Update a specific security filter. + * Returns the security filter object when the request is successful.

* * @param securityFilterId The ID of the security filter. (required) * @param body New definition of the security filter. (required) * @return ApiResponse<SecurityFilterResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2451,165 +1822,115 @@ public CompletableFuture updateSecurityFilterAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateSecurityFilterWithHttpInfo( - String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { + public ApiResponse updateSecurityFilterWithHttpInfo(String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'securityFilterId' is set if (securityFilterId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling updateSecurityFilter"); + throw new ApiException(400, "Missing the required parameter 'securityFilterId' when calling updateSecurityFilter"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateSecurityFilter"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateSecurityFilter"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll("\\{" + "security_filter_id" + "\\}", apiClient.escapeString(securityFilterId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.updateSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a security filter. * - *

See {@link #updateSecurityFilterWithHttpInfo}. + * See {@link #updateSecurityFilterWithHttpInfo}. * * @param securityFilterId The ID of the security filter. (required) * @param body New definition of the security filter. (required) * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> */ - public CompletableFuture> - updateSecurityFilterWithHttpInfoAsync( - String securityFilterId, SecurityFilterUpdateRequest body) { + public CompletableFuture> updateSecurityFilterWithHttpInfoAsync(String securityFilterId, SecurityFilterUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'securityFilterId' is set if (securityFilterId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling" - + " updateSecurityFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'securityFilterId' when calling updateSecurityFilter")); + 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 updateSecurityFilter")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateSecurityFilter")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll("\\{" + "security_filter_id" + "\\}", apiClient.escapeString(securityFilterId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFilter", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.updateSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update an existing rule. - * - *

See {@link #updateSecurityMonitoringRuleWithHttpInfo}. - * - * @param ruleId The ID of the rule. (required) - * @param body (required) - * @return SecurityMonitoringRuleResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringRuleResponse updateSecurityMonitoringRule( - String ruleId, SecurityMonitoringRuleUpdatePayload body) throws ApiException { + * Update an existing rule. + * + * See {@link #updateSecurityMonitoringRuleWithHttpInfo}. + * + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return SecurityMonitoringRuleResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringRuleResponse updateSecurityMonitoringRule(String ruleId, SecurityMonitoringRuleUpdatePayload body) throws ApiException { return updateSecurityMonitoringRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update an existing rule. - * - *

See {@link #updateSecurityMonitoringRuleWithHttpInfoAsync}. - * - * @param ruleId The ID of the rule. (required) - * @param body (required) - * @return CompletableFuture<SecurityMonitoringRuleResponse> - */ - public CompletableFuture updateSecurityMonitoringRuleAsync( - String ruleId, SecurityMonitoringRuleUpdatePayload body) { - return updateSecurityMonitoringRuleWithHttpInfoAsync(ruleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update an existing rule. + * + * See {@link #updateSecurityMonitoringRuleWithHttpInfoAsync}. + * + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return CompletableFuture<SecurityMonitoringRuleResponse> + */ + public CompletableFutureupdateSecurityMonitoringRuleAsync(String ruleId, SecurityMonitoringRuleUpdatePayload body) { + return updateSecurityMonitoringRuleWithHttpInfoAsync(ruleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update an existing rule. When updating cases, queries or - * options, the whole field must be included. For example, when modifying a query all - * queries must be included. Default rules can only be updated to be enabled and to change - * notifications. + *

Update an existing rule. When updating cases, queries or options, the whole field + * must be included. For example, when modifying a query all queries must be included. + * Default rules can only be updated to be enabled and to change notifications.

* * @param ruleId The ID of the rule. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -2620,115 +1941,71 @@ public CompletableFuture updateSecurityMonitorin * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateSecurityMonitoringRuleWithHttpInfo( - String ruleId, SecurityMonitoringRuleUpdatePayload body) throws ApiException { + public ApiResponse updateSecurityMonitoringRuleWithHttpInfo(String ruleId, SecurityMonitoringRuleUpdatePayload body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'ruleId' is set if (ruleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling updateSecurityMonitoringRule"); + throw new ApiException(400, "Missing the required parameter 'ruleId' when calling updateSecurityMonitoringRule"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateSecurityMonitoringRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateSecurityMonitoringRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SecurityMonitoringApi.updateSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update an existing rule. * - *

See {@link #updateSecurityMonitoringRuleWithHttpInfo}. + * See {@link #updateSecurityMonitoringRuleWithHttpInfo}. * * @param ruleId The ID of the rule. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> */ - public CompletableFuture> - updateSecurityMonitoringRuleWithHttpInfoAsync( - String ruleId, SecurityMonitoringRuleUpdatePayload body) { + public CompletableFuture> updateSecurityMonitoringRuleWithHttpInfoAsync(String ruleId, SecurityMonitoringRuleUpdatePayload body) { Object localVarPostBody = body; // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling updateSecurityMonitoringRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'ruleId' when calling updateSecurityMonitoringRule")); + 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 updateSecurityMonitoringRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateSecurityMonitoringRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityMonitoringRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SecurityMonitoringApi.updateSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} + return apiClient.invokeAPIAsync("PUT", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); + } +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/SensitiveDataScannerApi.java b/src/main/java/com/datadog/api/client/v2/api/SensitiveDataScannerApi.java index 5a603599e11..26d0481bf24 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SensitiveDataScannerApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SensitiveDataScannerApi.java @@ -1,37 +1,45 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.PaginationIterable; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.LinkedHashMap; +import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.SensitiveDataScannerGetConfigResponse; +import com.datadog.api.client.v2.model.SensitiveDataScannerReorderGroupsResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerConfigRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerCreateGroupResponse; -import com.datadog.api.client.v2.model.SensitiveDataScannerCreateRuleResponse; -import com.datadog.api.client.v2.model.SensitiveDataScannerGetConfigResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupCreateRequest; -import com.datadog.api.client.v2.model.SensitiveDataScannerGroupDeleteRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupDeleteResponse; -import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdateRequest; +import com.datadog.api.client.v2.model.SensitiveDataScannerGroupDeleteRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdateResponse; -import com.datadog.api.client.v2.model.SensitiveDataScannerReorderGroupsResponse; +import com.datadog.api.client.v2.model.SensitiveDataScannerGroupUpdateRequest; +import com.datadog.api.client.v2.model.SensitiveDataScannerCreateRuleResponse; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleCreateRequest; -import com.datadog.api.client.v2.model.SensitiveDataScannerRuleDeleteRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleDeleteResponse; -import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdateRequest; +import com.datadog.api.client.v2.model.SensitiveDataScannerRuleDeleteRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdateResponse; +import com.datadog.api.client.v2.model.SensitiveDataScannerRuleUpdateRequest; import com.datadog.api.client.v2.model.SensitiveDataScannerStandardPatternsResponseData; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerApi { private ApiClient apiClient; - public SensitiveDataScannerApi() { this(ApiClient.getDefaultApiClient()); } @@ -59,47 +67,45 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Scanning Group. - * - *

See {@link #createScanningGroupWithHttpInfo}. - * - * @param body (required) - * @return SensitiveDataScannerCreateGroupResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerCreateGroupResponse createScanningGroup( - SensitiveDataScannerGroupCreateRequest body) throws ApiException { + * Create Scanning Group. + * + * See {@link #createScanningGroupWithHttpInfo}. + * + * @param body (required) + * @return SensitiveDataScannerCreateGroupResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerCreateGroupResponse createScanningGroup(SensitiveDataScannerGroupCreateRequest body) throws ApiException { return createScanningGroupWithHttpInfo(body).getData(); } /** - * Create Scanning Group. - * - *

See {@link #createScanningGroupWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerCreateGroupResponse> - */ - public CompletableFuture createScanningGroupAsync( - SensitiveDataScannerGroupCreateRequest body) { - return createScanningGroupWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create Scanning Group. + * + * See {@link #createScanningGroupWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerCreateGroupResponse> + */ + public CompletableFuturecreateScanningGroupAsync(SensitiveDataScannerGroupCreateRequest body) { + return createScanningGroupWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a scanning group. The request MAY include a configuration relationship. A rules - * relationship can be omitted entirely, but if it is included it MUST be null or an empty array - * (rules cannot be created at the same time). The new group will be ordered last within the - * configuration. + *

Create a scanning group. + * The request MAY include a configuration relationship. + * A rules relationship can be omitted entirely, but if it is included it MUST be + * null or an empty array (rules cannot be created at the same time). + * The new group will be ordered last within the configuration.

* - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerCreateGroupResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -108,136 +114,99 @@ public CompletableFuture createScanning * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createScanningGroupWithHttpInfo( - SensitiveDataScannerGroupCreateRequest body) throws ApiException { + public ApiResponse createScanningGroupWithHttpInfo(SensitiveDataScannerGroupCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createScanningGroup"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createScanningGroup"); } // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config/groups"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.createScanningGroup", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.createScanningGroup", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create Scanning Group. * - *

See {@link #createScanningGroupWithHttpInfo}. + * See {@link #createScanningGroupWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerCreateGroupResponse>> */ - public CompletableFuture> - createScanningGroupWithHttpInfoAsync(SensitiveDataScannerGroupCreateRequest body) { + public CompletableFuture> createScanningGroupWithHttpInfoAsync(SensitiveDataScannerGroupCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createScanningGroup")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createScanningGroup")); + return result; } // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config/groups"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.createScanningGroup", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.createScanningGroup", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create Scanning Rule. - * - *

See {@link #createScanningRuleWithHttpInfo}. - * - * @param body (required) - * @return SensitiveDataScannerCreateRuleResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerCreateRuleResponse createScanningRule( - SensitiveDataScannerRuleCreateRequest body) throws ApiException { + * Create Scanning Rule. + * + * See {@link #createScanningRuleWithHttpInfo}. + * + * @param body (required) + * @return SensitiveDataScannerCreateRuleResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerCreateRuleResponse createScanningRule(SensitiveDataScannerRuleCreateRequest body) throws ApiException { return createScanningRuleWithHttpInfo(body).getData(); } /** - * Create Scanning Rule. - * - *

See {@link #createScanningRuleWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerCreateRuleResponse> - */ - public CompletableFuture createScanningRuleAsync( - SensitiveDataScannerRuleCreateRequest body) { - return createScanningRuleWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create Scanning Rule. + * + * See {@link #createScanningRuleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerCreateRuleResponse> + */ + public CompletableFuturecreateScanningRuleAsync(SensitiveDataScannerRuleCreateRequest body) { + return createScanningRuleWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a scanning rule in a sensitive data scanner group, ordered last. The posted rule MUST - * include a group relationship. It MUST include either a standard_pattern relationship or a regex - * attribute, but not both. If included_attributes is empty or missing, we will scan all - * attributes except excluded_attributes. If both are missing, we will scan the whole event. + *

Create a scanning rule in a sensitive data scanner group, ordered last. + * The posted rule MUST include a group relationship. + * It MUST include either a standard_pattern relationship or a regex attribute, but not both. + * If included_attributes is empty or missing, we will scan all attributes except + * excluded_attributes. If both are missing, we will scan the whole event.

* - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerCreateRuleResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -246,136 +215,98 @@ public CompletableFuture createScanningR * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse createScanningRuleWithHttpInfo( - SensitiveDataScannerRuleCreateRequest body) throws ApiException { + public ApiResponse createScanningRuleWithHttpInfo(SensitiveDataScannerRuleCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createScanningRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createScanningRule"); } // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config/rules"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.createScanningRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.createScanningRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create Scanning Rule. * - *

See {@link #createScanningRuleWithHttpInfo}. + * See {@link #createScanningRuleWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerCreateRuleResponse>> */ - public CompletableFuture> - createScanningRuleWithHttpInfoAsync(SensitiveDataScannerRuleCreateRequest body) { + public CompletableFuture> createScanningRuleWithHttpInfoAsync(SensitiveDataScannerRuleCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createScanningRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createScanningRule")); + return result; } // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config/rules"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.createScanningRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.createScanningRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete Scanning Group. - * - *

See {@link #deleteScanningGroupWithHttpInfo}. - * - * @param groupId The ID of a group of rules. (required) - * @param body (required) - * @return SensitiveDataScannerGroupDeleteResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerGroupDeleteResponse deleteScanningGroup( - String groupId, SensitiveDataScannerGroupDeleteRequest body) throws ApiException { + * Delete Scanning Group. + * + * See {@link #deleteScanningGroupWithHttpInfo}. + * + * @param groupId The ID of a group of rules. (required) + * @param body (required) + * @return SensitiveDataScannerGroupDeleteResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerGroupDeleteResponse deleteScanningGroup(String groupId, SensitiveDataScannerGroupDeleteRequest body) throws ApiException { return deleteScanningGroupWithHttpInfo(groupId, body).getData(); } /** - * Delete Scanning Group. - * - *

See {@link #deleteScanningGroupWithHttpInfoAsync}. - * - * @param groupId The ID of a group of rules. (required) - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerGroupDeleteResponse> - */ - public CompletableFuture deleteScanningGroupAsync( - String groupId, SensitiveDataScannerGroupDeleteRequest body) { - return deleteScanningGroupWithHttpInfoAsync(groupId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete Scanning Group. + * + * See {@link #deleteScanningGroupWithHttpInfoAsync}. + * + * @param groupId The ID of a group of rules. (required) + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerGroupDeleteResponse> + */ + public CompletableFuturedeleteScanningGroupAsync(String groupId, SensitiveDataScannerGroupDeleteRequest body) { + return deleteScanningGroupWithHttpInfoAsync(groupId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given group. + *

Delete a given group.

* * @param groupId The ID of a group of rules. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerGroupDeleteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -384,158 +315,113 @@ public CompletableFuture deleteScanning * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteScanningGroupWithHttpInfo( - String groupId, SensitiveDataScannerGroupDeleteRequest body) throws ApiException { + public ApiResponse deleteScanningGroupWithHttpInfo(String groupId, SensitiveDataScannerGroupDeleteRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'groupId' is set if (groupId == null) { - throw new ApiException( - 400, "Missing the required parameter 'groupId' when calling deleteScanningGroup"); + throw new ApiException(400, "Missing the required parameter 'groupId' when calling deleteScanningGroup"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteScanningGroup"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteScanningGroup"); } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/groups/{group_id}" - .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/groups/{group_id}" + .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.deleteScanningGroup", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.deleteScanningGroup", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete Scanning Group. * - *

See {@link #deleteScanningGroupWithHttpInfo}. + * See {@link #deleteScanningGroupWithHttpInfo}. * * @param groupId The ID of a group of rules. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerGroupDeleteResponse>> */ - public CompletableFuture> - deleteScanningGroupWithHttpInfoAsync( - String groupId, SensitiveDataScannerGroupDeleteRequest body) { + public CompletableFuture> deleteScanningGroupWithHttpInfoAsync(String groupId, SensitiveDataScannerGroupDeleteRequest body) { Object localVarPostBody = body; // verify the required parameter 'groupId' is set if (groupId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'groupId' when calling deleteScanningGroup")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'groupId' when calling deleteScanningGroup")); + 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 deleteScanningGroup")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteScanningGroup")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/groups/{group_id}" - .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/groups/{group_id}" + .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.deleteScanningGroup", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.deleteScanningGroup", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete Scanning Rule. - * - *

See {@link #deleteScanningRuleWithHttpInfo}. - * - * @param ruleId The ID of the rule. (required) - * @param body (required) - * @return SensitiveDataScannerRuleDeleteResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerRuleDeleteResponse deleteScanningRule( - String ruleId, SensitiveDataScannerRuleDeleteRequest body) throws ApiException { + * Delete Scanning Rule. + * + * See {@link #deleteScanningRuleWithHttpInfo}. + * + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return SensitiveDataScannerRuleDeleteResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerRuleDeleteResponse deleteScanningRule(String ruleId, SensitiveDataScannerRuleDeleteRequest body) throws ApiException { return deleteScanningRuleWithHttpInfo(ruleId, body).getData(); } /** - * Delete Scanning Rule. - * - *

See {@link #deleteScanningRuleWithHttpInfoAsync}. - * - * @param ruleId The ID of the rule. (required) - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerRuleDeleteResponse> - */ - public CompletableFuture deleteScanningRuleAsync( - String ruleId, SensitiveDataScannerRuleDeleteRequest body) { - return deleteScanningRuleWithHttpInfoAsync(ruleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Delete Scanning Rule. + * + * See {@link #deleteScanningRuleWithHttpInfoAsync}. + * + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerRuleDeleteResponse> + */ + public CompletableFuturedeleteScanningRuleAsync(String ruleId, SensitiveDataScannerRuleDeleteRequest body) { + return deleteScanningRuleWithHttpInfoAsync(ruleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a given rule. + *

Delete a given rule.

* * @param ruleId The ID of the rule. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerRuleDeleteResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -544,150 +430,107 @@ public CompletableFuture deleteScanningR * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteScanningRuleWithHttpInfo( - String ruleId, SensitiveDataScannerRuleDeleteRequest body) throws ApiException { + public ApiResponse deleteScanningRuleWithHttpInfo(String ruleId, SensitiveDataScannerRuleDeleteRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'ruleId' is set if (ruleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling deleteScanningRule"); + throw new ApiException(400, "Missing the required parameter 'ruleId' when calling deleteScanningRule"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteScanningRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteScanningRule"); } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.deleteScanningRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.deleteScanningRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Delete Scanning Rule. * - *

See {@link #deleteScanningRuleWithHttpInfo}. + * See {@link #deleteScanningRuleWithHttpInfo}. * * @param ruleId The ID of the rule. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerRuleDeleteResponse>> */ - public CompletableFuture> - deleteScanningRuleWithHttpInfoAsync( - String ruleId, SensitiveDataScannerRuleDeleteRequest body) { + public CompletableFuture> deleteScanningRuleWithHttpInfoAsync(String ruleId, SensitiveDataScannerRuleDeleteRequest body) { Object localVarPostBody = body; // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'ruleId' when calling deleteScanningRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'ruleId' when calling deleteScanningRule")); + 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 deleteScanningRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling deleteScanningRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.deleteScanningRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.deleteScanningRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List Scanning Groups. - * - *

See {@link #listScanningGroupsWithHttpInfo}. - * - * @return SensitiveDataScannerGetConfigResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerGetConfigResponse listScanningGroups() throws ApiException { + * List Scanning Groups. + * + * See {@link #listScanningGroupsWithHttpInfo}. + * + * @return SensitiveDataScannerGetConfigResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerGetConfigResponse listScanningGroups() throws ApiException { return listScanningGroupsWithHttpInfo().getData(); } /** - * List Scanning Groups. - * - *

See {@link #listScanningGroupsWithHttpInfoAsync}. - * - * @return CompletableFuture<SensitiveDataScannerGetConfigResponse> - */ - public CompletableFuture listScanningGroupsAsync() { - return listScanningGroupsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List Scanning Groups. + * + * See {@link #listScanningGroupsWithHttpInfoAsync}. + * + * @return CompletableFuture<SensitiveDataScannerGetConfigResponse> + */ + public CompletableFuturelistScanningGroupsAsync() { + return listScanningGroupsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * List all the Scanning groups in your organization. + *

List all the Scanning groups in your organization.

* * @return ApiResponse<SensitiveDataScannerGetConfigResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -696,113 +539,79 @@ public CompletableFuture listScanningGrou * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listScanningGroupsWithHttpInfo() - throws ApiException { + public ApiResponse listScanningGroupsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.listScanningGroups", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.listScanningGroups", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List Scanning Groups. * - *

See {@link #listScanningGroupsWithHttpInfo}. + * See {@link #listScanningGroupsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<SensitiveDataScannerGetConfigResponse>> */ - public CompletableFuture> - listScanningGroupsWithHttpInfoAsync() { + public CompletableFuture> listScanningGroupsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.listScanningGroups", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.listScanningGroups", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * List standard patterns. - * - *

See {@link #listStandardPatternsWithHttpInfo}. - * - * @return SensitiveDataScannerStandardPatternsResponseData - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerStandardPatternsResponseData listStandardPatterns() - throws ApiException { + * List standard patterns. + * + * See {@link #listStandardPatternsWithHttpInfo}. + * + * @return SensitiveDataScannerStandardPatternsResponseData + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerStandardPatternsResponseData listStandardPatterns() throws ApiException { return listStandardPatternsWithHttpInfo().getData(); } /** - * List standard patterns. - * - *

See {@link #listStandardPatternsWithHttpInfoAsync}. - * - * @return CompletableFuture<SensitiveDataScannerStandardPatternsResponseData> - */ - public CompletableFuture - listStandardPatternsAsync() { - return listStandardPatternsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * List standard patterns. + * + * See {@link #listStandardPatternsWithHttpInfoAsync}. + * + * @return CompletableFuture<SensitiveDataScannerStandardPatternsResponseData> + */ + public CompletableFuturelistStandardPatternsAsync() { + return listStandardPatternsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Returns all standard patterns. + *

Returns all standard patterns.

* * @return ApiResponse<SensitiveDataScannerStandardPatternsResponseData> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -811,117 +620,82 @@ public SensitiveDataScannerStandardPatternsResponseData listStandardPatterns() * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - listStandardPatternsWithHttpInfo() throws ApiException { + public ApiResponse listStandardPatternsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config/standard-patterns"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.listStandardPatterns", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.listStandardPatterns", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List standard patterns. * - *

See {@link #listStandardPatternsWithHttpInfo}. + * See {@link #listStandardPatternsWithHttpInfo}. * - * @return - * CompletableFuture<ApiResponse<SensitiveDataScannerStandardPatternsResponseData>> + * @return CompletableFuture<ApiResponse<SensitiveDataScannerStandardPatternsResponseData>> */ - public CompletableFuture> - listStandardPatternsWithHttpInfoAsync() { + public CompletableFuture> listStandardPatternsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config/standard-patterns"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.listStandardPatterns", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.listStandardPatterns", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Reorder Groups. - * - *

See {@link #reorderScanningGroupsWithHttpInfo}. - * - * @param body (required) - * @return SensitiveDataScannerReorderGroupsResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerReorderGroupsResponse reorderScanningGroups( - SensitiveDataScannerConfigRequest body) throws ApiException { + * Reorder Groups. + * + * See {@link #reorderScanningGroupsWithHttpInfo}. + * + * @param body (required) + * @return SensitiveDataScannerReorderGroupsResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerReorderGroupsResponse reorderScanningGroups(SensitiveDataScannerConfigRequest body) throws ApiException { return reorderScanningGroupsWithHttpInfo(body).getData(); } /** - * Reorder Groups. - * - *

See {@link #reorderScanningGroupsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerReorderGroupsResponse> - */ - public CompletableFuture reorderScanningGroupsAsync( - SensitiveDataScannerConfigRequest body) { - return reorderScanningGroupsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Reorder Groups. + * + * See {@link #reorderScanningGroupsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerReorderGroupsResponse> + */ + public CompletableFuturereorderScanningGroupsAsync(SensitiveDataScannerConfigRequest body) { + return reorderScanningGroupsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Reorder the list of groups. + *

Reorder the list of groups.

* - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerReorderGroupsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -930,138 +704,101 @@ public CompletableFuture reorderScann * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse reorderScanningGroupsWithHttpInfo( - SensitiveDataScannerConfigRequest body) throws ApiException { + public ApiResponse reorderScanningGroupsWithHttpInfo(SensitiveDataScannerConfigRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling reorderScanningGroups"); + throw new ApiException(400, "Missing the required parameter 'body' when calling reorderScanningGroups"); } // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.reorderScanningGroups", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.reorderScanningGroups", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Reorder Groups. * - *

See {@link #reorderScanningGroupsWithHttpInfo}. + * See {@link #reorderScanningGroupsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerReorderGroupsResponse>> */ - public CompletableFuture> - reorderScanningGroupsWithHttpInfoAsync(SensitiveDataScannerConfigRequest body) { + public CompletableFuture> reorderScanningGroupsWithHttpInfoAsync(SensitiveDataScannerConfigRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling reorderScanningGroups")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling reorderScanningGroups")); + return result; } // create path and map variables String localVarPath = "/api/v2/sensitive-data-scanner/config"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.reorderScanningGroups", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.reorderScanningGroups", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update Scanning Group. - * - *

See {@link #updateScanningGroupWithHttpInfo}. - * - * @param groupId The ID of a group of rules. (required) - * @param body (required) - * @return SensitiveDataScannerGroupUpdateResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerGroupUpdateResponse updateScanningGroup( - String groupId, SensitiveDataScannerGroupUpdateRequest body) throws ApiException { + * Update Scanning Group. + * + * See {@link #updateScanningGroupWithHttpInfo}. + * + * @param groupId The ID of a group of rules. (required) + * @param body (required) + * @return SensitiveDataScannerGroupUpdateResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerGroupUpdateResponse updateScanningGroup(String groupId, SensitiveDataScannerGroupUpdateRequest body) throws ApiException { return updateScanningGroupWithHttpInfo(groupId, body).getData(); } /** - * Update Scanning Group. - * - *

See {@link #updateScanningGroupWithHttpInfoAsync}. - * - * @param groupId The ID of a group of rules. (required) - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerGroupUpdateResponse> - */ - public CompletableFuture updateScanningGroupAsync( - String groupId, SensitiveDataScannerGroupUpdateRequest body) { - return updateScanningGroupWithHttpInfoAsync(groupId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Scanning Group. + * + * See {@link #updateScanningGroupWithHttpInfoAsync}. + * + * @param groupId The ID of a group of rules. (required) + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerGroupUpdateResponse> + */ + public CompletableFutureupdateScanningGroupAsync(String groupId, SensitiveDataScannerGroupUpdateRequest body) { + return updateScanningGroupWithHttpInfoAsync(groupId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a group, including the order of the rules. Rules within the group are reordered by - * including a rules relationship. If the rules relationship is present, its data section MUST - * contain linkages for all of the rules currently in the group, and MUST NOT contain any others. + *

Update a group, including the order of the rules. + * Rules within the group are reordered by including a rules relationship. If the rules + * relationship is present, its data section MUST contain linkages for all of the rules + * currently in the group, and MUST NOT contain any others.

* * @param groupId The ID of a group of rules. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerGroupUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1070,160 +807,116 @@ public CompletableFuture updateScanning * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateScanningGroupWithHttpInfo( - String groupId, SensitiveDataScannerGroupUpdateRequest body) throws ApiException { + public ApiResponse updateScanningGroupWithHttpInfo(String groupId, SensitiveDataScannerGroupUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'groupId' is set if (groupId == null) { - throw new ApiException( - 400, "Missing the required parameter 'groupId' when calling updateScanningGroup"); + throw new ApiException(400, "Missing the required parameter 'groupId' when calling updateScanningGroup"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateScanningGroup"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateScanningGroup"); } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/groups/{group_id}" - .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/groups/{group_id}" + .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.updateScanningGroup", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.updateScanningGroup", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Scanning Group. * - *

See {@link #updateScanningGroupWithHttpInfo}. + * See {@link #updateScanningGroupWithHttpInfo}. * * @param groupId The ID of a group of rules. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerGroupUpdateResponse>> */ - public CompletableFuture> - updateScanningGroupWithHttpInfoAsync( - String groupId, SensitiveDataScannerGroupUpdateRequest body) { + public CompletableFuture> updateScanningGroupWithHttpInfoAsync(String groupId, SensitiveDataScannerGroupUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'groupId' is set if (groupId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'groupId' when calling updateScanningGroup")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'groupId' when calling updateScanningGroup")); + 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 updateScanningGroup")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateScanningGroup")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/groups/{group_id}" - .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/groups/{group_id}" + .replaceAll("\\{" + "group_id" + "\\}", apiClient.escapeString(groupId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.updateScanningGroup", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.updateScanningGroup", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update Scanning Rule. - * - *

See {@link #updateScanningRuleWithHttpInfo}. - * - * @param ruleId The ID of the rule. (required) - * @param body (required) - * @return SensitiveDataScannerRuleUpdateResponse - * @throws ApiException if fails to make API call - */ - public SensitiveDataScannerRuleUpdateResponse updateScanningRule( - String ruleId, SensitiveDataScannerRuleUpdateRequest body) throws ApiException { + * Update Scanning Rule. + * + * See {@link #updateScanningRuleWithHttpInfo}. + * + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return SensitiveDataScannerRuleUpdateResponse + * @throws ApiException if fails to make API call + */ + public SensitiveDataScannerRuleUpdateResponse updateScanningRule(String ruleId, SensitiveDataScannerRuleUpdateRequest body) throws ApiException { return updateScanningRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update Scanning Rule. - * - *

See {@link #updateScanningRuleWithHttpInfoAsync}. - * - * @param ruleId The ID of the rule. (required) - * @param body (required) - * @return CompletableFuture<SensitiveDataScannerRuleUpdateResponse> - */ - public CompletableFuture updateScanningRuleAsync( - String ruleId, SensitiveDataScannerRuleUpdateRequest body) { - return updateScanningRuleWithHttpInfoAsync(ruleId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update Scanning Rule. + * + * See {@link #updateScanningRuleWithHttpInfoAsync}. + * + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return CompletableFuture<SensitiveDataScannerRuleUpdateResponse> + */ + public CompletableFutureupdateScanningRuleAsync(String ruleId, SensitiveDataScannerRuleUpdateRequest body) { + return updateScanningRuleWithHttpInfoAsync(ruleId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Update a scanning rule. The request body MUST NOT include a standard_pattern relationship, as - * that relationship is non-editable. Trying to edit the regex attribute of a rule with a - * standard_pattern relationship will also result in an error. + *

Update a scanning rule. + * The request body MUST NOT include a standard_pattern relationship, as that relationship + * is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern + * relationship will also result in an error.

* * @param ruleId The ID of the rule. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<SensitiveDataScannerRuleUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1232,113 +925,71 @@ public CompletableFuture updateScanningR * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateScanningRuleWithHttpInfo( - String ruleId, SensitiveDataScannerRuleUpdateRequest body) throws ApiException { + public ApiResponse updateScanningRuleWithHttpInfo(String ruleId, SensitiveDataScannerRuleUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'ruleId' is set if (ruleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling updateScanningRule"); + throw new ApiException(400, "Missing the required parameter 'ruleId' when calling updateScanningRule"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateScanningRule"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateScanningRule"); } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.updateScanningRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.updateScanningRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update Scanning Rule. * - *

See {@link #updateScanningRuleWithHttpInfo}. + * See {@link #updateScanningRuleWithHttpInfo}. * * @param ruleId The ID of the rule. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<SensitiveDataScannerRuleUpdateResponse>> */ - public CompletableFuture> - updateScanningRuleWithHttpInfoAsync( - String ruleId, SensitiveDataScannerRuleUpdateRequest body) { + public CompletableFuture> updateScanningRuleWithHttpInfoAsync(String ruleId, SensitiveDataScannerRuleUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'ruleId' when calling updateScanningRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'ruleId' when calling updateScanningRule")); + 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 updateScanningRule")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateScanningRule")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/sensitive-data-scanner/config/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SensitiveDataScannerApi.updateScanningRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SensitiveDataScannerApi.updateScanningRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/ServiceAccountsApi.java b/src/main/java/com/datadog/api/client/v2/api/ServiceAccountsApi.java index a7a3fb8c914..c36b2d444eb 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ServiceAccountsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ServiceAccountsApi.java @@ -1,30 +1,37 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; -import com.datadog.api.client.v2.model.ApplicationKeyResponse; -import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -import com.datadog.api.client.v2.model.ApplicationKeysSort; -import com.datadog.api.client.v2.model.ListApplicationKeysResponse; -import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; -import com.datadog.api.client.v2.model.ServiceAccountCreateRequest; -import com.datadog.api.client.v2.model.UserResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.UserResponse; +import com.datadog.api.client.v2.model.ServiceAccountCreateRequest; +import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import com.datadog.api.client.v2.model.ApplicationKeysSort; +import com.datadog.api.client.v2.model.ApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeyCreateRequest; +import com.datadog.api.client.v2.model.PartialApplicationKeyResponse; +import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceAccountsApi { private ApiClient apiClient; - public ServiceAccountsApi() { this(ApiClient.getDefaultApiClient()); } @@ -52,43 +59,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a service account. - * - *

See {@link #createServiceAccountWithHttpInfo}. - * - * @param body (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse createServiceAccount(ServiceAccountCreateRequest body) throws ApiException { + * Create a service account. + * + * See {@link #createServiceAccountWithHttpInfo}. + * + * @param body (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse createServiceAccount(ServiceAccountCreateRequest body) throws ApiException { return createServiceAccountWithHttpInfo(body).getData(); } /** - * Create a service account. - * - *

See {@link #createServiceAccountWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture createServiceAccountAsync( - ServiceAccountCreateRequest body) { - return createServiceAccountWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a service account. + * + * See {@link #createServiceAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFuturecreateServiceAccountAsync(ServiceAccountCreateRequest body) { + return createServiceAccountWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a service account for your organization. + *

Create a service account for your organization.

* - * @param body (required) + * @param body (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,134 +102,98 @@ public CompletableFuture createServiceAccountAsync( * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse createServiceAccountWithHttpInfo( - ServiceAccountCreateRequest body) throws ApiException { + public ApiResponse createServiceAccountWithHttpInfo(ServiceAccountCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createServiceAccount"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createServiceAccount"); } // create path and map variables String localVarPath = "/api/v2/service_accounts"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.createServiceAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceAccountsApi.createServiceAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a service account. * - *

See {@link #createServiceAccountWithHttpInfo}. + * See {@link #createServiceAccountWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<UserResponse>> */ - public CompletableFuture> createServiceAccountWithHttpInfoAsync( - ServiceAccountCreateRequest body) { + public CompletableFuture> createServiceAccountWithHttpInfoAsync(ServiceAccountCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createServiceAccount")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createServiceAccount")); + return result; } // create path and map variables String localVarPath = "/api/v2/service_accounts"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.createServiceAccount", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceAccountsApi.createServiceAccount", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Create an application key for this service account. - * - *

See {@link #createServiceAccountApplicationKeyWithHttpInfo}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param body (required) - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public ApplicationKeyResponse createServiceAccountApplicationKey( - String serviceAccountId, ApplicationKeyCreateRequest body) throws ApiException { + * Create an application key for this service account. + * + * See {@link #createServiceAccountApplicationKeyWithHttpInfo}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param body (required) + * @return ApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public ApplicationKeyResponse createServiceAccountApplicationKey(String serviceAccountId, ApplicationKeyCreateRequest body) throws ApiException { return createServiceAccountApplicationKeyWithHttpInfo(serviceAccountId, body).getData(); } /** - * Create an application key for this service account. - * - *

See {@link #createServiceAccountApplicationKeyWithHttpInfoAsync}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param body (required) - * @return CompletableFuture<ApplicationKeyResponse> - */ - public CompletableFuture createServiceAccountApplicationKeyAsync( - String serviceAccountId, ApplicationKeyCreateRequest body) { - return createServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Create an application key for this service account. + * + * See {@link #createServiceAccountApplicationKeyWithHttpInfoAsync}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param body (required) + * @return CompletableFuture<ApplicationKeyResponse> + */ + public CompletableFuturecreateServiceAccountApplicationKeyAsync(String serviceAccountId, ApplicationKeyCreateRequest body) { + return createServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create an application key for this service account. + *

Create an application key for this service account.

* * @param serviceAccountId The ID of the service account. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<ApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -233,165 +202,112 @@ public CompletableFuture createServiceAccountApplication * *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
*/ - public ApiResponse createServiceAccountApplicationKeyWithHttpInfo( - String serviceAccountId, ApplicationKeyCreateRequest body) throws ApiException { + public ApiResponse createServiceAccountApplicationKeyWithHttpInfo(String serviceAccountId, ApplicationKeyCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " createServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling createServiceAccountApplicationKey"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createServiceAccountApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.createServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceAccountsApi.createServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create an application key for this service account. * - *

See {@link #createServiceAccountApplicationKeyWithHttpInfo}. + * See {@link #createServiceAccountApplicationKeyWithHttpInfo}. * * @param serviceAccountId The ID of the service account. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<ApplicationKeyResponse>> */ - public CompletableFuture> - createServiceAccountApplicationKeyWithHttpInfoAsync( - String serviceAccountId, ApplicationKeyCreateRequest body) { + public CompletableFuture> createServiceAccountApplicationKeyWithHttpInfoAsync(String serviceAccountId, ApplicationKeyCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " createServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling createServiceAccountApplicationKey")); + 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" - + " createServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createServiceAccountApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.createServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceAccountsApi.createServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete an application key for this service account. - * - *

See {@link #deleteServiceAccountApplicationKeyWithHttpInfo}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param appKeyId The ID of the application key. (required) - * @throws ApiException if fails to make API call - */ - public void deleteServiceAccountApplicationKey(String serviceAccountId, String appKeyId) - throws ApiException { + * Delete an application key for this service account. + * + * See {@link #deleteServiceAccountApplicationKeyWithHttpInfo}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param appKeyId The ID of the application key. (required) + * @throws ApiException if fails to make API call + */ + public void deleteServiceAccountApplicationKey(String serviceAccountId, String appKeyId) throws ApiException { deleteServiceAccountApplicationKeyWithHttpInfo(serviceAccountId, appKeyId); } /** - * Delete an application key for this service account. - * - *

See {@link #deleteServiceAccountApplicationKeyWithHttpInfoAsync}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param appKeyId The ID of the application key. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteServiceAccountApplicationKeyAsync( - String serviceAccountId, String appKeyId) { - return deleteServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, appKeyId) - .thenApply( - response -> { - return response.getData(); - }); + * Delete an application key for this service account. + * + * See {@link #deleteServiceAccountApplicationKeyWithHttpInfoAsync}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param appKeyId The ID of the application key. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteServiceAccountApplicationKeyAsync(String serviceAccountId, String appKeyId) { + return deleteServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, appKeyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete an application key owned by this service account. + *

Delete an application key owned by this service account.

* * @param serviceAccountId The ID of the service account. (required) * @param appKeyId The ID of the application key. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -400,168 +316,115 @@ public CompletableFuture deleteServiceAccountApplicationKeyAsync( * *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
*/ - public ApiResponse deleteServiceAccountApplicationKeyWithHttpInfo( - String serviceAccountId, String appKeyId) throws ApiException { + public ApiResponse deleteServiceAccountApplicationKeyWithHttpInfo(String serviceAccountId, String appKeyId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " deleteServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling deleteServiceAccountApplicationKey"); } // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " deleteServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling deleteServiceAccountApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())) - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())) + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.deleteServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceAccountsApi.deleteServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete an application key for this service account. * - *

See {@link #deleteServiceAccountApplicationKeyWithHttpInfo}. + * See {@link #deleteServiceAccountApplicationKeyWithHttpInfo}. * * @param serviceAccountId The ID of the service account. (required) * @param appKeyId The ID of the application key. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteServiceAccountApplicationKeyWithHttpInfoAsync( - String serviceAccountId, String appKeyId) { + public CompletableFuture> deleteServiceAccountApplicationKeyWithHttpInfoAsync(String serviceAccountId, String appKeyId) { Object localVarPostBody = null; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " deleteServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling deleteServiceAccountApplicationKey")); + return result; } // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " deleteServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling deleteServiceAccountApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())) - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())) + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.deleteServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceAccountsApi.deleteServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get one application key for this service account. - * - *

See {@link #getServiceAccountApplicationKeyWithHttpInfo}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param appKeyId The ID of the application key. (required) - * @return PartialApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public PartialApplicationKeyResponse getServiceAccountApplicationKey( - String serviceAccountId, String appKeyId) throws ApiException { + * Get one application key for this service account. + * + * See {@link #getServiceAccountApplicationKeyWithHttpInfo}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param appKeyId The ID of the application key. (required) + * @return PartialApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public PartialApplicationKeyResponse getServiceAccountApplicationKey(String serviceAccountId, String appKeyId) throws ApiException { return getServiceAccountApplicationKeyWithHttpInfo(serviceAccountId, appKeyId).getData(); } /** - * Get one application key for this service account. - * - *

See {@link #getServiceAccountApplicationKeyWithHttpInfoAsync}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param appKeyId The ID of the application key. (required) - * @return CompletableFuture<PartialApplicationKeyResponse> - */ - public CompletableFuture getServiceAccountApplicationKeyAsync( - String serviceAccountId, String appKeyId) { - return getServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, appKeyId) - .thenApply( - response -> { - return response.getData(); - }); + * Get one application key for this service account. + * + * See {@link #getServiceAccountApplicationKeyWithHttpInfoAsync}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param appKeyId The ID of the application key. (required) + * @return CompletableFuture<PartialApplicationKeyResponse> + */ + public CompletableFuturegetServiceAccountApplicationKeyAsync(String serviceAccountId, String appKeyId) { + return getServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, appKeyId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get an application key owned by this service account. + *

Get an application key owned by this service account.

* * @param serviceAccountId The ID of the service account. (required) * @param appKeyId The ID of the application key. (required) * @return ApiResponse<PartialApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -570,129 +433,79 @@ public CompletableFuture getServiceAccountApplica * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getServiceAccountApplicationKeyWithHttpInfo( - String serviceAccountId, String appKeyId) throws ApiException { + public ApiResponse getServiceAccountApplicationKeyWithHttpInfo(String serviceAccountId, String appKeyId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " getServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling getServiceAccountApplicationKey"); } // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling getServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling getServiceAccountApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())) - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())) + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.getServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceAccountsApi.getServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get one application key for this service account. * - *

See {@link #getServiceAccountApplicationKeyWithHttpInfo}. + * See {@link #getServiceAccountApplicationKeyWithHttpInfo}. * * @param serviceAccountId The ID of the service account. (required) * @param appKeyId The ID of the application key. (required) * @return CompletableFuture<ApiResponse<PartialApplicationKeyResponse>> */ - public CompletableFuture> - getServiceAccountApplicationKeyWithHttpInfoAsync(String serviceAccountId, String appKeyId) { + public CompletableFuture> getServiceAccountApplicationKeyWithHttpInfoAsync(String serviceAccountId, String appKeyId) { Object localVarPostBody = null; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " getServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling getServiceAccountApplicationKey")); + return result; } // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " getServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling getServiceAccountApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())) - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())) + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.getServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceAccountsApi.getServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listServiceAccountApplicationKeys. */ + /** + * Manage optional parameters to listServiceAccountApplicationKeys. + */ public static class ListServiceAccountApplicationKeysOptionalParameters { private Long pageSize; private Long pageNumber; @@ -703,9 +516,7 @@ public static class ListServiceAccountApplicationKeysOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListServiceAccountApplicationKeysOptionalParameters */ public ListServiceAccountApplicationKeysOptionalParameters pageSize(Long pageSize) { @@ -715,7 +526,6 @@ public ListServiceAccountApplicationKeysOptionalParameters pageSize(Long pageSiz /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListServiceAccountApplicationKeysOptionalParameters */ @@ -726,10 +536,7 @@ public ListServiceAccountApplicationKeysOptionalParameters pageNumber(Long pageN /** * Set sort. - * - * @param sort Application key attribute used to sort results. Sort order is ascending by - * default. In order to specify a descending sort, prefix the attribute with a minus sign. - * (optional, default to "name") + * @param sort Application key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign. (optional, default to "name") * @return ListServiceAccountApplicationKeysOptionalParameters */ public ListServiceAccountApplicationKeysOptionalParameters sort(ApplicationKeysSort sort) { @@ -739,7 +546,6 @@ public ListServiceAccountApplicationKeysOptionalParameters sort(ApplicationKeysS /** * Set filter. - * * @param filter Filter application keys by the specified string. (optional) * @return ListServiceAccountApplicationKeysOptionalParameters */ @@ -750,108 +556,91 @@ public ListServiceAccountApplicationKeysOptionalParameters filter(String filter) /** * Set filterCreatedAtStart. - * - * @param filterCreatedAtStart Only include application keys created on or after the specified - * date. (optional) + * @param filterCreatedAtStart Only include application keys created on or after the specified date. (optional) * @return ListServiceAccountApplicationKeysOptionalParameters */ - public ListServiceAccountApplicationKeysOptionalParameters filterCreatedAtStart( - String filterCreatedAtStart) { + public ListServiceAccountApplicationKeysOptionalParameters filterCreatedAtStart(String filterCreatedAtStart) { this.filterCreatedAtStart = filterCreatedAtStart; return this; } /** * Set filterCreatedAtEnd. - * - * @param filterCreatedAtEnd Only include application keys created on or before the specified - * date. (optional) + * @param filterCreatedAtEnd Only include application keys created on or before the specified date. (optional) * @return ListServiceAccountApplicationKeysOptionalParameters */ - public ListServiceAccountApplicationKeysOptionalParameters filterCreatedAtEnd( - String filterCreatedAtEnd) { + public ListServiceAccountApplicationKeysOptionalParameters filterCreatedAtEnd(String filterCreatedAtEnd) { this.filterCreatedAtEnd = filterCreatedAtEnd; return this; } } /** - * List application keys for this service account. - * - *

See {@link #listServiceAccountApplicationKeysWithHttpInfo}. - * - * @param serviceAccountId The ID of the service account. (required) - * @return ListApplicationKeysResponse - * @throws ApiException if fails to make API call - */ - public ListApplicationKeysResponse listServiceAccountApplicationKeys(String serviceAccountId) - throws ApiException { - return listServiceAccountApplicationKeysWithHttpInfo( - serviceAccountId, new ListServiceAccountApplicationKeysOptionalParameters()) - .getData(); + * List application keys for this service account. + * + * See {@link #listServiceAccountApplicationKeysWithHttpInfo}. + * + * @param serviceAccountId The ID of the service account. (required) + * @return ListApplicationKeysResponse + * @throws ApiException if fails to make API call + */ + public ListApplicationKeysResponse listServiceAccountApplicationKeys (String serviceAccountId) throws ApiException { + return listServiceAccountApplicationKeysWithHttpInfo( serviceAccountId, new ListServiceAccountApplicationKeysOptionalParameters()).getData(); } /** - * List application keys for this service account. - * - *

See {@link #listServiceAccountApplicationKeysWithHttpInfoAsync}. - * - * @param serviceAccountId The ID of the service account. (required) - * @return CompletableFuture<ListApplicationKeysResponse> - */ - public CompletableFuture listServiceAccountApplicationKeysAsync( - String serviceAccountId) { - return listServiceAccountApplicationKeysWithHttpInfoAsync( - serviceAccountId, new ListServiceAccountApplicationKeysOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * List application keys for this service account. + * + * See {@link #listServiceAccountApplicationKeysWithHttpInfoAsync}. + * + * @param serviceAccountId The ID of the service account. (required) + * @return CompletableFuture<ListApplicationKeysResponse> + */ + public CompletableFuturelistServiceAccountApplicationKeysAsync(String serviceAccountId) { + return listServiceAccountApplicationKeysWithHttpInfoAsync(serviceAccountId, new ListServiceAccountApplicationKeysOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * List application keys for this service account. - * - *

See {@link #listServiceAccountApplicationKeysWithHttpInfo}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param parameters Optional parameters for the request. - * @return ListApplicationKeysResponse - * @throws ApiException if fails to make API call - */ - public ListApplicationKeysResponse listServiceAccountApplicationKeys( - String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) - throws ApiException { + * List application keys for this service account. + * + * See {@link #listServiceAccountApplicationKeysWithHttpInfo}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param parameters Optional parameters for the request. + * @return ListApplicationKeysResponse + * @throws ApiException if fails to make API call + */ + public ListApplicationKeysResponse listServiceAccountApplicationKeys(String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) throws ApiException { return listServiceAccountApplicationKeysWithHttpInfo(serviceAccountId, parameters).getData(); } /** - * List application keys for this service account. - * - *

See {@link #listServiceAccountApplicationKeysWithHttpInfoAsync}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListApplicationKeysResponse> - */ - public CompletableFuture listServiceAccountApplicationKeysAsync( - String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) { - return listServiceAccountApplicationKeysWithHttpInfoAsync(serviceAccountId, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List application keys for this service account. + * + * See {@link #listServiceAccountApplicationKeysWithHttpInfoAsync}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListApplicationKeysResponse> + */ + public CompletableFuturelistServiceAccountApplicationKeysAsync( String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) { + return listServiceAccountApplicationKeysWithHttpInfoAsync(serviceAccountId, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * List all application keys available for this service account. + *

List all application keys available for this service account.

* * @param serviceAccountId The ID of the service account. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<ListApplicationKeysResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -861,17 +650,12 @@ public CompletableFuture listServiceAccountApplicat * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listServiceAccountApplicationKeysWithHttpInfo( - String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) - throws ApiException { + public ApiResponse listServiceAccountApplicationKeysWithHttpInfo(String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " listServiceAccountApplicationKeys"); + throw new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling listServiceAccountApplicationKeys"); } Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -880,12 +664,10 @@ public ApiResponse listServiceAccountApplicationKey String filterCreatedAtStart = parameters.filterCreatedAtStart; String filterCreatedAtEnd = parameters.filterCreatedAtEnd; // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -893,55 +675,30 @@ public ApiResponse listServiceAccountApplicationKey localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.listServiceAccountApplicationKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceAccountsApi.listServiceAccountApplicationKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List application keys for this service account. * - *

See {@link #listServiceAccountApplicationKeysWithHttpInfo}. + * See {@link #listServiceAccountApplicationKeysWithHttpInfo}. * * @param serviceAccountId The ID of the service account. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<ListApplicationKeysResponse>> */ - public CompletableFuture> - listServiceAccountApplicationKeysWithHttpInfoAsync( - String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) { + public CompletableFuture> listServiceAccountApplicationKeysWithHttpInfoAsync(String serviceAccountId, ListServiceAccountApplicationKeysOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " listServiceAccountApplicationKeys")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling listServiceAccountApplicationKeys")); + return result; } Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -950,12 +707,10 @@ public ApiResponse listServiceAccountApplicationKey String filterCreatedAtStart = parameters.filterCreatedAtStart; String filterCreatedAtEnd = parameters.filterCreatedAtEnd; // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -963,86 +718,62 @@ public ApiResponse listServiceAccountApplicationKey localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.listServiceAccountApplicationKeys", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceAccountsApi.listServiceAccountApplicationKeys", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Edit an application key for this service account. - * - *

See {@link #updateServiceAccountApplicationKeyWithHttpInfo}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param appKeyId The ID of the application key. (required) - * @param body (required) - * @return PartialApplicationKeyResponse - * @throws ApiException if fails to make API call - */ - public PartialApplicationKeyResponse updateServiceAccountApplicationKey( - String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) - throws ApiException { - return updateServiceAccountApplicationKeyWithHttpInfo(serviceAccountId, appKeyId, body) - .getData(); + * Edit an application key for this service account. + * + * See {@link #updateServiceAccountApplicationKeyWithHttpInfo}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param appKeyId The ID of the application key. (required) + * @param body (required) + * @return PartialApplicationKeyResponse + * @throws ApiException if fails to make API call + */ + public PartialApplicationKeyResponse updateServiceAccountApplicationKey(String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { + return updateServiceAccountApplicationKeyWithHttpInfo(serviceAccountId, appKeyId, body).getData(); } /** - * Edit an application key for this service account. - * - *

See {@link #updateServiceAccountApplicationKeyWithHttpInfoAsync}. - * - * @param serviceAccountId The ID of the service account. (required) - * @param appKeyId The ID of the application key. (required) - * @param body (required) - * @return CompletableFuture<PartialApplicationKeyResponse> - */ - public CompletableFuture updateServiceAccountApplicationKeyAsync( - String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) { - return updateServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, appKeyId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Edit an application key for this service account. + * + * See {@link #updateServiceAccountApplicationKeyWithHttpInfoAsync}. + * + * @param serviceAccountId The ID of the service account. (required) + * @param appKeyId The ID of the application key. (required) + * @param body (required) + * @return CompletableFuture<PartialApplicationKeyResponse> + */ + public CompletableFutureupdateServiceAccountApplicationKeyAsync(String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) { + return updateServiceAccountApplicationKeyWithHttpInfoAsync(serviceAccountId, appKeyId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit an application key owned by this service account. + *

Edit an application key owned by this service account.

* * @param serviceAccountId The ID of the service account. (required) * @param appKeyId The ID of the application key. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<PartialApplicationKeyResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1052,148 +783,86 @@ public CompletableFuture updateServiceAccountAppl * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateServiceAccountApplicationKeyWithHttpInfo( - String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) - throws ApiException { + public ApiResponse updateServiceAccountApplicationKeyWithHttpInfo(String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " updateServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling updateServiceAccountApplicationKey"); } // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " updateServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'appKeyId' when calling updateServiceAccountApplicationKey"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling updateServiceAccountApplicationKey"); + throw new ApiException(400, "Missing the required parameter 'body' when calling updateServiceAccountApplicationKey"); } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())) - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())) + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.updateServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceAccountsApi.updateServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Edit an application key for this service account. * - *

See {@link #updateServiceAccountApplicationKeyWithHttpInfo}. + * See {@link #updateServiceAccountApplicationKeyWithHttpInfo}. * * @param serviceAccountId The ID of the service account. (required) * @param appKeyId The ID of the application key. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<PartialApplicationKeyResponse>> */ - public CompletableFuture> - updateServiceAccountApplicationKeyWithHttpInfoAsync( - String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) { + public CompletableFuture> updateServiceAccountApplicationKeyWithHttpInfoAsync(String serviceAccountId, String appKeyId, ApplicationKeyUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'serviceAccountId' is set if (serviceAccountId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceAccountId' when calling" - + " updateServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceAccountId' when calling updateServiceAccountApplicationKey")); + return result; } // verify the required parameter 'appKeyId' is set if (appKeyId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'appKeyId' when calling" - + " updateServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'appKeyId' when calling updateServiceAccountApplicationKey")); + 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" - + " updateServiceAccountApplicationKey")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateServiceAccountApplicationKey")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" - .replaceAll( - "\\{" + "service_account_id" + "\\}", - apiClient.escapeString(serviceAccountId.toString())) - .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + String localVarPath = "/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}" + .replaceAll("\\{" + "service_account_id" + "\\}", apiClient.escapeString(serviceAccountId.toString())) + .replaceAll("\\{" + "app_key_id" + "\\}", apiClient.escapeString(appKeyId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceAccountsApi.updateServiceAccountApplicationKey", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceAccountsApi.updateServiceAccountApplicationKey", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/ServiceDefinitionApi.java b/src/main/java/com/datadog/api/client/v2/api/ServiceDefinitionApi.java index 260346ae8ed..fc38d6133ae 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ServiceDefinitionApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ServiceDefinitionApi.java @@ -1,25 +1,33 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.ServiceDefinitionCreateResponse; -import com.datadog.api.client.v2.model.ServiceDefinitionGetResponse; -import com.datadog.api.client.v2.model.ServiceDefinitionsCreateRequest; -import com.datadog.api.client.v2.model.ServiceDefinitionsListResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.ServiceDefinitionsListResponse; +import com.datadog.api.client.v2.model.ServiceDefinitionCreateResponse; +import com.datadog.api.client.v2.model.ServiceDefinitionsCreateRequest; +import com.datadog.api.client.v2.model.ServiceDefinitionGetResponse; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionApi { private ApiClient apiClient; - public ServiceDefinitionApi() { this(ApiClient.getDefaultApiClient()); } @@ -47,44 +55,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create or update service definition. - * - *

See {@link #createOrUpdateServiceDefinitionsWithHttpInfo}. - * - * @param body Service Definition YAML/JSON. (required) - * @return ServiceDefinitionCreateResponse - * @throws ApiException if fails to make API call - */ - public ServiceDefinitionCreateResponse createOrUpdateServiceDefinitions( - ServiceDefinitionsCreateRequest body) throws ApiException { + * Create or update service definition. + * + * See {@link #createOrUpdateServiceDefinitionsWithHttpInfo}. + * + * @param body Service Definition YAML/JSON. (required) + * @return ServiceDefinitionCreateResponse + * @throws ApiException if fails to make API call + */ + public ServiceDefinitionCreateResponse createOrUpdateServiceDefinitions(ServiceDefinitionsCreateRequest body) throws ApiException { return createOrUpdateServiceDefinitionsWithHttpInfo(body).getData(); } /** - * Create or update service definition. - * - *

See {@link #createOrUpdateServiceDefinitionsWithHttpInfoAsync}. - * - * @param body Service Definition YAML/JSON. (required) - * @return CompletableFuture<ServiceDefinitionCreateResponse> - */ - public CompletableFuture createOrUpdateServiceDefinitionsAsync( - ServiceDefinitionsCreateRequest body) { - return createOrUpdateServiceDefinitionsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create or update service definition. + * + * See {@link #createOrUpdateServiceDefinitionsWithHttpInfoAsync}. + * + * @param body Service Definition YAML/JSON. (required) + * @return CompletableFuture<ServiceDefinitionCreateResponse> + */ + public CompletableFuturecreateOrUpdateServiceDefinitionsAsync(ServiceDefinitionsCreateRequest body) { + return createOrUpdateServiceDefinitionsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create or update service definition in the Datadog Service Catalog. + *

Create or update service definition in the Datadog Service Catalog.

* * @param body Service Definition YAML/JSON. (required) * @return ApiResponse<ServiceDefinitionCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -94,133 +99,94 @@ public CompletableFuture createOrUpdateServiceD * *
Response details
Status Code Description Response Headers
200 CREATED -
429 Too many requests -
*/ - public ApiResponse createOrUpdateServiceDefinitionsWithHttpInfo( - ServiceDefinitionsCreateRequest body) throws ApiException { + public ApiResponse createOrUpdateServiceDefinitionsWithHttpInfo(ServiceDefinitionsCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createOrUpdateServiceDefinitions"); + throw new ApiException(400, "Missing the required parameter 'body' when calling createOrUpdateServiceDefinitions"); } // create path and map variables String localVarPath = "/api/v2/services/definitions"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.createOrUpdateServiceDefinitions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceDefinitionApi.createOrUpdateServiceDefinitions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create or update service definition. * - *

See {@link #createOrUpdateServiceDefinitionsWithHttpInfo}. + * See {@link #createOrUpdateServiceDefinitionsWithHttpInfo}. * * @param body Service Definition YAML/JSON. (required) * @return CompletableFuture<ApiResponse<ServiceDefinitionCreateResponse>> */ - public CompletableFuture> - createOrUpdateServiceDefinitionsWithHttpInfoAsync(ServiceDefinitionsCreateRequest body) { + public CompletableFuture> createOrUpdateServiceDefinitionsWithHttpInfoAsync(ServiceDefinitionsCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createOrUpdateServiceDefinitions")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createOrUpdateServiceDefinitions")); + return result; } // create path and map variables String localVarPath = "/api/v2/services/definitions"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.createOrUpdateServiceDefinitions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceDefinitionApi.createOrUpdateServiceDefinitions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Delete a single service definition. - * - *

See {@link #deleteServiceDefinitionWithHttpInfo}. - * - * @param serviceName The name of the service. (required) - * @throws ApiException if fails to make API call - */ - public void deleteServiceDefinition(String serviceName) throws ApiException { + * Delete a single service definition. + * + * See {@link #deleteServiceDefinitionWithHttpInfo}. + * + * @param serviceName The name of the service. (required) + * @throws ApiException if fails to make API call + */ + public void deleteServiceDefinition(String serviceName) throws ApiException { deleteServiceDefinitionWithHttpInfo(serviceName); } /** - * Delete a single service definition. - * - *

See {@link #deleteServiceDefinitionWithHttpInfoAsync}. - * - * @param serviceName The name of the service. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteServiceDefinitionAsync(String serviceName) { - return deleteServiceDefinitionWithHttpInfoAsync(serviceName) - .thenApply( - response -> { - return response.getData(); - }); + * Delete a single service definition. + * + * See {@link #deleteServiceDefinitionWithHttpInfoAsync}. + * + * @param serviceName The name of the service. (required) + * @return CompletableFuture + */ + public CompletableFuturedeleteServiceDefinitionAsync(String serviceName) { + return deleteServiceDefinitionWithHttpInfoAsync(serviceName).thenApply(response -> { + return response.getData(); + }); } + /** - * Delete a single service definition in the Datadog Service Catalog. + *

Delete a single service definition in the Datadog Service Catalog.

* * @param serviceName The name of the service. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -230,137 +196,97 @@ public CompletableFuture deleteServiceDefinitionAsync(String serviceName) * *
Response details
Status Code Description Response Headers
204 OK -
429 Too many requests -
*/ - public ApiResponse deleteServiceDefinitionWithHttpInfo(String serviceName) - throws ApiException { + public ApiResponse deleteServiceDefinitionWithHttpInfo(String serviceName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceName' when calling deleteServiceDefinition"); + throw new ApiException(400, "Missing the required parameter 'serviceName' when calling deleteServiceDefinition"); } // create path and map variables - String localVarPath = - "/api/v2/services/definitions/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v2/services/definitions/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.deleteServiceDefinition", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceDefinitionApi.deleteServiceDefinition", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Delete a single service definition. * - *

See {@link #deleteServiceDefinitionWithHttpInfo}. + * See {@link #deleteServiceDefinitionWithHttpInfo}. * * @param serviceName The name of the service. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteServiceDefinitionWithHttpInfoAsync( - String serviceName) { + public CompletableFuture> deleteServiceDefinitionWithHttpInfoAsync(String serviceName) { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling deleteServiceDefinition")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceName' when calling deleteServiceDefinition")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/services/definitions/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v2/services/definitions/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.deleteServiceDefinition", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceDefinitionApi.deleteServiceDefinition", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a single service definition. - * - *

See {@link #getServiceDefinitionWithHttpInfo}. - * - * @param serviceName The name of the service. (required) - * @return ServiceDefinitionGetResponse - * @throws ApiException if fails to make API call - */ - public ServiceDefinitionGetResponse getServiceDefinition(String serviceName) throws ApiException { + * Get a single service definition. + * + * See {@link #getServiceDefinitionWithHttpInfo}. + * + * @param serviceName The name of the service. (required) + * @return ServiceDefinitionGetResponse + * @throws ApiException if fails to make API call + */ + public ServiceDefinitionGetResponse getServiceDefinition(String serviceName) throws ApiException { return getServiceDefinitionWithHttpInfo(serviceName).getData(); } /** - * Get a single service definition. - * - *

See {@link #getServiceDefinitionWithHttpInfoAsync}. - * - * @param serviceName The name of the service. (required) - * @return CompletableFuture<ServiceDefinitionGetResponse> - */ - public CompletableFuture getServiceDefinitionAsync( - String serviceName) { - return getServiceDefinitionWithHttpInfoAsync(serviceName) - .thenApply( - response -> { - return response.getData(); - }); + * Get a single service definition. + * + * See {@link #getServiceDefinitionWithHttpInfoAsync}. + * + * @param serviceName The name of the service. (required) + * @return CompletableFuture<ServiceDefinitionGetResponse> + */ + public CompletableFuturegetServiceDefinitionAsync(String serviceName) { + return getServiceDefinitionWithHttpInfoAsync(serviceName).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a single service definition from the Datadog Service Catalog. + *

Get a single service definition from the Datadog Service Catalog.

* * @param serviceName The name of the service. (required) * @return ApiResponse<ServiceDefinitionGetResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -371,135 +297,94 @@ public CompletableFuture getServiceDefinitionAsync * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getServiceDefinitionWithHttpInfo( - String serviceName) throws ApiException { + public ApiResponse getServiceDefinitionWithHttpInfo(String serviceName) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - throw new ApiException( - 400, "Missing the required parameter 'serviceName' when calling getServiceDefinition"); + throw new ApiException(400, "Missing the required parameter 'serviceName' when calling getServiceDefinition"); } // create path and map variables - String localVarPath = - "/api/v2/services/definitions/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v2/services/definitions/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.getServiceDefinition", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceDefinitionApi.getServiceDefinition", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a single service definition. * - *

See {@link #getServiceDefinitionWithHttpInfo}. + * See {@link #getServiceDefinitionWithHttpInfo}. * * @param serviceName The name of the service. (required) * @return CompletableFuture<ApiResponse<ServiceDefinitionGetResponse>> */ - public CompletableFuture> - getServiceDefinitionWithHttpInfoAsync(String serviceName) { + public CompletableFuture> getServiceDefinitionWithHttpInfoAsync(String serviceName) { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'serviceName' when calling getServiceDefinition")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'serviceName' when calling getServiceDefinition")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/services/definitions/{service_name}" - .replaceAll( - "\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + String localVarPath = "/api/v2/services/definitions/{service_name}" + .replaceAll("\\{" + "service_name" + "\\}", apiClient.escapeString(serviceName.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.getServiceDefinition", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceDefinitionApi.getServiceDefinition", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get all service definitions. - * - *

See {@link #listServiceDefinitionsWithHttpInfo}. - * - * @return ServiceDefinitionsListResponse - * @throws ApiException if fails to make API call - */ - public ServiceDefinitionsListResponse listServiceDefinitions() throws ApiException { + * Get all service definitions. + * + * See {@link #listServiceDefinitionsWithHttpInfo}. + * + * @return ServiceDefinitionsListResponse + * @throws ApiException if fails to make API call + */ + public ServiceDefinitionsListResponse listServiceDefinitions() throws ApiException { return listServiceDefinitionsWithHttpInfo().getData(); } /** - * Get all service definitions. - * - *

See {@link #listServiceDefinitionsWithHttpInfoAsync}. - * - * @return CompletableFuture<ServiceDefinitionsListResponse> - */ - public CompletableFuture listServiceDefinitionsAsync() { - return listServiceDefinitionsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get all service definitions. + * + * See {@link #listServiceDefinitionsWithHttpInfoAsync}. + * + * @return CompletableFuture<ServiceDefinitionsListResponse> + */ + public CompletableFuturelistServiceDefinitionsAsync() { + return listServiceDefinitionsWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get a list of all service definitions from the Datadog Service Catalog. + *

Get a list of all service definitions from the Datadog Service Catalog.

* * @return ApiResponse<ServiceDefinitionsListResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -507,74 +392,43 @@ public CompletableFuture listServiceDefinitionsA * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listServiceDefinitionsWithHttpInfo() - throws ApiException { + public ApiResponse listServiceDefinitionsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/services/definitions"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.listServiceDefinitions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.ServiceDefinitionApi.listServiceDefinitions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get all service definitions. * - *

See {@link #listServiceDefinitionsWithHttpInfo}. + * See {@link #listServiceDefinitionsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<ServiceDefinitionsListResponse>> */ - public CompletableFuture> - listServiceDefinitionsWithHttpInfoAsync() { + public CompletableFuture> listServiceDefinitionsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/services/definitions"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.ServiceDefinitionApi.listServiceDefinitions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.ServiceDefinitionApi.listServiceDefinitions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java b/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java index 22822b322e3..a02f6939c7d 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java @@ -1,23 +1,31 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; -import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsApi { private ApiClient apiClient; - public SyntheticsApi() { this(ApiClient.getDefaultApiClient()); } @@ -45,246 +53,176 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get the on-demand concurrency cap. - * - *

See {@link #getOnDemandConcurrencyCapWithHttpInfo}. - * - * @return OnDemandConcurrencyCapResponse - * @throws ApiException if fails to make API call - */ - public OnDemandConcurrencyCapResponse getOnDemandConcurrencyCap() throws ApiException { + * Get the on-demand concurrency cap. + * + * See {@link #getOnDemandConcurrencyCapWithHttpInfo}. + * + * @return OnDemandConcurrencyCapResponse + * @throws ApiException if fails to make API call + */ + public OnDemandConcurrencyCapResponse getOnDemandConcurrencyCap() throws ApiException { return getOnDemandConcurrencyCapWithHttpInfo().getData(); } /** - * Get the on-demand concurrency cap. - * - *

See {@link #getOnDemandConcurrencyCapWithHttpInfoAsync}. - * - * @return CompletableFuture<OnDemandConcurrencyCapResponse> - */ - public CompletableFuture getOnDemandConcurrencyCapAsync() { - return getOnDemandConcurrencyCapWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); + * Get the on-demand concurrency cap. + * + * See {@link #getOnDemandConcurrencyCapWithHttpInfoAsync}. + * + * @return CompletableFuture<OnDemandConcurrencyCapResponse> + */ + public CompletableFuturegetOnDemandConcurrencyCapAsync() { + return getOnDemandConcurrencyCapWithHttpInfoAsync().thenApply(response -> { + return response.getData(); + }); } + /** - * Get the on-demand concurrency cap. + *

Get the on-demand concurrency cap.

* * @return ApiResponse<OnDemandConcurrencyCapResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getOnDemandConcurrencyCapWithHttpInfo() - throws ApiException { + public ApiResponse getOnDemandConcurrencyCapWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/synthetics/settings/on_demand_concurrency_cap"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SyntheticsApi.getOnDemandConcurrencyCap", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SyntheticsApi.getOnDemandConcurrencyCap", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get the on-demand concurrency cap. * - *

See {@link #getOnDemandConcurrencyCapWithHttpInfo}. + * See {@link #getOnDemandConcurrencyCapWithHttpInfo}. * * @return CompletableFuture<ApiResponse<OnDemandConcurrencyCapResponse>> */ - public CompletableFuture> - getOnDemandConcurrencyCapWithHttpInfoAsync() { + public CompletableFuture> getOnDemandConcurrencyCapWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/synthetics/settings/on_demand_concurrency_cap"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SyntheticsApi.getOnDemandConcurrencyCap", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SyntheticsApi.getOnDemandConcurrencyCap", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Save new value for on-demand concurrency cap. - * - *

See {@link #setOnDemandConcurrencyCapWithHttpInfo}. - * - * @param body . (required) - * @return OnDemandConcurrencyCapResponse - * @throws ApiException if fails to make API call - */ - public OnDemandConcurrencyCapResponse setOnDemandConcurrencyCap( - OnDemandConcurrencyCapAttributes body) throws ApiException { + * Save new value for on-demand concurrency cap. + * + * See {@link #setOnDemandConcurrencyCapWithHttpInfo}. + * + * @param body . (required) + * @return OnDemandConcurrencyCapResponse + * @throws ApiException if fails to make API call + */ + public OnDemandConcurrencyCapResponse setOnDemandConcurrencyCap(OnDemandConcurrencyCapAttributes body) throws ApiException { return setOnDemandConcurrencyCapWithHttpInfo(body).getData(); } /** - * Save new value for on-demand concurrency cap. - * - *

See {@link #setOnDemandConcurrencyCapWithHttpInfoAsync}. - * - * @param body . (required) - * @return CompletableFuture<OnDemandConcurrencyCapResponse> - */ - public CompletableFuture setOnDemandConcurrencyCapAsync( - OnDemandConcurrencyCapAttributes body) { - return setOnDemandConcurrencyCapWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Save new value for on-demand concurrency cap. + * + * See {@link #setOnDemandConcurrencyCapWithHttpInfoAsync}. + * + * @param body . (required) + * @return CompletableFuture<OnDemandConcurrencyCapResponse> + */ + public CompletableFuturesetOnDemandConcurrencyCapAsync(OnDemandConcurrencyCapAttributes body) { + return setOnDemandConcurrencyCapWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Save new value for on-demand concurrency cap. + *

Save new value for on-demand concurrency cap.

* * @param body . (required) * @return ApiResponse<OnDemandConcurrencyCapResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse setOnDemandConcurrencyCapWithHttpInfo( - OnDemandConcurrencyCapAttributes body) throws ApiException { + public ApiResponse setOnDemandConcurrencyCapWithHttpInfo(OnDemandConcurrencyCapAttributes body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling setOnDemandConcurrencyCap"); + throw new ApiException(400, "Missing the required parameter 'body' when calling setOnDemandConcurrencyCap"); } // create path and map variables String localVarPath = "/api/v2/synthetics/settings/on_demand_concurrency_cap"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SyntheticsApi.setOnDemandConcurrencyCap", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.SyntheticsApi.setOnDemandConcurrencyCap", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Save new value for on-demand concurrency cap. * - *

See {@link #setOnDemandConcurrencyCapWithHttpInfo}. + * See {@link #setOnDemandConcurrencyCapWithHttpInfo}. * * @param body . (required) * @return CompletableFuture<ApiResponse<OnDemandConcurrencyCapResponse>> */ - public CompletableFuture> - setOnDemandConcurrencyCapWithHttpInfoAsync(OnDemandConcurrencyCapAttributes body) { + public CompletableFuture> setOnDemandConcurrencyCapWithHttpInfoAsync(OnDemandConcurrencyCapAttributes body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling setOnDemandConcurrencyCap")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling setOnDemandConcurrencyCap")); + return result; } // create path and map variables String localVarPath = "/api/v2/synthetics/settings/on_demand_concurrency_cap"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.SyntheticsApi.setOnDemandConcurrencyCap", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.SyntheticsApi.setOnDemandConcurrencyCap", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + 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() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java b/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java index 1ccefbab84a..8b8f297d551 100644 --- a/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java @@ -1,28 +1,34 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.CostByOrgResponse; -import com.datadog.api.client.v2.model.HourlyUsageResponse; -import com.datadog.api.client.v2.model.UsageApplicationSecurityMonitoringResponse; -import com.datadog.api.client.v2.model.UsageLambdaTracedInvocationsResponse; -import com.datadog.api.client.v2.model.UsageObservabilityPipelinesResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.UsageApplicationSecurityMonitoringResponse; +import com.datadog.api.client.v2.model.CostByOrgResponse; +import com.datadog.api.client.v2.model.HourlyUsageResponse; +import com.datadog.api.client.v2.model.UsageLambdaTracedInvocationsResponse; +import com.datadog.api.client.v2.model.UsageObservabilityPipelinesResponse; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageMeteringApi { private ApiClient apiClient; - public UsageMeteringApi() { this(ApiClient.getDefaultApiClient()); } @@ -49,15 +55,15 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** Manage optional parameters to getCostByOrg. */ + /** + * Manage optional parameters to getCostByOrg. + */ public static class GetCostByOrgOptionalParameters { private OffsetDateTime endMonth; /** * Set endMonth. - * - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost ending this month. (optional) + * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. (optional) * @return GetCostByOrgOptionalParameters */ public GetCostByOrgOptionalParameters endMonth(OffsetDateTime endMonth) { @@ -67,93 +73,83 @@ public GetCostByOrgOptionalParameters endMonth(OffsetDateTime endMonth) { } /** - * Get cost across multi-org account. - * - *

See {@link #getCostByOrgWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @return CostByOrgResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public CostByOrgResponse getCostByOrg(OffsetDateTime startMonth) throws ApiException { - return getCostByOrgWithHttpInfo(startMonth, new GetCostByOrgOptionalParameters()).getData(); + * Get cost across multi-org account. + * + * See {@link #getCostByOrgWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @return CostByOrgResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public CostByOrgResponse getCostByOrg (OffsetDateTime startMonth) throws ApiException { + return getCostByOrgWithHttpInfo( startMonth, new GetCostByOrgOptionalParameters()).getData(); } /** - * Get cost across multi-org account. - * - *

See {@link #getCostByOrgWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @return CompletableFuture<CostByOrgResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getCostByOrgAsync(OffsetDateTime startMonth) { - return getCostByOrgWithHttpInfoAsync(startMonth, new GetCostByOrgOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get cost across multi-org account. + * + * See {@link #getCostByOrgWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @return CompletableFuture<CostByOrgResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetCostByOrgAsync(OffsetDateTime startMonth) { + return getCostByOrgWithHttpInfoAsync(startMonth, new GetCostByOrgOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get cost across multi-org account. - * - *

See {@link #getCostByOrgWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @param parameters Optional parameters for the request. - * @return CostByOrgResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public CostByOrgResponse getCostByOrg( - OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) throws ApiException { + * Get cost across multi-org account. + * + * See {@link #getCostByOrgWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @param parameters Optional parameters for the request. + * @return CostByOrgResponse + * @throws ApiException if fails to make API call + * @deprecated + */ +@Deprecated + public CostByOrgResponse getCostByOrg(OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) throws ApiException { return getCostByOrgWithHttpInfo(startMonth, parameters).getData(); } /** - * Get cost across multi-org account. - * - *

See {@link #getCostByOrgWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CostByOrgResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getCostByOrgAsync( - OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) { - return getCostByOrgWithHttpInfoAsync(startMonth, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get cost across multi-org account. + * + * See {@link #getCostByOrgWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CostByOrgResponse> + * @deprecated + */ +@Deprecated + public CompletableFuturegetCostByOrgAsync( OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) { + return getCostByOrgWithHttpInfoAsync(startMonth, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get cost across multi-org account. Cost by org data for a given month becomes available no - * later than the 16th of the following month. Note: This endpoint has been - * deprecated. Please use the new endpoint - * /historical_cost instead. + *

Get cost across multi-org account. + * Cost by org data for a given month becomes available no later than the 16th of the following month. + * Note: This endpoint has been deprecated. Please use the new endpoint + * /historical_cost + * instead.

* - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<CostByOrgResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -161,77 +157,56 @@ public CompletableFuture getCostByOrgAsync( * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden - User is not authorized -
429 Too many requests -
- * * @deprecated */ @Deprecated - public ApiResponse getCostByOrgWithHttpInfo( - OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) throws ApiException { + public ApiResponse getCostByOrgWithHttpInfo(OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - throw new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getCostByOrg"); + throw new ApiException(400, "Missing the required parameter 'startMonth' when calling getCostByOrg"); } OffsetDateTime endMonth = parameters.endMonth; // create path and map variables String localVarPath = "/api/v2/usage/cost_by_org"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_month", startMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getCostByOrg", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getCostByOrg", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get cost across multi-org account. * - *

See {@link #getCostByOrgWithHttpInfo}. + * See {@link #getCostByOrgWithHttpInfo}. * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CostByOrgResponse>> * @deprecated */ @Deprecated - public CompletableFuture> getCostByOrgWithHttpInfoAsync( - OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) { + public CompletableFuture> getCostByOrgWithHttpInfoAsync(OffsetDateTime startMonth, GetCostByOrgOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getCostByOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startMonth' when calling getCostByOrg")); + return result; } OffsetDateTime endMonth = parameters.endMonth; // create path and map variables String localVarPath = "/api/v2/usage/cost_by_org"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -240,32 +215,18 @@ public CompletableFuture> getCostByOrgWithHttpInf Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getCostByOrg", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getCostByOrg", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getEstimatedCostByOrg. */ + /** + * Manage optional parameters to getEstimatedCostByOrg. + */ public static class GetEstimatedCostByOrgOptionalParameters { private String view; private OffsetDateTime startMonth; @@ -275,10 +236,7 @@ public static class GetEstimatedCostByOrgOptionalParameters { /** * Set view. - * - * @param view String to specify whether cost is broken down at a parent-org level or at the - * sub-org level. Available views are summary and sub-org. - * Defaults to summary. (optional) + * @param view String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are summary and sub-org. Defaults to summary. (optional) * @return GetEstimatedCostByOrgOptionalParameters */ public GetEstimatedCostByOrgOptionalParameters view(String view) { @@ -288,10 +246,7 @@ public GetEstimatedCostByOrgOptionalParameters view(String view) { /** * Set startMonth. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. Either start_month or start_date should be specified, but - * not both. (start_month cannot go beyond two months in the past) (optional) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past) (optional) * @return GetEstimatedCostByOrgOptionalParameters */ public GetEstimatedCostByOrgOptionalParameters startMonth(OffsetDateTime startMonth) { @@ -301,9 +256,7 @@ public GetEstimatedCostByOrgOptionalParameters startMonth(OffsetDateTime startMo /** * Set endMonth. - * - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost ending this month. (optional) + * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. (optional) * @return GetEstimatedCostByOrgOptionalParameters */ public GetEstimatedCostByOrgOptionalParameters endMonth(OffsetDateTime endMonth) { @@ -313,10 +266,7 @@ public GetEstimatedCostByOrgOptionalParameters endMonth(OffsetDateTime endMonth) /** * Set startDate. - * - * @param startDate Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] - * for cost beginning this day. Either start_month or start_date should be specified, but - * not both. (start_date cannot go beyond two months in the past) (optional) + * @param startDate Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past) (optional) * @return GetEstimatedCostByOrgOptionalParameters */ public GetEstimatedCostByOrgOptionalParameters startDate(OffsetDateTime startDate) { @@ -326,9 +276,7 @@ public GetEstimatedCostByOrgOptionalParameters startDate(OffsetDateTime startDat /** * Set endDate. - * - * @param endDate Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] - * for cost ending this day. (optional) + * @param endDate Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost ending this day. (optional) * @return GetEstimatedCostByOrgOptionalParameters */ public GetEstimatedCostByOrgOptionalParameters endDate(OffsetDateTime endDate) { @@ -338,75 +286,69 @@ public GetEstimatedCostByOrgOptionalParameters endDate(OffsetDateTime endDate) { } /** - * Get estimated cost across your account. - * - *

See {@link #getEstimatedCostByOrgWithHttpInfo}. - * - * @return CostByOrgResponse - * @throws ApiException if fails to make API call - */ - public CostByOrgResponse getEstimatedCostByOrg() throws ApiException { - return getEstimatedCostByOrgWithHttpInfo(new GetEstimatedCostByOrgOptionalParameters()) - .getData(); + * Get estimated cost across your account. + * + * See {@link #getEstimatedCostByOrgWithHttpInfo}. + * + * @return CostByOrgResponse + * @throws ApiException if fails to make API call + */ + public CostByOrgResponse getEstimatedCostByOrg () throws ApiException { + return getEstimatedCostByOrgWithHttpInfo(new GetEstimatedCostByOrgOptionalParameters()).getData(); } /** - * Get estimated cost across your account. - * - *

See {@link #getEstimatedCostByOrgWithHttpInfoAsync}. - * - * @return CompletableFuture<CostByOrgResponse> - */ - public CompletableFuture getEstimatedCostByOrgAsync() { - return getEstimatedCostByOrgWithHttpInfoAsync(new GetEstimatedCostByOrgOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get estimated cost across your account. + * + * See {@link #getEstimatedCostByOrgWithHttpInfoAsync}. + * + * @return CompletableFuture<CostByOrgResponse> + */ + public CompletableFuturegetEstimatedCostByOrgAsync() { + return getEstimatedCostByOrgWithHttpInfoAsync(new GetEstimatedCostByOrgOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get estimated cost across your account. - * - *

See {@link #getEstimatedCostByOrgWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CostByOrgResponse - * @throws ApiException if fails to make API call - */ - public CostByOrgResponse getEstimatedCostByOrg(GetEstimatedCostByOrgOptionalParameters parameters) - throws ApiException { + * Get estimated cost across your account. + * + * See {@link #getEstimatedCostByOrgWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CostByOrgResponse + * @throws ApiException if fails to make API call + */ + public CostByOrgResponse getEstimatedCostByOrg(GetEstimatedCostByOrgOptionalParameters parameters) throws ApiException { return getEstimatedCostByOrgWithHttpInfo(parameters).getData(); } /** - * Get estimated cost across your account. - * - *

See {@link #getEstimatedCostByOrgWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CostByOrgResponse> - */ - public CompletableFuture getEstimatedCostByOrgAsync( - GetEstimatedCostByOrgOptionalParameters parameters) { - return getEstimatedCostByOrgWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get estimated cost across your account. + * + * See {@link #getEstimatedCostByOrgWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CostByOrgResponse> + */ + public CompletableFuturegetEstimatedCostByOrgAsync(GetEstimatedCostByOrgOptionalParameters parameters) { + return getEstimatedCostByOrgWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get estimated cost across multi-org and single root-org accounts. Estimated cost data is only - * available for the current month and previous month and is delayed by up to 72 hours from when - * it was incurred. To access historical costs prior to this, use the /historical_cost - * endpoint. + *

Get estimated cost across multi-org and single root-org accounts. + * Estimated cost data is only available for the current month and previous month + * and is delayed by up to 72 hours from when it was incurred. + * To access historical costs prior to this, use the /historical_cost endpoint.

* * @param parameters Optional parameters for the request. * @return ApiResponse<CostByOrgResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -415,8 +357,7 @@ public CompletableFuture getEstimatedCostByOrgAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getEstimatedCostByOrgWithHttpInfo( - GetEstimatedCostByOrgOptionalParameters parameters) throws ApiException { + public ApiResponse getEstimatedCostByOrgWithHttpInfo(GetEstimatedCostByOrgOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String view = parameters.view; OffsetDateTime startMonth = parameters.startMonth; @@ -426,6 +367,7 @@ public ApiResponse getEstimatedCostByOrgWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/usage/estimated_cost"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -435,36 +377,19 @@ public ApiResponse getEstimatedCostByOrgWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_date", startDate)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_date", endDate)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getEstimatedCostByOrg", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getEstimatedCostByOrg", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get estimated cost across your account. * - *

See {@link #getEstimatedCostByOrgWithHttpInfo}. + * See {@link #getEstimatedCostByOrgWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CostByOrgResponse>> */ - public CompletableFuture> getEstimatedCostByOrgWithHttpInfoAsync( - GetEstimatedCostByOrgOptionalParameters parameters) { + public CompletableFuture> getEstimatedCostByOrgWithHttpInfoAsync(GetEstimatedCostByOrgOptionalParameters parameters) { Object localVarPostBody = null; String view = parameters.view; OffsetDateTime startMonth = parameters.startMonth; @@ -474,6 +399,7 @@ public CompletableFuture> getEstimatedCostByOrgWi // create path and map variables String localVarPath = "/api/v2/usage/estimated_cost"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -485,42 +411,25 @@ public CompletableFuture> getEstimatedCostByOrgWi Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getEstimatedCostByOrg", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getEstimatedCostByOrg", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getHistoricalCostByOrg. */ + /** + * Manage optional parameters to getHistoricalCostByOrg. + */ public static class GetHistoricalCostByOrgOptionalParameters { private String view; private OffsetDateTime endMonth; /** * Set view. - * - * @param view String to specify whether cost is broken down at a parent-org level or at the - * sub-org level. Available views are summary and sub-org. - * Defaults to summary. (optional) + * @param view String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are summary and sub-org. Defaults to summary. (optional) * @return GetHistoricalCostByOrgOptionalParameters */ public GetHistoricalCostByOrgOptionalParameters view(String view) { @@ -530,9 +439,7 @@ public GetHistoricalCostByOrgOptionalParameters view(String view) { /** * Set endMonth. - * - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost ending this month. (optional) + * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. (optional) * @return GetHistoricalCostByOrgOptionalParameters */ public GetHistoricalCostByOrgOptionalParameters endMonth(OffsetDateTime endMonth) { @@ -542,87 +449,72 @@ public GetHistoricalCostByOrgOptionalParameters endMonth(OffsetDateTime endMonth } /** - * Get historical cost across your account. - * - *

See {@link #getHistoricalCostByOrgWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @return CostByOrgResponse - * @throws ApiException if fails to make API call - */ - public CostByOrgResponse getHistoricalCostByOrg(OffsetDateTime startMonth) throws ApiException { - return getHistoricalCostByOrgWithHttpInfo( - startMonth, new GetHistoricalCostByOrgOptionalParameters()) - .getData(); + * Get historical cost across your account. + * + * See {@link #getHistoricalCostByOrgWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @return CostByOrgResponse + * @throws ApiException if fails to make API call + */ + public CostByOrgResponse getHistoricalCostByOrg (OffsetDateTime startMonth) throws ApiException { + return getHistoricalCostByOrgWithHttpInfo( startMonth, new GetHistoricalCostByOrgOptionalParameters()).getData(); } /** - * Get historical cost across your account. - * - *

See {@link #getHistoricalCostByOrgWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @return CompletableFuture<CostByOrgResponse> - */ - public CompletableFuture getHistoricalCostByOrgAsync( - OffsetDateTime startMonth) { - return getHistoricalCostByOrgWithHttpInfoAsync( - startMonth, new GetHistoricalCostByOrgOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get historical cost across your account. + * + * See {@link #getHistoricalCostByOrgWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @return CompletableFuture<CostByOrgResponse> + */ + public CompletableFuturegetHistoricalCostByOrgAsync(OffsetDateTime startMonth) { + return getHistoricalCostByOrgWithHttpInfoAsync(startMonth, new GetHistoricalCostByOrgOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get historical cost across your account. - * - *

See {@link #getHistoricalCostByOrgWithHttpInfo}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @param parameters Optional parameters for the request. - * @return CostByOrgResponse - * @throws ApiException if fails to make API call - */ - public CostByOrgResponse getHistoricalCostByOrg( - OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) - throws ApiException { + * Get historical cost across your account. + * + * See {@link #getHistoricalCostByOrgWithHttpInfo}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @param parameters Optional parameters for the request. + * @return CostByOrgResponse + * @throws ApiException if fails to make API call + */ + public CostByOrgResponse getHistoricalCostByOrg(OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) throws ApiException { return getHistoricalCostByOrgWithHttpInfo(startMonth, parameters).getData(); } /** - * Get historical cost across your account. - * - *

See {@link #getHistoricalCostByOrgWithHttpInfoAsync}. - * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CostByOrgResponse> - */ - public CompletableFuture getHistoricalCostByOrgAsync( - OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) { - return getHistoricalCostByOrgWithHttpInfoAsync(startMonth, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get historical cost across your account. + * + * See {@link #getHistoricalCostByOrgWithHttpInfoAsync}. + * + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CostByOrgResponse> + */ + public CompletableFuturegetHistoricalCostByOrgAsync( OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) { + return getHistoricalCostByOrgWithHttpInfoAsync(startMonth, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get historical cost across multi-org and single root-org accounts. Cost data for a given month - * becomes available no later than the 16th of the following month. + *

Get historical cost across multi-org and single root-org accounts. + * Cost data for a given month becomes available no later than the 16th of the following month.

* - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<CostByOrgResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -631,21 +523,19 @@ public CompletableFuture getHistoricalCostByOrgAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getHistoricalCostByOrgWithHttpInfo( - OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) - throws ApiException { + public ApiResponse getHistoricalCostByOrgWithHttpInfo(OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - throw new ApiException( - 400, "Missing the required parameter 'startMonth' when calling getHistoricalCostByOrg"); + throw new ApiException(400, "Missing the required parameter 'startMonth' when calling getHistoricalCostByOrg"); } String view = parameters.view; OffsetDateTime endMonth = parameters.endMonth; // create path and map variables String localVarPath = "/api/v2/usage/historical_cost"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -653,54 +543,34 @@ public ApiResponse getHistoricalCostByOrgWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "view", view)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getHistoricalCostByOrg", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getHistoricalCostByOrg", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get historical cost across your account. * - *

See {@link #getHistoricalCostByOrgWithHttpInfo}. + * See {@link #getHistoricalCostByOrgWithHttpInfo}. * - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] - * for cost beginning this month. (required) + * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CostByOrgResponse>> */ - public CompletableFuture> getHistoricalCostByOrgWithHttpInfoAsync( - OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) { + public CompletableFuture> getHistoricalCostByOrgWithHttpInfoAsync(OffsetDateTime startMonth, GetHistoricalCostByOrgOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startMonth' is set if (startMonth == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startMonth' when calling getHistoricalCostByOrg")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startMonth' when calling getHistoricalCostByOrg")); + return result; } String view = parameters.view; OffsetDateTime endMonth = parameters.endMonth; // create path and map variables String localVarPath = "/api/v2/usage/historical_cost"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -710,32 +580,18 @@ public CompletableFuture> getHistoricalCostByOrgW Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getHistoricalCostByOrg", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getHistoricalCostByOrg", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getHourlyUsage. */ + /** + * Manage optional parameters to getHourlyUsage. + */ public static class GetHourlyUsageOptionalParameters { private OffsetDateTime filterTimestampEnd; private Boolean filterIncludeDescendants; @@ -745,9 +601,7 @@ public static class GetHourlyUsageOptionalParameters { /** * Set filterTimestampEnd. - * - * @param filterTimestampEnd Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param filterTimestampEnd Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetHourlyUsageOptionalParameters */ public GetHourlyUsageOptionalParameters filterTimestampEnd(OffsetDateTime filterTimestampEnd) { @@ -757,24 +611,17 @@ public GetHourlyUsageOptionalParameters filterTimestampEnd(OffsetDateTime filter /** * Set filterIncludeDescendants. - * - * @param filterIncludeDescendants Include child org usage in the response. Defaults to false. - * (optional, default to false) + * @param filterIncludeDescendants Include child org usage in the response. Defaults to false. (optional, default to false) * @return GetHourlyUsageOptionalParameters */ - public GetHourlyUsageOptionalParameters filterIncludeDescendants( - Boolean filterIncludeDescendants) { + public GetHourlyUsageOptionalParameters filterIncludeDescendants(Boolean filterIncludeDescendants) { this.filterIncludeDescendants = filterIncludeDescendants; return this; } /** * Set filterVersions. - * - * @param filterVersions Comma separated list of product family versions to use in the format - * product_family:version. For example, infra_hosts:1.0.0. If this - * parameter is not used, the API will use the latest version of each requested product - * family. Currently all families have one version 1.0.0. (optional) + * @param filterVersions Comma separated list of product family versions to use in the format product_family:version. For example, infra_hosts:1.0.0. If this parameter is not used, the API will use the latest version of each requested product family. Currently all families have one version 1.0.0. (optional) * @return GetHourlyUsageOptionalParameters */ public GetHourlyUsageOptionalParameters filterVersions(String filterVersions) { @@ -784,9 +631,7 @@ public GetHourlyUsageOptionalParameters filterVersions(String filterVersions) { /** * Set pageLimit. - * - * @param pageLimit Maximum number of results to return (between 1 and 500) - defaults to 500 if - * limit not specified. (optional, default to 500) + * @param pageLimit Maximum number of results to return (between 1 and 500) - defaults to 500 if limit not specified. (optional, default to 500) * @return GetHourlyUsageOptionalParameters */ public GetHourlyUsageOptionalParameters pageLimit(Integer pageLimit) { @@ -796,9 +641,7 @@ public GetHourlyUsageOptionalParameters pageLimit(Integer pageLimit) { /** * Set pageNextRecordId. - * - * @param pageNextRecordId List following results with a next_record_id provided in the previous - * query. (optional) + * @param pageNextRecordId List following results with a next_record_id provided in the previous query. (optional) * @return GetHourlyUsageOptionalParameters */ public GetHourlyUsageOptionalParameters pageNextRecordId(String pageNextRecordId) { @@ -808,152 +651,76 @@ public GetHourlyUsageOptionalParameters pageNextRecordId(String pageNextRecordId } /** - * Get hourly usage by product family. - * - *

See {@link #getHourlyUsageWithHttpInfo}. - * - * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param filterProductFamilies Comma separated list of product families to retrieve. Available - * families are all, analyzed_logs, application_security - * , audit_logs, serverless, ci_app, - * cloud_cost_management, cspm, custom_events, cws - * , dbm, fargate, infra_hosts, - * incident_management, indexed_logs, indexed_spans, - * ingested_spans, iot, lambda_traced_invocations, logs - * , network_flows, network_hosts, - * observability_pipelines, online_archive, profiling, - * rum, rum_browser_sessions, rum_mobile_sessions, sds - * , snmp, synthetics_api, synthetics_browser, - * synthetics_parallel_testing, and timeseries. (required) - * @return HourlyUsageResponse - * @throws ApiException if fails to make API call - */ - public HourlyUsageResponse getHourlyUsage( - OffsetDateTime filterTimestampStart, String filterProductFamilies) throws ApiException { - return getHourlyUsageWithHttpInfo( - filterTimestampStart, filterProductFamilies, new GetHourlyUsageOptionalParameters()) - .getData(); + * Get hourly usage by product family. + * + * See {@link #getHourlyUsageWithHttpInfo}. + * + * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param filterProductFamilies Comma separated list of product families to retrieve. Available families are all, analyzed_logs, application_security, audit_logs, serverless, ci_app, cloud_cost_management, cspm, custom_events, cws, dbm, fargate, infra_hosts, incident_management, indexed_logs, indexed_spans, ingested_spans, iot, lambda_traced_invocations, logs, network_flows, network_hosts, observability_pipelines, online_archive, profiling, rum, rum_browser_sessions, rum_mobile_sessions, sds, snmp, synthetics_api, synthetics_browser, synthetics_parallel_testing, and timeseries. (required) + * @return HourlyUsageResponse + * @throws ApiException if fails to make API call + */ + public HourlyUsageResponse getHourlyUsage (OffsetDateTime filterTimestampStart, String filterProductFamilies) throws ApiException { + return getHourlyUsageWithHttpInfo( filterTimestampStart, filterProductFamilies, new GetHourlyUsageOptionalParameters()).getData(); } /** - * Get hourly usage by product family. - * - *

See {@link #getHourlyUsageWithHttpInfoAsync}. - * - * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param filterProductFamilies Comma separated list of product families to retrieve. Available - * families are all, analyzed_logs, application_security - * , audit_logs, serverless, ci_app, - * cloud_cost_management, cspm, custom_events, cws - * , dbm, fargate, infra_hosts, - * incident_management, indexed_logs, indexed_spans, - * ingested_spans, iot, lambda_traced_invocations, logs - * , network_flows, network_hosts, - * observability_pipelines, online_archive, profiling, - * rum, rum_browser_sessions, rum_mobile_sessions, sds - * , snmp, synthetics_api, synthetics_browser, - * synthetics_parallel_testing, and timeseries. (required) - * @return CompletableFuture<HourlyUsageResponse> - */ - public CompletableFuture getHourlyUsageAsync( - OffsetDateTime filterTimestampStart, String filterProductFamilies) { - return getHourlyUsageWithHttpInfoAsync( - filterTimestampStart, filterProductFamilies, new GetHourlyUsageOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage by product family. + * + * See {@link #getHourlyUsageWithHttpInfoAsync}. + * + * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param filterProductFamilies Comma separated list of product families to retrieve. Available families are all, analyzed_logs, application_security, audit_logs, serverless, ci_app, cloud_cost_management, cspm, custom_events, cws, dbm, fargate, infra_hosts, incident_management, indexed_logs, indexed_spans, ingested_spans, iot, lambda_traced_invocations, logs, network_flows, network_hosts, observability_pipelines, online_archive, profiling, rum, rum_browser_sessions, rum_mobile_sessions, sds, snmp, synthetics_api, synthetics_browser, synthetics_parallel_testing, and timeseries. (required) + * @return CompletableFuture<HourlyUsageResponse> + */ + public CompletableFuturegetHourlyUsageAsync(OffsetDateTime filterTimestampStart, String filterProductFamilies) { + return getHourlyUsageWithHttpInfoAsync(filterTimestampStart, filterProductFamilies, new GetHourlyUsageOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage by product family. - * - *

See {@link #getHourlyUsageWithHttpInfo}. - * - * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param filterProductFamilies Comma separated list of product families to retrieve. Available - * families are all, analyzed_logs, application_security - * , audit_logs, serverless, ci_app, - * cloud_cost_management, cspm, custom_events, cws - * , dbm, fargate, infra_hosts, - * incident_management, indexed_logs, indexed_spans, - * ingested_spans, iot, lambda_traced_invocations, logs - * , network_flows, network_hosts, - * observability_pipelines, online_archive, profiling, - * rum, rum_browser_sessions, rum_mobile_sessions, sds - * , snmp, synthetics_api, synthetics_browser, - * synthetics_parallel_testing, and timeseries. (required) - * @param parameters Optional parameters for the request. - * @return HourlyUsageResponse - * @throws ApiException if fails to make API call - */ - public HourlyUsageResponse getHourlyUsage( - OffsetDateTime filterTimestampStart, - String filterProductFamilies, - GetHourlyUsageOptionalParameters parameters) - throws ApiException { - return getHourlyUsageWithHttpInfo(filterTimestampStart, filterProductFamilies, parameters) - .getData(); + * Get hourly usage by product family. + * + * See {@link #getHourlyUsageWithHttpInfo}. + * + * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param filterProductFamilies Comma separated list of product families to retrieve. Available families are all, analyzed_logs, application_security, audit_logs, serverless, ci_app, cloud_cost_management, cspm, custom_events, cws, dbm, fargate, infra_hosts, incident_management, indexed_logs, indexed_spans, ingested_spans, iot, lambda_traced_invocations, logs, network_flows, network_hosts, observability_pipelines, online_archive, profiling, rum, rum_browser_sessions, rum_mobile_sessions, sds, snmp, synthetics_api, synthetics_browser, synthetics_parallel_testing, and timeseries. (required) + * @param parameters Optional parameters for the request. + * @return HourlyUsageResponse + * @throws ApiException if fails to make API call + */ + public HourlyUsageResponse getHourlyUsage(OffsetDateTime filterTimestampStart, String filterProductFamilies, GetHourlyUsageOptionalParameters parameters) throws ApiException { + return getHourlyUsageWithHttpInfo(filterTimestampStart, filterProductFamilies, parameters).getData(); } /** - * Get hourly usage by product family. - * - *

See {@link #getHourlyUsageWithHttpInfoAsync}. - * - * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param filterProductFamilies Comma separated list of product families to retrieve. Available - * families are all, analyzed_logs, application_security - * , audit_logs, serverless, ci_app, - * cloud_cost_management, cspm, custom_events, cws - * , dbm, fargate, infra_hosts, - * incident_management, indexed_logs, indexed_spans, - * ingested_spans, iot, lambda_traced_invocations, logs - * , network_flows, network_hosts, - * observability_pipelines, online_archive, profiling, - * rum, rum_browser_sessions, rum_mobile_sessions, sds - * , snmp, synthetics_api, synthetics_browser, - * synthetics_parallel_testing, and timeseries. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<HourlyUsageResponse> - */ - public CompletableFuture getHourlyUsageAsync( - OffsetDateTime filterTimestampStart, - String filterProductFamilies, - GetHourlyUsageOptionalParameters parameters) { - return getHourlyUsageWithHttpInfoAsync(filterTimestampStart, filterProductFamilies, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage by product family. + * + * See {@link #getHourlyUsageWithHttpInfoAsync}. + * + * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param filterProductFamilies Comma separated list of product families to retrieve. Available families are all, analyzed_logs, application_security, audit_logs, serverless, ci_app, cloud_cost_management, cspm, custom_events, cws, dbm, fargate, infra_hosts, incident_management, indexed_logs, indexed_spans, ingested_spans, iot, lambda_traced_invocations, logs, network_flows, network_hosts, observability_pipelines, online_archive, profiling, rum, rum_browser_sessions, rum_mobile_sessions, sds, snmp, synthetics_api, synthetics_browser, synthetics_parallel_testing, and timeseries. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<HourlyUsageResponse> + */ + public CompletableFuturegetHourlyUsageAsync( OffsetDateTime filterTimestampStart, String filterProductFamilies, GetHourlyUsageOptionalParameters parameters) { + return getHourlyUsageWithHttpInfoAsync(filterTimestampStart, filterProductFamilies, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get hourly usage by product family. + *

Get hourly usage by product family.

* - * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param filterProductFamilies Comma separated list of product families to retrieve. Available - * families are all, analyzed_logs, application_security - * , audit_logs, serverless, ci_app, - * cloud_cost_management, cspm, custom_events, cws - * , dbm, fargate, infra_hosts, - * incident_management, indexed_logs, indexed_spans, - * ingested_spans, iot, lambda_traced_invocations, logs - * , network_flows, network_hosts, - * observability_pipelines, online_archive, profiling, - * rum, rum_browser_sessions, rum_mobile_sessions, sds - * , snmp, synthetics_api, synthetics_browser, - * synthetics_parallel_testing, and timeseries. (required) + * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param filterProductFamilies Comma separated list of product families to retrieve. Available families are all, analyzed_logs, application_security, audit_logs, serverless, ci_app, cloud_cost_management, cspm, custom_events, cws, dbm, fargate, infra_hosts, incident_management, indexed_logs, indexed_spans, ingested_spans, iot, lambda_traced_invocations, logs, network_flows, network_hosts, observability_pipelines, online_archive, profiling, rum, rum_browser_sessions, rum_mobile_sessions, sds, snmp, synthetics_api, synthetics_browser, synthetics_parallel_testing, and timeseries. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<HourlyUsageResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -962,24 +729,17 @@ public CompletableFuture getHourlyUsageAsync( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getHourlyUsageWithHttpInfo( - OffsetDateTime filterTimestampStart, - String filterProductFamilies, - GetHourlyUsageOptionalParameters parameters) - throws ApiException { + public ApiResponse getHourlyUsageWithHttpInfo(OffsetDateTime filterTimestampStart, String filterProductFamilies, GetHourlyUsageOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'filterTimestampStart' is set if (filterTimestampStart == null) { - throw new ApiException( - 400, "Missing the required parameter 'filterTimestampStart' when calling getHourlyUsage"); + throw new ApiException(400, "Missing the required parameter 'filterTimestampStart' when calling getHourlyUsage"); } // verify the required parameter 'filterProductFamilies' is set if (filterProductFamilies == null) { - throw new ApiException( - 400, - "Missing the required parameter 'filterProductFamilies' when calling getHourlyUsage"); + throw new ApiException(400, "Missing the required parameter 'filterProductFamilies' when calling getHourlyUsage"); } OffsetDateTime filterTimestampEnd = parameters.filterTimestampEnd; Boolean filterIncludeDescendants = parameters.filterIncludeDescendants; @@ -989,89 +749,47 @@ public ApiResponse getHourlyUsageWithHttpInfo( // create path and map variables String localVarPath = "/api/v2/usage/hourly_usage"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[timestamp][start]", filterTimestampStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[product_families]", filterProductFamilies)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[timestamp][end]", filterTimestampEnd)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[include_descendants]", filterIncludeDescendants)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[timestamp][start]", filterTimestampStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[product_families]", filterProductFamilies)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[timestamp][end]", filterTimestampEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[include_descendants]", filterIncludeDescendants)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[versions]", filterVersions)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "page[next_record_id]", pageNextRecordId)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getHourlyUsage", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[next_record_id]", pageNextRecordId)); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getHourlyUsage", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage by product family. * - *

See {@link #getHourlyUsageWithHttpInfo}. + * See {@link #getHourlyUsageWithHttpInfo}. * - * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param filterProductFamilies Comma separated list of product families to retrieve. Available - * families are all, analyzed_logs, application_security - * , audit_logs, serverless, ci_app, - * cloud_cost_management, cspm, custom_events, cws - * , dbm, fargate, infra_hosts, - * incident_management, indexed_logs, indexed_spans, - * ingested_spans, iot, lambda_traced_invocations, logs - * , network_flows, network_hosts, - * observability_pipelines, online_archive, profiling, - * rum, rum_browser_sessions, rum_mobile_sessions, sds - * , snmp, synthetics_api, synthetics_browser, - * synthetics_parallel_testing, and timeseries. (required) + * @param filterTimestampStart Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param filterProductFamilies Comma separated list of product families to retrieve. Available families are all, analyzed_logs, application_security, audit_logs, serverless, ci_app, cloud_cost_management, cspm, custom_events, cws, dbm, fargate, infra_hosts, incident_management, indexed_logs, indexed_spans, ingested_spans, iot, lambda_traced_invocations, logs, network_flows, network_hosts, observability_pipelines, online_archive, profiling, rum, rum_browser_sessions, rum_mobile_sessions, sds, snmp, synthetics_api, synthetics_browser, synthetics_parallel_testing, and timeseries. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HourlyUsageResponse>> */ - public CompletableFuture> getHourlyUsageWithHttpInfoAsync( - OffsetDateTime filterTimestampStart, - String filterProductFamilies, - GetHourlyUsageOptionalParameters parameters) { + public CompletableFuture> getHourlyUsageWithHttpInfoAsync(OffsetDateTime filterTimestampStart, String filterProductFamilies, GetHourlyUsageOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'filterTimestampStart' is set if (filterTimestampStart == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'filterTimestampStart' when calling getHourlyUsage")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'filterTimestampStart' when calling getHourlyUsage")); + return result; } // verify the required parameter 'filterProductFamilies' is set if (filterProductFamilies == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'filterProductFamilies' when calling" - + " getHourlyUsage")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'filterProductFamilies' when calling getHourlyUsage")); + return result; } OffsetDateTime filterTimestampEnd = parameters.filterTimestampEnd; Boolean filterIncludeDescendants = parameters.filterIncludeDescendants; @@ -1081,58 +799,38 @@ public CompletableFuture> getHourlyUsageWithHtt // create path and map variables String localVarPath = "/api/v2/usage/hourly_usage"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[timestamp][start]", filterTimestampStart)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[product_families]", filterProductFamilies)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[timestamp][end]", filterTimestampEnd)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[include_descendants]", filterIncludeDescendants)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[timestamp][start]", filterTimestampStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[product_families]", filterProductFamilies)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[timestamp][end]", filterTimestampEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[include_descendants]", filterIncludeDescendants)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[versions]", filterVersions)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "page[next_record_id]", pageNextRecordId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[next_record_id]", pageNextRecordId)); Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getHourlyUsage", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getHourlyUsage", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageApplicationSecurityMonitoring. */ + /** + * Manage optional parameters to getUsageApplicationSecurityMonitoring. + */ public static class GetUsageApplicationSecurityMonitoringOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageApplicationSecurityMonitoringOptionalParameters */ public GetUsageApplicationSecurityMonitoringOptionalParameters endHr(OffsetDateTime endHr) { @@ -1142,92 +840,72 @@ public GetUsageApplicationSecurityMonitoringOptionalParameters endHr(OffsetDateT } /** - * Get hourly usage for application security. - * - *

See {@link #getUsageApplicationSecurityMonitoringWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageApplicationSecurityMonitoringResponse - * @throws ApiException if fails to make API call - */ - public UsageApplicationSecurityMonitoringResponse getUsageApplicationSecurityMonitoring( - OffsetDateTime startHr) throws ApiException { - return getUsageApplicationSecurityMonitoringWithHttpInfo( - startHr, new GetUsageApplicationSecurityMonitoringOptionalParameters()) - .getData(); + * Get hourly usage for application security. + * + * See {@link #getUsageApplicationSecurityMonitoringWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageApplicationSecurityMonitoringResponse + * @throws ApiException if fails to make API call + */ + public UsageApplicationSecurityMonitoringResponse getUsageApplicationSecurityMonitoring (OffsetDateTime startHr) throws ApiException { + return getUsageApplicationSecurityMonitoringWithHttpInfo( startHr, new GetUsageApplicationSecurityMonitoringOptionalParameters()).getData(); } /** - * Get hourly usage for application security. - * - *

See {@link #getUsageApplicationSecurityMonitoringWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageApplicationSecurityMonitoringResponse> - */ - public CompletableFuture - getUsageApplicationSecurityMonitoringAsync(OffsetDateTime startHr) { - return getUsageApplicationSecurityMonitoringWithHttpInfoAsync( - startHr, new GetUsageApplicationSecurityMonitoringOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for application security. + * + * See {@link #getUsageApplicationSecurityMonitoringWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageApplicationSecurityMonitoringResponse> + */ + public CompletableFuturegetUsageApplicationSecurityMonitoringAsync(OffsetDateTime startHr) { + return getUsageApplicationSecurityMonitoringWithHttpInfoAsync(startHr, new GetUsageApplicationSecurityMonitoringOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for application security. - * - *

See {@link #getUsageApplicationSecurityMonitoringWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageApplicationSecurityMonitoringResponse - * @throws ApiException if fails to make API call - */ - public UsageApplicationSecurityMonitoringResponse getUsageApplicationSecurityMonitoring( - OffsetDateTime startHr, GetUsageApplicationSecurityMonitoringOptionalParameters parameters) - throws ApiException { + * Get hourly usage for application security. + * + * See {@link #getUsageApplicationSecurityMonitoringWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageApplicationSecurityMonitoringResponse + * @throws ApiException if fails to make API call + */ + public UsageApplicationSecurityMonitoringResponse getUsageApplicationSecurityMonitoring(OffsetDateTime startHr, GetUsageApplicationSecurityMonitoringOptionalParameters parameters) throws ApiException { return getUsageApplicationSecurityMonitoringWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for application security. - * - *

See {@link #getUsageApplicationSecurityMonitoringWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageApplicationSecurityMonitoringResponse> - */ - public CompletableFuture - getUsageApplicationSecurityMonitoringAsync( - OffsetDateTime startHr, - GetUsageApplicationSecurityMonitoringOptionalParameters parameters) { - return getUsageApplicationSecurityMonitoringWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for application security. + * + * See {@link #getUsageApplicationSecurityMonitoringWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageApplicationSecurityMonitoringResponse> + */ + public CompletableFuturegetUsageApplicationSecurityMonitoringAsync( OffsetDateTime startHr, GetUsageApplicationSecurityMonitoringOptionalParameters parameters) { + return getUsageApplicationSecurityMonitoringWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get hourly usage for application security . Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API + *

Get hourly usage for application security . + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageApplicationSecurityMonitoringResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1236,81 +914,51 @@ public UsageApplicationSecurityMonitoringResponse getUsageApplicationSecurityMon * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getUsageApplicationSecurityMonitoringWithHttpInfo( - OffsetDateTime startHr, - GetUsageApplicationSecurityMonitoringOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageApplicationSecurityMonitoringWithHttpInfo(OffsetDateTime startHr, GetUsageApplicationSecurityMonitoringOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, - "Missing the required parameter 'startHr' when calling" - + " getUsageApplicationSecurityMonitoring"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageApplicationSecurityMonitoring"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v2/usage/application_security"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getUsageApplicationSecurityMonitoring", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getUsageApplicationSecurityMonitoring", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for application security. * - *

See {@link #getUsageApplicationSecurityMonitoringWithHttpInfo}. + * See {@link #getUsageApplicationSecurityMonitoringWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageApplicationSecurityMonitoringResponse>> */ - public CompletableFuture> - getUsageApplicationSecurityMonitoringWithHttpInfoAsync( - OffsetDateTime startHr, - GetUsageApplicationSecurityMonitoringOptionalParameters parameters) { + public CompletableFuture> getUsageApplicationSecurityMonitoringWithHttpInfoAsync(OffsetDateTime startHr, GetUsageApplicationSecurityMonitoringOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling" - + " getUsageApplicationSecurityMonitoring")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageApplicationSecurityMonitoring")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v2/usage/application_security"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1319,41 +967,24 @@ public UsageApplicationSecurityMonitoringResponse getUsageApplicationSecurityMon Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getUsageApplicationSecurityMonitoring", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getUsageApplicationSecurityMonitoring", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageLambdaTracedInvocations. */ + /** + * Manage optional parameters to getUsageLambdaTracedInvocations. + */ public static class GetUsageLambdaTracedInvocationsOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageLambdaTracedInvocationsOptionalParameters */ public GetUsageLambdaTracedInvocationsOptionalParameters endHr(OffsetDateTime endHr) { @@ -1363,91 +994,72 @@ public GetUsageLambdaTracedInvocationsOptionalParameters endHr(OffsetDateTime en } /** - * Get hourly usage for lambda traced invocations. - * - *

See {@link #getUsageLambdaTracedInvocationsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageLambdaTracedInvocationsResponse - * @throws ApiException if fails to make API call - */ - public UsageLambdaTracedInvocationsResponse getUsageLambdaTracedInvocations( - OffsetDateTime startHr) throws ApiException { - return getUsageLambdaTracedInvocationsWithHttpInfo( - startHr, new GetUsageLambdaTracedInvocationsOptionalParameters()) - .getData(); + * Get hourly usage for lambda traced invocations. + * + * See {@link #getUsageLambdaTracedInvocationsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageLambdaTracedInvocationsResponse + * @throws ApiException if fails to make API call + */ + public UsageLambdaTracedInvocationsResponse getUsageLambdaTracedInvocations (OffsetDateTime startHr) throws ApiException { + return getUsageLambdaTracedInvocationsWithHttpInfo( startHr, new GetUsageLambdaTracedInvocationsOptionalParameters()).getData(); } /** - * Get hourly usage for lambda traced invocations. - * - *

See {@link #getUsageLambdaTracedInvocationsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageLambdaTracedInvocationsResponse> - */ - public CompletableFuture - getUsageLambdaTracedInvocationsAsync(OffsetDateTime startHr) { - return getUsageLambdaTracedInvocationsWithHttpInfoAsync( - startHr, new GetUsageLambdaTracedInvocationsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for lambda traced invocations. + * + * See {@link #getUsageLambdaTracedInvocationsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageLambdaTracedInvocationsResponse> + */ + public CompletableFuturegetUsageLambdaTracedInvocationsAsync(OffsetDateTime startHr) { + return getUsageLambdaTracedInvocationsWithHttpInfoAsync(startHr, new GetUsageLambdaTracedInvocationsOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for lambda traced invocations. - * - *

See {@link #getUsageLambdaTracedInvocationsWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageLambdaTracedInvocationsResponse - * @throws ApiException if fails to make API call - */ - public UsageLambdaTracedInvocationsResponse getUsageLambdaTracedInvocations( - OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) - throws ApiException { + * Get hourly usage for lambda traced invocations. + * + * See {@link #getUsageLambdaTracedInvocationsWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageLambdaTracedInvocationsResponse + * @throws ApiException if fails to make API call + */ + public UsageLambdaTracedInvocationsResponse getUsageLambdaTracedInvocations(OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) throws ApiException { return getUsageLambdaTracedInvocationsWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for lambda traced invocations. - * - *

See {@link #getUsageLambdaTracedInvocationsWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageLambdaTracedInvocationsResponse> - */ - public CompletableFuture - getUsageLambdaTracedInvocationsAsync( - OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) { - return getUsageLambdaTracedInvocationsWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for lambda traced invocations. + * + * See {@link #getUsageLambdaTracedInvocationsWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageLambdaTracedInvocationsResponse> + */ + public CompletableFuturegetUsageLambdaTracedInvocationsAsync( OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) { + return getUsageLambdaTracedInvocationsWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get hourly usage for lambda traced invocations. Note: hourly usage data for - * all products is now available in the Get - * hourly usage by product family API + *

Get hourly usage for lambda traced invocations. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageLambdaTracedInvocationsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1456,78 +1068,51 @@ public UsageLambdaTracedInvocationsResponse getUsageLambdaTracedInvocations( * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getUsageLambdaTracedInvocationsWithHttpInfo( - OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageLambdaTracedInvocationsWithHttpInfo(OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, - "Missing the required parameter 'startHr' when calling getUsageLambdaTracedInvocations"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLambdaTracedInvocations"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v2/usage/lambda_traced_invocations"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getUsageLambdaTracedInvocations", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getUsageLambdaTracedInvocations", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for lambda traced invocations. * - *

See {@link #getUsageLambdaTracedInvocationsWithHttpInfo}. + * See {@link #getUsageLambdaTracedInvocationsWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageLambdaTracedInvocationsResponse>> */ - public CompletableFuture> - getUsageLambdaTracedInvocationsWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) { + public CompletableFuture> getUsageLambdaTracedInvocationsWithHttpInfoAsync(OffsetDateTime startHr, GetUsageLambdaTracedInvocationsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling" - + " getUsageLambdaTracedInvocations")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLambdaTracedInvocations")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v2/usage/lambda_traced_invocations"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1536,41 +1121,24 @@ public UsageLambdaTracedInvocationsResponse getUsageLambdaTracedInvocations( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getUsageLambdaTracedInvocations", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getUsageLambdaTracedInvocations", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to getUsageObservabilityPipelines. */ + /** + * Manage optional parameters to getUsageObservabilityPipelines. + */ public static class GetUsageObservabilityPipelinesOptionalParameters { private OffsetDateTime endHr; /** * Set endHr. - * - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage ending before this hour. (optional) + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) * @return GetUsageObservabilityPipelinesOptionalParameters */ public GetUsageObservabilityPipelinesOptionalParameters endHr(OffsetDateTime endHr) { @@ -1580,90 +1148,72 @@ public GetUsageObservabilityPipelinesOptionalParameters endHr(OffsetDateTime end } /** - * Get hourly usage for observability pipelines. - * - *

See {@link #getUsageObservabilityPipelinesWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return UsageObservabilityPipelinesResponse - * @throws ApiException if fails to make API call - */ - public UsageObservabilityPipelinesResponse getUsageObservabilityPipelines(OffsetDateTime startHr) - throws ApiException { - return getUsageObservabilityPipelinesWithHttpInfo( - startHr, new GetUsageObservabilityPipelinesOptionalParameters()) - .getData(); + * Get hourly usage for observability pipelines. + * + * See {@link #getUsageObservabilityPipelinesWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return UsageObservabilityPipelinesResponse + * @throws ApiException if fails to make API call + */ + public UsageObservabilityPipelinesResponse getUsageObservabilityPipelines (OffsetDateTime startHr) throws ApiException { + return getUsageObservabilityPipelinesWithHttpInfo( startHr, new GetUsageObservabilityPipelinesOptionalParameters()).getData(); } /** - * Get hourly usage for observability pipelines. - * - *

See {@link #getUsageObservabilityPipelinesWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @return CompletableFuture<UsageObservabilityPipelinesResponse> - */ - public CompletableFuture getUsageObservabilityPipelinesAsync( - OffsetDateTime startHr) { - return getUsageObservabilityPipelinesWithHttpInfoAsync( - startHr, new GetUsageObservabilityPipelinesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for observability pipelines. + * + * See {@link #getUsageObservabilityPipelinesWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @return CompletableFuture<UsageObservabilityPipelinesResponse> + */ + public CompletableFuturegetUsageObservabilityPipelinesAsync(OffsetDateTime startHr) { + return getUsageObservabilityPipelinesWithHttpInfoAsync(startHr, new GetUsageObservabilityPipelinesOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * Get hourly usage for observability pipelines. - * - *

See {@link #getUsageObservabilityPipelinesWithHttpInfo}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return UsageObservabilityPipelinesResponse - * @throws ApiException if fails to make API call - */ - public UsageObservabilityPipelinesResponse getUsageObservabilityPipelines( - OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) - throws ApiException { + * Get hourly usage for observability pipelines. + * + * See {@link #getUsageObservabilityPipelinesWithHttpInfo}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return UsageObservabilityPipelinesResponse + * @throws ApiException if fails to make API call + */ + public UsageObservabilityPipelinesResponse getUsageObservabilityPipelines(OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) throws ApiException { return getUsageObservabilityPipelinesWithHttpInfo(startHr, parameters).getData(); } /** - * Get hourly usage for observability pipelines. - * - *

See {@link #getUsageObservabilityPipelinesWithHttpInfoAsync}. - * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsageObservabilityPipelinesResponse> - */ - public CompletableFuture getUsageObservabilityPipelinesAsync( - OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) { - return getUsageObservabilityPipelinesWithHttpInfoAsync(startHr, parameters) - .thenApply( - response -> { - return response.getData(); - }); + * Get hourly usage for observability pipelines. + * + * See {@link #getUsageObservabilityPipelinesWithHttpInfoAsync}. + * + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsageObservabilityPipelinesResponse> + */ + public CompletableFuturegetUsageObservabilityPipelinesAsync( OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) { + return getUsageObservabilityPipelinesWithHttpInfoAsync(startHr, parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get hourly usage for observability pipelines. Note: hourly usage data for all - * products is now available in the Get - * hourly usage by product family API + *

Get hourly usage for observability pipelines. + * Note: hourly usage data for all products is now available in the Get hourly usage by product family API

* - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<UsageObservabilityPipelinesResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1672,78 +1222,51 @@ public CompletableFuture getUsageObservabil * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse - getUsageObservabilityPipelinesWithHttpInfo( - OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) - throws ApiException { + public ApiResponse getUsageObservabilityPipelinesWithHttpInfo(OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - throw new ApiException( - 400, - "Missing the required parameter 'startHr' when calling getUsageObservabilityPipelines"); + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageObservabilityPipelines"); } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v2/usage/observability_pipelines"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getUsageObservabilityPipelines", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsageMeteringApi.getUsageObservabilityPipelines", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get hourly usage for observability pipelines. * - *

See {@link #getUsageObservabilityPipelinesWithHttpInfo}. + * See {@link #getUsageObservabilityPipelinesWithHttpInfo}. * - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - * for usage beginning at this hour. (required) + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsageObservabilityPipelinesResponse>> */ - public CompletableFuture> - getUsageObservabilityPipelinesWithHttpInfoAsync( - OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) { + public CompletableFuture> getUsageObservabilityPipelinesWithHttpInfoAsync(OffsetDateTime startHr, GetUsageObservabilityPipelinesOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'startHr' is set if (startHr == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'startHr' when calling" - + " getUsageObservabilityPipelines")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageObservabilityPipelines")); + return result; } OffsetDateTime endHr = parameters.endHr; // create path and map variables String localVarPath = "/api/v2/usage/observability_pipelines"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1752,29 +1275,12 @@ public CompletableFuture getUsageObservabil Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsageMeteringApi.getUsageObservabilityPipelines", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json;datetime-format=rfc3339"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsageMeteringApi.getUsageObservabilityPipelines", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/api/UsersApi.java b/src/main/java/com/datadog/api/client/v2/api/UsersApi.java index 3d2076713b9..51a528f025f 100644 --- a/src/main/java/com/datadog/api/client/v2/api/UsersApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/UsersApi.java @@ -1,31 +1,38 @@ + package com.datadog.api.client.v2.api; import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.PermissionsResponse; -import com.datadog.api.client.v2.model.QuerySortOrder; -import com.datadog.api.client.v2.model.UserCreateRequest; -import com.datadog.api.client.v2.model.UserInvitationResponse; -import com.datadog.api.client.v2.model.UserInvitationsRequest; -import com.datadog.api.client.v2.model.UserInvitationsResponse; -import com.datadog.api.client.v2.model.UserResponse; -import com.datadog.api.client.v2.model.UserUpdateRequest; -import com.datadog.api.client.v2.model.UsersResponse; -import jakarta.ws.rs.client.Invocation; +import com.datadog.api.client.PaginationIterable; + import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.client.Invocation; + +import java.io.File; +import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.LinkedHashMap; import java.util.concurrent.CompletableFuture; +import java.time.OffsetDateTime; +import com.datadog.api.client.v2.model.UserInvitationsResponse; +import com.datadog.api.client.v2.model.UserInvitationsRequest; +import com.datadog.api.client.v2.model.UserInvitationResponse; +import com.datadog.api.client.v2.model.UsersResponse; +import com.datadog.api.client.v2.model.QuerySortOrder; +import com.datadog.api.client.v2.model.UserResponse; +import com.datadog.api.client.v2.model.UserCreateRequest; +import com.datadog.api.client.v2.model.UserUpdateRequest; +import com.datadog.api.client.v2.model.PermissionsResponse; + -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsersApi { private ApiClient apiClient; - public UsersApi() { this(ApiClient.getDefaultApiClient()); } @@ -53,42 +60,41 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a user. - * - *

See {@link #createUserWithHttpInfo}. - * - * @param body (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse createUser(UserCreateRequest body) throws ApiException { + * Create a user. + * + * See {@link #createUserWithHttpInfo}. + * + * @param body (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse createUser(UserCreateRequest body) throws ApiException { return createUserWithHttpInfo(body).getData(); } /** - * Create a user. - * - *

See {@link #createUserWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture createUserAsync(UserCreateRequest body) { - return createUserWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Create a user. + * + * See {@link #createUserWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFuturecreateUserAsync(UserCreateRequest body) { + return createUserWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Create a user for your organization. + *

Create a user for your organization.

* - * @param body (required) + * @param body (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -97,8 +103,7 @@ public CompletableFuture createUserAsync(UserCreateRequest body) { * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse createUserWithHttpInfo(UserCreateRequest body) - throws ApiException { + public ApiResponse createUserWithHttpInfo(UserCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -108,115 +113,85 @@ public ApiResponse createUserWithHttpInfo(UserCreateRequest body) // create path and map variables String localVarPath = "/api/v2/users"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.createUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.createUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Create a user. * - *

See {@link #createUserWithHttpInfo}. + * See {@link #createUserWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<UserResponse>> */ - public CompletableFuture> createUserWithHttpInfoAsync( - UserCreateRequest body) { + public CompletableFuture> createUserWithHttpInfoAsync(UserCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling createUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling createUser")); + return result; } // create path and map variables String localVarPath = "/api/v2/users"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.createUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.createUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Disable a user. - * - *

See {@link #disableUserWithHttpInfo}. - * - * @param userId The ID of the user. (required) - * @throws ApiException if fails to make API call - */ - public void disableUser(String userId) throws ApiException { + * Disable a user. + * + * See {@link #disableUserWithHttpInfo}. + * + * @param userId The ID of the user. (required) + * @throws ApiException if fails to make API call + */ + public void disableUser(String userId) throws ApiException { disableUserWithHttpInfo(userId); } /** - * Disable a user. - * - *

See {@link #disableUserWithHttpInfoAsync}. - * - * @param userId The ID of the user. (required) - * @return CompletableFuture - */ - public CompletableFuture disableUserAsync(String userId) { - return disableUserWithHttpInfoAsync(userId) - .thenApply( - response -> { - return response.getData(); - }); + * Disable a user. + * + * See {@link #disableUserWithHttpInfoAsync}. + * + * @param userId The ID of the user. (required) + * @return CompletableFuture + */ + public CompletableFuturedisableUserAsync(String userId) { + return disableUserWithHttpInfoAsync(userId).thenApply(response -> { + return response.getData(); + }); } + /** - * Disable a user. Can only be used with an application key belonging to an administrator user. + *

Disable a user. Can only be used with an application key belonging + * to an administrator user.

* * @param userId The ID of the user. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -230,40 +205,24 @@ public ApiResponse disableUserWithHttpInfo(String userId) throws ApiExcept // verify the required parameter 'userId' is set if (userId == null) { - throw new ApiException( - 400, "Missing the required parameter 'userId' when calling disableUser"); + throw new ApiException(400, "Missing the required parameter 'userId' when calling disableUser"); } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.disableUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.disableUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** * Disable a user. * - *

See {@link #disableUserWithHttpInfo}. + * See {@link #disableUserWithHttpInfo}. * * @param userId The ID of the user. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -273,83 +232,65 @@ public CompletableFuture> disableUserWithHttpInfoAsync(String // verify the required parameter 'userId' is set if (userId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'userId' when calling disableUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userId' when calling disableUser")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.disableUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.disableUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"*/*" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } 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); + return apiClient.invokeAPIAsync("DELETE", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, null); } /** - * Get a user invitation. - * - *

See {@link #getInvitationWithHttpInfo}. - * - * @param userInvitationUuid The UUID of the user invitation. (required) - * @return UserInvitationResponse - * @throws ApiException if fails to make API call - */ - public UserInvitationResponse getInvitation(String userInvitationUuid) throws ApiException { + * Get a user invitation. + * + * See {@link #getInvitationWithHttpInfo}. + * + * @param userInvitationUuid The UUID of the user invitation. (required) + * @return UserInvitationResponse + * @throws ApiException if fails to make API call + */ + public UserInvitationResponse getInvitation(String userInvitationUuid) throws ApiException { return getInvitationWithHttpInfo(userInvitationUuid).getData(); } /** - * Get a user invitation. - * - *

See {@link #getInvitationWithHttpInfoAsync}. - * - * @param userInvitationUuid The UUID of the user invitation. (required) - * @return CompletableFuture<UserInvitationResponse> - */ - public CompletableFuture getInvitationAsync(String userInvitationUuid) { - return getInvitationWithHttpInfoAsync(userInvitationUuid) - .thenApply( - response -> { - return response.getData(); - }); + * Get a user invitation. + * + * See {@link #getInvitationWithHttpInfoAsync}. + * + * @param userInvitationUuid The UUID of the user invitation. (required) + * @return CompletableFuture<UserInvitationResponse> + */ + public CompletableFuturegetInvitationAsync(String userInvitationUuid) { + return getInvitationWithHttpInfoAsync(userInvitationUuid).thenApply(response -> { + return response.getData(); + }); } + /** - * Returns a single user invitation by its UUID. + *

Returns a single user invitation by its UUID.

* * @param userInvitationUuid The UUID of the user invitation. (required) * @return ApiResponse<UserInvitationResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
204 OK -
+ *
* * * @@ -358,138 +299,97 @@ public CompletableFuture getInvitationAsync(String userI * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse getInvitationWithHttpInfo(String userInvitationUuid) - throws ApiException { + public ApiResponse getInvitationWithHttpInfo(String userInvitationUuid) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'userInvitationUuid' is set if (userInvitationUuid == null) { - throw new ApiException( - 400, "Missing the required parameter 'userInvitationUuid' when calling getInvitation"); + throw new ApiException(400, "Missing the required parameter 'userInvitationUuid' when calling getInvitation"); } // create path and map variables - String localVarPath = - "/api/v2/user_invitations/{user_invitation_uuid}" - .replaceAll( - "\\{" + "user_invitation_uuid" + "\\}", - apiClient.escapeString(userInvitationUuid.toString())); + String localVarPath = "/api/v2/user_invitations/{user_invitation_uuid}" + .replaceAll("\\{" + "user_invitation_uuid" + "\\}", apiClient.escapeString(userInvitationUuid.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.getInvitation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.getInvitation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a user invitation. * - *

See {@link #getInvitationWithHttpInfo}. + * See {@link #getInvitationWithHttpInfo}. * * @param userInvitationUuid The UUID of the user invitation. (required) * @return CompletableFuture<ApiResponse<UserInvitationResponse>> */ - public CompletableFuture> getInvitationWithHttpInfoAsync( - String userInvitationUuid) { + public CompletableFuture> getInvitationWithHttpInfoAsync(String userInvitationUuid) { Object localVarPostBody = null; // verify the required parameter 'userInvitationUuid' is set if (userInvitationUuid == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'userInvitationUuid' when calling getInvitation")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userInvitationUuid' when calling getInvitation")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/user_invitations/{user_invitation_uuid}" - .replaceAll( - "\\{" + "user_invitation_uuid" + "\\}", - apiClient.escapeString(userInvitationUuid.toString())); + String localVarPath = "/api/v2/user_invitations/{user_invitation_uuid}" + .replaceAll("\\{" + "user_invitation_uuid" + "\\}", apiClient.escapeString(userInvitationUuid.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.getInvitation", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.getInvitation", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get user details. - * - *

See {@link #getUserWithHttpInfo}. - * - * @param userId The ID of the user. (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse getUser(String userId) throws ApiException { + * Get user details. + * + * See {@link #getUserWithHttpInfo}. + * + * @param userId The ID of the user. (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse getUser(String userId) throws ApiException { return getUserWithHttpInfo(userId).getData(); } /** - * Get user details. - * - *

See {@link #getUserWithHttpInfoAsync}. - * - * @param userId The ID of the user. (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture getUserAsync(String userId) { - return getUserWithHttpInfoAsync(userId) - .thenApply( - response -> { - return response.getData(); - }); + * Get user details. + * + * See {@link #getUserWithHttpInfoAsync}. + * + * @param userId The ID of the user. (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFuturegetUserAsync(String userId) { + return getUserWithHttpInfoAsync(userId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a user in the organization specified by the user’s user_id. + *

Get a user in the organization specified by the user’s user_id.

* * @param userId The ID of the user. (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -506,36 +406,21 @@ public ApiResponse getUserWithHttpInfo(String userId) throws ApiEx throw new ApiException(400, "Missing the required parameter 'userId' when calling getUser"); } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.getUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.getUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get user details. * - *

See {@link #getUserWithHttpInfo}. + * See {@link #getUserWithHttpInfo}. * * @param userId The ID of the user. (required) * @return CompletableFuture<ApiResponse<UserResponse>> @@ -545,83 +430,66 @@ public CompletableFuture> getUserWithHttpInfoAsync(Str // verify the required parameter 'userId' is set if (userId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'userId' when calling getUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userId' when calling getUser")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.getUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.getUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a user organization. - * - *

See {@link #listUserOrganizationsWithHttpInfo}. - * - * @param userId The ID of the user. (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse listUserOrganizations(String userId) throws ApiException { + * Get a user organization. + * + * See {@link #listUserOrganizationsWithHttpInfo}. + * + * @param userId The ID of the user. (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse listUserOrganizations(String userId) throws ApiException { return listUserOrganizationsWithHttpInfo(userId).getData(); } /** - * Get a user organization. - * - *

See {@link #listUserOrganizationsWithHttpInfoAsync}. - * - * @param userId The ID of the user. (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture listUserOrganizationsAsync(String userId) { - return listUserOrganizationsWithHttpInfoAsync(userId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a user organization. + * + * See {@link #listUserOrganizationsWithHttpInfoAsync}. + * + * @param userId The ID of the user. (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFuturelistUserOrganizationsAsync(String userId) { + return listUserOrganizationsWithHttpInfoAsync(userId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a user organization. Returns the user information and all organizations joined by this - * user. + *

Get a user organization. Returns the user information and all organizations + * joined by this user.

* * @param userId The ID of the user. (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response details
Status Code Description Response Headers
200 OK for get user -
+ *
* * * @@ -630,134 +498,98 @@ public CompletableFuture listUserOrganizationsAsync(String userId) * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listUserOrganizationsWithHttpInfo(String userId) - throws ApiException { + public ApiResponse listUserOrganizationsWithHttpInfo(String userId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'userId' is set if (userId == null) { - throw new ApiException( - 400, "Missing the required parameter 'userId' when calling listUserOrganizations"); + throw new ApiException(400, "Missing the required parameter 'userId' when calling listUserOrganizations"); } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}/orgs" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}/orgs" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.listUserOrganizations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.listUserOrganizations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a user organization. * - *

See {@link #listUserOrganizationsWithHttpInfo}. + * See {@link #listUserOrganizationsWithHttpInfo}. * * @param userId The ID of the user. (required) * @return CompletableFuture<ApiResponse<UserResponse>> */ - public CompletableFuture> listUserOrganizationsWithHttpInfoAsync( - String userId) { + public CompletableFuture> listUserOrganizationsWithHttpInfoAsync(String userId) { Object localVarPostBody = null; // verify the required parameter 'userId' is set if (userId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'userId' when calling listUserOrganizations")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userId' when calling listUserOrganizations")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}/orgs" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}/orgs" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.listUserOrganizations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.listUserOrganizations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Get a user permissions. - * - *

See {@link #listUserPermissionsWithHttpInfo}. - * - * @param userId The ID of the user. (required) - * @return PermissionsResponse - * @throws ApiException if fails to make API call - */ - public PermissionsResponse listUserPermissions(String userId) throws ApiException { + * Get a user permissions. + * + * See {@link #listUserPermissionsWithHttpInfo}. + * + * @param userId The ID of the user. (required) + * @return PermissionsResponse + * @throws ApiException if fails to make API call + */ + public PermissionsResponse listUserPermissions(String userId) throws ApiException { return listUserPermissionsWithHttpInfo(userId).getData(); } /** - * Get a user permissions. - * - *

See {@link #listUserPermissionsWithHttpInfoAsync}. - * - * @param userId The ID of the user. (required) - * @return CompletableFuture<PermissionsResponse> - */ - public CompletableFuture listUserPermissionsAsync(String userId) { - return listUserPermissionsWithHttpInfoAsync(userId) - .thenApply( - response -> { - return response.getData(); - }); + * Get a user permissions. + * + * See {@link #listUserPermissionsWithHttpInfoAsync}. + * + * @param userId The ID of the user. (required) + * @return CompletableFuture<PermissionsResponse> + */ + public CompletableFuturelistUserPermissionsAsync(String userId) { + return listUserPermissionsWithHttpInfoAsync(userId).thenApply(response -> { + return response.getData(); + }); } + /** - * Get a user permission set. Returns a list of the user’s permissions granted by the associated - * user's roles. + *

Get a user permission set. Returns a list of the user’s permissions + * granted by the associated user's roles.

* * @param userId The ID of the user. (required) * @return ApiResponse<PermissionsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -766,97 +598,64 @@ public CompletableFuture listUserPermissionsAsync(String us * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listUserPermissionsWithHttpInfo(String userId) - throws ApiException { + public ApiResponse listUserPermissionsWithHttpInfo(String userId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'userId' is set if (userId == null) { - throw new ApiException( - 400, "Missing the required parameter 'userId' when calling listUserPermissions"); + throw new ApiException(400, "Missing the required parameter 'userId' when calling listUserPermissions"); } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}/permissions" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}/permissions" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.listUserPermissions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.listUserPermissions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Get a user permissions. * - *

See {@link #listUserPermissionsWithHttpInfo}. + * See {@link #listUserPermissionsWithHttpInfo}. * * @param userId The ID of the user. (required) * @return CompletableFuture<ApiResponse<PermissionsResponse>> */ - public CompletableFuture> listUserPermissionsWithHttpInfoAsync( - String userId) { + public CompletableFuture> listUserPermissionsWithHttpInfoAsync(String userId) { Object localVarPostBody = null; // verify the required parameter 'userId' is set if (userId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'userId' when calling listUserPermissions")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userId' when calling listUserPermissions")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}/permissions" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}/permissions" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.listUserPermissions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.listUserPermissions", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } - /** Manage optional parameters to listUsers. */ + /** + * Manage optional parameters to listUsers. + */ public static class ListUsersOptionalParameters { private Long pageSize; private Long pageNumber; @@ -867,9 +666,7 @@ public static class ListUsersOptionalParameters { /** * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default - * to 10) + * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default to 10) * @return ListUsersOptionalParameters */ public ListUsersOptionalParameters pageSize(Long pageSize) { @@ -879,7 +676,6 @@ public ListUsersOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. - * * @param pageNumber Specific page number to return. (optional, default to 0) * @return ListUsersOptionalParameters */ @@ -890,11 +686,7 @@ public ListUsersOptionalParameters pageNumber(Long pageNumber) { /** * Set sort. - * - * @param sort User attribute to order results by. Sort order is ascending by default. Sort - * order is descending if the field is prefixed by a negative sign, for example - * sort=-name. Options: name, modified_at, user_count - * . (optional, default to "name") + * @param sort User attribute to order results by. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example sort=-name. Options: name, modified_at, user_count. (optional, default to "name") * @return ListUsersOptionalParameters */ public ListUsersOptionalParameters sort(String sort) { @@ -904,9 +696,7 @@ public ListUsersOptionalParameters sort(String sort) { /** * Set sortDir. - * - * @param sortDir Direction of sort. Options: asc, desc. (optional, - * default to "desc") + * @param sortDir Direction of sort. Options: asc, desc. (optional, default to "desc") * @return ListUsersOptionalParameters */ public ListUsersOptionalParameters sortDir(QuerySortOrder sortDir) { @@ -916,7 +706,6 @@ public ListUsersOptionalParameters sortDir(QuerySortOrder sortDir) { /** * Set filter. - * * @param filter Filter all users by the given string. Defaults to no filtering. (optional) * @return ListUsersOptionalParameters */ @@ -927,10 +716,7 @@ public ListUsersOptionalParameters filter(String filter) { /** * Set filterStatus. - * - * @param filterStatus Filter on status attribute. Comma separated list, with possible values - * Active, Pending, and Disabled. Defaults to no - * filtering. (optional) + * @param filterStatus Filter on status attribute. Comma separated list, with possible values Active, Pending, and Disabled. Defaults to no filtering. (optional) * @return ListUsersOptionalParameters */ public ListUsersOptionalParameters filterStatus(String filterStatus) { @@ -940,70 +726,67 @@ public ListUsersOptionalParameters filterStatus(String filterStatus) { } /** - * List all users. - * - *

See {@link #listUsersWithHttpInfo}. - * - * @return UsersResponse - * @throws ApiException if fails to make API call - */ - public UsersResponse listUsers() throws ApiException { + * List all users. + * + * See {@link #listUsersWithHttpInfo}. + * + * @return UsersResponse + * @throws ApiException if fails to make API call + */ + public UsersResponse listUsers () throws ApiException { return listUsersWithHttpInfo(new ListUsersOptionalParameters()).getData(); } /** - * List all users. - * - *

See {@link #listUsersWithHttpInfoAsync}. - * - * @return CompletableFuture<UsersResponse> - */ - public CompletableFuture listUsersAsync() { - return listUsersWithHttpInfoAsync(new ListUsersOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + * List all users. + * + * See {@link #listUsersWithHttpInfoAsync}. + * + * @return CompletableFuture<UsersResponse> + */ + public CompletableFuturelistUsersAsync() { + return listUsersWithHttpInfoAsync(new ListUsersOptionalParameters()).thenApply(response -> { + return response.getData(); + }); } /** - * List all users. - * - *

See {@link #listUsersWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return UsersResponse - * @throws ApiException if fails to make API call - */ + * List all users. + * + * See {@link #listUsersWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return UsersResponse + * @throws ApiException if fails to make API call + */ public UsersResponse listUsers(ListUsersOptionalParameters parameters) throws ApiException { return listUsersWithHttpInfo(parameters).getData(); } /** - * List all users. - * - *

See {@link #listUsersWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<UsersResponse> - */ - public CompletableFuture listUsersAsync(ListUsersOptionalParameters parameters) { - return listUsersWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + * List all users. + * + * See {@link #listUsersWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<UsersResponse> + */ + public CompletableFuturelistUsersAsync(ListUsersOptionalParameters parameters) { + return listUsersWithHttpInfoAsync(parameters).thenApply(response -> { + return response.getData(); + }); } + /** - * Get the list of all users in the organization. This list includes all users even if they are - * deactivated or unverified. + *

Get the list of all users in the organization. This list includes + * all users even if they are deactivated or unverified.

* * @param parameters Optional parameters for the request. * @return ApiResponse<UsersResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1012,8 +795,7 @@ public CompletableFuture listUsersAsync(ListUsersOptionalParamete * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse listUsersWithHttpInfo(ListUsersOptionalParameters parameters) - throws ApiException { + public ApiResponse listUsersWithHttpInfo(ListUsersOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1024,6 +806,7 @@ public ApiResponse listUsersWithHttpInfo(ListUsersOptionalParamet // create path and map variables String localVarPath = "/api/v2/users"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1034,36 +817,19 @@ public ApiResponse listUsersWithHttpInfo(ListUsersOptionalParamet localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.listUsers", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.listUsers", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * List all users. * - *

See {@link #listUsersWithHttpInfo}. + * See {@link #listUsersWithHttpInfo}. * * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<UsersResponse>> */ - public CompletableFuture> listUsersWithHttpInfoAsync( - ListUsersOptionalParameters parameters) { + public CompletableFuture> listUsersWithHttpInfoAsync(ListUsersOptionalParameters parameters) { Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; @@ -1074,6 +840,7 @@ public CompletableFuture> listUsersWithHttpInfoAsync( // create path and map variables String localVarPath = "/api/v2/users"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -1086,69 +853,51 @@ public CompletableFuture> listUsersWithHttpInfoAsync( Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.listUsers", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.listUsers", localVarPath, localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("GET", builder, localVarHeaderParams, new String[] { }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Send invitation emails. - * - *

See {@link #sendInvitationsWithHttpInfo}. - * - * @param body (required) - * @return UserInvitationsResponse - * @throws ApiException if fails to make API call - */ - public UserInvitationsResponse sendInvitations(UserInvitationsRequest body) throws ApiException { + * Send invitation emails. + * + * See {@link #sendInvitationsWithHttpInfo}. + * + * @param body (required) + * @return UserInvitationsResponse + * @throws ApiException if fails to make API call + */ + public UserInvitationsResponse sendInvitations(UserInvitationsRequest body) throws ApiException { return sendInvitationsWithHttpInfo(body).getData(); } /** - * Send invitation emails. - * - *

See {@link #sendInvitationsWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<UserInvitationsResponse> - */ - public CompletableFuture sendInvitationsAsync( - UserInvitationsRequest body) { - return sendInvitationsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + * Send invitation emails. + * + * See {@link #sendInvitationsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<UserInvitationsResponse> + */ + public CompletableFuturesendInvitationsAsync(UserInvitationsRequest body) { + return sendInvitationsWithHttpInfoAsync(body).thenApply(response -> { + return response.getData(); + }); } + /** - * Sends emails to one or more users inviting them to join the organization. + *

Sends emails to one or more users inviting them to join the organization.

* - * @param body (required) + * @param body (required) * @return ApiResponse<UserInvitationsResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1157,132 +906,99 @@ public CompletableFuture sendInvitationsAsync( * *
Response details
Status Code Description Response Headers
201 OK -
429 Too many requests -
*/ - public ApiResponse sendInvitationsWithHttpInfo( - UserInvitationsRequest body) throws ApiException { + public ApiResponse sendInvitationsWithHttpInfo(UserInvitationsRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling sendInvitations"); + throw new ApiException(400, "Missing the required parameter 'body' when calling sendInvitations"); } // create path and map variables String localVarPath = "/api/v2/user_invitations"; + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.sendInvitations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.sendInvitations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Send invitation emails. * - *

See {@link #sendInvitationsWithHttpInfo}. + * See {@link #sendInvitationsWithHttpInfo}. * - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<UserInvitationsResponse>> */ - public CompletableFuture> sendInvitationsWithHttpInfoAsync( - UserInvitationsRequest body) { + public CompletableFuture> sendInvitationsWithHttpInfoAsync(UserInvitationsRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling sendInvitations")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling sendInvitations")); + return result; } // create path and map variables String localVarPath = "/api/v2/user_invitations"; + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.sendInvitations", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.sendInvitations", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("POST", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** - * Update a user. - * - *

See {@link #updateUserWithHttpInfo}. - * - * @param userId The ID of the user. (required) - * @param body (required) - * @return UserResponse - * @throws ApiException if fails to make API call - */ - public UserResponse updateUser(String userId, UserUpdateRequest body) throws ApiException { + * Update a user. + * + * See {@link #updateUserWithHttpInfo}. + * + * @param userId The ID of the user. (required) + * @param body (required) + * @return UserResponse + * @throws ApiException if fails to make API call + */ + public UserResponse updateUser(String userId, UserUpdateRequest body) throws ApiException { return updateUserWithHttpInfo(userId, body).getData(); } /** - * Update a user. - * - *

See {@link #updateUserWithHttpInfoAsync}. - * - * @param userId The ID of the user. (required) - * @param body (required) - * @return CompletableFuture<UserResponse> - */ - public CompletableFuture updateUserAsync(String userId, UserUpdateRequest body) { - return updateUserWithHttpInfoAsync(userId, body) - .thenApply( - response -> { - return response.getData(); - }); + * Update a user. + * + * See {@link #updateUserWithHttpInfoAsync}. + * + * @param userId The ID of the user. (required) + * @param body (required) + * @return CompletableFuture<UserResponse> + */ + public CompletableFutureupdateUserAsync(String userId, UserUpdateRequest body) { + return updateUserWithHttpInfoAsync(userId, body).thenApply(response -> { + return response.getData(); + }); } + /** - * Edit a user. Can only be used with an application key belonging to an administrator user. + *

Edit a user. Can only be used with an application key belonging + * to an administrator user.

* * @param userId The ID of the user. (required) - * @param body (required) + * @param body (required) * @return ApiResponse<UserResponse> * @throws ApiException if fails to make API call * @http.response.details - * + *
* * * @@ -1293,14 +1009,12 @@ public CompletableFuture updateUserAsync(String userId, UserUpdate * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
*/ - public ApiResponse updateUserWithHttpInfo(String userId, UserUpdateRequest body) - throws ApiException { + public ApiResponse updateUserWithHttpInfo(String userId, UserUpdateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'userId' is set if (userId == null) { - throw new ApiException( - 400, "Missing the required parameter 'userId' when calling updateUser"); + throw new ApiException(400, "Missing the required parameter 'userId' when calling updateUser"); } // verify the required parameter 'body' is set @@ -1308,91 +1022,58 @@ public ApiResponse updateUserWithHttpInfo(String userId, UserUpdat throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder = - apiClient.createBuilder( - "v2.UsersApi.updateUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + + Invocation.Builder builder = apiClient.createBuilder("v2.UsersApi.updateUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); + return apiClient.invokeAPI("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } /** * Update a user. * - *

See {@link #updateUserWithHttpInfo}. + * See {@link #updateUserWithHttpInfo}. * * @param userId The ID of the user. (required) - * @param body (required) + * @param body (required) * @return CompletableFuture<ApiResponse<UserResponse>> */ - public CompletableFuture> updateUserWithHttpInfoAsync( - String userId, UserUpdateRequest body) { + public CompletableFuture> updateUserWithHttpInfoAsync(String userId, UserUpdateRequest body) { Object localVarPostBody = body; // verify the required parameter 'userId' is set if (userId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'userId' when calling updateUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'userId' when calling updateUser")); + 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 updateUser")); - return result; + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(new ApiException(400, "Missing the required parameter 'body' when calling updateUser")); + return result; } // create path and map variables - String localVarPath = - "/api/v2/users/{user_id}" - .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + String localVarPath = "/api/v2/users/{user_id}" + .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString())); + Map localVarHeaderParams = new HashMap(); + Invocation.Builder builder; try { - builder = - apiClient.createBuilder( - "v2.UsersApi.updateUser", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + builder = apiClient.createBuilder("v2.UsersApi.updateUser", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json" }, new String[] { "AuthZ", "apiKeyAuth", "appKeyAuth" }); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + return apiClient.invokeAPIAsync("PATCH", builder, localVarHeaderParams, new String[] {"application/json" }, localVarPostBody,new HashMap() , false, new GenericType() {}); } -} +} \ No newline at end of file diff --git a/src/main/java/com/datadog/api/client/v2/model/APIErrorResponse.java b/src/main/java/com/datadog/api/client/v2/model/APIErrorResponse.java index 52d5deb24ba..4e47baf28c1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIErrorResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIErrorResponse.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** API error response. */ -@JsonPropertyOrder({APIErrorResponse.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

API error response.

+ */ +@JsonPropertyOrder({ + APIErrorResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIErrorResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERRORS = "errors"; private List errors = new ArrayList<>(); @@ -28,36 +47,35 @@ public APIErrorResponse() {} @JsonCreator public APIErrorResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_ERRORS) List errors) { - this.errors = errors; + @JsonProperty(required=true, value=JSON_PROPERTY_ERRORS)List errors) { + this.errors = errors; } - public APIErrorResponse errors(List errors) { this.errors = errors; return this; } - public APIErrorResponse addErrorsItem(String errorsItem) { this.errors.add(errorsItem); return this; } /** - * A list of errors. - * + *

A list of errors.

* @return errors - */ - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getErrors() { - return errors; - } - + **/ + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this APIErrorResponse object is equal to o. */ + /** + * Return true if this APIErrorResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -70,6 +88,7 @@ public boolean equals(Object o) { return Objects.equals(this.errors, apiErrorResponse.errors); } + @Override public int hashCode() { return Objects.hash(errors); @@ -85,7 +104,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateAttributes.java index f42b991c6bd..c6f4782ed62 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes used to create an API Key. */ -@JsonPropertyOrder({APIKeyCreateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Attributes used to create an API Key.

+ */ +@JsonPropertyOrder({ + APIKeyCreateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public APIKeyCreateAttributes() {} @JsonCreator public APIKeyCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public APIKeyCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the API key. - * + *

Name of the API key.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this APIKeyCreateAttributes object is equal to o. */ + /** + * Return true if this APIKeyCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.name, apiKeyCreateAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateData.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateData.java index ec457136f2b..f57f15ca9ad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateData.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object used to create an API key. */ -@JsonPropertyOrder({APIKeyCreateData.JSON_PROPERTY_ATTRIBUTES, APIKeyCreateData.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object used to create an API key.

+ */ +@JsonPropertyOrder({ + APIKeyCreateData.JSON_PROPERTY_ATTRIBUTES, + APIKeyCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private APIKeyCreateAttributes attributes; @@ -29,15 +51,13 @@ public APIKeyCreateData() {} @JsonCreator public APIKeyCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - APIKeyCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) APIKeysType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)APIKeyCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)APIKeysType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public APIKeyCreateData attributes(APIKeyCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -45,20 +65,18 @@ public APIKeyCreateData attributes(APIKeyCreateAttributes attributes) { } /** - * Attributes used to create an API Key. - * + *

Attributes used to create an API Key.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public APIKeyCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public APIKeyCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(APIKeyCreateAttributes attributes) { this.attributes = attributes; } - public APIKeyCreateData type(APIKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +84,25 @@ public APIKeyCreateData type(APIKeysType type) { } /** - * API Keys resource type. - * + *

API Keys resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public APIKeysType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public APIKeysType getType() { + return type; + } public void setType(APIKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this APIKeyCreateData object is equal to o. */ + /** + * Return true if this APIKeyCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +112,13 @@ public boolean equals(Object o) { return false; } APIKeyCreateData apiKeyCreateData = (APIKeyCreateData) o; - return Objects.equals(this.attributes, apiKeyCreateData.attributes) - && Objects.equals(this.type, apiKeyCreateData.type); + return Objects.equals(this.attributes, apiKeyCreateData.attributes) && Objects.equals(this.type, apiKeyCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -113,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateRequest.java index 9624890e1f1..a717dbbe642 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request used to create an API key. */ -@JsonPropertyOrder({APIKeyCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request used to create an API key.

+ */ +@JsonPropertyOrder({ + APIKeyCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private APIKeyCreateData data; @@ -26,11 +47,10 @@ public APIKeyCreateRequest() {} @JsonCreator public APIKeyCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) APIKeyCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)APIKeyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public APIKeyCreateRequest data(APIKeyCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public APIKeyCreateRequest data(APIKeyCreateData data) { } /** - * Object used to create an API key. - * + *

Object used to create an API key.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public APIKeyCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public APIKeyCreateData getData() { + return data; + } public void setData(APIKeyCreateData data) { this.data = data; } - /** Return true if this APIKeyCreateRequest object is equal to o. */ + /** + * Return true if this APIKeyCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, apiKeyCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyRelationships.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyRelationships.java index 4649ef65c55..01257a21c71 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyRelationships.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Resources related to the API key. */ + +/** + *

Resources related to the API key.

+ */ @JsonPropertyOrder({ APIKeyRelationships.JSON_PROPERTY_CREATED_BY, APIKeyRelationships.JSON_PROPERTY_MODIFIED_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_BY = "created_by"; private RelationshipToUser createdBy; @@ -34,21 +54,19 @@ public APIKeyRelationships createdBy(RelationshipToUser createdBy) { } /** - * Relationship to user. - * + *

Relationship to user.

* @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getCreatedBy() { - return createdBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedBy() { + return createdBy; + } public void setCreatedBy(RelationshipToUser createdBy) { this.createdBy = createdBy; } - public APIKeyRelationships modifiedBy(RelationshipToUser modifiedBy) { this.modifiedBy = modifiedBy; this.unparsed |= modifiedBy.unparsed; @@ -56,22 +74,23 @@ public APIKeyRelationships modifiedBy(RelationshipToUser modifiedBy) { } /** - * Relationship to user. - * + *

Relationship to user.

* @return modifiedBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getModifiedBy() { - return modifiedBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getModifiedBy() { + return modifiedBy; + } public void setModifiedBy(RelationshipToUser modifiedBy) { this.modifiedBy = modifiedBy; } - /** Return true if this APIKeyRelationships object is equal to o. */ + /** + * Return true if this APIKeyRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } APIKeyRelationships apiKeyRelationships = (APIKeyRelationships) o; - return Objects.equals(this.createdBy, apiKeyRelationships.createdBy) - && Objects.equals(this.modifiedBy, apiKeyRelationships.modifiedBy); + return Objects.equals(this.createdBy, apiKeyRelationships.createdBy) && Objects.equals(this.modifiedBy, apiKeyRelationships.modifiedBy); } + @Override public int hashCode() { - return Objects.hash(createdBy, modifiedBy); + return Objects.hash(createdBy,modifiedBy); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyResponse.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyResponse.java index 8157265fb5c..9253bf292b6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response for retrieving an API key. */ -@JsonPropertyOrder({APIKeyResponse.JSON_PROPERTY_DATA, APIKeyResponse.JSON_PROPERTY_INCLUDED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response for retrieving an API key.

+ */ +@JsonPropertyOrder({ + APIKeyResponse.JSON_PROPERTY_DATA, + APIKeyResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FullAPIKey data; @@ -33,21 +54,19 @@ public APIKeyResponse data(FullAPIKey data) { } /** - * Datadog API key. - * + *

Datadog API key.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FullAPIKey getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FullAPIKey getData() { + return data; + } public void setData(FullAPIKey data) { this.data = data; } - public APIKeyResponse included(List included) { this.included = included; for (APIKeyResponseIncludedItem item : included) { @@ -55,7 +74,6 @@ public APIKeyResponse included(List included) { } return this; } - public APIKeyResponse addIncludedItem(APIKeyResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -66,22 +84,23 @@ public APIKeyResponse addIncludedItem(APIKeyResponseIncludedItem includedItem) { } /** - * Array of objects related to the API key. - * + *

Array of objects related to the API key.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this APIKeyResponse object is equal to o. */ + /** + * Return true if this APIKeyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +110,13 @@ public boolean equals(Object o) { return false; } APIKeyResponse apiKeyResponse = (APIKeyResponse) o; - return Objects.equals(this.data, apiKeyResponse.data) - && Objects.equals(this.included, apiKeyResponse.included); + return Objects.equals(this.data, apiKeyResponse.data) && Objects.equals(this.included, apiKeyResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -111,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyResponseIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyResponseIncludedItem.java index 1295d8c6aef..8356d281a51 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyResponseIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyResponseIncludedItem.java @@ -6,205 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = APIKeyResponseIncludedItem.APIKeyResponseIncludedItemDeserializer.class) @JsonSerialize(using = APIKeyResponseIncludedItem.APIKeyResponseIncludedItemSerializer.class) public class APIKeyResponseIncludedItem extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(APIKeyResponseIncludedItem.class.getName()); + private static final Logger log = Logger.getLogger(APIKeyResponseIncludedItem.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class APIKeyResponseIncludedItemSerializer - extends StdSerializer { - public APIKeyResponseIncludedItemSerializer(Class t) { - super(t); + public static class APIKeyResponseIncludedItemSerializer extends StdSerializer { + public APIKeyResponseIncludedItemSerializer(Class t) { + super(t); + } + + public APIKeyResponseIncludedItemSerializer() { + this(null); + } + + @Override + public void serialize(APIKeyResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public APIKeyResponseIncludedItemSerializer() { - this(null); + public static class APIKeyResponseIncludedItemDeserializer extends StdDeserializer { + public APIKeyResponseIncludedItemDeserializer() { + this(APIKeyResponseIncludedItem.class); + } + + public APIKeyResponseIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public APIKeyResponseIncludedItem 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + APIKeyResponseIncludedItem ret = new APIKeyResponseIncludedItem(); + 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 APIKeyResponseIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "APIKeyResponseIncludedItem cannot be null"); + } } - @Override - public void serialize( - APIKeyResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public APIKeyResponseIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public APIKeyResponseIncludedItem(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class APIKeyResponseIncludedItemDeserializer - extends StdDeserializer { - public APIKeyResponseIncludedItemDeserializer() { - this(APIKeyResponseIncludedItem.class); + static { + schemas.put("User", new GenericType() { + }); + JSON.registerDescendants(APIKeyResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); } - public APIKeyResponseIncludedItemDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return APIKeyResponseIncludedItem.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public APIKeyResponseIncludedItem 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 User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - - APIKeyResponseIncludedItem ret = new APIKeyResponseIncludedItem(); - 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; + throw new RuntimeException("Invalid instance type. Must be User"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * User + * + * @return The actual instance (User) + */ @Override - public APIKeyResponseIncludedItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "APIKeyResponseIncludedItem cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public APIKeyResponseIncludedItem() { - super("oneOf", Boolean.FALSE); - } - - public APIKeyResponseIncludedItem(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - JSON.registerDescendants( - APIKeyResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return APIKeyResponseIncludedItem.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User - * - *

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(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be User"); - } - - /** - * Get the actual instance, which can be the following: User - * - * @return The actual instance (User) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateAttributes.java index d3306260814..a69c2ba4f68 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes used to update an API Key. */ -@JsonPropertyOrder({APIKeyUpdateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Attributes used to update an API Key.

+ */ +@JsonPropertyOrder({ + APIKeyUpdateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public APIKeyUpdateAttributes() {} @JsonCreator public APIKeyUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public APIKeyUpdateAttributes name(String name) { this.name = name; return this; } /** - * Name of the API key. - * + *

Name of the API key.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this APIKeyUpdateAttributes object is equal to o. */ + /** + * Return true if this APIKeyUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.name, apiKeyUpdateAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateData.java index f6d6f8d5c2e..c04499a5979 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object used to update an API key. */ +/** + *

Object used to update an API key.

+ */ @JsonPropertyOrder({ APIKeyUpdateData.JSON_PROPERTY_ATTRIBUTES, APIKeyUpdateData.JSON_PROPERTY_ID, APIKeyUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private APIKeyUpdateAttributes attributes; @@ -36,17 +55,15 @@ public APIKeyUpdateData() {} @JsonCreator public APIKeyUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - APIKeyUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) APIKeysType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)APIKeyUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)APIKeysType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public APIKeyUpdateData attributes(APIKeyUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public APIKeyUpdateData attributes(APIKeyUpdateAttributes attributes) { } /** - * Attributes used to update an API Key. - * + *

Attributes used to update an API Key.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public APIKeyUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public APIKeyUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(APIKeyUpdateAttributes attributes) { this.attributes = attributes; } - public APIKeyUpdateData id(String id) { this.id = id; return this; } /** - * ID of the API key. - * + *

ID of the API key.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public APIKeyUpdateData type(APIKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public APIKeyUpdateData type(APIKeysType type) { } /** - * API Keys resource type. - * + *

API Keys resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public APIKeysType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public APIKeysType getType() { + return type; + } public void setType(APIKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this APIKeyUpdateData object is equal to o. */ + /** + * Return true if this APIKeyUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } APIKeyUpdateData apiKeyUpdateData = (APIKeyUpdateData) o; - return Objects.equals(this.attributes, apiKeyUpdateData.attributes) - && Objects.equals(this.id, apiKeyUpdateData.id) - && Objects.equals(this.type, apiKeyUpdateData.type); + return Objects.equals(this.attributes, apiKeyUpdateData.attributes) && Objects.equals(this.id, apiKeyUpdateData.id) && Objects.equals(this.type, apiKeyUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateRequest.java index 4478e0a3e1d..2b4bf47b5ae 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeyUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request used to update an API key. */ -@JsonPropertyOrder({APIKeyUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request used to update an API key.

+ */ +@JsonPropertyOrder({ + APIKeyUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeyUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private APIKeyUpdateData data; @@ -26,11 +47,10 @@ public APIKeyUpdateRequest() {} @JsonCreator public APIKeyUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) APIKeyUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)APIKeyUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public APIKeyUpdateRequest data(APIKeyUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public APIKeyUpdateRequest data(APIKeyUpdateData data) { } /** - * Object used to update an API key. - * + *

Object used to update an API key.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public APIKeyUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public APIKeyUpdateData getData() { + return data; + } public void setData(APIKeyUpdateData data) { this.data = data; } - /** Return true if this APIKeyUpdateRequest object is equal to o. */ + /** + * Return true if this APIKeyUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, apiKeyUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeysResponse.java b/src/main/java/com/datadog/api/client/v2/model/APIKeysResponse.java index 1318e68293e..c2ff69f2716 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeysResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeysResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response for a list of API keys. */ -@JsonPropertyOrder({APIKeysResponse.JSON_PROPERTY_DATA, APIKeysResponse.JSON_PROPERTY_INCLUDED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response for a list of API keys.

+ */ +@JsonPropertyOrder({ + APIKeysResponse.JSON_PROPERTY_DATA, + APIKeysResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APIKeysResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -33,7 +54,6 @@ public APIKeysResponse data(List data) { } return this; } - public APIKeysResponse addDataItem(PartialAPIKey dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -44,21 +64,19 @@ public APIKeysResponse addDataItem(PartialAPIKey dataItem) { } /** - * Array of API keys. - * + *

Array of API keys.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public APIKeysResponse included(List included) { this.included = included; for (APIKeyResponseIncludedItem item : included) { @@ -66,7 +84,6 @@ public APIKeysResponse included(List included) { } return this; } - public APIKeysResponse addIncludedItem(APIKeyResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -77,22 +94,23 @@ public APIKeysResponse addIncludedItem(APIKeyResponseIncludedItem includedItem) } /** - * Array of objects related to the API key. - * + *

Array of objects related to the API key.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this APIKeysResponse object is equal to o. */ + /** + * Return true if this APIKeysResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,13 +120,13 @@ public boolean equals(Object o) { return false; } APIKeysResponse apiKeysResponse = (APIKeysResponse) o; - return Objects.equals(this.data, apiKeysResponse.data) - && Objects.equals(this.included, apiKeysResponse.included); + return Objects.equals(this.data, apiKeysResponse.data) && Objects.equals(this.included, apiKeysResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -122,7 +140,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeysSort.java b/src/main/java/com/datadog/api/client/v2/model/APIKeysSort.java index 93250ed2853..d949f02e3cd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeysSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeysSort.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sorting options */ +/** + *

Sorting options

+ */ @JsonSerialize(using = APIKeysSort.APIKeysSortSerializer.class) public class APIKeysSort { @@ -32,17 +56,7 @@ public class APIKeysSort { public static final APIKeysSort NAME_ASCENDING = new APIKeysSort("name"); public static final APIKeysSort NAME_DESCENDING = new APIKeysSort("-name"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "created_at", - "-created_at", - "last4", - "-last4", - "modified_at", - "-modified_at", - "name", - "-name")); + private static final Set allowedValues = new HashSet(Arrays.asList("created_at", "-created_at", "last4", "-last4", "modified_at", "-modified_at", "name", "-name")); private String value; @@ -55,19 +69,18 @@ public boolean isValid() { } public static class APIKeysSortSerializer extends StdSerializer { - public APIKeysSortSerializer(Class t) { - super(t); - } - - public APIKeysSortSerializer() { - this(null); - } - - @Override - public void serialize(APIKeysSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public APIKeysSortSerializer(Class t) { + super(t); + } + + public APIKeysSortSerializer() { + this(null); + } + + @Override + public void serialize(APIKeysSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -79,7 +92,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this APIKeysSort object is equal to o. */ + /** + * Return true if this APIKeysSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,7 +108,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/APIKeysType.java b/src/main/java/com/datadog/api/client/v2/model/APIKeysType.java index 34ab33ac62f..533a32afb38 100644 --- a/src/main/java/com/datadog/api/client/v2/model/APIKeysType.java +++ b/src/main/java/com/datadog/api/client/v2/model/APIKeysType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** API Keys resource type. */ +/** + *

API Keys resource type.

+ */ @JsonSerialize(using = APIKeysType.APIKeysTypeSerializer.class) public class APIKeysType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class APIKeysTypeSerializer extends StdSerializer { - public APIKeysTypeSerializer(Class t) { - super(t); - } - - public APIKeysTypeSerializer() { - this(null); - } - - @Override - public void serialize(APIKeysType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public APIKeysTypeSerializer(Class t) { + super(t); + } + + public APIKeysTypeSerializer() { + this(null); + } + + @Override + public void serialize(APIKeysType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this APIKeysType object is equal to o. */ + /** + * Return true if this APIKeysType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateAttributes.java index d63f7b8557f..4e85b2eeeb4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateAttributes.java @@ -6,25 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes used to create an application Key. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes used to create an application Key.

+ */ @JsonPropertyOrder({ ApplicationKeyCreateAttributes.JSON_PROPERTY_NAME, ApplicationKeyCreateAttributes.JSON_PROPERTY_SCOPES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -35,35 +51,31 @@ public ApplicationKeyCreateAttributes() {} @JsonCreator public ApplicationKeyCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public ApplicationKeyCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the application key. - * + *

Name of the application key.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ApplicationKeyCreateAttributes scopes(List scopes) { this.scopes = JsonNullable.>of(scopes); return this; } - public ApplicationKeyCreateAttributes addScopesItem(String scopesItem) { if (this.scopes == null || !this.scopes.isPresent()) { this.scopes = JsonNullable.>of(new ArrayList<>()); @@ -77,33 +89,30 @@ public ApplicationKeyCreateAttributes addScopesItem(String scopesItem) { } /** - * Array of scopes to grant the application key. This feature is in private beta, please contact - * Datadog support to enable scopes for your application keys. - * + *

Array of scopes to grant the application key. This feature is in private beta, please contact Datadog support to enable scopes for your application keys.

* @return scopes - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getScopes() { - return scopes.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getScopes() { + return scopes.orElse(null); + } @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getScopes_JsonNullable() { return scopes; } - - @JsonProperty(JSON_PROPERTY_SCOPES) - public void setScopes_JsonNullable(JsonNullable> scopes) { + @JsonProperty(JSON_PROPERTY_SCOPES)public void setScopes_JsonNullable(JsonNullable> scopes) { this.scopes = scopes; } - public void setScopes(List scopes) { this.scopes = JsonNullable.>of(scopes); } - /** Return true if this ApplicationKeyCreateAttributes object is equal to o. */ + /** + * Return true if this ApplicationKeyCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,15 +121,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ApplicationKeyCreateAttributes applicationKeyCreateAttributes = - (ApplicationKeyCreateAttributes) o; - return Objects.equals(this.name, applicationKeyCreateAttributes.name) - && Objects.equals(this.scopes, applicationKeyCreateAttributes.scopes); + ApplicationKeyCreateAttributes applicationKeyCreateAttributes = (ApplicationKeyCreateAttributes) o; + return Objects.equals(this.name, applicationKeyCreateAttributes.name) && Objects.equals(this.scopes, applicationKeyCreateAttributes.scopes); } + @Override public int hashCode() { - return Objects.hash(name, scopes); + return Objects.hash(name,scopes); } @Override @@ -134,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateData.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateData.java index 5b79fe216fe..c4b6c451ae1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object used to create an application key. */ + +/** + *

Object used to create an application key.

+ */ @JsonPropertyOrder({ ApplicationKeyCreateData.JSON_PROPERTY_ATTRIBUTES, ApplicationKeyCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ApplicationKeyCreateAttributes attributes; @@ -32,15 +51,13 @@ public ApplicationKeyCreateData() {} @JsonCreator public ApplicationKeyCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ApplicationKeyCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ApplicationKeysType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ApplicationKeyCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ApplicationKeysType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public ApplicationKeyCreateData attributes(ApplicationKeyCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public ApplicationKeyCreateData attributes(ApplicationKeyCreateAttributes attrib } /** - * Attributes used to create an application Key. - * + *

Attributes used to create an application Key.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApplicationKeyCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApplicationKeyCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(ApplicationKeyCreateAttributes attributes) { this.attributes = attributes; } - public ApplicationKeyCreateData type(ApplicationKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public ApplicationKeyCreateData type(ApplicationKeysType type) { } /** - * Application Keys resource type. - * + *

Application Keys resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApplicationKeysType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApplicationKeysType getType() { + return type; + } public void setType(ApplicationKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ApplicationKeyCreateData object is equal to o. */ + /** + * Return true if this ApplicationKeyCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } ApplicationKeyCreateData applicationKeyCreateData = (ApplicationKeyCreateData) o; - return Objects.equals(this.attributes, applicationKeyCreateData.attributes) - && Objects.equals(this.type, applicationKeyCreateData.type); + return Objects.equals(this.attributes, applicationKeyCreateData.attributes) && Objects.equals(this.type, applicationKeyCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateRequest.java index aab955e335a..3d14927f8eb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request used to create an application key. */ -@JsonPropertyOrder({ApplicationKeyCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request used to create an application key.

+ */ +@JsonPropertyOrder({ + ApplicationKeyCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ApplicationKeyCreateData data; @@ -26,11 +47,10 @@ public ApplicationKeyCreateRequest() {} @JsonCreator public ApplicationKeyCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ApplicationKeyCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ApplicationKeyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ApplicationKeyCreateRequest data(ApplicationKeyCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public ApplicationKeyCreateRequest data(ApplicationKeyCreateData data) { } /** - * Object used to create an application key. - * + *

Object used to create an application key.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApplicationKeyCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApplicationKeyCreateData getData() { + return data; + } public void setData(ApplicationKeyCreateData data) { this.data = data; } - /** Return true if this ApplicationKeyCreateRequest object is equal to o. */ + /** + * Return true if this ApplicationKeyCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, applicationKeyCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyRelationships.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyRelationships.java index f1082059439..492376602ed 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyRelationships.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Resources related to the application key. */ -@JsonPropertyOrder({ApplicationKeyRelationships.JSON_PROPERTY_OWNED_BY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Resources related to the application key.

+ */ +@JsonPropertyOrder({ + ApplicationKeyRelationships.JSON_PROPERTY_OWNED_BY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OWNED_BY = "owned_by"; private RelationshipToUser ownedBy; @@ -28,22 +50,23 @@ public ApplicationKeyRelationships ownedBy(RelationshipToUser ownedBy) { } /** - * Relationship to user. - * + *

Relationship to user.

* @return ownedBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OWNED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getOwnedBy() { - return ownedBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getOwnedBy() { + return ownedBy; + } public void setOwnedBy(RelationshipToUser ownedBy) { this.ownedBy = ownedBy; } - /** Return true if this ApplicationKeyRelationships object is equal to o. */ + /** + * Return true if this ApplicationKeyRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.ownedBy, applicationKeyRelationships.ownedBy); } + @Override public int hashCode() { return Objects.hash(ownedBy); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponse.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponse.java index 35e7ce0424c..f841254e5ca 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response for retrieving an application key. */ +/** + *

Response for retrieving an application key.

+ */ @JsonPropertyOrder({ ApplicationKeyResponse.JSON_PROPERTY_DATA, ApplicationKeyResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FullApplicationKey data; @@ -36,21 +54,19 @@ public ApplicationKeyResponse data(FullApplicationKey data) { } /** - * Datadog application key. - * + *

Datadog application key.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FullApplicationKey getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FullApplicationKey getData() { + return data; + } public void setData(FullApplicationKey data) { this.data = data; } - public ApplicationKeyResponse included(List included) { this.included = included; for (ApplicationKeyResponseIncludedItem item : included) { @@ -58,7 +74,6 @@ public ApplicationKeyResponse included(List } return this; } - public ApplicationKeyResponse addIncludedItem(ApplicationKeyResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -69,22 +84,23 @@ public ApplicationKeyResponse addIncludedItem(ApplicationKeyResponseIncludedItem } /** - * Array of objects related to the application key. - * + *

Array of objects related to the application key.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this ApplicationKeyResponse object is equal to o. */ + /** + * Return true if this ApplicationKeyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } ApplicationKeyResponse applicationKeyResponse = (ApplicationKeyResponse) o; - return Objects.equals(this.data, applicationKeyResponse.data) - && Objects.equals(this.included, applicationKeyResponse.included); + return Objects.equals(this.data, applicationKeyResponse.data) && Objects.equals(this.included, applicationKeyResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponseIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponseIncludedItem.java index 095573166e0..26785c4bae6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponseIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyResponseIncludedItem.java @@ -6,272 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = ApplicationKeyResponseIncludedItem.ApplicationKeyResponseIncludedItemDeserializer.class) -@JsonSerialize( - using = ApplicationKeyResponseIncludedItem.ApplicationKeyResponseIncludedItemSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = ApplicationKeyResponseIncludedItem.ApplicationKeyResponseIncludedItemDeserializer.class) +@JsonSerialize(using = ApplicationKeyResponseIncludedItem.ApplicationKeyResponseIncludedItemSerializer.class) public class ApplicationKeyResponseIncludedItem extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(ApplicationKeyResponseIncludedItem.class.getName()); + private static final Logger log = Logger.getLogger(ApplicationKeyResponseIncludedItem.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class ApplicationKeyResponseIncludedItemSerializer extends StdSerializer { + public ApplicationKeyResponseIncludedItemSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public ApplicationKeyResponseIncludedItemSerializer() { + this(null); + } - public static class ApplicationKeyResponseIncludedItemSerializer - extends StdSerializer { - public ApplicationKeyResponseIncludedItemSerializer( - Class t) { - super(t); + @Override + public void serialize(ApplicationKeyResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public ApplicationKeyResponseIncludedItemSerializer() { - this(null); + public static class ApplicationKeyResponseIncludedItemDeserializer extends StdDeserializer { + public ApplicationKeyResponseIncludedItemDeserializer() { + this(ApplicationKeyResponseIncludedItem.class); + } + + public ApplicationKeyResponseIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public ApplicationKeyResponseIncludedItem 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + // deserialize Role + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Role.class.equals(Integer.class) || Role.class.equals(Long.class) || Role.class.equals(Float.class) || Role.class.equals(Double.class) || Role.class.equals(Boolean.class) || Role.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Role.class.equals(Integer.class) || Role.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Role.class.equals(Float.class) || Role.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Role.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Role.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Role.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 (!((Role)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'Role'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Role'", e); + } + + ApplicationKeyResponseIncludedItem ret = new ApplicationKeyResponseIncludedItem(); + 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 ApplicationKeyResponseIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "ApplicationKeyResponseIncludedItem cannot be null"); + } } - @Override - public void serialize( - ApplicationKeyResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ApplicationKeyResponseIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public ApplicationKeyResponseIncludedItem(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ApplicationKeyResponseIncludedItem(Role o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class ApplicationKeyResponseIncludedItemDeserializer - extends StdDeserializer { - public ApplicationKeyResponseIncludedItemDeserializer() { - this(ApplicationKeyResponseIncludedItem.class); + static { + schemas.put("User", new GenericType() { + }); + schemas.put("Role", new GenericType() { + }); + JSON.registerDescendants(ApplicationKeyResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); } - public ApplicationKeyResponseIncludedItemDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return ApplicationKeyResponseIncludedItem.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User, Role + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public ApplicationKeyResponseIncludedItem 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 User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); + if (JSON.isInstanceOf(Role.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - // deserialize Role - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Role.class.equals(Integer.class) - || Role.class.equals(Long.class) - || Role.class.equals(Float.class) - || Role.class.equals(Double.class) - || Role.class.equals(Boolean.class) - || Role.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Role.class.equals(Integer.class) || Role.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Role.class.equals(Float.class) || Role.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Role.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (Role.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Role.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 (!((Role) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'Role'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Role'", e); - } - - ApplicationKeyResponseIncludedItem ret = new ApplicationKeyResponseIncludedItem(); - 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; + throw new RuntimeException("Invalid instance type. Must be User, Role"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * User, Role + * + * @return The actual instance (User, Role) + */ @Override - public ApplicationKeyResponseIncludedItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "ApplicationKeyResponseIncludedItem cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public ApplicationKeyResponseIncludedItem() { - super("oneOf", Boolean.FALSE); - } - - public ApplicationKeyResponseIncludedItem(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public ApplicationKeyResponseIncludedItem(Role o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - schemas.put("Role", new GenericType() {}); - JSON.registerDescendants( - ApplicationKeyResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return ApplicationKeyResponseIncludedItem.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User, Role - * - *

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(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Role.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `Role`. If the actual instance is not `Role`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Role` + * @throws ClassCastException if the instance is not `Role` + */ + public Role getRole() throws ClassCastException { + return (Role)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be User, Role"); - } - - /** - * Get the actual instance, which can be the following: User, Role - * - * @return The actual instance (User, Role) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } - - /** - * Get the actual instance of `Role`. If the actual instance is not `Role`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `Role` - * @throws ClassCastException if the instance is not `Role` - */ - public Role getRole() throws ClassCastException { - return (Role) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateAttributes.java index fc6ce5c0b72..72981957485 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateAttributes.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes used to update an application Key. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes used to update an application Key.

+ */ @JsonPropertyOrder({ ApplicationKeyUpdateAttributes.JSON_PROPERTY_NAME, ApplicationKeyUpdateAttributes.JSON_PROPERTY_SCOPES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -36,26 +53,23 @@ public ApplicationKeyUpdateAttributes name(String name) { } /** - * Name of the application key. - * + *

Name of the application key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ApplicationKeyUpdateAttributes scopes(List scopes) { this.scopes = JsonNullable.>of(scopes); return this; } - public ApplicationKeyUpdateAttributes addScopesItem(String scopesItem) { if (this.scopes == null || !this.scopes.isPresent()) { this.scopes = JsonNullable.>of(new ArrayList<>()); @@ -69,33 +83,30 @@ public ApplicationKeyUpdateAttributes addScopesItem(String scopesItem) { } /** - * Array of scopes to grant the application key. This feature is in private beta, please contact - * Datadog support to enable scopes for your application keys. - * + *

Array of scopes to grant the application key. This feature is in private beta, please contact Datadog support to enable scopes for your application keys.

* @return scopes - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getScopes() { - return scopes.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getScopes() { + return scopes.orElse(null); + } @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getScopes_JsonNullable() { return scopes; } - - @JsonProperty(JSON_PROPERTY_SCOPES) - public void setScopes_JsonNullable(JsonNullable> scopes) { + @JsonProperty(JSON_PROPERTY_SCOPES)public void setScopes_JsonNullable(JsonNullable> scopes) { this.scopes = scopes; } - public void setScopes(List scopes) { this.scopes = JsonNullable.>of(scopes); } - /** Return true if this ApplicationKeyUpdateAttributes object is equal to o. */ + /** + * Return true if this ApplicationKeyUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,15 +115,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ApplicationKeyUpdateAttributes applicationKeyUpdateAttributes = - (ApplicationKeyUpdateAttributes) o; - return Objects.equals(this.name, applicationKeyUpdateAttributes.name) - && Objects.equals(this.scopes, applicationKeyUpdateAttributes.scopes); + ApplicationKeyUpdateAttributes applicationKeyUpdateAttributes = (ApplicationKeyUpdateAttributes) o; + return Objects.equals(this.name, applicationKeyUpdateAttributes.name) && Objects.equals(this.scopes, applicationKeyUpdateAttributes.scopes); } + @Override public int hashCode() { - return Objects.hash(name, scopes); + return Objects.hash(name,scopes); } @Override @@ -126,7 +136,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateData.java index 9f0eee8616c..d353d1a07e1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object used to update an application key. */ +/** + *

Object used to update an application key.

+ */ @JsonPropertyOrder({ ApplicationKeyUpdateData.JSON_PROPERTY_ATTRIBUTES, ApplicationKeyUpdateData.JSON_PROPERTY_ID, ApplicationKeyUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ApplicationKeyUpdateAttributes attributes; @@ -36,17 +55,15 @@ public ApplicationKeyUpdateData() {} @JsonCreator public ApplicationKeyUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ApplicationKeyUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ApplicationKeysType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ApplicationKeyUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ApplicationKeysType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public ApplicationKeyUpdateData attributes(ApplicationKeyUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public ApplicationKeyUpdateData attributes(ApplicationKeyUpdateAttributes attrib } /** - * Attributes used to update an application Key. - * + *

Attributes used to update an application Key.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApplicationKeyUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApplicationKeyUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(ApplicationKeyUpdateAttributes attributes) { this.attributes = attributes; } - public ApplicationKeyUpdateData id(String id) { this.id = id; return this; } /** - * ID of the application key. - * + *

ID of the application key.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public ApplicationKeyUpdateData type(ApplicationKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public ApplicationKeyUpdateData type(ApplicationKeysType type) { } /** - * Application Keys resource type. - * + *

Application Keys resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApplicationKeysType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApplicationKeysType getType() { + return type; + } public void setType(ApplicationKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ApplicationKeyUpdateData object is equal to o. */ + /** + * Return true if this ApplicationKeyUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } ApplicationKeyUpdateData applicationKeyUpdateData = (ApplicationKeyUpdateData) o; - return Objects.equals(this.attributes, applicationKeyUpdateData.attributes) - && Objects.equals(this.id, applicationKeyUpdateData.id) - && Objects.equals(this.type, applicationKeyUpdateData.type); + return Objects.equals(this.attributes, applicationKeyUpdateData.attributes) && Objects.equals(this.id, applicationKeyUpdateData.id) && Objects.equals(this.type, applicationKeyUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateRequest.java index 6acb592d1d9..fc6141911f7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeyUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request used to update an application key. */ -@JsonPropertyOrder({ApplicationKeyUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request used to update an application key.

+ */ +@JsonPropertyOrder({ + ApplicationKeyUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ApplicationKeyUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ApplicationKeyUpdateData data; @@ -26,11 +47,10 @@ public ApplicationKeyUpdateRequest() {} @JsonCreator public ApplicationKeyUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ApplicationKeyUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ApplicationKeyUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ApplicationKeyUpdateRequest data(ApplicationKeyUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public ApplicationKeyUpdateRequest data(ApplicationKeyUpdateData data) { } /** - * Object used to update an application key. - * + *

Object used to update an application key.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApplicationKeyUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ApplicationKeyUpdateData getData() { + return data; + } public void setData(ApplicationKeyUpdateData data) { this.data = data; } - /** Return true if this ApplicationKeyUpdateRequest object is equal to o. */ + /** + * Return true if this ApplicationKeyUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, applicationKeyUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysSort.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysSort.java index 47e44471f45..f83242c8d6b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysSort.java @@ -6,35 +6,55 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sorting options */ +/** + *

Sorting options

+ */ @JsonSerialize(using = ApplicationKeysSort.ApplicationKeysSortSerializer.class) public class ApplicationKeysSort { - public static final ApplicationKeysSort CREATED_AT_ASCENDING = - new ApplicationKeysSort("created_at"); - public static final ApplicationKeysSort CREATED_AT_DESCENDING = - new ApplicationKeysSort("-created_at"); + public static final ApplicationKeysSort CREATED_AT_ASCENDING = new ApplicationKeysSort("created_at"); + public static final ApplicationKeysSort CREATED_AT_DESCENDING = new ApplicationKeysSort("-created_at"); public static final ApplicationKeysSort LAST4_ASCENDING = new ApplicationKeysSort("last4"); public static final ApplicationKeysSort LAST4_DESCENDING = new ApplicationKeysSort("-last4"); public static final ApplicationKeysSort NAME_ASCENDING = new ApplicationKeysSort("name"); public static final ApplicationKeysSort NAME_DESCENDING = new ApplicationKeysSort("-name"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("created_at", "-created_at", "last4", "-last4", "name", "-name")); + private static final Set allowedValues = new HashSet(Arrays.asList("created_at", "-created_at", "last4", "-last4", "name", "-name")); private String value; @@ -47,20 +67,18 @@ public boolean isValid() { } public static class ApplicationKeysSortSerializer extends StdSerializer { - public ApplicationKeysSortSerializer(Class t) { - super(t); - } - - public ApplicationKeysSortSerializer() { - this(null); - } - - @Override - public void serialize( - ApplicationKeysSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ApplicationKeysSortSerializer(Class t) { + super(t); + } + + public ApplicationKeysSortSerializer() { + this(null); + } + + @Override + public void serialize(ApplicationKeysSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -72,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ApplicationKeysSort object is equal to o. */ + /** + * Return true if this ApplicationKeysSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysType.java b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysType.java index 00ae62f4948..dd668252fd4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ApplicationKeysType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Application Keys resource type. */ +/** + *

Application Keys resource type.

+ */ @JsonSerialize(using = ApplicationKeysType.ApplicationKeysTypeSerializer.class) public class ApplicationKeysType { - public static final ApplicationKeysType APPLICATION_KEYS = - new ApplicationKeysType("application_keys"); + public static final ApplicationKeysType APPLICATION_KEYS = new ApplicationKeysType("application_keys"); - private static final Set allowedValues = - new HashSet(Arrays.asList("application_keys")); + private static final Set allowedValues = new HashSet(Arrays.asList("application_keys")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class ApplicationKeysTypeSerializer extends StdSerializer { - public ApplicationKeysTypeSerializer(Class t) { - super(t); - } - - public ApplicationKeysTypeSerializer() { - this(null); - } - - @Override - public void serialize( - ApplicationKeysType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ApplicationKeysTypeSerializer(Class t) { + super(t); + } + + public ApplicationKeysTypeSerializer() { + this(null); + } + + @Override + public void serialize(ApplicationKeysType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ApplicationKeysType object is equal to o. */ + /** + * Return true if this ApplicationKeysType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEvent.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEvent.java index 2570b441764..2dd54dff72a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEvent.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEvent.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object description of an Audit Logs event after it is processed and stored by Datadog. */ + +/** + *

Object description of an Audit Logs event after it is processed and stored by Datadog.

+ */ @JsonPropertyOrder({ AuditLogsEvent.JSON_PROPERTY_ATTRIBUTES, AuditLogsEvent.JSON_PROPERTY_ID, AuditLogsEvent.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsEvent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private AuditLogsEventAttributes attributes; @@ -38,42 +58,38 @@ public AuditLogsEvent attributes(AuditLogsEventAttributes attributes) { } /** - * JSON object containing all event attributes and their associated values. - * + *

JSON object containing all event attributes and their associated values.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsEventAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsEventAttributes getAttributes() { + return attributes; + } public void setAttributes(AuditLogsEventAttributes attributes) { this.attributes = attributes; } - public AuditLogsEvent id(String id) { this.id = id; return this; } /** - * Unique ID of the event. - * + *

Unique ID of the event.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public AuditLogsEvent type(AuditLogsEventType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public AuditLogsEvent type(AuditLogsEventType type) { } /** - * Type of the event. - * + *

Type of the event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsEventType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsEventType getType() { + return type; + } public void setType(AuditLogsEventType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this AuditLogsEvent object is equal to o. */ + /** + * Return true if this AuditLogsEvent object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } AuditLogsEvent auditLogsEvent = (AuditLogsEvent) o; - return Objects.equals(this.attributes, auditLogsEvent.attributes) - && Objects.equals(this.id, auditLogsEvent.id) - && Objects.equals(this.type, auditLogsEvent.type); + return Objects.equals(this.attributes, auditLogsEvent.attributes) && Objects.equals(this.id, auditLogsEvent.id) && Objects.equals(this.type, auditLogsEvent.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventAttributes.java index ee3d9b72f53..a9b61b03b88 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventAttributes.java @@ -6,30 +6,43 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** JSON object containing all event attributes and their associated values. */ +/** + *

JSON object containing all event attributes and their associated values.

+ */ @JsonPropertyOrder({ AuditLogsEventAttributes.JSON_PROPERTY_ATTRIBUTES, AuditLogsEventAttributes.JSON_PROPERTY_SERVICE, AuditLogsEventAttributes.JSON_PROPERTY_TAGS, AuditLogsEventAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsEventAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private Map attributes = null; @@ -40,7 +53,6 @@ public class AuditLogsEventAttributes { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -48,7 +60,6 @@ public AuditLogsEventAttributes attributes(Map attributes) { this.attributes = attributes; return this; } - public AuditLogsEventAttributes putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); @@ -58,48 +69,44 @@ public AuditLogsEventAttributes putAttributesItem(String key, Object attributesI } /** - * JSON object of attributes from Audit Logs events. - * + *

JSON object of attributes from Audit Logs events.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } public void setAttributes(Map attributes) { this.attributes = attributes; } - public AuditLogsEventAttributes service(String service) { this.service = service; return this; } /** - * Name of the application or service generating Audit Logs events. This name is used to correlate - * Audit Logs to APM, so make sure you specify the same value when you use both products. - * + *

Name of the application or service generating Audit Logs events. + * This name is used to correlate Audit Logs to APM, so make sure you specify the same + * value when you use both products.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public AuditLogsEventAttributes tags(List tags) { this.tags = tags; return this; } - public AuditLogsEventAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -109,43 +116,42 @@ public AuditLogsEventAttributes addTagsItem(String tagsItem) { } /** - * Array of tags associated with your event. - * + *

Array of tags associated with your event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public AuditLogsEventAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * Timestamp of your event. - * + *

Timestamp of your event.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this AuditLogsEventAttributes object is equal to o. */ + /** + * Return true if this AuditLogsEventAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,15 +161,13 @@ public boolean equals(Object o) { return false; } AuditLogsEventAttributes auditLogsEventAttributes = (AuditLogsEventAttributes) o; - return Objects.equals(this.attributes, auditLogsEventAttributes.attributes) - && Objects.equals(this.service, auditLogsEventAttributes.service) - && Objects.equals(this.tags, auditLogsEventAttributes.tags) - && Objects.equals(this.timestamp, auditLogsEventAttributes.timestamp); + return Objects.equals(this.attributes, auditLogsEventAttributes.attributes) && Objects.equals(this.service, auditLogsEventAttributes.service) && Objects.equals(this.tags, auditLogsEventAttributes.tags) && Objects.equals(this.timestamp, auditLogsEventAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, service, tags, timestamp); + return Objects.hash(attributes,service,tags,timestamp); } @Override @@ -179,7 +183,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventType.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventType.java index 54509df48ff..85ac5213b04 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventType.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event. */ +/** + *

Type of the event.

+ */ @JsonSerialize(using = AuditLogsEventType.AuditLogsEventTypeSerializer.class) public class AuditLogsEventType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class AuditLogsEventTypeSerializer extends StdSerializer { - public AuditLogsEventTypeSerializer(Class t) { - super(t); - } - - public AuditLogsEventTypeSerializer() { - this(null); - } - - @Override - public void serialize(AuditLogsEventType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public AuditLogsEventTypeSerializer(Class t) { + super(t); + } + + public AuditLogsEventTypeSerializer() { + this(null); + } + + @Override + public void serialize(AuditLogsEventType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AuditLogsEventType object is equal to o. */ + /** + * Return true if this AuditLogsEventType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventsResponse.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventsResponse.java index f7b7942c1a2..de75fc040be 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsEventsResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object with all events matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object with all events matching the request and pagination information.

+ */ @JsonPropertyOrder({ AuditLogsEventsResponse.JSON_PROPERTY_DATA, AuditLogsEventsResponse.JSON_PROPERTY_LINKS, AuditLogsEventsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsEventsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public AuditLogsEventsResponse data(List data) { } return this; } - public AuditLogsEventsResponse addDataItem(AuditLogsEvent dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public AuditLogsEventsResponse addDataItem(AuditLogsEvent dataItem) { } /** - * Array of events matching the request. - * + *

Array of events matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public AuditLogsEventsResponse links(AuditLogsResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -73,21 +88,19 @@ public AuditLogsEventsResponse links(AuditLogsResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsResponseLinks getLinks() { + return links; + } public void setLinks(AuditLogsResponseLinks links) { this.links = links; } - public AuditLogsEventsResponse meta(AuditLogsResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -95,22 +108,23 @@ public AuditLogsEventsResponse meta(AuditLogsResponseMetadata meta) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsResponseMetadata getMeta() { + return meta; + } public void setMeta(AuditLogsResponseMetadata meta) { this.meta = meta; } - /** Return true if this AuditLogsEventsResponse object is equal to o. */ + /** + * Return true if this AuditLogsEventsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } AuditLogsEventsResponse auditLogsEventsResponse = (AuditLogsEventsResponse) o; - return Objects.equals(this.data, auditLogsEventsResponse.data) - && Objects.equals(this.links, auditLogsEventsResponse.links) - && Objects.equals(this.meta, auditLogsEventsResponse.meta); + return Objects.equals(this.data, auditLogsEventsResponse.data) && Objects.equals(this.links, auditLogsEventsResponse.links) && Objects.equals(this.meta, auditLogsEventsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryFilter.java index 493237ca805..fd20581bb8c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryFilter.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Search and filter query settings. */ + +/** + *

Search and filter query settings.

+ */ @JsonPropertyOrder({ AuditLogsQueryFilter.JSON_PROPERTY_FROM, AuditLogsQueryFilter.JSON_PROPERTY_QUERY, AuditLogsQueryFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsQueryFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from = "now-15m"; @@ -37,66 +57,61 @@ public AuditLogsQueryFilter from(String from) { } /** - * Minimum time for the requested events. Supports date, math, and regular timestamps (in - * milliseconds). - * + *

Minimum time for the requested events. Supports date, math, and regular timestamps (in milliseconds).

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public AuditLogsQueryFilter query(String query) { this.query = query; return this; } /** - * Search query following the Audit Logs search syntax. - * + *

Search query following the Audit Logs search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public AuditLogsQueryFilter to(String to) { this.to = to; return this; } /** - * Maximum time for the requested events. Supports date, math, and regular timestamps (in - * milliseconds). - * + *

Maximum time for the requested events. Supports date, math, and regular timestamps (in milliseconds).

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this AuditLogsQueryFilter object is equal to o. */ + /** + * Return true if this AuditLogsQueryFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +121,13 @@ public boolean equals(Object o) { return false; } AuditLogsQueryFilter auditLogsQueryFilter = (AuditLogsQueryFilter) o; - return Objects.equals(this.from, auditLogsQueryFilter.from) - && Objects.equals(this.query, auditLogsQueryFilter.query) - && Objects.equals(this.to, auditLogsQueryFilter.to); + return Objects.equals(this.from, auditLogsQueryFilter.from) && Objects.equals(this.query, auditLogsQueryFilter.query) && Objects.equals(this.to, auditLogsQueryFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, query, to); + return Objects.hash(from,query,to); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryOptions.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryOptions.java index b48ed4f5a99..246c2bf62d1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryOptions.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Global query options that are used during the query. Note: Specify either timezone or time - * offset, not both. Otherwise, the query fails. + *

Global query options that are used during the query. + * Note: Specify either timezone or time offset, not both. Otherwise, the query fails.

*/ @JsonPropertyOrder({ AuditLogsQueryOptions.JSON_PROPERTY_TIME_OFFSET, AuditLogsQueryOptions.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsQueryOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME_OFFSET = "time_offset"; private Long timeOffset; @@ -36,44 +54,42 @@ public AuditLogsQueryOptions timeOffset(Long timeOffset) { } /** - * Time offset (in seconds) to apply to the query. - * + *

Time offset (in seconds) to apply to the query.

* @return timeOffset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeOffset() { - return timeOffset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeOffset() { + return timeOffset; + } public void setTimeOffset(Long timeOffset) { this.timeOffset = timeOffset; } - public AuditLogsQueryOptions timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone - * Database identifier (like America/New_York). - * + *

The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this AuditLogsQueryOptions object is equal to o. */ + /** + * Return true if this AuditLogsQueryOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +99,13 @@ public boolean equals(Object o) { return false; } AuditLogsQueryOptions auditLogsQueryOptions = (AuditLogsQueryOptions) o; - return Objects.equals(this.timeOffset, auditLogsQueryOptions.timeOffset) - && Objects.equals(this.timezone, auditLogsQueryOptions.timezone); + return Objects.equals(this.timeOffset, auditLogsQueryOptions.timeOffset) && Objects.equals(this.timezone, auditLogsQueryOptions.timezone); } + @Override public int hashCode() { - return Objects.hash(timeOffset, timezone); + return Objects.hash(timeOffset,timezone); } @Override @@ -103,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryPageOptions.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryPageOptions.java index dcb73277043..d6f35e85dd6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryPageOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsQueryPageOptions.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Paging attributes for listing events. */ + +/** + *

Paging attributes for listing events.

+ */ @JsonPropertyOrder({ AuditLogsQueryPageOptions.JSON_PROPERTY_CURSOR, AuditLogsQueryPageOptions.JSON_PROPERTY_LIMIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsQueryPageOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -33,43 +53,43 @@ public AuditLogsQueryPageOptions cursor(String cursor) { } /** - * List following results with a cursor provided in the previous query. - * + *

List following results with a cursor provided in the previous query.

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - public AuditLogsQueryPageOptions limit(Integer limit) { this.limit = limit; return this; } /** - * Maximum number of events in the response. maximum: 1000 - * + *

Maximum number of events in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - /** Return true if this AuditLogsQueryPageOptions object is equal to o. */ + /** + * Return true if this AuditLogsQueryPageOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +99,13 @@ public boolean equals(Object o) { return false; } AuditLogsQueryPageOptions auditLogsQueryPageOptions = (AuditLogsQueryPageOptions) o; - return Objects.equals(this.cursor, auditLogsQueryPageOptions.cursor) - && Objects.equals(this.limit, auditLogsQueryPageOptions.limit); + return Objects.equals(this.cursor, auditLogsQueryPageOptions.cursor) && Objects.equals(this.limit, auditLogsQueryPageOptions.limit); } + @Override public int hashCode() { - return Objects.hash(cursor, limit); + return Objects.hash(cursor,limit); } @Override @@ -99,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseLinks.java index aeecd971b76..26af311a650 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseLinks.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Links attributes. */ -@JsonPropertyOrder({AuditLogsResponseLinks.JSON_PROPERTY_NEXT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Links attributes.

+ */ +@JsonPropertyOrder({ + AuditLogsResponseLinks.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT = "next"; private String next; @@ -27,23 +49,24 @@ public AuditLogsResponseLinks next(String next) { } /** - * Link for the next set of results. Note that the request can also be made using the POST - * endpoint. - * + *

Link for the next set of results. Note that the request can also be made using the + * POST endpoint.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - /** Return true if this AuditLogsResponseLinks object is equal to o. */ + /** + * Return true if this AuditLogsResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.next, auditLogsResponseLinks.next); } + @Override public int hashCode() { return Objects.hash(next); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseMetadata.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseMetadata.java index f53b56bd55e..657acb47d97 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseMetadata.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The metadata associated with a request. */ +/** + *

The metadata associated with a request.

+ */ @JsonPropertyOrder({ AuditLogsResponseMetadata.JSON_PROPERTY_ELAPSED, AuditLogsResponseMetadata.JSON_PROPERTY_PAGE, @@ -22,10 +40,10 @@ AuditLogsResponseMetadata.JSON_PROPERTY_STATUS, AuditLogsResponseMetadata.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ELAPSED = "elapsed"; private Long elapsed; @@ -47,21 +65,19 @@ public AuditLogsResponseMetadata elapsed(Long elapsed) { } /** - * Time elapsed in milliseconds. - * + *

Time elapsed in milliseconds.

* @return elapsed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsed() { - return elapsed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsed() { + return elapsed; + } public void setElapsed(Long elapsed) { this.elapsed = elapsed; } - public AuditLogsResponseMetadata page(AuditLogsResponsePage page) { this.page = page; this.unparsed |= page.unparsed; @@ -69,42 +85,38 @@ public AuditLogsResponseMetadata page(AuditLogsResponsePage page) { } /** - * Paging attributes. - * + *

Paging attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsResponsePage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsResponsePage getPage() { + return page; + } public void setPage(AuditLogsResponsePage page) { this.page = page; } - public AuditLogsResponseMetadata requestId(String requestId) { this.requestId = requestId; return this; } /** - * The identifier of the request. - * + *

The identifier of the request.

* @return requestId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } public void setRequestId(String requestId) { this.requestId = requestId; } - public AuditLogsResponseMetadata status(AuditLogsResponseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -112,24 +124,22 @@ public AuditLogsResponseMetadata status(AuditLogsResponseStatus status) { } /** - * The status of the response. - * + *

The status of the response.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsResponseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsResponseStatus getStatus() { + return status; + } public void setStatus(AuditLogsResponseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public AuditLogsResponseMetadata warnings(List warnings) { this.warnings = warnings; for (AuditLogsWarning item : warnings) { @@ -137,7 +147,6 @@ public AuditLogsResponseMetadata warnings(List warnings) { } return this; } - public AuditLogsResponseMetadata addWarningsItem(AuditLogsWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -148,23 +157,24 @@ public AuditLogsResponseMetadata addWarningsItem(AuditLogsWarning warningsItem) } /** - * A list of warnings (non-fatal errors) encountered. Partial results may return if warnings are - * present in the response. - * + *

A list of warnings (non-fatal errors) encountered. Partial results may return if + * warnings are present in the response.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this AuditLogsResponseMetadata object is equal to o. */ + /** + * Return true if this AuditLogsResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -174,16 +184,13 @@ public boolean equals(Object o) { return false; } AuditLogsResponseMetadata auditLogsResponseMetadata = (AuditLogsResponseMetadata) o; - return Objects.equals(this.elapsed, auditLogsResponseMetadata.elapsed) - && Objects.equals(this.page, auditLogsResponseMetadata.page) - && Objects.equals(this.requestId, auditLogsResponseMetadata.requestId) - && Objects.equals(this.status, auditLogsResponseMetadata.status) - && Objects.equals(this.warnings, auditLogsResponseMetadata.warnings); + return Objects.equals(this.elapsed, auditLogsResponseMetadata.elapsed) && Objects.equals(this.page, auditLogsResponseMetadata.page) && Objects.equals(this.requestId, auditLogsResponseMetadata.requestId) && Objects.equals(this.status, auditLogsResponseMetadata.status) && Objects.equals(this.warnings, auditLogsResponseMetadata.warnings); } + @Override public int hashCode() { - return Objects.hash(elapsed, page, requestId, status, warnings); + return Objects.hash(elapsed,page,requestId,status,warnings); } @Override @@ -200,7 +207,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponsePage.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponsePage.java index ac605063e28..70e9ba2842e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponsePage.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponsePage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Paging attributes. */ -@JsonPropertyOrder({AuditLogsResponsePage.JSON_PROPERTY_AFTER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Paging attributes.

+ */ +@JsonPropertyOrder({ + AuditLogsResponsePage.JSON_PROPERTY_AFTER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsResponsePage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -27,23 +49,23 @@ public AuditLogsResponsePage after(String after) { } /** - * The cursor to use to get the next results, if any. To make the next request, use the same - * parameters with the addition of page[cursor]. - * + *

The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - /** Return true if this AuditLogsResponsePage object is equal to o. */ + /** + * Return true if this AuditLogsResponsePage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.after, auditLogsResponsePage.after); } + @Override public int hashCode() { return Objects.hash(after); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseStatus.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseStatus.java index 64b6efb92a0..e783478ef51 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsResponseStatus.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The status of the response. */ +/** + *

The status of the response.

+ */ @JsonSerialize(using = AuditLogsResponseStatus.AuditLogsResponseStatusSerializer.class) public class AuditLogsResponseStatus { public static final AuditLogsResponseStatus DONE = new AuditLogsResponseStatus("done"); public static final AuditLogsResponseStatus TIMEOUT = new AuditLogsResponseStatus("timeout"); - private static final Set allowedValues = - new HashSet(Arrays.asList("done", "timeout")); + private static final Set allowedValues = new HashSet(Arrays.asList("done", "timeout")); private String value; @@ -39,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class AuditLogsResponseStatusSerializer - extends StdSerializer { - public AuditLogsResponseStatusSerializer(Class t) { - super(t); - } + public static class AuditLogsResponseStatusSerializer extends StdSerializer { + public AuditLogsResponseStatusSerializer(Class t) { + super(t); + } - public AuditLogsResponseStatusSerializer() { - this(null); - } + public AuditLogsResponseStatusSerializer() { + this(null); + } - @Override - public void serialize( - AuditLogsResponseStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(AuditLogsResponseStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AuditLogsResponseStatus object is equal to o. */ + /** + * Return true if this AuditLogsResponseStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsSearchEventsRequest.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsSearchEventsRequest.java index bddbf5d1a8c..97a20f807ff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsSearchEventsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsSearchEventsRequest.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The request for a Audit Logs events list. */ + +/** + *

The request for a Audit Logs events list.

+ */ @JsonPropertyOrder({ AuditLogsSearchEventsRequest.JSON_PROPERTY_FILTER, AuditLogsSearchEventsRequest.JSON_PROPERTY_OPTIONS, AuditLogsSearchEventsRequest.JSON_PROPERTY_PAGE, AuditLogsSearchEventsRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsSearchEventsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private AuditLogsQueryFilter filter; @@ -42,21 +62,19 @@ public AuditLogsSearchEventsRequest filter(AuditLogsQueryFilter filter) { } /** - * Search and filter query settings. - * + *

Search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsQueryFilter getFilter() { + return filter; + } public void setFilter(AuditLogsQueryFilter filter) { this.filter = filter; } - public AuditLogsSearchEventsRequest options(AuditLogsQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -64,22 +82,20 @@ public AuditLogsSearchEventsRequest options(AuditLogsQueryOptions options) { } /** - * Global query options that are used during the query. Note: Specify either timezone or time - * offset, not both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Note: Specify either timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsQueryOptions getOptions() { + return options; + } public void setOptions(AuditLogsQueryOptions options) { this.options = options; } - public AuditLogsSearchEventsRequest page(AuditLogsQueryPageOptions page) { this.page = page; this.unparsed |= page.unparsed; @@ -87,21 +103,19 @@ public AuditLogsSearchEventsRequest page(AuditLogsQueryPageOptions page) { } /** - * Paging attributes for listing events. - * + *

Paging attributes for listing events.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsQueryPageOptions getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsQueryPageOptions getPage() { + return page; + } public void setPage(AuditLogsQueryPageOptions page) { this.page = page; } - public AuditLogsSearchEventsRequest sort(AuditLogsSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -109,25 +123,26 @@ public AuditLogsSearchEventsRequest sort(AuditLogsSort sort) { } /** - * Sort parameters when querying events. - * + *

Sort parameters when querying events.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuditLogsSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuditLogsSort getSort() { + return sort; + } public void setSort(AuditLogsSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this AuditLogsSearchEventsRequest object is equal to o. */ + /** + * Return true if this AuditLogsSearchEventsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +152,13 @@ public boolean equals(Object o) { return false; } AuditLogsSearchEventsRequest auditLogsSearchEventsRequest = (AuditLogsSearchEventsRequest) o; - return Objects.equals(this.filter, auditLogsSearchEventsRequest.filter) - && Objects.equals(this.options, auditLogsSearchEventsRequest.options) - && Objects.equals(this.page, auditLogsSearchEventsRequest.page) - && Objects.equals(this.sort, auditLogsSearchEventsRequest.sort); + return Objects.equals(this.filter, auditLogsSearchEventsRequest.filter) && Objects.equals(this.options, auditLogsSearchEventsRequest.options) && Objects.equals(this.page, auditLogsSearchEventsRequest.page) && Objects.equals(this.sort, auditLogsSearchEventsRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, options, page, sort); + return Objects.hash(filter,options,page,sort); } @Override @@ -161,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsSort.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsSort.java index 34e1efd0c9b..d43aef3c05a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sort parameters when querying events. */ +/** + *

Sort parameters when querying events.

+ */ @JsonSerialize(using = AuditLogsSort.AuditLogsSortSerializer.class) public class AuditLogsSort { public static final AuditLogsSort TIMESTAMP_ASCENDING = new AuditLogsSort("timestamp"); public static final AuditLogsSort TIMESTAMP_DESCENDING = new AuditLogsSort("-timestamp"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timestamp", "-timestamp")); + private static final Set allowedValues = new HashSet(Arrays.asList("timestamp", "-timestamp")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class AuditLogsSortSerializer extends StdSerializer { - public AuditLogsSortSerializer(Class t) { - super(t); - } - - public AuditLogsSortSerializer() { - this(null); - } - - @Override - public void serialize(AuditLogsSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public AuditLogsSortSerializer(Class t) { + super(t); + } + + public AuditLogsSortSerializer() { + this(null); + } + + @Override + public void serialize(AuditLogsSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AuditLogsSort object is equal to o. */ + /** + * Return true if this AuditLogsSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/AuditLogsWarning.java b/src/main/java/com/datadog/api/client/v2/model/AuditLogsWarning.java index d28cde45cb3..273d151786b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuditLogsWarning.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuditLogsWarning.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Warning message indicating something that went wrong with the query. */ + +/** + *

Warning message indicating something that went wrong with the query.

+ */ @JsonPropertyOrder({ AuditLogsWarning.JSON_PROPERTY_CODE, AuditLogsWarning.JSON_PROPERTY_DETAIL, AuditLogsWarning.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuditLogsWarning { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -37,64 +57,61 @@ public AuditLogsWarning code(String code) { } /** - * Unique code for this type of warning. - * + *

Unique code for this type of warning.

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public AuditLogsWarning detail(String detail) { this.detail = detail; return this; } /** - * Detailed explanation of this specific warning. - * + *

Detailed explanation of this specific warning.

* @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } public void setDetail(String detail) { this.detail = detail; } - public AuditLogsWarning title(String title) { this.title = title; return this; } /** - * Short human-readable summary of the warning. - * + *

Short human-readable summary of the warning.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this AuditLogsWarning object is equal to o. */ + /** + * Return true if this AuditLogsWarning object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } AuditLogsWarning auditLogsWarning = (AuditLogsWarning) o; - return Objects.equals(this.code, auditLogsWarning.code) - && Objects.equals(this.detail, auditLogsWarning.detail) - && Objects.equals(this.title, auditLogsWarning.title); + return Objects.equals(this.code, auditLogsWarning.code) && Objects.equals(this.detail, auditLogsWarning.detail) && Objects.equals(this.title, auditLogsWarning.title); } + @Override public int hashCode() { - return Objects.hash(code, detail, title); + return Objects.hash(code,detail,title); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMapping.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMapping.java index 08d7eecf1c7..23a94f26abb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMapping.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMapping.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The AuthN Mapping object returned by API. */ +/** + *

The AuthN Mapping object returned by API.

+ */ @JsonPropertyOrder({ AuthNMapping.JSON_PROPERTY_ATTRIBUTES, AuthNMapping.JSON_PROPERTY_ID, AuthNMapping.JSON_PROPERTY_RELATIONSHIPS, AuthNMapping.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMapping { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private AuthNMappingAttributes attributes; @@ -40,13 +59,12 @@ public AuthNMapping() {} @JsonCreator public AuthNMapping( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AuthNMappingsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)AuthNMappingsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public AuthNMapping attributes(AuthNMappingAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,41 +72,37 @@ public AuthNMapping attributes(AuthNMappingAttributes attributes) { } /** - * Attributes of AuthN Mapping. - * + *

Attributes of AuthN Mapping.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMappingAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMappingAttributes getAttributes() { + return attributes; + } public void setAttributes(AuthNMappingAttributes attributes) { this.attributes = attributes; } - public AuthNMapping id(String id) { this.id = id; return this; } /** - * ID of the AuthN Mapping. - * + *

ID of the AuthN Mapping.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public AuthNMapping relationships(AuthNMappingRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -96,21 +110,19 @@ public AuthNMapping relationships(AuthNMappingRelationships relationships) { } /** - * All relationships associated with AuthN Mapping. - * + *

All relationships associated with AuthN Mapping.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMappingRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMappingRelationships getRelationships() { + return relationships; + } public void setRelationships(AuthNMappingRelationships relationships) { this.relationships = relationships; } - public AuthNMapping type(AuthNMappingsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -118,24 +130,25 @@ public AuthNMapping type(AuthNMappingsType type) { } /** - * AuthN Mappings resource type. - * + *

AuthN Mappings resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AuthNMappingsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AuthNMappingsType getType() { + return type; + } public void setType(AuthNMappingsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this AuthNMapping object is equal to o. */ + /** + * Return true if this AuthNMapping object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +158,13 @@ public boolean equals(Object o) { return false; } AuthNMapping authNMapping = (AuthNMapping) o; - return Objects.equals(this.attributes, authNMapping.attributes) - && Objects.equals(this.id, authNMapping.id) - && Objects.equals(this.relationships, authNMapping.relationships) - && Objects.equals(this.type, authNMapping.type); + return Objects.equals(this.attributes, authNMapping.attributes) && Objects.equals(this.id, authNMapping.id) && Objects.equals(this.relationships, authNMapping.relationships) && Objects.equals(this.type, authNMapping.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -169,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingAttributes.java index 18f63203136..5ffb8da0208 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes of AuthN Mapping. */ + +/** + *

Attributes of AuthN Mapping.

+ */ @JsonPropertyOrder({ AuthNMappingAttributes.JSON_PROPERTY_ATTRIBUTE_KEY, AuthNMappingAttributes.JSON_PROPERTY_ATTRIBUTE_VALUE, @@ -23,10 +40,10 @@ AuthNMappingAttributes.JSON_PROPERTY_MODIFIED_AT, AuthNMappingAttributes.JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTE_KEY = "attribute_key"; private String attributeKey; @@ -34,17 +51,14 @@ public class AuthNMappingAttributes { private String attributeValue; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; - public static final String JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE_ID = - "saml_assertion_attribute_id"; + public static final String JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE_ID = "saml_assertion_attribute_id"; private String samlAssertionAttributeId; public AuthNMappingAttributes attributeKey(String attributeKey) { @@ -53,88 +67,85 @@ public AuthNMappingAttributes attributeKey(String attributeKey) { } /** - * Key portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Key portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeKey() { - return attributeKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeKey() { + return attributeKey; + } public void setAttributeKey(String attributeKey) { this.attributeKey = attributeKey; } - public AuthNMappingAttributes attributeValue(String attributeValue) { this.attributeValue = attributeValue; return this; } /** - * Value portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Value portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeValue() { - return attributeValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeValue() { + return attributeValue; + } public void setAttributeValue(String attributeValue) { this.attributeValue = attributeValue; } /** - * Creation time of the AuthN Mapping. - * + *

Creation time of the AuthN Mapping.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } /** - * Time of last AuthN Mapping modification. - * + *

Time of last AuthN Mapping modification.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public AuthNMappingAttributes samlAssertionAttributeId(String samlAssertionAttributeId) { this.samlAssertionAttributeId = samlAssertionAttributeId; return this; } /** - * The ID of the SAML assertion attribute. - * + *

The ID of the SAML assertion attribute.

* @return samlAssertionAttributeId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSamlAssertionAttributeId() { - return samlAssertionAttributeId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSamlAssertionAttributeId() { + return samlAssertionAttributeId; + } public void setSamlAssertionAttributeId(String samlAssertionAttributeId) { this.samlAssertionAttributeId = samlAssertionAttributeId; } - /** Return true if this AuthNMappingAttributes object is equal to o. */ + /** + * Return true if this AuthNMappingAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -144,18 +155,13 @@ public boolean equals(Object o) { return false; } AuthNMappingAttributes authNMappingAttributes = (AuthNMappingAttributes) o; - return Objects.equals(this.attributeKey, authNMappingAttributes.attributeKey) - && Objects.equals(this.attributeValue, authNMappingAttributes.attributeValue) - && Objects.equals(this.createdAt, authNMappingAttributes.createdAt) - && Objects.equals(this.modifiedAt, authNMappingAttributes.modifiedAt) - && Objects.equals( - this.samlAssertionAttributeId, authNMappingAttributes.samlAssertionAttributeId); + return Objects.equals(this.attributeKey, authNMappingAttributes.attributeKey) && Objects.equals(this.attributeValue, authNMappingAttributes.attributeValue) && Objects.equals(this.createdAt, authNMappingAttributes.createdAt) && Objects.equals(this.modifiedAt, authNMappingAttributes.modifiedAt) && Objects.equals(this.samlAssertionAttributeId, authNMappingAttributes.samlAssertionAttributeId); } + @Override public int hashCode() { - return Objects.hash( - attributeKey, attributeValue, createdAt, modifiedAt, samlAssertionAttributeId); + return Objects.hash(attributeKey,attributeValue,createdAt,modifiedAt,samlAssertionAttributeId); } @Override @@ -166,15 +172,14 @@ public String toString() { sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); - sb.append(" samlAssertionAttributeId: ") - .append(toIndentedString(samlAssertionAttributeId)) - .append("\n"); + sb.append(" samlAssertionAttributeId: ").append(toIndentedString(samlAssertionAttributeId)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateAttributes.java index 0feef297068..4307af7b42e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Key/Value pair of attributes used for create request. */ + +/** + *

Key/Value pair of attributes used for create request.

+ */ @JsonPropertyOrder({ AuthNMappingCreateAttributes.JSON_PROPERTY_ATTRIBUTE_KEY, AuthNMappingCreateAttributes.JSON_PROPERTY_ATTRIBUTE_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTE_KEY = "attribute_key"; private String attributeKey; @@ -33,43 +53,42 @@ public AuthNMappingCreateAttributes attributeKey(String attributeKey) { } /** - * Key portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Key portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeKey() { - return attributeKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeKey() { + return attributeKey; + } public void setAttributeKey(String attributeKey) { this.attributeKey = attributeKey; } - public AuthNMappingCreateAttributes attributeValue(String attributeValue) { this.attributeValue = attributeValue; return this; } /** - * Value portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Value portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeValue() { - return attributeValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeValue() { + return attributeValue; + } public void setAttributeValue(String attributeValue) { this.attributeValue = attributeValue; } - /** Return true if this AuthNMappingCreateAttributes object is equal to o. */ + /** + * Return true if this AuthNMappingCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } AuthNMappingCreateAttributes authNMappingCreateAttributes = (AuthNMappingCreateAttributes) o; - return Objects.equals(this.attributeKey, authNMappingCreateAttributes.attributeKey) - && Objects.equals(this.attributeValue, authNMappingCreateAttributes.attributeValue); + return Objects.equals(this.attributeKey, authNMappingCreateAttributes.attributeKey) && Objects.equals(this.attributeValue, authNMappingCreateAttributes.attributeValue); } + @Override public int hashCode() { - return Objects.hash(attributeKey, attributeValue); + return Objects.hash(attributeKey,attributeValue); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateData.java index c06c616404a..79b1a11e78c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data for creating an AuthN Mapping. */ + +/** + *

Data for creating an AuthN Mapping.

+ */ @JsonPropertyOrder({ AuthNMappingCreateData.JSON_PROPERTY_ATTRIBUTES, AuthNMappingCreateData.JSON_PROPERTY_RELATIONSHIPS, AuthNMappingCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private AuthNMappingCreateAttributes attributes; @@ -36,11 +55,10 @@ public AuthNMappingCreateData() {} @JsonCreator public AuthNMappingCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AuthNMappingsType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)AuthNMappingsType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public AuthNMappingCreateData attributes(AuthNMappingCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,21 +66,19 @@ public AuthNMappingCreateData attributes(AuthNMappingCreateAttributes attributes } /** - * Key/Value pair of attributes used for create request. - * + *

Key/Value pair of attributes used for create request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMappingCreateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMappingCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(AuthNMappingCreateAttributes attributes) { this.attributes = attributes; } - public AuthNMappingCreateData relationships(AuthNMappingCreateRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -70,21 +86,19 @@ public AuthNMappingCreateData relationships(AuthNMappingCreateRelationships rela } /** - * Relationship of AuthN Mapping create object to Role. - * + *

Relationship of AuthN Mapping create object to Role.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMappingCreateRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMappingCreateRelationships getRelationships() { + return relationships; + } public void setRelationships(AuthNMappingCreateRelationships relationships) { this.relationships = relationships; } - public AuthNMappingCreateData type(AuthNMappingsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +106,25 @@ public AuthNMappingCreateData type(AuthNMappingsType type) { } /** - * AuthN Mappings resource type. - * + *

AuthN Mappings resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AuthNMappingsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AuthNMappingsType getType() { + return type; + } public void setType(AuthNMappingsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this AuthNMappingCreateData object is equal to o. */ + /** + * Return true if this AuthNMappingCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } AuthNMappingCreateData authNMappingCreateData = (AuthNMappingCreateData) o; - return Objects.equals(this.attributes, authNMappingCreateData.attributes) - && Objects.equals(this.relationships, authNMappingCreateData.relationships) - && Objects.equals(this.type, authNMappingCreateData.type); + return Objects.equals(this.attributes, authNMappingCreateData.attributes) && Objects.equals(this.relationships, authNMappingCreateData.relationships) && Objects.equals(this.type, authNMappingCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRelationships.java index 0f311ce467f..191ca62feb3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRelationships.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationship of AuthN Mapping create object to Role. */ -@JsonPropertyOrder({AuthNMappingCreateRelationships.JSON_PROPERTY_ROLE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationship of AuthN Mapping create object to Role.

+ */ +@JsonPropertyOrder({ + AuthNMappingCreateRelationships.JSON_PROPERTY_ROLE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingCreateRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ROLE = "role"; private RelationshipToRole role; @@ -28,22 +50,23 @@ public AuthNMappingCreateRelationships role(RelationshipToRole role) { } /** - * Relationship to role. - * + *

Relationship to role.

* @return role - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToRole getRole() { - return role; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRole getRole() { + return role; + } public void setRole(RelationshipToRole role) { this.role = role; } - /** Return true if this AuthNMappingCreateRelationships object is equal to o. */ + /** + * Return true if this AuthNMappingCreateRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AuthNMappingCreateRelationships authNMappingCreateRelationships = - (AuthNMappingCreateRelationships) o; + AuthNMappingCreateRelationships authNMappingCreateRelationships = (AuthNMappingCreateRelationships) o; return Objects.equals(this.role, authNMappingCreateRelationships.role); } + @Override public int hashCode() { return Objects.hash(role); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRequest.java index a67c13eb1cc..7baa0b8cb96 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request for creating an AuthN Mapping. */ -@JsonPropertyOrder({AuthNMappingCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request for creating an AuthN Mapping.

+ */ +@JsonPropertyOrder({ + AuthNMappingCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private AuthNMappingCreateData data; @@ -26,11 +47,10 @@ public AuthNMappingCreateRequest() {} @JsonCreator public AuthNMappingCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AuthNMappingCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)AuthNMappingCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public AuthNMappingCreateRequest data(AuthNMappingCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public AuthNMappingCreateRequest data(AuthNMappingCreateData data) { } /** - * Data for creating an AuthN Mapping. - * + *

Data for creating an AuthN Mapping.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AuthNMappingCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AuthNMappingCreateData getData() { + return data; + } public void setData(AuthNMappingCreateData data) { this.data = data; } - /** Return true if this AuthNMappingCreateRequest object is equal to o. */ + /** + * Return true if this AuthNMappingCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, authNMappingCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingIncluded.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingIncluded.java index ca09a785677..56d6d2e7b68 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingIncluded.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingIncluded.java @@ -6,269 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = AuthNMappingIncluded.AuthNMappingIncludedDeserializer.class) @JsonSerialize(using = AuthNMappingIncluded.AuthNMappingIncludedSerializer.class) public class AuthNMappingIncluded extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(AuthNMappingIncluded.class.getName()); + private static final Logger log = Logger.getLogger(AuthNMappingIncluded.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class AuthNMappingIncludedSerializer extends StdSerializer { + public AuthNMappingIncludedSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public AuthNMappingIncludedSerializer() { + this(null); + } - public static class AuthNMappingIncludedSerializer extends StdSerializer { - public AuthNMappingIncludedSerializer(Class t) { - super(t); + @Override + public void serialize(AuthNMappingIncluded value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public AuthNMappingIncludedSerializer() { - this(null); + public static class AuthNMappingIncludedDeserializer extends StdDeserializer { + public AuthNMappingIncludedDeserializer() { + this(AuthNMappingIncluded.class); + } + + public AuthNMappingIncludedDeserializer(Class vc) { + super(vc); + } + + @Override + public AuthNMappingIncluded 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 SAMLAssertionAttribute + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SAMLAssertionAttribute.class.equals(Integer.class) || SAMLAssertionAttribute.class.equals(Long.class) || SAMLAssertionAttribute.class.equals(Float.class) || SAMLAssertionAttribute.class.equals(Double.class) || SAMLAssertionAttribute.class.equals(Boolean.class) || SAMLAssertionAttribute.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SAMLAssertionAttribute.class.equals(Integer.class) || SAMLAssertionAttribute.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SAMLAssertionAttribute.class.equals(Float.class) || SAMLAssertionAttribute.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SAMLAssertionAttribute.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SAMLAssertionAttribute.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SAMLAssertionAttribute.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 (!((SAMLAssertionAttribute)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SAMLAssertionAttribute'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SAMLAssertionAttribute'", e); + } + + // deserialize Role + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Role.class.equals(Integer.class) || Role.class.equals(Long.class) || Role.class.equals(Float.class) || Role.class.equals(Double.class) || Role.class.equals(Boolean.class) || Role.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Role.class.equals(Integer.class) || Role.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Role.class.equals(Float.class) || Role.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Role.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Role.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Role.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 (!((Role)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'Role'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Role'", e); + } + + AuthNMappingIncluded ret = new AuthNMappingIncluded(); + 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 AuthNMappingIncluded getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "AuthNMappingIncluded cannot be null"); + } } - @Override - public void serialize( - AuthNMappingIncluded value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public AuthNMappingIncluded() { + super("oneOf", Boolean.FALSE); + } + public AuthNMappingIncluded(SAMLAssertionAttribute o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AuthNMappingIncluded(Role o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class AuthNMappingIncludedDeserializer - extends StdDeserializer { - public AuthNMappingIncludedDeserializer() { - this(AuthNMappingIncluded.class); + static { + schemas.put("SAMLAssertionAttribute", new GenericType() { + }); + schemas.put("Role", new GenericType() { + }); + JSON.registerDescendants(AuthNMappingIncluded.class, Collections.unmodifiableMap(schemas)); } - public AuthNMappingIncludedDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return AuthNMappingIncluded.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SAMLAssertionAttribute, Role + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public AuthNMappingIncluded 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 SAMLAssertionAttribute - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SAMLAssertionAttribute.class.equals(Integer.class) - || SAMLAssertionAttribute.class.equals(Long.class) - || SAMLAssertionAttribute.class.equals(Float.class) - || SAMLAssertionAttribute.class.equals(Double.class) - || SAMLAssertionAttribute.class.equals(Boolean.class) - || SAMLAssertionAttribute.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SAMLAssertionAttribute.class.equals(Integer.class) - || SAMLAssertionAttribute.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SAMLAssertionAttribute.class.equals(Float.class) - || SAMLAssertionAttribute.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SAMLAssertionAttribute.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SAMLAssertionAttribute.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SAMLAssertionAttribute.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SAMLAssertionAttribute.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 (!((SAMLAssertionAttribute) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SAMLAssertionAttribute'"); + if (JSON.isInstanceOf(Role.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'SAMLAssertionAttribute'", e); - } - // deserialize Role - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Role.class.equals(Integer.class) - || Role.class.equals(Long.class) - || Role.class.equals(Float.class) - || Role.class.equals(Double.class) - || Role.class.equals(Boolean.class) - || Role.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Role.class.equals(Integer.class) || Role.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Role.class.equals(Float.class) || Role.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Role.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (Role.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Role.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 (!((Role) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'Role'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Role'", e); - } - - AuthNMappingIncluded ret = new AuthNMappingIncluded(); - 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; + throw new RuntimeException("Invalid instance type. Must be SAMLAssertionAttribute, Role"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SAMLAssertionAttribute, Role + * + * @return The actual instance (SAMLAssertionAttribute, Role) + */ @Override - public AuthNMappingIncluded getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AuthNMappingIncluded cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public AuthNMappingIncluded() { - super("oneOf", Boolean.FALSE); - } - - public AuthNMappingIncluded(SAMLAssertionAttribute o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public AuthNMappingIncluded(Role o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("SAMLAssertionAttribute", new GenericType() {}); - schemas.put("Role", new GenericType() {}); - JSON.registerDescendants(AuthNMappingIncluded.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return AuthNMappingIncluded.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SAMLAssertionAttribute, Role - * - *

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(SAMLAssertionAttribute.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Role.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SAMLAssertionAttribute`. If the actual instance is not `SAMLAssertionAttribute`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SAMLAssertionAttribute` + * @throws ClassCastException if the instance is not `SAMLAssertionAttribute` + */ + public SAMLAssertionAttribute getSAMLAssertionAttribute() throws ClassCastException { + return (SAMLAssertionAttribute)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `Role`. If the actual instance is not `Role`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Role` + * @throws ClassCastException if the instance is not `Role` + */ + public Role getRole() throws ClassCastException { + return (Role)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be SAMLAssertionAttribute, Role"); - } - - /** - * Get the actual instance, which can be the following: SAMLAssertionAttribute, Role - * - * @return The actual instance (SAMLAssertionAttribute, Role) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SAMLAssertionAttribute`. If the actual instance is not - * `SAMLAssertionAttribute`, the ClassCastException will be thrown. - * - * @return The actual instance of `SAMLAssertionAttribute` - * @throws ClassCastException if the instance is not `SAMLAssertionAttribute` - */ - public SAMLAssertionAttribute getSAMLAssertionAttribute() throws ClassCastException { - return (SAMLAssertionAttribute) super.getActualInstance(); - } - - /** - * Get the actual instance of `Role`. If the actual instance is not `Role`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `Role` - * @throws ClassCastException if the instance is not `Role` - */ - public Role getRole() throws ClassCastException { - return (Role) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingRelationships.java index ef40a84ab70..bd92e134303 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingRelationships.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** All relationships associated with AuthN Mapping. */ + +/** + *

All relationships associated with AuthN Mapping.

+ */ @JsonPropertyOrder({ AuthNMappingRelationships.JSON_PROPERTY_ROLE, AuthNMappingRelationships.JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ROLE = "role"; private RelationshipToRole role; @@ -34,46 +54,43 @@ public AuthNMappingRelationships role(RelationshipToRole role) { } /** - * Relationship to role. - * + *

Relationship to role.

* @return role - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToRole getRole() { - return role; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRole getRole() { + return role; + } public void setRole(RelationshipToRole role) { this.role = role; } - - public AuthNMappingRelationships samlAssertionAttribute( - RelationshipToSAMLAssertionAttribute samlAssertionAttribute) { + public AuthNMappingRelationships samlAssertionAttribute(RelationshipToSAMLAssertionAttribute samlAssertionAttribute) { this.samlAssertionAttribute = samlAssertionAttribute; this.unparsed |= samlAssertionAttribute.unparsed; return this; } /** - * AuthN Mapping relationship to SAML Assertion Attribute. - * + *

AuthN Mapping relationship to SAML Assertion Attribute.

* @return samlAssertionAttribute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToSAMLAssertionAttribute getSamlAssertionAttribute() { - return samlAssertionAttribute; - } - - public void setSamlAssertionAttribute( - RelationshipToSAMLAssertionAttribute samlAssertionAttribute) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAML_ASSERTION_ATTRIBUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToSAMLAssertionAttribute getSamlAssertionAttribute() { + return samlAssertionAttribute; + } + public void setSamlAssertionAttribute(RelationshipToSAMLAssertionAttribute samlAssertionAttribute) { this.samlAssertionAttribute = samlAssertionAttribute; } - /** Return true if this AuthNMappingRelationships object is equal to o. */ + /** + * Return true if this AuthNMappingRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,14 +100,13 @@ public boolean equals(Object o) { return false; } AuthNMappingRelationships authNMappingRelationships = (AuthNMappingRelationships) o; - return Objects.equals(this.role, authNMappingRelationships.role) - && Objects.equals( - this.samlAssertionAttribute, authNMappingRelationships.samlAssertionAttribute); + return Objects.equals(this.role, authNMappingRelationships.role) && Objects.equals(this.samlAssertionAttribute, authNMappingRelationships.samlAssertionAttribute); } + @Override public int hashCode() { - return Objects.hash(role, samlAssertionAttribute); + return Objects.hash(role,samlAssertionAttribute); } @Override @@ -98,15 +114,14 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AuthNMappingRelationships {\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" samlAssertionAttribute: ") - .append(toIndentedString(samlAssertionAttribute)) - .append("\n"); + sb.append(" samlAssertionAttribute: ").append(toIndentedString(samlAssertionAttribute)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingResponse.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingResponse.java index 5fffd068535..8bcdb84536e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** AuthN Mapping response from the API. */ +/** + *

AuthN Mapping response from the API.

+ */ @JsonPropertyOrder({ AuthNMappingResponse.JSON_PROPERTY_DATA, AuthNMappingResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private AuthNMapping data; @@ -36,21 +54,19 @@ public AuthNMappingResponse data(AuthNMapping data) { } /** - * The AuthN Mapping object returned by API. - * + *

The AuthN Mapping object returned by API.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMapping getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMapping getData() { + return data; + } public void setData(AuthNMapping data) { this.data = data; } - public AuthNMappingResponse included(List included) { this.included = included; for (AuthNMappingIncluded item : included) { @@ -58,7 +74,6 @@ public AuthNMappingResponse included(List included) { } return this; } - public AuthNMappingResponse addIncludedItem(AuthNMappingIncluded includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -69,22 +84,23 @@ public AuthNMappingResponse addIncludedItem(AuthNMappingIncluded includedItem) { } /** - * Included data in the AuthN Mapping response. - * + *

Included data in the AuthN Mapping response.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this AuthNMappingResponse object is equal to o. */ + /** + * Return true if this AuthNMappingResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } AuthNMappingResponse authNMappingResponse = (AuthNMappingResponse) o; - return Objects.equals(this.data, authNMappingResponse.data) - && Objects.equals(this.included, authNMappingResponse.included); + return Objects.equals(this.data, authNMappingResponse.data) && Objects.equals(this.included, authNMappingResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateAttributes.java index 12e102e217b..86eb069eabe 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Key/Value pair of attributes used for update request. */ + +/** + *

Key/Value pair of attributes used for update request.

+ */ @JsonPropertyOrder({ AuthNMappingUpdateAttributes.JSON_PROPERTY_ATTRIBUTE_KEY, AuthNMappingUpdateAttributes.JSON_PROPERTY_ATTRIBUTE_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTE_KEY = "attribute_key"; private String attributeKey; @@ -33,43 +53,42 @@ public AuthNMappingUpdateAttributes attributeKey(String attributeKey) { } /** - * Key portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Key portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeKey() { - return attributeKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeKey() { + return attributeKey; + } public void setAttributeKey(String attributeKey) { this.attributeKey = attributeKey; } - public AuthNMappingUpdateAttributes attributeValue(String attributeValue) { this.attributeValue = attributeValue; return this; } /** - * Value portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Value portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeValue() { - return attributeValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeValue() { + return attributeValue; + } public void setAttributeValue(String attributeValue) { this.attributeValue = attributeValue; } - /** Return true if this AuthNMappingUpdateAttributes object is equal to o. */ + /** + * Return true if this AuthNMappingUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } AuthNMappingUpdateAttributes authNMappingUpdateAttributes = (AuthNMappingUpdateAttributes) o; - return Objects.equals(this.attributeKey, authNMappingUpdateAttributes.attributeKey) - && Objects.equals(this.attributeValue, authNMappingUpdateAttributes.attributeValue); + return Objects.equals(this.attributeKey, authNMappingUpdateAttributes.attributeKey) && Objects.equals(this.attributeValue, authNMappingUpdateAttributes.attributeValue); } + @Override public int hashCode() { - return Objects.hash(attributeKey, attributeValue); + return Objects.hash(attributeKey,attributeValue); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateData.java index 7c5c9045108..49a6183c794 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Data for updating an AuthN Mapping. */ +/** + *

Data for updating an AuthN Mapping.

+ */ @JsonPropertyOrder({ AuthNMappingUpdateData.JSON_PROPERTY_ATTRIBUTES, AuthNMappingUpdateData.JSON_PROPERTY_ID, AuthNMappingUpdateData.JSON_PROPERTY_RELATIONSHIPS, AuthNMappingUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private AuthNMappingUpdateAttributes attributes; @@ -40,13 +59,12 @@ public AuthNMappingUpdateData() {} @JsonCreator public AuthNMappingUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AuthNMappingsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)AuthNMappingsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public AuthNMappingUpdateData attributes(AuthNMappingUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,41 +72,37 @@ public AuthNMappingUpdateData attributes(AuthNMappingUpdateAttributes attributes } /** - * Key/Value pair of attributes used for update request. - * + *

Key/Value pair of attributes used for update request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMappingUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMappingUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(AuthNMappingUpdateAttributes attributes) { this.attributes = attributes; } - public AuthNMappingUpdateData id(String id) { this.id = id; return this; } /** - * ID of the AuthN Mapping. - * + *

ID of the AuthN Mapping.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public AuthNMappingUpdateData relationships(AuthNMappingUpdateRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -96,21 +110,19 @@ public AuthNMappingUpdateData relationships(AuthNMappingUpdateRelationships rela } /** - * Relationship of AuthN Mapping update object to Role. - * + *

Relationship of AuthN Mapping update object to Role.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AuthNMappingUpdateRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public AuthNMappingUpdateRelationships getRelationships() { + return relationships; + } public void setRelationships(AuthNMappingUpdateRelationships relationships) { this.relationships = relationships; } - public AuthNMappingUpdateData type(AuthNMappingsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -118,24 +130,25 @@ public AuthNMappingUpdateData type(AuthNMappingsType type) { } /** - * AuthN Mappings resource type. - * + *

AuthN Mappings resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AuthNMappingsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AuthNMappingsType getType() { + return type; + } public void setType(AuthNMappingsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this AuthNMappingUpdateData object is equal to o. */ + /** + * Return true if this AuthNMappingUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +158,13 @@ public boolean equals(Object o) { return false; } AuthNMappingUpdateData authNMappingUpdateData = (AuthNMappingUpdateData) o; - return Objects.equals(this.attributes, authNMappingUpdateData.attributes) - && Objects.equals(this.id, authNMappingUpdateData.id) - && Objects.equals(this.relationships, authNMappingUpdateData.relationships) - && Objects.equals(this.type, authNMappingUpdateData.type); + return Objects.equals(this.attributes, authNMappingUpdateData.attributes) && Objects.equals(this.id, authNMappingUpdateData.id) && Objects.equals(this.relationships, authNMappingUpdateData.relationships) && Objects.equals(this.type, authNMappingUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -169,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRelationships.java index ece4cc4e5ed..41aad067999 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRelationships.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationship of AuthN Mapping update object to Role. */ -@JsonPropertyOrder({AuthNMappingUpdateRelationships.JSON_PROPERTY_ROLE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationship of AuthN Mapping update object to Role.

+ */ +@JsonPropertyOrder({ + AuthNMappingUpdateRelationships.JSON_PROPERTY_ROLE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingUpdateRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ROLE = "role"; private RelationshipToRole role; @@ -28,22 +50,23 @@ public AuthNMappingUpdateRelationships role(RelationshipToRole role) { } /** - * Relationship to role. - * + *

Relationship to role.

* @return role - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToRole getRole() { - return role; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRole getRole() { + return role; + } public void setRole(RelationshipToRole role) { this.role = role; } - /** Return true if this AuthNMappingUpdateRelationships object is equal to o. */ + /** + * Return true if this AuthNMappingUpdateRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AuthNMappingUpdateRelationships authNMappingUpdateRelationships = - (AuthNMappingUpdateRelationships) o; + AuthNMappingUpdateRelationships authNMappingUpdateRelationships = (AuthNMappingUpdateRelationships) o; return Objects.equals(this.role, authNMappingUpdateRelationships.role); } + @Override public int hashCode() { return Objects.hash(role); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRequest.java index 160be390b58..490972033e1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request to update an AuthN Mapping. */ -@JsonPropertyOrder({AuthNMappingUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request to update an AuthN Mapping.

+ */ +@JsonPropertyOrder({ + AuthNMappingUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private AuthNMappingUpdateData data; @@ -26,11 +47,10 @@ public AuthNMappingUpdateRequest() {} @JsonCreator public AuthNMappingUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AuthNMappingUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)AuthNMappingUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public AuthNMappingUpdateRequest data(AuthNMappingUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public AuthNMappingUpdateRequest data(AuthNMappingUpdateData data) { } /** - * Data for updating an AuthN Mapping. - * + *

Data for updating an AuthN Mapping.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AuthNMappingUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public AuthNMappingUpdateData getData() { + return data; + } public void setData(AuthNMappingUpdateData data) { this.data = data; } - /** Return true if this AuthNMappingUpdateRequest object is equal to o. */ + /** + * Return true if this AuthNMappingUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, authNMappingUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsResponse.java index d0ba0b06836..d597b6b690b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Array of AuthN Mappings response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Array of AuthN Mappings response.

+ */ @JsonPropertyOrder({ AuthNMappingsResponse.JSON_PROPERTY_DATA, AuthNMappingsResponse.JSON_PROPERTY_INCLUDED, AuthNMappingsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class AuthNMappingsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public AuthNMappingsResponse data(List data) { } return this; } - public AuthNMappingsResponse addDataItem(AuthNMapping dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public AuthNMappingsResponse addDataItem(AuthNMapping dataItem) { } /** - * Array of returned AuthN Mappings. - * + *

Array of returned AuthN Mappings.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public AuthNMappingsResponse included(List included) { this.included = included; for (AuthNMappingIncluded item : included) { @@ -73,7 +88,6 @@ public AuthNMappingsResponse included(List included) { } return this; } - public AuthNMappingsResponse addIncludedItem(AuthNMappingIncluded includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -84,21 +98,19 @@ public AuthNMappingsResponse addIncludedItem(AuthNMappingIncluded includedItem) } /** - * Included data in the AuthN Mapping response. - * + *

Included data in the AuthN Mapping response.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - public AuthNMappingsResponse meta(ResponseMetaAttributes meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -106,22 +118,23 @@ public AuthNMappingsResponse meta(ResponseMetaAttributes meta) { } /** - * Object describing meta attributes of response. - * + *

Object describing meta attributes of response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ResponseMetaAttributes getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ResponseMetaAttributes getMeta() { + return meta; + } public void setMeta(ResponseMetaAttributes meta) { this.meta = meta; } - /** Return true if this AuthNMappingsResponse object is equal to o. */ + /** + * Return true if this AuthNMappingsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -131,14 +144,13 @@ public boolean equals(Object o) { return false; } AuthNMappingsResponse authNMappingsResponse = (AuthNMappingsResponse) o; - return Objects.equals(this.data, authNMappingsResponse.data) - && Objects.equals(this.included, authNMappingsResponse.included) - && Objects.equals(this.meta, authNMappingsResponse.meta); + return Objects.equals(this.data, authNMappingsResponse.data) && Objects.equals(this.included, authNMappingsResponse.included) && Objects.equals(this.meta, authNMappingsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, included, meta); + return Objects.hash(data,included,meta); } @Override @@ -153,7 +165,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsSort.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsSort.java index e33369396ee..b52a2c1076a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsSort.java @@ -6,58 +6,61 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sorting options for AuthN Mappings. */ +/** + *

Sorting options for AuthN Mappings.

+ */ @JsonSerialize(using = AuthNMappingsSort.AuthNMappingsSortSerializer.class) public class AuthNMappingsSort { public static final AuthNMappingsSort CREATED_AT_ASCENDING = new AuthNMappingsSort("created_at"); - public static final AuthNMappingsSort CREATED_AT_DESCENDING = - new AuthNMappingsSort("-created_at"); + public static final AuthNMappingsSort CREATED_AT_DESCENDING = new AuthNMappingsSort("-created_at"); public static final AuthNMappingsSort ROLE_ID_ASCENDING = new AuthNMappingsSort("role_id"); public static final AuthNMappingsSort ROLE_ID_DESCENDING = new AuthNMappingsSort("-role_id"); - public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_ID_ASCENDING = - new AuthNMappingsSort("saml_assertion_attribute_id"); - public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_ID_DESCENDING = - new AuthNMappingsSort("-saml_assertion_attribute_id"); + public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_ID_ASCENDING = new AuthNMappingsSort("saml_assertion_attribute_id"); + public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_ID_DESCENDING = new AuthNMappingsSort("-saml_assertion_attribute_id"); public static final AuthNMappingsSort ROLE_NAME_ASCENDING = new AuthNMappingsSort("role.name"); public static final AuthNMappingsSort ROLE_NAME_DESCENDING = new AuthNMappingsSort("-role.name"); - public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_KEY_ASCENDING = - new AuthNMappingsSort("saml_assertion_attribute.attribute_key"); - public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_KEY_DESCENDING = - new AuthNMappingsSort("-saml_assertion_attribute.attribute_key"); - public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_VALUE_ASCENDING = - new AuthNMappingsSort("saml_assertion_attribute.attribute_value"); - public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_VALUE_DESCENDING = - new AuthNMappingsSort("-saml_assertion_attribute.attribute_value"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "created_at", - "-created_at", - "role_id", - "-role_id", - "saml_assertion_attribute_id", - "-saml_assertion_attribute_id", - "role.name", - "-role.name", - "saml_assertion_attribute.attribute_key", - "-saml_assertion_attribute.attribute_key", - "saml_assertion_attribute.attribute_value", - "-saml_assertion_attribute.attribute_value")); + public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_KEY_ASCENDING = new AuthNMappingsSort("saml_assertion_attribute.attribute_key"); + public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_KEY_DESCENDING = new AuthNMappingsSort("-saml_assertion_attribute.attribute_key"); + public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_VALUE_ASCENDING = new AuthNMappingsSort("saml_assertion_attribute.attribute_value"); + public static final AuthNMappingsSort SAML_ASSERTION_ATTRIBUTE_VALUE_DESCENDING = new AuthNMappingsSort("-saml_assertion_attribute.attribute_value"); + + private static final Set allowedValues = new HashSet(Arrays.asList("created_at", "-created_at", "role_id", "-role_id", "saml_assertion_attribute_id", "-saml_assertion_attribute_id", "role.name", "-role.name", "saml_assertion_attribute.attribute_key", "-saml_assertion_attribute.attribute_key", "saml_assertion_attribute.attribute_value", "-saml_assertion_attribute.attribute_value")); private String value; @@ -70,19 +73,18 @@ public boolean isValid() { } public static class AuthNMappingsSortSerializer extends StdSerializer { - public AuthNMappingsSortSerializer(Class t) { - super(t); - } - - public AuthNMappingsSortSerializer() { - this(null); - } - - @Override - public void serialize(AuthNMappingsSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public AuthNMappingsSortSerializer(Class t) { + super(t); + } + + public AuthNMappingsSortSerializer() { + this(null); + } + + @Override + public void serialize(AuthNMappingsSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -94,7 +96,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AuthNMappingsSort object is equal to o. */ + /** + * Return true if this AuthNMappingsSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -108,7 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsType.java b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsType.java index 05e8887cf29..80998a5a1fa 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsType.java +++ b/src/main/java/com/datadog/api/client/v2/model/AuthNMappingsType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** AuthN Mappings resource type. */ +/** + *

AuthN Mappings resource type.

+ */ @JsonSerialize(using = AuthNMappingsType.AuthNMappingsTypeSerializer.class) public class AuthNMappingsType { public static final AuthNMappingsType AUTHN_MAPPINGS = new AuthNMappingsType("authn_mappings"); - private static final Set allowedValues = - new HashSet(Arrays.asList("authn_mappings")); + private static final Set allowedValues = new HashSet(Arrays.asList("authn_mappings")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class AuthNMappingsTypeSerializer extends StdSerializer { - public AuthNMappingsTypeSerializer(Class t) { - super(t); - } - - public AuthNMappingsTypeSerializer() { - this(null); - } - - @Override - public void serialize(AuthNMappingsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public AuthNMappingsTypeSerializer(Class t) { + super(t); + } + + public AuthNMappingsTypeSerializer() { + this(null); + } + + @Override + public void serialize(AuthNMappingsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this AuthNMappingsType object is equal to o. */ + /** + * Return true if this AuthNMappingsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValue.java b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValue.java index a4e13ba21b3..abc06f5e41e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValue.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValue.java @@ -6,341 +6,309 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = CIAppAggregateBucketValue.CIAppAggregateBucketValueDeserializer.class) @JsonSerialize(using = CIAppAggregateBucketValue.CIAppAggregateBucketValueSerializer.class) public class CIAppAggregateBucketValue extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CIAppAggregateBucketValue.class.getName()); - - @JsonIgnore public boolean unparsed = false; + private static final Logger log = Logger.getLogger(CIAppAggregateBucketValue.class.getName()); - public static class CIAppAggregateBucketValueSerializer - extends StdSerializer { - public CIAppAggregateBucketValueSerializer(Class t) { - super(t); - } + @JsonIgnore + public boolean unparsed = false; - public CIAppAggregateBucketValueSerializer() { - this(null); - } - - @Override - public void serialize( - CIAppAggregateBucketValue value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class CIAppAggregateBucketValueSerializer extends StdSerializer { + public CIAppAggregateBucketValueSerializer(Class t) { + super(t); + } - public static class CIAppAggregateBucketValueDeserializer - extends StdDeserializer { - public CIAppAggregateBucketValueDeserializer() { - this(CIAppAggregateBucketValue.class); - } + public CIAppAggregateBucketValueSerializer() { + this(null); + } - public CIAppAggregateBucketValueDeserializer(Class vc) { - super(vc); + @Override + public void serialize(CIAppAggregateBucketValue value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public CIAppAggregateBucketValue 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 String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class CIAppAggregateBucketValueDeserializer extends StdDeserializer { + public CIAppAggregateBucketValueDeserializer() { + this(CIAppAggregateBucketValue.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + public CIAppAggregateBucketValueDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public CIAppAggregateBucketValue 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 String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + // deserialize CIAppAggregateBucketValueTimeseries + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CIAppAggregateBucketValueTimeseries.class.equals(Integer.class) || CIAppAggregateBucketValueTimeseries.class.equals(Long.class) || CIAppAggregateBucketValueTimeseries.class.equals(Float.class) || CIAppAggregateBucketValueTimeseries.class.equals(Double.class) || CIAppAggregateBucketValueTimeseries.class.equals(Boolean.class) || CIAppAggregateBucketValueTimeseries.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CIAppAggregateBucketValueTimeseries.class.equals(Integer.class) || CIAppAggregateBucketValueTimeseries.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CIAppAggregateBucketValueTimeseries.class.equals(Float.class) || CIAppAggregateBucketValueTimeseries.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (CIAppAggregateBucketValueTimeseries.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CIAppAggregateBucketValueTimeseries.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(CIAppAggregateBucketValueTimeseries.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 (!((CIAppAggregateBucketValueTimeseries)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'CIAppAggregateBucketValueTimeseries'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CIAppAggregateBucketValueTimeseries'", e); + } + + CIAppAggregateBucketValue ret = new CIAppAggregateBucketValue(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CIAppAggregateBucketValue getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CIAppAggregateBucketValue cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } + } - // deserialize CIAppAggregateBucketValueTimeseries - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CIAppAggregateBucketValueTimeseries.class.equals(Integer.class) - || CIAppAggregateBucketValueTimeseries.class.equals(Long.class) - || CIAppAggregateBucketValueTimeseries.class.equals(Float.class) - || CIAppAggregateBucketValueTimeseries.class.equals(Double.class) - || CIAppAggregateBucketValueTimeseries.class.equals(Boolean.class) - || CIAppAggregateBucketValueTimeseries.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CIAppAggregateBucketValueTimeseries.class.equals(Integer.class) - || CIAppAggregateBucketValueTimeseries.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CIAppAggregateBucketValueTimeseries.class.equals(Float.class) - || CIAppAggregateBucketValueTimeseries.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (CIAppAggregateBucketValueTimeseries.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CIAppAggregateBucketValueTimeseries.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(CIAppAggregateBucketValueTimeseries.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 (!((CIAppAggregateBucketValueTimeseries) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'CIAppAggregateBucketValueTimeseries'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'CIAppAggregateBucketValueTimeseries'", - e); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - CIAppAggregateBucketValue ret = new CIAppAggregateBucketValue(); - 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; + public CIAppAggregateBucketValue() { + super("oneOf", Boolean.FALSE); } - - /** Handle deserialization of the 'null' value. */ - @Override - public CIAppAggregateBucketValue getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "CIAppAggregateBucketValue cannot be null"); + public CIAppAggregateBucketValue(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CIAppAggregateBucketValue(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CIAppAggregateBucketValue(CIAppAggregateBucketValueTimeseries o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public CIAppAggregateBucketValue() { - super("oneOf", Boolean.FALSE); - } - - public CIAppAggregateBucketValue(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CIAppAggregateBucketValue(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public CIAppAggregateBucketValue(CIAppAggregateBucketValueTimeseries o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + schemas.put("CIAppAggregateBucketValueTimeseries", new GenericType() { + }); + JSON.registerDescendants(CIAppAggregateBucketValue.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - schemas.put( - "CIAppAggregateBucketValueTimeseries", - new GenericType() {}); - JSON.registerDescendants(CIAppAggregateBucketValue.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return CIAppAggregateBucketValue.schemas; + } - @Override - public Map getSchemas() { - return CIAppAggregateBucketValue.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * String, Double, CIAppAggregateBucketValueTimeseries + * + * 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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(CIAppAggregateBucketValueTimeseries.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Double, CIAppAggregateBucketValueTimeseries - * - *

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(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - CIAppAggregateBucketValueTimeseries.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 String, Double, CIAppAggregateBucketValueTimeseries"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * String, Double, CIAppAggregateBucketValueTimeseries + * + * @return The actual instance (String, Double, CIAppAggregateBucketValueTimeseries) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be String, Double, CIAppAggregateBucketValueTimeseries"); - } - /** - * Get the actual instance, which can be the following: String, Double, - * CIAppAggregateBucketValueTimeseries - * - * @return The actual instance (String, Double, CIAppAggregateBucketValueTimeseries) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } - /** - * Get the actual instance of `CIAppAggregateBucketValueTimeseries`. If the actual instance is not - * `CIAppAggregateBucketValueTimeseries`, the ClassCastException will be thrown. - * - * @return The actual instance of `CIAppAggregateBucketValueTimeseries` - * @throws ClassCastException if the instance is not `CIAppAggregateBucketValueTimeseries` - */ - public CIAppAggregateBucketValueTimeseries getCIAppAggregateBucketValueTimeseries() - throws ClassCastException { - return (CIAppAggregateBucketValueTimeseries) super.getActualInstance(); - } + /** + * Get the actual instance of `CIAppAggregateBucketValueTimeseries`. If the actual instance is not `CIAppAggregateBucketValueTimeseries`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CIAppAggregateBucketValueTimeseries` + * @throws ClassCastException if the instance is not `CIAppAggregateBucketValueTimeseries` + */ + public CIAppAggregateBucketValueTimeseries getCIAppAggregateBucketValueTimeseries() throws ClassCastException { + return (CIAppAggregateBucketValueTimeseries)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseries.java b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseries.java index 295929b73d6..5805af5aa37 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseries.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseries.java @@ -6,20 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A timeseries array. */ -@JsonPropertyOrder({}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CIAppAggregateBucketValueTimeseries - extends ArrayList { - @JsonIgnore public boolean unparsed = false; - /** Return true if this CIAppAggregateBucketValueTimeseries object is equal to o. */ +/** + *

A timeseries array.

+ */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CIAppAggregateBucketValueTimeseries extends ArrayList { + @JsonIgnore + public boolean unparsed = false; + + /** + * Return true if this CIAppAggregateBucketValueTimeseries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -31,6 +54,7 @@ public boolean equals(Object o) { return super.equals(o); } + @Override public int hashCode() { return Objects.hash(super.hashCode()); @@ -46,7 +70,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseriesPoint.java b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseriesPoint.java index 046f3eb7565..13c73982556 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseriesPoint.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateBucketValueTimeseriesPoint.java @@ -6,26 +6,42 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** A timeseries point. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A timeseries point.

+ */ @JsonPropertyOrder({ CIAppAggregateBucketValueTimeseriesPoint.JSON_PROPERTY_TIME, CIAppAggregateBucketValueTimeseriesPoint.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppAggregateBucketValueTimeseriesPoint { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME = "time"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime time; @@ -38,43 +54,42 @@ public CIAppAggregateBucketValueTimeseriesPoint time(OffsetDateTime time) { } /** - * The time value for this point. - * + *

The time value for this point.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTime() { + return time; + } public void setTime(OffsetDateTime time) { this.time = time; } - public CIAppAggregateBucketValueTimeseriesPoint value(Double value) { this.value = value; return this; } /** - * The value for this point. - * + *

The value for this point.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this CIAppAggregateBucketValueTimeseriesPoint object is equal to o. */ + /** + * Return true if this CIAppAggregateBucketValueTimeseriesPoint object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,15 +98,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppAggregateBucketValueTimeseriesPoint ciAppAggregateBucketValueTimeseriesPoint = - (CIAppAggregateBucketValueTimeseriesPoint) o; - return Objects.equals(this.time, ciAppAggregateBucketValueTimeseriesPoint.time) - && Objects.equals(this.value, ciAppAggregateBucketValueTimeseriesPoint.value); + CIAppAggregateBucketValueTimeseriesPoint ciAppAggregateBucketValueTimeseriesPoint = (CIAppAggregateBucketValueTimeseriesPoint) o; + return Objects.equals(this.time, ciAppAggregateBucketValueTimeseriesPoint.time) && Objects.equals(this.value, ciAppAggregateBucketValueTimeseriesPoint.value); } + @Override public int hashCode() { - return Objects.hash(time, value); + return Objects.hash(time,value); } @Override @@ -105,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSort.java b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSort.java index 4f4d2f32f39..2f9dc82772a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSort.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A sort rule. */ + +/** + *

A sort rule.

+ */ @JsonPropertyOrder({ CIAppAggregateSort.JSON_PROPERTY_AGGREGATION, CIAppAggregateSort.JSON_PROPERTY_METRIC, CIAppAggregateSort.JSON_PROPERTY_ORDER, CIAppAggregateSort.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppAggregateSort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private CIAppAggregationFunction aggregation; @@ -42,45 +62,41 @@ public CIAppAggregateSort aggregation(CIAppAggregationFunction aggregation) { } /** - * An aggregation function. - * + *

An aggregation function.

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppAggregationFunction getAggregation() { - return aggregation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppAggregationFunction getAggregation() { + return aggregation; + } public void setAggregation(CIAppAggregationFunction aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public CIAppAggregateSort metric(String metric) { this.metric = metric; return this; } /** - * The metric to sort by (only used for type=measure). - * + *

The metric to sort by (only used for type=measure).

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public CIAppAggregateSort order(CIAppSortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -88,24 +104,22 @@ public CIAppAggregateSort order(CIAppSortOrder order) { } /** - * The order to use, ascending or descending. - * + *

The order to use, ascending or descending.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppSortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppSortOrder getOrder() { + return order; + } public void setOrder(CIAppSortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - public CIAppAggregateSort type(CIAppAggregateSortType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -113,25 +127,26 @@ public CIAppAggregateSort type(CIAppAggregateSortType type) { } /** - * The type of sorting algorithm. - * + *

The type of sorting algorithm.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppAggregateSortType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppAggregateSortType getType() { + return type; + } public void setType(CIAppAggregateSortType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CIAppAggregateSort object is equal to o. */ + /** + * Return true if this CIAppAggregateSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -141,15 +156,13 @@ public boolean equals(Object o) { return false; } CIAppAggregateSort ciAppAggregateSort = (CIAppAggregateSort) o; - return Objects.equals(this.aggregation, ciAppAggregateSort.aggregation) - && Objects.equals(this.metric, ciAppAggregateSort.metric) - && Objects.equals(this.order, ciAppAggregateSort.order) - && Objects.equals(this.type, ciAppAggregateSort.type); + return Objects.equals(this.aggregation, ciAppAggregateSort.aggregation) && Objects.equals(this.metric, ciAppAggregateSort.metric) && Objects.equals(this.order, ciAppAggregateSort.order) && Objects.equals(this.type, ciAppAggregateSort.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, metric, order, type); + return Objects.hash(aggregation,metric,order,type); } @Override @@ -165,7 +178,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSortType.java b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSortType.java index 75b39d4bb9b..cde1ebce321 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSortType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregateSortType.java @@ -6,29 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of sorting algorithm. */ +/** + *

The type of sorting algorithm.

+ */ @JsonSerialize(using = CIAppAggregateSortType.CIAppAggregateSortTypeSerializer.class) public class CIAppAggregateSortType { - public static final CIAppAggregateSortType ALPHABETICAL = - new CIAppAggregateSortType("alphabetical"); + public static final CIAppAggregateSortType ALPHABETICAL = new CIAppAggregateSortType("alphabetical"); public static final CIAppAggregateSortType MEASURE = new CIAppAggregateSortType("measure"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alphabetical", "measure")); + private static final Set allowedValues = new HashSet(Arrays.asList("alphabetical", "measure")); private String value; @@ -40,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class CIAppAggregateSortTypeSerializer - extends StdSerializer { - public CIAppAggregateSortTypeSerializer(Class t) { - super(t); - } + public static class CIAppAggregateSortTypeSerializer extends StdSerializer { + public CIAppAggregateSortTypeSerializer(Class t) { + super(t); + } - public CIAppAggregateSortTypeSerializer() { - this(null); - } + public CIAppAggregateSortTypeSerializer() { + this(null); + } - @Override - public void serialize( - CIAppAggregateSortType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CIAppAggregateSortType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppAggregateSortType object is equal to o. */ + /** + * Return true if this CIAppAggregateSortType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregationFunction.java b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregationFunction.java index 27299ba323a..7f192d147da 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppAggregationFunction.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppAggregationFunction.java @@ -6,26 +6,49 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** An aggregation function. */ +/** + *

An aggregation function.

+ */ @JsonSerialize(using = CIAppAggregationFunction.CIAppAggregationFunctionSerializer.class) public class CIAppAggregationFunction { public static final CIAppAggregationFunction COUNT = new CIAppAggregationFunction("count"); - public static final CIAppAggregationFunction CARDINALITY = - new CIAppAggregationFunction("cardinality"); + public static final CIAppAggregationFunction CARDINALITY = new CIAppAggregationFunction("cardinality"); public static final CIAppAggregationFunction PERCENTILE_75 = new CIAppAggregationFunction("pc75"); public static final CIAppAggregationFunction PERCENTILE_90 = new CIAppAggregationFunction("pc90"); public static final CIAppAggregationFunction PERCENTILE_95 = new CIAppAggregationFunction("pc95"); @@ -38,29 +61,10 @@ public class CIAppAggregationFunction { public static final CIAppAggregationFunction MEDIAN = new CIAppAggregationFunction("median"); public static final CIAppAggregationFunction LATEST = new CIAppAggregationFunction("latest"); public static final CIAppAggregationFunction EARLIEST = new CIAppAggregationFunction("earliest"); - public static final CIAppAggregationFunction MOST_FREQUENT = - new CIAppAggregationFunction("most_frequent"); + public static final CIAppAggregationFunction MOST_FREQUENT = new CIAppAggregationFunction("most_frequent"); public static final CIAppAggregationFunction DELTA = new CIAppAggregationFunction("delta"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg", - "median", - "latest", - "earliest", - "most_frequent", - "delta")); + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median", "latest", "earliest", "most_frequent", "delta")); private String value; @@ -72,22 +76,19 @@ public boolean isValid() { this.value = value; } - public static class CIAppAggregationFunctionSerializer - extends StdSerializer { - public CIAppAggregationFunctionSerializer(Class t) { - super(t); - } + public static class CIAppAggregationFunctionSerializer extends StdSerializer { + public CIAppAggregationFunctionSerializer(Class t) { + super(t); + } - public CIAppAggregationFunctionSerializer() { - this(null); - } + public CIAppAggregationFunctionSerializer() { + this(null); + } - @Override - public void serialize( - CIAppAggregationFunction value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CIAppAggregationFunction value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -99,7 +100,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppAggregationFunction object is equal to o. */ + /** + * Return true if this CIAppAggregationFunction object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +116,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppCompute.java b/src/main/java/com/datadog/api/client/v2/model/CIAppCompute.java index cfd45c99b2d..ee922177821 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppCompute.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A compute rule to compute metrics or timeseries. */ +/** + *

A compute rule to compute metrics or timeseries.

+ */ @JsonPropertyOrder({ CIAppCompute.JSON_PROPERTY_AGGREGATION, CIAppCompute.JSON_PROPERTY_INTERVAL, CIAppCompute.JSON_PROPERTY_METRIC, CIAppCompute.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private CIAppAggregationFunction aggregation; @@ -40,12 +59,10 @@ public CIAppCompute() {} @JsonCreator public CIAppCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - CIAppAggregationFunction aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)CIAppAggregationFunction aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - public CIAppCompute aggregation(CIAppAggregationFunction aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); @@ -53,65 +70,60 @@ public CIAppCompute aggregation(CIAppAggregationFunction aggregation) { } /** - * An aggregation function. - * + *

An aggregation function.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CIAppAggregationFunction getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CIAppAggregationFunction getAggregation() { + return aggregation; + } public void setAggregation(CIAppAggregationFunction aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public CIAppCompute interval(String interval) { this.interval = interval; return this; } /** - * The time buckets' size (only used for type=timeseries) Defaults to a resolution of 150 points. - * + *

The time buckets' size (only used for type=timeseries) + * Defaults to a resolution of 150 points.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getInterval() { + return interval; + } public void setInterval(String interval) { this.interval = interval; } - public CIAppCompute metric(String metric) { this.metric = metric; return this; } /** - * The metric to use. - * + *

The metric to use.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public CIAppCompute type(CIAppComputeType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -119,25 +131,26 @@ public CIAppCompute type(CIAppComputeType type) { } /** - * The type of compute. - * + *

The type of compute.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppComputeType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppComputeType getType() { + return type; + } public void setType(CIAppComputeType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CIAppCompute object is equal to o. */ + /** + * Return true if this CIAppCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,15 +160,13 @@ public boolean equals(Object o) { return false; } CIAppCompute ciAppCompute = (CIAppCompute) o; - return Objects.equals(this.aggregation, ciAppCompute.aggregation) - && Objects.equals(this.interval, ciAppCompute.interval) - && Objects.equals(this.metric, ciAppCompute.metric) - && Objects.equals(this.type, ciAppCompute.type); + return Objects.equals(this.aggregation, ciAppCompute.aggregation) && Objects.equals(this.interval, ciAppCompute.interval) && Objects.equals(this.metric, ciAppCompute.metric) && Objects.equals(this.type, ciAppCompute.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, interval, metric, type); + return Objects.hash(aggregation,interval,metric,type); } @Override @@ -171,7 +182,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppComputeType.java b/src/main/java/com/datadog/api/client/v2/model/CIAppComputeType.java index 902ac110e5b..c2cd0a663e4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppComputeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppComputeType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of compute. */ +/** + *

The type of compute.

+ */ @JsonSerialize(using = CIAppComputeType.CIAppComputeTypeSerializer.class) public class CIAppComputeType { public static final CIAppComputeType TIMESERIES = new CIAppComputeType("timeseries"); public static final CIAppComputeType TOTAL = new CIAppComputeType("total"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries", "total")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries", "total")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class CIAppComputeTypeSerializer extends StdSerializer { - public CIAppComputeTypeSerializer(Class t) { - super(t); - } - - public CIAppComputeTypeSerializer() { - this(null); - } - - @Override - public void serialize(CIAppComputeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public CIAppComputeTypeSerializer(Class t) { + super(t); + } + + public CIAppComputeTypeSerializer() { + this(null); + } + + @Override + public void serialize(CIAppComputeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppComputeType object is equal to o. */ + /** + * Return true if this CIAppComputeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppEventAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CIAppEventAttributes.java index a05452013bd..c222958da2e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppEventAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppEventAttributes.java @@ -6,30 +6,43 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** JSON object containing all event attributes and their associated values. */ +/** + *

JSON object containing all event attributes and their associated values.

+ */ @JsonPropertyOrder({ CIAppEventAttributes.JSON_PROPERTY_ATTRIBUTES, CIAppEventAttributes.JSON_PROPERTY_SERVICE, CIAppEventAttributes.JSON_PROPERTY_TAGS, CIAppEventAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppEventAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private Map attributes = null; @@ -40,7 +53,6 @@ public class CIAppEventAttributes { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -48,7 +60,6 @@ public CIAppEventAttributes attributes(Map attributes) { this.attributes = attributes; return this; } - public CIAppEventAttributes putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); @@ -58,48 +69,44 @@ public CIAppEventAttributes putAttributesItem(String key, Object attributesItem) } /** - * JSON object of attributes from CI Visibility events. - * + *

JSON object of attributes from CI Visibility events.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } public void setAttributes(Map attributes) { this.attributes = attributes; } - public CIAppEventAttributes service(String service) { this.service = service; return this; } /** - * The name of the application or service generating CI Visibility events. It is used to switch - * from CI Visibility to APM, so make sure you define the same value when you use both products. - * + *

The name of the application or service generating CI Visibility events. + * It is used to switch from CI Visibility to APM, so make sure you define the same + * value when you use both products.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public CIAppEventAttributes tags(List tags) { this.tags = tags; return this; } - public CIAppEventAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -109,43 +116,42 @@ public CIAppEventAttributes addTagsItem(String tagsItem) { } /** - * Array of tags associated with your event. - * + *

Array of tags associated with your event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public CIAppEventAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * Timestamp of your event. - * + *

Timestamp of your event.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this CIAppEventAttributes object is equal to o. */ + /** + * Return true if this CIAppEventAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,15 +161,13 @@ public boolean equals(Object o) { return false; } CIAppEventAttributes ciAppEventAttributes = (CIAppEventAttributes) o; - return Objects.equals(this.attributes, ciAppEventAttributes.attributes) - && Objects.equals(this.service, ciAppEventAttributes.service) - && Objects.equals(this.tags, ciAppEventAttributes.tags) - && Objects.equals(this.timestamp, ciAppEventAttributes.timestamp); + return Objects.equals(this.attributes, ciAppEventAttributes.attributes) && Objects.equals(this.service, ciAppEventAttributes.service) && Objects.equals(this.tags, ciAppEventAttributes.tags) && Objects.equals(this.timestamp, ciAppEventAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, service, tags, timestamp); + return Objects.hash(attributes,service,tags,timestamp); } @Override @@ -179,7 +183,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByHistogram.java b/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByHistogram.java index 772ac3890c7..6c1bc10f70f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByHistogram.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByHistogram.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Used to perform a histogram computation (only for measure facets). At most, 100 buckets are - * allowed, the number of buckets is (max - min)/interval. + *

Used to perform a histogram computation (only for measure facets). + * At most, 100 buckets are allowed, the number of buckets is (max - min)/interval.

*/ @JsonPropertyOrder({ CIAppGroupByHistogram.JSON_PROPERTY_INTERVAL, CIAppGroupByHistogram.JSON_PROPERTY_MAX, CIAppGroupByHistogram.JSON_PROPERTY_MIN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppGroupByHistogram { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INTERVAL = "interval"; private Double interval; @@ -39,77 +56,73 @@ public CIAppGroupByHistogram() {} @JsonCreator public CIAppGroupByHistogram( - @JsonProperty(required = true, value = JSON_PROPERTY_INTERVAL) Double interval, - @JsonProperty(required = true, value = JSON_PROPERTY_MAX) Double max, - @JsonProperty(required = true, value = JSON_PROPERTY_MIN) Double min) { - this.interval = interval; - this.max = max; - this.min = min; + @JsonProperty(required=true, value=JSON_PROPERTY_INTERVAL)Double interval, + @JsonProperty(required=true, value=JSON_PROPERTY_MAX)Double max, + @JsonProperty(required=true, value=JSON_PROPERTY_MIN)Double min) { + this.interval = interval; + this.max = max; + this.min = min; } - public CIAppGroupByHistogram interval(Double interval) { this.interval = interval; return this; } /** - * The bin size of the histogram buckets. - * + *

The bin size of the histogram buckets.

* @return interval - */ - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getInterval() { - return interval; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getInterval() { + return interval; + } public void setInterval(Double interval) { this.interval = interval; } - public CIAppGroupByHistogram max(Double max) { this.max = max; return this; } /** - * The maximum value for the measure used in the histogram (values greater than this one are - * filtered out). - * + *

The maximum value for the measure used in the histogram + * (values greater than this one are filtered out).

* @return max - */ - @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMax() { - return max; - } - + **/ + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getMax() { + return max; + } public void setMax(Double max) { this.max = max; } - public CIAppGroupByHistogram min(Double min) { this.min = min; return this; } /** - * The minimum value for the measure used in the histogram (values smaller than this one are - * filtered out). - * + *

The minimum value for the measure used in the histogram + * (values smaller than this one are filtered out).

* @return min - */ - @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMin() { - return min; - } - + **/ + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getMin() { + return min; + } public void setMin(Double min) { this.min = min; } - /** Return true if this CIAppGroupByHistogram object is equal to o. */ + /** + * Return true if this CIAppGroupByHistogram object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +132,13 @@ public boolean equals(Object o) { return false; } CIAppGroupByHistogram ciAppGroupByHistogram = (CIAppGroupByHistogram) o; - return Objects.equals(this.interval, ciAppGroupByHistogram.interval) - && Objects.equals(this.max, ciAppGroupByHistogram.max) - && Objects.equals(this.min, ciAppGroupByHistogram.min); + return Objects.equals(this.interval, ciAppGroupByHistogram.interval) && Objects.equals(this.max, ciAppGroupByHistogram.max) && Objects.equals(this.min, ciAppGroupByHistogram.min); } + @Override public int hashCode() { - return Objects.hash(interval, max, min); + return Objects.hash(interval,max,min); } @Override @@ -141,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByMissing.java b/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByMissing.java index 26f48408e22..48a088d266b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByMissing.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByMissing.java @@ -6,264 +6,259 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = CIAppGroupByMissing.CIAppGroupByMissingDeserializer.class) @JsonSerialize(using = CIAppGroupByMissing.CIAppGroupByMissingSerializer.class) public class CIAppGroupByMissing extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CIAppGroupByMissing.class.getName()); + private static final Logger log = Logger.getLogger(CIAppGroupByMissing.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class CIAppGroupByMissingSerializer extends StdSerializer { - public CIAppGroupByMissingSerializer(Class t) { - super(t); - } - - public CIAppGroupByMissingSerializer() { - this(null); - } - - @Override - public void serialize( - CIAppGroupByMissing value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class CIAppGroupByMissingSerializer extends StdSerializer { + public CIAppGroupByMissingSerializer(Class t) { + super(t); + } - public static class CIAppGroupByMissingDeserializer extends StdDeserializer { - public CIAppGroupByMissingDeserializer() { - this(CIAppGroupByMissing.class); - } + public CIAppGroupByMissingSerializer() { + this(null); + } - public CIAppGroupByMissingDeserializer(Class vc) { - super(vc); + @Override + public void serialize(CIAppGroupByMissing value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public CIAppGroupByMissing 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 String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class CIAppGroupByMissingDeserializer extends StdDeserializer { + public CIAppGroupByMissingDeserializer() { + this(CIAppGroupByMissing.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + public CIAppGroupByMissingDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public CIAppGroupByMissing 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 String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + CIAppGroupByMissing ret = new CIAppGroupByMissing(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CIAppGroupByMissing getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CIAppGroupByMissing cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } - - CIAppGroupByMissing ret = new CIAppGroupByMissing(); - 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 CIAppGroupByMissing getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "CIAppGroupByMissing cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public CIAppGroupByMissing() { - super("oneOf", Boolean.FALSE); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - public CIAppGroupByMissing(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + public CIAppGroupByMissing() { + super("oneOf", Boolean.FALSE); + } + public CIAppGroupByMissing(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CIAppGroupByMissing(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - public CIAppGroupByMissing(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + JSON.registerDescendants(CIAppGroupByMissing.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - JSON.registerDescendants(CIAppGroupByMissing.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return CIAppGroupByMissing.schemas; + } - @Override - public Map getSchemas() { - return CIAppGroupByMissing.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * String, Double + * + * 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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Double - * - *

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(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.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 String, Double"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * String, Double + * + * @return The actual instance (String, Double) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be String, Double"); - } - /** - * Get the actual instance, which can be the following: String, Double - * - * @return The actual instance (String, Double) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByTotal.java b/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByTotal.java index d532fe1b42f..3d32a906a95 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByTotal.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppGroupByTotal.java @@ -6,324 +6,308 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = CIAppGroupByTotal.CIAppGroupByTotalDeserializer.class) @JsonSerialize(using = CIAppGroupByTotal.CIAppGroupByTotalSerializer.class) public class CIAppGroupByTotal extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CIAppGroupByTotal.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class CIAppGroupByTotalSerializer extends StdSerializer { - public CIAppGroupByTotalSerializer(Class t) { - super(t); - } + private static final Logger log = Logger.getLogger(CIAppGroupByTotal.class.getName()); - public CIAppGroupByTotalSerializer() { - this(null); - } + @JsonIgnore + public boolean unparsed = false; - @Override - public void serialize(CIAppGroupByTotal value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class CIAppGroupByTotalSerializer extends StdSerializer { + public CIAppGroupByTotalSerializer(Class t) { + super(t); + } - public static class CIAppGroupByTotalDeserializer extends StdDeserializer { - public CIAppGroupByTotalDeserializer() { - this(CIAppGroupByTotal.class); - } + public CIAppGroupByTotalSerializer() { + this(null); + } - public CIAppGroupByTotalDeserializer(Class vc) { - super(vc); + @Override + public void serialize(CIAppGroupByTotal value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public CIAppGroupByTotal 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 Boolean - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Boolean.class.equals(Integer.class) - || Boolean.class.equals(Long.class) - || Boolean.class.equals(Float.class) - || Boolean.class.equals(Double.class) - || Boolean.class.equals(Boolean.class) - || Boolean.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Boolean.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class CIAppGroupByTotalDeserializer extends StdDeserializer { + public CIAppGroupByTotalDeserializer() { + this(CIAppGroupByTotal.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Boolean'"); + public CIAppGroupByTotalDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); - } - // deserialize String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public CIAppGroupByTotal 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 Boolean + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class) || Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class) || Boolean.class.equals(Boolean.class) || Boolean.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Boolean.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Boolean'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + CIAppGroupByTotal ret = new CIAppGroupByTotal(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CIAppGroupByTotal getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CIAppGroupByTotal cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } + } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - log.log(Level.FINER, "Input data matches schema 'Double'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } + public CIAppGroupByTotal() { + super("oneOf", Boolean.FALSE); + } + public CIAppGroupByTotal(Boolean o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CIAppGroupByTotal(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CIAppGroupByTotal(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - CIAppGroupByTotal ret = new CIAppGroupByTotal(); - 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; + static { + schemas.put("Boolean", new GenericType() { + }); + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + JSON.registerDescendants(CIAppGroupByTotal.class, Collections.unmodifiableMap(schemas)); } - /** Handle deserialization of the 'null' value. */ @Override - public CIAppGroupByTotal getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "CIAppGroupByTotal cannot be null"); + public Map getSchemas() { + return CIAppGroupByTotal.schemas; } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public CIAppGroupByTotal() { - super("oneOf", Boolean.FALSE); - } - - public CIAppGroupByTotal(Boolean o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CIAppGroupByTotal(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CIAppGroupByTotal(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Boolean", new GenericType() {}); - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - JSON.registerDescendants(CIAppGroupByTotal.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return CIAppGroupByTotal.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Boolean, String, Double + * + * 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(Boolean.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Boolean, String, Double - * - *

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(Boolean.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.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 Boolean, String, Double"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * Boolean, String, Double + * + * @return The actual instance (Boolean, String, Double) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be Boolean, String, Double"); - } - /** - * Get the actual instance, which can be the following: Boolean, String, Double - * - * @return The actual instance (Boolean, String, Double) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Boolean` - * @throws ClassCastException if the instance is not `Boolean` - */ - public Boolean getBoolean() throws ClassCastException { - return (Boolean) super.getActualInstance(); - } + /** + * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Boolean` + * @throws ClassCastException if the instance is not `Boolean` + */ + public Boolean getBoolean() throws ClassCastException { + return (Boolean)super.getActualInstance(); + } - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEvent.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEvent.java index de71eb12fa8..a6d064125ef 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEvent.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEvent.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object description of a pipeline event after being processed and stored by Datadog. */ + +/** + *

Object description of a pipeline event after being processed and stored by Datadog.

+ */ @JsonPropertyOrder({ CIAppPipelineEvent.JSON_PROPERTY_ATTRIBUTES, CIAppPipelineEvent.JSON_PROPERTY_ID, CIAppPipelineEvent.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelineEvent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CIAppEventAttributes attributes; @@ -38,42 +58,38 @@ public CIAppPipelineEvent attributes(CIAppEventAttributes attributes) { } /** - * JSON object containing all event attributes and their associated values. - * + *

JSON object containing all event attributes and their associated values.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppEventAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppEventAttributes getAttributes() { + return attributes; + } public void setAttributes(CIAppEventAttributes attributes) { this.attributes = attributes; } - public CIAppPipelineEvent id(String id) { this.id = id; return this; } /** - * Unique ID of the event. - * + *

Unique ID of the event.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public CIAppPipelineEvent type(CIAppPipelineEventTypeName type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public CIAppPipelineEvent type(CIAppPipelineEventTypeName type) { } /** - * Type of the event. - * + *

Type of the event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppPipelineEventTypeName getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppPipelineEventTypeName getType() { + return type; + } public void setType(CIAppPipelineEventTypeName type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CIAppPipelineEvent object is equal to o. */ + /** + * Return true if this CIAppPipelineEvent object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } CIAppPipelineEvent ciAppPipelineEvent = (CIAppPipelineEvent) o; - return Objects.equals(this.attributes, ciAppPipelineEvent.attributes) - && Objects.equals(this.id, ciAppPipelineEvent.id) - && Objects.equals(this.type, ciAppPipelineEvent.type); + return Objects.equals(this.attributes, ciAppPipelineEvent.attributes) && Objects.equals(this.id, ciAppPipelineEvent.id) && Objects.equals(this.type, ciAppPipelineEvent.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventTypeName.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventTypeName.java index 1168166e2ff..c66ba9295a0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventTypeName.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventTypeName.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event. */ +/** + *

Type of the event.

+ */ @JsonSerialize(using = CIAppPipelineEventTypeName.CIAppPipelineEventTypeNameSerializer.class) public class CIAppPipelineEventTypeName { - public static final CIAppPipelineEventTypeName cipipeline = - new CIAppPipelineEventTypeName("cipipeline"); + public static final CIAppPipelineEventTypeName cipipeline = new CIAppPipelineEventTypeName("cipipeline"); private static final Set allowedValues = new HashSet(Arrays.asList("cipipeline")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class CIAppPipelineEventTypeNameSerializer - extends StdSerializer { - public CIAppPipelineEventTypeNameSerializer(Class t) { - super(t); - } + public static class CIAppPipelineEventTypeNameSerializer extends StdSerializer { + public CIAppPipelineEventTypeNameSerializer(Class t) { + super(t); + } - public CIAppPipelineEventTypeNameSerializer() { - this(null); - } + public CIAppPipelineEventTypeNameSerializer() { + this(null); + } - @Override - public void serialize( - CIAppPipelineEventTypeName value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CIAppPipelineEventTypeName value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppPipelineEventTypeName object is equal to o. */ + /** + * Return true if this CIAppPipelineEventTypeName object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsRequest.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsRequest.java index 90a3b5fe4cb..f3c587ce66a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsRequest.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The request for a pipelines search. */ + +/** + *

The request for a pipelines search.

+ */ @JsonPropertyOrder({ CIAppPipelineEventsRequest.JSON_PROPERTY_FILTER, CIAppPipelineEventsRequest.JSON_PROPERTY_OPTIONS, CIAppPipelineEventsRequest.JSON_PROPERTY_PAGE, CIAppPipelineEventsRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelineEventsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private CIAppPipelinesQueryFilter filter; @@ -42,21 +62,19 @@ public CIAppPipelineEventsRequest filter(CIAppPipelinesQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppPipelinesQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppPipelinesQueryFilter getFilter() { + return filter; + } public void setFilter(CIAppPipelinesQueryFilter filter) { this.filter = filter; } - public CIAppPipelineEventsRequest options(CIAppQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -64,22 +82,20 @@ public CIAppPipelineEventsRequest options(CIAppQueryOptions options) { } /** - * Global query options that are used during the query. Only supply timezone or time offset, not - * both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Only supply timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppQueryOptions getOptions() { + return options; + } public void setOptions(CIAppQueryOptions options) { this.options = options; } - public CIAppPipelineEventsRequest page(CIAppQueryPageOptions page) { this.page = page; this.unparsed |= page.unparsed; @@ -87,21 +103,19 @@ public CIAppPipelineEventsRequest page(CIAppQueryPageOptions page) { } /** - * Paging attributes for listing events. - * + *

Paging attributes for listing events.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppQueryPageOptions getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppQueryPageOptions getPage() { + return page; + } public void setPage(CIAppQueryPageOptions page) { this.page = page; } - public CIAppPipelineEventsRequest sort(CIAppSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -109,25 +123,26 @@ public CIAppPipelineEventsRequest sort(CIAppSort sort) { } /** - * Sort parameters when querying events. - * + *

Sort parameters when querying events.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppSort getSort() { + return sort; + } public void setSort(CIAppSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this CIAppPipelineEventsRequest object is equal to o. */ + /** + * Return true if this CIAppPipelineEventsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +152,13 @@ public boolean equals(Object o) { return false; } CIAppPipelineEventsRequest ciAppPipelineEventsRequest = (CIAppPipelineEventsRequest) o; - return Objects.equals(this.filter, ciAppPipelineEventsRequest.filter) - && Objects.equals(this.options, ciAppPipelineEventsRequest.options) - && Objects.equals(this.page, ciAppPipelineEventsRequest.page) - && Objects.equals(this.sort, ciAppPipelineEventsRequest.sort); + return Objects.equals(this.filter, ciAppPipelineEventsRequest.filter) && Objects.equals(this.options, ciAppPipelineEventsRequest.options) && Objects.equals(this.page, ciAppPipelineEventsRequest.page) && Objects.equals(this.sort, ciAppPipelineEventsRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, options, page, sort); + return Objects.hash(filter,options,page,sort); } @Override @@ -161,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsResponse.java index a4a0721777d..e2f8e7490d2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelineEventsResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object with all pipeline events matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object with all pipeline events matching the request and pagination information.

+ */ @JsonPropertyOrder({ CIAppPipelineEventsResponse.JSON_PROPERTY_DATA, CIAppPipelineEventsResponse.JSON_PROPERTY_LINKS, CIAppPipelineEventsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelineEventsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public CIAppPipelineEventsResponse data(List data) { } return this; } - public CIAppPipelineEventsResponse addDataItem(CIAppPipelineEvent dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public CIAppPipelineEventsResponse addDataItem(CIAppPipelineEvent dataItem) { } /** - * Array of events matching the request. - * + *

Array of events matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public CIAppPipelineEventsResponse links(CIAppResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -73,21 +88,19 @@ public CIAppPipelineEventsResponse links(CIAppResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseLinks getLinks() { + return links; + } public void setLinks(CIAppResponseLinks links) { this.links = links; } - public CIAppPipelineEventsResponse meta(CIAppResponseMetadataWithPagination meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -95,22 +108,23 @@ public CIAppPipelineEventsResponse meta(CIAppResponseMetadataWithPagination meta } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseMetadataWithPagination getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseMetadataWithPagination getMeta() { + return meta; + } public void setMeta(CIAppResponseMetadataWithPagination meta) { this.meta = meta; } - /** Return true if this CIAppPipelineEventsResponse object is equal to o. */ + /** + * Return true if this CIAppPipelineEventsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } CIAppPipelineEventsResponse ciAppPipelineEventsResponse = (CIAppPipelineEventsResponse) o; - return Objects.equals(this.data, ciAppPipelineEventsResponse.data) - && Objects.equals(this.links, ciAppPipelineEventsResponse.links) - && Objects.equals(this.meta, ciAppPipelineEventsResponse.meta); + return Objects.equals(this.data, ciAppPipelineEventsResponse.data) && Objects.equals(this.links, ciAppPipelineEventsResponse.links) && Objects.equals(this.meta, ciAppPipelineEventsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregateRequest.java index d6529376b7f..1e9d790cb4e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregateRequest.java @@ -6,17 +6,32 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The object sent with the request to retrieve aggregation buckets of pipeline events from your - * organization. + *

The object sent with the request to retrieve aggregation buckets of pipeline events from your organization.

*/ @JsonPropertyOrder({ CIAppPipelinesAggregateRequest.JSON_PROPERTY_COMPUTE, @@ -24,10 +39,10 @@ CIAppPipelinesAggregateRequest.JSON_PROPERTY_GROUP_BY, CIAppPipelinesAggregateRequest.JSON_PROPERTY_OPTIONS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelinesAggregateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private List compute = null; @@ -47,7 +62,6 @@ public CIAppPipelinesAggregateRequest compute(List compute) { } return this; } - public CIAppPipelinesAggregateRequest addComputeItem(CIAppCompute computeItem) { if (this.compute == null) { this.compute = new ArrayList<>(); @@ -58,21 +72,19 @@ public CIAppPipelinesAggregateRequest addComputeItem(CIAppCompute computeItem) { } /** - * The list of metrics or timeseries to compute for the retrieved buckets. - * + *

The list of metrics or timeseries to compute for the retrieved buckets.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCompute() { + return compute; + } public void setCompute(List compute) { this.compute = compute; } - public CIAppPipelinesAggregateRequest filter(CIAppPipelinesQueryFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -80,21 +92,19 @@ public CIAppPipelinesAggregateRequest filter(CIAppPipelinesQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppPipelinesQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppPipelinesQueryFilter getFilter() { + return filter; + } public void setFilter(CIAppPipelinesQueryFilter filter) { this.filter = filter; } - public CIAppPipelinesAggregateRequest groupBy(List groupBy) { this.groupBy = groupBy; for (CIAppPipelinesGroupBy item : groupBy) { @@ -102,7 +112,6 @@ public CIAppPipelinesAggregateRequest groupBy(List groupB } return this; } - public CIAppPipelinesAggregateRequest addGroupByItem(CIAppPipelinesGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -113,21 +122,19 @@ public CIAppPipelinesAggregateRequest addGroupByItem(CIAppPipelinesGroupBy group } /** - * The rules for the group-by. - * + *

The rules for the group-by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public CIAppPipelinesAggregateRequest options(CIAppQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -135,23 +142,24 @@ public CIAppPipelinesAggregateRequest options(CIAppQueryOptions options) { } /** - * Global query options that are used during the query. Only supply timezone or time offset, not - * both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Only supply timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppQueryOptions getOptions() { + return options; + } public void setOptions(CIAppQueryOptions options) { this.options = options; } - /** Return true if this CIAppPipelinesAggregateRequest object is equal to o. */ + /** + * Return true if this CIAppPipelinesAggregateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -160,17 +168,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppPipelinesAggregateRequest ciAppPipelinesAggregateRequest = - (CIAppPipelinesAggregateRequest) o; - return Objects.equals(this.compute, ciAppPipelinesAggregateRequest.compute) - && Objects.equals(this.filter, ciAppPipelinesAggregateRequest.filter) - && Objects.equals(this.groupBy, ciAppPipelinesAggregateRequest.groupBy) - && Objects.equals(this.options, ciAppPipelinesAggregateRequest.options); + CIAppPipelinesAggregateRequest ciAppPipelinesAggregateRequest = (CIAppPipelinesAggregateRequest) o; + return Objects.equals(this.compute, ciAppPipelinesAggregateRequest.compute) && Objects.equals(this.filter, ciAppPipelinesAggregateRequest.filter) && Objects.equals(this.groupBy, ciAppPipelinesAggregateRequest.groupBy) && Objects.equals(this.options, ciAppPipelinesAggregateRequest.options); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy, options); + return Objects.hash(compute,filter,groupBy,options); } @Override @@ -186,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregationBucketsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregationBucketsResponse.java index 4bb7a243b56..59625ce1c55 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregationBucketsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAggregationBucketsResponse.java @@ -6,34 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The query results. */ -@JsonPropertyOrder({CIAppPipelinesAggregationBucketsResponse.JSON_PROPERTY_BUCKETS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The query results.

+ */ +@JsonPropertyOrder({ + CIAppPipelinesAggregationBucketsResponse.JSON_PROPERTY_BUCKETS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelinesAggregationBucketsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BUCKETS = "buckets"; private List buckets = null; - public CIAppPipelinesAggregationBucketsResponse buckets( - List buckets) { + public CIAppPipelinesAggregationBucketsResponse buckets(List buckets) { this.buckets = buckets; for (CIAppPipelinesBucketResponse item : buckets) { this.unparsed |= item.unparsed; } return this; } - - public CIAppPipelinesAggregationBucketsResponse addBucketsItem( - CIAppPipelinesBucketResponse bucketsItem) { + public CIAppPipelinesAggregationBucketsResponse addBucketsItem(CIAppPipelinesBucketResponse bucketsItem) { if (this.buckets == null) { this.buckets = new ArrayList<>(); } @@ -43,22 +60,23 @@ public CIAppPipelinesAggregationBucketsResponse addBucketsItem( } /** - * The list of matching buckets, one item per bucket. - * + *

The list of matching buckets, one item per bucket.

* @return buckets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BUCKETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getBuckets() { - return buckets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getBuckets() { + return buckets; + } public void setBuckets(List buckets) { this.buckets = buckets; } - /** Return true if this CIAppPipelinesAggregationBucketsResponse object is equal to o. */ + /** + * Return true if this CIAppPipelinesAggregationBucketsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -67,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppPipelinesAggregationBucketsResponse ciAppPipelinesAggregationBucketsResponse = - (CIAppPipelinesAggregationBucketsResponse) o; + CIAppPipelinesAggregationBucketsResponse ciAppPipelinesAggregationBucketsResponse = (CIAppPipelinesAggregationBucketsResponse) o; return Objects.equals(this.buckets, ciAppPipelinesAggregationBucketsResponse.buckets); } + @Override public int hashCode() { return Objects.hash(buckets); @@ -87,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAnalyticsAggregateResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAnalyticsAggregateResponse.java index 625b3175714..df9dcd52187 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAnalyticsAggregateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesAnalyticsAggregateResponse.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response object for the pipeline events aggregate API endpoint. */ + +/** + *

The response object for the pipeline events aggregate API endpoint.

+ */ @JsonPropertyOrder({ CIAppPipelinesAnalyticsAggregateResponse.JSON_PROPERTY_DATA, CIAppPipelinesAnalyticsAggregateResponse.JSON_PROPERTY_LINKS, CIAppPipelinesAnalyticsAggregateResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelinesAnalyticsAggregateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CIAppPipelinesAggregationBucketsResponse data; @@ -31,29 +51,26 @@ public class CIAppPipelinesAnalyticsAggregateResponse { public static final String JSON_PROPERTY_META = "meta"; private CIAppResponseMetadata meta; - public CIAppPipelinesAnalyticsAggregateResponse data( - CIAppPipelinesAggregationBucketsResponse data) { + public CIAppPipelinesAnalyticsAggregateResponse data(CIAppPipelinesAggregationBucketsResponse data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The query results. - * + *

The query results.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppPipelinesAggregationBucketsResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppPipelinesAggregationBucketsResponse getData() { + return data; + } public void setData(CIAppPipelinesAggregationBucketsResponse data) { this.data = data; } - public CIAppPipelinesAnalyticsAggregateResponse links(CIAppResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -61,21 +78,19 @@ public CIAppPipelinesAnalyticsAggregateResponse links(CIAppResponseLinks links) } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseLinks getLinks() { + return links; + } public void setLinks(CIAppResponseLinks links) { this.links = links; } - public CIAppPipelinesAnalyticsAggregateResponse meta(CIAppResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -83,22 +98,23 @@ public CIAppPipelinesAnalyticsAggregateResponse meta(CIAppResponseMetadata meta) } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseMetadata getMeta() { + return meta; + } public void setMeta(CIAppResponseMetadata meta) { this.meta = meta; } - /** Return true if this CIAppPipelinesAnalyticsAggregateResponse object is equal to o. */ + /** + * Return true if this CIAppPipelinesAnalyticsAggregateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,16 +123,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppPipelinesAnalyticsAggregateResponse ciAppPipelinesAnalyticsAggregateResponse = - (CIAppPipelinesAnalyticsAggregateResponse) o; - return Objects.equals(this.data, ciAppPipelinesAnalyticsAggregateResponse.data) - && Objects.equals(this.links, ciAppPipelinesAnalyticsAggregateResponse.links) - && Objects.equals(this.meta, ciAppPipelinesAnalyticsAggregateResponse.meta); + CIAppPipelinesAnalyticsAggregateResponse ciAppPipelinesAnalyticsAggregateResponse = (CIAppPipelinesAnalyticsAggregateResponse) o; + return Objects.equals(this.data, ciAppPipelinesAnalyticsAggregateResponse.data) && Objects.equals(this.links, ciAppPipelinesAnalyticsAggregateResponse.links) && Objects.equals(this.meta, ciAppPipelinesAnalyticsAggregateResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -131,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesBucketResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesBucketResponse.java index 363533be69d..336e9b28321 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesBucketResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesBucketResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Bucket values. */ +/** + *

Bucket values.

+ */ @JsonPropertyOrder({ CIAppPipelinesBucketResponse.JSON_PROPERTY_BY, CIAppPipelinesBucketResponse.JSON_PROPERTY_COMPUTES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelinesBucketResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BY = "by"; private Map by = null; @@ -33,7 +51,6 @@ public CIAppPipelinesBucketResponse by(Map by) { this.by = by; return this; } - public CIAppPipelinesBucketResponse putByItem(String key, Object byItem) { if (this.by == null) { this.by = new HashMap<>(); @@ -43,28 +60,24 @@ public CIAppPipelinesBucketResponse putByItem(String key, Object byItem) { } /** - * The key-value pairs for each group-by. - * + *

The key-value pairs for each group-by.

* @return by - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getBy() { - return by; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getBy() { + return by; + } public void setBy(Map by) { this.by = by; } - public CIAppPipelinesBucketResponse computes(Map computes) { this.computes = computes; return this; } - - public CIAppPipelinesBucketResponse putComputesItem( - String key, CIAppAggregateBucketValue computesItem) { + public CIAppPipelinesBucketResponse putComputesItem(String key, CIAppAggregateBucketValue computesItem) { if (this.computes == null) { this.computes = new HashMap<>(); } @@ -73,22 +86,23 @@ public CIAppPipelinesBucketResponse putComputesItem( } /** - * A map of the metric name to value for regular compute, or a list of values for a timeseries. - * + *

A map of the metric name to value for regular compute, or a list of values for a timeseries.

* @return computes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getComputes() { - return computes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getComputes() { + return computes; + } public void setComputes(Map computes) { this.computes = computes; } - /** Return true if this CIAppPipelinesBucketResponse object is equal to o. */ + /** + * Return true if this CIAppPipelinesBucketResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -98,13 +112,13 @@ public boolean equals(Object o) { return false; } CIAppPipelinesBucketResponse ciAppPipelinesBucketResponse = (CIAppPipelinesBucketResponse) o; - return Objects.equals(this.by, ciAppPipelinesBucketResponse.by) - && Objects.equals(this.computes, ciAppPipelinesBucketResponse.computes); + return Objects.equals(this.by, ciAppPipelinesBucketResponse.by) && Objects.equals(this.computes, ciAppPipelinesBucketResponse.computes); } + @Override public int hashCode() { - return Objects.hash(by, computes); + return Objects.hash(by,computes); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesGroupBy.java index ee553243233..bd998eac10e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesGroupBy.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A group-by rule. */ + +/** + *

A group-by rule.

+ */ @JsonPropertyOrder({ CIAppPipelinesGroupBy.JSON_PROPERTY_FACET, CIAppPipelinesGroupBy.JSON_PROPERTY_HISTOGRAM, @@ -22,10 +41,10 @@ CIAppPipelinesGroupBy.JSON_PROPERTY_SORT, CIAppPipelinesGroupBy.JSON_PROPERTY_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelinesGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -48,30 +67,27 @@ public CIAppPipelinesGroupBy() {} @JsonCreator public CIAppPipelinesGroupBy( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public CIAppPipelinesGroupBy facet(String facet) { this.facet = facet; return this; } /** - * The name of the facet to use (required). - * + *

The name of the facet to use (required).

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public CIAppPipelinesGroupBy histogram(CIAppGroupByHistogram histogram) { this.histogram = histogram; this.unparsed |= histogram.unparsed; @@ -79,43 +95,39 @@ public CIAppPipelinesGroupBy histogram(CIAppGroupByHistogram histogram) { } /** - * Used to perform a histogram computation (only for measure facets). At most, 100 buckets are - * allowed, the number of buckets is (max - min)/interval. - * + *

Used to perform a histogram computation (only for measure facets). + * At most, 100 buckets are allowed, the number of buckets is (max - min)/interval.

* @return histogram - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HISTOGRAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppGroupByHistogram getHistogram() { - return histogram; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HISTOGRAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppGroupByHistogram getHistogram() { + return histogram; + } public void setHistogram(CIAppGroupByHistogram histogram) { this.histogram = histogram; } - public CIAppPipelinesGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * The maximum buckets to return for this group-by. - * + *

The maximum buckets to return for this group-by.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public CIAppPipelinesGroupBy missing(CIAppGroupByMissing missing) { this.missing = missing; this.unparsed |= missing.unparsed; @@ -123,21 +135,19 @@ public CIAppPipelinesGroupBy missing(CIAppGroupByMissing missing) { } /** - * The value to use for logs that don't have the facet used to group-by. - * + *

The value to use for logs that don't have the facet used to group-by.

* @return missing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MISSING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppGroupByMissing getMissing() { - return missing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MISSING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppGroupByMissing getMissing() { + return missing; + } public void setMissing(CIAppGroupByMissing missing) { this.missing = missing; } - public CIAppPipelinesGroupBy sort(CIAppAggregateSort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -145,21 +155,19 @@ public CIAppPipelinesGroupBy sort(CIAppAggregateSort sort) { } /** - * A sort rule. - * + *

A sort rule.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppAggregateSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppAggregateSort getSort() { + return sort; + } public void setSort(CIAppAggregateSort sort) { this.sort = sort; } - public CIAppPipelinesGroupBy total(CIAppGroupByTotal total) { this.total = total; this.unparsed |= total.unparsed; @@ -167,22 +175,23 @@ public CIAppPipelinesGroupBy total(CIAppGroupByTotal total) { } /** - * A resulting object to put the given computes in over all the matching records. - * + *

A resulting object to put the given computes in over all the matching records.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppGroupByTotal getTotal() { - return total; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppGroupByTotal getTotal() { + return total; + } public void setTotal(CIAppGroupByTotal total) { this.total = total; } - /** Return true if this CIAppPipelinesGroupBy object is equal to o. */ + /** + * Return true if this CIAppPipelinesGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -192,17 +201,13 @@ public boolean equals(Object o) { return false; } CIAppPipelinesGroupBy ciAppPipelinesGroupBy = (CIAppPipelinesGroupBy) o; - return Objects.equals(this.facet, ciAppPipelinesGroupBy.facet) - && Objects.equals(this.histogram, ciAppPipelinesGroupBy.histogram) - && Objects.equals(this.limit, ciAppPipelinesGroupBy.limit) - && Objects.equals(this.missing, ciAppPipelinesGroupBy.missing) - && Objects.equals(this.sort, ciAppPipelinesGroupBy.sort) - && Objects.equals(this.total, ciAppPipelinesGroupBy.total); + return Objects.equals(this.facet, ciAppPipelinesGroupBy.facet) && Objects.equals(this.histogram, ciAppPipelinesGroupBy.histogram) && Objects.equals(this.limit, ciAppPipelinesGroupBy.limit) && Objects.equals(this.missing, ciAppPipelinesGroupBy.missing) && Objects.equals(this.sort, ciAppPipelinesGroupBy.sort) && Objects.equals(this.total, ciAppPipelinesGroupBy.total); } + @Override public int hashCode() { - return Objects.hash(facet, histogram, limit, missing, sort, total); + return Objects.hash(facet,histogram,limit,missing,sort,total); } @Override @@ -220,7 +225,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesQueryFilter.java index 2d7ce6a37a6..5df0f933584 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppPipelinesQueryFilter.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The search and filter query settings. */ + +/** + *

The search and filter query settings.

+ */ @JsonPropertyOrder({ CIAppPipelinesQueryFilter.JSON_PROPERTY_FROM, CIAppPipelinesQueryFilter.JSON_PROPERTY_QUERY, CIAppPipelinesQueryFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppPipelinesQueryFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from = "now-15m"; @@ -37,66 +57,61 @@ public CIAppPipelinesQueryFilter from(String from) { } /** - * The minimum time for the requested events; supports date, math, and regular timestamps (in - * milliseconds). - * + *

The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds).

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public CIAppPipelinesQueryFilter query(String query) { this.query = query; return this; } /** - * The search query following the Log search syntax. - * + *

The search query following the Log search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public CIAppPipelinesQueryFilter to(String to) { this.to = to; return this; } /** - * The maximum time for the requested events, supports date, math, and regular timestamps (in - * milliseconds). - * + *

The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds).

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this CIAppPipelinesQueryFilter object is equal to o. */ + /** + * Return true if this CIAppPipelinesQueryFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +121,13 @@ public boolean equals(Object o) { return false; } CIAppPipelinesQueryFilter ciAppPipelinesQueryFilter = (CIAppPipelinesQueryFilter) o; - return Objects.equals(this.from, ciAppPipelinesQueryFilter.from) - && Objects.equals(this.query, ciAppPipelinesQueryFilter.query) - && Objects.equals(this.to, ciAppPipelinesQueryFilter.to); + return Objects.equals(this.from, ciAppPipelinesQueryFilter.from) && Objects.equals(this.query, ciAppPipelinesQueryFilter.query) && Objects.equals(this.to, ciAppPipelinesQueryFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, query, to); + return Objects.hash(from,query,to); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppQueryOptions.java b/src/main/java/com/datadog/api/client/v2/model/CIAppQueryOptions.java index e826f3e3817..05423589d85 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppQueryOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppQueryOptions.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Global query options that are used during the query. Only supply timezone or time offset, not - * both. Otherwise, the query fails. + *

Global query options that are used during the query. + * Only supply timezone or time offset, not both. Otherwise, the query fails.

*/ @JsonPropertyOrder({ CIAppQueryOptions.JSON_PROPERTY_TIME_OFFSET, CIAppQueryOptions.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppQueryOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME_OFFSET = "time_offset"; private Long timeOffset; @@ -36,44 +54,42 @@ public CIAppQueryOptions timeOffset(Long timeOffset) { } /** - * The time offset (in seconds) to apply to the query. - * + *

The time offset (in seconds) to apply to the query.

* @return timeOffset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeOffset() { - return timeOffset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeOffset() { + return timeOffset; + } public void setTimeOffset(Long timeOffset) { this.timeOffset = timeOffset; } - public CIAppQueryOptions timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone - * Database identifier (like America/New_York). - * + *

The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this CIAppQueryOptions object is equal to o. */ + /** + * Return true if this CIAppQueryOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +99,13 @@ public boolean equals(Object o) { return false; } CIAppQueryOptions ciAppQueryOptions = (CIAppQueryOptions) o; - return Objects.equals(this.timeOffset, ciAppQueryOptions.timeOffset) - && Objects.equals(this.timezone, ciAppQueryOptions.timezone); + return Objects.equals(this.timeOffset, ciAppQueryOptions.timeOffset) && Objects.equals(this.timezone, ciAppQueryOptions.timezone); } + @Override public int hashCode() { - return Objects.hash(timeOffset, timezone); + return Objects.hash(timeOffset,timezone); } @Override @@ -103,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppQueryPageOptions.java b/src/main/java/com/datadog/api/client/v2/model/CIAppQueryPageOptions.java index 0599c19bf75..a62da769a24 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppQueryPageOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppQueryPageOptions.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Paging attributes for listing events. */ + +/** + *

Paging attributes for listing events.

+ */ @JsonPropertyOrder({ CIAppQueryPageOptions.JSON_PROPERTY_CURSOR, CIAppQueryPageOptions.JSON_PROPERTY_LIMIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppQueryPageOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -33,43 +53,43 @@ public CIAppQueryPageOptions cursor(String cursor) { } /** - * List following results with a cursor provided in the previous query. - * + *

List following results with a cursor provided in the previous query.

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - public CIAppQueryPageOptions limit(Integer limit) { this.limit = limit; return this; } /** - * Maximum number of events in the response. maximum: 1000 - * + *

Maximum number of events in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - /** Return true if this CIAppQueryPageOptions object is equal to o. */ + /** + * Return true if this CIAppQueryPageOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +99,13 @@ public boolean equals(Object o) { return false; } CIAppQueryPageOptions ciAppQueryPageOptions = (CIAppQueryPageOptions) o; - return Objects.equals(this.cursor, ciAppQueryPageOptions.cursor) - && Objects.equals(this.limit, ciAppQueryPageOptions.limit); + return Objects.equals(this.cursor, ciAppQueryPageOptions.cursor) && Objects.equals(this.limit, ciAppQueryPageOptions.limit); } + @Override public int hashCode() { - return Objects.hash(cursor, limit); + return Objects.hash(cursor,limit); } @Override @@ -99,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseLinks.java index 25e7169c1e3..88b3ce917ad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseLinks.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Links attributes. */ -@JsonPropertyOrder({CIAppResponseLinks.JSON_PROPERTY_NEXT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Links attributes.

+ */ +@JsonPropertyOrder({ + CIAppResponseLinks.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT = "next"; private String next; @@ -27,22 +49,24 @@ public CIAppResponseLinks next(String next) { } /** - * Link for the next set of results. The request can also be made using the POST endpoint. - * + *

Link for the next set of results. The request can also be made using the + * POST endpoint.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - /** Return true if this CIAppResponseLinks object is equal to o. */ + /** + * Return true if this CIAppResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.next, ciAppResponseLinks.next); } + @Override public int hashCode() { return Objects.hash(next); @@ -70,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadata.java b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadata.java index c8885856cba..a3c49f38e83 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadata.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The metadata associated with a request. */ + +/** + *

The metadata associated with a request.

+ */ @JsonPropertyOrder({ CIAppResponseMetadata.JSON_PROPERTY_ELAPSED, CIAppResponseMetadata.JSON_PROPERTY_REQUEST_ID, CIAppResponseMetadata.JSON_PROPERTY_STATUS, CIAppResponseMetadata.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ELAPSED = "elapsed"; private Long elapsed; @@ -43,42 +61,38 @@ public CIAppResponseMetadata elapsed(Long elapsed) { } /** - * The time elapsed in milliseconds. - * + *

The time elapsed in milliseconds.

* @return elapsed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsed() { - return elapsed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsed() { + return elapsed; + } public void setElapsed(Long elapsed) { this.elapsed = elapsed; } - public CIAppResponseMetadata requestId(String requestId) { this.requestId = requestId; return this; } /** - * The identifier of the request. - * + *

The identifier of the request.

* @return requestId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } public void setRequestId(String requestId) { this.requestId = requestId; } - public CIAppResponseMetadata status(CIAppResponseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -86,24 +100,22 @@ public CIAppResponseMetadata status(CIAppResponseStatus status) { } /** - * The status of the response. - * + *

The status of the response.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseStatus getStatus() { + return status; + } public void setStatus(CIAppResponseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public CIAppResponseMetadata warnings(List warnings) { this.warnings = warnings; for (CIAppWarning item : warnings) { @@ -111,7 +123,6 @@ public CIAppResponseMetadata warnings(List warnings) { } return this; } - public CIAppResponseMetadata addWarningsItem(CIAppWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -122,23 +133,24 @@ public CIAppResponseMetadata addWarningsItem(CIAppWarning warningsItem) { } /** - * A list of warnings (non-fatal errors) encountered. Partial results may return if warnings are - * present in the response. - * + *

A list of warnings (non-fatal errors) encountered. Partial results may return if + * warnings are present in the response.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this CIAppResponseMetadata object is equal to o. */ + /** + * Return true if this CIAppResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -148,15 +160,13 @@ public boolean equals(Object o) { return false; } CIAppResponseMetadata ciAppResponseMetadata = (CIAppResponseMetadata) o; - return Objects.equals(this.elapsed, ciAppResponseMetadata.elapsed) - && Objects.equals(this.requestId, ciAppResponseMetadata.requestId) - && Objects.equals(this.status, ciAppResponseMetadata.status) - && Objects.equals(this.warnings, ciAppResponseMetadata.warnings); + return Objects.equals(this.elapsed, ciAppResponseMetadata.elapsed) && Objects.equals(this.requestId, ciAppResponseMetadata.requestId) && Objects.equals(this.status, ciAppResponseMetadata.status) && Objects.equals(this.warnings, ciAppResponseMetadata.warnings); } + @Override public int hashCode() { - return Objects.hash(elapsed, requestId, status, warnings); + return Objects.hash(elapsed,requestId,status,warnings); } @Override @@ -172,7 +182,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadataWithPagination.java b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadataWithPagination.java index 53ba264b71c..1b097013ce3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadataWithPagination.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseMetadataWithPagination.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The metadata associated with a request. */ +/** + *

The metadata associated with a request.

+ */ @JsonPropertyOrder({ CIAppResponseMetadataWithPagination.JSON_PROPERTY_ELAPSED, CIAppResponseMetadataWithPagination.JSON_PROPERTY_PAGE, @@ -22,10 +40,10 @@ CIAppResponseMetadataWithPagination.JSON_PROPERTY_STATUS, CIAppResponseMetadataWithPagination.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppResponseMetadataWithPagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ELAPSED = "elapsed"; private Long elapsed; @@ -47,21 +65,19 @@ public CIAppResponseMetadataWithPagination elapsed(Long elapsed) { } /** - * The time elapsed in milliseconds. - * + *

The time elapsed in milliseconds.

* @return elapsed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsed() { - return elapsed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsed() { + return elapsed; + } public void setElapsed(Long elapsed) { this.elapsed = elapsed; } - public CIAppResponseMetadataWithPagination page(CIAppResponsePage page) { this.page = page; this.unparsed |= page.unparsed; @@ -69,42 +85,38 @@ public CIAppResponseMetadataWithPagination page(CIAppResponsePage page) { } /** - * Paging attributes. - * + *

Paging attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponsePage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponsePage getPage() { + return page; + } public void setPage(CIAppResponsePage page) { this.page = page; } - public CIAppResponseMetadataWithPagination requestId(String requestId) { this.requestId = requestId; return this; } /** - * The identifier of the request. - * + *

The identifier of the request.

* @return requestId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } public void setRequestId(String requestId) { this.requestId = requestId; } - public CIAppResponseMetadataWithPagination status(CIAppResponseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -112,24 +124,22 @@ public CIAppResponseMetadataWithPagination status(CIAppResponseStatus status) { } /** - * The status of the response. - * + *

The status of the response.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseStatus getStatus() { + return status; + } public void setStatus(CIAppResponseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public CIAppResponseMetadataWithPagination warnings(List warnings) { this.warnings = warnings; for (CIAppWarning item : warnings) { @@ -137,7 +147,6 @@ public CIAppResponseMetadataWithPagination warnings(List warnings) } return this; } - public CIAppResponseMetadataWithPagination addWarningsItem(CIAppWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -148,23 +157,24 @@ public CIAppResponseMetadataWithPagination addWarningsItem(CIAppWarning warnings } /** - * A list of warnings (non-fatal errors) encountered. Partial results may return if warnings are - * present in the response. - * + *

A list of warnings (non-fatal errors) encountered. Partial results may return if + * warnings are present in the response.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this CIAppResponseMetadataWithPagination object is equal to o. */ + /** + * Return true if this CIAppResponseMetadataWithPagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -173,18 +183,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppResponseMetadataWithPagination ciAppResponseMetadataWithPagination = - (CIAppResponseMetadataWithPagination) o; - return Objects.equals(this.elapsed, ciAppResponseMetadataWithPagination.elapsed) - && Objects.equals(this.page, ciAppResponseMetadataWithPagination.page) - && Objects.equals(this.requestId, ciAppResponseMetadataWithPagination.requestId) - && Objects.equals(this.status, ciAppResponseMetadataWithPagination.status) - && Objects.equals(this.warnings, ciAppResponseMetadataWithPagination.warnings); + CIAppResponseMetadataWithPagination ciAppResponseMetadataWithPagination = (CIAppResponseMetadataWithPagination) o; + return Objects.equals(this.elapsed, ciAppResponseMetadataWithPagination.elapsed) && Objects.equals(this.page, ciAppResponseMetadataWithPagination.page) && Objects.equals(this.requestId, ciAppResponseMetadataWithPagination.requestId) && Objects.equals(this.status, ciAppResponseMetadataWithPagination.status) && Objects.equals(this.warnings, ciAppResponseMetadataWithPagination.warnings); } + @Override public int hashCode() { - return Objects.hash(elapsed, page, requestId, status, warnings); + return Objects.hash(elapsed,page,requestId,status,warnings); } @Override @@ -201,7 +207,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppResponsePage.java b/src/main/java/com/datadog/api/client/v2/model/CIAppResponsePage.java index 7e49ce16cbd..4f300366bb0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppResponsePage.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppResponsePage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Paging attributes. */ -@JsonPropertyOrder({CIAppResponsePage.JSON_PROPERTY_AFTER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Paging attributes.

+ */ +@JsonPropertyOrder({ + CIAppResponsePage.JSON_PROPERTY_AFTER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppResponsePage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -27,23 +49,23 @@ public CIAppResponsePage after(String after) { } /** - * The cursor to use to get the next results, if any. To make the next request, use the same - * parameters with the addition of page[cursor]. - * + *

The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - /** Return true if this CIAppResponsePage object is equal to o. */ + /** + * Return true if this CIAppResponsePage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.after, ciAppResponsePage.after); } + @Override public int hashCode() { return Objects.hash(after); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseStatus.java b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseStatus.java index e892b7f1ad8..f6d4c3a353e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppResponseStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppResponseStatus.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The status of the response. */ +/** + *

The status of the response.

+ */ @JsonSerialize(using = CIAppResponseStatus.CIAppResponseStatusSerializer.class) public class CIAppResponseStatus { public static final CIAppResponseStatus DONE = new CIAppResponseStatus("done"); public static final CIAppResponseStatus TIMEOUT = new CIAppResponseStatus("timeout"); - private static final Set allowedValues = - new HashSet(Arrays.asList("done", "timeout")); + private static final Set allowedValues = new HashSet(Arrays.asList("done", "timeout")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class CIAppResponseStatusSerializer extends StdSerializer { - public CIAppResponseStatusSerializer(Class t) { - super(t); - } - - public CIAppResponseStatusSerializer() { - this(null); - } - - @Override - public void serialize( - CIAppResponseStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public CIAppResponseStatusSerializer(Class t) { + super(t); + } + + public CIAppResponseStatusSerializer() { + this(null); + } + + @Override + public void serialize(CIAppResponseStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppResponseStatus object is equal to o. */ + /** + * Return true if this CIAppResponseStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppSort.java b/src/main/java/com/datadog/api/client/v2/model/CIAppSort.java index 156cd56ad54..633c05b2bbe 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sort parameters when querying events. */ +/** + *

Sort parameters when querying events.

+ */ @JsonSerialize(using = CIAppSort.CIAppSortSerializer.class) public class CIAppSort { public static final CIAppSort TIMESTAMP_ASCENDING = new CIAppSort("timestamp"); public static final CIAppSort TIMESTAMP_DESCENDING = new CIAppSort("-timestamp"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timestamp", "-timestamp")); + private static final Set allowedValues = new HashSet(Arrays.asList("timestamp", "-timestamp")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class CIAppSortSerializer extends StdSerializer { - public CIAppSortSerializer(Class t) { - super(t); - } - - public CIAppSortSerializer() { - this(null); - } - - @Override - public void serialize(CIAppSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public CIAppSortSerializer(Class t) { + super(t); + } + + public CIAppSortSerializer() { + this(null); + } + + @Override + public void serialize(CIAppSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppSort object is equal to o. */ + /** + * Return true if this CIAppSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppSortOrder.java b/src/main/java/com/datadog/api/client/v2/model/CIAppSortOrder.java index 80a25c15221..7028e61e60c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppSortOrder.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppSortOrder.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The order to use, ascending or descending. */ +/** + *

The order to use, ascending or descending.

+ */ @JsonSerialize(using = CIAppSortOrder.CIAppSortOrderSerializer.class) public class CIAppSortOrder { public static final CIAppSortOrder ASCENDING = new CIAppSortOrder("asc"); public static final CIAppSortOrder DESCENDING = new CIAppSortOrder("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class CIAppSortOrderSerializer extends StdSerializer { - public CIAppSortOrderSerializer(Class t) { - super(t); - } - - public CIAppSortOrderSerializer() { - this(null); - } - - @Override - public void serialize(CIAppSortOrder value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public CIAppSortOrderSerializer(Class t) { + super(t); + } + + public CIAppSortOrderSerializer() { + this(null); + } + + @Override + public void serialize(CIAppSortOrder value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppSortOrder object is equal to o. */ + /** + * Return true if this CIAppSortOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEvent.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEvent.java index 250bdc5aa52..81b3c645d7b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEvent.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEvent.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object description of test event after being processed and stored by Datadog. */ + +/** + *

Object description of test event after being processed and stored by Datadog.

+ */ @JsonPropertyOrder({ CIAppTestEvent.JSON_PROPERTY_ATTRIBUTES, CIAppTestEvent.JSON_PROPERTY_ID, CIAppTestEvent.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestEvent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CIAppEventAttributes attributes; @@ -38,42 +58,38 @@ public CIAppTestEvent attributes(CIAppEventAttributes attributes) { } /** - * JSON object containing all event attributes and their associated values. - * + *

JSON object containing all event attributes and their associated values.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppEventAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppEventAttributes getAttributes() { + return attributes; + } public void setAttributes(CIAppEventAttributes attributes) { this.attributes = attributes; } - public CIAppTestEvent id(String id) { this.id = id; return this; } /** - * Unique ID of the event. - * + *

Unique ID of the event.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public CIAppTestEvent type(CIAppTestEventTypeName type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public CIAppTestEvent type(CIAppTestEventTypeName type) { } /** - * Type of the event. - * + *

Type of the event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppTestEventTypeName getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppTestEventTypeName getType() { + return type; + } public void setType(CIAppTestEventTypeName type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CIAppTestEvent object is equal to o. */ + /** + * Return true if this CIAppTestEvent object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } CIAppTestEvent ciAppTestEvent = (CIAppTestEvent) o; - return Objects.equals(this.attributes, ciAppTestEvent.attributes) - && Objects.equals(this.id, ciAppTestEvent.id) - && Objects.equals(this.type, ciAppTestEvent.type); + return Objects.equals(this.attributes, ciAppTestEvent.attributes) && Objects.equals(this.id, ciAppTestEvent.id) && Objects.equals(this.type, ciAppTestEvent.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventTypeName.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventTypeName.java index 5e08708a4b7..036136d8dd0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventTypeName.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventTypeName.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event. */ +/** + *

Type of the event.

+ */ @JsonSerialize(using = CIAppTestEventTypeName.CIAppTestEventTypeNameSerializer.class) public class CIAppTestEventTypeName { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class CIAppTestEventTypeNameSerializer - extends StdSerializer { - public CIAppTestEventTypeNameSerializer(Class t) { - super(t); - } + public static class CIAppTestEventTypeNameSerializer extends StdSerializer { + public CIAppTestEventTypeNameSerializer(Class t) { + super(t); + } - public CIAppTestEventTypeNameSerializer() { - this(null); - } + public CIAppTestEventTypeNameSerializer() { + this(null); + } - @Override - public void serialize( - CIAppTestEventTypeName value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CIAppTestEventTypeName value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CIAppTestEventTypeName object is equal to o. */ + /** + * Return true if this CIAppTestEventTypeName object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsRequest.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsRequest.java index a0d793d4b5f..d6419774209 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsRequest.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The request for a tests search. */ + +/** + *

The request for a tests search.

+ */ @JsonPropertyOrder({ CIAppTestEventsRequest.JSON_PROPERTY_FILTER, CIAppTestEventsRequest.JSON_PROPERTY_OPTIONS, CIAppTestEventsRequest.JSON_PROPERTY_PAGE, CIAppTestEventsRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestEventsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private CIAppTestsQueryFilter filter; @@ -42,21 +62,19 @@ public CIAppTestEventsRequest filter(CIAppTestsQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppTestsQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppTestsQueryFilter getFilter() { + return filter; + } public void setFilter(CIAppTestsQueryFilter filter) { this.filter = filter; } - public CIAppTestEventsRequest options(CIAppQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -64,22 +82,20 @@ public CIAppTestEventsRequest options(CIAppQueryOptions options) { } /** - * Global query options that are used during the query. Only supply timezone or time offset, not - * both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Only supply timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppQueryOptions getOptions() { + return options; + } public void setOptions(CIAppQueryOptions options) { this.options = options; } - public CIAppTestEventsRequest page(CIAppQueryPageOptions page) { this.page = page; this.unparsed |= page.unparsed; @@ -87,21 +103,19 @@ public CIAppTestEventsRequest page(CIAppQueryPageOptions page) { } /** - * Paging attributes for listing events. - * + *

Paging attributes for listing events.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppQueryPageOptions getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppQueryPageOptions getPage() { + return page; + } public void setPage(CIAppQueryPageOptions page) { this.page = page; } - public CIAppTestEventsRequest sort(CIAppSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -109,25 +123,26 @@ public CIAppTestEventsRequest sort(CIAppSort sort) { } /** - * Sort parameters when querying events. - * + *

Sort parameters when querying events.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppSort getSort() { + return sort; + } public void setSort(CIAppSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this CIAppTestEventsRequest object is equal to o. */ + /** + * Return true if this CIAppTestEventsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +152,13 @@ public boolean equals(Object o) { return false; } CIAppTestEventsRequest ciAppTestEventsRequest = (CIAppTestEventsRequest) o; - return Objects.equals(this.filter, ciAppTestEventsRequest.filter) - && Objects.equals(this.options, ciAppTestEventsRequest.options) - && Objects.equals(this.page, ciAppTestEventsRequest.page) - && Objects.equals(this.sort, ciAppTestEventsRequest.sort); + return Objects.equals(this.filter, ciAppTestEventsRequest.filter) && Objects.equals(this.options, ciAppTestEventsRequest.options) && Objects.equals(this.page, ciAppTestEventsRequest.page) && Objects.equals(this.sort, ciAppTestEventsRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, options, page, sort); + return Objects.hash(filter,options,page,sort); } @Override @@ -161,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsResponse.java index a1e0c2c11a1..35bb277541d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestEventsResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object with all test events matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object with all test events matching the request and pagination information.

+ */ @JsonPropertyOrder({ CIAppTestEventsResponse.JSON_PROPERTY_DATA, CIAppTestEventsResponse.JSON_PROPERTY_LINKS, CIAppTestEventsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestEventsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public CIAppTestEventsResponse data(List data) { } return this; } - public CIAppTestEventsResponse addDataItem(CIAppTestEvent dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public CIAppTestEventsResponse addDataItem(CIAppTestEvent dataItem) { } /** - * Array of events matching the request. - * + *

Array of events matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public CIAppTestEventsResponse links(CIAppResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -73,21 +88,19 @@ public CIAppTestEventsResponse links(CIAppResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseLinks getLinks() { + return links; + } public void setLinks(CIAppResponseLinks links) { this.links = links; } - public CIAppTestEventsResponse meta(CIAppResponseMetadataWithPagination meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -95,22 +108,23 @@ public CIAppTestEventsResponse meta(CIAppResponseMetadataWithPagination meta) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseMetadataWithPagination getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseMetadataWithPagination getMeta() { + return meta; + } public void setMeta(CIAppResponseMetadataWithPagination meta) { this.meta = meta; } - /** Return true if this CIAppTestEventsResponse object is equal to o. */ + /** + * Return true if this CIAppTestEventsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } CIAppTestEventsResponse ciAppTestEventsResponse = (CIAppTestEventsResponse) o; - return Objects.equals(this.data, ciAppTestEventsResponse.data) - && Objects.equals(this.links, ciAppTestEventsResponse.links) - && Objects.equals(this.meta, ciAppTestEventsResponse.meta); + return Objects.equals(this.data, ciAppTestEventsResponse.data) && Objects.equals(this.links, ciAppTestEventsResponse.links) && Objects.equals(this.meta, ciAppTestEventsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregateRequest.java index c72df68f27c..8f3784811ff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregateRequest.java @@ -6,17 +6,32 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The object sent with the request to retrieve aggregation buckets of test events from your - * organization. + *

The object sent with the request to retrieve aggregation buckets of test events from your organization.

*/ @JsonPropertyOrder({ CIAppTestsAggregateRequest.JSON_PROPERTY_COMPUTE, @@ -24,10 +39,10 @@ CIAppTestsAggregateRequest.JSON_PROPERTY_GROUP_BY, CIAppTestsAggregateRequest.JSON_PROPERTY_OPTIONS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestsAggregateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private List compute = null; @@ -47,7 +62,6 @@ public CIAppTestsAggregateRequest compute(List compute) { } return this; } - public CIAppTestsAggregateRequest addComputeItem(CIAppCompute computeItem) { if (this.compute == null) { this.compute = new ArrayList<>(); @@ -58,21 +72,19 @@ public CIAppTestsAggregateRequest addComputeItem(CIAppCompute computeItem) { } /** - * The list of metrics or timeseries to compute for the retrieved buckets. - * + *

The list of metrics or timeseries to compute for the retrieved buckets.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCompute() { + return compute; + } public void setCompute(List compute) { this.compute = compute; } - public CIAppTestsAggregateRequest filter(CIAppTestsQueryFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -80,21 +92,19 @@ public CIAppTestsAggregateRequest filter(CIAppTestsQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppTestsQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppTestsQueryFilter getFilter() { + return filter; + } public void setFilter(CIAppTestsQueryFilter filter) { this.filter = filter; } - public CIAppTestsAggregateRequest groupBy(List groupBy) { this.groupBy = groupBy; for (CIAppTestsGroupBy item : groupBy) { @@ -102,7 +112,6 @@ public CIAppTestsAggregateRequest groupBy(List groupBy) { } return this; } - public CIAppTestsAggregateRequest addGroupByItem(CIAppTestsGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -113,21 +122,19 @@ public CIAppTestsAggregateRequest addGroupByItem(CIAppTestsGroupBy groupByItem) } /** - * The rules for the group-by. - * + *

The rules for the group-by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public CIAppTestsAggregateRequest options(CIAppQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -135,23 +142,24 @@ public CIAppTestsAggregateRequest options(CIAppQueryOptions options) { } /** - * Global query options that are used during the query. Only supply timezone or time offset, not - * both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Only supply timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppQueryOptions getOptions() { + return options; + } public void setOptions(CIAppQueryOptions options) { this.options = options; } - /** Return true if this CIAppTestsAggregateRequest object is equal to o. */ + /** + * Return true if this CIAppTestsAggregateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -161,15 +169,13 @@ public boolean equals(Object o) { return false; } CIAppTestsAggregateRequest ciAppTestsAggregateRequest = (CIAppTestsAggregateRequest) o; - return Objects.equals(this.compute, ciAppTestsAggregateRequest.compute) - && Objects.equals(this.filter, ciAppTestsAggregateRequest.filter) - && Objects.equals(this.groupBy, ciAppTestsAggregateRequest.groupBy) - && Objects.equals(this.options, ciAppTestsAggregateRequest.options); + return Objects.equals(this.compute, ciAppTestsAggregateRequest.compute) && Objects.equals(this.filter, ciAppTestsAggregateRequest.filter) && Objects.equals(this.groupBy, ciAppTestsAggregateRequest.groupBy) && Objects.equals(this.options, ciAppTestsAggregateRequest.options); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy, options); + return Objects.hash(compute,filter,groupBy,options); } @Override @@ -185,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregationBucketsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregationBucketsResponse.java index 85ae2e7f40c..d1f721e7a94 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregationBucketsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAggregationBucketsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The query results. */ -@JsonPropertyOrder({CIAppTestsAggregationBucketsResponse.JSON_PROPERTY_BUCKETS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The query results.

+ */ +@JsonPropertyOrder({ + CIAppTestsAggregationBucketsResponse.JSON_PROPERTY_BUCKETS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestsAggregationBucketsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BUCKETS = "buckets"; private List buckets = null; @@ -30,7 +50,6 @@ public CIAppTestsAggregationBucketsResponse buckets(List(); @@ -41,22 +60,23 @@ public CIAppTestsAggregationBucketsResponse addBucketsItem(CIAppTestsBucketRespo } /** - * The list of matching buckets, one item per bucket. - * + *

The list of matching buckets, one item per bucket.

* @return buckets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BUCKETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getBuckets() { - return buckets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getBuckets() { + return buckets; + } public void setBuckets(List buckets) { this.buckets = buckets; } - /** Return true if this CIAppTestsAggregationBucketsResponse object is equal to o. */ + /** + * Return true if this CIAppTestsAggregationBucketsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppTestsAggregationBucketsResponse ciAppTestsAggregationBucketsResponse = - (CIAppTestsAggregationBucketsResponse) o; + CIAppTestsAggregationBucketsResponse ciAppTestsAggregationBucketsResponse = (CIAppTestsAggregationBucketsResponse) o; return Objects.equals(this.buckets, ciAppTestsAggregationBucketsResponse.buckets); } + @Override public int hashCode() { return Objects.hash(buckets); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAnalyticsAggregateResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAnalyticsAggregateResponse.java index 0259d51ac41..a284971b03d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAnalyticsAggregateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsAnalyticsAggregateResponse.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response object for the test events aggregate API endpoint. */ + +/** + *

The response object for the test events aggregate API endpoint.

+ */ @JsonPropertyOrder({ CIAppTestsAnalyticsAggregateResponse.JSON_PROPERTY_DATA, CIAppTestsAnalyticsAggregateResponse.JSON_PROPERTY_LINKS, CIAppTestsAnalyticsAggregateResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestsAnalyticsAggregateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CIAppTestsAggregationBucketsResponse data; @@ -38,21 +58,19 @@ public CIAppTestsAnalyticsAggregateResponse data(CIAppTestsAggregationBucketsRes } /** - * The query results. - * + *

The query results.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppTestsAggregationBucketsResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppTestsAggregationBucketsResponse getData() { + return data; + } public void setData(CIAppTestsAggregationBucketsResponse data) { this.data = data; } - public CIAppTestsAnalyticsAggregateResponse links(CIAppResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -60,21 +78,19 @@ public CIAppTestsAnalyticsAggregateResponse links(CIAppResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseLinks getLinks() { + return links; + } public void setLinks(CIAppResponseLinks links) { this.links = links; } - public CIAppTestsAnalyticsAggregateResponse meta(CIAppResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -82,22 +98,23 @@ public CIAppTestsAnalyticsAggregateResponse meta(CIAppResponseMetadata meta) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppResponseMetadata getMeta() { + return meta; + } public void setMeta(CIAppResponseMetadata meta) { this.meta = meta; } - /** Return true if this CIAppTestsAnalyticsAggregateResponse object is equal to o. */ + /** + * Return true if this CIAppTestsAnalyticsAggregateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,16 +123,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CIAppTestsAnalyticsAggregateResponse ciAppTestsAnalyticsAggregateResponse = - (CIAppTestsAnalyticsAggregateResponse) o; - return Objects.equals(this.data, ciAppTestsAnalyticsAggregateResponse.data) - && Objects.equals(this.links, ciAppTestsAnalyticsAggregateResponse.links) - && Objects.equals(this.meta, ciAppTestsAnalyticsAggregateResponse.meta); + CIAppTestsAnalyticsAggregateResponse ciAppTestsAnalyticsAggregateResponse = (CIAppTestsAnalyticsAggregateResponse) o; + return Objects.equals(this.data, ciAppTestsAnalyticsAggregateResponse.data) && Objects.equals(this.links, ciAppTestsAnalyticsAggregateResponse.links) && Objects.equals(this.meta, ciAppTestsAnalyticsAggregateResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -130,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsBucketResponse.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsBucketResponse.java index f0a3b239d87..bbf94af957e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsBucketResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsBucketResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Bucket values. */ +/** + *

Bucket values.

+ */ @JsonPropertyOrder({ CIAppTestsBucketResponse.JSON_PROPERTY_BY, CIAppTestsBucketResponse.JSON_PROPERTY_COMPUTES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestsBucketResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BY = "by"; private Map by = null; @@ -33,7 +51,6 @@ public CIAppTestsBucketResponse by(Map by) { this.by = by; return this; } - public CIAppTestsBucketResponse putByItem(String key, Object byItem) { if (this.by == null) { this.by = new HashMap<>(); @@ -43,28 +60,24 @@ public CIAppTestsBucketResponse putByItem(String key, Object byItem) { } /** - * The key-value pairs for each group-by. - * + *

The key-value pairs for each group-by.

* @return by - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getBy() { - return by; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getBy() { + return by; + } public void setBy(Map by) { this.by = by; } - public CIAppTestsBucketResponse computes(Map computes) { this.computes = computes; return this; } - - public CIAppTestsBucketResponse putComputesItem( - String key, CIAppAggregateBucketValue computesItem) { + public CIAppTestsBucketResponse putComputesItem(String key, CIAppAggregateBucketValue computesItem) { if (this.computes == null) { this.computes = new HashMap<>(); } @@ -73,22 +86,23 @@ public CIAppTestsBucketResponse putComputesItem( } /** - * A map of the metric name to value for regular compute, or a list of values for a timeseries. - * + *

A map of the metric name to value for regular compute, or a list of values for a timeseries.

* @return computes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getComputes() { - return computes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getComputes() { + return computes; + } public void setComputes(Map computes) { this.computes = computes; } - /** Return true if this CIAppTestsBucketResponse object is equal to o. */ + /** + * Return true if this CIAppTestsBucketResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -98,13 +112,13 @@ public boolean equals(Object o) { return false; } CIAppTestsBucketResponse ciAppTestsBucketResponse = (CIAppTestsBucketResponse) o; - return Objects.equals(this.by, ciAppTestsBucketResponse.by) - && Objects.equals(this.computes, ciAppTestsBucketResponse.computes); + return Objects.equals(this.by, ciAppTestsBucketResponse.by) && Objects.equals(this.computes, ciAppTestsBucketResponse.computes); } + @Override public int hashCode() { - return Objects.hash(by, computes); + return Objects.hash(by,computes); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsGroupBy.java index 88757d41238..1d110c91d60 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsGroupBy.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A group-by rule. */ + +/** + *

A group-by rule.

+ */ @JsonPropertyOrder({ CIAppTestsGroupBy.JSON_PROPERTY_FACET, CIAppTestsGroupBy.JSON_PROPERTY_HISTOGRAM, @@ -22,10 +41,10 @@ CIAppTestsGroupBy.JSON_PROPERTY_SORT, CIAppTestsGroupBy.JSON_PROPERTY_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestsGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -48,30 +67,27 @@ public CIAppTestsGroupBy() {} @JsonCreator public CIAppTestsGroupBy( - @JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public CIAppTestsGroupBy facet(String facet) { this.facet = facet; return this; } /** - * The name of the facet to use (required). - * + *

The name of the facet to use (required).

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public CIAppTestsGroupBy histogram(CIAppGroupByHistogram histogram) { this.histogram = histogram; this.unparsed |= histogram.unparsed; @@ -79,43 +95,39 @@ public CIAppTestsGroupBy histogram(CIAppGroupByHistogram histogram) { } /** - * Used to perform a histogram computation (only for measure facets). At most, 100 buckets are - * allowed, the number of buckets is (max - min)/interval. - * + *

Used to perform a histogram computation (only for measure facets). + * At most, 100 buckets are allowed, the number of buckets is (max - min)/interval.

* @return histogram - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HISTOGRAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppGroupByHistogram getHistogram() { - return histogram; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HISTOGRAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppGroupByHistogram getHistogram() { + return histogram; + } public void setHistogram(CIAppGroupByHistogram histogram) { this.histogram = histogram; } - public CIAppTestsGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * The maximum buckets to return for this group-by. - * + *

The maximum buckets to return for this group-by.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public CIAppTestsGroupBy missing(CIAppGroupByMissing missing) { this.missing = missing; this.unparsed |= missing.unparsed; @@ -123,21 +135,19 @@ public CIAppTestsGroupBy missing(CIAppGroupByMissing missing) { } /** - * The value to use for logs that don't have the facet used to group-by. - * + *

The value to use for logs that don't have the facet used to group-by.

* @return missing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MISSING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppGroupByMissing getMissing() { - return missing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MISSING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppGroupByMissing getMissing() { + return missing; + } public void setMissing(CIAppGroupByMissing missing) { this.missing = missing; } - public CIAppTestsGroupBy sort(CIAppAggregateSort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -145,21 +155,19 @@ public CIAppTestsGroupBy sort(CIAppAggregateSort sort) { } /** - * A sort rule. - * + *

A sort rule.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppAggregateSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppAggregateSort getSort() { + return sort; + } public void setSort(CIAppAggregateSort sort) { this.sort = sort; } - public CIAppTestsGroupBy total(CIAppGroupByTotal total) { this.total = total; this.unparsed |= total.unparsed; @@ -167,22 +175,23 @@ public CIAppTestsGroupBy total(CIAppGroupByTotal total) { } /** - * A resulting object to put the given computes in over all the matching records. - * + *

A resulting object to put the given computes in over all the matching records.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CIAppGroupByTotal getTotal() { - return total; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CIAppGroupByTotal getTotal() { + return total; + } public void setTotal(CIAppGroupByTotal total) { this.total = total; } - /** Return true if this CIAppTestsGroupBy object is equal to o. */ + /** + * Return true if this CIAppTestsGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -192,17 +201,13 @@ public boolean equals(Object o) { return false; } CIAppTestsGroupBy ciAppTestsGroupBy = (CIAppTestsGroupBy) o; - return Objects.equals(this.facet, ciAppTestsGroupBy.facet) - && Objects.equals(this.histogram, ciAppTestsGroupBy.histogram) - && Objects.equals(this.limit, ciAppTestsGroupBy.limit) - && Objects.equals(this.missing, ciAppTestsGroupBy.missing) - && Objects.equals(this.sort, ciAppTestsGroupBy.sort) - && Objects.equals(this.total, ciAppTestsGroupBy.total); + return Objects.equals(this.facet, ciAppTestsGroupBy.facet) && Objects.equals(this.histogram, ciAppTestsGroupBy.histogram) && Objects.equals(this.limit, ciAppTestsGroupBy.limit) && Objects.equals(this.missing, ciAppTestsGroupBy.missing) && Objects.equals(this.sort, ciAppTestsGroupBy.sort) && Objects.equals(this.total, ciAppTestsGroupBy.total); } + @Override public int hashCode() { - return Objects.hash(facet, histogram, limit, missing, sort, total); + return Objects.hash(facet,histogram,limit,missing,sort,total); } @Override @@ -220,7 +225,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsQueryFilter.java index 168e537d7b0..6c79a7743d0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppTestsQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppTestsQueryFilter.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The search and filter query settings. */ + +/** + *

The search and filter query settings.

+ */ @JsonPropertyOrder({ CIAppTestsQueryFilter.JSON_PROPERTY_FROM, CIAppTestsQueryFilter.JSON_PROPERTY_QUERY, CIAppTestsQueryFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppTestsQueryFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from = "now-15m"; @@ -37,66 +57,61 @@ public CIAppTestsQueryFilter from(String from) { } /** - * The minimum time for the requested events; supports date, math, and regular timestamps (in - * milliseconds). - * + *

The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds).

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public CIAppTestsQueryFilter query(String query) { this.query = query; return this; } /** - * The search query following the Log search syntax. - * + *

The search query following the Log search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public CIAppTestsQueryFilter to(String to) { this.to = to; return this; } /** - * The maximum time for the requested events, supports date, math, and regular timestamps (in - * milliseconds). - * + *

The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds).

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this CIAppTestsQueryFilter object is equal to o. */ + /** + * Return true if this CIAppTestsQueryFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +121,13 @@ public boolean equals(Object o) { return false; } CIAppTestsQueryFilter ciAppTestsQueryFilter = (CIAppTestsQueryFilter) o; - return Objects.equals(this.from, ciAppTestsQueryFilter.from) - && Objects.equals(this.query, ciAppTestsQueryFilter.query) - && Objects.equals(this.to, ciAppTestsQueryFilter.to); + return Objects.equals(this.from, ciAppTestsQueryFilter.from) && Objects.equals(this.query, ciAppTestsQueryFilter.query) && Objects.equals(this.to, ciAppTestsQueryFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, query, to); + return Objects.hash(from,query,to); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CIAppWarning.java b/src/main/java/com/datadog/api/client/v2/model/CIAppWarning.java index c8280df8b73..87fa37266c0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CIAppWarning.java +++ b/src/main/java/com/datadog/api/client/v2/model/CIAppWarning.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A warning message indicating something that went wrong with the query. */ + +/** + *

A warning message indicating something that went wrong with the query.

+ */ @JsonPropertyOrder({ CIAppWarning.JSON_PROPERTY_CODE, CIAppWarning.JSON_PROPERTY_DETAIL, CIAppWarning.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CIAppWarning { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -37,64 +57,61 @@ public CIAppWarning code(String code) { } /** - * A unique code for this type of warning. - * + *

A unique code for this type of warning.

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public CIAppWarning detail(String detail) { this.detail = detail; return this; } /** - * A detailed explanation of this specific warning. - * + *

A detailed explanation of this specific warning.

* @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } public void setDetail(String detail) { this.detail = detail; } - public CIAppWarning title(String title) { this.title = title; return this; } /** - * A short human-readable summary of the warning. - * + *

A short human-readable summary of the warning.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this CIAppWarning object is equal to o. */ + /** + * Return true if this CIAppWarning object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } CIAppWarning ciAppWarning = (CIAppWarning) o; - return Objects.equals(this.code, ciAppWarning.code) - && Objects.equals(this.detail, ciAppWarning.detail) - && Objects.equals(this.title, ciAppWarning.title); + return Objects.equals(this.code, ciAppWarning.code) && Objects.equals(this.detail, ciAppWarning.detail) && Objects.equals(this.title, ciAppWarning.title); } + @Override public int hashCode() { - return Objects.hash(code, detail, title); + return Objects.hash(code,detail,title); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ChargebackBreakdown.java b/src/main/java/com/datadog/api/client/v2/model/ChargebackBreakdown.java index e10fe830ffe..1835bcef1c3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ChargebackBreakdown.java +++ b/src/main/java/com/datadog/api/client/v2/model/ChargebackBreakdown.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Charges breakdown. */ + +/** + *

Charges breakdown.

+ */ @JsonPropertyOrder({ ChargebackBreakdown.JSON_PROPERTY_CHARGE_TYPE, ChargebackBreakdown.JSON_PROPERTY_COST, ChargebackBreakdown.JSON_PROPERTY_PRODUCT_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ChargebackBreakdown { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHARGE_TYPE = "charge_type"; private String chargeType; @@ -37,64 +57,61 @@ public ChargebackBreakdown chargeType(String chargeType) { } /** - * The type of charge for a particular product. - * + *

The type of charge for a particular product.

* @return chargeType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHARGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getChargeType() { - return chargeType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHARGE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getChargeType() { + return chargeType; + } public void setChargeType(String chargeType) { this.chargeType = chargeType; } - public ChargebackBreakdown cost(Double cost) { this.cost = cost; return this; } /** - * The cost for a particular product and charge type during a given month. - * + *

The cost for a particular product and charge type during a given month.

* @return cost - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getCost() { - return cost; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getCost() { + return cost; + } public void setCost(Double cost) { this.cost = cost; } - public ChargebackBreakdown productName(String productName) { this.productName = productName; return this; } /** - * The product for which cost is being reported. - * + *

The product for which cost is being reported.

* @return productName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRODUCT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProductName() { - return productName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProductName() { + return productName; + } public void setProductName(String productName) { this.productName = productName; } - /** Return true if this ChargebackBreakdown object is equal to o. */ + /** + * Return true if this ChargebackBreakdown object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } ChargebackBreakdown chargebackBreakdown = (ChargebackBreakdown) o; - return Objects.equals(this.chargeType, chargebackBreakdown.chargeType) - && Objects.equals(this.cost, chargebackBreakdown.cost) - && Objects.equals(this.productName, chargebackBreakdown.productName); + return Objects.equals(this.chargeType, chargebackBreakdown.chargeType) && Objects.equals(this.cost, chargebackBreakdown.cost) && Objects.equals(this.productName, chargebackBreakdown.productName); } + @Override public int hashCode() { - return Objects.hash(chargeType, cost, productName); + return Objects.hash(chargeType,cost,productName); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationComplianceRuleOptions.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationComplianceRuleOptions.java index cccb1990c06..522782b7a49 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationComplianceRuleOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationComplianceRuleOptions.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Options for cloud_configuration rules. Fields resourceType and regoRule - * are mandatory when managing custom cloud_configuration rules. + *

Options for cloud_configuration rules. + * Fields resourceType and regoRule are mandatory when managing custom cloud_configuration rules.

*/ @JsonPropertyOrder({ CloudConfigurationComplianceRuleOptions.JSON_PROPERTY_COMPLEX_RULE, CloudConfigurationComplianceRuleOptions.JSON_PROPERTY_REGO_RULE, CloudConfigurationComplianceRuleOptions.JSON_PROPERTY_RESOURCE_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudConfigurationComplianceRuleOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPLEX_RULE = "complexRule"; private Boolean complexRule; @@ -40,22 +58,20 @@ public CloudConfigurationComplianceRuleOptions complexRule(Boolean complexRule) } /** - * Whether the rule is a complex one. Must be set to true if regoRule.resourceTypes - * contains more than one item. Defaults to false. - * + *

Whether the rule is a complex one. + * Must be set to true if regoRule.resourceTypes contains more than one item. Defaults to false.

* @return complexRule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPLEX_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getComplexRule() { - return complexRule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLEX_RULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getComplexRule() { + return complexRule; + } public void setComplexRule(Boolean complexRule) { this.complexRule = complexRule; } - public CloudConfigurationComplianceRuleOptions regoRule(CloudConfigurationRegoRule regoRule) { this.regoRule = regoRule; this.unparsed |= regoRule.unparsed; @@ -63,44 +79,42 @@ public CloudConfigurationComplianceRuleOptions regoRule(CloudConfigurationRegoRu } /** - * Rule details. - * + *

Rule details.

* @return regoRule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGO_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudConfigurationRegoRule getRegoRule() { - return regoRule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGO_RULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudConfigurationRegoRule getRegoRule() { + return regoRule; + } public void setRegoRule(CloudConfigurationRegoRule regoRule) { this.regoRule = regoRule; } - public CloudConfigurationComplianceRuleOptions resourceType(String resourceType) { this.resourceType = resourceType; return this; } /** - * Main resource type to be checked by the rule. It should be specified again in - * regoRule.resourceTypes. - * + *

Main resource type to be checked by the rule. It should be specified again in regoRule.resourceTypes.

* @return resourceType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResourceType() { - return resourceType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceType() { + return resourceType; + } public void setResourceType(String resourceType) { this.resourceType = resourceType; } - /** Return true if this CloudConfigurationComplianceRuleOptions object is equal to o. */ + /** + * Return true if this CloudConfigurationComplianceRuleOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,16 +123,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudConfigurationComplianceRuleOptions cloudConfigurationComplianceRuleOptions = - (CloudConfigurationComplianceRuleOptions) o; - return Objects.equals(this.complexRule, cloudConfigurationComplianceRuleOptions.complexRule) - && Objects.equals(this.regoRule, cloudConfigurationComplianceRuleOptions.regoRule) - && Objects.equals(this.resourceType, cloudConfigurationComplianceRuleOptions.resourceType); + CloudConfigurationComplianceRuleOptions cloudConfigurationComplianceRuleOptions = (CloudConfigurationComplianceRuleOptions) o; + return Objects.equals(this.complexRule, cloudConfigurationComplianceRuleOptions.complexRule) && Objects.equals(this.regoRule, cloudConfigurationComplianceRuleOptions.regoRule) && Objects.equals(this.resourceType, cloudConfigurationComplianceRuleOptions.resourceType); } + @Override public int hashCode() { - return Objects.hash(complexRule, regoRule, resourceType); + return Objects.hash(complexRule,regoRule,resourceType); } @Override @@ -133,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRegoRule.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRegoRule.java index 879a4398d3b..00cf8ff0667 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRegoRule.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRegoRule.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Rule details. */ +/** + *

Rule details.

+ */ @JsonPropertyOrder({ CloudConfigurationRegoRule.JSON_PROPERTY_POLICY, CloudConfigurationRegoRule.JSON_PROPERTY_RESOURCE_TYPES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudConfigurationRegoRule { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_POLICY = "policy"; private String policy; @@ -34,60 +51,55 @@ public CloudConfigurationRegoRule() {} @JsonCreator public CloudConfigurationRegoRule( - @JsonProperty(required = true, value = JSON_PROPERTY_POLICY) String policy, - @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPES) - List resourceTypes) { - this.policy = policy; - this.resourceTypes = resourceTypes; + @JsonProperty(required=true, value=JSON_PROPERTY_POLICY)String policy, + @JsonProperty(required=true, value=JSON_PROPERTY_RESOURCE_TYPES)List resourceTypes) { + this.policy = policy; + this.resourceTypes = resourceTypes; } - public CloudConfigurationRegoRule policy(String policy) { this.policy = policy; return this; } /** - * The policy written in rego, see: - * https://www.openpolicyagent.org/docs/latest/policy-language/ - * + *

The policy written in rego, see: https://www.openpolicyagent.org/docs/latest/policy-language/

* @return policy - */ - @JsonProperty(JSON_PROPERTY_POLICY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPolicy() { - return policy; - } - + **/ + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPolicy() { + return policy; + } public void setPolicy(String policy) { this.policy = policy; } - public CloudConfigurationRegoRule resourceTypes(List resourceTypes) { this.resourceTypes = resourceTypes; return this; } - public CloudConfigurationRegoRule addResourceTypesItem(String resourceTypesItem) { this.resourceTypes.add(resourceTypesItem); return this; } /** - * List of resource types that will be evaluated upon. Must have at least one element. - * + *

List of resource types that will be evaluated upon. Must have at least one element.

* @return resourceTypes - */ - @JsonProperty(JSON_PROPERTY_RESOURCE_TYPES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getResourceTypes() { - return resourceTypes; - } - + **/ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getResourceTypes() { + return resourceTypes; + } public void setResourceTypes(List resourceTypes) { this.resourceTypes = resourceTypes; } - /** Return true if this CloudConfigurationRegoRule object is equal to o. */ + /** + * Return true if this CloudConfigurationRegoRule object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +109,13 @@ public boolean equals(Object o) { return false; } CloudConfigurationRegoRule cloudConfigurationRegoRule = (CloudConfigurationRegoRule) o; - return Objects.equals(this.policy, cloudConfigurationRegoRule.policy) - && Objects.equals(this.resourceTypes, cloudConfigurationRegoRule.resourceTypes); + return Objects.equals(this.policy, cloudConfigurationRegoRule.policy) && Objects.equals(this.resourceTypes, cloudConfigurationRegoRule.resourceTypes); } + @Override public int hashCode() { - return Objects.hash(policy, resourceTypes); + return Objects.hash(policy,resourceTypes); } @Override @@ -117,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCaseCreate.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCaseCreate.java index ee5efaea7a6..941dbf7984b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCaseCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCaseCreate.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Description of signals. */ +/** + *

Description of signals.

+ */ @JsonPropertyOrder({ CloudConfigurationRuleCaseCreate.JSON_PROPERTY_NOTIFICATIONS, CloudConfigurationRuleCaseCreate.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudConfigurationRuleCaseCreate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NOTIFICATIONS = "notifications"; private List notifications = null; @@ -34,17 +51,14 @@ public CloudConfigurationRuleCaseCreate() {} @JsonCreator public CloudConfigurationRuleCaseCreate( - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) - SecurityMonitoringRuleSeverity status) { - this.status = status; - this.unparsed |= !status.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_STATUS)SecurityMonitoringRuleSeverity status) { + this.status = status; + this.unparsed |= !status.isValid(); } - public CloudConfigurationRuleCaseCreate notifications(List notifications) { this.notifications = notifications; return this; } - public CloudConfigurationRuleCaseCreate addNotificationsItem(String notificationsItem) { if (this.notifications == null) { this.notifications = new ArrayList<>(); @@ -54,21 +68,19 @@ public CloudConfigurationRuleCaseCreate addNotificationsItem(String notification } /** - * Notification targets for each rule case. - * + *

Notification targets for each rule case.

* @return notifications - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotifications() { - return notifications; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotifications() { + return notifications; + } public void setNotifications(List notifications) { this.notifications = notifications; } - public CloudConfigurationRuleCaseCreate status(SecurityMonitoringRuleSeverity status) { this.status = status; this.unparsed |= !status.isValid(); @@ -76,24 +88,25 @@ public CloudConfigurationRuleCaseCreate status(SecurityMonitoringRuleSeverity st } /** - * Severity of the Security Signal. - * + *

Severity of the Security Signal.

* @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringRuleSeverity getStatus() { - return status; - } - + **/ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringRuleSeverity getStatus() { + return status; + } public void setStatus(SecurityMonitoringRuleSeverity status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this CloudConfigurationRuleCaseCreate object is equal to o. */ + /** + * Return true if this CloudConfigurationRuleCaseCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,15 +115,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudConfigurationRuleCaseCreate cloudConfigurationRuleCaseCreate = - (CloudConfigurationRuleCaseCreate) o; - return Objects.equals(this.notifications, cloudConfigurationRuleCaseCreate.notifications) - && Objects.equals(this.status, cloudConfigurationRuleCaseCreate.status); + CloudConfigurationRuleCaseCreate cloudConfigurationRuleCaseCreate = (CloudConfigurationRuleCaseCreate) o; + return Objects.equals(this.notifications, cloudConfigurationRuleCaseCreate.notifications) && Objects.equals(this.status, cloudConfigurationRuleCaseCreate.status); } + @Override public int hashCode() { - return Objects.hash(notifications, status); + return Objects.hash(notifications,status); } @Override @@ -124,7 +136,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleComplianceSignalOptions.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleComplianceSignalOptions.java index b9838dc1f3c..eab04a16ab3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleComplianceSignalOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleComplianceSignalOptions.java @@ -6,59 +6,71 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** How to generate compliance signals. Useful for cloud_configuration rules only. */ +/** + *

How to generate compliance signals. Useful for cloud_configuration rules only.

+ */ @JsonPropertyOrder({ CloudConfigurationRuleComplianceSignalOptions.JSON_PROPERTY_USER_ACTIVATION_STATUS, CloudConfigurationRuleComplianceSignalOptions.JSON_PROPERTY_USER_GROUP_BY_FIELDS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudConfigurationRuleComplianceSignalOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USER_ACTIVATION_STATUS = "userActivationStatus"; private Boolean userActivationStatus; public static final String JSON_PROPERTY_USER_GROUP_BY_FIELDS = "userGroupByFields"; private List userGroupByFields = null; - public CloudConfigurationRuleComplianceSignalOptions userActivationStatus( - Boolean userActivationStatus) { + public CloudConfigurationRuleComplianceSignalOptions userActivationStatus(Boolean userActivationStatus) { this.userActivationStatus = userActivationStatus; return this; } /** - * Whether signals will be sent. - * + *

Whether signals will be sent.

* @return userActivationStatus - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER_ACTIVATION_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUserActivationStatus() { - return userActivationStatus; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ACTIVATION_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUserActivationStatus() { + return userActivationStatus; + } public void setUserActivationStatus(Boolean userActivationStatus) { this.userActivationStatus = userActivationStatus; } - - public CloudConfigurationRuleComplianceSignalOptions userGroupByFields( - List userGroupByFields) { + public CloudConfigurationRuleComplianceSignalOptions userGroupByFields(List userGroupByFields) { this.userGroupByFields = userGroupByFields; return this; } - - public CloudConfigurationRuleComplianceSignalOptions addUserGroupByFieldsItem( - String userGroupByFieldsItem) { + public CloudConfigurationRuleComplianceSignalOptions addUserGroupByFieldsItem(String userGroupByFieldsItem) { if (this.userGroupByFields == null) { this.userGroupByFields = new ArrayList<>(); } @@ -67,22 +79,23 @@ public CloudConfigurationRuleComplianceSignalOptions addUserGroupByFieldsItem( } /** - * Fields to use to group findings by when sending signals. - * + *

Fields to use to group findings by when sending signals.

* @return userGroupByFields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER_GROUP_BY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUserGroupByFields() { - return userGroupByFields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_GROUP_BY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUserGroupByFields() { + return userGroupByFields; + } public void setUserGroupByFields(List userGroupByFields) { this.userGroupByFields = userGroupByFields; } - /** Return true if this CloudConfigurationRuleComplianceSignalOptions object is equal to o. */ + /** + * Return true if this CloudConfigurationRuleComplianceSignalOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,35 +104,29 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudConfigurationRuleComplianceSignalOptions cloudConfigurationRuleComplianceSignalOptions = - (CloudConfigurationRuleComplianceSignalOptions) o; - return Objects.equals( - this.userActivationStatus, - cloudConfigurationRuleComplianceSignalOptions.userActivationStatus) - && Objects.equals( - this.userGroupByFields, - cloudConfigurationRuleComplianceSignalOptions.userGroupByFields); + CloudConfigurationRuleComplianceSignalOptions cloudConfigurationRuleComplianceSignalOptions = (CloudConfigurationRuleComplianceSignalOptions) o; + return Objects.equals(this.userActivationStatus, cloudConfigurationRuleComplianceSignalOptions.userActivationStatus) && Objects.equals(this.userGroupByFields, cloudConfigurationRuleComplianceSignalOptions.userGroupByFields); } + @Override public int hashCode() { - return Objects.hash(userActivationStatus, userGroupByFields); + return Objects.hash(userActivationStatus,userGroupByFields); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudConfigurationRuleComplianceSignalOptions {\n"); - sb.append(" userActivationStatus: ") - .append(toIndentedString(userActivationStatus)) - .append("\n"); + sb.append(" userActivationStatus: ").append(toIndentedString(userActivationStatus)).append("\n"); sb.append(" userGroupByFields: ").append(toIndentedString(userGroupByFields)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCreatePayload.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCreatePayload.java index b5a6a821e1f..82080ccae9d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCreatePayload.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleCreatePayload.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Create a new cloud configuration rule. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Create a new cloud configuration rule.

+ */ @JsonPropertyOrder({ CloudConfigurationRuleCreatePayload.JSON_PROPERTY_CASES, CloudConfigurationRuleCreatePayload.JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS, @@ -26,10 +43,10 @@ CloudConfigurationRuleCreatePayload.JSON_PROPERTY_TAGS, CloudConfigurationRuleCreatePayload.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudConfigurationRuleCreatePayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CASES = "cases"; private List cases = new ArrayList<>(); @@ -58,25 +75,21 @@ public CloudConfigurationRuleCreatePayload() {} @JsonCreator public CloudConfigurationRuleCreatePayload( - @JsonProperty(required = true, value = JSON_PROPERTY_CASES) - List cases, - @JsonProperty(required = true, value = JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions, - @JsonProperty(required = true, value = JSON_PROPERTY_IS_ENABLED) Boolean isEnabled, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) - CloudConfigurationRuleOptions options) { - this.cases = cases; - this.complianceSignalOptions = complianceSignalOptions; - this.unparsed |= complianceSignalOptions.unparsed; - this.isEnabled = isEnabled; - this.message = message; - this.name = name; - this.options = options; - this.unparsed |= options.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CASES)List cases, + @JsonProperty(required=true, value=JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS)CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions, + @JsonProperty(required=true, value=JSON_PROPERTY_IS_ENABLED)Boolean isEnabled, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPTIONS)CloudConfigurationRuleOptions options) { + this.cases = cases; + this.complianceSignalOptions = complianceSignalOptions; + this.unparsed |= complianceSignalOptions.unparsed; + this.isEnabled = isEnabled; + this.message = message; + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; } - public CloudConfigurationRuleCreatePayload cases(List cases) { this.cases = cases; for (CloudConfigurationRuleCaseCreate item : cases) { @@ -84,113 +97,98 @@ public CloudConfigurationRuleCreatePayload cases(ListDescription of generated findings and signals (severity and channels to be notified in case of a signal). Must contain exactly one item.

* @return cases - */ - @JsonProperty(JSON_PROPERTY_CASES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCases() { - return cases; - } - + **/ + @JsonProperty(JSON_PROPERTY_CASES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCases() { + return cases; + } public void setCases(List cases) { this.cases = cases; } - - public CloudConfigurationRuleCreatePayload complianceSignalOptions( - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { + public CloudConfigurationRuleCreatePayload complianceSignalOptions(CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { this.complianceSignalOptions = complianceSignalOptions; this.unparsed |= complianceSignalOptions.unparsed; return this; } /** - * How to generate compliance signals. Useful for cloud_configuration rules only. - * + *

How to generate compliance signals. Useful for cloud_configuration rules only.

* @return complianceSignalOptions - */ - @JsonProperty(JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudConfigurationRuleComplianceSignalOptions getComplianceSignalOptions() { - return complianceSignalOptions; - } - - public void setComplianceSignalOptions( - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { + **/ + @JsonProperty(JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudConfigurationRuleComplianceSignalOptions getComplianceSignalOptions() { + return complianceSignalOptions; + } + public void setComplianceSignalOptions(CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { this.complianceSignalOptions = complianceSignalOptions; } - public CloudConfigurationRuleCreatePayload isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the rule is enabled. - * + *

Whether the rule is enabled.

* @return isEnabled - */ - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public CloudConfigurationRuleCreatePayload message(String message) { this.message = message; return this; } /** - * Message in markdown format for generated findings and signals. - * + *

Message in markdown format for generated findings and signals.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public CloudConfigurationRuleCreatePayload name(String name) { this.name = name; return this; } /** - * The name of the rule. - * + *

The name of the rule.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public CloudConfigurationRuleCreatePayload options(CloudConfigurationRuleOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -198,25 +196,22 @@ public CloudConfigurationRuleCreatePayload options(CloudConfigurationRuleOptions } /** - * Options on cloud configuration rules. - * + *

Options on cloud configuration rules.

* @return options - */ - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudConfigurationRuleOptions getOptions() { - return options; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudConfigurationRuleOptions getOptions() { + return options; + } public void setOptions(CloudConfigurationRuleOptions options) { this.options = options; } - public CloudConfigurationRuleCreatePayload tags(List tags) { this.tags = tags; return this; } - public CloudConfigurationRuleCreatePayload addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -226,21 +221,19 @@ public CloudConfigurationRuleCreatePayload addTagsItem(String tagsItem) { } /** - * Tags for generated findings and signals. - * + *

Tags for generated findings and signals.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public CloudConfigurationRuleCreatePayload type(CloudConfigurationRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -248,25 +241,26 @@ public CloudConfigurationRuleCreatePayload type(CloudConfigurationRuleType type) } /** - * The rule type. - * + *

The rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudConfigurationRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudConfigurationRuleType getType() { + return type; + } public void setType(CloudConfigurationRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudConfigurationRuleCreatePayload object is equal to o. */ + /** + * Return true if this CloudConfigurationRuleCreatePayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -275,24 +269,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudConfigurationRuleCreatePayload cloudConfigurationRuleCreatePayload = - (CloudConfigurationRuleCreatePayload) o; - return Objects.equals(this.cases, cloudConfigurationRuleCreatePayload.cases) - && Objects.equals( - this.complianceSignalOptions, - cloudConfigurationRuleCreatePayload.complianceSignalOptions) - && Objects.equals(this.isEnabled, cloudConfigurationRuleCreatePayload.isEnabled) - && Objects.equals(this.message, cloudConfigurationRuleCreatePayload.message) - && Objects.equals(this.name, cloudConfigurationRuleCreatePayload.name) - && Objects.equals(this.options, cloudConfigurationRuleCreatePayload.options) - && Objects.equals(this.tags, cloudConfigurationRuleCreatePayload.tags) - && Objects.equals(this.type, cloudConfigurationRuleCreatePayload.type); + CloudConfigurationRuleCreatePayload cloudConfigurationRuleCreatePayload = (CloudConfigurationRuleCreatePayload) o; + return Objects.equals(this.cases, cloudConfigurationRuleCreatePayload.cases) && Objects.equals(this.complianceSignalOptions, cloudConfigurationRuleCreatePayload.complianceSignalOptions) && Objects.equals(this.isEnabled, cloudConfigurationRuleCreatePayload.isEnabled) && Objects.equals(this.message, cloudConfigurationRuleCreatePayload.message) && Objects.equals(this.name, cloudConfigurationRuleCreatePayload.name) && Objects.equals(this.options, cloudConfigurationRuleCreatePayload.options) && Objects.equals(this.tags, cloudConfigurationRuleCreatePayload.tags) && Objects.equals(this.type, cloudConfigurationRuleCreatePayload.type); } + @Override public int hashCode() { - return Objects.hash( - cases, complianceSignalOptions, isEnabled, message, name, options, tags, type); + return Objects.hash(cases,complianceSignalOptions,isEnabled,message,name,options,tags,type); } @Override @@ -300,9 +284,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudConfigurationRuleCreatePayload {\n"); sb.append(" cases: ").append(toIndentedString(cases)).append("\n"); - sb.append(" complianceSignalOptions: ") - .append(toIndentedString(complianceSignalOptions)) - .append("\n"); + sb.append(" complianceSignalOptions: ").append(toIndentedString(complianceSignalOptions)).append("\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -314,7 +296,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleOptions.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleOptions.java index caa66f88fee..d7c1ff3d2f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleOptions.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Options on cloud configuration rules. */ -@JsonPropertyOrder({CloudConfigurationRuleOptions.JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Options on cloud configuration rules.

+ */ +@JsonPropertyOrder({ + CloudConfigurationRuleOptions.JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudConfigurationRuleOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS = "complianceRuleOptions"; private CloudConfigurationComplianceRuleOptions complianceRuleOptions; @@ -26,37 +47,34 @@ public CloudConfigurationRuleOptions() {} @JsonCreator public CloudConfigurationRuleOptions( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS) - CloudConfigurationComplianceRuleOptions complianceRuleOptions) { - this.complianceRuleOptions = complianceRuleOptions; - this.unparsed |= complianceRuleOptions.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS)CloudConfigurationComplianceRuleOptions complianceRuleOptions) { + this.complianceRuleOptions = complianceRuleOptions; + this.unparsed |= complianceRuleOptions.unparsed; } - - public CloudConfigurationRuleOptions complianceRuleOptions( - CloudConfigurationComplianceRuleOptions complianceRuleOptions) { + public CloudConfigurationRuleOptions complianceRuleOptions(CloudConfigurationComplianceRuleOptions complianceRuleOptions) { this.complianceRuleOptions = complianceRuleOptions; this.unparsed |= complianceRuleOptions.unparsed; return this; } /** - * Options for cloud_configuration rules. Fields resourceType and regoRule - * are mandatory when managing custom cloud_configuration rules. - * + *

Options for cloud_configuration rules. + * Fields resourceType and regoRule are mandatory when managing custom cloud_configuration rules.

* @return complianceRuleOptions - */ - @JsonProperty(JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudConfigurationComplianceRuleOptions getComplianceRuleOptions() { - return complianceRuleOptions; - } - - public void setComplianceRuleOptions( - CloudConfigurationComplianceRuleOptions complianceRuleOptions) { + **/ + @JsonProperty(JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudConfigurationComplianceRuleOptions getComplianceRuleOptions() { + return complianceRuleOptions; + } + public void setComplianceRuleOptions(CloudConfigurationComplianceRuleOptions complianceRuleOptions) { this.complianceRuleOptions = complianceRuleOptions; } - /** Return true if this CloudConfigurationRuleOptions object is equal to o. */ + /** + * Return true if this CloudConfigurationRuleOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,10 +84,10 @@ public boolean equals(Object o) { return false; } CloudConfigurationRuleOptions cloudConfigurationRuleOptions = (CloudConfigurationRuleOptions) o; - return Objects.equals( - this.complianceRuleOptions, cloudConfigurationRuleOptions.complianceRuleOptions); + return Objects.equals(this.complianceRuleOptions, cloudConfigurationRuleOptions.complianceRuleOptions); } + @Override public int hashCode() { return Objects.hash(complianceRuleOptions); @@ -79,15 +97,14 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudConfigurationRuleOptions {\n"); - sb.append(" complianceRuleOptions: ") - .append(toIndentedString(complianceRuleOptions)) - .append("\n"); + sb.append(" complianceRuleOptions: ").append(toIndentedString(complianceRuleOptions)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleType.java b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleType.java index 5189ba24332..f11617b08d7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudConfigurationRuleType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The rule type. */ +/** + *

The rule type.

+ */ @JsonSerialize(using = CloudConfigurationRuleType.CloudConfigurationRuleTypeSerializer.class) public class CloudConfigurationRuleType { - public static final CloudConfigurationRuleType CLOUD_CONFIGURATION = - new CloudConfigurationRuleType("cloud_configuration"); + public static final CloudConfigurationRuleType CLOUD_CONFIGURATION = new CloudConfigurationRuleType("cloud_configuration"); - private static final Set allowedValues = - new HashSet(Arrays.asList("cloud_configuration")); + private static final Set allowedValues = new HashSet(Arrays.asList("cloud_configuration")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class CloudConfigurationRuleTypeSerializer - extends StdSerializer { - public CloudConfigurationRuleTypeSerializer(Class t) { - super(t); - } + public static class CloudConfigurationRuleTypeSerializer extends StdSerializer { + public CloudConfigurationRuleTypeSerializer(Class t) { + super(t); + } - public CloudConfigurationRuleTypeSerializer() { - this(null); - } + public CloudConfigurationRuleTypeSerializer() { + this(null); + } - @Override - public void serialize( - CloudConfigurationRuleType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CloudConfigurationRuleType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CloudConfigurationRuleType object is equal to o. */ + /** + * Return true if this CloudConfigurationRuleType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAttributes.java index 476b925207a..b2df35517fc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAttributes.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A Cloud Workload Security Agent rule returned by the API. */ +/** + *

A Cloud Workload Security Agent rule returned by the API.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleAttributes.JSON_PROPERTY_CATEGORY, CloudWorkloadSecurityAgentRuleAttributes.JSON_PROPERTY_CREATION_DATE, @@ -26,10 +46,10 @@ CloudWorkloadSecurityAgentRuleAttributes.JSON_PROPERTY_UPDATER, CloudWorkloadSecurityAgentRuleAttributes.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CATEGORY = "category"; private String category; @@ -69,236 +89,215 @@ public CloudWorkloadSecurityAgentRuleAttributes category(String category) { } /** - * The category of the Agent rule. - * + *

The category of the Agent rule.

* @return category - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCategory() { - return category; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCategory() { + return category; + } public void setCategory(String category) { this.category = category; } - public CloudWorkloadSecurityAgentRuleAttributes creationDate(Long creationDate) { this.creationDate = creationDate; return this; } /** - * When the Agent rule was created, timestamp in milliseconds. - * + *

When the Agent rule was created, timestamp in milliseconds.

* @return creationDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATION_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreationDate() { - return creationDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATION_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreationDate() { + return creationDate; + } public void setCreationDate(Long creationDate) { this.creationDate = creationDate; } - - public CloudWorkloadSecurityAgentRuleAttributes creator( - CloudWorkloadSecurityAgentRuleCreatorAttributes creator) { + public CloudWorkloadSecurityAgentRuleAttributes creator(CloudWorkloadSecurityAgentRuleCreatorAttributes creator) { this.creator = creator; this.unparsed |= creator.unparsed; return this; } /** - * The attributes of the user who created the Agent rule. - * + *

The attributes of the user who created the Agent rule.

* @return creator - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudWorkloadSecurityAgentRuleCreatorAttributes getCreator() { - return creator; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleCreatorAttributes getCreator() { + return creator; + } public void setCreator(CloudWorkloadSecurityAgentRuleCreatorAttributes creator) { this.creator = creator; } - public CloudWorkloadSecurityAgentRuleAttributes defaultRule(Boolean defaultRule) { this.defaultRule = defaultRule; return this; } /** - * Whether the rule is included by default. - * + *

Whether the rule is included by default.

* @return defaultRule - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEFAULT_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDefaultRule() { - return defaultRule; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_RULE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDefaultRule() { + return defaultRule; + } public void setDefaultRule(Boolean defaultRule) { this.defaultRule = defaultRule; } - public CloudWorkloadSecurityAgentRuleAttributes description(String description) { this.description = description; return this; } /** - * The description of the Agent rule. - * + *

The description of the Agent rule.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public CloudWorkloadSecurityAgentRuleAttributes enabled(Boolean enabled) { this.enabled = enabled; return this; } /** - * Whether the Agent rule is enabled. - * + *

Whether the Agent rule is enabled.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public CloudWorkloadSecurityAgentRuleAttributes expression(String expression) { this.expression = expression; return this; } /** - * The SECL expression of the Agent rule. - * + *

The SECL expression of the Agent rule.

* @return expression - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExpression() { - return expression; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExpression() { + return expression; + } public void setExpression(String expression) { this.expression = expression; } - public CloudWorkloadSecurityAgentRuleAttributes name(String name) { this.name = name; return this; } /** - * The name of the Agent rule. - * + *

The name of the Agent rule.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public CloudWorkloadSecurityAgentRuleAttributes updatedAt(Long updatedAt) { this.updatedAt = updatedAt; return this; } /** - * When the Agent rule was last updated, timestamp in milliseconds. - * + *

When the Agent rule was last updated, timestamp in milliseconds.

* @return updatedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getUpdatedAt() { - return updatedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(Long updatedAt) { this.updatedAt = updatedAt; } - - public CloudWorkloadSecurityAgentRuleAttributes updater( - CloudWorkloadSecurityAgentRuleUpdaterAttributes updater) { + public CloudWorkloadSecurityAgentRuleAttributes updater(CloudWorkloadSecurityAgentRuleUpdaterAttributes updater) { this.updater = updater; this.unparsed |= updater.unparsed; return this; } /** - * The attributes of the user who last updated the Agent rule. - * + *

The attributes of the user who last updated the Agent rule.

* @return updater - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudWorkloadSecurityAgentRuleUpdaterAttributes getUpdater() { - return updater; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleUpdaterAttributes getUpdater() { + return updater; + } public void setUpdater(CloudWorkloadSecurityAgentRuleUpdaterAttributes updater) { this.updater = updater; } - public CloudWorkloadSecurityAgentRuleAttributes version(Long version) { this.version = version; return this; } /** - * The version of the Agent rule. - * + *

The version of the Agent rule.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this CloudWorkloadSecurityAgentRuleAttributes object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -307,35 +306,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleAttributes cloudWorkloadSecurityAgentRuleAttributes = - (CloudWorkloadSecurityAgentRuleAttributes) o; - return Objects.equals(this.category, cloudWorkloadSecurityAgentRuleAttributes.category) - && Objects.equals(this.creationDate, cloudWorkloadSecurityAgentRuleAttributes.creationDate) - && Objects.equals(this.creator, cloudWorkloadSecurityAgentRuleAttributes.creator) - && Objects.equals(this.defaultRule, cloudWorkloadSecurityAgentRuleAttributes.defaultRule) - && Objects.equals(this.description, cloudWorkloadSecurityAgentRuleAttributes.description) - && Objects.equals(this.enabled, cloudWorkloadSecurityAgentRuleAttributes.enabled) - && Objects.equals(this.expression, cloudWorkloadSecurityAgentRuleAttributes.expression) - && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleAttributes.name) - && Objects.equals(this.updatedAt, cloudWorkloadSecurityAgentRuleAttributes.updatedAt) - && Objects.equals(this.updater, cloudWorkloadSecurityAgentRuleAttributes.updater) - && Objects.equals(this.version, cloudWorkloadSecurityAgentRuleAttributes.version); + CloudWorkloadSecurityAgentRuleAttributes cloudWorkloadSecurityAgentRuleAttributes = (CloudWorkloadSecurityAgentRuleAttributes) o; + return Objects.equals(this.category, cloudWorkloadSecurityAgentRuleAttributes.category) && Objects.equals(this.creationDate, cloudWorkloadSecurityAgentRuleAttributes.creationDate) && Objects.equals(this.creator, cloudWorkloadSecurityAgentRuleAttributes.creator) && Objects.equals(this.defaultRule, cloudWorkloadSecurityAgentRuleAttributes.defaultRule) && Objects.equals(this.description, cloudWorkloadSecurityAgentRuleAttributes.description) && Objects.equals(this.enabled, cloudWorkloadSecurityAgentRuleAttributes.enabled) && Objects.equals(this.expression, cloudWorkloadSecurityAgentRuleAttributes.expression) && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleAttributes.name) && Objects.equals(this.updatedAt, cloudWorkloadSecurityAgentRuleAttributes.updatedAt) && Objects.equals(this.updater, cloudWorkloadSecurityAgentRuleAttributes.updater) && Objects.equals(this.version, cloudWorkloadSecurityAgentRuleAttributes.version); } + @Override public int hashCode() { - return Objects.hash( - category, - creationDate, - creator, - defaultRule, - description, - enabled, - expression, - name, - updatedAt, - updater, - version); + return Objects.hash(category,creationDate,creator,defaultRule,description,enabled,expression,name,updatedAt,updater,version); } @Override @@ -358,7 +336,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateAttributes.java index bb716565d0c..b911be390f3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateAttributes.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Create a new Cloud Workload Security Agent rule. */ +/** + *

Create a new Cloud Workload Security Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleCreateAttributes.JSON_PROPERTY_DESCRIPTION, CloudWorkloadSecurityAgentRuleCreateAttributes.JSON_PROPERTY_ENABLED, CloudWorkloadSecurityAgentRuleCreateAttributes.JSON_PROPERTY_EXPRESSION, CloudWorkloadSecurityAgentRuleCreateAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -40,95 +59,89 @@ public CloudWorkloadSecurityAgentRuleCreateAttributes() {} @JsonCreator public CloudWorkloadSecurityAgentRuleCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_EXPRESSION) String expression, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.expression = expression; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_EXPRESSION)String expression, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.expression = expression; + this.name = name; } - public CloudWorkloadSecurityAgentRuleCreateAttributes description(String description) { this.description = description; return this; } /** - * The description of the Agent rule. - * + *

The description of the Agent rule.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public CloudWorkloadSecurityAgentRuleCreateAttributes enabled(Boolean enabled) { this.enabled = enabled; return this; } /** - * Whether the Agent rule is enabled. - * + *

Whether the Agent rule is enabled.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public CloudWorkloadSecurityAgentRuleCreateAttributes expression(String expression) { this.expression = expression; return this; } /** - * The SECL expression of the Agent rule. - * + *

The SECL expression of the Agent rule.

* @return expression - */ - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getExpression() { - return expression; - } - + **/ + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getExpression() { + return expression; + } public void setExpression(String expression) { this.expression = expression; } - public CloudWorkloadSecurityAgentRuleCreateAttributes name(String name) { this.name = name; return this; } /** - * The name of the Agent rule. - * + *

The name of the Agent rule.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this CloudWorkloadSecurityAgentRuleCreateAttributes object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,19 +150,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleCreateAttributes cloudWorkloadSecurityAgentRuleCreateAttributes = - (CloudWorkloadSecurityAgentRuleCreateAttributes) o; - return Objects.equals( - this.description, cloudWorkloadSecurityAgentRuleCreateAttributes.description) - && Objects.equals(this.enabled, cloudWorkloadSecurityAgentRuleCreateAttributes.enabled) - && Objects.equals( - this.expression, cloudWorkloadSecurityAgentRuleCreateAttributes.expression) - && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleCreateAttributes.name); + CloudWorkloadSecurityAgentRuleCreateAttributes cloudWorkloadSecurityAgentRuleCreateAttributes = (CloudWorkloadSecurityAgentRuleCreateAttributes) o; + return Objects.equals(this.description, cloudWorkloadSecurityAgentRuleCreateAttributes.description) && Objects.equals(this.enabled, cloudWorkloadSecurityAgentRuleCreateAttributes.enabled) && Objects.equals(this.expression, cloudWorkloadSecurityAgentRuleCreateAttributes.expression) && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleCreateAttributes.name); } + @Override public int hashCode() { - return Objects.hash(description, enabled, expression, name); + return Objects.hash(description,enabled,expression,name); } @Override @@ -165,7 +173,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateData.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateData.java index 528e4331bbc..9833df37093 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single Agent rule. */ + +/** + *

Object for a single Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleCreateData.JSON_PROPERTY_ATTRIBUTES, CloudWorkloadSecurityAgentRuleCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CloudWorkloadSecurityAgentRuleCreateAttributes attributes; @@ -32,38 +51,32 @@ public CloudWorkloadSecurityAgentRuleCreateData() {} @JsonCreator public CloudWorkloadSecurityAgentRuleCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - CloudWorkloadSecurityAgentRuleCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - CloudWorkloadSecurityAgentRuleType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)CloudWorkloadSecurityAgentRuleCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)CloudWorkloadSecurityAgentRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public CloudWorkloadSecurityAgentRuleCreateData attributes( - CloudWorkloadSecurityAgentRuleCreateAttributes attributes) { + public CloudWorkloadSecurityAgentRuleCreateData attributes(CloudWorkloadSecurityAgentRuleCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Create a new Cloud Workload Security Agent rule. - * + *

Create a new Cloud Workload Security Agent rule.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudWorkloadSecurityAgentRuleCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudWorkloadSecurityAgentRuleCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(CloudWorkloadSecurityAgentRuleCreateAttributes attributes) { this.attributes = attributes; } - public CloudWorkloadSecurityAgentRuleCreateData type(CloudWorkloadSecurityAgentRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -71,24 +84,25 @@ public CloudWorkloadSecurityAgentRuleCreateData type(CloudWorkloadSecurityAgentR } /** - * The type of the resource. The value should always be agent_rule. - * + *

The type of the resource. The value should always be agent_rule.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudWorkloadSecurityAgentRuleType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudWorkloadSecurityAgentRuleType getType() { + return type; + } public void setType(CloudWorkloadSecurityAgentRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudWorkloadSecurityAgentRuleCreateData object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleCreateData cloudWorkloadSecurityAgentRuleCreateData = - (CloudWorkloadSecurityAgentRuleCreateData) o; - return Objects.equals(this.attributes, cloudWorkloadSecurityAgentRuleCreateData.attributes) - && Objects.equals(this.type, cloudWorkloadSecurityAgentRuleCreateData.type); + CloudWorkloadSecurityAgentRuleCreateData cloudWorkloadSecurityAgentRuleCreateData = (CloudWorkloadSecurityAgentRuleCreateData) o; + return Objects.equals(this.attributes, cloudWorkloadSecurityAgentRuleCreateData.attributes) && Objects.equals(this.type, cloudWorkloadSecurityAgentRuleCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -119,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateRequest.java index e9498a73ef2..7e6e39b1ff3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object that includes the Agent rule to create. */ -@JsonPropertyOrder({CloudWorkloadSecurityAgentRuleCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request object that includes the Agent rule to create.

+ */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CloudWorkloadSecurityAgentRuleCreateData data; @@ -26,35 +47,33 @@ public CloudWorkloadSecurityAgentRuleCreateRequest() {} @JsonCreator public CloudWorkloadSecurityAgentRuleCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - CloudWorkloadSecurityAgentRuleCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)CloudWorkloadSecurityAgentRuleCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - - public CloudWorkloadSecurityAgentRuleCreateRequest data( - CloudWorkloadSecurityAgentRuleCreateData data) { + public CloudWorkloadSecurityAgentRuleCreateRequest data(CloudWorkloadSecurityAgentRuleCreateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Object for a single Agent rule. - * + *

Object for a single Agent rule.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudWorkloadSecurityAgentRuleCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudWorkloadSecurityAgentRuleCreateData getData() { + return data; + } public void setData(CloudWorkloadSecurityAgentRuleCreateData data) { this.data = data; } - /** Return true if this CloudWorkloadSecurityAgentRuleCreateRequest object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleCreateRequest cloudWorkloadSecurityAgentRuleCreateRequest = - (CloudWorkloadSecurityAgentRuleCreateRequest) o; + CloudWorkloadSecurityAgentRuleCreateRequest cloudWorkloadSecurityAgentRuleCreateRequest = (CloudWorkloadSecurityAgentRuleCreateRequest) o; return Objects.equals(this.data, cloudWorkloadSecurityAgentRuleCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreatorAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreatorAttributes.java index 895aef9645d..3d080b1c141 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreatorAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleCreatorAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attributes of the user who created the Agent rule. */ + +/** + *

The attributes of the user who created the Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleCreatorAttributes.JSON_PROPERTY_HANDLE, CloudWorkloadSecurityAgentRuleCreatorAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleCreatorAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HANDLE = "handle"; private String handle; @@ -33,43 +53,42 @@ public CloudWorkloadSecurityAgentRuleCreatorAttributes handle(String handle) { } /** - * The handle of the user. - * + *

The handle of the user.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public CloudWorkloadSecurityAgentRuleCreatorAttributes name(String name) { this.name = name; return this; } /** - * The name of the user. - * + *

The name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this CloudWorkloadSecurityAgentRuleCreatorAttributes object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleCreatorAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,16 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleCreatorAttributes - cloudWorkloadSecurityAgentRuleCreatorAttributes = - (CloudWorkloadSecurityAgentRuleCreatorAttributes) o; - return Objects.equals(this.handle, cloudWorkloadSecurityAgentRuleCreatorAttributes.handle) - && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleCreatorAttributes.name); + CloudWorkloadSecurityAgentRuleCreatorAttributes cloudWorkloadSecurityAgentRuleCreatorAttributes = (CloudWorkloadSecurityAgentRuleCreatorAttributes) o; + return Objects.equals(this.handle, cloudWorkloadSecurityAgentRuleCreatorAttributes.handle) && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleCreatorAttributes.name); } + @Override public int hashCode() { - return Objects.hash(handle, name); + return Objects.hash(handle,name); } @Override @@ -101,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleData.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleData.java index 4e0df848913..6f1e66d5719 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleData.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single Agent rule. */ + +/** + *

Object for a single Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleData.JSON_PROPERTY_ATTRIBUTES, CloudWorkloadSecurityAgentRuleData.JSON_PROPERTY_ID, CloudWorkloadSecurityAgentRuleData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CloudWorkloadSecurityAgentRuleAttributes attributes; @@ -31,50 +51,45 @@ public class CloudWorkloadSecurityAgentRuleData { public static final String JSON_PROPERTY_TYPE = "type"; private CloudWorkloadSecurityAgentRuleType type = CloudWorkloadSecurityAgentRuleType.AGENT_RULE; - public CloudWorkloadSecurityAgentRuleData attributes( - CloudWorkloadSecurityAgentRuleAttributes attributes) { + public CloudWorkloadSecurityAgentRuleData attributes(CloudWorkloadSecurityAgentRuleAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * A Cloud Workload Security Agent rule returned by the API. - * + *

A Cloud Workload Security Agent rule returned by the API.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudWorkloadSecurityAgentRuleAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleAttributes getAttributes() { + return attributes; + } public void setAttributes(CloudWorkloadSecurityAgentRuleAttributes attributes) { this.attributes = attributes; } - public CloudWorkloadSecurityAgentRuleData id(String id) { this.id = id; return this; } /** - * The ID of the Agent rule. - * + *

The ID of the Agent rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public CloudWorkloadSecurityAgentRuleData type(CloudWorkloadSecurityAgentRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -82,25 +97,26 @@ public CloudWorkloadSecurityAgentRuleData type(CloudWorkloadSecurityAgentRuleTyp } /** - * The type of the resource. The value should always be agent_rule. - * + *

The type of the resource. The value should always be agent_rule.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudWorkloadSecurityAgentRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleType getType() { + return type; + } public void setType(CloudWorkloadSecurityAgentRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudWorkloadSecurityAgentRuleData object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,16 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleData cloudWorkloadSecurityAgentRuleData = - (CloudWorkloadSecurityAgentRuleData) o; - return Objects.equals(this.attributes, cloudWorkloadSecurityAgentRuleData.attributes) - && Objects.equals(this.id, cloudWorkloadSecurityAgentRuleData.id) - && Objects.equals(this.type, cloudWorkloadSecurityAgentRuleData.type); + CloudWorkloadSecurityAgentRuleData cloudWorkloadSecurityAgentRuleData = (CloudWorkloadSecurityAgentRuleData) o; + return Objects.equals(this.attributes, cloudWorkloadSecurityAgentRuleData.attributes) && Objects.equals(this.id, cloudWorkloadSecurityAgentRuleData.id) && Objects.equals(this.type, cloudWorkloadSecurityAgentRuleData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -133,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleResponse.java index 0950538f775..897b29993af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object that includes an Agent rule. */ -@JsonPropertyOrder({CloudWorkloadSecurityAgentRuleResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object that includes an Agent rule.

+ */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CloudWorkloadSecurityAgentRuleData data; @@ -28,22 +50,23 @@ public CloudWorkloadSecurityAgentRuleResponse data(CloudWorkloadSecurityAgentRul } /** - * Object for a single Agent rule. - * + *

Object for a single Agent rule.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudWorkloadSecurityAgentRuleData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleData getData() { + return data; + } public void setData(CloudWorkloadSecurityAgentRuleData data) { this.data = data; } - /** Return true if this CloudWorkloadSecurityAgentRuleResponse object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleResponse cloudWorkloadSecurityAgentRuleResponse = - (CloudWorkloadSecurityAgentRuleResponse) o; + CloudWorkloadSecurityAgentRuleResponse cloudWorkloadSecurityAgentRuleResponse = (CloudWorkloadSecurityAgentRuleResponse) o; return Objects.equals(this.data, cloudWorkloadSecurityAgentRuleResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleType.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleType.java index 83abb9500db..89cf2f8ceda 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be agent_rule. */ -@JsonSerialize( - using = CloudWorkloadSecurityAgentRuleType.CloudWorkloadSecurityAgentRuleTypeSerializer.class) +/** + *

The type of the resource. The value should always be agent_rule.

+ */ +@JsonSerialize(using = CloudWorkloadSecurityAgentRuleType.CloudWorkloadSecurityAgentRuleTypeSerializer.class) public class CloudWorkloadSecurityAgentRuleType { - public static final CloudWorkloadSecurityAgentRuleType AGENT_RULE = - new CloudWorkloadSecurityAgentRuleType("agent_rule"); + public static final CloudWorkloadSecurityAgentRuleType AGENT_RULE = new CloudWorkloadSecurityAgentRuleType("agent_rule"); private static final Set allowedValues = new HashSet(Arrays.asList("agent_rule")); @@ -39,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class CloudWorkloadSecurityAgentRuleTypeSerializer - extends StdSerializer { - public CloudWorkloadSecurityAgentRuleTypeSerializer( - Class t) { - super(t); - } + public static class CloudWorkloadSecurityAgentRuleTypeSerializer extends StdSerializer { + public CloudWorkloadSecurityAgentRuleTypeSerializer(Class t) { + super(t); + } - public CloudWorkloadSecurityAgentRuleTypeSerializer() { - this(null); - } + public CloudWorkloadSecurityAgentRuleTypeSerializer() { + this(null); + } - @Override - public void serialize( - CloudWorkloadSecurityAgentRuleType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(CloudWorkloadSecurityAgentRuleType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CloudWorkloadSecurityAgentRuleType object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateAttributes.java index 141c2247339..2e02faca84d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateAttributes.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update an existing Cloud Workload Security Agent rule. */ + +/** + *

Update an existing Cloud Workload Security Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleUpdateAttributes.JSON_PROPERTY_DESCRIPTION, CloudWorkloadSecurityAgentRuleUpdateAttributes.JSON_PROPERTY_ENABLED, CloudWorkloadSecurityAgentRuleUpdateAttributes.JSON_PROPERTY_EXPRESSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -37,64 +57,61 @@ public CloudWorkloadSecurityAgentRuleUpdateAttributes description(String descrip } /** - * The description of the Agent rule. - * + *

The description of the Agent rule.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public CloudWorkloadSecurityAgentRuleUpdateAttributes enabled(Boolean enabled) { this.enabled = enabled; return this; } /** - * Whether the Agent rule is enabled. - * + *

Whether the Agent rule is enabled.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public CloudWorkloadSecurityAgentRuleUpdateAttributes expression(String expression) { this.expression = expression; return this; } /** - * The SECL expression of the Agent rule. - * + *

The SECL expression of the Agent rule.

* @return expression - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPRESSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExpression() { - return expression; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPRESSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getExpression() { + return expression; + } public void setExpression(String expression) { this.expression = expression; } - /** Return true if this CloudWorkloadSecurityAgentRuleUpdateAttributes object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,18 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleUpdateAttributes cloudWorkloadSecurityAgentRuleUpdateAttributes = - (CloudWorkloadSecurityAgentRuleUpdateAttributes) o; - return Objects.equals( - this.description, cloudWorkloadSecurityAgentRuleUpdateAttributes.description) - && Objects.equals(this.enabled, cloudWorkloadSecurityAgentRuleUpdateAttributes.enabled) - && Objects.equals( - this.expression, cloudWorkloadSecurityAgentRuleUpdateAttributes.expression); + CloudWorkloadSecurityAgentRuleUpdateAttributes cloudWorkloadSecurityAgentRuleUpdateAttributes = (CloudWorkloadSecurityAgentRuleUpdateAttributes) o; + return Objects.equals(this.description, cloudWorkloadSecurityAgentRuleUpdateAttributes.description) && Objects.equals(this.enabled, cloudWorkloadSecurityAgentRuleUpdateAttributes.enabled) && Objects.equals(this.expression, cloudWorkloadSecurityAgentRuleUpdateAttributes.expression); } + @Override public int hashCode() { - return Objects.hash(description, enabled, expression); + return Objects.hash(description,enabled,expression); } @Override @@ -129,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateData.java index 6e89b27b6bd..3e0b044d057 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single Agent rule. */ + +/** + *

Object for a single Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleUpdateData.JSON_PROPERTY_ATTRIBUTES, CloudWorkloadSecurityAgentRuleUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CloudWorkloadSecurityAgentRuleUpdateAttributes attributes; @@ -32,38 +51,32 @@ public CloudWorkloadSecurityAgentRuleUpdateData() {} @JsonCreator public CloudWorkloadSecurityAgentRuleUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - CloudWorkloadSecurityAgentRuleUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - CloudWorkloadSecurityAgentRuleType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)CloudWorkloadSecurityAgentRuleUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)CloudWorkloadSecurityAgentRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public CloudWorkloadSecurityAgentRuleUpdateData attributes( - CloudWorkloadSecurityAgentRuleUpdateAttributes attributes) { + public CloudWorkloadSecurityAgentRuleUpdateData attributes(CloudWorkloadSecurityAgentRuleUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Update an existing Cloud Workload Security Agent rule. - * + *

Update an existing Cloud Workload Security Agent rule.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudWorkloadSecurityAgentRuleUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudWorkloadSecurityAgentRuleUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(CloudWorkloadSecurityAgentRuleUpdateAttributes attributes) { this.attributes = attributes; } - public CloudWorkloadSecurityAgentRuleUpdateData type(CloudWorkloadSecurityAgentRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -71,24 +84,25 @@ public CloudWorkloadSecurityAgentRuleUpdateData type(CloudWorkloadSecurityAgentR } /** - * The type of the resource. The value should always be agent_rule. - * + *

The type of the resource. The value should always be agent_rule.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudWorkloadSecurityAgentRuleType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudWorkloadSecurityAgentRuleType getType() { + return type; + } public void setType(CloudWorkloadSecurityAgentRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudWorkloadSecurityAgentRuleUpdateData object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleUpdateData cloudWorkloadSecurityAgentRuleUpdateData = - (CloudWorkloadSecurityAgentRuleUpdateData) o; - return Objects.equals(this.attributes, cloudWorkloadSecurityAgentRuleUpdateData.attributes) - && Objects.equals(this.type, cloudWorkloadSecurityAgentRuleUpdateData.type); + CloudWorkloadSecurityAgentRuleUpdateData cloudWorkloadSecurityAgentRuleUpdateData = (CloudWorkloadSecurityAgentRuleUpdateData) o; + return Objects.equals(this.attributes, cloudWorkloadSecurityAgentRuleUpdateData.attributes) && Objects.equals(this.type, cloudWorkloadSecurityAgentRuleUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -119,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateRequest.java index ced9ef96df4..b7ada043a98 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object that includes the Agent rule with the attributes to update. */ -@JsonPropertyOrder({CloudWorkloadSecurityAgentRuleUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request object that includes the Agent rule with the attributes to update.

+ */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CloudWorkloadSecurityAgentRuleUpdateData data; @@ -26,35 +47,33 @@ public CloudWorkloadSecurityAgentRuleUpdateRequest() {} @JsonCreator public CloudWorkloadSecurityAgentRuleUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - CloudWorkloadSecurityAgentRuleUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)CloudWorkloadSecurityAgentRuleUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - - public CloudWorkloadSecurityAgentRuleUpdateRequest data( - CloudWorkloadSecurityAgentRuleUpdateData data) { + public CloudWorkloadSecurityAgentRuleUpdateRequest data(CloudWorkloadSecurityAgentRuleUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Object for a single Agent rule. - * + *

Object for a single Agent rule.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudWorkloadSecurityAgentRuleUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudWorkloadSecurityAgentRuleUpdateData getData() { + return data; + } public void setData(CloudWorkloadSecurityAgentRuleUpdateData data) { this.data = data; } - /** Return true if this CloudWorkloadSecurityAgentRuleUpdateRequest object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleUpdateRequest cloudWorkloadSecurityAgentRuleUpdateRequest = - (CloudWorkloadSecurityAgentRuleUpdateRequest) o; + CloudWorkloadSecurityAgentRuleUpdateRequest cloudWorkloadSecurityAgentRuleUpdateRequest = (CloudWorkloadSecurityAgentRuleUpdateRequest) o; return Objects.equals(this.data, cloudWorkloadSecurityAgentRuleUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdaterAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdaterAttributes.java index f999096272d..c016fef9b25 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdaterAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleUpdaterAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attributes of the user who last updated the Agent rule. */ + +/** + *

The attributes of the user who last updated the Agent rule.

+ */ @JsonPropertyOrder({ CloudWorkloadSecurityAgentRuleUpdaterAttributes.JSON_PROPERTY_HANDLE, CloudWorkloadSecurityAgentRuleUpdaterAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleUpdaterAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HANDLE = "handle"; private String handle; @@ -33,43 +53,42 @@ public CloudWorkloadSecurityAgentRuleUpdaterAttributes handle(String handle) { } /** - * The handle of the user. - * + *

The handle of the user.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public CloudWorkloadSecurityAgentRuleUpdaterAttributes name(String name) { this.name = name; return this; } /** - * The name of the user. - * + *

The name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this CloudWorkloadSecurityAgentRuleUpdaterAttributes object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRuleUpdaterAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,16 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRuleUpdaterAttributes - cloudWorkloadSecurityAgentRuleUpdaterAttributes = - (CloudWorkloadSecurityAgentRuleUpdaterAttributes) o; - return Objects.equals(this.handle, cloudWorkloadSecurityAgentRuleUpdaterAttributes.handle) - && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleUpdaterAttributes.name); + CloudWorkloadSecurityAgentRuleUpdaterAttributes cloudWorkloadSecurityAgentRuleUpdaterAttributes = (CloudWorkloadSecurityAgentRuleUpdaterAttributes) o; + return Objects.equals(this.handle, cloudWorkloadSecurityAgentRuleUpdaterAttributes.handle) && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleUpdaterAttributes.name); } + @Override public int hashCode() { - return Objects.hash(handle, name); + return Objects.hash(handle,name); } @Override @@ -101,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRulesListResponse.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRulesListResponse.java index 782ff2d69e3..b55e18e0068 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRulesListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRulesListResponse.java @@ -6,34 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response object that includes a list of Agent rule. */ -@JsonPropertyOrder({CloudWorkloadSecurityAgentRulesListResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response object that includes a list of Agent rule.

+ */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRulesListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRulesListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; - public CloudWorkloadSecurityAgentRulesListResponse data( - List data) { + public CloudWorkloadSecurityAgentRulesListResponse data(List data) { this.data = data; for (CloudWorkloadSecurityAgentRuleData item : data) { this.unparsed |= item.unparsed; } return this; } - - public CloudWorkloadSecurityAgentRulesListResponse addDataItem( - CloudWorkloadSecurityAgentRuleData dataItem) { + public CloudWorkloadSecurityAgentRulesListResponse addDataItem(CloudWorkloadSecurityAgentRuleData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -43,22 +60,23 @@ public CloudWorkloadSecurityAgentRulesListResponse addDataItem( } /** - * A list of Agent rules objects. - * + *

A list of Agent rules objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this CloudWorkloadSecurityAgentRulesListResponse object is equal to o. */ + /** + * Return true if this CloudWorkloadSecurityAgentRulesListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -67,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudWorkloadSecurityAgentRulesListResponse cloudWorkloadSecurityAgentRulesListResponse = - (CloudWorkloadSecurityAgentRulesListResponse) o; + CloudWorkloadSecurityAgentRulesListResponse cloudWorkloadSecurityAgentRulesListResponse = (CloudWorkloadSecurityAgentRulesListResponse) o; return Objects.equals(this.data, cloudWorkloadSecurityAgentRulesListResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -87,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequest.java index 4e19e9c34bc..c2e0d1f4a20 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Payload schema when adding a Cloudflare account. */ -@JsonPropertyOrder({CloudflareAccountCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Payload schema when adding a Cloudflare account.

+ */ +@JsonPropertyOrder({ + CloudflareAccountCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CloudflareAccountCreateRequestData data; @@ -26,12 +47,10 @@ public CloudflareAccountCreateRequest() {} @JsonCreator public CloudflareAccountCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - CloudflareAccountCreateRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)CloudflareAccountCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public CloudflareAccountCreateRequest data(CloudflareAccountCreateRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public CloudflareAccountCreateRequest data(CloudflareAccountCreateRequestData da } /** - * Data object for creating a Cloudflare account. - * + *

Data object for creating a Cloudflare account.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudflareAccountCreateRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudflareAccountCreateRequestData getData() { + return data; + } public void setData(CloudflareAccountCreateRequestData data) { this.data = data; } - /** Return true if this CloudflareAccountCreateRequest object is equal to o. */ + /** + * Return true if this CloudflareAccountCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountCreateRequest cloudflareAccountCreateRequest = - (CloudflareAccountCreateRequest) o; + CloudflareAccountCreateRequest cloudflareAccountCreateRequest = (CloudflareAccountCreateRequest) o; return Objects.equals(this.data, cloudflareAccountCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestAttributes.java index 4139579da00..ed0f4fb760f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestAttributes.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes object for creating a Cloudflare account. */ + +/** + *

Attributes object for creating a Cloudflare account.

+ */ @JsonPropertyOrder({ CloudflareAccountCreateRequestAttributes.JSON_PROPERTY_API_KEY, CloudflareAccountCreateRequestAttributes.JSON_PROPERTY_EMAIL, CloudflareAccountCreateRequestAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountCreateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -36,75 +55,70 @@ public CloudflareAccountCreateRequestAttributes() {} @JsonCreator public CloudflareAccountCreateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_API_KEY) String apiKey, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.apiKey = apiKey; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_API_KEY)String apiKey, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.apiKey = apiKey; + this.name = name; } - public CloudflareAccountCreateRequestAttributes apiKey(String apiKey) { this.apiKey = apiKey; return this; } /** - * The API key (or token) for the Cloudflare account. - * + *

The API key (or token) for the Cloudflare account.

* @return apiKey - */ - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiKey() { - return apiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - public CloudflareAccountCreateRequestAttributes email(String email) { this.email = email; return this; } /** - * The email associated with the Cloudflare account. If an API key is provided (and not a token), - * this field is also required. - * + *

The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public CloudflareAccountCreateRequestAttributes name(String name) { this.name = name; return this; } /** - * The name of the Cloudflare account. - * + *

The name of the Cloudflare account.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this CloudflareAccountCreateRequestAttributes object is equal to o. */ + /** + * Return true if this CloudflareAccountCreateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,16 +127,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountCreateRequestAttributes cloudflareAccountCreateRequestAttributes = - (CloudflareAccountCreateRequestAttributes) o; - return Objects.equals(this.apiKey, cloudflareAccountCreateRequestAttributes.apiKey) - && Objects.equals(this.email, cloudflareAccountCreateRequestAttributes.email) - && Objects.equals(this.name, cloudflareAccountCreateRequestAttributes.name); + CloudflareAccountCreateRequestAttributes cloudflareAccountCreateRequestAttributes = (CloudflareAccountCreateRequestAttributes) o; + return Objects.equals(this.apiKey, cloudflareAccountCreateRequestAttributes.apiKey) && Objects.equals(this.email, cloudflareAccountCreateRequestAttributes.email) && Objects.equals(this.name, cloudflareAccountCreateRequestAttributes.name); } + @Override public int hashCode() { - return Objects.hash(apiKey, email, name); + return Objects.hash(apiKey,email,name); } @Override @@ -137,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestData.java index 6c0cfd45c77..41e61a8b1a6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountCreateRequestData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data object for creating a Cloudflare account. */ + +/** + *

Data object for creating a Cloudflare account.

+ */ @JsonPropertyOrder({ CloudflareAccountCreateRequestData.JSON_PROPERTY_ATTRIBUTES, CloudflareAccountCreateRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountCreateRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CloudflareAccountCreateRequestAttributes attributes; @@ -32,37 +51,32 @@ public CloudflareAccountCreateRequestData() {} @JsonCreator public CloudflareAccountCreateRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - CloudflareAccountCreateRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CloudflareAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)CloudflareAccountCreateRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)CloudflareAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public CloudflareAccountCreateRequestData attributes( - CloudflareAccountCreateRequestAttributes attributes) { + public CloudflareAccountCreateRequestData attributes(CloudflareAccountCreateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes object for creating a Cloudflare account. - * + *

Attributes object for creating a Cloudflare account.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudflareAccountCreateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudflareAccountCreateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(CloudflareAccountCreateRequestAttributes attributes) { this.attributes = attributes; } - public CloudflareAccountCreateRequestData type(CloudflareAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -70,24 +84,25 @@ public CloudflareAccountCreateRequestData type(CloudflareAccountType type) { } /** - * The JSON:API type for this API. Should always be cloudflare-accounts. - * + *

The JSON:API type for this API. Should always be cloudflare-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudflareAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudflareAccountType getType() { + return type; + } public void setType(CloudflareAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudflareAccountCreateRequestData object is equal to o. */ + /** + * Return true if this CloudflareAccountCreateRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountCreateRequestData cloudflareAccountCreateRequestData = - (CloudflareAccountCreateRequestData) o; - return Objects.equals(this.attributes, cloudflareAccountCreateRequestData.attributes) - && Objects.equals(this.type, cloudflareAccountCreateRequestData.type); + CloudflareAccountCreateRequestData cloudflareAccountCreateRequestData = (CloudflareAccountCreateRequestData) o; + return Objects.equals(this.attributes, cloudflareAccountCreateRequestData.attributes) && Objects.equals(this.type, cloudflareAccountCreateRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponse.java index 5d8ed7f2ab3..0023577de72 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The expected response schema when getting a Cloudflare account. */ -@JsonPropertyOrder({CloudflareAccountResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The expected response schema when getting a Cloudflare account.

+ */ +@JsonPropertyOrder({ + CloudflareAccountResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CloudflareAccountResponseData data; @@ -28,22 +50,23 @@ public CloudflareAccountResponse data(CloudflareAccountResponseData data) { } /** - * Data object of a Cloudflare account. - * + *

Data object of a Cloudflare account.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudflareAccountResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudflareAccountResponseData getData() { + return data; + } public void setData(CloudflareAccountResponseData data) { this.data = data; } - /** Return true if this CloudflareAccountResponse object is equal to o. */ + /** + * Return true if this CloudflareAccountResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, cloudflareAccountResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseAttributes.java index 021114e3b60..db99a3b1885 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseAttributes.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes object of a Cloudflare account. */ + +/** + *

Attributes object of a Cloudflare account.

+ */ @JsonPropertyOrder({ CloudflareAccountResponseAttributes.JSON_PROPERTY_EMAIL, CloudflareAccountResponseAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -32,52 +51,50 @@ public CloudflareAccountResponseAttributes() {} @JsonCreator public CloudflareAccountResponseAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public CloudflareAccountResponseAttributes email(String email) { this.email = email; return this; } /** - * The email associated with the Cloudflare account. - * + *

The email associated with the Cloudflare account.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public CloudflareAccountResponseAttributes name(String name) { this.name = name; return this; } /** - * The name of the Cloudflare account. - * + *

The name of the Cloudflare account.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this CloudflareAccountResponseAttributes object is equal to o. */ + /** + * Return true if this CloudflareAccountResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,15 +103,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountResponseAttributes cloudflareAccountResponseAttributes = - (CloudflareAccountResponseAttributes) o; - return Objects.equals(this.email, cloudflareAccountResponseAttributes.email) - && Objects.equals(this.name, cloudflareAccountResponseAttributes.name); + CloudflareAccountResponseAttributes cloudflareAccountResponseAttributes = (CloudflareAccountResponseAttributes) o; + return Objects.equals(this.email, cloudflareAccountResponseAttributes.email) && Objects.equals(this.name, cloudflareAccountResponseAttributes.name); } + @Override public int hashCode() { - return Objects.hash(email, name); + return Objects.hash(email,name); } @Override @@ -108,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseData.java index 8f4d36334bf..1b30a7ddcf9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Data object of a Cloudflare account. */ +/** + *

Data object of a Cloudflare account.

+ */ @JsonPropertyOrder({ CloudflareAccountResponseData.JSON_PROPERTY_ATTRIBUTES, CloudflareAccountResponseData.JSON_PROPERTY_ID, CloudflareAccountResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CloudflareAccountResponseAttributes attributes; @@ -36,17 +55,15 @@ public CloudflareAccountResponseData() {} @JsonCreator public CloudflareAccountResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - CloudflareAccountResponseAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CloudflareAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)CloudflareAccountResponseAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)CloudflareAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public CloudflareAccountResponseData attributes(CloudflareAccountResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public CloudflareAccountResponseData attributes(CloudflareAccountResponseAttribu } /** - * Attributes object of a Cloudflare account. - * + *

Attributes object of a Cloudflare account.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudflareAccountResponseAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudflareAccountResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(CloudflareAccountResponseAttributes attributes) { this.attributes = attributes; } - public CloudflareAccountResponseData id(String id) { this.id = id; return this; } /** - * The ID of the Cloudflare account, a hash of the account name. - * + *

The ID of the Cloudflare account, a hash of the account name.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public CloudflareAccountResponseData type(CloudflareAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public CloudflareAccountResponseData type(CloudflareAccountType type) { } /** - * The JSON:API type for this API. Should always be cloudflare-accounts. - * + *

The JSON:API type for this API. Should always be cloudflare-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudflareAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudflareAccountType getType() { + return type; + } public void setType(CloudflareAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudflareAccountResponseData object is equal to o. */ + /** + * Return true if this CloudflareAccountResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } CloudflareAccountResponseData cloudflareAccountResponseData = (CloudflareAccountResponseData) o; - return Objects.equals(this.attributes, cloudflareAccountResponseData.attributes) - && Objects.equals(this.id, cloudflareAccountResponseData.id) - && Objects.equals(this.type, cloudflareAccountResponseData.type); + return Objects.equals(this.attributes, cloudflareAccountResponseData.attributes) && Objects.equals(this.id, cloudflareAccountResponseData.id) && Objects.equals(this.type, cloudflareAccountResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountType.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountType.java index f0b575037dc..77657ade007 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The JSON:API type for this API. Should always be cloudflare-accounts. */ +/** + *

The JSON:API type for this API. Should always be cloudflare-accounts.

+ */ @JsonSerialize(using = CloudflareAccountType.CloudflareAccountTypeSerializer.class) public class CloudflareAccountType { - public static final CloudflareAccountType CLOUDFLARE_ACCOUNTS = - new CloudflareAccountType("cloudflare-accounts"); + public static final CloudflareAccountType CLOUDFLARE_ACCOUNTS = new CloudflareAccountType("cloudflare-accounts"); - private static final Set allowedValues = - new HashSet(Arrays.asList("cloudflare-accounts")); + private static final Set allowedValues = new HashSet(Arrays.asList("cloudflare-accounts")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class CloudflareAccountTypeSerializer extends StdSerializer { - public CloudflareAccountTypeSerializer(Class t) { - super(t); - } - - public CloudflareAccountTypeSerializer() { - this(null); - } - - @Override - public void serialize( - CloudflareAccountType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public CloudflareAccountTypeSerializer(Class t) { + super(t); + } + + public CloudflareAccountTypeSerializer() { + this(null); + } + + @Override + public void serialize(CloudflareAccountType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CloudflareAccountType object is equal to o. */ + /** + * Return true if this CloudflareAccountType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequest.java index a9f856ff9ef..cc94e5091bc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Payload schema when updating a Cloudflare account. */ -@JsonPropertyOrder({CloudflareAccountUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Payload schema when updating a Cloudflare account.

+ */ +@JsonPropertyOrder({ + CloudflareAccountUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private CloudflareAccountUpdateRequestData data; @@ -26,12 +47,10 @@ public CloudflareAccountUpdateRequest() {} @JsonCreator public CloudflareAccountUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - CloudflareAccountUpdateRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)CloudflareAccountUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public CloudflareAccountUpdateRequest data(CloudflareAccountUpdateRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public CloudflareAccountUpdateRequest data(CloudflareAccountUpdateRequestData da } /** - * Data object for updating a Cloudflare account. - * + *

Data object for updating a Cloudflare account.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudflareAccountUpdateRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public CloudflareAccountUpdateRequestData getData() { + return data; + } public void setData(CloudflareAccountUpdateRequestData data) { this.data = data; } - /** Return true if this CloudflareAccountUpdateRequest object is equal to o. */ + /** + * Return true if this CloudflareAccountUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountUpdateRequest cloudflareAccountUpdateRequest = - (CloudflareAccountUpdateRequest) o; + CloudflareAccountUpdateRequest cloudflareAccountUpdateRequest = (CloudflareAccountUpdateRequest) o; return Objects.equals(this.data, cloudflareAccountUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestAttributes.java index 1f4ee91e7d2..661dca4248c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestAttributes.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes object for updating a Cloudflare account. */ + +/** + *

Attributes object for updating a Cloudflare account.

+ */ @JsonPropertyOrder({ CloudflareAccountUpdateRequestAttributes.JSON_PROPERTY_API_KEY, CloudflareAccountUpdateRequestAttributes.JSON_PROPERTY_EMAIL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountUpdateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -32,53 +51,50 @@ public CloudflareAccountUpdateRequestAttributes() {} @JsonCreator public CloudflareAccountUpdateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_API_KEY) String apiKey) { - this.apiKey = apiKey; + @JsonProperty(required=true, value=JSON_PROPERTY_API_KEY)String apiKey) { + this.apiKey = apiKey; } - public CloudflareAccountUpdateRequestAttributes apiKey(String apiKey) { this.apiKey = apiKey; return this; } /** - * The API key of the Cloudflare account. - * + *

The API key of the Cloudflare account.

* @return apiKey - */ - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiKey() { - return apiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - public CloudflareAccountUpdateRequestAttributes email(String email) { this.email = email; return this; } /** - * The email associated with the Cloudflare account. If an API key is provided (and not a token), - * this field is also required. - * + *

The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - /** Return true if this CloudflareAccountUpdateRequestAttributes object is equal to o. */ + /** + * Return true if this CloudflareAccountUpdateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,15 +103,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountUpdateRequestAttributes cloudflareAccountUpdateRequestAttributes = - (CloudflareAccountUpdateRequestAttributes) o; - return Objects.equals(this.apiKey, cloudflareAccountUpdateRequestAttributes.apiKey) - && Objects.equals(this.email, cloudflareAccountUpdateRequestAttributes.email); + CloudflareAccountUpdateRequestAttributes cloudflareAccountUpdateRequestAttributes = (CloudflareAccountUpdateRequestAttributes) o; + return Objects.equals(this.apiKey, cloudflareAccountUpdateRequestAttributes.apiKey) && Objects.equals(this.email, cloudflareAccountUpdateRequestAttributes.email); } + @Override public int hashCode() { - return Objects.hash(apiKey, email); + return Objects.hash(apiKey,email); } @Override @@ -109,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestData.java index 6a9716c6d04..27e8352ee62 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountUpdateRequestData.java @@ -6,50 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data object for updating a Cloudflare account. */ + +/** + *

Data object for updating a Cloudflare account.

+ */ @JsonPropertyOrder({ CloudflareAccountUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, CloudflareAccountUpdateRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountUpdateRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CloudflareAccountUpdateRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; private CloudflareAccountType type = CloudflareAccountType.CLOUDFLARE_ACCOUNTS; - public CloudflareAccountUpdateRequestData attributes( - CloudflareAccountUpdateRequestAttributes attributes) { + public CloudflareAccountUpdateRequestData attributes(CloudflareAccountUpdateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes object for updating a Cloudflare account. - * + *

Attributes object for updating a Cloudflare account.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudflareAccountUpdateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudflareAccountUpdateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(CloudflareAccountUpdateRequestAttributes attributes) { this.attributes = attributes; } - public CloudflareAccountUpdateRequestData type(CloudflareAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -57,25 +74,26 @@ public CloudflareAccountUpdateRequestData type(CloudflareAccountType type) { } /** - * The JSON:API type for this API. Should always be cloudflare-accounts. - * + *

The JSON:API type for this API. Should always be cloudflare-accounts.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudflareAccountType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudflareAccountType getType() { + return type; + } public void setType(CloudflareAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CloudflareAccountUpdateRequestData object is equal to o. */ + /** + * Return true if this CloudflareAccountUpdateRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,15 +102,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CloudflareAccountUpdateRequestData cloudflareAccountUpdateRequestData = - (CloudflareAccountUpdateRequestData) o; - return Objects.equals(this.attributes, cloudflareAccountUpdateRequestData.attributes) - && Objects.equals(this.type, cloudflareAccountUpdateRequestData.type); + CloudflareAccountUpdateRequestData cloudflareAccountUpdateRequestData = (CloudflareAccountUpdateRequestData) o; + return Objects.equals(this.attributes, cloudflareAccountUpdateRequestData.attributes) && Objects.equals(this.type, cloudflareAccountUpdateRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -106,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountsResponse.java index 806bf92c7c8..c6105d55e27 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudflareAccountsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The expected response schema when getting Cloudflare accounts. */ -@JsonPropertyOrder({CloudflareAccountsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The expected response schema when getting Cloudflare accounts.

+ */ +@JsonPropertyOrder({ + CloudflareAccountsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudflareAccountsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public CloudflareAccountsResponse data(List data) } return this; } - public CloudflareAccountsResponse addDataItem(CloudflareAccountResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public CloudflareAccountsResponse addDataItem(CloudflareAccountResponseData data } /** - * The JSON:API data schema. - * + *

The JSON:API data schema.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this CloudflareAccountsResponse object is equal to o. */ + /** + * Return true if this CloudflareAccountsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, cloudflareAccountsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequest.java index 57aa809c016..56ceed04826 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Payload schema when adding a Confluent account. */ -@JsonPropertyOrder({ConfluentAccountCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Payload schema when adding a Confluent account.

+ */ +@JsonPropertyOrder({ + ConfluentAccountCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ConfluentAccountCreateRequestData data; @@ -26,12 +47,10 @@ public ConfluentAccountCreateRequest() {} @JsonCreator public ConfluentAccountCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - ConfluentAccountCreateRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ConfluentAccountCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ConfluentAccountCreateRequest data(ConfluentAccountCreateRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public ConfluentAccountCreateRequest data(ConfluentAccountCreateRequestData data } /** - * The data body for adding a Confluent account. - * + *

The data body for adding a Confluent account.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountCreateRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountCreateRequestData getData() { + return data; + } public void setData(ConfluentAccountCreateRequestData data) { this.data = data; } - /** Return true if this ConfluentAccountCreateRequest object is equal to o. */ + /** + * Return true if this ConfluentAccountCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentAccountCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestAttributes.java index f37241c33df..3a52eaca9b3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestAttributes.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes associated with the account creation request. */ +/** + *

Attributes associated with the account creation request.

+ */ @JsonPropertyOrder({ ConfluentAccountCreateRequestAttributes.JSON_PROPERTY_API_KEY, ConfluentAccountCreateRequestAttributes.JSON_PROPERTY_API_SECRET, ConfluentAccountCreateRequestAttributes.JSON_PROPERTY_RESOURCES, ConfluentAccountCreateRequestAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountCreateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -42,63 +59,55 @@ public ConfluentAccountCreateRequestAttributes() {} @JsonCreator public ConfluentAccountCreateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_API_KEY) String apiKey, - @JsonProperty(required = true, value = JSON_PROPERTY_API_SECRET) String apiSecret) { - this.apiKey = apiKey; - this.apiSecret = apiSecret; + @JsonProperty(required=true, value=JSON_PROPERTY_API_KEY)String apiKey, + @JsonProperty(required=true, value=JSON_PROPERTY_API_SECRET)String apiSecret) { + this.apiKey = apiKey; + this.apiSecret = apiSecret; } - public ConfluentAccountCreateRequestAttributes apiKey(String apiKey) { this.apiKey = apiKey; return this; } /** - * The API key associated with your Confluent account. - * + *

The API key associated with your Confluent account.

* @return apiKey - */ - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiKey() { - return apiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - public ConfluentAccountCreateRequestAttributes apiSecret(String apiSecret) { this.apiSecret = apiSecret; return this; } /** - * The API secret associated with your Confluent account. - * + *

The API secret associated with your Confluent account.

* @return apiSecret - */ - @JsonProperty(JSON_PROPERTY_API_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiSecret() { - return apiSecret; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_SECRET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiSecret() { + return apiSecret; + } public void setApiSecret(String apiSecret) { this.apiSecret = apiSecret; } - - public ConfluentAccountCreateRequestAttributes resources( - List resources) { + public ConfluentAccountCreateRequestAttributes resources(List resources) { this.resources = resources; for (ConfluentAccountResourceAttributes item : resources) { this.unparsed |= item.unparsed; } return this; } - - public ConfluentAccountCreateRequestAttributes addResourcesItem( - ConfluentAccountResourceAttributes resourcesItem) { + public ConfluentAccountCreateRequestAttributes addResourcesItem(ConfluentAccountResourceAttributes resourcesItem) { if (this.resources == null) { this.resources = new ArrayList<>(); } @@ -108,26 +117,23 @@ public ConfluentAccountCreateRequestAttributes addResourcesItem( } /** - * A list of Confluent resources associated with the Confluent account. - * + *

A list of Confluent resources associated with the Confluent account.

* @return resources - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResources() { + return resources; + } public void setResources(List resources) { this.resources = resources; } - public ConfluentAccountCreateRequestAttributes tags(List tags) { this.tags = tags; return this; } - public ConfluentAccountCreateRequestAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -137,23 +143,23 @@ public ConfluentAccountCreateRequestAttributes addTagsItem(String tagsItem) { } /** - * A list of strings representing tags. Can be a single key, or key-value pairs separated by a - * colon. - * + *

A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ConfluentAccountCreateRequestAttributes object is equal to o. */ + /** + * Return true if this ConfluentAccountCreateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -162,17 +168,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentAccountCreateRequestAttributes confluentAccountCreateRequestAttributes = - (ConfluentAccountCreateRequestAttributes) o; - return Objects.equals(this.apiKey, confluentAccountCreateRequestAttributes.apiKey) - && Objects.equals(this.apiSecret, confluentAccountCreateRequestAttributes.apiSecret) - && Objects.equals(this.resources, confluentAccountCreateRequestAttributes.resources) - && Objects.equals(this.tags, confluentAccountCreateRequestAttributes.tags); + ConfluentAccountCreateRequestAttributes confluentAccountCreateRequestAttributes = (ConfluentAccountCreateRequestAttributes) o; + return Objects.equals(this.apiKey, confluentAccountCreateRequestAttributes.apiKey) && Objects.equals(this.apiSecret, confluentAccountCreateRequestAttributes.apiSecret) && Objects.equals(this.resources, confluentAccountCreateRequestAttributes.resources) && Objects.equals(this.tags, confluentAccountCreateRequestAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(apiKey, apiSecret, resources, tags); + return Objects.hash(apiKey,apiSecret,resources,tags); } @Override @@ -188,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestData.java index 36000da1623..7d80b3baf86 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountCreateRequestData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The data body for adding a Confluent account. */ + +/** + *

The data body for adding a Confluent account.

+ */ @JsonPropertyOrder({ ConfluentAccountCreateRequestData.JSON_PROPERTY_ATTRIBUTES, ConfluentAccountCreateRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountCreateRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ConfluentAccountCreateRequestAttributes attributes; @@ -32,37 +51,32 @@ public ConfluentAccountCreateRequestData() {} @JsonCreator public ConfluentAccountCreateRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ConfluentAccountCreateRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConfluentAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ConfluentAccountCreateRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ConfluentAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public ConfluentAccountCreateRequestData attributes( - ConfluentAccountCreateRequestAttributes attributes) { + public ConfluentAccountCreateRequestData attributes(ConfluentAccountCreateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes associated with the account creation request. - * + *

Attributes associated with the account creation request.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountCreateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountCreateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(ConfluentAccountCreateRequestAttributes attributes) { this.attributes = attributes; } - public ConfluentAccountCreateRequestData type(ConfluentAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -70,24 +84,25 @@ public ConfluentAccountCreateRequestData type(ConfluentAccountType type) { } /** - * The JSON:API type for this API. Should always be confluent-cloud-accounts. - * + *

The JSON:API type for this API. Should always be confluent-cloud-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountType getType() { + return type; + } public void setType(ConfluentAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ConfluentAccountCreateRequestData object is equal to o. */ + /** + * Return true if this ConfluentAccountCreateRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentAccountCreateRequestData confluentAccountCreateRequestData = - (ConfluentAccountCreateRequestData) o; - return Objects.equals(this.attributes, confluentAccountCreateRequestData.attributes) - && Objects.equals(this.type, confluentAccountCreateRequestData.type); + ConfluentAccountCreateRequestData confluentAccountCreateRequestData = (ConfluentAccountCreateRequestData) o; + return Objects.equals(this.attributes, confluentAccountCreateRequestData.attributes) && Objects.equals(this.type, confluentAccountCreateRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java index c000156356a..28e9e44827f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes object for updating a Confluent resource. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes object for updating a Confluent resource.

+ */ @JsonPropertyOrder({ ConfluentAccountResourceAttributes.JSON_PROPERTY_ID, ConfluentAccountResourceAttributes.JSON_PROPERTY_RESOURCE_TYPE, ConfluentAccountResourceAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountResourceAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -39,48 +57,42 @@ public ConfluentAccountResourceAttributes id(String id) { } /** - * The ID associated with a Confluent resource. - * + *

The ID associated with a Confluent resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public ConfluentAccountResourceAttributes resourceType(String resourceType) { this.resourceType = resourceType; return this; } /** - * The resource type of the Resource. Can be kafka, connector, - * ksql, or schema_registry. - * + *

The resource type of the Resource. Can be kafka, connector, ksql, or schema_registry.

* @return resourceType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResourceType() { - return resourceType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceType() { + return resourceType; + } public void setResourceType(String resourceType) { this.resourceType = resourceType; } - public ConfluentAccountResourceAttributes tags(List tags) { this.tags = tags; return this; } - public ConfluentAccountResourceAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -90,23 +102,23 @@ public ConfluentAccountResourceAttributes addTagsItem(String tagsItem) { } /** - * A list of strings representing tags. Can be a single key, or key-value pairs separated by a - * colon. - * + *

A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ConfluentAccountResourceAttributes object is equal to o. */ + /** + * Return true if this ConfluentAccountResourceAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,16 +127,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentAccountResourceAttributes confluentAccountResourceAttributes = - (ConfluentAccountResourceAttributes) o; - return Objects.equals(this.id, confluentAccountResourceAttributes.id) - && Objects.equals(this.resourceType, confluentAccountResourceAttributes.resourceType) - && Objects.equals(this.tags, confluentAccountResourceAttributes.tags); + ConfluentAccountResourceAttributes confluentAccountResourceAttributes = (ConfluentAccountResourceAttributes) o; + return Objects.equals(this.id, confluentAccountResourceAttributes.id) && Objects.equals(this.resourceType, confluentAccountResourceAttributes.resourceType) && Objects.equals(this.tags, confluentAccountResourceAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(id, resourceType, tags); + return Objects.hash(id,resourceType,tags); } @Override @@ -139,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponse.java index adb37e62a46..377ac02672d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The expected response schema when getting a Confluent account. */ -@JsonPropertyOrder({ConfluentAccountResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The expected response schema when getting a Confluent account.

+ */ +@JsonPropertyOrder({ + ConfluentAccountResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ConfluentAccountResponseData data; @@ -28,22 +50,23 @@ public ConfluentAccountResponse data(ConfluentAccountResponseData data) { } /** - * An API key and API secret pair that represents a Confluent account. - * + *

An API key and API secret pair that represents a Confluent account.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ConfluentAccountResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ConfluentAccountResponseData getData() { + return data; + } public void setData(ConfluentAccountResponseData data) { this.data = data; } - /** Return true if this ConfluentAccountResponse object is equal to o. */ + /** + * Return true if this ConfluentAccountResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentAccountResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseAttributes.java index 1f9998b0959..f321d34b02c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseAttributes.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes of a Confluent account. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes of a Confluent account.

+ */ @JsonPropertyOrder({ ConfluentAccountResponseAttributes.JSON_PROPERTY_API_KEY, ConfluentAccountResponseAttributes.JSON_PROPERTY_RESOURCES, ConfluentAccountResponseAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -38,41 +55,35 @@ public ConfluentAccountResponseAttributes() {} @JsonCreator public ConfluentAccountResponseAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_API_KEY) String apiKey) { - this.apiKey = apiKey; + @JsonProperty(required=true, value=JSON_PROPERTY_API_KEY)String apiKey) { + this.apiKey = apiKey; } - public ConfluentAccountResponseAttributes apiKey(String apiKey) { this.apiKey = apiKey; return this; } /** - * The API key associated with your Confluent account. - * + *

The API key associated with your Confluent account.

* @return apiKey - */ - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiKey() { - return apiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - - public ConfluentAccountResponseAttributes resources( - List resources) { + public ConfluentAccountResponseAttributes resources(List resources) { this.resources = resources; for (ConfluentResourceResponseAttributes item : resources) { this.unparsed |= item.unparsed; } return this; } - - public ConfluentAccountResponseAttributes addResourcesItem( - ConfluentResourceResponseAttributes resourcesItem) { + public ConfluentAccountResponseAttributes addResourcesItem(ConfluentResourceResponseAttributes resourcesItem) { if (this.resources == null) { this.resources = new ArrayList<>(); } @@ -82,26 +93,23 @@ public ConfluentAccountResponseAttributes addResourcesItem( } /** - * A list of Confluent resources associated with the Confluent account. - * + *

A list of Confluent resources associated with the Confluent account.

* @return resources - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResources() { + return resources; + } public void setResources(List resources) { this.resources = resources; } - public ConfluentAccountResponseAttributes tags(List tags) { this.tags = tags; return this; } - public ConfluentAccountResponseAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -111,23 +119,23 @@ public ConfluentAccountResponseAttributes addTagsItem(String tagsItem) { } /** - * A list of strings representing tags. Can be a single key, or key-value pairs separated by a - * colon. - * + *

A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ConfluentAccountResponseAttributes object is equal to o. */ + /** + * Return true if this ConfluentAccountResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,16 +144,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentAccountResponseAttributes confluentAccountResponseAttributes = - (ConfluentAccountResponseAttributes) o; - return Objects.equals(this.apiKey, confluentAccountResponseAttributes.apiKey) - && Objects.equals(this.resources, confluentAccountResponseAttributes.resources) - && Objects.equals(this.tags, confluentAccountResponseAttributes.tags); + ConfluentAccountResponseAttributes confluentAccountResponseAttributes = (ConfluentAccountResponseAttributes) o; + return Objects.equals(this.apiKey, confluentAccountResponseAttributes.apiKey) && Objects.equals(this.resources, confluentAccountResponseAttributes.resources) && Objects.equals(this.tags, confluentAccountResponseAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(apiKey, resources, tags); + return Objects.hash(apiKey,resources,tags); } @Override @@ -160,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseData.java index 33ce43a5eaf..94f35ab1fd8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An API key and API secret pair that represents a Confluent account. */ +/** + *

An API key and API secret pair that represents a Confluent account.

+ */ @JsonPropertyOrder({ ConfluentAccountResponseData.JSON_PROPERTY_ATTRIBUTES, ConfluentAccountResponseData.JSON_PROPERTY_ID, ConfluentAccountResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ConfluentAccountResponseAttributes attributes; @@ -36,17 +55,15 @@ public ConfluentAccountResponseData() {} @JsonCreator public ConfluentAccountResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ConfluentAccountResponseAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConfluentAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ConfluentAccountResponseAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ConfluentAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public ConfluentAccountResponseData attributes(ConfluentAccountResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public ConfluentAccountResponseData attributes(ConfluentAccountResponseAttribute } /** - * The attributes of a Confluent account. - * + *

The attributes of a Confluent account.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountResponseAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(ConfluentAccountResponseAttributes attributes) { this.attributes = attributes; } - public ConfluentAccountResponseData id(String id) { this.id = id; return this; } /** - * A randomly generated ID associated with a Confluent account. - * + *

A randomly generated ID associated with a Confluent account.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public ConfluentAccountResponseData type(ConfluentAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public ConfluentAccountResponseData type(ConfluentAccountType type) { } /** - * The JSON:API type for this API. Should always be confluent-cloud-accounts. - * + *

The JSON:API type for this API. Should always be confluent-cloud-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountType getType() { + return type; + } public void setType(ConfluentAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ConfluentAccountResponseData object is equal to o. */ + /** + * Return true if this ConfluentAccountResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } ConfluentAccountResponseData confluentAccountResponseData = (ConfluentAccountResponseData) o; - return Objects.equals(this.attributes, confluentAccountResponseData.attributes) - && Objects.equals(this.id, confluentAccountResponseData.id) - && Objects.equals(this.type, confluentAccountResponseData.type); + return Objects.equals(this.attributes, confluentAccountResponseData.attributes) && Objects.equals(this.id, confluentAccountResponseData.id) && Objects.equals(this.type, confluentAccountResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountType.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountType.java index 2f733a4626b..38c739a9938 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The JSON:API type for this API. Should always be confluent-cloud-accounts. */ +/** + *

The JSON:API type for this API. Should always be confluent-cloud-accounts.

+ */ @JsonSerialize(using = ConfluentAccountType.ConfluentAccountTypeSerializer.class) public class ConfluentAccountType { - public static final ConfluentAccountType CONFLUENT_CLOUD_ACCOUNTS = - new ConfluentAccountType("confluent-cloud-accounts"); + public static final ConfluentAccountType CONFLUENT_CLOUD_ACCOUNTS = new ConfluentAccountType("confluent-cloud-accounts"); - private static final Set allowedValues = - new HashSet(Arrays.asList("confluent-cloud-accounts")); + private static final Set allowedValues = new HashSet(Arrays.asList("confluent-cloud-accounts")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class ConfluentAccountTypeSerializer extends StdSerializer { - public ConfluentAccountTypeSerializer(Class t) { - super(t); - } - - public ConfluentAccountTypeSerializer() { - this(null); - } - - @Override - public void serialize( - ConfluentAccountType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ConfluentAccountTypeSerializer(Class t) { + super(t); + } + + public ConfluentAccountTypeSerializer() { + this(null); + } + + @Override + public void serialize(ConfluentAccountType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ConfluentAccountType object is equal to o. */ + /** + * Return true if this ConfluentAccountType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequest.java index 240af25ff86..5bf993cf02b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The JSON:API request for updating a Confluent account. */ -@JsonPropertyOrder({ConfluentAccountUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The JSON:API request for updating a Confluent account.

+ */ +@JsonPropertyOrder({ + ConfluentAccountUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ConfluentAccountUpdateRequestData data; @@ -26,12 +47,10 @@ public ConfluentAccountUpdateRequest() {} @JsonCreator public ConfluentAccountUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - ConfluentAccountUpdateRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ConfluentAccountUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ConfluentAccountUpdateRequest data(ConfluentAccountUpdateRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public ConfluentAccountUpdateRequest data(ConfluentAccountUpdateRequestData data } /** - * Data object for updating a Confluent account. - * + *

Data object for updating a Confluent account.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountUpdateRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountUpdateRequestData getData() { + return data; + } public void setData(ConfluentAccountUpdateRequestData data) { this.data = data; } - /** Return true if this ConfluentAccountUpdateRequest object is equal to o. */ + /** + * Return true if this ConfluentAccountUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentAccountUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestAttributes.java index f75c6a1c4b9..62cfebb8eb1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestAttributes.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes object for updating a Confluent account. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes object for updating a Confluent account.

+ */ @JsonPropertyOrder({ ConfluentAccountUpdateRequestAttributes.JSON_PROPERTY_API_KEY, ConfluentAccountUpdateRequestAttributes.JSON_PROPERTY_API_SECRET, ConfluentAccountUpdateRequestAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountUpdateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -38,57 +55,51 @@ public ConfluentAccountUpdateRequestAttributes() {} @JsonCreator public ConfluentAccountUpdateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_API_KEY) String apiKey, - @JsonProperty(required = true, value = JSON_PROPERTY_API_SECRET) String apiSecret) { - this.apiKey = apiKey; - this.apiSecret = apiSecret; + @JsonProperty(required=true, value=JSON_PROPERTY_API_KEY)String apiKey, + @JsonProperty(required=true, value=JSON_PROPERTY_API_SECRET)String apiSecret) { + this.apiKey = apiKey; + this.apiSecret = apiSecret; } - public ConfluentAccountUpdateRequestAttributes apiKey(String apiKey) { this.apiKey = apiKey; return this; } /** - * The API key associated with your Confluent account. - * + *

The API key associated with your Confluent account.

* @return apiKey - */ - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiKey() { - return apiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - public ConfluentAccountUpdateRequestAttributes apiSecret(String apiSecret) { this.apiSecret = apiSecret; return this; } /** - * The API secret associated with your Confluent account. - * + *

The API secret associated with your Confluent account.

* @return apiSecret - */ - @JsonProperty(JSON_PROPERTY_API_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiSecret() { - return apiSecret; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_SECRET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiSecret() { + return apiSecret; + } public void setApiSecret(String apiSecret) { this.apiSecret = apiSecret; } - public ConfluentAccountUpdateRequestAttributes tags(List tags) { this.tags = tags; return this; } - public ConfluentAccountUpdateRequestAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -98,23 +109,23 @@ public ConfluentAccountUpdateRequestAttributes addTagsItem(String tagsItem) { } /** - * A list of strings representing tags. Can be a single key, or key-value pairs separated by a - * colon. - * + *

A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ConfluentAccountUpdateRequestAttributes object is equal to o. */ + /** + * Return true if this ConfluentAccountUpdateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -123,16 +134,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentAccountUpdateRequestAttributes confluentAccountUpdateRequestAttributes = - (ConfluentAccountUpdateRequestAttributes) o; - return Objects.equals(this.apiKey, confluentAccountUpdateRequestAttributes.apiKey) - && Objects.equals(this.apiSecret, confluentAccountUpdateRequestAttributes.apiSecret) - && Objects.equals(this.tags, confluentAccountUpdateRequestAttributes.tags); + ConfluentAccountUpdateRequestAttributes confluentAccountUpdateRequestAttributes = (ConfluentAccountUpdateRequestAttributes) o; + return Objects.equals(this.apiKey, confluentAccountUpdateRequestAttributes.apiKey) && Objects.equals(this.apiSecret, confluentAccountUpdateRequestAttributes.apiSecret) && Objects.equals(this.tags, confluentAccountUpdateRequestAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(apiKey, apiSecret, tags); + return Objects.hash(apiKey,apiSecret,tags); } @Override @@ -147,7 +156,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestData.java index 4748a7b22d3..6a2762a2640 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountUpdateRequestData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data object for updating a Confluent account. */ + +/** + *

Data object for updating a Confluent account.

+ */ @JsonPropertyOrder({ ConfluentAccountUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, ConfluentAccountUpdateRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountUpdateRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ConfluentAccountUpdateRequestAttributes attributes; @@ -32,37 +51,32 @@ public ConfluentAccountUpdateRequestData() {} @JsonCreator public ConfluentAccountUpdateRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ConfluentAccountUpdateRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConfluentAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ConfluentAccountUpdateRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ConfluentAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public ConfluentAccountUpdateRequestData attributes( - ConfluentAccountUpdateRequestAttributes attributes) { + public ConfluentAccountUpdateRequestData attributes(ConfluentAccountUpdateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes object for updating a Confluent account. - * + *

Attributes object for updating a Confluent account.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountUpdateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountUpdateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(ConfluentAccountUpdateRequestAttributes attributes) { this.attributes = attributes; } - public ConfluentAccountUpdateRequestData type(ConfluentAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -70,24 +84,25 @@ public ConfluentAccountUpdateRequestData type(ConfluentAccountType type) { } /** - * The JSON:API type for this API. Should always be confluent-cloud-accounts. - * + *

The JSON:API type for this API. Should always be confluent-cloud-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentAccountType getType() { + return type; + } public void setType(ConfluentAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ConfluentAccountUpdateRequestData object is equal to o. */ + /** + * Return true if this ConfluentAccountUpdateRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentAccountUpdateRequestData confluentAccountUpdateRequestData = - (ConfluentAccountUpdateRequestData) o; - return Objects.equals(this.attributes, confluentAccountUpdateRequestData.attributes) - && Objects.equals(this.type, confluentAccountUpdateRequestData.type); + ConfluentAccountUpdateRequestData confluentAccountUpdateRequestData = (ConfluentAccountUpdateRequestData) o; + return Objects.equals(this.attributes, confluentAccountUpdateRequestData.attributes) && Objects.equals(this.type, confluentAccountUpdateRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountsResponse.java index ee765d93778..6e3906a3cbb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Confluent account returned by the API. */ -@JsonPropertyOrder({ConfluentAccountsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Confluent account returned by the API.

+ */ +@JsonPropertyOrder({ + ConfluentAccountsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public ConfluentAccountsResponse data(List data) { } return this; } - public ConfluentAccountsResponse addDataItem(ConfluentAccountResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public ConfluentAccountsResponse addDataItem(ConfluentAccountResponseData dataIt } /** - * The Confluent account. - * + *

The Confluent account.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this ConfluentAccountsResponse object is equal to o. */ + /** + * Return true if this ConfluentAccountsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentAccountsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequest.java index 7401485a6c6..ff281293dc7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The JSON:API request for updating a Confluent resource. */ -@JsonPropertyOrder({ConfluentResourceRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The JSON:API request for updating a Confluent resource.

+ */ +@JsonPropertyOrder({ + ConfluentResourceRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ConfluentResourceRequestData data; @@ -26,12 +47,10 @@ public ConfluentResourceRequest() {} @JsonCreator public ConfluentResourceRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - ConfluentResourceRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ConfluentResourceRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ConfluentResourceRequest data(ConfluentResourceRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public ConfluentResourceRequest data(ConfluentResourceRequestData data) { } /** - * JSON:API request for updating a Confluent resource. - * + *

JSON:API request for updating a Confluent resource.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentResourceRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentResourceRequestData getData() { + return data; + } public void setData(ConfluentResourceRequestData data) { this.data = data; } - /** Return true if this ConfluentResourceRequest object is equal to o. */ + /** + * Return true if this ConfluentResourceRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentResourceRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java index 9890f6ce65c..9c8e73c91a9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes object for updating a Confluent resource. */ +/** + *

Attributes object for updating a Confluent resource.

+ */ @JsonPropertyOrder({ ConfluentResourceRequestAttributes.JSON_PROPERTY_RESOURCE_TYPE, ConfluentResourceRequestAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; private String resourceType; @@ -35,27 +53,23 @@ public ConfluentResourceRequestAttributes resourceType(String resourceType) { } /** - * The resource type of the Resource. Can be kafka, connector, - * ksql, or schema_registry. - * + *

The resource type of the Resource. Can be kafka, connector, ksql, or schema_registry.

* @return resourceType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getResourceType() { - return resourceType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceType() { + return resourceType; + } public void setResourceType(String resourceType) { this.resourceType = resourceType; } - public ConfluentResourceRequestAttributes tags(List tags) { this.tags = tags; return this; } - public ConfluentResourceRequestAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -65,23 +79,23 @@ public ConfluentResourceRequestAttributes addTagsItem(String tagsItem) { } /** - * A list of strings representing tags. Can be a single key, or key-value pairs separated by a - * colon. - * + *

A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ConfluentResourceRequestAttributes object is equal to o. */ + /** + * Return true if this ConfluentResourceRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,15 +104,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentResourceRequestAttributes confluentResourceRequestAttributes = - (ConfluentResourceRequestAttributes) o; - return Objects.equals(this.resourceType, confluentResourceRequestAttributes.resourceType) - && Objects.equals(this.tags, confluentResourceRequestAttributes.tags); + ConfluentResourceRequestAttributes confluentResourceRequestAttributes = (ConfluentResourceRequestAttributes) o; + return Objects.equals(this.resourceType, confluentResourceRequestAttributes.resourceType) && Objects.equals(this.tags, confluentResourceRequestAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(resourceType, tags); + return Objects.hash(resourceType,tags); } @Override @@ -112,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestData.java index 72f601d99d2..03c01c971b4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** JSON:API request for updating a Confluent resource. */ +/** + *

JSON:API request for updating a Confluent resource.

+ */ @JsonPropertyOrder({ ConfluentResourceRequestData.JSON_PROPERTY_ATTRIBUTES, ConfluentResourceRequestData.JSON_PROPERTY_ID, ConfluentResourceRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ConfluentResourceRequestAttributes attributes; @@ -36,17 +55,15 @@ public ConfluentResourceRequestData() {} @JsonCreator public ConfluentResourceRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ConfluentResourceRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConfluentResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ConfluentResourceRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ConfluentResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public ConfluentResourceRequestData attributes(ConfluentResourceRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public ConfluentResourceRequestData attributes(ConfluentResourceRequestAttribute } /** - * Attributes object for updating a Confluent resource. - * + *

Attributes object for updating a Confluent resource.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentResourceRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentResourceRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(ConfluentResourceRequestAttributes attributes) { this.attributes = attributes; } - public ConfluentResourceRequestData id(String id) { this.id = id; return this; } /** - * The ID associated with a Confluent resource. - * + *

The ID associated with a Confluent resource.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public ConfluentResourceRequestData type(ConfluentResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public ConfluentResourceRequestData type(ConfluentResourceType type) { } /** - * The JSON:API type for this request. - * + *

The JSON:API type for this request.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentResourceType getType() { + return type; + } public void setType(ConfluentResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ConfluentResourceRequestData object is equal to o. */ + /** + * Return true if this ConfluentResourceRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } ConfluentResourceRequestData confluentResourceRequestData = (ConfluentResourceRequestData) o; - return Objects.equals(this.attributes, confluentResourceRequestData.attributes) - && Objects.equals(this.id, confluentResourceRequestData.id) - && Objects.equals(this.type, confluentResourceRequestData.type); + return Objects.equals(this.attributes, confluentResourceRequestData.attributes) && Objects.equals(this.id, confluentResourceRequestData.id) && Objects.equals(this.type, confluentResourceRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponse.java index c68ba3c571b..bcca38c981a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response schema when interacting with a Confluent resource. */ -@JsonPropertyOrder({ConfluentResourceResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response schema when interacting with a Confluent resource.

+ */ +@JsonPropertyOrder({ + ConfluentResourceResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ConfluentResourceResponseData data; @@ -28,22 +50,23 @@ public ConfluentResourceResponse data(ConfluentResourceResponseData data) { } /** - * Confluent Cloud resource data. - * + *

Confluent Cloud resource data.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ConfluentResourceResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ConfluentResourceResponseData getData() { + return data; + } public void setData(ConfluentResourceResponseData data) { this.data = data; } - /** Return true if this ConfluentResourceResponse object is equal to o. */ + /** + * Return true if this ConfluentResourceResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentResourceResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java index 51c2b1ce0a5..18f7425e88d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Model representation of a Confluent Cloud resource. */ +/** + *

Model representation of a Confluent Cloud resource.

+ */ @JsonPropertyOrder({ ConfluentResourceResponseAttributes.JSON_PROPERTY_RESOURCE_TYPE, ConfluentResourceResponseAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; private String resourceType; @@ -34,36 +51,31 @@ public ConfluentResourceResponseAttributes() {} @JsonCreator public ConfluentResourceResponseAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) String resourceType) { - this.resourceType = resourceType; + @JsonProperty(required=true, value=JSON_PROPERTY_RESOURCE_TYPE)String resourceType) { + this.resourceType = resourceType; } - public ConfluentResourceResponseAttributes resourceType(String resourceType) { this.resourceType = resourceType; return this; } /** - * The resource type of the Resource. Can be kafka, connector, - * ksql, or schema_registry. - * + *

The resource type of the Resource. Can be kafka, connector, ksql, or schema_registry.

* @return resourceType - */ - @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getResourceType() { - return resourceType; - } - + **/ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getResourceType() { + return resourceType; + } public void setResourceType(String resourceType) { this.resourceType = resourceType; } - public ConfluentResourceResponseAttributes tags(List tags) { this.tags = tags; return this; } - public ConfluentResourceResponseAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -73,23 +85,23 @@ public ConfluentResourceResponseAttributes addTagsItem(String tagsItem) { } /** - * A list of strings representing tags. Can be a single key, or key-value pairs separated by a - * colon. - * + *

A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ConfluentResourceResponseAttributes object is equal to o. */ + /** + * Return true if this ConfluentResourceResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -98,15 +110,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConfluentResourceResponseAttributes confluentResourceResponseAttributes = - (ConfluentResourceResponseAttributes) o; - return Objects.equals(this.resourceType, confluentResourceResponseAttributes.resourceType) - && Objects.equals(this.tags, confluentResourceResponseAttributes.tags); + ConfluentResourceResponseAttributes confluentResourceResponseAttributes = (ConfluentResourceResponseAttributes) o; + return Objects.equals(this.resourceType, confluentResourceResponseAttributes.resourceType) && Objects.equals(this.tags, confluentResourceResponseAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(resourceType, tags); + return Objects.hash(resourceType,tags); } @Override @@ -120,7 +131,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseData.java index 3c75157a32b..7633d452219 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Confluent Cloud resource data. */ +/** + *

Confluent Cloud resource data.

+ */ @JsonPropertyOrder({ ConfluentResourceResponseData.JSON_PROPERTY_ATTRIBUTES, ConfluentResourceResponseData.JSON_PROPERTY_ID, ConfluentResourceResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ConfluentResourceResponseAttributes attributes; @@ -36,17 +55,15 @@ public ConfluentResourceResponseData() {} @JsonCreator public ConfluentResourceResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ConfluentResourceResponseAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConfluentResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ConfluentResourceResponseAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ConfluentResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public ConfluentResourceResponseData attributes(ConfluentResourceResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public ConfluentResourceResponseData attributes(ConfluentResourceResponseAttribu } /** - * Model representation of a Confluent Cloud resource. - * + *

Model representation of a Confluent Cloud resource.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentResourceResponseAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentResourceResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(ConfluentResourceResponseAttributes attributes) { this.attributes = attributes; } - public ConfluentResourceResponseData id(String id) { this.id = id; return this; } /** - * The ID associated with the Confluent resource. - * + *

The ID associated with the Confluent resource.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public ConfluentResourceResponseData type(ConfluentResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public ConfluentResourceResponseData type(ConfluentResourceType type) { } /** - * The JSON:API type for this request. - * + *

The JSON:API type for this request.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ConfluentResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ConfluentResourceType getType() { + return type; + } public void setType(ConfluentResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ConfluentResourceResponseData object is equal to o. */ + /** + * Return true if this ConfluentResourceResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } ConfluentResourceResponseData confluentResourceResponseData = (ConfluentResourceResponseData) o; - return Objects.equals(this.attributes, confluentResourceResponseData.attributes) - && Objects.equals(this.id, confluentResourceResponseData.id) - && Objects.equals(this.type, confluentResourceResponseData.type); + return Objects.equals(this.attributes, confluentResourceResponseData.attributes) && Objects.equals(this.id, confluentResourceResponseData.id) && Objects.equals(this.type, confluentResourceResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceType.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceType.java index a75d06f44ba..88cbbf6c391 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The JSON:API type for this request. */ +/** + *

The JSON:API type for this request.

+ */ @JsonSerialize(using = ConfluentResourceType.ConfluentResourceTypeSerializer.class) public class ConfluentResourceType { - public static final ConfluentResourceType CONFLUENT_CLOUD_RESOURCES = - new ConfluentResourceType("confluent-cloud-resources"); + public static final ConfluentResourceType CONFLUENT_CLOUD_RESOURCES = new ConfluentResourceType("confluent-cloud-resources"); - private static final Set allowedValues = - new HashSet(Arrays.asList("confluent-cloud-resources")); + private static final Set allowedValues = new HashSet(Arrays.asList("confluent-cloud-resources")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class ConfluentResourceTypeSerializer extends StdSerializer { - public ConfluentResourceTypeSerializer(Class t) { - super(t); - } - - public ConfluentResourceTypeSerializer() { - this(null); - } - - @Override - public void serialize( - ConfluentResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ConfluentResourceTypeSerializer(Class t) { + super(t); + } + + public ConfluentResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize(ConfluentResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ConfluentResourceType object is equal to o. */ + /** + * Return true if this ConfluentResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourcesResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourcesResponse.java index 75968398bfd..0c89074623f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourcesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourcesResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response schema when interacting with a list of Confluent resources. */ -@JsonPropertyOrder({ConfluentResourcesResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response schema when interacting with a list of Confluent resources.

+ */ +@JsonPropertyOrder({ + ConfluentResourcesResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourcesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public ConfluentResourcesResponse data(List data) } return this; } - public ConfluentResourcesResponse addDataItem(ConfluentResourceResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public ConfluentResourcesResponse addDataItem(ConfluentResourceResponseData data } /** - * The JSON:API data attribute. - * + *

The JSON:API data attribute.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this ConfluentResourcesResponse object is equal to o. */ + /** + * Return true if this ConfluentResourcesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, confluentResourcesResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ContentEncoding.java b/src/main/java/com/datadog/api/client/v2/model/ContentEncoding.java index c75ed1fa0c2..8b22fdf2497 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ContentEncoding.java +++ b/src/main/java/com/datadog/api/client/v2/model/ContentEncoding.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** HTTP header used to compress the media-type. */ +/** + *

HTTP header used to compress the media-type.

+ */ @JsonSerialize(using = ContentEncoding.ContentEncodingSerializer.class) public class ContentEncoding { @@ -27,8 +51,7 @@ public class ContentEncoding { public static final ContentEncoding GZIP = new ContentEncoding("gzip"); public static final ContentEncoding DEFLATE = new ContentEncoding("deflate"); - private static final Set allowedValues = - new HashSet(Arrays.asList("identity", "gzip", "deflate")); + private static final Set allowedValues = new HashSet(Arrays.asList("identity", "gzip", "deflate")); private String value; @@ -41,19 +64,18 @@ public boolean isValid() { } public static class ContentEncodingSerializer extends StdSerializer { - public ContentEncodingSerializer(Class t) { - super(t); - } - - public ContentEncodingSerializer() { - this(null); - } - - @Override - public void serialize(ContentEncoding value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ContentEncodingSerializer(Class t) { + super(t); + } + + public ContentEncodingSerializer() { + this(null); + } + + @Override + public void serialize(ContentEncoding value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ContentEncoding object is equal to o. */ + /** + * Return true if this ContentEncoding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/CostByOrg.java b/src/main/java/com/datadog/api/client/v2/model/CostByOrg.java index b97c521a1c1..379583251f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CostByOrg.java +++ b/src/main/java/com/datadog/api/client/v2/model/CostByOrg.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Cost data. */ + +/** + *

Cost data.

+ */ @JsonPropertyOrder({ CostByOrg.JSON_PROPERTY_ATTRIBUTES, CostByOrg.JSON_PROPERTY_ID, CostByOrg.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CostByOrg { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private CostByOrgAttributes attributes; @@ -38,42 +58,38 @@ public CostByOrg attributes(CostByOrgAttributes attributes) { } /** - * Cost attributes data. - * + *

Cost attributes data.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CostByOrgAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CostByOrgAttributes getAttributes() { + return attributes; + } public void setAttributes(CostByOrgAttributes attributes) { this.attributes = attributes; } - public CostByOrg id(String id) { this.id = id; return this; } /** - * Unique ID of the response. - * + *

Unique ID of the response.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public CostByOrg type(CostByOrgType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public CostByOrg type(CostByOrgType type) { } /** - * Type of cost data. - * + *

Type of cost data.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CostByOrgType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CostByOrgType getType() { + return type; + } public void setType(CostByOrgType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this CostByOrg object is equal to o. */ + /** + * Return true if this CostByOrg object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } CostByOrg costByOrg = (CostByOrg) o; - return Objects.equals(this.attributes, costByOrg.attributes) - && Objects.equals(this.id, costByOrg.id) - && Objects.equals(this.type, costByOrg.type); + return Objects.equals(this.attributes, costByOrg.attributes) && Objects.equals(this.id, costByOrg.id) && Objects.equals(this.type, costByOrg.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CostByOrgAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CostByOrgAttributes.java index d953a3945ed..7f8c4f34888 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CostByOrgAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CostByOrgAttributes.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Cost attributes data. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Cost attributes data.

+ */ @JsonPropertyOrder({ CostByOrgAttributes.JSON_PROPERTY_CHARGES, CostByOrgAttributes.JSON_PROPERTY_DATE, @@ -26,15 +41,14 @@ CostByOrgAttributes.JSON_PROPERTY_REGION, CostByOrgAttributes.JSON_PROPERTY_TOTAL_COST }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CostByOrgAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CHARGES = "charges"; private List charges = null; public static final String JSON_PROPERTY_DATE = "date"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime date; @@ -57,7 +71,6 @@ public CostByOrgAttributes charges(List charges) { } return this; } - public CostByOrgAttributes addChargesItem(ChargebackBreakdown chargesItem) { if (this.charges == null) { this.charges = new ArrayList<>(); @@ -68,127 +81,118 @@ public CostByOrgAttributes addChargesItem(ChargebackBreakdown chargesItem) { } /** - * List of charges data reported for the requested month. - * + *

List of charges data reported for the requested month.

* @return charges - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHARGES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCharges() { - return charges; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHARGES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCharges() { + return charges; + } public void setCharges(List charges) { this.charges = charges; } - public CostByOrgAttributes date(OffsetDateTime date) { this.date = date; return this; } /** - * The month requested. - * + *

The month requested.

* @return date - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getDate() { - return date; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDate() { + return date; + } public void setDate(OffsetDateTime date) { this.date = date; } - public CostByOrgAttributes orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public CostByOrgAttributes publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public CostByOrgAttributes region(String region) { this.region = region; return this; } /** - * The region of the Datadog instance that the organization belongs to. - * + *

The region of the Datadog instance that the organization belongs to.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } public void setRegion(String region) { this.region = region; } - public CostByOrgAttributes totalCost(Double totalCost) { this.totalCost = totalCost; return this; } /** - * The total cost of products for the month. - * + *

The total cost of products for the month.

* @return totalCost - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTotalCost() { - return totalCost; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getTotalCost() { + return totalCost; + } public void setTotalCost(Double totalCost) { this.totalCost = totalCost; } - /** Return true if this CostByOrgAttributes object is equal to o. */ + /** + * Return true if this CostByOrgAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -198,17 +202,13 @@ public boolean equals(Object o) { return false; } CostByOrgAttributes costByOrgAttributes = (CostByOrgAttributes) o; - return Objects.equals(this.charges, costByOrgAttributes.charges) - && Objects.equals(this.date, costByOrgAttributes.date) - && Objects.equals(this.orgName, costByOrgAttributes.orgName) - && Objects.equals(this.publicId, costByOrgAttributes.publicId) - && Objects.equals(this.region, costByOrgAttributes.region) - && Objects.equals(this.totalCost, costByOrgAttributes.totalCost); + return Objects.equals(this.charges, costByOrgAttributes.charges) && Objects.equals(this.date, costByOrgAttributes.date) && Objects.equals(this.orgName, costByOrgAttributes.orgName) && Objects.equals(this.publicId, costByOrgAttributes.publicId) && Objects.equals(this.region, costByOrgAttributes.region) && Objects.equals(this.totalCost, costByOrgAttributes.totalCost); } + @Override public int hashCode() { - return Objects.hash(charges, date, orgName, publicId, region, totalCost); + return Objects.hash(charges,date,orgName,publicId,region,totalCost); } @Override @@ -226,7 +226,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CostByOrgResponse.java b/src/main/java/com/datadog/api/client/v2/model/CostByOrgResponse.java index 592f3a0a42c..775df751da0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CostByOrgResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CostByOrgResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Chargeback Summary response. */ -@JsonPropertyOrder({CostByOrgResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Chargeback Summary response.

+ */ +@JsonPropertyOrder({ + CostByOrgResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CostByOrgResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public CostByOrgResponse data(List data) { } return this; } - public CostByOrgResponse addDataItem(CostByOrg dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public CostByOrgResponse addDataItem(CostByOrg dataItem) { } /** - * Response containing Chargeback Summary. - * + *

Response containing Chargeback Summary.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this CostByOrgResponse object is equal to o. */ + /** + * Return true if this CostByOrgResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, costByOrgResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CostByOrgType.java b/src/main/java/com/datadog/api/client/v2/model/CostByOrgType.java index d6119ca4694..73900f625b6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CostByOrgType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CostByOrgType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of cost data. */ +/** + *

Type of cost data.

+ */ @JsonSerialize(using = CostByOrgType.CostByOrgTypeSerializer.class) public class CostByOrgType { public static final CostByOrgType COST_BY_ORG = new CostByOrgType("cost_by_org"); - private static final Set allowedValues = - new HashSet(Arrays.asList("cost_by_org")); + private static final Set allowedValues = new HashSet(Arrays.asList("cost_by_org")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class CostByOrgTypeSerializer extends StdSerializer { - public CostByOrgTypeSerializer(Class t) { - super(t); - } - - public CostByOrgTypeSerializer() { - this(null); - } - - @Override - public void serialize(CostByOrgType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public CostByOrgTypeSerializer(Class t) { + super(t); + } + + public CostByOrgTypeSerializer() { + this(null); + } + + @Override + public void serialize(CostByOrgType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this CostByOrgType object is equal to o. */ + /** + * Return true if this CostByOrgType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/Creator.java b/src/main/java/com/datadog/api/client/v2/model/Creator.java index 184c2f3ab0b..93c64624857 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Creator.java +++ b/src/main/java/com/datadog/api/client/v2/model/Creator.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Creator of the object. */ + +/** + *

Creator of the object.

+ */ @JsonPropertyOrder({ Creator.JSON_PROPERTY_EMAIL, Creator.JSON_PROPERTY_HANDLE, Creator.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Creator { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -37,64 +57,61 @@ public Creator email(String email) { } /** - * Email of the creator. - * + *

Email of the creator.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public Creator handle(String handle) { this.handle = handle; return this; } /** - * Handle of the creator. - * + *

Handle of the creator.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public Creator name(String name) { this.name = name; return this; } /** - * Name of the creator. - * + *

Name of the creator.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this Creator object is equal to o. */ + /** + * Return true if this Creator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } Creator creator = (Creator) o; - return Objects.equals(this.email, creator.email) - && Objects.equals(this.handle, creator.handle) - && Objects.equals(this.name, creator.name); + return Objects.equals(this.email, creator.email) && Objects.equals(this.handle, creator.handle) && Objects.equals(this.name, creator.name); } + @Override public int hashCode() { - return Objects.hash(email, handle, name); + return Objects.hash(email,handle,name); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsRequest.java index 75b7315ff12..f30f4cc8a44 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsRequest.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Request containing a list of dashboards to add. */ -@JsonPropertyOrder({DashboardListAddItemsRequest.JSON_PROPERTY_DASHBOARDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Request containing a list of dashboards to add.

+ */ +@JsonPropertyOrder({ + DashboardListAddItemsRequest.JSON_PROPERTY_DASHBOARDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListAddItemsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARDS = "dashboards"; private List dashboards = null; @@ -30,7 +50,6 @@ public DashboardListAddItemsRequest dashboards(List da } return this; } - public DashboardListAddItemsRequest addDashboardsItem(DashboardListItemRequest dashboardsItem) { if (this.dashboards == null) { this.dashboards = new ArrayList<>(); @@ -41,22 +60,23 @@ public DashboardListAddItemsRequest addDashboardsItem(DashboardListItemRequest d } /** - * List of dashboards to add the dashboard list. - * + *

List of dashboards to add the dashboard list.

* @return dashboards - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDashboards() { - return dashboards; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDashboards() { + return dashboards; + } public void setDashboards(List dashboards) { this.dashboards = dashboards; } - /** Return true if this DashboardListAddItemsRequest object is equal to o. */ + /** + * Return true if this DashboardListAddItemsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.dashboards, dashboardListAddItemsRequest.dashboards); } + @Override public int hashCode() { return Objects.hash(dashboards); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsResponse.java index 4a30ce6eac3..0ab5783991d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListAddItemsResponse.java @@ -6,34 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing a list of added dashboards. */ -@JsonPropertyOrder({DashboardListAddItemsResponse.JSON_PROPERTY_ADDED_DASHBOARDS_TO_LIST}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing a list of added dashboards.

+ */ +@JsonPropertyOrder({ + DashboardListAddItemsResponse.JSON_PROPERTY_ADDED_DASHBOARDS_TO_LIST +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListAddItemsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ADDED_DASHBOARDS_TO_LIST = "added_dashboards_to_list"; private List addedDashboardsToList = null; - public DashboardListAddItemsResponse addedDashboardsToList( - List addedDashboardsToList) { + public DashboardListAddItemsResponse addedDashboardsToList(List addedDashboardsToList) { this.addedDashboardsToList = addedDashboardsToList; for (DashboardListItemResponse item : addedDashboardsToList) { this.unparsed |= item.unparsed; } return this; } - - public DashboardListAddItemsResponse addAddedDashboardsToListItem( - DashboardListItemResponse addedDashboardsToListItem) { + public DashboardListAddItemsResponse addAddedDashboardsToListItem(DashboardListItemResponse addedDashboardsToListItem) { if (this.addedDashboardsToList == null) { this.addedDashboardsToList = new ArrayList<>(); } @@ -43,22 +60,23 @@ public DashboardListAddItemsResponse addAddedDashboardsToListItem( } /** - * List of dashboards added to the dashboard list. - * + *

List of dashboards added to the dashboard list.

* @return addedDashboardsToList - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ADDED_DASHBOARDS_TO_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAddedDashboardsToList() { - return addedDashboardsToList; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDED_DASHBOARDS_TO_LIST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAddedDashboardsToList() { + return addedDashboardsToList; + } public void setAddedDashboardsToList(List addedDashboardsToList) { this.addedDashboardsToList = addedDashboardsToList; } - /** Return true if this DashboardListAddItemsResponse object is equal to o. */ + /** + * Return true if this DashboardListAddItemsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -68,10 +86,10 @@ public boolean equals(Object o) { return false; } DashboardListAddItemsResponse dashboardListAddItemsResponse = (DashboardListAddItemsResponse) o; - return Objects.equals( - this.addedDashboardsToList, dashboardListAddItemsResponse.addedDashboardsToList); + return Objects.equals(this.addedDashboardsToList, dashboardListAddItemsResponse.addedDashboardsToList); } + @Override public int hashCode() { return Objects.hash(addedDashboardsToList); @@ -81,15 +99,14 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardListAddItemsResponse {\n"); - sb.append(" addedDashboardsToList: ") - .append(toIndentedString(addedDashboardsToList)) - .append("\n"); + sb.append(" addedDashboardsToList: ").append(toIndentedString(addedDashboardsToList)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsRequest.java index 5c4468d34e7..c4223e585ed 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsRequest.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Request containing a list of dashboards to delete. */ -@JsonPropertyOrder({DashboardListDeleteItemsRequest.JSON_PROPERTY_DASHBOARDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Request containing a list of dashboards to delete.

+ */ +@JsonPropertyOrder({ + DashboardListDeleteItemsRequest.JSON_PROPERTY_DASHBOARDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListDeleteItemsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARDS = "dashboards"; private List dashboards = null; @@ -30,9 +50,7 @@ public DashboardListDeleteItemsRequest dashboards(List } return this; } - - public DashboardListDeleteItemsRequest addDashboardsItem( - DashboardListItemRequest dashboardsItem) { + public DashboardListDeleteItemsRequest addDashboardsItem(DashboardListItemRequest dashboardsItem) { if (this.dashboards == null) { this.dashboards = new ArrayList<>(); } @@ -42,22 +60,23 @@ public DashboardListDeleteItemsRequest addDashboardsItem( } /** - * List of dashboards to delete from the dashboard list. - * + *

List of dashboards to delete from the dashboard list.

* @return dashboards - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDashboards() { - return dashboards; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDashboards() { + return dashboards; + } public void setDashboards(List dashboards) { this.dashboards = dashboards; } - /** Return true if this DashboardListDeleteItemsRequest object is equal to o. */ + /** + * Return true if this DashboardListDeleteItemsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardListDeleteItemsRequest dashboardListDeleteItemsRequest = - (DashboardListDeleteItemsRequest) o; + DashboardListDeleteItemsRequest dashboardListDeleteItemsRequest = (DashboardListDeleteItemsRequest) o; return Objects.equals(this.dashboards, dashboardListDeleteItemsRequest.dashboards); } + @Override public int hashCode() { return Objects.hash(dashboards); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsResponse.java index faa9ba7ba39..5a3f3463adb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListDeleteItemsResponse.java @@ -6,35 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing a list of deleted dashboards. */ -@JsonPropertyOrder({DashboardListDeleteItemsResponse.JSON_PROPERTY_DELETED_DASHBOARDS_FROM_LIST}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing a list of deleted dashboards.

+ */ +@JsonPropertyOrder({ + DashboardListDeleteItemsResponse.JSON_PROPERTY_DELETED_DASHBOARDS_FROM_LIST +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListDeleteItemsResponse { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DELETED_DASHBOARDS_FROM_LIST = - "deleted_dashboards_from_list"; + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_DELETED_DASHBOARDS_FROM_LIST = "deleted_dashboards_from_list"; private List deletedDashboardsFromList = null; - public DashboardListDeleteItemsResponse deletedDashboardsFromList( - List deletedDashboardsFromList) { + public DashboardListDeleteItemsResponse deletedDashboardsFromList(List deletedDashboardsFromList) { this.deletedDashboardsFromList = deletedDashboardsFromList; for (DashboardListItemResponse item : deletedDashboardsFromList) { this.unparsed |= item.unparsed; } return this; } - - public DashboardListDeleteItemsResponse addDeletedDashboardsFromListItem( - DashboardListItemResponse deletedDashboardsFromListItem) { + public DashboardListDeleteItemsResponse addDeletedDashboardsFromListItem(DashboardListItemResponse deletedDashboardsFromListItem) { if (this.deletedDashboardsFromList == null) { this.deletedDashboardsFromList = new ArrayList<>(); } @@ -44,23 +60,23 @@ public DashboardListDeleteItemsResponse addDeletedDashboardsFromListItem( } /** - * List of dashboards deleted from the dashboard list. - * + *

List of dashboards deleted from the dashboard list.

* @return deletedDashboardsFromList - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DELETED_DASHBOARDS_FROM_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDeletedDashboardsFromList() { - return deletedDashboardsFromList; - } - - public void setDeletedDashboardsFromList( - List deletedDashboardsFromList) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_DASHBOARDS_FROM_LIST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDeletedDashboardsFromList() { + return deletedDashboardsFromList; + } + public void setDeletedDashboardsFromList(List deletedDashboardsFromList) { this.deletedDashboardsFromList = deletedDashboardsFromList; } - /** Return true if this DashboardListDeleteItemsResponse object is equal to o. */ + /** + * Return true if this DashboardListDeleteItemsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,12 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardListDeleteItemsResponse dashboardListDeleteItemsResponse = - (DashboardListDeleteItemsResponse) o; - return Objects.equals( - this.deletedDashboardsFromList, dashboardListDeleteItemsResponse.deletedDashboardsFromList); + DashboardListDeleteItemsResponse dashboardListDeleteItemsResponse = (DashboardListDeleteItemsResponse) o; + return Objects.equals(this.deletedDashboardsFromList, dashboardListDeleteItemsResponse.deletedDashboardsFromList); } + @Override public int hashCode() { return Objects.hash(deletedDashboardsFromList); @@ -84,15 +99,14 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DashboardListDeleteItemsResponse {\n"); - sb.append(" deletedDashboardsFromList: ") - .append(toIndentedString(deletedDashboardsFromList)) - .append("\n"); + sb.append(" deletedDashboardsFromList: ").append(toIndentedString(deletedDashboardsFromList)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java index 60ff9b534aa..0b1a1509aa1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** A dashboard within a list. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A dashboard within a list.

+ */ @JsonPropertyOrder({ DashboardListItem.JSON_PROPERTY_AUTHOR, DashboardListItem.JSON_PROPERTY_CREATED, @@ -31,15 +47,14 @@ DashboardListItem.JSON_PROPERTY_TYPE, DashboardListItem.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AUTHOR = "author"; private Creator author; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -59,7 +74,6 @@ public class DashboardListItem { private Boolean isShared; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; @@ -79,13 +93,12 @@ public DashboardListItem() {} @JsonCreator public DashboardListItem( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DashboardType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)DashboardType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public DashboardListItem author(Creator author) { this.author = author; this.unparsed |= author.unparsed; @@ -93,137 +106,134 @@ public DashboardListItem author(Creator author) { } /** - * Creator of the object. - * + *

Creator of the object.

* @return author - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Creator getAuthor() { - return author; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Creator getAuthor() { + return author; + } public void setAuthor(Creator author) { this.author = author; } /** - * Date of creation of the dashboard. - * + *

Date of creation of the dashboard.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * URL to the icon of the dashboard. - * + *

URL to the icon of the dashboard.

* @return icon - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ICON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIcon() { - return icon; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ICON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIcon() { + return icon; + } public DashboardListItem id(String id) { this.id = id; return this; } /** - * ID of the dashboard. - * + *

ID of the dashboard.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } /** - * Whether or not the dashboard is in the favorites. - * + *

Whether or not the dashboard is in the favorites.

* @return isFavorite - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_FAVORITE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsFavorite() { - return isFavorite; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsFavorite() { + return isFavorite; + } /** - * Whether or not the dashboard is read only. - * + *

Whether or not the dashboard is read only.

* @return isReadOnly - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsReadOnly() { - return isReadOnly; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_READ_ONLY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsReadOnly() { + return isReadOnly; + } /** - * Whether the dashboard is publicly shared or not. - * + *

Whether the dashboard is publicly shared or not.

* @return isShared - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_SHARED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsShared() { - return isShared; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SHARED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsShared() { + return isShared; + } /** - * Date of last edition of the dashboard. - * + *

Date of last edition of the dashboard.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } /** - * Popularity of the dashboard. maximum: 5 - * + *

Popularity of the dashboard.

+ * maximum: 5 * @return popularity - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POPULARITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPopularity() { - return popularity; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POPULARITY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPopularity() { + return popularity; + } /** - * Title of the dashboard. - * + *

Title of the dashboard.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public DashboardListItem type(DashboardType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -231,36 +241,37 @@ public DashboardListItem type(DashboardType type) { } /** - * The type of the dashboard. - * + *

The type of the dashboard.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DashboardType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DashboardType getType() { + return type; + } public void setType(DashboardType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } /** - * URL path to the dashboard. - * + *

URL path to the dashboard.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } - /** Return true if this DashboardListItem object is equal to o. */ + /** + * Return true if this DashboardListItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -270,35 +281,13 @@ public boolean equals(Object o) { return false; } DashboardListItem dashboardListItem = (DashboardListItem) o; - return Objects.equals(this.author, dashboardListItem.author) - && Objects.equals(this.created, dashboardListItem.created) - && Objects.equals(this.icon, dashboardListItem.icon) - && Objects.equals(this.id, dashboardListItem.id) - && Objects.equals(this.isFavorite, dashboardListItem.isFavorite) - && Objects.equals(this.isReadOnly, dashboardListItem.isReadOnly) - && Objects.equals(this.isShared, dashboardListItem.isShared) - && Objects.equals(this.modified, dashboardListItem.modified) - && Objects.equals(this.popularity, dashboardListItem.popularity) - && Objects.equals(this.title, dashboardListItem.title) - && Objects.equals(this.type, dashboardListItem.type) - && Objects.equals(this.url, dashboardListItem.url); + return Objects.equals(this.author, dashboardListItem.author) && Objects.equals(this.created, dashboardListItem.created) && Objects.equals(this.icon, dashboardListItem.icon) && Objects.equals(this.id, dashboardListItem.id) && Objects.equals(this.isFavorite, dashboardListItem.isFavorite) && Objects.equals(this.isReadOnly, dashboardListItem.isReadOnly) && Objects.equals(this.isShared, dashboardListItem.isShared) && Objects.equals(this.modified, dashboardListItem.modified) && Objects.equals(this.popularity, dashboardListItem.popularity) && Objects.equals(this.title, dashboardListItem.title) && Objects.equals(this.type, dashboardListItem.type) && Objects.equals(this.url, dashboardListItem.url); } + @Override public int hashCode() { - return Objects.hash( - author, - created, - icon, - id, - isFavorite, - isReadOnly, - isShared, - modified, - popularity, - title, - type, - url); + return Objects.hash(author,created,icon,id,isFavorite,isReadOnly,isShared,modified,popularity,title,type,url); } @Override @@ -322,7 +311,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListItemRequest.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListItemRequest.java index a728a5cb353..b8f8a737309 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListItemRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListItemRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A dashboard within a list. */ + +/** + *

A dashboard within a list.

+ */ @JsonPropertyOrder({ DashboardListItemRequest.JSON_PROPERTY_ID, DashboardListItemRequest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListItemRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public DashboardListItemRequest() {} @JsonCreator public DashboardListItemRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DashboardType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)DashboardType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public DashboardListItemRequest id(String id) { this.id = id; return this; } /** - * ID of the dashboard. - * + *

ID of the dashboard.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public DashboardListItemRequest type(DashboardType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public DashboardListItemRequest type(DashboardType type) { } /** - * The type of the dashboard. - * + *

The type of the dashboard.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DashboardType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DashboardType getType() { + return type; + } public void setType(DashboardType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this DashboardListItemRequest object is equal to o. */ + /** + * Return true if this DashboardListItemRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +110,13 @@ public boolean equals(Object o) { return false; } DashboardListItemRequest dashboardListItemRequest = (DashboardListItemRequest) o; - return Objects.equals(this.id, dashboardListItemRequest.id) - && Objects.equals(this.type, dashboardListItemRequest.type); + return Objects.equals(this.id, dashboardListItemRequest.id) && Objects.equals(this.type, dashboardListItemRequest.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -113,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListItemResponse.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListItemResponse.java index aba12434501..df472001c7c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListItemResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListItemResponse.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A dashboard within a list. */ +/** + *

A dashboard within a list.

+ */ @JsonPropertyOrder({ DashboardListItemResponse.JSON_PROPERTY_ID, DashboardListItemResponse.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListItemResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,24 +51,23 @@ public DashboardListItemResponse() {} @JsonCreator public DashboardListItemResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DashboardType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)DashboardType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } /** - * ID of the dashboard. - * + *

ID of the dashboard.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public DashboardListItemResponse type(DashboardType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -57,24 +75,25 @@ public DashboardListItemResponse type(DashboardType type) { } /** - * The type of the dashboard. - * + *

The type of the dashboard.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DashboardType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public DashboardType getType() { + return type; + } public void setType(DashboardType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this DashboardListItemResponse object is equal to o. */ + /** + * Return true if this DashboardListItemResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +103,13 @@ public boolean equals(Object o) { return false; } DashboardListItemResponse dashboardListItemResponse = (DashboardListItemResponse) o; - return Objects.equals(this.id, dashboardListItemResponse.id) - && Objects.equals(this.type, dashboardListItemResponse.type); + return Objects.equals(this.id, dashboardListItemResponse.id) && Objects.equals(this.type, dashboardListItemResponse.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -104,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListItems.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListItems.java index 5d0879cfde3..bd49c51e19c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListItems.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Dashboards within a list. */ +/** + *

Dashboards within a list.

+ */ @JsonPropertyOrder({ DashboardListItems.JSON_PROPERTY_DASHBOARDS, DashboardListItems.JSON_PROPERTY_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListItems { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARDS = "dashboards"; private List dashboards = new ArrayList<>(); @@ -34,11 +51,9 @@ public DashboardListItems() {} @JsonCreator public DashboardListItems( - @JsonProperty(required = true, value = JSON_PROPERTY_DASHBOARDS) - List dashboards) { - this.dashboards = dashboards; + @JsonProperty(required=true, value=JSON_PROPERTY_DASHBOARDS)List dashboards) { + this.dashboards = dashboards; } - public DashboardListItems dashboards(List dashboards) { this.dashboards = dashboards; for (DashboardListItem item : dashboards) { @@ -46,7 +61,6 @@ public DashboardListItems dashboards(List dashboards) { } return this; } - public DashboardListItems addDashboardsItem(DashboardListItem dashboardsItem) { this.dashboards.add(dashboardsItem); this.unparsed |= dashboardsItem.unparsed; @@ -54,33 +68,34 @@ public DashboardListItems addDashboardsItem(DashboardListItem dashboardsItem) { } /** - * List of dashboards in the dashboard list. - * + *

List of dashboards in the dashboard list.

* @return dashboards - */ - @JsonProperty(JSON_PROPERTY_DASHBOARDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getDashboards() { - return dashboards; - } - + **/ + @JsonProperty(JSON_PROPERTY_DASHBOARDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getDashboards() { + return dashboards; + } public void setDashboards(List dashboards) { this.dashboards = dashboards; } /** - * Number of dashboards in the dashboard list. - * + *

Number of dashboards in the dashboard list.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotal() { - return total; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotal() { + return total; + } - /** Return true if this DashboardListItems object is equal to o. */ + /** + * Return true if this DashboardListItems object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,13 +105,13 @@ public boolean equals(Object o) { return false; } DashboardListItems dashboardListItems = (DashboardListItems) o; - return Objects.equals(this.dashboards, dashboardListItems.dashboards) - && Objects.equals(this.total, dashboardListItems.total); + return Objects.equals(this.dashboards, dashboardListItems.dashboards) && Objects.equals(this.total, dashboardListItems.total); } + @Override public int hashCode() { - return Objects.hash(dashboards, total); + return Objects.hash(dashboards,total); } @Override @@ -110,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsRequest.java index c7c7fc071de..8f6a7f85069 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsRequest.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Request containing the list of dashboards to update to. */ -@JsonPropertyOrder({DashboardListUpdateItemsRequest.JSON_PROPERTY_DASHBOARDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Request containing the list of dashboards to update to.

+ */ +@JsonPropertyOrder({ + DashboardListUpdateItemsRequest.JSON_PROPERTY_DASHBOARDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListUpdateItemsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARDS = "dashboards"; private List dashboards = null; @@ -30,9 +50,7 @@ public DashboardListUpdateItemsRequest dashboards(List } return this; } - - public DashboardListUpdateItemsRequest addDashboardsItem( - DashboardListItemRequest dashboardsItem) { + public DashboardListUpdateItemsRequest addDashboardsItem(DashboardListItemRequest dashboardsItem) { if (this.dashboards == null) { this.dashboards = new ArrayList<>(); } @@ -42,22 +60,23 @@ public DashboardListUpdateItemsRequest addDashboardsItem( } /** - * List of dashboards to update the dashboard list to. - * + *

List of dashboards to update the dashboard list to.

* @return dashboards - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDashboards() { - return dashboards; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDashboards() { + return dashboards; + } public void setDashboards(List dashboards) { this.dashboards = dashboards; } - /** Return true if this DashboardListUpdateItemsRequest object is equal to o. */ + /** + * Return true if this DashboardListUpdateItemsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardListUpdateItemsRequest dashboardListUpdateItemsRequest = - (DashboardListUpdateItemsRequest) o; + DashboardListUpdateItemsRequest dashboardListUpdateItemsRequest = (DashboardListUpdateItemsRequest) o; return Objects.equals(this.dashboards, dashboardListUpdateItemsRequest.dashboards); } + @Override public int hashCode() { return Objects.hash(dashboards); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsResponse.java index 4a59e454d86..ec6b89437b2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListUpdateItemsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing a list of updated dashboards. */ -@JsonPropertyOrder({DashboardListUpdateItemsResponse.JSON_PROPERTY_DASHBOARDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing a list of updated dashboards.

+ */ +@JsonPropertyOrder({ + DashboardListUpdateItemsResponse.JSON_PROPERTY_DASHBOARDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DashboardListUpdateItemsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DASHBOARDS = "dashboards"; private List dashboards = null; @@ -30,9 +50,7 @@ public DashboardListUpdateItemsResponse dashboards(List(); } @@ -42,22 +60,23 @@ public DashboardListUpdateItemsResponse addDashboardsItem( } /** - * List of dashboards in the dashboard list. - * + *

List of dashboards in the dashboard list.

* @return dashboards - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DASHBOARDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDashboards() { - return dashboards; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DASHBOARDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDashboards() { + return dashboards; + } public void setDashboards(List dashboards) { this.dashboards = dashboards; } - /** Return true if this DashboardListUpdateItemsResponse object is equal to o. */ + /** + * Return true if this DashboardListUpdateItemsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DashboardListUpdateItemsResponse dashboardListUpdateItemsResponse = - (DashboardListUpdateItemsResponse) o; + DashboardListUpdateItemsResponse dashboardListUpdateItemsResponse = (DashboardListUpdateItemsResponse) o; return Objects.equals(this.dashboards, dashboardListUpdateItemsResponse.dashboards); } + @Override public int hashCode() { return Objects.hash(dashboards); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardType.java b/src/main/java/com/datadog/api/client/v2/model/DashboardType.java index 7fe1ff3f606..2598ff120c8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardType.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardType.java @@ -6,39 +6,54 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the dashboard. */ +/** + *

The type of the dashboard.

+ */ @JsonSerialize(using = DashboardType.DashboardTypeSerializer.class) public class DashboardType { public static final DashboardType CUSTOM_TIMEBOARD = new DashboardType("custom_timeboard"); public static final DashboardType CUSTOM_SCREENBOARD = new DashboardType("custom_screenboard"); - public static final DashboardType INTEGRATION_SCREENBOARD = - new DashboardType("integration_screenboard"); - public static final DashboardType INTEGRATION_TIMEBOARD = - new DashboardType("integration_timeboard"); + public static final DashboardType INTEGRATION_SCREENBOARD = new DashboardType("integration_screenboard"); + public static final DashboardType INTEGRATION_TIMEBOARD = new DashboardType("integration_timeboard"); public static final DashboardType HOST_TIMEBOARD = new DashboardType("host_timeboard"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "custom_timeboard", - "custom_screenboard", - "integration_screenboard", - "integration_timeboard", - "host_timeboard")); + private static final Set allowedValues = new HashSet(Arrays.asList("custom_timeboard", "custom_screenboard", "integration_screenboard", "integration_timeboard", "host_timeboard")); private String value; @@ -51,19 +66,18 @@ public boolean isValid() { } public static class DashboardTypeSerializer extends StdSerializer { - public DashboardTypeSerializer(Class t) { - super(t); - } - - public DashboardTypeSerializer() { - this(null); - } - - @Override - public void serialize(DashboardType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public DashboardTypeSerializer(Class t) { + super(t); + } + + public DashboardTypeSerializer() { + this(null); + } + + @Override + public void serialize(DashboardType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -75,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this DashboardType object is equal to o. */ + /** + * Return true if this DashboardType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/DataScalarColumn.java b/src/main/java/com/datadog/api/client/v2/model/DataScalarColumn.java index 8ac914285d6..ba7c6afb3eb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DataScalarColumn.java +++ b/src/main/java/com/datadog/api/client/v2/model/DataScalarColumn.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A column containing the numerical results for a formula or query. */ + +/** + *

A column containing the numerical results for a formula or query.

+ */ @JsonPropertyOrder({ DataScalarColumn.JSON_PROPERTY_META, DataScalarColumn.JSON_PROPERTY_NAME, DataScalarColumn.JSON_PROPERTY_TYPE, DataScalarColumn.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class DataScalarColumn { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private ScalarMeta meta; @@ -44,68 +62,61 @@ public DataScalarColumn meta(ScalarMeta meta) { } /** - * Metadata for the resulting numerical values. - * + *

Metadata for the resulting numerical values.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScalarMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScalarMeta getMeta() { + return meta; + } public void setMeta(ScalarMeta meta) { this.meta = meta; } - public DataScalarColumn name(String name) { this.name = name; return this; } /** - * The name referencing the formula or query for this column. - * + *

The name referencing the formula or query for this column.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public DataScalarColumn type(String type) { this.type = type; return this; } /** - * The type of column present. - * + *

The type of column present.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - public DataScalarColumn values(List values) { this.values = values; return this; } - public DataScalarColumn addValuesItem(Double valuesItem) { if (this.values == null) { this.values = new ArrayList<>(); @@ -115,22 +126,23 @@ public DataScalarColumn addValuesItem(Double valuesItem) { } /** - * The array of numerical values for one formula or query. - * + *

The array of numerical values for one formula or query.

* @return values - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getValues() { - return values; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getValues() { + return values; + } public void setValues(List values) { this.values = values; } - /** Return true if this DataScalarColumn object is equal to o. */ + /** + * Return true if this DataScalarColumn object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -140,15 +152,13 @@ public boolean equals(Object o) { return false; } DataScalarColumn dataScalarColumn = (DataScalarColumn) o; - return Objects.equals(this.meta, dataScalarColumn.meta) - && Objects.equals(this.name, dataScalarColumn.name) - && Objects.equals(this.type, dataScalarColumn.type) - && Objects.equals(this.values, dataScalarColumn.values); + return Objects.equals(this.meta, dataScalarColumn.meta) && Objects.equals(this.name, dataScalarColumn.name) && Objects.equals(this.type, dataScalarColumn.type) && Objects.equals(this.values, dataScalarColumn.values); } + @Override public int hashCode() { - return Objects.hash(meta, name, type, values); + return Objects.hash(meta,name,type,values); } @Override @@ -164,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Event.java b/src/main/java/com/datadog/api/client/v2/model/Event.java index 43c0912e69a..40b5a0b3147 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Event.java +++ b/src/main/java/com/datadog/api/client/v2/model/Event.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The metadata associated with a request. */ + +/** + *

The metadata associated with a request.

+ */ @JsonPropertyOrder({ Event.JSON_PROPERTY_ID, Event.JSON_PROPERTY_NAME, Event.JSON_PROPERTY_SOURCE_ID, Event.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Event { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -41,85 +61,80 @@ public Event id(String id) { } /** - * Event ID. - * + *

Event ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public Event name(String name) { this.name = name; return this; } /** - * The event name. - * + *

The event name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public Event sourceId(Long sourceId) { this.sourceId = sourceId; return this; } /** - * Event source ID. - * + *

Event source ID.

* @return sourceId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSourceId() { - return sourceId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSourceId() { + return sourceId; + } public void setSourceId(Long sourceId) { this.sourceId = sourceId; } - public Event type(String type) { this.type = type; return this; } /** - * Event type. - * + *

Event type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this Event object is equal to o. */ + /** + * Return true if this Event object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -129,15 +144,13 @@ public boolean equals(Object o) { return false; } Event event = (Event) o; - return Objects.equals(this.id, event.id) - && Objects.equals(this.name, event.name) - && Objects.equals(this.sourceId, event.sourceId) - && Objects.equals(this.type, event.type); + return Objects.equals(this.id, event.id) && Objects.equals(this.name, event.name) && Objects.equals(this.sourceId, event.sourceId) && Objects.equals(this.type, event.type); } + @Override public int hashCode() { - return Objects.hash(id, name, sourceId, type); + return Objects.hash(id,name,sourceId,type); } @Override @@ -153,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventAttributes.java b/src/main/java/com/datadog/api/client/v2/model/EventAttributes.java index 9f320d7d498..24698e89d26 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Object description of attributes from your event. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object description of attributes from your event.

+ */ @JsonPropertyOrder({ EventAttributes.JSON_PROPERTY_AGGREGATION_KEY, EventAttributes.JSON_PROPERTY_DATE_HAPPENED, @@ -37,10 +54,10 @@ EventAttributes.JSON_PROPERTY_TIMESTAMP, EventAttributes.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION_KEY = "aggregation_key"; private String aggregationKey; @@ -104,106 +121,96 @@ public EventAttributes aggregationKey(String aggregationKey) { } /** - * Aggregation key of the event. - * + *

Aggregation key of the event.

* @return aggregationKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAggregationKey() { - return aggregationKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAggregationKey() { + return aggregationKey; + } public void setAggregationKey(String aggregationKey) { this.aggregationKey = aggregationKey; } - public EventAttributes dateHappened(Long dateHappened) { this.dateHappened = dateHappened; return this; } /** - * POSIX timestamp of the event. Must be sent as an integer (no quotation marks). Limited to - * events no older than 18 hours. - * + *

POSIX timestamp of the event. Must be sent as an integer (no quotation marks). + * Limited to events no older than 18 hours.

* @return dateHappened - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE_HAPPENED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDateHappened() { - return dateHappened; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_HAPPENED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDateHappened() { + return dateHappened; + } public void setDateHappened(Long dateHappened) { this.dateHappened = dateHappened; } - public EventAttributes deviceName(String deviceName) { this.deviceName = deviceName; return this; } /** - * A device name. - * + *

A device name.

* @return deviceName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDeviceName() { - return deviceName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDeviceName() { + return deviceName; + } public void setDeviceName(String deviceName) { this.deviceName = deviceName; } - public EventAttributes duration(Long duration) { this.duration = duration; return this; } /** - * The duration between the triggering of the event and its recovery in nanoseconds. - * + *

The duration between the triggering of the event and its recovery in nanoseconds.

* @return duration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDuration() { - return duration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDuration() { + return duration; + } public void setDuration(Long duration) { this.duration = duration; } - public EventAttributes eventObject(String eventObject) { this.eventObject = eventObject; return this; } /** - * The event title. - * + *

The event title.

* @return eventObject - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEventObject() { - return eventObject; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_OBJECT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEventObject() { + return eventObject; + } public void setEventObject(String eventObject) { this.eventObject = eventObject; } - public EventAttributes evt(Event evt) { this.evt = evt; this.unparsed |= evt.unparsed; @@ -211,79 +218,69 @@ public EventAttributes evt(Event evt) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return evt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Event getEvt() { - return evt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Event getEvt() { + return evt; + } public void setEvt(Event evt) { this.evt = evt; } - public EventAttributes hostname(String hostname) { this.hostname = hostname; return this; } /** - * Host name to associate with the event. Any tags associated with the host are also applied to - * this event. - * + *

Host name to associate with the event. + * Any tags associated with the host are also applied to this event.

* @return hostname - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOSTNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostname() { - return hostname; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostname() { + return hostname; + } public void setHostname(String hostname) { this.hostname = hostname; } - public EventAttributes monitor(MonitorType monitor) { this.monitor = JsonNullable.of(monitor); return this; } /** - * Attributes from the monitor that triggered the event. - * + *

Attributes from the monitor that triggered the event.

* @return monitor - */ - @jakarta.annotation.Nullable - @JsonIgnore - public MonitorType getMonitor() { - return monitor.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public MonitorType getMonitor() { + return monitor.orElse(null); + } @JsonProperty(JSON_PROPERTY_MONITOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMonitor_JsonNullable() { return monitor; } - - @JsonProperty(JSON_PROPERTY_MONITOR) - public void setMonitor_JsonNullable(JsonNullable monitor) { + @JsonProperty(JSON_PROPERTY_MONITOR)public void setMonitor_JsonNullable(JsonNullable monitor) { this.monitor = monitor; } - public void setMonitor(MonitorType monitor) { this.monitor = JsonNullable.of(monitor); } - public EventAttributes monitorGroups(List monitorGroups) { this.monitorGroups = JsonNullable.>of(monitorGroups); return this; } - public EventAttributes addMonitorGroupsItem(String monitorGroupsItem) { if (this.monitorGroups == null || !this.monitorGroups.isPresent()) { this.monitorGroups = JsonNullable.>of(new ArrayList<>()); @@ -297,186 +294,159 @@ public EventAttributes addMonitorGroupsItem(String monitorGroupsItem) { } /** - * List of groups referred to in the event. - * + *

List of groups referred to in the event.

* @return monitorGroups - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getMonitorGroups() { - return monitorGroups.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getMonitorGroups() { + return monitorGroups.orElse(null); + } @JsonProperty(JSON_PROPERTY_MONITOR_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getMonitorGroups_JsonNullable() { return monitorGroups; } - - @JsonProperty(JSON_PROPERTY_MONITOR_GROUPS) - public void setMonitorGroups_JsonNullable(JsonNullable> monitorGroups) { + @JsonProperty(JSON_PROPERTY_MONITOR_GROUPS)public void setMonitorGroups_JsonNullable(JsonNullable> monitorGroups) { this.monitorGroups = monitorGroups; } - public void setMonitorGroups(List monitorGroups) { this.monitorGroups = JsonNullable.>of(monitorGroups); } - public EventAttributes monitorId(Long monitorId) { this.monitorId = JsonNullable.of(monitorId); return this; } /** - * ID of the monitor that triggered the event. When an event isn't related to a monitor, this - * field is empty. - * + *

ID of the monitor that triggered the event. When an event isn't related to a monitor, this field is empty.

* @return monitorId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getMonitorId() { - return monitorId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getMonitorId() { + return monitorId.orElse(null); + } @JsonProperty(JSON_PROPERTY_MONITOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMonitorId_JsonNullable() { return monitorId; } - - @JsonProperty(JSON_PROPERTY_MONITOR_ID) - public void setMonitorId_JsonNullable(JsonNullable monitorId) { + @JsonProperty(JSON_PROPERTY_MONITOR_ID)public void setMonitorId_JsonNullable(JsonNullable monitorId) { this.monitorId = monitorId; } - public void setMonitorId(Long monitorId) { this.monitorId = JsonNullable.of(monitorId); } - public EventAttributes priority(EventPriority priority) { this.priority = JsonNullable.of(priority); return this; } /** - * The priority of the event's monitor. For example, normal or low. - * + *

The priority of the event's monitor. For example, normal or low.

* @return priority - */ - @jakarta.annotation.Nullable - @JsonIgnore - public EventPriority getPriority() { - return priority.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public EventPriority getPriority() { + return priority.orElse(null); + } @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getPriority_JsonNullable() { return priority; } - - @JsonProperty(JSON_PROPERTY_PRIORITY) - public void setPriority_JsonNullable(JsonNullable priority) { + @JsonProperty(JSON_PROPERTY_PRIORITY)public void setPriority_JsonNullable(JsonNullable priority) { this.priority = priority; } - public void setPriority(EventPriority priority) { if (!priority.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.priority = JsonNullable.of(priority); } - public EventAttributes relatedEventId(Long relatedEventId) { this.relatedEventId = relatedEventId; return this; } /** - * Related event ID. - * + *

Related event ID.

* @return relatedEventId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATED_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getRelatedEventId() { - return relatedEventId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATED_EVENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getRelatedEventId() { + return relatedEventId; + } public void setRelatedEventId(Long relatedEventId) { this.relatedEventId = relatedEventId; } - public EventAttributes service(String service) { this.service = service; return this; } /** - * Service that triggered the event. - * + *

Service that triggered the event.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public EventAttributes sourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; return this; } /** - * The type of event being posted. For example, nagios, hudson, - * jenkins, my_apps, chef, puppet, git - * or bitbucket. The list of standard source attribute values is available - * here. - * + *

The type of event being posted. + * For example, nagios, hudson, jenkins, my_apps, chef, puppet, git or bitbucket. + * The list of standard source attribute values is available here.

* @return sourceTypeName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceTypeName() { - return sourceTypeName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceTypeName() { + return sourceTypeName; + } public void setSourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; } - public EventAttributes sourcecategory(String sourcecategory) { this.sourcecategory = sourcecategory; return this; } /** - * Identifier for the source of the event, such as a monitor alert, an externally-submitted event, - * or an integration. - * + *

Identifier for the source of the event, such as a monitor alert, an externally-submitted event, or an integration.

* @return sourcecategory - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCECATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourcecategory() { - return sourcecategory; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCECATEGORY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSourcecategory() { + return sourcecategory; + } public void setSourcecategory(String sourcecategory) { this.sourcecategory = sourcecategory; } - public EventAttributes status(EventStatusType status) { this.status = status; this.unparsed |= !status.isValid(); @@ -484,31 +454,28 @@ public EventAttributes status(EventStatusType status) { } /** - * If an alert event is enabled, its status is one of the following: failure, - * error, warning, info, success, user_update - * , recommendation, or snapshot. - * + *

If an alert event is enabled, its status is one of the following: + * failure, error, warning, info, success, user_update, + * recommendation, or snapshot.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventStatusType getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventStatusType getStatus() { + return status; + } public void setStatus(EventStatusType status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public EventAttributes tags(List tags) { this.tags = tags; return this; } - public EventAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -518,64 +485,61 @@ public EventAttributes addTagsItem(String tagsItem) { } /** - * A list of tags to apply to the event. - * + *

A list of tags to apply to the event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public EventAttributes timestamp(Long timestamp) { this.timestamp = timestamp; return this; } /** - * POSIX timestamp of your event in milliseconds. - * + *

POSIX timestamp of your event in milliseconds.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimestamp() { + return timestamp; + } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } - public EventAttributes title(String title) { this.title = title; return this; } /** - * The event title. - * + *

The event title.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this EventAttributes object is equal to o. */ + /** + * Return true if this EventAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -585,49 +549,13 @@ public boolean equals(Object o) { return false; } EventAttributes eventAttributes = (EventAttributes) o; - return Objects.equals(this.aggregationKey, eventAttributes.aggregationKey) - && Objects.equals(this.dateHappened, eventAttributes.dateHappened) - && Objects.equals(this.deviceName, eventAttributes.deviceName) - && Objects.equals(this.duration, eventAttributes.duration) - && Objects.equals(this.eventObject, eventAttributes.eventObject) - && Objects.equals(this.evt, eventAttributes.evt) - && Objects.equals(this.hostname, eventAttributes.hostname) - && Objects.equals(this.monitor, eventAttributes.monitor) - && Objects.equals(this.monitorGroups, eventAttributes.monitorGroups) - && Objects.equals(this.monitorId, eventAttributes.monitorId) - && Objects.equals(this.priority, eventAttributes.priority) - && Objects.equals(this.relatedEventId, eventAttributes.relatedEventId) - && Objects.equals(this.service, eventAttributes.service) - && Objects.equals(this.sourceTypeName, eventAttributes.sourceTypeName) - && Objects.equals(this.sourcecategory, eventAttributes.sourcecategory) - && Objects.equals(this.status, eventAttributes.status) - && Objects.equals(this.tags, eventAttributes.tags) - && Objects.equals(this.timestamp, eventAttributes.timestamp) - && Objects.equals(this.title, eventAttributes.title); + return Objects.equals(this.aggregationKey, eventAttributes.aggregationKey) && Objects.equals(this.dateHappened, eventAttributes.dateHappened) && Objects.equals(this.deviceName, eventAttributes.deviceName) && Objects.equals(this.duration, eventAttributes.duration) && Objects.equals(this.eventObject, eventAttributes.eventObject) && Objects.equals(this.evt, eventAttributes.evt) && Objects.equals(this.hostname, eventAttributes.hostname) && Objects.equals(this.monitor, eventAttributes.monitor) && Objects.equals(this.monitorGroups, eventAttributes.monitorGroups) && Objects.equals(this.monitorId, eventAttributes.monitorId) && Objects.equals(this.priority, eventAttributes.priority) && Objects.equals(this.relatedEventId, eventAttributes.relatedEventId) && Objects.equals(this.service, eventAttributes.service) && Objects.equals(this.sourceTypeName, eventAttributes.sourceTypeName) && Objects.equals(this.sourcecategory, eventAttributes.sourcecategory) && Objects.equals(this.status, eventAttributes.status) && Objects.equals(this.tags, eventAttributes.tags) && Objects.equals(this.timestamp, eventAttributes.timestamp) && Objects.equals(this.title, eventAttributes.title); } + @Override public int hashCode() { - return Objects.hash( - aggregationKey, - dateHappened, - deviceName, - duration, - eventObject, - evt, - hostname, - monitor, - monitorGroups, - monitorId, - priority, - relatedEventId, - service, - sourceTypeName, - sourcecategory, - status, - tags, - timestamp, - title); + return Objects.hash(aggregationKey,dateHappened,deviceName,duration,eventObject,evt,hostname,monitor,monitorGroups,monitorId,priority,relatedEventId,service,sourceTypeName,sourcecategory,status,tags,timestamp,title); } @Override @@ -658,7 +586,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventPriority.java b/src/main/java/com/datadog/api/client/v2/model/EventPriority.java index d546e7fd464..fe334c6214a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventPriority.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventPriority.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The priority of the event's monitor. For example, normal or low. */ +/** + *

The priority of the event's monitor. For example, normal or low.

+ */ @JsonSerialize(using = EventPriority.EventPrioritySerializer.class) public class EventPriority { public static final EventPriority NORMAL = new EventPriority("normal"); public static final EventPriority LOW = new EventPriority("low"); - private static final Set allowedValues = - new HashSet(Arrays.asList("normal", "low")); + private static final Set allowedValues = new HashSet(Arrays.asList("normal", "low")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class EventPrioritySerializer extends StdSerializer { - public EventPrioritySerializer(Class t) { - super(t); - } - - public EventPrioritySerializer() { - this(null); - } - - @Override - public void serialize(EventPriority value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventPrioritySerializer(Class t) { + super(t); + } + + public EventPrioritySerializer() { + this(null); + } + + @Override + public void serialize(EventPriority value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventPriority object is equal to o. */ + /** + * Return true if this EventPriority object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventResponse.java b/src/main/java/com/datadog/api/client/v2/model/EventResponse.java index 004281d613e..24ea9313d5d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventResponse.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The object description of an event after being processed and stored by Datadog. */ + +/** + *

The object description of an event after being processed and stored by Datadog.

+ */ @JsonPropertyOrder({ EventResponse.JSON_PROPERTY_ATTRIBUTES, EventResponse.JSON_PROPERTY_ID, EventResponse.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private EventResponseAttributes attributes; @@ -38,42 +58,38 @@ public EventResponse attributes(EventResponseAttributes attributes) { } /** - * The object description of an event response attribute. - * + *

The object description of an event response attribute.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(EventResponseAttributes attributes) { this.attributes = attributes; } - public EventResponse id(String id) { this.id = id; return this; } /** - * the unique ID of the event. - * + *

the unique ID of the event.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public EventResponse type(EventType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public EventResponse type(EventType type) { } /** - * Type of the event. - * + *

Type of the event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventType getType() { + return type; + } public void setType(EventType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this EventResponse object is equal to o. */ + /** + * Return true if this EventResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } EventResponse eventResponse = (EventResponse) o; - return Objects.equals(this.attributes, eventResponse.attributes) - && Objects.equals(this.id, eventResponse.id) - && Objects.equals(this.type, eventResponse.type); + return Objects.equals(this.attributes, eventResponse.attributes) && Objects.equals(this.id, eventResponse.id) && Objects.equals(this.type, eventResponse.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/EventResponseAttributes.java index 5d12c8e9548..2ef53ac062b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventResponseAttributes.java @@ -6,27 +6,42 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The object description of an event response attribute. */ + +/** + *

The object description of an event response attribute.

+ */ @JsonPropertyOrder({ EventResponseAttributes.JSON_PROPERTY_ATTRIBUTES, EventResponseAttributes.JSON_PROPERTY_TAGS, EventResponseAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private EventAttributes attributes; @@ -34,7 +49,6 @@ public class EventResponseAttributes { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -45,26 +59,23 @@ public EventResponseAttributes attributes(EventAttributes attributes) { } /** - * Object description of attributes from your event. - * + *

Object description of attributes from your event.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventAttributes getAttributes() { + return attributes; + } public void setAttributes(EventAttributes attributes) { this.attributes = attributes; } - public EventResponseAttributes tags(List tags) { this.tags = tags; return this; } - public EventResponseAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -74,43 +85,42 @@ public EventResponseAttributes addTagsItem(String tagsItem) { } /** - * An array of tags associated with the event. - * + *

An array of tags associated with the event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public EventResponseAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * The timestamp of the event. - * + *

The timestamp of the event.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this EventResponseAttributes object is equal to o. */ + /** + * Return true if this EventResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +130,13 @@ public boolean equals(Object o) { return false; } EventResponseAttributes eventResponseAttributes = (EventResponseAttributes) o; - return Objects.equals(this.attributes, eventResponseAttributes.attributes) - && Objects.equals(this.tags, eventResponseAttributes.tags) - && Objects.equals(this.timestamp, eventResponseAttributes.timestamp); + return Objects.equals(this.attributes, eventResponseAttributes.attributes) && Objects.equals(this.tags, eventResponseAttributes.tags) && Objects.equals(this.timestamp, eventResponseAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, tags, timestamp); + return Objects.hash(attributes,tags,timestamp); } @Override @@ -142,7 +151,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventStatusType.java b/src/main/java/com/datadog/api/client/v2/model/EventStatusType.java index 7b6d6a79b62..74a22120f7a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventStatusType.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventStatusType.java @@ -6,23 +6,45 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * If an alert event is enabled, its status is one of the following: failure, - * error, warning, info, success, user_update - * , recommendation, or snapshot. + *

If an alert event is enabled, its status is one of the following: + * failure, error, warning, info, success, user_update, + * recommendation, or snapshot.

*/ @JsonSerialize(using = EventStatusType.EventStatusTypeSerializer.class) public class EventStatusType { @@ -36,17 +58,7 @@ public class EventStatusType { public static final EventStatusType RECOMMENDATION = new EventStatusType("recommendation"); public static final EventStatusType SNAPSHOT = new EventStatusType("snapshot"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "failure", - "error", - "warning", - "info", - "success", - "user_update", - "recommendation", - "snapshot")); + private static final Set allowedValues = new HashSet(Arrays.asList("failure", "error", "warning", "info", "success", "user_update", "recommendation", "snapshot")); private String value; @@ -59,19 +71,18 @@ public boolean isValid() { } public static class EventStatusTypeSerializer extends StdSerializer { - public EventStatusTypeSerializer(Class t) { - super(t); - } - - public EventStatusTypeSerializer() { - this(null); - } - - @Override - public void serialize(EventStatusType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventStatusTypeSerializer(Class t) { + super(t); + } + + public EventStatusTypeSerializer() { + this(null); + } + + @Override + public void serialize(EventStatusType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -83,7 +94,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventStatusType object is equal to o. */ + /** + * Return true if this EventStatusType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +110,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventType.java b/src/main/java/com/datadog/api/client/v2/model/EventType.java index 1b2445a4e20..c968d278a20 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventType.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event. */ +/** + *

Type of the event.

+ */ @JsonSerialize(using = EventType.EventTypeSerializer.class) public class EventType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class EventTypeSerializer extends StdSerializer { - public EventTypeSerializer(Class t) { - super(t); - } - - public EventTypeSerializer() { - this(null); - } - - @Override - public void serialize(EventType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventTypeSerializer(Class t) { + super(t); + } + + public EventTypeSerializer() { + this(null); + } + + @Override + public void serialize(EventType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventType object is equal to o. */ + /** + * Return true if this EventType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsAggregation.java b/src/main/java/com/datadog/api/client/v2/model/EventsAggregation.java index 07cc829463a..08671868b16 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsAggregation.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsAggregation.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of aggregation that can be performed on events-based queries. */ +/** + *

The type of aggregation that can be performed on events-based queries.

+ */ @JsonSerialize(using = EventsAggregation.EventsAggregationSerializer.class) public class EventsAggregation { @@ -35,20 +59,7 @@ public class EventsAggregation { public static final EventsAggregation MAX = new EventsAggregation("max"); public static final EventsAggregation AVG = new EventsAggregation("avg"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg")); + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg")); private String value; @@ -61,19 +72,18 @@ public boolean isValid() { } public static class EventsAggregationSerializer extends StdSerializer { - public EventsAggregationSerializer(Class t) { - super(t); - } - - public EventsAggregationSerializer() { - this(null); - } - - @Override - public void serialize(EventsAggregation value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventsAggregationSerializer(Class t) { + super(t); + } + + public EventsAggregationSerializer() { + this(null); + } + + @Override + public void serialize(EventsAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -85,7 +95,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventsAggregation object is equal to o. */ + /** + * Return true if this EventsAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,7 +111,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsCompute.java b/src/main/java/com/datadog/api/client/v2/model/EventsCompute.java index 7fa55da952e..35760f3bdff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsCompute.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The instructions for what to compute for this query. */ + +/** + *

The instructions for what to compute for this query.

+ */ @JsonPropertyOrder({ EventsCompute.JSON_PROPERTY_AGGREGATION, EventsCompute.JSON_PROPERTY_INTERVAL, EventsCompute.JSON_PROPERTY_METRIC }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private EventsAggregation aggregation = EventsAggregation.COUNT; @@ -36,12 +55,10 @@ public EventsCompute() {} @JsonCreator public EventsCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - EventsAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)EventsAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - public EventsCompute aggregation(EventsAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); @@ -49,66 +66,63 @@ public EventsCompute aggregation(EventsAggregation aggregation) { } /** - * The type of aggregation that can be performed on events-based queries. - * + *

The type of aggregation that can be performed on events-based queries.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventsAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventsAggregation getAggregation() { + return aggregation; + } public void setAggregation(EventsAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public EventsCompute interval(Long interval) { this.interval = interval; return this; } /** - * Interval for compute in milliseconds. - * + *

Interval for compute in milliseconds.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - public EventsCompute metric(String metric) { this.metric = metric; return this; } /** - * The "measure" attribute on which to perform the computation. - * + *

The "measure" attribute on which to perform the computation.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - /** Return true if this EventsCompute object is equal to o. */ + /** + * Return true if this EventsCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +132,13 @@ public boolean equals(Object o) { return false; } EventsCompute eventsCompute = (EventsCompute) o; - return Objects.equals(this.aggregation, eventsCompute.aggregation) - && Objects.equals(this.interval, eventsCompute.interval) - && Objects.equals(this.metric, eventsCompute.metric); + return Objects.equals(this.aggregation, eventsCompute.aggregation) && Objects.equals(this.interval, eventsCompute.interval) && Objects.equals(this.metric, eventsCompute.metric); } + @Override public int hashCode() { - return Objects.hash(aggregation, interval, metric); + return Objects.hash(aggregation,interval,metric); } @Override @@ -140,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsDataSource.java b/src/main/java/com/datadog/api/client/v2/model/EventsDataSource.java index 861827d1f98..9ca688020d3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsDataSource.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsDataSource.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** A data source that is powered by the Events Platform. */ +/** + *

A data source that is powered by the Events Platform.

+ */ @JsonSerialize(using = EventsDataSource.EventsDataSourceSerializer.class) public class EventsDataSource { public static final EventsDataSource LOGS = new EventsDataSource("logs"); public static final EventsDataSource RUM = new EventsDataSource("rum"); - private static final Set allowedValues = - new HashSet(Arrays.asList("logs", "rum")); + private static final Set allowedValues = new HashSet(Arrays.asList("logs", "rum")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class EventsDataSourceSerializer extends StdSerializer { - public EventsDataSourceSerializer(Class t) { - super(t); - } - - public EventsDataSourceSerializer() { - this(null); - } - - @Override - public void serialize(EventsDataSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventsDataSourceSerializer(Class t) { + super(t); + } + + public EventsDataSourceSerializer() { + this(null); + } + + @Override + public void serialize(EventsDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventsDataSource object is equal to o. */ + /** + * Return true if this EventsDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/EventsGroupBy.java index b15bdaa1d76..72d57ebe7ab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsGroupBy.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A dimension on which to split a query's results. */ + +/** + *

A dimension on which to split a query's results.

+ */ @JsonPropertyOrder({ EventsGroupBy.JSON_PROPERTY_FACET, EventsGroupBy.JSON_PROPERTY_LIMIT, EventsGroupBy.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -35,51 +54,48 @@ public class EventsGroupBy { public EventsGroupBy() {} @JsonCreator - public EventsGroupBy(@JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + public EventsGroupBy( + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public EventsGroupBy facet(String facet) { this.facet = facet; return this; } /** - * The facet by which to split groups. - * + *

The facet by which to split groups.

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public EventsGroupBy limit(Integer limit) { this.limit = limit; return this; } /** - * The maximum number of groups to return. maximum: 2147483647 - * + *

The maximum number of groups to return.

+ * maximum: 2147483647 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - public EventsGroupBy sort(EventsGroupBySort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -87,22 +103,23 @@ public EventsGroupBy sort(EventsGroupBySort sort) { } /** - * The dimension by which to sort a query's results. - * + *

The dimension by which to sort a query's results.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsGroupBySort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsGroupBySort getSort() { + return sort; + } public void setSort(EventsGroupBySort sort) { this.sort = sort; } - /** Return true if this EventsGroupBy object is equal to o. */ + /** + * Return true if this EventsGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,14 +129,13 @@ public boolean equals(Object o) { return false; } EventsGroupBy eventsGroupBy = (EventsGroupBy) o; - return Objects.equals(this.facet, eventsGroupBy.facet) - && Objects.equals(this.limit, eventsGroupBy.limit) - && Objects.equals(this.sort, eventsGroupBy.sort); + return Objects.equals(this.facet, eventsGroupBy.facet) && Objects.equals(this.limit, eventsGroupBy.limit) && Objects.equals(this.sort, eventsGroupBy.sort); } + @Override public int hashCode() { - return Objects.hash(facet, limit, sort); + return Objects.hash(facet,limit,sort); } @Override @@ -134,7 +150,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsGroupBySort.java b/src/main/java/com/datadog/api/client/v2/model/EventsGroupBySort.java index 2e07b82354d..7c19d77e217 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsGroupBySort.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsGroupBySort.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The dimension by which to sort a query's results. */ +/** + *

The dimension by which to sort a query's results.

+ */ @JsonPropertyOrder({ EventsGroupBySort.JSON_PROPERTY_AGGREGATION, EventsGroupBySort.JSON_PROPERTY_METRIC, EventsGroupBySort.JSON_PROPERTY_ORDER, EventsGroupBySort.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsGroupBySort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private EventsAggregation aggregation = EventsAggregation.COUNT; @@ -40,12 +59,10 @@ public EventsGroupBySort() {} @JsonCreator public EventsGroupBySort( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - EventsAggregation aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)EventsAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - public EventsGroupBySort aggregation(EventsAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); @@ -53,44 +70,40 @@ public EventsGroupBySort aggregation(EventsAggregation aggregation) { } /** - * The type of aggregation that can be performed on events-based queries. - * + *

The type of aggregation that can be performed on events-based queries.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventsAggregation getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventsAggregation getAggregation() { + return aggregation; + } public void setAggregation(EventsAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public EventsGroupBySort metric(String metric) { this.metric = metric; return this; } /** - * Metric whose calculated value should be used to define the sort order of a query's results. - * + *

Metric whose calculated value should be used to define the sort order of a query's results.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public EventsGroupBySort order(QuerySortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -98,24 +111,22 @@ public EventsGroupBySort order(QuerySortOrder order) { } /** - * Direction of sort. - * + *

Direction of sort.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public QuerySortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public QuerySortOrder getOrder() { + return order; + } public void setOrder(QuerySortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - public EventsGroupBySort type(EventsSortType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -123,25 +134,26 @@ public EventsGroupBySort type(EventsSortType type) { } /** - * The type of sort to use on the calculated value. - * + *

The type of sort to use on the calculated value.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsSortType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsSortType getType() { + return type; + } public void setType(EventsSortType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this EventsGroupBySort object is equal to o. */ + /** + * Return true if this EventsGroupBySort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -151,15 +163,13 @@ public boolean equals(Object o) { return false; } EventsGroupBySort eventsGroupBySort = (EventsGroupBySort) o; - return Objects.equals(this.aggregation, eventsGroupBySort.aggregation) - && Objects.equals(this.metric, eventsGroupBySort.metric) - && Objects.equals(this.order, eventsGroupBySort.order) - && Objects.equals(this.type, eventsGroupBySort.type); + return Objects.equals(this.aggregation, eventsGroupBySort.aggregation) && Objects.equals(this.metric, eventsGroupBySort.metric) && Objects.equals(this.order, eventsGroupBySort.order) && Objects.equals(this.type, eventsGroupBySort.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, metric, order, type); + return Objects.hash(aggregation,metric,order,type); } @Override @@ -175,7 +185,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsListRequest.java b/src/main/java/com/datadog/api/client/v2/model/EventsListRequest.java index 1b035878b47..1bed30d7768 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsListRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsListRequest.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The object sent with the request to retrieve a list of events from your organization. */ + +/** + *

The object sent with the request to retrieve a list of events from your organization.

+ */ @JsonPropertyOrder({ EventsListRequest.JSON_PROPERTY_FILTER, EventsListRequest.JSON_PROPERTY_OPTIONS, EventsListRequest.JSON_PROPERTY_PAGE, EventsListRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsListRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private EventsQueryFilter filter; @@ -42,21 +62,19 @@ public EventsListRequest filter(EventsQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsQueryFilter getFilter() { + return filter; + } public void setFilter(EventsQueryFilter filter) { this.filter = filter; } - public EventsListRequest options(EventsQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -64,22 +82,20 @@ public EventsListRequest options(EventsQueryOptions options) { } /** - * The global query options that are used. Either provide a timezone or a time offset but not - * both, otherwise the query fails. - * + *

The global query options that are used. Either provide a timezone or a time offset but not both, + * otherwise the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsQueryOptions getOptions() { + return options; + } public void setOptions(EventsQueryOptions options) { this.options = options; } - public EventsListRequest page(EventsRequestPage page) { this.page = page; this.unparsed |= page.unparsed; @@ -87,21 +103,19 @@ public EventsListRequest page(EventsRequestPage page) { } /** - * Pagination settings. - * + *

Pagination settings.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsRequestPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsRequestPage getPage() { + return page; + } public void setPage(EventsRequestPage page) { this.page = page; } - public EventsListRequest sort(EventsSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -109,25 +123,26 @@ public EventsListRequest sort(EventsSort sort) { } /** - * The sort parameters when querying events. - * + *

The sort parameters when querying events.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsSort getSort() { + return sort; + } public void setSort(EventsSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this EventsListRequest object is equal to o. */ + /** + * Return true if this EventsListRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +152,13 @@ public boolean equals(Object o) { return false; } EventsListRequest eventsListRequest = (EventsListRequest) o; - return Objects.equals(this.filter, eventsListRequest.filter) - && Objects.equals(this.options, eventsListRequest.options) - && Objects.equals(this.page, eventsListRequest.page) - && Objects.equals(this.sort, eventsListRequest.sort); + return Objects.equals(this.filter, eventsListRequest.filter) && Objects.equals(this.options, eventsListRequest.options) && Objects.equals(this.page, eventsListRequest.page) && Objects.equals(this.sort, eventsListRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, options, page, sort); + return Objects.hash(filter,options,page,sort); } @Override @@ -161,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/EventsListResponse.java index a48140f0e05..4ebe294b204 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsListResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The response object with all events matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The response object with all events matching the request and pagination information.

+ */ @JsonPropertyOrder({ EventsListResponse.JSON_PROPERTY_DATA, EventsListResponse.JSON_PROPERTY_LINKS, EventsListResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public EventsListResponse data(List data) { } return this; } - public EventsListResponse addDataItem(EventResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public EventsListResponse addDataItem(EventResponse dataItem) { } /** - * An array of events matching the request. - * + *

An array of events matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public EventsListResponse links(EventsListResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -73,21 +88,19 @@ public EventsListResponse links(EventsListResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsListResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsListResponseLinks getLinks() { + return links; + } public void setLinks(EventsListResponseLinks links) { this.links = links; } - public EventsListResponse meta(EventsResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -95,22 +108,23 @@ public EventsListResponse meta(EventsResponseMetadata meta) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsResponseMetadata getMeta() { + return meta; + } public void setMeta(EventsResponseMetadata meta) { this.meta = meta; } - /** Return true if this EventsListResponse object is equal to o. */ + /** + * Return true if this EventsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } EventsListResponse eventsListResponse = (EventsListResponse) o; - return Objects.equals(this.data, eventsListResponse.data) - && Objects.equals(this.links, eventsListResponse.links) - && Objects.equals(this.meta, eventsListResponse.meta); + return Objects.equals(this.data, eventsListResponse.data) && Objects.equals(this.links, eventsListResponse.links) && Objects.equals(this.meta, eventsListResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsListResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/EventsListResponseLinks.java index 94ff611fa0a..5e4f8ee65d7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsListResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsListResponseLinks.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Links attributes. */ -@JsonPropertyOrder({EventsListResponseLinks.JSON_PROPERTY_NEXT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Links attributes.

+ */ +@JsonPropertyOrder({ + EventsListResponseLinks.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsListResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT = "next"; private String next; @@ -27,23 +49,24 @@ public EventsListResponseLinks next(String next) { } /** - * Link for the next set of results. Note that the request can also be made using the POST - * endpoint. - * + *

Link for the next set of results. Note that the request can also be made using the + * POST endpoint.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - /** Return true if this EventsListResponseLinks object is equal to o. */ + /** + * Return true if this EventsListResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.next, eventsListResponseLinks.next); } + @Override public int hashCode() { return Objects.hash(next); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/EventsQueryFilter.java index fc4a93efdef..f551d5b5149 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsQueryFilter.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The search and filter query settings. */ + +/** + *

The search and filter query settings.

+ */ @JsonPropertyOrder({ EventsQueryFilter.JSON_PROPERTY_FROM, EventsQueryFilter.JSON_PROPERTY_QUERY, EventsQueryFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsQueryFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from = "now-15m"; @@ -37,66 +57,61 @@ public EventsQueryFilter from(String from) { } /** - * The minimum time for the requested events. Supports date math and regular timestamps in - * milliseconds. - * + *

The minimum time for the requested events. Supports date math and regular timestamps in milliseconds.

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public EventsQueryFilter query(String query) { this.query = query; return this; } /** - * The search query following the event search syntax. - * + *

The search query following the event search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public EventsQueryFilter to(String to) { this.to = to; return this; } /** - * The maximum time for the requested events. Supports date math and regular timestamps in - * milliseconds. - * + *

The maximum time for the requested events. Supports date math and regular timestamps in milliseconds.

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this EventsQueryFilter object is equal to o. */ + /** + * Return true if this EventsQueryFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +121,13 @@ public boolean equals(Object o) { return false; } EventsQueryFilter eventsQueryFilter = (EventsQueryFilter) o; - return Objects.equals(this.from, eventsQueryFilter.from) - && Objects.equals(this.query, eventsQueryFilter.query) - && Objects.equals(this.to, eventsQueryFilter.to); + return Objects.equals(this.from, eventsQueryFilter.from) && Objects.equals(this.query, eventsQueryFilter.query) && Objects.equals(this.to, eventsQueryFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, query, to); + return Objects.hash(from,query,to); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsQueryOptions.java b/src/main/java/com/datadog/api/client/v2/model/EventsQueryOptions.java index e610b214ee5..d22cab659b7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsQueryOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsQueryOptions.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The global query options that are used. Either provide a timezone or a time offset but not both, - * otherwise the query fails. + *

The global query options that are used. Either provide a timezone or a time offset but not both, + * otherwise the query fails.

*/ @JsonPropertyOrder({ EventsQueryOptions.JSON_PROPERTY_TIME_OFFSET, EventsQueryOptions.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsQueryOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME_OFFSET = "timeOffset"; private Long timeOffset; @@ -36,44 +54,42 @@ public EventsQueryOptions timeOffset(Long timeOffset) { } /** - * The time offset to apply to the query in seconds. - * + *

The time offset to apply to the query in seconds.

* @return timeOffset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeOffset() { - return timeOffset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeOffset() { + return timeOffset; + } public void setTimeOffset(Long timeOffset) { this.timeOffset = timeOffset; } - public EventsQueryOptions timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone - * Database identifier (like America/New_York). - * + *

The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this EventsQueryOptions object is equal to o. */ + /** + * Return true if this EventsQueryOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +99,13 @@ public boolean equals(Object o) { return false; } EventsQueryOptions eventsQueryOptions = (EventsQueryOptions) o; - return Objects.equals(this.timeOffset, eventsQueryOptions.timeOffset) - && Objects.equals(this.timezone, eventsQueryOptions.timezone); + return Objects.equals(this.timeOffset, eventsQueryOptions.timeOffset) && Objects.equals(this.timezone, eventsQueryOptions.timezone); } + @Override public int hashCode() { - return Objects.hash(timeOffset, timezone); + return Objects.hash(timeOffset,timezone); } @Override @@ -103,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsRequestPage.java b/src/main/java/com/datadog/api/client/v2/model/EventsRequestPage.java index ce4bb8d84c9..2887997f131 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsRequestPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsRequestPage.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Pagination settings. */ -@JsonPropertyOrder({EventsRequestPage.JSON_PROPERTY_CURSOR, EventsRequestPage.JSON_PROPERTY_LIMIT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Pagination settings.

+ */ +@JsonPropertyOrder({ + EventsRequestPage.JSON_PROPERTY_CURSOR, + EventsRequestPage.JSON_PROPERTY_LIMIT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsRequestPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -30,43 +53,43 @@ public EventsRequestPage cursor(String cursor) { } /** - * The returned paging point to use to get the next results. - * + *

The returned paging point to use to get the next results.

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - public EventsRequestPage limit(Integer limit) { this.limit = limit; return this; } /** - * The maximum number of logs in the response. maximum: 1000 - * + *

The maximum number of logs in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - /** Return true if this EventsRequestPage object is equal to o. */ + /** + * Return true if this EventsRequestPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,13 +99,13 @@ public boolean equals(Object o) { return false; } EventsRequestPage eventsRequestPage = (EventsRequestPage) o; - return Objects.equals(this.cursor, eventsRequestPage.cursor) - && Objects.equals(this.limit, eventsRequestPage.limit); + return Objects.equals(this.cursor, eventsRequestPage.cursor) && Objects.equals(this.limit, eventsRequestPage.limit); } + @Override public int hashCode() { - return Objects.hash(cursor, limit); + return Objects.hash(cursor,limit); } @Override @@ -96,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadata.java b/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadata.java index 260e3996022..bcdc01ef988 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadata.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The metadata associated with a request. */ + +/** + *

The metadata associated with a request.

+ */ @JsonPropertyOrder({ EventsResponseMetadata.JSON_PROPERTY_ELAPSED, EventsResponseMetadata.JSON_PROPERTY_PAGE, EventsResponseMetadata.JSON_PROPERTY_REQUEST_ID, EventsResponseMetadata.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ELAPSED = "elapsed"; private Long elapsed; @@ -43,21 +61,19 @@ public EventsResponseMetadata elapsed(Long elapsed) { } /** - * The time elapsed in milliseconds. - * + *

The time elapsed in milliseconds.

* @return elapsed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsed() { - return elapsed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsed() { + return elapsed; + } public void setElapsed(Long elapsed) { this.elapsed = elapsed; } - public EventsResponseMetadata page(EventsResponseMetadataPage page) { this.page = page; this.unparsed |= page.unparsed; @@ -65,42 +81,38 @@ public EventsResponseMetadata page(EventsResponseMetadataPage page) { } /** - * Pagination attributes. - * + *

Pagination attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsResponseMetadataPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsResponseMetadataPage getPage() { + return page; + } public void setPage(EventsResponseMetadataPage page) { this.page = page; } - public EventsResponseMetadata requestId(String requestId) { this.requestId = requestId; return this; } /** - * The identifier of the request. - * + *

The identifier of the request.

* @return requestId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } public void setRequestId(String requestId) { this.requestId = requestId; } - public EventsResponseMetadata warnings(List warnings) { this.warnings = warnings; for (EventsWarning item : warnings) { @@ -108,7 +120,6 @@ public EventsResponseMetadata warnings(List warnings) { } return this; } - public EventsResponseMetadata addWarningsItem(EventsWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -119,23 +130,24 @@ public EventsResponseMetadata addWarningsItem(EventsWarning warningsItem) { } /** - * A list of warnings (non-fatal errors) encountered. Partial results might be returned if - * warnings are present in the response. - * + *

A list of warnings (non-fatal errors) encountered. Partial results might be returned if + * warnings are present in the response.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this EventsResponseMetadata object is equal to o. */ + /** + * Return true if this EventsResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +157,13 @@ public boolean equals(Object o) { return false; } EventsResponseMetadata eventsResponseMetadata = (EventsResponseMetadata) o; - return Objects.equals(this.elapsed, eventsResponseMetadata.elapsed) - && Objects.equals(this.page, eventsResponseMetadata.page) - && Objects.equals(this.requestId, eventsResponseMetadata.requestId) - && Objects.equals(this.warnings, eventsResponseMetadata.warnings); + return Objects.equals(this.elapsed, eventsResponseMetadata.elapsed) && Objects.equals(this.page, eventsResponseMetadata.page) && Objects.equals(this.requestId, eventsResponseMetadata.requestId) && Objects.equals(this.warnings, eventsResponseMetadata.warnings); } + @Override public int hashCode() { - return Objects.hash(elapsed, page, requestId, warnings); + return Objects.hash(elapsed,page,requestId,warnings); } @Override @@ -169,7 +179,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadataPage.java b/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadataPage.java index cc63a744ee7..ba77a0b2b3f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadataPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsResponseMetadataPage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Pagination attributes. */ -@JsonPropertyOrder({EventsResponseMetadataPage.JSON_PROPERTY_AFTER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Pagination attributes.

+ */ +@JsonPropertyOrder({ + EventsResponseMetadataPage.JSON_PROPERTY_AFTER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsResponseMetadataPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -27,23 +49,24 @@ public EventsResponseMetadataPage after(String after) { } /** - * The cursor to use to get the next results, if any. To make the next request, use the same - * parameters with the addition of the page[cursor]. - * + *

The cursor to use to get the next results, if any. To make the next request, use the same + * parameters with the addition of the page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - /** Return true if this EventsResponseMetadataPage object is equal to o. */ + /** + * Return true if this EventsResponseMetadataPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.after, eventsResponseMetadataPage.after); } + @Override public int hashCode() { return Objects.hash(after); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsScalarQuery.java b/src/main/java/com/datadog/api/client/v2/model/EventsScalarQuery.java index 5dc75c7b327..ec36930d93e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsScalarQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsScalarQuery.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An individual scalar events query. */ +/** + *

An individual scalar events query.

+ */ @JsonPropertyOrder({ EventsScalarQuery.JSON_PROPERTY_COMPUTE, EventsScalarQuery.JSON_PROPERTY_DATA_SOURCE, @@ -24,10 +41,10 @@ EventsScalarQuery.JSON_PROPERTY_NAME, EventsScalarQuery.JSON_PROPERTY_SEARCH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsScalarQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private EventsCompute compute; @@ -50,15 +67,13 @@ public EventsScalarQuery() {} @JsonCreator public EventsScalarQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) EventsCompute compute, - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - EventsDataSource dataSource) { - this.compute = compute; - this.unparsed |= compute.unparsed; - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_COMPUTE)EventsCompute compute, + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)EventsDataSource dataSource) { + this.compute = compute; + this.unparsed |= compute.unparsed; + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); } - public EventsScalarQuery compute(EventsCompute compute) { this.compute = compute; this.unparsed |= compute.unparsed; @@ -66,20 +81,18 @@ public EventsScalarQuery compute(EventsCompute compute) { } /** - * The instructions for what to compute for this query. - * + *

The instructions for what to compute for this query.

* @return compute - */ - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventsCompute getCompute() { - return compute; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventsCompute getCompute() { + return compute; + } public void setCompute(EventsCompute compute) { this.compute = compute; } - public EventsScalarQuery dataSource(EventsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); @@ -87,23 +100,21 @@ public EventsScalarQuery dataSource(EventsDataSource dataSource) { } /** - * A data source that is powered by the Events Platform. - * + *

A data source that is powered by the Events Platform.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventsDataSource getDataSource() { + return dataSource; + } public void setDataSource(EventsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public EventsScalarQuery groupBy(List groupBy) { this.groupBy = groupBy; for (EventsGroupBy item : groupBy) { @@ -111,7 +122,6 @@ public EventsScalarQuery groupBy(List groupBy) { } return this; } - public EventsScalarQuery addGroupByItem(EventsGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -122,26 +132,23 @@ public EventsScalarQuery addGroupByItem(EventsGroupBy groupByItem) { } /** - * The list of facets on which to split results. - * + *

The list of facets on which to split results.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public EventsScalarQuery indexes(List indexes) { this.indexes = indexes; return this; } - public EventsScalarQuery addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -151,42 +158,38 @@ public EventsScalarQuery addIndexesItem(String indexesItem) { } /** - * The indexes in which to search. - * + *

The indexes in which to search.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public EventsScalarQuery name(String name) { this.name = name; return this; } /** - * The variable name for use in formulas. - * + *

The variable name for use in formulas.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public EventsScalarQuery search(EventsSearch search) { this.search = search; this.unparsed |= search.unparsed; @@ -194,22 +197,23 @@ public EventsScalarQuery search(EventsSearch search) { } /** - * Configuration of the search/filter for an events query. - * + *

Configuration of the search/filter for an events query.

* @return search - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEARCH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsSearch getSearch() { - return search; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsSearch getSearch() { + return search; + } public void setSearch(EventsSearch search) { this.search = search; } - /** Return true if this EventsScalarQuery object is equal to o. */ + /** + * Return true if this EventsScalarQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -219,17 +223,13 @@ public boolean equals(Object o) { return false; } EventsScalarQuery eventsScalarQuery = (EventsScalarQuery) o; - return Objects.equals(this.compute, eventsScalarQuery.compute) - && Objects.equals(this.dataSource, eventsScalarQuery.dataSource) - && Objects.equals(this.groupBy, eventsScalarQuery.groupBy) - && Objects.equals(this.indexes, eventsScalarQuery.indexes) - && Objects.equals(this.name, eventsScalarQuery.name) - && Objects.equals(this.search, eventsScalarQuery.search); + return Objects.equals(this.compute, eventsScalarQuery.compute) && Objects.equals(this.dataSource, eventsScalarQuery.dataSource) && Objects.equals(this.groupBy, eventsScalarQuery.groupBy) && Objects.equals(this.indexes, eventsScalarQuery.indexes) && Objects.equals(this.name, eventsScalarQuery.name) && Objects.equals(this.search, eventsScalarQuery.search); } + @Override public int hashCode() { - return Objects.hash(compute, dataSource, groupBy, indexes, name, search); + return Objects.hash(compute,dataSource,groupBy,indexes,name,search); } @Override @@ -247,7 +247,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsSearch.java b/src/main/java/com/datadog/api/client/v2/model/EventsSearch.java index 87c1d2a20f2..9317bb935c1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsSearch.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsSearch.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Configuration of the search/filter for an events query. */ -@JsonPropertyOrder({EventsSearch.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Configuration of the search/filter for an events query.

+ */ +@JsonPropertyOrder({ + EventsSearch.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsSearch { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -27,22 +49,23 @@ public EventsSearch query(String query) { } /** - * The search/filter string for an events query. - * + *

The search/filter string for an events query.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this EventsSearch object is equal to o. */ + /** + * Return true if this EventsSearch object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.query, eventsSearch.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsSort.java b/src/main/java/com/datadog/api/client/v2/model/EventsSort.java index 8ae7a022aea..d715b7350ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The sort parameters when querying events. */ +/** + *

The sort parameters when querying events.

+ */ @JsonSerialize(using = EventsSort.EventsSortSerializer.class) public class EventsSort { public static final EventsSort TIMESTAMP_ASCENDING = new EventsSort("timestamp"); public static final EventsSort TIMESTAMP_DESCENDING = new EventsSort("-timestamp"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timestamp", "-timestamp")); + private static final Set allowedValues = new HashSet(Arrays.asList("timestamp", "-timestamp")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class EventsSortSerializer extends StdSerializer { - public EventsSortSerializer(Class t) { - super(t); - } - - public EventsSortSerializer() { - this(null); - } - - @Override - public void serialize(EventsSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventsSortSerializer(Class t) { + super(t); + } + + public EventsSortSerializer() { + this(null); + } + + @Override + public void serialize(EventsSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventsSort object is equal to o. */ + /** + * Return true if this EventsSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsSortType.java b/src/main/java/com/datadog/api/client/v2/model/EventsSortType.java index 2b7e9460779..74fb80f6a50 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsSortType.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsSortType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of sort to use on the calculated value. */ +/** + *

The type of sort to use on the calculated value.

+ */ @JsonSerialize(using = EventsSortType.EventsSortTypeSerializer.class) public class EventsSortType { public static final EventsSortType ALPHABETICAL = new EventsSortType("alphabetical"); public static final EventsSortType MEASURE = new EventsSortType("measure"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alphabetical", "measure")); + private static final Set allowedValues = new HashSet(Arrays.asList("alphabetical", "measure")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class EventsSortTypeSerializer extends StdSerializer { - public EventsSortTypeSerializer(Class t) { - super(t); - } - - public EventsSortTypeSerializer() { - this(null); - } - - @Override - public void serialize(EventsSortType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public EventsSortTypeSerializer(Class t) { + super(t); + } + + public EventsSortTypeSerializer() { + this(null); + } + + @Override + public void serialize(EventsSortType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this EventsSortType object is equal to o. */ + /** + * Return true if this EventsSortType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsTimeseriesQuery.java b/src/main/java/com/datadog/api/client/v2/model/EventsTimeseriesQuery.java index 490ed45a563..295c8c7c0e7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsTimeseriesQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsTimeseriesQuery.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An individual timeseries events query. */ +/** + *

An individual timeseries events query.

+ */ @JsonPropertyOrder({ EventsTimeseriesQuery.JSON_PROPERTY_COMPUTE, EventsTimeseriesQuery.JSON_PROPERTY_DATA_SOURCE, @@ -24,10 +41,10 @@ EventsTimeseriesQuery.JSON_PROPERTY_NAME, EventsTimeseriesQuery.JSON_PROPERTY_SEARCH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsTimeseriesQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private EventsCompute compute; @@ -50,15 +67,13 @@ public EventsTimeseriesQuery() {} @JsonCreator public EventsTimeseriesQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) EventsCompute compute, - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - EventsDataSource dataSource) { - this.compute = compute; - this.unparsed |= compute.unparsed; - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_COMPUTE)EventsCompute compute, + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)EventsDataSource dataSource) { + this.compute = compute; + this.unparsed |= compute.unparsed; + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); } - public EventsTimeseriesQuery compute(EventsCompute compute) { this.compute = compute; this.unparsed |= compute.unparsed; @@ -66,20 +81,18 @@ public EventsTimeseriesQuery compute(EventsCompute compute) { } /** - * The instructions for what to compute for this query. - * + *

The instructions for what to compute for this query.

* @return compute - */ - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventsCompute getCompute() { - return compute; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventsCompute getCompute() { + return compute; + } public void setCompute(EventsCompute compute) { this.compute = compute; } - public EventsTimeseriesQuery dataSource(EventsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); @@ -87,23 +100,21 @@ public EventsTimeseriesQuery dataSource(EventsDataSource dataSource) { } /** - * A data source that is powered by the Events Platform. - * + *

A data source that is powered by the Events Platform.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public EventsDataSource getDataSource() { + return dataSource; + } public void setDataSource(EventsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public EventsTimeseriesQuery groupBy(List groupBy) { this.groupBy = groupBy; for (EventsGroupBy item : groupBy) { @@ -111,7 +122,6 @@ public EventsTimeseriesQuery groupBy(List groupBy) { } return this; } - public EventsTimeseriesQuery addGroupByItem(EventsGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -122,26 +132,23 @@ public EventsTimeseriesQuery addGroupByItem(EventsGroupBy groupByItem) { } /** - * The list of facets on which to split results. - * + *

The list of facets on which to split results.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public EventsTimeseriesQuery indexes(List indexes) { this.indexes = indexes; return this; } - public EventsTimeseriesQuery addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -151,42 +158,38 @@ public EventsTimeseriesQuery addIndexesItem(String indexesItem) { } /** - * The indexes in which to search. - * + *

The indexes in which to search.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public EventsTimeseriesQuery name(String name) { this.name = name; return this; } /** - * The variable name for use in formulas. - * + *

The variable name for use in formulas.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public EventsTimeseriesQuery search(EventsSearch search) { this.search = search; this.unparsed |= search.unparsed; @@ -194,22 +197,23 @@ public EventsTimeseriesQuery search(EventsSearch search) { } /** - * Configuration of the search/filter for an events query. - * + *

Configuration of the search/filter for an events query.

* @return search - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEARCH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventsSearch getSearch() { - return search; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public EventsSearch getSearch() { + return search; + } public void setSearch(EventsSearch search) { this.search = search; } - /** Return true if this EventsTimeseriesQuery object is equal to o. */ + /** + * Return true if this EventsTimeseriesQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -219,17 +223,13 @@ public boolean equals(Object o) { return false; } EventsTimeseriesQuery eventsTimeseriesQuery = (EventsTimeseriesQuery) o; - return Objects.equals(this.compute, eventsTimeseriesQuery.compute) - && Objects.equals(this.dataSource, eventsTimeseriesQuery.dataSource) - && Objects.equals(this.groupBy, eventsTimeseriesQuery.groupBy) - && Objects.equals(this.indexes, eventsTimeseriesQuery.indexes) - && Objects.equals(this.name, eventsTimeseriesQuery.name) - && Objects.equals(this.search, eventsTimeseriesQuery.search); + return Objects.equals(this.compute, eventsTimeseriesQuery.compute) && Objects.equals(this.dataSource, eventsTimeseriesQuery.dataSource) && Objects.equals(this.groupBy, eventsTimeseriesQuery.groupBy) && Objects.equals(this.indexes, eventsTimeseriesQuery.indexes) && Objects.equals(this.name, eventsTimeseriesQuery.name) && Objects.equals(this.search, eventsTimeseriesQuery.search); } + @Override public int hashCode() { - return Objects.hash(compute, dataSource, groupBy, indexes, name, search); + return Objects.hash(compute,dataSource,groupBy,indexes,name,search); } @Override @@ -247,7 +247,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/EventsWarning.java b/src/main/java/com/datadog/api/client/v2/model/EventsWarning.java index d0992db8ad4..d6d3ae12e42 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EventsWarning.java +++ b/src/main/java/com/datadog/api/client/v2/model/EventsWarning.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A warning message indicating something is wrong with the query. */ + +/** + *

A warning message indicating something is wrong with the query.

+ */ @JsonPropertyOrder({ EventsWarning.JSON_PROPERTY_CODE, EventsWarning.JSON_PROPERTY_DETAIL, EventsWarning.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsWarning { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -37,64 +57,61 @@ public EventsWarning code(String code) { } /** - * A unique code for this type of warning. - * + *

A unique code for this type of warning.

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public EventsWarning detail(String detail) { this.detail = detail; return this; } /** - * A detailed explanation of this specific warning. - * + *

A detailed explanation of this specific warning.

* @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } public void setDetail(String detail) { this.detail = detail; } - public EventsWarning title(String title) { this.title = title; return this; } /** - * A short human-readable summary of the warning. - * + *

A short human-readable summary of the warning.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this EventsWarning object is equal to o. */ + /** + * Return true if this EventsWarning object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } EventsWarning eventsWarning = (EventsWarning) o; - return Objects.equals(this.code, eventsWarning.code) - && Objects.equals(this.detail, eventsWarning.detail) - && Objects.equals(this.title, eventsWarning.title); + return Objects.equals(this.code, eventsWarning.code) && Objects.equals(this.detail, eventsWarning.detail) && Objects.equals(this.title, eventsWarning.title); } + @Override public int hashCode() { - return Objects.hash(code, detail, title); + return Objects.hash(code,detail,title); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccounResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccounResponseAttributes.java index 59a3e3e5096..72f05b3622d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccounResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccounResponseAttributes.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes object of a Fastly account. */ +/** + *

Attributes object of a Fastly account.

+ */ @JsonPropertyOrder({ FastlyAccounResponseAttributes.JSON_PROPERTY_NAME, FastlyAccounResponseAttributes.JSON_PROPERTY_SERVICES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccounResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -34,30 +51,27 @@ public FastlyAccounResponseAttributes() {} @JsonCreator public FastlyAccounResponseAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public FastlyAccounResponseAttributes name(String name) { this.name = name; return this; } /** - * The name of the Fastly account. - * + *

The name of the Fastly account.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FastlyAccounResponseAttributes services(List services) { this.services = services; for (FastlyService item : services) { @@ -65,7 +79,6 @@ public FastlyAccounResponseAttributes services(List services) { } return this; } - public FastlyAccounResponseAttributes addServicesItem(FastlyService servicesItem) { if (this.services == null) { this.services = new ArrayList<>(); @@ -76,22 +89,23 @@ public FastlyAccounResponseAttributes addServicesItem(FastlyService servicesItem } /** - * A list of services belonging to the parent account. - * + *

A list of services belonging to the parent account.

* @return services - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getServices() { - return services; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } public void setServices(List services) { this.services = services; } - /** Return true if this FastlyAccounResponseAttributes object is equal to o. */ + /** + * Return true if this FastlyAccounResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -100,15 +114,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FastlyAccounResponseAttributes fastlyAccounResponseAttributes = - (FastlyAccounResponseAttributes) o; - return Objects.equals(this.name, fastlyAccounResponseAttributes.name) - && Objects.equals(this.services, fastlyAccounResponseAttributes.services); + FastlyAccounResponseAttributes fastlyAccounResponseAttributes = (FastlyAccounResponseAttributes) o; + return Objects.equals(this.name, fastlyAccounResponseAttributes.name) && Objects.equals(this.services, fastlyAccounResponseAttributes.services); } + @Override public int hashCode() { - return Objects.hash(name, services); + return Objects.hash(name,services); } @Override @@ -122,7 +135,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequest.java index d383cbe134a..d79933486a6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Payload schema when adding a Fastly account. */ -@JsonPropertyOrder({FastlyAccountCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Payload schema when adding a Fastly account.

+ */ +@JsonPropertyOrder({ + FastlyAccountCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FastlyAccountCreateRequestData data; @@ -26,12 +47,10 @@ public FastlyAccountCreateRequest() {} @JsonCreator public FastlyAccountCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - FastlyAccountCreateRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)FastlyAccountCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public FastlyAccountCreateRequest data(FastlyAccountCreateRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public FastlyAccountCreateRequest data(FastlyAccountCreateRequestData data) { } /** - * Data object for creating a Fastly account. - * + *

Data object for creating a Fastly account.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyAccountCreateRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyAccountCreateRequestData getData() { + return data; + } public void setData(FastlyAccountCreateRequestData data) { this.data = data; } - /** Return true if this FastlyAccountCreateRequest object is equal to o. */ + /** + * Return true if this FastlyAccountCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyAccountCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestAttributes.java index 1bae8e5847b..cc5a5552653 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestAttributes.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes object for creating a Fastly account. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes object for creating a Fastly account.

+ */ @JsonPropertyOrder({ FastlyAccountCreateRequestAttributes.JSON_PROPERTY_API_KEY, FastlyAccountCreateRequestAttributes.JSON_PROPERTY_NAME, FastlyAccountCreateRequestAttributes.JSON_PROPERTY_SERVICES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountCreateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -38,52 +55,47 @@ public FastlyAccountCreateRequestAttributes() {} @JsonCreator public FastlyAccountCreateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_API_KEY) String apiKey, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.apiKey = apiKey; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_API_KEY)String apiKey, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.apiKey = apiKey; + this.name = name; } - public FastlyAccountCreateRequestAttributes apiKey(String apiKey) { this.apiKey = apiKey; return this; } /** - * The API key for the Fastly account. - * + *

The API key for the Fastly account.

* @return apiKey - */ - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiKey() { - return apiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - public FastlyAccountCreateRequestAttributes name(String name) { this.name = name; return this; } /** - * The name of the Fastly account. - * + *

The name of the Fastly account.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FastlyAccountCreateRequestAttributes services(List services) { this.services = services; for (FastlyService item : services) { @@ -91,7 +103,6 @@ public FastlyAccountCreateRequestAttributes services(List service } return this; } - public FastlyAccountCreateRequestAttributes addServicesItem(FastlyService servicesItem) { if (this.services == null) { this.services = new ArrayList<>(); @@ -102,22 +113,23 @@ public FastlyAccountCreateRequestAttributes addServicesItem(FastlyService servic } /** - * A list of services belonging to the parent account. - * + *

A list of services belonging to the parent account.

* @return services - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getServices() { - return services; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } public void setServices(List services) { this.services = services; } - /** Return true if this FastlyAccountCreateRequestAttributes object is equal to o. */ + /** + * Return true if this FastlyAccountCreateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,16 +138,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FastlyAccountCreateRequestAttributes fastlyAccountCreateRequestAttributes = - (FastlyAccountCreateRequestAttributes) o; - return Objects.equals(this.apiKey, fastlyAccountCreateRequestAttributes.apiKey) - && Objects.equals(this.name, fastlyAccountCreateRequestAttributes.name) - && Objects.equals(this.services, fastlyAccountCreateRequestAttributes.services); + FastlyAccountCreateRequestAttributes fastlyAccountCreateRequestAttributes = (FastlyAccountCreateRequestAttributes) o; + return Objects.equals(this.apiKey, fastlyAccountCreateRequestAttributes.apiKey) && Objects.equals(this.name, fastlyAccountCreateRequestAttributes.name) && Objects.equals(this.services, fastlyAccountCreateRequestAttributes.services); } + @Override public int hashCode() { - return Objects.hash(apiKey, name, services); + return Objects.hash(apiKey,name,services); } @Override @@ -150,7 +160,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestData.java index 9661e509d47..640196c5c7a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountCreateRequestData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data object for creating a Fastly account. */ + +/** + *

Data object for creating a Fastly account.

+ */ @JsonPropertyOrder({ FastlyAccountCreateRequestData.JSON_PROPERTY_ATTRIBUTES, FastlyAccountCreateRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountCreateRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private FastlyAccountCreateRequestAttributes attributes; @@ -32,37 +51,32 @@ public FastlyAccountCreateRequestData() {} @JsonCreator public FastlyAccountCreateRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - FastlyAccountCreateRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FastlyAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)FastlyAccountCreateRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)FastlyAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public FastlyAccountCreateRequestData attributes( - FastlyAccountCreateRequestAttributes attributes) { + public FastlyAccountCreateRequestData attributes(FastlyAccountCreateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes object for creating a Fastly account. - * + *

Attributes object for creating a Fastly account.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyAccountCreateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyAccountCreateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(FastlyAccountCreateRequestAttributes attributes) { this.attributes = attributes; } - public FastlyAccountCreateRequestData type(FastlyAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -70,24 +84,25 @@ public FastlyAccountCreateRequestData type(FastlyAccountType type) { } /** - * The JSON:API type for this API. Should always be fastly-accounts. - * + *

The JSON:API type for this API. Should always be fastly-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyAccountType getType() { + return type; + } public void setType(FastlyAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FastlyAccountCreateRequestData object is equal to o. */ + /** + * Return true if this FastlyAccountCreateRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FastlyAccountCreateRequestData fastlyAccountCreateRequestData = - (FastlyAccountCreateRequestData) o; - return Objects.equals(this.attributes, fastlyAccountCreateRequestData.attributes) - && Objects.equals(this.type, fastlyAccountCreateRequestData.type); + FastlyAccountCreateRequestData fastlyAccountCreateRequestData = (FastlyAccountCreateRequestData) o; + return Objects.equals(this.attributes, fastlyAccountCreateRequestData.attributes) && Objects.equals(this.type, fastlyAccountCreateRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponse.java index 7eff52fde61..cc060972269 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The expected response schema when getting a Fastly account. */ -@JsonPropertyOrder({FastlyAccountResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The expected response schema when getting a Fastly account.

+ */ +@JsonPropertyOrder({ + FastlyAccountResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FastlyAccountResponseData data; @@ -28,22 +50,23 @@ public FastlyAccountResponse data(FastlyAccountResponseData data) { } /** - * Data object of a Fastly account. - * + *

Data object of a Fastly account.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FastlyAccountResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FastlyAccountResponseData getData() { + return data; + } public void setData(FastlyAccountResponseData data) { this.data = data; } - /** Return true if this FastlyAccountResponse object is equal to o. */ + /** + * Return true if this FastlyAccountResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyAccountResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponseData.java index 9db808bf37b..be99b5228f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Data object of a Fastly account. */ +/** + *

Data object of a Fastly account.

+ */ @JsonPropertyOrder({ FastlyAccountResponseData.JSON_PROPERTY_ATTRIBUTES, FastlyAccountResponseData.JSON_PROPERTY_ID, FastlyAccountResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private FastlyAccounResponseAttributes attributes; @@ -36,17 +55,15 @@ public FastlyAccountResponseData() {} @JsonCreator public FastlyAccountResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - FastlyAccounResponseAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FastlyAccountType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)FastlyAccounResponseAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)FastlyAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public FastlyAccountResponseData attributes(FastlyAccounResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public FastlyAccountResponseData attributes(FastlyAccounResponseAttributes attri } /** - * Attributes object of a Fastly account. - * + *

Attributes object of a Fastly account.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyAccounResponseAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyAccounResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(FastlyAccounResponseAttributes attributes) { this.attributes = attributes; } - public FastlyAccountResponseData id(String id) { this.id = id; return this; } /** - * The ID of the Fastly account, a hash of the account name. - * + *

The ID of the Fastly account, a hash of the account name.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public FastlyAccountResponseData type(FastlyAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public FastlyAccountResponseData type(FastlyAccountType type) { } /** - * The JSON:API type for this API. Should always be fastly-accounts. - * + *

The JSON:API type for this API. Should always be fastly-accounts.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyAccountType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyAccountType getType() { + return type; + } public void setType(FastlyAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FastlyAccountResponseData object is equal to o. */ + /** + * Return true if this FastlyAccountResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } FastlyAccountResponseData fastlyAccountResponseData = (FastlyAccountResponseData) o; - return Objects.equals(this.attributes, fastlyAccountResponseData.attributes) - && Objects.equals(this.id, fastlyAccountResponseData.id) - && Objects.equals(this.type, fastlyAccountResponseData.type); + return Objects.equals(this.attributes, fastlyAccountResponseData.attributes) && Objects.equals(this.id, fastlyAccountResponseData.id) && Objects.equals(this.type, fastlyAccountResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountType.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountType.java index 74f8cc0266c..1f9d88e9096 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountType.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The JSON:API type for this API. Should always be fastly-accounts. */ +/** + *

The JSON:API type for this API. Should always be fastly-accounts.

+ */ @JsonSerialize(using = FastlyAccountType.FastlyAccountTypeSerializer.class) public class FastlyAccountType { public static final FastlyAccountType FASTLY_ACCOUNTS = new FastlyAccountType("fastly-accounts"); - private static final Set allowedValues = - new HashSet(Arrays.asList("fastly-accounts")); + private static final Set allowedValues = new HashSet(Arrays.asList("fastly-accounts")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class FastlyAccountTypeSerializer extends StdSerializer { - public FastlyAccountTypeSerializer(Class t) { - super(t); - } - - public FastlyAccountTypeSerializer() { - this(null); - } - - @Override - public void serialize(FastlyAccountType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public FastlyAccountTypeSerializer(Class t) { + super(t); + } + + public FastlyAccountTypeSerializer() { + this(null); + } + + @Override + public void serialize(FastlyAccountType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FastlyAccountType object is equal to o. */ + /** + * Return true if this FastlyAccountType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequest.java index 4aa4e0af11b..5440ae7befb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Payload schema when updating a Fastly account. */ -@JsonPropertyOrder({FastlyAccountUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Payload schema when updating a Fastly account.

+ */ +@JsonPropertyOrder({ + FastlyAccountUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FastlyAccountUpdateRequestData data; @@ -26,12 +47,10 @@ public FastlyAccountUpdateRequest() {} @JsonCreator public FastlyAccountUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - FastlyAccountUpdateRequestData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)FastlyAccountUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public FastlyAccountUpdateRequest data(FastlyAccountUpdateRequestData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public FastlyAccountUpdateRequest data(FastlyAccountUpdateRequestData data) { } /** - * Data object for updating a Fastly account. - * + *

Data object for updating a Fastly account.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyAccountUpdateRequestData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyAccountUpdateRequestData getData() { + return data; + } public void setData(FastlyAccountUpdateRequestData data) { this.data = data; } - /** Return true if this FastlyAccountUpdateRequest object is equal to o. */ + /** + * Return true if this FastlyAccountUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyAccountUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestAttributes.java index a20588ccc0b..349fbbd883f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestAttributes.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes object for updating a Fastly account. */ -@JsonPropertyOrder({FastlyAccountUpdateRequestAttributes.JSON_PROPERTY_API_KEY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes object for updating a Fastly account.

+ */ +@JsonPropertyOrder({ + FastlyAccountUpdateRequestAttributes.JSON_PROPERTY_API_KEY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountUpdateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_API_KEY = "api_key"; private String apiKey; @@ -27,22 +49,23 @@ public FastlyAccountUpdateRequestAttributes apiKey(String apiKey) { } /** - * The API key of the Fastly account. - * + *

The API key of the Fastly account.

* @return apiKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApiKey() { - return apiKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getApiKey() { + return apiKey; + } public void setApiKey(String apiKey) { this.apiKey = apiKey; } - /** Return true if this FastlyAccountUpdateRequestAttributes object is equal to o. */ + /** + * Return true if this FastlyAccountUpdateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FastlyAccountUpdateRequestAttributes fastlyAccountUpdateRequestAttributes = - (FastlyAccountUpdateRequestAttributes) o; + FastlyAccountUpdateRequestAttributes fastlyAccountUpdateRequestAttributes = (FastlyAccountUpdateRequestAttributes) o; return Objects.equals(this.apiKey, fastlyAccountUpdateRequestAttributes.apiKey); } + @Override public int hashCode() { return Objects.hash(apiKey); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestData.java index aa889150e38..a5811745736 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountUpdateRequestData.java @@ -6,50 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data object for updating a Fastly account. */ + +/** + *

Data object for updating a Fastly account.

+ */ @JsonPropertyOrder({ FastlyAccountUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, FastlyAccountUpdateRequestData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountUpdateRequestData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private FastlyAccountUpdateRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; private FastlyAccountType type = FastlyAccountType.FASTLY_ACCOUNTS; - public FastlyAccountUpdateRequestData attributes( - FastlyAccountUpdateRequestAttributes attributes) { + public FastlyAccountUpdateRequestData attributes(FastlyAccountUpdateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes object for updating a Fastly account. - * + *

Attributes object for updating a Fastly account.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FastlyAccountUpdateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FastlyAccountUpdateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(FastlyAccountUpdateRequestAttributes attributes) { this.attributes = attributes; } - public FastlyAccountUpdateRequestData type(FastlyAccountType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -57,25 +74,26 @@ public FastlyAccountUpdateRequestData type(FastlyAccountType type) { } /** - * The JSON:API type for this API. Should always be fastly-accounts. - * + *

The JSON:API type for this API. Should always be fastly-accounts.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FastlyAccountType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FastlyAccountType getType() { + return type; + } public void setType(FastlyAccountType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FastlyAccountUpdateRequestData object is equal to o. */ + /** + * Return true if this FastlyAccountUpdateRequestData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,15 +102,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FastlyAccountUpdateRequestData fastlyAccountUpdateRequestData = - (FastlyAccountUpdateRequestData) o; - return Objects.equals(this.attributes, fastlyAccountUpdateRequestData.attributes) - && Objects.equals(this.type, fastlyAccountUpdateRequestData.type); + FastlyAccountUpdateRequestData fastlyAccountUpdateRequestData = (FastlyAccountUpdateRequestData) o; + return Objects.equals(this.attributes, fastlyAccountUpdateRequestData.attributes) && Objects.equals(this.type, fastlyAccountUpdateRequestData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -106,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountsResponse.java index c0b10fd810b..42606f11738 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyAccountsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyAccountsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The expected response schema when getting Fastly accounts. */ -@JsonPropertyOrder({FastlyAccountsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The expected response schema when getting Fastly accounts.

+ */ +@JsonPropertyOrder({ + FastlyAccountsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyAccountsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public FastlyAccountsResponse data(List data) { } return this; } - public FastlyAccountsResponse addDataItem(FastlyAccountResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public FastlyAccountsResponse addDataItem(FastlyAccountResponseData dataItem) { } /** - * The JSON:API data schema. - * + *

The JSON:API data schema.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this FastlyAccountsResponse object is equal to o. */ + /** + * Return true if this FastlyAccountsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyAccountsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyService.java b/src/main/java/com/datadog/api/client/v2/model/FastlyService.java index 882c8120034..eb1ba058f51 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyService.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyService.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The schema representation of a Fastly service. */ -@JsonPropertyOrder({FastlyService.JSON_PROPERTY_ID, FastlyService.JSON_PROPERTY_TAGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The schema representation of a Fastly service.

+ */ +@JsonPropertyOrder({ + FastlyService.JSON_PROPERTY_ID, + FastlyService.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyService { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -30,35 +50,32 @@ public class FastlyService { public FastlyService() {} @JsonCreator - public FastlyService(@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { - this.id = id; + public FastlyService( + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id) { + this.id = id; } - public FastlyService id(String id) { this.id = id; return this; } /** - * The id of the Fastly service - * + *

The id of the Fastly service

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public FastlyService tags(List tags) { this.tags = tags; return this; } - public FastlyService addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -68,22 +85,23 @@ public FastlyService addTagsItem(String tagsItem) { } /** - * A list of tags for the Fastly service. - * + *

A list of tags for the Fastly service.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this FastlyService object is equal to o. */ + /** + * Return true if this FastlyService object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +111,13 @@ public boolean equals(Object o) { return false; } FastlyService fastlyService = (FastlyService) o; - return Objects.equals(this.id, fastlyService.id) - && Objects.equals(this.tags, fastlyService.tags); + return Objects.equals(this.id, fastlyService.id) && Objects.equals(this.tags, fastlyService.tags); } + @Override public int hashCode() { - return Objects.hash(id, tags); + return Objects.hash(id,tags); } @Override @@ -113,7 +131,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceAttributes.java index 2a6060eeac6..429d36d9703 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceAttributes.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes object for Fastly service requests. */ -@JsonPropertyOrder({FastlyServiceAttributes.JSON_PROPERTY_TAGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Attributes object for Fastly service requests.

+ */ +@JsonPropertyOrder({ + FastlyServiceAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyServiceAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TAGS = "tags"; private List tags = null; @@ -27,7 +47,6 @@ public FastlyServiceAttributes tags(List tags) { this.tags = tags; return this; } - public FastlyServiceAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -37,22 +56,23 @@ public FastlyServiceAttributes addTagsItem(String tagsItem) { } /** - * A list of tags for the Fastly service. - * + *

A list of tags for the Fastly service.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this FastlyServiceAttributes object is equal to o. */ + /** + * Return true if this FastlyServiceAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.tags, fastlyServiceAttributes.tags); } + @Override public int hashCode() { return Objects.hash(tags); @@ -80,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceData.java b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceData.java index d827cf7e44f..c79e3923e27 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceData.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data object for Fastly service requests. */ + +/** + *

Data object for Fastly service requests.

+ */ @JsonPropertyOrder({ FastlyServiceData.JSON_PROPERTY_ATTRIBUTES, FastlyServiceData.JSON_PROPERTY_ID, FastlyServiceData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyServiceData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private FastlyServiceAttributes attributes; @@ -36,13 +55,12 @@ public FastlyServiceData() {} @JsonCreator public FastlyServiceData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FastlyServiceType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)FastlyServiceType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public FastlyServiceData attributes(FastlyServiceAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -50,41 +68,37 @@ public FastlyServiceData attributes(FastlyServiceAttributes attributes) { } /** - * Attributes object for Fastly service requests. - * + *

Attributes object for Fastly service requests.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FastlyServiceAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FastlyServiceAttributes getAttributes() { + return attributes; + } public void setAttributes(FastlyServiceAttributes attributes) { this.attributes = attributes; } - public FastlyServiceData id(String id) { this.id = id; return this; } /** - * The ID of the Fastly service. - * + *

The ID of the Fastly service.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public FastlyServiceData type(FastlyServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +106,25 @@ public FastlyServiceData type(FastlyServiceType type) { } /** - * The JSON:API type for this API. Should always be fastly-services. - * + *

The JSON:API type for this API. Should always be fastly-services.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyServiceType getType() { + return type; + } public void setType(FastlyServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FastlyServiceData object is equal to o. */ + /** + * Return true if this FastlyServiceData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } FastlyServiceData fastlyServiceData = (FastlyServiceData) o; - return Objects.equals(this.attributes, fastlyServiceData.attributes) - && Objects.equals(this.id, fastlyServiceData.id) - && Objects.equals(this.type, fastlyServiceData.type); + return Objects.equals(this.attributes, fastlyServiceData.attributes) && Objects.equals(this.id, fastlyServiceData.id) && Objects.equals(this.type, fastlyServiceData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceRequest.java b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceRequest.java index e0a26c1fec5..a6537605e0c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Payload schema for Fastly service requests. */ -@JsonPropertyOrder({FastlyServiceRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Payload schema for Fastly service requests.

+ */ +@JsonPropertyOrder({ + FastlyServiceRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyServiceRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FastlyServiceData data; @@ -26,11 +47,10 @@ public FastlyServiceRequest() {} @JsonCreator public FastlyServiceRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FastlyServiceData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)FastlyServiceData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public FastlyServiceRequest data(FastlyServiceData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public FastlyServiceRequest data(FastlyServiceData data) { } /** - * Data object for Fastly service requests. - * + *

Data object for Fastly service requests.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FastlyServiceData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public FastlyServiceData getData() { + return data; + } public void setData(FastlyServiceData data) { this.data = data; } - /** Return true if this FastlyServiceRequest object is equal to o. */ + /** + * Return true if this FastlyServiceRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyServiceRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceResponse.java b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceResponse.java index 513a197eb5d..ae4220fe069 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The expected response schema when getting a Fastly service. */ -@JsonPropertyOrder({FastlyServiceResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The expected response schema when getting a Fastly service.

+ */ +@JsonPropertyOrder({ + FastlyServiceResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyServiceResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private FastlyServiceData data; @@ -28,22 +50,23 @@ public FastlyServiceResponse data(FastlyServiceData data) { } /** - * Data object for Fastly service requests. - * + *

Data object for Fastly service requests.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FastlyServiceData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FastlyServiceData getData() { + return data; + } public void setData(FastlyServiceData data) { this.data = data; } - /** Return true if this FastlyServiceResponse object is equal to o. */ + /** + * Return true if this FastlyServiceResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyServiceResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceType.java b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceType.java index 5f4f8d97d88..5609c9f8a45 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyServiceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyServiceType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The JSON:API type for this API. Should always be fastly-services. */ +/** + *

The JSON:API type for this API. Should always be fastly-services.

+ */ @JsonSerialize(using = FastlyServiceType.FastlyServiceTypeSerializer.class) public class FastlyServiceType { public static final FastlyServiceType FASTLY_SERVICES = new FastlyServiceType("fastly-services"); - private static final Set allowedValues = - new HashSet(Arrays.asList("fastly-services")); + private static final Set allowedValues = new HashSet(Arrays.asList("fastly-services")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class FastlyServiceTypeSerializer extends StdSerializer { - public FastlyServiceTypeSerializer(Class t) { - super(t); - } - - public FastlyServiceTypeSerializer() { - this(null); - } - - @Override - public void serialize(FastlyServiceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public FastlyServiceTypeSerializer(Class t) { + super(t); + } + + public FastlyServiceTypeSerializer() { + this(null); + } + + @Override + public void serialize(FastlyServiceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this FastlyServiceType object is equal to o. */ + /** + * Return true if this FastlyServiceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/FastlyServicesResponse.java b/src/main/java/com/datadog/api/client/v2/model/FastlyServicesResponse.java index 7ed62f16e4a..cfdf146754e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FastlyServicesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/FastlyServicesResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The expected response schema when getting Fastly services. */ -@JsonPropertyOrder({FastlyServicesResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The expected response schema when getting Fastly services.

+ */ +@JsonPropertyOrder({ + FastlyServicesResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FastlyServicesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public FastlyServicesResponse data(List data) { } return this; } - public FastlyServicesResponse addDataItem(FastlyServiceResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public FastlyServicesResponse addDataItem(FastlyServiceResponse dataItem) { } /** - * The JSON:API data schema. - * + *

The JSON:API data schema.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this FastlyServicesResponse object is equal to o. */ + /** + * Return true if this FastlyServicesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, fastlyServicesResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FormulaLimit.java b/src/main/java/com/datadog/api/client/v2/model/FormulaLimit.java index 05e25f12563..63c3c32f2f1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FormulaLimit.java +++ b/src/main/java/com/datadog/api/client/v2/model/FormulaLimit.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Message for specifying limits to the number of values returned by a query. */ -@JsonPropertyOrder({FormulaLimit.JSON_PROPERTY_COUNT, FormulaLimit.JSON_PROPERTY_ORDER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Message for specifying limits to the number of values returned by a query.

+ */ +@JsonPropertyOrder({ + FormulaLimit.JSON_PROPERTY_COUNT, + FormulaLimit.JSON_PROPERTY_ORDER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FormulaLimit { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Integer count; @@ -30,21 +53,20 @@ public FormulaLimit count(Integer count) { } /** - * The number of results to which to limit. maximum: 2147483647 - * + *

The number of results to which to limit.

+ * maximum: 2147483647 * @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } public void setCount(Integer count) { this.count = count; } - public FormulaLimit order(QuerySortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -52,25 +74,26 @@ public FormulaLimit order(QuerySortOrder order) { } /** - * Direction of sort. - * + *

Direction of sort.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public QuerySortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public QuerySortOrder getOrder() { + return order; + } public void setOrder(QuerySortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - /** Return true if this FormulaLimit object is equal to o. */ + /** + * Return true if this FormulaLimit object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +103,13 @@ public boolean equals(Object o) { return false; } FormulaLimit formulaLimit = (FormulaLimit) o; - return Objects.equals(this.count, formulaLimit.count) - && Objects.equals(this.order, formulaLimit.order); + return Objects.equals(this.count, formulaLimit.count) && Objects.equals(this.order, formulaLimit.order); } + @Override public int hashCode() { - return Objects.hash(count, order); + return Objects.hash(count,order); } @Override @@ -100,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FullAPIKey.java b/src/main/java/com/datadog/api/client/v2/model/FullAPIKey.java index 26e40ef6dba..46d8c5f99bb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FullAPIKey.java +++ b/src/main/java/com/datadog/api/client/v2/model/FullAPIKey.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Datadog API key. */ + +/** + *

Datadog API key.

+ */ @JsonPropertyOrder({ FullAPIKey.JSON_PROPERTY_ATTRIBUTES, FullAPIKey.JSON_PROPERTY_ID, FullAPIKey.JSON_PROPERTY_RELATIONSHIPS, FullAPIKey.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FullAPIKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private FullAPIKeyAttributes attributes; @@ -42,42 +62,38 @@ public FullAPIKey attributes(FullAPIKeyAttributes attributes) { } /** - * Attributes of a full API key. - * + *

Attributes of a full API key.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FullAPIKeyAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FullAPIKeyAttributes getAttributes() { + return attributes; + } public void setAttributes(FullAPIKeyAttributes attributes) { this.attributes = attributes; } - public FullAPIKey id(String id) { this.id = id; return this; } /** - * ID of the API key. - * + *

ID of the API key.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public FullAPIKey relationships(APIKeyRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -85,21 +101,19 @@ public FullAPIKey relationships(APIKeyRelationships relationships) { } /** - * Resources related to the API key. - * + *

Resources related to the API key.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public APIKeyRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public APIKeyRelationships getRelationships() { + return relationships; + } public void setRelationships(APIKeyRelationships relationships) { this.relationships = relationships; } - public FullAPIKey type(APIKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,25 +121,26 @@ public FullAPIKey type(APIKeysType type) { } /** - * API Keys resource type. - * + *

API Keys resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public APIKeysType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public APIKeysType getType() { + return type; + } public void setType(APIKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FullAPIKey object is equal to o. */ + /** + * Return true if this FullAPIKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +150,13 @@ public boolean equals(Object o) { return false; } FullAPIKey fullApiKey = (FullAPIKey) o; - return Objects.equals(this.attributes, fullApiKey.attributes) - && Objects.equals(this.id, fullApiKey.id) - && Objects.equals(this.relationships, fullApiKey.relationships) - && Objects.equals(this.type, fullApiKey.type); + return Objects.equals(this.attributes, fullApiKey.attributes) && Objects.equals(this.id, fullApiKey.id) && Objects.equals(this.relationships, fullApiKey.relationships) && Objects.equals(this.type, fullApiKey.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -159,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FullAPIKeyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FullAPIKeyAttributes.java index 334a843730c..2a153349e3f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FullAPIKeyAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FullAPIKeyAttributes.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes of a full API key. */ + +/** + *

Attributes of a full API key.

+ */ @JsonPropertyOrder({ FullAPIKeyAttributes.JSON_PROPERTY_CREATED_AT, FullAPIKeyAttributes.JSON_PROPERTY_KEY, @@ -20,10 +40,10 @@ FullAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT, FullAPIKeyAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FullAPIKeyAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private String createdAt; @@ -39,76 +59,77 @@ public class FullAPIKeyAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * Creation date of the API key. - * + *

Creation date of the API key.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } /** - * The API key. - * + *

The API key.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } /** - * The last four characters of the API key. - * + *

The last four characters of the API key.

* @return last4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLast4() { - return last4; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLast4() { + return last4; + } /** - * Date the API key was last modified. - * + *

Date the API key was last modified.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getModifiedAt() { + return modifiedAt; + } public FullAPIKeyAttributes name(String name) { this.name = name; return this; } /** - * Name of the API key. - * + *

Name of the API key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this FullAPIKeyAttributes object is equal to o. */ + /** + * Return true if this FullAPIKeyAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,16 +139,13 @@ public boolean equals(Object o) { return false; } FullAPIKeyAttributes fullApiKeyAttributes = (FullAPIKeyAttributes) o; - return Objects.equals(this.createdAt, fullApiKeyAttributes.createdAt) - && Objects.equals(this.key, fullApiKeyAttributes.key) - && Objects.equals(this.last4, fullApiKeyAttributes.last4) - && Objects.equals(this.modifiedAt, fullApiKeyAttributes.modifiedAt) - && Objects.equals(this.name, fullApiKeyAttributes.name); + return Objects.equals(this.createdAt, fullApiKeyAttributes.createdAt) && Objects.equals(this.key, fullApiKeyAttributes.key) && Objects.equals(this.last4, fullApiKeyAttributes.last4) && Objects.equals(this.modifiedAt, fullApiKeyAttributes.modifiedAt) && Objects.equals(this.name, fullApiKeyAttributes.name); } + @Override public int hashCode() { - return Objects.hash(createdAt, key, last4, modifiedAt, name); + return Objects.hash(createdAt,key,last4,modifiedAt,name); } @Override @@ -144,7 +162,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FullApplicationKey.java b/src/main/java/com/datadog/api/client/v2/model/FullApplicationKey.java index 661785c7557..57b36f64265 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FullApplicationKey.java +++ b/src/main/java/com/datadog/api/client/v2/model/FullApplicationKey.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Datadog application key. */ + +/** + *

Datadog application key.

+ */ @JsonPropertyOrder({ FullApplicationKey.JSON_PROPERTY_ATTRIBUTES, FullApplicationKey.JSON_PROPERTY_ID, FullApplicationKey.JSON_PROPERTY_RELATIONSHIPS, FullApplicationKey.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FullApplicationKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private FullApplicationKeyAttributes attributes; @@ -42,42 +62,38 @@ public FullApplicationKey attributes(FullApplicationKeyAttributes attributes) { } /** - * Attributes of a full application key. - * + *

Attributes of a full application key.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FullApplicationKeyAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FullApplicationKeyAttributes getAttributes() { + return attributes; + } public void setAttributes(FullApplicationKeyAttributes attributes) { this.attributes = attributes; } - public FullApplicationKey id(String id) { this.id = id; return this; } /** - * ID of the application key. - * + *

ID of the application key.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public FullApplicationKey relationships(ApplicationKeyRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -85,21 +101,19 @@ public FullApplicationKey relationships(ApplicationKeyRelationships relationship } /** - * Resources related to the application key. - * + *

Resources related to the application key.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApplicationKeyRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApplicationKeyRelationships getRelationships() { + return relationships; + } public void setRelationships(ApplicationKeyRelationships relationships) { this.relationships = relationships; } - public FullApplicationKey type(ApplicationKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,25 +121,26 @@ public FullApplicationKey type(ApplicationKeysType type) { } /** - * Application Keys resource type. - * + *

Application Keys resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApplicationKeysType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApplicationKeysType getType() { + return type; + } public void setType(ApplicationKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this FullApplicationKey object is equal to o. */ + /** + * Return true if this FullApplicationKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +150,13 @@ public boolean equals(Object o) { return false; } FullApplicationKey fullApplicationKey = (FullApplicationKey) o; - return Objects.equals(this.attributes, fullApplicationKey.attributes) - && Objects.equals(this.id, fullApplicationKey.id) - && Objects.equals(this.relationships, fullApplicationKey.relationships) - && Objects.equals(this.type, fullApplicationKey.type); + return Objects.equals(this.attributes, fullApplicationKey.attributes) && Objects.equals(this.id, fullApplicationKey.id) && Objects.equals(this.relationships, fullApplicationKey.relationships) && Objects.equals(this.type, fullApplicationKey.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -159,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/FullApplicationKeyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FullApplicationKeyAttributes.java index cbf8e4b7c68..26e600ea6df 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FullApplicationKeyAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FullApplicationKeyAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of a full application key. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of a full application key.

+ */ @JsonPropertyOrder({ FullApplicationKeyAttributes.JSON_PROPERTY_CREATED_AT, FullApplicationKeyAttributes.JSON_PROPERTY_KEY, @@ -23,10 +40,10 @@ FullApplicationKeyAttributes.JSON_PROPERTY_NAME, FullApplicationKeyAttributes.JSON_PROPERTY_SCOPES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FullApplicationKeyAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private String createdAt; @@ -42,68 +59,65 @@ public class FullApplicationKeyAttributes { public static final String JSON_PROPERTY_SCOPES = "scopes"; private JsonNullable> scopes = JsonNullable.>undefined(); + /** - * Creation date of the application key. - * + *

Creation date of the application key.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } /** - * The application key. - * + *

The application key.

* @return key - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } /** - * The last four characters of the application key. - * + *

The last four characters of the application key.

* @return last4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLast4() { - return last4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLast4() { + return last4; + } public FullApplicationKeyAttributes name(String name) { this.name = name; return this; } /** - * Name of the application key. - * + *

Name of the application key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public FullApplicationKeyAttributes scopes(List scopes) { this.scopes = JsonNullable.>of(scopes); return this; } - public FullApplicationKeyAttributes addScopesItem(String scopesItem) { if (this.scopes == null || !this.scopes.isPresent()) { this.scopes = JsonNullable.>of(new ArrayList<>()); @@ -117,33 +131,30 @@ public FullApplicationKeyAttributes addScopesItem(String scopesItem) { } /** - * Array of scopes to grant the application key. This feature is in private beta, please contact - * Datadog support to enable scopes for your application keys. - * + *

Array of scopes to grant the application key. This feature is in private beta, please contact Datadog support to enable scopes for your application keys.

* @return scopes - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getScopes() { - return scopes.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getScopes() { + return scopes.orElse(null); + } @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getScopes_JsonNullable() { return scopes; } - - @JsonProperty(JSON_PROPERTY_SCOPES) - public void setScopes_JsonNullable(JsonNullable> scopes) { + @JsonProperty(JSON_PROPERTY_SCOPES)public void setScopes_JsonNullable(JsonNullable> scopes) { this.scopes = scopes; } - public void setScopes(List scopes) { this.scopes = JsonNullable.>of(scopes); } - /** Return true if this FullApplicationKeyAttributes object is equal to o. */ + /** + * Return true if this FullApplicationKeyAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -153,16 +164,13 @@ public boolean equals(Object o) { return false; } FullApplicationKeyAttributes fullApplicationKeyAttributes = (FullApplicationKeyAttributes) o; - return Objects.equals(this.createdAt, fullApplicationKeyAttributes.createdAt) - && Objects.equals(this.key, fullApplicationKeyAttributes.key) - && Objects.equals(this.last4, fullApplicationKeyAttributes.last4) - && Objects.equals(this.name, fullApplicationKeyAttributes.name) - && Objects.equals(this.scopes, fullApplicationKeyAttributes.scopes); + return Objects.equals(this.createdAt, fullApplicationKeyAttributes.createdAt) && Objects.equals(this.key, fullApplicationKeyAttributes.key) && Objects.equals(this.last4, fullApplicationKeyAttributes.last4) && Objects.equals(this.name, fullApplicationKeyAttributes.name) && Objects.equals(this.scopes, fullApplicationKeyAttributes.scopes); } + @Override public int hashCode() { - return Objects.hash(createdAt, key, last4, name, scopes); + return Objects.hash(createdAt,key,last4,name,scopes); } @Override @@ -179,7 +187,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/GroupScalarColumn.java b/src/main/java/com/datadog/api/client/v2/model/GroupScalarColumn.java index bbaac0e0698..3d6b695339f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GroupScalarColumn.java +++ b/src/main/java/com/datadog/api/client/v2/model/GroupScalarColumn.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A column containing the tag keys and values in a group. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A column containing the tag keys and values in a group.

+ */ @JsonPropertyOrder({ GroupScalarColumn.JSON_PROPERTY_NAME, GroupScalarColumn.JSON_PROPERTY_TYPE, GroupScalarColumn.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GroupScalarColumn { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -39,47 +57,42 @@ public GroupScalarColumn name(String name) { } /** - * The name of the tag key or group. - * + *

The name of the tag key or group.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public GroupScalarColumn type(String type) { this.type = type; return this; } /** - * The type of column present. - * + *

The type of column present.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - public GroupScalarColumn values(List> values) { this.values = values; return this; } - public GroupScalarColumn addValuesItem(List valuesItem) { if (this.values == null) { this.values = new ArrayList<>(); @@ -89,22 +102,23 @@ public GroupScalarColumn addValuesItem(List valuesItem) { } /** - * The array of tag values for each group found for the results of the formulas or queries. - * + *

The array of tag values for each group found for the results of the formulas or queries.

* @return values - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getValues() { - return values; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List> getValues() { + return values; + } public void setValues(List> values) { this.values = values; } - /** Return true if this GroupScalarColumn object is equal to o. */ + /** + * Return true if this GroupScalarColumn object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -114,14 +128,13 @@ public boolean equals(Object o) { return false; } GroupScalarColumn groupScalarColumn = (GroupScalarColumn) o; - return Objects.equals(this.name, groupScalarColumn.name) - && Objects.equals(this.type, groupScalarColumn.type) - && Objects.equals(this.values, groupScalarColumn.values); + return Objects.equals(this.name, groupScalarColumn.name) && Objects.equals(this.type, groupScalarColumn.type) && Objects.equals(this.values, groupScalarColumn.values); } + @Override public int hashCode() { - return Objects.hash(name, type, values); + return Objects.hash(name,type,values); } @Override @@ -136,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HTTPLogError.java b/src/main/java/com/datadog/api/client/v2/model/HTTPLogError.java index e59e39f5591..710efede6ca 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HTTPLogError.java +++ b/src/main/java/com/datadog/api/client/v2/model/HTTPLogError.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** List of errors. */ + +/** + *

List of errors.

+ */ @JsonPropertyOrder({ HTTPLogError.JSON_PROPERTY_DETAIL, HTTPLogError.JSON_PROPERTY_STATUS, HTTPLogError.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HTTPLogError { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DETAIL = "detail"; private String detail; @@ -37,64 +57,61 @@ public HTTPLogError detail(String detail) { } /** - * Error message. - * + *

Error message.

* @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } public void setDetail(String detail) { this.detail = detail; } - public HTTPLogError status(String status) { this.status = status; return this; } /** - * Error code. - * + *

Error code.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - public HTTPLogError title(String title) { this.title = title; return this; } /** - * Error title. - * + *

Error title.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this HTTPLogError object is equal to o. */ + /** + * Return true if this HTTPLogError object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } HTTPLogError httpLogError = (HTTPLogError) o; - return Objects.equals(this.detail, httpLogError.detail) - && Objects.equals(this.status, httpLogError.status) - && Objects.equals(this.title, httpLogError.title); + return Objects.equals(this.detail, httpLogError.detail) && Objects.equals(this.status, httpLogError.status) && Objects.equals(this.title, httpLogError.title); } + @Override public int hashCode() { - return Objects.hash(detail, status, title); + return Objects.hash(detail,status,title); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HTTPLogErrors.java b/src/main/java/com/datadog/api/client/v2/model/HTTPLogErrors.java index 9e8b653f05f..b44bad73a7a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HTTPLogErrors.java +++ b/src/main/java/com/datadog/api/client/v2/model/HTTPLogErrors.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Invalid query performed. */ -@JsonPropertyOrder({HTTPLogErrors.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Invalid query performed.

+ */ +@JsonPropertyOrder({ + HTTPLogErrors.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HTTPLogErrors { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERRORS = "errors"; private List errors = null; @@ -30,7 +50,6 @@ public HTTPLogErrors errors(List errors) { } return this; } - public HTTPLogErrors addErrorsItem(HTTPLogError errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -41,22 +60,23 @@ public HTTPLogErrors addErrorsItem(HTTPLogError errorsItem) { } /** - * Structured errors. - * + *

Structured errors.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this HTTPLogErrors object is equal to o. */ + /** + * Return true if this HTTPLogErrors object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.errors, httpLogErrors.errors); } + @Override public int hashCode() { return Objects.hash(errors); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HTTPLogItem.java b/src/main/java/com/datadog/api/client/v2/model/HTTPLogItem.java index 300641afa96..6366d6e470a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HTTPLogItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/HTTPLogItem.java @@ -6,6 +6,17 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,11 +24,15 @@ 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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Logs that are sent over HTTP. */ + +/** + *

Logs that are sent over HTTP.

+ */ @JsonPropertyOrder({ HTTPLogItem.JSON_PROPERTY_DDSOURCE, HTTPLogItem.JSON_PROPERTY_DDTAGS, @@ -25,10 +40,10 @@ HTTPLogItem.JSON_PROPERTY_MESSAGE, HTTPLogItem.JSON_PROPERTY_SERVICE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HTTPLogItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DDSOURCE = "ddsource"; private String ddsource; @@ -47,134 +62,121 @@ public class HTTPLogItem { public HTTPLogItem() {} @JsonCreator - public HTTPLogItem(@JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message) { - this.message = message; + public HTTPLogItem( + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message) { + this.message = message; } - public HTTPLogItem ddsource(String ddsource) { this.ddsource = ddsource; return this; } /** - * The integration name associated with your log: the technology from which the log originated. - * When it matches an integration name, Datadog automatically installs the corresponding parsers - * and facets. See reserved - * attributes. - * + *

The integration name associated with your log: the technology from which the log originated. + * When it matches an integration name, Datadog automatically installs the corresponding parsers and facets. + * See reserved attributes.

* @return ddsource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DDSOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDdsource() { - return ddsource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DDSOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDdsource() { + return ddsource; + } public void setDdsource(String ddsource) { this.ddsource = ddsource; } - public HTTPLogItem ddtags(String ddtags) { this.ddtags = ddtags; return this; } /** - * Tags associated with your logs. - * + *

Tags associated with your logs.

* @return ddtags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DDTAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDdtags() { - return ddtags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DDTAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDdtags() { + return ddtags; + } public void setDdtags(String ddtags) { this.ddtags = ddtags; } - public HTTPLogItem hostname(String hostname) { this.hostname = hostname; return this; } /** - * The name of the originating host of the log. - * + *

The name of the originating host of the log.

* @return hostname - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOSTNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHostname() { - return hostname; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHostname() { + return hostname; + } public void setHostname(String hostname) { this.hostname = hostname; } - public HTTPLogItem message(String message) { this.message = message; return this; } /** - * The message reserved - * attribute of your log. By default, Datadog ingests the value of the message attribute as - * the body of the log entry. That value is then highlighted and displayed in the Logstream, where - * it is indexed for full text search. - * + *

The message reserved attribute + * of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. + * That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public HTTPLogItem service(String service) { this.service = service; return this; } /** - * The name of the application or service generating the log events. It is used to switch from - * Logs to APM, so make sure you define the same value when you use both products. See reserved - * attributes. - * + *

The name of the application or service generating the log events. + * It is used to switch from Logs to APM, so make sure you define the same value when you use both products. + * See reserved attributes.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. + * 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. + * 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 @@ -183,7 +185,7 @@ public void setService(String service) { @JsonAnySetter public HTTPLogItem putAdditionalProperty(String key, String value) { if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + this.additionalProperties = new HashMap(); } this.additionalProperties.put(key, value); return this; @@ -207,12 +209,14 @@ public Map getAdditionalProperties() { */ public String getAdditionalProperty(String key) { if (this.additionalProperties == null) { - return null; + return null; } return this.additionalProperties.get(key); } - /** Return true if this HTTPLogItem object is equal to o. */ + /** + * Return true if this HTTPLogItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -222,17 +226,13 @@ public boolean equals(Object o) { return false; } HTTPLogItem httpLogItem = (HTTPLogItem) o; - return Objects.equals(this.ddsource, httpLogItem.ddsource) - && Objects.equals(this.ddtags, httpLogItem.ddtags) - && Objects.equals(this.hostname, httpLogItem.hostname) - && Objects.equals(this.message, httpLogItem.message) - && Objects.equals(this.service, httpLogItem.service) - && Objects.equals(this.additionalProperties, httpLogItem.additionalProperties); + return Objects.equals(this.ddsource, httpLogItem.ddsource) && Objects.equals(this.ddtags, httpLogItem.ddtags) && Objects.equals(this.hostname, httpLogItem.hostname) && Objects.equals(this.message, httpLogItem.message) && Objects.equals(this.service, httpLogItem.service) && Objects.equals(this.additionalProperties, httpLogItem.additionalProperties); } + @Override public int hashCode() { - return Objects.hash(ddsource, ddtags, hostname, message, service, additionalProperties); + return Objects.hash(ddsource,ddtags,hostname,message,service, additionalProperties); } @Override @@ -252,7 +252,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsage.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsage.java index 47767ad36aa..64f4379f770 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsage.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsage.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Hourly usage for a product family for an org. */ + +/** + *

Hourly usage for a product family for an org.

+ */ @JsonPropertyOrder({ HourlyUsage.JSON_PROPERTY_ATTRIBUTES, HourlyUsage.JSON_PROPERTY_ID, HourlyUsage.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private HourlyUsageAttributes attributes; @@ -38,42 +58,38 @@ public HourlyUsage attributes(HourlyUsageAttributes attributes) { } /** - * Attributes of hourly usage for a product family for an org for a time period. - * + *

Attributes of hourly usage for a product family for an org for a time period.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsageAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsageAttributes getAttributes() { + return attributes; + } public void setAttributes(HourlyUsageAttributes attributes) { this.attributes = attributes; } - public HourlyUsage id(String id) { this.id = id; return this; } /** - * Unique ID of the response. - * + *

Unique ID of the response.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public HourlyUsage type(UsageTimeSeriesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public HourlyUsage type(UsageTimeSeriesType type) { } /** - * Type of usage data. - * + *

Type of usage data.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageTimeSeriesType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageTimeSeriesType getType() { + return type; + } public void setType(UsageTimeSeriesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this HourlyUsage object is equal to o. */ + /** + * Return true if this HourlyUsage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } HourlyUsage hourlyUsage = (HourlyUsage) o; - return Objects.equals(this.attributes, hourlyUsage.attributes) - && Objects.equals(this.id, hourlyUsage.id) - && Objects.equals(this.type, hourlyUsage.type); + return Objects.equals(this.attributes, hourlyUsage.attributes) && Objects.equals(this.id, hourlyUsage.id) && Objects.equals(this.type, hourlyUsage.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageAttributes.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageAttributes.java index 82fd70a8243..feedf5c83ad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageAttributes.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of hourly usage for a product family for an org for a time period. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of hourly usage for a product family for an org for a time period.

+ */ @JsonPropertyOrder({ HourlyUsageAttributes.JSON_PROPERTY_MEASUREMENTS, HourlyUsageAttributes.JSON_PROPERTY_ORG_NAME, @@ -26,10 +41,10 @@ HourlyUsageAttributes.JSON_PROPERTY_REGION, HourlyUsageAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MEASUREMENTS = "measurements"; private List measurements = null; @@ -46,7 +61,6 @@ public class HourlyUsageAttributes { private String region; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -57,7 +71,6 @@ public HourlyUsageAttributes measurements(List measureme } return this; } - public HourlyUsageAttributes addMeasurementsItem(HourlyUsageMeasurement measurementsItem) { if (this.measurements == null) { this.measurements = new ArrayList<>(); @@ -68,127 +81,118 @@ public HourlyUsageAttributes addMeasurementsItem(HourlyUsageMeasurement measurem } /** - * List of the measured usage values for the product family for the org for the time period. - * + *

List of the measured usage values for the product family for the org for the time period.

* @return measurements - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MEASUREMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMeasurements() { - return measurements; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEASUREMENTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMeasurements() { + return measurements; + } public void setMeasurements(List measurements) { this.measurements = measurements; } - public HourlyUsageAttributes orgName(String orgName) { this.orgName = orgName; return this; } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public HourlyUsageAttributes productFamily(String productFamily) { this.productFamily = productFamily; return this; } /** - * The product for which usage is being reported. - * + *

The product for which usage is being reported.

* @return productFamily - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRODUCT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProductFamily() { - return productFamily; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_FAMILY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProductFamily() { + return productFamily; + } public void setProductFamily(String productFamily) { this.productFamily = productFamily; } - public HourlyUsageAttributes publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public HourlyUsageAttributes region(String region) { this.region = region; return this; } /** - * The region of the Datadog instance that the organization belongs to. - * + *

The region of the Datadog instance that the organization belongs to.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } public void setRegion(String region) { this.region = region; } - public HourlyUsageAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * Datetime in ISO-8601 format, UTC. The hour for the usage. - * + *

Datetime in ISO-8601 format, UTC. The hour for the usage.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this HourlyUsageAttributes object is equal to o. */ + /** + * Return true if this HourlyUsageAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -198,17 +202,13 @@ public boolean equals(Object o) { return false; } HourlyUsageAttributes hourlyUsageAttributes = (HourlyUsageAttributes) o; - return Objects.equals(this.measurements, hourlyUsageAttributes.measurements) - && Objects.equals(this.orgName, hourlyUsageAttributes.orgName) - && Objects.equals(this.productFamily, hourlyUsageAttributes.productFamily) - && Objects.equals(this.publicId, hourlyUsageAttributes.publicId) - && Objects.equals(this.region, hourlyUsageAttributes.region) - && Objects.equals(this.timestamp, hourlyUsageAttributes.timestamp); + return Objects.equals(this.measurements, hourlyUsageAttributes.measurements) && Objects.equals(this.orgName, hourlyUsageAttributes.orgName) && Objects.equals(this.productFamily, hourlyUsageAttributes.productFamily) && Objects.equals(this.publicId, hourlyUsageAttributes.publicId) && Objects.equals(this.region, hourlyUsageAttributes.region) && Objects.equals(this.timestamp, hourlyUsageAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(measurements, orgName, productFamily, publicId, region, timestamp); + return Objects.hash(measurements,orgName,productFamily,publicId,region,timestamp); } @Override @@ -226,7 +226,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMeasurement.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMeasurement.java index 90bb505a24b..e0e2a470966 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMeasurement.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMeasurement.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Usage amount for a given usage type. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Usage amount for a given usage type.

+ */ @JsonPropertyOrder({ HourlyUsageMeasurement.JSON_PROPERTY_USAGE_TYPE, HourlyUsageMeasurement.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageMeasurement { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USAGE_TYPE = "usage_type"; private String usageType; @@ -34,53 +53,49 @@ public HourlyUsageMeasurement usageType(String usageType) { } /** - * Type of usage. - * + *

Type of usage.

* @return usageType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUsageType() { - return usageType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUsageType() { + return usageType; + } public void setUsageType(String usageType) { this.usageType = usageType; } - public HourlyUsageMeasurement value(Long value) { this.value = JsonNullable.of(value); return this; } /** - * Contains the number measured for the given usage_type during the hour. - * + *

Contains the number measured for the given usage_type during the hour.

* @return value - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getValue() { - return value.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getValue() { + return value.orElse(null); + } @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getValue_JsonNullable() { return value; } - - @JsonProperty(JSON_PROPERTY_VALUE) - public void setValue_JsonNullable(JsonNullable value) { + @JsonProperty(JSON_PROPERTY_VALUE)public void setValue_JsonNullable(JsonNullable value) { this.value = value; } - public void setValue(Long value) { this.value = JsonNullable.of(value); } - /** Return true if this HourlyUsageMeasurement object is equal to o. */ + /** + * Return true if this HourlyUsageMeasurement object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,13 +105,13 @@ public boolean equals(Object o) { return false; } HourlyUsageMeasurement hourlyUsageMeasurement = (HourlyUsageMeasurement) o; - return Objects.equals(this.usageType, hourlyUsageMeasurement.usageType) - && Objects.equals(this.value, hourlyUsageMeasurement.value); + return Objects.equals(this.usageType, hourlyUsageMeasurement.usageType) && Objects.equals(this.value, hourlyUsageMeasurement.value); } + @Override public int hashCode() { - return Objects.hash(usageType, value); + return Objects.hash(usageType,value); } @Override @@ -110,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMetadata.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMetadata.java index f77c3979c4b..159c32bc2be 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageMetadata.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object containing document metadata. */ -@JsonPropertyOrder({HourlyUsageMetadata.JSON_PROPERTY_PAGINATION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object containing document metadata.

+ */ +@JsonPropertyOrder({ + HourlyUsageMetadata.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGINATION = "pagination"; private HourlyUsagePagination pagination; @@ -28,22 +50,23 @@ public HourlyUsageMetadata pagination(HourlyUsagePagination pagination) { } /** - * The metadata for the current pagination. - * + *

The metadata for the current pagination.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsagePagination getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsagePagination getPagination() { + return pagination; + } public void setPagination(HourlyUsagePagination pagination) { this.pagination = pagination; } - /** Return true if this HourlyUsageMetadata object is equal to o. */ + /** + * Return true if this HourlyUsageMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.pagination, hourlyUsageMetadata.pagination); } + @Override public int hashCode() { return Objects.hash(pagination); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsagePagination.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsagePagination.java index 0eb6b123005..a484661f1ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsagePagination.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsagePagination.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The metadata for the current pagination. */ -@JsonPropertyOrder({HourlyUsagePagination.JSON_PROPERTY_NEXT_RECORD_ID}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata for the current pagination.

+ */ +@JsonPropertyOrder({ + HourlyUsagePagination.JSON_PROPERTY_NEXT_RECORD_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsagePagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT_RECORD_ID = "next_record_id"; private JsonNullable nextRecordId = JsonNullable.undefined(); @@ -28,33 +49,30 @@ public HourlyUsagePagination nextRecordId(String nextRecordId) { } /** - * The cursor to get the next results (if any). To make the next request, use the same parameters - * and add next_record_id. - * + *

The cursor to get the next results (if any). To make the next request, use the same parameters and add next_record_id.

* @return nextRecordId - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getNextRecordId() { - return nextRecordId.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextRecordId() { + return nextRecordId.orElse(null); + } @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getNextRecordId_JsonNullable() { return nextRecordId; } - - @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID) - public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { + @JsonProperty(JSON_PROPERTY_NEXT_RECORD_ID)public void setNextRecordId_JsonNullable(JsonNullable nextRecordId) { this.nextRecordId = nextRecordId; } - public void setNextRecordId(String nextRecordId) { this.nextRecordId = JsonNullable.of(nextRecordId); } - /** Return true if this HourlyUsagePagination object is equal to o. */ + /** + * Return true if this HourlyUsagePagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -67,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.nextRecordId, hourlyUsagePagination.nextRecordId); } + @Override public int hashCode() { return Objects.hash(nextRecordId); @@ -82,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageResponse.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageResponse.java index 66c4f3e8e39..c9dac371d0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Hourly usage response. */ -@JsonPropertyOrder({HourlyUsageResponse.JSON_PROPERTY_DATA, HourlyUsageResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Hourly usage response.

+ */ +@JsonPropertyOrder({ + HourlyUsageResponse.JSON_PROPERTY_DATA, + HourlyUsageResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HourlyUsageResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -33,7 +54,6 @@ public HourlyUsageResponse data(List data) { } return this; } - public HourlyUsageResponse addDataItem(HourlyUsage dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -44,21 +64,19 @@ public HourlyUsageResponse addDataItem(HourlyUsage dataItem) { } /** - * Response containing hourly usage. - * + *

Response containing hourly usage.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public HourlyUsageResponse meta(HourlyUsageMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -66,22 +84,23 @@ public HourlyUsageResponse meta(HourlyUsageMetadata meta) { } /** - * The object containing document metadata. - * + *

The object containing document metadata.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsageMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsageMetadata getMeta() { + return meta; + } public void setMeta(HourlyUsageMetadata meta) { this.meta = meta; } - /** Return true if this HourlyUsageResponse object is equal to o. */ + /** + * Return true if this HourlyUsageResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +110,13 @@ public boolean equals(Object o) { return false; } HourlyUsageResponse hourlyUsageResponse = (HourlyUsageResponse) o; - return Objects.equals(this.data, hourlyUsageResponse.data) - && Objects.equals(this.meta, hourlyUsageResponse.meta); + return Objects.equals(this.data, hourlyUsageResponse.data) && Objects.equals(this.meta, hourlyUsageResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -111,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageType.java b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageType.java index c3fef5bf952..ace1ad7f3b5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HourlyUsageType.java +++ b/src/main/java/com/datadog/api/client/v2/model/HourlyUsageType.java @@ -6,36 +6,52 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Usage type that is being measured. */ +/** + *

Usage type that is being measured.

+ */ @JsonSerialize(using = HourlyUsageType.HourlyUsageTypeSerializer.class) public class HourlyUsageType { - public static final HourlyUsageType APP_SEC_HOST_COUNT = - new HourlyUsageType("app_sec_host_count"); - public static final HourlyUsageType OBSERVABILITY_PIPELINES_BYTES_PROCESSSED = - new HourlyUsageType("observability_pipelines_bytes_processed"); - public static final HourlyUsageType LAMBDA_TRACED_INVOCATIONS_COUNT = - new HourlyUsageType("lambda_traced_invocations_count"); + public static final HourlyUsageType APP_SEC_HOST_COUNT = new HourlyUsageType("app_sec_host_count"); + public static final HourlyUsageType OBSERVABILITY_PIPELINES_BYTES_PROCESSSED = new HourlyUsageType("observability_pipelines_bytes_processed"); + public static final HourlyUsageType LAMBDA_TRACED_INVOCATIONS_COUNT = new HourlyUsageType("lambda_traced_invocations_count"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "app_sec_host_count", - "observability_pipelines_bytes_processed", - "lambda_traced_invocations_count")); + private static final Set allowedValues = new HashSet(Arrays.asList("app_sec_host_count", "observability_pipelines_bytes_processed", "lambda_traced_invocations_count")); private String value; @@ -48,19 +64,18 @@ public boolean isValid() { } public static class HourlyUsageTypeSerializer extends StdSerializer { - public HourlyUsageTypeSerializer(Class t) { - super(t); - } - - public HourlyUsageTypeSerializer() { - this(null); - } - - @Override - public void serialize(HourlyUsageType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public HourlyUsageTypeSerializer(Class t) { + super(t); + } + + public HourlyUsageTypeSerializer() { + this(null); + } + + @Override + public void serialize(HourlyUsageType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -72,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this HourlyUsageType object is equal to o. */ + /** + * Return true if this HourlyUsageType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistAttributes.java index 9bf88a213b1..c8ee59d9162 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistAttributes.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes of the IP allowlist. */ +/** + *

Attributes of the IP allowlist.

+ */ @JsonPropertyOrder({ IPAllowlistAttributes.JSON_PROPERTY_ENABLED, IPAllowlistAttributes.JSON_PROPERTY_ENTRIES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; @@ -35,21 +53,19 @@ public IPAllowlistAttributes enabled(Boolean enabled) { } /** - * Whether the IP allowlist logic is enabled or not. - * + *

Whether the IP allowlist logic is enabled or not.

* @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public IPAllowlistAttributes entries(List entries) { this.entries = entries; for (IPAllowlistEntry item : entries) { @@ -57,7 +73,6 @@ public IPAllowlistAttributes entries(List entries) { } return this; } - public IPAllowlistAttributes addEntriesItem(IPAllowlistEntry entriesItem) { if (this.entries == null) { this.entries = new ArrayList<>(); @@ -68,22 +83,23 @@ public IPAllowlistAttributes addEntriesItem(IPAllowlistEntry entriesItem) { } /** - * Array of entries in the IP allowlist. - * + *

Array of entries in the IP allowlist.

* @return entries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENTRIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEntries() { - return entries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENTRIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEntries() { + return entries; + } public void setEntries(List entries) { this.entries = entries; } - /** Return true if this IPAllowlistAttributes object is equal to o. */ + /** + * Return true if this IPAllowlistAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +109,13 @@ public boolean equals(Object o) { return false; } IPAllowlistAttributes ipAllowlistAttributes = (IPAllowlistAttributes) o; - return Objects.equals(this.enabled, ipAllowlistAttributes.enabled) - && Objects.equals(this.entries, ipAllowlistAttributes.entries); + return Objects.equals(this.enabled, ipAllowlistAttributes.enabled) && Objects.equals(this.entries, ipAllowlistAttributes.entries); } + @Override public int hashCode() { - return Objects.hash(enabled, entries); + return Objects.hash(enabled,entries); } @Override @@ -113,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistData.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistData.java index cab83d90e01..71e73d7f413 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** IP allowlist data. */ + +/** + *

IP allowlist data.

+ */ @JsonPropertyOrder({ IPAllowlistData.JSON_PROPERTY_ATTRIBUTES, IPAllowlistData.JSON_PROPERTY_ID, IPAllowlistData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IPAllowlistAttributes attributes; @@ -36,11 +55,10 @@ public IPAllowlistData() {} @JsonCreator public IPAllowlistData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IPAllowlistType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IPAllowlistType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IPAllowlistData attributes(IPAllowlistAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,42 +66,38 @@ public IPAllowlistData attributes(IPAllowlistAttributes attributes) { } /** - * Attributes of the IP allowlist. - * + *

Attributes of the IP allowlist.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPAllowlistAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPAllowlistAttributes getAttributes() { + return attributes; + } public void setAttributes(IPAllowlistAttributes attributes) { this.attributes = attributes; } - public IPAllowlistData id(String id) { this.id = id; return this; } /** - * The unique identifier of the org. - * + *

The unique identifier of the org.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public IPAllowlistData type(IPAllowlistType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -91,24 +105,25 @@ public IPAllowlistData type(IPAllowlistType type) { } /** - * IP allowlist type. - * + *

IP allowlist type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IPAllowlistType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IPAllowlistType getType() { + return type; + } public void setType(IPAllowlistType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IPAllowlistData object is equal to o. */ + /** + * Return true if this IPAllowlistData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +133,13 @@ public boolean equals(Object o) { return false; } IPAllowlistData ipAllowlistData = (IPAllowlistData) o; - return Objects.equals(this.attributes, ipAllowlistData.attributes) - && Objects.equals(this.id, ipAllowlistData.id) - && Objects.equals(this.type, ipAllowlistData.type); + return Objects.equals(this.attributes, ipAllowlistData.attributes) && Objects.equals(this.id, ipAllowlistData.id) && Objects.equals(this.type, ipAllowlistData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -140,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntry.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntry.java index 7e5c8028ef2..8649676354e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntry.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntry.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** IP allowlist entry object. */ -@JsonPropertyOrder({IPAllowlistEntry.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

IP allowlist entry object.

+ */ +@JsonPropertyOrder({ + IPAllowlistEntry.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistEntry { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IPAllowlistEntryData data; @@ -26,11 +47,10 @@ public IPAllowlistEntry() {} @JsonCreator public IPAllowlistEntry( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IPAllowlistEntryData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IPAllowlistEntryData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IPAllowlistEntry data(IPAllowlistEntryData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IPAllowlistEntry data(IPAllowlistEntryData data) { } /** - * Data of the IP allowlist entry object. - * + *

Data of the IP allowlist entry object.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IPAllowlistEntryData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IPAllowlistEntryData getData() { + return data; + } public void setData(IPAllowlistEntryData data) { this.data = data; } - /** Return true if this IPAllowlistEntry object is equal to o. */ + /** + * Return true if this IPAllowlistEntry object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, ipAllowlistEntry.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryAttributes.java index 5838dfed0d1..c6d86fc803a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryAttributes.java @@ -6,36 +6,51 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of the IP allowlist entry. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of the IP allowlist entry.

+ */ @JsonPropertyOrder({ IPAllowlistEntryAttributes.JSON_PROPERTY_CIDR_BLOCK, IPAllowlistEntryAttributes.JSON_PROPERTY_CREATED_AT, IPAllowlistEntryAttributes.JSON_PROPERTY_MODIFIED_AT, IPAllowlistEntryAttributes.JSON_PROPERTY_NOTE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistEntryAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CIDR_BLOCK = "cidr_block"; private String cidrBlock; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -48,67 +63,66 @@ public IPAllowlistEntryAttributes cidrBlock(String cidrBlock) { } /** - * The CIDR block describing the IP range of the entry. - * + *

The CIDR block describing the IP range of the entry.

* @return cidrBlock - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CIDR_BLOCK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCidrBlock() { - return cidrBlock; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CIDR_BLOCK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCidrBlock() { + return cidrBlock; + } public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; } /** - * Creation time of the entry. - * + *

Creation time of the entry.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } /** - * Time of last entry modification. - * + *

Time of last entry modification.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public IPAllowlistEntryAttributes note(String note) { this.note = note; return this; } /** - * A note describing the IP allowlist entry. - * + *

A note describing the IP allowlist entry.

* @return note - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNote() { - return note; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNote() { + return note; + } public void setNote(String note) { this.note = note; } - /** Return true if this IPAllowlistEntryAttributes object is equal to o. */ + /** + * Return true if this IPAllowlistEntryAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,15 +132,13 @@ public boolean equals(Object o) { return false; } IPAllowlistEntryAttributes ipAllowlistEntryAttributes = (IPAllowlistEntryAttributes) o; - return Objects.equals(this.cidrBlock, ipAllowlistEntryAttributes.cidrBlock) - && Objects.equals(this.createdAt, ipAllowlistEntryAttributes.createdAt) - && Objects.equals(this.modifiedAt, ipAllowlistEntryAttributes.modifiedAt) - && Objects.equals(this.note, ipAllowlistEntryAttributes.note); + return Objects.equals(this.cidrBlock, ipAllowlistEntryAttributes.cidrBlock) && Objects.equals(this.createdAt, ipAllowlistEntryAttributes.createdAt) && Objects.equals(this.modifiedAt, ipAllowlistEntryAttributes.modifiedAt) && Objects.equals(this.note, ipAllowlistEntryAttributes.note); } + @Override public int hashCode() { - return Objects.hash(cidrBlock, createdAt, modifiedAt, note); + return Objects.hash(cidrBlock,createdAt,modifiedAt,note); } @Override @@ -142,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryData.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryData.java index f739099bdc5..67887a8be92 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data of the IP allowlist entry object. */ + +/** + *

Data of the IP allowlist entry object.

+ */ @JsonPropertyOrder({ IPAllowlistEntryData.JSON_PROPERTY_ATTRIBUTES, IPAllowlistEntryData.JSON_PROPERTY_ID, IPAllowlistEntryData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistEntryData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IPAllowlistEntryAttributes attributes; @@ -36,11 +55,10 @@ public IPAllowlistEntryData() {} @JsonCreator public IPAllowlistEntryData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IPAllowlistEntryType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IPAllowlistEntryType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IPAllowlistEntryData attributes(IPAllowlistEntryAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,42 +66,38 @@ public IPAllowlistEntryData attributes(IPAllowlistEntryAttributes attributes) { } /** - * Attributes of the IP allowlist entry. - * + *

Attributes of the IP allowlist entry.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPAllowlistEntryAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPAllowlistEntryAttributes getAttributes() { + return attributes; + } public void setAttributes(IPAllowlistEntryAttributes attributes) { this.attributes = attributes; } - public IPAllowlistEntryData id(String id) { this.id = id; return this; } /** - * The unique identifier of the IP allowlist entry. - * + *

The unique identifier of the IP allowlist entry.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public IPAllowlistEntryData type(IPAllowlistEntryType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -91,24 +105,25 @@ public IPAllowlistEntryData type(IPAllowlistEntryType type) { } /** - * IP allowlist Entry type. - * + *

IP allowlist Entry type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IPAllowlistEntryType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IPAllowlistEntryType getType() { + return type; + } public void setType(IPAllowlistEntryType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IPAllowlistEntryData object is equal to o. */ + /** + * Return true if this IPAllowlistEntryData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +133,13 @@ public boolean equals(Object o) { return false; } IPAllowlistEntryData ipAllowlistEntryData = (IPAllowlistEntryData) o; - return Objects.equals(this.attributes, ipAllowlistEntryData.attributes) - && Objects.equals(this.id, ipAllowlistEntryData.id) - && Objects.equals(this.type, ipAllowlistEntryData.type); + return Objects.equals(this.attributes, ipAllowlistEntryData.attributes) && Objects.equals(this.id, ipAllowlistEntryData.id) && Objects.equals(this.type, ipAllowlistEntryData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -140,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryType.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryType.java index 65b982e1c47..5b15958f661 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistEntryType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** IP allowlist Entry type. */ +/** + *

IP allowlist Entry type.

+ */ @JsonSerialize(using = IPAllowlistEntryType.IPAllowlistEntryTypeSerializer.class) public class IPAllowlistEntryType { - public static final IPAllowlistEntryType IP_ALLOWLIST_ENTRY = - new IPAllowlistEntryType("ip_allowlist_entry"); + public static final IPAllowlistEntryType IP_ALLOWLIST_ENTRY = new IPAllowlistEntryType("ip_allowlist_entry"); - private static final Set allowedValues = - new HashSet(Arrays.asList("ip_allowlist_entry")); + private static final Set allowedValues = new HashSet(Arrays.asList("ip_allowlist_entry")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class IPAllowlistEntryTypeSerializer extends StdSerializer { - public IPAllowlistEntryTypeSerializer(Class t) { - super(t); - } - - public IPAllowlistEntryTypeSerializer() { - this(null); - } - - @Override - public void serialize( - IPAllowlistEntryType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public IPAllowlistEntryTypeSerializer(Class t) { + super(t); + } + + public IPAllowlistEntryTypeSerializer() { + this(null); + } + + @Override + public void serialize(IPAllowlistEntryType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IPAllowlistEntryType object is equal to o. */ + /** + * Return true if this IPAllowlistEntryType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistResponse.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistResponse.java index 3b72a245a87..3ae0d4b50ba 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response containing information about the IP allowlist. */ -@JsonPropertyOrder({IPAllowlistResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response containing information about the IP allowlist.

+ */ +@JsonPropertyOrder({ + IPAllowlistResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IPAllowlistData data; @@ -28,22 +50,23 @@ public IPAllowlistResponse data(IPAllowlistData data) { } /** - * IP allowlist data. - * + *

IP allowlist data.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPAllowlistData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IPAllowlistData getData() { + return data; + } public void setData(IPAllowlistData data) { this.data = data; } - /** Return true if this IPAllowlistResponse object is equal to o. */ + /** + * Return true if this IPAllowlistResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, ipAllowlistResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistType.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistType.java index 65c370b6fae..e6e9199d07b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** IP allowlist type. */ +/** + *

IP allowlist type.

+ */ @JsonSerialize(using = IPAllowlistType.IPAllowlistTypeSerializer.class) public class IPAllowlistType { public static final IPAllowlistType IP_ALLOWLIST = new IPAllowlistType("ip_allowlist"); - private static final Set allowedValues = - new HashSet(Arrays.asList("ip_allowlist")); + private static final Set allowedValues = new HashSet(Arrays.asList("ip_allowlist")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class IPAllowlistTypeSerializer extends StdSerializer { - public IPAllowlistTypeSerializer(Class t) { - super(t); - } - - public IPAllowlistTypeSerializer() { - this(null); - } - - @Override - public void serialize(IPAllowlistType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public IPAllowlistTypeSerializer(Class t) { + super(t); + } + + public IPAllowlistTypeSerializer() { + this(null); + } + + @Override + public void serialize(IPAllowlistType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IPAllowlistType object is equal to o. */ + /** + * Return true if this IPAllowlistType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistUpdateRequest.java index 283860a2b36..bbd32ca9973 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IPAllowlistUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IPAllowlistUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update the IP allowlist. */ -@JsonPropertyOrder({IPAllowlistUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update the IP allowlist.

+ */ +@JsonPropertyOrder({ + IPAllowlistUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IPAllowlistUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IPAllowlistData data; @@ -26,11 +47,10 @@ public IPAllowlistUpdateRequest() {} @JsonCreator public IPAllowlistUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IPAllowlistData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IPAllowlistData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IPAllowlistUpdateRequest data(IPAllowlistData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IPAllowlistUpdateRequest data(IPAllowlistData data) { } /** - * IP allowlist data. - * + *

IP allowlist data.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IPAllowlistData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IPAllowlistData getData() { + return data; + } public void setData(IPAllowlistData data) { this.data = data; } - /** Return true if this IPAllowlistUpdateRequest object is equal to o. */ + /** + * Return true if this IPAllowlistUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, ipAllowlistUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IdPMetadataFormData.java b/src/main/java/com/datadog/api/client/v2/model/IdPMetadataFormData.java index d8559ff08fa..348c4623b50 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IdPMetadataFormData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IdPMetadataFormData.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.io.File; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The form data submitted to upload IdP metadata */ -@JsonPropertyOrder({IdPMetadataFormData.JSON_PROPERTY_IDP_FILE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The form data submitted to upload IdP metadata

+ */ +@JsonPropertyOrder({ + IdPMetadataFormData.JSON_PROPERTY_IDP_FILE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IdPMetadataFormData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_IDP_FILE = "idp_file"; private File idpFile; @@ -28,22 +49,23 @@ public IdPMetadataFormData idpFile(File idpFile) { } /** - * The IdP metadata XML file - * + *

The IdP metadata XML file

* @return idpFile - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IDP_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getIdpFile() { - return idpFile; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDP_FILE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public File getIdpFile() { + return idpFile; + } public void setIdpFile(File idpFile) { this.idpFile = idpFile; } - /** Return true if this IdPMetadataFormData object is equal to o. */ + /** + * Return true if this IdPMetadataFormData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.idpFile, idPMetadataFormData.idpFile); } + @Override public int hashCode() { return Objects.hash(idpFile); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttachmentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttachmentType.java index ad5dc5b8c1b..06ade63d596 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttachmentType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttachmentType.java @@ -6,31 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the incident attachment attributes. */ -@JsonSerialize( - using = IncidentAttachmentAttachmentType.IncidentAttachmentAttachmentTypeSerializer.class) +/** + *

The type of the incident attachment attributes.

+ */ +@JsonSerialize(using = IncidentAttachmentAttachmentType.IncidentAttachmentAttachmentTypeSerializer.class) public class IncidentAttachmentAttachmentType { - public static final IncidentAttachmentAttachmentType LINK = - new IncidentAttachmentAttachmentType("link"); - public static final IncidentAttachmentAttachmentType POSTMORTEM = - new IncidentAttachmentAttachmentType("postmortem"); + public static final IncidentAttachmentAttachmentType LINK = new IncidentAttachmentAttachmentType("link"); + public static final IncidentAttachmentAttachmentType POSTMORTEM = new IncidentAttachmentAttachmentType("postmortem"); - private static final Set allowedValues = - new HashSet(Arrays.asList("link", "postmortem")); + private static final Set allowedValues = new HashSet(Arrays.asList("link", "postmortem")); private String value; @@ -42,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentAttachmentAttachmentTypeSerializer - extends StdSerializer { - public IncidentAttachmentAttachmentTypeSerializer(Class t) { - super(t); - } + public static class IncidentAttachmentAttachmentTypeSerializer extends StdSerializer { + public IncidentAttachmentAttachmentTypeSerializer(Class t) { + super(t); + } - public IncidentAttachmentAttachmentTypeSerializer() { - this(null); - } + public IncidentAttachmentAttachmentTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentAttachmentAttachmentType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentAttachmentAttachmentType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentAttachmentAttachmentType object is equal to o. */ + /** + * Return true if this IncidentAttachmentAttachmentType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttributes.java index 0f2f89edfa7..ef5290effb7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentAttributes.java @@ -6,296 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = IncidentAttachmentAttributes.IncidentAttachmentAttributesDeserializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentAttachmentAttributes.IncidentAttachmentAttributesDeserializer.class) @JsonSerialize(using = IncidentAttachmentAttributes.IncidentAttachmentAttributesSerializer.class) public class IncidentAttachmentAttributes extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IncidentAttachmentAttributes.class.getName()); + private static final Logger log = Logger.getLogger(IncidentAttachmentAttributes.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class IncidentAttachmentAttributesSerializer extends StdSerializer { + public IncidentAttachmentAttributesSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public IncidentAttachmentAttributesSerializer() { + this(null); + } - public static class IncidentAttachmentAttributesSerializer - extends StdSerializer { - public IncidentAttachmentAttributesSerializer(Class t) { - super(t); + @Override + public void serialize(IncidentAttachmentAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentAttachmentAttributesSerializer() { - this(null); + public static class IncidentAttachmentAttributesDeserializer extends StdDeserializer { + public IncidentAttachmentAttributesDeserializer() { + this(IncidentAttachmentAttributes.class); + } + + public IncidentAttachmentAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentAttachmentAttributes 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 IncidentAttachmentPostmortemAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) || IncidentAttachmentPostmortemAttributes.class.equals(Long.class) || IncidentAttachmentPostmortemAttributes.class.equals(Float.class) || IncidentAttachmentPostmortemAttributes.class.equals(Double.class) || IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) || IncidentAttachmentPostmortemAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) || IncidentAttachmentPostmortemAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentAttachmentPostmortemAttributes.class.equals(Float.class) || IncidentAttachmentPostmortemAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentAttachmentPostmortemAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentPostmortemAttributes.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 (!((IncidentAttachmentPostmortemAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentPostmortemAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentAttachmentPostmortemAttributes'", e); + } + + // deserialize IncidentAttachmentLinkAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentAttachmentLinkAttributes.class.equals(Integer.class) || IncidentAttachmentLinkAttributes.class.equals(Long.class) || IncidentAttachmentLinkAttributes.class.equals(Float.class) || IncidentAttachmentLinkAttributes.class.equals(Double.class) || IncidentAttachmentLinkAttributes.class.equals(Boolean.class) || IncidentAttachmentLinkAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentAttachmentLinkAttributes.class.equals(Integer.class) || IncidentAttachmentLinkAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentAttachmentLinkAttributes.class.equals(Float.class) || IncidentAttachmentLinkAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentAttachmentLinkAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentAttachmentLinkAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentLinkAttributes.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 (!((IncidentAttachmentLinkAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentLinkAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentAttachmentLinkAttributes'", e); + } + + IncidentAttachmentAttributes ret = new IncidentAttachmentAttributes(); + 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 IncidentAttachmentAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentAttachmentAttributes cannot be null"); + } } - @Override - public void serialize( - IncidentAttachmentAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentAttachmentAttributes() { + super("oneOf", Boolean.FALSE); + } + public IncidentAttachmentAttributes(IncidentAttachmentPostmortemAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public IncidentAttachmentAttributes(IncidentAttachmentLinkAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentAttachmentAttributesDeserializer - extends StdDeserializer { - public IncidentAttachmentAttributesDeserializer() { - this(IncidentAttachmentAttributes.class); + static { + schemas.put("IncidentAttachmentPostmortemAttributes", new GenericType() { + }); + schemas.put("IncidentAttachmentLinkAttributes", new GenericType() { + }); + JSON.registerDescendants(IncidentAttachmentAttributes.class, Collections.unmodifiableMap(schemas)); } - public IncidentAttachmentAttributesDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentAttachmentAttributes.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentAttachmentAttributes 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 IncidentAttachmentPostmortemAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Long.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Float.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Double.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) - || IncidentAttachmentPostmortemAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentAttachmentPostmortemAttributes.class.equals(Float.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentAttachmentPostmortemAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IncidentAttachmentPostmortemAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(IncidentAttachmentPostmortemAttributes.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 (!((IncidentAttachmentPostmortemAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'IncidentAttachmentPostmortemAttributes'"); + if (JSON.isInstanceOf(IncidentAttachmentLinkAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'IncidentAttachmentPostmortemAttributes'", - e); - } - // deserialize IncidentAttachmentLinkAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentAttachmentLinkAttributes.class.equals(Integer.class) - || IncidentAttachmentLinkAttributes.class.equals(Long.class) - || IncidentAttachmentLinkAttributes.class.equals(Float.class) - || IncidentAttachmentLinkAttributes.class.equals(Double.class) - || IncidentAttachmentLinkAttributes.class.equals(Boolean.class) - || IncidentAttachmentLinkAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentAttachmentLinkAttributes.class.equals(Integer.class) - || IncidentAttachmentLinkAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentAttachmentLinkAttributes.class.equals(Float.class) - || IncidentAttachmentLinkAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentAttachmentLinkAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentAttachmentLinkAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentLinkAttributes.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 (!((IncidentAttachmentLinkAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentLinkAttributes'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'IncidentAttachmentLinkAttributes'", e); - } - - IncidentAttachmentAttributes ret = new IncidentAttachmentAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes + * + * @return The actual instance (IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes) + */ @Override - public IncidentAttachmentAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentAttachmentAttributes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentAttachmentAttributes() { - super("oneOf", Boolean.FALSE); - } - - public IncidentAttachmentAttributes(IncidentAttachmentPostmortemAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public IncidentAttachmentAttributes(IncidentAttachmentLinkAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "IncidentAttachmentPostmortemAttributes", - new GenericType() {}); - schemas.put( - "IncidentAttachmentLinkAttributes", new GenericType() {}); - JSON.registerDescendants( - IncidentAttachmentAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentAttachmentAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: IncidentAttachmentPostmortemAttributes, - * IncidentAttachmentLinkAttributes - * - *

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( - IncidentAttachmentPostmortemAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - IncidentAttachmentLinkAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentAttachmentPostmortemAttributes`. If the actual instance is not `IncidentAttachmentPostmortemAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentAttachmentPostmortemAttributes` + * @throws ClassCastException if the instance is not `IncidentAttachmentPostmortemAttributes` + */ + public IncidentAttachmentPostmortemAttributes getIncidentAttachmentPostmortemAttributes() throws ClassCastException { + return (IncidentAttachmentPostmortemAttributes)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentAttachmentLinkAttributes`. If the actual instance is not `IncidentAttachmentLinkAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentAttachmentLinkAttributes` + * @throws ClassCastException if the instance is not `IncidentAttachmentLinkAttributes` + */ + public IncidentAttachmentLinkAttributes getIncidentAttachmentLinkAttributes() throws ClassCastException { + return (IncidentAttachmentLinkAttributes)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be IncidentAttachmentPostmortemAttributes," - + " IncidentAttachmentLinkAttributes"); - } - - /** - * Get the actual instance, which can be the following: IncidentAttachmentPostmortemAttributes, - * IncidentAttachmentLinkAttributes - * - * @return The actual instance (IncidentAttachmentPostmortemAttributes, - * IncidentAttachmentLinkAttributes) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentAttachmentPostmortemAttributes`. If the actual instance is - * not `IncidentAttachmentPostmortemAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentAttachmentPostmortemAttributes` - * @throws ClassCastException if the instance is not `IncidentAttachmentPostmortemAttributes` - */ - public IncidentAttachmentPostmortemAttributes getIncidentAttachmentPostmortemAttributes() - throws ClassCastException { - return (IncidentAttachmentPostmortemAttributes) super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentAttachmentLinkAttributes`. If the actual instance is not - * `IncidentAttachmentLinkAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentAttachmentLinkAttributes` - * @throws ClassCastException if the instance is not `IncidentAttachmentLinkAttributes` - */ - public IncidentAttachmentLinkAttributes getIncidentAttachmentLinkAttributes() - throws ClassCastException { - return (IncidentAttachmentLinkAttributes) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentData.java index 72c6cb0acf2..4b7e84ffe3d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A single incident attachment. */ +/** + *

A single incident attachment.

+ */ @JsonPropertyOrder({ IncidentAttachmentData.JSON_PROPERTY_ATTRIBUTES, IncidentAttachmentData.JSON_PROPERTY_ID, IncidentAttachmentData.JSON_PROPERTY_RELATIONSHIPS, IncidentAttachmentData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentAttachmentAttributes attributes; @@ -40,21 +59,18 @@ public IncidentAttachmentData() {} @JsonCreator public IncidentAttachmentData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - IncidentAttachmentAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) - IncidentAttachmentRelationships relationships, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentAttachmentType 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(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)IncidentAttachmentAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_RELATIONSHIPS)IncidentAttachmentRelationships relationships, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentAttachmentType 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 IncidentAttachmentData attributes(IncidentAttachmentAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -62,40 +78,36 @@ public IncidentAttachmentData attributes(IncidentAttachmentAttributes attributes } /** - * The attributes object for an attachment. - * + *

The attributes object for an attachment.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentAttachmentAttributes attributes) { this.attributes = attributes; } - public IncidentAttachmentData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the incident attachment. - * + *

A unique identifier that represents the incident attachment.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public IncidentAttachmentData relationships(IncidentAttachmentRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -103,20 +115,18 @@ public IncidentAttachmentData relationships(IncidentAttachmentRelationships rela } /** - * The incident attachment's relationships. - * + *

The incident attachment's relationships.

* @return relationships - */ - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentRelationships getRelationships() { - return relationships; - } - + **/ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentRelationships getRelationships() { + return relationships; + } public void setRelationships(IncidentAttachmentRelationships relationships) { this.relationships = relationships; } - public IncidentAttachmentData type(IncidentAttachmentType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -124,24 +134,25 @@ public IncidentAttachmentData type(IncidentAttachmentType type) { } /** - * The incident attachment resource type. - * + *

The incident attachment resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentType getType() { + return type; + } public void setType(IncidentAttachmentType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentAttachmentData object is equal to o. */ + /** + * Return true if this IncidentAttachmentData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -151,15 +162,13 @@ public boolean equals(Object o) { return false; } IncidentAttachmentData incidentAttachmentData = (IncidentAttachmentData) o; - return Objects.equals(this.attributes, incidentAttachmentData.attributes) - && Objects.equals(this.id, incidentAttachmentData.id) - && Objects.equals(this.relationships, incidentAttachmentData.relationships) - && Objects.equals(this.type, incidentAttachmentData.type); + return Objects.equals(this.attributes, incidentAttachmentData.attributes) && Objects.equals(this.id, incidentAttachmentData.id) && Objects.equals(this.relationships, incidentAttachmentData.relationships) && Objects.equals(this.type, incidentAttachmentData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -175,7 +184,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttachmentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttachmentType.java index 3587eeb9563..f4f4e00e90b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttachmentType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttachmentType.java @@ -6,27 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of link attachment attributes. */ -@JsonSerialize( - using = - IncidentAttachmentLinkAttachmentType.IncidentAttachmentLinkAttachmentTypeSerializer.class) +/** + *

The type of link attachment attributes.

+ */ +@JsonSerialize(using = IncidentAttachmentLinkAttachmentType.IncidentAttachmentLinkAttachmentTypeSerializer.class) public class IncidentAttachmentLinkAttachmentType { - public static final IncidentAttachmentLinkAttachmentType LINK = - new IncidentAttachmentLinkAttachmentType("link"); + public static final IncidentAttachmentLinkAttachmentType LINK = new IncidentAttachmentLinkAttachmentType("link"); private static final Set allowedValues = new HashSet(Arrays.asList("link")); @@ -40,23 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentAttachmentLinkAttachmentTypeSerializer - extends StdSerializer { - public IncidentAttachmentLinkAttachmentTypeSerializer( - Class t) { - super(t); - } + public static class IncidentAttachmentLinkAttachmentTypeSerializer extends StdSerializer { + public IncidentAttachmentLinkAttachmentTypeSerializer(Class t) { + super(t); + } - public IncidentAttachmentLinkAttachmentTypeSerializer() { - this(null); - } + public IncidentAttachmentLinkAttachmentTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentAttachmentLinkAttachmentType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentAttachmentLinkAttachmentType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentAttachmentLinkAttachmentType object is equal to o. */ + /** + * Return true if this IncidentAttachmentLinkAttachmentType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributes.java index 151297859a2..69c1d6d20b0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributes.java @@ -6,91 +6,103 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attributes object for a link attachment. */ + +/** + *

The attributes object for a link attachment.

+ */ @JsonPropertyOrder({ IncidentAttachmentLinkAttributes.JSON_PROPERTY_ATTACHMENT, IncidentAttachmentLinkAttributes.JSON_PROPERTY_ATTACHMENT_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentLinkAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTACHMENT = "attachment"; private IncidentAttachmentLinkAttributesAttachmentObject attachment; public static final String JSON_PROPERTY_ATTACHMENT_TYPE = "attachment_type"; - private IncidentAttachmentLinkAttachmentType attachmentType = - IncidentAttachmentLinkAttachmentType.LINK; + private IncidentAttachmentLinkAttachmentType attachmentType = IncidentAttachmentLinkAttachmentType.LINK; public IncidentAttachmentLinkAttributes() {} @JsonCreator public IncidentAttachmentLinkAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTACHMENT) - IncidentAttachmentLinkAttributesAttachmentObject attachment, - @JsonProperty(required = true, value = JSON_PROPERTY_ATTACHMENT_TYPE) - IncidentAttachmentLinkAttachmentType attachmentType) { - this.attachment = attachment; - this.unparsed |= attachment.unparsed; - this.attachmentType = attachmentType; - this.unparsed |= !attachmentType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTACHMENT)IncidentAttachmentLinkAttributesAttachmentObject attachment, + @JsonProperty(required=true, value=JSON_PROPERTY_ATTACHMENT_TYPE)IncidentAttachmentLinkAttachmentType attachmentType) { + this.attachment = attachment; + this.unparsed |= attachment.unparsed; + this.attachmentType = attachmentType; + this.unparsed |= !attachmentType.isValid(); } - - public IncidentAttachmentLinkAttributes attachment( - IncidentAttachmentLinkAttributesAttachmentObject attachment) { + public IncidentAttachmentLinkAttributes attachment(IncidentAttachmentLinkAttributesAttachmentObject attachment) { this.attachment = attachment; this.unparsed |= attachment.unparsed; return this; } /** - * The link attachment. - * + *

The link attachment.

* @return attachment - */ - @JsonProperty(JSON_PROPERTY_ATTACHMENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentLinkAttributesAttachmentObject getAttachment() { - return attachment; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTACHMENT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentLinkAttributesAttachmentObject getAttachment() { + return attachment; + } public void setAttachment(IncidentAttachmentLinkAttributesAttachmentObject attachment) { this.attachment = attachment; } - - public IncidentAttachmentLinkAttributes attachmentType( - IncidentAttachmentLinkAttachmentType attachmentType) { + public IncidentAttachmentLinkAttributes attachmentType(IncidentAttachmentLinkAttachmentType attachmentType) { this.attachmentType = attachmentType; this.unparsed |= !attachmentType.isValid(); return this; } /** - * The type of link attachment attributes. - * + *

The type of link attachment attributes.

* @return attachmentType - */ - @JsonProperty(JSON_PROPERTY_ATTACHMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentLinkAttachmentType getAttachmentType() { - return attachmentType; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTACHMENT_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentLinkAttachmentType getAttachmentType() { + return attachmentType; + } public void setAttachmentType(IncidentAttachmentLinkAttachmentType attachmentType) { if (!attachmentType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.attachmentType = attachmentType; } - /** Return true if this IncidentAttachmentLinkAttributes object is equal to o. */ + /** + * Return true if this IncidentAttachmentLinkAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentLinkAttributes incidentAttachmentLinkAttributes = - (IncidentAttachmentLinkAttributes) o; - return Objects.equals(this.attachment, incidentAttachmentLinkAttributes.attachment) - && Objects.equals(this.attachmentType, incidentAttachmentLinkAttributes.attachmentType); + IncidentAttachmentLinkAttributes incidentAttachmentLinkAttributes = (IncidentAttachmentLinkAttributes) o; + return Objects.equals(this.attachment, incidentAttachmentLinkAttributes.attachment) && Objects.equals(this.attachmentType, incidentAttachmentLinkAttributes.attachmentType); } + @Override public int hashCode() { - return Objects.hash(attachment, attachmentType); + return Objects.hash(attachment,attachmentType); } @Override @@ -121,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributesAttachmentObject.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributesAttachmentObject.java index 1495320b32e..44aaea06256 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributesAttachmentObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentLinkAttributesAttachmentObject.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The link attachment. */ + +/** + *

The link attachment.

+ */ @JsonPropertyOrder({ IncidentAttachmentLinkAttributesAttachmentObject.JSON_PROPERTY_DOCUMENT_URL, IncidentAttachmentLinkAttributesAttachmentObject.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentLinkAttributesAttachmentObject { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DOCUMENT_URL = "documentUrl"; private String documentUrl; @@ -32,53 +51,51 @@ public IncidentAttachmentLinkAttributesAttachmentObject() {} @JsonCreator public IncidentAttachmentLinkAttributesAttachmentObject( - @JsonProperty(required = true, value = JSON_PROPERTY_DOCUMENT_URL) String documentUrl, - @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { - this.documentUrl = documentUrl; - this.title = title; + @JsonProperty(required=true, value=JSON_PROPERTY_DOCUMENT_URL)String documentUrl, + @JsonProperty(required=true, value=JSON_PROPERTY_TITLE)String title) { + this.documentUrl = documentUrl; + this.title = title; } - public IncidentAttachmentLinkAttributesAttachmentObject documentUrl(String documentUrl) { this.documentUrl = documentUrl; return this; } /** - * The URL of this link attachment. - * + *

The URL of this link attachment.

* @return documentUrl - */ - @JsonProperty(JSON_PROPERTY_DOCUMENT_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDocumentUrl() { - return documentUrl; - } - + **/ + @JsonProperty(JSON_PROPERTY_DOCUMENT_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDocumentUrl() { + return documentUrl; + } public void setDocumentUrl(String documentUrl) { this.documentUrl = documentUrl; } - public IncidentAttachmentLinkAttributesAttachmentObject title(String title) { this.title = title; return this; } /** - * The title of this link attachment. - * + *

The title of this link attachment.

* @return title - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - + **/ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this IncidentAttachmentLinkAttributesAttachmentObject object is equal to o. */ + /** + * Return true if this IncidentAttachmentLinkAttributesAttachmentObject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,17 +104,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentLinkAttributesAttachmentObject - incidentAttachmentLinkAttributesAttachmentObject = - (IncidentAttachmentLinkAttributesAttachmentObject) o; - return Objects.equals( - this.documentUrl, incidentAttachmentLinkAttributesAttachmentObject.documentUrl) - && Objects.equals(this.title, incidentAttachmentLinkAttributesAttachmentObject.title); + IncidentAttachmentLinkAttributesAttachmentObject incidentAttachmentLinkAttributesAttachmentObject = (IncidentAttachmentLinkAttributesAttachmentObject) o; + return Objects.equals(this.documentUrl, incidentAttachmentLinkAttributesAttachmentObject.documentUrl) && Objects.equals(this.title, incidentAttachmentLinkAttributesAttachmentObject.title); } + @Override public int hashCode() { - return Objects.hash(documentUrl, title); + return Objects.hash(documentUrl,title); } @Override @@ -111,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttachmentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttachmentType.java index ec2de8bc4ae..df3380adea3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttachmentType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttachmentType.java @@ -6,28 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of postmortem attachment attributes. */ -@JsonSerialize( - using = - IncidentAttachmentPostmortemAttachmentType - .IncidentAttachmentPostmortemAttachmentTypeSerializer.class) +/** + *

The type of postmortem attachment attributes.

+ */ +@JsonSerialize(using = IncidentAttachmentPostmortemAttachmentType.IncidentAttachmentPostmortemAttachmentTypeSerializer.class) public class IncidentAttachmentPostmortemAttachmentType { - public static final IncidentAttachmentPostmortemAttachmentType POSTMORTEM = - new IncidentAttachmentPostmortemAttachmentType("postmortem"); + public static final IncidentAttachmentPostmortemAttachmentType POSTMORTEM = new IncidentAttachmentPostmortemAttachmentType("postmortem"); private static final Set allowedValues = new HashSet(Arrays.asList("postmortem")); @@ -41,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentAttachmentPostmortemAttachmentTypeSerializer - extends StdSerializer { - public IncidentAttachmentPostmortemAttachmentTypeSerializer( - Class t) { - super(t); - } + public static class IncidentAttachmentPostmortemAttachmentTypeSerializer extends StdSerializer { + public IncidentAttachmentPostmortemAttachmentTypeSerializer(Class t) { + super(t); + } - public IncidentAttachmentPostmortemAttachmentTypeSerializer() { - this(null); - } + public IncidentAttachmentPostmortemAttachmentTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentAttachmentPostmortemAttachmentType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentAttachmentPostmortemAttachmentType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentAttachmentPostmortemAttachmentType object is equal to o. */ + /** + * Return true if this IncidentAttachmentPostmortemAttachmentType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttributes.java index 55c412ea4bd..9f98999c2c6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentPostmortemAttributes.java @@ -6,91 +6,103 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attributes object for a postmortem attachment. */ + +/** + *

The attributes object for a postmortem attachment.

+ */ @JsonPropertyOrder({ IncidentAttachmentPostmortemAttributes.JSON_PROPERTY_ATTACHMENT, IncidentAttachmentPostmortemAttributes.JSON_PROPERTY_ATTACHMENT_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentPostmortemAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTACHMENT = "attachment"; private IncidentAttachmentsPostmortemAttributesAttachmentObject attachment; public static final String JSON_PROPERTY_ATTACHMENT_TYPE = "attachment_type"; - private IncidentAttachmentPostmortemAttachmentType attachmentType = - IncidentAttachmentPostmortemAttachmentType.POSTMORTEM; + private IncidentAttachmentPostmortemAttachmentType attachmentType = IncidentAttachmentPostmortemAttachmentType.POSTMORTEM; public IncidentAttachmentPostmortemAttributes() {} @JsonCreator public IncidentAttachmentPostmortemAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTACHMENT) - IncidentAttachmentsPostmortemAttributesAttachmentObject attachment, - @JsonProperty(required = true, value = JSON_PROPERTY_ATTACHMENT_TYPE) - IncidentAttachmentPostmortemAttachmentType attachmentType) { - this.attachment = attachment; - this.unparsed |= attachment.unparsed; - this.attachmentType = attachmentType; - this.unparsed |= !attachmentType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTACHMENT)IncidentAttachmentsPostmortemAttributesAttachmentObject attachment, + @JsonProperty(required=true, value=JSON_PROPERTY_ATTACHMENT_TYPE)IncidentAttachmentPostmortemAttachmentType attachmentType) { + this.attachment = attachment; + this.unparsed |= attachment.unparsed; + this.attachmentType = attachmentType; + this.unparsed |= !attachmentType.isValid(); } - - public IncidentAttachmentPostmortemAttributes attachment( - IncidentAttachmentsPostmortemAttributesAttachmentObject attachment) { + public IncidentAttachmentPostmortemAttributes attachment(IncidentAttachmentsPostmortemAttributesAttachmentObject attachment) { this.attachment = attachment; this.unparsed |= attachment.unparsed; return this; } /** - * The postmortem attachment. - * + *

The postmortem attachment.

* @return attachment - */ - @JsonProperty(JSON_PROPERTY_ATTACHMENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentsPostmortemAttributesAttachmentObject getAttachment() { - return attachment; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTACHMENT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentsPostmortemAttributesAttachmentObject getAttachment() { + return attachment; + } public void setAttachment(IncidentAttachmentsPostmortemAttributesAttachmentObject attachment) { this.attachment = attachment; } - - public IncidentAttachmentPostmortemAttributes attachmentType( - IncidentAttachmentPostmortemAttachmentType attachmentType) { + public IncidentAttachmentPostmortemAttributes attachmentType(IncidentAttachmentPostmortemAttachmentType attachmentType) { this.attachmentType = attachmentType; this.unparsed |= !attachmentType.isValid(); return this; } /** - * The type of postmortem attachment attributes. - * + *

The type of postmortem attachment attributes.

* @return attachmentType - */ - @JsonProperty(JSON_PROPERTY_ATTACHMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentPostmortemAttachmentType getAttachmentType() { - return attachmentType; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTACHMENT_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentPostmortemAttachmentType getAttachmentType() { + return attachmentType; + } public void setAttachmentType(IncidentAttachmentPostmortemAttachmentType attachmentType) { if (!attachmentType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.attachmentType = attachmentType; } - /** Return true if this IncidentAttachmentPostmortemAttributes object is equal to o. */ + /** + * Return true if this IncidentAttachmentPostmortemAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,16 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentPostmortemAttributes incidentAttachmentPostmortemAttributes = - (IncidentAttachmentPostmortemAttributes) o; - return Objects.equals(this.attachment, incidentAttachmentPostmortemAttributes.attachment) - && Objects.equals( - this.attachmentType, incidentAttachmentPostmortemAttributes.attachmentType); + IncidentAttachmentPostmortemAttributes incidentAttachmentPostmortemAttributes = (IncidentAttachmentPostmortemAttributes) o; + return Objects.equals(this.attachment, incidentAttachmentPostmortemAttributes.attachment) && Objects.equals(this.attachmentType, incidentAttachmentPostmortemAttributes.attachmentType); } + @Override public int hashCode() { - return Objects.hash(attachment, attachmentType); + return Objects.hash(attachment,attachmentType); } @Override @@ -122,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelatedObject.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelatedObject.java index 77d8e3519f6..554538ae3f4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelatedObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelatedObject.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The object related to an incident attachment. */ -@JsonSerialize( - using = IncidentAttachmentRelatedObject.IncidentAttachmentRelatedObjectSerializer.class) +/** + *

The object related to an incident attachment.

+ */ +@JsonSerialize(using = IncidentAttachmentRelatedObject.IncidentAttachmentRelatedObjectSerializer.class) public class IncidentAttachmentRelatedObject { - public static final IncidentAttachmentRelatedObject USERS = - new IncidentAttachmentRelatedObject("users"); + public static final IncidentAttachmentRelatedObject USERS = new IncidentAttachmentRelatedObject("users"); private static final Set allowedValues = new HashSet(Arrays.asList("users")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentAttachmentRelatedObjectSerializer - extends StdSerializer { - public IncidentAttachmentRelatedObjectSerializer(Class t) { - super(t); - } + public static class IncidentAttachmentRelatedObjectSerializer extends StdSerializer { + public IncidentAttachmentRelatedObjectSerializer(Class t) { + super(t); + } - public IncidentAttachmentRelatedObjectSerializer() { - this(null); - } + public IncidentAttachmentRelatedObjectSerializer() { + this(null); + } - @Override - public void serialize( - IncidentAttachmentRelatedObject value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentAttachmentRelatedObject value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentAttachmentRelatedObject object is equal to o. */ + /** + * Return true if this IncidentAttachmentRelatedObject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelationships.java index 5546eff3930..31c27852382 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentRelationships.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The incident attachment's relationships. */ -@JsonPropertyOrder({IncidentAttachmentRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The incident attachment's relationships.

+ */ +@JsonPropertyOrder({ + IncidentAttachmentRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; private RelationshipToUser lastModifiedByUser; @@ -28,22 +50,23 @@ public IncidentAttachmentRelationships lastModifiedByUser(RelationshipToUser las } /** - * Relationship to user. - * + *

Relationship to user.

* @return lastModifiedByUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getLastModifiedByUser() { - return lastModifiedByUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { this.lastModifiedByUser = lastModifiedByUser; } - /** Return true if this IncidentAttachmentRelationships object is equal to o. */ + /** + * Return true if this IncidentAttachmentRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,12 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentRelationships incidentAttachmentRelationships = - (IncidentAttachmentRelationships) o; - return Objects.equals( - this.lastModifiedByUser, incidentAttachmentRelationships.lastModifiedByUser); + IncidentAttachmentRelationships incidentAttachmentRelationships = (IncidentAttachmentRelationships) o; + return Objects.equals(this.lastModifiedByUser, incidentAttachmentRelationships.lastModifiedByUser); } + @Override public int hashCode() { return Objects.hash(lastModifiedByUser); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentType.java index 941bbc5d849..d20508a850b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The incident attachment resource type. */ +/** + *

The incident attachment resource type.

+ */ @JsonSerialize(using = IncidentAttachmentType.IncidentAttachmentTypeSerializer.class) public class IncidentAttachmentType { - public static final IncidentAttachmentType INCIDENT_ATTACHMENTS = - new IncidentAttachmentType("incident_attachments"); + public static final IncidentAttachmentType INCIDENT_ATTACHMENTS = new IncidentAttachmentType("incident_attachments"); - private static final Set allowedValues = - new HashSet(Arrays.asList("incident_attachments")); + private static final Set allowedValues = new HashSet(Arrays.asList("incident_attachments")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentAttachmentTypeSerializer - extends StdSerializer { - public IncidentAttachmentTypeSerializer(Class t) { - super(t); - } + public static class IncidentAttachmentTypeSerializer extends StdSerializer { + public IncidentAttachmentTypeSerializer(Class t) { + super(t); + } - public IncidentAttachmentTypeSerializer() { - this(null); - } + public IncidentAttachmentTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentAttachmentType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentAttachmentType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentAttachmentType object is equal to o. */ + /** + * Return true if this IncidentAttachmentType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateAttributes.java index 7a789d53197..be5b31515ec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateAttributes.java @@ -6,299 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = IncidentAttachmentUpdateAttributes.IncidentAttachmentUpdateAttributesDeserializer.class) -@JsonSerialize( - using = IncidentAttachmentUpdateAttributes.IncidentAttachmentUpdateAttributesSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentAttachmentUpdateAttributes.IncidentAttachmentUpdateAttributesDeserializer.class) +@JsonSerialize(using = IncidentAttachmentUpdateAttributes.IncidentAttachmentUpdateAttributesSerializer.class) public class IncidentAttachmentUpdateAttributes extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(IncidentAttachmentUpdateAttributes.class.getName()); + private static final Logger log = Logger.getLogger(IncidentAttachmentUpdateAttributes.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class IncidentAttachmentUpdateAttributesSerializer extends StdSerializer { + public IncidentAttachmentUpdateAttributesSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public IncidentAttachmentUpdateAttributesSerializer() { + this(null); + } - public static class IncidentAttachmentUpdateAttributesSerializer - extends StdSerializer { - public IncidentAttachmentUpdateAttributesSerializer( - Class t) { - super(t); + @Override + public void serialize(IncidentAttachmentUpdateAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentAttachmentUpdateAttributesSerializer() { - this(null); + public static class IncidentAttachmentUpdateAttributesDeserializer extends StdDeserializer { + public IncidentAttachmentUpdateAttributesDeserializer() { + this(IncidentAttachmentUpdateAttributes.class); + } + + public IncidentAttachmentUpdateAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentAttachmentUpdateAttributes 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 IncidentAttachmentPostmortemAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) || IncidentAttachmentPostmortemAttributes.class.equals(Long.class) || IncidentAttachmentPostmortemAttributes.class.equals(Float.class) || IncidentAttachmentPostmortemAttributes.class.equals(Double.class) || IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) || IncidentAttachmentPostmortemAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) || IncidentAttachmentPostmortemAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentAttachmentPostmortemAttributes.class.equals(Float.class) || IncidentAttachmentPostmortemAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentAttachmentPostmortemAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentPostmortemAttributes.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 (!((IncidentAttachmentPostmortemAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentPostmortemAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentAttachmentPostmortemAttributes'", e); + } + + // deserialize IncidentAttachmentLinkAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentAttachmentLinkAttributes.class.equals(Integer.class) || IncidentAttachmentLinkAttributes.class.equals(Long.class) || IncidentAttachmentLinkAttributes.class.equals(Float.class) || IncidentAttachmentLinkAttributes.class.equals(Double.class) || IncidentAttachmentLinkAttributes.class.equals(Boolean.class) || IncidentAttachmentLinkAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentAttachmentLinkAttributes.class.equals(Integer.class) || IncidentAttachmentLinkAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentAttachmentLinkAttributes.class.equals(Float.class) || IncidentAttachmentLinkAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentAttachmentLinkAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentAttachmentLinkAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentLinkAttributes.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 (!((IncidentAttachmentLinkAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentLinkAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentAttachmentLinkAttributes'", e); + } + + IncidentAttachmentUpdateAttributes ret = new IncidentAttachmentUpdateAttributes(); + 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 IncidentAttachmentUpdateAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentAttachmentUpdateAttributes cannot be null"); + } } - @Override - public void serialize( - IncidentAttachmentUpdateAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentAttachmentUpdateAttributes() { + super("oneOf", Boolean.FALSE); + } + public IncidentAttachmentUpdateAttributes(IncidentAttachmentPostmortemAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public IncidentAttachmentUpdateAttributes(IncidentAttachmentLinkAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentAttachmentUpdateAttributesDeserializer - extends StdDeserializer { - public IncidentAttachmentUpdateAttributesDeserializer() { - this(IncidentAttachmentUpdateAttributes.class); + static { + schemas.put("IncidentAttachmentPostmortemAttributes", new GenericType() { + }); + schemas.put("IncidentAttachmentLinkAttributes", new GenericType() { + }); + JSON.registerDescendants(IncidentAttachmentUpdateAttributes.class, Collections.unmodifiableMap(schemas)); } - public IncidentAttachmentUpdateAttributesDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentAttachmentUpdateAttributes.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentAttachmentUpdateAttributes 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 IncidentAttachmentPostmortemAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Long.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Float.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Double.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) - || IncidentAttachmentPostmortemAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentAttachmentPostmortemAttributes.class.equals(Integer.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentAttachmentPostmortemAttributes.class.equals(Float.class) - || IncidentAttachmentPostmortemAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentAttachmentPostmortemAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentAttachmentPostmortemAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IncidentAttachmentPostmortemAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(IncidentAttachmentPostmortemAttributes.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 (!((IncidentAttachmentPostmortemAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'IncidentAttachmentPostmortemAttributes'"); + if (JSON.isInstanceOf(IncidentAttachmentLinkAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'IncidentAttachmentPostmortemAttributes'", - e); - } - // deserialize IncidentAttachmentLinkAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentAttachmentLinkAttributes.class.equals(Integer.class) - || IncidentAttachmentLinkAttributes.class.equals(Long.class) - || IncidentAttachmentLinkAttributes.class.equals(Float.class) - || IncidentAttachmentLinkAttributes.class.equals(Double.class) - || IncidentAttachmentLinkAttributes.class.equals(Boolean.class) - || IncidentAttachmentLinkAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentAttachmentLinkAttributes.class.equals(Integer.class) - || IncidentAttachmentLinkAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentAttachmentLinkAttributes.class.equals(Float.class) - || IncidentAttachmentLinkAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentAttachmentLinkAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentAttachmentLinkAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentLinkAttributes.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 (!((IncidentAttachmentLinkAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentLinkAttributes'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'IncidentAttachmentLinkAttributes'", e); - } - - IncidentAttachmentUpdateAttributes ret = new IncidentAttachmentUpdateAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes + * + * @return The actual instance (IncidentAttachmentPostmortemAttributes, IncidentAttachmentLinkAttributes) + */ @Override - public IncidentAttachmentUpdateAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentAttachmentUpdateAttributes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentAttachmentUpdateAttributes() { - super("oneOf", Boolean.FALSE); - } - - public IncidentAttachmentUpdateAttributes(IncidentAttachmentPostmortemAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public IncidentAttachmentUpdateAttributes(IncidentAttachmentLinkAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "IncidentAttachmentPostmortemAttributes", - new GenericType() {}); - schemas.put( - "IncidentAttachmentLinkAttributes", new GenericType() {}); - JSON.registerDescendants( - IncidentAttachmentUpdateAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentAttachmentUpdateAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: IncidentAttachmentPostmortemAttributes, - * IncidentAttachmentLinkAttributes - * - *

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( - IncidentAttachmentPostmortemAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - IncidentAttachmentLinkAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentAttachmentPostmortemAttributes`. If the actual instance is not `IncidentAttachmentPostmortemAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentAttachmentPostmortemAttributes` + * @throws ClassCastException if the instance is not `IncidentAttachmentPostmortemAttributes` + */ + public IncidentAttachmentPostmortemAttributes getIncidentAttachmentPostmortemAttributes() throws ClassCastException { + return (IncidentAttachmentPostmortemAttributes)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentAttachmentLinkAttributes`. If the actual instance is not `IncidentAttachmentLinkAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentAttachmentLinkAttributes` + * @throws ClassCastException if the instance is not `IncidentAttachmentLinkAttributes` + */ + public IncidentAttachmentLinkAttributes getIncidentAttachmentLinkAttributes() throws ClassCastException { + return (IncidentAttachmentLinkAttributes)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be IncidentAttachmentPostmortemAttributes," - + " IncidentAttachmentLinkAttributes"); - } - - /** - * Get the actual instance, which can be the following: IncidentAttachmentPostmortemAttributes, - * IncidentAttachmentLinkAttributes - * - * @return The actual instance (IncidentAttachmentPostmortemAttributes, - * IncidentAttachmentLinkAttributes) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentAttachmentPostmortemAttributes`. If the actual instance is - * not `IncidentAttachmentPostmortemAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentAttachmentPostmortemAttributes` - * @throws ClassCastException if the instance is not `IncidentAttachmentPostmortemAttributes` - */ - public IncidentAttachmentPostmortemAttributes getIncidentAttachmentPostmortemAttributes() - throws ClassCastException { - return (IncidentAttachmentPostmortemAttributes) super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentAttachmentLinkAttributes`. If the actual instance is not - * `IncidentAttachmentLinkAttributes`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentAttachmentLinkAttributes` - * @throws ClassCastException if the instance is not `IncidentAttachmentLinkAttributes` - */ - public IncidentAttachmentLinkAttributes getIncidentAttachmentLinkAttributes() - throws ClassCastException { - return (IncidentAttachmentLinkAttributes) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateData.java index d21acbd396a..cd6185f7e7b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A single incident attachment. */ + +/** + *

A single incident attachment.

+ */ @JsonPropertyOrder({ IncidentAttachmentUpdateData.JSON_PROPERTY_ATTRIBUTES, IncidentAttachmentUpdateData.JSON_PROPERTY_ID, IncidentAttachmentUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentAttachmentUpdateAttributes attributes; @@ -36,11 +55,10 @@ public IncidentAttachmentUpdateData() {} @JsonCreator public IncidentAttachmentUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentAttachmentType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentAttachmentType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentAttachmentUpdateData attributes(IncidentAttachmentUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,42 +66,38 @@ public IncidentAttachmentUpdateData attributes(IncidentAttachmentUpdateAttribute } /** - * Incident attachment attributes. - * + *

Incident attachment attributes.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentAttachmentUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentAttachmentUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentAttachmentUpdateAttributes attributes) { this.attributes = attributes; } - public IncidentAttachmentUpdateData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the incident attachment. - * + *

A unique identifier that represents the incident attachment.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public IncidentAttachmentUpdateData type(IncidentAttachmentType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -91,24 +105,25 @@ public IncidentAttachmentUpdateData type(IncidentAttachmentType type) { } /** - * The incident attachment resource type. - * + *

The incident attachment resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentType getType() { + return type; + } public void setType(IncidentAttachmentType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentAttachmentUpdateData object is equal to o. */ + /** + * Return true if this IncidentAttachmentUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +133,13 @@ public boolean equals(Object o) { return false; } IncidentAttachmentUpdateData incidentAttachmentUpdateData = (IncidentAttachmentUpdateData) o; - return Objects.equals(this.attributes, incidentAttachmentUpdateData.attributes) - && Objects.equals(this.id, incidentAttachmentUpdateData.id) - && Objects.equals(this.type, incidentAttachmentUpdateData.type); + return Objects.equals(this.attributes, incidentAttachmentUpdateData.attributes) && Objects.equals(this.id, incidentAttachmentUpdateData.id) && Objects.equals(this.type, incidentAttachmentUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -140,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateRequest.java index d6167ed0182..de60e2f1903 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateRequest.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The update request for an incident's attachments. */ -@JsonPropertyOrder({IncidentAttachmentUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The update request for an incident's attachments.

+ */ +@JsonPropertyOrder({ + IncidentAttachmentUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public IncidentAttachmentUpdateRequest() {} @JsonCreator public IncidentAttachmentUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public IncidentAttachmentUpdateRequest data(List data) { this.data = data; for (IncidentAttachmentUpdateData item : data) { @@ -40,7 +57,6 @@ public IncidentAttachmentUpdateRequest data(List d } return this; } - public IncidentAttachmentUpdateRequest addDataItem(IncidentAttachmentUpdateData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -48,24 +64,25 @@ public IncidentAttachmentUpdateRequest addDataItem(IncidentAttachmentUpdateData } /** - * An array of incident attachments. An attachment object without an "id" key indicates that you - * want to create that attachment. An attachment object without an "attributes" key indicates that - * you want to delete that attachment. An attachment object with both the "id" key and a populated - * "attributes" object indicates that you want to update that attachment. - * + *

An array of incident attachments. An attachment object without an "id" key indicates that you want to + * create that attachment. An attachment object without an "attributes" key indicates that you want to + * delete that attachment. An attachment object with both the "id" key and a populated "attributes" object + * indicates that you want to update that attachment.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this IncidentAttachmentUpdateRequest object is equal to o. */ + /** + * Return true if this IncidentAttachmentUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -74,11 +91,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentUpdateRequest incidentAttachmentUpdateRequest = - (IncidentAttachmentUpdateRequest) o; + IncidentAttachmentUpdateRequest incidentAttachmentUpdateRequest = (IncidentAttachmentUpdateRequest) o; return Objects.equals(this.data, incidentAttachmentUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -94,7 +111,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateResponse.java index 035a524b4b0..65cd3a3668f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentUpdateResponse.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The response object containing the created or updated incident attachments. */ +/** + *

The response object containing the created or updated incident attachments.

+ */ @JsonPropertyOrder({ IncidentAttachmentUpdateResponse.JSON_PROPERTY_DATA, IncidentAttachmentUpdateResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentUpdateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -34,11 +51,9 @@ public IncidentAttachmentUpdateResponse() {} @JsonCreator public IncidentAttachmentUpdateResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public IncidentAttachmentUpdateResponse data(List data) { this.data = data; for (IncidentAttachmentData item : data) { @@ -46,7 +61,6 @@ public IncidentAttachmentUpdateResponse data(List data) } return this; } - public IncidentAttachmentUpdateResponse addDataItem(IncidentAttachmentData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -54,32 +68,27 @@ public IncidentAttachmentUpdateResponse addDataItem(IncidentAttachmentData dataI } /** - * An array of incident attachments. Only the attachments that were created or updated by the - * request are returned. - * + *

An array of incident attachments. Only the attachments that were created or updated by the request are + * returned.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - - public IncidentAttachmentUpdateResponse included( - List included) { + public IncidentAttachmentUpdateResponse included(List included) { this.included = included; for (IncidentAttachmentsResponseIncludedItem item : included) { this.unparsed |= item.unparsed; } return this; } - - public IncidentAttachmentUpdateResponse addIncludedItem( - IncidentAttachmentsResponseIncludedItem includedItem) { + public IncidentAttachmentUpdateResponse addIncludedItem(IncidentAttachmentsResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); } @@ -89,22 +98,23 @@ public IncidentAttachmentUpdateResponse addIncludedItem( } /** - * Included related resources that the user requested. - * + *

Included related resources that the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this IncidentAttachmentUpdateResponse object is equal to o. */ + /** + * Return true if this IncidentAttachmentUpdateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,15 +123,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentUpdateResponse incidentAttachmentUpdateResponse = - (IncidentAttachmentUpdateResponse) o; - return Objects.equals(this.data, incidentAttachmentUpdateResponse.data) - && Objects.equals(this.included, incidentAttachmentUpdateResponse.included); + IncidentAttachmentUpdateResponse incidentAttachmentUpdateResponse = (IncidentAttachmentUpdateResponse) o; + return Objects.equals(this.data, incidentAttachmentUpdateResponse.data) && Objects.equals(this.included, incidentAttachmentUpdateResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -135,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsPostmortemAttributesAttachmentObject.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsPostmortemAttributesAttachmentObject.java index 4ab6fae1d58..09cf31a4188 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsPostmortemAttributesAttachmentObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsPostmortemAttributesAttachmentObject.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The postmortem attachment. */ +/** + *

The postmortem attachment.

+ */ @JsonPropertyOrder({ IncidentAttachmentsPostmortemAttributesAttachmentObject.JSON_PROPERTY_DOCUMENT_URL, IncidentAttachmentsPostmortemAttributesAttachmentObject.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentsPostmortemAttributesAttachmentObject { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DOCUMENT_URL = "documentUrl"; private String documentUrl; @@ -32,55 +51,50 @@ public IncidentAttachmentsPostmortemAttributesAttachmentObject() {} @JsonCreator public IncidentAttachmentsPostmortemAttributesAttachmentObject( - @JsonProperty(required = true, value = JSON_PROPERTY_DOCUMENT_URL) String documentUrl, - @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { - this.documentUrl = documentUrl; - this.title = title; + @JsonProperty(required=true, value=JSON_PROPERTY_DOCUMENT_URL)String documentUrl, + @JsonProperty(required=true, value=JSON_PROPERTY_TITLE)String title) { + this.documentUrl = documentUrl; + this.title = title; } - public IncidentAttachmentsPostmortemAttributesAttachmentObject documentUrl(String documentUrl) { this.documentUrl = documentUrl; return this; } /** - * The URL of this notebook attachment. - * + *

The URL of this notebook attachment.

* @return documentUrl - */ - @JsonProperty(JSON_PROPERTY_DOCUMENT_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDocumentUrl() { - return documentUrl; - } - + **/ + @JsonProperty(JSON_PROPERTY_DOCUMENT_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDocumentUrl() { + return documentUrl; + } public void setDocumentUrl(String documentUrl) { this.documentUrl = documentUrl; } - public IncidentAttachmentsPostmortemAttributesAttachmentObject title(String title) { this.title = title; return this; } /** - * The title of this postmortem attachment. - * + *

The title of this postmortem attachment.

* @return title - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - + **/ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } /** - * Return true if this IncidentAttachmentsPostmortemAttributesAttachmentObject object is equal to - * o. + * Return true if this IncidentAttachmentsPostmortemAttributesAttachmentObject object is equal to o. */ @Override public boolean equals(Object o) { @@ -90,18 +104,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentAttachmentsPostmortemAttributesAttachmentObject - incidentAttachmentsPostmortemAttributesAttachmentObject = - (IncidentAttachmentsPostmortemAttributesAttachmentObject) o; - return Objects.equals( - this.documentUrl, incidentAttachmentsPostmortemAttributesAttachmentObject.documentUrl) - && Objects.equals( - this.title, incidentAttachmentsPostmortemAttributesAttachmentObject.title); + IncidentAttachmentsPostmortemAttributesAttachmentObject incidentAttachmentsPostmortemAttributesAttachmentObject = (IncidentAttachmentsPostmortemAttributesAttachmentObject) o; + return Objects.equals(this.documentUrl, incidentAttachmentsPostmortemAttributesAttachmentObject.documentUrl) && Objects.equals(this.title, incidentAttachmentsPostmortemAttributesAttachmentObject.title); } + @Override public int hashCode() { - return Objects.hash(documentUrl, title); + return Objects.hash(documentUrl,title); } @Override @@ -115,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponse.java index 275b06cd454..69bce82c73d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponse.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The response object containing an incident's attachments. */ +/** + *

The response object containing an incident's attachments.

+ */ @JsonPropertyOrder({ IncidentAttachmentsResponse.JSON_PROPERTY_DATA, IncidentAttachmentsResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentAttachmentsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -34,11 +51,9 @@ public IncidentAttachmentsResponse() {} @JsonCreator public IncidentAttachmentsResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public IncidentAttachmentsResponse data(List data) { this.data = data; for (IncidentAttachmentData item : data) { @@ -46,7 +61,6 @@ public IncidentAttachmentsResponse data(List data) { } return this; } - public IncidentAttachmentsResponse addDataItem(IncidentAttachmentData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -54,31 +68,26 @@ public IncidentAttachmentsResponse addDataItem(IncidentAttachmentData dataItem) } /** - * An array of incident attachments. - * + *

An array of incident attachments.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - - public IncidentAttachmentsResponse included( - List included) { + public IncidentAttachmentsResponse included(List included) { this.included = included; for (IncidentAttachmentsResponseIncludedItem item : included) { this.unparsed |= item.unparsed; } return this; } - - public IncidentAttachmentsResponse addIncludedItem( - IncidentAttachmentsResponseIncludedItem includedItem) { + public IncidentAttachmentsResponse addIncludedItem(IncidentAttachmentsResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); } @@ -88,22 +97,23 @@ public IncidentAttachmentsResponse addIncludedItem( } /** - * Included related resources that the user requested. - * + *

Included related resources that the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this IncidentAttachmentsResponse object is equal to o. */ + /** + * Return true if this IncidentAttachmentsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,13 +123,13 @@ public boolean equals(Object o) { return false; } IncidentAttachmentsResponse incidentAttachmentsResponse = (IncidentAttachmentsResponse) o; - return Objects.equals(this.data, incidentAttachmentsResponse.data) - && Objects.equals(this.included, incidentAttachmentsResponse.included); + return Objects.equals(this.data, incidentAttachmentsResponse.data) && Objects.equals(this.included, incidentAttachmentsResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -133,7 +143,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponseIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponseIncludedItem.java index 8875fb6f0b3..4d5f56566e6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponseIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentAttachmentsResponseIncludedItem.java @@ -6,216 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - IncidentAttachmentsResponseIncludedItem.IncidentAttachmentsResponseIncludedItemDeserializer - .class) -@JsonSerialize( - using = - IncidentAttachmentsResponseIncludedItem.IncidentAttachmentsResponseIncludedItemSerializer - .class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentAttachmentsResponseIncludedItem.IncidentAttachmentsResponseIncludedItemDeserializer.class) +@JsonSerialize(using = IncidentAttachmentsResponseIncludedItem.IncidentAttachmentsResponseIncludedItemSerializer.class) public class IncidentAttachmentsResponseIncludedItem extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(IncidentAttachmentsResponseIncludedItem.class.getName()); + private static final Logger log = Logger.getLogger(IncidentAttachmentsResponseIncludedItem.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class IncidentAttachmentsResponseIncludedItemSerializer - extends StdSerializer { - public IncidentAttachmentsResponseIncludedItemSerializer( - Class t) { - super(t); + public static class IncidentAttachmentsResponseIncludedItemSerializer extends StdSerializer { + public IncidentAttachmentsResponseIncludedItemSerializer(Class t) { + super(t); + } + + public IncidentAttachmentsResponseIncludedItemSerializer() { + this(null); + } + + @Override + public void serialize(IncidentAttachmentsResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentAttachmentsResponseIncludedItemSerializer() { - this(null); + public static class IncidentAttachmentsResponseIncludedItemDeserializer extends StdDeserializer { + public IncidentAttachmentsResponseIncludedItemDeserializer() { + this(IncidentAttachmentsResponseIncludedItem.class); + } + + public IncidentAttachmentsResponseIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentAttachmentsResponseIncludedItem 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + IncidentAttachmentsResponseIncludedItem ret = new IncidentAttachmentsResponseIncludedItem(); + 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 IncidentAttachmentsResponseIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentAttachmentsResponseIncludedItem cannot be null"); + } } - @Override - public void serialize( - IncidentAttachmentsResponseIncludedItem value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentAttachmentsResponseIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public IncidentAttachmentsResponseIncludedItem(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentAttachmentsResponseIncludedItemDeserializer - extends StdDeserializer { - public IncidentAttachmentsResponseIncludedItemDeserializer() { - this(IncidentAttachmentsResponseIncludedItem.class); + static { + schemas.put("User", new GenericType() { + }); + JSON.registerDescendants(IncidentAttachmentsResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); } - public IncidentAttachmentsResponseIncludedItemDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentAttachmentsResponseIncludedItem.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentAttachmentsResponseIncludedItem 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 User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - - IncidentAttachmentsResponseIncludedItem ret = new IncidentAttachmentsResponseIncludedItem(); - 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; + throw new RuntimeException("Invalid instance type. Must be User"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * User + * + * @return The actual instance (User) + */ @Override - public IncidentAttachmentsResponseIncludedItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentAttachmentsResponseIncludedItem cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentAttachmentsResponseIncludedItem() { - super("oneOf", Boolean.FALSE); - } - - public IncidentAttachmentsResponseIncludedItem(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - JSON.registerDescendants( - IncidentAttachmentsResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentAttachmentsResponseIncludedItem.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User - * - *

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(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be User"); - } - - /** - * Get the actual instance, which can be the following: User - * - * @return The actual instance (User) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateAttributes.java index 5587e320490..d54df4512af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateAttributes.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The incident's attributes for a create request. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The incident's attributes for a create request.

+ */ @JsonPropertyOrder({ IncidentCreateAttributes.JSON_PROPERTY_CUSTOMER_IMPACTED, IncidentCreateAttributes.JSON_PROPERTY_FIELDS, @@ -25,10 +40,10 @@ IncidentCreateAttributes.JSON_PROPERTY_NOTIFICATION_HANDLES, IncidentCreateAttributes.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOMER_IMPACTED = "customer_impacted"; private Boolean customerImpacted; @@ -48,38 +63,33 @@ public IncidentCreateAttributes() {} @JsonCreator public IncidentCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_CUSTOMER_IMPACTED) - Boolean customerImpacted, - @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { - this.customerImpacted = customerImpacted; - this.title = title; + @JsonProperty(required=true, value=JSON_PROPERTY_CUSTOMER_IMPACTED)Boolean customerImpacted, + @JsonProperty(required=true, value=JSON_PROPERTY_TITLE)String title) { + this.customerImpacted = customerImpacted; + this.title = title; } - public IncidentCreateAttributes customerImpacted(Boolean customerImpacted) { this.customerImpacted = customerImpacted; return this; } /** - * A flag indicating whether the incident caused customer impact. - * + *

A flag indicating whether the incident caused customer impact.

* @return customerImpacted - */ - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getCustomerImpacted() { - return customerImpacted; - } - + **/ + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getCustomerImpacted() { + return customerImpacted; + } public void setCustomerImpacted(Boolean customerImpacted) { this.customerImpacted = customerImpacted; } - public IncidentCreateAttributes fields(Map fields) { this.fields = fields; return this; } - public IncidentCreateAttributes putFieldsItem(String key, IncidentFieldAttributes fieldsItem) { if (this.fields == null) { this.fields = new HashMap<>(); @@ -89,32 +99,27 @@ public IncidentCreateAttributes putFieldsItem(String key, IncidentFieldAttribute } /** - * A condensed view of the user-defined fields for which to create initial selections. - * + *

A condensed view of the user-defined fields for which to create initial selections.

* @return fields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getFields() { - return fields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getFields() { + return fields; + } public void setFields(Map fields) { this.fields = fields; } - - public IncidentCreateAttributes initialCells( - List initialCells) { + public IncidentCreateAttributes initialCells(List initialCells) { this.initialCells = initialCells; for (IncidentTimelineCellCreateAttributes item : initialCells) { this.unparsed |= item.unparsed; } return this; } - - public IncidentCreateAttributes addInitialCellsItem( - IncidentTimelineCellCreateAttributes initialCellsItem) { + public IncidentCreateAttributes addInitialCellsItem(IncidentTimelineCellCreateAttributes initialCellsItem) { if (this.initialCells == null) { this.initialCells = new ArrayList<>(); } @@ -124,32 +129,27 @@ public IncidentCreateAttributes addInitialCellsItem( } /** - * An array of initial timeline cells to be placed at the beginning of the incident timeline. - * + *

An array of initial timeline cells to be placed at the beginning of the incident timeline.

* @return initialCells - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INITIAL_CELLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInitialCells() { - return initialCells; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_CELLS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getInitialCells() { + return initialCells; + } public void setInitialCells(List initialCells) { this.initialCells = initialCells; } - - public IncidentCreateAttributes notificationHandles( - List notificationHandles) { + public IncidentCreateAttributes notificationHandles(List notificationHandles) { this.notificationHandles = notificationHandles; for (IncidentNotificationHandle item : notificationHandles) { this.unparsed |= item.unparsed; } return this; } - - public IncidentCreateAttributes addNotificationHandlesItem( - IncidentNotificationHandle notificationHandlesItem) { + public IncidentCreateAttributes addNotificationHandlesItem(IncidentNotificationHandle notificationHandlesItem) { if (this.notificationHandles == null) { this.notificationHandles = new ArrayList<>(); } @@ -159,42 +159,41 @@ public IncidentCreateAttributes addNotificationHandlesItem( } /** - * Notification handles that will be notified of the incident at creation. - * + *

Notification handles that will be notified of the incident at creation.

* @return notificationHandles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotificationHandles() { - return notificationHandles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotificationHandles() { + return notificationHandles; + } public void setNotificationHandles(List notificationHandles) { this.notificationHandles = notificationHandles; } - public IncidentCreateAttributes title(String title) { this.title = title; return this; } /** - * The title of the incident, which summarizes what happened. - * + *

The title of the incident, which summarizes what happened.

* @return title - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - + **/ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this IncidentCreateAttributes object is equal to o. */ + /** + * Return true if this IncidentCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -204,16 +203,13 @@ public boolean equals(Object o) { return false; } IncidentCreateAttributes incidentCreateAttributes = (IncidentCreateAttributes) o; - return Objects.equals(this.customerImpacted, incidentCreateAttributes.customerImpacted) - && Objects.equals(this.fields, incidentCreateAttributes.fields) - && Objects.equals(this.initialCells, incidentCreateAttributes.initialCells) - && Objects.equals(this.notificationHandles, incidentCreateAttributes.notificationHandles) - && Objects.equals(this.title, incidentCreateAttributes.title); + return Objects.equals(this.customerImpacted, incidentCreateAttributes.customerImpacted) && Objects.equals(this.fields, incidentCreateAttributes.fields) && Objects.equals(this.initialCells, incidentCreateAttributes.initialCells) && Objects.equals(this.notificationHandles, incidentCreateAttributes.notificationHandles) && Objects.equals(this.title, incidentCreateAttributes.title); } + @Override public int hashCode() { - return Objects.hash(customerImpacted, fields, initialCells, notificationHandles, title); + return Objects.hash(customerImpacted,fields,initialCells,notificationHandles,title); } @Override @@ -223,16 +219,15 @@ public String toString() { sb.append(" customerImpacted: ").append(toIndentedString(customerImpacted)).append("\n"); sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); sb.append(" initialCells: ").append(toIndentedString(initialCells)).append("\n"); - sb.append(" notificationHandles: ") - .append(toIndentedString(notificationHandles)) - .append("\n"); + sb.append(" notificationHandles: ").append(toIndentedString(notificationHandles)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateData.java index b8ae3db15d5..eac08aea362 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident data for a create request. */ + +/** + *

Incident data for a create request.

+ */ @JsonPropertyOrder({ IncidentCreateData.JSON_PROPERTY_ATTRIBUTES, IncidentCreateData.JSON_PROPERTY_RELATIONSHIPS, IncidentCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentCreateAttributes attributes; @@ -36,15 +55,13 @@ public IncidentCreateData() {} @JsonCreator public IncidentCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - IncidentCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)IncidentCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentCreateData attributes(IncidentCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,20 +69,18 @@ public IncidentCreateData attributes(IncidentCreateAttributes attributes) { } /** - * The incident's attributes for a create request. - * + *

The incident's attributes for a create request.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentCreateAttributes attributes) { this.attributes = attributes; } - public IncidentCreateData relationships(IncidentCreateRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -73,21 +88,19 @@ public IncidentCreateData relationships(IncidentCreateRelationships relationship } /** - * The relationships the incident will have with other resources once created. - * + *

The relationships the incident will have with other resources once created.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentCreateRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentCreateRelationships getRelationships() { + return relationships; + } public void setRelationships(IncidentCreateRelationships relationships) { this.relationships = relationships; } - public IncidentCreateData type(IncidentType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public IncidentCreateData type(IncidentType type) { } /** - * Incident resource type. - * + *

Incident resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentType getType() { + return type; + } public void setType(IncidentType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentCreateData object is equal to o. */ + /** + * Return true if this IncidentCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } IncidentCreateData incidentCreateData = (IncidentCreateData) o; - return Objects.equals(this.attributes, incidentCreateData.attributes) - && Objects.equals(this.relationships, incidentCreateData.relationships) - && Objects.equals(this.type, incidentCreateData.type); + return Objects.equals(this.attributes, incidentCreateData.attributes) && Objects.equals(this.relationships, incidentCreateData.relationships) && Objects.equals(this.type, incidentCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRelationships.java index e4a766a6802..76d0163a622 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRelationships.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The relationships the incident will have with other resources once created. */ -@JsonPropertyOrder({IncidentCreateRelationships.JSON_PROPERTY_COMMANDER_USER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The relationships the incident will have with other resources once created.

+ */ +@JsonPropertyOrder({ + IncidentCreateRelationships.JSON_PROPERTY_COMMANDER_USER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentCreateRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMMANDER_USER = "commander_user"; private NullableRelationshipToUser commanderUser; @@ -26,12 +47,10 @@ public IncidentCreateRelationships() {} @JsonCreator public IncidentCreateRelationships( - @JsonProperty(required = true, value = JSON_PROPERTY_COMMANDER_USER) - NullableRelationshipToUser commanderUser) { - this.commanderUser = commanderUser; - this.unparsed |= commanderUser.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_COMMANDER_USER)NullableRelationshipToUser commanderUser) { + this.commanderUser = commanderUser; + this.unparsed |= commanderUser.unparsed; } - public IncidentCreateRelationships commanderUser(NullableRelationshipToUser commanderUser) { this.commanderUser = commanderUser; this.unparsed |= commanderUser.unparsed; @@ -39,21 +58,22 @@ public IncidentCreateRelationships commanderUser(NullableRelationshipToUser comm } /** - * Relationship to user. - * + *

Relationship to user.

* @return commanderUser - */ - @JsonProperty(JSON_PROPERTY_COMMANDER_USER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NullableRelationshipToUser getCommanderUser() { - return commanderUser; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMMANDER_USER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NullableRelationshipToUser getCommanderUser() { + return commanderUser; + } public void setCommanderUser(NullableRelationshipToUser commanderUser) { this.commanderUser = commanderUser; } - /** Return true if this IncidentCreateRelationships object is equal to o. */ + /** + * Return true if this IncidentCreateRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.commanderUser, incidentCreateRelationships.commanderUser); } + @Override public int hashCode() { return Objects.hash(commanderUser); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRequest.java index d2d502623a5..06129386d04 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create request for an incident. */ -@JsonPropertyOrder({IncidentCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create request for an incident.

+ */ +@JsonPropertyOrder({ + IncidentCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentCreateData data; @@ -26,11 +47,10 @@ public IncidentCreateRequest() {} @JsonCreator public IncidentCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentCreateRequest data(IncidentCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentCreateRequest data(IncidentCreateData data) { } /** - * Incident data for a create request. - * + *

Incident data for a create request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentCreateData getData() { + return data; + } public void setData(IncidentCreateData data) { this.data = data; } - /** Return true if this IncidentCreateRequest object is equal to o. */ + /** + * Return true if this IncidentCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, incidentCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributes.java index dcb7e6aaa4a..e74d7428b8c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributes.java @@ -6,294 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = IncidentFieldAttributes.IncidentFieldAttributesDeserializer.class) @JsonSerialize(using = IncidentFieldAttributes.IncidentFieldAttributesSerializer.class) public class IncidentFieldAttributes extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IncidentFieldAttributes.class.getName()); + private static final Logger log = Logger.getLogger(IncidentFieldAttributes.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class IncidentFieldAttributesSerializer extends StdSerializer { + public IncidentFieldAttributesSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public IncidentFieldAttributesSerializer() { + this(null); + } - public static class IncidentFieldAttributesSerializer - extends StdSerializer { - public IncidentFieldAttributesSerializer(Class t) { - super(t); + @Override + public void serialize(IncidentFieldAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentFieldAttributesSerializer() { - this(null); + public static class IncidentFieldAttributesDeserializer extends StdDeserializer { + public IncidentFieldAttributesDeserializer() { + this(IncidentFieldAttributes.class); + } + + public IncidentFieldAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentFieldAttributes 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 IncidentFieldAttributesSingleValue + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentFieldAttributesSingleValue.class.equals(Integer.class) || IncidentFieldAttributesSingleValue.class.equals(Long.class) || IncidentFieldAttributesSingleValue.class.equals(Float.class) || IncidentFieldAttributesSingleValue.class.equals(Double.class) || IncidentFieldAttributesSingleValue.class.equals(Boolean.class) || IncidentFieldAttributesSingleValue.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentFieldAttributesSingleValue.class.equals(Integer.class) || IncidentFieldAttributesSingleValue.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentFieldAttributesSingleValue.class.equals(Float.class) || IncidentFieldAttributesSingleValue.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentFieldAttributesSingleValue.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentFieldAttributesSingleValue.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentFieldAttributesSingleValue.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 (!((IncidentFieldAttributesSingleValue)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentFieldAttributesSingleValue'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentFieldAttributesSingleValue'", e); + } + + // deserialize IncidentFieldAttributesMultipleValue + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentFieldAttributesMultipleValue.class.equals(Integer.class) || IncidentFieldAttributesMultipleValue.class.equals(Long.class) || IncidentFieldAttributesMultipleValue.class.equals(Float.class) || IncidentFieldAttributesMultipleValue.class.equals(Double.class) || IncidentFieldAttributesMultipleValue.class.equals(Boolean.class) || IncidentFieldAttributesMultipleValue.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentFieldAttributesMultipleValue.class.equals(Integer.class) || IncidentFieldAttributesMultipleValue.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentFieldAttributesMultipleValue.class.equals(Float.class) || IncidentFieldAttributesMultipleValue.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentFieldAttributesMultipleValue.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentFieldAttributesMultipleValue.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentFieldAttributesMultipleValue.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 (!((IncidentFieldAttributesMultipleValue)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentFieldAttributesMultipleValue'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentFieldAttributesMultipleValue'", e); + } + + IncidentFieldAttributes ret = new IncidentFieldAttributes(); + 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 IncidentFieldAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentFieldAttributes cannot be null"); + } } - @Override - public void serialize( - IncidentFieldAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentFieldAttributes() { + super("oneOf", Boolean.FALSE); + } + public IncidentFieldAttributes(IncidentFieldAttributesSingleValue o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public IncidentFieldAttributes(IncidentFieldAttributesMultipleValue o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentFieldAttributesDeserializer - extends StdDeserializer { - public IncidentFieldAttributesDeserializer() { - this(IncidentFieldAttributes.class); + static { + schemas.put("IncidentFieldAttributesSingleValue", new GenericType() { + }); + schemas.put("IncidentFieldAttributesMultipleValue", new GenericType() { + }); + JSON.registerDescendants(IncidentFieldAttributes.class, Collections.unmodifiableMap(schemas)); } - public IncidentFieldAttributesDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentFieldAttributes.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IncidentFieldAttributesSingleValue, IncidentFieldAttributesMultipleValue + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentFieldAttributes 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 IncidentFieldAttributesSingleValue - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentFieldAttributesSingleValue.class.equals(Integer.class) - || IncidentFieldAttributesSingleValue.class.equals(Long.class) - || IncidentFieldAttributesSingleValue.class.equals(Float.class) - || IncidentFieldAttributesSingleValue.class.equals(Double.class) - || IncidentFieldAttributesSingleValue.class.equals(Boolean.class) - || IncidentFieldAttributesSingleValue.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentFieldAttributesSingleValue.class.equals(Integer.class) - || IncidentFieldAttributesSingleValue.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentFieldAttributesSingleValue.class.equals(Float.class) - || IncidentFieldAttributesSingleValue.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentFieldAttributesSingleValue.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentFieldAttributesSingleValue.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IncidentFieldAttributesSingleValue.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentFieldAttributesSingleValue.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 (!((IncidentFieldAttributesSingleValue) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'IncidentFieldAttributesSingleValue'"); + if (JSON.isInstanceOf(IncidentFieldAttributesMultipleValue.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'IncidentFieldAttributesSingleValue'", - e); - } - // deserialize IncidentFieldAttributesMultipleValue - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentFieldAttributesMultipleValue.class.equals(Integer.class) - || IncidentFieldAttributesMultipleValue.class.equals(Long.class) - || IncidentFieldAttributesMultipleValue.class.equals(Float.class) - || IncidentFieldAttributesMultipleValue.class.equals(Double.class) - || IncidentFieldAttributesMultipleValue.class.equals(Boolean.class) - || IncidentFieldAttributesMultipleValue.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentFieldAttributesMultipleValue.class.equals(Integer.class) - || IncidentFieldAttributesMultipleValue.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentFieldAttributesMultipleValue.class.equals(Float.class) - || IncidentFieldAttributesMultipleValue.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentFieldAttributesMultipleValue.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentFieldAttributesMultipleValue.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()).readValueAs(IncidentFieldAttributesMultipleValue.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 (!((IncidentFieldAttributesMultipleValue) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'IncidentFieldAttributesMultipleValue'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'IncidentFieldAttributesMultipleValue'", - e); - } - - IncidentFieldAttributes ret = new IncidentFieldAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be IncidentFieldAttributesSingleValue, IncidentFieldAttributesMultipleValue"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * IncidentFieldAttributesSingleValue, IncidentFieldAttributesMultipleValue + * + * @return The actual instance (IncidentFieldAttributesSingleValue, IncidentFieldAttributesMultipleValue) + */ @Override - public IncidentFieldAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "IncidentFieldAttributes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentFieldAttributes() { - super("oneOf", Boolean.FALSE); - } - - public IncidentFieldAttributes(IncidentFieldAttributesSingleValue o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public IncidentFieldAttributes(IncidentFieldAttributesMultipleValue o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "IncidentFieldAttributesSingleValue", - new GenericType() {}); - schemas.put( - "IncidentFieldAttributesMultipleValue", - new GenericType() {}); - JSON.registerDescendants(IncidentFieldAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentFieldAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: IncidentFieldAttributesSingleValue, - * IncidentFieldAttributesMultipleValue - * - *

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( - IncidentFieldAttributesSingleValue.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - IncidentFieldAttributesMultipleValue.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentFieldAttributesSingleValue`. If the actual instance is not `IncidentFieldAttributesSingleValue`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentFieldAttributesSingleValue` + * @throws ClassCastException if the instance is not `IncidentFieldAttributesSingleValue` + */ + public IncidentFieldAttributesSingleValue getIncidentFieldAttributesSingleValue() throws ClassCastException { + return (IncidentFieldAttributesSingleValue)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentFieldAttributesMultipleValue`. If the actual instance is not `IncidentFieldAttributesMultipleValue`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentFieldAttributesMultipleValue` + * @throws ClassCastException if the instance is not `IncidentFieldAttributesMultipleValue` + */ + public IncidentFieldAttributesMultipleValue getIncidentFieldAttributesMultipleValue() throws ClassCastException { + return (IncidentFieldAttributesMultipleValue)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be IncidentFieldAttributesSingleValue," - + " IncidentFieldAttributesMultipleValue"); - } - - /** - * Get the actual instance, which can be the following: IncidentFieldAttributesSingleValue, - * IncidentFieldAttributesMultipleValue - * - * @return The actual instance (IncidentFieldAttributesSingleValue, - * IncidentFieldAttributesMultipleValue) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentFieldAttributesSingleValue`. If the actual instance is not - * `IncidentFieldAttributesSingleValue`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentFieldAttributesSingleValue` - * @throws ClassCastException if the instance is not `IncidentFieldAttributesSingleValue` - */ - public IncidentFieldAttributesSingleValue getIncidentFieldAttributesSingleValue() - throws ClassCastException { - return (IncidentFieldAttributesSingleValue) super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentFieldAttributesMultipleValue`. If the actual instance is - * not `IncidentFieldAttributesMultipleValue`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentFieldAttributesMultipleValue` - * @throws ClassCastException if the instance is not `IncidentFieldAttributesMultipleValue` - */ - public IncidentFieldAttributesMultipleValue getIncidentFieldAttributesMultipleValue() - throws ClassCastException { - return (IncidentFieldAttributesMultipleValue) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesMultipleValue.java b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesMultipleValue.java index b658afec3de..31f60b47f68 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesMultipleValue.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesMultipleValue.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** A field with potentially multiple values selected. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A field with potentially multiple values selected.

+ */ @JsonPropertyOrder({ IncidentFieldAttributesMultipleValue.JSON_PROPERTY_TYPE, IncidentFieldAttributesMultipleValue.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentFieldAttributesMultipleValue { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; private IncidentFieldAttributesValueType type = IncidentFieldAttributesValueType.MULTISELECT; @@ -37,29 +54,26 @@ public IncidentFieldAttributesMultipleValue type(IncidentFieldAttributesValueTyp } /** - * Type of the multiple value field definitions. - * + *

Type of the multiple value field definitions.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentFieldAttributesValueType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentFieldAttributesValueType getType() { + return type; + } public void setType(IncidentFieldAttributesValueType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public IncidentFieldAttributesMultipleValue value(List value) { this.value = JsonNullable.>of(value); return this; } - public IncidentFieldAttributesMultipleValue addValueItem(String valueItem) { if (this.value == null || !this.value.isPresent()) { this.value = JsonNullable.>of(new ArrayList<>()); @@ -73,32 +87,30 @@ public IncidentFieldAttributesMultipleValue addValueItem(String valueItem) { } /** - * The multiple values selected for this field. - * + *

The multiple values selected for this field.

* @return value - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getValue() { - return value.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValue() { + return value.orElse(null); + } @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getValue_JsonNullable() { return value; } - - @JsonProperty(JSON_PROPERTY_VALUE) - public void setValue_JsonNullable(JsonNullable> value) { + @JsonProperty(JSON_PROPERTY_VALUE)public void setValue_JsonNullable(JsonNullable> value) { this.value = value; } - public void setValue(List value) { this.value = JsonNullable.>of(value); } - /** Return true if this IncidentFieldAttributesMultipleValue object is equal to o. */ + /** + * Return true if this IncidentFieldAttributesMultipleValue object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,15 +119,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentFieldAttributesMultipleValue incidentFieldAttributesMultipleValue = - (IncidentFieldAttributesMultipleValue) o; - return Objects.equals(this.type, incidentFieldAttributesMultipleValue.type) - && Objects.equals(this.value, incidentFieldAttributesMultipleValue.value); + IncidentFieldAttributesMultipleValue incidentFieldAttributesMultipleValue = (IncidentFieldAttributesMultipleValue) o; + return Objects.equals(this.type, incidentFieldAttributesMultipleValue.type) && Objects.equals(this.value, incidentFieldAttributesMultipleValue.value); } + @Override public int hashCode() { - return Objects.hash(type, value); + return Objects.hash(type,value); } @Override @@ -129,7 +140,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValue.java b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValue.java index 1c48cafecae..d9c4b497aef 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValue.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValue.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** A field with a single value selected. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A field with a single value selected.

+ */ @JsonPropertyOrder({ IncidentFieldAttributesSingleValue.JSON_PROPERTY_TYPE, IncidentFieldAttributesSingleValue.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentFieldAttributesSingleValue { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentFieldAttributesSingleValueType type = - IncidentFieldAttributesSingleValueType.DROPDOWN; + private IncidentFieldAttributesSingleValueType type = IncidentFieldAttributesSingleValueType.DROPDOWN; public static final String JSON_PROPERTY_VALUE = "value"; private JsonNullable value = JsonNullable.undefined(); @@ -36,56 +54,52 @@ public IncidentFieldAttributesSingleValue type(IncidentFieldAttributesSingleValu } /** - * Type of the single value field definitions. - * + *

Type of the single value field definitions.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentFieldAttributesSingleValueType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentFieldAttributesSingleValueType getType() { + return type; + } public void setType(IncidentFieldAttributesSingleValueType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public IncidentFieldAttributesSingleValue value(String value) { this.value = JsonNullable.of(value); return this; } /** - * The single value selected for this field. - * + *

The single value selected for this field.

* @return value - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getValue() { - return value.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getValue() { + return value.orElse(null); + } @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getValue_JsonNullable() { return value; } - - @JsonProperty(JSON_PROPERTY_VALUE) - public void setValue_JsonNullable(JsonNullable value) { + @JsonProperty(JSON_PROPERTY_VALUE)public void setValue_JsonNullable(JsonNullable value) { this.value = value; } - public void setValue(String value) { this.value = JsonNullable.of(value); } - /** Return true if this IncidentFieldAttributesSingleValue object is equal to o. */ + /** + * Return true if this IncidentFieldAttributesSingleValue object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,15 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentFieldAttributesSingleValue incidentFieldAttributesSingleValue = - (IncidentFieldAttributesSingleValue) o; - return Objects.equals(this.type, incidentFieldAttributesSingleValue.type) - && Objects.equals(this.value, incidentFieldAttributesSingleValue.value); + IncidentFieldAttributesSingleValue incidentFieldAttributesSingleValue = (IncidentFieldAttributesSingleValue) o; + return Objects.equals(this.type, incidentFieldAttributesSingleValue.type) && Objects.equals(this.value, incidentFieldAttributesSingleValue.value); } + @Override public int hashCode() { - return Objects.hash(type, value); + return Objects.hash(type,value); } @Override @@ -116,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValueType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValueType.java index 5a3d9538ab3..876a7d741f6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValueType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesSingleValueType.java @@ -6,33 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the single value field definitions. */ -@JsonSerialize( - using = - IncidentFieldAttributesSingleValueType.IncidentFieldAttributesSingleValueTypeSerializer - .class) +/** + *

Type of the single value field definitions.

+ */ +@JsonSerialize(using = IncidentFieldAttributesSingleValueType.IncidentFieldAttributesSingleValueTypeSerializer.class) public class IncidentFieldAttributesSingleValueType { - public static final IncidentFieldAttributesSingleValueType DROPDOWN = - new IncidentFieldAttributesSingleValueType("dropdown"); - public static final IncidentFieldAttributesSingleValueType TEXTBOX = - new IncidentFieldAttributesSingleValueType("textbox"); + public static final IncidentFieldAttributesSingleValueType DROPDOWN = new IncidentFieldAttributesSingleValueType("dropdown"); + public static final IncidentFieldAttributesSingleValueType TEXTBOX = new IncidentFieldAttributesSingleValueType("textbox"); - private static final Set allowedValues = - new HashSet(Arrays.asList("dropdown", "textbox")); + private static final Set allowedValues = new HashSet(Arrays.asList("dropdown", "textbox")); private String value; @@ -44,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentFieldAttributesSingleValueTypeSerializer - extends StdSerializer { - public IncidentFieldAttributesSingleValueTypeSerializer( - Class t) { - super(t); - } + public static class IncidentFieldAttributesSingleValueTypeSerializer extends StdSerializer { + public IncidentFieldAttributesSingleValueTypeSerializer(Class t) { + super(t); + } - public IncidentFieldAttributesSingleValueTypeSerializer() { - this(null); - } + public IncidentFieldAttributesSingleValueTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentFieldAttributesSingleValueType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentFieldAttributesSingleValueType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentFieldAttributesSingleValueType object is equal to o. */ + /** + * Return true if this IncidentFieldAttributesSingleValueType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesValueType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesValueType.java index 6112cacc2de..53f30a32e33 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesValueType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentFieldAttributesValueType.java @@ -6,35 +6,53 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the multiple value field definitions. */ -@JsonSerialize( - using = IncidentFieldAttributesValueType.IncidentFieldAttributesValueTypeSerializer.class) +/** + *

Type of the multiple value field definitions.

+ */ +@JsonSerialize(using = IncidentFieldAttributesValueType.IncidentFieldAttributesValueTypeSerializer.class) public class IncidentFieldAttributesValueType { - public static final IncidentFieldAttributesValueType MULTISELECT = - new IncidentFieldAttributesValueType("multiselect"); - public static final IncidentFieldAttributesValueType TEXTARRAY = - new IncidentFieldAttributesValueType("textarray"); - public static final IncidentFieldAttributesValueType METRICTAG = - new IncidentFieldAttributesValueType("metrictag"); - public static final IncidentFieldAttributesValueType AUTOCOMPLETE = - new IncidentFieldAttributesValueType("autocomplete"); + public static final IncidentFieldAttributesValueType MULTISELECT = new IncidentFieldAttributesValueType("multiselect"); + public static final IncidentFieldAttributesValueType TEXTARRAY = new IncidentFieldAttributesValueType("textarray"); + public static final IncidentFieldAttributesValueType METRICTAG = new IncidentFieldAttributesValueType("metrictag"); + public static final IncidentFieldAttributesValueType AUTOCOMPLETE = new IncidentFieldAttributesValueType("autocomplete"); - private static final Set allowedValues = - new HashSet(Arrays.asList("multiselect", "textarray", "metrictag", "autocomplete")); + private static final Set allowedValues = new HashSet(Arrays.asList("multiselect", "textarray", "metrictag", "autocomplete")); private String value; @@ -46,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentFieldAttributesValueTypeSerializer - extends StdSerializer { - public IncidentFieldAttributesValueTypeSerializer(Class t) { - super(t); - } + public static class IncidentFieldAttributesValueTypeSerializer extends StdSerializer { + public IncidentFieldAttributesValueTypeSerializer(Class t) { + super(t); + } - public IncidentFieldAttributesValueTypeSerializer() { - this(null); - } + public IncidentFieldAttributesValueTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentFieldAttributesValueType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentFieldAttributesValueType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -73,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentFieldAttributesValueType object is equal to o. */ + /** + * Return true if this IncidentFieldAttributesValueType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataAttributes.java new file mode 100644 index 00000000000..be5e7998fcb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataAttributes.java @@ -0,0 +1,192 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Incident integration metadata's attributes for a create request.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataAttributes.JSON_PROPERTY_INCIDENT_ID, + IncidentIntegrationMetadataAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + IncidentIntegrationMetadataAttributes.JSON_PROPERTY_METADATA, + IncidentIntegrationMetadataAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataAttributes { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENT_ID = "incident_id"; + private String incidentId; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private Integer integrationType; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private IncidentIntegrationMetadataMetadata metadata; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public IncidentIntegrationMetadataAttributes() {} + + @JsonCreator + public IncidentIntegrationMetadataAttributes( + @JsonProperty(required=true, value=JSON_PROPERTY_INTEGRATION_TYPE)Integer integrationType, + @JsonProperty(required=true, value=JSON_PROPERTY_METADATA)IncidentIntegrationMetadataMetadata metadata) { + this.integrationType = integrationType; + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + } + public IncidentIntegrationMetadataAttributes incidentId(String incidentId) { + this.incidentId = incidentId; + return this; + } + + /** + *

UUID of the incident this integration metadata is connected to.

+ * @return incidentId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIncidentId() { + return incidentId; + } + public void setIncidentId(String incidentId) { + this.incidentId = incidentId; + } + public IncidentIntegrationMetadataAttributes integrationType(Integer integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + *

A number indicating the type of integration this metadata is for. 1 indicates Slack; + * 8 indicates Jira.

+ * maximum: 9 + * @return integrationType + **/ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Integer getIntegrationType() { + return integrationType; + } + public void setIntegrationType(Integer integrationType) { + this.integrationType = integrationType; + } + public IncidentIntegrationMetadataAttributes metadata(IncidentIntegrationMetadataMetadata metadata) { + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + return this; + } + + /** + *

Incident integration metadata's metadata attribute.

+ * @return metadata + **/ + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataMetadata getMetadata() { + return metadata; + } + public void setMetadata(IncidentIntegrationMetadataMetadata metadata) { + this.metadata = metadata; + } + public IncidentIntegrationMetadataAttributes status(Integer status) { + this.status = status; + return this; + } + + /** + *

A number indicating the status of this integration metadata. 0 indicates unknown; + * 1 indicates pending; 2 indicates complete; 3 indicates manually created; + * 4 indicates manually updated; 5 indicates failed.

+ * maximum: 5 + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatus() { + return status; + } + public void setStatus(Integer status) { + this.status = status; + } + + /** + * Return true if this IncidentIntegrationMetadataAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataAttributes incidentIntegrationMetadataAttributes = (IncidentIntegrationMetadataAttributes) o; + return Objects.equals(this.incidentId, incidentIntegrationMetadataAttributes.incidentId) && Objects.equals(this.integrationType, incidentIntegrationMetadataAttributes.integrationType) && Objects.equals(this.metadata, incidentIntegrationMetadataAttributes.metadata) && Objects.equals(this.status, incidentIntegrationMetadataAttributes.status); + } + + + @Override + public int hashCode() { + return Objects.hash(incidentId,integrationType,metadata,status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataAttributes {\n"); + sb.append(" incidentId: ").append(toIndentedString(incidentId)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IncidentIntegrationMetadataCreateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataCreateData.java new file mode 100644 index 00000000000..fa00d7f4867 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataCreateData.java @@ -0,0 +1,144 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Incident integration metadata data for a create request.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataCreateData.JSON_PROPERTY_ATTRIBUTES, + IncidentIntegrationMetadataCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataCreateData { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentIntegrationMetadataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentIntegrationMetadataType type = IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS; + + public IncidentIntegrationMetadataCreateData() {} + + @JsonCreator + public IncidentIntegrationMetadataCreateData( + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)IncidentIntegrationMetadataAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentIntegrationMetadataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + public IncidentIntegrationMetadataCreateData attributes(IncidentIntegrationMetadataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + *

Incident integration metadata's attributes for a create request.

+ * @return attributes + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataAttributes getAttributes() { + return attributes; + } + public void setAttributes(IncidentIntegrationMetadataAttributes attributes) { + this.attributes = attributes; + } + public IncidentIntegrationMetadataCreateData type(IncidentIntegrationMetadataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + *

Integration metadata resource type.

+ * @return type + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataType getType() { + return type; + } + public void setType(IncidentIntegrationMetadataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * Return true if this IncidentIntegrationMetadataCreateData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataCreateData incidentIntegrationMetadataCreateData = (IncidentIntegrationMetadataCreateData) o; + return Objects.equals(this.attributes, incidentIntegrationMetadataCreateData.attributes) && Objects.equals(this.type, incidentIntegrationMetadataCreateData.type); + } + + + @Override + public int hashCode() { + return Objects.hash(attributes,type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/IncidentIntegrationMetadataCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataCreateRequest.java new file mode 100644 index 00000000000..11bfed00601 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataCreateRequest.java @@ -0,0 +1,114 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Create request for an incident integration metadata.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataCreateRequest { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentIntegrationMetadataCreateData data; + + public IncidentIntegrationMetadataCreateRequest() {} + + @JsonCreator + public IncidentIntegrationMetadataCreateRequest( + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentIntegrationMetadataCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + public IncidentIntegrationMetadataCreateRequest data(IncidentIntegrationMetadataCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + *

Incident integration metadata data for a create request.

+ * @return data + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataCreateData getData() { + return data; + } + public void setData(IncidentIntegrationMetadataCreateData data) { + this.data = data; + } + + /** + * Return true if this IncidentIntegrationMetadataCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataCreateRequest incidentIntegrationMetadataCreateRequest = (IncidentIntegrationMetadataCreateRequest) o; + return Objects.equals(this.data, incidentIntegrationMetadataCreateRequest.data); + } + + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/IncidentIntegrationMetadataListResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataListResponse.java new file mode 100644 index 00000000000..8598b13bbff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataListResponse.java @@ -0,0 +1,154 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with a list of incident integration metadata.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataListResponse.JSON_PROPERTY_DATA, + IncidentIntegrationMetadataListResponse.JSON_PROPERTY_INCLUDED, + IncidentIntegrationMetadataListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataListResponse { + @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 static final String JSON_PROPERTY_META = "meta"; + private IncidentIntegrationMetadataResponseMeta meta; + + public IncidentIntegrationMetadataListResponse() {} + + @JsonCreator + public IncidentIntegrationMetadataListResponse( + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; + } + public IncidentIntegrationMetadataListResponse data(List data) { + this.data = data; + for (IncidentIntegrationMetadataResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + public IncidentIntegrationMetadataListResponse addDataItem(IncidentIntegrationMetadataResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + *

An array of incident integration metadata.

+ * @return data + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + public void setData(List data) { + this.data = data; + } + + /** + *

Included related resources that the user requested.

+ * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + *

The metadata object containing pagination metadata.

+ * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentIntegrationMetadataResponseMeta getMeta() { + return meta; + } + + /** + * Return true if this IncidentIntegrationMetadataListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataListResponse incidentIntegrationMetadataListResponse = (IncidentIntegrationMetadataListResponse) o; + return Objects.equals(this.data, incidentIntegrationMetadataListResponse.data) && Objects.equals(this.included, incidentIntegrationMetadataListResponse.included) && Objects.equals(this.meta, incidentIntegrationMetadataListResponse.meta); + } + + + @Override + public int hashCode() { + return Objects.hash(data,included,meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).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/IncidentIntegrationMetadataMetadata.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataMetadata.java new file mode 100644 index 00000000000..4f530f29616 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataMetadata.java @@ -0,0 +1,266 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +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.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 com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentIntegrationMetadataMetadata.IncidentIntegrationMetadataMetadataDeserializer.class) +@JsonSerialize(using = IncidentIntegrationMetadataMetadata.IncidentIntegrationMetadataMetadataSerializer.class) +public class IncidentIntegrationMetadataMetadata extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(IncidentIntegrationMetadataMetadata.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class IncidentIntegrationMetadataMetadataSerializer extends StdSerializer { + public IncidentIntegrationMetadataMetadataSerializer(Class t) { + super(t); + } + + public IncidentIntegrationMetadataMetadataSerializer() { + this(null); + } + + @Override + public void serialize(IncidentIntegrationMetadataMetadata value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class IncidentIntegrationMetadataMetadataDeserializer extends StdDeserializer { + public IncidentIntegrationMetadataMetadataDeserializer() { + this(IncidentIntegrationMetadataMetadata.class); + } + + public IncidentIntegrationMetadataMetadataDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentIntegrationMetadataMetadata 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 SlackIntegrationMetadata + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SlackIntegrationMetadata.class.equals(Integer.class) || SlackIntegrationMetadata.class.equals(Long.class) || SlackIntegrationMetadata.class.equals(Float.class) || SlackIntegrationMetadata.class.equals(Double.class) || SlackIntegrationMetadata.class.equals(Boolean.class) || SlackIntegrationMetadata.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SlackIntegrationMetadata.class.equals(Integer.class) || SlackIntegrationMetadata.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SlackIntegrationMetadata.class.equals(Float.class) || SlackIntegrationMetadata.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SlackIntegrationMetadata.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SlackIntegrationMetadata.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SlackIntegrationMetadata.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 (!((SlackIntegrationMetadata)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SlackIntegrationMetadata'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SlackIntegrationMetadata'", e); + } + + // deserialize JiraIntegrationMetadata + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (JiraIntegrationMetadata.class.equals(Integer.class) || JiraIntegrationMetadata.class.equals(Long.class) || JiraIntegrationMetadata.class.equals(Float.class) || JiraIntegrationMetadata.class.equals(Double.class) || JiraIntegrationMetadata.class.equals(Boolean.class) || JiraIntegrationMetadata.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((JiraIntegrationMetadata.class.equals(Integer.class) || JiraIntegrationMetadata.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((JiraIntegrationMetadata.class.equals(Float.class) || JiraIntegrationMetadata.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (JiraIntegrationMetadata.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (JiraIntegrationMetadata.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(JiraIntegrationMetadata.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 (!((JiraIntegrationMetadata)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'JiraIntegrationMetadata'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'JiraIntegrationMetadata'", e); + } + + IncidentIntegrationMetadataMetadata ret = new IncidentIntegrationMetadataMetadata(); + 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 IncidentIntegrationMetadataMetadata getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentIntegrationMetadataMetadata cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentIntegrationMetadataMetadata() { + super("oneOf", Boolean.FALSE); + } + public IncidentIntegrationMetadataMetadata(SlackIntegrationMetadata o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public IncidentIntegrationMetadataMetadata(JiraIntegrationMetadata o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("SlackIntegrationMetadata", new GenericType() { + }); + schemas.put("JiraIntegrationMetadata", new GenericType() { + }); + JSON.registerDescendants(IncidentIntegrationMetadataMetadata.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return IncidentIntegrationMetadataMetadata.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SlackIntegrationMetadata, JiraIntegrationMetadata + * + * 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(SlackIntegrationMetadata.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(JiraIntegrationMetadata.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 SlackIntegrationMetadata, JiraIntegrationMetadata"); + } + + /** + * Get the actual instance, which can be the following: + * SlackIntegrationMetadata, JiraIntegrationMetadata + * + * @return The actual instance (SlackIntegrationMetadata, JiraIntegrationMetadata) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `SlackIntegrationMetadata`. If the actual instance is not `SlackIntegrationMetadata`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SlackIntegrationMetadata` + * @throws ClassCastException if the instance is not `SlackIntegrationMetadata` + */ + public SlackIntegrationMetadata getSlackIntegrationMetadata() throws ClassCastException { + return (SlackIntegrationMetadata)super.getActualInstance(); + } + + /** + * Get the actual instance of `JiraIntegrationMetadata`. If the actual instance is not `JiraIntegrationMetadata`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `JiraIntegrationMetadata` + * @throws ClassCastException if the instance is not `JiraIntegrationMetadata` + */ + public JiraIntegrationMetadata getJiraIntegrationMetadata() throws ClassCastException { + return (JiraIntegrationMetadata)super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataPatchData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataPatchData.java new file mode 100644 index 00000000000..6bfd6b8921f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataPatchData.java @@ -0,0 +1,144 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Incident integration metadata data for a patch request.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataPatchData.JSON_PROPERTY_ATTRIBUTES, + IncidentIntegrationMetadataPatchData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataPatchData { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentIntegrationMetadataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentIntegrationMetadataType type = IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS; + + public IncidentIntegrationMetadataPatchData() {} + + @JsonCreator + public IncidentIntegrationMetadataPatchData( + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)IncidentIntegrationMetadataAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentIntegrationMetadataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + public IncidentIntegrationMetadataPatchData attributes(IncidentIntegrationMetadataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + *

Incident integration metadata's attributes for a create request.

+ * @return attributes + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataAttributes getAttributes() { + return attributes; + } + public void setAttributes(IncidentIntegrationMetadataAttributes attributes) { + this.attributes = attributes; + } + public IncidentIntegrationMetadataPatchData type(IncidentIntegrationMetadataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + *

Integration metadata resource type.

+ * @return type + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataType getType() { + return type; + } + public void setType(IncidentIntegrationMetadataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * Return true if this IncidentIntegrationMetadataPatchData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataPatchData incidentIntegrationMetadataPatchData = (IncidentIntegrationMetadataPatchData) o; + return Objects.equals(this.attributes, incidentIntegrationMetadataPatchData.attributes) && Objects.equals(this.type, incidentIntegrationMetadataPatchData.type); + } + + + @Override + public int hashCode() { + return Objects.hash(attributes,type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataPatchData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/IncidentIntegrationMetadataPatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataPatchRequest.java new file mode 100644 index 00000000000..197f8f1d2c2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataPatchRequest.java @@ -0,0 +1,114 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Patch request for an incident integration metadata.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataPatchRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataPatchRequest { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentIntegrationMetadataPatchData data; + + public IncidentIntegrationMetadataPatchRequest() {} + + @JsonCreator + public IncidentIntegrationMetadataPatchRequest( + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentIntegrationMetadataPatchData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + public IncidentIntegrationMetadataPatchRequest data(IncidentIntegrationMetadataPatchData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + *

Incident integration metadata data for a patch request.

+ * @return data + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataPatchData getData() { + return data; + } + public void setData(IncidentIntegrationMetadataPatchData data) { + this.data = data; + } + + /** + * Return true if this IncidentIntegrationMetadataPatchRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataPatchRequest incidentIntegrationMetadataPatchRequest = (IncidentIntegrationMetadataPatchRequest) o; + return Objects.equals(this.data, incidentIntegrationMetadataPatchRequest.data); + } + + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataPatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/IncidentIntegrationMetadataResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponse.java new file mode 100644 index 00000000000..ecb394b31a4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponse.java @@ -0,0 +1,148 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with an incident integration metadata.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataResponse.JSON_PROPERTY_DATA, + IncidentIntegrationMetadataResponse.JSON_PROPERTY_INCLUDED, + IncidentIntegrationMetadataResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataResponse { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private IncidentIntegrationMetadataResponseData data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public static final String JSON_PROPERTY_META = "meta"; + private IncidentIntegrationMetadataResponseMeta meta; + + public IncidentIntegrationMetadataResponse() {} + + @JsonCreator + public IncidentIntegrationMetadataResponse( + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentIntegrationMetadataResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + public IncidentIntegrationMetadataResponse data(IncidentIntegrationMetadataResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + *

Incident integration metadata from a response.

+ * @return data + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataResponseData getData() { + return data; + } + public void setData(IncidentIntegrationMetadataResponseData data) { + this.data = data; + } + + /** + *

Included related resources that the user requested.

+ * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + /** + *

The metadata object containing pagination metadata.

+ * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentIntegrationMetadataResponseMeta getMeta() { + return meta; + } + + /** + * Return true if this IncidentIntegrationMetadataResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataResponse incidentIntegrationMetadataResponse = (IncidentIntegrationMetadataResponse) o; + return Objects.equals(this.data, incidentIntegrationMetadataResponse.data) && Objects.equals(this.included, incidentIntegrationMetadataResponse.included) && Objects.equals(this.meta, incidentIntegrationMetadataResponse.meta); + } + + + @Override + public int hashCode() { + return Objects.hash(data,included,meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).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/IncidentIntegrationMetadataResponseData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseData.java new file mode 100644 index 00000000000..8bafcc47a9e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseData.java @@ -0,0 +1,167 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Incident integration metadata from a response.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataResponseData.JSON_PROPERTY_ATTRIBUTES, + IncidentIntegrationMetadataResponseData.JSON_PROPERTY_ID, + IncidentIntegrationMetadataResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataResponseData { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IncidentIntegrationMetadataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IncidentIntegrationMetadataType type = IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS; + + public IncidentIntegrationMetadataResponseData() {} + + @JsonCreator + public IncidentIntegrationMetadataResponseData( + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentIntegrationMetadataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + public IncidentIntegrationMetadataResponseData attributes(IncidentIntegrationMetadataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + *

Incident integration metadata's attributes for a create request.

+ * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentIntegrationMetadataAttributes getAttributes() { + return attributes; + } + public void setAttributes(IncidentIntegrationMetadataAttributes attributes) { + this.attributes = attributes; + } + public IncidentIntegrationMetadataResponseData id(String id) { + this.id = id; + return this; + } + + /** + *

The incident integration metadata's ID.

+ * @return id + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public IncidentIntegrationMetadataResponseData type(IncidentIntegrationMetadataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + *

Integration metadata resource type.

+ * @return type + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataType getType() { + return type; + } + public void setType(IncidentIntegrationMetadataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * Return true if this IncidentIntegrationMetadataResponseData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataResponseData incidentIntegrationMetadataResponseData = (IncidentIntegrationMetadataResponseData) o; + return Objects.equals(this.attributes, incidentIntegrationMetadataResponseData.attributes) && Objects.equals(this.id, incidentIntegrationMetadataResponseData.id) && Objects.equals(this.type, incidentIntegrationMetadataResponseData.type); + } + + + @Override + public int hashCode() { + return Objects.hash(attributes,id,type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + 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/IncidentIntegrationMetadataResponseIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseIncludedItem.java new file mode 100644 index 00000000000..6b610426178 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseIncludedItem.java @@ -0,0 +1,216 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +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.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 com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; + +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentIntegrationMetadataResponseIncludedItem.IncidentIntegrationMetadataResponseIncludedItemDeserializer.class) +@JsonSerialize(using = IncidentIntegrationMetadataResponseIncludedItem.IncidentIntegrationMetadataResponseIncludedItemSerializer.class) +public class IncidentIntegrationMetadataResponseIncludedItem extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(IncidentIntegrationMetadataResponseIncludedItem.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class IncidentIntegrationMetadataResponseIncludedItemSerializer extends StdSerializer { + public IncidentIntegrationMetadataResponseIncludedItemSerializer(Class t) { + super(t); + } + + public IncidentIntegrationMetadataResponseIncludedItemSerializer() { + this(null); + } + + @Override + public void serialize(IncidentIntegrationMetadataResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class IncidentIntegrationMetadataResponseIncludedItemDeserializer extends StdDeserializer { + public IncidentIntegrationMetadataResponseIncludedItemDeserializer() { + this(IncidentIntegrationMetadataResponseIncludedItem.class); + } + + public IncidentIntegrationMetadataResponseIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentIntegrationMetadataResponseIncludedItem 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + IncidentIntegrationMetadataResponseIncludedItem ret = new IncidentIntegrationMetadataResponseIncludedItem(); + 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 IncidentIntegrationMetadataResponseIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentIntegrationMetadataResponseIncludedItem cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentIntegrationMetadataResponseIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public IncidentIntegrationMetadataResponseIncludedItem(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("User", new GenericType() { + }); + JSON.registerDescendants(IncidentIntegrationMetadataResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return IncidentIntegrationMetadataResponseIncludedItem.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User + * + * 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(User.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 User"); + } + + /** + * Get the actual instance, which can be the following: + * User + * + * @return The actual instance (User) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseMeta.java new file mode 100644 index 00000000000..9eca7fde588 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseMeta.java @@ -0,0 +1,107 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata object containing pagination metadata.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataResponseMeta.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataResponseMeta { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGINATION = "pagination"; + private IncidentIntegrationMetadataResponseMetaPagination pagination; + + public IncidentIntegrationMetadataResponseMeta pagination(IncidentIntegrationMetadataResponseMetaPagination pagination) { + this.pagination = pagination; + this.unparsed |= pagination.unparsed; + return this; + } + + /** + *

Pagination properties.

+ * @return pagination + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentIntegrationMetadataResponseMetaPagination getPagination() { + return pagination; + } + public void setPagination(IncidentIntegrationMetadataResponseMetaPagination pagination) { + this.pagination = pagination; + } + + /** + * Return true if this IncidentIntegrationMetadataResponseMeta object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataResponseMeta incidentIntegrationMetadataResponseMeta = (IncidentIntegrationMetadataResponseMeta) o; + return Objects.equals(this.pagination, incidentIntegrationMetadataResponseMeta.pagination); + } + + + @Override + public int hashCode() { + return Objects.hash(pagination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataResponseMeta {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).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/IncidentIntegrationMetadataResponseMetaPagination.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseMetaPagination.java new file mode 100644 index 00000000000..96bb5b6301c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataResponseMetaPagination.java @@ -0,0 +1,155 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Pagination properties.

+ */ +@JsonPropertyOrder({ + IncidentIntegrationMetadataResponseMetaPagination.JSON_PROPERTY_NEXT_OFFSET, + IncidentIntegrationMetadataResponseMetaPagination.JSON_PROPERTY_OFFSET, + IncidentIntegrationMetadataResponseMetaPagination.JSON_PROPERTY_SIZE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IncidentIntegrationMetadataResponseMetaPagination { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_NEXT_OFFSET = "next_offset"; + private Long nextOffset; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Long offset; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public IncidentIntegrationMetadataResponseMetaPagination nextOffset(Long nextOffset) { + this.nextOffset = nextOffset; + return this; + } + + /** + *

The index of the first element in the next page of results. + * Equal to page size added to the current offset.

+ * @return nextOffset + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNextOffset() { + return nextOffset; + } + public void setNextOffset(Long nextOffset) { + this.nextOffset = nextOffset; + } + public IncidentIntegrationMetadataResponseMetaPagination offset(Long offset) { + this.offset = offset; + return this; + } + + /** + *

The index of the first element in the results.

+ * @return offset + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOffset() { + return offset; + } + public void setOffset(Long offset) { + this.offset = offset; + } + public IncidentIntegrationMetadataResponseMetaPagination size(Long size) { + this.size = size; + return this; + } + + /** + *

Maximum size of pages to return.

+ * @return size + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } + public void setSize(Long size) { + this.size = size; + } + + /** + * Return true if this IncidentIntegrationMetadataResponseMetaPagination object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncidentIntegrationMetadataResponseMetaPagination incidentIntegrationMetadataResponseMetaPagination = (IncidentIntegrationMetadataResponseMetaPagination) o; + return Objects.equals(this.nextOffset, incidentIntegrationMetadataResponseMetaPagination.nextOffset) && Objects.equals(this.offset, incidentIntegrationMetadataResponseMetaPagination.offset) && Objects.equals(this.size, incidentIntegrationMetadataResponseMetaPagination.size); + } + + + @Override + public int hashCode() { + return Objects.hash(nextOffset,offset,size); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncidentIntegrationMetadataResponseMetaPagination {\n"); + sb.append(" nextOffset: ").append(toIndentedString(nextOffset)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).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/IncidentIntegrationMetadataType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataType.java index aa0171b9bb1..a70deeee5b4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentIntegrationMetadataType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Integration metadata resource type. */ -@JsonSerialize( - using = IncidentIntegrationMetadataType.IncidentIntegrationMetadataTypeSerializer.class) +/** + *

Integration metadata resource type.

+ */ +@JsonSerialize(using = IncidentIntegrationMetadataType.IncidentIntegrationMetadataTypeSerializer.class) public class IncidentIntegrationMetadataType { - public static final IncidentIntegrationMetadataType INCIDENT_INTEGRATIONS = - new IncidentIntegrationMetadataType("incident_integrations"); + public static final IncidentIntegrationMetadataType INCIDENT_INTEGRATIONS = new IncidentIntegrationMetadataType("incident_integrations"); - private static final Set allowedValues = - new HashSet(Arrays.asList("incident_integrations")); + private static final Set allowedValues = new HashSet(Arrays.asList("incident_integrations")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentIntegrationMetadataTypeSerializer - extends StdSerializer { - public IncidentIntegrationMetadataTypeSerializer(Class t) { - super(t); - } + public static class IncidentIntegrationMetadataTypeSerializer extends StdSerializer { + public IncidentIntegrationMetadataTypeSerializer(Class t) { + super(t); + } - public IncidentIntegrationMetadataTypeSerializer() { - this(null); - } + public IncidentIntegrationMetadataTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentIntegrationMetadataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentIntegrationMetadataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentIntegrationMetadataType object is equal to o. */ + /** + * Return true if this IncidentIntegrationMetadataType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentNotificationHandle.java b/src/main/java/com/datadog/api/client/v2/model/IncidentNotificationHandle.java index 7ef41013bdd..2eea6c1ca21 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentNotificationHandle.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentNotificationHandle.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A notification handle that will be notified at incident creation. */ + +/** + *

A notification handle that will be notified at incident creation.

+ */ @JsonPropertyOrder({ IncidentNotificationHandle.JSON_PROPERTY_DISPLAY_NAME, IncidentNotificationHandle.JSON_PROPERTY_HANDLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentNotificationHandle { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; private String displayName; @@ -33,43 +53,42 @@ public IncidentNotificationHandle displayName(String displayName) { } /** - * The name of the notified handle. - * + *

The name of the notified handle.

* @return displayName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDisplayName() { - return displayName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } public void setDisplayName(String displayName) { this.displayName = displayName; } - public IncidentNotificationHandle handle(String handle) { this.handle = handle; return this; } /** - * The email address used for the notification. - * + *

The email address used for the notification.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - /** Return true if this IncidentNotificationHandle object is equal to o. */ + /** + * Return true if this IncidentNotificationHandle object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } IncidentNotificationHandle incidentNotificationHandle = (IncidentNotificationHandle) o; - return Objects.equals(this.displayName, incidentNotificationHandle.displayName) - && Objects.equals(this.handle, incidentNotificationHandle.handle); + return Objects.equals(this.displayName, incidentNotificationHandle.displayName) && Objects.equals(this.handle, incidentNotificationHandle.handle); } + @Override public int hashCode() { - return Objects.hash(displayName, handle); + return Objects.hash(displayName,handle); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemType.java index 2cb08b94c74..259e2edbe83 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentPostmortemType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Incident postmortem resource type. */ +/** + *

Incident postmortem resource type.

+ */ @JsonSerialize(using = IncidentPostmortemType.IncidentPostmortemTypeSerializer.class) public class IncidentPostmortemType { - public static final IncidentPostmortemType INCIDENT_POSTMORTEMS = - new IncidentPostmortemType("incident_postmortems"); + public static final IncidentPostmortemType INCIDENT_POSTMORTEMS = new IncidentPostmortemType("incident_postmortems"); - private static final Set allowedValues = - new HashSet(Arrays.asList("incident_postmortems")); + private static final Set allowedValues = new HashSet(Arrays.asList("incident_postmortems")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentPostmortemTypeSerializer - extends StdSerializer { - public IncidentPostmortemTypeSerializer(Class t) { - super(t); - } + public static class IncidentPostmortemTypeSerializer extends StdSerializer { + public IncidentPostmortemTypeSerializer(Class t) { + super(t); + } - public IncidentPostmortemTypeSerializer() { - this(null); - } + public IncidentPostmortemTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentPostmortemType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentPostmortemType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentPostmortemType object is equal to o. */ + /** + * Return true if this IncidentPostmortemType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentRelatedObject.java b/src/main/java/com/datadog/api/client/v2/model/IncidentRelatedObject.java index bac2b9f20c9..8b2f489e1b7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentRelatedObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentRelatedObject.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Object related to an incident. */ +/** + *

Object related to an incident.

+ */ @JsonSerialize(using = IncidentRelatedObject.IncidentRelatedObjectSerializer.class) public class IncidentRelatedObject { public static final IncidentRelatedObject USERS = new IncidentRelatedObject("users"); public static final IncidentRelatedObject ATTACHMENTS = new IncidentRelatedObject("attachments"); - private static final Set allowedValues = - new HashSet(Arrays.asList("users", "attachments")); + private static final Set allowedValues = new HashSet(Arrays.asList("users", "attachments")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class IncidentRelatedObjectSerializer extends StdSerializer { - public IncidentRelatedObjectSerializer(Class t) { - super(t); - } - - public IncidentRelatedObjectSerializer() { - this(null); - } - - @Override - public void serialize( - IncidentRelatedObject value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public IncidentRelatedObjectSerializer(Class t) { + super(t); + } + + public IncidentRelatedObjectSerializer() { + this(null); + } + + @Override + public void serialize(IncidentRelatedObject value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentRelatedObject object is equal to o. */ + /** + * Return true if this IncidentRelatedObject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponse.java index 6d0d6e21727..e8ee4d8ce2d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with an incident. */ -@JsonPropertyOrder({IncidentResponse.JSON_PROPERTY_DATA, IncidentResponse.JSON_PROPERTY_INCLUDED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with an incident.

+ */ +@JsonPropertyOrder({ + IncidentResponse.JSON_PROPERTY_DATA, + IncidentResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentResponseData data; @@ -30,11 +51,10 @@ public IncidentResponse() {} @JsonCreator public IncidentResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentResponse data(IncidentResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -42,33 +62,34 @@ public IncidentResponse data(IncidentResponseData data) { } /** - * Incident data from a response. - * + *

Incident data from a response.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentResponseData getData() { + return data; + } public void setData(IncidentResponseData data) { this.data = data; } /** - * Included related resources that the user requested. - * + *

Included related resources that the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } - /** Return true if this IncidentResponse object is equal to o. */ + /** + * Return true if this IncidentResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,13 +99,13 @@ public boolean equals(Object o) { return false; } IncidentResponse incidentResponse = (IncidentResponse) o; - return Objects.equals(this.data, incidentResponse.data) - && Objects.equals(this.included, incidentResponse.included); + return Objects.equals(this.data, incidentResponse.data) && Objects.equals(this.included, incidentResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -98,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseAttributes.java index 40bae5d1fa3..4e43e8bfe42 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseAttributes.java @@ -6,22 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** The incident's attributes from a response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The incident's attributes from a response.

+ */ @JsonPropertyOrder({ IncidentResponseAttributes.JSON_PROPERTY_CREATED, IncidentResponseAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_DURATION, @@ -41,12 +52,11 @@ IncidentResponseAttributes.JSON_PROPERTY_TIME_TO_RESOLVE, IncidentResponseAttributes.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -54,7 +64,6 @@ public class IncidentResponseAttributes { private Long customerImpactDuration; public static final String JSON_PROPERTY_CUSTOMER_IMPACT_END = "customer_impact_end"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable customerImpactEnd = JsonNullable.undefined(); @@ -62,16 +71,13 @@ public class IncidentResponseAttributes { private JsonNullable customerImpactScope = JsonNullable.undefined(); public static final String JSON_PROPERTY_CUSTOMER_IMPACT_START = "customer_impact_start"; - @JsonSerialize(using = JsonTimeSerializer.class) - private JsonNullable customerImpactStart = - JsonNullable.undefined(); + private JsonNullable customerImpactStart = JsonNullable.undefined(); public static final String JSON_PROPERTY_CUSTOMER_IMPACTED = "customer_impacted"; private Boolean customerImpacted; public static final String JSON_PROPERTY_DETECTED = "detected"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable detected = JsonNullable.undefined(); @@ -79,19 +85,16 @@ public class IncidentResponseAttributes { private Map fields = null; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; public static final String JSON_PROPERTY_NOTIFICATION_HANDLES = "notification_handles"; - private JsonNullable> notificationHandles = - JsonNullable.>undefined(); + private JsonNullable> notificationHandles = JsonNullable.>undefined(); public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; private Long publicId; public static final String JSON_PROPERTY_RESOLVED = "resolved"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable resolved = JsonNullable.undefined(); @@ -114,186 +117,161 @@ public IncidentResponseAttributes() {} @JsonCreator public IncidentResponseAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { - this.title = title; + @JsonProperty(required=true, value=JSON_PROPERTY_TITLE)String title) { + this.title = title; } /** - * Timestamp when the incident was created. - * + *

Timestamp when the incident was created.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * Length of the incident's customer impact in seconds. Equals the difference between - * customer_impact_start and customer_impact_end. - * + *

Length of the incident's customer impact in seconds. + * Equals the difference between customer_impact_start and customer_impact_end.

* @return customerImpactDuration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCustomerImpactDuration() { - return customerImpactDuration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCustomerImpactDuration() { + return customerImpactDuration; + } public IncidentResponseAttributes customerImpactEnd(OffsetDateTime customerImpactEnd) { this.customerImpactEnd = JsonNullable.of(customerImpactEnd); return this; } /** - * Timestamp when customers were no longer impacted by the incident. - * + *

Timestamp when customers were no longer impacted by the incident.

* @return customerImpactEnd - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getCustomerImpactEnd() { - return customerImpactEnd.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCustomerImpactEnd() { + return customerImpactEnd.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomerImpactEnd_JsonNullable() { return customerImpactEnd; } - - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END) - public void setCustomerImpactEnd_JsonNullable(JsonNullable customerImpactEnd) { + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END)public void setCustomerImpactEnd_JsonNullable(JsonNullable customerImpactEnd) { this.customerImpactEnd = customerImpactEnd; } - public void setCustomerImpactEnd(OffsetDateTime customerImpactEnd) { this.customerImpactEnd = JsonNullable.of(customerImpactEnd); } - public IncidentResponseAttributes customerImpactScope(String customerImpactScope) { this.customerImpactScope = JsonNullable.of(customerImpactScope); return this; } /** - * A summary of the impact customers experienced during the incident. - * + *

A summary of the impact customers experienced during the incident.

* @return customerImpactScope - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getCustomerImpactScope() { - return customerImpactScope.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCustomerImpactScope() { + return customerImpactScope.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomerImpactScope_JsonNullable() { return customerImpactScope; } - - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE) - public void setCustomerImpactScope_JsonNullable(JsonNullable customerImpactScope) { + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE)public void setCustomerImpactScope_JsonNullable(JsonNullable customerImpactScope) { this.customerImpactScope = customerImpactScope; } - public void setCustomerImpactScope(String customerImpactScope) { this.customerImpactScope = JsonNullable.of(customerImpactScope); } - public IncidentResponseAttributes customerImpactStart(OffsetDateTime customerImpactStart) { this.customerImpactStart = JsonNullable.of(customerImpactStart); return this; } /** - * Timestamp when customers began being impacted by the incident. - * + *

Timestamp when customers began being impacted by the incident.

* @return customerImpactStart - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getCustomerImpactStart() { - return customerImpactStart.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCustomerImpactStart() { + return customerImpactStart.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomerImpactStart_JsonNullable() { return customerImpactStart; } - - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START) - public void setCustomerImpactStart_JsonNullable( - JsonNullable customerImpactStart) { + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START)public void setCustomerImpactStart_JsonNullable(JsonNullable customerImpactStart) { this.customerImpactStart = customerImpactStart; } - public void setCustomerImpactStart(OffsetDateTime customerImpactStart) { this.customerImpactStart = JsonNullable.of(customerImpactStart); } - public IncidentResponseAttributes customerImpacted(Boolean customerImpacted) { this.customerImpacted = customerImpacted; return this; } /** - * A flag indicating whether the incident caused customer impact. - * + *

A flag indicating whether the incident caused customer impact.

* @return customerImpacted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCustomerImpacted() { - return customerImpacted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCustomerImpacted() { + return customerImpacted; + } public void setCustomerImpacted(Boolean customerImpacted) { this.customerImpacted = customerImpacted; } - public IncidentResponseAttributes detected(OffsetDateTime detected) { this.detected = JsonNullable.of(detected); return this; } /** - * Timestamp when the incident was detected. - * + *

Timestamp when the incident was detected.

* @return detected - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getDetected() { - return detected.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDetected() { + return detected.orElse(null); + } @JsonProperty(JSON_PROPERTY_DETECTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDetected_JsonNullable() { return detected; } - - @JsonProperty(JSON_PROPERTY_DETECTED) - public void setDetected_JsonNullable(JsonNullable detected) { + @JsonProperty(JSON_PROPERTY_DETECTED)public void setDetected_JsonNullable(JsonNullable detected) { this.detected = detected; } - public void setDetected(OffsetDateTime detected) { this.detected = JsonNullable.of(detected); } - public IncidentResponseAttributes fields(Map fields) { this.fields = fields; return this; } - public IncidentResponseAttributes putFieldsItem(String key, IncidentFieldAttributes fieldsItem) { if (this.fields == null) { this.fields = new HashMap<>(); @@ -303,45 +281,38 @@ public IncidentResponseAttributes putFieldsItem(String key, IncidentFieldAttribu } /** - * A condensed view of the user-defined fields attached to incidents. - * + *

A condensed view of the user-defined fields attached to incidents.

* @return fields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getFields() { - return fields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getFields() { + return fields; + } public void setFields(Map fields) { this.fields = fields; } /** - * Timestamp when the incident was last modified. - * + *

Timestamp when the incident was last modified.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - - public IncidentResponseAttributes notificationHandles( - List notificationHandles) { - this.notificationHandles = - JsonNullable.>of(notificationHandles); + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } + public IncidentResponseAttributes notificationHandles(List notificationHandles) { + this.notificationHandles = JsonNullable.>of(notificationHandles); return this; } - - public IncidentResponseAttributes addNotificationHandlesItem( - IncidentNotificationHandle notificationHandlesItem) { + public IncidentResponseAttributes addNotificationHandlesItem(IncidentNotificationHandle notificationHandlesItem) { if (this.notificationHandles == null || !this.notificationHandles.isPresent()) { - this.notificationHandles = - JsonNullable.>of(new ArrayList<>()); + this.notificationHandles = JsonNullable.>of(new ArrayList<>()); } try { this.notificationHandles.get().add(notificationHandlesItem); @@ -352,159 +323,142 @@ public IncidentResponseAttributes addNotificationHandlesItem( } /** - * Notification handles that will be notified of the incident during update. - * + *

Notification handles that will be notified of the incident during update.

* @return notificationHandles - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getNotificationHandles() { - return notificationHandles.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getNotificationHandles() { + return notificationHandles.orElse(null); + } @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getNotificationHandles_JsonNullable() { return notificationHandles; } - - @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES) - public void setNotificationHandles_JsonNullable( - JsonNullable> notificationHandles) { + @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES)public void setNotificationHandles_JsonNullable(JsonNullable> notificationHandles) { this.notificationHandles = notificationHandles; } - public void setNotificationHandles(List notificationHandles) { - this.notificationHandles = - JsonNullable.>of(notificationHandles); + this.notificationHandles = JsonNullable.>of(notificationHandles); } - public IncidentResponseAttributes publicId(Long publicId) { this.publicId = publicId; return this; } /** - * The monotonically increasing integer ID for the incident. - * + *

The monotonically increasing integer ID for the incident.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPublicId() { + return publicId; + } public void setPublicId(Long publicId) { this.publicId = publicId; } - public IncidentResponseAttributes resolved(OffsetDateTime resolved) { this.resolved = JsonNullable.of(resolved); return this; } /** - * Timestamp when the incident's state was last changed from active or stable to resolved or - * completed. - * + *

Timestamp when the incident's state was last changed from active or stable to resolved or completed.

* @return resolved - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getResolved() { - return resolved.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getResolved() { + return resolved.orElse(null); + } @JsonProperty(JSON_PROPERTY_RESOLVED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getResolved_JsonNullable() { return resolved; } - - @JsonProperty(JSON_PROPERTY_RESOLVED) - public void setResolved_JsonNullable(JsonNullable resolved) { + @JsonProperty(JSON_PROPERTY_RESOLVED)public void setResolved_JsonNullable(JsonNullable resolved) { this.resolved = resolved; } - public void setResolved(OffsetDateTime resolved) { this.resolved = JsonNullable.of(resolved); } /** - * The amount of time in seconds to detect the incident. Equals the difference between - * customer_impact_start and detected. - * + *

The amount of time in seconds to detect the incident. + * Equals the difference between customer_impact_start and detected.

* @return timeToDetect - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_DETECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeToDetect() { - return timeToDetect; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_DETECT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeToDetect() { + return timeToDetect; + } /** - * The amount of time in seconds to call incident after detection. Equals the difference of - * detected and created. - * + *

The amount of time in seconds to call incident after detection. Equals the difference of detected and created.

* @return timeToInternalResponse - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_INTERNAL_RESPONSE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeToInternalResponse() { - return timeToInternalResponse; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_INTERNAL_RESPONSE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeToInternalResponse() { + return timeToInternalResponse; + } /** - * The amount of time in seconds to resolve customer impact after detecting the issue. Equals the - * difference between customer_impact_end and detected. - * + *

The amount of time in seconds to resolve customer impact after detecting the issue. Equals the difference between customer_impact_end and detected.

* @return timeToRepair - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_REPAIR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeToRepair() { - return timeToRepair; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_REPAIR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeToRepair() { + return timeToRepair; + } /** - * The amount of time in seconds to resolve the incident after it was created. Equals the - * difference between created and resolved. - * + *

The amount of time in seconds to resolve the incident after it was created. Equals the difference between created and resolved.

* @return timeToResolve - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_RESOLVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeToResolve() { - return timeToResolve; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_RESOLVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeToResolve() { + return timeToResolve; + } public IncidentResponseAttributes title(String title) { this.title = title; return this; } /** - * The title of the incident, which summarizes what happened. - * + *

The title of the incident, which summarizes what happened.

* @return title - */ - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - + **/ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this IncidentResponseAttributes object is equal to o. */ + /** + * Return true if this IncidentResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -514,47 +468,13 @@ public boolean equals(Object o) { return false; } IncidentResponseAttributes incidentResponseAttributes = (IncidentResponseAttributes) o; - return Objects.equals(this.created, incidentResponseAttributes.created) - && Objects.equals( - this.customerImpactDuration, incidentResponseAttributes.customerImpactDuration) - && Objects.equals(this.customerImpactEnd, incidentResponseAttributes.customerImpactEnd) - && Objects.equals(this.customerImpactScope, incidentResponseAttributes.customerImpactScope) - && Objects.equals(this.customerImpactStart, incidentResponseAttributes.customerImpactStart) - && Objects.equals(this.customerImpacted, incidentResponseAttributes.customerImpacted) - && Objects.equals(this.detected, incidentResponseAttributes.detected) - && Objects.equals(this.fields, incidentResponseAttributes.fields) - && Objects.equals(this.modified, incidentResponseAttributes.modified) - && Objects.equals(this.notificationHandles, incidentResponseAttributes.notificationHandles) - && Objects.equals(this.publicId, incidentResponseAttributes.publicId) - && Objects.equals(this.resolved, incidentResponseAttributes.resolved) - && Objects.equals(this.timeToDetect, incidentResponseAttributes.timeToDetect) - && Objects.equals( - this.timeToInternalResponse, incidentResponseAttributes.timeToInternalResponse) - && Objects.equals(this.timeToRepair, incidentResponseAttributes.timeToRepair) - && Objects.equals(this.timeToResolve, incidentResponseAttributes.timeToResolve) - && Objects.equals(this.title, incidentResponseAttributes.title); + return Objects.equals(this.created, incidentResponseAttributes.created) && Objects.equals(this.customerImpactDuration, incidentResponseAttributes.customerImpactDuration) && Objects.equals(this.customerImpactEnd, incidentResponseAttributes.customerImpactEnd) && Objects.equals(this.customerImpactScope, incidentResponseAttributes.customerImpactScope) && Objects.equals(this.customerImpactStart, incidentResponseAttributes.customerImpactStart) && Objects.equals(this.customerImpacted, incidentResponseAttributes.customerImpacted) && Objects.equals(this.detected, incidentResponseAttributes.detected) && Objects.equals(this.fields, incidentResponseAttributes.fields) && Objects.equals(this.modified, incidentResponseAttributes.modified) && Objects.equals(this.notificationHandles, incidentResponseAttributes.notificationHandles) && Objects.equals(this.publicId, incidentResponseAttributes.publicId) && Objects.equals(this.resolved, incidentResponseAttributes.resolved) && Objects.equals(this.timeToDetect, incidentResponseAttributes.timeToDetect) && Objects.equals(this.timeToInternalResponse, incidentResponseAttributes.timeToInternalResponse) && Objects.equals(this.timeToRepair, incidentResponseAttributes.timeToRepair) && Objects.equals(this.timeToResolve, incidentResponseAttributes.timeToResolve) && Objects.equals(this.title, incidentResponseAttributes.title); } + @Override public int hashCode() { - return Objects.hash( - created, - customerImpactDuration, - customerImpactEnd, - customerImpactScope, - customerImpactStart, - customerImpacted, - detected, - fields, - modified, - notificationHandles, - publicId, - resolved, - timeToDetect, - timeToInternalResponse, - timeToRepair, - timeToResolve, - title); + return Objects.hash(created,customerImpactDuration,customerImpactEnd,customerImpactScope,customerImpactStart,customerImpacted,detected,fields,modified,notificationHandles,publicId,resolved,timeToDetect,timeToInternalResponse,timeToRepair,timeToResolve,title); } @Override @@ -562,29 +482,19 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IncidentResponseAttributes {\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); - sb.append(" customerImpactDuration: ") - .append(toIndentedString(customerImpactDuration)) - .append("\n"); + sb.append(" customerImpactDuration: ").append(toIndentedString(customerImpactDuration)).append("\n"); sb.append(" customerImpactEnd: ").append(toIndentedString(customerImpactEnd)).append("\n"); - sb.append(" customerImpactScope: ") - .append(toIndentedString(customerImpactScope)) - .append("\n"); - sb.append(" customerImpactStart: ") - .append(toIndentedString(customerImpactStart)) - .append("\n"); + sb.append(" customerImpactScope: ").append(toIndentedString(customerImpactScope)).append("\n"); + sb.append(" customerImpactStart: ").append(toIndentedString(customerImpactStart)).append("\n"); sb.append(" customerImpacted: ").append(toIndentedString(customerImpacted)).append("\n"); sb.append(" detected: ").append(toIndentedString(detected)).append("\n"); sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); - sb.append(" notificationHandles: ") - .append(toIndentedString(notificationHandles)) - .append("\n"); + sb.append(" notificationHandles: ").append(toIndentedString(notificationHandles)).append("\n"); sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); sb.append(" resolved: ").append(toIndentedString(resolved)).append("\n"); sb.append(" timeToDetect: ").append(toIndentedString(timeToDetect)).append("\n"); - sb.append(" timeToInternalResponse: ") - .append(toIndentedString(timeToInternalResponse)) - .append("\n"); + sb.append(" timeToInternalResponse: ").append(toIndentedString(timeToInternalResponse)).append("\n"); sb.append(" timeToRepair: ").append(toIndentedString(timeToRepair)).append("\n"); sb.append(" timeToResolve: ").append(toIndentedString(timeToResolve)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); @@ -593,7 +503,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseData.java index d06d18cf320..cd4b0f0dabc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Incident data from a response. */ +/** + *

Incident data from a response.

+ */ @JsonPropertyOrder({ IncidentResponseData.JSON_PROPERTY_ATTRIBUTES, IncidentResponseData.JSON_PROPERTY_ID, IncidentResponseData.JSON_PROPERTY_RELATIONSHIPS, IncidentResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentResponseAttributes attributes; @@ -40,13 +59,12 @@ public IncidentResponseData() {} @JsonCreator public IncidentResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentResponseData attributes(IncidentResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,41 +72,37 @@ public IncidentResponseData attributes(IncidentResponseAttributes attributes) { } /** - * The incident's attributes from a response. - * + *

The incident's attributes from a response.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentResponseAttributes attributes) { this.attributes = attributes; } - public IncidentResponseData id(String id) { this.id = id; return this; } /** - * The incident's ID. - * + *

The incident's ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public IncidentResponseData relationships(IncidentResponseRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -96,21 +110,19 @@ public IncidentResponseData relationships(IncidentResponseRelationships relation } /** - * The incident's relationships from a response. - * + *

The incident's relationships from a response.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponseRelationships getRelationships() { + return relationships; + } public void setRelationships(IncidentResponseRelationships relationships) { this.relationships = relationships; } - public IncidentResponseData type(IncidentType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -118,24 +130,25 @@ public IncidentResponseData type(IncidentType type) { } /** - * Incident resource type. - * + *

Incident resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentType getType() { + return type; + } public void setType(IncidentType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentResponseData object is equal to o. */ + /** + * Return true if this IncidentResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +158,13 @@ public boolean equals(Object o) { return false; } IncidentResponseData incidentResponseData = (IncidentResponseData) o; - return Objects.equals(this.attributes, incidentResponseData.attributes) - && Objects.equals(this.id, incidentResponseData.id) - && Objects.equals(this.relationships, incidentResponseData.relationships) - && Objects.equals(this.type, incidentResponseData.type); + return Objects.equals(this.attributes, incidentResponseData.attributes) && Objects.equals(this.id, incidentResponseData.id) && Objects.equals(this.relationships, incidentResponseData.relationships) && Objects.equals(this.type, incidentResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -169,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseIncludedItem.java index a593460d922..5c7815c3a09 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseIncludedItem.java @@ -6,273 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = IncidentResponseIncludedItem.IncidentResponseIncludedItemDeserializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentResponseIncludedItem.IncidentResponseIncludedItemDeserializer.class) @JsonSerialize(using = IncidentResponseIncludedItem.IncidentResponseIncludedItemSerializer.class) public class IncidentResponseIncludedItem extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IncidentResponseIncludedItem.class.getName()); + private static final Logger log = Logger.getLogger(IncidentResponseIncludedItem.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class IncidentResponseIncludedItemSerializer extends StdSerializer { + public IncidentResponseIncludedItemSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public IncidentResponseIncludedItemSerializer() { + this(null); + } - public static class IncidentResponseIncludedItemSerializer - extends StdSerializer { - public IncidentResponseIncludedItemSerializer(Class t) { - super(t); + @Override + public void serialize(IncidentResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentResponseIncludedItemSerializer() { - this(null); + public static class IncidentResponseIncludedItemDeserializer extends StdDeserializer { + public IncidentResponseIncludedItemDeserializer() { + this(IncidentResponseIncludedItem.class); + } + + public IncidentResponseIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentResponseIncludedItem 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + // deserialize IncidentAttachmentData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentAttachmentData.class.equals(Integer.class) || IncidentAttachmentData.class.equals(Long.class) || IncidentAttachmentData.class.equals(Float.class) || IncidentAttachmentData.class.equals(Double.class) || IncidentAttachmentData.class.equals(Boolean.class) || IncidentAttachmentData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentAttachmentData.class.equals(Integer.class) || IncidentAttachmentData.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentAttachmentData.class.equals(Float.class) || IncidentAttachmentData.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentAttachmentData.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentAttachmentData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentData.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 (!((IncidentAttachmentData)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentAttachmentData'", e); + } + + IncidentResponseIncludedItem ret = new IncidentResponseIncludedItem(); + 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 IncidentResponseIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentResponseIncludedItem cannot be null"); + } } - @Override - public void serialize( - IncidentResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentResponseIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public IncidentResponseIncludedItem(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public IncidentResponseIncludedItem(IncidentAttachmentData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentResponseIncludedItemDeserializer - extends StdDeserializer { - public IncidentResponseIncludedItemDeserializer() { - this(IncidentResponseIncludedItem.class); + static { + schemas.put("User", new GenericType() { + }); + schemas.put("IncidentAttachmentData", new GenericType() { + }); + JSON.registerDescendants(IncidentResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); } - public IncidentResponseIncludedItemDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentResponseIncludedItem.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User, IncidentAttachmentData + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentResponseIncludedItem 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 User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); + if (JSON.isInstanceOf(IncidentAttachmentData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - // deserialize IncidentAttachmentData - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentAttachmentData.class.equals(Integer.class) - || IncidentAttachmentData.class.equals(Long.class) - || IncidentAttachmentData.class.equals(Float.class) - || IncidentAttachmentData.class.equals(Double.class) - || IncidentAttachmentData.class.equals(Boolean.class) - || IncidentAttachmentData.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentAttachmentData.class.equals(Integer.class) - || IncidentAttachmentData.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentAttachmentData.class.equals(Float.class) - || IncidentAttachmentData.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentAttachmentData.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentAttachmentData.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentAttachmentData.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 (!((IncidentAttachmentData) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'IncidentAttachmentData'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'IncidentAttachmentData'", e); - } - - IncidentResponseIncludedItem ret = new IncidentResponseIncludedItem(); - 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; + throw new RuntimeException("Invalid instance type. Must be User, IncidentAttachmentData"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * User, IncidentAttachmentData + * + * @return The actual instance (User, IncidentAttachmentData) + */ @Override - public IncidentResponseIncludedItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentResponseIncludedItem cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentResponseIncludedItem() { - super("oneOf", Boolean.FALSE); - } - - public IncidentResponseIncludedItem(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public IncidentResponseIncludedItem(IncidentAttachmentData o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - schemas.put("IncidentAttachmentData", new GenericType() {}); - JSON.registerDescendants( - IncidentResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentResponseIncludedItem.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User, IncidentAttachmentData - * - *

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(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(IncidentAttachmentData.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentAttachmentData`. If the actual instance is not `IncidentAttachmentData`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentAttachmentData` + * @throws ClassCastException if the instance is not `IncidentAttachmentData` + */ + public IncidentAttachmentData getIncidentAttachmentData() throws ClassCastException { + return (IncidentAttachmentData)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be User, IncidentAttachmentData"); - } - - /** - * Get the actual instance, which can be the following: User, IncidentAttachmentData - * - * @return The actual instance (User, IncidentAttachmentData) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentAttachmentData`. If the actual instance is not - * `IncidentAttachmentData`, the ClassCastException will be thrown. - * - * @return The actual instance of `IncidentAttachmentData` - * @throws ClassCastException if the instance is not `IncidentAttachmentData` - */ - public IncidentAttachmentData getIncidentAttachmentData() throws ClassCastException { - return (IncidentAttachmentData) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMeta.java index eec39873b89..2d1ac42ca4f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The metadata object containing pagination metadata. */ -@JsonPropertyOrder({IncidentResponseMeta.JSON_PROPERTY_PAGINATION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The metadata object containing pagination metadata.

+ */ +@JsonPropertyOrder({ + IncidentResponseMeta.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentResponseMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGINATION = "pagination"; private IncidentResponseMetaPagination pagination; @@ -28,22 +50,23 @@ public IncidentResponseMeta pagination(IncidentResponseMetaPagination pagination } /** - * Pagination properties. - * + *

Pagination properties.

* @return pagination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGINATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseMetaPagination getPagination() { - return pagination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponseMetaPagination getPagination() { + return pagination; + } public void setPagination(IncidentResponseMetaPagination pagination) { this.pagination = pagination; } - /** Return true if this IncidentResponseMeta object is equal to o. */ + /** + * Return true if this IncidentResponseMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.pagination, incidentResponseMeta.pagination); } + @Override public int hashCode() { return Objects.hash(pagination); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMetaPagination.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMetaPagination.java index 4185854aa18..96c106bafc1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMetaPagination.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseMetaPagination.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Pagination properties. */ + +/** + *

Pagination properties.

+ */ @JsonPropertyOrder({ IncidentResponseMetaPagination.JSON_PROPERTY_NEXT_OFFSET, IncidentResponseMetaPagination.JSON_PROPERTY_OFFSET, IncidentResponseMetaPagination.JSON_PROPERTY_SIZE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentResponseMetaPagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT_OFFSET = "next_offset"; private Long nextOffset; @@ -37,65 +57,61 @@ public IncidentResponseMetaPagination nextOffset(Long nextOffset) { } /** - * The index of the first element in the next page of results. Equal to page size added to the - * current offset. - * + *

The index of the first element in the next page of results. Equal to page size added to the current offset.

* @return nextOffset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNextOffset() { - return nextOffset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNextOffset() { + return nextOffset; + } public void setNextOffset(Long nextOffset) { this.nextOffset = nextOffset; } - public IncidentResponseMetaPagination offset(Long offset) { this.offset = offset; return this; } /** - * The index of the first element in the results. - * + *

The index of the first element in the results.

* @return offset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOffset() { - return offset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getOffset() { + return offset; + } public void setOffset(Long offset) { this.offset = offset; } - public IncidentResponseMetaPagination size(Long size) { this.size = size; return this; } /** - * Maximum size of pages to return. - * + *

Maximum size of pages to return.

* @return size - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSize() { - return size; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } public void setSize(Long size) { this.size = size; } - /** Return true if this IncidentResponseMetaPagination object is equal to o. */ + /** + * Return true if this IncidentResponseMetaPagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,16 +120,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentResponseMetaPagination incidentResponseMetaPagination = - (IncidentResponseMetaPagination) o; - return Objects.equals(this.nextOffset, incidentResponseMetaPagination.nextOffset) - && Objects.equals(this.offset, incidentResponseMetaPagination.offset) - && Objects.equals(this.size, incidentResponseMetaPagination.size); + IncidentResponseMetaPagination incidentResponseMetaPagination = (IncidentResponseMetaPagination) o; + return Objects.equals(this.nextOffset, incidentResponseMetaPagination.nextOffset) && Objects.equals(this.offset, incidentResponseMetaPagination.offset) && Objects.equals(this.size, incidentResponseMetaPagination.size); } + @Override public int hashCode() { - return Objects.hash(nextOffset, offset, size); + return Objects.hash(nextOffset,offset,size); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseRelationships.java index 767a2297b17..28097e8d4bb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentResponseRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentResponseRelationships.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The incident's relationships from a response. */ +/** + *

The incident's relationships from a response.

+ */ @JsonPropertyOrder({ IncidentResponseRelationships.JSON_PROPERTY_ATTACHMENTS, IncidentResponseRelationships.JSON_PROPERTY_COMMANDER_USER, @@ -20,10 +40,10 @@ IncidentResponseRelationships.JSON_PROPERTY_INTEGRATIONS, IncidentResponseRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentResponseRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; private RelationshipToIncidentAttachment attachments; @@ -46,21 +66,19 @@ public IncidentResponseRelationships attachments(RelationshipToIncidentAttachmen } /** - * A relationship reference for attachments. - * + *

A relationship reference for attachments.

* @return attachments - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToIncidentAttachment getAttachments() { - return attachments; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentAttachment getAttachments() { + return attachments; + } public void setAttachments(RelationshipToIncidentAttachment attachments) { this.attachments = attachments; } - public IncidentResponseRelationships commanderUser(NullableRelationshipToUser commanderUser) { this.commanderUser = commanderUser; this.unparsed |= commanderUser.unparsed; @@ -68,21 +86,19 @@ public IncidentResponseRelationships commanderUser(NullableRelationshipToUser co } /** - * Relationship to user. - * + *

Relationship to user.

* @return commanderUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMMANDER_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NullableRelationshipToUser getCommanderUser() { - return commanderUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMANDER_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NullableRelationshipToUser getCommanderUser() { + return commanderUser; + } public void setCommanderUser(NullableRelationshipToUser commanderUser) { this.commanderUser = commanderUser; } - public IncidentResponseRelationships createdByUser(RelationshipToUser createdByUser) { this.createdByUser = createdByUser; this.unparsed |= createdByUser.unparsed; @@ -90,44 +106,39 @@ public IncidentResponseRelationships createdByUser(RelationshipToUser createdByU } /** - * Relationship to user. - * + *

Relationship to user.

* @return createdByUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getCreatedByUser() { - return createdByUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedByUser() { + return createdByUser; + } public void setCreatedByUser(RelationshipToUser createdByUser) { this.createdByUser = createdByUser; } - - public IncidentResponseRelationships integrations( - RelationshipToIncidentIntegrationMetadatas integrations) { + public IncidentResponseRelationships integrations(RelationshipToIncidentIntegrationMetadatas integrations) { this.integrations = integrations; this.unparsed |= integrations.unparsed; return this; } /** - * A relationship reference for multiple integration metadata objects. - * + *

A relationship reference for multiple integration metadata objects.

* @return integrations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGRATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToIncidentIntegrationMetadatas getIntegrations() { - return integrations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentIntegrationMetadatas getIntegrations() { + return integrations; + } public void setIntegrations(RelationshipToIncidentIntegrationMetadatas integrations) { this.integrations = integrations; } - public IncidentResponseRelationships lastModifiedByUser(RelationshipToUser lastModifiedByUser) { this.lastModifiedByUser = lastModifiedByUser; this.unparsed |= lastModifiedByUser.unparsed; @@ -135,22 +146,23 @@ public IncidentResponseRelationships lastModifiedByUser(RelationshipToUser lastM } /** - * Relationship to user. - * + *

Relationship to user.

* @return lastModifiedByUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getLastModifiedByUser() { - return lastModifiedByUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedByUser() { + return lastModifiedByUser; + } public void setLastModifiedByUser(RelationshipToUser lastModifiedByUser) { this.lastModifiedByUser = lastModifiedByUser; } - /** Return true if this IncidentResponseRelationships object is equal to o. */ + /** + * Return true if this IncidentResponseRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -160,18 +172,13 @@ public boolean equals(Object o) { return false; } IncidentResponseRelationships incidentResponseRelationships = (IncidentResponseRelationships) o; - return Objects.equals(this.attachments, incidentResponseRelationships.attachments) - && Objects.equals(this.commanderUser, incidentResponseRelationships.commanderUser) - && Objects.equals(this.createdByUser, incidentResponseRelationships.createdByUser) - && Objects.equals(this.integrations, incidentResponseRelationships.integrations) - && Objects.equals( - this.lastModifiedByUser, incidentResponseRelationships.lastModifiedByUser); + return Objects.equals(this.attachments, incidentResponseRelationships.attachments) && Objects.equals(this.commanderUser, incidentResponseRelationships.commanderUser) && Objects.equals(this.createdByUser, incidentResponseRelationships.createdByUser) && Objects.equals(this.integrations, incidentResponseRelationships.integrations) && Objects.equals(this.lastModifiedByUser, incidentResponseRelationships.lastModifiedByUser); } + @Override public int hashCode() { - return Objects.hash( - attachments, commanderUser, createdByUser, integrations, lastModifiedByUser); + return Objects.hash(attachments,commanderUser,createdByUser,integrations,lastModifiedByUser); } @Override @@ -188,7 +195,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponse.java index d2cda569b18..e553b6750ec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with incidents and facets. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with incidents and facets.

+ */ @JsonPropertyOrder({ IncidentSearchResponse.JSON_PROPERTY_DATA, IncidentSearchResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentSearchResponseData data; @@ -33,11 +51,10 @@ public IncidentSearchResponse() {} @JsonCreator public IncidentSearchResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentSearchResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentSearchResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentSearchResponse data(IncidentSearchResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -45,33 +62,34 @@ public IncidentSearchResponse data(IncidentSearchResponseData data) { } /** - * Data returned by an incident search. - * + *

Data returned by an incident search.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentSearchResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentSearchResponseData getData() { + return data; + } public void setData(IncidentSearchResponseData data) { this.data = data; } /** - * Included related resources that the user requested. - * + *

Included related resources that the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } - /** Return true if this IncidentSearchResponse object is equal to o. */ + /** + * Return true if this IncidentSearchResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +99,13 @@ public boolean equals(Object o) { return false; } IncidentSearchResponse incidentSearchResponse = (IncidentSearchResponse) o; - return Objects.equals(this.data, incidentSearchResponse.data) - && Objects.equals(this.included, incidentSearchResponse.included); + return Objects.equals(this.data, incidentSearchResponse.data) && Objects.equals(this.included, incidentSearchResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -101,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseAttributes.java index f4a5122086d..ac4ecf6341b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseAttributes.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes returned by an incident search. */ + +/** + *

Attributes returned by an incident search.

+ */ @JsonPropertyOrder({ IncidentSearchResponseAttributes.JSON_PROPERTY_FACETS, IncidentSearchResponseAttributes.JSON_PROPERTY_INCIDENTS, IncidentSearchResponseAttributes.JSON_PROPERTY_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACETS = "facets"; private IncidentSearchResponseFacetsData facets; @@ -38,17 +55,14 @@ public IncidentSearchResponseAttributes() {} @JsonCreator public IncidentSearchResponseAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_FACETS) - IncidentSearchResponseFacetsData facets, - @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENTS) - List incidents, - @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL) Integer total) { - this.facets = facets; - this.unparsed |= facets.unparsed; - this.incidents = incidents; - this.total = total; + @JsonProperty(required=true, value=JSON_PROPERTY_FACETS)IncidentSearchResponseFacetsData facets, + @JsonProperty(required=true, value=JSON_PROPERTY_INCIDENTS)List incidents, + @JsonProperty(required=true, value=JSON_PROPERTY_TOTAL)Integer total) { + this.facets = facets; + this.unparsed |= facets.unparsed; + this.incidents = incidents; + this.total = total; } - public IncidentSearchResponseAttributes facets(IncidentSearchResponseFacetsData facets) { this.facets = facets; this.unparsed |= facets.unparsed; @@ -56,72 +70,67 @@ public IncidentSearchResponseAttributes facets(IncidentSearchResponseFacetsData } /** - * Facet data for incidents returned by a search query. - * + *

Facet data for incidents returned by a search query.

* @return facets - */ - @JsonProperty(JSON_PROPERTY_FACETS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentSearchResponseFacetsData getFacets() { - return facets; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACETS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentSearchResponseFacetsData getFacets() { + return facets; + } public void setFacets(IncidentSearchResponseFacetsData facets) { this.facets = facets; } - - public IncidentSearchResponseAttributes incidents( - List incidents) { + public IncidentSearchResponseAttributes incidents(List incidents) { this.incidents = incidents; for (IncidentSearchResponseIncidentsData item : incidents) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseAttributes addIncidentsItem( - IncidentSearchResponseIncidentsData incidentsItem) { + public IncidentSearchResponseAttributes addIncidentsItem(IncidentSearchResponseIncidentsData incidentsItem) { this.incidents.add(incidentsItem); this.unparsed |= incidentsItem.unparsed; return this; } /** - * Incidents returned by the search. - * + *

Incidents returned by the search.

* @return incidents - */ - @JsonProperty(JSON_PROPERTY_INCIDENTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getIncidents() { - return incidents; - } - + **/ + @JsonProperty(JSON_PROPERTY_INCIDENTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getIncidents() { + return incidents; + } public void setIncidents(List incidents) { this.incidents = incidents; } - public IncidentSearchResponseAttributes total(Integer total) { this.total = total; return this; } /** - * Number of incidents returned by the search. maximum: 2147483647 - * + *

Number of incidents returned by the search.

+ * maximum: 2147483647 * @return total - */ - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getTotal() { - return total; - } - + **/ + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } public void setTotal(Integer total) { this.total = total; } - /** Return true if this IncidentSearchResponseAttributes object is equal to o. */ + /** + * Return true if this IncidentSearchResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -130,16 +139,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseAttributes incidentSearchResponseAttributes = - (IncidentSearchResponseAttributes) o; - return Objects.equals(this.facets, incidentSearchResponseAttributes.facets) - && Objects.equals(this.incidents, incidentSearchResponseAttributes.incidents) - && Objects.equals(this.total, incidentSearchResponseAttributes.total); + IncidentSearchResponseAttributes incidentSearchResponseAttributes = (IncidentSearchResponseAttributes) o; + return Objects.equals(this.facets, incidentSearchResponseAttributes.facets) && Objects.equals(this.incidents, incidentSearchResponseAttributes.incidents) && Objects.equals(this.total, incidentSearchResponseAttributes.total); } + @Override public int hashCode() { - return Objects.hash(facets, incidents, total); + return Objects.hash(facets,incidents,total); } @Override @@ -154,7 +161,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseData.java index 38486b7ccb0..89e4d536345 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data returned by an incident search. */ + +/** + *

Data returned by an incident search.

+ */ @JsonPropertyOrder({ IncidentSearchResponseData.JSON_PROPERTY_ATTRIBUTES, IncidentSearchResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentSearchResponseAttributes attributes; @@ -34,21 +54,19 @@ public IncidentSearchResponseData attributes(IncidentSearchResponseAttributes at } /** - * Attributes returned by an incident search. - * + *

Attributes returned by an incident search.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentSearchResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentSearchResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentSearchResponseAttributes attributes) { this.attributes = attributes; } - public IncidentSearchResponseData type(IncidentSearchResultsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +74,26 @@ public IncidentSearchResponseData type(IncidentSearchResultsType type) { } /** - * Incident search result type. - * + *

Incident search result type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentSearchResultsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentSearchResultsType getType() { + return type; + } public void setType(IncidentSearchResultsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentSearchResponseData object is equal to o. */ + /** + * Return true if this IncidentSearchResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +103,13 @@ public boolean equals(Object o) { return false; } IncidentSearchResponseData incidentSearchResponseData = (IncidentSearchResponseData) o; - return Objects.equals(this.attributes, incidentSearchResponseData.attributes) - && Objects.equals(this.type, incidentSearchResponseData.type); + return Objects.equals(this.attributes, incidentSearchResponseData.attributes) && Objects.equals(this.type, incidentSearchResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -104,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFacetsData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFacetsData.java index 5cbb7960027..47475c9d098 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFacetsData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFacetsData.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Facet data for incidents returned by a search query. */ +/** + *

Facet data for incidents returned by a search query.

+ */ @JsonPropertyOrder({ IncidentSearchResponseFacetsData.JSON_PROPERTY_COMMANDER, IncidentSearchResponseFacetsData.JSON_PROPERTY_CREATED_BY, @@ -28,10 +46,10 @@ IncidentSearchResponseFacetsData.JSON_PROPERTY_TIME_TO_REPAIR, IncidentSearchResponseFacetsData.JSON_PROPERTY_TIME_TO_RESOLVE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseFacetsData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMMANDER = "commander"; private List commander = null; @@ -65,17 +83,14 @@ public class IncidentSearchResponseFacetsData { public static final String JSON_PROPERTY_TIME_TO_RESOLVE = "time_to_resolve"; private List timeToResolve = null; - public IncidentSearchResponseFacetsData commander( - List commander) { + public IncidentSearchResponseFacetsData commander(List commander) { this.commander = commander; for (IncidentSearchResponseUserFacetData item : commander) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addCommanderItem( - IncidentSearchResponseUserFacetData commanderItem) { + public IncidentSearchResponseFacetsData addCommanderItem(IncidentSearchResponseUserFacetData commanderItem) { if (this.commander == null) { this.commander = new ArrayList<>(); } @@ -85,32 +100,27 @@ public IncidentSearchResponseFacetsData addCommanderItem( } /** - * Facet data for incident commander users. - * + *

Facet data for incident commander users.

* @return commander - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMMANDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCommander() { - return commander; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMANDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCommander() { + return commander; + } public void setCommander(List commander) { this.commander = commander; } - - public IncidentSearchResponseFacetsData createdBy( - List createdBy) { + public IncidentSearchResponseFacetsData createdBy(List createdBy) { this.createdBy = createdBy; for (IncidentSearchResponseUserFacetData item : createdBy) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addCreatedByItem( - IncidentSearchResponseUserFacetData createdByItem) { + public IncidentSearchResponseFacetsData addCreatedByItem(IncidentSearchResponseUserFacetData createdByItem) { if (this.createdBy == null) { this.createdBy = new ArrayList<>(); } @@ -120,32 +130,27 @@ public IncidentSearchResponseFacetsData addCreatedByItem( } /** - * Facet data for incident creator users. - * + *

Facet data for incident creator users.

* @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCreatedBy() { - return createdBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCreatedBy() { + return createdBy; + } public void setCreatedBy(List createdBy) { this.createdBy = createdBy; } - - public IncidentSearchResponseFacetsData fields( - List fields) { + public IncidentSearchResponseFacetsData fields(List fields) { this.fields = fields; for (IncidentSearchResponsePropertyFieldFacetData item : fields) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addFieldsItem( - IncidentSearchResponsePropertyFieldFacetData fieldsItem) { + public IncidentSearchResponseFacetsData addFieldsItem(IncidentSearchResponsePropertyFieldFacetData fieldsItem) { if (this.fields == null) { this.fields = new ArrayList<>(); } @@ -155,32 +160,27 @@ public IncidentSearchResponseFacetsData addFieldsItem( } /** - * Facet data for incident property fields. - * + *

Facet data for incident property fields.

* @return fields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFields() { - return fields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFields() { + return fields; + } public void setFields(List fields) { this.fields = fields; } - - public IncidentSearchResponseFacetsData impact( - List impact) { + public IncidentSearchResponseFacetsData impact(List impact) { this.impact = impact; for (IncidentSearchResponseFieldFacetData item : impact) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addImpactItem( - IncidentSearchResponseFieldFacetData impactItem) { + public IncidentSearchResponseFacetsData addImpactItem(IncidentSearchResponseFieldFacetData impactItem) { if (this.impact == null) { this.impact = new ArrayList<>(); } @@ -190,32 +190,27 @@ public IncidentSearchResponseFacetsData addImpactItem( } /** - * Facet data for incident impact attributes. - * + *

Facet data for incident impact attributes.

* @return impact - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IMPACT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getImpact() { - return impact; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPACT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getImpact() { + return impact; + } public void setImpact(List impact) { this.impact = impact; } - - public IncidentSearchResponseFacetsData lastModifiedBy( - List lastModifiedBy) { + public IncidentSearchResponseFacetsData lastModifiedBy(List lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; for (IncidentSearchResponseUserFacetData item : lastModifiedBy) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addLastModifiedByItem( - IncidentSearchResponseUserFacetData lastModifiedByItem) { + public IncidentSearchResponseFacetsData addLastModifiedByItem(IncidentSearchResponseUserFacetData lastModifiedByItem) { if (this.lastModifiedBy == null) { this.lastModifiedBy = new ArrayList<>(); } @@ -225,32 +220,27 @@ public IncidentSearchResponseFacetsData addLastModifiedByItem( } /** - * Facet data for incident last modified by users. - * + *

Facet data for incident last modified by users.

* @return lastModifiedBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLastModifiedBy() { - return lastModifiedBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLastModifiedBy() { + return lastModifiedBy; + } public void setLastModifiedBy(List lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } - - public IncidentSearchResponseFacetsData postmortem( - List postmortem) { + public IncidentSearchResponseFacetsData postmortem(List postmortem) { this.postmortem = postmortem; for (IncidentSearchResponseFieldFacetData item : postmortem) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addPostmortemItem( - IncidentSearchResponseFieldFacetData postmortemItem) { + public IncidentSearchResponseFacetsData addPostmortemItem(IncidentSearchResponseFieldFacetData postmortemItem) { if (this.postmortem == null) { this.postmortem = new ArrayList<>(); } @@ -260,32 +250,27 @@ public IncidentSearchResponseFacetsData addPostmortemItem( } /** - * Facet data for incident postmortem existence. - * + *

Facet data for incident postmortem existence.

* @return postmortem - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POSTMORTEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPostmortem() { - return postmortem; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSTMORTEM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getPostmortem() { + return postmortem; + } public void setPostmortem(List postmortem) { this.postmortem = postmortem; } - - public IncidentSearchResponseFacetsData responder( - List responder) { + public IncidentSearchResponseFacetsData responder(List responder) { this.responder = responder; for (IncidentSearchResponseUserFacetData item : responder) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addResponderItem( - IncidentSearchResponseUserFacetData responderItem) { + public IncidentSearchResponseFacetsData addResponderItem(IncidentSearchResponseUserFacetData responderItem) { if (this.responder == null) { this.responder = new ArrayList<>(); } @@ -295,32 +280,27 @@ public IncidentSearchResponseFacetsData addResponderItem( } /** - * Facet data for incident responder users. - * + *

Facet data for incident responder users.

* @return responder - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESPONDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResponder() { - return responder; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResponder() { + return responder; + } public void setResponder(List responder) { this.responder = responder; } - - public IncidentSearchResponseFacetsData severity( - List severity) { + public IncidentSearchResponseFacetsData severity(List severity) { this.severity = severity; for (IncidentSearchResponseFieldFacetData item : severity) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addSeverityItem( - IncidentSearchResponseFieldFacetData severityItem) { + public IncidentSearchResponseFacetsData addSeverityItem(IncidentSearchResponseFieldFacetData severityItem) { if (this.severity == null) { this.severity = new ArrayList<>(); } @@ -330,21 +310,19 @@ public IncidentSearchResponseFacetsData addSeverityItem( } /** - * Facet data for incident severity attributes. - * + *

Facet data for incident severity attributes.

* @return severity - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SEVERITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSeverity() { - return severity; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSeverity() { + return severity; + } public void setSeverity(List severity) { this.severity = severity; } - public IncidentSearchResponseFacetsData state(List state) { this.state = state; for (IncidentSearchResponseFieldFacetData item : state) { @@ -352,9 +330,7 @@ public IncidentSearchResponseFacetsData state(List(); } @@ -364,32 +340,27 @@ public IncidentSearchResponseFacetsData addStateItem( } /** - * Facet data for incident state attributes. - * + *

Facet data for incident state attributes.

* @return state - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getState() { - return state; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getState() { + return state; + } public void setState(List state) { this.state = state; } - - public IncidentSearchResponseFacetsData timeToRepair( - List timeToRepair) { + public IncidentSearchResponseFacetsData timeToRepair(List timeToRepair) { this.timeToRepair = timeToRepair; for (IncidentSearchResponseNumericFacetData item : timeToRepair) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addTimeToRepairItem( - IncidentSearchResponseNumericFacetData timeToRepairItem) { + public IncidentSearchResponseFacetsData addTimeToRepairItem(IncidentSearchResponseNumericFacetData timeToRepairItem) { if (this.timeToRepair == null) { this.timeToRepair = new ArrayList<>(); } @@ -399,32 +370,27 @@ public IncidentSearchResponseFacetsData addTimeToRepairItem( } /** - * Facet data for incident time to repair metrics. - * + *

Facet data for incident time to repair metrics.

* @return timeToRepair - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_REPAIR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimeToRepair() { - return timeToRepair; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_REPAIR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimeToRepair() { + return timeToRepair; + } public void setTimeToRepair(List timeToRepair) { this.timeToRepair = timeToRepair; } - - public IncidentSearchResponseFacetsData timeToResolve( - List timeToResolve) { + public IncidentSearchResponseFacetsData timeToResolve(List timeToResolve) { this.timeToResolve = timeToResolve; for (IncidentSearchResponseNumericFacetData item : timeToResolve) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponseFacetsData addTimeToResolveItem( - IncidentSearchResponseNumericFacetData timeToResolveItem) { + public IncidentSearchResponseFacetsData addTimeToResolveItem(IncidentSearchResponseNumericFacetData timeToResolveItem) { if (this.timeToResolve == null) { this.timeToResolve = new ArrayList<>(); } @@ -434,22 +400,23 @@ public IncidentSearchResponseFacetsData addTimeToResolveItem( } /** - * Facet data for incident time to resolve metrics. - * + *

Facet data for incident time to resolve metrics.

* @return timeToResolve - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_TO_RESOLVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimeToResolve() { - return timeToResolve; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_TO_RESOLVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimeToResolve() { + return timeToResolve; + } public void setTimeToResolve(List timeToResolve) { this.timeToResolve = timeToResolve; } - /** Return true if this IncidentSearchResponseFacetsData object is equal to o. */ + /** + * Return true if this IncidentSearchResponseFacetsData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -458,35 +425,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseFacetsData incidentSearchResponseFacetsData = - (IncidentSearchResponseFacetsData) o; - return Objects.equals(this.commander, incidentSearchResponseFacetsData.commander) - && Objects.equals(this.createdBy, incidentSearchResponseFacetsData.createdBy) - && Objects.equals(this.fields, incidentSearchResponseFacetsData.fields) - && Objects.equals(this.impact, incidentSearchResponseFacetsData.impact) - && Objects.equals(this.lastModifiedBy, incidentSearchResponseFacetsData.lastModifiedBy) - && Objects.equals(this.postmortem, incidentSearchResponseFacetsData.postmortem) - && Objects.equals(this.responder, incidentSearchResponseFacetsData.responder) - && Objects.equals(this.severity, incidentSearchResponseFacetsData.severity) - && Objects.equals(this.state, incidentSearchResponseFacetsData.state) - && Objects.equals(this.timeToRepair, incidentSearchResponseFacetsData.timeToRepair) - && Objects.equals(this.timeToResolve, incidentSearchResponseFacetsData.timeToResolve); + IncidentSearchResponseFacetsData incidentSearchResponseFacetsData = (IncidentSearchResponseFacetsData) o; + return Objects.equals(this.commander, incidentSearchResponseFacetsData.commander) && Objects.equals(this.createdBy, incidentSearchResponseFacetsData.createdBy) && Objects.equals(this.fields, incidentSearchResponseFacetsData.fields) && Objects.equals(this.impact, incidentSearchResponseFacetsData.impact) && Objects.equals(this.lastModifiedBy, incidentSearchResponseFacetsData.lastModifiedBy) && Objects.equals(this.postmortem, incidentSearchResponseFacetsData.postmortem) && Objects.equals(this.responder, incidentSearchResponseFacetsData.responder) && Objects.equals(this.severity, incidentSearchResponseFacetsData.severity) && Objects.equals(this.state, incidentSearchResponseFacetsData.state) && Objects.equals(this.timeToRepair, incidentSearchResponseFacetsData.timeToRepair) && Objects.equals(this.timeToResolve, incidentSearchResponseFacetsData.timeToResolve); } + @Override public int hashCode() { - return Objects.hash( - commander, - createdBy, - fields, - impact, - lastModifiedBy, - postmortem, - responder, - severity, - state, - timeToRepair, - timeToResolve); + return Objects.hash(commander,createdBy,fields,impact,lastModifiedBy,postmortem,responder,severity,state,timeToRepair,timeToResolve); } @Override @@ -509,7 +455,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFieldFacetData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFieldFacetData.java index 73724b7ddba..fb51ffcac27 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFieldFacetData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseFieldFacetData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Facet value and number of occurrences for a property field of an incident. */ + +/** + *

Facet value and number of occurrences for a property field of an incident.

+ */ @JsonPropertyOrder({ IncidentSearchResponseFieldFacetData.JSON_PROPERTY_COUNT, IncidentSearchResponseFieldFacetData.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseFieldFacetData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Integer count; @@ -33,43 +53,43 @@ public IncidentSearchResponseFieldFacetData count(Integer count) { } /** - * Count of the facet value appearing in search results. maximum: 2147483647 - * + *

Count of the facet value appearing in search results.

+ * maximum: 2147483647 * @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } public void setCount(Integer count) { this.count = count; } - public IncidentSearchResponseFieldFacetData name(String name) { this.name = name; return this; } /** - * The facet value appearing in search results. - * + *

The facet value appearing in search results.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentSearchResponseFieldFacetData object is equal to o. */ + /** + * Return true if this IncidentSearchResponseFieldFacetData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +98,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseFieldFacetData incidentSearchResponseFieldFacetData = - (IncidentSearchResponseFieldFacetData) o; - return Objects.equals(this.count, incidentSearchResponseFieldFacetData.count) - && Objects.equals(this.name, incidentSearchResponseFieldFacetData.name); + IncidentSearchResponseFieldFacetData incidentSearchResponseFieldFacetData = (IncidentSearchResponseFieldFacetData) o; + return Objects.equals(this.count, incidentSearchResponseFieldFacetData.count) && Objects.equals(this.name, incidentSearchResponseFieldFacetData.name); } + @Override public int hashCode() { - return Objects.hash(count, name); + return Objects.hash(count,name); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseIncidentsData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseIncidentsData.java index 6b7def09283..8d1faeb7af6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseIncidentsData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseIncidentsData.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident returned by the search. */ -@JsonPropertyOrder({IncidentSearchResponseIncidentsData.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Incident returned by the search.

+ */ +@JsonPropertyOrder({ + IncidentSearchResponseIncidentsData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseIncidentsData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentResponseData data; @@ -26,11 +47,10 @@ public IncidentSearchResponseIncidentsData() {} @JsonCreator public IncidentSearchResponseIncidentsData( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentSearchResponseIncidentsData data(IncidentResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentSearchResponseIncidentsData data(IncidentResponseData data) { } /** - * Incident data from a response. - * + *

Incident data from a response.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentResponseData getData() { + return data; + } public void setData(IncidentResponseData data) { this.data = data; } - /** Return true if this IncidentSearchResponseIncidentsData object is equal to o. */ + /** + * Return true if this IncidentSearchResponseIncidentsData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseIncidentsData incidentSearchResponseIncidentsData = - (IncidentSearchResponseIncidentsData) o; + IncidentSearchResponseIncidentsData incidentSearchResponseIncidentsData = (IncidentSearchResponseIncidentsData) o; return Objects.equals(this.data, incidentSearchResponseIncidentsData.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetData.java index e3225010a2b..9a5e9b0aac7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Facet data numeric attributes of an incident. */ + +/** + *

Facet data numeric attributes of an incident.

+ */ @JsonPropertyOrder({ IncidentSearchResponseNumericFacetData.JSON_PROPERTY_AGGREGATES, IncidentSearchResponseNumericFacetData.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseNumericFacetData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATES = "aggregates"; private IncidentSearchResponseNumericFacetDataAggregates aggregates; @@ -32,57 +51,53 @@ public IncidentSearchResponseNumericFacetData() {} @JsonCreator public IncidentSearchResponseNumericFacetData( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATES) - IncidentSearchResponseNumericFacetDataAggregates aggregates, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.aggregates = aggregates; - this.unparsed |= aggregates.unparsed; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATES)IncidentSearchResponseNumericFacetDataAggregates aggregates, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.aggregates = aggregates; + this.unparsed |= aggregates.unparsed; + this.name = name; } - - public IncidentSearchResponseNumericFacetData aggregates( - IncidentSearchResponseNumericFacetDataAggregates aggregates) { + public IncidentSearchResponseNumericFacetData aggregates(IncidentSearchResponseNumericFacetDataAggregates aggregates) { this.aggregates = aggregates; this.unparsed |= aggregates.unparsed; return this; } /** - * Aggregate information for numeric incident data. - * + *

Aggregate information for numeric incident data.

* @return aggregates - */ - @JsonProperty(JSON_PROPERTY_AGGREGATES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentSearchResponseNumericFacetDataAggregates getAggregates() { - return aggregates; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentSearchResponseNumericFacetDataAggregates getAggregates() { + return aggregates; + } public void setAggregates(IncidentSearchResponseNumericFacetDataAggregates aggregates) { this.aggregates = aggregates; } - public IncidentSearchResponseNumericFacetData name(String name) { this.name = name; return this; } /** - * Name of the incident property field. - * + *

Name of the incident property field.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentSearchResponseNumericFacetData object is equal to o. */ + /** + * Return true if this IncidentSearchResponseNumericFacetData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,15 +106,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseNumericFacetData incidentSearchResponseNumericFacetData = - (IncidentSearchResponseNumericFacetData) o; - return Objects.equals(this.aggregates, incidentSearchResponseNumericFacetData.aggregates) - && Objects.equals(this.name, incidentSearchResponseNumericFacetData.name); + IncidentSearchResponseNumericFacetData incidentSearchResponseNumericFacetData = (IncidentSearchResponseNumericFacetData) o; + return Objects.equals(this.aggregates, incidentSearchResponseNumericFacetData.aggregates) && Objects.equals(this.name, incidentSearchResponseNumericFacetData.name); } + @Override public int hashCode() { - return Objects.hash(aggregates, name); + return Objects.hash(aggregates,name); } @Override @@ -113,7 +127,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetDataAggregates.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetDataAggregates.java index 6bf6eae8664..9cc03462b0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetDataAggregates.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseNumericFacetDataAggregates.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Aggregate information for numeric incident data. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Aggregate information for numeric incident data.

+ */ @JsonPropertyOrder({ IncidentSearchResponseNumericFacetDataAggregates.JSON_PROPERTY_MAX, IncidentSearchResponseNumericFacetDataAggregates.JSON_PROPERTY_MIN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseNumericFacetDataAggregates { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_MAX = "max"; private JsonNullable max = JsonNullable.undefined(); @@ -34,63 +53,56 @@ public IncidentSearchResponseNumericFacetDataAggregates max(Double max) { } /** - * Maximum value of the numeric aggregates. - * + *

Maximum value of the numeric aggregates.

* @return max - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getMax() { - return max.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getMax() { + return max.orElse(null); + } @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMax_JsonNullable() { return max; } - - @JsonProperty(JSON_PROPERTY_MAX) - public void setMax_JsonNullable(JsonNullable max) { + @JsonProperty(JSON_PROPERTY_MAX)public void setMax_JsonNullable(JsonNullable max) { this.max = max; } - public void setMax(Double max) { this.max = JsonNullable.of(max); } - public IncidentSearchResponseNumericFacetDataAggregates min(Double min) { this.min = JsonNullable.of(min); return this; } /** - * Minimum value of the numeric aggregates. - * + *

Minimum value of the numeric aggregates.

* @return min - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Double getMin() { - return min.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Double getMin() { + return min.orElse(null); + } @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getMin_JsonNullable() { return min; } - - @JsonProperty(JSON_PROPERTY_MIN) - public void setMin_JsonNullable(JsonNullable min) { + @JsonProperty(JSON_PROPERTY_MIN)public void setMin_JsonNullable(JsonNullable min) { this.min = min; } - public void setMin(Double min) { this.min = JsonNullable.of(min); } - /** Return true if this IncidentSearchResponseNumericFacetDataAggregates object is equal to o. */ + /** + * Return true if this IncidentSearchResponseNumericFacetDataAggregates object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,16 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseNumericFacetDataAggregates - incidentSearchResponseNumericFacetDataAggregates = - (IncidentSearchResponseNumericFacetDataAggregates) o; - return Objects.equals(this.max, incidentSearchResponseNumericFacetDataAggregates.max) - && Objects.equals(this.min, incidentSearchResponseNumericFacetDataAggregates.min); + IncidentSearchResponseNumericFacetDataAggregates incidentSearchResponseNumericFacetDataAggregates = (IncidentSearchResponseNumericFacetDataAggregates) o; + return Objects.equals(this.max, incidentSearchResponseNumericFacetDataAggregates.max) && Objects.equals(this.min, incidentSearchResponseNumericFacetDataAggregates.min); } + @Override public int hashCode() { - return Objects.hash(max, min); + return Objects.hash(max,min); } @Override @@ -122,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponsePropertyFieldFacetData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponsePropertyFieldFacetData.java index 18d9b696635..cb8e92cb125 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponsePropertyFieldFacetData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponsePropertyFieldFacetData.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Facet data for the incident property fields. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Facet data for the incident property fields.

+ */ @JsonPropertyOrder({ IncidentSearchResponsePropertyFieldFacetData.JSON_PROPERTY_AGGREGATES, IncidentSearchResponsePropertyFieldFacetData.JSON_PROPERTY_FACETS, IncidentSearchResponsePropertyFieldFacetData.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponsePropertyFieldFacetData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATES = "aggregates"; private IncidentSearchResponseNumericFacetDataAggregates aggregates; @@ -38,88 +55,79 @@ public IncidentSearchResponsePropertyFieldFacetData() {} @JsonCreator public IncidentSearchResponsePropertyFieldFacetData( - @JsonProperty(required = true, value = JSON_PROPERTY_FACETS) - List facets, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.facets = facets; - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_FACETS)List facets, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.facets = facets; + this.name = name; } - - public IncidentSearchResponsePropertyFieldFacetData aggregates( - IncidentSearchResponseNumericFacetDataAggregates aggregates) { + public IncidentSearchResponsePropertyFieldFacetData aggregates(IncidentSearchResponseNumericFacetDataAggregates aggregates) { this.aggregates = aggregates; this.unparsed |= aggregates.unparsed; return this; } /** - * Aggregate information for numeric incident data. - * + *

Aggregate information for numeric incident data.

* @return aggregates - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentSearchResponseNumericFacetDataAggregates getAggregates() { - return aggregates; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentSearchResponseNumericFacetDataAggregates getAggregates() { + return aggregates; + } public void setAggregates(IncidentSearchResponseNumericFacetDataAggregates aggregates) { this.aggregates = aggregates; } - - public IncidentSearchResponsePropertyFieldFacetData facets( - List facets) { + public IncidentSearchResponsePropertyFieldFacetData facets(List facets) { this.facets = facets; for (IncidentSearchResponseFieldFacetData item : facets) { this.unparsed |= item.unparsed; } return this; } - - public IncidentSearchResponsePropertyFieldFacetData addFacetsItem( - IncidentSearchResponseFieldFacetData facetsItem) { + public IncidentSearchResponsePropertyFieldFacetData addFacetsItem(IncidentSearchResponseFieldFacetData facetsItem) { this.facets.add(facetsItem); this.unparsed |= facetsItem.unparsed; return this; } /** - * Facet data for the property field of an incident. - * + *

Facet data for the property field of an incident.

* @return facets - */ - @JsonProperty(JSON_PROPERTY_FACETS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getFacets() { - return facets; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACETS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getFacets() { + return facets; + } public void setFacets(List facets) { this.facets = facets; } - public IncidentSearchResponsePropertyFieldFacetData name(String name) { this.name = name; return this; } /** - * Name of the incident property field. - * + *

Name of the incident property field.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentSearchResponsePropertyFieldFacetData object is equal to o. */ + /** + * Return true if this IncidentSearchResponsePropertyFieldFacetData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -128,16 +136,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponsePropertyFieldFacetData incidentSearchResponsePropertyFieldFacetData = - (IncidentSearchResponsePropertyFieldFacetData) o; - return Objects.equals(this.aggregates, incidentSearchResponsePropertyFieldFacetData.aggregates) - && Objects.equals(this.facets, incidentSearchResponsePropertyFieldFacetData.facets) - && Objects.equals(this.name, incidentSearchResponsePropertyFieldFacetData.name); + IncidentSearchResponsePropertyFieldFacetData incidentSearchResponsePropertyFieldFacetData = (IncidentSearchResponsePropertyFieldFacetData) o; + return Objects.equals(this.aggregates, incidentSearchResponsePropertyFieldFacetData.aggregates) && Objects.equals(this.facets, incidentSearchResponsePropertyFieldFacetData.facets) && Objects.equals(this.name, incidentSearchResponsePropertyFieldFacetData.name); } + @Override public int hashCode() { - return Objects.hash(aggregates, facets, name); + return Objects.hash(aggregates,facets,name); } @Override @@ -152,7 +158,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseUserFacetData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseUserFacetData.java index 0d3462448d2..30ad0c29bf0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseUserFacetData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResponseUserFacetData.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Facet data for user attributes of an incident. */ +/** + *

Facet data for user attributes of an incident.

+ */ @JsonPropertyOrder({ IncidentSearchResponseUserFacetData.JSON_PROPERTY_COUNT, IncidentSearchResponseUserFacetData.JSON_PROPERTY_EMAIL, @@ -20,10 +40,10 @@ IncidentSearchResponseUserFacetData.JSON_PROPERTY_NAME, IncidentSearchResponseUserFacetData.JSON_PROPERTY_UUID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentSearchResponseUserFacetData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT = "count"; private Integer count; @@ -45,106 +65,100 @@ public IncidentSearchResponseUserFacetData count(Integer count) { } /** - * Count of the facet value appearing in search results. maximum: 2147483647 - * + *

Count of the facet value appearing in search results.

+ * maximum: 2147483647 * @return count - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCount() { - return count; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } public void setCount(Integer count) { this.count = count; } - public IncidentSearchResponseUserFacetData email(String email) { this.email = email; return this; } /** - * Email of the user. - * + *

Email of the user.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public IncidentSearchResponseUserFacetData handle(String handle) { this.handle = handle; return this; } /** - * Handle of the user. - * + *

Handle of the user.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public IncidentSearchResponseUserFacetData name(String name) { this.name = name; return this; } /** - * Name of the user. - * + *

Name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public IncidentSearchResponseUserFacetData uuid(String uuid) { this.uuid = uuid; return this; } /** - * ID of the user. - * + *

ID of the user.

* @return uuid - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUuid() { - return uuid; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUuid() { + return uuid; + } public void setUuid(String uuid) { this.uuid = uuid; } - /** Return true if this IncidentSearchResponseUserFacetData object is equal to o. */ + /** + * Return true if this IncidentSearchResponseUserFacetData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -153,18 +167,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentSearchResponseUserFacetData incidentSearchResponseUserFacetData = - (IncidentSearchResponseUserFacetData) o; - return Objects.equals(this.count, incidentSearchResponseUserFacetData.count) - && Objects.equals(this.email, incidentSearchResponseUserFacetData.email) - && Objects.equals(this.handle, incidentSearchResponseUserFacetData.handle) - && Objects.equals(this.name, incidentSearchResponseUserFacetData.name) - && Objects.equals(this.uuid, incidentSearchResponseUserFacetData.uuid); + IncidentSearchResponseUserFacetData incidentSearchResponseUserFacetData = (IncidentSearchResponseUserFacetData) o; + return Objects.equals(this.count, incidentSearchResponseUserFacetData.count) && Objects.equals(this.email, incidentSearchResponseUserFacetData.email) && Objects.equals(this.handle, incidentSearchResponseUserFacetData.handle) && Objects.equals(this.name, incidentSearchResponseUserFacetData.name) && Objects.equals(this.uuid, incidentSearchResponseUserFacetData.uuid); } + @Override public int hashCode() { - return Objects.hash(count, email, handle, name, uuid); + return Objects.hash(count,email,handle,name,uuid); } @Override @@ -181,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResultsType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResultsType.java index d2650dd442b..e327f5359cb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResultsType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchResultsType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Incident search result type. */ +/** + *

Incident search result type.

+ */ @JsonSerialize(using = IncidentSearchResultsType.IncidentSearchResultsTypeSerializer.class) public class IncidentSearchResultsType { - public static final IncidentSearchResultsType INCIDENTS_SEARCH_RESULTS = - new IncidentSearchResultsType("incidents_search_results"); + public static final IncidentSearchResultsType INCIDENTS_SEARCH_RESULTS = new IncidentSearchResultsType("incidents_search_results"); - private static final Set allowedValues = - new HashSet(Arrays.asList("incidents_search_results")); + private static final Set allowedValues = new HashSet(Arrays.asList("incidents_search_results")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentSearchResultsTypeSerializer - extends StdSerializer { - public IncidentSearchResultsTypeSerializer(Class t) { - super(t); - } + public static class IncidentSearchResultsTypeSerializer extends StdSerializer { + public IncidentSearchResultsTypeSerializer(Class t) { + super(t); + } - public IncidentSearchResultsTypeSerializer() { - this(null); - } + public IncidentSearchResultsTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentSearchResultsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentSearchResultsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentSearchResultsType object is equal to o. */ + /** + * Return true if this IncidentSearchResultsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchSortOrder.java b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchSortOrder.java index 74a4cffff8b..769b4be109f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentSearchSortOrder.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentSearchSortOrder.java @@ -6,30 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The ways searched incidents can be sorted. */ +/** + *

The ways searched incidents can be sorted.

+ */ @JsonSerialize(using = IncidentSearchSortOrder.IncidentSearchSortOrderSerializer.class) public class IncidentSearchSortOrder { - public static final IncidentSearchSortOrder CREATED_ASCENDING = - new IncidentSearchSortOrder("created"); - public static final IncidentSearchSortOrder CREATED_DESCENDING = - new IncidentSearchSortOrder("-created"); + public static final IncidentSearchSortOrder CREATED_ASCENDING = new IncidentSearchSortOrder("created"); + public static final IncidentSearchSortOrder CREATED_DESCENDING = new IncidentSearchSortOrder("-created"); - private static final Set allowedValues = - new HashSet(Arrays.asList("created", "-created")); + private static final Set allowedValues = new HashSet(Arrays.asList("created", "-created")); private String value; @@ -41,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentSearchSortOrderSerializer - extends StdSerializer { - public IncidentSearchSortOrderSerializer(Class t) { - super(t); - } + public static class IncidentSearchSortOrderSerializer extends StdSerializer { + public IncidentSearchSortOrderSerializer(Class t) { + super(t); + } - public IncidentSearchSortOrderSerializer() { - this(null); - } + public IncidentSearchSortOrderSerializer() { + this(null); + } - @Override - public void serialize( - IncidentSearchSortOrder value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentSearchSortOrder value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentSearchSortOrder object is equal to o. */ + /** + * Return true if this IncidentSearchSortOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java index 9e9b9cec1e3..4a18dd3a419 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident service's attributes for a create request. */ -@JsonPropertyOrder({IncidentServiceCreateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The incident service's attributes for a create request.

+ */ +@JsonPropertyOrder({ + IncidentServiceCreateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public IncidentServiceCreateAttributes() {} @JsonCreator public IncidentServiceCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public IncidentServiceCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident service. - * + *

Name of the incident service.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentServiceCreateAttributes object is equal to o. */ + /** + * Return true if this IncidentServiceCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -59,11 +80,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceCreateAttributes incidentServiceCreateAttributes = - (IncidentServiceCreateAttributes) o; + IncidentServiceCreateAttributes incidentServiceCreateAttributes = (IncidentServiceCreateAttributes) o; return Objects.equals(this.name, incidentServiceCreateAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -79,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java index c848a1499e8..591581d35b3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident Service payload for create requests. */ + +/** + *

Incident Service payload for create requests.

+ */ @JsonPropertyOrder({ IncidentServiceCreateData.JSON_PROPERTY_ATTRIBUTES, IncidentServiceCreateData.JSON_PROPERTY_RELATIONSHIPS, IncidentServiceCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentServiceCreateAttributes attributes; @@ -36,11 +55,10 @@ public IncidentServiceCreateData() {} @JsonCreator public IncidentServiceCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentServiceType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentServiceType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentServiceCreateData attributes(IncidentServiceCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,33 +66,31 @@ public IncidentServiceCreateData attributes(IncidentServiceCreateAttributes attr } /** - * The incident service's attributes for a create request. - * + *

The incident service's attributes for a create request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceCreateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentServiceCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentServiceCreateAttributes attributes) { this.attributes = attributes; } /** - * The incident service's relationships. - * + *

The incident service's relationships.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentServiceRelationships getRelationships() { + return relationships; + } public IncidentServiceCreateData type(IncidentServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -82,24 +98,25 @@ public IncidentServiceCreateData type(IncidentServiceType type) { } /** - * Incident service resource type. - * + *

Incident service resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentServiceType getType() { + return type; + } public void setType(IncidentServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentServiceCreateData object is equal to o. */ + /** + * Return true if this IncidentServiceCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } IncidentServiceCreateData incidentServiceCreateData = (IncidentServiceCreateData) o; - return Objects.equals(this.attributes, incidentServiceCreateData.attributes) - && Objects.equals(this.relationships, incidentServiceCreateData.relationships) - && Objects.equals(this.type, incidentServiceCreateData.type); + return Objects.equals(this.attributes, incidentServiceCreateData.attributes) && Objects.equals(this.relationships, incidentServiceCreateData.relationships) && Objects.equals(this.type, incidentServiceCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java index a8f7b04fac8..91801a9d706 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create request with an incident service payload. */ -@JsonPropertyOrder({IncidentServiceCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create request with an incident service payload.

+ */ +@JsonPropertyOrder({ + IncidentServiceCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentServiceCreateData data; @@ -26,11 +47,10 @@ public IncidentServiceCreateRequest() {} @JsonCreator public IncidentServiceCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentServiceCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentServiceCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentServiceCreateRequest data(IncidentServiceCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentServiceCreateRequest data(IncidentServiceCreateData data) { } /** - * Incident Service payload for create requests. - * + *

Incident Service payload for create requests.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentServiceCreateData getData() { + return data; + } public void setData(IncidentServiceCreateData data) { this.data = data; } - /** Return true if this IncidentServiceCreateRequest object is equal to o. */ + /** + * Return true if this IncidentServiceCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, incidentServiceCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java index 69a4e52d7bc..9b884d0b8f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java @@ -6,207 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = IncidentServiceIncludedItems.IncidentServiceIncludedItemsDeserializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentServiceIncludedItems.IncidentServiceIncludedItemsDeserializer.class) @JsonSerialize(using = IncidentServiceIncludedItems.IncidentServiceIncludedItemsSerializer.class) public class IncidentServiceIncludedItems extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IncidentServiceIncludedItems.class.getName()); + private static final Logger log = Logger.getLogger(IncidentServiceIncludedItems.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class IncidentServiceIncludedItemsSerializer - extends StdSerializer { - public IncidentServiceIncludedItemsSerializer(Class t) { - super(t); + public static class IncidentServiceIncludedItemsSerializer extends StdSerializer { + public IncidentServiceIncludedItemsSerializer(Class t) { + super(t); + } + + public IncidentServiceIncludedItemsSerializer() { + this(null); + } + + @Override + public void serialize(IncidentServiceIncludedItems value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentServiceIncludedItemsSerializer() { - this(null); + public static class IncidentServiceIncludedItemsDeserializer extends StdDeserializer { + public IncidentServiceIncludedItemsDeserializer() { + this(IncidentServiceIncludedItems.class); + } + + public IncidentServiceIncludedItemsDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentServiceIncludedItems 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + IncidentServiceIncludedItems ret = new IncidentServiceIncludedItems(); + 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 IncidentServiceIncludedItems getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentServiceIncludedItems cannot be null"); + } } - @Override - public void serialize( - IncidentServiceIncludedItems value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentServiceIncludedItems() { + super("oneOf", Boolean.FALSE); + } + public IncidentServiceIncludedItems(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentServiceIncludedItemsDeserializer - extends StdDeserializer { - public IncidentServiceIncludedItemsDeserializer() { - this(IncidentServiceIncludedItems.class); + static { + schemas.put("User", new GenericType() { + }); + JSON.registerDescendants(IncidentServiceIncludedItems.class, Collections.unmodifiableMap(schemas)); } - public IncidentServiceIncludedItemsDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentServiceIncludedItems.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentServiceIncludedItems 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 User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - - IncidentServiceIncludedItems ret = new IncidentServiceIncludedItems(); - 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; + throw new RuntimeException("Invalid instance type. Must be User"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * User + * + * @return The actual instance (User) + */ @Override - public IncidentServiceIncludedItems getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentServiceIncludedItems cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentServiceIncludedItems() { - super("oneOf", Boolean.FALSE); - } - - public IncidentServiceIncludedItems(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - JSON.registerDescendants( - IncidentServiceIncludedItems.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentServiceIncludedItems.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User - * - *

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(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be User"); - } - - /** - * Get the actual instance, which can be the following: User - * - * @return The actual instance (User) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java index 0fb159dad7e..f4f9816b591 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident service's relationships. */ + +/** + *

The incident service's relationships.

+ */ @JsonPropertyOrder({ IncidentServiceRelationships.JSON_PROPERTY_CREATED_BY, IncidentServiceRelationships.JSON_PROPERTY_LAST_MODIFIED_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_BY = "created_by"; private RelationshipToUser createdBy; @@ -34,21 +54,19 @@ public IncidentServiceRelationships createdBy(RelationshipToUser createdBy) { } /** - * Relationship to user. - * + *

Relationship to user.

* @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getCreatedBy() { - return createdBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedBy() { + return createdBy; + } public void setCreatedBy(RelationshipToUser createdBy) { this.createdBy = createdBy; } - public IncidentServiceRelationships lastModifiedBy(RelationshipToUser lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; this.unparsed |= lastModifiedBy.unparsed; @@ -56,22 +74,23 @@ public IncidentServiceRelationships lastModifiedBy(RelationshipToUser lastModifi } /** - * Relationship to user. - * + *

Relationship to user.

* @return lastModifiedBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getLastModifiedBy() { - return lastModifiedBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedBy() { + return lastModifiedBy; + } public void setLastModifiedBy(RelationshipToUser lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } - /** Return true if this IncidentServiceRelationships object is equal to o. */ + /** + * Return true if this IncidentServiceRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } IncidentServiceRelationships incidentServiceRelationships = (IncidentServiceRelationships) o; - return Objects.equals(this.createdBy, incidentServiceRelationships.createdBy) - && Objects.equals(this.lastModifiedBy, incidentServiceRelationships.lastModifiedBy); + return Objects.equals(this.createdBy, incidentServiceRelationships.createdBy) && Objects.equals(this.lastModifiedBy, incidentServiceRelationships.lastModifiedBy); } + @Override public int hashCode() { - return Objects.hash(createdBy, lastModifiedBy); + return Objects.hash(createdBy,lastModifiedBy); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java index 3dc622372c8..c0d917cb8d6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with an incident service payload. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with an incident service payload.

+ */ @JsonPropertyOrder({ IncidentServiceResponse.JSON_PROPERTY_DATA, IncidentServiceResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentServiceResponseData data; @@ -33,11 +51,10 @@ public IncidentServiceResponse() {} @JsonCreator public IncidentServiceResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentServiceResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentServiceResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentServiceResponse data(IncidentServiceResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -45,33 +62,34 @@ public IncidentServiceResponse data(IncidentServiceResponseData data) { } /** - * Incident Service data from responses. - * + *

Incident Service data from responses.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentServiceResponseData getData() { + return data; + } public void setData(IncidentServiceResponseData data) { this.data = data; } /** - * Included objects from relationships. - * + *

Included objects from relationships.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } - /** Return true if this IncidentServiceResponse object is equal to o. */ + /** + * Return true if this IncidentServiceResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +99,13 @@ public boolean equals(Object o) { return false; } IncidentServiceResponse incidentServiceResponse = (IncidentServiceResponse) o; - return Objects.equals(this.data, incidentServiceResponse.data) - && Objects.equals(this.included, incidentServiceResponse.included); + return Objects.equals(this.data, incidentServiceResponse.data) && Objects.equals(this.included, incidentServiceResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -101,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java index ebad22e8adf..436b77510f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java @@ -6,84 +6,100 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** The incident service's attributes from a response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The incident service's attributes from a response.

+ */ @JsonPropertyOrder({ IncidentServiceResponseAttributes.JSON_PROPERTY_CREATED, IncidentServiceResponseAttributes.JSON_PROPERTY_MODIFIED, IncidentServiceResponseAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * Timestamp of when the incident service was created. - * + *

Timestamp of when the incident service was created.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * Timestamp of when the incident service was modified. - * + *

Timestamp of when the incident service was modified.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } public IncidentServiceResponseAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident service. - * + *

Name of the incident service.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentServiceResponseAttributes object is equal to o. */ + /** + * Return true if this IncidentServiceResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,16 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceResponseAttributes incidentServiceResponseAttributes = - (IncidentServiceResponseAttributes) o; - return Objects.equals(this.created, incidentServiceResponseAttributes.created) - && Objects.equals(this.modified, incidentServiceResponseAttributes.modified) - && Objects.equals(this.name, incidentServiceResponseAttributes.name); + IncidentServiceResponseAttributes incidentServiceResponseAttributes = (IncidentServiceResponseAttributes) o; + return Objects.equals(this.created, incidentServiceResponseAttributes.created) && Objects.equals(this.modified, incidentServiceResponseAttributes.modified) && Objects.equals(this.name, incidentServiceResponseAttributes.name); } + @Override public int hashCode() { - return Objects.hash(created, modified, name); + return Objects.hash(created,modified,name); } @Override @@ -116,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java index 569c5e0203e..ca26e1421d8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Incident Service data from responses. */ +/** + *

Incident Service data from responses.

+ */ @JsonPropertyOrder({ IncidentServiceResponseData.JSON_PROPERTY_ATTRIBUTES, IncidentServiceResponseData.JSON_PROPERTY_ID, IncidentServiceResponseData.JSON_PROPERTY_RELATIONSHIPS, IncidentServiceResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentServiceResponseAttributes attributes; @@ -40,13 +59,12 @@ public IncidentServiceResponseData() {} @JsonCreator public IncidentServiceResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentServiceType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentServiceType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentServiceResponseData attributes(IncidentServiceResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,53 +72,49 @@ public IncidentServiceResponseData attributes(IncidentServiceResponseAttributes } /** - * The incident service's attributes from a response. - * + *

The incident service's attributes from a response.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentServiceResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentServiceResponseAttributes attributes) { this.attributes = attributes; } - public IncidentServiceResponseData id(String id) { this.id = id; return this; } /** - * The incident service's ID. - * + *

The incident service's ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } /** - * The incident service's relationships. - * + *

The incident service's relationships.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentServiceRelationships getRelationships() { + return relationships; + } public IncidentServiceResponseData type(IncidentServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -108,24 +122,25 @@ public IncidentServiceResponseData type(IncidentServiceType type) { } /** - * Incident service resource type. - * + *

Incident service resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentServiceType getType() { + return type; + } public void setType(IncidentServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentServiceResponseData object is equal to o. */ + /** + * Return true if this IncidentServiceResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +150,13 @@ public boolean equals(Object o) { return false; } IncidentServiceResponseData incidentServiceResponseData = (IncidentServiceResponseData) o; - return Objects.equals(this.attributes, incidentServiceResponseData.attributes) - && Objects.equals(this.id, incidentServiceResponseData.id) - && Objects.equals(this.relationships, incidentServiceResponseData.relationships) - && Objects.equals(this.type, incidentServiceResponseData.type); + return Objects.equals(this.attributes, incidentServiceResponseData.attributes) && Objects.equals(this.id, incidentServiceResponseData.id) && Objects.equals(this.relationships, incidentServiceResponseData.relationships) && Objects.equals(this.type, incidentServiceResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -159,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java index 83e4bce80b1..aa59a251f57 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Incident service resource type. */ +/** + *

Incident service resource type.

+ */ @JsonSerialize(using = IncidentServiceType.IncidentServiceTypeSerializer.class) public class IncidentServiceType { @@ -38,20 +62,18 @@ public boolean isValid() { } public static class IncidentServiceTypeSerializer extends StdSerializer { - public IncidentServiceTypeSerializer(Class t) { - super(t); - } - - public IncidentServiceTypeSerializer() { - this(null); - } - - @Override - public void serialize( - IncidentServiceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public IncidentServiceTypeSerializer(Class t) { + super(t); + } + + public IncidentServiceTypeSerializer() { + this(null); + } + + @Override + public void serialize(IncidentServiceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentServiceType object is equal to o. */ + /** + * Return true if this IncidentServiceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java index cfe37a5eb5c..a33f7dec779 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident service's attributes for an update request. */ -@JsonPropertyOrder({IncidentServiceUpdateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The incident service's attributes for an update request.

+ */ +@JsonPropertyOrder({ + IncidentServiceUpdateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public IncidentServiceUpdateAttributes() {} @JsonCreator public IncidentServiceUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public IncidentServiceUpdateAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident service. - * + *

Name of the incident service.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentServiceUpdateAttributes object is equal to o. */ + /** + * Return true if this IncidentServiceUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -59,11 +80,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceUpdateAttributes incidentServiceUpdateAttributes = - (IncidentServiceUpdateAttributes) o; + IncidentServiceUpdateAttributes incidentServiceUpdateAttributes = (IncidentServiceUpdateAttributes) o; return Objects.equals(this.name, incidentServiceUpdateAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -79,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java index c2af3cc1584..e253b78ecb4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident Service payload for update requests. */ + +/** + *

Incident Service payload for update requests.

+ */ @JsonPropertyOrder({ IncidentServiceUpdateData.JSON_PROPERTY_ATTRIBUTES, IncidentServiceUpdateData.JSON_PROPERTY_ID, IncidentServiceUpdateData.JSON_PROPERTY_RELATIONSHIPS, IncidentServiceUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentServiceUpdateAttributes attributes; @@ -40,11 +59,10 @@ public IncidentServiceUpdateData() {} @JsonCreator public IncidentServiceUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentServiceType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentServiceType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentServiceUpdateData attributes(IncidentServiceUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,54 +70,50 @@ public IncidentServiceUpdateData attributes(IncidentServiceUpdateAttributes attr } /** - * The incident service's attributes for an update request. - * + *

The incident service's attributes for an update request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentServiceUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentServiceUpdateAttributes attributes) { this.attributes = attributes; } - public IncidentServiceUpdateData id(String id) { this.id = id; return this; } /** - * The incident service's ID. - * + *

The incident service's ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } /** - * The incident service's relationships. - * + *

The incident service's relationships.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentServiceRelationships getRelationships() { + return relationships; + } public IncidentServiceUpdateData type(IncidentServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,24 +121,25 @@ public IncidentServiceUpdateData type(IncidentServiceType type) { } /** - * Incident service resource type. - * + *

Incident service resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentServiceType getType() { + return type; + } public void setType(IncidentServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentServiceUpdateData object is equal to o. */ + /** + * Return true if this IncidentServiceUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +149,13 @@ public boolean equals(Object o) { return false; } IncidentServiceUpdateData incidentServiceUpdateData = (IncidentServiceUpdateData) o; - return Objects.equals(this.attributes, incidentServiceUpdateData.attributes) - && Objects.equals(this.id, incidentServiceUpdateData.id) - && Objects.equals(this.relationships, incidentServiceUpdateData.relationships) - && Objects.equals(this.type, incidentServiceUpdateData.type); + return Objects.equals(this.attributes, incidentServiceUpdateData.attributes) && Objects.equals(this.id, incidentServiceUpdateData.id) && Objects.equals(this.relationships, incidentServiceUpdateData.relationships) && Objects.equals(this.type, incidentServiceUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -158,7 +171,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java index 141c7af11d9..c57b9c4ee5e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update request with an incident service payload. */ -@JsonPropertyOrder({IncidentServiceUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update request with an incident service payload.

+ */ +@JsonPropertyOrder({ + IncidentServiceUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServiceUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentServiceUpdateData data; @@ -26,11 +47,10 @@ public IncidentServiceUpdateRequest() {} @JsonCreator public IncidentServiceUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentServiceUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentServiceUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentServiceUpdateRequest data(IncidentServiceUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentServiceUpdateRequest data(IncidentServiceUpdateData data) { } /** - * Incident Service payload for update requests. - * + *

Incident Service payload for update requests.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentServiceUpdateData getData() { + return data; + } public void setData(IncidentServiceUpdateData data) { this.data = data; } - /** Return true if this IncidentServiceUpdateRequest object is equal to o. */ + /** + * Return true if this IncidentServiceUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, incidentServiceUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java index 0933187ef5f..f3f92341ff6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response with a list of incident service payloads. */ +/** + *

Response with a list of incident service payloads.

+ */ @JsonPropertyOrder({ IncidentServicesResponse.JSON_PROPERTY_DATA, IncidentServicesResponse.JSON_PROPERTY_INCLUDED, IncidentServicesResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentServicesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -38,11 +55,9 @@ public IncidentServicesResponse() {} @JsonCreator public IncidentServicesResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public IncidentServicesResponse data(List data) { this.data = data; for (IncidentServiceResponseData item : data) { @@ -50,7 +65,6 @@ public IncidentServicesResponse data(List data) { } return this; } - public IncidentServicesResponse addDataItem(IncidentServiceResponseData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -58,45 +72,46 @@ public IncidentServicesResponse addDataItem(IncidentServiceResponseData dataItem } /** - * An array of incident services. - * + *

An array of incident services.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } /** - * Included related resources which the user requested. - * + *

Included related resources which the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } /** - * The metadata object containing pagination metadata. - * + *

The metadata object containing pagination metadata.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseMeta getMeta() { - return meta; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponseMeta getMeta() { + return meta; + } - /** Return true if this IncidentServicesResponse object is equal to o. */ + /** + * Return true if this IncidentServicesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +121,13 @@ public boolean equals(Object o) { return false; } IncidentServicesResponse incidentServicesResponse = (IncidentServicesResponse) o; - return Objects.equals(this.data, incidentServicesResponse.data) - && Objects.equals(this.included, incidentServicesResponse.included) - && Objects.equals(this.meta, incidentServicesResponse.meta); + return Objects.equals(this.data, incidentServicesResponse.data) && Objects.equals(this.included, incidentServicesResponse.included) && Objects.equals(this.meta, incidentServicesResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, included, meta); + return Objects.hash(data,included,meta); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java index c4630393487..b85cbaf86d3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident team's attributes for a create request. */ -@JsonPropertyOrder({IncidentTeamCreateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The incident team's attributes for a create request.

+ */ +@JsonPropertyOrder({ + IncidentTeamCreateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public IncidentTeamCreateAttributes() {} @JsonCreator public IncidentTeamCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public IncidentTeamCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident team. - * + *

Name of the incident team.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentTeamCreateAttributes object is equal to o. */ + /** + * Return true if this IncidentTeamCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.name, incidentTeamCreateAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java index fff6989b113..5df681e11c9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident Team data for a create request. */ + +/** + *

Incident Team data for a create request.

+ */ @JsonPropertyOrder({ IncidentTeamCreateData.JSON_PROPERTY_ATTRIBUTES, IncidentTeamCreateData.JSON_PROPERTY_RELATIONSHIPS, IncidentTeamCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentTeamCreateAttributes attributes; @@ -36,11 +55,10 @@ public IncidentTeamCreateData() {} @JsonCreator public IncidentTeamCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentTeamType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentTeamCreateData attributes(IncidentTeamCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,33 +66,31 @@ public IncidentTeamCreateData attributes(IncidentTeamCreateAttributes attributes } /** - * The incident team's attributes for a create request. - * + *

The incident team's attributes for a create request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamCreateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentTeamCreateAttributes attributes) { this.attributes = attributes; } /** - * The incident team's relationships. - * + *

The incident team's relationships.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamRelationships getRelationships() { + return relationships; + } public IncidentTeamCreateData type(IncidentTeamType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -82,24 +98,25 @@ public IncidentTeamCreateData type(IncidentTeamType type) { } /** - * Incident Team resource type. - * + *

Incident Team resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTeamType getType() { + return type; + } public void setType(IncidentTeamType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentTeamCreateData object is equal to o. */ + /** + * Return true if this IncidentTeamCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } IncidentTeamCreateData incidentTeamCreateData = (IncidentTeamCreateData) o; - return Objects.equals(this.attributes, incidentTeamCreateData.attributes) - && Objects.equals(this.relationships, incidentTeamCreateData.relationships) - && Objects.equals(this.type, incidentTeamCreateData.type); + return Objects.equals(this.attributes, incidentTeamCreateData.attributes) && Objects.equals(this.relationships, incidentTeamCreateData.relationships) && Objects.equals(this.type, incidentTeamCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java index a83d2e315c7..7c21fa41dec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create request with an incident team payload. */ -@JsonPropertyOrder({IncidentTeamCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create request with an incident team payload.

+ */ +@JsonPropertyOrder({ + IncidentTeamCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentTeamCreateData data; @@ -26,11 +47,10 @@ public IncidentTeamCreateRequest() {} @JsonCreator public IncidentTeamCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentTeamCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentTeamCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentTeamCreateRequest data(IncidentTeamCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentTeamCreateRequest data(IncidentTeamCreateData data) { } /** - * Incident Team data for a create request. - * + *

Incident Team data for a create request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTeamCreateData getData() { + return data; + } public void setData(IncidentTeamCreateData data) { this.data = data; } - /** Return true if this IncidentTeamCreateRequest object is equal to o. */ + /** + * Return true if this IncidentTeamCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, incidentTeamCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java index e7cd0d53089..a6b2751c4f1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java @@ -6,204 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = IncidentTeamIncludedItems.IncidentTeamIncludedItemsDeserializer.class) @JsonSerialize(using = IncidentTeamIncludedItems.IncidentTeamIncludedItemsSerializer.class) public class IncidentTeamIncludedItems extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IncidentTeamIncludedItems.class.getName()); + private static final Logger log = Logger.getLogger(IncidentTeamIncludedItems.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class IncidentTeamIncludedItemsSerializer - extends StdSerializer { - public IncidentTeamIncludedItemsSerializer(Class t) { - super(t); + public static class IncidentTeamIncludedItemsSerializer extends StdSerializer { + public IncidentTeamIncludedItemsSerializer(Class t) { + super(t); + } + + public IncidentTeamIncludedItemsSerializer() { + this(null); + } + + @Override + public void serialize(IncidentTeamIncludedItems value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentTeamIncludedItemsSerializer() { - this(null); + public static class IncidentTeamIncludedItemsDeserializer extends StdDeserializer { + public IncidentTeamIncludedItemsDeserializer() { + this(IncidentTeamIncludedItems.class); + } + + public IncidentTeamIncludedItemsDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentTeamIncludedItems 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 User + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (User.class.equals(Integer.class) || User.class.equals(Long.class) || User.class.equals(Float.class) || User.class.equals(Double.class) || User.class.equals(Boolean.class) || User.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((User.class.equals(Integer.class) || User.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((User.class.equals(Float.class) || User.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (User.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'User'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'User'", e); + } + + IncidentTeamIncludedItems ret = new IncidentTeamIncludedItems(); + 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 IncidentTeamIncludedItems getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentTeamIncludedItems cannot be null"); + } } - @Override - public void serialize( - IncidentTeamIncludedItems value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentTeamIncludedItems() { + super("oneOf", Boolean.FALSE); + } + public IncidentTeamIncludedItems(User o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentTeamIncludedItemsDeserializer - extends StdDeserializer { - public IncidentTeamIncludedItemsDeserializer() { - this(IncidentTeamIncludedItems.class); + static { + schemas.put("User", new GenericType() { + }); + JSON.registerDescendants(IncidentTeamIncludedItems.class, Collections.unmodifiableMap(schemas)); } - public IncidentTeamIncludedItemsDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentTeamIncludedItems.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * User + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentTeamIncludedItems 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 User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.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 (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - - IncidentTeamIncludedItems ret = new IncidentTeamIncludedItems(); - 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; + throw new RuntimeException("Invalid instance type. Must be User"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * User + * + * @return The actual instance (User) + */ @Override - public IncidentTeamIncludedItems getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "IncidentTeamIncludedItems cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentTeamIncludedItems() { - super("oneOf", Boolean.FALSE); - } - - public IncidentTeamIncludedItems(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - JSON.registerDescendants(IncidentTeamIncludedItems.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentTeamIncludedItems.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User - * - *

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(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `User`. If the actual instance is not `User`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `User` + * @throws ClassCastException if the instance is not `User` + */ + public User getUser() throws ClassCastException { + return (User)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be User"); - } - - /** - * Get the actual instance, which can be the following: User - * - * @return The actual instance (User) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java index 12d68f49401..9e56f7072aa 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident team's relationships. */ + +/** + *

The incident team's relationships.

+ */ @JsonPropertyOrder({ IncidentTeamRelationships.JSON_PROPERTY_CREATED_BY, IncidentTeamRelationships.JSON_PROPERTY_LAST_MODIFIED_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_BY = "created_by"; private RelationshipToUser createdBy; @@ -34,21 +54,19 @@ public IncidentTeamRelationships createdBy(RelationshipToUser createdBy) { } /** - * Relationship to user. - * + *

Relationship to user.

* @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getCreatedBy() { - return createdBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getCreatedBy() { + return createdBy; + } public void setCreatedBy(RelationshipToUser createdBy) { this.createdBy = createdBy; } - public IncidentTeamRelationships lastModifiedBy(RelationshipToUser lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; this.unparsed |= lastModifiedBy.unparsed; @@ -56,22 +74,23 @@ public IncidentTeamRelationships lastModifiedBy(RelationshipToUser lastModifiedB } /** - * Relationship to user. - * + *

Relationship to user.

* @return lastModifiedBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getLastModifiedBy() { - return lastModifiedBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getLastModifiedBy() { + return lastModifiedBy; + } public void setLastModifiedBy(RelationshipToUser lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } - /** Return true if this IncidentTeamRelationships object is equal to o. */ + /** + * Return true if this IncidentTeamRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } IncidentTeamRelationships incidentTeamRelationships = (IncidentTeamRelationships) o; - return Objects.equals(this.createdBy, incidentTeamRelationships.createdBy) - && Objects.equals(this.lastModifiedBy, incidentTeamRelationships.lastModifiedBy); + return Objects.equals(this.createdBy, incidentTeamRelationships.createdBy) && Objects.equals(this.lastModifiedBy, incidentTeamRelationships.lastModifiedBy); } + @Override public int hashCode() { - return Objects.hash(createdBy, lastModifiedBy); + return Objects.hash(createdBy,lastModifiedBy); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java index b8ff27a2ed5..aec18d7e575 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response with an incident team payload. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response with an incident team payload.

+ */ @JsonPropertyOrder({ IncidentTeamResponse.JSON_PROPERTY_DATA, IncidentTeamResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentTeamResponseData data; @@ -33,11 +51,10 @@ public IncidentTeamResponse() {} @JsonCreator public IncidentTeamResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentTeamResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentTeamResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentTeamResponse data(IncidentTeamResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -45,33 +62,34 @@ public IncidentTeamResponse data(IncidentTeamResponseData data) { } /** - * Incident Team data from a response. - * + *

Incident Team data from a response.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTeamResponseData getData() { + return data; + } public void setData(IncidentTeamResponseData data) { this.data = data; } /** - * Included objects from relationships. - * + *

Included objects from relationships.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } - /** Return true if this IncidentTeamResponse object is equal to o. */ + /** + * Return true if this IncidentTeamResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +99,13 @@ public boolean equals(Object o) { return false; } IncidentTeamResponse incidentTeamResponse = (IncidentTeamResponse) o; - return Objects.equals(this.data, incidentTeamResponse.data) - && Objects.equals(this.included, incidentTeamResponse.included); + return Objects.equals(this.data, incidentTeamResponse.data) && Objects.equals(this.included, incidentTeamResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -101,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java index 1c7dedad752..1f6320cb335 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java @@ -6,84 +6,100 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** The incident team's attributes from a response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The incident team's attributes from a response.

+ */ @JsonPropertyOrder({ IncidentTeamResponseAttributes.JSON_PROPERTY_CREATED, IncidentTeamResponseAttributes.JSON_PROPERTY_MODIFIED, IncidentTeamResponseAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; public static final String JSON_PROPERTY_MODIFIED = "modified"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modified; public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * Timestamp of when the incident team was created. - * + *

Timestamp of when the incident team was created.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } /** - * Timestamp of when the incident team was modified. - * + *

Timestamp of when the incident team was modified.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModified() { + return modified; + } public IncidentTeamResponseAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident team. - * + *

Name of the incident team.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentTeamResponseAttributes object is equal to o. */ + /** + * Return true if this IncidentTeamResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,16 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentTeamResponseAttributes incidentTeamResponseAttributes = - (IncidentTeamResponseAttributes) o; - return Objects.equals(this.created, incidentTeamResponseAttributes.created) - && Objects.equals(this.modified, incidentTeamResponseAttributes.modified) - && Objects.equals(this.name, incidentTeamResponseAttributes.name); + IncidentTeamResponseAttributes incidentTeamResponseAttributes = (IncidentTeamResponseAttributes) o; + return Objects.equals(this.created, incidentTeamResponseAttributes.created) && Objects.equals(this.modified, incidentTeamResponseAttributes.modified) && Objects.equals(this.name, incidentTeamResponseAttributes.name); } + @Override public int hashCode() { - return Objects.hash(created, modified, name); + return Objects.hash(created,modified,name); } @Override @@ -116,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java index 3177bd1b02b..78ef18325be 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident Team data from a response. */ + +/** + *

Incident Team data from a response.

+ */ @JsonPropertyOrder({ IncidentTeamResponseData.JSON_PROPERTY_ATTRIBUTES, IncidentTeamResponseData.JSON_PROPERTY_ID, IncidentTeamResponseData.JSON_PROPERTY_RELATIONSHIPS, IncidentTeamResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentTeamResponseAttributes attributes; @@ -42,54 +62,50 @@ public IncidentTeamResponseData attributes(IncidentTeamResponseAttributes attrib } /** - * The incident team's attributes from a response. - * + *

The incident team's attributes from a response.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentTeamResponseAttributes attributes) { this.attributes = attributes; } - public IncidentTeamResponseData id(String id) { this.id = id; return this; } /** - * The incident team's ID. - * + *

The incident team's ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } /** - * The incident team's relationships. - * + *

The incident team's relationships.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamRelationships getRelationships() { + return relationships; + } public IncidentTeamResponseData type(IncidentTeamType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -97,25 +113,26 @@ public IncidentTeamResponseData type(IncidentTeamType type) { } /** - * Incident Team resource type. - * + *

Incident Team resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamType getType() { + return type; + } public void setType(IncidentTeamType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentTeamResponseData object is equal to o. */ + /** + * Return true if this IncidentTeamResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -125,15 +142,13 @@ public boolean equals(Object o) { return false; } IncidentTeamResponseData incidentTeamResponseData = (IncidentTeamResponseData) o; - return Objects.equals(this.attributes, incidentTeamResponseData.attributes) - && Objects.equals(this.id, incidentTeamResponseData.id) - && Objects.equals(this.relationships, incidentTeamResponseData.relationships) - && Objects.equals(this.type, incidentTeamResponseData.type); + return Objects.equals(this.attributes, incidentTeamResponseData.attributes) && Objects.equals(this.id, incidentTeamResponseData.id) && Objects.equals(this.relationships, incidentTeamResponseData.relationships) && Objects.equals(this.type, incidentTeamResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -149,7 +164,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java index 0aac4f27a71..604293ae91b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Incident Team resource type. */ +/** + *

Incident Team resource type.

+ */ @JsonSerialize(using = IncidentTeamType.IncidentTeamTypeSerializer.class) public class IncidentTeamType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class IncidentTeamTypeSerializer extends StdSerializer { - public IncidentTeamTypeSerializer(Class t) { - super(t); - } - - public IncidentTeamTypeSerializer() { - this(null); - } - - @Override - public void serialize(IncidentTeamType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public IncidentTeamTypeSerializer(Class t) { + super(t); + } + + public IncidentTeamTypeSerializer() { + this(null); + } + + @Override + public void serialize(IncidentTeamType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentTeamType object is equal to o. */ + /** + * Return true if this IncidentTeamType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java index cfc20e2ad7b..932c3761d83 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident team's attributes for an update request. */ -@JsonPropertyOrder({IncidentTeamUpdateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The incident team's attributes for an update request.

+ */ +@JsonPropertyOrder({ + IncidentTeamUpdateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public IncidentTeamUpdateAttributes() {} @JsonCreator public IncidentTeamUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public IncidentTeamUpdateAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident team. - * + *

Name of the incident team.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this IncidentTeamUpdateAttributes object is equal to o. */ + /** + * Return true if this IncidentTeamUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.name, incidentTeamUpdateAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java index 85a951eb6b6..16baf1b3816 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Incident Team data for an update request. */ + +/** + *

Incident Team data for an update request.

+ */ @JsonPropertyOrder({ IncidentTeamUpdateData.JSON_PROPERTY_ATTRIBUTES, IncidentTeamUpdateData.JSON_PROPERTY_ID, IncidentTeamUpdateData.JSON_PROPERTY_RELATIONSHIPS, IncidentTeamUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentTeamUpdateAttributes attributes; @@ -40,11 +59,10 @@ public IncidentTeamUpdateData() {} @JsonCreator public IncidentTeamUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentTeamType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentTeamUpdateData attributes(IncidentTeamUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,54 +70,50 @@ public IncidentTeamUpdateData attributes(IncidentTeamUpdateAttributes attributes } /** - * The incident team's attributes for an update request. - * + *

The incident team's attributes for an update request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentTeamUpdateAttributes attributes) { this.attributes = attributes; } - public IncidentTeamUpdateData id(String id) { this.id = id; return this; } /** - * The incident team's ID. - * + *

The incident team's ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } /** - * The incident team's relationships. - * + *

The incident team's relationships.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentTeamRelationships getRelationships() { + return relationships; + } public IncidentTeamUpdateData type(IncidentTeamType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,24 +121,25 @@ public IncidentTeamUpdateData type(IncidentTeamType type) { } /** - * Incident Team resource type. - * + *

Incident Team resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTeamType getType() { + return type; + } public void setType(IncidentTeamType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentTeamUpdateData object is equal to o. */ + /** + * Return true if this IncidentTeamUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -134,15 +149,13 @@ public boolean equals(Object o) { return false; } IncidentTeamUpdateData incidentTeamUpdateData = (IncidentTeamUpdateData) o; - return Objects.equals(this.attributes, incidentTeamUpdateData.attributes) - && Objects.equals(this.id, incidentTeamUpdateData.id) - && Objects.equals(this.relationships, incidentTeamUpdateData.relationships) - && Objects.equals(this.type, incidentTeamUpdateData.type); + return Objects.equals(this.attributes, incidentTeamUpdateData.attributes) && Objects.equals(this.id, incidentTeamUpdateData.id) && Objects.equals(this.relationships, incidentTeamUpdateData.relationships) && Objects.equals(this.type, incidentTeamUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -158,7 +171,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java index 334518885f1..d82a8d1cde2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update request with an incident team payload. */ -@JsonPropertyOrder({IncidentTeamUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update request with an incident team payload.

+ */ +@JsonPropertyOrder({ + IncidentTeamUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentTeamUpdateData data; @@ -26,11 +47,10 @@ public IncidentTeamUpdateRequest() {} @JsonCreator public IncidentTeamUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentTeamUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentTeamUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentTeamUpdateRequest data(IncidentTeamUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentTeamUpdateRequest data(IncidentTeamUpdateData data) { } /** - * Incident Team data for an update request. - * + *

Incident Team data for an update request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTeamUpdateData getData() { + return data; + } public void setData(IncidentTeamUpdateData data) { this.data = data; } - /** Return true if this IncidentTeamUpdateRequest object is equal to o. */ + /** + * Return true if this IncidentTeamUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, incidentTeamUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java index ba18674dd89..bc4cca02274 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response with a list of incident team payloads. */ +/** + *

Response with a list of incident team payloads.

+ */ @JsonPropertyOrder({ IncidentTeamsResponse.JSON_PROPERTY_DATA, IncidentTeamsResponse.JSON_PROPERTY_INCLUDED, IncidentTeamsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTeamsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -38,11 +55,9 @@ public IncidentTeamsResponse() {} @JsonCreator public IncidentTeamsResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public IncidentTeamsResponse data(List data) { this.data = data; for (IncidentTeamResponseData item : data) { @@ -50,7 +65,6 @@ public IncidentTeamsResponse data(List data) { } return this; } - public IncidentTeamsResponse addDataItem(IncidentTeamResponseData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -58,45 +72,46 @@ public IncidentTeamsResponse addDataItem(IncidentTeamResponseData dataItem) { } /** - * An array of incident teams. - * + *

An array of incident teams.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } /** - * Included related resources which the user requested. - * + *

Included related resources which the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } /** - * The metadata object containing pagination metadata. - * + *

The metadata object containing pagination metadata.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseMeta getMeta() { - return meta; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponseMeta getMeta() { + return meta; + } - /** Return true if this IncidentTeamsResponse object is equal to o. */ + /** + * Return true if this IncidentTeamsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,14 +121,13 @@ public boolean equals(Object o) { return false; } IncidentTeamsResponse incidentTeamsResponse = (IncidentTeamsResponse) o; - return Objects.equals(this.data, incidentTeamsResponse.data) - && Objects.equals(this.included, incidentTeamsResponse.included) - && Objects.equals(this.meta, incidentTeamsResponse.meta); + return Objects.equals(this.data, incidentTeamsResponse.data) && Objects.equals(this.included, incidentTeamsResponse.included) && Objects.equals(this.meta, incidentTeamsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, included, meta); + return Objects.hash(data,included,meta); } @Override @@ -128,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellCreateAttributes.java index 4dce552a1f9..77277a3764d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellCreateAttributes.java @@ -6,231 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - IncidentTimelineCellCreateAttributes.IncidentTimelineCellCreateAttributesDeserializer.class) -@JsonSerialize( - using = - IncidentTimelineCellCreateAttributes.IncidentTimelineCellCreateAttributesSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = IncidentTimelineCellCreateAttributes.IncidentTimelineCellCreateAttributesDeserializer.class) +@JsonSerialize(using = IncidentTimelineCellCreateAttributes.IncidentTimelineCellCreateAttributesSerializer.class) public class IncidentTimelineCellCreateAttributes extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(IncidentTimelineCellCreateAttributes.class.getName()); + private static final Logger log = Logger.getLogger(IncidentTimelineCellCreateAttributes.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class IncidentTimelineCellCreateAttributesSerializer - extends StdSerializer { - public IncidentTimelineCellCreateAttributesSerializer( - Class t) { - super(t); + public static class IncidentTimelineCellCreateAttributesSerializer extends StdSerializer { + public IncidentTimelineCellCreateAttributesSerializer(Class t) { + super(t); + } + + public IncidentTimelineCellCreateAttributesSerializer() { + this(null); + } + + @Override + public void serialize(IncidentTimelineCellCreateAttributes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public IncidentTimelineCellCreateAttributesSerializer() { - this(null); + public static class IncidentTimelineCellCreateAttributesDeserializer extends StdDeserializer { + public IncidentTimelineCellCreateAttributesDeserializer() { + this(IncidentTimelineCellCreateAttributes.class); + } + + public IncidentTimelineCellCreateAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public IncidentTimelineCellCreateAttributes 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 IncidentTimelineCellMarkdownCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IncidentTimelineCellMarkdownCreateAttributes.class.equals(Integer.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Long.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Float.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Double.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Boolean.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IncidentTimelineCellMarkdownCreateAttributes.class.equals(Integer.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IncidentTimelineCellMarkdownCreateAttributes.class.equals(Float.class) || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (IncidentTimelineCellMarkdownCreateAttributes.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IncidentTimelineCellMarkdownCreateAttributes.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IncidentTimelineCellMarkdownCreateAttributes.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 (!((IncidentTimelineCellMarkdownCreateAttributes)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IncidentTimelineCellMarkdownCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IncidentTimelineCellMarkdownCreateAttributes'", e); + } + + IncidentTimelineCellCreateAttributes ret = new IncidentTimelineCellCreateAttributes(); + 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 IncidentTimelineCellCreateAttributes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "IncidentTimelineCellCreateAttributes cannot be null"); + } } - @Override - public void serialize( - IncidentTimelineCellCreateAttributes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public IncidentTimelineCellCreateAttributes() { + super("oneOf", Boolean.FALSE); + } + public IncidentTimelineCellCreateAttributes(IncidentTimelineCellMarkdownCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class IncidentTimelineCellCreateAttributesDeserializer - extends StdDeserializer { - public IncidentTimelineCellCreateAttributesDeserializer() { - this(IncidentTimelineCellCreateAttributes.class); + static { + schemas.put("IncidentTimelineCellMarkdownCreateAttributes", new GenericType() { + }); + JSON.registerDescendants(IncidentTimelineCellCreateAttributes.class, Collections.unmodifiableMap(schemas)); } - public IncidentTimelineCellCreateAttributesDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return IncidentTimelineCellCreateAttributes.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IncidentTimelineCellMarkdownCreateAttributes + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public IncidentTimelineCellCreateAttributes 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 IncidentTimelineCellMarkdownCreateAttributes - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (IncidentTimelineCellMarkdownCreateAttributes.class.equals(Integer.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Long.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Float.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Double.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Boolean.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((IncidentTimelineCellMarkdownCreateAttributes.class.equals(Integer.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((IncidentTimelineCellMarkdownCreateAttributes.class.equals(Float.class) - || IncidentTimelineCellMarkdownCreateAttributes.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (IncidentTimelineCellMarkdownCreateAttributes.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (IncidentTimelineCellMarkdownCreateAttributes.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IncidentTimelineCellMarkdownCreateAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(IncidentTimelineCellMarkdownCreateAttributes.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 (!((IncidentTimelineCellMarkdownCreateAttributes) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, - "Input data matches schema 'IncidentTimelineCellMarkdownCreateAttributes'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'IncidentTimelineCellMarkdownCreateAttributes'", - e); - } - - IncidentTimelineCellCreateAttributes ret = new IncidentTimelineCellCreateAttributes(); - 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; + throw new RuntimeException("Invalid instance type. Must be IncidentTimelineCellMarkdownCreateAttributes"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * IncidentTimelineCellMarkdownCreateAttributes + * + * @return The actual instance (IncidentTimelineCellMarkdownCreateAttributes) + */ @Override - public IncidentTimelineCellCreateAttributes getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentTimelineCellCreateAttributes cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentTimelineCellCreateAttributes() { - super("oneOf", Boolean.FALSE); - } - - public IncidentTimelineCellCreateAttributes(IncidentTimelineCellMarkdownCreateAttributes o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "IncidentTimelineCellMarkdownCreateAttributes", - new GenericType() {}); - JSON.registerDescendants( - IncidentTimelineCellCreateAttributes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentTimelineCellCreateAttributes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: IncidentTimelineCellMarkdownCreateAttributes - * - *

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( - IncidentTimelineCellMarkdownCreateAttributes.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `IncidentTimelineCellMarkdownCreateAttributes`. If the actual instance is not `IncidentTimelineCellMarkdownCreateAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IncidentTimelineCellMarkdownCreateAttributes` + * @throws ClassCastException if the instance is not `IncidentTimelineCellMarkdownCreateAttributes` + */ + public IncidentTimelineCellMarkdownCreateAttributes getIncidentTimelineCellMarkdownCreateAttributes() throws ClassCastException { + return (IncidentTimelineCellMarkdownCreateAttributes)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be IncidentTimelineCellMarkdownCreateAttributes"); - } - - /** - * Get the actual instance, which can be the following: - * IncidentTimelineCellMarkdownCreateAttributes - * - * @return The actual instance (IncidentTimelineCellMarkdownCreateAttributes) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IncidentTimelineCellMarkdownCreateAttributes`. If the actual - * instance is not `IncidentTimelineCellMarkdownCreateAttributes`, the ClassCastException will be - * thrown. - * - * @return The actual instance of `IncidentTimelineCellMarkdownCreateAttributes` - * @throws ClassCastException if the instance is not - * `IncidentTimelineCellMarkdownCreateAttributes` - */ - public IncidentTimelineCellMarkdownCreateAttributes - getIncidentTimelineCellMarkdownCreateAttributes() throws ClassCastException { - return (IncidentTimelineCellMarkdownCreateAttributes) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownContentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownContentType.java index a2e6c799f51..9def31b0fbc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownContentType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownContentType.java @@ -6,28 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Markdown timeline cell. */ -@JsonSerialize( - using = - IncidentTimelineCellMarkdownContentType.IncidentTimelineCellMarkdownContentTypeSerializer - .class) +/** + *

Type of the Markdown timeline cell.

+ */ +@JsonSerialize(using = IncidentTimelineCellMarkdownContentType.IncidentTimelineCellMarkdownContentTypeSerializer.class) public class IncidentTimelineCellMarkdownContentType { - public static final IncidentTimelineCellMarkdownContentType MARKDOWN = - new IncidentTimelineCellMarkdownContentType("markdown"); + public static final IncidentTimelineCellMarkdownContentType MARKDOWN = new IncidentTimelineCellMarkdownContentType("markdown"); private static final Set allowedValues = new HashSet(Arrays.asList("markdown")); @@ -41,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class IncidentTimelineCellMarkdownContentTypeSerializer - extends StdSerializer { - public IncidentTimelineCellMarkdownContentTypeSerializer( - Class t) { - super(t); - } + public static class IncidentTimelineCellMarkdownContentTypeSerializer extends StdSerializer { + public IncidentTimelineCellMarkdownContentTypeSerializer(Class t) { + super(t); + } - public IncidentTimelineCellMarkdownContentTypeSerializer() { - this(null); - } + public IncidentTimelineCellMarkdownContentTypeSerializer() { + this(null); + } - @Override - public void serialize( - IncidentTimelineCellMarkdownContentType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(IncidentTimelineCellMarkdownContentType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentTimelineCellMarkdownContentType object is equal to o. */ + /** + * Return true if this IncidentTimelineCellMarkdownContentType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributes.java index ae26331b67c..f80647ad83f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributes.java @@ -6,26 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Timeline cell data for Markdown timeline cells for a create request. */ + +/** + *

Timeline cell data for Markdown timeline cells for a create request.

+ */ @JsonPropertyOrder({ IncidentTimelineCellMarkdownCreateAttributes.JSON_PROPERTY_CELL_TYPE, IncidentTimelineCellMarkdownCreateAttributes.JSON_PROPERTY_CONTENT, IncidentTimelineCellMarkdownCreateAttributes.JSON_PROPERTY_IMPORTANT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTimelineCellMarkdownCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CELL_TYPE = "cell_type"; - private IncidentTimelineCellMarkdownContentType cellType = - IncidentTimelineCellMarkdownContentType.MARKDOWN; + private IncidentTimelineCellMarkdownContentType cellType = IncidentTimelineCellMarkdownContentType.MARKDOWN; public static final String JSON_PROPERTY_CONTENT = "content"; private IncidentTimelineCellMarkdownCreateAttributesContent content; @@ -37,85 +55,77 @@ public IncidentTimelineCellMarkdownCreateAttributes() {} @JsonCreator public IncidentTimelineCellMarkdownCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_CELL_TYPE) - IncidentTimelineCellMarkdownContentType cellType, - @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) - IncidentTimelineCellMarkdownCreateAttributesContent content) { - this.cellType = cellType; - this.unparsed |= !cellType.isValid(); - this.content = content; - this.unparsed |= content.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_CELL_TYPE)IncidentTimelineCellMarkdownContentType cellType, + @JsonProperty(required=true, value=JSON_PROPERTY_CONTENT)IncidentTimelineCellMarkdownCreateAttributesContent content) { + this.cellType = cellType; + this.unparsed |= !cellType.isValid(); + this.content = content; + this.unparsed |= content.unparsed; } - - public IncidentTimelineCellMarkdownCreateAttributes cellType( - IncidentTimelineCellMarkdownContentType cellType) { + public IncidentTimelineCellMarkdownCreateAttributes cellType(IncidentTimelineCellMarkdownContentType cellType) { this.cellType = cellType; this.unparsed |= !cellType.isValid(); return this; } /** - * Type of the Markdown timeline cell. - * + *

Type of the Markdown timeline cell.

* @return cellType - */ - @JsonProperty(JSON_PROPERTY_CELL_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTimelineCellMarkdownContentType getCellType() { - return cellType; - } - + **/ + @JsonProperty(JSON_PROPERTY_CELL_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTimelineCellMarkdownContentType getCellType() { + return cellType; + } public void setCellType(IncidentTimelineCellMarkdownContentType cellType) { if (!cellType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.cellType = cellType; } - - public IncidentTimelineCellMarkdownCreateAttributes content( - IncidentTimelineCellMarkdownCreateAttributesContent content) { + public IncidentTimelineCellMarkdownCreateAttributes content(IncidentTimelineCellMarkdownCreateAttributesContent content) { this.content = content; this.unparsed |= content.unparsed; return this; } /** - * The Markdown timeline cell contents. - * + *

The Markdown timeline cell contents.

* @return content - */ - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTimelineCellMarkdownCreateAttributesContent getContent() { - return content; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentTimelineCellMarkdownCreateAttributesContent getContent() { + return content; + } public void setContent(IncidentTimelineCellMarkdownCreateAttributesContent content) { this.content = content; } - public IncidentTimelineCellMarkdownCreateAttributes important(Boolean important) { this.important = important; return this; } /** - * A flag indicating whether the timeline cell is important and should be highlighted. - * + *

A flag indicating whether the timeline cell is important and should be highlighted.

* @return important - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IMPORTANT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getImportant() { - return important; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPORTANT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getImportant() { + return important; + } public void setImportant(Boolean important) { this.important = important; } - /** Return true if this IncidentTimelineCellMarkdownCreateAttributes object is equal to o. */ + /** + * Return true if this IncidentTimelineCellMarkdownCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -124,16 +134,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentTimelineCellMarkdownCreateAttributes incidentTimelineCellMarkdownCreateAttributes = - (IncidentTimelineCellMarkdownCreateAttributes) o; - return Objects.equals(this.cellType, incidentTimelineCellMarkdownCreateAttributes.cellType) - && Objects.equals(this.content, incidentTimelineCellMarkdownCreateAttributes.content) - && Objects.equals(this.important, incidentTimelineCellMarkdownCreateAttributes.important); + IncidentTimelineCellMarkdownCreateAttributes incidentTimelineCellMarkdownCreateAttributes = (IncidentTimelineCellMarkdownCreateAttributes) o; + return Objects.equals(this.cellType, incidentTimelineCellMarkdownCreateAttributes.cellType) && Objects.equals(this.content, incidentTimelineCellMarkdownCreateAttributes.content) && Objects.equals(this.important, incidentTimelineCellMarkdownCreateAttributes.important); } + @Override public int hashCode() { - return Objects.hash(cellType, content, important); + return Objects.hash(cellType,content,important); } @Override @@ -148,7 +156,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributesContent.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributesContent.java index 41fd1f5c145..f065b78ca7f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributesContent.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentTimelineCellMarkdownCreateAttributesContent.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The Markdown timeline cell contents. */ -@JsonPropertyOrder({IncidentTimelineCellMarkdownCreateAttributesContent.JSON_PROPERTY_CONTENT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The Markdown timeline cell contents.

+ */ +@JsonPropertyOrder({ + IncidentTimelineCellMarkdownCreateAttributesContent.JSON_PROPERTY_CONTENT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentTimelineCellMarkdownCreateAttributesContent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTENT = "content"; private String content; @@ -27,17 +49,16 @@ public IncidentTimelineCellMarkdownCreateAttributesContent content(String conten } /** - * The Markdown content of the cell. - * + *

The Markdown content of the cell.

* @return content - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getContent() { - return content; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getContent() { + return content; + } public void setContent(String content) { this.content = content; } @@ -53,13 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentTimelineCellMarkdownCreateAttributesContent - incidentTimelineCellMarkdownCreateAttributesContent = - (IncidentTimelineCellMarkdownCreateAttributesContent) o; - return Objects.equals( - this.content, incidentTimelineCellMarkdownCreateAttributesContent.content); + IncidentTimelineCellMarkdownCreateAttributesContent incidentTimelineCellMarkdownCreateAttributesContent = (IncidentTimelineCellMarkdownCreateAttributesContent) o; + return Objects.equals(this.content, incidentTimelineCellMarkdownCreateAttributesContent.content); } + @Override public int hashCode() { return Objects.hash(content); @@ -75,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentType.java index c8d89af3dad..73c147914bc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentType.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Incident resource type. */ +/** + *

Incident resource type.

+ */ @JsonSerialize(using = IncidentType.IncidentTypeSerializer.class) public class IncidentType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class IncidentTypeSerializer extends StdSerializer { - public IncidentTypeSerializer(Class t) { - super(t); - } - - public IncidentTypeSerializer() { - this(null); - } - - @Override - public void serialize(IncidentType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public IncidentTypeSerializer(Class t) { + super(t); + } + + public IncidentTypeSerializer() { + this(null); + } + + @Override + public void serialize(IncidentType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this IncidentType object is equal to o. */ + /** + * Return true if this IncidentType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateAttributes.java index 704e79a2422..397ef89435a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateAttributes.java @@ -6,21 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** The incident's attributes for an update request. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The incident's attributes for an update request.

+ */ @JsonPropertyOrder({ IncidentUpdateAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_END, IncidentUpdateAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE, @@ -31,12 +43,11 @@ IncidentUpdateAttributes.JSON_PROPERTY_NOTIFICATION_HANDLES, IncidentUpdateAttributes.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOMER_IMPACT_END = "customer_impact_end"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable customerImpactEnd = JsonNullable.undefined(); @@ -44,16 +55,13 @@ public class IncidentUpdateAttributes { private String customerImpactScope; public static final String JSON_PROPERTY_CUSTOMER_IMPACT_START = "customer_impact_start"; - @JsonSerialize(using = JsonTimeSerializer.class) - private JsonNullable customerImpactStart = - JsonNullable.undefined(); + private JsonNullable customerImpactStart = JsonNullable.undefined(); public static final String JSON_PROPERTY_CUSTOMER_IMPACTED = "customer_impacted"; private Boolean customerImpacted; public static final String JSON_PROPERTY_DETECTED = "detected"; - @JsonSerialize(using = JsonTimeSerializer.class) private JsonNullable detected = JsonNullable.undefined(); @@ -72,141 +80,120 @@ public IncidentUpdateAttributes customerImpactEnd(OffsetDateTime customerImpactE } /** - * Timestamp when customers were no longer impacted by the incident. - * + *

Timestamp when customers were no longer impacted by the incident.

* @return customerImpactEnd - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getCustomerImpactEnd() { - return customerImpactEnd.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCustomerImpactEnd() { + return customerImpactEnd.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomerImpactEnd_JsonNullable() { return customerImpactEnd; } - - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END) - public void setCustomerImpactEnd_JsonNullable(JsonNullable customerImpactEnd) { + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END)public void setCustomerImpactEnd_JsonNullable(JsonNullable customerImpactEnd) { this.customerImpactEnd = customerImpactEnd; } - public void setCustomerImpactEnd(OffsetDateTime customerImpactEnd) { this.customerImpactEnd = JsonNullable.of(customerImpactEnd); } - public IncidentUpdateAttributes customerImpactScope(String customerImpactScope) { this.customerImpactScope = customerImpactScope; return this; } /** - * A summary of the impact customers experienced during the incident. - * + *

A summary of the impact customers experienced during the incident.

* @return customerImpactScope - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomerImpactScope() { - return customerImpactScope; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerImpactScope() { + return customerImpactScope; + } public void setCustomerImpactScope(String customerImpactScope) { this.customerImpactScope = customerImpactScope; } - public IncidentUpdateAttributes customerImpactStart(OffsetDateTime customerImpactStart) { this.customerImpactStart = JsonNullable.of(customerImpactStart); return this; } /** - * Timestamp when customers began being impacted by the incident. - * + *

Timestamp when customers began being impacted by the incident.

* @return customerImpactStart - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getCustomerImpactStart() { - return customerImpactStart.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCustomerImpactStart() { + return customerImpactStart.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomerImpactStart_JsonNullable() { return customerImpactStart; } - - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START) - public void setCustomerImpactStart_JsonNullable( - JsonNullable customerImpactStart) { + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START)public void setCustomerImpactStart_JsonNullable(JsonNullable customerImpactStart) { this.customerImpactStart = customerImpactStart; } - public void setCustomerImpactStart(OffsetDateTime customerImpactStart) { this.customerImpactStart = JsonNullable.of(customerImpactStart); } - public IncidentUpdateAttributes customerImpacted(Boolean customerImpacted) { this.customerImpacted = customerImpacted; return this; } /** - * A flag indicating whether the incident caused customer impact. - * + *

A flag indicating whether the incident caused customer impact.

* @return customerImpacted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCustomerImpacted() { - return customerImpacted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCustomerImpacted() { + return customerImpacted; + } public void setCustomerImpacted(Boolean customerImpacted) { this.customerImpacted = customerImpacted; } - public IncidentUpdateAttributes detected(OffsetDateTime detected) { this.detected = JsonNullable.of(detected); return this; } /** - * Timestamp when the incident was detected. - * + *

Timestamp when the incident was detected.

* @return detected - */ - @jakarta.annotation.Nullable - @JsonIgnore - public OffsetDateTime getDetected() { - return detected.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDetected() { + return detected.orElse(null); + } @JsonProperty(JSON_PROPERTY_DETECTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getDetected_JsonNullable() { return detected; } - - @JsonProperty(JSON_PROPERTY_DETECTED) - public void setDetected_JsonNullable(JsonNullable detected) { + @JsonProperty(JSON_PROPERTY_DETECTED)public void setDetected_JsonNullable(JsonNullable detected) { this.detected = detected; } - public void setDetected(OffsetDateTime detected) { this.detected = JsonNullable.of(detected); } - public IncidentUpdateAttributes fields(Map fields) { this.fields = fields; return this; } - public IncidentUpdateAttributes putFieldsItem(String key, IncidentFieldAttributes fieldsItem) { if (this.fields == null) { this.fields = new HashMap<>(); @@ -216,32 +203,27 @@ public IncidentUpdateAttributes putFieldsItem(String key, IncidentFieldAttribute } /** - * A condensed view of the user-defined fields for which to update selections. - * + *

A condensed view of the user-defined fields for which to update selections.

* @return fields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getFields() { - return fields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getFields() { + return fields; + } public void setFields(Map fields) { this.fields = fields; } - - public IncidentUpdateAttributes notificationHandles( - List notificationHandles) { + public IncidentUpdateAttributes notificationHandles(List notificationHandles) { this.notificationHandles = notificationHandles; for (IncidentNotificationHandle item : notificationHandles) { this.unparsed |= item.unparsed; } return this; } - - public IncidentUpdateAttributes addNotificationHandlesItem( - IncidentNotificationHandle notificationHandlesItem) { + public IncidentUpdateAttributes addNotificationHandlesItem(IncidentNotificationHandle notificationHandlesItem) { if (this.notificationHandles == null) { this.notificationHandles = new ArrayList<>(); } @@ -251,43 +233,42 @@ public IncidentUpdateAttributes addNotificationHandlesItem( } /** - * Notification handles that will be notified of the incident during update. - * + *

Notification handles that will be notified of the incident during update.

* @return notificationHandles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotificationHandles() { - return notificationHandles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotificationHandles() { + return notificationHandles; + } public void setNotificationHandles(List notificationHandles) { this.notificationHandles = notificationHandles; } - public IncidentUpdateAttributes title(String title) { this.title = title; return this; } /** - * The title of the incident, which summarizes what happened. - * + *

The title of the incident, which summarizes what happened.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this IncidentUpdateAttributes object is equal to o. */ + /** + * Return true if this IncidentUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -297,27 +278,13 @@ public boolean equals(Object o) { return false; } IncidentUpdateAttributes incidentUpdateAttributes = (IncidentUpdateAttributes) o; - return Objects.equals(this.customerImpactEnd, incidentUpdateAttributes.customerImpactEnd) - && Objects.equals(this.customerImpactScope, incidentUpdateAttributes.customerImpactScope) - && Objects.equals(this.customerImpactStart, incidentUpdateAttributes.customerImpactStart) - && Objects.equals(this.customerImpacted, incidentUpdateAttributes.customerImpacted) - && Objects.equals(this.detected, incidentUpdateAttributes.detected) - && Objects.equals(this.fields, incidentUpdateAttributes.fields) - && Objects.equals(this.notificationHandles, incidentUpdateAttributes.notificationHandles) - && Objects.equals(this.title, incidentUpdateAttributes.title); + return Objects.equals(this.customerImpactEnd, incidentUpdateAttributes.customerImpactEnd) && Objects.equals(this.customerImpactScope, incidentUpdateAttributes.customerImpactScope) && Objects.equals(this.customerImpactStart, incidentUpdateAttributes.customerImpactStart) && Objects.equals(this.customerImpacted, incidentUpdateAttributes.customerImpacted) && Objects.equals(this.detected, incidentUpdateAttributes.detected) && Objects.equals(this.fields, incidentUpdateAttributes.fields) && Objects.equals(this.notificationHandles, incidentUpdateAttributes.notificationHandles) && Objects.equals(this.title, incidentUpdateAttributes.title); } + @Override public int hashCode() { - return Objects.hash( - customerImpactEnd, - customerImpactScope, - customerImpactStart, - customerImpacted, - detected, - fields, - notificationHandles, - title); + return Objects.hash(customerImpactEnd,customerImpactScope,customerImpactStart,customerImpacted,detected,fields,notificationHandles,title); } @Override @@ -325,25 +292,20 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IncidentUpdateAttributes {\n"); sb.append(" customerImpactEnd: ").append(toIndentedString(customerImpactEnd)).append("\n"); - sb.append(" customerImpactScope: ") - .append(toIndentedString(customerImpactScope)) - .append("\n"); - sb.append(" customerImpactStart: ") - .append(toIndentedString(customerImpactStart)) - .append("\n"); + sb.append(" customerImpactScope: ").append(toIndentedString(customerImpactScope)).append("\n"); + sb.append(" customerImpactStart: ").append(toIndentedString(customerImpactStart)).append("\n"); sb.append(" customerImpacted: ").append(toIndentedString(customerImpacted)).append("\n"); sb.append(" detected: ").append(toIndentedString(detected)).append("\n"); sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); - sb.append(" notificationHandles: ") - .append(toIndentedString(notificationHandles)) - .append("\n"); + sb.append(" notificationHandles: ").append(toIndentedString(notificationHandles)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateData.java index f3eb23f65c8..85ebb3ca7ce 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Incident data for an update request. */ +/** + *

Incident data for an update request.

+ */ @JsonPropertyOrder({ IncidentUpdateData.JSON_PROPERTY_ATTRIBUTES, IncidentUpdateData.JSON_PROPERTY_ID, IncidentUpdateData.JSON_PROPERTY_RELATIONSHIPS, IncidentUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private IncidentUpdateAttributes attributes; @@ -40,13 +59,12 @@ public IncidentUpdateData() {} @JsonCreator public IncidentUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public IncidentUpdateData attributes(IncidentUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,41 +72,37 @@ public IncidentUpdateData attributes(IncidentUpdateAttributes attributes) { } /** - * The incident's attributes for an update request. - * + *

The incident's attributes for an update request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(IncidentUpdateAttributes attributes) { this.attributes = attributes; } - public IncidentUpdateData id(String id) { this.id = id; return this; } /** - * The team's ID. - * + *

The incident's ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public IncidentUpdateData relationships(IncidentUpdateRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -96,21 +110,19 @@ public IncidentUpdateData relationships(IncidentUpdateRelationships relationship } /** - * The incident's relationships for an update request. - * + *

The incident's relationships for an update request.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentUpdateRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentUpdateRelationships getRelationships() { + return relationships; + } public void setRelationships(IncidentUpdateRelationships relationships) { this.relationships = relationships; } - public IncidentUpdateData type(IncidentType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -118,24 +130,25 @@ public IncidentUpdateData type(IncidentType type) { } /** - * Incident resource type. - * + *

Incident resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentType getType() { + return type; + } public void setType(IncidentType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this IncidentUpdateData object is equal to o. */ + /** + * Return true if this IncidentUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +158,13 @@ public boolean equals(Object o) { return false; } IncidentUpdateData incidentUpdateData = (IncidentUpdateData) o; - return Objects.equals(this.attributes, incidentUpdateData.attributes) - && Objects.equals(this.id, incidentUpdateData.id) - && Objects.equals(this.relationships, incidentUpdateData.relationships) - && Objects.equals(this.type, incidentUpdateData.type); + return Objects.equals(this.attributes, incidentUpdateData.attributes) && Objects.equals(this.id, incidentUpdateData.id) && Objects.equals(this.relationships, incidentUpdateData.relationships) && Objects.equals(this.type, incidentUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -169,7 +180,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRelationships.java index 1d0768fa2f3..45cda5de430 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRelationships.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The incident's relationships for an update request. */ + +/** + *

The incident's relationships for an update request.

+ */ @JsonPropertyOrder({ IncidentUpdateRelationships.JSON_PROPERTY_COMMANDER_USER, IncidentUpdateRelationships.JSON_PROPERTY_INTEGRATIONS, IncidentUpdateRelationships.JSON_PROPERTY_POSTMORTEM }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentUpdateRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMMANDER_USER = "commander_user"; private NullableRelationshipToUser commanderUser; @@ -38,44 +58,39 @@ public IncidentUpdateRelationships commanderUser(NullableRelationshipToUser comm } /** - * Relationship to user. - * + *

Relationship to user.

* @return commanderUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMMANDER_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NullableRelationshipToUser getCommanderUser() { - return commanderUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMANDER_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public NullableRelationshipToUser getCommanderUser() { + return commanderUser; + } public void setCommanderUser(NullableRelationshipToUser commanderUser) { this.commanderUser = commanderUser; } - - public IncidentUpdateRelationships integrations( - RelationshipToIncidentIntegrationMetadatas integrations) { + public IncidentUpdateRelationships integrations(RelationshipToIncidentIntegrationMetadatas integrations) { this.integrations = integrations; this.unparsed |= integrations.unparsed; return this; } /** - * A relationship reference for multiple integration metadata objects. - * + *

A relationship reference for multiple integration metadata objects.

* @return integrations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGRATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToIncidentIntegrationMetadatas getIntegrations() { - return integrations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentIntegrationMetadatas getIntegrations() { + return integrations; + } public void setIntegrations(RelationshipToIncidentIntegrationMetadatas integrations) { this.integrations = integrations; } - public IncidentUpdateRelationships postmortem(RelationshipToIncidentPostmortem postmortem) { this.postmortem = postmortem; this.unparsed |= postmortem.unparsed; @@ -83,22 +98,23 @@ public IncidentUpdateRelationships postmortem(RelationshipToIncidentPostmortem p } /** - * A relationship reference for postmortems. - * + *

A relationship reference for postmortems.

* @return postmortem - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POSTMORTEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToIncidentPostmortem getPostmortem() { - return postmortem; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSTMORTEM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToIncidentPostmortem getPostmortem() { + return postmortem; + } public void setPostmortem(RelationshipToIncidentPostmortem postmortem) { this.postmortem = postmortem; } - /** Return true if this IncidentUpdateRelationships object is equal to o. */ + /** + * Return true if this IncidentUpdateRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -108,14 +124,13 @@ public boolean equals(Object o) { return false; } IncidentUpdateRelationships incidentUpdateRelationships = (IncidentUpdateRelationships) o; - return Objects.equals(this.commanderUser, incidentUpdateRelationships.commanderUser) - && Objects.equals(this.integrations, incidentUpdateRelationships.integrations) - && Objects.equals(this.postmortem, incidentUpdateRelationships.postmortem); + return Objects.equals(this.commanderUser, incidentUpdateRelationships.commanderUser) && Objects.equals(this.integrations, incidentUpdateRelationships.integrations) && Objects.equals(this.postmortem, incidentUpdateRelationships.postmortem); } + @Override public int hashCode() { - return Objects.hash(commanderUser, integrations, postmortem); + return Objects.hash(commanderUser,integrations,postmortem); } @Override @@ -130,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRequest.java index 4a7fba68984..53a12968189 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update request for an incident. */ -@JsonPropertyOrder({IncidentUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update request for an incident.

+ */ +@JsonPropertyOrder({ + IncidentUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private IncidentUpdateData data; @@ -26,11 +47,10 @@ public IncidentUpdateRequest() {} @JsonCreator public IncidentUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)IncidentUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public IncidentUpdateRequest data(IncidentUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public IncidentUpdateRequest data(IncidentUpdateData data) { } /** - * Incident data for an update request. - * + *

Incident data for an update request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentUpdateData getData() { + return data; + } public void setData(IncidentUpdateData data) { this.data = data; } - /** Return true if this IncidentUpdateRequest object is equal to o. */ + /** + * Return true if this IncidentUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, incidentUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentsResponse.java index 3eb4f1ce0ce..fff3bd0b6fd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/IncidentsResponse.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response with a list of incidents. */ +/** + *

Response with a list of incidents.

+ */ @JsonPropertyOrder({ IncidentsResponse.JSON_PROPERTY_DATA, IncidentsResponse.JSON_PROPERTY_INCLUDED, IncidentsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IncidentsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -38,10 +55,9 @@ public IncidentsResponse() {} @JsonCreator public IncidentsResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public IncidentsResponse data(List data) { this.data = data; for (IncidentResponseData item : data) { @@ -49,7 +65,6 @@ public IncidentsResponse data(List data) { } return this; } - public IncidentsResponse addDataItem(IncidentResponseData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -57,45 +72,46 @@ public IncidentsResponse addDataItem(IncidentResponseData dataItem) { } /** - * An array of incidents. - * + *

An array of incidents.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } /** - * Included related resources that the user requested. - * + *

Included related resources that the user requested.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } /** - * The metadata object containing pagination metadata. - * + *

The metadata object containing pagination metadata.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseMeta getMeta() { - return meta; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public IncidentResponseMeta getMeta() { + return meta; + } - /** Return true if this IncidentsResponse object is equal to o. */ + /** + * Return true if this IncidentsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -105,14 +121,13 @@ public boolean equals(Object o) { return false; } IncidentsResponse incidentsResponse = (IncidentsResponse) o; - return Objects.equals(this.data, incidentsResponse.data) - && Objects.equals(this.included, incidentsResponse.included) - && Objects.equals(this.meta, incidentsResponse.meta); + return Objects.equals(this.data, incidentsResponse.data) && Objects.equals(this.included, incidentsResponse.included) && Objects.equals(this.meta, incidentsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, included, meta); + return Objects.hash(data,included,meta); } @Override @@ -127,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/IntakePayloadAccepted.java b/src/main/java/com/datadog/api/client/v2/model/IntakePayloadAccepted.java index aa5a995296d..48bb981943f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IntakePayloadAccepted.java +++ b/src/main/java/com/datadog/api/client/v2/model/IntakePayloadAccepted.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The payload accepted for intake. */ -@JsonPropertyOrder({IntakePayloadAccepted.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The payload accepted for intake.

+ */ +@JsonPropertyOrder({ + IntakePayloadAccepted.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IntakePayloadAccepted { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ERRORS = "errors"; private List errors = null; @@ -27,7 +47,6 @@ public IntakePayloadAccepted errors(List errors) { this.errors = errors; return this; } - public IntakePayloadAccepted addErrorsItem(String errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); @@ -37,22 +56,23 @@ public IntakePayloadAccepted addErrorsItem(String errorsItem) { } /** - * A list of errors. - * + *

A list of errors.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } public void setErrors(List errors) { this.errors = errors; } - /** Return true if this IntakePayloadAccepted object is equal to o. */ + /** + * Return true if this IntakePayloadAccepted object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.errors, intakePayloadAccepted.errors); } + @Override public int hashCode() { return Objects.hash(errors); @@ -80,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/JiraIntegrationMetadata.java b/src/main/java/com/datadog/api/client/v2/model/JiraIntegrationMetadata.java new file mode 100644 index 00000000000..8f1f9da3d03 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JiraIntegrationMetadata.java @@ -0,0 +1,120 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Incident integration metadata for the Slack integration.

+ */ +@JsonPropertyOrder({ + JiraIntegrationMetadata.JSON_PROPERTY_ISSUES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class JiraIntegrationMetadata { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_ISSUES = "issues"; + private List issues = new ArrayList<>(); + + public JiraIntegrationMetadata() {} + + @JsonCreator + public JiraIntegrationMetadata( + @JsonProperty(required=true, value=JSON_PROPERTY_ISSUES)List issues) { + this.issues = issues; + } + public JiraIntegrationMetadata issues(List issues) { + this.issues = issues; + for (JiraIntegrationMetadataIssuesItem item : issues) { + this.unparsed |= item.unparsed; + } + return this; + } + public JiraIntegrationMetadata addIssuesItem(JiraIntegrationMetadataIssuesItem issuesItem) { + this.issues.add(issuesItem); + this.unparsed |= issuesItem.unparsed; + return this; + } + + /** + *

Array of Jira issues in this integration metadata.

+ * @return issues + **/ + @JsonProperty(JSON_PROPERTY_ISSUES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getIssues() { + return issues; + } + public void setIssues(List issues) { + this.issues = issues; + } + + /** + * Return true if this JiraIntegrationMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JiraIntegrationMetadata jiraIntegrationMetadata = (JiraIntegrationMetadata) o; + return Objects.equals(this.issues, jiraIntegrationMetadata.issues); + } + + + @Override + public int hashCode() { + return Objects.hash(issues); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JiraIntegrationMetadata {\n"); + sb.append(" issues: ").append(toIndentedString(issues)).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/JiraIntegrationMetadataIssuesItem.java b/src/main/java/com/datadog/api/client/v2/model/JiraIntegrationMetadataIssuesItem.java new file mode 100644 index 00000000000..18b48f2d0ce --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JiraIntegrationMetadataIssuesItem.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Item in the Jira integration metadata issue array.

+ */ +@JsonPropertyOrder({ + JiraIntegrationMetadataIssuesItem.JSON_PROPERTY_ACCOUNT, + JiraIntegrationMetadataIssuesItem.JSON_PROPERTY_ISSUE_KEY, + JiraIntegrationMetadataIssuesItem.JSON_PROPERTY_ISSUETYPE_ID, + JiraIntegrationMetadataIssuesItem.JSON_PROPERTY_PROJECT_KEY, + JiraIntegrationMetadataIssuesItem.JSON_PROPERTY_REDIRECT_URL +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class JiraIntegrationMetadataIssuesItem { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private String account; + + public static final String JSON_PROPERTY_ISSUE_KEY = "issue_key"; + private String issueKey; + + public static final String JSON_PROPERTY_ISSUETYPE_ID = "issuetype_id"; + private String issuetypeId; + + public static final String JSON_PROPERTY_PROJECT_KEY = "project_key"; + private String projectKey; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirect_url"; + private String redirectUrl; + + public JiraIntegrationMetadataIssuesItem() {} + + @JsonCreator + public JiraIntegrationMetadataIssuesItem( + @JsonProperty(required=true, value=JSON_PROPERTY_ACCOUNT)String account, + @JsonProperty(required=true, value=JSON_PROPERTY_PROJECT_KEY)String projectKey) { + this.account = account; + this.projectKey = projectKey; + } + public JiraIntegrationMetadataIssuesItem account(String account) { + this.account = account; + return this; + } + + /** + *

URL of issue's Jira account.

+ * @return account + **/ + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccount() { + return account; + } + public void setAccount(String account) { + this.account = account; + } + public JiraIntegrationMetadataIssuesItem issueKey(String issueKey) { + this.issueKey = issueKey; + return this; + } + + /** + *

Jira issue's issue key.

+ * @return issueKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUE_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIssueKey() { + return issueKey; + } + public void setIssueKey(String issueKey) { + this.issueKey = issueKey; + } + public JiraIntegrationMetadataIssuesItem issuetypeId(String issuetypeId) { + this.issuetypeId = issuetypeId; + return this; + } + + /** + *

Jira issue's issue type.

+ * @return issuetypeId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUETYPE_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIssuetypeId() { + return issuetypeId; + } + public void setIssuetypeId(String issuetypeId) { + this.issuetypeId = issuetypeId; + } + public JiraIntegrationMetadataIssuesItem projectKey(String projectKey) { + this.projectKey = projectKey; + return this; + } + + /** + *

Jira issue's project keys.

+ * @return projectKey + **/ + @JsonProperty(JSON_PROPERTY_PROJECT_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getProjectKey() { + return projectKey; + } + public void setProjectKey(String projectKey) { + this.projectKey = projectKey; + } + public JiraIntegrationMetadataIssuesItem redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + *

URL redirecting to the Jira issue.

+ * @return redirectUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRedirectUrl() { + return redirectUrl; + } + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * Return true if this JiraIntegrationMetadataIssuesItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JiraIntegrationMetadataIssuesItem jiraIntegrationMetadataIssuesItem = (JiraIntegrationMetadataIssuesItem) o; + return Objects.equals(this.account, jiraIntegrationMetadataIssuesItem.account) && Objects.equals(this.issueKey, jiraIntegrationMetadataIssuesItem.issueKey) && Objects.equals(this.issuetypeId, jiraIntegrationMetadataIssuesItem.issuetypeId) && Objects.equals(this.projectKey, jiraIntegrationMetadataIssuesItem.projectKey) && Objects.equals(this.redirectUrl, jiraIntegrationMetadataIssuesItem.redirectUrl); + } + + + @Override + public int hashCode() { + return Objects.hash(account,issueKey,issuetypeId,projectKey,redirectUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JiraIntegrationMetadataIssuesItem {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" issueKey: ").append(toIndentedString(issueKey)).append("\n"); + sb.append(" issuetypeId: ").append(toIndentedString(issuetypeId)).append("\n"); + sb.append(" projectKey: ").append(toIndentedString(projectKey)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).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/ListApplicationKeysResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListApplicationKeysResponse.java index 676bdf900a0..2503d0d09cd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ListApplicationKeysResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ListApplicationKeysResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response for a list of application keys. */ +/** + *

Response for a list of application keys.

+ */ @JsonPropertyOrder({ ListApplicationKeysResponse.JSON_PROPERTY_DATA, ListApplicationKeysResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListApplicationKeysResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -36,7 +54,6 @@ public ListApplicationKeysResponse data(List data) { } return this; } - public ListApplicationKeysResponse addDataItem(PartialApplicationKey dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -47,21 +64,19 @@ public ListApplicationKeysResponse addDataItem(PartialApplicationKey dataItem) { } /** - * Array of application keys. - * + *

Array of application keys.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public ListApplicationKeysResponse included(List included) { this.included = included; for (ApplicationKeyResponseIncludedItem item : included) { @@ -69,9 +84,7 @@ public ListApplicationKeysResponse included(List(); } @@ -81,22 +94,23 @@ public ListApplicationKeysResponse addIncludedItem( } /** - * Array of objects related to the application key. - * + *

Array of objects related to the application key.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this ListApplicationKeysResponse object is equal to o. */ + /** + * Return true if this ListApplicationKeysResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,13 +120,13 @@ public boolean equals(Object o) { return false; } ListApplicationKeysResponse listApplicationKeysResponse = (ListApplicationKeysResponse) o; - return Objects.equals(this.data, listApplicationKeysResponse.data) - && Objects.equals(this.included, listApplicationKeysResponse.included); + return Objects.equals(this.data, listApplicationKeysResponse.data) && Objects.equals(this.included, listApplicationKeysResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -126,7 +140,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Log.java b/src/main/java/com/datadog/api/client/v2/model/Log.java index e222a31d628..456f70a208e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Log.java +++ b/src/main/java/com/datadog/api/client/v2/model/Log.java @@ -6,18 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object description of a log after being processed and stored by Datadog. */ -@JsonPropertyOrder({Log.JSON_PROPERTY_ATTRIBUTES, Log.JSON_PROPERTY_ID, Log.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object description of a log after being processed and stored by Datadog.

+ */ +@JsonPropertyOrder({ + Log.JSON_PROPERTY_ATTRIBUTES, + Log.JSON_PROPERTY_ID, + Log.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Log { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogAttributes attributes; @@ -34,42 +58,38 @@ public Log attributes(LogAttributes attributes) { } /** - * JSON object containing all log attributes and their associated values. - * + *

JSON object containing all log attributes and their associated values.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogAttributes getAttributes() { + return attributes; + } public void setAttributes(LogAttributes attributes) { this.attributes = attributes; } - public Log id(String id) { this.id = id; return this; } /** - * Unique ID of the Log. - * + *

Unique ID of the Log.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public Log type(LogType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -77,25 +97,26 @@ public Log type(LogType type) { } /** - * Type of the event. - * + *

Type of the event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogType getType() { + return type; + } public void setType(LogType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this Log object is equal to o. */ + /** + * Return true if this Log object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -105,14 +126,13 @@ public boolean equals(Object o) { return false; } Log log = (Log) o; - return Objects.equals(this.attributes, log.attributes) - && Objects.equals(this.id, log.id) - && Objects.equals(this.type, log.type); + return Objects.equals(this.attributes, log.attributes) && Objects.equals(this.id, log.id) && Objects.equals(this.type, log.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -127,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogAttributes.java index 86bd1d1dc9a..eb52e217171 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogAttributes.java @@ -6,20 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** JSON object containing all log attributes and their associated values. */ +/** + *

JSON object containing all log attributes and their associated values.

+ */ @JsonPropertyOrder({ LogAttributes.JSON_PROPERTY_ATTRIBUTES, LogAttributes.JSON_PROPERTY_HOST, @@ -29,10 +42,10 @@ LogAttributes.JSON_PROPERTY_TAGS, LogAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private Map attributes = null; @@ -52,7 +65,6 @@ public class LogAttributes { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -60,7 +72,6 @@ public LogAttributes attributes(Map attributes) { this.attributes = attributes; return this; } - public LogAttributes putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); @@ -70,115 +81,103 @@ public LogAttributes putAttributesItem(String key, Object attributesItem) { } /** - * JSON object of attributes from your log. - * + *

JSON object of attributes from your log.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } public void setAttributes(Map attributes) { this.attributes = attributes; } - public LogAttributes host(String host) { this.host = host; return this; } /** - * Name of the machine from where the logs are being sent. - * + *

Name of the machine from where the logs are being sent.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public LogAttributes message(String message) { this.message = message; return this; } /** - * The message reserved - * attribute of your log. By default, Datadog ingests the value of the message attribute as - * the body of the log entry. That value is then highlighted and displayed in the Logstream, where - * it is indexed for full text search. - * + *

The message reserved attribute + * of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. + * That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public LogAttributes service(String service) { this.service = service; return this; } /** - * The name of the application or service generating the log events. It is used to switch from - * Logs to APM, so make sure you define the same value when you use both products. - * + *

The name of the application or service generating the log events. + * It is used to switch from Logs to APM, so make sure you define the same + * value when you use both products.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public LogAttributes status(String status) { this.status = status; return this; } /** - * Status of the message associated with your log. - * + *

Status of the message associated with your log.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - public LogAttributes tags(List tags) { this.tags = tags; return this; } - public LogAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -188,43 +187,42 @@ public LogAttributes addTagsItem(String tagsItem) { } /** - * Array of tags associated with your log. - * + *

Array of tags associated with your log.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public LogAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * Timestamp of your log. - * + *

Timestamp of your log.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this LogAttributes object is equal to o. */ + /** + * Return true if this LogAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -234,18 +232,13 @@ public boolean equals(Object o) { return false; } LogAttributes logAttributes = (LogAttributes) o; - return Objects.equals(this.attributes, logAttributes.attributes) - && Objects.equals(this.host, logAttributes.host) - && Objects.equals(this.message, logAttributes.message) - && Objects.equals(this.service, logAttributes.service) - && Objects.equals(this.status, logAttributes.status) - && Objects.equals(this.tags, logAttributes.tags) - && Objects.equals(this.timestamp, logAttributes.timestamp); + return Objects.equals(this.attributes, logAttributes.attributes) && Objects.equals(this.host, logAttributes.host) && Objects.equals(this.message, logAttributes.message) && Objects.equals(this.service, logAttributes.service) && Objects.equals(this.status, logAttributes.status) && Objects.equals(this.tags, logAttributes.tags) && Objects.equals(this.timestamp, logAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, host, message, service, status, tags, timestamp); + return Objects.hash(attributes,host,message,service,status,tags,timestamp); } @Override @@ -264,7 +257,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogType.java b/src/main/java/com/datadog/api/client/v2/model/LogType.java index 4426b548696..cd252f322e5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event. */ +/** + *

Type of the event.

+ */ @JsonSerialize(using = LogType.LogTypeSerializer.class) public class LogType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class LogTypeSerializer extends StdSerializer { - public LogTypeSerializer(Class t) { - super(t); - } - - public LogTypeSerializer() { - this(null); - } - - @Override - public void serialize(LogType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogTypeSerializer(Class t) { + super(t); + } + + public LogTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogType object is equal to o. */ + /** + * Return true if this LogType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucket.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucket.java index 3e0b64eee19..eff44291d9c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucket.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucket.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A bucket values */ +/** + *

A bucket values

+ */ @JsonPropertyOrder({ LogsAggregateBucket.JSON_PROPERTY_BY, LogsAggregateBucket.JSON_PROPERTY_COMPUTES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateBucket { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BY = "by"; private Map by = null; @@ -33,7 +51,6 @@ public LogsAggregateBucket by(Map by) { this.by = by; return this; } - public LogsAggregateBucket putByItem(String key, Object byItem) { if (this.by == null) { this.by = new HashMap<>(); @@ -43,26 +60,23 @@ public LogsAggregateBucket putByItem(String key, Object byItem) { } /** - * The key, value pairs for each group by - * + *

The key, value pairs for each group by

* @return by - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getBy() { - return by; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getBy() { + return by; + } public void setBy(Map by) { this.by = by; } - public LogsAggregateBucket computes(Map computes) { this.computes = computes; return this; } - public LogsAggregateBucket putComputesItem(String key, LogsAggregateBucketValue computesItem) { if (this.computes == null) { this.computes = new HashMap<>(); @@ -72,22 +86,23 @@ public LogsAggregateBucket putComputesItem(String key, LogsAggregateBucketValue } /** - * A map of the metric name -> value for regular compute or list of values for a timeseries - * + *

A map of the metric name -> value for regular compute or list of values for a timeseries

* @return computes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getComputes() { - return computes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getComputes() { + return computes; + } public void setComputes(Map computes) { this.computes = computes; } - /** Return true if this LogsAggregateBucket object is equal to o. */ + /** + * Return true if this LogsAggregateBucket object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } LogsAggregateBucket logsAggregateBucket = (LogsAggregateBucket) o; - return Objects.equals(this.by, logsAggregateBucket.by) - && Objects.equals(this.computes, logsAggregateBucket.computes); + return Objects.equals(this.by, logsAggregateBucket.by) && Objects.equals(this.computes, logsAggregateBucket.computes); } + @Override public int hashCode() { - return Objects.hash(by, computes); + return Objects.hash(by,computes); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValue.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValue.java index cee38f8f271..d6e41ae6df8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValue.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValue.java @@ -6,341 +6,309 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = LogsAggregateBucketValue.LogsAggregateBucketValueDeserializer.class) @JsonSerialize(using = LogsAggregateBucketValue.LogsAggregateBucketValueSerializer.class) public class LogsAggregateBucketValue extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(LogsAggregateBucketValue.class.getName()); - - @JsonIgnore public boolean unparsed = false; + private static final Logger log = Logger.getLogger(LogsAggregateBucketValue.class.getName()); - public static class LogsAggregateBucketValueSerializer - extends StdSerializer { - public LogsAggregateBucketValueSerializer(Class t) { - super(t); - } + @JsonIgnore + public boolean unparsed = false; - public LogsAggregateBucketValueSerializer() { - this(null); - } - - @Override - public void serialize( - LogsAggregateBucketValue value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class LogsAggregateBucketValueSerializer extends StdSerializer { + public LogsAggregateBucketValueSerializer(Class t) { + super(t); + } - public static class LogsAggregateBucketValueDeserializer - extends StdDeserializer { - public LogsAggregateBucketValueDeserializer() { - this(LogsAggregateBucketValue.class); - } + public LogsAggregateBucketValueSerializer() { + this(null); + } - public LogsAggregateBucketValueDeserializer(Class vc) { - super(vc); + @Override + public void serialize(LogsAggregateBucketValue value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public LogsAggregateBucketValue 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 String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class LogsAggregateBucketValueDeserializer extends StdDeserializer { + public LogsAggregateBucketValueDeserializer() { + this(LogsAggregateBucketValue.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + public LogsAggregateBucketValueDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public LogsAggregateBucketValue 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 String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + // deserialize LogsAggregateBucketValueTimeseries + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsAggregateBucketValueTimeseries.class.equals(Integer.class) || LogsAggregateBucketValueTimeseries.class.equals(Long.class) || LogsAggregateBucketValueTimeseries.class.equals(Float.class) || LogsAggregateBucketValueTimeseries.class.equals(Double.class) || LogsAggregateBucketValueTimeseries.class.equals(Boolean.class) || LogsAggregateBucketValueTimeseries.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsAggregateBucketValueTimeseries.class.equals(Integer.class) || LogsAggregateBucketValueTimeseries.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsAggregateBucketValueTimeseries.class.equals(Float.class) || LogsAggregateBucketValueTimeseries.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsAggregateBucketValueTimeseries.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsAggregateBucketValueTimeseries.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsAggregateBucketValueTimeseries.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 (!((LogsAggregateBucketValueTimeseries)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsAggregateBucketValueTimeseries'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsAggregateBucketValueTimeseries'", e); + } + + LogsAggregateBucketValue ret = new LogsAggregateBucketValue(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public LogsAggregateBucketValue getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "LogsAggregateBucketValue cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } + } - // deserialize LogsAggregateBucketValueTimeseries - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsAggregateBucketValueTimeseries.class.equals(Integer.class) - || LogsAggregateBucketValueTimeseries.class.equals(Long.class) - || LogsAggregateBucketValueTimeseries.class.equals(Float.class) - || LogsAggregateBucketValueTimeseries.class.equals(Double.class) - || LogsAggregateBucketValueTimeseries.class.equals(Boolean.class) - || LogsAggregateBucketValueTimeseries.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsAggregateBucketValueTimeseries.class.equals(Integer.class) - || LogsAggregateBucketValueTimeseries.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsAggregateBucketValueTimeseries.class.equals(Float.class) - || LogsAggregateBucketValueTimeseries.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsAggregateBucketValueTimeseries.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsAggregateBucketValueTimeseries.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsAggregateBucketValueTimeseries.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 (!((LogsAggregateBucketValueTimeseries) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsAggregateBucketValueTimeseries'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'LogsAggregateBucketValueTimeseries'", - e); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - LogsAggregateBucketValue ret = new LogsAggregateBucketValue(); - 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; + public LogsAggregateBucketValue() { + super("oneOf", Boolean.FALSE); } - - /** Handle deserialization of the 'null' value. */ - @Override - public LogsAggregateBucketValue getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "LogsAggregateBucketValue cannot be null"); + public LogsAggregateBucketValue(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsAggregateBucketValue(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsAggregateBucketValue(LogsAggregateBucketValueTimeseries o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public LogsAggregateBucketValue() { - super("oneOf", Boolean.FALSE); - } - - public LogsAggregateBucketValue(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsAggregateBucketValue(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public LogsAggregateBucketValue(LogsAggregateBucketValueTimeseries o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + schemas.put("LogsAggregateBucketValueTimeseries", new GenericType() { + }); + JSON.registerDescendants(LogsAggregateBucketValue.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - schemas.put( - "LogsAggregateBucketValueTimeseries", - new GenericType() {}); - JSON.registerDescendants(LogsAggregateBucketValue.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return LogsAggregateBucketValue.schemas; + } - @Override - public Map getSchemas() { - return LogsAggregateBucketValue.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * String, Double, LogsAggregateBucketValueTimeseries + * + * 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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(LogsAggregateBucketValueTimeseries.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Double, LogsAggregateBucketValueTimeseries - * - *

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(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - LogsAggregateBucketValueTimeseries.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 String, Double, LogsAggregateBucketValueTimeseries"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * String, Double, LogsAggregateBucketValueTimeseries + * + * @return The actual instance (String, Double, LogsAggregateBucketValueTimeseries) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be String, Double, LogsAggregateBucketValueTimeseries"); - } - /** - * Get the actual instance, which can be the following: String, Double, - * LogsAggregateBucketValueTimeseries - * - * @return The actual instance (String, Double, LogsAggregateBucketValueTimeseries) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } - /** - * Get the actual instance of `LogsAggregateBucketValueTimeseries`. If the actual instance is not - * `LogsAggregateBucketValueTimeseries`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsAggregateBucketValueTimeseries` - * @throws ClassCastException if the instance is not `LogsAggregateBucketValueTimeseries` - */ - public LogsAggregateBucketValueTimeseries getLogsAggregateBucketValueTimeseries() - throws ClassCastException { - return (LogsAggregateBucketValueTimeseries) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsAggregateBucketValueTimeseries`. If the actual instance is not `LogsAggregateBucketValueTimeseries`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsAggregateBucketValueTimeseries` + * @throws ClassCastException if the instance is not `LogsAggregateBucketValueTimeseries` + */ + public LogsAggregateBucketValueTimeseries getLogsAggregateBucketValueTimeseries() throws ClassCastException { + return (LogsAggregateBucketValueTimeseries)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseries.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseries.java index 58c72858489..35c8796f375 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseries.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseries.java @@ -6,20 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A timeseries array */ -@JsonPropertyOrder({}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class LogsAggregateBucketValueTimeseries - extends ArrayList { - @JsonIgnore public boolean unparsed = false; - /** Return true if this LogsAggregateBucketValueTimeseries object is equal to o. */ +/** + *

A timeseries array

+ */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LogsAggregateBucketValueTimeseries extends ArrayList { + @JsonIgnore + public boolean unparsed = false; + + /** + * Return true if this LogsAggregateBucketValueTimeseries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -31,6 +54,7 @@ public boolean equals(Object o) { return super.equals(o); } + @Override public int hashCode() { return Objects.hash(super.hashCode()); @@ -46,7 +70,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseriesPoint.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseriesPoint.java index 7f9186a0942..557742ba041 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseriesPoint.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateBucketValueTimeseriesPoint.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A timeseries point */ + +/** + *

A timeseries point

+ */ @JsonPropertyOrder({ LogsAggregateBucketValueTimeseriesPoint.JSON_PROPERTY_TIME, LogsAggregateBucketValueTimeseriesPoint.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateBucketValueTimeseriesPoint { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME = "time"; private String time; @@ -33,43 +53,42 @@ public LogsAggregateBucketValueTimeseriesPoint time(String time) { } /** - * The time value for this point - * + *

The time value for this point

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTime() { + return time; + } public void setTime(String time) { this.time = time; } - public LogsAggregateBucketValueTimeseriesPoint value(Double value) { this.value = value; return this; } /** - * The value for this point - * + *

The value for this point

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this LogsAggregateBucketValueTimeseriesPoint object is equal to o. */ + /** + * Return true if this LogsAggregateBucketValueTimeseriesPoint object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LogsAggregateBucketValueTimeseriesPoint logsAggregateBucketValueTimeseriesPoint = - (LogsAggregateBucketValueTimeseriesPoint) o; - return Objects.equals(this.time, logsAggregateBucketValueTimeseriesPoint.time) - && Objects.equals(this.value, logsAggregateBucketValueTimeseriesPoint.value); + LogsAggregateBucketValueTimeseriesPoint logsAggregateBucketValueTimeseriesPoint = (LogsAggregateBucketValueTimeseriesPoint) o; + return Objects.equals(this.time, logsAggregateBucketValueTimeseriesPoint.time) && Objects.equals(this.value, logsAggregateBucketValueTimeseriesPoint.value); } + @Override public int hashCode() { - return Objects.hash(time, value); + return Objects.hash(time,value); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequest.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequest.java index 580bde5c4b1..6eb7770abbe 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequest.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object sent with the request to retrieve a list of logs from your organization. */ +/** + *

The object sent with the request to retrieve a list of logs from your organization.

+ */ @JsonPropertyOrder({ LogsAggregateRequest.JSON_PROPERTY_COMPUTE, LogsAggregateRequest.JSON_PROPERTY_FILTER, @@ -22,10 +40,10 @@ LogsAggregateRequest.JSON_PROPERTY_OPTIONS, LogsAggregateRequest.JSON_PROPERTY_PAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private List compute = null; @@ -48,7 +66,6 @@ public LogsAggregateRequest compute(List compute) { } return this; } - public LogsAggregateRequest addComputeItem(LogsCompute computeItem) { if (this.compute == null) { this.compute = new ArrayList<>(); @@ -59,21 +76,19 @@ public LogsAggregateRequest addComputeItem(LogsCompute computeItem) { } /** - * The list of metrics or timeseries to compute for the retrieved buckets. - * + *

The list of metrics or timeseries to compute for the retrieved buckets.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCompute() { + return compute; + } public void setCompute(List compute) { this.compute = compute; } - public LogsAggregateRequest filter(LogsQueryFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -81,21 +96,19 @@ public LogsAggregateRequest filter(LogsQueryFilter filter) { } /** - * The search and filter query settings - * + *

The search and filter query settings

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsQueryFilter getFilter() { + return filter; + } public void setFilter(LogsQueryFilter filter) { this.filter = filter; } - public LogsAggregateRequest groupBy(List groupBy) { this.groupBy = groupBy; for (LogsGroupBy item : groupBy) { @@ -103,7 +116,6 @@ public LogsAggregateRequest groupBy(List groupBy) { } return this; } - public LogsAggregateRequest addGroupByItem(LogsGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -114,21 +126,19 @@ public LogsAggregateRequest addGroupByItem(LogsGroupBy groupByItem) { } /** - * The rules for the group by - * + *

The rules for the group by

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public LogsAggregateRequest options(LogsQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -136,22 +146,20 @@ public LogsAggregateRequest options(LogsQueryOptions options) { } /** - * Global query options that are used during the query. Note: You should only supply timezone or - * time offset but not both otherwise the query will fail. - * + *

Global query options that are used during the query. + * Note: You should only supply timezone or time offset but not both otherwise the query will fail.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsQueryOptions getOptions() { + return options; + } public void setOptions(LogsQueryOptions options) { this.options = options; } - public LogsAggregateRequest page(LogsAggregateRequestPage page) { this.page = page; this.unparsed |= page.unparsed; @@ -159,22 +167,23 @@ public LogsAggregateRequest page(LogsAggregateRequestPage page) { } /** - * Paging settings - * + *

Paging settings

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAggregateRequestPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAggregateRequestPage getPage() { + return page; + } public void setPage(LogsAggregateRequestPage page) { this.page = page; } - /** Return true if this LogsAggregateRequest object is equal to o. */ + /** + * Return true if this LogsAggregateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -184,16 +193,13 @@ public boolean equals(Object o) { return false; } LogsAggregateRequest logsAggregateRequest = (LogsAggregateRequest) o; - return Objects.equals(this.compute, logsAggregateRequest.compute) - && Objects.equals(this.filter, logsAggregateRequest.filter) - && Objects.equals(this.groupBy, logsAggregateRequest.groupBy) - && Objects.equals(this.options, logsAggregateRequest.options) - && Objects.equals(this.page, logsAggregateRequest.page); + return Objects.equals(this.compute, logsAggregateRequest.compute) && Objects.equals(this.filter, logsAggregateRequest.filter) && Objects.equals(this.groupBy, logsAggregateRequest.groupBy) && Objects.equals(this.options, logsAggregateRequest.options) && Objects.equals(this.page, logsAggregateRequest.page); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy, options, page); + return Objects.hash(compute,filter,groupBy,options,page); } @Override @@ -210,7 +216,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequestPage.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequestPage.java index daa755005ec..09641e67483 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequestPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateRequestPage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Paging settings */ -@JsonPropertyOrder({LogsAggregateRequestPage.JSON_PROPERTY_CURSOR}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Paging settings

+ */ +@JsonPropertyOrder({ + LogsAggregateRequestPage.JSON_PROPERTY_CURSOR +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateRequestPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -27,22 +49,23 @@ public LogsAggregateRequestPage cursor(String cursor) { } /** - * The returned paging point to use to get the next results - * + *

The returned paging point to use to get the next results

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - /** Return true if this LogsAggregateRequestPage object is equal to o. */ + /** + * Return true if this LogsAggregateRequestPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.cursor, logsAggregateRequestPage.cursor); } + @Override public int hashCode() { return Objects.hash(cursor); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponse.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponse.java index fac8da2ae2d..c9ff2299f91 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response object for the logs aggregate API endpoint */ + +/** + *

The response object for the logs aggregate API endpoint

+ */ @JsonPropertyOrder({ LogsAggregateResponse.JSON_PROPERTY_DATA, LogsAggregateResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsAggregateResponseData data; @@ -34,21 +54,19 @@ public LogsAggregateResponse data(LogsAggregateResponseData data) { } /** - * The query results - * + *

The query results

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAggregateResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAggregateResponseData getData() { + return data; + } public void setData(LogsAggregateResponseData data) { this.data = data; } - public LogsAggregateResponse meta(LogsResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -56,22 +74,23 @@ public LogsAggregateResponse meta(LogsResponseMetadata meta) { } /** - * The metadata associated with a request - * + *

The metadata associated with a request

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsResponseMetadata getMeta() { + return meta; + } public void setMeta(LogsResponseMetadata meta) { this.meta = meta; } - /** Return true if this LogsAggregateResponse object is equal to o. */ + /** + * Return true if this LogsAggregateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } LogsAggregateResponse logsAggregateResponse = (LogsAggregateResponse) o; - return Objects.equals(this.data, logsAggregateResponse.data) - && Objects.equals(this.meta, logsAggregateResponse.meta); + return Objects.equals(this.data, logsAggregateResponse.data) && Objects.equals(this.meta, logsAggregateResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseData.java index 3cb8da11328..d58543e9168 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseData.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The query results */ -@JsonPropertyOrder({LogsAggregateResponseData.JSON_PROPERTY_BUCKETS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The query results

+ */ +@JsonPropertyOrder({ + LogsAggregateResponseData.JSON_PROPERTY_BUCKETS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BUCKETS = "buckets"; private List buckets = null; @@ -30,7 +50,6 @@ public LogsAggregateResponseData buckets(List buckets) { } return this; } - public LogsAggregateResponseData addBucketsItem(LogsAggregateBucket bucketsItem) { if (this.buckets == null) { this.buckets = new ArrayList<>(); @@ -41,22 +60,23 @@ public LogsAggregateResponseData addBucketsItem(LogsAggregateBucket bucketsItem) } /** - * The list of matching buckets, one item per bucket - * + *

The list of matching buckets, one item per bucket

* @return buckets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BUCKETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getBuckets() { - return buckets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getBuckets() { + return buckets; + } public void setBuckets(List buckets) { this.buckets = buckets; } - /** Return true if this LogsAggregateResponseData object is equal to o. */ + /** + * Return true if this LogsAggregateResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.buckets, logsAggregateResponseData.buckets); } + @Override public int hashCode() { return Objects.hash(buckets); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseStatus.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseStatus.java index 32b201246e3..35299981168 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateResponseStatus.java @@ -6,29 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The status of the response */ +/** + *

The status of the response

+ */ @JsonSerialize(using = LogsAggregateResponseStatus.LogsAggregateResponseStatusSerializer.class) public class LogsAggregateResponseStatus { public static final LogsAggregateResponseStatus DONE = new LogsAggregateResponseStatus("done"); - public static final LogsAggregateResponseStatus TIMEOUT = - new LogsAggregateResponseStatus("timeout"); + public static final LogsAggregateResponseStatus TIMEOUT = new LogsAggregateResponseStatus("timeout"); - private static final Set allowedValues = - new HashSet(Arrays.asList("done", "timeout")); + private static final Set allowedValues = new HashSet(Arrays.asList("done", "timeout")); private String value; @@ -40,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class LogsAggregateResponseStatusSerializer - extends StdSerializer { - public LogsAggregateResponseStatusSerializer(Class t) { - super(t); - } + public static class LogsAggregateResponseStatusSerializer extends StdSerializer { + public LogsAggregateResponseStatusSerializer(Class t) { + super(t); + } - public LogsAggregateResponseStatusSerializer() { - this(null); - } + public LogsAggregateResponseStatusSerializer() { + this(null); + } - @Override - public void serialize( - LogsAggregateResponseStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsAggregateResponseStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsAggregateResponseStatus object is equal to o. */ + /** + * Return true if this LogsAggregateResponseStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSort.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSort.java index 8a636387f99..dd2f8254f69 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSort.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A sort rule */ + +/** + *

A sort rule

+ */ @JsonPropertyOrder({ LogsAggregateSort.JSON_PROPERTY_AGGREGATION, LogsAggregateSort.JSON_PROPERTY_METRIC, LogsAggregateSort.JSON_PROPERTY_ORDER, LogsAggregateSort.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsAggregateSort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private LogsAggregationFunction aggregation; @@ -42,45 +62,41 @@ public LogsAggregateSort aggregation(LogsAggregationFunction aggregation) { } /** - * An aggregation function - * + *

An aggregation function

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAggregationFunction getAggregation() { - return aggregation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAggregationFunction getAggregation() { + return aggregation; + } public void setAggregation(LogsAggregationFunction aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public LogsAggregateSort metric(String metric) { this.metric = metric; return this; } /** - * The metric to sort by (only used for type=measure) - * + *

The metric to sort by (only used for type=measure)

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public LogsAggregateSort order(LogsSortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -88,24 +104,22 @@ public LogsAggregateSort order(LogsSortOrder order) { } /** - * The order to use, ascending or descending - * + *

The order to use, ascending or descending

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsSortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsSortOrder getOrder() { + return order; + } public void setOrder(LogsSortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - public LogsAggregateSort type(LogsAggregateSortType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -113,25 +127,26 @@ public LogsAggregateSort type(LogsAggregateSortType type) { } /** - * The type of sorting algorithm - * + *

The type of sorting algorithm

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAggregateSortType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAggregateSortType getType() { + return type; + } public void setType(LogsAggregateSortType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsAggregateSort object is equal to o. */ + /** + * Return true if this LogsAggregateSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -141,15 +156,13 @@ public boolean equals(Object o) { return false; } LogsAggregateSort logsAggregateSort = (LogsAggregateSort) o; - return Objects.equals(this.aggregation, logsAggregateSort.aggregation) - && Objects.equals(this.metric, logsAggregateSort.metric) - && Objects.equals(this.order, logsAggregateSort.order) - && Objects.equals(this.type, logsAggregateSort.type); + return Objects.equals(this.aggregation, logsAggregateSort.aggregation) && Objects.equals(this.metric, logsAggregateSort.metric) && Objects.equals(this.order, logsAggregateSort.order) && Objects.equals(this.type, logsAggregateSort.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, metric, order, type); + return Objects.hash(aggregation,metric,order,type); } @Override @@ -165,7 +178,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSortType.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSortType.java index 76e44c6dc26..418148ca72f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSortType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregateSortType.java @@ -6,29 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of sorting algorithm */ +/** + *

The type of sorting algorithm

+ */ @JsonSerialize(using = LogsAggregateSortType.LogsAggregateSortTypeSerializer.class) public class LogsAggregateSortType { - public static final LogsAggregateSortType ALPHABETICAL = - new LogsAggregateSortType("alphabetical"); + public static final LogsAggregateSortType ALPHABETICAL = new LogsAggregateSortType("alphabetical"); public static final LogsAggregateSortType MEASURE = new LogsAggregateSortType("measure"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alphabetical", "measure")); + private static final Set allowedValues = new HashSet(Arrays.asList("alphabetical", "measure")); private String value; @@ -41,20 +63,18 @@ public boolean isValid() { } public static class LogsAggregateSortTypeSerializer extends StdSerializer { - public LogsAggregateSortTypeSerializer(Class t) { - super(t); - } - - public LogsAggregateSortTypeSerializer() { - this(null); - } - - @Override - public void serialize( - LogsAggregateSortType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsAggregateSortTypeSerializer(Class t) { + super(t); + } + + public LogsAggregateSortTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsAggregateSortType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsAggregateSortType object is equal to o. */ + /** + * Return true if this LogsAggregateSortType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsAggregationFunction.java b/src/main/java/com/datadog/api/client/v2/model/LogsAggregationFunction.java index 5db89d47cbc..5e47f23c1cc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsAggregationFunction.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsAggregationFunction.java @@ -6,26 +6,49 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** An aggregation function */ +/** + *

An aggregation function

+ */ @JsonSerialize(using = LogsAggregationFunction.LogsAggregationFunctionSerializer.class) public class LogsAggregationFunction { public static final LogsAggregationFunction COUNT = new LogsAggregationFunction("count"); - public static final LogsAggregationFunction CARDINALITY = - new LogsAggregationFunction("cardinality"); + public static final LogsAggregationFunction CARDINALITY = new LogsAggregationFunction("cardinality"); public static final LogsAggregationFunction PERCENTILE_75 = new LogsAggregationFunction("pc75"); public static final LogsAggregationFunction PERCENTILE_90 = new LogsAggregationFunction("pc90"); public static final LogsAggregationFunction PERCENTILE_95 = new LogsAggregationFunction("pc95"); @@ -37,21 +60,7 @@ public class LogsAggregationFunction { public static final LogsAggregationFunction AVG = new LogsAggregationFunction("avg"); public static final LogsAggregationFunction MEDIAN = new LogsAggregationFunction("median"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg", - "median")); + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median")); private String value; @@ -63,22 +72,19 @@ public boolean isValid() { this.value = value; } - public static class LogsAggregationFunctionSerializer - extends StdSerializer { - public LogsAggregationFunctionSerializer(Class t) { - super(t); - } + public static class LogsAggregationFunctionSerializer extends StdSerializer { + public LogsAggregationFunctionSerializer(Class t) { + super(t); + } - public LogsAggregationFunctionSerializer() { - this(null); - } + public LogsAggregationFunctionSerializer() { + this(null); + } - @Override - public void serialize( - LogsAggregationFunction value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsAggregationFunction value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -90,7 +96,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsAggregationFunction object is equal to o. */ + /** + * Return true if this LogsAggregationFunction object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchive.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchive.java index 275a9ceee0e..cb179f110c9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchive.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchive.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The logs archive. */ -@JsonPropertyOrder({LogsArchive.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The logs archive.

+ */ +@JsonPropertyOrder({ + LogsArchive.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchive { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsArchiveDefinition data; @@ -28,22 +50,23 @@ public LogsArchive data(LogsArchiveDefinition data) { } /** - * The definition of an archive. - * + *

The definition of an archive.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsArchiveDefinition getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsArchiveDefinition getData() { + return data; + } public void setData(LogsArchiveDefinition data) { this.data = data; } - /** Return true if this LogsArchive object is equal to o. */ + /** + * Return true if this LogsArchive object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsArchive.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java index 13c2b2d6dc3..27a36bd11b9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes associated with the archive. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes associated with the archive.

+ */ @JsonPropertyOrder({ LogsArchiveAttributes.JSON_PROPERTY_DESTINATION, LogsArchiveAttributes.JSON_PROPERTY_INCLUDE_TAGS, @@ -26,10 +42,10 @@ LogsArchiveAttributes.JSON_PROPERTY_REHYDRATION_TAGS, LogsArchiveAttributes.JSON_PROPERTY_STATE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESTINATION = "destination"; private LogsArchiveDestination destination; @@ -42,8 +58,7 @@ public class LogsArchiveAttributes { public static final String JSON_PROPERTY_QUERY = "query"; private String query; - public static final String JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB = - "rehydration_max_scan_size_in_gb"; + public static final String JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB = "rehydration_max_scan_size_in_gb"; private JsonNullable rehydrationMaxScanSizeInGb = JsonNullable.undefined(); public static final String JSON_PROPERTY_REHYDRATION_TAGS = "rehydration_tags"; @@ -56,141 +71,124 @@ public LogsArchiveAttributes() {} @JsonCreator public LogsArchiveAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION) - LogsArchiveDestination destination, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.destination = destination; - if (destination != null) { - this.unparsed |= destination.unparsed; - } - this.name = name; - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_DESTINATION)LogsArchiveDestination destination, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.destination = destination; + if (destination != null) { + this.unparsed |= destination.unparsed; + } + this.name = name; + this.query = query; } - public LogsArchiveAttributes destination(LogsArchiveDestination destination) { this.destination = destination; - if (destination != null) { - this.unparsed |= destination.unparsed; + if (destination != null) { + this.unparsed |= destination.unparsed; } return this; } /** - * An archive's destination. - * + *

An archive's destination.

* @return destination - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESTINATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveDestination getDestination() { - return destination; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveDestination getDestination() { + return destination; + } public void setDestination(LogsArchiveDestination destination) { this.destination = destination; } - public LogsArchiveAttributes includeTags(Boolean includeTags) { this.includeTags = includeTags; return this; } /** - * To store the tags in the archive, set the value "true". If it is set to "false", the tags will - * be deleted when the logs are sent to the archive. - * + *

To store the tags in the archive, set the value "true". + * If it is set to "false", the tags will be deleted when the logs are sent to the archive.

* @return includeTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeTags() { - return includeTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeTags() { + return includeTags; + } public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } - public LogsArchiveAttributes name(String name) { this.name = name; return this; } /** - * The archive name. - * + *

The archive name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsArchiveAttributes query(String query) { this.query = query; return this; } /** - * The archive query/filter. Logs matching this query are included in the archive. - * + *

The archive query/filter. Logs matching this query are included in the archive.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public LogsArchiveAttributes rehydrationMaxScanSizeInGb(Long rehydrationMaxScanSizeInGb) { this.rehydrationMaxScanSizeInGb = JsonNullable.of(rehydrationMaxScanSizeInGb); return this; } /** - * Maximum scan size for rehydration from this archive. - * + *

Maximum scan size for rehydration from this archive.

* @return rehydrationMaxScanSizeInGb - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getRehydrationMaxScanSizeInGb() { - return rehydrationMaxScanSizeInGb.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRehydrationMaxScanSizeInGb() { + return rehydrationMaxScanSizeInGb.orElse(null); + } @JsonProperty(JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRehydrationMaxScanSizeInGb_JsonNullable() { return rehydrationMaxScanSizeInGb; } - - @JsonProperty(JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB) - public void setRehydrationMaxScanSizeInGb_JsonNullable( - JsonNullable rehydrationMaxScanSizeInGb) { + @JsonProperty(JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB)public void setRehydrationMaxScanSizeInGb_JsonNullable(JsonNullable rehydrationMaxScanSizeInGb) { this.rehydrationMaxScanSizeInGb = rehydrationMaxScanSizeInGb; } - public void setRehydrationMaxScanSizeInGb(Long rehydrationMaxScanSizeInGb) { this.rehydrationMaxScanSizeInGb = JsonNullable.of(rehydrationMaxScanSizeInGb); } - public LogsArchiveAttributes rehydrationTags(List rehydrationTags) { this.rehydrationTags = rehydrationTags; return this; } - public LogsArchiveAttributes addRehydrationTagsItem(String rehydrationTagsItem) { if (this.rehydrationTags == null) { this.rehydrationTags = new ArrayList<>(); @@ -200,21 +198,19 @@ public LogsArchiveAttributes addRehydrationTagsItem(String rehydrationTagsItem) } /** - * An array of tags to add to rehydrated logs from an archive. - * + *

An array of tags to add to rehydrated logs from an archive.

* @return rehydrationTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REHYDRATION_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRehydrationTags() { - return rehydrationTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REHYDRATION_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRehydrationTags() { + return rehydrationTags; + } public void setRehydrationTags(List rehydrationTags) { this.rehydrationTags = rehydrationTags; } - public LogsArchiveAttributes state(LogsArchiveState state) { this.state = state; this.unparsed |= !state.isValid(); @@ -222,25 +218,26 @@ public LogsArchiveAttributes state(LogsArchiveState state) { } /** - * The state of the archive. - * + *

The state of the archive.

* @return state - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsArchiveState getState() { - return state; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsArchiveState getState() { + return state; + } public void setState(LogsArchiveState state) { if (!state.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.state = state; } - /** Return true if this LogsArchiveAttributes object is equal to o. */ + /** + * Return true if this LogsArchiveAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -250,20 +247,13 @@ public boolean equals(Object o) { return false; } LogsArchiveAttributes logsArchiveAttributes = (LogsArchiveAttributes) o; - return Objects.equals(this.destination, logsArchiveAttributes.destination) - && Objects.equals(this.includeTags, logsArchiveAttributes.includeTags) - && Objects.equals(this.name, logsArchiveAttributes.name) - && Objects.equals(this.query, logsArchiveAttributes.query) - && Objects.equals( - this.rehydrationMaxScanSizeInGb, logsArchiveAttributes.rehydrationMaxScanSizeInGb) - && Objects.equals(this.rehydrationTags, logsArchiveAttributes.rehydrationTags) - && Objects.equals(this.state, logsArchiveAttributes.state); + return Objects.equals(this.destination, logsArchiveAttributes.destination) && Objects.equals(this.includeTags, logsArchiveAttributes.includeTags) && Objects.equals(this.name, logsArchiveAttributes.name) && Objects.equals(this.query, logsArchiveAttributes.query) && Objects.equals(this.rehydrationMaxScanSizeInGb, logsArchiveAttributes.rehydrationMaxScanSizeInGb) && Objects.equals(this.rehydrationTags, logsArchiveAttributes.rehydrationTags) && Objects.equals(this.state, logsArchiveAttributes.state); } + @Override public int hashCode() { - return Objects.hash( - destination, includeTags, name, query, rehydrationMaxScanSizeInGb, rehydrationTags, state); + return Objects.hash(destination,includeTags,name,query,rehydrationMaxScanSizeInGb,rehydrationTags,state); } @Override @@ -274,9 +264,7 @@ public String toString() { sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" rehydrationMaxScanSizeInGb: ") - .append(toIndentedString(rehydrationMaxScanSizeInGb)) - .append("\n"); + sb.append(" rehydrationMaxScanSizeInGb: ").append(toIndentedString(rehydrationMaxScanSizeInGb)).append("\n"); sb.append(" rehydrationTags: ").append(toIndentedString(rehydrationTags)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append("}"); @@ -284,7 +272,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequest.java index 755c594e26d..6ff6f6234b7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequest.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The logs archive. */ -@JsonPropertyOrder({LogsArchiveCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The logs archive.

+ */ +@JsonPropertyOrder({ + LogsArchiveCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsArchiveCreateRequestDefinition data; @@ -28,22 +50,23 @@ public LogsArchiveCreateRequest data(LogsArchiveCreateRequestDefinition data) { } /** - * The definition of an archive. - * + *

The definition of an archive.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsArchiveCreateRequestDefinition getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsArchiveCreateRequestDefinition getData() { + return data; + } public void setData(LogsArchiveCreateRequestDefinition data) { this.data = data; } - /** Return true if this LogsArchiveCreateRequest object is equal to o. */ + /** + * Return true if this LogsArchiveCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsArchiveCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java index e9cb20df8b1..11d43c127f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes associated with the archive. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes associated with the archive.

+ */ @JsonPropertyOrder({ LogsArchiveCreateRequestAttributes.JSON_PROPERTY_DESTINATION, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_INCLUDE_TAGS, @@ -25,10 +41,10 @@ LogsArchiveCreateRequestAttributes.JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_REHYDRATION_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveCreateRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESTINATION = "destination"; private LogsArchiveCreateRequestDestination destination; @@ -41,8 +57,7 @@ public class LogsArchiveCreateRequestAttributes { public static final String JSON_PROPERTY_QUERY = "query"; private String query; - public static final String JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB = - "rehydration_max_scan_size_in_gb"; + public static final String JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB = "rehydration_max_scan_size_in_gb"; private JsonNullable rehydrationMaxScanSizeInGb = JsonNullable.undefined(); public static final String JSON_PROPERTY_REHYDRATION_TAGS = "rehydration_tags"; @@ -52,138 +67,119 @@ public LogsArchiveCreateRequestAttributes() {} @JsonCreator public LogsArchiveCreateRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION) - LogsArchiveCreateRequestDestination destination, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.destination = destination; - this.unparsed |= destination.unparsed; - this.name = name; - this.query = query; - } - - public LogsArchiveCreateRequestAttributes destination( - LogsArchiveCreateRequestDestination destination) { + @JsonProperty(required=true, value=JSON_PROPERTY_DESTINATION)LogsArchiveCreateRequestDestination destination, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.destination = destination; + this.unparsed |= destination.unparsed; + this.name = name; + this.query = query; + } + public LogsArchiveCreateRequestAttributes destination(LogsArchiveCreateRequestDestination destination) { this.destination = destination; this.unparsed |= destination.unparsed; return this; } /** - * An archive's destination. - * + *

An archive's destination.

* @return destination - */ - @JsonProperty(JSON_PROPERTY_DESTINATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveCreateRequestDestination getDestination() { - return destination; - } - + **/ + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveCreateRequestDestination getDestination() { + return destination; + } public void setDestination(LogsArchiveCreateRequestDestination destination) { this.destination = destination; } - public LogsArchiveCreateRequestAttributes includeTags(Boolean includeTags) { this.includeTags = includeTags; return this; } /** - * To store the tags in the archive, set the value "true". If it is set to "false", the tags will - * be deleted when the logs are sent to the archive. - * + *

To store the tags in the archive, set the value "true". + * If it is set to "false", the tags will be deleted when the logs are sent to the archive.

* @return includeTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeTags() { - return includeTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeTags() { + return includeTags; + } public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } - public LogsArchiveCreateRequestAttributes name(String name) { this.name = name; return this; } /** - * The archive name. - * + *

The archive name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public LogsArchiveCreateRequestAttributes query(String query) { this.query = query; return this; } /** - * The archive query/filter. Logs matching this query are included in the archive. - * + *

The archive query/filter. Logs matching this query are included in the archive.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - - public LogsArchiveCreateRequestAttributes rehydrationMaxScanSizeInGb( - Long rehydrationMaxScanSizeInGb) { + public LogsArchiveCreateRequestAttributes rehydrationMaxScanSizeInGb(Long rehydrationMaxScanSizeInGb) { this.rehydrationMaxScanSizeInGb = JsonNullable.of(rehydrationMaxScanSizeInGb); return this; } /** - * Maximum scan size for rehydration from this archive. - * + *

Maximum scan size for rehydration from this archive.

* @return rehydrationMaxScanSizeInGb - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getRehydrationMaxScanSizeInGb() { - return rehydrationMaxScanSizeInGb.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRehydrationMaxScanSizeInGb() { + return rehydrationMaxScanSizeInGb.orElse(null); + } @JsonProperty(JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getRehydrationMaxScanSizeInGb_JsonNullable() { return rehydrationMaxScanSizeInGb; } - - @JsonProperty(JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB) - public void setRehydrationMaxScanSizeInGb_JsonNullable( - JsonNullable rehydrationMaxScanSizeInGb) { + @JsonProperty(JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB)public void setRehydrationMaxScanSizeInGb_JsonNullable(JsonNullable rehydrationMaxScanSizeInGb) { this.rehydrationMaxScanSizeInGb = rehydrationMaxScanSizeInGb; } - public void setRehydrationMaxScanSizeInGb(Long rehydrationMaxScanSizeInGb) { this.rehydrationMaxScanSizeInGb = JsonNullable.of(rehydrationMaxScanSizeInGb); } - public LogsArchiveCreateRequestAttributes rehydrationTags(List rehydrationTags) { this.rehydrationTags = rehydrationTags; return this; } - public LogsArchiveCreateRequestAttributes addRehydrationTagsItem(String rehydrationTagsItem) { if (this.rehydrationTags == null) { this.rehydrationTags = new ArrayList<>(); @@ -193,22 +189,23 @@ public LogsArchiveCreateRequestAttributes addRehydrationTagsItem(String rehydrat } /** - * An array of tags to add to rehydrated logs from an archive. - * + *

An array of tags to add to rehydrated logs from an archive.

* @return rehydrationTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REHYDRATION_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRehydrationTags() { - return rehydrationTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REHYDRATION_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRehydrationTags() { + return rehydrationTags; + } public void setRehydrationTags(List rehydrationTags) { this.rehydrationTags = rehydrationTags; } - /** Return true if this LogsArchiveCreateRequestAttributes object is equal to o. */ + /** + * Return true if this LogsArchiveCreateRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -217,22 +214,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LogsArchiveCreateRequestAttributes logsArchiveCreateRequestAttributes = - (LogsArchiveCreateRequestAttributes) o; - return Objects.equals(this.destination, logsArchiveCreateRequestAttributes.destination) - && Objects.equals(this.includeTags, logsArchiveCreateRequestAttributes.includeTags) - && Objects.equals(this.name, logsArchiveCreateRequestAttributes.name) - && Objects.equals(this.query, logsArchiveCreateRequestAttributes.query) - && Objects.equals( - this.rehydrationMaxScanSizeInGb, - logsArchiveCreateRequestAttributes.rehydrationMaxScanSizeInGb) - && Objects.equals(this.rehydrationTags, logsArchiveCreateRequestAttributes.rehydrationTags); + LogsArchiveCreateRequestAttributes logsArchiveCreateRequestAttributes = (LogsArchiveCreateRequestAttributes) o; + return Objects.equals(this.destination, logsArchiveCreateRequestAttributes.destination) && Objects.equals(this.includeTags, logsArchiveCreateRequestAttributes.includeTags) && Objects.equals(this.name, logsArchiveCreateRequestAttributes.name) && Objects.equals(this.query, logsArchiveCreateRequestAttributes.query) && Objects.equals(this.rehydrationMaxScanSizeInGb, logsArchiveCreateRequestAttributes.rehydrationMaxScanSizeInGb) && Objects.equals(this.rehydrationTags, logsArchiveCreateRequestAttributes.rehydrationTags); } + @Override public int hashCode() { - return Objects.hash( - destination, includeTags, name, query, rehydrationMaxScanSizeInGb, rehydrationTags); + return Objects.hash(destination,includeTags,name,query,rehydrationMaxScanSizeInGb,rehydrationTags); } @Override @@ -243,16 +232,15 @@ public String toString() { sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" rehydrationMaxScanSizeInGb: ") - .append(toIndentedString(rehydrationMaxScanSizeInGb)) - .append("\n"); + sb.append(" rehydrationMaxScanSizeInGb: ").append(toIndentedString(rehydrationMaxScanSizeInGb)).append("\n"); sb.append(" rehydrationTags: ").append(toIndentedString(rehydrationTags)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDefinition.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDefinition.java index 3527be69e99..7cf5d20eba1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDefinition.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDefinition.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The definition of an archive. */ + +/** + *

The definition of an archive.

+ */ @JsonPropertyOrder({ LogsArchiveCreateRequestDefinition.JSON_PROPERTY_ATTRIBUTES, LogsArchiveCreateRequestDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveCreateRequestDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogsArchiveCreateRequestAttributes attributes; @@ -32,54 +51,51 @@ public LogsArchiveCreateRequestDefinition() {} @JsonCreator public LogsArchiveCreateRequestDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { - this.type = type; + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)String type) { + this.type = type; } - - public LogsArchiveCreateRequestDefinition attributes( - LogsArchiveCreateRequestAttributes attributes) { + public LogsArchiveCreateRequestDefinition attributes(LogsArchiveCreateRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * The attributes associated with the archive. - * + *

The attributes associated with the archive.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsArchiveCreateRequestAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsArchiveCreateRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(LogsArchiveCreateRequestAttributes attributes) { this.attributes = attributes; } - public LogsArchiveCreateRequestDefinition type(String type) { this.type = type; return this; } /** - * The type of the resource. The value should always be archives. - * + *

The type of the resource. The value should always be archives.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this LogsArchiveCreateRequestDefinition object is equal to o. */ + /** + * Return true if this LogsArchiveCreateRequestDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,15 +104,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LogsArchiveCreateRequestDefinition logsArchiveCreateRequestDefinition = - (LogsArchiveCreateRequestDefinition) o; - return Objects.equals(this.attributes, logsArchiveCreateRequestDefinition.attributes) - && Objects.equals(this.type, logsArchiveCreateRequestDefinition.type); + LogsArchiveCreateRequestDefinition logsArchiveCreateRequestDefinition = (LogsArchiveCreateRequestDefinition) o; + return Objects.equals(this.attributes, logsArchiveCreateRequestDefinition.attributes) && Objects.equals(this.type, logsArchiveCreateRequestDefinition.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -110,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDestination.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDestination.java index d2f46f922c6..a96ac8adbb6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDestination.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestDestination.java @@ -6,352 +6,311 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - LogsArchiveCreateRequestDestination.LogsArchiveCreateRequestDestinationDeserializer.class) -@JsonSerialize( - using = LogsArchiveCreateRequestDestination.LogsArchiveCreateRequestDestinationSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = LogsArchiveCreateRequestDestination.LogsArchiveCreateRequestDestinationDeserializer.class) +@JsonSerialize(using = LogsArchiveCreateRequestDestination.LogsArchiveCreateRequestDestinationSerializer.class) public class LogsArchiveCreateRequestDestination extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(LogsArchiveCreateRequestDestination.class.getName()); + private static final Logger log = Logger.getLogger(LogsArchiveCreateRequestDestination.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; + + public static class LogsArchiveCreateRequestDestinationSerializer extends StdSerializer { + public LogsArchiveCreateRequestDestinationSerializer(Class t) { + super(t); + } - public static class LogsArchiveCreateRequestDestinationSerializer - extends StdSerializer { - public LogsArchiveCreateRequestDestinationSerializer( - Class t) { - super(t); + public LogsArchiveCreateRequestDestinationSerializer() { + this(null); + } + + @Override + public void serialize(LogsArchiveCreateRequestDestination value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public LogsArchiveCreateRequestDestinationSerializer() { - this(null); + public static class LogsArchiveCreateRequestDestinationDeserializer extends StdDeserializer { + public LogsArchiveCreateRequestDestinationDeserializer() { + this(LogsArchiveCreateRequestDestination.class); + } + + public LogsArchiveCreateRequestDestinationDeserializer(Class vc) { + super(vc); + } + + @Override + public LogsArchiveCreateRequestDestination 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 LogsArchiveDestinationAzure + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArchiveDestinationAzure.class.equals(Integer.class) || LogsArchiveDestinationAzure.class.equals(Long.class) || LogsArchiveDestinationAzure.class.equals(Float.class) || LogsArchiveDestinationAzure.class.equals(Double.class) || LogsArchiveDestinationAzure.class.equals(Boolean.class) || LogsArchiveDestinationAzure.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArchiveDestinationAzure.class.equals(Integer.class) || LogsArchiveDestinationAzure.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArchiveDestinationAzure.class.equals(Float.class) || LogsArchiveDestinationAzure.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArchiveDestinationAzure.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArchiveDestinationAzure.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationAzure.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 (!((LogsArchiveDestinationAzure)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationAzure'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationAzure'", e); + } + + // deserialize LogsArchiveDestinationGCS + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArchiveDestinationGCS.class.equals(Integer.class) || LogsArchiveDestinationGCS.class.equals(Long.class) || LogsArchiveDestinationGCS.class.equals(Float.class) || LogsArchiveDestinationGCS.class.equals(Double.class) || LogsArchiveDestinationGCS.class.equals(Boolean.class) || LogsArchiveDestinationGCS.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArchiveDestinationGCS.class.equals(Integer.class) || LogsArchiveDestinationGCS.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArchiveDestinationGCS.class.equals(Float.class) || LogsArchiveDestinationGCS.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArchiveDestinationGCS.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArchiveDestinationGCS.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationGCS.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 (!((LogsArchiveDestinationGCS)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationGCS'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationGCS'", e); + } + + // deserialize LogsArchiveDestinationS3 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArchiveDestinationS3.class.equals(Integer.class) || LogsArchiveDestinationS3.class.equals(Long.class) || LogsArchiveDestinationS3.class.equals(Float.class) || LogsArchiveDestinationS3.class.equals(Double.class) || LogsArchiveDestinationS3.class.equals(Boolean.class) || LogsArchiveDestinationS3.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArchiveDestinationS3.class.equals(Integer.class) || LogsArchiveDestinationS3.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArchiveDestinationS3.class.equals(Float.class) || LogsArchiveDestinationS3.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArchiveDestinationS3.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArchiveDestinationS3.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationS3.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 (!((LogsArchiveDestinationS3)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationS3'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationS3'", e); + } + + LogsArchiveCreateRequestDestination ret = new LogsArchiveCreateRequestDestination(); + 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 LogsArchiveCreateRequestDestination getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "LogsArchiveCreateRequestDestination cannot be null"); + } } - @Override - public void serialize( - LogsArchiveCreateRequestDestination value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public LogsArchiveCreateRequestDestination() { + super("oneOf", Boolean.FALSE); + } + public LogsArchiveCreateRequestDestination(LogsArchiveDestinationAzure o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsArchiveCreateRequestDestination(LogsArchiveDestinationGCS o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsArchiveCreateRequestDestination(LogsArchiveDestinationS3 o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class LogsArchiveCreateRequestDestinationDeserializer - extends StdDeserializer { - public LogsArchiveCreateRequestDestinationDeserializer() { - this(LogsArchiveCreateRequestDestination.class); + static { + schemas.put("LogsArchiveDestinationAzure", new GenericType() { + }); + schemas.put("LogsArchiveDestinationGCS", new GenericType() { + }); + schemas.put("LogsArchiveDestinationS3", new GenericType() { + }); + JSON.registerDescendants(LogsArchiveCreateRequestDestination.class, Collections.unmodifiableMap(schemas)); } - public LogsArchiveCreateRequestDestinationDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return LogsArchiveCreateRequestDestination.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3 + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public LogsArchiveCreateRequestDestination 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 LogsArchiveDestinationAzure - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArchiveDestinationAzure.class.equals(Integer.class) - || LogsArchiveDestinationAzure.class.equals(Long.class) - || LogsArchiveDestinationAzure.class.equals(Float.class) - || LogsArchiveDestinationAzure.class.equals(Double.class) - || LogsArchiveDestinationAzure.class.equals(Boolean.class) - || LogsArchiveDestinationAzure.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArchiveDestinationAzure.class.equals(Integer.class) - || LogsArchiveDestinationAzure.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArchiveDestinationAzure.class.equals(Float.class) - || LogsArchiveDestinationAzure.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArchiveDestinationAzure.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArchiveDestinationAzure.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(LogsArchiveDestinationAzure.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationAzure.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 (!((LogsArchiveDestinationAzure) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationAzure'"); + if (JSON.isInstanceOf(LogsArchiveDestinationGCS.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationAzure'", e); - } - - // deserialize LogsArchiveDestinationGCS - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArchiveDestinationGCS.class.equals(Integer.class) - || LogsArchiveDestinationGCS.class.equals(Long.class) - || LogsArchiveDestinationGCS.class.equals(Float.class) - || LogsArchiveDestinationGCS.class.equals(Double.class) - || LogsArchiveDestinationGCS.class.equals(Boolean.class) - || LogsArchiveDestinationGCS.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArchiveDestinationGCS.class.equals(Integer.class) - || LogsArchiveDestinationGCS.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArchiveDestinationGCS.class.equals(Float.class) - || LogsArchiveDestinationGCS.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArchiveDestinationGCS.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArchiveDestinationGCS.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(LogsArchiveDestinationS3.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationGCS.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 (!((LogsArchiveDestinationGCS) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationGCS'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationGCS'", e); - } - // deserialize LogsArchiveDestinationS3 - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArchiveDestinationS3.class.equals(Integer.class) - || LogsArchiveDestinationS3.class.equals(Long.class) - || LogsArchiveDestinationS3.class.equals(Float.class) - || LogsArchiveDestinationS3.class.equals(Double.class) - || LogsArchiveDestinationS3.class.equals(Boolean.class) - || LogsArchiveDestinationS3.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArchiveDestinationS3.class.equals(Integer.class) - || LogsArchiveDestinationS3.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArchiveDestinationS3.class.equals(Float.class) - || LogsArchiveDestinationS3.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArchiveDestinationS3.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArchiveDestinationS3.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationS3.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 (!((LogsArchiveDestinationS3) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationS3'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationS3'", e); - } - - LogsArchiveCreateRequestDestination ret = new LogsArchiveCreateRequestDestination(); - 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; + throw new RuntimeException("Invalid instance type. Must be LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3 + * + * @return The actual instance (LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3) + */ @Override - public LogsArchiveCreateRequestDestination getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "LogsArchiveCreateRequestDestination cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public LogsArchiveCreateRequestDestination() { - super("oneOf", Boolean.FALSE); - } - - public LogsArchiveCreateRequestDestination(LogsArchiveDestinationAzure o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsArchiveCreateRequestDestination(LogsArchiveDestinationGCS o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsArchiveCreateRequestDestination(LogsArchiveDestinationS3 o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - static { - schemas.put("LogsArchiveDestinationAzure", new GenericType() {}); - schemas.put("LogsArchiveDestinationGCS", new GenericType() {}); - schemas.put("LogsArchiveDestinationS3", new GenericType() {}); - JSON.registerDescendants( - LogsArchiveCreateRequestDestination.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return LogsArchiveCreateRequestDestination.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, - * LogsArchiveDestinationS3 - * - *

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(LogsArchiveDestinationAzure.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsArchiveDestinationGCS.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsArchiveDestinationS3.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsArchiveDestinationAzure`. If the actual instance is not `LogsArchiveDestinationAzure`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArchiveDestinationAzure` + * @throws ClassCastException if the instance is not `LogsArchiveDestinationAzure` + */ + public LogsArchiveDestinationAzure getLogsArchiveDestinationAzure() throws ClassCastException { + return (LogsArchiveDestinationAzure)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsArchiveDestinationGCS`. If the actual instance is not `LogsArchiveDestinationGCS`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArchiveDestinationGCS` + * @throws ClassCastException if the instance is not `LogsArchiveDestinationGCS` + */ + public LogsArchiveDestinationGCS getLogsArchiveDestinationGCS() throws ClassCastException { + return (LogsArchiveDestinationGCS)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be LogsArchiveDestinationAzure, LogsArchiveDestinationGCS," - + " LogsArchiveDestinationS3"); - } - /** - * Get the actual instance, which can be the following: LogsArchiveDestinationAzure, - * LogsArchiveDestinationGCS, LogsArchiveDestinationS3 - * - * @return The actual instance (LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, - * LogsArchiveDestinationS3) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsArchiveDestinationAzure`. If the actual instance is not - * `LogsArchiveDestinationAzure`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArchiveDestinationAzure` - * @throws ClassCastException if the instance is not `LogsArchiveDestinationAzure` - */ - public LogsArchiveDestinationAzure getLogsArchiveDestinationAzure() throws ClassCastException { - return (LogsArchiveDestinationAzure) super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsArchiveDestinationGCS`. If the actual instance is not - * `LogsArchiveDestinationGCS`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArchiveDestinationGCS` - * @throws ClassCastException if the instance is not `LogsArchiveDestinationGCS` - */ - public LogsArchiveDestinationGCS getLogsArchiveDestinationGCS() throws ClassCastException { - return (LogsArchiveDestinationGCS) super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsArchiveDestinationS3`. If the actual instance is not - * `LogsArchiveDestinationS3`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArchiveDestinationS3` - * @throws ClassCastException if the instance is not `LogsArchiveDestinationS3` - */ - public LogsArchiveDestinationS3 getLogsArchiveDestinationS3() throws ClassCastException { - return (LogsArchiveDestinationS3) super.getActualInstance(); - } + /** + * Get the actual instance of `LogsArchiveDestinationS3`. If the actual instance is not `LogsArchiveDestinationS3`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArchiveDestinationS3` + * @throws ClassCastException if the instance is not `LogsArchiveDestinationS3` + */ + public LogsArchiveDestinationS3 getLogsArchiveDestinationS3() throws ClassCastException { + return (LogsArchiveDestinationS3)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDefinition.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDefinition.java index 0fd3822bdf5..2e77da22328 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDefinition.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDefinition.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The definition of an archive. */ +/** + *

The definition of an archive.

+ */ @JsonPropertyOrder({ LogsArchiveDefinition.JSON_PROPERTY_ATTRIBUTES, LogsArchiveDefinition.JSON_PROPERTY_ID, LogsArchiveDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogsArchiveAttributes attributes; @@ -36,10 +55,9 @@ public LogsArchiveDefinition() {} @JsonCreator public LogsArchiveDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { - this.type = type; + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)String type) { + this.type = type; } - public LogsArchiveDefinition attributes(LogsArchiveAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -47,45 +65,46 @@ public LogsArchiveDefinition attributes(LogsArchiveAttributes attributes) { } /** - * The attributes associated with the archive. - * + *

The attributes associated with the archive.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsArchiveAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsArchiveAttributes getAttributes() { + return attributes; + } public void setAttributes(LogsArchiveAttributes attributes) { this.attributes = attributes; } /** - * The archive ID. - * + *

The archive ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } /** - * The type of the resource. The value should always be archives. - * + *

The type of the resource. The value should always be archives.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } - /** Return true if this LogsArchiveDefinition object is equal to o. */ + /** + * Return true if this LogsArchiveDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -95,14 +114,13 @@ public boolean equals(Object o) { return false; } LogsArchiveDefinition logsArchiveDefinition = (LogsArchiveDefinition) o; - return Objects.equals(this.attributes, logsArchiveDefinition.attributes) - && Objects.equals(this.id, logsArchiveDefinition.id) - && Objects.equals(this.type, logsArchiveDefinition.type); + return Objects.equals(this.attributes, logsArchiveDefinition.attributes) && Objects.equals(this.id, logsArchiveDefinition.id) && Objects.equals(this.type, logsArchiveDefinition.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -117,7 +135,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestination.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestination.java index ebceff32d7c..6710d2fc02e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestination.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestination.java @@ -6,350 +6,317 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = LogsArchiveDestination.LogsArchiveDestinationDeserializer.class) @JsonSerialize(using = LogsArchiveDestination.LogsArchiveDestinationSerializer.class) public class LogsArchiveDestination extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(LogsArchiveDestination.class.getName()); + private static final Logger log = Logger.getLogger(LogsArchiveDestination.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; + + public static class LogsArchiveDestinationSerializer extends StdSerializer { + public LogsArchiveDestinationSerializer(Class t) { + super(t); + } - public static class LogsArchiveDestinationSerializer - extends StdSerializer { - public LogsArchiveDestinationSerializer(Class t) { - super(t); + public LogsArchiveDestinationSerializer() { + this(null); + } + + @Override + public void serialize(LogsArchiveDestination value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public LogsArchiveDestinationSerializer() { - this(null); + public static class LogsArchiveDestinationDeserializer extends StdDeserializer { + public LogsArchiveDestinationDeserializer() { + this(LogsArchiveDestination.class); + } + + public LogsArchiveDestinationDeserializer(Class vc) { + super(vc); + } + + @Override + public LogsArchiveDestination 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 LogsArchiveDestinationAzure + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArchiveDestinationAzure.class.equals(Integer.class) || LogsArchiveDestinationAzure.class.equals(Long.class) || LogsArchiveDestinationAzure.class.equals(Float.class) || LogsArchiveDestinationAzure.class.equals(Double.class) || LogsArchiveDestinationAzure.class.equals(Boolean.class) || LogsArchiveDestinationAzure.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArchiveDestinationAzure.class.equals(Integer.class) || LogsArchiveDestinationAzure.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArchiveDestinationAzure.class.equals(Float.class) || LogsArchiveDestinationAzure.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArchiveDestinationAzure.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArchiveDestinationAzure.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationAzure.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 (!((LogsArchiveDestinationAzure)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationAzure'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationAzure'", e); + } + + // deserialize LogsArchiveDestinationGCS + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArchiveDestinationGCS.class.equals(Integer.class) || LogsArchiveDestinationGCS.class.equals(Long.class) || LogsArchiveDestinationGCS.class.equals(Float.class) || LogsArchiveDestinationGCS.class.equals(Double.class) || LogsArchiveDestinationGCS.class.equals(Boolean.class) || LogsArchiveDestinationGCS.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArchiveDestinationGCS.class.equals(Integer.class) || LogsArchiveDestinationGCS.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArchiveDestinationGCS.class.equals(Float.class) || LogsArchiveDestinationGCS.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArchiveDestinationGCS.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArchiveDestinationGCS.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationGCS.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 (!((LogsArchiveDestinationGCS)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationGCS'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationGCS'", e); + } + + // deserialize LogsArchiveDestinationS3 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LogsArchiveDestinationS3.class.equals(Integer.class) || LogsArchiveDestinationS3.class.equals(Long.class) || LogsArchiveDestinationS3.class.equals(Float.class) || LogsArchiveDestinationS3.class.equals(Double.class) || LogsArchiveDestinationS3.class.equals(Boolean.class) || LogsArchiveDestinationS3.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((LogsArchiveDestinationS3.class.equals(Integer.class) || LogsArchiveDestinationS3.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((LogsArchiveDestinationS3.class.equals(Float.class) || LogsArchiveDestinationS3.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (LogsArchiveDestinationS3.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (LogsArchiveDestinationS3.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationS3.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 (!((LogsArchiveDestinationS3)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationS3'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationS3'", e); + } + + LogsArchiveDestination ret = new LogsArchiveDestination(); + 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 LogsArchiveDestination getNullValue(DeserializationContext ctxt) throws JsonMappingException { + return null; + } } - @Override - public void serialize( - LogsArchiveDestination value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public LogsArchiveDestination() { + super("oneOf", Boolean.TRUE); + } + public LogsArchiveDestination(LogsArchiveDestinationAzure o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + public LogsArchiveDestination(LogsArchiveDestinationGCS o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } + public LogsArchiveDestination(LogsArchiveDestinationS3 o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); } - } - public static class LogsArchiveDestinationDeserializer - extends StdDeserializer { - public LogsArchiveDestinationDeserializer() { - this(LogsArchiveDestination.class); + static { + schemas.put("LogsArchiveDestinationAzure", new GenericType() { + }); + schemas.put("LogsArchiveDestinationGCS", new GenericType() { + }); + schemas.put("LogsArchiveDestinationS3", new GenericType() { + }); + JSON.registerDescendants(LogsArchiveDestination.class, Collections.unmodifiableMap(schemas)); } - public LogsArchiveDestinationDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return LogsArchiveDestination.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3 + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public LogsArchiveDestination 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 LogsArchiveDestinationAzure - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArchiveDestinationAzure.class.equals(Integer.class) - || LogsArchiveDestinationAzure.class.equals(Long.class) - || LogsArchiveDestinationAzure.class.equals(Float.class) - || LogsArchiveDestinationAzure.class.equals(Double.class) - || LogsArchiveDestinationAzure.class.equals(Boolean.class) - || LogsArchiveDestinationAzure.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArchiveDestinationAzure.class.equals(Integer.class) - || LogsArchiveDestinationAzure.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArchiveDestinationAzure.class.equals(Float.class) - || LogsArchiveDestinationAzure.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArchiveDestinationAzure.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArchiveDestinationAzure.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationAzure.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 (!((LogsArchiveDestinationAzure) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationAzure'"); + public void setActualInstance(Object instance) { + if (instance == null) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationAzure'", e); - } - // deserialize LogsArchiveDestinationGCS - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArchiveDestinationGCS.class.equals(Integer.class) - || LogsArchiveDestinationGCS.class.equals(Long.class) - || LogsArchiveDestinationGCS.class.equals(Float.class) - || LogsArchiveDestinationGCS.class.equals(Double.class) - || LogsArchiveDestinationGCS.class.equals(Boolean.class) - || LogsArchiveDestinationGCS.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArchiveDestinationGCS.class.equals(Integer.class) - || LogsArchiveDestinationGCS.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArchiveDestinationGCS.class.equals(Float.class) - || LogsArchiveDestinationGCS.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArchiveDestinationGCS.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArchiveDestinationGCS.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + + if (JSON.isInstanceOf(LogsArchiveDestinationAzure.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationGCS.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 (!((LogsArchiveDestinationGCS) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationGCS'"); + if (JSON.isInstanceOf(LogsArchiveDestinationGCS.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationGCS'", e); - } - - // deserialize LogsArchiveDestinationS3 - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (LogsArchiveDestinationS3.class.equals(Integer.class) - || LogsArchiveDestinationS3.class.equals(Long.class) - || LogsArchiveDestinationS3.class.equals(Float.class) - || LogsArchiveDestinationS3.class.equals(Double.class) - || LogsArchiveDestinationS3.class.equals(Boolean.class) - || LogsArchiveDestinationS3.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((LogsArchiveDestinationS3.class.equals(Integer.class) - || LogsArchiveDestinationS3.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((LogsArchiveDestinationS3.class.equals(Float.class) - || LogsArchiveDestinationS3.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (LogsArchiveDestinationS3.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (LogsArchiveDestinationS3.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(LogsArchiveDestinationS3.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 (!((LogsArchiveDestinationS3) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'LogsArchiveDestinationS3'"); + if (JSON.isInstanceOf(LogsArchiveDestinationS3.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'LogsArchiveDestinationS3'", e); - } - LogsArchiveDestination ret = new LogsArchiveDestination(); - 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; + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3 + * + * @return The actual instance (LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, LogsArchiveDestinationS3) + */ @Override - public LogsArchiveDestination getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - return null; + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public LogsArchiveDestination() { - super("oneOf", Boolean.TRUE); - } - - public LogsArchiveDestination(LogsArchiveDestinationAzure o) { - super("oneOf", Boolean.TRUE); - setActualInstance(o); - } - - public LogsArchiveDestination(LogsArchiveDestinationGCS o) { - super("oneOf", Boolean.TRUE); - setActualInstance(o); - } - - public LogsArchiveDestination(LogsArchiveDestinationS3 o) { - super("oneOf", Boolean.TRUE); - setActualInstance(o); - } - static { - schemas.put("LogsArchiveDestinationAzure", new GenericType() {}); - schemas.put("LogsArchiveDestinationGCS", new GenericType() {}); - schemas.put("LogsArchiveDestinationS3", new GenericType() {}); - JSON.registerDescendants(LogsArchiveDestination.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return LogsArchiveDestination.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, - * LogsArchiveDestinationS3 - * - *

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 (instance == null) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsArchiveDestinationAzure`. If the actual instance is not `LogsArchiveDestinationAzure`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArchiveDestinationAzure` + * @throws ClassCastException if the instance is not `LogsArchiveDestinationAzure` + */ + public LogsArchiveDestinationAzure getLogsArchiveDestinationAzure() throws ClassCastException { + return (LogsArchiveDestinationAzure)super.getActualInstance(); } - if (JSON.isInstanceOf(LogsArchiveDestinationAzure.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsArchiveDestinationGCS.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(LogsArchiveDestinationS3.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsArchiveDestinationGCS`. If the actual instance is not `LogsArchiveDestinationGCS`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArchiveDestinationGCS` + * @throws ClassCastException if the instance is not `LogsArchiveDestinationGCS` + */ + public LogsArchiveDestinationGCS getLogsArchiveDestinationGCS() throws ClassCastException { + return (LogsArchiveDestinationGCS)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `LogsArchiveDestinationS3`. If the actual instance is not `LogsArchiveDestinationS3`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LogsArchiveDestinationS3` + * @throws ClassCastException if the instance is not `LogsArchiveDestinationS3` + */ + public LogsArchiveDestinationS3 getLogsArchiveDestinationS3() throws ClassCastException { + return (LogsArchiveDestinationS3)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be LogsArchiveDestinationAzure, LogsArchiveDestinationGCS," - + " LogsArchiveDestinationS3"); - } - - /** - * Get the actual instance, which can be the following: LogsArchiveDestinationAzure, - * LogsArchiveDestinationGCS, LogsArchiveDestinationS3 - * - * @return The actual instance (LogsArchiveDestinationAzure, LogsArchiveDestinationGCS, - * LogsArchiveDestinationS3) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsArchiveDestinationAzure`. If the actual instance is not - * `LogsArchiveDestinationAzure`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArchiveDestinationAzure` - * @throws ClassCastException if the instance is not `LogsArchiveDestinationAzure` - */ - public LogsArchiveDestinationAzure getLogsArchiveDestinationAzure() throws ClassCastException { - return (LogsArchiveDestinationAzure) super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsArchiveDestinationGCS`. If the actual instance is not - * `LogsArchiveDestinationGCS`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArchiveDestinationGCS` - * @throws ClassCastException if the instance is not `LogsArchiveDestinationGCS` - */ - public LogsArchiveDestinationGCS getLogsArchiveDestinationGCS() throws ClassCastException { - return (LogsArchiveDestinationGCS) super.getActualInstance(); - } - - /** - * Get the actual instance of `LogsArchiveDestinationS3`. If the actual instance is not - * `LogsArchiveDestinationS3`, the ClassCastException will be thrown. - * - * @return The actual instance of `LogsArchiveDestinationS3` - * @throws ClassCastException if the instance is not `LogsArchiveDestinationS3` - */ - public LogsArchiveDestinationS3 getLogsArchiveDestinationS3() throws ClassCastException { - return (LogsArchiveDestinationS3) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzure.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzure.java index f983ac7d7a3..0d56e976be0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzure.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzure.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The Azure archive destination. */ + +/** + *

The Azure archive destination.

+ */ @JsonPropertyOrder({ LogsArchiveDestinationAzure.JSON_PROPERTY_CONTAINER, LogsArchiveDestinationAzure.JSON_PROPERTY_INTEGRATION, @@ -22,10 +41,10 @@ LogsArchiveDestinationAzure.JSON_PROPERTY_STORAGE_ACCOUNT, LogsArchiveDestinationAzure.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveDestinationAzure { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTAINER = "container"; private String container; @@ -48,40 +67,35 @@ public LogsArchiveDestinationAzure() {} @JsonCreator public LogsArchiveDestinationAzure( - @JsonProperty(required = true, value = JSON_PROPERTY_CONTAINER) String container, - @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION) - LogsArchiveIntegrationAzure integration, - @JsonProperty(required = true, value = JSON_PROPERTY_STORAGE_ACCOUNT) String storageAccount, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - LogsArchiveDestinationAzureType type) { - this.container = container; - this.integration = integration; - this.unparsed |= integration.unparsed; - this.storageAccount = storageAccount; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CONTAINER)String container, + @JsonProperty(required=true, value=JSON_PROPERTY_INTEGRATION)LogsArchiveIntegrationAzure integration, + @JsonProperty(required=true, value=JSON_PROPERTY_STORAGE_ACCOUNT)String storageAccount, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsArchiveDestinationAzureType type) { + this.container = container; + this.integration = integration; + this.unparsed |= integration.unparsed; + this.storageAccount = storageAccount; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsArchiveDestinationAzure container(String container) { this.container = container; return this; } /** - * The container where the archive will be stored. - * + *

The container where the archive will be stored.

* @return container - */ - @JsonProperty(JSON_PROPERTY_CONTAINER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getContainer() { - return container; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONTAINER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getContainer() { + return container; + } public void setContainer(String container) { this.container = container; } - public LogsArchiveDestinationAzure integration(LogsArchiveIntegrationAzure integration) { this.integration = integration; this.unparsed |= integration.unparsed; @@ -89,82 +103,74 @@ public LogsArchiveDestinationAzure integration(LogsArchiveIntegrationAzure integ } /** - * The Azure archive's integration destination. - * + *

The Azure archive's integration destination.

* @return integration - */ - @JsonProperty(JSON_PROPERTY_INTEGRATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveIntegrationAzure getIntegration() { - return integration; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTEGRATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveIntegrationAzure getIntegration() { + return integration; + } public void setIntegration(LogsArchiveIntegrationAzure integration) { this.integration = integration; } - public LogsArchiveDestinationAzure path(String path) { this.path = path; return this; } /** - * The archive path. - * + *

The archive path.

* @return path - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPath() { - return path; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - public LogsArchiveDestinationAzure region(String region) { this.region = region; return this; } /** - * The region where the archive will be stored. - * + *

The region where the archive will be stored.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } public void setRegion(String region) { this.region = region; } - public LogsArchiveDestinationAzure storageAccount(String storageAccount) { this.storageAccount = storageAccount; return this; } /** - * The associated storage account. - * + *

The associated storage account.

* @return storageAccount - */ - @JsonProperty(JSON_PROPERTY_STORAGE_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStorageAccount() { - return storageAccount; - } - + **/ + @JsonProperty(JSON_PROPERTY_STORAGE_ACCOUNT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getStorageAccount() { + return storageAccount; + } public void setStorageAccount(String storageAccount) { this.storageAccount = storageAccount; } - public LogsArchiveDestinationAzure type(LogsArchiveDestinationAzureType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -172,24 +178,25 @@ public LogsArchiveDestinationAzure type(LogsArchiveDestinationAzureType type) { } /** - * Type of the Azure archive destination. - * + *

Type of the Azure archive destination.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveDestinationAzureType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveDestinationAzureType getType() { + return type; + } public void setType(LogsArchiveDestinationAzureType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsArchiveDestinationAzure object is equal to o. */ + /** + * Return true if this LogsArchiveDestinationAzure object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -199,17 +206,13 @@ public boolean equals(Object o) { return false; } LogsArchiveDestinationAzure logsArchiveDestinationAzure = (LogsArchiveDestinationAzure) o; - return Objects.equals(this.container, logsArchiveDestinationAzure.container) - && Objects.equals(this.integration, logsArchiveDestinationAzure.integration) - && Objects.equals(this.path, logsArchiveDestinationAzure.path) - && Objects.equals(this.region, logsArchiveDestinationAzure.region) - && Objects.equals(this.storageAccount, logsArchiveDestinationAzure.storageAccount) - && Objects.equals(this.type, logsArchiveDestinationAzure.type); + return Objects.equals(this.container, logsArchiveDestinationAzure.container) && Objects.equals(this.integration, logsArchiveDestinationAzure.integration) && Objects.equals(this.path, logsArchiveDestinationAzure.path) && Objects.equals(this.region, logsArchiveDestinationAzure.region) && Objects.equals(this.storageAccount, logsArchiveDestinationAzure.storageAccount) && Objects.equals(this.type, logsArchiveDestinationAzure.type); } + @Override public int hashCode() { - return Objects.hash(container, integration, path, region, storageAccount, type); + return Objects.hash(container,integration,path,region,storageAccount,type); } @Override @@ -227,7 +230,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzureType.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzureType.java index afcf82f5fd9..5f46d118c1c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzureType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationAzureType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the Azure archive destination. */ -@JsonSerialize( - using = LogsArchiveDestinationAzureType.LogsArchiveDestinationAzureTypeSerializer.class) +/** + *

Type of the Azure archive destination.

+ */ +@JsonSerialize(using = LogsArchiveDestinationAzureType.LogsArchiveDestinationAzureTypeSerializer.class) public class LogsArchiveDestinationAzureType { - public static final LogsArchiveDestinationAzureType AZURE = - new LogsArchiveDestinationAzureType("azure"); + public static final LogsArchiveDestinationAzureType AZURE = new LogsArchiveDestinationAzureType("azure"); private static final Set allowedValues = new HashSet(Arrays.asList("azure")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsArchiveDestinationAzureTypeSerializer - extends StdSerializer { - public LogsArchiveDestinationAzureTypeSerializer(Class t) { - super(t); - } + public static class LogsArchiveDestinationAzureTypeSerializer extends StdSerializer { + public LogsArchiveDestinationAzureTypeSerializer(Class t) { + super(t); + } - public LogsArchiveDestinationAzureTypeSerializer() { - this(null); - } + public LogsArchiveDestinationAzureTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsArchiveDestinationAzureType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsArchiveDestinationAzureType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsArchiveDestinationAzureType object is equal to o. */ + /** + * Return true if this LogsArchiveDestinationAzureType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCS.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCS.java index 8f5f464dfce..4e42be37149 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCS.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCS.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The GCS archive destination. */ +/** + *

The GCS archive destination.

+ */ @JsonPropertyOrder({ LogsArchiveDestinationGCS.JSON_PROPERTY_BUCKET, LogsArchiveDestinationGCS.JSON_PROPERTY_INTEGRATION, LogsArchiveDestinationGCS.JSON_PROPERTY_PATH, LogsArchiveDestinationGCS.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveDestinationGCS { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BUCKET = "bucket"; private String bucket; @@ -40,38 +59,33 @@ public LogsArchiveDestinationGCS() {} @JsonCreator public LogsArchiveDestinationGCS( - @JsonProperty(required = true, value = JSON_PROPERTY_BUCKET) String bucket, - @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION) - LogsArchiveIntegrationGCS integration, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - LogsArchiveDestinationGCSType type) { - this.bucket = bucket; - this.integration = integration; - this.unparsed |= integration.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_BUCKET)String bucket, + @JsonProperty(required=true, value=JSON_PROPERTY_INTEGRATION)LogsArchiveIntegrationGCS integration, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsArchiveDestinationGCSType type) { + this.bucket = bucket; + this.integration = integration; + this.unparsed |= integration.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsArchiveDestinationGCS bucket(String bucket) { this.bucket = bucket; return this; } /** - * The bucket where the archive will be stored. - * + *

The bucket where the archive will be stored.

* @return bucket - */ - @JsonProperty(JSON_PROPERTY_BUCKET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getBucket() { - return bucket; - } - + **/ + @JsonProperty(JSON_PROPERTY_BUCKET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getBucket() { + return bucket; + } public void setBucket(String bucket) { this.bucket = bucket; } - public LogsArchiveDestinationGCS integration(LogsArchiveIntegrationGCS integration) { this.integration = integration; this.unparsed |= integration.unparsed; @@ -79,41 +93,37 @@ public LogsArchiveDestinationGCS integration(LogsArchiveIntegrationGCS integrati } /** - * The GCS archive's integration destination. - * + *

The GCS archive's integration destination.

* @return integration - */ - @JsonProperty(JSON_PROPERTY_INTEGRATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveIntegrationGCS getIntegration() { - return integration; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTEGRATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveIntegrationGCS getIntegration() { + return integration; + } public void setIntegration(LogsArchiveIntegrationGCS integration) { this.integration = integration; } - public LogsArchiveDestinationGCS path(String path) { this.path = path; return this; } /** - * The archive path. - * + *

The archive path.

* @return path - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPath() { - return path; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - public LogsArchiveDestinationGCS type(LogsArchiveDestinationGCSType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -121,24 +131,25 @@ public LogsArchiveDestinationGCS type(LogsArchiveDestinationGCSType type) { } /** - * Type of the GCS archive destination. - * + *

Type of the GCS archive destination.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveDestinationGCSType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveDestinationGCSType getType() { + return type; + } public void setType(LogsArchiveDestinationGCSType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsArchiveDestinationGCS object is equal to o. */ + /** + * Return true if this LogsArchiveDestinationGCS object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -148,15 +159,13 @@ public boolean equals(Object o) { return false; } LogsArchiveDestinationGCS logsArchiveDestinationGcs = (LogsArchiveDestinationGCS) o; - return Objects.equals(this.bucket, logsArchiveDestinationGcs.bucket) - && Objects.equals(this.integration, logsArchiveDestinationGcs.integration) - && Objects.equals(this.path, logsArchiveDestinationGcs.path) - && Objects.equals(this.type, logsArchiveDestinationGcs.type); + return Objects.equals(this.bucket, logsArchiveDestinationGcs.bucket) && Objects.equals(this.integration, logsArchiveDestinationGcs.integration) && Objects.equals(this.path, logsArchiveDestinationGcs.path) && Objects.equals(this.type, logsArchiveDestinationGcs.type); } + @Override public int hashCode() { - return Objects.hash(bucket, integration, path, type); + return Objects.hash(bucket,integration,path,type); } @Override @@ -172,7 +181,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCSType.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCSType.java index c8e09d2c6ee..b6abd24e355 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCSType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationGCSType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the GCS archive destination. */ +/** + *

Type of the GCS archive destination.

+ */ @JsonSerialize(using = LogsArchiveDestinationGCSType.LogsArchiveDestinationGCSTypeSerializer.class) public class LogsArchiveDestinationGCSType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsArchiveDestinationGCSTypeSerializer - extends StdSerializer { - public LogsArchiveDestinationGCSTypeSerializer(Class t) { - super(t); - } + public static class LogsArchiveDestinationGCSTypeSerializer extends StdSerializer { + public LogsArchiveDestinationGCSTypeSerializer(Class t) { + super(t); + } - public LogsArchiveDestinationGCSTypeSerializer() { - this(null); - } + public LogsArchiveDestinationGCSTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsArchiveDestinationGCSType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsArchiveDestinationGCSType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsArchiveDestinationGCSType object is equal to o. */ + /** + * Return true if this LogsArchiveDestinationGCSType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3.java index 9051913f59a..dfd3a45d2db 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The S3 archive destination. */ +/** + *

The S3 archive destination.

+ */ @JsonPropertyOrder({ LogsArchiveDestinationS3.JSON_PROPERTY_BUCKET, LogsArchiveDestinationS3.JSON_PROPERTY_INTEGRATION, LogsArchiveDestinationS3.JSON_PROPERTY_PATH, LogsArchiveDestinationS3.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveDestinationS3 { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BUCKET = "bucket"; private String bucket; @@ -40,38 +59,33 @@ public LogsArchiveDestinationS3() {} @JsonCreator public LogsArchiveDestinationS3( - @JsonProperty(required = true, value = JSON_PROPERTY_BUCKET) String bucket, - @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION) - LogsArchiveIntegrationS3 integration, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - LogsArchiveDestinationS3Type type) { - this.bucket = bucket; - this.integration = integration; - this.unparsed |= integration.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_BUCKET)String bucket, + @JsonProperty(required=true, value=JSON_PROPERTY_INTEGRATION)LogsArchiveIntegrationS3 integration, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsArchiveDestinationS3Type type) { + this.bucket = bucket; + this.integration = integration; + this.unparsed |= integration.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsArchiveDestinationS3 bucket(String bucket) { this.bucket = bucket; return this; } /** - * The bucket where the archive will be stored. - * + *

The bucket where the archive will be stored.

* @return bucket - */ - @JsonProperty(JSON_PROPERTY_BUCKET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getBucket() { - return bucket; - } - + **/ + @JsonProperty(JSON_PROPERTY_BUCKET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getBucket() { + return bucket; + } public void setBucket(String bucket) { this.bucket = bucket; } - public LogsArchiveDestinationS3 integration(LogsArchiveIntegrationS3 integration) { this.integration = integration; this.unparsed |= integration.unparsed; @@ -79,41 +93,37 @@ public LogsArchiveDestinationS3 integration(LogsArchiveIntegrationS3 integration } /** - * The S3 Archive's integration destination. - * + *

The S3 Archive's integration destination.

* @return integration - */ - @JsonProperty(JSON_PROPERTY_INTEGRATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveIntegrationS3 getIntegration() { - return integration; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTEGRATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveIntegrationS3 getIntegration() { + return integration; + } public void setIntegration(LogsArchiveIntegrationS3 integration) { this.integration = integration; } - public LogsArchiveDestinationS3 path(String path) { this.path = path; return this; } /** - * The archive path. - * + *

The archive path.

* @return path - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPath() { - return path; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - public LogsArchiveDestinationS3 type(LogsArchiveDestinationS3Type type) { this.type = type; this.unparsed |= !type.isValid(); @@ -121,24 +131,25 @@ public LogsArchiveDestinationS3 type(LogsArchiveDestinationS3Type type) { } /** - * Type of the S3 archive destination. - * + *

Type of the S3 archive destination.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveDestinationS3Type getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveDestinationS3Type getType() { + return type; + } public void setType(LogsArchiveDestinationS3Type type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsArchiveDestinationS3 object is equal to o. */ + /** + * Return true if this LogsArchiveDestinationS3 object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -148,15 +159,13 @@ public boolean equals(Object o) { return false; } LogsArchiveDestinationS3 logsArchiveDestinationS3 = (LogsArchiveDestinationS3) o; - return Objects.equals(this.bucket, logsArchiveDestinationS3.bucket) - && Objects.equals(this.integration, logsArchiveDestinationS3.integration) - && Objects.equals(this.path, logsArchiveDestinationS3.path) - && Objects.equals(this.type, logsArchiveDestinationS3.type); + return Objects.equals(this.bucket, logsArchiveDestinationS3.bucket) && Objects.equals(this.integration, logsArchiveDestinationS3.integration) && Objects.equals(this.path, logsArchiveDestinationS3.path) && Objects.equals(this.type, logsArchiveDestinationS3.type); } + @Override public int hashCode() { - return Objects.hash(bucket, integration, path, type); + return Objects.hash(bucket,integration,path,type); } @Override @@ -172,7 +181,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3Type.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3Type.java index 67d8ded537a..8bc9b93d7b9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3Type.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveDestinationS3Type.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the S3 archive destination. */ +/** + *

Type of the S3 archive destination.

+ */ @JsonSerialize(using = LogsArchiveDestinationS3Type.LogsArchiveDestinationS3TypeSerializer.class) public class LogsArchiveDestinationS3Type { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsArchiveDestinationS3TypeSerializer - extends StdSerializer { - public LogsArchiveDestinationS3TypeSerializer(Class t) { - super(t); - } + public static class LogsArchiveDestinationS3TypeSerializer extends StdSerializer { + public LogsArchiveDestinationS3TypeSerializer(Class t) { + super(t); + } - public LogsArchiveDestinationS3TypeSerializer() { - this(null); - } + public LogsArchiveDestinationS3TypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsArchiveDestinationS3Type value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsArchiveDestinationS3Type value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsArchiveDestinationS3Type object is equal to o. */ + /** + * Return true if this LogsArchiveDestinationS3Type object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationAzure.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationAzure.java index e969e801448..d6f25219053 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationAzure.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationAzure.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The Azure archive's integration destination. */ + +/** + *

The Azure archive's integration destination.

+ */ @JsonPropertyOrder({ LogsArchiveIntegrationAzure.JSON_PROPERTY_CLIENT_ID, LogsArchiveIntegrationAzure.JSON_PROPERTY_TENANT_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveIntegrationAzure { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; private String clientId; @@ -32,53 +51,51 @@ public LogsArchiveIntegrationAzure() {} @JsonCreator public LogsArchiveIntegrationAzure( - @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ID) String clientId, - @JsonProperty(required = true, value = JSON_PROPERTY_TENANT_ID) String tenantId) { - this.clientId = clientId; - this.tenantId = tenantId; + @JsonProperty(required=true, value=JSON_PROPERTY_CLIENT_ID)String clientId, + @JsonProperty(required=true, value=JSON_PROPERTY_TENANT_ID)String tenantId) { + this.clientId = clientId; + this.tenantId = tenantId; } - public LogsArchiveIntegrationAzure clientId(String clientId) { this.clientId = clientId; return this; } /** - * A client ID. - * + *

A client ID.

* @return clientId - */ - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - + **/ + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } public void setClientId(String clientId) { this.clientId = clientId; } - public LogsArchiveIntegrationAzure tenantId(String tenantId) { this.tenantId = tenantId; return this; } /** - * A tenant ID. - * + *

A tenant ID.

* @return tenantId - */ - @JsonProperty(JSON_PROPERTY_TENANT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTenantId() { - return tenantId; - } - + **/ + @JsonProperty(JSON_PROPERTY_TENANT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTenantId() { + return tenantId; + } public void setTenantId(String tenantId) { this.tenantId = tenantId; } - /** Return true if this LogsArchiveIntegrationAzure object is equal to o. */ + /** + * Return true if this LogsArchiveIntegrationAzure object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } LogsArchiveIntegrationAzure logsArchiveIntegrationAzure = (LogsArchiveIntegrationAzure) o; - return Objects.equals(this.clientId, logsArchiveIntegrationAzure.clientId) - && Objects.equals(this.tenantId, logsArchiveIntegrationAzure.tenantId); + return Objects.equals(this.clientId, logsArchiveIntegrationAzure.clientId) && Objects.equals(this.tenantId, logsArchiveIntegrationAzure.tenantId); } + @Override public int hashCode() { - return Objects.hash(clientId, tenantId); + return Objects.hash(clientId,tenantId); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationGCS.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationGCS.java index 9661b7d5701..313e4ca1ce4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationGCS.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationGCS.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The GCS archive's integration destination. */ + +/** + *

The GCS archive's integration destination.

+ */ @JsonPropertyOrder({ LogsArchiveIntegrationGCS.JSON_PROPERTY_CLIENT_EMAIL, LogsArchiveIntegrationGCS.JSON_PROPERTY_PROJECT_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveIntegrationGCS { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CLIENT_EMAIL = "client_email"; private String clientEmail; @@ -32,53 +51,51 @@ public LogsArchiveIntegrationGCS() {} @JsonCreator public LogsArchiveIntegrationGCS( - @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_EMAIL) String clientEmail, - @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId) { - this.clientEmail = clientEmail; - this.projectId = projectId; + @JsonProperty(required=true, value=JSON_PROPERTY_CLIENT_EMAIL)String clientEmail, + @JsonProperty(required=true, value=JSON_PROPERTY_PROJECT_ID)String projectId) { + this.clientEmail = clientEmail; + this.projectId = projectId; } - public LogsArchiveIntegrationGCS clientEmail(String clientEmail) { this.clientEmail = clientEmail; return this; } /** - * A client email. - * + *

A client email.

* @return clientEmail - */ - @JsonProperty(JSON_PROPERTY_CLIENT_EMAIL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientEmail() { - return clientEmail; - } - + **/ + @JsonProperty(JSON_PROPERTY_CLIENT_EMAIL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getClientEmail() { + return clientEmail; + } public void setClientEmail(String clientEmail) { this.clientEmail = clientEmail; } - public LogsArchiveIntegrationGCS projectId(String projectId) { this.projectId = projectId; return this; } /** - * A project ID. - * + *

A project ID.

* @return projectId - */ - @JsonProperty(JSON_PROPERTY_PROJECT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProjectId() { - return projectId; - } - + **/ + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getProjectId() { + return projectId; + } public void setProjectId(String projectId) { this.projectId = projectId; } - /** Return true if this LogsArchiveIntegrationGCS object is equal to o. */ + /** + * Return true if this LogsArchiveIntegrationGCS object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } LogsArchiveIntegrationGCS logsArchiveIntegrationGcs = (LogsArchiveIntegrationGCS) o; - return Objects.equals(this.clientEmail, logsArchiveIntegrationGcs.clientEmail) - && Objects.equals(this.projectId, logsArchiveIntegrationGcs.projectId); + return Objects.equals(this.clientEmail, logsArchiveIntegrationGcs.clientEmail) && Objects.equals(this.projectId, logsArchiveIntegrationGcs.projectId); } + @Override public int hashCode() { - return Objects.hash(clientEmail, projectId); + return Objects.hash(clientEmail,projectId); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationS3.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationS3.java index d83a1061d76..015fe560620 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationS3.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveIntegrationS3.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The S3 Archive's integration destination. */ + +/** + *

The S3 Archive's integration destination.

+ */ @JsonPropertyOrder({ LogsArchiveIntegrationS3.JSON_PROPERTY_ACCOUNT_ID, LogsArchiveIntegrationS3.JSON_PROPERTY_ROLE_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveIntegrationS3 { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; private String accountId; @@ -32,53 +51,51 @@ public LogsArchiveIntegrationS3() {} @JsonCreator public LogsArchiveIntegrationS3( - @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, - @JsonProperty(required = true, value = JSON_PROPERTY_ROLE_NAME) String roleName) { - this.accountId = accountId; - this.roleName = roleName; + @JsonProperty(required=true, value=JSON_PROPERTY_ACCOUNT_ID)String accountId, + @JsonProperty(required=true, value=JSON_PROPERTY_ROLE_NAME)String roleName) { + this.accountId = accountId; + this.roleName = roleName; } - public LogsArchiveIntegrationS3 accountId(String accountId) { this.accountId = accountId; return this; } /** - * The account ID for the integration. - * + *

The account ID for the integration.

* @return accountId - */ - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccountId() { - return accountId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } public void setAccountId(String accountId) { this.accountId = accountId; } - public LogsArchiveIntegrationS3 roleName(String roleName) { this.roleName = roleName; return this; } /** - * The path of the integration. - * + *

The path of the integration.

* @return roleName - */ - @JsonProperty(JSON_PROPERTY_ROLE_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRoleName() { - return roleName; - } - + **/ + @JsonProperty(JSON_PROPERTY_ROLE_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getRoleName() { + return roleName; + } public void setRoleName(String roleName) { this.roleName = roleName; } - /** Return true if this LogsArchiveIntegrationS3 object is equal to o. */ + /** + * Return true if this LogsArchiveIntegrationS3 object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } LogsArchiveIntegrationS3 logsArchiveIntegrationS3 = (LogsArchiveIntegrationS3) o; - return Objects.equals(this.accountId, logsArchiveIntegrationS3.accountId) - && Objects.equals(this.roleName, logsArchiveIntegrationS3.roleName); + return Objects.equals(this.accountId, logsArchiveIntegrationS3.accountId) && Objects.equals(this.roleName, logsArchiveIntegrationS3.roleName); } + @Override public int hashCode() { - return Objects.hash(accountId, roleName); + return Objects.hash(accountId,roleName); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrder.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrder.java index 44db29a2f59..841be5e6965 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrder.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrder.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A ordered list of archive IDs. */ -@JsonPropertyOrder({LogsArchiveOrder.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A ordered list of archive IDs.

+ */ +@JsonPropertyOrder({ + LogsArchiveOrder.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveOrder { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsArchiveOrderDefinition data; @@ -28,22 +50,23 @@ public LogsArchiveOrder data(LogsArchiveOrderDefinition data) { } /** - * The definition of an archive order. - * + *

The definition of an archive order.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsArchiveOrderDefinition getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsArchiveOrderDefinition getData() { + return data; + } public void setData(LogsArchiveOrderDefinition data) { this.data = data; } - /** Return true if this LogsArchiveOrder object is equal to o. */ + /** + * Return true if this LogsArchiveOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsArchiveOrder.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderAttributes.java index d946fd2c326..a3e97fcbaa9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderAttributes.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attributes associated with the archive order. */ -@JsonPropertyOrder({LogsArchiveOrderAttributes.JSON_PROPERTY_ARCHIVE_IDS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The attributes associated with the archive order.

+ */ +@JsonPropertyOrder({ + LogsArchiveOrderAttributes.JSON_PROPERTY_ARCHIVE_IDS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveOrderAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ARCHIVE_IDS = "archive_ids"; private List archiveIds = new ArrayList<>(); @@ -28,37 +47,36 @@ public LogsArchiveOrderAttributes() {} @JsonCreator public LogsArchiveOrderAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_ARCHIVE_IDS) List archiveIds) { - this.archiveIds = archiveIds; + @JsonProperty(required=true, value=JSON_PROPERTY_ARCHIVE_IDS)List archiveIds) { + this.archiveIds = archiveIds; } - public LogsArchiveOrderAttributes archiveIds(List archiveIds) { this.archiveIds = archiveIds; return this; } - public LogsArchiveOrderAttributes addArchiveIdsItem(String archiveIdsItem) { this.archiveIds.add(archiveIdsItem); return this; } /** - * An ordered array of <ARCHIVE_ID> strings, the order of archive IDs in the - * array define the overall archives order for Datadog. - * + *

An ordered array of <ARCHIVE_ID> strings, the order of archive IDs in the array + * define the overall archives order for Datadog.

* @return archiveIds - */ - @JsonProperty(JSON_PROPERTY_ARCHIVE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getArchiveIds() { - return archiveIds; - } - + **/ + @JsonProperty(JSON_PROPERTY_ARCHIVE_IDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getArchiveIds() { + return archiveIds; + } public void setArchiveIds(List archiveIds) { this.archiveIds = archiveIds; } - /** Return true if this LogsArchiveOrderAttributes object is equal to o. */ + /** + * Return true if this LogsArchiveOrderAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -71,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.archiveIds, logsArchiveOrderAttributes.archiveIds); } + @Override public int hashCode() { return Objects.hash(archiveIds); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinition.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinition.java index eeba42ae2bc..975a7caaa38 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinition.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinition.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The definition of an archive order. */ + +/** + *

The definition of an archive order.

+ */ @JsonPropertyOrder({ LogsArchiveOrderDefinition.JSON_PROPERTY_ATTRIBUTES, LogsArchiveOrderDefinition.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchiveOrderDefinition { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogsArchiveOrderAttributes attributes; @@ -32,16 +51,13 @@ public LogsArchiveOrderDefinition() {} @JsonCreator public LogsArchiveOrderDefinition( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - LogsArchiveOrderAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - LogsArchiveOrderDefinitionType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)LogsArchiveOrderAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsArchiveOrderDefinitionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsArchiveOrderDefinition attributes(LogsArchiveOrderAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -49,20 +65,18 @@ public LogsArchiveOrderDefinition attributes(LogsArchiveOrderAttributes attribut } /** - * The attributes associated with the archive order. - * + *

The attributes associated with the archive order.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveOrderAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveOrderAttributes getAttributes() { + return attributes; + } public void setAttributes(LogsArchiveOrderAttributes attributes) { this.attributes = attributes; } - public LogsArchiveOrderDefinition type(LogsArchiveOrderDefinitionType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -70,24 +84,25 @@ public LogsArchiveOrderDefinition type(LogsArchiveOrderDefinitionType type) { } /** - * Type of the archive order definition. - * + *

Type of the archive order definition.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsArchiveOrderDefinitionType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsArchiveOrderDefinitionType getType() { + return type; + } public void setType(LogsArchiveOrderDefinitionType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsArchiveOrderDefinition object is equal to o. */ + /** + * Return true if this LogsArchiveOrderDefinition object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } LogsArchiveOrderDefinition logsArchiveOrderDefinition = (LogsArchiveOrderDefinition) o; - return Objects.equals(this.attributes, logsArchiveOrderDefinition.attributes) - && Objects.equals(this.type, logsArchiveOrderDefinition.type); + return Objects.equals(this.attributes, logsArchiveOrderDefinition.attributes) && Objects.equals(this.type, logsArchiveOrderDefinition.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinitionType.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinitionType.java index 8e966bda1d1..a44cf16c790 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinitionType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveOrderDefinitionType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the archive order definition. */ -@JsonSerialize( - using = LogsArchiveOrderDefinitionType.LogsArchiveOrderDefinitionTypeSerializer.class) +/** + *

Type of the archive order definition.

+ */ +@JsonSerialize(using = LogsArchiveOrderDefinitionType.LogsArchiveOrderDefinitionTypeSerializer.class) public class LogsArchiveOrderDefinitionType { - public static final LogsArchiveOrderDefinitionType ARCHIVE_ORDER = - new LogsArchiveOrderDefinitionType("archive_order"); + public static final LogsArchiveOrderDefinitionType ARCHIVE_ORDER = new LogsArchiveOrderDefinitionType("archive_order"); - private static final Set allowedValues = - new HashSet(Arrays.asList("archive_order")); + private static final Set allowedValues = new HashSet(Arrays.asList("archive_order")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class LogsArchiveOrderDefinitionTypeSerializer - extends StdSerializer { - public LogsArchiveOrderDefinitionTypeSerializer(Class t) { - super(t); - } + public static class LogsArchiveOrderDefinitionTypeSerializer extends StdSerializer { + public LogsArchiveOrderDefinitionTypeSerializer(Class t) { + super(t); + } - public LogsArchiveOrderDefinitionTypeSerializer() { - this(null); - } + public LogsArchiveOrderDefinitionTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsArchiveOrderDefinitionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsArchiveOrderDefinitionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsArchiveOrderDefinitionType object is equal to o. */ + /** + * Return true if this LogsArchiveOrderDefinitionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveState.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveState.java index eb020ba3806..922732439a2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveState.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveState.java @@ -6,31 +6,53 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The state of the archive. */ +/** + *

The state of the archive.

+ */ @JsonSerialize(using = LogsArchiveState.LogsArchiveStateSerializer.class) public class LogsArchiveState { public static final LogsArchiveState UNKNOWN = new LogsArchiveState("UNKNOWN"); public static final LogsArchiveState WORKING = new LogsArchiveState("WORKING"); public static final LogsArchiveState FAILING = new LogsArchiveState("FAILING"); - public static final LogsArchiveState WORKING_AUTH_LEGACY = - new LogsArchiveState("WORKING_AUTH_LEGACY"); + public static final LogsArchiveState WORKING_AUTH_LEGACY = new LogsArchiveState("WORKING_AUTH_LEGACY"); - private static final Set allowedValues = - new HashSet(Arrays.asList("UNKNOWN", "WORKING", "FAILING", "WORKING_AUTH_LEGACY")); + private static final Set allowedValues = new HashSet(Arrays.asList("UNKNOWN", "WORKING", "FAILING", "WORKING_AUTH_LEGACY")); private String value; @@ -43,19 +65,18 @@ public boolean isValid() { } public static class LogsArchiveStateSerializer extends StdSerializer { - public LogsArchiveStateSerializer(Class t) { - super(t); - } - - public LogsArchiveStateSerializer() { - this(null); - } - - @Override - public void serialize(LogsArchiveState value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsArchiveStateSerializer(Class t) { + super(t); + } + + public LogsArchiveStateSerializer() { + this(null); + } + + @Override + public void serialize(LogsArchiveState value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsArchiveState object is equal to o. */ + /** + * Return true if this LogsArchiveState object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchives.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchives.java index ddbc1ec2b26..c094e758679 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchives.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchives.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The available archives. */ -@JsonPropertyOrder({LogsArchives.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The available archives.

+ */ +@JsonPropertyOrder({ + LogsArchives.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsArchives { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public LogsArchives data(List data) { } return this; } - public LogsArchives addDataItem(LogsArchiveDefinition dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public LogsArchives addDataItem(LogsArchiveDefinition dataItem) { } /** - * A list of archives. - * + *

A list of archives.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this LogsArchives object is equal to o. */ + /** + * Return true if this LogsArchives object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsArchives.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsCompute.java b/src/main/java/com/datadog/api/client/v2/model/LogsCompute.java index 54e418a0c0f..56aec9cf6ba 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsCompute.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A compute rule to compute metrics or timeseries */ +/** + *

A compute rule to compute metrics or timeseries

+ */ @JsonPropertyOrder({ LogsCompute.JSON_PROPERTY_AGGREGATION, LogsCompute.JSON_PROPERTY_INTERVAL, LogsCompute.JSON_PROPERTY_METRIC, LogsCompute.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private LogsAggregationFunction aggregation; @@ -40,12 +59,10 @@ public LogsCompute() {} @JsonCreator public LogsCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - LogsAggregationFunction aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)LogsAggregationFunction aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - public LogsCompute aggregation(LogsAggregationFunction aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); @@ -53,65 +70,60 @@ public LogsCompute aggregation(LogsAggregationFunction aggregation) { } /** - * An aggregation function - * + *

An aggregation function

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsAggregationFunction getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsAggregationFunction getAggregation() { + return aggregation; + } public void setAggregation(LogsAggregationFunction aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public LogsCompute interval(String interval) { this.interval = interval; return this; } /** - * The time buckets' size (only used for type=timeseries) Defaults to a resolution of 150 points - * + *

The time buckets' size (only used for type=timeseries) + * Defaults to a resolution of 150 points

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getInterval() { + return interval; + } public void setInterval(String interval) { this.interval = interval; } - public LogsCompute metric(String metric) { this.metric = metric; return this; } /** - * The metric to use - * + *

The metric to use

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public LogsCompute type(LogsComputeType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -119,25 +131,26 @@ public LogsCompute type(LogsComputeType type) { } /** - * The type of compute - * + *

The type of compute

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsComputeType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsComputeType getType() { + return type; + } public void setType(LogsComputeType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsCompute object is equal to o. */ + /** + * Return true if this LogsCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,15 +160,13 @@ public boolean equals(Object o) { return false; } LogsCompute logsCompute = (LogsCompute) o; - return Objects.equals(this.aggregation, logsCompute.aggregation) - && Objects.equals(this.interval, logsCompute.interval) - && Objects.equals(this.metric, logsCompute.metric) - && Objects.equals(this.type, logsCompute.type); + return Objects.equals(this.aggregation, logsCompute.aggregation) && Objects.equals(this.interval, logsCompute.interval) && Objects.equals(this.metric, logsCompute.metric) && Objects.equals(this.type, logsCompute.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, interval, metric, type); + return Objects.hash(aggregation,interval,metric,type); } @Override @@ -171,7 +182,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsComputeType.java b/src/main/java/com/datadog/api/client/v2/model/LogsComputeType.java index a0a72d1beba..1f97e385651 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsComputeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsComputeType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of compute */ +/** + *

The type of compute

+ */ @JsonSerialize(using = LogsComputeType.LogsComputeTypeSerializer.class) public class LogsComputeType { public static final LogsComputeType TIMESERIES = new LogsComputeType("timeseries"); public static final LogsComputeType TOTAL = new LogsComputeType("total"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries", "total")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries", "total")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class LogsComputeTypeSerializer extends StdSerializer { - public LogsComputeTypeSerializer(Class t) { - super(t); - } - - public LogsComputeTypeSerializer() { - this(null); - } - - @Override - public void serialize(LogsComputeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsComputeTypeSerializer(Class t) { + super(t); + } + + public LogsComputeTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsComputeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsComputeType object is equal to o. */ + /** + * Return true if this LogsComputeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/LogsGroupBy.java index 0487606e671..d31ade796d5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsGroupBy.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A group by rule */ + +/** + *

A group by rule

+ */ @JsonPropertyOrder({ LogsGroupBy.JSON_PROPERTY_FACET, LogsGroupBy.JSON_PROPERTY_HISTOGRAM, @@ -22,10 +41,10 @@ LogsGroupBy.JSON_PROPERTY_SORT, LogsGroupBy.JSON_PROPERTY_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -47,30 +66,28 @@ public class LogsGroupBy { public LogsGroupBy() {} @JsonCreator - public LogsGroupBy(@JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + public LogsGroupBy( + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public LogsGroupBy facet(String facet) { this.facet = facet; return this; } /** - * The name of the facet to use (required) - * + *

The name of the facet to use (required)

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public LogsGroupBy histogram(LogsGroupByHistogram histogram) { this.histogram = histogram; this.unparsed |= histogram.unparsed; @@ -78,43 +95,39 @@ public LogsGroupBy histogram(LogsGroupByHistogram histogram) { } /** - * Used to perform a histogram computation (only for measure facets). Note: At most 100 buckets - * are allowed, the number of buckets is (max - min)/interval. - * + *

Used to perform a histogram computation (only for measure facets). + * Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.

* @return histogram - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HISTOGRAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsGroupByHistogram getHistogram() { - return histogram; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HISTOGRAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsGroupByHistogram getHistogram() { + return histogram; + } public void setHistogram(LogsGroupByHistogram histogram) { this.histogram = histogram; } - public LogsGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * The maximum buckets to return for this group by - * + *

The maximum buckets to return for this group by

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public LogsGroupBy missing(LogsGroupByMissing missing) { this.missing = missing; this.unparsed |= missing.unparsed; @@ -122,21 +135,19 @@ public LogsGroupBy missing(LogsGroupByMissing missing) { } /** - * The value to use for logs that don't have the facet used to group by - * + *

The value to use for logs that don't have the facet used to group by

* @return missing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MISSING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsGroupByMissing getMissing() { - return missing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MISSING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsGroupByMissing getMissing() { + return missing; + } public void setMissing(LogsGroupByMissing missing) { this.missing = missing; } - public LogsGroupBy sort(LogsAggregateSort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -144,21 +155,19 @@ public LogsGroupBy sort(LogsAggregateSort sort) { } /** - * A sort rule - * + *

A sort rule

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAggregateSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAggregateSort getSort() { + return sort; + } public void setSort(LogsAggregateSort sort) { this.sort = sort; } - public LogsGroupBy total(LogsGroupByTotal total) { this.total = total; this.unparsed |= total.unparsed; @@ -166,22 +175,23 @@ public LogsGroupBy total(LogsGroupByTotal total) { } /** - * A resulting object to put the given computes in over all the matching records. - * + *

A resulting object to put the given computes in over all the matching records.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsGroupByTotal getTotal() { - return total; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsGroupByTotal getTotal() { + return total; + } public void setTotal(LogsGroupByTotal total) { this.total = total; } - /** Return true if this LogsGroupBy object is equal to o. */ + /** + * Return true if this LogsGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -191,17 +201,13 @@ public boolean equals(Object o) { return false; } LogsGroupBy logsGroupBy = (LogsGroupBy) o; - return Objects.equals(this.facet, logsGroupBy.facet) - && Objects.equals(this.histogram, logsGroupBy.histogram) - && Objects.equals(this.limit, logsGroupBy.limit) - && Objects.equals(this.missing, logsGroupBy.missing) - && Objects.equals(this.sort, logsGroupBy.sort) - && Objects.equals(this.total, logsGroupBy.total); + return Objects.equals(this.facet, logsGroupBy.facet) && Objects.equals(this.histogram, logsGroupBy.histogram) && Objects.equals(this.limit, logsGroupBy.limit) && Objects.equals(this.missing, logsGroupBy.missing) && Objects.equals(this.sort, logsGroupBy.sort) && Objects.equals(this.total, logsGroupBy.total); } + @Override public int hashCode() { - return Objects.hash(facet, histogram, limit, missing, sort, total); + return Objects.hash(facet,histogram,limit,missing,sort,total); } @Override @@ -219,7 +225,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsGroupByHistogram.java b/src/main/java/com/datadog/api/client/v2/model/LogsGroupByHistogram.java index f7121962809..517914189ad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsGroupByHistogram.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsGroupByHistogram.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Used to perform a histogram computation (only for measure facets). Note: At most 100 buckets are - * allowed, the number of buckets is (max - min)/interval. + *

Used to perform a histogram computation (only for measure facets). + * Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.

*/ @JsonPropertyOrder({ LogsGroupByHistogram.JSON_PROPERTY_INTERVAL, LogsGroupByHistogram.JSON_PROPERTY_MAX, LogsGroupByHistogram.JSON_PROPERTY_MIN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsGroupByHistogram { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INTERVAL = "interval"; private Double interval; @@ -39,77 +56,73 @@ public LogsGroupByHistogram() {} @JsonCreator public LogsGroupByHistogram( - @JsonProperty(required = true, value = JSON_PROPERTY_INTERVAL) Double interval, - @JsonProperty(required = true, value = JSON_PROPERTY_MAX) Double max, - @JsonProperty(required = true, value = JSON_PROPERTY_MIN) Double min) { - this.interval = interval; - this.max = max; - this.min = min; + @JsonProperty(required=true, value=JSON_PROPERTY_INTERVAL)Double interval, + @JsonProperty(required=true, value=JSON_PROPERTY_MAX)Double max, + @JsonProperty(required=true, value=JSON_PROPERTY_MIN)Double min) { + this.interval = interval; + this.max = max; + this.min = min; } - public LogsGroupByHistogram interval(Double interval) { this.interval = interval; return this; } /** - * The bin size of the histogram buckets - * + *

The bin size of the histogram buckets

* @return interval - */ - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getInterval() { - return interval; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getInterval() { + return interval; + } public void setInterval(Double interval) { this.interval = interval; } - public LogsGroupByHistogram max(Double max) { this.max = max; return this; } /** - * The maximum value for the measure used in the histogram (values greater than this one are - * filtered out) - * + *

The maximum value for the measure used in the histogram + * (values greater than this one are filtered out)

* @return max - */ - @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMax() { - return max; - } - + **/ + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getMax() { + return max; + } public void setMax(Double max) { this.max = max; } - public LogsGroupByHistogram min(Double min) { this.min = min; return this; } /** - * The minimum value for the measure used in the histogram (values smaller than this one are - * filtered out) - * + *

The minimum value for the measure used in the histogram + * (values smaller than this one are filtered out)

* @return min - */ - @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMin() { - return min; - } - + **/ + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getMin() { + return min; + } public void setMin(Double min) { this.min = min; } - /** Return true if this LogsGroupByHistogram object is equal to o. */ + /** + * Return true if this LogsGroupByHistogram object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +132,13 @@ public boolean equals(Object o) { return false; } LogsGroupByHistogram logsGroupByHistogram = (LogsGroupByHistogram) o; - return Objects.equals(this.interval, logsGroupByHistogram.interval) - && Objects.equals(this.max, logsGroupByHistogram.max) - && Objects.equals(this.min, logsGroupByHistogram.min); + return Objects.equals(this.interval, logsGroupByHistogram.interval) && Objects.equals(this.max, logsGroupByHistogram.max) && Objects.equals(this.min, logsGroupByHistogram.min); } + @Override public int hashCode() { - return Objects.hash(interval, max, min); + return Objects.hash(interval,max,min); } @Override @@ -141,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsGroupByMissing.java b/src/main/java/com/datadog/api/client/v2/model/LogsGroupByMissing.java index c60aa67d8c4..ea0ee046aba 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsGroupByMissing.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsGroupByMissing.java @@ -6,263 +6,259 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = LogsGroupByMissing.LogsGroupByMissingDeserializer.class) @JsonSerialize(using = LogsGroupByMissing.LogsGroupByMissingSerializer.class) public class LogsGroupByMissing extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(LogsGroupByMissing.class.getName()); + private static final Logger log = Logger.getLogger(LogsGroupByMissing.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class LogsGroupByMissingSerializer extends StdSerializer { - public LogsGroupByMissingSerializer(Class t) { - super(t); - } - - public LogsGroupByMissingSerializer() { - this(null); - } - - @Override - public void serialize(LogsGroupByMissing value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class LogsGroupByMissingSerializer extends StdSerializer { + public LogsGroupByMissingSerializer(Class t) { + super(t); + } - public static class LogsGroupByMissingDeserializer extends StdDeserializer { - public LogsGroupByMissingDeserializer() { - this(LogsGroupByMissing.class); - } + public LogsGroupByMissingSerializer() { + this(null); + } - public LogsGroupByMissingDeserializer(Class vc) { - super(vc); + @Override + public void serialize(LogsGroupByMissing value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public LogsGroupByMissing 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 String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class LogsGroupByMissingDeserializer extends StdDeserializer { + public LogsGroupByMissingDeserializer() { + this(LogsGroupByMissing.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + public LogsGroupByMissingDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public LogsGroupByMissing 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 String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + LogsGroupByMissing ret = new LogsGroupByMissing(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public LogsGroupByMissing getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "LogsGroupByMissing cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } - - LogsGroupByMissing ret = new LogsGroupByMissing(); - 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 LogsGroupByMissing getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "LogsGroupByMissing cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public LogsGroupByMissing() { - super("oneOf", Boolean.FALSE); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - public LogsGroupByMissing(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + public LogsGroupByMissing() { + super("oneOf", Boolean.FALSE); + } + public LogsGroupByMissing(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsGroupByMissing(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - public LogsGroupByMissing(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + JSON.registerDescendants(LogsGroupByMissing.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - JSON.registerDescendants(LogsGroupByMissing.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return LogsGroupByMissing.schemas; + } - @Override - public Map getSchemas() { - return LogsGroupByMissing.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * String, Double + * + * 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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Double - * - *

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(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.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 String, Double"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * String, Double + * + * @return The actual instance (String, Double) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be String, Double"); - } - /** - * Get the actual instance, which can be the following: String, Double - * - * @return The actual instance (String, Double) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsGroupByTotal.java b/src/main/java/com/datadog/api/client/v2/model/LogsGroupByTotal.java index 15144f85e10..8683d323036 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsGroupByTotal.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsGroupByTotal.java @@ -6,324 +6,308 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = LogsGroupByTotal.LogsGroupByTotalDeserializer.class) @JsonSerialize(using = LogsGroupByTotal.LogsGroupByTotalSerializer.class) public class LogsGroupByTotal extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(LogsGroupByTotal.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class LogsGroupByTotalSerializer extends StdSerializer { - public LogsGroupByTotalSerializer(Class t) { - super(t); - } + private static final Logger log = Logger.getLogger(LogsGroupByTotal.class.getName()); - public LogsGroupByTotalSerializer() { - this(null); - } + @JsonIgnore + public boolean unparsed = false; - @Override - public void serialize(LogsGroupByTotal value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class LogsGroupByTotalSerializer extends StdSerializer { + public LogsGroupByTotalSerializer(Class t) { + super(t); + } - public static class LogsGroupByTotalDeserializer extends StdDeserializer { - public LogsGroupByTotalDeserializer() { - this(LogsGroupByTotal.class); - } + public LogsGroupByTotalSerializer() { + this(null); + } - public LogsGroupByTotalDeserializer(Class vc) { - super(vc); + @Override + public void serialize(LogsGroupByTotal value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public LogsGroupByTotal 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 Boolean - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Boolean.class.equals(Integer.class) - || Boolean.class.equals(Long.class) - || Boolean.class.equals(Float.class) - || Boolean.class.equals(Double.class) - || Boolean.class.equals(Boolean.class) - || Boolean.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Boolean.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class LogsGroupByTotalDeserializer extends StdDeserializer { + public LogsGroupByTotalDeserializer() { + this(LogsGroupByTotal.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Boolean'"); + public LogsGroupByTotalDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); - } - // deserialize String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public LogsGroupByTotal 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 Boolean + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class) || Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class) || Boolean.class.equals(Boolean.class) || Boolean.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Boolean.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Boolean'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + LogsGroupByTotal ret = new LogsGroupByTotal(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public LogsGroupByTotal getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "LogsGroupByTotal cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } + } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - log.log(Level.FINER, "Input data matches schema 'Double'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } + public LogsGroupByTotal() { + super("oneOf", Boolean.FALSE); + } + public LogsGroupByTotal(Boolean o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsGroupByTotal(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public LogsGroupByTotal(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - LogsGroupByTotal ret = new LogsGroupByTotal(); - 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; + static { + schemas.put("Boolean", new GenericType() { + }); + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + JSON.registerDescendants(LogsGroupByTotal.class, Collections.unmodifiableMap(schemas)); } - /** Handle deserialization of the 'null' value. */ @Override - public LogsGroupByTotal getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "LogsGroupByTotal cannot be null"); + public Map getSchemas() { + return LogsGroupByTotal.schemas; } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public LogsGroupByTotal() { - super("oneOf", Boolean.FALSE); - } - - public LogsGroupByTotal(Boolean o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsGroupByTotal(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public LogsGroupByTotal(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Boolean", new GenericType() {}); - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - JSON.registerDescendants(LogsGroupByTotal.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return LogsGroupByTotal.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Boolean, String, Double + * + * 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(Boolean.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Boolean, String, Double - * - *

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(Boolean.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.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 Boolean, String, Double"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * Boolean, String, Double + * + * @return The actual instance (Boolean, String, Double) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be Boolean, String, Double"); - } - /** - * Get the actual instance, which can be the following: Boolean, String, Double - * - * @return The actual instance (Boolean, String, Double) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Boolean` - * @throws ClassCastException if the instance is not `Boolean` - */ - public Boolean getBoolean() throws ClassCastException { - return (Boolean) super.getActualInstance(); - } + /** + * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Boolean` + * @throws ClassCastException if the instance is not `Boolean` + */ + public Boolean getBoolean() throws ClassCastException { + return (Boolean)super.getActualInstance(); + } - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsListRequest.java b/src/main/java/com/datadog/api/client/v2/model/LogsListRequest.java index f7b12699377..61fedb11ef8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsListRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsListRequest.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The request for a logs list. */ + +/** + *

The request for a logs list.

+ */ @JsonPropertyOrder({ LogsListRequest.JSON_PROPERTY_FILTER, LogsListRequest.JSON_PROPERTY_OPTIONS, LogsListRequest.JSON_PROPERTY_PAGE, LogsListRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private LogsQueryFilter filter; @@ -42,21 +62,19 @@ public LogsListRequest filter(LogsQueryFilter filter) { } /** - * The search and filter query settings - * + *

The search and filter query settings

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsQueryFilter getFilter() { + return filter; + } public void setFilter(LogsQueryFilter filter) { this.filter = filter; } - public LogsListRequest options(LogsQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -64,22 +82,20 @@ public LogsListRequest options(LogsQueryOptions options) { } /** - * Global query options that are used during the query. Note: You should only supply timezone or - * time offset but not both otherwise the query will fail. - * + *

Global query options that are used during the query. + * Note: You should only supply timezone or time offset but not both otherwise the query will fail.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsQueryOptions getOptions() { + return options; + } public void setOptions(LogsQueryOptions options) { this.options = options; } - public LogsListRequest page(LogsListRequestPage page) { this.page = page; this.unparsed |= page.unparsed; @@ -87,21 +103,19 @@ public LogsListRequest page(LogsListRequestPage page) { } /** - * Paging attributes for listing logs. - * + *

Paging attributes for listing logs.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsListRequestPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsListRequestPage getPage() { + return page; + } public void setPage(LogsListRequestPage page) { this.page = page; } - public LogsListRequest sort(LogsSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -109,25 +123,26 @@ public LogsListRequest sort(LogsSort sort) { } /** - * Sort parameters when querying logs. - * + *

Sort parameters when querying logs.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsSort getSort() { + return sort; + } public void setSort(LogsSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this LogsListRequest object is equal to o. */ + /** + * Return true if this LogsListRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +152,13 @@ public boolean equals(Object o) { return false; } LogsListRequest logsListRequest = (LogsListRequest) o; - return Objects.equals(this.filter, logsListRequest.filter) - && Objects.equals(this.options, logsListRequest.options) - && Objects.equals(this.page, logsListRequest.page) - && Objects.equals(this.sort, logsListRequest.sort); + return Objects.equals(this.filter, logsListRequest.filter) && Objects.equals(this.options, logsListRequest.options) && Objects.equals(this.page, logsListRequest.page) && Objects.equals(this.sort, logsListRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, options, page, sort); + return Objects.hash(filter,options,page,sort); } @Override @@ -161,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java b/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java index 57841c3dabc..d86dbf86ef1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Paging attributes for listing logs. */ + +/** + *

Paging attributes for listing logs.

+ */ @JsonPropertyOrder({ LogsListRequestPage.JSON_PROPERTY_CURSOR, LogsListRequestPage.JSON_PROPERTY_LIMIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListRequestPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -33,43 +53,43 @@ public LogsListRequestPage cursor(String cursor) { } /** - * List following results with a cursor provided in the previous query. - * + *

List following results with a cursor provided in the previous query.

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - public LogsListRequestPage limit(Integer limit) { this.limit = limit; return this; } /** - * Maximum number of logs in the response. maximum: 1000 - * + *

Maximum number of logs in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - /** Return true if this LogsListRequestPage object is equal to o. */ + /** + * Return true if this LogsListRequestPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +99,13 @@ public boolean equals(Object o) { return false; } LogsListRequestPage logsListRequestPage = (LogsListRequestPage) o; - return Objects.equals(this.cursor, logsListRequestPage.cursor) - && Objects.equals(this.limit, logsListRequestPage.limit); + return Objects.equals(this.cursor, logsListRequestPage.cursor) && Objects.equals(this.limit, logsListRequestPage.limit); } + @Override public int hashCode() { - return Objects.hash(cursor, limit); + return Objects.hash(cursor,limit); } @Override @@ -99,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/LogsListResponse.java index 2b096251979..e11d9f1ea7d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsListResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object with all logs matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object with all logs matching the request and pagination information.

+ */ @JsonPropertyOrder({ LogsListResponse.JSON_PROPERTY_DATA, LogsListResponse.JSON_PROPERTY_LINKS, LogsListResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public LogsListResponse data(List data) { } return this; } - public LogsListResponse addDataItem(Log dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public LogsListResponse addDataItem(Log dataItem) { } /** - * Array of logs matching the request. - * + *

Array of logs matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public LogsListResponse links(LogsListResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -73,21 +88,19 @@ public LogsListResponse links(LogsListResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsListResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsListResponseLinks getLinks() { + return links; + } public void setLinks(LogsListResponseLinks links) { this.links = links; } - public LogsListResponse meta(LogsResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -95,22 +108,23 @@ public LogsListResponse meta(LogsResponseMetadata meta) { } /** - * The metadata associated with a request - * + *

The metadata associated with a request

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsResponseMetadata getMeta() { + return meta; + } public void setMeta(LogsResponseMetadata meta) { this.meta = meta; } - /** Return true if this LogsListResponse object is equal to o. */ + /** + * Return true if this LogsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } LogsListResponse logsListResponse = (LogsListResponse) o; - return Objects.equals(this.data, logsListResponse.data) - && Objects.equals(this.links, logsListResponse.links) - && Objects.equals(this.meta, logsListResponse.meta); + return Objects.equals(this.data, logsListResponse.data) && Objects.equals(this.links, logsListResponse.links) && Objects.equals(this.meta, logsListResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsListResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/LogsListResponseLinks.java index 11668b795e1..e707fa3fe8a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsListResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsListResponseLinks.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Links attributes. */ -@JsonPropertyOrder({LogsListResponseLinks.JSON_PROPERTY_NEXT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Links attributes.

+ */ +@JsonPropertyOrder({ + LogsListResponseLinks.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsListResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT = "next"; private String next; @@ -27,23 +49,24 @@ public LogsListResponseLinks next(String next) { } /** - * Link for the next set of results. Note that the request can also be made using the POST - * endpoint. - * + *

Link for the next set of results. Note that the request can also be made using the + * POST endpoint.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - /** Return true if this LogsListResponseLinks object is equal to o. */ + /** + * Return true if this LogsListResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.next, logsListResponseLinks.next); } + @Override public int hashCode() { return Objects.hash(next); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCompute.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCompute.java index d781cc7370b..2a3151f6f60 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCompute.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The compute rule to compute the log-based metric. */ + +/** + *

The compute rule to compute the log-based metric.

+ */ @JsonPropertyOrder({ LogsMetricCompute.JSON_PROPERTY_AGGREGATION_TYPE, LogsMetricCompute.JSON_PROPERTY_INCLUDE_PERCENTILES, LogsMetricCompute.JSON_PROPERTY_PATH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION_TYPE = "aggregation_type"; private LogsMetricComputeAggregationType aggregationType; @@ -36,12 +55,10 @@ public LogsMetricCompute() {} @JsonCreator public LogsMetricCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION_TYPE) - LogsMetricComputeAggregationType aggregationType) { - this.aggregationType = aggregationType; - this.unparsed |= !aggregationType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION_TYPE)LogsMetricComputeAggregationType aggregationType) { + this.aggregationType = aggregationType; + this.unparsed |= !aggregationType.isValid(); } - public LogsMetricCompute aggregationType(LogsMetricComputeAggregationType aggregationType) { this.aggregationType = aggregationType; this.unparsed |= !aggregationType.isValid(); @@ -49,68 +66,64 @@ public LogsMetricCompute aggregationType(LogsMetricComputeAggregationType aggreg } /** - * The type of aggregation to use. - * + *

The type of aggregation to use.

* @return aggregationType - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricComputeAggregationType getAggregationType() { - return aggregationType; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricComputeAggregationType getAggregationType() { + return aggregationType; + } public void setAggregationType(LogsMetricComputeAggregationType aggregationType) { if (!aggregationType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregationType = aggregationType; } - public LogsMetricCompute includePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; return this; } /** - * Toggle to include or exclude percentile aggregations for distribution metrics. Only present - * when the aggregation_type is distribution. - * + *

Toggle to include or exclude percentile aggregations for distribution metrics. + * Only present when the aggregation_type is distribution.

* @return includePercentiles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludePercentiles() { - return includePercentiles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludePercentiles() { + return includePercentiles; + } public void setIncludePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; } - public LogsMetricCompute path(String path) { this.path = path; return this; } /** - * The path to the value the log-based metric will aggregate on (only used if the aggregation type - * is a "distribution"). - * + *

The path to the value the log-based metric will aggregate on (only used if the aggregation type is a "distribution").

* @return path - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPath() { - return path; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - /** Return true if this LogsMetricCompute object is equal to o. */ + /** + * Return true if this LogsMetricCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +133,13 @@ public boolean equals(Object o) { return false; } LogsMetricCompute logsMetricCompute = (LogsMetricCompute) o; - return Objects.equals(this.aggregationType, logsMetricCompute.aggregationType) - && Objects.equals(this.includePercentiles, logsMetricCompute.includePercentiles) - && Objects.equals(this.path, logsMetricCompute.path); + return Objects.equals(this.aggregationType, logsMetricCompute.aggregationType) && Objects.equals(this.includePercentiles, logsMetricCompute.includePercentiles) && Objects.equals(this.path, logsMetricCompute.path); } + @Override public int hashCode() { - return Objects.hash(aggregationType, includePercentiles, path); + return Objects.hash(aggregationType,includePercentiles,path); } @Override @@ -142,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricComputeAggregationType.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricComputeAggregationType.java index 31112ca7c98..329a9df3631 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricComputeAggregationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricComputeAggregationType.java @@ -6,31 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of aggregation to use. */ -@JsonSerialize( - using = LogsMetricComputeAggregationType.LogsMetricComputeAggregationTypeSerializer.class) +/** + *

The type of aggregation to use.

+ */ +@JsonSerialize(using = LogsMetricComputeAggregationType.LogsMetricComputeAggregationTypeSerializer.class) public class LogsMetricComputeAggregationType { - public static final LogsMetricComputeAggregationType COUNT = - new LogsMetricComputeAggregationType("count"); - public static final LogsMetricComputeAggregationType DISTRIBUTION = - new LogsMetricComputeAggregationType("distribution"); + public static final LogsMetricComputeAggregationType COUNT = new LogsMetricComputeAggregationType("count"); + public static final LogsMetricComputeAggregationType DISTRIBUTION = new LogsMetricComputeAggregationType("distribution"); - private static final Set allowedValues = - new HashSet(Arrays.asList("count", "distribution")); + private static final Set allowedValues = new HashSet(Arrays.asList("count", "distribution")); private String value; @@ -42,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class LogsMetricComputeAggregationTypeSerializer - extends StdSerializer { - public LogsMetricComputeAggregationTypeSerializer(Class t) { - super(t); - } + public static class LogsMetricComputeAggregationTypeSerializer extends StdSerializer { + public LogsMetricComputeAggregationTypeSerializer(Class t) { + super(t); + } - public LogsMetricComputeAggregationTypeSerializer() { - this(null); - } + public LogsMetricComputeAggregationTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsMetricComputeAggregationType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsMetricComputeAggregationType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsMetricComputeAggregationType object is equal to o. */ + /** + * Return true if this LogsMetricComputeAggregationType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateAttributes.java index 22d5c028de5..2d4cf733021 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateAttributes.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object describing the Datadog log-based metric to create. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object describing the Datadog log-based metric to create.

+ */ @JsonPropertyOrder({ LogsMetricCreateAttributes.JSON_PROPERTY_COMPUTE, LogsMetricCreateAttributes.JSON_PROPERTY_FILTER, LogsMetricCreateAttributes.JSON_PROPERTY_GROUP_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private LogsMetricCompute compute; @@ -38,11 +55,10 @@ public LogsMetricCreateAttributes() {} @JsonCreator public LogsMetricCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) LogsMetricCompute compute) { - this.compute = compute; - this.unparsed |= compute.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_COMPUTE)LogsMetricCompute compute) { + this.compute = compute; + this.unparsed |= compute.unparsed; } - public LogsMetricCreateAttributes compute(LogsMetricCompute compute) { this.compute = compute; this.unparsed |= compute.unparsed; @@ -50,20 +66,18 @@ public LogsMetricCreateAttributes compute(LogsMetricCompute compute) { } /** - * The compute rule to compute the log-based metric. - * + *

The compute rule to compute the log-based metric.

* @return compute - */ - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricCompute getCompute() { - return compute; - } - + **/ + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricCompute getCompute() { + return compute; + } public void setCompute(LogsMetricCompute compute) { this.compute = compute; } - public LogsMetricCreateAttributes filter(LogsMetricFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -71,21 +85,19 @@ public LogsMetricCreateAttributes filter(LogsMetricFilter filter) { } /** - * The log-based metric filter. Logs matching this filter will be aggregated in this metric. - * + *

The log-based metric filter. Logs matching this filter will be aggregated in this metric.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricFilter getFilter() { + return filter; + } public void setFilter(LogsMetricFilter filter) { this.filter = filter; } - public LogsMetricCreateAttributes groupBy(List groupBy) { this.groupBy = groupBy; for (LogsMetricGroupBy item : groupBy) { @@ -93,7 +105,6 @@ public LogsMetricCreateAttributes groupBy(List groupBy) { } return this; } - public LogsMetricCreateAttributes addGroupByItem(LogsMetricGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -104,22 +115,23 @@ public LogsMetricCreateAttributes addGroupByItem(LogsMetricGroupBy groupByItem) } /** - * The rules for the group by. - * + *

The rules for the group by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - /** Return true if this LogsMetricCreateAttributes object is equal to o. */ + /** + * Return true if this LogsMetricCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -129,14 +141,13 @@ public boolean equals(Object o) { return false; } LogsMetricCreateAttributes logsMetricCreateAttributes = (LogsMetricCreateAttributes) o; - return Objects.equals(this.compute, logsMetricCreateAttributes.compute) - && Objects.equals(this.filter, logsMetricCreateAttributes.filter) - && Objects.equals(this.groupBy, logsMetricCreateAttributes.groupBy); + return Objects.equals(this.compute, logsMetricCreateAttributes.compute) && Objects.equals(this.filter, logsMetricCreateAttributes.filter) && Objects.equals(this.groupBy, logsMetricCreateAttributes.groupBy); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy); + return Objects.hash(compute,filter,groupBy); } @Override @@ -151,7 +162,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateData.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateData.java index 50f29688189..5b9525021c7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The new log-based metric properties. */ +/** + *

The new log-based metric properties.

+ */ @JsonPropertyOrder({ LogsMetricCreateData.JSON_PROPERTY_ATTRIBUTES, LogsMetricCreateData.JSON_PROPERTY_ID, LogsMetricCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogsMetricCreateAttributes attributes; @@ -36,17 +55,15 @@ public LogsMetricCreateData() {} @JsonCreator public LogsMetricCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - LogsMetricCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsMetricType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)LogsMetricCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsMetricType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsMetricCreateData attributes(LogsMetricCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public LogsMetricCreateData attributes(LogsMetricCreateAttributes attributes) { } /** - * The object describing the Datadog log-based metric to create. - * + *

The object describing the Datadog log-based metric to create.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(LogsMetricCreateAttributes attributes) { this.attributes = attributes; } - public LogsMetricCreateData id(String id) { this.id = id; return this; } /** - * The name of the log-based metric. - * + *

The name of the log-based metric.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public LogsMetricCreateData type(LogsMetricType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public LogsMetricCreateData type(LogsMetricType type) { } /** - * The type of the resource. The value should always be logs_metrics. - * + *

The type of the resource. The value should always be logs_metrics.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricType getType() { + return type; + } public void setType(LogsMetricType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsMetricCreateData object is equal to o. */ + /** + * Return true if this LogsMetricCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } LogsMetricCreateData logsMetricCreateData = (LogsMetricCreateData) o; - return Objects.equals(this.attributes, logsMetricCreateData.attributes) - && Objects.equals(this.id, logsMetricCreateData.id) - && Objects.equals(this.type, logsMetricCreateData.type); + return Objects.equals(this.attributes, logsMetricCreateData.attributes) && Objects.equals(this.id, logsMetricCreateData.id) && Objects.equals(this.type, logsMetricCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateRequest.java index 2ceb40d2c95..d62ef304748 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The new log-based metric body. */ -@JsonPropertyOrder({LogsMetricCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The new log-based metric body.

+ */ +@JsonPropertyOrder({ + LogsMetricCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsMetricCreateData data; @@ -26,11 +47,10 @@ public LogsMetricCreateRequest() {} @JsonCreator public LogsMetricCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LogsMetricCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)LogsMetricCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public LogsMetricCreateRequest data(LogsMetricCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public LogsMetricCreateRequest data(LogsMetricCreateData data) { } /** - * The new log-based metric properties. - * + *

The new log-based metric properties.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricCreateData getData() { + return data; + } public void setData(LogsMetricCreateData data) { this.data = data; } - /** Return true if this LogsMetricCreateRequest object is equal to o. */ + /** + * Return true if this LogsMetricCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsMetricCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricFilter.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricFilter.java index a0baf938dec..f3633d27997 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricFilter.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The log-based metric filter. Logs matching this filter will be aggregated in this metric. */ -@JsonPropertyOrder({LogsMetricFilter.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The log-based metric filter. Logs matching this filter will be aggregated in this metric.

+ */ +@JsonPropertyOrder({ + LogsMetricFilter.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query = "*"; @@ -27,22 +49,23 @@ public LogsMetricFilter query(String query) { } /** - * The search query - following the log search syntax. - * + *

The search query - following the log search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this LogsMetricFilter object is equal to o. */ + /** + * Return true if this LogsMetricFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.query, logsMetricFilter.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricGroupBy.java index b23589da009..006d8096353 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricGroupBy.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A group by rule. */ -@JsonPropertyOrder({LogsMetricGroupBy.JSON_PROPERTY_PATH, LogsMetricGroupBy.JSON_PROPERTY_TAG_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A group by rule.

+ */ +@JsonPropertyOrder({ + LogsMetricGroupBy.JSON_PROPERTY_PATH, + LogsMetricGroupBy.JSON_PROPERTY_TAG_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PATH = "path"; private String path; @@ -28,53 +50,51 @@ public class LogsMetricGroupBy { public LogsMetricGroupBy() {} @JsonCreator - public LogsMetricGroupBy(@JsonProperty(required = true, value = JSON_PROPERTY_PATH) String path) { - this.path = path; + public LogsMetricGroupBy( + @JsonProperty(required=true, value=JSON_PROPERTY_PATH)String path) { + this.path = path; } - public LogsMetricGroupBy path(String path) { this.path = path; return this; } /** - * The path to the value the log-based metric will be aggregated over. - * + *

The path to the value the log-based metric will be aggregated over.

* @return path - */ - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPath() { - return path; - } - + **/ + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - public LogsMetricGroupBy tagName(String tagName) { this.tagName = tagName; return this; } /** - * Eventual name of the tag that gets created. By default, the path attribute is used as the tag - * name. - * + *

Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

* @return tagName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagName() { - return tagName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagName() { + return tagName; + } public void setTagName(String tagName) { this.tagName = tagName; } - /** Return true if this LogsMetricGroupBy object is equal to o. */ + /** + * Return true if this LogsMetricGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +104,13 @@ public boolean equals(Object o) { return false; } LogsMetricGroupBy logsMetricGroupBy = (LogsMetricGroupBy) o; - return Objects.equals(this.path, logsMetricGroupBy.path) - && Objects.equals(this.tagName, logsMetricGroupBy.tagName); + return Objects.equals(this.path, logsMetricGroupBy.path) && Objects.equals(this.tagName, logsMetricGroupBy.tagName); } + @Override public int hashCode() { - return Objects.hash(path, tagName); + return Objects.hash(path,tagName); } @Override @@ -104,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponse.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponse.java index 489ef8a80e7..47d7479adf0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The log-based metric object. */ -@JsonPropertyOrder({LogsMetricResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The log-based metric object.

+ */ +@JsonPropertyOrder({ + LogsMetricResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsMetricResponseData data; @@ -28,22 +50,23 @@ public LogsMetricResponse data(LogsMetricResponseData data) { } /** - * The log-based metric properties. - * + *

The log-based metric properties.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricResponseData getData() { + return data; + } public void setData(LogsMetricResponseData data) { this.data = data; } - /** Return true if this LogsMetricResponse object is equal to o. */ + /** + * Return true if this LogsMetricResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsMetricResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseAttributes.java index 90cbd8780db..612025db039 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object describing a Datadog log-based metric. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object describing a Datadog log-based metric.

+ */ @JsonPropertyOrder({ LogsMetricResponseAttributes.JSON_PROPERTY_COMPUTE, LogsMetricResponseAttributes.JSON_PROPERTY_FILTER, LogsMetricResponseAttributes.JSON_PROPERTY_GROUP_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private LogsMetricResponseCompute compute; @@ -40,21 +58,19 @@ public LogsMetricResponseAttributes compute(LogsMetricResponseCompute compute) { } /** - * The compute rule to compute the log-based metric. - * + *

The compute rule to compute the log-based metric.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricResponseCompute getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricResponseCompute getCompute() { + return compute; + } public void setCompute(LogsMetricResponseCompute compute) { this.compute = compute; } - public LogsMetricResponseAttributes filter(LogsMetricResponseFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -62,21 +78,19 @@ public LogsMetricResponseAttributes filter(LogsMetricResponseFilter filter) { } /** - * The log-based metric filter. Logs matching this filter will be aggregated in this metric. - * + *

The log-based metric filter. Logs matching this filter will be aggregated in this metric.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricResponseFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricResponseFilter getFilter() { + return filter; + } public void setFilter(LogsMetricResponseFilter filter) { this.filter = filter; } - public LogsMetricResponseAttributes groupBy(List groupBy) { this.groupBy = groupBy; for (LogsMetricResponseGroupBy item : groupBy) { @@ -84,7 +98,6 @@ public LogsMetricResponseAttributes groupBy(List grou } return this; } - public LogsMetricResponseAttributes addGroupByItem(LogsMetricResponseGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -95,22 +108,23 @@ public LogsMetricResponseAttributes addGroupByItem(LogsMetricResponseGroupBy gro } /** - * The rules for the group by. - * + *

The rules for the group by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - /** Return true if this LogsMetricResponseAttributes object is equal to o. */ + /** + * Return true if this LogsMetricResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } LogsMetricResponseAttributes logsMetricResponseAttributes = (LogsMetricResponseAttributes) o; - return Objects.equals(this.compute, logsMetricResponseAttributes.compute) - && Objects.equals(this.filter, logsMetricResponseAttributes.filter) - && Objects.equals(this.groupBy, logsMetricResponseAttributes.groupBy); + return Objects.equals(this.compute, logsMetricResponseAttributes.compute) && Objects.equals(this.filter, logsMetricResponseAttributes.filter) && Objects.equals(this.groupBy, logsMetricResponseAttributes.groupBy); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy); + return Objects.hash(compute,filter,groupBy); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseCompute.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseCompute.java index 1125da7c1bb..3f41f68e0d9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseCompute.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The compute rule to compute the log-based metric. */ + +/** + *

The compute rule to compute the log-based metric.

+ */ @JsonPropertyOrder({ LogsMetricResponseCompute.JSON_PROPERTY_AGGREGATION_TYPE, LogsMetricResponseCompute.JSON_PROPERTY_INCLUDE_PERCENTILES, LogsMetricResponseCompute.JSON_PROPERTY_PATH }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricResponseCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION_TYPE = "aggregation_type"; private LogsMetricResponseComputeAggregationType aggregationType; @@ -31,77 +51,72 @@ public class LogsMetricResponseCompute { public static final String JSON_PROPERTY_PATH = "path"; private String path; - public LogsMetricResponseCompute aggregationType( - LogsMetricResponseComputeAggregationType aggregationType) { + public LogsMetricResponseCompute aggregationType(LogsMetricResponseComputeAggregationType aggregationType) { this.aggregationType = aggregationType; this.unparsed |= !aggregationType.isValid(); return this; } /** - * The type of aggregation to use. - * + *

The type of aggregation to use.

* @return aggregationType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricResponseComputeAggregationType getAggregationType() { - return aggregationType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricResponseComputeAggregationType getAggregationType() { + return aggregationType; + } public void setAggregationType(LogsMetricResponseComputeAggregationType aggregationType) { if (!aggregationType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregationType = aggregationType; } - public LogsMetricResponseCompute includePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; return this; } /** - * Toggle to include or exclude percentile aggregations for distribution metrics. Only present - * when the aggregation_type is distribution. - * + *

Toggle to include or exclude percentile aggregations for distribution metrics. + * Only present when the aggregation_type is distribution.

* @return includePercentiles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludePercentiles() { - return includePercentiles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludePercentiles() { + return includePercentiles; + } public void setIncludePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; } - public LogsMetricResponseCompute path(String path) { this.path = path; return this; } /** - * The path to the value the log-based metric will aggregate on (only used if the aggregation type - * is a "distribution"). - * + *

The path to the value the log-based metric will aggregate on (only used if the aggregation type is a "distribution").

* @return path - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPath() { - return path; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - /** Return true if this LogsMetricResponseCompute object is equal to o. */ + /** + * Return true if this LogsMetricResponseCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,14 +126,13 @@ public boolean equals(Object o) { return false; } LogsMetricResponseCompute logsMetricResponseCompute = (LogsMetricResponseCompute) o; - return Objects.equals(this.aggregationType, logsMetricResponseCompute.aggregationType) - && Objects.equals(this.includePercentiles, logsMetricResponseCompute.includePercentiles) - && Objects.equals(this.path, logsMetricResponseCompute.path); + return Objects.equals(this.aggregationType, logsMetricResponseCompute.aggregationType) && Objects.equals(this.includePercentiles, logsMetricResponseCompute.includePercentiles) && Objects.equals(this.path, logsMetricResponseCompute.path); } + @Override public int hashCode() { - return Objects.hash(aggregationType, includePercentiles, path); + return Objects.hash(aggregationType,includePercentiles,path); } @Override @@ -133,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseComputeAggregationType.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseComputeAggregationType.java index d2fda40e50d..ecb746a2931 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseComputeAggregationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseComputeAggregationType.java @@ -6,33 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of aggregation to use. */ -@JsonSerialize( - using = - LogsMetricResponseComputeAggregationType.LogsMetricResponseComputeAggregationTypeSerializer - .class) +/** + *

The type of aggregation to use.

+ */ +@JsonSerialize(using = LogsMetricResponseComputeAggregationType.LogsMetricResponseComputeAggregationTypeSerializer.class) public class LogsMetricResponseComputeAggregationType { - public static final LogsMetricResponseComputeAggregationType COUNT = - new LogsMetricResponseComputeAggregationType("count"); - public static final LogsMetricResponseComputeAggregationType DISTRIBUTION = - new LogsMetricResponseComputeAggregationType("distribution"); + public static final LogsMetricResponseComputeAggregationType COUNT = new LogsMetricResponseComputeAggregationType("count"); + public static final LogsMetricResponseComputeAggregationType DISTRIBUTION = new LogsMetricResponseComputeAggregationType("distribution"); - private static final Set allowedValues = - new HashSet(Arrays.asList("count", "distribution")); + private static final Set allowedValues = new HashSet(Arrays.asList("count", "distribution")); private String value; @@ -44,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class LogsMetricResponseComputeAggregationTypeSerializer - extends StdSerializer { - public LogsMetricResponseComputeAggregationTypeSerializer( - Class t) { - super(t); - } + public static class LogsMetricResponseComputeAggregationTypeSerializer extends StdSerializer { + public LogsMetricResponseComputeAggregationTypeSerializer(Class t) { + super(t); + } - public LogsMetricResponseComputeAggregationTypeSerializer() { - this(null); - } + public LogsMetricResponseComputeAggregationTypeSerializer() { + this(null); + } - @Override - public void serialize( - LogsMetricResponseComputeAggregationType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(LogsMetricResponseComputeAggregationType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -74,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsMetricResponseComputeAggregationType object is equal to o. */ + /** + * Return true if this LogsMetricResponseComputeAggregationType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseData.java index 30c83c24f62..e41e3446999 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The log-based metric properties. */ + +/** + *

The log-based metric properties.

+ */ @JsonPropertyOrder({ LogsMetricResponseData.JSON_PROPERTY_ATTRIBUTES, LogsMetricResponseData.JSON_PROPERTY_ID, LogsMetricResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogsMetricResponseAttributes attributes; @@ -38,42 +58,38 @@ public LogsMetricResponseData attributes(LogsMetricResponseAttributes attributes } /** - * The object describing a Datadog log-based metric. - * + *

The object describing a Datadog log-based metric.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(LogsMetricResponseAttributes attributes) { this.attributes = attributes; } - public LogsMetricResponseData id(String id) { this.id = id; return this; } /** - * The name of the log-based metric. - * + *

The name of the log-based metric.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public LogsMetricResponseData type(LogsMetricType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public LogsMetricResponseData type(LogsMetricType type) { } /** - * The type of the resource. The value should always be logs_metrics. - * + *

The type of the resource. The value should always be logs_metrics.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricType getType() { + return type; + } public void setType(LogsMetricType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsMetricResponseData object is equal to o. */ + /** + * Return true if this LogsMetricResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } LogsMetricResponseData logsMetricResponseData = (LogsMetricResponseData) o; - return Objects.equals(this.attributes, logsMetricResponseData.attributes) - && Objects.equals(this.id, logsMetricResponseData.id) - && Objects.equals(this.type, logsMetricResponseData.type); + return Objects.equals(this.attributes, logsMetricResponseData.attributes) && Objects.equals(this.id, logsMetricResponseData.id) && Objects.equals(this.type, logsMetricResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseFilter.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseFilter.java index f3c9998561c..9582713107a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseFilter.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The log-based metric filter. Logs matching this filter will be aggregated in this metric. */ -@JsonPropertyOrder({LogsMetricResponseFilter.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The log-based metric filter. Logs matching this filter will be aggregated in this metric.

+ */ +@JsonPropertyOrder({ + LogsMetricResponseFilter.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricResponseFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -27,22 +49,23 @@ public LogsMetricResponseFilter query(String query) { } /** - * The search query - following the log search syntax. - * + *

The search query - following the log search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this LogsMetricResponseFilter object is equal to o. */ + /** + * Return true if this LogsMetricResponseFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.query, logsMetricResponseFilter.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseGroupBy.java index 16e0d8dbf1b..f254c5d168c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricResponseGroupBy.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A group by rule. */ + +/** + *

A group by rule.

+ */ @JsonPropertyOrder({ LogsMetricResponseGroupBy.JSON_PROPERTY_PATH, LogsMetricResponseGroupBy.JSON_PROPERTY_TAG_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricResponseGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PATH = "path"; private String path; @@ -33,44 +53,42 @@ public LogsMetricResponseGroupBy path(String path) { } /** - * The path to the value the log-based metric will be aggregated over. - * + *

The path to the value the log-based metric will be aggregated over.

* @return path - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPath() { - return path; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } public void setPath(String path) { this.path = path; } - public LogsMetricResponseGroupBy tagName(String tagName) { this.tagName = tagName; return this; } /** - * Eventual name of the tag that gets created. By default, the path attribute is used as the tag - * name. - * + *

Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.

* @return tagName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagName() { - return tagName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagName() { + return tagName; + } public void setTagName(String tagName) { this.tagName = tagName; } - /** Return true if this LogsMetricResponseGroupBy object is equal to o. */ + /** + * Return true if this LogsMetricResponseGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +98,13 @@ public boolean equals(Object o) { return false; } LogsMetricResponseGroupBy logsMetricResponseGroupBy = (LogsMetricResponseGroupBy) o; - return Objects.equals(this.path, logsMetricResponseGroupBy.path) - && Objects.equals(this.tagName, logsMetricResponseGroupBy.tagName); + return Objects.equals(this.path, logsMetricResponseGroupBy.path) && Objects.equals(this.tagName, logsMetricResponseGroupBy.tagName); } + @Override public int hashCode() { - return Objects.hash(path, tagName); + return Objects.hash(path,tagName); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricType.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricType.java index 0a27e84a477..b3cb894d24f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricType.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be logs_metrics. */ +/** + *

The type of the resource. The value should always be logs_metrics.

+ */ @JsonSerialize(using = LogsMetricType.LogsMetricTypeSerializer.class) public class LogsMetricType { public static final LogsMetricType LOGS_METRICS = new LogsMetricType("logs_metrics"); - private static final Set allowedValues = - new HashSet(Arrays.asList("logs_metrics")); + private static final Set allowedValues = new HashSet(Arrays.asList("logs_metrics")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class LogsMetricTypeSerializer extends StdSerializer { - public LogsMetricTypeSerializer(Class t) { - super(t); - } - - public LogsMetricTypeSerializer() { - this(null); - } - - @Override - public void serialize(LogsMetricType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsMetricTypeSerializer(Class t) { + super(t); + } + + public LogsMetricTypeSerializer() { + this(null); + } + + @Override + public void serialize(LogsMetricType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsMetricType object is equal to o. */ + /** + * Return true if this LogsMetricType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateAttributes.java index d42744625f7..5b34ea3b5e9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The log-based metric properties that will be updated. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The log-based metric properties that will be updated.

+ */ @JsonPropertyOrder({ LogsMetricUpdateAttributes.JSON_PROPERTY_COMPUTE, LogsMetricUpdateAttributes.JSON_PROPERTY_FILTER, LogsMetricUpdateAttributes.JSON_PROPERTY_GROUP_BY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private LogsMetricUpdateCompute compute; @@ -40,21 +58,19 @@ public LogsMetricUpdateAttributes compute(LogsMetricUpdateCompute compute) { } /** - * The compute rule to compute the log-based metric. - * + *

The compute rule to compute the log-based metric.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricUpdateCompute getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricUpdateCompute getCompute() { + return compute; + } public void setCompute(LogsMetricUpdateCompute compute) { this.compute = compute; } - public LogsMetricUpdateAttributes filter(LogsMetricFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -62,21 +78,19 @@ public LogsMetricUpdateAttributes filter(LogsMetricFilter filter) { } /** - * The log-based metric filter. Logs matching this filter will be aggregated in this metric. - * + *

The log-based metric filter. Logs matching this filter will be aggregated in this metric.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsMetricFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsMetricFilter getFilter() { + return filter; + } public void setFilter(LogsMetricFilter filter) { this.filter = filter; } - public LogsMetricUpdateAttributes groupBy(List groupBy) { this.groupBy = groupBy; for (LogsMetricGroupBy item : groupBy) { @@ -84,7 +98,6 @@ public LogsMetricUpdateAttributes groupBy(List groupBy) { } return this; } - public LogsMetricUpdateAttributes addGroupByItem(LogsMetricGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -95,22 +108,23 @@ public LogsMetricUpdateAttributes addGroupByItem(LogsMetricGroupBy groupByItem) } /** - * The rules for the group by. - * + *

The rules for the group by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - /** Return true if this LogsMetricUpdateAttributes object is equal to o. */ + /** + * Return true if this LogsMetricUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } LogsMetricUpdateAttributes logsMetricUpdateAttributes = (LogsMetricUpdateAttributes) o; - return Objects.equals(this.compute, logsMetricUpdateAttributes.compute) - && Objects.equals(this.filter, logsMetricUpdateAttributes.filter) - && Objects.equals(this.groupBy, logsMetricUpdateAttributes.groupBy); + return Objects.equals(this.compute, logsMetricUpdateAttributes.compute) && Objects.equals(this.filter, logsMetricUpdateAttributes.filter) && Objects.equals(this.groupBy, logsMetricUpdateAttributes.groupBy); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy); + return Objects.hash(compute,filter,groupBy); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateCompute.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateCompute.java index f857e237267..74c5725260c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateCompute.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The compute rule to compute the log-based metric. */ -@JsonPropertyOrder({LogsMetricUpdateCompute.JSON_PROPERTY_INCLUDE_PERCENTILES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The compute rule to compute the log-based metric.

+ */ +@JsonPropertyOrder({ + LogsMetricUpdateCompute.JSON_PROPERTY_INCLUDE_PERCENTILES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricUpdateCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INCLUDE_PERCENTILES = "include_percentiles"; private Boolean includePercentiles; @@ -27,23 +49,24 @@ public LogsMetricUpdateCompute includePercentiles(Boolean includePercentiles) { } /** - * Toggle to include or exclude percentile aggregations for distribution metrics. Only present - * when the aggregation_type is distribution. - * + *

Toggle to include or exclude percentile aggregations for distribution metrics. + * Only present when the aggregation_type is distribution.

* @return includePercentiles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludePercentiles() { - return includePercentiles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludePercentiles() { + return includePercentiles; + } public void setIncludePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; } - /** Return true if this LogsMetricUpdateCompute object is equal to o. */ + /** + * Return true if this LogsMetricUpdateCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.includePercentiles, logsMetricUpdateCompute.includePercentiles); } + @Override public int hashCode() { return Objects.hash(includePercentiles); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateData.java index 6a451c1545b..9639c898fe1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The new log-based metric properties. */ + +/** + *

The new log-based metric properties.

+ */ @JsonPropertyOrder({ LogsMetricUpdateData.JSON_PROPERTY_ATTRIBUTES, LogsMetricUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private LogsMetricUpdateAttributes attributes; @@ -32,15 +51,13 @@ public LogsMetricUpdateData() {} @JsonCreator public LogsMetricUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - LogsMetricUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LogsMetricType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)LogsMetricUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)LogsMetricType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public LogsMetricUpdateData attributes(LogsMetricUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public LogsMetricUpdateData attributes(LogsMetricUpdateAttributes attributes) { } /** - * The log-based metric properties that will be updated. - * + *

The log-based metric properties that will be updated.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(LogsMetricUpdateAttributes attributes) { this.attributes = attributes; } - public LogsMetricUpdateData type(LogsMetricType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public LogsMetricUpdateData type(LogsMetricType type) { } /** - * The type of the resource. The value should always be logs_metrics. - * + *

The type of the resource. The value should always be logs_metrics.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricType getType() { + return type; + } public void setType(LogsMetricType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this LogsMetricUpdateData object is equal to o. */ + /** + * Return true if this LogsMetricUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } LogsMetricUpdateData logsMetricUpdateData = (LogsMetricUpdateData) o; - return Objects.equals(this.attributes, logsMetricUpdateData.attributes) - && Objects.equals(this.type, logsMetricUpdateData.type); + return Objects.equals(this.attributes, logsMetricUpdateData.attributes) && Objects.equals(this.type, logsMetricUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateRequest.java index cebf36d6370..e670604ab84 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The new log-based metric body. */ -@JsonPropertyOrder({LogsMetricUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The new log-based metric body.

+ */ +@JsonPropertyOrder({ + LogsMetricUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private LogsMetricUpdateData data; @@ -26,11 +47,10 @@ public LogsMetricUpdateRequest() {} @JsonCreator public LogsMetricUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LogsMetricUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)LogsMetricUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public LogsMetricUpdateRequest data(LogsMetricUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public LogsMetricUpdateRequest data(LogsMetricUpdateData data) { } /** - * The new log-based metric properties. - * + *

The new log-based metric properties.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public LogsMetricUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public LogsMetricUpdateData getData() { + return data; + } public void setData(LogsMetricUpdateData data) { this.data = data; } - /** Return true if this LogsMetricUpdateRequest object is equal to o. */ + /** + * Return true if this LogsMetricUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsMetricUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsMetricsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LogsMetricsResponse.java index a70b202a9d9..04921f8a508 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsMetricsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsMetricsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** All the available log-based metric objects. */ -@JsonPropertyOrder({LogsMetricsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

All the available log-based metric objects.

+ */ +@JsonPropertyOrder({ + LogsMetricsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsMetricsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public LogsMetricsResponse data(List data) { } return this; } - public LogsMetricsResponse addDataItem(LogsMetricResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public LogsMetricsResponse addDataItem(LogsMetricResponseData dataItem) { } /** - * A list of log-based metric objects. - * + *

A list of log-based metric objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this LogsMetricsResponse object is equal to o. */ + /** + * Return true if this LogsMetricsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, logsMetricsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/LogsQueryFilter.java index 1a189f78cdb..c01ff8106b2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsQueryFilter.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The search and filter query settings */ +/** + *

The search and filter query settings

+ */ @JsonPropertyOrder({ LogsQueryFilter.JSON_PROPERTY_FROM, LogsQueryFilter.JSON_PROPERTY_INDEXES, @@ -22,10 +40,10 @@ LogsQueryFilter.JSON_PROPERTY_STORAGE_TIER, LogsQueryFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsQueryFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from = "now-15m"; @@ -47,27 +65,23 @@ public LogsQueryFilter from(String from) { } /** - * The minimum time for the requested logs, supports date math and regular timestamps - * (milliseconds). - * + *

The minimum time for the requested logs, supports date math and regular timestamps (milliseconds).

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public LogsQueryFilter indexes(List indexes) { this.indexes = indexes; return this; } - public LogsQueryFilter addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); @@ -77,43 +91,38 @@ public LogsQueryFilter addIndexesItem(String indexesItem) { } /** - * For customers with multiple indexes, the indexes to search. Defaults to ['*'] which means all - * indexes. - * + *

For customers with multiple indexes, the indexes to search. Defaults to ['*'] which means all indexes.

* @return indexes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIndexes() { - return indexes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getIndexes() { + return indexes; + } public void setIndexes(List indexes) { this.indexes = indexes; } - public LogsQueryFilter query(String query) { this.query = query; return this; } /** - * The search query - following the log search syntax. - * + *

The search query - following the log search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public LogsQueryFilter storageTier(LogsStorageTier storageTier) { this.storageTier = storageTier; this.unparsed |= !storageTier.isValid(); @@ -121,47 +130,45 @@ public LogsQueryFilter storageTier(LogsStorageTier storageTier) { } /** - * Specifies storage type as indexes or online-archives - * + *

Specifies storage type as indexes or online-archives

* @return storageTier - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STORAGE_TIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsStorageTier getStorageTier() { - return storageTier; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STORAGE_TIER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsStorageTier getStorageTier() { + return storageTier; + } public void setStorageTier(LogsStorageTier storageTier) { if (!storageTier.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.storageTier = storageTier; } - public LogsQueryFilter to(String to) { this.to = to; return this; } /** - * The maximum time for the requested logs, supports date math and regular timestamps - * (milliseconds). - * + *

The maximum time for the requested logs, supports date math and regular timestamps (milliseconds).

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this LogsQueryFilter object is equal to o. */ + /** + * Return true if this LogsQueryFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -171,16 +178,13 @@ public boolean equals(Object o) { return false; } LogsQueryFilter logsQueryFilter = (LogsQueryFilter) o; - return Objects.equals(this.from, logsQueryFilter.from) - && Objects.equals(this.indexes, logsQueryFilter.indexes) - && Objects.equals(this.query, logsQueryFilter.query) - && Objects.equals(this.storageTier, logsQueryFilter.storageTier) - && Objects.equals(this.to, logsQueryFilter.to); + return Objects.equals(this.from, logsQueryFilter.from) && Objects.equals(this.indexes, logsQueryFilter.indexes) && Objects.equals(this.query, logsQueryFilter.query) && Objects.equals(this.storageTier, logsQueryFilter.storageTier) && Objects.equals(this.to, logsQueryFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, indexes, query, storageTier, to); + return Objects.hash(from,indexes,query,storageTier,to); } @Override @@ -197,7 +201,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsQueryOptions.java b/src/main/java/com/datadog/api/client/v2/model/LogsQueryOptions.java index 36ffe739abd..09d599d271a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsQueryOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsQueryOptions.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Global query options that are used during the query. Note: You should only supply timezone or - * time offset but not both otherwise the query will fail. + *

Global query options that are used during the query. + * Note: You should only supply timezone or time offset but not both otherwise the query will fail.

*/ @JsonPropertyOrder({ LogsQueryOptions.JSON_PROPERTY_TIME_OFFSET, LogsQueryOptions.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsQueryOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME_OFFSET = "timeOffset"; private Long timeOffset; @@ -36,44 +54,42 @@ public LogsQueryOptions timeOffset(Long timeOffset) { } /** - * The time offset (in seconds) to apply to the query. - * + *

The time offset (in seconds) to apply to the query.

* @return timeOffset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeOffset() { - return timeOffset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeOffset() { + return timeOffset; + } public void setTimeOffset(Long timeOffset) { this.timeOffset = timeOffset; } - public LogsQueryOptions timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone - * Database identifier (like America/New_York). - * + *

The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this LogsQueryOptions object is equal to o. */ + /** + * Return true if this LogsQueryOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +99,13 @@ public boolean equals(Object o) { return false; } LogsQueryOptions logsQueryOptions = (LogsQueryOptions) o; - return Objects.equals(this.timeOffset, logsQueryOptions.timeOffset) - && Objects.equals(this.timezone, logsQueryOptions.timezone); + return Objects.equals(this.timeOffset, logsQueryOptions.timeOffset) && Objects.equals(this.timezone, logsQueryOptions.timezone); } + @Override public int hashCode() { - return Objects.hash(timeOffset, timezone); + return Objects.hash(timeOffset,timezone); } @Override @@ -103,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadata.java b/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadata.java index 57a7b6a087a..1ed99387b20 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadata.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The metadata associated with a request */ +/** + *

The metadata associated with a request

+ */ @JsonPropertyOrder({ LogsResponseMetadata.JSON_PROPERTY_ELAPSED, LogsResponseMetadata.JSON_PROPERTY_PAGE, @@ -22,10 +40,10 @@ LogsResponseMetadata.JSON_PROPERTY_STATUS, LogsResponseMetadata.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ELAPSED = "elapsed"; private Long elapsed; @@ -47,21 +65,19 @@ public LogsResponseMetadata elapsed(Long elapsed) { } /** - * The time elapsed in milliseconds - * + *

The time elapsed in milliseconds

* @return elapsed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsed() { - return elapsed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsed() { + return elapsed; + } public void setElapsed(Long elapsed) { this.elapsed = elapsed; } - public LogsResponseMetadata page(LogsResponseMetadataPage page) { this.page = page; this.unparsed |= page.unparsed; @@ -69,42 +85,38 @@ public LogsResponseMetadata page(LogsResponseMetadataPage page) { } /** - * Paging attributes. - * + *

Paging attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsResponseMetadataPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsResponseMetadataPage getPage() { + return page; + } public void setPage(LogsResponseMetadataPage page) { this.page = page; } - public LogsResponseMetadata requestId(String requestId) { this.requestId = requestId; return this; } /** - * The identifier of the request - * + *

The identifier of the request

* @return requestId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } public void setRequestId(String requestId) { this.requestId = requestId; } - public LogsResponseMetadata status(LogsAggregateResponseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -112,24 +124,22 @@ public LogsResponseMetadata status(LogsAggregateResponseStatus status) { } /** - * The status of the response - * + *

The status of the response

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LogsAggregateResponseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public LogsAggregateResponseStatus getStatus() { + return status; + } public void setStatus(LogsAggregateResponseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public LogsResponseMetadata warnings(List warnings) { this.warnings = warnings; for (LogsWarning item : warnings) { @@ -137,7 +147,6 @@ public LogsResponseMetadata warnings(List warnings) { } return this; } - public LogsResponseMetadata addWarningsItem(LogsWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -148,23 +157,24 @@ public LogsResponseMetadata addWarningsItem(LogsWarning warningsItem) { } /** - * A list of warnings (non fatal errors) encountered, partial results might be returned if - * warnings are present in the response. - * + *

A list of warnings (non fatal errors) encountered, partial results might be returned if + * warnings are present in the response.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this LogsResponseMetadata object is equal to o. */ + /** + * Return true if this LogsResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -174,16 +184,13 @@ public boolean equals(Object o) { return false; } LogsResponseMetadata logsResponseMetadata = (LogsResponseMetadata) o; - return Objects.equals(this.elapsed, logsResponseMetadata.elapsed) - && Objects.equals(this.page, logsResponseMetadata.page) - && Objects.equals(this.requestId, logsResponseMetadata.requestId) - && Objects.equals(this.status, logsResponseMetadata.status) - && Objects.equals(this.warnings, logsResponseMetadata.warnings); + return Objects.equals(this.elapsed, logsResponseMetadata.elapsed) && Objects.equals(this.page, logsResponseMetadata.page) && Objects.equals(this.requestId, logsResponseMetadata.requestId) && Objects.equals(this.status, logsResponseMetadata.status) && Objects.equals(this.warnings, logsResponseMetadata.warnings); } + @Override public int hashCode() { - return Objects.hash(elapsed, page, requestId, status, warnings); + return Objects.hash(elapsed,page,requestId,status,warnings); } @Override @@ -200,7 +207,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadataPage.java b/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadataPage.java index 433f3040bcf..52a93be64af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadataPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsResponseMetadataPage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Paging attributes. */ -@JsonPropertyOrder({LogsResponseMetadataPage.JSON_PROPERTY_AFTER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Paging attributes.

+ */ +@JsonPropertyOrder({ + LogsResponseMetadataPage.JSON_PROPERTY_AFTER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsResponseMetadataPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -27,23 +49,24 @@ public LogsResponseMetadataPage after(String after) { } /** - * The cursor to use to get the next results, if any. To make the next request, use the same. - * parameters with the addition of the page[cursor]. - * + *

The cursor to use to get the next results, if any. To make the next request, use the same. + * parameters with the addition of the page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - /** Return true if this LogsResponseMetadataPage object is equal to o. */ + /** + * Return true if this LogsResponseMetadataPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.after, logsResponseMetadataPage.after); } + @Override public int hashCode() { return Objects.hash(after); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsSort.java b/src/main/java/com/datadog/api/client/v2/model/LogsSort.java index 03f9b103253..ac3dfec6da6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sort parameters when querying logs. */ +/** + *

Sort parameters when querying logs.

+ */ @JsonSerialize(using = LogsSort.LogsSortSerializer.class) public class LogsSort { public static final LogsSort TIMESTAMP_ASCENDING = new LogsSort("timestamp"); public static final LogsSort TIMESTAMP_DESCENDING = new LogsSort("-timestamp"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timestamp", "-timestamp")); + private static final Set allowedValues = new HashSet(Arrays.asList("timestamp", "-timestamp")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class LogsSortSerializer extends StdSerializer { - public LogsSortSerializer(Class t) { - super(t); - } - - public LogsSortSerializer() { - this(null); - } - - @Override - public void serialize(LogsSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsSortSerializer(Class t) { + super(t); + } + + public LogsSortSerializer() { + this(null); + } + + @Override + public void serialize(LogsSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsSort object is equal to o. */ + /** + * Return true if this LogsSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsSortOrder.java b/src/main/java/com/datadog/api/client/v2/model/LogsSortOrder.java index f454b07657c..e77939424db 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsSortOrder.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsSortOrder.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The order to use, ascending or descending */ +/** + *

The order to use, ascending or descending

+ */ @JsonSerialize(using = LogsSortOrder.LogsSortOrderSerializer.class) public class LogsSortOrder { public static final LogsSortOrder ASCENDING = new LogsSortOrder("asc"); public static final LogsSortOrder DESCENDING = new LogsSortOrder("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class LogsSortOrderSerializer extends StdSerializer { - public LogsSortOrderSerializer(Class t) { - super(t); - } - - public LogsSortOrderSerializer() { - this(null); - } - - @Override - public void serialize(LogsSortOrder value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsSortOrderSerializer(Class t) { + super(t); + } + + public LogsSortOrderSerializer() { + this(null); + } + + @Override + public void serialize(LogsSortOrder value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsSortOrder object is equal to o. */ + /** + * Return true if this LogsSortOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsStorageTier.java b/src/main/java/com/datadog/api/client/v2/model/LogsStorageTier.java index 873ec12ba97..6bba03cddf9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsStorageTier.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsStorageTier.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Specifies storage type as indexes or online-archives */ +/** + *

Specifies storage type as indexes or online-archives

+ */ @JsonSerialize(using = LogsStorageTier.LogsStorageTierSerializer.class) public class LogsStorageTier { public static final LogsStorageTier INDEXES = new LogsStorageTier("indexes"); public static final LogsStorageTier ONLINE_ARCHIVES = new LogsStorageTier("online-archives"); - private static final Set allowedValues = - new HashSet(Arrays.asList("indexes", "online-archives")); + private static final Set allowedValues = new HashSet(Arrays.asList("indexes", "online-archives")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class LogsStorageTierSerializer extends StdSerializer { - public LogsStorageTierSerializer(Class t) { - super(t); - } - - public LogsStorageTierSerializer() { - this(null); - } - - @Override - public void serialize(LogsStorageTier value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public LogsStorageTierSerializer(Class t) { + super(t); + } + + public LogsStorageTierSerializer() { + this(null); + } + + @Override + public void serialize(LogsStorageTier value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this LogsStorageTier object is equal to o. */ + /** + * Return true if this LogsStorageTier object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsWarning.java b/src/main/java/com/datadog/api/client/v2/model/LogsWarning.java index 6a87343eef1..a74eda833d4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsWarning.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsWarning.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A warning message indicating something that went wrong with the query */ + +/** + *

A warning message indicating something that went wrong with the query

+ */ @JsonPropertyOrder({ LogsWarning.JSON_PROPERTY_CODE, LogsWarning.JSON_PROPERTY_DETAIL, LogsWarning.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsWarning { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -37,64 +57,61 @@ public LogsWarning code(String code) { } /** - * A unique code for this type of warning - * + *

A unique code for this type of warning

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public LogsWarning detail(String detail) { this.detail = detail; return this; } /** - * A detailed explanation of this specific warning - * + *

A detailed explanation of this specific warning

* @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } public void setDetail(String detail) { this.detail = detail; } - public LogsWarning title(String title) { this.title = title; return this; } /** - * A short human-readable summary of the warning - * + *

A short human-readable summary of the warning

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this LogsWarning object is equal to o. */ + /** + * Return true if this LogsWarning object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } LogsWarning logsWarning = (LogsWarning) o; - return Objects.equals(this.code, logsWarning.code) - && Objects.equals(this.detail, logsWarning.detail) - && Objects.equals(this.title, logsWarning.title); + return Objects.equals(this.code, logsWarning.code) && Objects.equals(this.detail, logsWarning.detail) && Objects.equals(this.title, logsWarning.title); } + @Override public int hashCode() { - return Objects.hash(code, detail, title); + return Objects.hash(code,detail,title); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Metric.java b/src/main/java/com/datadog/api/client/v2/model/Metric.java index 137c9a13bd4..0c003466a26 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Metric.java +++ b/src/main/java/com/datadog/api/client/v2/model/Metric.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric tag configuration. */ -@JsonPropertyOrder({Metric.JSON_PROPERTY_ID, Metric.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object for a single metric tag configuration.

+ */ +@JsonPropertyOrder({ + Metric.JSON_PROPERTY_ID, + Metric.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Metric { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -30,21 +53,19 @@ public Metric id(String id) { } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public Metric type(MetricType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -52,25 +73,26 @@ public Metric type(MetricType type) { } /** - * The metric resource type. - * + *

The metric resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricType getType() { + return type; + } public void setType(MetricType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this Metric object is equal to o. */ + /** + * Return true if this Metric object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,9 +105,10 @@ public boolean equals(Object o) { return Objects.equals(this.id, metric.id) && Objects.equals(this.type, metric.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -99,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricActiveConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/MetricActiveConfigurationType.java index 298482e4dcd..da866d0b7ab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricActiveConfigurationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricActiveConfigurationType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric actively queried configuration resource type. */ +/** + *

The metric actively queried configuration resource type.

+ */ @JsonSerialize(using = MetricActiveConfigurationType.MetricActiveConfigurationTypeSerializer.class) public class MetricActiveConfigurationType { - public static final MetricActiveConfigurationType ACTIVELY_QUERIED_CONFIGURATIONS = - new MetricActiveConfigurationType("actively_queried_configurations"); + public static final MetricActiveConfigurationType ACTIVELY_QUERIED_CONFIGURATIONS = new MetricActiveConfigurationType("actively_queried_configurations"); - private static final Set allowedValues = - new HashSet(Arrays.asList("actively_queried_configurations")); + private static final Set allowedValues = new HashSet(Arrays.asList("actively_queried_configurations")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MetricActiveConfigurationTypeSerializer - extends StdSerializer { - public MetricActiveConfigurationTypeSerializer(Class t) { - super(t); - } + public static class MetricActiveConfigurationTypeSerializer extends StdSerializer { + public MetricActiveConfigurationTypeSerializer(Class t) { + super(t); + } - public MetricActiveConfigurationTypeSerializer() { - this(null); - } + public MetricActiveConfigurationTypeSerializer() { + this(null); + } - @Override - public void serialize( - MetricActiveConfigurationType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricActiveConfigurationType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricActiveConfigurationType object is equal to o. */ + /** + * Return true if this MetricActiveConfigurationType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricAllTags.java b/src/main/java/com/datadog/api/client/v2/model/MetricAllTags.java index cbad539e32e..59fb3b18691 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricAllTags.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricAllTags.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric's indexed tags. */ + +/** + *

Object for a single metric's indexed tags.

+ */ @JsonPropertyOrder({ MetricAllTags.JSON_PROPERTY_ATTRIBUTES, MetricAllTags.JSON_PROPERTY_ID, MetricAllTags.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricAllTags { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricAllTagsAttributes attributes; @@ -38,42 +58,38 @@ public MetricAllTags attributes(MetricAllTagsAttributes attributes) { } /** - * Object containing the definition of a metric's tags. - * + *

Object containing the definition of a metric's tags.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricAllTagsAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricAllTagsAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricAllTagsAttributes attributes) { this.attributes = attributes; } - public MetricAllTags id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricAllTags type(MetricType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public MetricAllTags type(MetricType type) { } /** - * The metric resource type. - * + *

The metric resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricType getType() { + return type; + } public void setType(MetricType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricAllTags object is equal to o. */ + /** + * Return true if this MetricAllTags object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } MetricAllTags metricAllTags = (MetricAllTags) o; - return Objects.equals(this.attributes, metricAllTags.attributes) - && Objects.equals(this.id, metricAllTags.id) - && Objects.equals(this.type, metricAllTags.type); + return Objects.equals(this.attributes, metricAllTags.attributes) && Objects.equals(this.id, metricAllTags.id) && Objects.equals(this.type, metricAllTags.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsAttributes.java index e2416c5cb34..ba8fb51eb01 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsAttributes.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing the definition of a metric's tags. */ -@JsonPropertyOrder({MetricAllTagsAttributes.JSON_PROPERTY_TAGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Object containing the definition of a metric's tags.

+ */ +@JsonPropertyOrder({ + MetricAllTagsAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricAllTagsAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TAGS = "tags"; private List tags = null; @@ -27,7 +47,6 @@ public MetricAllTagsAttributes tags(List tags) { this.tags = tags; return this; } - public MetricAllTagsAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -37,22 +56,23 @@ public MetricAllTagsAttributes addTagsItem(String tagsItem) { } /** - * List of indexed tag value pairs. - * + *

List of indexed tag value pairs.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this MetricAllTagsAttributes object is equal to o. */ + /** + * Return true if this MetricAllTagsAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +85,7 @@ public boolean equals(Object o) { return Objects.equals(this.tags, metricAllTagsAttributes.tags); } + @Override public int hashCode() { return Objects.hash(tags); @@ -80,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsResponse.java index d9b34248819..c337c4b1b08 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricAllTagsResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object that includes a single metric's indexed tags. */ -@JsonPropertyOrder({MetricAllTagsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object that includes a single metric's indexed tags.

+ */ +@JsonPropertyOrder({ + MetricAllTagsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricAllTagsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricAllTags data; @@ -28,22 +50,23 @@ public MetricAllTagsResponse data(MetricAllTags data) { } /** - * Object for a single metric's indexed tags. - * + *

Object for a single metric's indexed tags.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricAllTags getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricAllTags getData() { + return data; + } public void setData(MetricAllTags data) { this.data = data; } - /** Return true if this MetricAllTagsResponse object is equal to o. */ + /** + * Return true if this MetricAllTagsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, metricAllTagsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkConfigureTagsType.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkConfigureTagsType.java index ba19d5d96ce..497398c07f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkConfigureTagsType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkConfigureTagsType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric bulk configure tags resource. */ +/** + *

The metric bulk configure tags resource.

+ */ @JsonSerialize(using = MetricBulkConfigureTagsType.MetricBulkConfigureTagsTypeSerializer.class) public class MetricBulkConfigureTagsType { - public static final MetricBulkConfigureTagsType BULK_MANAGE_TAGS = - new MetricBulkConfigureTagsType("metric_bulk_configure_tags"); + public static final MetricBulkConfigureTagsType BULK_MANAGE_TAGS = new MetricBulkConfigureTagsType("metric_bulk_configure_tags"); - private static final Set allowedValues = - new HashSet(Arrays.asList("metric_bulk_configure_tags")); + private static final Set allowedValues = new HashSet(Arrays.asList("metric_bulk_configure_tags")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MetricBulkConfigureTagsTypeSerializer - extends StdSerializer { - public MetricBulkConfigureTagsTypeSerializer(Class t) { - super(t); - } + public static class MetricBulkConfigureTagsTypeSerializer extends StdSerializer { + public MetricBulkConfigureTagsTypeSerializer(Class t) { + super(t); + } - public MetricBulkConfigureTagsTypeSerializer() { - this(null); - } + public MetricBulkConfigureTagsTypeSerializer() { + this(null); + } - @Override - public void serialize( - MetricBulkConfigureTagsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricBulkConfigureTagsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricBulkConfigureTagsType object is equal to o. */ + /** + * Return true if this MetricBulkConfigureTagsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreate.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreate.java index 28a86cc544f..b99a7c9d36e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreate.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object to bulk configure tags for metrics matching the given prefix. */ + +/** + *

Request object to bulk configure tags for metrics matching the given prefix.

+ */ @JsonPropertyOrder({ MetricBulkTagConfigCreate.JSON_PROPERTY_ATTRIBUTES, MetricBulkTagConfigCreate.JSON_PROPERTY_ID, MetricBulkTagConfigCreate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigCreate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricBulkTagConfigCreateAttributes attributes; @@ -36,13 +55,12 @@ public MetricBulkTagConfigCreate() {} @JsonCreator public MetricBulkTagConfigCreate( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MetricBulkConfigureTagsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MetricBulkConfigureTagsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public MetricBulkTagConfigCreate attributes(MetricBulkTagConfigCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -50,41 +68,37 @@ public MetricBulkTagConfigCreate attributes(MetricBulkTagConfigCreateAttributes } /** - * Optional parameters for bulk creating metric tag configurations. - * + *

Optional parameters for bulk creating metric tag configurations.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricBulkTagConfigCreateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricBulkTagConfigCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricBulkTagConfigCreateAttributes attributes) { this.attributes = attributes; } - public MetricBulkTagConfigCreate id(String id) { this.id = id; return this; } /** - * A text prefix to match against metric names. - * + *

A text prefix to match against metric names.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricBulkTagConfigCreate type(MetricBulkConfigureTagsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +106,25 @@ public MetricBulkTagConfigCreate type(MetricBulkConfigureTagsType type) { } /** - * The metric bulk configure tags resource. - * + *

The metric bulk configure tags resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricBulkConfigureTagsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricBulkConfigureTagsType getType() { + return type; + } public void setType(MetricBulkConfigureTagsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricBulkTagConfigCreate object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } MetricBulkTagConfigCreate metricBulkTagConfigCreate = (MetricBulkTagConfigCreate) o; - return Objects.equals(this.attributes, metricBulkTagConfigCreate.attributes) - && Objects.equals(this.id, metricBulkTagConfigCreate.id) - && Objects.equals(this.type, metricBulkTagConfigCreate.type); + return Objects.equals(this.attributes, metricBulkTagConfigCreate.attributes) && Objects.equals(this.id, metricBulkTagConfigCreate.id) && Objects.equals(this.type, metricBulkTagConfigCreate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateAttributes.java index b7220599a43..88901567e4a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateAttributes.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Optional parameters for bulk creating metric tag configurations. */ +/** + *

Optional parameters for bulk creating metric tag configurations.

+ */ @JsonPropertyOrder({ MetricBulkTagConfigCreateAttributes.JSON_PROPERTY_EMAILS, MetricBulkTagConfigCreateAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAILS = "emails"; private List emails = null; @@ -33,7 +51,6 @@ public MetricBulkTagConfigCreateAttributes emails(List emails) { this.emails = emails; return this; } - public MetricBulkTagConfigCreateAttributes addEmailsItem(String emailsItem) { if (this.emails == null) { this.emails = new ArrayList<>(); @@ -43,26 +60,23 @@ public MetricBulkTagConfigCreateAttributes addEmailsItem(String emailsItem) { } /** - * A list of account emails to notify when the configuration is applied. - * + *

A list of account emails to notify when the configuration is applied.

* @return emails - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEmails() { - return emails; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAILS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEmails() { + return emails; + } public void setEmails(List emails) { this.emails = emails; } - public MetricBulkTagConfigCreateAttributes tags(List tags) { this.tags = tags; return this; } - public MetricBulkTagConfigCreateAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -72,22 +86,23 @@ public MetricBulkTagConfigCreateAttributes addTagsItem(String tagsItem) { } /** - * A list of tag names to apply to the configuration. - * + *

A list of tag names to apply to the configuration.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this MetricBulkTagConfigCreateAttributes object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricBulkTagConfigCreateAttributes metricBulkTagConfigCreateAttributes = - (MetricBulkTagConfigCreateAttributes) o; - return Objects.equals(this.emails, metricBulkTagConfigCreateAttributes.emails) - && Objects.equals(this.tags, metricBulkTagConfigCreateAttributes.tags); + MetricBulkTagConfigCreateAttributes metricBulkTagConfigCreateAttributes = (MetricBulkTagConfigCreateAttributes) o; + return Objects.equals(this.emails, metricBulkTagConfigCreateAttributes.emails) && Objects.equals(this.tags, metricBulkTagConfigCreateAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(emails, tags); + return Objects.hash(emails,tags); } @Override @@ -118,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateRequest.java index fe67b669f68..9175c4fbc91 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Wrapper object for a single bulk tag configuration request. */ -@JsonPropertyOrder({MetricBulkTagConfigCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Wrapper object for a single bulk tag configuration request.

+ */ +@JsonPropertyOrder({ + MetricBulkTagConfigCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricBulkTagConfigCreate data; @@ -26,11 +47,10 @@ public MetricBulkTagConfigCreateRequest() {} @JsonCreator public MetricBulkTagConfigCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) MetricBulkTagConfigCreate data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)MetricBulkTagConfigCreate data) { + this.data = data; + this.unparsed |= data.unparsed; } - public MetricBulkTagConfigCreateRequest data(MetricBulkTagConfigCreate data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public MetricBulkTagConfigCreateRequest data(MetricBulkTagConfigCreate data) { } /** - * Request object to bulk configure tags for metrics matching the given prefix. - * + *

Request object to bulk configure tags for metrics matching the given prefix.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricBulkTagConfigCreate getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricBulkTagConfigCreate getData() { + return data; + } public void setData(MetricBulkTagConfigCreate data) { this.data = data; } - /** Return true if this MetricBulkTagConfigCreateRequest object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricBulkTagConfigCreateRequest metricBulkTagConfigCreateRequest = - (MetricBulkTagConfigCreateRequest) o; + MetricBulkTagConfigCreateRequest metricBulkTagConfigCreateRequest = (MetricBulkTagConfigCreateRequest) o; return Objects.equals(this.data, metricBulkTagConfigCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDelete.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDelete.java index 38748dca90e..a41d80d9255 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDelete.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDelete.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object to bulk delete all tag configurations for metrics matching the given prefix. */ + +/** + *

Request object to bulk delete all tag configurations for metrics matching the given prefix.

+ */ @JsonPropertyOrder({ MetricBulkTagConfigDelete.JSON_PROPERTY_ATTRIBUTES, MetricBulkTagConfigDelete.JSON_PROPERTY_ID, MetricBulkTagConfigDelete.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigDelete { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricBulkTagConfigDeleteAttributes attributes; @@ -36,13 +55,12 @@ public MetricBulkTagConfigDelete() {} @JsonCreator public MetricBulkTagConfigDelete( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MetricBulkConfigureTagsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MetricBulkConfigureTagsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public MetricBulkTagConfigDelete attributes(MetricBulkTagConfigDeleteAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -50,41 +68,37 @@ public MetricBulkTagConfigDelete attributes(MetricBulkTagConfigDeleteAttributes } /** - * Optional parameters for bulk deleting metric tag configurations. - * + *

Optional parameters for bulk deleting metric tag configurations.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricBulkTagConfigDeleteAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricBulkTagConfigDeleteAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricBulkTagConfigDeleteAttributes attributes) { this.attributes = attributes; } - public MetricBulkTagConfigDelete id(String id) { this.id = id; return this; } /** - * A text prefix to match against metric names. - * + *

A text prefix to match against metric names.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricBulkTagConfigDelete type(MetricBulkConfigureTagsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +106,25 @@ public MetricBulkTagConfigDelete type(MetricBulkConfigureTagsType type) { } /** - * The metric bulk configure tags resource. - * + *

The metric bulk configure tags resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricBulkConfigureTagsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricBulkConfigureTagsType getType() { + return type; + } public void setType(MetricBulkConfigureTagsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricBulkTagConfigDelete object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigDelete object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } MetricBulkTagConfigDelete metricBulkTagConfigDelete = (MetricBulkTagConfigDelete) o; - return Objects.equals(this.attributes, metricBulkTagConfigDelete.attributes) - && Objects.equals(this.id, metricBulkTagConfigDelete.id) - && Objects.equals(this.type, metricBulkTagConfigDelete.type); + return Objects.equals(this.attributes, metricBulkTagConfigDelete.attributes) && Objects.equals(this.id, metricBulkTagConfigDelete.id) && Objects.equals(this.type, metricBulkTagConfigDelete.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteAttributes.java index 711ea669a48..ea7f03eb0c2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteAttributes.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Optional parameters for bulk deleting metric tag configurations. */ -@JsonPropertyOrder({MetricBulkTagConfigDeleteAttributes.JSON_PROPERTY_EMAILS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Optional parameters for bulk deleting metric tag configurations.

+ */ +@JsonPropertyOrder({ + MetricBulkTagConfigDeleteAttributes.JSON_PROPERTY_EMAILS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigDeleteAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAILS = "emails"; private List emails = null; @@ -27,7 +47,6 @@ public MetricBulkTagConfigDeleteAttributes emails(List emails) { this.emails = emails; return this; } - public MetricBulkTagConfigDeleteAttributes addEmailsItem(String emailsItem) { if (this.emails == null) { this.emails = new ArrayList<>(); @@ -37,22 +56,23 @@ public MetricBulkTagConfigDeleteAttributes addEmailsItem(String emailsItem) { } /** - * A list of account emails to notify when the configuration is applied. - * + *

A list of account emails to notify when the configuration is applied.

* @return emails - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEmails() { - return emails; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAILS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEmails() { + return emails; + } public void setEmails(List emails) { this.emails = emails; } - /** Return true if this MetricBulkTagConfigDeleteAttributes object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigDeleteAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +81,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricBulkTagConfigDeleteAttributes metricBulkTagConfigDeleteAttributes = - (MetricBulkTagConfigDeleteAttributes) o; + MetricBulkTagConfigDeleteAttributes metricBulkTagConfigDeleteAttributes = (MetricBulkTagConfigDeleteAttributes) o; return Objects.equals(this.emails, metricBulkTagConfigDeleteAttributes.emails); } + @Override public int hashCode() { return Objects.hash(emails); @@ -81,7 +101,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteRequest.java index 759eefdb93b..a1824713889 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigDeleteRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Wrapper object for a single bulk tag deletion request. */ -@JsonPropertyOrder({MetricBulkTagConfigDeleteRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Wrapper object for a single bulk tag deletion request.

+ */ +@JsonPropertyOrder({ + MetricBulkTagConfigDeleteRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigDeleteRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricBulkTagConfigDelete data; @@ -26,11 +47,10 @@ public MetricBulkTagConfigDeleteRequest() {} @JsonCreator public MetricBulkTagConfigDeleteRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) MetricBulkTagConfigDelete data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)MetricBulkTagConfigDelete data) { + this.data = data; + this.unparsed |= data.unparsed; } - public MetricBulkTagConfigDeleteRequest data(MetricBulkTagConfigDelete data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public MetricBulkTagConfigDeleteRequest data(MetricBulkTagConfigDelete data) { } /** - * Request object to bulk delete all tag configurations for metrics matching the given prefix. - * + *

Request object to bulk delete all tag configurations for metrics matching the given prefix.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricBulkTagConfigDelete getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricBulkTagConfigDelete getData() { + return data; + } public void setData(MetricBulkTagConfigDelete data) { this.data = data; } - /** Return true if this MetricBulkTagConfigDeleteRequest object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigDeleteRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricBulkTagConfigDeleteRequest metricBulkTagConfigDeleteRequest = - (MetricBulkTagConfigDeleteRequest) o; + MetricBulkTagConfigDeleteRequest metricBulkTagConfigDeleteRequest = (MetricBulkTagConfigDeleteRequest) o; return Objects.equals(this.data, metricBulkTagConfigDeleteRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigResponse.java index ad8dc308b59..4dc34ba13f6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Wrapper for a single bulk tag configuration status response. */ -@JsonPropertyOrder({MetricBulkTagConfigResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Wrapper for a single bulk tag configuration status response.

+ */ +@JsonPropertyOrder({ + MetricBulkTagConfigResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricBulkTagConfigStatus data; @@ -28,23 +50,24 @@ public MetricBulkTagConfigResponse data(MetricBulkTagConfigStatus data) { } /** - * The status of a request to bulk configure metric tags. It contains the fields from the original - * request for reference. - * + *

The status of a request to bulk configure metric tags. + * It contains the fields from the original request for reference.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricBulkTagConfigStatus getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricBulkTagConfigStatus getData() { + return data; + } public void setData(MetricBulkTagConfigStatus data) { this.data = data; } - /** Return true if this MetricBulkTagConfigResponse object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -57,6 +80,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, metricBulkTagConfigResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +96,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatus.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatus.java index 373237f0cd3..e0c0b4f4bc8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatus.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The status of a request to bulk configure metric tags. It contains the fields from the original - * request for reference. + *

The status of a request to bulk configure metric tags. + * It contains the fields from the original request for reference.

*/ @JsonPropertyOrder({ MetricBulkTagConfigStatus.JSON_PROPERTY_ATTRIBUTES, MetricBulkTagConfigStatus.JSON_PROPERTY_ID, MetricBulkTagConfigStatus.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigStatus { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricBulkTagConfigStatusAttributes attributes; @@ -39,13 +56,12 @@ public MetricBulkTagConfigStatus() {} @JsonCreator public MetricBulkTagConfigStatus( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MetricBulkConfigureTagsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MetricBulkConfigureTagsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public MetricBulkTagConfigStatus attributes(MetricBulkTagConfigStatusAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -53,41 +69,37 @@ public MetricBulkTagConfigStatus attributes(MetricBulkTagConfigStatusAttributes } /** - * Optional attributes for the status of a bulk tag configuration request. - * + *

Optional attributes for the status of a bulk tag configuration request.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricBulkTagConfigStatusAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricBulkTagConfigStatusAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricBulkTagConfigStatusAttributes attributes) { this.attributes = attributes; } - public MetricBulkTagConfigStatus id(String id) { this.id = id; return this; } /** - * A text prefix to match against metric names. - * + *

A text prefix to match against metric names.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricBulkTagConfigStatus type(MetricBulkConfigureTagsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +107,25 @@ public MetricBulkTagConfigStatus type(MetricBulkConfigureTagsType type) { } /** - * The metric bulk configure tags resource. - * + *

The metric bulk configure tags resource.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricBulkConfigureTagsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricBulkConfigureTagsType getType() { + return type; + } public void setType(MetricBulkConfigureTagsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricBulkTagConfigStatus object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +135,13 @@ public boolean equals(Object o) { return false; } MetricBulkTagConfigStatus metricBulkTagConfigStatus = (MetricBulkTagConfigStatus) o; - return Objects.equals(this.attributes, metricBulkTagConfigStatus.attributes) - && Objects.equals(this.id, metricBulkTagConfigStatus.id) - && Objects.equals(this.type, metricBulkTagConfigStatus.type); + return Objects.equals(this.attributes, metricBulkTagConfigStatus.attributes) && Objects.equals(this.id, metricBulkTagConfigStatus.id) && Objects.equals(this.type, metricBulkTagConfigStatus.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +156,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatusAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatusAttributes.java index ba44e7ff2e4..21f0d228063 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatusAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricBulkTagConfigStatusAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Optional attributes for the status of a bulk tag configuration request. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Optional attributes for the status of a bulk tag configuration request.

+ */ @JsonPropertyOrder({ MetricBulkTagConfigStatusAttributes.JSON_PROPERTY_EMAILS, MetricBulkTagConfigStatusAttributes.JSON_PROPERTY_STATUS, MetricBulkTagConfigStatusAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricBulkTagConfigStatusAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAILS = "emails"; private List emails = null; @@ -37,7 +55,6 @@ public MetricBulkTagConfigStatusAttributes emails(List emails) { this.emails = emails; return this; } - public MetricBulkTagConfigStatusAttributes addEmailsItem(String emailsItem) { if (this.emails == null) { this.emails = new ArrayList<>(); @@ -47,47 +64,42 @@ public MetricBulkTagConfigStatusAttributes addEmailsItem(String emailsItem) { } /** - * A list of account emails to notify when the configuration is applied. - * + *

A list of account emails to notify when the configuration is applied.

* @return emails - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEmails() { - return emails; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAILS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getEmails() { + return emails; + } public void setEmails(List emails) { this.emails = emails; } - public MetricBulkTagConfigStatusAttributes status(String status) { this.status = status; return this; } /** - * The status of the request. - * + *

The status of the request.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - public MetricBulkTagConfigStatusAttributes tags(List tags) { this.tags = tags; return this; } - public MetricBulkTagConfigStatusAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -97,22 +109,23 @@ public MetricBulkTagConfigStatusAttributes addTagsItem(String tagsItem) { } /** - * A list of tag names to apply to the configuration. - * + *

A list of tag names to apply to the configuration.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this MetricBulkTagConfigStatusAttributes object is equal to o. */ + /** + * Return true if this MetricBulkTagConfigStatusAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -121,16 +134,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricBulkTagConfigStatusAttributes metricBulkTagConfigStatusAttributes = - (MetricBulkTagConfigStatusAttributes) o; - return Objects.equals(this.emails, metricBulkTagConfigStatusAttributes.emails) - && Objects.equals(this.status, metricBulkTagConfigStatusAttributes.status) - && Objects.equals(this.tags, metricBulkTagConfigStatusAttributes.tags); + MetricBulkTagConfigStatusAttributes metricBulkTagConfigStatusAttributes = (MetricBulkTagConfigStatusAttributes) o; + return Objects.equals(this.emails, metricBulkTagConfigStatusAttributes.emails) && Objects.equals(this.status, metricBulkTagConfigStatusAttributes.status) && Objects.equals(this.tags, metricBulkTagConfigStatusAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(emails, status, tags); + return Objects.hash(emails,status,tags); } @Override @@ -145,7 +156,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricContentEncoding.java b/src/main/java/com/datadog/api/client/v2/model/MetricContentEncoding.java index 17e5b8af0ac..13f58751fec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricContentEncoding.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricContentEncoding.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** HTTP header used to compress the media-type. */ +/** + *

HTTP header used to compress the media-type.

+ */ @JsonSerialize(using = MetricContentEncoding.MetricContentEncodingSerializer.class) public class MetricContentEncoding { @@ -27,8 +51,7 @@ public class MetricContentEncoding { public static final MetricContentEncoding ZSTD1 = new MetricContentEncoding("zstd1"); public static final MetricContentEncoding GZIP = new MetricContentEncoding("gzip"); - private static final Set allowedValues = - new HashSet(Arrays.asList("deflate", "zstd1", "gzip")); + private static final Set allowedValues = new HashSet(Arrays.asList("deflate", "zstd1", "gzip")); private String value; @@ -41,20 +64,18 @@ public boolean isValid() { } public static class MetricContentEncodingSerializer extends StdSerializer { - public MetricContentEncodingSerializer(Class t) { - super(t); - } - - public MetricContentEncodingSerializer() { - this(null); - } - - @Override - public void serialize( - MetricContentEncoding value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricContentEncodingSerializer(Class t) { + super(t); + } + + public MetricContentEncodingSerializer() { + this(null); + } + + @Override + public void serialize(MetricContentEncoding value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricContentEncoding object is equal to o. */ + /** + * Return true if this MetricContentEncoding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricCustomAggregation.java b/src/main/java/com/datadog/api/client/v2/model/MetricCustomAggregation.java index abcfe2caad5..6dbace3a2f1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricCustomAggregation.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricCustomAggregation.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A time and space aggregation combination for use in query. */ + +/** + *

A time and space aggregation combination for use in query.

+ */ @JsonPropertyOrder({ MetricCustomAggregation.JSON_PROPERTY_SPACE, MetricCustomAggregation.JSON_PROPERTY_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricCustomAggregation { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SPACE = "space"; private MetricCustomSpaceAggregation space; @@ -32,15 +51,13 @@ public MetricCustomAggregation() {} @JsonCreator public MetricCustomAggregation( - @JsonProperty(required = true, value = JSON_PROPERTY_SPACE) - MetricCustomSpaceAggregation space, - @JsonProperty(required = true, value = JSON_PROPERTY_TIME) MetricCustomTimeAggregation time) { - this.space = space; - this.unparsed |= !space.isValid(); - this.time = time; - this.unparsed |= !time.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_SPACE)MetricCustomSpaceAggregation space, + @JsonProperty(required=true, value=JSON_PROPERTY_TIME)MetricCustomTimeAggregation time) { + this.space = space; + this.unparsed |= !space.isValid(); + this.time = time; + this.unparsed |= !time.isValid(); } - public MetricCustomAggregation space(MetricCustomSpaceAggregation space) { this.space = space; this.unparsed |= !space.isValid(); @@ -48,23 +65,21 @@ public MetricCustomAggregation space(MetricCustomSpaceAggregation space) { } /** - * A space aggregation for use in query. - * + *

A space aggregation for use in query.

* @return space - */ - @JsonProperty(JSON_PROPERTY_SPACE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricCustomSpaceAggregation getSpace() { - return space; - } - + **/ + @JsonProperty(JSON_PROPERTY_SPACE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricCustomSpaceAggregation getSpace() { + return space; + } public void setSpace(MetricCustomSpaceAggregation space) { if (!space.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.space = space; } - public MetricCustomAggregation time(MetricCustomTimeAggregation time) { this.time = time; this.unparsed |= !time.isValid(); @@ -72,24 +87,25 @@ public MetricCustomAggregation time(MetricCustomTimeAggregation time) { } /** - * A time aggregation for use in query. - * + *

A time aggregation for use in query.

* @return time - */ - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricCustomTimeAggregation getTime() { - return time; - } - + **/ + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricCustomTimeAggregation getTime() { + return time; + } public void setTime(MetricCustomTimeAggregation time) { if (!time.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.time = time; } - /** Return true if this MetricCustomAggregation object is equal to o. */ + /** + * Return true if this MetricCustomAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,13 +115,13 @@ public boolean equals(Object o) { return false; } MetricCustomAggregation metricCustomAggregation = (MetricCustomAggregation) o; - return Objects.equals(this.space, metricCustomAggregation.space) - && Objects.equals(this.time, metricCustomAggregation.time); + return Objects.equals(this.space, metricCustomAggregation.space) && Objects.equals(this.time, metricCustomAggregation.time); } + @Override public int hashCode() { - return Objects.hash(space, time); + return Objects.hash(space,time); } @Override @@ -119,7 +135,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricCustomSpaceAggregation.java b/src/main/java/com/datadog/api/client/v2/model/MetricCustomSpaceAggregation.java index 83d377d2115..5f4d5664e56 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricCustomSpaceAggregation.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricCustomSpaceAggregation.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** A space aggregation for use in query. */ +/** + *

A space aggregation for use in query.

+ */ @JsonSerialize(using = MetricCustomSpaceAggregation.MetricCustomSpaceAggregationSerializer.class) public class MetricCustomSpaceAggregation { @@ -28,8 +52,7 @@ public class MetricCustomSpaceAggregation { public static final MetricCustomSpaceAggregation MIN = new MetricCustomSpaceAggregation("min"); public static final MetricCustomSpaceAggregation SUM = new MetricCustomSpaceAggregation("sum"); - private static final Set allowedValues = - new HashSet(Arrays.asList("avg", "max", "min", "sum")); + private static final Set allowedValues = new HashSet(Arrays.asList("avg", "max", "min", "sum")); private String value; @@ -41,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class MetricCustomSpaceAggregationSerializer - extends StdSerializer { - public MetricCustomSpaceAggregationSerializer(Class t) { - super(t); - } + public static class MetricCustomSpaceAggregationSerializer extends StdSerializer { + public MetricCustomSpaceAggregationSerializer(Class t) { + super(t); + } - public MetricCustomSpaceAggregationSerializer() { - this(null); - } + public MetricCustomSpaceAggregationSerializer() { + this(null); + } - @Override - public void serialize( - MetricCustomSpaceAggregation value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricCustomSpaceAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricCustomSpaceAggregation object is equal to o. */ + /** + * Return true if this MetricCustomSpaceAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricCustomTimeAggregation.java b/src/main/java/com/datadog/api/client/v2/model/MetricCustomTimeAggregation.java index ae0a141f291..be38c20663c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricCustomTimeAggregation.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricCustomTimeAggregation.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** A time aggregation for use in query. */ +/** + *

A time aggregation for use in query.

+ */ @JsonSerialize(using = MetricCustomTimeAggregation.MetricCustomTimeAggregationSerializer.class) public class MetricCustomTimeAggregation { @@ -29,8 +53,7 @@ public class MetricCustomTimeAggregation { public static final MetricCustomTimeAggregation MIN = new MetricCustomTimeAggregation("min"); public static final MetricCustomTimeAggregation SUM = new MetricCustomTimeAggregation("sum"); - private static final Set allowedValues = - new HashSet(Arrays.asList("avg", "count", "max", "min", "sum")); + private static final Set allowedValues = new HashSet(Arrays.asList("avg", "count", "max", "min", "sum")); private String value; @@ -42,22 +65,19 @@ public boolean isValid() { this.value = value; } - public static class MetricCustomTimeAggregationSerializer - extends StdSerializer { - public MetricCustomTimeAggregationSerializer(Class t) { - super(t); - } + public static class MetricCustomTimeAggregationSerializer extends StdSerializer { + public MetricCustomTimeAggregationSerializer(Class t) { + super(t); + } - public MetricCustomTimeAggregationSerializer() { - this(null); - } + public MetricCustomTimeAggregationSerializer() { + this(null); + } - @Override - public void serialize( - MetricCustomTimeAggregation value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricCustomTimeAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricCustomTimeAggregation object is equal to o. */ + /** + * Return true if this MetricCustomTimeAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolume.java b/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolume.java index cb56df3fe0a..f2093197e6c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolume.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolume.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric's distinct volume. */ + +/** + *

Object for a single metric's distinct volume.

+ */ @JsonPropertyOrder({ MetricDistinctVolume.JSON_PROPERTY_ATTRIBUTES, MetricDistinctVolume.JSON_PROPERTY_ID, MetricDistinctVolume.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricDistinctVolume { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricDistinctVolumeAttributes attributes; @@ -38,42 +58,38 @@ public MetricDistinctVolume attributes(MetricDistinctVolumeAttributes attributes } /** - * Object containing the definition of a metric's distinct volume. - * + *

Object containing the definition of a metric's distinct volume.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricDistinctVolumeAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricDistinctVolumeAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricDistinctVolumeAttributes attributes) { this.attributes = attributes; } - public MetricDistinctVolume id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricDistinctVolume type(MetricDistinctVolumeType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public MetricDistinctVolume type(MetricDistinctVolumeType type) { } /** - * The metric distinct volume type. - * + *

The metric distinct volume type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricDistinctVolumeType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricDistinctVolumeType getType() { + return type; + } public void setType(MetricDistinctVolumeType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricDistinctVolume object is equal to o. */ + /** + * Return true if this MetricDistinctVolume object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } MetricDistinctVolume metricDistinctVolume = (MetricDistinctVolume) o; - return Objects.equals(this.attributes, metricDistinctVolume.attributes) - && Objects.equals(this.id, metricDistinctVolume.id) - && Objects.equals(this.type, metricDistinctVolume.type); + return Objects.equals(this.attributes, metricDistinctVolume.attributes) && Objects.equals(this.id, metricDistinctVolume.id) && Objects.equals(this.type, metricDistinctVolume.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeAttributes.java index 68236dd8ea3..d3fca505e6e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeAttributes.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing the definition of a metric's distinct volume. */ -@JsonPropertyOrder({MetricDistinctVolumeAttributes.JSON_PROPERTY_DISTINCT_VOLUME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing the definition of a metric's distinct volume.

+ */ +@JsonPropertyOrder({ + MetricDistinctVolumeAttributes.JSON_PROPERTY_DISTINCT_VOLUME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricDistinctVolumeAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DISTINCT_VOLUME = "distinct_volume"; private Long distinctVolume; @@ -27,22 +49,23 @@ public MetricDistinctVolumeAttributes distinctVolume(Long distinctVolume) { } /** - * Distinct volume for the given metric. - * + *

Distinct volume for the given metric.

* @return distinctVolume - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISTINCT_VOLUME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDistinctVolume() { - return distinctVolume; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISTINCT_VOLUME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDistinctVolume() { + return distinctVolume; + } public void setDistinctVolume(Long distinctVolume) { this.distinctVolume = distinctVolume; } - /** Return true if this MetricDistinctVolumeAttributes object is equal to o. */ + /** + * Return true if this MetricDistinctVolumeAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricDistinctVolumeAttributes metricDistinctVolumeAttributes = - (MetricDistinctVolumeAttributes) o; + MetricDistinctVolumeAttributes metricDistinctVolumeAttributes = (MetricDistinctVolumeAttributes) o; return Objects.equals(this.distinctVolume, metricDistinctVolumeAttributes.distinctVolume); } + @Override public int hashCode() { return Objects.hash(distinctVolume); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeType.java b/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeType.java index 5692224b176..2054ef102d7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricDistinctVolumeType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric distinct volume type. */ +/** + *

The metric distinct volume type.

+ */ @JsonSerialize(using = MetricDistinctVolumeType.MetricDistinctVolumeTypeSerializer.class) public class MetricDistinctVolumeType { - public static final MetricDistinctVolumeType DISTINCT_METRIC_VOLUMES = - new MetricDistinctVolumeType("distinct_metric_volumes"); + public static final MetricDistinctVolumeType DISTINCT_METRIC_VOLUMES = new MetricDistinctVolumeType("distinct_metric_volumes"); - private static final Set allowedValues = - new HashSet(Arrays.asList("distinct_metric_volumes")); + private static final Set allowedValues = new HashSet(Arrays.asList("distinct_metric_volumes")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MetricDistinctVolumeTypeSerializer - extends StdSerializer { - public MetricDistinctVolumeTypeSerializer(Class t) { - super(t); - } + public static class MetricDistinctVolumeTypeSerializer extends StdSerializer { + public MetricDistinctVolumeTypeSerializer(Class t) { + super(t); + } - public MetricDistinctVolumeTypeSerializer() { - this(null); - } + public MetricDistinctVolumeTypeSerializer() { + this(null); + } - @Override - public void serialize( - MetricDistinctVolumeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricDistinctVolumeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricDistinctVolumeType object is equal to o. */ + /** + * Return true if this MetricDistinctVolumeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricEstimate.java b/src/main/java/com/datadog/api/client/v2/model/MetricEstimate.java index 01256279ba2..258ceba3066 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricEstimate.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricEstimate.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a metric cardinality estimate. */ + +/** + *

Object for a metric cardinality estimate.

+ */ @JsonPropertyOrder({ MetricEstimate.JSON_PROPERTY_ATTRIBUTES, MetricEstimate.JSON_PROPERTY_ID, MetricEstimate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricEstimate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricEstimateAttributes attributes; @@ -38,42 +58,38 @@ public MetricEstimate attributes(MetricEstimateAttributes attributes) { } /** - * Object containing the definition of a metric estimate attribute. - * + *

Object containing the definition of a metric estimate attribute.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricEstimateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricEstimateAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricEstimateAttributes attributes) { this.attributes = attributes; } - public MetricEstimate id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricEstimate type(MetricEstimateResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public MetricEstimate type(MetricEstimateResourceType type) { } /** - * The metric estimate resource type. - * + *

The metric estimate resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricEstimateResourceType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricEstimateResourceType getType() { + return type; + } public void setType(MetricEstimateResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricEstimate object is equal to o. */ + /** + * Return true if this MetricEstimate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } MetricEstimate metricEstimate = (MetricEstimate) o; - return Objects.equals(this.attributes, metricEstimate.attributes) - && Objects.equals(this.id, metricEstimate.id) - && Objects.equals(this.type, metricEstimate.type); + return Objects.equals(this.attributes, metricEstimate.attributes) && Objects.equals(this.id, metricEstimate.id) && Objects.equals(this.type, metricEstimate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateAttributes.java index 9b43a6e77a2..61acc1006a1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateAttributes.java @@ -6,30 +6,46 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing the definition of a metric estimate attribute. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing the definition of a metric estimate attribute.

+ */ @JsonPropertyOrder({ MetricEstimateAttributes.JSON_PROPERTY_ESTIMATE_TYPE, MetricEstimateAttributes.JSON_PROPERTY_ESTIMATED_AT, MetricEstimateAttributes.JSON_PROPERTY_ESTIMATED_OUTPUT_SERIES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricEstimateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ESTIMATE_TYPE = "estimate_type"; private MetricEstimateType estimateType = MetricEstimateType.COUNT_OR_GAUGE; public static final String JSON_PROPERTY_ESTIMATED_AT = "estimated_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime estimatedAt; @@ -43,70 +59,64 @@ public MetricEstimateAttributes estimateType(MetricEstimateType estimateType) { } /** - * Estimate type based on the queried configuration. By default, count_or_gauge is - * returned. distribution is returned for distribution metrics without percentiles - * enabled. Lastly, percentile is returned if filter[pct]=true is - * queried with a distribution metric. - * + *

Estimate type based on the queried configuration. By default, count_or_gauge is returned. distribution is returned for distribution metrics without percentiles enabled. Lastly, percentile is returned if filter[pct]=true is queried with a distribution metric.

* @return estimateType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricEstimateType getEstimateType() { - return estimateType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricEstimateType getEstimateType() { + return estimateType; + } public void setEstimateType(MetricEstimateType estimateType) { if (!estimateType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.estimateType = estimateType; } - public MetricEstimateAttributes estimatedAt(OffsetDateTime estimatedAt) { this.estimatedAt = estimatedAt; return this; } /** - * Timestamp when the cardinality estimate was requested. - * + *

Timestamp when the cardinality estimate was requested.

* @return estimatedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getEstimatedAt() { - return estimatedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getEstimatedAt() { + return estimatedAt; + } public void setEstimatedAt(OffsetDateTime estimatedAt) { this.estimatedAt = estimatedAt; } - public MetricEstimateAttributes estimatedOutputSeries(Long estimatedOutputSeries) { this.estimatedOutputSeries = estimatedOutputSeries; return this; } /** - * Estimated cardinality of the metric based on the queried configuration. - * + *

Estimated cardinality of the metric based on the queried configuration.

* @return estimatedOutputSeries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ESTIMATED_OUTPUT_SERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEstimatedOutputSeries() { - return estimatedOutputSeries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_OUTPUT_SERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getEstimatedOutputSeries() { + return estimatedOutputSeries; + } public void setEstimatedOutputSeries(Long estimatedOutputSeries) { this.estimatedOutputSeries = estimatedOutputSeries; } - /** Return true if this MetricEstimateAttributes object is equal to o. */ + /** + * Return true if this MetricEstimateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -116,15 +126,13 @@ public boolean equals(Object o) { return false; } MetricEstimateAttributes metricEstimateAttributes = (MetricEstimateAttributes) o; - return Objects.equals(this.estimateType, metricEstimateAttributes.estimateType) - && Objects.equals(this.estimatedAt, metricEstimateAttributes.estimatedAt) - && Objects.equals( - this.estimatedOutputSeries, metricEstimateAttributes.estimatedOutputSeries); + return Objects.equals(this.estimateType, metricEstimateAttributes.estimateType) && Objects.equals(this.estimatedAt, metricEstimateAttributes.estimatedAt) && Objects.equals(this.estimatedOutputSeries, metricEstimateAttributes.estimatedOutputSeries); } + @Override public int hashCode() { - return Objects.hash(estimateType, estimatedAt, estimatedOutputSeries); + return Objects.hash(estimateType,estimatedAt,estimatedOutputSeries); } @Override @@ -133,15 +141,14 @@ public String toString() { sb.append("class MetricEstimateAttributes {\n"); sb.append(" estimateType: ").append(toIndentedString(estimateType)).append("\n"); sb.append(" estimatedAt: ").append(toIndentedString(estimatedAt)).append("\n"); - sb.append(" estimatedOutputSeries: ") - .append(toIndentedString(estimatedOutputSeries)) - .append("\n"); + sb.append(" estimatedOutputSeries: ").append(toIndentedString(estimatedOutputSeries)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResourceType.java b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResourceType.java index 6b5ecb8ecbd..d9814692512 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResourceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResourceType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric estimate resource type. */ +/** + *

The metric estimate resource type.

+ */ @JsonSerialize(using = MetricEstimateResourceType.MetricEstimateResourceTypeSerializer.class) public class MetricEstimateResourceType { - public static final MetricEstimateResourceType METRIC_CARDINALITY_ESTIMATE = - new MetricEstimateResourceType("metric_cardinality_estimate"); + public static final MetricEstimateResourceType METRIC_CARDINALITY_ESTIMATE = new MetricEstimateResourceType("metric_cardinality_estimate"); - private static final Set allowedValues = - new HashSet(Arrays.asList("metric_cardinality_estimate")); + private static final Set allowedValues = new HashSet(Arrays.asList("metric_cardinality_estimate")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MetricEstimateResourceTypeSerializer - extends StdSerializer { - public MetricEstimateResourceTypeSerializer(Class t) { - super(t); - } + public static class MetricEstimateResourceTypeSerializer extends StdSerializer { + public MetricEstimateResourceTypeSerializer(Class t) { + super(t); + } - public MetricEstimateResourceTypeSerializer() { - this(null); - } + public MetricEstimateResourceTypeSerializer() { + this(null); + } - @Override - public void serialize( - MetricEstimateResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricEstimateResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricEstimateResourceType object is equal to o. */ + /** + * Return true if this MetricEstimateResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResponse.java index 68cc711e43c..2184295c558 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object that includes metric cardinality estimates. */ -@JsonPropertyOrder({MetricEstimateResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object that includes metric cardinality estimates.

+ */ +@JsonPropertyOrder({ + MetricEstimateResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricEstimateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricEstimate data; @@ -28,22 +50,23 @@ public MetricEstimateResponse data(MetricEstimate data) { } /** - * Object for a metric cardinality estimate. - * + *

Object for a metric cardinality estimate.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricEstimate getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricEstimate getData() { + return data; + } public void setData(MetricEstimate data) { this.data = data; } - /** Return true if this MetricEstimateResponse object is equal to o. */ + /** + * Return true if this MetricEstimateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, metricEstimateResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateType.java b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateType.java index 429e282df77..b64e8910b57 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricEstimateType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricEstimateType.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Estimate type based on the queried configuration. By default, count_or_gauge is - * returned. distribution is returned for distribution metrics without percentiles - * enabled. Lastly, percentile is returned if filter[pct]=true is queried - * with a distribution metric. + *

Estimate type based on the queried configuration. By default, count_or_gauge is returned. distribution is returned for distribution metrics without percentiles enabled. Lastly, percentile is returned if filter[pct]=true is queried with a distribution metric.

*/ @JsonSerialize(using = MetricEstimateType.MetricEstimateTypeSerializer.class) public class MetricEstimateType { @@ -32,8 +51,7 @@ public class MetricEstimateType { public static final MetricEstimateType DISTRIBUTION = new MetricEstimateType("distribution"); public static final MetricEstimateType PERCENTILE = new MetricEstimateType("percentile"); - private static final Set allowedValues = - new HashSet(Arrays.asList("count_or_gauge", "distribution", "percentile")); + private static final Set allowedValues = new HashSet(Arrays.asList("count_or_gauge", "distribution", "percentile")); private String value; @@ -46,19 +64,18 @@ public boolean isValid() { } public static class MetricEstimateTypeSerializer extends StdSerializer { - public MetricEstimateTypeSerializer(Class t) { - super(t); - } - - public MetricEstimateTypeSerializer() { - this(null); - } - - @Override - public void serialize(MetricEstimateType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricEstimateTypeSerializer(Class t) { + super(t); + } + + public MetricEstimateTypeSerializer() { + this(null); + } + + @Override + public void serialize(MetricEstimateType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricEstimateType object is equal to o. */ + /** + * Return true if this MetricEstimateType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolume.java b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolume.java index 49aa50fc992..4da7cc80663 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolume.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolume.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric's ingested and indexed volume. */ + +/** + *

Object for a single metric's ingested and indexed volume.

+ */ @JsonPropertyOrder({ MetricIngestedIndexedVolume.JSON_PROPERTY_ATTRIBUTES, MetricIngestedIndexedVolume.JSON_PROPERTY_ID, MetricIngestedIndexedVolume.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricIngestedIndexedVolume { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricIngestedIndexedVolumeAttributes attributes; @@ -38,42 +58,38 @@ public MetricIngestedIndexedVolume attributes(MetricIngestedIndexedVolumeAttribu } /** - * Object containing the definition of a metric's ingested and indexed volume. - * + *

Object containing the definition of a metric's ingested and indexed volume.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricIngestedIndexedVolumeAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricIngestedIndexedVolumeAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricIngestedIndexedVolumeAttributes attributes) { this.attributes = attributes; } - public MetricIngestedIndexedVolume id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricIngestedIndexedVolume type(MetricIngestedIndexedVolumeType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public MetricIngestedIndexedVolume type(MetricIngestedIndexedVolumeType type) { } /** - * The metric ingested and indexed volume type. - * + *

The metric ingested and indexed volume type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricIngestedIndexedVolumeType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricIngestedIndexedVolumeType getType() { + return type; + } public void setType(MetricIngestedIndexedVolumeType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricIngestedIndexedVolume object is equal to o. */ + /** + * Return true if this MetricIngestedIndexedVolume object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } MetricIngestedIndexedVolume metricIngestedIndexedVolume = (MetricIngestedIndexedVolume) o; - return Objects.equals(this.attributes, metricIngestedIndexedVolume.attributes) - && Objects.equals(this.id, metricIngestedIndexedVolume.id) - && Objects.equals(this.type, metricIngestedIndexedVolume.type); + return Objects.equals(this.attributes, metricIngestedIndexedVolume.attributes) && Objects.equals(this.id, metricIngestedIndexedVolume.id) && Objects.equals(this.type, metricIngestedIndexedVolume.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java index a58a9c475c9..4ce03e66d56 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object containing the definition of a metric's ingested and indexed volume. */ + +/** + *

Object containing the definition of a metric's ingested and indexed volume.

+ */ @JsonPropertyOrder({ MetricIngestedIndexedVolumeAttributes.JSON_PROPERTY_INDEXED_VOLUME, MetricIngestedIndexedVolumeAttributes.JSON_PROPERTY_INGESTED_VOLUME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricIngestedIndexedVolumeAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INDEXED_VOLUME = "indexed_volume"; private Long indexedVolume; @@ -33,43 +53,42 @@ public MetricIngestedIndexedVolumeAttributes indexedVolume(Long indexedVolume) { } /** - * Indexed volume for the given metric. - * + *

Indexed volume for the given metric.

* @return indexedVolume - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_VOLUME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedVolume() { - return indexedVolume; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_VOLUME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedVolume() { + return indexedVolume; + } public void setIndexedVolume(Long indexedVolume) { this.indexedVolume = indexedVolume; } - public MetricIngestedIndexedVolumeAttributes ingestedVolume(Long ingestedVolume) { this.ingestedVolume = ingestedVolume; return this; } /** - * Ingested volume for the given metric. - * + *

Ingested volume for the given metric.

* @return ingestedVolume - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_VOLUME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedVolume() { - return ingestedVolume; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_VOLUME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestedVolume() { + return ingestedVolume; + } public void setIngestedVolume(Long ingestedVolume) { this.ingestedVolume = ingestedVolume; } - /** Return true if this MetricIngestedIndexedVolumeAttributes object is equal to o. */ + /** + * Return true if this MetricIngestedIndexedVolumeAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,16 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricIngestedIndexedVolumeAttributes metricIngestedIndexedVolumeAttributes = - (MetricIngestedIndexedVolumeAttributes) o; - return Objects.equals(this.indexedVolume, metricIngestedIndexedVolumeAttributes.indexedVolume) - && Objects.equals( - this.ingestedVolume, metricIngestedIndexedVolumeAttributes.ingestedVolume); + MetricIngestedIndexedVolumeAttributes metricIngestedIndexedVolumeAttributes = (MetricIngestedIndexedVolumeAttributes) o; + return Objects.equals(this.indexedVolume, metricIngestedIndexedVolumeAttributes.indexedVolume) && Objects.equals(this.ingestedVolume, metricIngestedIndexedVolumeAttributes.ingestedVolume); } + @Override public int hashCode() { - return Objects.hash(indexedVolume, ingestedVolume); + return Objects.hash(indexedVolume,ingestedVolume); } @Override @@ -101,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeType.java b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeType.java index a90022a4ed4..3eb2cb550fc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric ingested and indexed volume type. */ -@JsonSerialize( - using = MetricIngestedIndexedVolumeType.MetricIngestedIndexedVolumeTypeSerializer.class) +/** + *

The metric ingested and indexed volume type.

+ */ +@JsonSerialize(using = MetricIngestedIndexedVolumeType.MetricIngestedIndexedVolumeTypeSerializer.class) public class MetricIngestedIndexedVolumeType { - public static final MetricIngestedIndexedVolumeType METRIC_VOLUMES = - new MetricIngestedIndexedVolumeType("metric_volumes"); + public static final MetricIngestedIndexedVolumeType METRIC_VOLUMES = new MetricIngestedIndexedVolumeType("metric_volumes"); - private static final Set allowedValues = - new HashSet(Arrays.asList("metric_volumes")); + private static final Set allowedValues = new HashSet(Arrays.asList("metric_volumes")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MetricIngestedIndexedVolumeTypeSerializer - extends StdSerializer { - public MetricIngestedIndexedVolumeTypeSerializer(Class t) { - super(t); - } + public static class MetricIngestedIndexedVolumeTypeSerializer extends StdSerializer { + public MetricIngestedIndexedVolumeTypeSerializer(Class t) { + super(t); + } - public MetricIngestedIndexedVolumeTypeSerializer() { - this(null); - } + public MetricIngestedIndexedVolumeTypeSerializer() { + this(null); + } - @Override - public void serialize( - MetricIngestedIndexedVolumeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricIngestedIndexedVolumeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricIngestedIndexedVolumeType object is equal to o. */ + /** + * Return true if this MetricIngestedIndexedVolumeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricIntakeType.java b/src/main/java/com/datadog/api/client/v2/model/MetricIntakeType.java index 9388473ef36..2f0f4cfdab3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricIntakeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricIntakeType.java @@ -6,22 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The type of metric. The available types are 0 (unspecified), 1 (count), - * 2 (rate), and 3 (gauge). + *

The type of metric. The available types are 0 (unspecified), 1 (count), 2 (rate), and 3 (gauge).

*/ @JsonSerialize(using = MetricIntakeType.MetricIntakeTypeSerializer.class) public class MetricIntakeType { @@ -44,19 +65,18 @@ public boolean isValid() { } public static class MetricIntakeTypeSerializer extends StdSerializer { - public MetricIntakeTypeSerializer(Class t) { - super(t); - } - - public MetricIntakeTypeSerializer() { - this(null); - } - - @Override - public void serialize(MetricIntakeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricIntakeTypeSerializer(Class t) { + super(t); + } + + public MetricIntakeTypeSerializer() { + this(null); + } + + @Override + public void serialize(MetricIntakeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +88,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this MetricIntakeType object is equal to o. */ + /** + * Return true if this MetricIntakeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricMetadata.java b/src/main/java/com/datadog/api/client/v2/model/MetricMetadata.java index e90829e14ae..439c445f1af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricMetadata.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Metadata for the metric. */ -@JsonPropertyOrder({MetricMetadata.JSON_PROPERTY_ORIGIN}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Metadata for the metric.

+ */ +@JsonPropertyOrder({ + MetricMetadata.JSON_PROPERTY_ORIGIN +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ORIGIN = "origin"; private MetricOrigin origin; @@ -28,22 +50,23 @@ public MetricMetadata origin(MetricOrigin origin) { } /** - * Metric origin information. - * + *

Metric origin information.

* @return origin - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORIGIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricOrigin getOrigin() { - return origin; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricOrigin getOrigin() { + return origin; + } public void setOrigin(MetricOrigin origin) { this.origin = origin; } - /** Return true if this MetricMetadata object is equal to o. */ + /** + * Return true if this MetricMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.origin, metricMetadata.origin); } + @Override public int hashCode() { return Objects.hash(origin); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricOrigin.java b/src/main/java/com/datadog/api/client/v2/model/MetricOrigin.java index 7dd19e2f7c7..4b901c3981c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricOrigin.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricOrigin.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Metric origin information. */ + +/** + *

Metric origin information.

+ */ @JsonPropertyOrder({ MetricOrigin.JSON_PROPERTY_METRIC_TYPE, MetricOrigin.JSON_PROPERTY_PRODUCT, MetricOrigin.JSON_PROPERTY_SERVICE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricOrigin { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_METRIC_TYPE = "metric_type"; private Integer metricType = 0; @@ -37,64 +57,64 @@ public MetricOrigin metricType(Integer metricType) { } /** - * The origin metric type code maximum: 1000 - * + *

The origin metric type code

+ * maximum: 1000 * @return metricType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getMetricType() { - return metricType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMetricType() { + return metricType; + } public void setMetricType(Integer metricType) { this.metricType = metricType; } - public MetricOrigin product(Integer product) { this.product = product; return this; } /** - * The origin product code maximum: 1000 - * + *

The origin product code

+ * maximum: 1000 * @return product - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRODUCT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getProduct() { - return product; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getProduct() { + return product; + } public void setProduct(Integer product) { this.product = product; } - public MetricOrigin service(Integer service) { this.service = service; return this; } /** - * The origin service code maximum: 1000 - * + *

The origin service code

+ * maximum: 1000 * @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getService() { + return service; + } public void setService(Integer service) { this.service = service; } - /** Return true if this MetricOrigin object is equal to o. */ + /** + * Return true if this MetricOrigin object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +124,13 @@ public boolean equals(Object o) { return false; } MetricOrigin metricOrigin = (MetricOrigin) o; - return Objects.equals(this.metricType, metricOrigin.metricType) - && Objects.equals(this.product, metricOrigin.product) - && Objects.equals(this.service, metricOrigin.service); + return Objects.equals(this.metricType, metricOrigin.metricType) && Objects.equals(this.product, metricOrigin.product) && Objects.equals(this.service, metricOrigin.service); } + @Override public int hashCode() { - return Objects.hash(metricType, product, service); + return Objects.hash(metricType,product,service); } @Override @@ -126,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricPayload.java b/src/main/java/com/datadog/api/client/v2/model/MetricPayload.java index 01c477e0949..2f6a4e40236 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricPayload.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricPayload.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The metrics' payload. */ -@JsonPropertyOrder({MetricPayload.JSON_PROPERTY_SERIES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The metrics' payload.

+ */ +@JsonPropertyOrder({ + MetricPayload.JSON_PROPERTY_SERIES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricPayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERIES = "series"; private List series = new ArrayList<>(); @@ -28,10 +47,9 @@ public MetricPayload() {} @JsonCreator public MetricPayload( - @JsonProperty(required = true, value = JSON_PROPERTY_SERIES) List series) { - this.series = series; + @JsonProperty(required=true, value=JSON_PROPERTY_SERIES)List series) { + this.series = series; } - public MetricPayload series(List series) { this.series = series; for (MetricSeries item : series) { @@ -39,7 +57,6 @@ public MetricPayload series(List series) { } return this; } - public MetricPayload addSeriesItem(MetricSeries seriesItem) { this.series.add(seriesItem); this.unparsed |= seriesItem.unparsed; @@ -47,21 +64,22 @@ public MetricPayload addSeriesItem(MetricSeries seriesItem) { } /** - * A list of time series to submit to Datadog. - * + *

A list of time series to submit to Datadog.

* @return series - */ - @JsonProperty(JSON_PROPERTY_SERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSeries() { - return series; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getSeries() { + return series; + } public void setSeries(List series) { this.series = series; } - /** Return true if this MetricPayload object is equal to o. */ + /** + * Return true if this MetricPayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -74,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.series, metricPayload.series); } + @Override public int hashCode() { return Objects.hash(series); @@ -89,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricPoint.java b/src/main/java/com/datadog/api/client/v2/model/MetricPoint.java index 4d850c3fc7b..328da446447 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricPoint.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricPoint.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A point object is of the form {POSIX_timestamp, numeric_value}. */ -@JsonPropertyOrder({MetricPoint.JSON_PROPERTY_TIMESTAMP, MetricPoint.JSON_PROPERTY_VALUE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A point object is of the form {POSIX_timestamp, numeric_value}.

+ */ +@JsonPropertyOrder({ + MetricPoint.JSON_PROPERTY_TIMESTAMP, + MetricPoint.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricPoint { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; private Long timestamp; @@ -30,44 +53,43 @@ public MetricPoint timestamp(Long timestamp) { } /** - * The timestamp should be in seconds and current. Current is defined as not more than 10 minutes - * in the future or more than 1 hour in the past. - * + *

The timestamp should be in seconds and current. + * Current is defined as not more than 10 minutes in the future or more than 1 hour in the past.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimestamp() { + return timestamp; + } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } - public MetricPoint value(Double value) { this.value = value; return this; } /** - * The numeric value format should be a 64bit float gauge-type value. - * + *

The numeric value format should be a 64bit float gauge-type value.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this MetricPoint object is equal to o. */ + /** + * Return true if this MetricPoint object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,13 +99,13 @@ public boolean equals(Object o) { return false; } MetricPoint metricPoint = (MetricPoint) o; - return Objects.equals(this.timestamp, metricPoint.timestamp) - && Objects.equals(this.value, metricPoint.value); + return Objects.equals(this.timestamp, metricPoint.timestamp) && Objects.equals(this.value, metricPoint.value); } + @Override public int hashCode() { - return Objects.hash(timestamp, value); + return Objects.hash(timestamp,value); } @Override @@ -97,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricResource.java b/src/main/java/com/datadog/api/client/v2/model/MetricResource.java index ff5a739a2dc..f93793f55f6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricResource.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricResource.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Metric resource. */ -@JsonPropertyOrder({MetricResource.JSON_PROPERTY_NAME, MetricResource.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Metric resource.

+ */ +@JsonPropertyOrder({ + MetricResource.JSON_PROPERTY_NAME, + MetricResource.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricResource { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -30,43 +53,42 @@ public MetricResource name(String name) { } /** - * The name of the resource. - * + *

The name of the resource.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public MetricResource type(String type) { this.type = type; return this; } /** - * The type of the resource. - * + *

The type of the resource.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this MetricResource object is equal to o. */ + /** + * Return true if this MetricResource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,13 +98,13 @@ public boolean equals(Object o) { return false; } MetricResource metricResource = (MetricResource) o; - return Objects.equals(this.name, metricResource.name) - && Objects.equals(this.type, metricResource.type); + return Objects.equals(this.name, metricResource.name) && Objects.equals(this.type, metricResource.type); } + @Override public int hashCode() { - return Objects.hash(name, type); + return Objects.hash(name,type); } @Override @@ -96,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricSeries.java b/src/main/java/com/datadog/api/client/v2/model/MetricSeries.java index b1a77a0b3b4..e50b2fbbb8f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricSeries.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricSeries.java @@ -6,19 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * A metric to submit to Datadog. See Datadog - * metrics. + *

A metric to submit to Datadog. + * See Datadog metrics.

*/ @JsonPropertyOrder({ MetricSeries.JSON_PROPERTY_INTERVAL, @@ -31,10 +45,10 @@ MetricSeries.JSON_PROPERTY_TYPE, MetricSeries.JSON_PROPERTY_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricSeries { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INTERVAL = "interval"; private Long interval; @@ -66,33 +80,30 @@ public MetricSeries() {} @JsonCreator public MetricSeries( - @JsonProperty(required = true, value = JSON_PROPERTY_METRIC) String metric, - @JsonProperty(required = true, value = JSON_PROPERTY_POINTS) List points) { - this.metric = metric; - this.points = points; + @JsonProperty(required=true, value=JSON_PROPERTY_METRIC)String metric, + @JsonProperty(required=true, value=JSON_PROPERTY_POINTS)List points) { + this.metric = metric; + this.points = points; } - public MetricSeries interval(Long interval) { this.interval = interval; return this; } /** - * If the type of the metric is rate or count, define the corresponding interval. - * + *

If the type of the metric is rate or count, define the corresponding interval.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - public MetricSeries metadata(MetricMetadata metadata) { this.metadata = metadata; this.unparsed |= metadata.unparsed; @@ -100,41 +111,37 @@ public MetricSeries metadata(MetricMetadata metadata) { } /** - * Metadata for the metric. - * + *

Metadata for the metric.

* @return metadata - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricMetadata getMetadata() { - return metadata; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricMetadata getMetadata() { + return metadata; + } public void setMetadata(MetricMetadata metadata) { this.metadata = metadata; } - public MetricSeries metric(String metric) { this.metric = metric; return this; } /** - * The name of the timeseries. - * + *

The name of the timeseries.

* @return metric - */ - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMetric() { - return metric; - } - + **/ + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public MetricSeries points(List points) { this.points = points; for (MetricPoint item : points) { @@ -142,7 +149,6 @@ public MetricSeries points(List points) { } return this; } - public MetricSeries addPointsItem(MetricPoint pointsItem) { this.points.add(pointsItem); this.unparsed |= pointsItem.unparsed; @@ -150,22 +156,18 @@ public MetricSeries addPointsItem(MetricPoint pointsItem) { } /** - * Points relating to a metric. All points must be objects with timestamp and a scalar value - * (cannot be a string). Timestamps should be in POSIX time in seconds, and cannot be more than - * ten minutes in the future or more than one hour in the past. - * + *

Points relating to a metric. All points must be objects with timestamp and a scalar value (cannot be a string). Timestamps should be in POSIX time in seconds, and cannot be more than ten minutes in the future or more than one hour in the past.

* @return points - */ - @JsonProperty(JSON_PROPERTY_POINTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPoints() { - return points; - } - + **/ + @JsonProperty(JSON_PROPERTY_POINTS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getPoints() { + return points; + } public void setPoints(List points) { this.points = points; } - public MetricSeries resources(List resources) { this.resources = resources; for (MetricResource item : resources) { @@ -173,7 +175,6 @@ public MetricSeries resources(List resources) { } return this; } - public MetricSeries addResourcesItem(MetricResource resourcesItem) { if (this.resources == null) { this.resources = new ArrayList<>(); @@ -184,47 +185,42 @@ public MetricSeries addResourcesItem(MetricResource resourcesItem) { } /** - * A list of resources to associate with this metric. - * + *

A list of resources to associate with this metric.

* @return resources - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESOURCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResources() { - return resources; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getResources() { + return resources; + } public void setResources(List resources) { this.resources = resources; } - public MetricSeries sourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; return this; } /** - * The source type name. - * + *

The source type name.

* @return sourceTypeName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceTypeName() { - return sourceTypeName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceTypeName() { + return sourceTypeName; + } public void setSourceTypeName(String sourceTypeName) { this.sourceTypeName = sourceTypeName; } - public MetricSeries tags(List tags) { this.tags = tags; return this; } - public MetricSeries addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -234,21 +230,19 @@ public MetricSeries addTagsItem(String tagsItem) { } /** - * A list of tags associated with the metric. - * + *

A list of tags associated with the metric.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public MetricSeries type(MetricIntakeType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -256,47 +250,45 @@ public MetricSeries type(MetricIntakeType type) { } /** - * The type of metric. The available types are 0 (unspecified), 1 - * (count), 2 (rate), and 3 (gauge). - * + *

The type of metric. The available types are 0 (unspecified), 1 (count), 2 (rate), and 3 (gauge).

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricIntakeType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricIntakeType getType() { + return type; + } public void setType(MetricIntakeType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public MetricSeries unit(String unit) { this.unit = unit; return this; } /** - * The unit of point value. - * + *

The unit of point value.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUnit() { - return unit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUnit() { + return unit; + } public void setUnit(String unit) { this.unit = unit; } - /** Return true if this MetricSeries object is equal to o. */ + /** + * Return true if this MetricSeries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -306,21 +298,13 @@ public boolean equals(Object o) { return false; } MetricSeries metricSeries = (MetricSeries) o; - return Objects.equals(this.interval, metricSeries.interval) - && Objects.equals(this.metadata, metricSeries.metadata) - && Objects.equals(this.metric, metricSeries.metric) - && Objects.equals(this.points, metricSeries.points) - && Objects.equals(this.resources, metricSeries.resources) - && Objects.equals(this.sourceTypeName, metricSeries.sourceTypeName) - && Objects.equals(this.tags, metricSeries.tags) - && Objects.equals(this.type, metricSeries.type) - && Objects.equals(this.unit, metricSeries.unit); + return Objects.equals(this.interval, metricSeries.interval) && Objects.equals(this.metadata, metricSeries.metadata) && Objects.equals(this.metric, metricSeries.metric) && Objects.equals(this.points, metricSeries.points) && Objects.equals(this.resources, metricSeries.resources) && Objects.equals(this.sourceTypeName, metricSeries.sourceTypeName) && Objects.equals(this.tags, metricSeries.tags) && Objects.equals(this.type, metricSeries.type) && Objects.equals(this.unit, metricSeries.unit); } + @Override public int hashCode() { - return Objects.hash( - interval, metadata, metric, points, resources, sourceTypeName, tags, type, unit); + return Objects.hash(interval,metadata,metric,points,resources,sourceTypeName,tags,type,unit); } @Override @@ -341,7 +325,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregations.java b/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregations.java index 23f8a61d65b..901489e0bf3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregations.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregations.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric's actively queried tags and aggregations. */ + +/** + *

Object for a single metric's actively queried tags and aggregations.

+ */ @JsonPropertyOrder({ MetricSuggestedTagsAndAggregations.JSON_PROPERTY_ATTRIBUTES, MetricSuggestedTagsAndAggregations.JSON_PROPERTY_ID, MetricSuggestedTagsAndAggregations.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricSuggestedTagsAndAggregations { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricSuggestedTagsAttributes attributes; @@ -29,8 +49,7 @@ public class MetricSuggestedTagsAndAggregations { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private MetricActiveConfigurationType type = - MetricActiveConfigurationType.ACTIVELY_QUERIED_CONFIGURATIONS; + private MetricActiveConfigurationType type = MetricActiveConfigurationType.ACTIVELY_QUERIED_CONFIGURATIONS; public MetricSuggestedTagsAndAggregations attributes(MetricSuggestedTagsAttributes attributes) { this.attributes = attributes; @@ -39,42 +58,38 @@ public MetricSuggestedTagsAndAggregations attributes(MetricSuggestedTagsAttribut } /** - * Object containing the definition of a metric's actively queried tags and aggregations. - * + *

Object containing the definition of a metric's actively queried tags and aggregations.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricSuggestedTagsAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricSuggestedTagsAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricSuggestedTagsAttributes attributes) { this.attributes = attributes; } - public MetricSuggestedTagsAndAggregations id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricSuggestedTagsAndAggregations type(MetricActiveConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -82,25 +97,26 @@ public MetricSuggestedTagsAndAggregations type(MetricActiveConfigurationType typ } /** - * The metric actively queried configuration resource type. - * + *

The metric actively queried configuration resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricActiveConfigurationType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricActiveConfigurationType getType() { + return type; + } public void setType(MetricActiveConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricSuggestedTagsAndAggregations object is equal to o. */ + /** + * Return true if this MetricSuggestedTagsAndAggregations object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,16 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricSuggestedTagsAndAggregations metricSuggestedTagsAndAggregations = - (MetricSuggestedTagsAndAggregations) o; - return Objects.equals(this.attributes, metricSuggestedTagsAndAggregations.attributes) - && Objects.equals(this.id, metricSuggestedTagsAndAggregations.id) - && Objects.equals(this.type, metricSuggestedTagsAndAggregations.type); + MetricSuggestedTagsAndAggregations metricSuggestedTagsAndAggregations = (MetricSuggestedTagsAndAggregations) o; + return Objects.equals(this.attributes, metricSuggestedTagsAndAggregations.attributes) && Objects.equals(this.id, metricSuggestedTagsAndAggregations.id) && Objects.equals(this.type, metricSuggestedTagsAndAggregations.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -133,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregationsResponse.java index 0df33121152..e13f6fb5d90 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregationsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAndAggregationsResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object that includes a single metric's actively queried tags and aggregations. */ -@JsonPropertyOrder({MetricSuggestedTagsAndAggregationsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object that includes a single metric's actively queried tags and aggregations.

+ */ +@JsonPropertyOrder({ + MetricSuggestedTagsAndAggregationsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricSuggestedTagsAndAggregationsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricSuggestedTagsAndAggregations data; @@ -28,22 +50,23 @@ public MetricSuggestedTagsAndAggregationsResponse data(MetricSuggestedTagsAndAgg } /** - * Object for a single metric's actively queried tags and aggregations. - * + *

Object for a single metric's actively queried tags and aggregations.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricSuggestedTagsAndAggregations getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricSuggestedTagsAndAggregations getData() { + return data; + } public void setData(MetricSuggestedTagsAndAggregations data) { this.data = data; } - /** Return true if this MetricSuggestedTagsAndAggregationsResponse object is equal to o. */ + /** + * Return true if this MetricSuggestedTagsAndAggregationsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricSuggestedTagsAndAggregationsResponse metricSuggestedTagsAndAggregationsResponse = - (MetricSuggestedTagsAndAggregationsResponse) o; + MetricSuggestedTagsAndAggregationsResponse metricSuggestedTagsAndAggregationsResponse = (MetricSuggestedTagsAndAggregationsResponse) o; return Objects.equals(this.data, metricSuggestedTagsAndAggregationsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAttributes.java index d06f56373d5..81c60c50f4f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricSuggestedTagsAttributes.java @@ -6,40 +6,55 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing the definition of a metric's actively queried tags and aggregations. */ +/** + *

Object containing the definition of a metric's actively queried tags and aggregations.

+ */ @JsonPropertyOrder({ MetricSuggestedTagsAttributes.JSON_PROPERTY_ACTIVE_AGGREGATIONS, MetricSuggestedTagsAttributes.JSON_PROPERTY_ACTIVE_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricSuggestedTagsAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACTIVE_AGGREGATIONS = "active_aggregations"; private List activeAggregations = null; public static final String JSON_PROPERTY_ACTIVE_TAGS = "active_tags"; private List activeTags = null; - public MetricSuggestedTagsAttributes activeAggregations( - List activeAggregations) { + public MetricSuggestedTagsAttributes activeAggregations(List activeAggregations) { this.activeAggregations = activeAggregations; for (MetricCustomAggregation item : activeAggregations) { this.unparsed |= item.unparsed; } return this; } - - public MetricSuggestedTagsAttributes addActiveAggregationsItem( - MetricCustomAggregation activeAggregationsItem) { + public MetricSuggestedTagsAttributes addActiveAggregationsItem(MetricCustomAggregation activeAggregationsItem) { if (this.activeAggregations == null) { this.activeAggregations = new ArrayList<>(); } @@ -49,26 +64,23 @@ public MetricSuggestedTagsAttributes addActiveAggregationsItem( } /** - * List of aggregation combinations that have been actively queried. - * + *

List of aggregation combinations that have been actively queried.

* @return activeAggregations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACTIVE_AGGREGATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getActiveAggregations() { - return activeAggregations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE_AGGREGATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getActiveAggregations() { + return activeAggregations; + } public void setActiveAggregations(List activeAggregations) { this.activeAggregations = activeAggregations; } - public MetricSuggestedTagsAttributes activeTags(List activeTags) { this.activeTags = activeTags; return this; } - public MetricSuggestedTagsAttributes addActiveTagsItem(String activeTagsItem) { if (this.activeTags == null) { this.activeTags = new ArrayList<>(); @@ -78,22 +90,23 @@ public MetricSuggestedTagsAttributes addActiveTagsItem(String activeTagsItem) { } /** - * List of tag keys that have been actively queried. - * + *

List of tag keys that have been actively queried.

* @return activeTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACTIVE_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getActiveTags() { - return activeTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getActiveTags() { + return activeTags; + } public void setActiveTags(List activeTags) { this.activeTags = activeTags; } - /** Return true if this MetricSuggestedTagsAttributes object is equal to o. */ + /** + * Return true if this MetricSuggestedTagsAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,13 +116,13 @@ public boolean equals(Object o) { return false; } MetricSuggestedTagsAttributes metricSuggestedTagsAttributes = (MetricSuggestedTagsAttributes) o; - return Objects.equals(this.activeAggregations, metricSuggestedTagsAttributes.activeAggregations) - && Objects.equals(this.activeTags, metricSuggestedTagsAttributes.activeTags); + return Objects.equals(this.activeAggregations, metricSuggestedTagsAttributes.activeAggregations) && Objects.equals(this.activeTags, metricSuggestedTagsAttributes.activeTags); } + @Override public int hashCode() { - return Objects.hash(activeAggregations, activeTags); + return Objects.hash(activeAggregations,activeTags); } @Override @@ -123,7 +136,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java index 1e04b4bda2a..2fb50a2db1f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric tag configuration. */ + +/** + *

Object for a single metric tag configuration.

+ */ @JsonPropertyOrder({ MetricTagConfiguration.JSON_PROPERTY_ATTRIBUTES, MetricTagConfiguration.JSON_PROPERTY_ID, MetricTagConfiguration.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfiguration { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricTagConfigurationAttributes attributes; @@ -38,42 +58,38 @@ public MetricTagConfiguration attributes(MetricTagConfigurationAttributes attrib } /** - * Object containing the definition of a metric tag configuration attributes. - * + *

Object containing the definition of a metric tag configuration attributes.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricTagConfigurationAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricTagConfigurationAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricTagConfigurationAttributes attributes) { this.attributes = attributes; } - public MetricTagConfiguration id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricTagConfiguration type(MetricTagConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public MetricTagConfiguration type(MetricTagConfigurationType type) { } /** - * The metric tag configuration resource type. - * + *

The metric tag configuration resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricTagConfigurationType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricTagConfigurationType getType() { + return type; + } public void setType(MetricTagConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricTagConfiguration object is equal to o. */ + /** + * Return true if this MetricTagConfiguration object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } MetricTagConfiguration metricTagConfiguration = (MetricTagConfiguration) o; - return Objects.equals(this.attributes, metricTagConfiguration.attributes) - && Objects.equals(this.id, metricTagConfiguration.id) - && Objects.equals(this.type, metricTagConfiguration.type); + return Objects.equals(this.attributes, metricTagConfiguration.attributes) && Objects.equals(this.id, metricTagConfiguration.id) && Objects.equals(this.type, metricTagConfiguration.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationAttributes.java index c35347226c6..aa8ac2dda65 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationAttributes.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing the definition of a metric tag configuration attributes. */ +/** + *

Object containing the definition of a metric tag configuration attributes.

+ */ @JsonPropertyOrder({ MetricTagConfigurationAttributes.JSON_PROPERTY_AGGREGATIONS, MetricTagConfigurationAttributes.JSON_PROPERTY_CREATED_AT, @@ -26,15 +41,14 @@ MetricTagConfigurationAttributes.JSON_PROPERTY_MODIFIED_AT, MetricTagConfigurationAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATIONS = "aggregations"; private List aggregations = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; @@ -45,7 +59,6 @@ public class MetricTagConfigurationAttributes { private MetricTagConfigurationMetricTypes metricType = MetricTagConfigurationMetricTypes.GAUGE; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -59,9 +72,7 @@ public MetricTagConfigurationAttributes aggregations(List(); } @@ -71,82 +82,73 @@ public MetricTagConfigurationAttributes addAggregationsItem( } /** - * A list of queryable aggregation combinations for a count, rate, or gauge metric. By default, - * count and rate metrics require the (time: sum, space: sum) aggregation and Gauge metrics - * require the (time: avg, space: avg) aggregation. Additional time & space combinations are - * also available: - * + *

A list of queryable aggregation combinations for a count, rate, or gauge metric. + * By default, count and rate metrics require the (time: sum, space: sum) aggregation and + * Gauge metrics require the (time: avg, space: avg) aggregation. + * Additional time & space combinations are also available:

*
    - *
  • time: avg, space: avg - *
  • time: avg, space: max - *
  • time: avg, space: min - *
  • time: avg, space: sum - *
  • time: count, space: sum - *
  • time: max, space: max - *
  • time: min, space: min - *
  • time: sum, space: avg - *
  • time: sum, space: sum + *
  • time: avg, space: avg
  • + *
  • time: avg, space: max
  • + *
  • time: avg, space: min
  • + *
  • time: avg, space: sum
  • + *
  • time: count, space: sum
  • + *
  • time: max, space: max
  • + *
  • time: min, space: min
  • + *
  • time: sum, space: avg
  • + *
  • time: sum, space: sum
  • *
- * - *

Can only be applied to metrics that have a metric_type of count, - * rate, or gauge. - * + *

Can only be applied to metrics that have a metric_type of count, rate, or gauge.

* @return aggregations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAggregations() { - return aggregations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAggregations() { + return aggregations; + } public void setAggregations(List aggregations) { this.aggregations = aggregations; } - public MetricTagConfigurationAttributes createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } /** - * Timestamp when the tag configuration was created. - * + *

Timestamp when the tag configuration was created.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public MetricTagConfigurationAttributes includePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; return this; } /** - * Toggle to include or exclude percentile aggregations for distribution metrics. Only present - * when the metric_type is distribution. - * + *

Toggle to include or exclude percentile aggregations for distribution metrics. + * Only present when the metric_type is distribution.

* @return includePercentiles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludePercentiles() { - return includePercentiles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludePercentiles() { + return includePercentiles; + } public void setIncludePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; } - public MetricTagConfigurationAttributes metricType(MetricTagConfigurationMetricTypes metricType) { this.metricType = metricType; this.unparsed |= !metricType.isValid(); @@ -154,50 +156,45 @@ public MetricTagConfigurationAttributes metricType(MetricTagConfigurationMetricT } /** - * The metric's type. - * + *

The metric's type.

* @return metricType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricTagConfigurationMetricTypes getMetricType() { - return metricType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricTagConfigurationMetricTypes getMetricType() { + return metricType; + } public void setMetricType(MetricTagConfigurationMetricTypes metricType) { if (!metricType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.metricType = metricType; } - public MetricTagConfigurationAttributes modifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; return this; } /** - * Timestamp when the tag configuration was last modified. - * + *

Timestamp when the tag configuration was last modified.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public void setModifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; } - public MetricTagConfigurationAttributes tags(List tags) { this.tags = tags; return this; } - public MetricTagConfigurationAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -207,22 +204,23 @@ public MetricTagConfigurationAttributes addTagsItem(String tagsItem) { } /** - * List of tag keys on which to group. - * + *

List of tag keys on which to group.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this MetricTagConfigurationAttributes object is equal to o. */ + /** + * Return true if this MetricTagConfigurationAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -231,20 +229,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationAttributes metricTagConfigurationAttributes = - (MetricTagConfigurationAttributes) o; - return Objects.equals(this.aggregations, metricTagConfigurationAttributes.aggregations) - && Objects.equals(this.createdAt, metricTagConfigurationAttributes.createdAt) - && Objects.equals( - this.includePercentiles, metricTagConfigurationAttributes.includePercentiles) - && Objects.equals(this.metricType, metricTagConfigurationAttributes.metricType) - && Objects.equals(this.modifiedAt, metricTagConfigurationAttributes.modifiedAt) - && Objects.equals(this.tags, metricTagConfigurationAttributes.tags); + MetricTagConfigurationAttributes metricTagConfigurationAttributes = (MetricTagConfigurationAttributes) o; + return Objects.equals(this.aggregations, metricTagConfigurationAttributes.aggregations) && Objects.equals(this.createdAt, metricTagConfigurationAttributes.createdAt) && Objects.equals(this.includePercentiles, metricTagConfigurationAttributes.includePercentiles) && Objects.equals(this.metricType, metricTagConfigurationAttributes.metricType) && Objects.equals(this.modifiedAt, metricTagConfigurationAttributes.modifiedAt) && Objects.equals(this.tags, metricTagConfigurationAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(aggregations, createdAt, includePercentiles, metricType, modifiedAt, tags); + return Objects.hash(aggregations,createdAt,includePercentiles,metricType,modifiedAt,tags); } @Override @@ -262,7 +254,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateAttributes.java index c1de48d3bb0..7c97e8615b1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateAttributes.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing the definition of a metric tag configuration to be created. */ +/** + *

Object containing the definition of a metric tag configuration to be created.

+ */ @JsonPropertyOrder({ MetricTagConfigurationCreateAttributes.JSON_PROPERTY_AGGREGATIONS, MetricTagConfigurationCreateAttributes.JSON_PROPERTY_INCLUDE_PERCENTILES, MetricTagConfigurationCreateAttributes.JSON_PROPERTY_METRIC_TYPE, MetricTagConfigurationCreateAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATIONS = "aggregations"; private List aggregations = null; @@ -42,25 +59,20 @@ public MetricTagConfigurationCreateAttributes() {} @JsonCreator public MetricTagConfigurationCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_METRIC_TYPE) - MetricTagConfigurationMetricTypes metricType, - @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { - this.metricType = metricType; - this.unparsed |= !metricType.isValid(); - this.tags = tags; + @JsonProperty(required=true, value=JSON_PROPERTY_METRIC_TYPE)MetricTagConfigurationMetricTypes metricType, + @JsonProperty(required=true, value=JSON_PROPERTY_TAGS)List tags) { + this.metricType = metricType; + this.unparsed |= !metricType.isValid(); + this.tags = tags; } - - public MetricTagConfigurationCreateAttributes aggregations( - List aggregations) { + public MetricTagConfigurationCreateAttributes aggregations(List aggregations) { this.aggregations = aggregations; for (MetricCustomAggregation item : aggregations) { this.unparsed |= item.unparsed; } return this; } - - public MetricTagConfigurationCreateAttributes addAggregationsItem( - MetricCustomAggregation aggregationsItem) { + public MetricTagConfigurationCreateAttributes addAggregationsItem(MetricCustomAggregation aggregationsItem) { if (this.aggregations == null) { this.aggregations = new ArrayList<>(); } @@ -70,112 +82,102 @@ public MetricTagConfigurationCreateAttributes addAggregationsItem( } /** - * A list of queryable aggregation combinations for a count, rate, or gauge metric. By default, - * count and rate metrics require the (time: sum, space: sum) aggregation and Gauge metrics - * require the (time: avg, space: avg) aggregation. Additional time & space combinations are - * also available: - * + *

A list of queryable aggregation combinations for a count, rate, or gauge metric. + * By default, count and rate metrics require the (time: sum, space: sum) aggregation and + * Gauge metrics require the (time: avg, space: avg) aggregation. + * Additional time & space combinations are also available:

*
    - *
  • time: avg, space: avg - *
  • time: avg, space: max - *
  • time: avg, space: min - *
  • time: avg, space: sum - *
  • time: count, space: sum - *
  • time: max, space: max - *
  • time: min, space: min - *
  • time: sum, space: avg - *
  • time: sum, space: sum + *
  • time: avg, space: avg
  • + *
  • time: avg, space: max
  • + *
  • time: avg, space: min
  • + *
  • time: avg, space: sum
  • + *
  • time: count, space: sum
  • + *
  • time: max, space: max
  • + *
  • time: min, space: min
  • + *
  • time: sum, space: avg
  • + *
  • time: sum, space: sum
  • *
- * - *

Can only be applied to metrics that have a metric_type of count, - * rate, or gauge. - * + *

Can only be applied to metrics that have a metric_type of count, rate, or gauge.

* @return aggregations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAggregations() { - return aggregations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAggregations() { + return aggregations; + } public void setAggregations(List aggregations) { this.aggregations = aggregations; } - public MetricTagConfigurationCreateAttributes includePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; return this; } /** - * Toggle to include/exclude percentiles for a distribution metric. Defaults to false. Can only be - * applied to metrics that have a metric_type of distribution. - * + *

Toggle to include/exclude percentiles for a distribution metric. + * Defaults to false. Can only be applied to metrics that have a metric_type of distribution.

* @return includePercentiles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludePercentiles() { - return includePercentiles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludePercentiles() { + return includePercentiles; + } public void setIncludePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; } - - public MetricTagConfigurationCreateAttributes metricType( - MetricTagConfigurationMetricTypes metricType) { + public MetricTagConfigurationCreateAttributes metricType(MetricTagConfigurationMetricTypes metricType) { this.metricType = metricType; this.unparsed |= !metricType.isValid(); return this; } /** - * The metric's type. - * + *

The metric's type.

* @return metricType - */ - @JsonProperty(JSON_PROPERTY_METRIC_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricTagConfigurationMetricTypes getMetricType() { - return metricType; - } - + **/ + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricTagConfigurationMetricTypes getMetricType() { + return metricType; + } public void setMetricType(MetricTagConfigurationMetricTypes metricType) { if (!metricType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.metricType = metricType; } - public MetricTagConfigurationCreateAttributes tags(List tags) { this.tags = tags; return this; } - public MetricTagConfigurationCreateAttributes addTagsItem(String tagsItem) { this.tags.add(tagsItem); return this; } /** - * A list of tag keys that will be queryable for your metric. - * + *

A list of tag keys that will be queryable for your metric.

* @return tags - */ - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTags() { - return tags; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this MetricTagConfigurationCreateAttributes object is equal to o. */ + /** + * Return true if this MetricTagConfigurationCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -184,18 +186,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationCreateAttributes metricTagConfigurationCreateAttributes = - (MetricTagConfigurationCreateAttributes) o; - return Objects.equals(this.aggregations, metricTagConfigurationCreateAttributes.aggregations) - && Objects.equals( - this.includePercentiles, metricTagConfigurationCreateAttributes.includePercentiles) - && Objects.equals(this.metricType, metricTagConfigurationCreateAttributes.metricType) - && Objects.equals(this.tags, metricTagConfigurationCreateAttributes.tags); + MetricTagConfigurationCreateAttributes metricTagConfigurationCreateAttributes = (MetricTagConfigurationCreateAttributes) o; + return Objects.equals(this.aggregations, metricTagConfigurationCreateAttributes.aggregations) && Objects.equals(this.includePercentiles, metricTagConfigurationCreateAttributes.includePercentiles) && Objects.equals(this.metricType, metricTagConfigurationCreateAttributes.metricType) && Objects.equals(this.tags, metricTagConfigurationCreateAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(aggregations, includePercentiles, metricType, tags); + return Objects.hash(aggregations,includePercentiles,metricType,tags); } @Override @@ -211,7 +209,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateData.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateData.java index bf0ecd32d08..b82c27e7414 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single metric to be configure tags on. */ + +/** + *

Object for a single metric to be configure tags on.

+ */ @JsonPropertyOrder({ MetricTagConfigurationCreateData.JSON_PROPERTY_ATTRIBUTES, MetricTagConfigurationCreateData.JSON_PROPERTY_ID, MetricTagConfigurationCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricTagConfigurationCreateAttributes attributes; @@ -36,56 +55,50 @@ public MetricTagConfigurationCreateData() {} @JsonCreator public MetricTagConfigurationCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MetricTagConfigurationType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MetricTagConfigurationType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - - public MetricTagConfigurationCreateData attributes( - MetricTagConfigurationCreateAttributes attributes) { + public MetricTagConfigurationCreateData attributes(MetricTagConfigurationCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Object containing the definition of a metric tag configuration to be created. - * + *

Object containing the definition of a metric tag configuration to be created.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricTagConfigurationCreateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricTagConfigurationCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricTagConfigurationCreateAttributes attributes) { this.attributes = attributes; } - public MetricTagConfigurationCreateData id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricTagConfigurationCreateData type(MetricTagConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -93,24 +106,25 @@ public MetricTagConfigurationCreateData type(MetricTagConfigurationType type) { } /** - * The metric tag configuration resource type. - * + *

The metric tag configuration resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricTagConfigurationType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricTagConfigurationType getType() { + return type; + } public void setType(MetricTagConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricTagConfigurationCreateData object is equal to o. */ + /** + * Return true if this MetricTagConfigurationCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,16 +133,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationCreateData metricTagConfigurationCreateData = - (MetricTagConfigurationCreateData) o; - return Objects.equals(this.attributes, metricTagConfigurationCreateData.attributes) - && Objects.equals(this.id, metricTagConfigurationCreateData.id) - && Objects.equals(this.type, metricTagConfigurationCreateData.type); + MetricTagConfigurationCreateData metricTagConfigurationCreateData = (MetricTagConfigurationCreateData) o; + return Objects.equals(this.attributes, metricTagConfigurationCreateData.attributes) && Objects.equals(this.id, metricTagConfigurationCreateData.id) && Objects.equals(this.type, metricTagConfigurationCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -143,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateRequest.java index f247371c63c..6b1f3b0842d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object that includes the metric that you would like to configure tags for. */ -@JsonPropertyOrder({MetricTagConfigurationCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request object that includes the metric that you would like to configure tags for.

+ */ +@JsonPropertyOrder({ + MetricTagConfigurationCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricTagConfigurationCreateData data; @@ -26,12 +47,10 @@ public MetricTagConfigurationCreateRequest() {} @JsonCreator public MetricTagConfigurationCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - MetricTagConfigurationCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)MetricTagConfigurationCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public MetricTagConfigurationCreateRequest data(MetricTagConfigurationCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public MetricTagConfigurationCreateRequest data(MetricTagConfigurationCreateData } /** - * Object for a single metric to be configure tags on. - * + *

Object for a single metric to be configure tags on.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricTagConfigurationCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricTagConfigurationCreateData getData() { + return data; + } public void setData(MetricTagConfigurationCreateData data) { this.data = data; } - /** Return true if this MetricTagConfigurationCreateRequest object is equal to o. */ + /** + * Return true if this MetricTagConfigurationCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationCreateRequest metricTagConfigurationCreateRequest = - (MetricTagConfigurationCreateRequest) o; + MetricTagConfigurationCreateRequest metricTagConfigurationCreateRequest = (MetricTagConfigurationCreateRequest) o; return Objects.equals(this.data, metricTagConfigurationCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationMetricTypes.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationMetricTypes.java index 4ca14cc1561..7096b4226e1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationMetricTypes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationMetricTypes.java @@ -6,35 +6,53 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric's type. */ -@JsonSerialize( - using = MetricTagConfigurationMetricTypes.MetricTagConfigurationMetricTypesSerializer.class) +/** + *

The metric's type.

+ */ +@JsonSerialize(using = MetricTagConfigurationMetricTypes.MetricTagConfigurationMetricTypesSerializer.class) public class MetricTagConfigurationMetricTypes { - public static final MetricTagConfigurationMetricTypes GAUGE = - new MetricTagConfigurationMetricTypes("gauge"); - public static final MetricTagConfigurationMetricTypes COUNT = - new MetricTagConfigurationMetricTypes("count"); - public static final MetricTagConfigurationMetricTypes RATE = - new MetricTagConfigurationMetricTypes("rate"); - public static final MetricTagConfigurationMetricTypes DISTRIBUTION = - new MetricTagConfigurationMetricTypes("distribution"); + public static final MetricTagConfigurationMetricTypes GAUGE = new MetricTagConfigurationMetricTypes("gauge"); + public static final MetricTagConfigurationMetricTypes COUNT = new MetricTagConfigurationMetricTypes("count"); + public static final MetricTagConfigurationMetricTypes RATE = new MetricTagConfigurationMetricTypes("rate"); + public static final MetricTagConfigurationMetricTypes DISTRIBUTION = new MetricTagConfigurationMetricTypes("distribution"); - private static final Set allowedValues = - new HashSet(Arrays.asList("gauge", "count", "rate", "distribution")); + private static final Set allowedValues = new HashSet(Arrays.asList("gauge", "count", "rate", "distribution")); private String value; @@ -46,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class MetricTagConfigurationMetricTypesSerializer - extends StdSerializer { - public MetricTagConfigurationMetricTypesSerializer(Class t) { - super(t); - } + public static class MetricTagConfigurationMetricTypesSerializer extends StdSerializer { + public MetricTagConfigurationMetricTypesSerializer(Class t) { + super(t); + } - public MetricTagConfigurationMetricTypesSerializer() { - this(null); - } + public MetricTagConfigurationMetricTypesSerializer() { + this(null); + } - @Override - public void serialize( - MetricTagConfigurationMetricTypes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricTagConfigurationMetricTypes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -73,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricTagConfigurationMetricTypes object is equal to o. */ + /** + * Return true if this MetricTagConfigurationMetricTypes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationResponse.java index 80ac9a83f37..42ff9f6180e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object which includes a single metric's tag configuration. */ -@JsonPropertyOrder({MetricTagConfigurationResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object which includes a single metric's tag configuration.

+ */ +@JsonPropertyOrder({ + MetricTagConfigurationResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricTagConfiguration data; @@ -28,22 +50,23 @@ public MetricTagConfigurationResponse data(MetricTagConfiguration data) { } /** - * Object for a single metric tag configuration. - * + *

Object for a single metric tag configuration.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricTagConfiguration getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricTagConfiguration getData() { + return data; + } public void setData(MetricTagConfiguration data) { this.data = data; } - /** Return true if this MetricTagConfigurationResponse object is equal to o. */ + /** + * Return true if this MetricTagConfigurationResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationResponse metricTagConfigurationResponse = - (MetricTagConfigurationResponse) o; + MetricTagConfigurationResponse metricTagConfigurationResponse = (MetricTagConfigurationResponse) o; return Objects.equals(this.data, metricTagConfigurationResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationType.java index 3a79dd1c424..6ba105856b1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric tag configuration resource type. */ +/** + *

The metric tag configuration resource type.

+ */ @JsonSerialize(using = MetricTagConfigurationType.MetricTagConfigurationTypeSerializer.class) public class MetricTagConfigurationType { - public static final MetricTagConfigurationType MANAGE_TAGS = - new MetricTagConfigurationType("manage_tags"); + public static final MetricTagConfigurationType MANAGE_TAGS = new MetricTagConfigurationType("manage_tags"); - private static final Set allowedValues = - new HashSet(Arrays.asList("manage_tags")); + private static final Set allowedValues = new HashSet(Arrays.asList("manage_tags")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MetricTagConfigurationTypeSerializer - extends StdSerializer { - public MetricTagConfigurationTypeSerializer(Class t) { - super(t); - } + public static class MetricTagConfigurationTypeSerializer extends StdSerializer { + public MetricTagConfigurationTypeSerializer(Class t) { + super(t); + } - public MetricTagConfigurationTypeSerializer() { - this(null); - } + public MetricTagConfigurationTypeSerializer() { + this(null); + } - @Override - public void serialize( - MetricTagConfigurationType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MetricTagConfigurationType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricTagConfigurationType object is equal to o. */ + /** + * Return true if this MetricTagConfigurationType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateAttributes.java index ba0e70a68d7..8b7899c9f82 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object containing the definition of a metric tag configuration to be updated. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object containing the definition of a metric tag configuration to be updated.

+ */ @JsonPropertyOrder({ MetricTagConfigurationUpdateAttributes.JSON_PROPERTY_AGGREGATIONS, MetricTagConfigurationUpdateAttributes.JSON_PROPERTY_INCLUDE_PERCENTILES, MetricTagConfigurationUpdateAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATIONS = "aggregations"; private List aggregations = null; @@ -33,17 +51,14 @@ public class MetricTagConfigurationUpdateAttributes { public static final String JSON_PROPERTY_TAGS = "tags"; private List tags = null; - public MetricTagConfigurationUpdateAttributes aggregations( - List aggregations) { + public MetricTagConfigurationUpdateAttributes aggregations(List aggregations) { this.aggregations = aggregations; for (MetricCustomAggregation item : aggregations) { this.unparsed |= item.unparsed; } return this; } - - public MetricTagConfigurationUpdateAttributes addAggregationsItem( - MetricCustomAggregation aggregationsItem) { + public MetricTagConfigurationUpdateAttributes addAggregationsItem(MetricCustomAggregation aggregationsItem) { if (this.aggregations == null) { this.aggregations = new ArrayList<>(); } @@ -53,66 +68,58 @@ public MetricTagConfigurationUpdateAttributes addAggregationsItem( } /** - * A list of queryable aggregation combinations for a count, rate, or gauge metric. By default, - * count and rate metrics require the (time: sum, space: sum) aggregation and Gauge metrics - * require the (time: avg, space: avg) aggregation. Additional time & space combinations are - * also available: - * + *

A list of queryable aggregation combinations for a count, rate, or gauge metric. + * By default, count and rate metrics require the (time: sum, space: sum) aggregation and + * Gauge metrics require the (time: avg, space: avg) aggregation. + * Additional time & space combinations are also available:

*
    - *
  • time: avg, space: avg - *
  • time: avg, space: max - *
  • time: avg, space: min - *
  • time: avg, space: sum - *
  • time: count, space: sum - *
  • time: max, space: max - *
  • time: min, space: min - *
  • time: sum, space: avg - *
  • time: sum, space: sum + *
  • time: avg, space: avg
  • + *
  • time: avg, space: max
  • + *
  • time: avg, space: min
  • + *
  • time: avg, space: sum
  • + *
  • time: count, space: sum
  • + *
  • time: max, space: max
  • + *
  • time: min, space: min
  • + *
  • time: sum, space: avg
  • + *
  • time: sum, space: sum
  • *
- * - *

Can only be applied to metrics that have a metric_type of count, - * rate, or gauge. - * + *

Can only be applied to metrics that have a metric_type of count, rate, or gauge.

* @return aggregations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAggregations() { - return aggregations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getAggregations() { + return aggregations; + } public void setAggregations(List aggregations) { this.aggregations = aggregations; } - public MetricTagConfigurationUpdateAttributes includePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; return this; } /** - * Toggle to include/exclude percentiles for a distribution metric. Defaults to false. Can only be - * applied to metrics that have a metric_type of distribution. - * + *

Toggle to include/exclude percentiles for a distribution metric. + * Defaults to false. Can only be applied to metrics that have a metric_type of distribution.

* @return includePercentiles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludePercentiles() { - return includePercentiles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludePercentiles() { + return includePercentiles; + } public void setIncludePercentiles(Boolean includePercentiles) { this.includePercentiles = includePercentiles; } - public MetricTagConfigurationUpdateAttributes tags(List tags) { this.tags = tags; return this; } - public MetricTagConfigurationUpdateAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -122,22 +129,23 @@ public MetricTagConfigurationUpdateAttributes addTagsItem(String tagsItem) { } /** - * A list of tag keys that will be queryable for your metric. - * + *

A list of tag keys that will be queryable for your metric.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this MetricTagConfigurationUpdateAttributes object is equal to o. */ + /** + * Return true if this MetricTagConfigurationUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -146,17 +154,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationUpdateAttributes metricTagConfigurationUpdateAttributes = - (MetricTagConfigurationUpdateAttributes) o; - return Objects.equals(this.aggregations, metricTagConfigurationUpdateAttributes.aggregations) - && Objects.equals( - this.includePercentiles, metricTagConfigurationUpdateAttributes.includePercentiles) - && Objects.equals(this.tags, metricTagConfigurationUpdateAttributes.tags); + MetricTagConfigurationUpdateAttributes metricTagConfigurationUpdateAttributes = (MetricTagConfigurationUpdateAttributes) o; + return Objects.equals(this.aggregations, metricTagConfigurationUpdateAttributes.aggregations) && Objects.equals(this.includePercentiles, metricTagConfigurationUpdateAttributes.includePercentiles) && Objects.equals(this.tags, metricTagConfigurationUpdateAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(aggregations, includePercentiles, tags); + return Objects.hash(aggregations,includePercentiles,tags); } @Override @@ -171,7 +176,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateData.java index 042254c24fa..7a22ef62c08 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single tag configuration to be edited. */ + +/** + *

Object for a single tag configuration to be edited.

+ */ @JsonPropertyOrder({ MetricTagConfigurationUpdateData.JSON_PROPERTY_ATTRIBUTES, MetricTagConfigurationUpdateData.JSON_PROPERTY_ID, MetricTagConfigurationUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MetricTagConfigurationUpdateAttributes attributes; @@ -36,56 +55,50 @@ public MetricTagConfigurationUpdateData() {} @JsonCreator public MetricTagConfigurationUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MetricTagConfigurationType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MetricTagConfigurationType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - - public MetricTagConfigurationUpdateData attributes( - MetricTagConfigurationUpdateAttributes attributes) { + public MetricTagConfigurationUpdateData attributes(MetricTagConfigurationUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Object containing the definition of a metric tag configuration to be updated. - * + *

Object containing the definition of a metric tag configuration to be updated.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricTagConfigurationUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricTagConfigurationUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(MetricTagConfigurationUpdateAttributes attributes) { this.attributes = attributes; } - public MetricTagConfigurationUpdateData id(String id) { this.id = id; return this; } /** - * The metric name for this resource. - * + *

The metric name for this resource.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MetricTagConfigurationUpdateData type(MetricTagConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -93,24 +106,25 @@ public MetricTagConfigurationUpdateData type(MetricTagConfigurationType type) { } /** - * The metric tag configuration resource type. - * + *

The metric tag configuration resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricTagConfigurationType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricTagConfigurationType getType() { + return type; + } public void setType(MetricTagConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MetricTagConfigurationUpdateData object is equal to o. */ + /** + * Return true if this MetricTagConfigurationUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,16 +133,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationUpdateData metricTagConfigurationUpdateData = - (MetricTagConfigurationUpdateData) o; - return Objects.equals(this.attributes, metricTagConfigurationUpdateData.attributes) - && Objects.equals(this.id, metricTagConfigurationUpdateData.id) - && Objects.equals(this.type, metricTagConfigurationUpdateData.type); + MetricTagConfigurationUpdateData metricTagConfigurationUpdateData = (MetricTagConfigurationUpdateData) o; + return Objects.equals(this.attributes, metricTagConfigurationUpdateData.attributes) && Objects.equals(this.id, metricTagConfigurationUpdateData.id) && Objects.equals(this.type, metricTagConfigurationUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -143,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateRequest.java index eef3841bd4a..7129061f76a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfigurationUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object that includes the metric that you would like to edit the tag configuration on. */ -@JsonPropertyOrder({MetricTagConfigurationUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request object that includes the metric that you would like to edit the tag configuration on.

+ */ +@JsonPropertyOrder({ + MetricTagConfigurationUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricTagConfigurationUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricTagConfigurationUpdateData data; @@ -26,12 +47,10 @@ public MetricTagConfigurationUpdateRequest() {} @JsonCreator public MetricTagConfigurationUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - MetricTagConfigurationUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)MetricTagConfigurationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public MetricTagConfigurationUpdateRequest data(MetricTagConfigurationUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public MetricTagConfigurationUpdateRequest data(MetricTagConfigurationUpdateData } /** - * Object for a single tag configuration to be edited. - * + *

Object for a single tag configuration to be edited.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricTagConfigurationUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricTagConfigurationUpdateData getData() { + return data; + } public void setData(MetricTagConfigurationUpdateData data) { this.data = data; } - /** Return true if this MetricTagConfigurationUpdateRequest object is equal to o. */ + /** + * Return true if this MetricTagConfigurationUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricTagConfigurationUpdateRequest metricTagConfigurationUpdateRequest = - (MetricTagConfigurationUpdateRequest) o; + MetricTagConfigurationUpdateRequest metricTagConfigurationUpdateRequest = (MetricTagConfigurationUpdateRequest) o; return Objects.equals(this.data, metricTagConfigurationUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricType.java b/src/main/java/com/datadog/api/client/v2/model/MetricType.java index fa30e69533d..77f857880cc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The metric resource type. */ +/** + *

The metric resource type.

+ */ @JsonSerialize(using = MetricType.MetricTypeSerializer.class) public class MetricType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class MetricTypeSerializer extends StdSerializer { - public MetricTypeSerializer(Class t) { - super(t); - } - - public MetricTypeSerializer() { - this(null); - } - - @Override - public void serialize(MetricType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricTypeSerializer(Class t) { + super(t); + } + + public MetricTypeSerializer() { + this(null); + } + + @Override + public void serialize(MetricType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricType object is equal to o. */ + /** + * Return true if this MetricType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricVolumes.java b/src/main/java/com/datadog/api/client/v2/model/MetricVolumes.java index f9031761cb8..ab7f7db6a77 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricVolumes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricVolumes.java @@ -6,272 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = MetricVolumes.MetricVolumesDeserializer.class) @JsonSerialize(using = MetricVolumes.MetricVolumesSerializer.class) public class MetricVolumes extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(MetricVolumes.class.getName()); + private static final Logger log = Logger.getLogger(MetricVolumes.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class MetricVolumesSerializer extends StdSerializer { + public MetricVolumesSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public MetricVolumesSerializer() { + this(null); + } - public static class MetricVolumesSerializer extends StdSerializer { - public MetricVolumesSerializer(Class t) { - super(t); + @Override + public void serialize(MetricVolumes value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public MetricVolumesSerializer() { - this(null); + public static class MetricVolumesDeserializer extends StdDeserializer { + public MetricVolumesDeserializer() { + this(MetricVolumes.class); + } + + public MetricVolumesDeserializer(Class vc) { + super(vc); + } + + @Override + public MetricVolumes 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 MetricDistinctVolume + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MetricDistinctVolume.class.equals(Integer.class) || MetricDistinctVolume.class.equals(Long.class) || MetricDistinctVolume.class.equals(Float.class) || MetricDistinctVolume.class.equals(Double.class) || MetricDistinctVolume.class.equals(Boolean.class) || MetricDistinctVolume.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MetricDistinctVolume.class.equals(Integer.class) || MetricDistinctVolume.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MetricDistinctVolume.class.equals(Float.class) || MetricDistinctVolume.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MetricDistinctVolume.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MetricDistinctVolume.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MetricDistinctVolume.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 (!((MetricDistinctVolume)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MetricDistinctVolume'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MetricDistinctVolume'", e); + } + + // deserialize MetricIngestedIndexedVolume + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MetricIngestedIndexedVolume.class.equals(Integer.class) || MetricIngestedIndexedVolume.class.equals(Long.class) || MetricIngestedIndexedVolume.class.equals(Float.class) || MetricIngestedIndexedVolume.class.equals(Double.class) || MetricIngestedIndexedVolume.class.equals(Boolean.class) || MetricIngestedIndexedVolume.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MetricIngestedIndexedVolume.class.equals(Integer.class) || MetricIngestedIndexedVolume.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MetricIngestedIndexedVolume.class.equals(Float.class) || MetricIngestedIndexedVolume.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MetricIngestedIndexedVolume.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MetricIngestedIndexedVolume.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MetricIngestedIndexedVolume.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 (!((MetricIngestedIndexedVolume)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MetricIngestedIndexedVolume'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MetricIngestedIndexedVolume'", e); + } + + MetricVolumes ret = new MetricVolumes(); + 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 MetricVolumes getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "MetricVolumes cannot be null"); + } } - @Override - public void serialize(MetricVolumes value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public MetricVolumes() { + super("oneOf", Boolean.FALSE); + } + public MetricVolumes(MetricDistinctVolume o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public MetricVolumes(MetricIngestedIndexedVolume o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class MetricVolumesDeserializer extends StdDeserializer { - public MetricVolumesDeserializer() { - this(MetricVolumes.class); + static { + schemas.put("MetricDistinctVolume", new GenericType() { + }); + schemas.put("MetricIngestedIndexedVolume", new GenericType() { + }); + JSON.registerDescendants(MetricVolumes.class, Collections.unmodifiableMap(schemas)); } - public MetricVolumesDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return MetricVolumes.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MetricDistinctVolume, MetricIngestedIndexedVolume + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public MetricVolumes 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 MetricDistinctVolume - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MetricDistinctVolume.class.equals(Integer.class) - || MetricDistinctVolume.class.equals(Long.class) - || MetricDistinctVolume.class.equals(Float.class) - || MetricDistinctVolume.class.equals(Double.class) - || MetricDistinctVolume.class.equals(Boolean.class) - || MetricDistinctVolume.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MetricDistinctVolume.class.equals(Integer.class) - || MetricDistinctVolume.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MetricDistinctVolume.class.equals(Float.class) - || MetricDistinctVolume.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MetricDistinctVolume.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MetricDistinctVolume.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MetricDistinctVolume.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MetricDistinctVolume.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 (!((MetricDistinctVolume) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MetricDistinctVolume'"); + if (JSON.isInstanceOf(MetricIngestedIndexedVolume.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'MetricDistinctVolume'", e); - } - // deserialize MetricIngestedIndexedVolume - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MetricIngestedIndexedVolume.class.equals(Integer.class) - || MetricIngestedIndexedVolume.class.equals(Long.class) - || MetricIngestedIndexedVolume.class.equals(Float.class) - || MetricIngestedIndexedVolume.class.equals(Double.class) - || MetricIngestedIndexedVolume.class.equals(Boolean.class) - || MetricIngestedIndexedVolume.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MetricIngestedIndexedVolume.class.equals(Integer.class) - || MetricIngestedIndexedVolume.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MetricIngestedIndexedVolume.class.equals(Float.class) - || MetricIngestedIndexedVolume.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MetricIngestedIndexedVolume.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MetricIngestedIndexedVolume.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MetricIngestedIndexedVolume.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 (!((MetricIngestedIndexedVolume) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MetricIngestedIndexedVolume'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'MetricIngestedIndexedVolume'", e); - } - - MetricVolumes ret = new MetricVolumes(); - 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; + throw new RuntimeException("Invalid instance type. Must be MetricDistinctVolume, MetricIngestedIndexedVolume"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * MetricDistinctVolume, MetricIngestedIndexedVolume + * + * @return The actual instance (MetricDistinctVolume, MetricIngestedIndexedVolume) + */ @Override - public MetricVolumes getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "MetricVolumes cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public MetricVolumes() { - super("oneOf", Boolean.FALSE); - } - - public MetricVolumes(MetricDistinctVolume o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public MetricVolumes(MetricIngestedIndexedVolume o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MetricDistinctVolume", new GenericType() {}); - schemas.put("MetricIngestedIndexedVolume", new GenericType() {}); - JSON.registerDescendants(MetricVolumes.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return MetricVolumes.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MetricDistinctVolume, MetricIngestedIndexedVolume - * - *

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(MetricDistinctVolume.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(MetricIngestedIndexedVolume.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MetricDistinctVolume`. If the actual instance is not `MetricDistinctVolume`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MetricDistinctVolume` + * @throws ClassCastException if the instance is not `MetricDistinctVolume` + */ + public MetricDistinctVolume getMetricDistinctVolume() throws ClassCastException { + return (MetricDistinctVolume)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MetricIngestedIndexedVolume`. If the actual instance is not `MetricIngestedIndexedVolume`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MetricIngestedIndexedVolume` + * @throws ClassCastException if the instance is not `MetricIngestedIndexedVolume` + */ + public MetricIngestedIndexedVolume getMetricIngestedIndexedVolume() throws ClassCastException { + return (MetricIngestedIndexedVolume)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be MetricDistinctVolume, MetricIngestedIndexedVolume"); - } - - /** - * Get the actual instance, which can be the following: MetricDistinctVolume, - * MetricIngestedIndexedVolume - * - * @return The actual instance (MetricDistinctVolume, MetricIngestedIndexedVolume) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MetricDistinctVolume`. If the actual instance is not - * `MetricDistinctVolume`, the ClassCastException will be thrown. - * - * @return The actual instance of `MetricDistinctVolume` - * @throws ClassCastException if the instance is not `MetricDistinctVolume` - */ - public MetricDistinctVolume getMetricDistinctVolume() throws ClassCastException { - return (MetricDistinctVolume) super.getActualInstance(); - } - - /** - * Get the actual instance of `MetricIngestedIndexedVolume`. If the actual instance is not - * `MetricIngestedIndexedVolume`, the ClassCastException will be thrown. - * - * @return The actual instance of `MetricIngestedIndexedVolume` - * @throws ClassCastException if the instance is not `MetricIngestedIndexedVolume` - */ - public MetricIngestedIndexedVolume getMetricIngestedIndexedVolume() throws ClassCastException { - return (MetricIngestedIndexedVolume) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricVolumesResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesResponse.java index c6ad84ba627..78f0d4634ca 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricVolumesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object which includes a single metric's volume. */ -@JsonPropertyOrder({MetricVolumesResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object which includes a single metric's volume.

+ */ +@JsonPropertyOrder({ + MetricVolumesResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricVolumesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MetricVolumes data; @@ -28,22 +50,23 @@ public MetricVolumesResponse data(MetricVolumes data) { } /** - * Possible response objects for a metric's volume. - * + *

Possible response objects for a metric's volume.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MetricVolumes getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MetricVolumes getData() { + return data; + } public void setData(MetricVolumes data) { this.data = data; } - /** Return true if this MetricVolumesResponse object is equal to o. */ + /** + * Return true if this MetricVolumesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, metricVolumesResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsAggregator.java b/src/main/java/com/datadog/api/client/v2/model/MetricsAggregator.java index 2803df4a122..7fdf7fefff5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsAggregator.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsAggregator.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of aggregation that can be performed on metrics queries. */ +/** + *

The type of aggregation that can be performed on metrics queries.

+ */ @JsonSerialize(using = MetricsAggregator.MetricsAggregatorSerializer.class) public class MetricsAggregator { @@ -33,10 +57,7 @@ public class MetricsAggregator { public static final MetricsAggregator L2NORM = new MetricsAggregator("l2norm"); public static final MetricsAggregator AREA = new MetricsAggregator("area"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "avg", "min", "max", "sum", "last", "percentile", "mean", "l2norm", "area")); + private static final Set allowedValues = new HashSet(Arrays.asList("avg", "min", "max", "sum", "last", "percentile", "mean", "l2norm", "area")); private String value; @@ -49,19 +70,18 @@ public boolean isValid() { } public static class MetricsAggregatorSerializer extends StdSerializer { - public MetricsAggregatorSerializer(Class t) { - super(t); - } - - public MetricsAggregatorSerializer() { - this(null); - } - - @Override - public void serialize(MetricsAggregator value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricsAggregatorSerializer(Class t) { + super(t); + } + + public MetricsAggregatorSerializer() { + this(null); + } + + @Override + public void serialize(MetricsAggregator value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -73,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricsAggregator object is equal to o. */ + /** + * Return true if this MetricsAggregator object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurations.java b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurations.java index 835f160a61f..8164897adbb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurations.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurations.java @@ -6,276 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = MetricsAndMetricTagConfigurations.MetricsAndMetricTagConfigurationsDeserializer.class) -@JsonSerialize( - using = MetricsAndMetricTagConfigurations.MetricsAndMetricTagConfigurationsSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = MetricsAndMetricTagConfigurations.MetricsAndMetricTagConfigurationsDeserializer.class) +@JsonSerialize(using = MetricsAndMetricTagConfigurations.MetricsAndMetricTagConfigurationsSerializer.class) public class MetricsAndMetricTagConfigurations extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(MetricsAndMetricTagConfigurations.class.getName()); + private static final Logger log = Logger.getLogger(MetricsAndMetricTagConfigurations.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class MetricsAndMetricTagConfigurationsSerializer extends StdSerializer { + public MetricsAndMetricTagConfigurationsSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public MetricsAndMetricTagConfigurationsSerializer() { + this(null); + } - public static class MetricsAndMetricTagConfigurationsSerializer - extends StdSerializer { - public MetricsAndMetricTagConfigurationsSerializer(Class t) { - super(t); + @Override + public void serialize(MetricsAndMetricTagConfigurations value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public MetricsAndMetricTagConfigurationsSerializer() { - this(null); + public static class MetricsAndMetricTagConfigurationsDeserializer extends StdDeserializer { + public MetricsAndMetricTagConfigurationsDeserializer() { + this(MetricsAndMetricTagConfigurations.class); + } + + public MetricsAndMetricTagConfigurationsDeserializer(Class vc) { + super(vc); + } + + @Override + public MetricsAndMetricTagConfigurations 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 Metric + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Metric.class.equals(Integer.class) || Metric.class.equals(Long.class) || Metric.class.equals(Float.class) || Metric.class.equals(Double.class) || Metric.class.equals(Boolean.class) || Metric.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Metric.class.equals(Integer.class) || Metric.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Metric.class.equals(Float.class) || Metric.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Metric.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Metric.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Metric.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 (!((Metric)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'Metric'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Metric'", e); + } + + // deserialize MetricTagConfiguration + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MetricTagConfiguration.class.equals(Integer.class) || MetricTagConfiguration.class.equals(Long.class) || MetricTagConfiguration.class.equals(Float.class) || MetricTagConfiguration.class.equals(Double.class) || MetricTagConfiguration.class.equals(Boolean.class) || MetricTagConfiguration.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MetricTagConfiguration.class.equals(Integer.class) || MetricTagConfiguration.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MetricTagConfiguration.class.equals(Float.class) || MetricTagConfiguration.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MetricTagConfiguration.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MetricTagConfiguration.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MetricTagConfiguration.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 (!((MetricTagConfiguration)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MetricTagConfiguration'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MetricTagConfiguration'", e); + } + + MetricsAndMetricTagConfigurations ret = new MetricsAndMetricTagConfigurations(); + 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 MetricsAndMetricTagConfigurations getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "MetricsAndMetricTagConfigurations cannot be null"); + } } - @Override - public void serialize( - MetricsAndMetricTagConfigurations value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public MetricsAndMetricTagConfigurations() { + super("oneOf", Boolean.FALSE); + } + public MetricsAndMetricTagConfigurations(Metric o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public MetricsAndMetricTagConfigurations(MetricTagConfiguration o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class MetricsAndMetricTagConfigurationsDeserializer - extends StdDeserializer { - public MetricsAndMetricTagConfigurationsDeserializer() { - this(MetricsAndMetricTagConfigurations.class); + static { + schemas.put("Metric", new GenericType() { + }); + schemas.put("MetricTagConfiguration", new GenericType() { + }); + JSON.registerDescendants(MetricsAndMetricTagConfigurations.class, Collections.unmodifiableMap(schemas)); } - public MetricsAndMetricTagConfigurationsDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return MetricsAndMetricTagConfigurations.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Metric, MetricTagConfiguration + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public MetricsAndMetricTagConfigurations 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 Metric - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Metric.class.equals(Integer.class) - || Metric.class.equals(Long.class) - || Metric.class.equals(Float.class) - || Metric.class.equals(Double.class) - || Metric.class.equals(Boolean.class) - || Metric.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Metric.class.equals(Integer.class) || Metric.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Metric.class.equals(Float.class) || Metric.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Metric.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Metric.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Metric.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Metric.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 (!((Metric) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'Metric'"); + if (JSON.isInstanceOf(MetricTagConfiguration.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Metric'", e); - } - // deserialize MetricTagConfiguration - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MetricTagConfiguration.class.equals(Integer.class) - || MetricTagConfiguration.class.equals(Long.class) - || MetricTagConfiguration.class.equals(Float.class) - || MetricTagConfiguration.class.equals(Double.class) - || MetricTagConfiguration.class.equals(Boolean.class) - || MetricTagConfiguration.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MetricTagConfiguration.class.equals(Integer.class) - || MetricTagConfiguration.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MetricTagConfiguration.class.equals(Float.class) - || MetricTagConfiguration.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MetricTagConfiguration.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MetricTagConfiguration.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MetricTagConfiguration.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 (!((MetricTagConfiguration) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MetricTagConfiguration'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'MetricTagConfiguration'", e); - } - - MetricsAndMetricTagConfigurations ret = new MetricsAndMetricTagConfigurations(); - 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; + throw new RuntimeException("Invalid instance type. Must be Metric, MetricTagConfiguration"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * Metric, MetricTagConfiguration + * + * @return The actual instance (Metric, MetricTagConfiguration) + */ @Override - public MetricsAndMetricTagConfigurations getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "MetricsAndMetricTagConfigurations cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public MetricsAndMetricTagConfigurations() { - super("oneOf", Boolean.FALSE); - } - - public MetricsAndMetricTagConfigurations(Metric o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public MetricsAndMetricTagConfigurations(MetricTagConfiguration o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Metric", new GenericType() {}); - schemas.put("MetricTagConfiguration", new GenericType() {}); - JSON.registerDescendants( - MetricsAndMetricTagConfigurations.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return MetricsAndMetricTagConfigurations.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Metric, MetricTagConfiguration - * - *

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(Metric.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(MetricTagConfiguration.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `Metric`. If the actual instance is not `Metric`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Metric` + * @throws ClassCastException if the instance is not `Metric` + */ + public Metric getMetric() throws ClassCastException { + return (Metric)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MetricTagConfiguration`. If the actual instance is not `MetricTagConfiguration`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MetricTagConfiguration` + * @throws ClassCastException if the instance is not `MetricTagConfiguration` + */ + public MetricTagConfiguration getMetricTagConfiguration() throws ClassCastException { + return (MetricTagConfiguration)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be Metric, MetricTagConfiguration"); - } - - /** - * Get the actual instance, which can be the following: Metric, MetricTagConfiguration - * - * @return The actual instance (Metric, MetricTagConfiguration) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Metric`. If the actual instance is not `Metric`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Metric` - * @throws ClassCastException if the instance is not `Metric` - */ - public Metric getMetric() throws ClassCastException { - return (Metric) super.getActualInstance(); - } - - /** - * Get the actual instance of `MetricTagConfiguration`. If the actual instance is not - * `MetricTagConfiguration`, the ClassCastException will be thrown. - * - * @return The actual instance of `MetricTagConfiguration` - * @throws ClassCastException if the instance is not `MetricTagConfiguration` - */ - public MetricTagConfiguration getMetricTagConfiguration() throws ClassCastException { - return (MetricTagConfiguration) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java index 5b496885cd6..85f92b27f23 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java @@ -6,34 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response object that includes metrics and metric tag configurations. */ -@JsonPropertyOrder({MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response object that includes metrics and metric tag configurations.

+ */ +@JsonPropertyOrder({ + MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsAndMetricTagConfigurationsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; - public MetricsAndMetricTagConfigurationsResponse data( - List data) { + public MetricsAndMetricTagConfigurationsResponse data(List data) { this.data = data; for (MetricsAndMetricTagConfigurations item : data) { this.unparsed |= item.unparsed; } return this; } - - public MetricsAndMetricTagConfigurationsResponse addDataItem( - MetricsAndMetricTagConfigurations dataItem) { + public MetricsAndMetricTagConfigurationsResponse addDataItem(MetricsAndMetricTagConfigurations dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -43,22 +60,23 @@ public MetricsAndMetricTagConfigurationsResponse addDataItem( } /** - * Array of metrics and metric tag configurations. - * + *

Array of metrics and metric tag configurations.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this MetricsAndMetricTagConfigurationsResponse object is equal to o. */ + /** + * Return true if this MetricsAndMetricTagConfigurationsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -67,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MetricsAndMetricTagConfigurationsResponse metricsAndMetricTagConfigurationsResponse = - (MetricsAndMetricTagConfigurationsResponse) o; + MetricsAndMetricTagConfigurationsResponse metricsAndMetricTagConfigurationsResponse = (MetricsAndMetricTagConfigurationsResponse) o; return Objects.equals(this.data, metricsAndMetricTagConfigurationsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -87,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsDataSource.java b/src/main/java/com/datadog/api/client/v2/model/MetricsDataSource.java index 019084f616b..d9f09c1bea6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsDataSource.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsDataSource.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** A data source that is powered by the Metrics platform. */ +/** + *

A data source that is powered by the Metrics platform.

+ */ @JsonSerialize(using = MetricsDataSource.MetricsDataSourceSerializer.class) public class MetricsDataSource { public static final MetricsDataSource METRICS = new MetricsDataSource("metrics"); public static final MetricsDataSource CLOUD_COST = new MetricsDataSource("cloud_cost"); - private static final Set allowedValues = - new HashSet(Arrays.asList("metrics", "cloud_cost")); + private static final Set allowedValues = new HashSet(Arrays.asList("metrics", "cloud_cost")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class MetricsDataSourceSerializer extends StdSerializer { - public MetricsDataSourceSerializer(Class t) { - super(t); - } - - public MetricsDataSourceSerializer() { - this(null); - } - - @Override - public void serialize(MetricsDataSource value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public MetricsDataSourceSerializer(Class t) { + super(t); + } + + public MetricsDataSourceSerializer() { + this(null); + } + + @Override + public void serialize(MetricsDataSource value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MetricsDataSource object is equal to o. */ + /** + * Return true if this MetricsDataSource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsScalarQuery.java b/src/main/java/com/datadog/api/client/v2/model/MetricsScalarQuery.java index 7bde6746aae..2005579b89e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsScalarQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsScalarQuery.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** An individual scalar metrics query. */ +/** + *

An individual scalar metrics query.

+ */ @JsonPropertyOrder({ MetricsScalarQuery.JSON_PROPERTY_AGGREGATOR, MetricsScalarQuery.JSON_PROPERTY_DATA_SOURCE, MetricsScalarQuery.JSON_PROPERTY_NAME, MetricsScalarQuery.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsScalarQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATOR = "aggregator"; private MetricsAggregator aggregator = MetricsAggregator.AVG; @@ -40,17 +59,15 @@ public MetricsScalarQuery() {} @JsonCreator public MetricsScalarQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATOR) MetricsAggregator aggregator, - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - MetricsDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.aggregator = aggregator; - this.unparsed |= !aggregator.isValid(); - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATOR)MetricsAggregator aggregator, + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)MetricsDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.aggregator = aggregator; + this.unparsed |= !aggregator.isValid(); + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.query = query; } - public MetricsScalarQuery aggregator(MetricsAggregator aggregator) { this.aggregator = aggregator; this.unparsed |= !aggregator.isValid(); @@ -58,23 +75,21 @@ public MetricsScalarQuery aggregator(MetricsAggregator aggregator) { } /** - * The type of aggregation that can be performed on metrics queries. - * + *

The type of aggregation that can be performed on metrics queries.

* @return aggregator - */ - @JsonProperty(JSON_PROPERTY_AGGREGATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricsAggregator getAggregator() { - return aggregator; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATOR) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricsAggregator getAggregator() { + return aggregator; + } public void setAggregator(MetricsAggregator aggregator) { if (!aggregator.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregator = aggregator; } - public MetricsScalarQuery dataSource(MetricsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); @@ -82,65 +97,62 @@ public MetricsScalarQuery dataSource(MetricsDataSource dataSource) { } /** - * A data source that is powered by the Metrics platform. - * + *

A data source that is powered by the Metrics platform.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricsDataSource getDataSource() { + return dataSource; + } public void setDataSource(MetricsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public MetricsScalarQuery name(String name) { this.name = name; return this; } /** - * The variable name for use in formulas. - * + *

The variable name for use in formulas.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public MetricsScalarQuery query(String query) { this.query = query; return this; } /** - * A classic metrics query string. - * + *

A classic metrics query string.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this MetricsScalarQuery object is equal to o. */ + /** + * Return true if this MetricsScalarQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -150,15 +162,13 @@ public boolean equals(Object o) { return false; } MetricsScalarQuery metricsScalarQuery = (MetricsScalarQuery) o; - return Objects.equals(this.aggregator, metricsScalarQuery.aggregator) - && Objects.equals(this.dataSource, metricsScalarQuery.dataSource) - && Objects.equals(this.name, metricsScalarQuery.name) - && Objects.equals(this.query, metricsScalarQuery.query); + return Objects.equals(this.aggregator, metricsScalarQuery.aggregator) && Objects.equals(this.dataSource, metricsScalarQuery.dataSource) && Objects.equals(this.name, metricsScalarQuery.name) && Objects.equals(this.query, metricsScalarQuery.query); } + @Override public int hashCode() { - return Objects.hash(aggregator, dataSource, name, query); + return Objects.hash(aggregator,dataSource,name,query); } @Override @@ -174,7 +184,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsTimeseriesQuery.java b/src/main/java/com/datadog/api/client/v2/model/MetricsTimeseriesQuery.java index e02ccdd935a..e6a556b92cf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsTimeseriesQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsTimeseriesQuery.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** An individual timeseries metrics query. */ + +/** + *

An individual timeseries metrics query.

+ */ @JsonPropertyOrder({ MetricsTimeseriesQuery.JSON_PROPERTY_DATA_SOURCE, MetricsTimeseriesQuery.JSON_PROPERTY_NAME, MetricsTimeseriesQuery.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsTimeseriesQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; private MetricsDataSource dataSource = MetricsDataSource.METRICS; @@ -36,14 +55,12 @@ public MetricsTimeseriesQuery() {} @JsonCreator public MetricsTimeseriesQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) - MetricsDataSource dataSource, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.dataSource = dataSource; - this.unparsed |= !dataSource.isValid(); - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA_SOURCE)MetricsDataSource dataSource, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.query = query; } - public MetricsTimeseriesQuery dataSource(MetricsDataSource dataSource) { this.dataSource = dataSource; this.unparsed |= !dataSource.isValid(); @@ -51,65 +68,62 @@ public MetricsTimeseriesQuery dataSource(MetricsDataSource dataSource) { } /** - * A data source that is powered by the Metrics platform. - * + *

A data source that is powered by the Metrics platform.

* @return dataSource - */ - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MetricsDataSource getDataSource() { - return dataSource; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MetricsDataSource getDataSource() { + return dataSource; + } public void setDataSource(MetricsDataSource dataSource) { if (!dataSource.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.dataSource = dataSource; } - public MetricsTimeseriesQuery name(String name) { this.name = name; return this; } /** - * The variable name for use in formulas. - * + *

The variable name for use in formulas.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public MetricsTimeseriesQuery query(String query) { this.query = query; return this; } /** - * A classic metrics query string. - * + *

A classic metrics query string.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this MetricsTimeseriesQuery object is equal to o. */ + /** + * Return true if this MetricsTimeseriesQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +133,13 @@ public boolean equals(Object o) { return false; } MetricsTimeseriesQuery metricsTimeseriesQuery = (MetricsTimeseriesQuery) o; - return Objects.equals(this.dataSource, metricsTimeseriesQuery.dataSource) - && Objects.equals(this.name, metricsTimeseriesQuery.name) - && Objects.equals(this.query, metricsTimeseriesQuery.query); + return Objects.equals(this.dataSource, metricsTimeseriesQuery.dataSource) && Objects.equals(this.name, metricsTimeseriesQuery.name) && Objects.equals(this.query, metricsTimeseriesQuery.query); } + @Override public int hashCode() { - return Objects.hash(dataSource, name, query); + return Objects.hash(dataSource,name,query); } @Override @@ -141,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeCreateRequest.java index 1719aa4ae0c..1dbf76bf810 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeCreateRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Policy and policy type for a monitor configuration policy. */ + +/** + *

Policy and policy type for a monitor configuration policy.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyAttributeCreateRequest.JSON_PROPERTY_POLICY, MonitorConfigPolicyAttributeCreateRequest.JSON_PROPERTY_POLICY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyAttributeCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_POLICY = "policy"; private MonitorConfigPolicyPolicyCreateRequest policy; @@ -32,38 +51,32 @@ public MonitorConfigPolicyAttributeCreateRequest() {} @JsonCreator public MonitorConfigPolicyAttributeCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_POLICY) - MonitorConfigPolicyPolicyCreateRequest policy, - @JsonProperty(required = true, value = JSON_PROPERTY_POLICY_TYPE) - MonitorConfigPolicyType policyType) { - this.policy = policy; - this.unparsed |= policy.unparsed; - this.policyType = policyType; - this.unparsed |= !policyType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_POLICY)MonitorConfigPolicyPolicyCreateRequest policy, + @JsonProperty(required=true, value=JSON_PROPERTY_POLICY_TYPE)MonitorConfigPolicyType policyType) { + this.policy = policy; + this.unparsed |= policy.unparsed; + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); } - - public MonitorConfigPolicyAttributeCreateRequest policy( - MonitorConfigPolicyPolicyCreateRequest policy) { + public MonitorConfigPolicyAttributeCreateRequest policy(MonitorConfigPolicyPolicyCreateRequest policy) { this.policy = policy; this.unparsed |= policy.unparsed; return this; } /** - * Configuration for the policy. - * + *

Configuration for the policy.

* @return policy - */ - @JsonProperty(JSON_PROPERTY_POLICY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyPolicyCreateRequest getPolicy() { - return policy; - } - + **/ + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyPolicyCreateRequest getPolicy() { + return policy; + } public void setPolicy(MonitorConfigPolicyPolicyCreateRequest policy) { this.policy = policy; } - public MonitorConfigPolicyAttributeCreateRequest policyType(MonitorConfigPolicyType policyType) { this.policyType = policyType; this.unparsed |= !policyType.isValid(); @@ -71,24 +84,25 @@ public MonitorConfigPolicyAttributeCreateRequest policyType(MonitorConfigPolicyT } /** - * The monitor configuration policy type. - * + *

The monitor configuration policy type.

* @return policyType - */ - @JsonProperty(JSON_PROPERTY_POLICY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyType getPolicyType() { - return policyType; - } - + **/ + @JsonProperty(JSON_PROPERTY_POLICY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyType getPolicyType() { + return policyType; + } public void setPolicyType(MonitorConfigPolicyType policyType) { if (!policyType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.policyType = policyType; } - /** Return true if this MonitorConfigPolicyAttributeCreateRequest object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyAttributeCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyAttributeCreateRequest monitorConfigPolicyAttributeCreateRequest = - (MonitorConfigPolicyAttributeCreateRequest) o; - return Objects.equals(this.policy, monitorConfigPolicyAttributeCreateRequest.policy) - && Objects.equals(this.policyType, monitorConfigPolicyAttributeCreateRequest.policyType); + MonitorConfigPolicyAttributeCreateRequest monitorConfigPolicyAttributeCreateRequest = (MonitorConfigPolicyAttributeCreateRequest) o; + return Objects.equals(this.policy, monitorConfigPolicyAttributeCreateRequest.policy) && Objects.equals(this.policyType, monitorConfigPolicyAttributeCreateRequest.policyType); } + @Override public int hashCode() { - return Objects.hash(policy, policyType); + return Objects.hash(policy,policyType); } @Override @@ -119,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeEditRequest.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeEditRequest.java index 547c06c9f9d..df6b37b04b5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeEditRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeEditRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Policy and policy type for a monitor configuration policy. */ + +/** + *

Policy and policy type for a monitor configuration policy.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyAttributeEditRequest.JSON_PROPERTY_POLICY, MonitorConfigPolicyAttributeEditRequest.JSON_PROPERTY_POLICY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyAttributeEditRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_POLICY = "policy"; private MonitorConfigPolicyPolicy policy; @@ -32,15 +51,13 @@ public MonitorConfigPolicyAttributeEditRequest() {} @JsonCreator public MonitorConfigPolicyAttributeEditRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_POLICY) MonitorConfigPolicyPolicy policy, - @JsonProperty(required = true, value = JSON_PROPERTY_POLICY_TYPE) - MonitorConfigPolicyType policyType) { - this.policy = policy; - this.unparsed |= policy.unparsed; - this.policyType = policyType; - this.unparsed |= !policyType.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_POLICY)MonitorConfigPolicyPolicy policy, + @JsonProperty(required=true, value=JSON_PROPERTY_POLICY_TYPE)MonitorConfigPolicyType policyType) { + this.policy = policy; + this.unparsed |= policy.unparsed; + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); } - public MonitorConfigPolicyAttributeEditRequest policy(MonitorConfigPolicyPolicy policy) { this.policy = policy; this.unparsed |= policy.unparsed; @@ -48,20 +65,18 @@ public MonitorConfigPolicyAttributeEditRequest policy(MonitorConfigPolicyPolicy } /** - * Configuration for the policy. - * + *

Configuration for the policy.

* @return policy - */ - @JsonProperty(JSON_PROPERTY_POLICY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyPolicy getPolicy() { - return policy; - } - + **/ + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyPolicy getPolicy() { + return policy; + } public void setPolicy(MonitorConfigPolicyPolicy policy) { this.policy = policy; } - public MonitorConfigPolicyAttributeEditRequest policyType(MonitorConfigPolicyType policyType) { this.policyType = policyType; this.unparsed |= !policyType.isValid(); @@ -69,24 +84,25 @@ public MonitorConfigPolicyAttributeEditRequest policyType(MonitorConfigPolicyTyp } /** - * The monitor configuration policy type. - * + *

The monitor configuration policy type.

* @return policyType - */ - @JsonProperty(JSON_PROPERTY_POLICY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyType getPolicyType() { - return policyType; - } - + **/ + @JsonProperty(JSON_PROPERTY_POLICY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyType getPolicyType() { + return policyType; + } public void setPolicyType(MonitorConfigPolicyType policyType) { if (!policyType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.policyType = policyType; } - /** Return true if this MonitorConfigPolicyAttributeEditRequest object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyAttributeEditRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -95,15 +111,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyAttributeEditRequest monitorConfigPolicyAttributeEditRequest = - (MonitorConfigPolicyAttributeEditRequest) o; - return Objects.equals(this.policy, monitorConfigPolicyAttributeEditRequest.policy) - && Objects.equals(this.policyType, monitorConfigPolicyAttributeEditRequest.policyType); + MonitorConfigPolicyAttributeEditRequest monitorConfigPolicyAttributeEditRequest = (MonitorConfigPolicyAttributeEditRequest) o; + return Objects.equals(this.policy, monitorConfigPolicyAttributeEditRequest.policy) && Objects.equals(this.policyType, monitorConfigPolicyAttributeEditRequest.policyType); } + @Override public int hashCode() { - return Objects.hash(policy, policyType); + return Objects.hash(policy,policyType); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeResponse.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeResponse.java index 90b6a396730..a27f217b109 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyAttributeResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Policy and policy type for a monitor configuration policy. */ + +/** + *

Policy and policy type for a monitor configuration policy.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyAttributeResponse.JSON_PROPERTY_POLICY, MonitorConfigPolicyAttributeResponse.JSON_PROPERTY_POLICY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyAttributeResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_POLICY = "policy"; private MonitorConfigPolicyPolicy policy; @@ -34,21 +54,19 @@ public MonitorConfigPolicyAttributeResponse policy(MonitorConfigPolicyPolicy pol } /** - * Configuration for the policy. - * + *

Configuration for the policy.

* @return policy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POLICY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorConfigPolicyPolicy getPolicy() { - return policy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorConfigPolicyPolicy getPolicy() { + return policy; + } public void setPolicy(MonitorConfigPolicyPolicy policy) { this.policy = policy; } - public MonitorConfigPolicyAttributeResponse policyType(MonitorConfigPolicyType policyType) { this.policyType = policyType; this.unparsed |= !policyType.isValid(); @@ -56,25 +74,26 @@ public MonitorConfigPolicyAttributeResponse policyType(MonitorConfigPolicyType p } /** - * The monitor configuration policy type. - * + *

The monitor configuration policy type.

* @return policyType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POLICY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorConfigPolicyType getPolicyType() { - return policyType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorConfigPolicyType getPolicyType() { + return policyType; + } public void setPolicyType(MonitorConfigPolicyType policyType) { if (!policyType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.policyType = policyType; } - /** Return true if this MonitorConfigPolicyAttributeResponse object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyAttributeResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,15 +102,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyAttributeResponse monitorConfigPolicyAttributeResponse = - (MonitorConfigPolicyAttributeResponse) o; - return Objects.equals(this.policy, monitorConfigPolicyAttributeResponse.policy) - && Objects.equals(this.policyType, monitorConfigPolicyAttributeResponse.policyType); + MonitorConfigPolicyAttributeResponse monitorConfigPolicyAttributeResponse = (MonitorConfigPolicyAttributeResponse) o; + return Objects.equals(this.policy, monitorConfigPolicyAttributeResponse.policy) && Objects.equals(this.policyType, monitorConfigPolicyAttributeResponse.policyType); } + @Override public int hashCode() { - return Objects.hash(policy, policyType); + return Objects.hash(policy,policyType); } @Override @@ -105,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateData.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateData.java index a72c67296b9..90f716a6dd0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateData.java @@ -6,65 +6,77 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A monitor configuration policy data. */ + +/** + *

A monitor configuration policy data.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyCreateData.JSON_PROPERTY_ATTRIBUTES, MonitorConfigPolicyCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MonitorConfigPolicyAttributeCreateRequest attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private MonitorConfigPolicyResourceType type = - MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY; + private MonitorConfigPolicyResourceType type = MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY; public MonitorConfigPolicyCreateData() {} @JsonCreator public MonitorConfigPolicyCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - MonitorConfigPolicyAttributeCreateRequest attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - MonitorConfigPolicyResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)MonitorConfigPolicyAttributeCreateRequest attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MonitorConfigPolicyResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public MonitorConfigPolicyCreateData attributes( - MonitorConfigPolicyAttributeCreateRequest attributes) { + public MonitorConfigPolicyCreateData attributes(MonitorConfigPolicyAttributeCreateRequest attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Policy and policy type for a monitor configuration policy. - * + *

Policy and policy type for a monitor configuration policy.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyAttributeCreateRequest getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyAttributeCreateRequest getAttributes() { + return attributes; + } public void setAttributes(MonitorConfigPolicyAttributeCreateRequest attributes) { this.attributes = attributes; } - public MonitorConfigPolicyCreateData type(MonitorConfigPolicyResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -72,24 +84,25 @@ public MonitorConfigPolicyCreateData type(MonitorConfigPolicyResourceType type) } /** - * Monitor configuration policy resource type. - * + *

Monitor configuration policy resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyResourceType getType() { + return type; + } public void setType(MonitorConfigPolicyResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MonitorConfigPolicyCreateData object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,13 +112,13 @@ public boolean equals(Object o) { return false; } MonitorConfigPolicyCreateData monitorConfigPolicyCreateData = (MonitorConfigPolicyCreateData) o; - return Objects.equals(this.attributes, monitorConfigPolicyCreateData.attributes) - && Objects.equals(this.type, monitorConfigPolicyCreateData.type); + return Objects.equals(this.attributes, monitorConfigPolicyCreateData.attributes) && Objects.equals(this.type, monitorConfigPolicyCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -119,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateRequest.java index 668665b9d46..b67f3ddad52 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request for creating a monitor configuration policy. */ -@JsonPropertyOrder({MonitorConfigPolicyCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request for creating a monitor configuration policy.

+ */ +@JsonPropertyOrder({ + MonitorConfigPolicyCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MonitorConfigPolicyCreateData data; @@ -26,12 +47,10 @@ public MonitorConfigPolicyCreateRequest() {} @JsonCreator public MonitorConfigPolicyCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - MonitorConfigPolicyCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)MonitorConfigPolicyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public MonitorConfigPolicyCreateRequest data(MonitorConfigPolicyCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public MonitorConfigPolicyCreateRequest data(MonitorConfigPolicyCreateData data) } /** - * A monitor configuration policy data. - * + *

A monitor configuration policy data.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyCreateData getData() { + return data; + } public void setData(MonitorConfigPolicyCreateData data) { this.data = data; } - /** Return true if this MonitorConfigPolicyCreateRequest object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyCreateRequest monitorConfigPolicyCreateRequest = - (MonitorConfigPolicyCreateRequest) o; + MonitorConfigPolicyCreateRequest monitorConfigPolicyCreateRequest = (MonitorConfigPolicyCreateRequest) o; return Objects.equals(this.data, monitorConfigPolicyCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditData.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditData.java index 3e50a2c2d9f..606aba434cc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditData.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A monitor configuration policy data. */ +/** + *

A monitor configuration policy data.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyEditData.JSON_PROPERTY_ATTRIBUTES, MonitorConfigPolicyEditData.JSON_PROPERTY_ID, MonitorConfigPolicyEditData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyEditData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MonitorConfigPolicyAttributeEditRequest attributes; @@ -30,67 +49,58 @@ public class MonitorConfigPolicyEditData { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private MonitorConfigPolicyResourceType type = - MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY; + private MonitorConfigPolicyResourceType type = MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY; public MonitorConfigPolicyEditData() {} @JsonCreator public MonitorConfigPolicyEditData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - MonitorConfigPolicyAttributeEditRequest attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - MonitorConfigPolicyResourceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)MonitorConfigPolicyAttributeEditRequest attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)MonitorConfigPolicyResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - - public MonitorConfigPolicyEditData attributes( - MonitorConfigPolicyAttributeEditRequest attributes) { + public MonitorConfigPolicyEditData attributes(MonitorConfigPolicyAttributeEditRequest attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Policy and policy type for a monitor configuration policy. - * + *

Policy and policy type for a monitor configuration policy.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyAttributeEditRequest getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyAttributeEditRequest getAttributes() { + return attributes; + } public void setAttributes(MonitorConfigPolicyAttributeEditRequest attributes) { this.attributes = attributes; } - public MonitorConfigPolicyEditData id(String id) { this.id = id; return this; } /** - * ID of this monitor configuration policy. - * + *

ID of this monitor configuration policy.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MonitorConfigPolicyEditData type(MonitorConfigPolicyResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -98,24 +108,25 @@ public MonitorConfigPolicyEditData type(MonitorConfigPolicyResourceType type) { } /** - * Monitor configuration policy resource type. - * + *

Monitor configuration policy resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyResourceType getType() { + return type; + } public void setType(MonitorConfigPolicyResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MonitorConfigPolicyEditData object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyEditData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -125,14 +136,13 @@ public boolean equals(Object o) { return false; } MonitorConfigPolicyEditData monitorConfigPolicyEditData = (MonitorConfigPolicyEditData) o; - return Objects.equals(this.attributes, monitorConfigPolicyEditData.attributes) - && Objects.equals(this.id, monitorConfigPolicyEditData.id) - && Objects.equals(this.type, monitorConfigPolicyEditData.type); + return Objects.equals(this.attributes, monitorConfigPolicyEditData.attributes) && Objects.equals(this.id, monitorConfigPolicyEditData.id) && Objects.equals(this.type, monitorConfigPolicyEditData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -147,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditRequest.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditRequest.java index c2356e0983a..d9b3f43b588 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyEditRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request for editing a monitor configuration policy. */ -@JsonPropertyOrder({MonitorConfigPolicyEditRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request for editing a monitor configuration policy.

+ */ +@JsonPropertyOrder({ + MonitorConfigPolicyEditRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyEditRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MonitorConfigPolicyEditData data; @@ -26,11 +47,10 @@ public MonitorConfigPolicyEditRequest() {} @JsonCreator public MonitorConfigPolicyEditRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) MonitorConfigPolicyEditData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)MonitorConfigPolicyEditData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public MonitorConfigPolicyEditRequest data(MonitorConfigPolicyEditData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public MonitorConfigPolicyEditRequest data(MonitorConfigPolicyEditData data) { } /** - * A monitor configuration policy data. - * + *

A monitor configuration policy data.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MonitorConfigPolicyEditData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public MonitorConfigPolicyEditData getData() { + return data; + } public void setData(MonitorConfigPolicyEditData data) { this.data = data; } - /** Return true if this MonitorConfigPolicyEditRequest object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyEditRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyEditRequest monitorConfigPolicyEditRequest = - (MonitorConfigPolicyEditRequest) o; + MonitorConfigPolicyEditRequest monitorConfigPolicyEditRequest = (MonitorConfigPolicyEditRequest) o; return Objects.equals(this.data, monitorConfigPolicyEditRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyListResponse.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyListResponse.java index 92392fe38c2..55ff8909f8e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response for retrieving all monitor configuration policies. */ -@JsonPropertyOrder({MonitorConfigPolicyListResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response for retrieving all monitor configuration policies.

+ */ +@JsonPropertyOrder({ + MonitorConfigPolicyListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public MonitorConfigPolicyListResponse data(List(); @@ -41,22 +60,23 @@ public MonitorConfigPolicyListResponse addDataItem(MonitorConfigPolicyResponseDa } /** - * An array of monitor configuration policies. - * + *

An array of monitor configuration policies.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this MonitorConfigPolicyListResponse object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyListResponse monitorConfigPolicyListResponse = - (MonitorConfigPolicyListResponse) o; + MonitorConfigPolicyListResponse monitorConfigPolicyListResponse = (MonitorConfigPolicyListResponse) o; return Objects.equals(this.data, monitorConfigPolicyListResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicy.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicy.java index b82b7173103..3179871706f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicy.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicy.java @@ -6,208 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = MonitorConfigPolicyPolicy.MonitorConfigPolicyPolicyDeserializer.class) @JsonSerialize(using = MonitorConfigPolicyPolicy.MonitorConfigPolicyPolicySerializer.class) public class MonitorConfigPolicyPolicy extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(MonitorConfigPolicyPolicy.class.getName()); + private static final Logger log = Logger.getLogger(MonitorConfigPolicyPolicy.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class MonitorConfigPolicyPolicySerializer - extends StdSerializer { - public MonitorConfigPolicyPolicySerializer(Class t) { - super(t); + public static class MonitorConfigPolicyPolicySerializer extends StdSerializer { + public MonitorConfigPolicyPolicySerializer(Class t) { + super(t); + } + + public MonitorConfigPolicyPolicySerializer() { + this(null); + } + + @Override + public void serialize(MonitorConfigPolicyPolicy value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public MonitorConfigPolicyPolicySerializer() { - this(null); + public static class MonitorConfigPolicyPolicyDeserializer extends StdDeserializer { + public MonitorConfigPolicyPolicyDeserializer() { + this(MonitorConfigPolicyPolicy.class); + } + + public MonitorConfigPolicyPolicyDeserializer(Class vc) { + super(vc); + } + + @Override + public MonitorConfigPolicyPolicy 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 MonitorConfigPolicyTagPolicy + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MonitorConfigPolicyTagPolicy.class.equals(Integer.class) || MonitorConfigPolicyTagPolicy.class.equals(Long.class) || MonitorConfigPolicyTagPolicy.class.equals(Float.class) || MonitorConfigPolicyTagPolicy.class.equals(Double.class) || MonitorConfigPolicyTagPolicy.class.equals(Boolean.class) || MonitorConfigPolicyTagPolicy.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MonitorConfigPolicyTagPolicy.class.equals(Integer.class) || MonitorConfigPolicyTagPolicy.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MonitorConfigPolicyTagPolicy.class.equals(Float.class) || MonitorConfigPolicyTagPolicy.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MonitorConfigPolicyTagPolicy.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MonitorConfigPolicyTagPolicy.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MonitorConfigPolicyTagPolicy.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 (!((MonitorConfigPolicyTagPolicy)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MonitorConfigPolicyTagPolicy'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MonitorConfigPolicyTagPolicy'", e); + } + + MonitorConfigPolicyPolicy ret = new MonitorConfigPolicyPolicy(); + 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 MonitorConfigPolicyPolicy getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "MonitorConfigPolicyPolicy cannot be null"); + } } - @Override - public void serialize( - MonitorConfigPolicyPolicy value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public MonitorConfigPolicyPolicy() { + super("oneOf", Boolean.FALSE); + } + public MonitorConfigPolicyPolicy(MonitorConfigPolicyTagPolicy o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class MonitorConfigPolicyPolicyDeserializer - extends StdDeserializer { - public MonitorConfigPolicyPolicyDeserializer() { - this(MonitorConfigPolicyPolicy.class); + static { + schemas.put("MonitorConfigPolicyTagPolicy", new GenericType() { + }); + JSON.registerDescendants(MonitorConfigPolicyPolicy.class, Collections.unmodifiableMap(schemas)); } - public MonitorConfigPolicyPolicyDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return MonitorConfigPolicyPolicy.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MonitorConfigPolicyTagPolicy + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public MonitorConfigPolicyPolicy 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 MonitorConfigPolicyTagPolicy - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MonitorConfigPolicyTagPolicy.class.equals(Integer.class) - || MonitorConfigPolicyTagPolicy.class.equals(Long.class) - || MonitorConfigPolicyTagPolicy.class.equals(Float.class) - || MonitorConfigPolicyTagPolicy.class.equals(Double.class) - || MonitorConfigPolicyTagPolicy.class.equals(Boolean.class) - || MonitorConfigPolicyTagPolicy.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MonitorConfigPolicyTagPolicy.class.equals(Integer.class) - || MonitorConfigPolicyTagPolicy.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MonitorConfigPolicyTagPolicy.class.equals(Float.class) - || MonitorConfigPolicyTagPolicy.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MonitorConfigPolicyTagPolicy.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MonitorConfigPolicyTagPolicy.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MonitorConfigPolicyTagPolicy.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MonitorConfigPolicyTagPolicy.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 (!((MonitorConfigPolicyTagPolicy) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MonitorConfigPolicyTagPolicy'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'MonitorConfigPolicyTagPolicy'", e); - } - - MonitorConfigPolicyPolicy ret = new MonitorConfigPolicyPolicy(); - 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; + throw new RuntimeException("Invalid instance type. Must be MonitorConfigPolicyTagPolicy"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * MonitorConfigPolicyTagPolicy + * + * @return The actual instance (MonitorConfigPolicyTagPolicy) + */ @Override - public MonitorConfigPolicyPolicy getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "MonitorConfigPolicyPolicy cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public MonitorConfigPolicyPolicy() { - super("oneOf", Boolean.FALSE); - } - - public MonitorConfigPolicyPolicy(MonitorConfigPolicyTagPolicy o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MonitorConfigPolicyTagPolicy", new GenericType() {}); - JSON.registerDescendants(MonitorConfigPolicyPolicy.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return MonitorConfigPolicyPolicy.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MonitorConfigPolicyTagPolicy - * - *

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(MonitorConfigPolicyTagPolicy.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MonitorConfigPolicyTagPolicy`. If the actual instance is not `MonitorConfigPolicyTagPolicy`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MonitorConfigPolicyTagPolicy` + * @throws ClassCastException if the instance is not `MonitorConfigPolicyTagPolicy` + */ + public MonitorConfigPolicyTagPolicy getMonitorConfigPolicyTagPolicy() throws ClassCastException { + return (MonitorConfigPolicyTagPolicy)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be MonitorConfigPolicyTagPolicy"); - } - - /** - * Get the actual instance, which can be the following: MonitorConfigPolicyTagPolicy - * - * @return The actual instance (MonitorConfigPolicyTagPolicy) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MonitorConfigPolicyTagPolicy`. If the actual instance is not - * `MonitorConfigPolicyTagPolicy`, the ClassCastException will be thrown. - * - * @return The actual instance of `MonitorConfigPolicyTagPolicy` - * @throws ClassCastException if the instance is not `MonitorConfigPolicyTagPolicy` - */ - public MonitorConfigPolicyTagPolicy getMonitorConfigPolicyTagPolicy() throws ClassCastException { - return (MonitorConfigPolicyTagPolicy) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicyCreateRequest.java index f67122bc389..189d4b35b9d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicyCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyPolicyCreateRequest.java @@ -6,231 +6,211 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - MonitorConfigPolicyPolicyCreateRequest.MonitorConfigPolicyPolicyCreateRequestDeserializer - .class) -@JsonSerialize( - using = - MonitorConfigPolicyPolicyCreateRequest.MonitorConfigPolicyPolicyCreateRequestSerializer - .class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = MonitorConfigPolicyPolicyCreateRequest.MonitorConfigPolicyPolicyCreateRequestDeserializer.class) +@JsonSerialize(using = MonitorConfigPolicyPolicyCreateRequest.MonitorConfigPolicyPolicyCreateRequestSerializer.class) public class MonitorConfigPolicyPolicyCreateRequest extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(MonitorConfigPolicyPolicyCreateRequest.class.getName()); + private static final Logger log = Logger.getLogger(MonitorConfigPolicyPolicyCreateRequest.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class MonitorConfigPolicyPolicyCreateRequestSerializer - extends StdSerializer { - public MonitorConfigPolicyPolicyCreateRequestSerializer( - Class t) { - super(t); + public static class MonitorConfigPolicyPolicyCreateRequestSerializer extends StdSerializer { + public MonitorConfigPolicyPolicyCreateRequestSerializer(Class t) { + super(t); + } + + public MonitorConfigPolicyPolicyCreateRequestSerializer() { + this(null); + } + + @Override + public void serialize(MonitorConfigPolicyPolicyCreateRequest value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public MonitorConfigPolicyPolicyCreateRequestSerializer() { - this(null); + public static class MonitorConfigPolicyPolicyCreateRequestDeserializer extends StdDeserializer { + public MonitorConfigPolicyPolicyCreateRequestDeserializer() { + this(MonitorConfigPolicyPolicyCreateRequest.class); + } + + public MonitorConfigPolicyPolicyCreateRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public MonitorConfigPolicyPolicyCreateRequest 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 MonitorConfigPolicyTagPolicyCreateRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Integer.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Long.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Float.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Double.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Boolean.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Integer.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Float.class) || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MonitorConfigPolicyTagPolicyCreateRequest.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MonitorConfigPolicyTagPolicyCreateRequest.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 (!((MonitorConfigPolicyTagPolicyCreateRequest)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MonitorConfigPolicyTagPolicyCreateRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MonitorConfigPolicyTagPolicyCreateRequest'", e); + } + + MonitorConfigPolicyPolicyCreateRequest ret = new MonitorConfigPolicyPolicyCreateRequest(); + 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 MonitorConfigPolicyPolicyCreateRequest getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "MonitorConfigPolicyPolicyCreateRequest cannot be null"); + } } - @Override - public void serialize( - MonitorConfigPolicyPolicyCreateRequest value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public MonitorConfigPolicyPolicyCreateRequest() { + super("oneOf", Boolean.FALSE); + } + public MonitorConfigPolicyPolicyCreateRequest(MonitorConfigPolicyTagPolicyCreateRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class MonitorConfigPolicyPolicyCreateRequestDeserializer - extends StdDeserializer { - public MonitorConfigPolicyPolicyCreateRequestDeserializer() { - this(MonitorConfigPolicyPolicyCreateRequest.class); + static { + schemas.put("MonitorConfigPolicyTagPolicyCreateRequest", new GenericType() { + }); + JSON.registerDescendants(MonitorConfigPolicyPolicyCreateRequest.class, Collections.unmodifiableMap(schemas)); } - public MonitorConfigPolicyPolicyCreateRequestDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return MonitorConfigPolicyPolicyCreateRequest.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MonitorConfigPolicyTagPolicyCreateRequest + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public MonitorConfigPolicyPolicyCreateRequest 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 MonitorConfigPolicyTagPolicyCreateRequest - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Integer.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Long.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Float.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Double.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Boolean.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Integer.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Float.class) - || MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MonitorConfigPolicyTagPolicyCreateRequest.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MonitorConfigPolicyTagPolicyCreateRequest.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MonitorConfigPolicyTagPolicyCreateRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(MonitorConfigPolicyTagPolicyCreateRequest.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 (!((MonitorConfigPolicyTagPolicyCreateRequest) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'MonitorConfigPolicyTagPolicyCreateRequest'"); + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'MonitorConfigPolicyTagPolicyCreateRequest'", - e); - } - - MonitorConfigPolicyPolicyCreateRequest ret = new MonitorConfigPolicyPolicyCreateRequest(); - 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; + throw new RuntimeException("Invalid instance type. Must be MonitorConfigPolicyTagPolicyCreateRequest"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * MonitorConfigPolicyTagPolicyCreateRequest + * + * @return The actual instance (MonitorConfigPolicyTagPolicyCreateRequest) + */ @Override - public MonitorConfigPolicyPolicyCreateRequest getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "MonitorConfigPolicyPolicyCreateRequest cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public MonitorConfigPolicyPolicyCreateRequest() { - super("oneOf", Boolean.FALSE); - } - - public MonitorConfigPolicyPolicyCreateRequest(MonitorConfigPolicyTagPolicyCreateRequest o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "MonitorConfigPolicyTagPolicyCreateRequest", - new GenericType() {}); - JSON.registerDescendants( - MonitorConfigPolicyPolicyCreateRequest.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return MonitorConfigPolicyPolicyCreateRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MonitorConfigPolicyTagPolicyCreateRequest - * - *

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( - MonitorConfigPolicyTagPolicyCreateRequest.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + public Object getActualInstance() { + return super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MonitorConfigPolicyTagPolicyCreateRequest`. If the actual instance is not `MonitorConfigPolicyTagPolicyCreateRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MonitorConfigPolicyTagPolicyCreateRequest` + * @throws ClassCastException if the instance is not `MonitorConfigPolicyTagPolicyCreateRequest` + */ + public MonitorConfigPolicyTagPolicyCreateRequest getMonitorConfigPolicyTagPolicyCreateRequest() throws ClassCastException { + return (MonitorConfigPolicyTagPolicyCreateRequest)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be MonitorConfigPolicyTagPolicyCreateRequest"); - } - - /** - * Get the actual instance, which can be the following: MonitorConfigPolicyTagPolicyCreateRequest - * - * @return The actual instance (MonitorConfigPolicyTagPolicyCreateRequest) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MonitorConfigPolicyTagPolicyCreateRequest`. If the actual instance - * is not `MonitorConfigPolicyTagPolicyCreateRequest`, the ClassCastException will be thrown. - * - * @return The actual instance of `MonitorConfigPolicyTagPolicyCreateRequest` - * @throws ClassCastException if the instance is not `MonitorConfigPolicyTagPolicyCreateRequest` - */ - public MonitorConfigPolicyTagPolicyCreateRequest getMonitorConfigPolicyTagPolicyCreateRequest() - throws ClassCastException { - return (MonitorConfigPolicyTagPolicyCreateRequest) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResourceType.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResourceType.java index f6c9654fecf..b7e764fc4d3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResourceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResourceType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Monitor configuration policy resource type. */ -@JsonSerialize( - using = MonitorConfigPolicyResourceType.MonitorConfigPolicyResourceTypeSerializer.class) +/** + *

Monitor configuration policy resource type.

+ */ +@JsonSerialize(using = MonitorConfigPolicyResourceType.MonitorConfigPolicyResourceTypeSerializer.class) public class MonitorConfigPolicyResourceType { - public static final MonitorConfigPolicyResourceType MONITOR_CONFIG_POLICY = - new MonitorConfigPolicyResourceType("monitor-config-policy"); + public static final MonitorConfigPolicyResourceType MONITOR_CONFIG_POLICY = new MonitorConfigPolicyResourceType("monitor-config-policy"); - private static final Set allowedValues = - new HashSet(Arrays.asList("monitor-config-policy")); + private static final Set allowedValues = new HashSet(Arrays.asList("monitor-config-policy")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorConfigPolicyResourceTypeSerializer - extends StdSerializer { - public MonitorConfigPolicyResourceTypeSerializer(Class t) { - super(t); - } + public static class MonitorConfigPolicyResourceTypeSerializer extends StdSerializer { + public MonitorConfigPolicyResourceTypeSerializer(Class t) { + super(t); + } - public MonitorConfigPolicyResourceTypeSerializer() { - this(null); - } + public MonitorConfigPolicyResourceTypeSerializer() { + this(null); + } - @Override - public void serialize( - MonitorConfigPolicyResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorConfigPolicyResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorConfigPolicyResourceType object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponse.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponse.java index 636c4db789c..36d3f54b206 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response for retrieving a monitor configuration policy. */ -@JsonPropertyOrder({MonitorConfigPolicyResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response for retrieving a monitor configuration policy.

+ */ +@JsonPropertyOrder({ + MonitorConfigPolicyResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private MonitorConfigPolicyResponseData data; @@ -28,22 +50,23 @@ public MonitorConfigPolicyResponse data(MonitorConfigPolicyResponseData data) { } /** - * A monitor configuration policy data. - * + *

A monitor configuration policy data.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorConfigPolicyResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorConfigPolicyResponseData getData() { + return data; + } public void setData(MonitorConfigPolicyResponseData data) { this.data = data; } - /** Return true if this MonitorConfigPolicyResponse object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, monitorConfigPolicyResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponseData.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponseData.java index 0ca2a6296b3..3b57a7a5e11 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyResponseData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A monitor configuration policy data. */ + +/** + *

A monitor configuration policy data.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyResponseData.JSON_PROPERTY_ATTRIBUTES, MonitorConfigPolicyResponseData.JSON_PROPERTY_ID, MonitorConfigPolicyResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private MonitorConfigPolicyAttributeResponse attributes; @@ -29,53 +49,47 @@ public class MonitorConfigPolicyResponseData { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private MonitorConfigPolicyResourceType type = - MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY; + private MonitorConfigPolicyResourceType type = MonitorConfigPolicyResourceType.MONITOR_CONFIG_POLICY; - public MonitorConfigPolicyResponseData attributes( - MonitorConfigPolicyAttributeResponse attributes) { + public MonitorConfigPolicyResponseData attributes(MonitorConfigPolicyAttributeResponse attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Policy and policy type for a monitor configuration policy. - * + *

Policy and policy type for a monitor configuration policy.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorConfigPolicyAttributeResponse getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorConfigPolicyAttributeResponse getAttributes() { + return attributes; + } public void setAttributes(MonitorConfigPolicyAttributeResponse attributes) { this.attributes = attributes; } - public MonitorConfigPolicyResponseData id(String id) { this.id = id; return this; } /** - * ID of this monitor configuration policy. - * + *

ID of this monitor configuration policy.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public MonitorConfigPolicyResponseData type(MonitorConfigPolicyResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -83,25 +97,26 @@ public MonitorConfigPolicyResponseData type(MonitorConfigPolicyResourceType type } /** - * Monitor configuration policy resource type. - * + *

Monitor configuration policy resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public MonitorConfigPolicyResourceType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public MonitorConfigPolicyResourceType getType() { + return type; + } public void setType(MonitorConfigPolicyResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this MonitorConfigPolicyResponseData object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,16 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyResponseData monitorConfigPolicyResponseData = - (MonitorConfigPolicyResponseData) o; - return Objects.equals(this.attributes, monitorConfigPolicyResponseData.attributes) - && Objects.equals(this.id, monitorConfigPolicyResponseData.id) - && Objects.equals(this.type, monitorConfigPolicyResponseData.type); + MonitorConfigPolicyResponseData monitorConfigPolicyResponseData = (MonitorConfigPolicyResponseData) o; + return Objects.equals(this.attributes, monitorConfigPolicyResponseData.attributes) && Objects.equals(this.id, monitorConfigPolicyResponseData.id) && Objects.equals(this.type, monitorConfigPolicyResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -134,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicy.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicy.java index 0d807c91629..555fd4bd21f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicy.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicy.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Tag attributes of a monitor configuration policy. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Tag attributes of a monitor configuration policy.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyTagPolicy.JSON_PROPERTY_TAG_KEY, MonitorConfigPolicyTagPolicy.JSON_PROPERTY_TAG_KEY_REQUIRED, MonitorConfigPolicyTagPolicy.JSON_PROPERTY_VALID_TAG_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyTagPolicy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; private String tagKey; @@ -39,47 +57,42 @@ public MonitorConfigPolicyTagPolicy tagKey(String tagKey) { } /** - * The key of the tag. - * + *

The key of the tag.

* @return tagKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTagKey() { - return tagKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTagKey() { + return tagKey; + } public void setTagKey(String tagKey) { this.tagKey = tagKey; } - public MonitorConfigPolicyTagPolicy tagKeyRequired(Boolean tagKeyRequired) { this.tagKeyRequired = tagKeyRequired; return this; } /** - * If a tag key is required for monitor creation. - * + *

If a tag key is required for monitor creation.

* @return tagKeyRequired - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAG_KEY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTagKeyRequired() { - return tagKeyRequired; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_KEY_REQUIRED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTagKeyRequired() { + return tagKeyRequired; + } public void setTagKeyRequired(Boolean tagKeyRequired) { this.tagKeyRequired = tagKeyRequired; } - public MonitorConfigPolicyTagPolicy validTagValues(List validTagValues) { this.validTagValues = validTagValues; return this; } - public MonitorConfigPolicyTagPolicy addValidTagValuesItem(String validTagValuesItem) { if (this.validTagValues == null) { this.validTagValues = new ArrayList<>(); @@ -89,22 +102,23 @@ public MonitorConfigPolicyTagPolicy addValidTagValuesItem(String validTagValuesI } /** - * Valid values for the tag. - * + *

Valid values for the tag.

* @return validTagValues - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALID_TAG_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getValidTagValues() { - return validTagValues; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALID_TAG_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getValidTagValues() { + return validTagValues; + } public void setValidTagValues(List validTagValues) { this.validTagValues = validTagValues; } - /** Return true if this MonitorConfigPolicyTagPolicy object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyTagPolicy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -114,14 +128,13 @@ public boolean equals(Object o) { return false; } MonitorConfigPolicyTagPolicy monitorConfigPolicyTagPolicy = (MonitorConfigPolicyTagPolicy) o; - return Objects.equals(this.tagKey, monitorConfigPolicyTagPolicy.tagKey) - && Objects.equals(this.tagKeyRequired, monitorConfigPolicyTagPolicy.tagKeyRequired) - && Objects.equals(this.validTagValues, monitorConfigPolicyTagPolicy.validTagValues); + return Objects.equals(this.tagKey, monitorConfigPolicyTagPolicy.tagKey) && Objects.equals(this.tagKeyRequired, monitorConfigPolicyTagPolicy.tagKeyRequired) && Objects.equals(this.validTagValues, monitorConfigPolicyTagPolicy.validTagValues); } + @Override public int hashCode() { - return Objects.hash(tagKey, tagKeyRequired, validTagValues); + return Objects.hash(tagKey,tagKeyRequired,validTagValues); } @Override @@ -136,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicyCreateRequest.java index f1c06db5932..339b6770bb0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicyCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyTagPolicyCreateRequest.java @@ -6,25 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Tag attributes of a monitor configuration policy. */ + +/** + *

Tag attributes of a monitor configuration policy.

+ */ @JsonPropertyOrder({ MonitorConfigPolicyTagPolicyCreateRequest.JSON_PROPERTY_TAG_KEY, MonitorConfigPolicyTagPolicyCreateRequest.JSON_PROPERTY_TAG_KEY_REQUIRED, MonitorConfigPolicyTagPolicyCreateRequest.JSON_PROPERTY_VALID_TAG_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorConfigPolicyTagPolicyCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; private String tagKey; @@ -38,82 +55,75 @@ public MonitorConfigPolicyTagPolicyCreateRequest() {} @JsonCreator public MonitorConfigPolicyTagPolicyCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_TAG_KEY) String tagKey, - @JsonProperty(required = true, value = JSON_PROPERTY_TAG_KEY_REQUIRED) Boolean tagKeyRequired, - @JsonProperty(required = true, value = JSON_PROPERTY_VALID_TAG_VALUES) - List validTagValues) { - this.tagKey = tagKey; - this.tagKeyRequired = tagKeyRequired; - this.validTagValues = validTagValues; + @JsonProperty(required=true, value=JSON_PROPERTY_TAG_KEY)String tagKey, + @JsonProperty(required=true, value=JSON_PROPERTY_TAG_KEY_REQUIRED)Boolean tagKeyRequired, + @JsonProperty(required=true, value=JSON_PROPERTY_VALID_TAG_VALUES)List validTagValues) { + this.tagKey = tagKey; + this.tagKeyRequired = tagKeyRequired; + this.validTagValues = validTagValues; } - public MonitorConfigPolicyTagPolicyCreateRequest tagKey(String tagKey) { this.tagKey = tagKey; return this; } /** - * The key of the tag. - * + *

The key of the tag.

* @return tagKey - */ - @JsonProperty(JSON_PROPERTY_TAG_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTagKey() { - return tagKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAG_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getTagKey() { + return tagKey; + } public void setTagKey(String tagKey) { this.tagKey = tagKey; } - public MonitorConfigPolicyTagPolicyCreateRequest tagKeyRequired(Boolean tagKeyRequired) { this.tagKeyRequired = tagKeyRequired; return this; } /** - * If a tag key is required for monitor creation. - * + *

If a tag key is required for monitor creation.

* @return tagKeyRequired - */ - @JsonProperty(JSON_PROPERTY_TAG_KEY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getTagKeyRequired() { - return tagKeyRequired; - } - + **/ + @JsonProperty(JSON_PROPERTY_TAG_KEY_REQUIRED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getTagKeyRequired() { + return tagKeyRequired; + } public void setTagKeyRequired(Boolean tagKeyRequired) { this.tagKeyRequired = tagKeyRequired; } - public MonitorConfigPolicyTagPolicyCreateRequest validTagValues(List validTagValues) { this.validTagValues = validTagValues; return this; } - - public MonitorConfigPolicyTagPolicyCreateRequest addValidTagValuesItem( - String validTagValuesItem) { + public MonitorConfigPolicyTagPolicyCreateRequest addValidTagValuesItem(String validTagValuesItem) { this.validTagValues.add(validTagValuesItem); return this; } /** - * Valid values for the tag. - * + *

Valid values for the tag.

* @return validTagValues - */ - @JsonProperty(JSON_PROPERTY_VALID_TAG_VALUES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getValidTagValues() { - return validTagValues; - } - + **/ + @JsonProperty(JSON_PROPERTY_VALID_TAG_VALUES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getValidTagValues() { + return validTagValues; + } public void setValidTagValues(List validTagValues) { this.validTagValues = validTagValues; } - /** Return true if this MonitorConfigPolicyTagPolicyCreateRequest object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyTagPolicyCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,18 +132,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MonitorConfigPolicyTagPolicyCreateRequest monitorConfigPolicyTagPolicyCreateRequest = - (MonitorConfigPolicyTagPolicyCreateRequest) o; - return Objects.equals(this.tagKey, monitorConfigPolicyTagPolicyCreateRequest.tagKey) - && Objects.equals( - this.tagKeyRequired, monitorConfigPolicyTagPolicyCreateRequest.tagKeyRequired) - && Objects.equals( - this.validTagValues, monitorConfigPolicyTagPolicyCreateRequest.validTagValues); + MonitorConfigPolicyTagPolicyCreateRequest monitorConfigPolicyTagPolicyCreateRequest = (MonitorConfigPolicyTagPolicyCreateRequest) o; + return Objects.equals(this.tagKey, monitorConfigPolicyTagPolicyCreateRequest.tagKey) && Objects.equals(this.tagKeyRequired, monitorConfigPolicyTagPolicyCreateRequest.tagKeyRequired) && Objects.equals(this.validTagValues, monitorConfigPolicyTagPolicyCreateRequest.validTagValues); } + @Override public int hashCode() { - return Objects.hash(tagKey, tagKeyRequired, validTagValues); + return Objects.hash(tagKey,tagKeyRequired,validTagValues); } @Override @@ -148,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyType.java b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyType.java index 0fbd28dcdca..d059d51797b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorConfigPolicyType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The monitor configuration policy type. */ +/** + *

The monitor configuration policy type.

+ */ @JsonSerialize(using = MonitorConfigPolicyType.MonitorConfigPolicyTypeSerializer.class) public class MonitorConfigPolicyType { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class MonitorConfigPolicyTypeSerializer - extends StdSerializer { - public MonitorConfigPolicyTypeSerializer(Class t) { - super(t); - } + public static class MonitorConfigPolicyTypeSerializer extends StdSerializer { + public MonitorConfigPolicyTypeSerializer(Class t) { + super(t); + } - public MonitorConfigPolicyTypeSerializer() { - this(null); - } + public MonitorConfigPolicyTypeSerializer() { + this(null); + } - @Override - public void serialize( - MonitorConfigPolicyType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(MonitorConfigPolicyType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this MonitorConfigPolicyType object is equal to o. */ + /** + * Return true if this MonitorConfigPolicyType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/MonitorType.java b/src/main/java/com/datadog/api/client/v2/model/MonitorType.java index d8a8db01869..a12c931031d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MonitorType.java +++ b/src/main/java/com/datadog/api/client/v2/model/MonitorType.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes from the monitor that triggered the event. */ + +/** + *

Attributes from the monitor that triggered the event.

+ */ @JsonPropertyOrder({ MonitorType.JSON_PROPERTY_CREATED_AT, MonitorType.JSON_PROPERTY_GROUP_STATUS, @@ -28,10 +46,10 @@ MonitorType.JSON_PROPERTY_TEMPLATED_NAME, MonitorType.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorType { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private Long createdAt; @@ -71,47 +89,43 @@ public MonitorType createdAt(Long createdAt) { } /** - * The POSIX timestamp of the monitor's creation in nanoseconds. - * + *

The POSIX timestamp of the monitor's creation in nanoseconds.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } public void setCreatedAt(Long createdAt) { this.createdAt = createdAt; } - public MonitorType groupStatus(Integer groupStatus) { this.groupStatus = groupStatus; return this; } /** - * Monitor group status used when there is no result_groups. maximum: 2147483647 - * + *

Monitor group status used when there is no result_groups.

+ * maximum: 2147483647 * @return groupStatus - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getGroupStatus() { - return groupStatus; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getGroupStatus() { + return groupStatus; + } public void setGroupStatus(Integer groupStatus) { this.groupStatus = groupStatus; } - public MonitorType groups(List groups) { this.groups = groups; return this; } - public MonitorType addGroupsItem(String groupsItem) { if (this.groups == null) { this.groups = new ArrayList<>(); @@ -121,131 +135,118 @@ public MonitorType addGroupsItem(String groupsItem) { } /** - * Groups to which the monitor belongs. - * + *

Groups to which the monitor belongs.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } public void setGroups(List groups) { this.groups = groups; } - public MonitorType id(Long id) { this.id = id; return this; } /** - * The monitor ID. - * + *

The monitor ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public MonitorType message(String message) { this.message = message; return this; } /** - * The monitor message. - * + *

The monitor message.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public MonitorType modified(Long modified) { this.modified = modified; return this; } /** - * The monitor's last-modified timestamp. - * + *

The monitor's last-modified timestamp.

* @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getModified() { - return modified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getModified() { + return modified; + } public void setModified(Long modified) { this.modified = modified; } - public MonitorType name(String name) { this.name = name; return this; } /** - * The monitor name. - * + *

The monitor name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public MonitorType query(String query) { this.query = query; return this; } /** - * The query that triggers the alert. - * + *

The query that triggers the alert.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public MonitorType tags(List tags) { this.tags = tags; return this; } - public MonitorType addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -255,64 +256,61 @@ public MonitorType addTagsItem(String tagsItem) { } /** - * A list of tags attached to the monitor. - * + *

A list of tags attached to the monitor.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public MonitorType templatedName(String templatedName) { this.templatedName = templatedName; return this; } /** - * The templated name of the monitor before resolving any template variables. - * + *

The templated name of the monitor before resolving any template variables.

* @return templatedName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEMPLATED_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTemplatedName() { - return templatedName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATED_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplatedName() { + return templatedName; + } public void setTemplatedName(String templatedName) { this.templatedName = templatedName; } - public MonitorType type(String type) { this.type = type; return this; } /** - * The monitor type. - * + *

The monitor type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this MonitorType object is equal to o. */ + /** + * Return true if this MonitorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -322,33 +320,13 @@ public boolean equals(Object o) { return false; } MonitorType monitorType = (MonitorType) o; - return Objects.equals(this.createdAt, monitorType.createdAt) - && Objects.equals(this.groupStatus, monitorType.groupStatus) - && Objects.equals(this.groups, monitorType.groups) - && Objects.equals(this.id, monitorType.id) - && Objects.equals(this.message, monitorType.message) - && Objects.equals(this.modified, monitorType.modified) - && Objects.equals(this.name, monitorType.name) - && Objects.equals(this.query, monitorType.query) - && Objects.equals(this.tags, monitorType.tags) - && Objects.equals(this.templatedName, monitorType.templatedName) - && Objects.equals(this.type, monitorType.type); + return Objects.equals(this.createdAt, monitorType.createdAt) && Objects.equals(this.groupStatus, monitorType.groupStatus) && Objects.equals(this.groups, monitorType.groups) && Objects.equals(this.id, monitorType.id) && Objects.equals(this.message, monitorType.message) && Objects.equals(this.modified, monitorType.modified) && Objects.equals(this.name, monitorType.name) && Objects.equals(this.query, monitorType.query) && Objects.equals(this.tags, monitorType.tags) && Objects.equals(this.templatedName, monitorType.templatedName) && Objects.equals(this.type, monitorType.type); } + @Override public int hashCode() { - return Objects.hash( - createdAt, - groupStatus, - groups, - id, - message, - modified, - name, - query, - tags, - templatedName, - type); + return Objects.hash(createdAt,groupStatus,groups,id,message,modified,name,query,tags,templatedName,type); } @Override @@ -371,7 +349,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUser.java b/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUser.java index de9c136cab1..fefd36ec28a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUser.java +++ b/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUser.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to user. */ -@JsonPropertyOrder({NullableRelationshipToUser.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relationship to user.

+ */ +@JsonPropertyOrder({ + NullableRelationshipToUser.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NullableRelationshipToUser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private NullableRelationshipToUserData data; @@ -26,39 +47,38 @@ public NullableRelationshipToUser() {} @JsonCreator public NullableRelationshipToUser( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - NullableRelationshipToUserData data) { - this.data = data; - if (data != null) { - this.unparsed |= data.unparsed; - } + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)NullableRelationshipToUserData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } } - public NullableRelationshipToUser data(NullableRelationshipToUserData data) { this.data = data; - if (data != null) { - this.unparsed |= data.unparsed; + if (data != null) { + this.unparsed |= data.unparsed; } return this; } /** - * Relationship to user object. - * + *

Relationship to user object.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NullableRelationshipToUserData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public NullableRelationshipToUserData getData() { + return data; + } public void setData(NullableRelationshipToUserData data) { this.data = data; } - /** Return true if this NullableRelationshipToUser object is equal to o. */ + /** + * Return true if this NullableRelationshipToUser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -71,6 +91,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, nullableRelationshipToUser.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -86,7 +107,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUserData.java b/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUserData.java index 5a5f5edd5fd..04a7923d055 100644 --- a/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUserData.java +++ b/src/main/java/com/datadog/api/client/v2/model/NullableRelationshipToUserData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to user object. */ + +/** + *

Relationship to user object.

+ */ @JsonPropertyOrder({ NullableRelationshipToUserData.JSON_PROPERTY_ID, NullableRelationshipToUserData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class NullableRelationshipToUserData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public NullableRelationshipToUserData() {} @JsonCreator public NullableRelationshipToUserData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UsersType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)UsersType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public NullableRelationshipToUserData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the user. - * + *

A unique identifier that represents the user.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public NullableRelationshipToUserData type(UsersType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public NullableRelationshipToUserData type(UsersType type) { } /** - * Users resource type. - * + *

Users resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UsersType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UsersType getType() { + return type; + } public void setType(UsersType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this NullableRelationshipToUserData object is equal to o. */ + /** + * Return true if this NullableRelationshipToUserData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NullableRelationshipToUserData nullableRelationshipToUserData = - (NullableRelationshipToUserData) o; - return Objects.equals(this.id, nullableRelationshipToUserData.id) - && Objects.equals(this.type, nullableRelationshipToUserData.type); + NullableRelationshipToUserData nullableRelationshipToUserData = (NullableRelationshipToUserData) o; + return Objects.equals(this.id, nullableRelationshipToUserData.id) && Objects.equals(this.type, nullableRelationshipToUserData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java index 36f9dd5468c..5759c40a612 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java +++ b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCap.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** On-demand concurrency cap. */ -@JsonPropertyOrder({OnDemandConcurrencyCap.JSON_PROPERTY_ATTRIBUTES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

On-demand concurrency cap.

+ */ +@JsonPropertyOrder({ + OnDemandConcurrencyCap.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OnDemandConcurrencyCap { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private OnDemandConcurrencyCapAttributes attributes; @@ -28,22 +50,23 @@ public OnDemandConcurrencyCap attributes(OnDemandConcurrencyCapAttributes attrib } /** - * On-demand concurrency cap attributes. - * + *

On-demand concurrency cap attributes.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OnDemandConcurrencyCapAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OnDemandConcurrencyCapAttributes getAttributes() { + return attributes; + } public void setAttributes(OnDemandConcurrencyCapAttributes attributes) { this.attributes = attributes; } - /** Return true if this OnDemandConcurrencyCap object is equal to o. */ + /** + * Return true if this OnDemandConcurrencyCap object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.attributes, onDemandConcurrencyCap.attributes); } + @Override public int hashCode() { return Objects.hash(attributes); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapAttributes.java index 55cf6732bfb..f7b4248d637 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapAttributes.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** On-demand concurrency cap attributes. */ -@JsonPropertyOrder({OnDemandConcurrencyCapAttributes.JSON_PROPERTY_ON_DEMAND_CONCURRENCY_CAP}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

On-demand concurrency cap attributes.

+ */ +@JsonPropertyOrder({ + OnDemandConcurrencyCapAttributes.JSON_PROPERTY_ON_DEMAND_CONCURRENCY_CAP +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OnDemandConcurrencyCapAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ON_DEMAND_CONCURRENCY_CAP = "on_demand_concurrency_cap"; private Double onDemandConcurrencyCap; @@ -27,22 +49,23 @@ public OnDemandConcurrencyCapAttributes onDemandConcurrencyCap(Double onDemandCo } /** - * Value of the on-demand concurrency cap. - * + *

Value of the on-demand concurrency cap.

* @return onDemandConcurrencyCap - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ON_DEMAND_CONCURRENCY_CAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getOnDemandConcurrencyCap() { - return onDemandConcurrencyCap; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ON_DEMAND_CONCURRENCY_CAP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getOnDemandConcurrencyCap() { + return onDemandConcurrencyCap; + } public void setOnDemandConcurrencyCap(Double onDemandConcurrencyCap) { this.onDemandConcurrencyCap = onDemandConcurrencyCap; } - /** Return true if this OnDemandConcurrencyCapAttributes object is equal to o. */ + /** + * Return true if this OnDemandConcurrencyCapAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,12 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OnDemandConcurrencyCapAttributes onDemandConcurrencyCapAttributes = - (OnDemandConcurrencyCapAttributes) o; - return Objects.equals( - this.onDemandConcurrencyCap, onDemandConcurrencyCapAttributes.onDemandConcurrencyCap); + OnDemandConcurrencyCapAttributes onDemandConcurrencyCapAttributes = (OnDemandConcurrencyCapAttributes) o; + return Objects.equals(this.onDemandConcurrencyCap, onDemandConcurrencyCapAttributes.onDemandConcurrencyCap); } + @Override public int hashCode() { return Objects.hash(onDemandConcurrencyCap); @@ -66,15 +88,14 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OnDemandConcurrencyCapAttributes {\n"); - sb.append(" onDemandConcurrencyCap: ") - .append(toIndentedString(onDemandConcurrencyCap)) - .append("\n"); + sb.append(" onDemandConcurrencyCap: ").append(toIndentedString(onDemandConcurrencyCap)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapResponse.java b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapResponse.java index 9c275115569..a39a6ca8ffc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/OnDemandConcurrencyCapResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** On-demand concurrency cap response. */ -@JsonPropertyOrder({OnDemandConcurrencyCapResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

On-demand concurrency cap response.

+ */ +@JsonPropertyOrder({ + OnDemandConcurrencyCapResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OnDemandConcurrencyCapResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private OnDemandConcurrencyCap data; @@ -28,22 +50,23 @@ public OnDemandConcurrencyCapResponse data(OnDemandConcurrencyCap data) { } /** - * On-demand concurrency cap. - * + *

On-demand concurrency cap.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OnDemandConcurrencyCap getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OnDemandConcurrencyCap getData() { + return data; + } public void setData(OnDemandConcurrencyCap data) { this.data = data; } - /** Return true if this OnDemandConcurrencyCapResponse object is equal to o. */ + /** + * Return true if this OnDemandConcurrencyCapResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OnDemandConcurrencyCapResponse onDemandConcurrencyCapResponse = - (OnDemandConcurrencyCapResponse) o; + OnDemandConcurrencyCapResponse onDemandConcurrencyCapResponse = (OnDemandConcurrencyCapResponse) o; return Objects.equals(this.data, onDemandConcurrencyCapResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateAttributes.java index 3d1eef65ed4..7f070e115cb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateAttributes.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The Opsgenie service attributes for a create request. */ +/** + *

The Opsgenie service attributes for a create request.

+ */ @JsonPropertyOrder({ OpsgenieServiceCreateAttributes.JSON_PROPERTY_CUSTOM_URL, OpsgenieServiceCreateAttributes.JSON_PROPERTY_NAME, OpsgenieServiceCreateAttributes.JSON_PROPERTY_OPSGENIE_API_KEY, OpsgenieServiceCreateAttributes.JSON_PROPERTY_REGION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_URL = "custom_url"; private String customUrl; @@ -40,77 +59,69 @@ public OpsgenieServiceCreateAttributes() {} @JsonCreator public OpsgenieServiceCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPSGENIE_API_KEY) String opsgenieApiKey, - @JsonProperty(required = true, value = JSON_PROPERTY_REGION) - OpsgenieServiceRegionType region) { - this.name = name; - this.opsgenieApiKey = opsgenieApiKey; - this.region = region; - this.unparsed |= !region.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPSGENIE_API_KEY)String opsgenieApiKey, + @JsonProperty(required=true, value=JSON_PROPERTY_REGION)OpsgenieServiceRegionType region) { + this.name = name; + this.opsgenieApiKey = opsgenieApiKey; + this.region = region; + this.unparsed |= !region.isValid(); } - public OpsgenieServiceCreateAttributes customUrl(String customUrl) { this.customUrl = customUrl; return this; } /** - * The custom URL for a custom region. - * + *

The custom URL for a custom region.

* @return customUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCustomUrl() { - return customUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomUrl() { + return customUrl; + } public void setCustomUrl(String customUrl) { this.customUrl = customUrl; } - public OpsgenieServiceCreateAttributes name(String name) { this.name = name; return this; } /** - * The name for the Opsgenie service. - * + *

The name for the Opsgenie service.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public OpsgenieServiceCreateAttributes opsgenieApiKey(String opsgenieApiKey) { this.opsgenieApiKey = opsgenieApiKey; return this; } /** - * The Opsgenie API key for your Opsgenie service. - * + *

The Opsgenie API key for your Opsgenie service.

* @return opsgenieApiKey - */ - @JsonProperty(JSON_PROPERTY_OPSGENIE_API_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOpsgenieApiKey() { - return opsgenieApiKey; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPSGENIE_API_KEY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getOpsgenieApiKey() { + return opsgenieApiKey; + } public void setOpsgenieApiKey(String opsgenieApiKey) { this.opsgenieApiKey = opsgenieApiKey; } - public OpsgenieServiceCreateAttributes region(OpsgenieServiceRegionType region) { this.region = region; this.unparsed |= !region.isValid(); @@ -118,24 +129,25 @@ public OpsgenieServiceCreateAttributes region(OpsgenieServiceRegionType region) } /** - * The region for the Opsgenie service. - * + *

The region for the Opsgenie service.

* @return region - */ - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceRegionType getRegion() { - return region; - } - + **/ + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceRegionType getRegion() { + return region; + } public void setRegion(OpsgenieServiceRegionType region) { if (!region.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.region = region; } - /** Return true if this OpsgenieServiceCreateAttributes object is equal to o. */ + /** + * Return true if this OpsgenieServiceCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -144,17 +156,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpsgenieServiceCreateAttributes opsgenieServiceCreateAttributes = - (OpsgenieServiceCreateAttributes) o; - return Objects.equals(this.customUrl, opsgenieServiceCreateAttributes.customUrl) - && Objects.equals(this.name, opsgenieServiceCreateAttributes.name) - && Objects.equals(this.opsgenieApiKey, opsgenieServiceCreateAttributes.opsgenieApiKey) - && Objects.equals(this.region, opsgenieServiceCreateAttributes.region); + OpsgenieServiceCreateAttributes opsgenieServiceCreateAttributes = (OpsgenieServiceCreateAttributes) o; + return Objects.equals(this.customUrl, opsgenieServiceCreateAttributes.customUrl) && Objects.equals(this.name, opsgenieServiceCreateAttributes.name) && Objects.equals(this.opsgenieApiKey, opsgenieServiceCreateAttributes.opsgenieApiKey) && Objects.equals(this.region, opsgenieServiceCreateAttributes.region); } + @Override public int hashCode() { - return Objects.hash(customUrl, name, opsgenieApiKey, region); + return Objects.hash(customUrl,name,opsgenieApiKey,region); } @Override @@ -170,7 +179,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateData.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateData.java index 4aca1f59aa0..03698eff68a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Opsgenie service data for a create request. */ + +/** + *

Opsgenie service data for a create request.

+ */ @JsonPropertyOrder({ OpsgenieServiceCreateData.JSON_PROPERTY_ATTRIBUTES, OpsgenieServiceCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private OpsgenieServiceCreateAttributes attributes; @@ -32,15 +51,13 @@ public OpsgenieServiceCreateData() {} @JsonCreator public OpsgenieServiceCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - OpsgenieServiceCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OpsgenieServiceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)OpsgenieServiceCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)OpsgenieServiceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public OpsgenieServiceCreateData attributes(OpsgenieServiceCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public OpsgenieServiceCreateData attributes(OpsgenieServiceCreateAttributes attr } /** - * The Opsgenie service attributes for a create request. - * + *

The Opsgenie service attributes for a create request.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(OpsgenieServiceCreateAttributes attributes) { this.attributes = attributes; } - public OpsgenieServiceCreateData type(OpsgenieServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public OpsgenieServiceCreateData type(OpsgenieServiceType type) { } /** - * Opsgenie service resource type. - * + *

Opsgenie service resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceType getType() { + return type; + } public void setType(OpsgenieServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this OpsgenieServiceCreateData object is equal to o. */ + /** + * Return true if this OpsgenieServiceCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } OpsgenieServiceCreateData opsgenieServiceCreateData = (OpsgenieServiceCreateData) o; - return Objects.equals(this.attributes, opsgenieServiceCreateData.attributes) - && Objects.equals(this.type, opsgenieServiceCreateData.type); + return Objects.equals(this.attributes, opsgenieServiceCreateData.attributes) && Objects.equals(this.type, opsgenieServiceCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateRequest.java index 9bc2e1a08ef..b08c1d8f4bf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create request for an Opsgenie service. */ -@JsonPropertyOrder({OpsgenieServiceCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create request for an Opsgenie service.

+ */ +@JsonPropertyOrder({ + OpsgenieServiceCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private OpsgenieServiceCreateData data; @@ -26,11 +47,10 @@ public OpsgenieServiceCreateRequest() {} @JsonCreator public OpsgenieServiceCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OpsgenieServiceCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)OpsgenieServiceCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public OpsgenieServiceCreateRequest data(OpsgenieServiceCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public OpsgenieServiceCreateRequest data(OpsgenieServiceCreateData data) { } /** - * Opsgenie service data for a create request. - * + *

Opsgenie service data for a create request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceCreateData getData() { + return data; + } public void setData(OpsgenieServiceCreateData data) { this.data = data; } - /** Return true if this OpsgenieServiceCreateRequest object is equal to o. */ + /** + * Return true if this OpsgenieServiceCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, opsgenieServiceCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceRegionType.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceRegionType.java index b5b2f0bfd48..85a2b01a897 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceRegionType.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceRegionType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The region for the Opsgenie service. */ +/** + *

The region for the Opsgenie service.

+ */ @JsonSerialize(using = OpsgenieServiceRegionType.OpsgenieServiceRegionTypeSerializer.class) public class OpsgenieServiceRegionType { @@ -27,8 +51,7 @@ public class OpsgenieServiceRegionType { public static final OpsgenieServiceRegionType EU = new OpsgenieServiceRegionType("eu"); public static final OpsgenieServiceRegionType CUSTOM = new OpsgenieServiceRegionType("custom"); - private static final Set allowedValues = - new HashSet(Arrays.asList("us", "eu", "custom")); + private static final Set allowedValues = new HashSet(Arrays.asList("us", "eu", "custom")); private String value; @@ -40,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class OpsgenieServiceRegionTypeSerializer - extends StdSerializer { - public OpsgenieServiceRegionTypeSerializer(Class t) { - super(t); - } + public static class OpsgenieServiceRegionTypeSerializer extends StdSerializer { + public OpsgenieServiceRegionTypeSerializer(Class t) { + super(t); + } - public OpsgenieServiceRegionTypeSerializer() { - this(null); - } + public OpsgenieServiceRegionTypeSerializer() { + this(null); + } - @Override - public void serialize( - OpsgenieServiceRegionType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(OpsgenieServiceRegionType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this OpsgenieServiceRegionType object is equal to o. */ + /** + * Return true if this OpsgenieServiceRegionType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponse.java index 3cec4e407a8..1eb32b41aef 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponse.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response of an Opsgenie service. */ -@JsonPropertyOrder({OpsgenieServiceResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Response of an Opsgenie service.

+ */ +@JsonPropertyOrder({ + OpsgenieServiceResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private OpsgenieServiceResponseData data; @@ -26,11 +47,10 @@ public OpsgenieServiceResponse() {} @JsonCreator public OpsgenieServiceResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OpsgenieServiceResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)OpsgenieServiceResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public OpsgenieServiceResponse data(OpsgenieServiceResponseData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public OpsgenieServiceResponse data(OpsgenieServiceResponseData data) { } /** - * Opsgenie service data from a response. - * + *

Opsgenie service data from a response.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceResponseData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceResponseData getData() { + return data; + } public void setData(OpsgenieServiceResponseData data) { this.data = data; } - /** Return true if this OpsgenieServiceResponse object is equal to o. */ + /** + * Return true if this OpsgenieServiceResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, opsgenieServiceResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseAttributes.java index f8552a99e11..ccb4a82d169 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseAttributes.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The attributes from an Opsgenie service response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The attributes from an Opsgenie service response.

+ */ @JsonPropertyOrder({ OpsgenieServiceResponseAttributes.JSON_PROPERTY_CUSTOM_URL, OpsgenieServiceResponseAttributes.JSON_PROPERTY_NAME, OpsgenieServiceResponseAttributes.JSON_PROPERTY_REGION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_URL = "custom_url"; private JsonNullable customUrl = JsonNullable.undefined(); @@ -38,52 +57,45 @@ public OpsgenieServiceResponseAttributes customUrl(String customUrl) { } /** - * The custom URL for a custom region. - * + *

The custom URL for a custom region.

* @return customUrl - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getCustomUrl() { - return customUrl.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCustomUrl() { + return customUrl.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOM_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomUrl_JsonNullable() { return customUrl; } - - @JsonProperty(JSON_PROPERTY_CUSTOM_URL) - public void setCustomUrl_JsonNullable(JsonNullable customUrl) { + @JsonProperty(JSON_PROPERTY_CUSTOM_URL)public void setCustomUrl_JsonNullable(JsonNullable customUrl) { this.customUrl = customUrl; } - public void setCustomUrl(String customUrl) { this.customUrl = JsonNullable.of(customUrl); } - public OpsgenieServiceResponseAttributes name(String name) { this.name = name; return this; } /** - * The name for the Opsgenie service. - * + *

The name for the Opsgenie service.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public OpsgenieServiceResponseAttributes region(OpsgenieServiceRegionType region) { this.region = region; this.unparsed |= !region.isValid(); @@ -91,25 +103,26 @@ public OpsgenieServiceResponseAttributes region(OpsgenieServiceRegionType region } /** - * The region for the Opsgenie service. - * + *

The region for the Opsgenie service.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OpsgenieServiceRegionType getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OpsgenieServiceRegionType getRegion() { + return region; + } public void setRegion(OpsgenieServiceRegionType region) { if (!region.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.region = region; } - /** Return true if this OpsgenieServiceResponseAttributes object is equal to o. */ + /** + * Return true if this OpsgenieServiceResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,16 +131,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpsgenieServiceResponseAttributes opsgenieServiceResponseAttributes = - (OpsgenieServiceResponseAttributes) o; - return Objects.equals(this.customUrl, opsgenieServiceResponseAttributes.customUrl) - && Objects.equals(this.name, opsgenieServiceResponseAttributes.name) - && Objects.equals(this.region, opsgenieServiceResponseAttributes.region); + OpsgenieServiceResponseAttributes opsgenieServiceResponseAttributes = (OpsgenieServiceResponseAttributes) o; + return Objects.equals(this.customUrl, opsgenieServiceResponseAttributes.customUrl) && Objects.equals(this.name, opsgenieServiceResponseAttributes.name) && Objects.equals(this.region, opsgenieServiceResponseAttributes.region); } + @Override public int hashCode() { - return Objects.hash(customUrl, name, region); + return Objects.hash(customUrl,name,region); } @Override @@ -142,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseData.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseData.java index 636dc8c5852..6d20616ff66 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceResponseData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Opsgenie service data from a response. */ +/** + *

Opsgenie service data from a response.

+ */ @JsonPropertyOrder({ OpsgenieServiceResponseData.JSON_PROPERTY_ATTRIBUTES, OpsgenieServiceResponseData.JSON_PROPERTY_ID, OpsgenieServiceResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private OpsgenieServiceResponseAttributes attributes; @@ -36,17 +55,15 @@ public OpsgenieServiceResponseData() {} @JsonCreator public OpsgenieServiceResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - OpsgenieServiceResponseAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OpsgenieServiceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)OpsgenieServiceResponseAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)OpsgenieServiceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public OpsgenieServiceResponseData attributes(OpsgenieServiceResponseAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public OpsgenieServiceResponseData attributes(OpsgenieServiceResponseAttributes } /** - * The attributes from an Opsgenie service response. - * + *

The attributes from an Opsgenie service response.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceResponseAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(OpsgenieServiceResponseAttributes attributes) { this.attributes = attributes; } - public OpsgenieServiceResponseData id(String id) { this.id = id; return this; } /** - * The ID of the Opsgenie service. - * + *

The ID of the Opsgenie service.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public OpsgenieServiceResponseData type(OpsgenieServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public OpsgenieServiceResponseData type(OpsgenieServiceType type) { } /** - * Opsgenie service resource type. - * + *

Opsgenie service resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceType getType() { + return type; + } public void setType(OpsgenieServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this OpsgenieServiceResponseData object is equal to o. */ + /** + * Return true if this OpsgenieServiceResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } OpsgenieServiceResponseData opsgenieServiceResponseData = (OpsgenieServiceResponseData) o; - return Objects.equals(this.attributes, opsgenieServiceResponseData.attributes) - && Objects.equals(this.id, opsgenieServiceResponseData.id) - && Objects.equals(this.type, opsgenieServiceResponseData.type); + return Objects.equals(this.attributes, opsgenieServiceResponseData.attributes) && Objects.equals(this.id, opsgenieServiceResponseData.id) && Objects.equals(this.type, opsgenieServiceResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceType.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceType.java index 427333e46e4..d69898037a2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Opsgenie service resource type. */ +/** + *

Opsgenie service resource type.

+ */ @JsonSerialize(using = OpsgenieServiceType.OpsgenieServiceTypeSerializer.class) public class OpsgenieServiceType { - public static final OpsgenieServiceType OPSGENIE_SERVICE = - new OpsgenieServiceType("opsgenie-service"); + public static final OpsgenieServiceType OPSGENIE_SERVICE = new OpsgenieServiceType("opsgenie-service"); - private static final Set allowedValues = - new HashSet(Arrays.asList("opsgenie-service")); + private static final Set allowedValues = new HashSet(Arrays.asList("opsgenie-service")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class OpsgenieServiceTypeSerializer extends StdSerializer { - public OpsgenieServiceTypeSerializer(Class t) { - super(t); - } - - public OpsgenieServiceTypeSerializer() { - this(null); - } - - @Override - public void serialize( - OpsgenieServiceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public OpsgenieServiceTypeSerializer(Class t) { + super(t); + } + + public OpsgenieServiceTypeSerializer() { + this(null); + } + + @Override + public void serialize(OpsgenieServiceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this OpsgenieServiceType object is equal to o. */ + /** + * Return true if this OpsgenieServiceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateAttributes.java index 875b9726a21..8621b04c7e3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateAttributes.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** The Opsgenie service attributes for an update request. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The Opsgenie service attributes for an update request.

+ */ @JsonPropertyOrder({ OpsgenieServiceUpdateAttributes.JSON_PROPERTY_CUSTOM_URL, OpsgenieServiceUpdateAttributes.JSON_PROPERTY_NAME, OpsgenieServiceUpdateAttributes.JSON_PROPERTY_OPSGENIE_API_KEY, OpsgenieServiceUpdateAttributes.JSON_PROPERTY_REGION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CUSTOM_URL = "custom_url"; private JsonNullable customUrl = JsonNullable.undefined(); @@ -42,73 +61,64 @@ public OpsgenieServiceUpdateAttributes customUrl(String customUrl) { } /** - * The custom URL for a custom region. - * + *

The custom URL for a custom region.

* @return customUrl - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getCustomUrl() { - return customUrl.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCustomUrl() { + return customUrl.orElse(null); + } @JsonProperty(JSON_PROPERTY_CUSTOM_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getCustomUrl_JsonNullable() { return customUrl; } - - @JsonProperty(JSON_PROPERTY_CUSTOM_URL) - public void setCustomUrl_JsonNullable(JsonNullable customUrl) { + @JsonProperty(JSON_PROPERTY_CUSTOM_URL)public void setCustomUrl_JsonNullable(JsonNullable customUrl) { this.customUrl = customUrl; } - public void setCustomUrl(String customUrl) { this.customUrl = JsonNullable.of(customUrl); } - public OpsgenieServiceUpdateAttributes name(String name) { this.name = name; return this; } /** - * The name for the Opsgenie service. - * + *

The name for the Opsgenie service.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public OpsgenieServiceUpdateAttributes opsgenieApiKey(String opsgenieApiKey) { this.opsgenieApiKey = opsgenieApiKey; return this; } /** - * The Opsgenie API key for your Opsgenie service. - * + *

The Opsgenie API key for your Opsgenie service.

* @return opsgenieApiKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPSGENIE_API_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOpsgenieApiKey() { - return opsgenieApiKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPSGENIE_API_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOpsgenieApiKey() { + return opsgenieApiKey; + } public void setOpsgenieApiKey(String opsgenieApiKey) { this.opsgenieApiKey = opsgenieApiKey; } - public OpsgenieServiceUpdateAttributes region(OpsgenieServiceRegionType region) { this.region = region; this.unparsed |= !region.isValid(); @@ -116,25 +126,26 @@ public OpsgenieServiceUpdateAttributes region(OpsgenieServiceRegionType region) } /** - * The region for the Opsgenie service. - * + *

The region for the Opsgenie service.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OpsgenieServiceRegionType getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OpsgenieServiceRegionType getRegion() { + return region; + } public void setRegion(OpsgenieServiceRegionType region) { if (!region.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.region = region; } - /** Return true if this OpsgenieServiceUpdateAttributes object is equal to o. */ + /** + * Return true if this OpsgenieServiceUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -143,17 +154,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpsgenieServiceUpdateAttributes opsgenieServiceUpdateAttributes = - (OpsgenieServiceUpdateAttributes) o; - return Objects.equals(this.customUrl, opsgenieServiceUpdateAttributes.customUrl) - && Objects.equals(this.name, opsgenieServiceUpdateAttributes.name) - && Objects.equals(this.opsgenieApiKey, opsgenieServiceUpdateAttributes.opsgenieApiKey) - && Objects.equals(this.region, opsgenieServiceUpdateAttributes.region); + OpsgenieServiceUpdateAttributes opsgenieServiceUpdateAttributes = (OpsgenieServiceUpdateAttributes) o; + return Objects.equals(this.customUrl, opsgenieServiceUpdateAttributes.customUrl) && Objects.equals(this.name, opsgenieServiceUpdateAttributes.name) && Objects.equals(this.opsgenieApiKey, opsgenieServiceUpdateAttributes.opsgenieApiKey) && Objects.equals(this.region, opsgenieServiceUpdateAttributes.region); } + @Override public int hashCode() { - return Objects.hash(customUrl, name, opsgenieApiKey, region); + return Objects.hash(customUrl,name,opsgenieApiKey,region); } @Override @@ -169,7 +177,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateData.java index 9f70694c4fb..c8f9f1f4e44 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Opsgenie service for an update request. */ +/** + *

Opsgenie service for an update request.

+ */ @JsonPropertyOrder({ OpsgenieServiceUpdateData.JSON_PROPERTY_ATTRIBUTES, OpsgenieServiceUpdateData.JSON_PROPERTY_ID, OpsgenieServiceUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private OpsgenieServiceUpdateAttributes attributes; @@ -36,17 +55,15 @@ public OpsgenieServiceUpdateData() {} @JsonCreator public OpsgenieServiceUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - OpsgenieServiceUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OpsgenieServiceType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)OpsgenieServiceUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)OpsgenieServiceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public OpsgenieServiceUpdateData attributes(OpsgenieServiceUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public OpsgenieServiceUpdateData attributes(OpsgenieServiceUpdateAttributes attr } /** - * The Opsgenie service attributes for an update request. - * + *

The Opsgenie service attributes for an update request.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(OpsgenieServiceUpdateAttributes attributes) { this.attributes = attributes; } - public OpsgenieServiceUpdateData id(String id) { this.id = id; return this; } /** - * The ID of the Opsgenie service. - * + *

The ID of the Opsgenie service.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public OpsgenieServiceUpdateData type(OpsgenieServiceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public OpsgenieServiceUpdateData type(OpsgenieServiceType type) { } /** - * Opsgenie service resource type. - * + *

Opsgenie service resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceType getType() { + return type; + } public void setType(OpsgenieServiceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this OpsgenieServiceUpdateData object is equal to o. */ + /** + * Return true if this OpsgenieServiceUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } OpsgenieServiceUpdateData opsgenieServiceUpdateData = (OpsgenieServiceUpdateData) o; - return Objects.equals(this.attributes, opsgenieServiceUpdateData.attributes) - && Objects.equals(this.id, opsgenieServiceUpdateData.id) - && Objects.equals(this.type, opsgenieServiceUpdateData.type); + return Objects.equals(this.attributes, opsgenieServiceUpdateData.attributes) && Objects.equals(this.id, opsgenieServiceUpdateData.id) && Objects.equals(this.type, opsgenieServiceUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateRequest.java index b157983b433..e2a64d747ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServiceUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update request for an Opsgenie service. */ -@JsonPropertyOrder({OpsgenieServiceUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update request for an Opsgenie service.

+ */ +@JsonPropertyOrder({ + OpsgenieServiceUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServiceUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private OpsgenieServiceUpdateData data; @@ -26,11 +47,10 @@ public OpsgenieServiceUpdateRequest() {} @JsonCreator public OpsgenieServiceUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OpsgenieServiceUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)OpsgenieServiceUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public OpsgenieServiceUpdateRequest data(OpsgenieServiceUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public OpsgenieServiceUpdateRequest data(OpsgenieServiceUpdateData data) { } /** - * Opsgenie service for an update request. - * + *

Opsgenie service for an update request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OpsgenieServiceUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OpsgenieServiceUpdateData getData() { + return data; + } public void setData(OpsgenieServiceUpdateData data) { this.data = data; } - /** Return true if this OpsgenieServiceUpdateRequest object is equal to o. */ + /** + * Return true if this OpsgenieServiceUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, opsgenieServiceUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServicesResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServicesResponse.java index 2e9a2de644c..b11842436a0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OpsgenieServicesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/OpsgenieServicesResponse.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response with a list of Opsgenie services. */ -@JsonPropertyOrder({OpsgenieServicesResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Response with a list of Opsgenie services.

+ */ +@JsonPropertyOrder({ + OpsgenieServicesResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OpsgenieServicesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public OpsgenieServicesResponse() {} @JsonCreator public OpsgenieServicesResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public OpsgenieServicesResponse data(List data) { this.data = data; for (OpsgenieServiceResponseData item : data) { @@ -40,7 +57,6 @@ public OpsgenieServicesResponse data(List data) { } return this; } - public OpsgenieServicesResponse addDataItem(OpsgenieServiceResponseData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -48,21 +64,22 @@ public OpsgenieServicesResponse addDataItem(OpsgenieServiceResponseData dataItem } /** - * An array of Opsgenie services. - * + *

An array of Opsgenie services.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this OpsgenieServicesResponse object is equal to o. */ + /** + * Return true if this OpsgenieServicesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, opsgenieServicesResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Organization.java b/src/main/java/com/datadog/api/client/v2/model/Organization.java index 9c08c9a2a1d..eedb225da63 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Organization.java +++ b/src/main/java/com/datadog/api/client/v2/model/Organization.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Organization object. */ + +/** + *

Organization object.

+ */ @JsonPropertyOrder({ Organization.JSON_PROPERTY_ATTRIBUTES, Organization.JSON_PROPERTY_ID, Organization.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Organization { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private OrganizationAttributes attributes; @@ -36,11 +55,10 @@ public Organization() {} @JsonCreator public Organization( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OrganizationsType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)OrganizationsType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public Organization attributes(OrganizationAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,42 +66,38 @@ public Organization attributes(OrganizationAttributes attributes) { } /** - * Attributes of the organization. - * + *

Attributes of the organization.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrganizationAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OrganizationAttributes getAttributes() { + return attributes; + } public void setAttributes(OrganizationAttributes attributes) { this.attributes = attributes; } - public Organization id(String id) { this.id = id; return this; } /** - * ID of the organization. - * + *

ID of the organization.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public Organization type(OrganizationsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -91,24 +105,25 @@ public Organization type(OrganizationsType type) { } /** - * Organizations resource type. - * + *

Organizations resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OrganizationsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OrganizationsType getType() { + return type; + } public void setType(OrganizationsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this Organization object is equal to o. */ + /** + * Return true if this Organization object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +133,13 @@ public boolean equals(Object o) { return false; } Organization organization = (Organization) o; - return Objects.equals(this.attributes, organization.attributes) - && Objects.equals(this.id, organization.id) - && Objects.equals(this.type, organization.type); + return Objects.equals(this.attributes, organization.attributes) && Objects.equals(this.id, organization.id) && Objects.equals(this.type, organization.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -140,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OrganizationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OrganizationAttributes.java index 41de917ea72..14b91f81a54 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OrganizationAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/OrganizationAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of the organization. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of the organization.

+ */ @JsonPropertyOrder({ OrganizationAttributes.JSON_PROPERTY_CREATED_AT, OrganizationAttributes.JSON_PROPERTY_DESCRIPTION, @@ -26,12 +43,11 @@ OrganizationAttributes.JSON_PROPERTY_SHARING, OrganizationAttributes.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class OrganizationAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; @@ -42,7 +58,6 @@ public class OrganizationAttributes { private Boolean disabled; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -64,169 +79,156 @@ public OrganizationAttributes createdAt(OffsetDateTime createdAt) { } /** - * Creation time of the organization. - * + *

Creation time of the organization.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public OrganizationAttributes description(String description) { this.description = description; return this; } /** - * Description of the organization. - * + *

Description of the organization.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public OrganizationAttributes disabled(Boolean disabled) { this.disabled = disabled; return this; } /** - * Whether or not the organization is disabled. - * + *

Whether or not the organization is disabled.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } - public OrganizationAttributes modifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; return this; } /** - * Time of last organization modification. - * + *

Time of last organization modification.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public void setModifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; } - public OrganizationAttributes name(String name) { this.name = name; return this; } /** - * Name of the organization. - * + *

Name of the organization.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public OrganizationAttributes publicId(String publicId) { this.publicId = publicId; return this; } /** - * Public ID of the organization. - * + *

Public ID of the organization.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public OrganizationAttributes sharing(String sharing) { this.sharing = sharing; return this; } /** - * Sharing type of the organization. - * + *

Sharing type of the organization.

* @return sharing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHARING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSharing() { - return sharing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHARING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSharing() { + return sharing; + } public void setSharing(String sharing) { this.sharing = sharing; } - public OrganizationAttributes url(String url) { this.url = url; return this; } /** - * URL of the site that this organization exists at. - * + *

URL of the site that this organization exists at.

* @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this OrganizationAttributes object is equal to o. */ + /** + * Return true if this OrganizationAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -236,19 +238,13 @@ public boolean equals(Object o) { return false; } OrganizationAttributes organizationAttributes = (OrganizationAttributes) o; - return Objects.equals(this.createdAt, organizationAttributes.createdAt) - && Objects.equals(this.description, organizationAttributes.description) - && Objects.equals(this.disabled, organizationAttributes.disabled) - && Objects.equals(this.modifiedAt, organizationAttributes.modifiedAt) - && Objects.equals(this.name, organizationAttributes.name) - && Objects.equals(this.publicId, organizationAttributes.publicId) - && Objects.equals(this.sharing, organizationAttributes.sharing) - && Objects.equals(this.url, organizationAttributes.url); + return Objects.equals(this.createdAt, organizationAttributes.createdAt) && Objects.equals(this.description, organizationAttributes.description) && Objects.equals(this.disabled, organizationAttributes.disabled) && Objects.equals(this.modifiedAt, organizationAttributes.modifiedAt) && Objects.equals(this.name, organizationAttributes.name) && Objects.equals(this.publicId, organizationAttributes.publicId) && Objects.equals(this.sharing, organizationAttributes.sharing) && Objects.equals(this.url, organizationAttributes.url); } + @Override public int hashCode() { - return Objects.hash(createdAt, description, disabled, modifiedAt, name, publicId, sharing, url); + return Objects.hash(createdAt,description,disabled,modifiedAt,name,publicId,sharing,url); } @Override @@ -268,7 +264,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/OrganizationsType.java b/src/main/java/com/datadog/api/client/v2/model/OrganizationsType.java index 537f88e9a4e..33ee77c310c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/OrganizationsType.java +++ b/src/main/java/com/datadog/api/client/v2/model/OrganizationsType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Organizations resource type. */ +/** + *

Organizations resource type.

+ */ @JsonSerialize(using = OrganizationsType.OrganizationsTypeSerializer.class) public class OrganizationsType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class OrganizationsTypeSerializer extends StdSerializer { - public OrganizationsTypeSerializer(Class t) { - super(t); - } - - public OrganizationsTypeSerializer() { - this(null); - } - - @Override - public void serialize(OrganizationsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public OrganizationsTypeSerializer(Class t) { + super(t); + } + + public OrganizationsTypeSerializer() { + this(null); + } + + @Override + public void serialize(OrganizationsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this OrganizationsType object is equal to o. */ + /** + * Return true if this OrganizationsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/Pagination.java b/src/main/java/com/datadog/api/client/v2/model/Pagination.java index d3557871637..c615a5cb4cb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Pagination.java +++ b/src/main/java/com/datadog/api/client/v2/model/Pagination.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Pagination object. */ + +/** + *

Pagination object.

+ */ @JsonPropertyOrder({ Pagination.JSON_PROPERTY_TOTAL_COUNT, Pagination.JSON_PROPERTY_TOTAL_FILTERED_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Pagination { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; private Long totalCount; @@ -33,43 +53,42 @@ public Pagination totalCount(Long totalCount) { } /** - * Total count. - * + *

Total count.

* @return totalCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalCount() { - return totalCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } - public Pagination totalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; return this; } /** - * Total count of elements matched by the filter. - * + *

Total count of elements matched by the filter.

* @return totalFilteredCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalFilteredCount() { - return totalFilteredCount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } public void setTotalFilteredCount(Long totalFilteredCount) { this.totalFilteredCount = totalFilteredCount; } - /** Return true if this Pagination object is equal to o. */ + /** + * Return true if this Pagination object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } Pagination pagination = (Pagination) o; - return Objects.equals(this.totalCount, pagination.totalCount) - && Objects.equals(this.totalFilteredCount, pagination.totalFilteredCount); + return Objects.equals(this.totalCount, pagination.totalCount) && Objects.equals(this.totalFilteredCount, pagination.totalFilteredCount); } + @Override public int hashCode() { - return Objects.hash(totalCount, totalFilteredCount); + return Objects.hash(totalCount,totalFilteredCount); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PartialAPIKey.java b/src/main/java/com/datadog/api/client/v2/model/PartialAPIKey.java index a61778bd800..bf84f873159 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PartialAPIKey.java +++ b/src/main/java/com/datadog/api/client/v2/model/PartialAPIKey.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Partial Datadog API key. */ + +/** + *

Partial Datadog API key.

+ */ @JsonPropertyOrder({ PartialAPIKey.JSON_PROPERTY_ATTRIBUTES, PartialAPIKey.JSON_PROPERTY_ID, PartialAPIKey.JSON_PROPERTY_RELATIONSHIPS, PartialAPIKey.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PartialAPIKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private PartialAPIKeyAttributes attributes; @@ -42,42 +62,38 @@ public PartialAPIKey attributes(PartialAPIKeyAttributes attributes) { } /** - * Attributes of a partial API key. - * + *

Attributes of a partial API key.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PartialAPIKeyAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public PartialAPIKeyAttributes getAttributes() { + return attributes; + } public void setAttributes(PartialAPIKeyAttributes attributes) { this.attributes = attributes; } - public PartialAPIKey id(String id) { this.id = id; return this; } /** - * ID of the API key. - * + *

ID of the API key.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public PartialAPIKey relationships(APIKeyRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -85,21 +101,19 @@ public PartialAPIKey relationships(APIKeyRelationships relationships) { } /** - * Resources related to the API key. - * + *

Resources related to the API key.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public APIKeyRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public APIKeyRelationships getRelationships() { + return relationships; + } public void setRelationships(APIKeyRelationships relationships) { this.relationships = relationships; } - public PartialAPIKey type(APIKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,25 +121,26 @@ public PartialAPIKey type(APIKeysType type) { } /** - * API Keys resource type. - * + *

API Keys resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public APIKeysType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public APIKeysType getType() { + return type; + } public void setType(APIKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this PartialAPIKey object is equal to o. */ + /** + * Return true if this PartialAPIKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +150,13 @@ public boolean equals(Object o) { return false; } PartialAPIKey partialApiKey = (PartialAPIKey) o; - return Objects.equals(this.attributes, partialApiKey.attributes) - && Objects.equals(this.id, partialApiKey.id) - && Objects.equals(this.relationships, partialApiKey.relationships) - && Objects.equals(this.type, partialApiKey.type); + return Objects.equals(this.attributes, partialApiKey.attributes) && Objects.equals(this.id, partialApiKey.id) && Objects.equals(this.relationships, partialApiKey.relationships) && Objects.equals(this.type, partialApiKey.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -159,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PartialAPIKeyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PartialAPIKeyAttributes.java index 84ac10f344a..af2b643d05f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PartialAPIKeyAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PartialAPIKeyAttributes.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes of a partial API key. */ + +/** + *

Attributes of a partial API key.

+ */ @JsonPropertyOrder({ PartialAPIKeyAttributes.JSON_PROPERTY_CREATED_AT, PartialAPIKeyAttributes.JSON_PROPERTY_LAST4, PartialAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT, PartialAPIKeyAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PartialAPIKeyAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private String createdAt; @@ -35,64 +55,65 @@ public class PartialAPIKeyAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * Creation date of the API key. - * + *

Creation date of the API key.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } /** - * The last four characters of the API key. - * + *

The last four characters of the API key.

* @return last4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLast4() { - return last4; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLast4() { + return last4; + } /** - * Date the API key was last modified. - * + *

Date the API key was last modified.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getModifiedAt() { + return modifiedAt; + } public PartialAPIKeyAttributes name(String name) { this.name = name; return this; } /** - * Name of the API key. - * + *

Name of the API key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this PartialAPIKeyAttributes object is equal to o. */ + /** + * Return true if this PartialAPIKeyAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,15 +123,13 @@ public boolean equals(Object o) { return false; } PartialAPIKeyAttributes partialApiKeyAttributes = (PartialAPIKeyAttributes) o; - return Objects.equals(this.createdAt, partialApiKeyAttributes.createdAt) - && Objects.equals(this.last4, partialApiKeyAttributes.last4) - && Objects.equals(this.modifiedAt, partialApiKeyAttributes.modifiedAt) - && Objects.equals(this.name, partialApiKeyAttributes.name); + return Objects.equals(this.createdAt, partialApiKeyAttributes.createdAt) && Objects.equals(this.last4, partialApiKeyAttributes.last4) && Objects.equals(this.modifiedAt, partialApiKeyAttributes.modifiedAt) && Objects.equals(this.name, partialApiKeyAttributes.name); } + @Override public int hashCode() { - return Objects.hash(createdAt, last4, modifiedAt, name); + return Objects.hash(createdAt,last4,modifiedAt,name); } @Override @@ -126,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKey.java b/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKey.java index 4a377aab6f3..6720ae435d4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKey.java +++ b/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKey.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Partial Datadog application key. */ + +/** + *

Partial Datadog application key.

+ */ @JsonPropertyOrder({ PartialApplicationKey.JSON_PROPERTY_ATTRIBUTES, PartialApplicationKey.JSON_PROPERTY_ID, PartialApplicationKey.JSON_PROPERTY_RELATIONSHIPS, PartialApplicationKey.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PartialApplicationKey { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private PartialApplicationKeyAttributes attributes; @@ -42,42 +62,38 @@ public PartialApplicationKey attributes(PartialApplicationKeyAttributes attribut } /** - * Attributes of a partial application key. - * + *

Attributes of a partial application key.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PartialApplicationKeyAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public PartialApplicationKeyAttributes getAttributes() { + return attributes; + } public void setAttributes(PartialApplicationKeyAttributes attributes) { this.attributes = attributes; } - public PartialApplicationKey id(String id) { this.id = id; return this; } /** - * ID of the application key. - * + *

ID of the application key.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public PartialApplicationKey relationships(ApplicationKeyRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -85,21 +101,19 @@ public PartialApplicationKey relationships(ApplicationKeyRelationships relations } /** - * Resources related to the application key. - * + *

Resources related to the application key.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApplicationKeyRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApplicationKeyRelationships getRelationships() { + return relationships; + } public void setRelationships(ApplicationKeyRelationships relationships) { this.relationships = relationships; } - public PartialApplicationKey type(ApplicationKeysType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,25 +121,26 @@ public PartialApplicationKey type(ApplicationKeysType type) { } /** - * Application Keys resource type. - * + *

Application Keys resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApplicationKeysType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ApplicationKeysType getType() { + return type; + } public void setType(ApplicationKeysType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this PartialApplicationKey object is equal to o. */ + /** + * Return true if this PartialApplicationKey object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +150,13 @@ public boolean equals(Object o) { return false; } PartialApplicationKey partialApplicationKey = (PartialApplicationKey) o; - return Objects.equals(this.attributes, partialApplicationKey.attributes) - && Objects.equals(this.id, partialApplicationKey.id) - && Objects.equals(this.relationships, partialApplicationKey.relationships) - && Objects.equals(this.type, partialApplicationKey.type); + return Objects.equals(this.attributes, partialApplicationKey.attributes) && Objects.equals(this.id, partialApplicationKey.id) && Objects.equals(this.relationships, partialApplicationKey.relationships) && Objects.equals(this.type, partialApplicationKey.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -159,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyAttributes.java index e93a94d24d3..ba9ab7dfd0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyAttributes.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of a partial application key. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of a partial application key.

+ */ @JsonPropertyOrder({ PartialApplicationKeyAttributes.JSON_PROPERTY_CREATED_AT, PartialApplicationKeyAttributes.JSON_PROPERTY_LAST4, PartialApplicationKeyAttributes.JSON_PROPERTY_NAME, PartialApplicationKeyAttributes.JSON_PROPERTY_SCOPES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PartialApplicationKeyAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private String createdAt; @@ -38,56 +55,53 @@ public class PartialApplicationKeyAttributes { public static final String JSON_PROPERTY_SCOPES = "scopes"; private JsonNullable> scopes = JsonNullable.>undefined(); + /** - * Creation date of the application key. - * + *

Creation date of the application key.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } /** - * The last four characters of the application key. - * + *

The last four characters of the application key.

* @return last4 - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST4) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLast4() { - return last4; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST4) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLast4() { + return last4; + } public PartialApplicationKeyAttributes name(String name) { this.name = name; return this; } /** - * Name of the application key. - * + *

Name of the application key.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public PartialApplicationKeyAttributes scopes(List scopes) { this.scopes = JsonNullable.>of(scopes); return this; } - public PartialApplicationKeyAttributes addScopesItem(String scopesItem) { if (this.scopes == null || !this.scopes.isPresent()) { this.scopes = JsonNullable.>of(new ArrayList<>()); @@ -101,33 +115,30 @@ public PartialApplicationKeyAttributes addScopesItem(String scopesItem) { } /** - * Array of scopes to grant the application key. This feature is in private beta, please contact - * Datadog support to enable scopes for your application keys. - * + *

Array of scopes to grant the application key. This feature is in private beta, please contact Datadog support to enable scopes for your application keys.

* @return scopes - */ - @jakarta.annotation.Nullable - @JsonIgnore - public List getScopes() { - return scopes.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public List getScopes() { + return scopes.orElse(null); + } @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable> getScopes_JsonNullable() { return scopes; } - - @JsonProperty(JSON_PROPERTY_SCOPES) - public void setScopes_JsonNullable(JsonNullable> scopes) { + @JsonProperty(JSON_PROPERTY_SCOPES)public void setScopes_JsonNullable(JsonNullable> scopes) { this.scopes = scopes; } - public void setScopes(List scopes) { this.scopes = JsonNullable.>of(scopes); } - /** Return true if this PartialApplicationKeyAttributes object is equal to o. */ + /** + * Return true if this PartialApplicationKeyAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,17 +147,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PartialApplicationKeyAttributes partialApplicationKeyAttributes = - (PartialApplicationKeyAttributes) o; - return Objects.equals(this.createdAt, partialApplicationKeyAttributes.createdAt) - && Objects.equals(this.last4, partialApplicationKeyAttributes.last4) - && Objects.equals(this.name, partialApplicationKeyAttributes.name) - && Objects.equals(this.scopes, partialApplicationKeyAttributes.scopes); + PartialApplicationKeyAttributes partialApplicationKeyAttributes = (PartialApplicationKeyAttributes) o; + return Objects.equals(this.createdAt, partialApplicationKeyAttributes.createdAt) && Objects.equals(this.last4, partialApplicationKeyAttributes.last4) && Objects.equals(this.name, partialApplicationKeyAttributes.name) && Objects.equals(this.scopes, partialApplicationKeyAttributes.scopes); } + @Override public int hashCode() { - return Objects.hash(createdAt, last4, name, scopes); + return Objects.hash(createdAt,last4,name,scopes); } @Override @@ -162,7 +170,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyResponse.java b/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyResponse.java index 44a8dbd415c..3413d8984ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/PartialApplicationKeyResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response for retrieving a partial application key. */ +/** + *

Response for retrieving a partial application key.

+ */ @JsonPropertyOrder({ PartialApplicationKeyResponse.JSON_PROPERTY_DATA, PartialApplicationKeyResponse.JSON_PROPERTY_INCLUDED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PartialApplicationKeyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private PartialApplicationKey data; @@ -36,21 +54,19 @@ public PartialApplicationKeyResponse data(PartialApplicationKey data) { } /** - * Partial Datadog application key. - * + *

Partial Datadog application key.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PartialApplicationKey getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public PartialApplicationKey getData() { + return data; + } public void setData(PartialApplicationKey data) { this.data = data; } - public PartialApplicationKeyResponse included(List included) { this.included = included; for (ApplicationKeyResponseIncludedItem item : included) { @@ -58,9 +74,7 @@ public PartialApplicationKeyResponse included(List(); } @@ -70,22 +84,23 @@ public PartialApplicationKeyResponse addIncludedItem( } /** - * Array of objects related to the application key. - * + *

Array of objects related to the application key.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this PartialApplicationKeyResponse object is equal to o. */ + /** + * Return true if this PartialApplicationKeyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -95,13 +110,13 @@ public boolean equals(Object o) { return false; } PartialApplicationKeyResponse partialApplicationKeyResponse = (PartialApplicationKeyResponse) o; - return Objects.equals(this.data, partialApplicationKeyResponse.data) - && Objects.equals(this.included, partialApplicationKeyResponse.included); + return Objects.equals(this.data, partialApplicationKeyResponse.data) && Objects.equals(this.included, partialApplicationKeyResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -115,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Permission.java b/src/main/java/com/datadog/api/client/v2/model/Permission.java index d98715bba21..6500855399e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Permission.java +++ b/src/main/java/com/datadog/api/client/v2/model/Permission.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Permission object. */ + +/** + *

Permission object.

+ */ @JsonPropertyOrder({ Permission.JSON_PROPERTY_ATTRIBUTES, Permission.JSON_PROPERTY_ID, Permission.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Permission { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private PermissionAttributes attributes; @@ -36,11 +55,10 @@ public Permission() {} @JsonCreator public Permission( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PermissionsType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)PermissionsType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public Permission attributes(PermissionAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,42 +66,38 @@ public Permission attributes(PermissionAttributes attributes) { } /** - * Attributes of a permission. - * + *

Attributes of a permission.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PermissionAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public PermissionAttributes getAttributes() { + return attributes; + } public void setAttributes(PermissionAttributes attributes) { this.attributes = attributes; } - public Permission id(String id) { this.id = id; return this; } /** - * ID of the permission. - * + *

ID of the permission.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public Permission type(PermissionsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -91,24 +105,25 @@ public Permission type(PermissionsType type) { } /** - * Permissions resource type. - * + *

Permissions resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public PermissionsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public PermissionsType getType() { + return type; + } public void setType(PermissionsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this Permission object is equal to o. */ + /** + * Return true if this Permission object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,14 +133,13 @@ public boolean equals(Object o) { return false; } Permission permission = (Permission) o; - return Objects.equals(this.attributes, permission.attributes) - && Objects.equals(this.id, permission.id) - && Objects.equals(this.type, permission.type); + return Objects.equals(this.attributes, permission.attributes) && Objects.equals(this.id, permission.id) && Objects.equals(this.type, permission.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -140,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PermissionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PermissionAttributes.java index 177538ea4bd..2db1fb3de0f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PermissionAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PermissionAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of a permission. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of a permission.

+ */ @JsonPropertyOrder({ PermissionAttributes.JSON_PROPERTY_CREATED, PermissionAttributes.JSON_PROPERTY_DESCRIPTION, @@ -25,12 +42,11 @@ PermissionAttributes.JSON_PROPERTY_NAME, PermissionAttributes.JSON_PROPERTY_RESTRICTED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PermissionAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED = "created"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime created; @@ -58,148 +74,137 @@ public PermissionAttributes created(OffsetDateTime created) { } /** - * Creation time of the permission. - * + *

Creation time of the permission.

* @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreated() { + return created; + } public void setCreated(OffsetDateTime created) { this.created = created; } - public PermissionAttributes description(String description) { this.description = description; return this; } /** - * Description of the permission. - * + *

Description of the permission.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public PermissionAttributes displayName(String displayName) { this.displayName = displayName; return this; } /** - * Displayed name for the permission. - * + *

Displayed name for the permission.

* @return displayName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDisplayName() { - return displayName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } public void setDisplayName(String displayName) { this.displayName = displayName; } - public PermissionAttributes displayType(String displayType) { this.displayType = displayType; return this; } /** - * Display type. - * + *

Display type.

* @return displayType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDisplayType() { - return displayType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayType() { + return displayType; + } public void setDisplayType(String displayType) { this.displayType = displayType; } - public PermissionAttributes groupName(String groupName) { this.groupName = groupName; return this; } /** - * Name of the permission group. - * + *

Name of the permission group.

* @return groupName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroupName() { - return groupName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGroupName() { + return groupName; + } public void setGroupName(String groupName) { this.groupName = groupName; } - public PermissionAttributes name(String name) { this.name = name; return this; } /** - * Name of the permission. - * + *

Name of the permission.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public PermissionAttributes restricted(Boolean restricted) { this.restricted = restricted; return this; } /** - * Whether or not the permission is restricted. - * + *

Whether or not the permission is restricted.

* @return restricted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RESTRICTED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRestricted() { - return restricted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICTED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRestricted() { + return restricted; + } public void setRestricted(Boolean restricted) { this.restricted = restricted; } - /** Return true if this PermissionAttributes object is equal to o. */ + /** + * Return true if this PermissionAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -209,19 +214,13 @@ public boolean equals(Object o) { return false; } PermissionAttributes permissionAttributes = (PermissionAttributes) o; - return Objects.equals(this.created, permissionAttributes.created) - && Objects.equals(this.description, permissionAttributes.description) - && Objects.equals(this.displayName, permissionAttributes.displayName) - && Objects.equals(this.displayType, permissionAttributes.displayType) - && Objects.equals(this.groupName, permissionAttributes.groupName) - && Objects.equals(this.name, permissionAttributes.name) - && Objects.equals(this.restricted, permissionAttributes.restricted); + return Objects.equals(this.created, permissionAttributes.created) && Objects.equals(this.description, permissionAttributes.description) && Objects.equals(this.displayName, permissionAttributes.displayName) && Objects.equals(this.displayType, permissionAttributes.displayType) && Objects.equals(this.groupName, permissionAttributes.groupName) && Objects.equals(this.name, permissionAttributes.name) && Objects.equals(this.restricted, permissionAttributes.restricted); } + @Override public int hashCode() { - return Objects.hash( - created, description, displayName, displayType, groupName, name, restricted); + return Objects.hash(created,description,displayName,displayType,groupName,name,restricted); } @Override @@ -240,7 +239,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PermissionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/PermissionsResponse.java index 3cbca453d91..41541500b4c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PermissionsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/PermissionsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Payload with API-returned permissions. */ -@JsonPropertyOrder({PermissionsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Payload with API-returned permissions.

+ */ +@JsonPropertyOrder({ + PermissionsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class PermissionsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public PermissionsResponse data(List data) { } return this; } - public PermissionsResponse addDataItem(Permission dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public PermissionsResponse addDataItem(Permission dataItem) { } /** - * Array of permissions. - * + *

Array of permissions.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this PermissionsResponse object is equal to o. */ + /** + * Return true if this PermissionsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, permissionsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/PermissionsType.java b/src/main/java/com/datadog/api/client/v2/model/PermissionsType.java index c5a4650dfaa..9b7f9e0ee8c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PermissionsType.java +++ b/src/main/java/com/datadog/api/client/v2/model/PermissionsType.java @@ -6,27 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Permissions resource type. */ +/** + *

Permissions resource type.

+ */ @JsonSerialize(using = PermissionsType.PermissionsTypeSerializer.class) public class PermissionsType { public static final PermissionsType PERMISSIONS = new PermissionsType("permissions"); - private static final Set allowedValues = - new HashSet(Arrays.asList("permissions")); + private static final Set allowedValues = new HashSet(Arrays.asList("permissions")); private String value; @@ -39,19 +62,18 @@ public boolean isValid() { } public static class PermissionsTypeSerializer extends StdSerializer { - public PermissionsTypeSerializer(Class t) { - super(t); - } - - public PermissionsTypeSerializer() { - this(null); - } - - @Override - public void serialize(PermissionsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public PermissionsTypeSerializer(Class t) { + super(t); + } + + public PermissionsTypeSerializer() { + this(null); + } + + @Override + public void serialize(PermissionsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -63,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this PermissionsType object is equal to o. */ + /** + * Return true if this PermissionsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMeta.java b/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMeta.java index e644a05f0ba..81fd70ad3c3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response metadata object. */ -@JsonPropertyOrder({ProcessSummariesMeta.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response metadata object.

+ */ +@JsonPropertyOrder({ + ProcessSummariesMeta.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessSummariesMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private ProcessSummariesMetaPage page; @@ -28,22 +50,23 @@ public ProcessSummariesMeta page(ProcessSummariesMetaPage page) { } /** - * Paging attributes. - * + *

Paging attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessSummariesMetaPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessSummariesMetaPage getPage() { + return page; + } public void setPage(ProcessSummariesMetaPage page) { this.page = page; } - /** Return true if this ProcessSummariesMeta object is equal to o. */ + /** + * Return true if this ProcessSummariesMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.page, processSummariesMeta.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMetaPage.java index d82e915bdc0..e44bb6b5d96 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMetaPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesMetaPage.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Paging attributes. */ + +/** + *

Paging attributes.

+ */ @JsonPropertyOrder({ ProcessSummariesMetaPage.JSON_PROPERTY_AFTER, ProcessSummariesMetaPage.JSON_PROPERTY_SIZE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessSummariesMetaPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -33,44 +53,45 @@ public ProcessSummariesMetaPage after(String after) { } /** - * The cursor used to get the next results, if any. To make the next request, use the same - * parameters with the addition of the page[cursor]. - * + *

The cursor used to get the next results, if any. To make the next request, use the same + * parameters with the addition of the page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - public ProcessSummariesMetaPage size(Integer size) { this.size = size; return this; } /** - * Number of results returned. minimum: 0 maximum: 10000 - * + *

Number of results returned.

+ * minimum: 0 + * maximum: 10000 * @return size - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSize() { - return size; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSize() { + return size; + } public void setSize(Integer size) { this.size = size; } - /** Return true if this ProcessSummariesMetaPage object is equal to o. */ + /** + * Return true if this ProcessSummariesMetaPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +101,13 @@ public boolean equals(Object o) { return false; } ProcessSummariesMetaPage processSummariesMetaPage = (ProcessSummariesMetaPage) o; - return Objects.equals(this.after, processSummariesMetaPage.after) - && Objects.equals(this.size, processSummariesMetaPage.size); + return Objects.equals(this.after, processSummariesMetaPage.after) && Objects.equals(this.size, processSummariesMetaPage.size); } + @Override public int hashCode() { - return Objects.hash(after, size); + return Objects.hash(after,size); } @Override @@ -100,7 +121,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesResponse.java b/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesResponse.java index a2f1a829069..86f2a657ba3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProcessSummariesResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List of process summaries. */ +/** + *

List of process summaries.

+ */ @JsonPropertyOrder({ ProcessSummariesResponse.JSON_PROPERTY_DATA, ProcessSummariesResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessSummariesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -36,7 +54,6 @@ public ProcessSummariesResponse data(List data) { } return this; } - public ProcessSummariesResponse addDataItem(ProcessSummary dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -47,21 +64,19 @@ public ProcessSummariesResponse addDataItem(ProcessSummary dataItem) { } /** - * Array of process summary objects. - * + *

Array of process summary objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public ProcessSummariesResponse meta(ProcessSummariesMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -69,22 +84,23 @@ public ProcessSummariesResponse meta(ProcessSummariesMeta meta) { } /** - * Response metadata object. - * + *

Response metadata object.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessSummariesMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessSummariesMeta getMeta() { + return meta; + } public void setMeta(ProcessSummariesMeta meta) { this.meta = meta; } - /** Return true if this ProcessSummariesResponse object is equal to o. */ + /** + * Return true if this ProcessSummariesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } ProcessSummariesResponse processSummariesResponse = (ProcessSummariesResponse) o; - return Objects.equals(this.data, processSummariesResponse.data) - && Objects.equals(this.meta, processSummariesResponse.meta); + return Objects.equals(this.data, processSummariesResponse.data) && Objects.equals(this.meta, processSummariesResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ProcessSummary.java b/src/main/java/com/datadog/api/client/v2/model/ProcessSummary.java index 7589c9b44d2..1538619258b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProcessSummary.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProcessSummary.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Process summary object. */ + +/** + *

Process summary object.

+ */ @JsonPropertyOrder({ ProcessSummary.JSON_PROPERTY_ATTRIBUTES, ProcessSummary.JSON_PROPERTY_ID, ProcessSummary.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessSummary { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ProcessSummaryAttributes attributes; @@ -38,42 +58,38 @@ public ProcessSummary attributes(ProcessSummaryAttributes attributes) { } /** - * Attributes for a process summary. - * + *

Attributes for a process summary.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessSummaryAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessSummaryAttributes getAttributes() { + return attributes; + } public void setAttributes(ProcessSummaryAttributes attributes) { this.attributes = attributes; } - public ProcessSummary id(String id) { this.id = id; return this; } /** - * Process ID. - * + *

Process ID.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public ProcessSummary type(ProcessSummaryType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public ProcessSummary type(ProcessSummaryType type) { } /** - * Type of process summary. - * + *

Type of process summary.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProcessSummaryType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ProcessSummaryType getType() { + return type; + } public void setType(ProcessSummaryType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ProcessSummary object is equal to o. */ + /** + * Return true if this ProcessSummary object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } ProcessSummary processSummary = (ProcessSummary) o; - return Objects.equals(this.attributes, processSummary.attributes) - && Objects.equals(this.id, processSummary.id) - && Objects.equals(this.type, processSummary.type); + return Objects.equals(this.attributes, processSummary.attributes) && Objects.equals(this.id, processSummary.id) && Objects.equals(this.type, processSummary.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryAttributes.java index d3e040e257b..e44793dc62d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes for a process summary. */ +/** + *

Attributes for a process summary.

+ */ @JsonPropertyOrder({ ProcessSummaryAttributes.JSON_PROPERTY_CMDLINE, ProcessSummaryAttributes.JSON_PROPERTY_HOST, @@ -25,10 +43,10 @@ ProcessSummaryAttributes.JSON_PROPERTY_TIMESTAMP, ProcessSummaryAttributes.JSON_PROPERTY_USER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ProcessSummaryAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CMDLINE = "cmdline"; private String cmdline; @@ -59,110 +77,99 @@ public ProcessSummaryAttributes cmdline(String cmdline) { } /** - * Process command line. - * + *

Process command line.

* @return cmdline - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CMDLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCmdline() { - return cmdline; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CMDLINE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCmdline() { + return cmdline; + } public void setCmdline(String cmdline) { this.cmdline = cmdline; } - public ProcessSummaryAttributes host(String host) { this.host = host; return this; } /** - * Host running the process. - * + *

Host running the process.

* @return host - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HOST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHost() { - return host; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHost() { + return host; + } public void setHost(String host) { this.host = host; } - public ProcessSummaryAttributes pid(Long pid) { this.pid = pid; return this; } /** - * Process ID. - * + *

Process ID.

* @return pid - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPid() { - return pid; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPid() { + return pid; + } public void setPid(Long pid) { this.pid = pid; } - public ProcessSummaryAttributes ppid(Long ppid) { this.ppid = ppid; return this; } /** - * Parent process ID. - * + *

Parent process ID.

* @return ppid - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PPID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPpid() { - return ppid; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PPID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getPpid() { + return ppid; + } public void setPpid(Long ppid) { this.ppid = ppid; } - public ProcessSummaryAttributes start(String start) { this.start = start; return this; } /** - * Time the process was started. - * + *

Time the process was started.

* @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStart() { - return start; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStart() { + return start; + } public void setStart(String start) { this.start = start; } - public ProcessSummaryAttributes tags(List tags) { this.tags = tags; return this; } - public ProcessSummaryAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -172,64 +179,61 @@ public ProcessSummaryAttributes addTagsItem(String tagsItem) { } /** - * List of tags associated with the process. - * + *

List of tags associated with the process.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public ProcessSummaryAttributes timestamp(String timestamp) { this.timestamp = timestamp; return this; } /** - * Time the process was seen. - * + *

Time the process was seen.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimestamp() { + return timestamp; + } public void setTimestamp(String timestamp) { this.timestamp = timestamp; } - public ProcessSummaryAttributes user(String user) { this.user = user; return this; } /** - * Process owner. - * + *

Process owner.

* @return user - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUser() { - return user; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUser() { + return user; + } public void setUser(String user) { this.user = user; } - /** Return true if this ProcessSummaryAttributes object is equal to o. */ + /** + * Return true if this ProcessSummaryAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -239,19 +243,13 @@ public boolean equals(Object o) { return false; } ProcessSummaryAttributes processSummaryAttributes = (ProcessSummaryAttributes) o; - return Objects.equals(this.cmdline, processSummaryAttributes.cmdline) - && Objects.equals(this.host, processSummaryAttributes.host) - && Objects.equals(this.pid, processSummaryAttributes.pid) - && Objects.equals(this.ppid, processSummaryAttributes.ppid) - && Objects.equals(this.start, processSummaryAttributes.start) - && Objects.equals(this.tags, processSummaryAttributes.tags) - && Objects.equals(this.timestamp, processSummaryAttributes.timestamp) - && Objects.equals(this.user, processSummaryAttributes.user); + return Objects.equals(this.cmdline, processSummaryAttributes.cmdline) && Objects.equals(this.host, processSummaryAttributes.host) && Objects.equals(this.pid, processSummaryAttributes.pid) && Objects.equals(this.ppid, processSummaryAttributes.ppid) && Objects.equals(this.start, processSummaryAttributes.start) && Objects.equals(this.tags, processSummaryAttributes.tags) && Objects.equals(this.timestamp, processSummaryAttributes.timestamp) && Objects.equals(this.user, processSummaryAttributes.user); } + @Override public int hashCode() { - return Objects.hash(cmdline, host, pid, ppid, start, tags, timestamp, user); + return Objects.hash(cmdline,host,pid,ppid,start,tags,timestamp,user); } @Override @@ -271,7 +269,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryType.java b/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryType.java index e2ac0a19c04..6a8d7b719b8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProcessSummaryType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of process summary. */ +/** + *

Type of process summary.

+ */ @JsonSerialize(using = ProcessSummaryType.ProcessSummaryTypeSerializer.class) public class ProcessSummaryType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class ProcessSummaryTypeSerializer extends StdSerializer { - public ProcessSummaryTypeSerializer(Class t) { - super(t); - } - - public ProcessSummaryTypeSerializer() { - this(null); - } - - @Override - public void serialize(ProcessSummaryType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public ProcessSummaryTypeSerializer(Class t) { + super(t); + } + + public ProcessSummaryTypeSerializer() { + this(null); + } + + @Override + public void serialize(ProcessSummaryType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ProcessSummaryType object is equal to o. */ + /** + * Return true if this ProcessSummaryType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryFormula.java b/src/main/java/com/datadog/api/client/v2/model/QueryFormula.java index ada3711fb1e..ca348b3683d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/QueryFormula.java +++ b/src/main/java/com/datadog/api/client/v2/model/QueryFormula.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A formula for calculation based on one or more queries. */ -@JsonPropertyOrder({QueryFormula.JSON_PROPERTY_FORMULA, QueryFormula.JSON_PROPERTY_LIMIT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A formula for calculation based on one or more queries.

+ */ +@JsonPropertyOrder({ + QueryFormula.JSON_PROPERTY_FORMULA, + QueryFormula.JSON_PROPERTY_LIMIT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class QueryFormula { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORMULA = "formula"; private String formula; @@ -29,30 +51,27 @@ public QueryFormula() {} @JsonCreator public QueryFormula( - @JsonProperty(required = true, value = JSON_PROPERTY_FORMULA) String formula) { - this.formula = formula; + @JsonProperty(required=true, value=JSON_PROPERTY_FORMULA)String formula) { + this.formula = formula; } - public QueryFormula formula(String formula) { this.formula = formula; return this; } /** - * Formula string, referencing one or more queries with their name property. - * + *

Formula string, referencing one or more queries with their name property.

* @return formula - */ - @JsonProperty(JSON_PROPERTY_FORMULA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFormula() { - return formula; - } - + **/ + @JsonProperty(JSON_PROPERTY_FORMULA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFormula() { + return formula; + } public void setFormula(String formula) { this.formula = formula; } - public QueryFormula limit(FormulaLimit limit) { this.limit = limit; this.unparsed |= limit.unparsed; @@ -60,22 +79,23 @@ public QueryFormula limit(FormulaLimit limit) { } /** - * Message for specifying limits to the number of values returned by a query. - * + *

Message for specifying limits to the number of values returned by a query.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FormulaLimit getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public FormulaLimit getLimit() { + return limit; + } public void setLimit(FormulaLimit limit) { this.limit = limit; } - /** Return true if this QueryFormula object is equal to o. */ + /** + * Return true if this QueryFormula object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,13 +105,13 @@ public boolean equals(Object o) { return false; } QueryFormula queryFormula = (QueryFormula) o; - return Objects.equals(this.formula, queryFormula.formula) - && Objects.equals(this.limit, queryFormula.limit); + return Objects.equals(this.formula, queryFormula.formula) && Objects.equals(this.limit, queryFormula.limit); } + @Override public int hashCode() { - return Objects.hash(formula, limit); + return Objects.hash(formula,limit); } @Override @@ -105,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/QuerySortOrder.java b/src/main/java/com/datadog/api/client/v2/model/QuerySortOrder.java index cd8a81748cd..403116d7598 100644 --- a/src/main/java/com/datadog/api/client/v2/model/QuerySortOrder.java +++ b/src/main/java/com/datadog/api/client/v2/model/QuerySortOrder.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Direction of sort. */ +/** + *

Direction of sort.

+ */ @JsonSerialize(using = QuerySortOrder.QuerySortOrderSerializer.class) public class QuerySortOrder { public static final QuerySortOrder ASC = new QuerySortOrder("asc"); public static final QuerySortOrder DESC = new QuerySortOrder("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class QuerySortOrderSerializer extends StdSerializer { - public QuerySortOrderSerializer(Class t) { - super(t); - } - - public QuerySortOrderSerializer() { - this(null); - } - - @Override - public void serialize(QuerySortOrder value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public QuerySortOrderSerializer(Class t) { + super(t); + } + + public QuerySortOrderSerializer() { + this(null); + } + + @Override + public void serialize(QuerySortOrder value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this QuerySortOrder object is equal to o. */ + /** + * Return true if this QuerySortOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValue.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValue.java index 300f1e1cb17..0f27476a5f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValue.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValue.java @@ -6,339 +6,309 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = RUMAggregateBucketValue.RUMAggregateBucketValueDeserializer.class) @JsonSerialize(using = RUMAggregateBucketValue.RUMAggregateBucketValueSerializer.class) public class RUMAggregateBucketValue extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(RUMAggregateBucketValue.class.getName()); - - @JsonIgnore public boolean unparsed = false; + private static final Logger log = Logger.getLogger(RUMAggregateBucketValue.class.getName()); - public static class RUMAggregateBucketValueSerializer - extends StdSerializer { - public RUMAggregateBucketValueSerializer(Class t) { - super(t); - } + @JsonIgnore + public boolean unparsed = false; - public RUMAggregateBucketValueSerializer() { - this(null); - } - - @Override - public void serialize( - RUMAggregateBucketValue value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class RUMAggregateBucketValueSerializer extends StdSerializer { + public RUMAggregateBucketValueSerializer(Class t) { + super(t); + } - public static class RUMAggregateBucketValueDeserializer - extends StdDeserializer { - public RUMAggregateBucketValueDeserializer() { - this(RUMAggregateBucketValue.class); - } + public RUMAggregateBucketValueSerializer() { + this(null); + } - public RUMAggregateBucketValueDeserializer(Class vc) { - super(vc); + @Override + public void serialize(RUMAggregateBucketValue value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public RUMAggregateBucketValue 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 String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class RUMAggregateBucketValueDeserializer extends StdDeserializer { + public RUMAggregateBucketValueDeserializer() { + this(RUMAggregateBucketValue.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + public RUMAggregateBucketValueDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public RUMAggregateBucketValue 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 String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + // deserialize RUMAggregateBucketValueTimeseries + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RUMAggregateBucketValueTimeseries.class.equals(Integer.class) || RUMAggregateBucketValueTimeseries.class.equals(Long.class) || RUMAggregateBucketValueTimeseries.class.equals(Float.class) || RUMAggregateBucketValueTimeseries.class.equals(Double.class) || RUMAggregateBucketValueTimeseries.class.equals(Boolean.class) || RUMAggregateBucketValueTimeseries.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((RUMAggregateBucketValueTimeseries.class.equals(Integer.class) || RUMAggregateBucketValueTimeseries.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((RUMAggregateBucketValueTimeseries.class.equals(Float.class) || RUMAggregateBucketValueTimeseries.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (RUMAggregateBucketValueTimeseries.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (RUMAggregateBucketValueTimeseries.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(RUMAggregateBucketValueTimeseries.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 (!((RUMAggregateBucketValueTimeseries)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'RUMAggregateBucketValueTimeseries'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'RUMAggregateBucketValueTimeseries'", e); + } + + RUMAggregateBucketValue ret = new RUMAggregateBucketValue(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public RUMAggregateBucketValue getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "RUMAggregateBucketValue cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } + } - // deserialize RUMAggregateBucketValueTimeseries - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (RUMAggregateBucketValueTimeseries.class.equals(Integer.class) - || RUMAggregateBucketValueTimeseries.class.equals(Long.class) - || RUMAggregateBucketValueTimeseries.class.equals(Float.class) - || RUMAggregateBucketValueTimeseries.class.equals(Double.class) - || RUMAggregateBucketValueTimeseries.class.equals(Boolean.class) - || RUMAggregateBucketValueTimeseries.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((RUMAggregateBucketValueTimeseries.class.equals(Integer.class) - || RUMAggregateBucketValueTimeseries.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((RUMAggregateBucketValueTimeseries.class.equals(Float.class) - || RUMAggregateBucketValueTimeseries.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (RUMAggregateBucketValueTimeseries.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (RUMAggregateBucketValueTimeseries.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(RUMAggregateBucketValueTimeseries.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 (!((RUMAggregateBucketValueTimeseries) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'RUMAggregateBucketValueTimeseries'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'RUMAggregateBucketValueTimeseries'", e); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - RUMAggregateBucketValue ret = new RUMAggregateBucketValue(); - 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; + public RUMAggregateBucketValue() { + super("oneOf", Boolean.FALSE); } - - /** Handle deserialization of the 'null' value. */ - @Override - public RUMAggregateBucketValue getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "RUMAggregateBucketValue cannot be null"); + public RUMAggregateBucketValue(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public RUMAggregateBucketValue(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public RUMAggregateBucketValue(RUMAggregateBucketValueTimeseries o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public RUMAggregateBucketValue() { - super("oneOf", Boolean.FALSE); - } - - public RUMAggregateBucketValue(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public RUMAggregateBucketValue(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public RUMAggregateBucketValue(RUMAggregateBucketValueTimeseries o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + schemas.put("RUMAggregateBucketValueTimeseries", new GenericType() { + }); + JSON.registerDescendants(RUMAggregateBucketValue.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - schemas.put( - "RUMAggregateBucketValueTimeseries", - new GenericType() {}); - JSON.registerDescendants(RUMAggregateBucketValue.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return RUMAggregateBucketValue.schemas; + } - @Override - public Map getSchemas() { - return RUMAggregateBucketValue.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * String, Double, RUMAggregateBucketValueTimeseries + * + * 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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(RUMAggregateBucketValueTimeseries.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Double, RUMAggregateBucketValueTimeseries - * - *

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(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - RUMAggregateBucketValueTimeseries.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 String, Double, RUMAggregateBucketValueTimeseries"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * String, Double, RUMAggregateBucketValueTimeseries + * + * @return The actual instance (String, Double, RUMAggregateBucketValueTimeseries) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be String, Double, RUMAggregateBucketValueTimeseries"); - } - /** - * Get the actual instance, which can be the following: String, Double, - * RUMAggregateBucketValueTimeseries - * - * @return The actual instance (String, Double, RUMAggregateBucketValueTimeseries) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } - /** - * Get the actual instance of `RUMAggregateBucketValueTimeseries`. If the actual instance is not - * `RUMAggregateBucketValueTimeseries`, the ClassCastException will be thrown. - * - * @return The actual instance of `RUMAggregateBucketValueTimeseries` - * @throws ClassCastException if the instance is not `RUMAggregateBucketValueTimeseries` - */ - public RUMAggregateBucketValueTimeseries getRUMAggregateBucketValueTimeseries() - throws ClassCastException { - return (RUMAggregateBucketValueTimeseries) super.getActualInstance(); - } + /** + * Get the actual instance of `RUMAggregateBucketValueTimeseries`. If the actual instance is not `RUMAggregateBucketValueTimeseries`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RUMAggregateBucketValueTimeseries` + * @throws ClassCastException if the instance is not `RUMAggregateBucketValueTimeseries` + */ + public RUMAggregateBucketValueTimeseries getRUMAggregateBucketValueTimeseries() throws ClassCastException { + return (RUMAggregateBucketValueTimeseries)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseries.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseries.java index 1f6349ba320..ab666c51399 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseries.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseries.java @@ -6,20 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A timeseries array. */ -@JsonPropertyOrder({}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RUMAggregateBucketValueTimeseries - extends ArrayList { - @JsonIgnore public boolean unparsed = false; - /** Return true if this RUMAggregateBucketValueTimeseries object is equal to o. */ +/** + *

A timeseries array.

+ */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMAggregateBucketValueTimeseries extends ArrayList { + @JsonIgnore + public boolean unparsed = false; + + /** + * Return true if this RUMAggregateBucketValueTimeseries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -31,6 +54,7 @@ public boolean equals(Object o) { return super.equals(o); } + @Override public int hashCode() { return Objects.hash(super.hashCode()); @@ -46,7 +70,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseriesPoint.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseriesPoint.java index a207a7842e3..0c2191af436 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseriesPoint.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateBucketValueTimeseriesPoint.java @@ -6,26 +6,42 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** A timeseries point. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A timeseries point.

+ */ @JsonPropertyOrder({ RUMAggregateBucketValueTimeseriesPoint.JSON_PROPERTY_TIME, RUMAggregateBucketValueTimeseriesPoint.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMAggregateBucketValueTimeseriesPoint { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME = "time"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime time; @@ -38,43 +54,42 @@ public RUMAggregateBucketValueTimeseriesPoint time(OffsetDateTime time) { } /** - * The time value for this point. - * + *

The time value for this point.

* @return time - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTime() { - return time; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTime() { + return time; + } public void setTime(OffsetDateTime time) { this.time = time; } - public RUMAggregateBucketValueTimeseriesPoint value(Double value) { this.value = value; return this; } /** - * The value for this point. - * + *

The value for this point.

* @return value - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getValue() { - return value; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } public void setValue(Double value) { this.value = value; } - /** Return true if this RUMAggregateBucketValueTimeseriesPoint object is equal to o. */ + /** + * Return true if this RUMAggregateBucketValueTimeseriesPoint object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,15 +98,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RUMAggregateBucketValueTimeseriesPoint rumAggregateBucketValueTimeseriesPoint = - (RUMAggregateBucketValueTimeseriesPoint) o; - return Objects.equals(this.time, rumAggregateBucketValueTimeseriesPoint.time) - && Objects.equals(this.value, rumAggregateBucketValueTimeseriesPoint.value); + RUMAggregateBucketValueTimeseriesPoint rumAggregateBucketValueTimeseriesPoint = (RUMAggregateBucketValueTimeseriesPoint) o; + return Objects.equals(this.time, rumAggregateBucketValueTimeseriesPoint.time) && Objects.equals(this.value, rumAggregateBucketValueTimeseriesPoint.value); } + @Override public int hashCode() { - return Objects.hash(time, value); + return Objects.hash(time,value); } @Override @@ -105,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java index f8c3d31521d..206b7ea528a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java @@ -6,17 +6,32 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The object sent with the request to retrieve aggregation buckets of RUM events from your - * organization. + *

The object sent with the request to retrieve aggregation buckets of RUM events from your organization.

*/ @JsonPropertyOrder({ RUMAggregateRequest.JSON_PROPERTY_COMPUTE, @@ -25,10 +40,10 @@ RUMAggregateRequest.JSON_PROPERTY_OPTIONS, RUMAggregateRequest.JSON_PROPERTY_PAGE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMAggregateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPUTE = "compute"; private List compute = null; @@ -51,7 +66,6 @@ public RUMAggregateRequest compute(List compute) { } return this; } - public RUMAggregateRequest addComputeItem(RUMCompute computeItem) { if (this.compute == null) { this.compute = new ArrayList<>(); @@ -62,21 +76,19 @@ public RUMAggregateRequest addComputeItem(RUMCompute computeItem) { } /** - * The list of metrics or timeseries to compute for the retrieved buckets. - * + *

The list of metrics or timeseries to compute for the retrieved buckets.

* @return compute - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCompute() { - return compute; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCompute() { + return compute; + } public void setCompute(List compute) { this.compute = compute; } - public RUMAggregateRequest filter(RUMQueryFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -84,21 +96,19 @@ public RUMAggregateRequest filter(RUMQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMQueryFilter getFilter() { + return filter; + } public void setFilter(RUMQueryFilter filter) { this.filter = filter; } - public RUMAggregateRequest groupBy(List groupBy) { this.groupBy = groupBy; for (RUMGroupBy item : groupBy) { @@ -106,7 +116,6 @@ public RUMAggregateRequest groupBy(List groupBy) { } return this; } - public RUMAggregateRequest addGroupByItem(RUMGroupBy groupByItem) { if (this.groupBy == null) { this.groupBy = new ArrayList<>(); @@ -117,21 +126,19 @@ public RUMAggregateRequest addGroupByItem(RUMGroupBy groupByItem) { } /** - * The rules for the group by. - * + *

The rules for the group by.

* @return groupBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { - return groupBy; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupBy() { + return groupBy; + } public void setGroupBy(List groupBy) { this.groupBy = groupBy; } - public RUMAggregateRequest options(RUMQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -139,22 +146,20 @@ public RUMAggregateRequest options(RUMQueryOptions options) { } /** - * Global query options that are used during the query. Note: Only supply timezone or time offset, - * not both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Note: Only supply timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMQueryOptions getOptions() { + return options; + } public void setOptions(RUMQueryOptions options) { this.options = options; } - public RUMAggregateRequest page(RUMQueryPageOptions page) { this.page = page; this.unparsed |= page.unparsed; @@ -162,22 +167,23 @@ public RUMAggregateRequest page(RUMQueryPageOptions page) { } /** - * Paging attributes for listing events. - * + *

Paging attributes for listing events.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMQueryPageOptions getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMQueryPageOptions getPage() { + return page; + } public void setPage(RUMQueryPageOptions page) { this.page = page; } - /** Return true if this RUMAggregateRequest object is equal to o. */ + /** + * Return true if this RUMAggregateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -187,16 +193,13 @@ public boolean equals(Object o) { return false; } RUMAggregateRequest rumAggregateRequest = (RUMAggregateRequest) o; - return Objects.equals(this.compute, rumAggregateRequest.compute) - && Objects.equals(this.filter, rumAggregateRequest.filter) - && Objects.equals(this.groupBy, rumAggregateRequest.groupBy) - && Objects.equals(this.options, rumAggregateRequest.options) - && Objects.equals(this.page, rumAggregateRequest.page); + return Objects.equals(this.compute, rumAggregateRequest.compute) && Objects.equals(this.filter, rumAggregateRequest.filter) && Objects.equals(this.groupBy, rumAggregateRequest.groupBy) && Objects.equals(this.options, rumAggregateRequest.options) && Objects.equals(this.page, rumAggregateRequest.page); } + @Override public int hashCode() { - return Objects.hash(compute, filter, groupBy, options, page); + return Objects.hash(compute,filter,groupBy,options,page); } @Override @@ -213,7 +216,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java index fdc93a2dc70..051d188ff37 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A sort rule. */ + +/** + *

A sort rule.

+ */ @JsonPropertyOrder({ RUMAggregateSort.JSON_PROPERTY_AGGREGATION, RUMAggregateSort.JSON_PROPERTY_METRIC, RUMAggregateSort.JSON_PROPERTY_ORDER, RUMAggregateSort.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMAggregateSort { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private RUMAggregationFunction aggregation; @@ -42,45 +62,41 @@ public RUMAggregateSort aggregation(RUMAggregationFunction aggregation) { } /** - * An aggregation function. - * + *

An aggregation function.

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMAggregationFunction getAggregation() { - return aggregation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMAggregationFunction getAggregation() { + return aggregation; + } public void setAggregation(RUMAggregationFunction aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public RUMAggregateSort metric(String metric) { this.metric = metric; return this; } /** - * The metric to sort by (only used for type=measure). - * + *

The metric to sort by (only used for type=measure).

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public RUMAggregateSort order(RUMSortOrder order) { this.order = order; this.unparsed |= !order.isValid(); @@ -88,24 +104,22 @@ public RUMAggregateSort order(RUMSortOrder order) { } /** - * The order to use, ascending or descending. - * + *

The order to use, ascending or descending.

* @return order - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMSortOrder getOrder() { - return order; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMSortOrder getOrder() { + return order; + } public void setOrder(RUMSortOrder order) { if (!order.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.order = order; } - public RUMAggregateSort type(RUMAggregateSortType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -113,25 +127,26 @@ public RUMAggregateSort type(RUMAggregateSortType type) { } /** - * The type of sorting algorithm. - * + *

The type of sorting algorithm.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMAggregateSortType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMAggregateSortType getType() { + return type; + } public void setType(RUMAggregateSortType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMAggregateSort object is equal to o. */ + /** + * Return true if this RUMAggregateSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -141,15 +156,13 @@ public boolean equals(Object o) { return false; } RUMAggregateSort rumAggregateSort = (RUMAggregateSort) o; - return Objects.equals(this.aggregation, rumAggregateSort.aggregation) - && Objects.equals(this.metric, rumAggregateSort.metric) - && Objects.equals(this.order, rumAggregateSort.order) - && Objects.equals(this.type, rumAggregateSort.type); + return Objects.equals(this.aggregation, rumAggregateSort.aggregation) && Objects.equals(this.metric, rumAggregateSort.metric) && Objects.equals(this.order, rumAggregateSort.order) && Objects.equals(this.type, rumAggregateSort.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, metric, order, type); + return Objects.hash(aggregation,metric,order,type); } @Override @@ -165,7 +178,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java index b0a31e4185e..f2fb34862ee 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of sorting algorithm. */ +/** + *

The type of sorting algorithm.

+ */ @JsonSerialize(using = RUMAggregateSortType.RUMAggregateSortTypeSerializer.class) public class RUMAggregateSortType { public static final RUMAggregateSortType ALPHABETICAL = new RUMAggregateSortType("alphabetical"); public static final RUMAggregateSortType MEASURE = new RUMAggregateSortType("measure"); - private static final Set allowedValues = - new HashSet(Arrays.asList("alphabetical", "measure")); + private static final Set allowedValues = new HashSet(Arrays.asList("alphabetical", "measure")); private String value; @@ -40,20 +63,18 @@ public boolean isValid() { } public static class RUMAggregateSortTypeSerializer extends StdSerializer { - public RUMAggregateSortTypeSerializer(Class t) { - super(t); - } - - public RUMAggregateSortTypeSerializer() { - this(null); - } - - @Override - public void serialize( - RUMAggregateSortType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMAggregateSortTypeSerializer(Class t) { + super(t); + } + + public RUMAggregateSortTypeSerializer() { + this(null); + } + + @Override + public void serialize(RUMAggregateSortType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMAggregateSortType object is equal to o. */ + /** + * Return true if this RUMAggregateSortType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregationBucketsResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregationBucketsResponse.java index 11006312016..71af4a0a317 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregationBucketsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregationBucketsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The query results. */ -@JsonPropertyOrder({RUMAggregationBucketsResponse.JSON_PROPERTY_BUCKETS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The query results.

+ */ +@JsonPropertyOrder({ + RUMAggregationBucketsResponse.JSON_PROPERTY_BUCKETS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMAggregationBucketsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BUCKETS = "buckets"; private List buckets = null; @@ -30,7 +50,6 @@ public RUMAggregationBucketsResponse buckets(List buckets) { } return this; } - public RUMAggregationBucketsResponse addBucketsItem(RUMBucketResponse bucketsItem) { if (this.buckets == null) { this.buckets = new ArrayList<>(); @@ -41,22 +60,23 @@ public RUMAggregationBucketsResponse addBucketsItem(RUMBucketResponse bucketsIte } /** - * The list of matching buckets, one item per bucket. - * + *

The list of matching buckets, one item per bucket.

* @return buckets - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BUCKETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getBuckets() { - return buckets; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKETS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getBuckets() { + return buckets; + } public void setBuckets(List buckets) { this.buckets = buckets; } - /** Return true if this RUMAggregationBucketsResponse object is equal to o. */ + /** + * Return true if this RUMAggregationBucketsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.buckets, rumAggregationBucketsResponse.buckets); } + @Override public int hashCode() { return Objects.hash(buckets); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java index 83ffa3782f3..45614fa0b4b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java @@ -6,26 +6,49 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** An aggregation function. */ +/** + *

An aggregation function.

+ */ @JsonSerialize(using = RUMAggregationFunction.RUMAggregationFunctionSerializer.class) public class RUMAggregationFunction { public static final RUMAggregationFunction COUNT = new RUMAggregationFunction("count"); - public static final RUMAggregationFunction CARDINALITY = - new RUMAggregationFunction("cardinality"); + public static final RUMAggregationFunction CARDINALITY = new RUMAggregationFunction("cardinality"); public static final RUMAggregationFunction PERCENTILE_75 = new RUMAggregationFunction("pc75"); public static final RUMAggregationFunction PERCENTILE_90 = new RUMAggregationFunction("pc90"); public static final RUMAggregationFunction PERCENTILE_95 = new RUMAggregationFunction("pc95"); @@ -37,21 +60,7 @@ public class RUMAggregationFunction { public static final RUMAggregationFunction AVG = new RUMAggregationFunction("avg"); public static final RUMAggregationFunction MEDIAN = new RUMAggregationFunction("median"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "pc75", - "pc90", - "pc95", - "pc98", - "pc99", - "sum", - "min", - "max", - "avg", - "median")); + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median")); private String value; @@ -63,22 +72,19 @@ public boolean isValid() { this.value = value; } - public static class RUMAggregationFunctionSerializer - extends StdSerializer { - public RUMAggregationFunctionSerializer(Class t) { - super(t); - } + public static class RUMAggregationFunctionSerializer extends StdSerializer { + public RUMAggregationFunctionSerializer(Class t) { + super(t); + } - public RUMAggregationFunctionSerializer() { - this(null); - } + public RUMAggregationFunctionSerializer() { + this(null); + } - @Override - public void serialize( - RUMAggregationFunction value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(RUMAggregationFunction value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -90,7 +96,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMAggregationFunction object is equal to o. */ + /** + * Return true if this RUMAggregationFunction object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +112,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAnalyticsAggregateResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMAnalyticsAggregateResponse.java index 7cb0388b852..9240dd8bda8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAnalyticsAggregateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAnalyticsAggregateResponse.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response object for the RUM events aggregate API endpoint. */ + +/** + *

The response object for the RUM events aggregate API endpoint.

+ */ @JsonPropertyOrder({ RUMAnalyticsAggregateResponse.JSON_PROPERTY_DATA, RUMAnalyticsAggregateResponse.JSON_PROPERTY_LINKS, RUMAnalyticsAggregateResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMAnalyticsAggregateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RUMAggregationBucketsResponse data; @@ -38,21 +58,19 @@ public RUMAnalyticsAggregateResponse data(RUMAggregationBucketsResponse data) { } /** - * The query results. - * + *

The query results.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMAggregationBucketsResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMAggregationBucketsResponse getData() { + return data; + } public void setData(RUMAggregationBucketsResponse data) { this.data = data; } - public RUMAnalyticsAggregateResponse links(RUMResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -60,21 +78,19 @@ public RUMAnalyticsAggregateResponse links(RUMResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMResponseLinks getLinks() { + return links; + } public void setLinks(RUMResponseLinks links) { this.links = links; } - public RUMAnalyticsAggregateResponse meta(RUMResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -82,22 +98,23 @@ public RUMAnalyticsAggregateResponse meta(RUMResponseMetadata meta) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMResponseMetadata getMeta() { + return meta; + } public void setMeta(RUMResponseMetadata meta) { this.meta = meta; } - /** Return true if this RUMAnalyticsAggregateResponse object is equal to o. */ + /** + * Return true if this RUMAnalyticsAggregateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -107,14 +124,13 @@ public boolean equals(Object o) { return false; } RUMAnalyticsAggregateResponse rumAnalyticsAggregateResponse = (RUMAnalyticsAggregateResponse) o; - return Objects.equals(this.data, rumAnalyticsAggregateResponse.data) - && Objects.equals(this.links, rumAnalyticsAggregateResponse.links) - && Objects.equals(this.meta, rumAnalyticsAggregateResponse.meta); + return Objects.equals(this.data, rumAnalyticsAggregateResponse.data) && Objects.equals(this.links, rumAnalyticsAggregateResponse.links) && Objects.equals(this.meta, rumAnalyticsAggregateResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -129,7 +145,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplication.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplication.java index 6179c80b569..15d7fa9657d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplication.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplication.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** RUM application. */ +/** + *

RUM application.

+ */ @JsonPropertyOrder({ RUMApplication.JSON_PROPERTY_ATTRIBUTES, RUMApplication.JSON_PROPERTY_ID, RUMApplication.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplication { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RUMApplicationAttributes attributes; @@ -36,17 +55,15 @@ public RUMApplication() {} @JsonCreator public RUMApplication( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RUMApplicationAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMApplicationType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RUMApplicationAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RUMApplicationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RUMApplication attributes(RUMApplicationAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public RUMApplication attributes(RUMApplicationAttributes attributes) { } /** - * RUM application attributes. - * + *

RUM application attributes.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationAttributes getAttributes() { + return attributes; + } public void setAttributes(RUMApplicationAttributes attributes) { this.attributes = attributes; } - public RUMApplication id(String id) { this.id = id; return this; } /** - * RUM application ID. - * + *

RUM application ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RUMApplication type(RUMApplicationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public RUMApplication type(RUMApplicationType type) { } /** - * RUM application response type. - * + *

RUM application response type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationType getType() { + return type; + } public void setType(RUMApplicationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMApplication object is equal to o. */ + /** + * Return true if this RUMApplication object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } RUMApplication rumApplication = (RUMApplication) o; - return Objects.equals(this.attributes, rumApplication.attributes) - && Objects.equals(this.id, rumApplication.id) - && Objects.equals(this.type, rumApplication.type); + return Objects.equals(this.attributes, rumApplication.attributes) && Objects.equals(this.id, rumApplication.id) && Objects.equals(this.type, rumApplication.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java index 02c66826868..955fcf2fda9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** RUM application attributes. */ +/** + *

RUM application attributes.

+ */ @JsonPropertyOrder({ RUMApplicationAttributes.JSON_PROPERTY_APPLICATION_ID, RUMApplicationAttributes.JSON_PROPERTY_CLIENT_TOKEN, @@ -27,10 +46,10 @@ RUMApplicationAttributes.JSON_PROPERTY_UPDATED_AT, RUMApplicationAttributes.JSON_PROPERTY_UPDATED_BY_HANDLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; private String applicationId; @@ -68,252 +87,230 @@ public RUMApplicationAttributes() {} @JsonCreator public RUMApplicationAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) String applicationId, - @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_TOKEN) String clientToken, - @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) Long createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY_HANDLE) - String createdByHandle, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Integer orgId, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type, - @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) Long updatedAt, - @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_BY_HANDLE) - String updatedByHandle) { - this.applicationId = applicationId; - this.clientToken = clientToken; - this.createdAt = createdAt; - this.createdByHandle = createdByHandle; - this.name = name; - this.orgId = orgId; - this.type = type; - this.updatedAt = updatedAt; - this.updatedByHandle = updatedByHandle; + @JsonProperty(required=true, value=JSON_PROPERTY_APPLICATION_ID)String applicationId, + @JsonProperty(required=true, value=JSON_PROPERTY_CLIENT_TOKEN)String clientToken, + @JsonProperty(required=true, value=JSON_PROPERTY_CREATED_AT)Long createdAt, + @JsonProperty(required=true, value=JSON_PROPERTY_CREATED_BY_HANDLE)String createdByHandle, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_ORG_ID)Integer orgId, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)String type, + @JsonProperty(required=true, value=JSON_PROPERTY_UPDATED_AT)Long updatedAt, + @JsonProperty(required=true, value=JSON_PROPERTY_UPDATED_BY_HANDLE)String updatedByHandle) { + this.applicationId = applicationId; + this.clientToken = clientToken; + this.createdAt = createdAt; + this.createdByHandle = createdByHandle; + this.name = name; + this.orgId = orgId; + this.type = type; + this.updatedAt = updatedAt; + this.updatedByHandle = updatedByHandle; } - public RUMApplicationAttributes applicationId(String applicationId) { this.applicationId = applicationId; return this; } /** - * ID of the RUM application. - * + *

ID of the RUM application.

* @return applicationId - */ - @JsonProperty(JSON_PROPERTY_APPLICATION_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApplicationId() { - return applicationId; - } - + **/ + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApplicationId() { + return applicationId; + } public void setApplicationId(String applicationId) { this.applicationId = applicationId; } - public RUMApplicationAttributes clientToken(String clientToken) { this.clientToken = clientToken; return this; } /** - * Client token of the RUM application. - * + *

Client token of the RUM application.

* @return clientToken - */ - @JsonProperty(JSON_PROPERTY_CLIENT_TOKEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientToken() { - return clientToken; - } - + **/ + @JsonProperty(JSON_PROPERTY_CLIENT_TOKEN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getClientToken() { + return clientToken; + } public void setClientToken(String clientToken) { this.clientToken = clientToken; } - public RUMApplicationAttributes createdAt(Long createdAt) { this.createdAt = createdAt; return this; } /** - * Timestamp in ms of the creation date. - * + *

Timestamp in ms of the creation date.

* @return createdAt - */ - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getCreatedAt() { + return createdAt; + } public void setCreatedAt(Long createdAt) { this.createdAt = createdAt; } - public RUMApplicationAttributes createdByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; return this; } /** - * Handle of the creator user. - * + *

Handle of the creator user.

* @return createdByHandle - */ - @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCreatedByHandle() { - return createdByHandle; - } - + **/ + @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getCreatedByHandle() { + return createdByHandle; + } public void setCreatedByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; } - public RUMApplicationAttributes hash(String hash) { this.hash = hash; return this; } /** - * Hash of the RUM application. Optional. - * + *

Hash of the RUM application. Optional.

* @return hash - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HASH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHash() { - return hash; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHash() { + return hash; + } public void setHash(String hash) { this.hash = hash; } - public RUMApplicationAttributes isActive(Boolean isActive) { this.isActive = isActive; return this; } /** - * Indicates if the RUM application is active. - * + *

Indicates if the RUM application is active.

* @return isActive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsActive() { - return isActive; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsActive() { + return isActive; + } public void setIsActive(Boolean isActive) { this.isActive = isActive; } - public RUMApplicationAttributes name(String name) { this.name = name; return this; } /** - * Name of the RUM application. - * + *

Name of the RUM application.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public RUMApplicationAttributes orgId(Integer orgId) { this.orgId = orgId; return this; } /** - * Org ID of the RUM application. maximum: 2147483647 - * + *

Org ID of the RUM application.

+ * maximum: 2147483647 * @return orgId - */ - @JsonProperty(JSON_PROPERTY_ORG_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getOrgId() { - return orgId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Integer getOrgId() { + return orgId; + } public void setOrgId(Integer orgId) { this.orgId = orgId; } - public RUMApplicationAttributes type(String type) { this.type = type; return this; } /** - * Type of the RUM application. Supported values are browser, ios, - * android, react-native, flutter. - * + *

Type of the RUM application. Supported values are browser, ios, android, react-native, flutter.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - public RUMApplicationAttributes updatedAt(Long updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Timestamp in ms of the last update date. - * + *

Timestamp in ms of the last update date.

* @return updatedAt - */ - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getUpdatedAt() { - return updatedAt; - } - + **/ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(Long updatedAt) { this.updatedAt = updatedAt; } - public RUMApplicationAttributes updatedByHandle(String updatedByHandle) { this.updatedByHandle = updatedByHandle; return this; } /** - * Handle of the updater user. - * + *

Handle of the updater user.

* @return updatedByHandle - */ - @JsonProperty(JSON_PROPERTY_UPDATED_BY_HANDLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUpdatedByHandle() { - return updatedByHandle; - } - + **/ + @JsonProperty(JSON_PROPERTY_UPDATED_BY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUpdatedByHandle() { + return updatedByHandle; + } public void setUpdatedByHandle(String updatedByHandle) { this.updatedByHandle = updatedByHandle; } - /** Return true if this RUMApplicationAttributes object is equal to o. */ + /** + * Return true if this RUMApplicationAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -323,33 +320,13 @@ public boolean equals(Object o) { return false; } RUMApplicationAttributes rumApplicationAttributes = (RUMApplicationAttributes) o; - return Objects.equals(this.applicationId, rumApplicationAttributes.applicationId) - && Objects.equals(this.clientToken, rumApplicationAttributes.clientToken) - && Objects.equals(this.createdAt, rumApplicationAttributes.createdAt) - && Objects.equals(this.createdByHandle, rumApplicationAttributes.createdByHandle) - && Objects.equals(this.hash, rumApplicationAttributes.hash) - && Objects.equals(this.isActive, rumApplicationAttributes.isActive) - && Objects.equals(this.name, rumApplicationAttributes.name) - && Objects.equals(this.orgId, rumApplicationAttributes.orgId) - && Objects.equals(this.type, rumApplicationAttributes.type) - && Objects.equals(this.updatedAt, rumApplicationAttributes.updatedAt) - && Objects.equals(this.updatedByHandle, rumApplicationAttributes.updatedByHandle); + return Objects.equals(this.applicationId, rumApplicationAttributes.applicationId) && Objects.equals(this.clientToken, rumApplicationAttributes.clientToken) && Objects.equals(this.createdAt, rumApplicationAttributes.createdAt) && Objects.equals(this.createdByHandle, rumApplicationAttributes.createdByHandle) && Objects.equals(this.hash, rumApplicationAttributes.hash) && Objects.equals(this.isActive, rumApplicationAttributes.isActive) && Objects.equals(this.name, rumApplicationAttributes.name) && Objects.equals(this.orgId, rumApplicationAttributes.orgId) && Objects.equals(this.type, rumApplicationAttributes.type) && Objects.equals(this.updatedAt, rumApplicationAttributes.updatedAt) && Objects.equals(this.updatedByHandle, rumApplicationAttributes.updatedByHandle); } + @Override public int hashCode() { - return Objects.hash( - applicationId, - clientToken, - createdAt, - createdByHandle, - hash, - isActive, - name, - orgId, - type, - updatedAt, - updatedByHandle); + return Objects.hash(applicationId,clientToken,createdAt,createdByHandle,hash,isActive,name,orgId,type,updatedAt,updatedByHandle); } @Override @@ -372,7 +349,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java index a02c2d9f3d7..25ab15f55f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application creation. */ + +/** + *

RUM application creation.

+ */ @JsonPropertyOrder({ RUMApplicationCreate.JSON_PROPERTY_ATTRIBUTES, RUMApplicationCreate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationCreate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RUMApplicationCreateAttributes attributes; @@ -32,15 +51,13 @@ public RUMApplicationCreate() {} @JsonCreator public RUMApplicationCreate( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RUMApplicationCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMApplicationCreateType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RUMApplicationCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RUMApplicationCreateType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public RUMApplicationCreate attributes(RUMApplicationCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public RUMApplicationCreate attributes(RUMApplicationCreateAttributes attributes } /** - * RUM application creation attributes. - * + *

RUM application creation attributes.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(RUMApplicationCreateAttributes attributes) { this.attributes = attributes; } - public RUMApplicationCreate type(RUMApplicationCreateType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public RUMApplicationCreate type(RUMApplicationCreateType type) { } /** - * RUM application creation type. - * + *

RUM application creation type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationCreateType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationCreateType getType() { + return type; + } public void setType(RUMApplicationCreateType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMApplicationCreate object is equal to o. */ + /** + * Return true if this RUMApplicationCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } RUMApplicationCreate rumApplicationCreate = (RUMApplicationCreate) o; - return Objects.equals(this.attributes, rumApplicationCreate.attributes) - && Objects.equals(this.type, rumApplicationCreate.type); + return Objects.equals(this.attributes, rumApplicationCreate.attributes) && Objects.equals(this.type, rumApplicationCreate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java index 5c9dcb4bd73..1258c0d423f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application creation attributes. */ + +/** + *

RUM application creation attributes.

+ */ @JsonPropertyOrder({ RUMApplicationCreateAttributes.JSON_PROPERTY_NAME, RUMApplicationCreateAttributes.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -32,53 +51,50 @@ public RUMApplicationCreateAttributes() {} @JsonCreator public RUMApplicationCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public RUMApplicationCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the RUM application. - * + *

Name of the RUM application.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public RUMApplicationCreateAttributes type(String type) { this.type = type; return this; } /** - * Type of the RUM application. Supported values are browser, ios, - * android, react-native, flutter. - * + *

Type of the RUM application. Supported values are browser, ios, android, react-native, flutter.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this RUMApplicationCreateAttributes object is equal to o. */ + /** + * Return true if this RUMApplicationCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,15 +103,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RUMApplicationCreateAttributes rumApplicationCreateAttributes = - (RUMApplicationCreateAttributes) o; - return Objects.equals(this.name, rumApplicationCreateAttributes.name) - && Objects.equals(this.type, rumApplicationCreateAttributes.type); + RUMApplicationCreateAttributes rumApplicationCreateAttributes = (RUMApplicationCreateAttributes) o; + return Objects.equals(this.name, rumApplicationCreateAttributes.name) && Objects.equals(this.type, rumApplicationCreateAttributes.type); } + @Override public int hashCode() { - return Objects.hash(name, type); + return Objects.hash(name,type); } @Override @@ -109,7 +124,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateRequest.java index 96c2ba2ef7a..75dd405d506 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application creation request attributes. */ -@JsonPropertyOrder({RUMApplicationCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

RUM application creation request attributes.

+ */ +@JsonPropertyOrder({ + RUMApplicationCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RUMApplicationCreate data; @@ -26,11 +47,10 @@ public RUMApplicationCreateRequest() {} @JsonCreator public RUMApplicationCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RUMApplicationCreate data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RUMApplicationCreate data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RUMApplicationCreateRequest data(RUMApplicationCreate data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RUMApplicationCreateRequest data(RUMApplicationCreate data) { } /** - * RUM application creation. - * + *

RUM application creation.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationCreate getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationCreate getData() { + return data; + } public void setData(RUMApplicationCreate data) { this.data = data; } - /** Return true if this RUMApplicationCreateRequest object is equal to o. */ + /** + * Return true if this RUMApplicationCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, rumApplicationCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateType.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateType.java index 64c069ceab6..cb5a61385b5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** RUM application creation type. */ +/** + *

RUM application creation type.

+ */ @JsonSerialize(using = RUMApplicationCreateType.RUMApplicationCreateTypeSerializer.class) public class RUMApplicationCreateType { - public static final RUMApplicationCreateType RUM_APPLICATION_CREATE = - new RUMApplicationCreateType("rum_application_create"); + public static final RUMApplicationCreateType RUM_APPLICATION_CREATE = new RUMApplicationCreateType("rum_application_create"); - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_application_create")); + private static final Set allowedValues = new HashSet(Arrays.asList("rum_application_create")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class RUMApplicationCreateTypeSerializer - extends StdSerializer { - public RUMApplicationCreateTypeSerializer(Class t) { - super(t); - } + public static class RUMApplicationCreateTypeSerializer extends StdSerializer { + public RUMApplicationCreateTypeSerializer(Class t) { + super(t); + } - public RUMApplicationCreateTypeSerializer() { - this(null); - } + public RUMApplicationCreateTypeSerializer() { + this(null); + } - @Override - public void serialize( - RUMApplicationCreateType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(RUMApplicationCreateType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMApplicationCreateType object is equal to o. */ + /** + * Return true if this RUMApplicationCreateType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationList.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationList.java index da51bbe4504..9767c9ea5e7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationList.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationList.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application list. */ + +/** + *

RUM application list.

+ */ @JsonPropertyOrder({ RUMApplicationList.JSON_PROPERTY_ATTRIBUTES, RUMApplicationList.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationList { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RUMApplicationListAttributes attributes; @@ -32,15 +51,13 @@ public RUMApplicationList() {} @JsonCreator public RUMApplicationList( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RUMApplicationListAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMApplicationListType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RUMApplicationListAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RUMApplicationListType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public RUMApplicationList attributes(RUMApplicationListAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public RUMApplicationList attributes(RUMApplicationListAttributes attributes) { } /** - * RUM application list attributes. - * + *

RUM application list attributes.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationListAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationListAttributes getAttributes() { + return attributes; + } public void setAttributes(RUMApplicationListAttributes attributes) { this.attributes = attributes; } - public RUMApplicationList type(RUMApplicationListType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public RUMApplicationList type(RUMApplicationListType type) { } /** - * RUM application list type. - * + *

RUM application list type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationListType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationListType getType() { + return type; + } public void setType(RUMApplicationListType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMApplicationList object is equal to o. */ + /** + * Return true if this RUMApplicationList object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } RUMApplicationList rumApplicationList = (RUMApplicationList) o; - return Objects.equals(this.attributes, rumApplicationList.attributes) - && Objects.equals(this.type, rumApplicationList.type); + return Objects.equals(this.attributes, rumApplicationList.attributes) && Objects.equals(this.type, rumApplicationList.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java index 7e36b4b4d74..2ea51441065 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** RUM application list attributes. */ +/** + *

RUM application list attributes.

+ */ @JsonPropertyOrder({ RUMApplicationListAttributes.JSON_PROPERTY_APPLICATION_ID, RUMApplicationListAttributes.JSON_PROPERTY_CREATED_AT, @@ -26,10 +45,10 @@ RUMApplicationListAttributes.JSON_PROPERTY_UPDATED_AT, RUMApplicationListAttributes.JSON_PROPERTY_UPDATED_BY_HANDLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationListAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; private String applicationId; @@ -64,230 +83,210 @@ public RUMApplicationListAttributes() {} @JsonCreator public RUMApplicationListAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) String applicationId, - @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) Long createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY_HANDLE) - String createdByHandle, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Integer orgId, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type, - @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) Long updatedAt, - @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_BY_HANDLE) - String updatedByHandle) { - this.applicationId = applicationId; - this.createdAt = createdAt; - this.createdByHandle = createdByHandle; - this.name = name; - this.orgId = orgId; - this.type = type; - this.updatedAt = updatedAt; - this.updatedByHandle = updatedByHandle; + @JsonProperty(required=true, value=JSON_PROPERTY_APPLICATION_ID)String applicationId, + @JsonProperty(required=true, value=JSON_PROPERTY_CREATED_AT)Long createdAt, + @JsonProperty(required=true, value=JSON_PROPERTY_CREATED_BY_HANDLE)String createdByHandle, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_ORG_ID)Integer orgId, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)String type, + @JsonProperty(required=true, value=JSON_PROPERTY_UPDATED_AT)Long updatedAt, + @JsonProperty(required=true, value=JSON_PROPERTY_UPDATED_BY_HANDLE)String updatedByHandle) { + this.applicationId = applicationId; + this.createdAt = createdAt; + this.createdByHandle = createdByHandle; + this.name = name; + this.orgId = orgId; + this.type = type; + this.updatedAt = updatedAt; + this.updatedByHandle = updatedByHandle; } - public RUMApplicationListAttributes applicationId(String applicationId) { this.applicationId = applicationId; return this; } /** - * ID of the RUM application. - * + *

ID of the RUM application.

* @return applicationId - */ - @JsonProperty(JSON_PROPERTY_APPLICATION_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApplicationId() { - return applicationId; - } - + **/ + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getApplicationId() { + return applicationId; + } public void setApplicationId(String applicationId) { this.applicationId = applicationId; } - public RUMApplicationListAttributes createdAt(Long createdAt) { this.createdAt = createdAt; return this; } /** - * Timestamp in ms of the creation date. - * + *

Timestamp in ms of the creation date.

* @return createdAt - */ - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getCreatedAt() { + return createdAt; + } public void setCreatedAt(Long createdAt) { this.createdAt = createdAt; } - public RUMApplicationListAttributes createdByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; return this; } /** - * Handle of the creator user. - * + *

Handle of the creator user.

* @return createdByHandle - */ - @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCreatedByHandle() { - return createdByHandle; - } - + **/ + @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getCreatedByHandle() { + return createdByHandle; + } public void setCreatedByHandle(String createdByHandle) { this.createdByHandle = createdByHandle; } - public RUMApplicationListAttributes hash(String hash) { this.hash = hash; return this; } /** - * Hash of the RUM application. Optional. - * + *

Hash of the RUM application. Optional.

* @return hash - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HASH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHash() { - return hash; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHash() { + return hash; + } public void setHash(String hash) { this.hash = hash; } - public RUMApplicationListAttributes isActive(Boolean isActive) { this.isActive = isActive; return this; } /** - * Indicates if the RUM application is active. - * + *

Indicates if the RUM application is active.

* @return isActive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ACTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsActive() { - return isActive; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ACTIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsActive() { + return isActive; + } public void setIsActive(Boolean isActive) { this.isActive = isActive; } - public RUMApplicationListAttributes name(String name) { this.name = name; return this; } /** - * Name of the RUM application. - * + *

Name of the RUM application.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public RUMApplicationListAttributes orgId(Integer orgId) { this.orgId = orgId; return this; } /** - * Org ID of the RUM application. maximum: 2147483647 - * + *

Org ID of the RUM application.

+ * maximum: 2147483647 * @return orgId - */ - @JsonProperty(JSON_PROPERTY_ORG_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getOrgId() { - return orgId; - } - + **/ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Integer getOrgId() { + return orgId; + } public void setOrgId(Integer orgId) { this.orgId = orgId; } - public RUMApplicationListAttributes type(String type) { this.type = type; return this; } /** - * Type of the RUM application. Supported values are browser, ios, - * android, react-native, flutter. - * + *

Type of the RUM application. Supported values are browser, ios, android, react-native, flutter.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - public RUMApplicationListAttributes updatedAt(Long updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Timestamp in ms of the last update date. - * + *

Timestamp in ms of the last update date.

* @return updatedAt - */ - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getUpdatedAt() { - return updatedAt; - } - + **/ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getUpdatedAt() { + return updatedAt; + } public void setUpdatedAt(Long updatedAt) { this.updatedAt = updatedAt; } - public RUMApplicationListAttributes updatedByHandle(String updatedByHandle) { this.updatedByHandle = updatedByHandle; return this; } /** - * Handle of the updater user. - * + *

Handle of the updater user.

* @return updatedByHandle - */ - @JsonProperty(JSON_PROPERTY_UPDATED_BY_HANDLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUpdatedByHandle() { - return updatedByHandle; - } - + **/ + @JsonProperty(JSON_PROPERTY_UPDATED_BY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUpdatedByHandle() { + return updatedByHandle; + } public void setUpdatedByHandle(String updatedByHandle) { this.updatedByHandle = updatedByHandle; } - /** Return true if this RUMApplicationListAttributes object is equal to o. */ + /** + * Return true if this RUMApplicationListAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -297,31 +296,13 @@ public boolean equals(Object o) { return false; } RUMApplicationListAttributes rumApplicationListAttributes = (RUMApplicationListAttributes) o; - return Objects.equals(this.applicationId, rumApplicationListAttributes.applicationId) - && Objects.equals(this.createdAt, rumApplicationListAttributes.createdAt) - && Objects.equals(this.createdByHandle, rumApplicationListAttributes.createdByHandle) - && Objects.equals(this.hash, rumApplicationListAttributes.hash) - && Objects.equals(this.isActive, rumApplicationListAttributes.isActive) - && Objects.equals(this.name, rumApplicationListAttributes.name) - && Objects.equals(this.orgId, rumApplicationListAttributes.orgId) - && Objects.equals(this.type, rumApplicationListAttributes.type) - && Objects.equals(this.updatedAt, rumApplicationListAttributes.updatedAt) - && Objects.equals(this.updatedByHandle, rumApplicationListAttributes.updatedByHandle); + return Objects.equals(this.applicationId, rumApplicationListAttributes.applicationId) && Objects.equals(this.createdAt, rumApplicationListAttributes.createdAt) && Objects.equals(this.createdByHandle, rumApplicationListAttributes.createdByHandle) && Objects.equals(this.hash, rumApplicationListAttributes.hash) && Objects.equals(this.isActive, rumApplicationListAttributes.isActive) && Objects.equals(this.name, rumApplicationListAttributes.name) && Objects.equals(this.orgId, rumApplicationListAttributes.orgId) && Objects.equals(this.type, rumApplicationListAttributes.type) && Objects.equals(this.updatedAt, rumApplicationListAttributes.updatedAt) && Objects.equals(this.updatedByHandle, rumApplicationListAttributes.updatedByHandle); } + @Override public int hashCode() { - return Objects.hash( - applicationId, - createdAt, - createdByHandle, - hash, - isActive, - name, - orgId, - type, - updatedAt, - updatedByHandle); + return Objects.hash(applicationId,createdAt,createdByHandle,hash,isActive,name,orgId,type,updatedAt,updatedByHandle); } @Override @@ -343,7 +324,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListType.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListType.java index 6f998fc4bae..bd67ae2dfc8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** RUM application list type. */ +/** + *

RUM application list type.

+ */ @JsonSerialize(using = RUMApplicationListType.RUMApplicationListTypeSerializer.class) public class RUMApplicationListType { - public static final RUMApplicationListType RUM_APPLICATION = - new RUMApplicationListType("rum_application"); + public static final RUMApplicationListType RUM_APPLICATION = new RUMApplicationListType("rum_application"); - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_application")); + private static final Set allowedValues = new HashSet(Arrays.asList("rum_application")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class RUMApplicationListTypeSerializer - extends StdSerializer { - public RUMApplicationListTypeSerializer(Class t) { - super(t); - } + public static class RUMApplicationListTypeSerializer extends StdSerializer { + public RUMApplicationListTypeSerializer(Class t) { + super(t); + } - public RUMApplicationListTypeSerializer() { - this(null); - } + public RUMApplicationListTypeSerializer() { + this(null); + } - @Override - public void serialize( - RUMApplicationListType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(RUMApplicationListType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMApplicationListType object is equal to o. */ + /** + * Return true if this RUMApplicationListType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationResponse.java index e55145c9eae..a67d1dc0ddf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** RUM application response. */ -@JsonPropertyOrder({RUMApplicationResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

RUM application response.

+ */ +@JsonPropertyOrder({ + RUMApplicationResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RUMApplication data; @@ -28,22 +50,23 @@ public RUMApplicationResponse data(RUMApplication data) { } /** - * RUM application. - * + *

RUM application.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMApplication getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMApplication getData() { + return data; + } public void setData(RUMApplication data) { this.data = data; } - /** Return true if this RUMApplicationResponse object is equal to o. */ + /** + * Return true if this RUMApplicationResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, rumApplicationResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationType.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationType.java index 1f451b84e2c..5d6a2e0d73d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** RUM application response type. */ +/** + *

RUM application response type.

+ */ @JsonSerialize(using = RUMApplicationType.RUMApplicationTypeSerializer.class) public class RUMApplicationType { - public static final RUMApplicationType RUM_APPLICATION = - new RUMApplicationType("rum_application"); + public static final RUMApplicationType RUM_APPLICATION = new RUMApplicationType("rum_application"); - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_application")); + private static final Set allowedValues = new HashSet(Arrays.asList("rum_application")); private String value; @@ -40,19 +62,18 @@ public boolean isValid() { } public static class RUMApplicationTypeSerializer extends StdSerializer { - public RUMApplicationTypeSerializer(Class t) { - super(t); - } - - public RUMApplicationTypeSerializer() { - this(null); - } - - @Override - public void serialize(RUMApplicationType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMApplicationTypeSerializer(Class t) { + super(t); + } + + public RUMApplicationTypeSerializer() { + this(null); + } + + @Override + public void serialize(RUMApplicationType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMApplicationType object is equal to o. */ + /** + * Return true if this RUMApplicationType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java index c7af51796d1..5b552b1be92 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application update. */ + +/** + *

RUM application update.

+ */ @JsonPropertyOrder({ RUMApplicationUpdate.JSON_PROPERTY_ATTRIBUTES, RUMApplicationUpdate.JSON_PROPERTY_ID, RUMApplicationUpdate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationUpdate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RUMApplicationUpdateAttributes attributes; @@ -36,13 +55,12 @@ public RUMApplicationUpdate() {} @JsonCreator public RUMApplicationUpdate( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMApplicationUpdateType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RUMApplicationUpdateType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RUMApplicationUpdate attributes(RUMApplicationUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -50,41 +68,37 @@ public RUMApplicationUpdate attributes(RUMApplicationUpdateAttributes attributes } /** - * RUM application update attributes. - * + *

RUM application update attributes.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMApplicationUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMApplicationUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(RUMApplicationUpdateAttributes attributes) { this.attributes = attributes; } - public RUMApplicationUpdate id(String id) { this.id = id; return this; } /** - * RUM application ID. - * + *

RUM application ID.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RUMApplicationUpdate type(RUMApplicationUpdateType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +106,25 @@ public RUMApplicationUpdate type(RUMApplicationUpdateType type) { } /** - * RUM application update type. - * + *

RUM application update type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationUpdateType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationUpdateType getType() { + return type; + } public void setType(RUMApplicationUpdateType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMApplicationUpdate object is equal to o. */ + /** + * Return true if this RUMApplicationUpdate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } RUMApplicationUpdate rumApplicationUpdate = (RUMApplicationUpdate) o; - return Objects.equals(this.attributes, rumApplicationUpdate.attributes) - && Objects.equals(this.id, rumApplicationUpdate.id) - && Objects.equals(this.type, rumApplicationUpdate.type); + return Objects.equals(this.attributes, rumApplicationUpdate.attributes) && Objects.equals(this.id, rumApplicationUpdate.id) && Objects.equals(this.type, rumApplicationUpdate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java index 92ba38917f0..2ccd4adaacf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application update attributes. */ + +/** + *

RUM application update attributes.

+ */ @JsonPropertyOrder({ RUMApplicationUpdateAttributes.JSON_PROPERTY_NAME, RUMApplicationUpdateAttributes.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -33,44 +53,42 @@ public RUMApplicationUpdateAttributes name(String name) { } /** - * Name of the RUM application. - * + *

Name of the RUM application.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public RUMApplicationUpdateAttributes type(String type) { this.type = type; return this; } /** - * Type of the RUM application. Supported values are browser, ios, - * android, react-native, flutter. - * + *

Type of the RUM application. Supported values are browser, ios, android, react-native, flutter.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this RUMApplicationUpdateAttributes object is equal to o. */ + /** + * Return true if this RUMApplicationUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,15 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RUMApplicationUpdateAttributes rumApplicationUpdateAttributes = - (RUMApplicationUpdateAttributes) o; - return Objects.equals(this.name, rumApplicationUpdateAttributes.name) - && Objects.equals(this.type, rumApplicationUpdateAttributes.type); + RUMApplicationUpdateAttributes rumApplicationUpdateAttributes = (RUMApplicationUpdateAttributes) o; + return Objects.equals(this.name, rumApplicationUpdateAttributes.name) && Objects.equals(this.type, rumApplicationUpdateAttributes.type); } + @Override public int hashCode() { - return Objects.hash(name, type); + return Objects.hash(name,type); } @Override @@ -101,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateRequest.java index 0de1f829431..a5fc6e5d586 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** RUM application update request. */ -@JsonPropertyOrder({RUMApplicationUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

RUM application update request.

+ */ +@JsonPropertyOrder({ + RUMApplicationUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RUMApplicationUpdate data; @@ -26,11 +47,10 @@ public RUMApplicationUpdateRequest() {} @JsonCreator public RUMApplicationUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RUMApplicationUpdate data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RUMApplicationUpdate data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RUMApplicationUpdateRequest data(RUMApplicationUpdate data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RUMApplicationUpdateRequest data(RUMApplicationUpdate data) { } /** - * RUM application update. - * + *

RUM application update.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMApplicationUpdate getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMApplicationUpdate getData() { + return data; + } public void setData(RUMApplicationUpdate data) { this.data = data; } - /** Return true if this RUMApplicationUpdateRequest object is equal to o. */ + /** + * Return true if this RUMApplicationUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, rumApplicationUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateType.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateType.java index a79f2dbe044..fce02e85fc4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** RUM application update type. */ +/** + *

RUM application update type.

+ */ @JsonSerialize(using = RUMApplicationUpdateType.RUMApplicationUpdateTypeSerializer.class) public class RUMApplicationUpdateType { - public static final RUMApplicationUpdateType RUM_APPLICATION_UPDATE = - new RUMApplicationUpdateType("rum_application_update"); + public static final RUMApplicationUpdateType RUM_APPLICATION_UPDATE = new RUMApplicationUpdateType("rum_application_update"); - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_application_update")); + private static final Set allowedValues = new HashSet(Arrays.asList("rum_application_update")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class RUMApplicationUpdateTypeSerializer - extends StdSerializer { - public RUMApplicationUpdateTypeSerializer(Class t) { - super(t); - } + public static class RUMApplicationUpdateTypeSerializer extends StdSerializer { + public RUMApplicationUpdateTypeSerializer(Class t) { + super(t); + } - public RUMApplicationUpdateTypeSerializer() { - this(null); - } + public RUMApplicationUpdateTypeSerializer() { + this(null); + } - @Override - public void serialize( - RUMApplicationUpdateType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(RUMApplicationUpdateType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMApplicationUpdateType object is equal to o. */ + /** + * Return true if this RUMApplicationUpdateType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationsResponse.java index af2da35893b..0d518ba6726 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** RUM applications response. */ -@JsonPropertyOrder({RUMApplicationsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

RUM applications response.

+ */ +@JsonPropertyOrder({ + RUMApplicationsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public RUMApplicationsResponse data(List data) { } return this; } - public RUMApplicationsResponse addDataItem(RUMApplicationList dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public RUMApplicationsResponse addDataItem(RUMApplicationList dataItem) { } /** - * RUM applications array response. - * + *

RUM applications array response.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RUMApplicationsResponse object is equal to o. */ + /** + * Return true if this RUMApplicationsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, rumApplicationsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMBucketResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMBucketResponse.java index de6f7b29eee..7f9eb29eeed 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMBucketResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMBucketResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Bucket values. */ -@JsonPropertyOrder({RUMBucketResponse.JSON_PROPERTY_BY, RUMBucketResponse.JSON_PROPERTY_COMPUTES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Bucket values.

+ */ +@JsonPropertyOrder({ + RUMBucketResponse.JSON_PROPERTY_BY, + RUMBucketResponse.JSON_PROPERTY_COMPUTES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMBucketResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BY = "by"; private Map by = null; @@ -30,7 +51,6 @@ public RUMBucketResponse by(Map by) { this.by = by; return this; } - public RUMBucketResponse putByItem(String key, String byItem) { if (this.by == null) { this.by = new HashMap<>(); @@ -40,26 +60,23 @@ public RUMBucketResponse putByItem(String key, String byItem) { } /** - * The key-value pairs for each group-by. - * + *

The key-value pairs for each group-by.

* @return by - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getBy() { - return by; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getBy() { + return by; + } public void setBy(Map by) { this.by = by; } - public RUMBucketResponse computes(Map computes) { this.computes = computes; return this; } - public RUMBucketResponse putComputesItem(String key, RUMAggregateBucketValue computesItem) { if (this.computes == null) { this.computes = new HashMap<>(); @@ -69,22 +86,23 @@ public RUMBucketResponse putComputesItem(String key, RUMAggregateBucketValue com } /** - * A map of the metric name to value for regular compute, or a list of values for a timeseries. - * + *

A map of the metric name to value for regular compute, or a list of values for a timeseries.

* @return computes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getComputes() { - return computes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getComputes() { + return computes; + } public void setComputes(Map computes) { this.computes = computes; } - /** Return true if this RUMBucketResponse object is equal to o. */ + /** + * Return true if this RUMBucketResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +112,13 @@ public boolean equals(Object o) { return false; } RUMBucketResponse rumBucketResponse = (RUMBucketResponse) o; - return Objects.equals(this.by, rumBucketResponse.by) - && Objects.equals(this.computes, rumBucketResponse.computes); + return Objects.equals(this.by, rumBucketResponse.by) && Objects.equals(this.computes, rumBucketResponse.computes); } + @Override public int hashCode() { - return Objects.hash(by, computes); + return Objects.hash(by,computes); } @Override @@ -114,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java b/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java index c931048fa12..e73909e351d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** A compute rule to compute metrics or timeseries. */ +/** + *

A compute rule to compute metrics or timeseries.

+ */ @JsonPropertyOrder({ RUMCompute.JSON_PROPERTY_AGGREGATION, RUMCompute.JSON_PROPERTY_INTERVAL, RUMCompute.JSON_PROPERTY_METRIC, RUMCompute.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMCompute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private RUMAggregationFunction aggregation; @@ -40,12 +59,10 @@ public RUMCompute() {} @JsonCreator public RUMCompute( - @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) - RUMAggregationFunction aggregation) { - this.aggregation = aggregation; - this.unparsed |= !aggregation.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_AGGREGATION)RUMAggregationFunction aggregation) { + this.aggregation = aggregation; + this.unparsed |= !aggregation.isValid(); } - public RUMCompute aggregation(RUMAggregationFunction aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); @@ -53,65 +70,60 @@ public RUMCompute aggregation(RUMAggregationFunction aggregation) { } /** - * An aggregation function. - * + *

An aggregation function.

* @return aggregation - */ - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RUMAggregationFunction getAggregation() { - return aggregation; - } - + **/ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RUMAggregationFunction getAggregation() { + return aggregation; + } public void setAggregation(RUMAggregationFunction aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public RUMCompute interval(String interval) { this.interval = interval; return this; } /** - * The time buckets' size (only used for type=timeseries) Defaults to a resolution of 150 points. - * + *

The time buckets' size (only used for type=timeseries) + * Defaults to a resolution of 150 points.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getInterval() { + return interval; + } public void setInterval(String interval) { this.interval = interval; } - public RUMCompute metric(String metric) { this.metric = metric; return this; } /** - * The metric to use. - * + *

The metric to use.

* @return metric - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } public void setMetric(String metric) { this.metric = metric; } - public RUMCompute type(RUMComputeType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -119,25 +131,26 @@ public RUMCompute type(RUMComputeType type) { } /** - * The type of compute. - * + *

The type of compute.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMComputeType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMComputeType getType() { + return type; + } public void setType(RUMComputeType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMCompute object is equal to o. */ + /** + * Return true if this RUMCompute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,15 +160,13 @@ public boolean equals(Object o) { return false; } RUMCompute rumCompute = (RUMCompute) o; - return Objects.equals(this.aggregation, rumCompute.aggregation) - && Objects.equals(this.interval, rumCompute.interval) - && Objects.equals(this.metric, rumCompute.metric) - && Objects.equals(this.type, rumCompute.type); + return Objects.equals(this.aggregation, rumCompute.aggregation) && Objects.equals(this.interval, rumCompute.interval) && Objects.equals(this.metric, rumCompute.metric) && Objects.equals(this.type, rumCompute.type); } + @Override public int hashCode() { - return Objects.hash(aggregation, interval, metric, type); + return Objects.hash(aggregation,interval,metric,type); } @Override @@ -171,7 +182,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java b/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java index e95b0771e8a..af1935efa6d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of compute. */ +/** + *

The type of compute.

+ */ @JsonSerialize(using = RUMComputeType.RUMComputeTypeSerializer.class) public class RUMComputeType { public static final RUMComputeType TIMESERIES = new RUMComputeType("timeseries"); public static final RUMComputeType TOTAL = new RUMComputeType("total"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries", "total")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries", "total")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class RUMComputeTypeSerializer extends StdSerializer { - public RUMComputeTypeSerializer(Class t) { - super(t); - } - - public RUMComputeTypeSerializer() { - this(null); - } - - @Override - public void serialize(RUMComputeType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMComputeTypeSerializer(Class t) { + super(t); + } + + public RUMComputeTypeSerializer() { + this(null); + } + + @Override + public void serialize(RUMComputeType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMComputeType object is equal to o. */ + /** + * Return true if this RUMComputeType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEvent.java b/src/main/java/com/datadog/api/client/v2/model/RUMEvent.java index 94cafa65d6c..5ed42897b89 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEvent.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEvent.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object description of a RUM event after being processed and stored by Datadog. */ + +/** + *

Object description of a RUM event after being processed and stored by Datadog.

+ */ @JsonPropertyOrder({ RUMEvent.JSON_PROPERTY_ATTRIBUTES, RUMEvent.JSON_PROPERTY_ID, RUMEvent.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMEvent { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RUMEventAttributes attributes; @@ -38,42 +58,38 @@ public RUMEvent attributes(RUMEventAttributes attributes) { } /** - * JSON object containing all event attributes and their associated values. - * + *

JSON object containing all event attributes and their associated values.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMEventAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMEventAttributes getAttributes() { + return attributes; + } public void setAttributes(RUMEventAttributes attributes) { this.attributes = attributes; } - public RUMEvent id(String id) { this.id = id; return this; } /** - * Unique ID of the event. - * + *

Unique ID of the event.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RUMEvent type(RUMEventType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public RUMEvent type(RUMEventType type) { } /** - * Type of the event. - * + *

Type of the event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMEventType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMEventType getType() { + return type; + } public void setType(RUMEventType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RUMEvent object is equal to o. */ + /** + * Return true if this RUMEvent object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } RUMEvent rumEvent = (RUMEvent) o; - return Objects.equals(this.attributes, rumEvent.attributes) - && Objects.equals(this.id, rumEvent.id) - && Objects.equals(this.type, rumEvent.type); + return Objects.equals(this.attributes, rumEvent.attributes) && Objects.equals(this.id, rumEvent.id) && Objects.equals(this.type, rumEvent.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java index 8bc17a46b22..7eed64fdf73 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java @@ -6,30 +6,43 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** JSON object containing all event attributes and their associated values. */ +/** + *

JSON object containing all event attributes and their associated values.

+ */ @JsonPropertyOrder({ RUMEventAttributes.JSON_PROPERTY_ATTRIBUTES, RUMEventAttributes.JSON_PROPERTY_SERVICE, RUMEventAttributes.JSON_PROPERTY_TAGS, RUMEventAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMEventAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private Map attributes = null; @@ -40,7 +53,6 @@ public class RUMEventAttributes { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -48,7 +60,6 @@ public RUMEventAttributes attributes(Map attributes) { this.attributes = attributes; return this; } - public RUMEventAttributes putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); @@ -58,48 +69,44 @@ public RUMEventAttributes putAttributesItem(String key, Object attributesItem) { } /** - * JSON object of attributes from RUM events. - * + *

JSON object of attributes from RUM events.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } public void setAttributes(Map attributes) { this.attributes = attributes; } - public RUMEventAttributes service(String service) { this.service = service; return this; } /** - * The name of the application or service generating RUM events. It is used to switch from RUM to - * APM, so make sure you define the same value when you use both products. - * + *

The name of the application or service generating RUM events. + * It is used to switch from RUM to APM, so make sure you define the same + * value when you use both products.

* @return service - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getService() { - return service; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } public void setService(String service) { this.service = service; } - public RUMEventAttributes tags(List tags) { this.tags = tags; return this; } - public RUMEventAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -109,43 +116,42 @@ public RUMEventAttributes addTagsItem(String tagsItem) { } /** - * Array of tags associated with your event. - * + *

Array of tags associated with your event.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public RUMEventAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * Timestamp of your event. - * + *

Timestamp of your event.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this RUMEventAttributes object is equal to o. */ + /** + * Return true if this RUMEventAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,15 +161,13 @@ public boolean equals(Object o) { return false; } RUMEventAttributes rumEventAttributes = (RUMEventAttributes) o; - return Objects.equals(this.attributes, rumEventAttributes.attributes) - && Objects.equals(this.service, rumEventAttributes.service) - && Objects.equals(this.tags, rumEventAttributes.tags) - && Objects.equals(this.timestamp, rumEventAttributes.timestamp); + return Objects.equals(this.attributes, rumEventAttributes.attributes) && Objects.equals(this.service, rumEventAttributes.service) && Objects.equals(this.tags, rumEventAttributes.tags) && Objects.equals(this.timestamp, rumEventAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, service, tags, timestamp); + return Objects.hash(attributes,service,tags,timestamp); } @Override @@ -179,7 +183,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventType.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventType.java index 1cd8da9b969..c2ae6f499eb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEventType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of the event. */ +/** + *

Type of the event.

+ */ @JsonSerialize(using = RUMEventType.RUMEventTypeSerializer.class) public class RUMEventType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class RUMEventTypeSerializer extends StdSerializer { - public RUMEventTypeSerializer(Class t) { - super(t); - } - - public RUMEventTypeSerializer() { - this(null); - } - - @Override - public void serialize(RUMEventType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMEventTypeSerializer(Class t) { + super(t); + } + + public RUMEventTypeSerializer() { + this(null); + } + + @Override + public void serialize(RUMEventType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMEventType object is equal to o. */ + /** + * Return true if this RUMEventType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventsResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventsResponse.java index a9f0559443a..dd59f2ca3af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEventsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventsResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response object with all events matching the request and pagination information. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response object with all events matching the request and pagination information.

+ */ @JsonPropertyOrder({ RUMEventsResponse.JSON_PROPERTY_DATA, RUMEventsResponse.JSON_PROPERTY_LINKS, RUMEventsResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMEventsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public RUMEventsResponse data(List data) { } return this; } - public RUMEventsResponse addDataItem(RUMEvent dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public RUMEventsResponse addDataItem(RUMEvent dataItem) { } /** - * Array of events matching the request. - * + *

Array of events matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public RUMEventsResponse links(RUMResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -73,21 +88,19 @@ public RUMEventsResponse links(RUMResponseLinks links) { } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMResponseLinks getLinks() { + return links; + } public void setLinks(RUMResponseLinks links) { this.links = links; } - public RUMEventsResponse meta(RUMResponseMetadata meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -95,22 +108,23 @@ public RUMEventsResponse meta(RUMResponseMetadata meta) { } /** - * The metadata associated with a request. - * + *

The metadata associated with a request.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMResponseMetadata getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMResponseMetadata getMeta() { + return meta; + } public void setMeta(RUMResponseMetadata meta) { this.meta = meta; } - /** Return true if this RUMEventsResponse object is equal to o. */ + /** + * Return true if this RUMEventsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } RUMEventsResponse rumEventsResponse = (RUMEventsResponse) o; - return Objects.equals(this.data, rumEventsResponse.data) - && Objects.equals(this.links, rumEventsResponse.links) - && Objects.equals(this.meta, rumEventsResponse.meta); + return Objects.equals(this.data, rumEventsResponse.data) && Objects.equals(this.links, rumEventsResponse.links) && Objects.equals(this.meta, rumEventsResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java index 05b12bd6c1e..dc318f75185 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java @@ -6,14 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A group-by rule. */ + +/** + *

A group-by rule.

+ */ @JsonPropertyOrder({ RUMGroupBy.JSON_PROPERTY_FACET, RUMGroupBy.JSON_PROPERTY_HISTOGRAM, @@ -22,10 +41,10 @@ RUMGroupBy.JSON_PROPERTY_SORT, RUMGroupBy.JSON_PROPERTY_TOTAL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMGroupBy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FACET = "facet"; private String facet; @@ -47,30 +66,28 @@ public class RUMGroupBy { public RUMGroupBy() {} @JsonCreator - public RUMGroupBy(@JsonProperty(required = true, value = JSON_PROPERTY_FACET) String facet) { - this.facet = facet; + public RUMGroupBy( + @JsonProperty(required=true, value=JSON_PROPERTY_FACET)String facet) { + this.facet = facet; } - public RUMGroupBy facet(String facet) { this.facet = facet; return this; } /** - * The name of the facet to use (required). - * + *

The name of the facet to use (required).

* @return facet - */ - @JsonProperty(JSON_PROPERTY_FACET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFacet() { - return facet; - } - + **/ + @JsonProperty(JSON_PROPERTY_FACET) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getFacet() { + return facet; + } public void setFacet(String facet) { this.facet = facet; } - public RUMGroupBy histogram(RUMGroupByHistogram histogram) { this.histogram = histogram; this.unparsed |= histogram.unparsed; @@ -78,43 +95,39 @@ public RUMGroupBy histogram(RUMGroupByHistogram histogram) { } /** - * Used to perform a histogram computation (only for measure facets). Note: At most 100 buckets - * are allowed, the number of buckets is (max - min)/interval. - * + *

Used to perform a histogram computation (only for measure facets). + * Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.

* @return histogram - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HISTOGRAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMGroupByHistogram getHistogram() { - return histogram; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HISTOGRAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMGroupByHistogram getHistogram() { + return histogram; + } public void setHistogram(RUMGroupByHistogram histogram) { this.histogram = histogram; } - public RUMGroupBy limit(Long limit) { this.limit = limit; return this; } /** - * The maximum buckets to return for this group-by. - * + *

The maximum buckets to return for this group-by.

* @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } public void setLimit(Long limit) { this.limit = limit; } - public RUMGroupBy missing(RUMGroupByMissing missing) { this.missing = missing; this.unparsed |= missing.unparsed; @@ -122,21 +135,19 @@ public RUMGroupBy missing(RUMGroupByMissing missing) { } /** - * The value to use for logs that don't have the facet used to group by. - * + *

The value to use for logs that don't have the facet used to group by.

* @return missing - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MISSING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMGroupByMissing getMissing() { - return missing; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MISSING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMGroupByMissing getMissing() { + return missing; + } public void setMissing(RUMGroupByMissing missing) { this.missing = missing; } - public RUMGroupBy sort(RUMAggregateSort sort) { this.sort = sort; this.unparsed |= sort.unparsed; @@ -144,21 +155,19 @@ public RUMGroupBy sort(RUMAggregateSort sort) { } /** - * A sort rule. - * + *

A sort rule.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMAggregateSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMAggregateSort getSort() { + return sort; + } public void setSort(RUMAggregateSort sort) { this.sort = sort; } - public RUMGroupBy total(RUMGroupByTotal total) { this.total = total; this.unparsed |= total.unparsed; @@ -166,22 +175,23 @@ public RUMGroupBy total(RUMGroupByTotal total) { } /** - * A resulting object to put the given computes in over all the matching records. - * + *

A resulting object to put the given computes in over all the matching records.

* @return total - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMGroupByTotal getTotal() { - return total; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMGroupByTotal getTotal() { + return total; + } public void setTotal(RUMGroupByTotal total) { this.total = total; } - /** Return true if this RUMGroupBy object is equal to o. */ + /** + * Return true if this RUMGroupBy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -191,17 +201,13 @@ public boolean equals(Object o) { return false; } RUMGroupBy rumGroupBy = (RUMGroupBy) o; - return Objects.equals(this.facet, rumGroupBy.facet) - && Objects.equals(this.histogram, rumGroupBy.histogram) - && Objects.equals(this.limit, rumGroupBy.limit) - && Objects.equals(this.missing, rumGroupBy.missing) - && Objects.equals(this.sort, rumGroupBy.sort) - && Objects.equals(this.total, rumGroupBy.total); + return Objects.equals(this.facet, rumGroupBy.facet) && Objects.equals(this.histogram, rumGroupBy.histogram) && Objects.equals(this.limit, rumGroupBy.limit) && Objects.equals(this.missing, rumGroupBy.missing) && Objects.equals(this.sort, rumGroupBy.sort) && Objects.equals(this.total, rumGroupBy.total); } + @Override public int hashCode() { - return Objects.hash(facet, histogram, limit, missing, sort, total); + return Objects.hash(facet,histogram,limit,missing,sort,total); } @Override @@ -219,7 +225,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMGroupByHistogram.java b/src/main/java/com/datadog/api/client/v2/model/RUMGroupByHistogram.java index 6f14f9dfdcf..8c0c2017cdd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMGroupByHistogram.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMGroupByHistogram.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Used to perform a histogram computation (only for measure facets). Note: At most 100 buckets are - * allowed, the number of buckets is (max - min)/interval. + *

Used to perform a histogram computation (only for measure facets). + * Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.

*/ @JsonPropertyOrder({ RUMGroupByHistogram.JSON_PROPERTY_INTERVAL, RUMGroupByHistogram.JSON_PROPERTY_MAX, RUMGroupByHistogram.JSON_PROPERTY_MIN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMGroupByHistogram { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INTERVAL = "interval"; private Double interval; @@ -39,77 +56,73 @@ public RUMGroupByHistogram() {} @JsonCreator public RUMGroupByHistogram( - @JsonProperty(required = true, value = JSON_PROPERTY_INTERVAL) Double interval, - @JsonProperty(required = true, value = JSON_PROPERTY_MAX) Double max, - @JsonProperty(required = true, value = JSON_PROPERTY_MIN) Double min) { - this.interval = interval; - this.max = max; - this.min = min; + @JsonProperty(required=true, value=JSON_PROPERTY_INTERVAL)Double interval, + @JsonProperty(required=true, value=JSON_PROPERTY_MAX)Double max, + @JsonProperty(required=true, value=JSON_PROPERTY_MIN)Double min) { + this.interval = interval; + this.max = max; + this.min = min; } - public RUMGroupByHistogram interval(Double interval) { this.interval = interval; return this; } /** - * The bin size of the histogram buckets. - * + *

The bin size of the histogram buckets.

* @return interval - */ - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getInterval() { - return interval; - } - + **/ + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getInterval() { + return interval; + } public void setInterval(Double interval) { this.interval = interval; } - public RUMGroupByHistogram max(Double max) { this.max = max; return this; } /** - * The maximum value for the measure used in the histogram (values greater than this one are - * filtered out). - * + *

The maximum value for the measure used in the histogram + * (values greater than this one are filtered out).

* @return max - */ - @JsonProperty(JSON_PROPERTY_MAX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMax() { - return max; - } - + **/ + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getMax() { + return max; + } public void setMax(Double max) { this.max = max; } - public RUMGroupByHistogram min(Double min) { this.min = min; return this; } /** - * The minimum value for the measure used in the histogram (values smaller than this one are - * filtered out). - * + *

The minimum value for the measure used in the histogram + * (values smaller than this one are filtered out).

* @return min - */ - @JsonProperty(JSON_PROPERTY_MIN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMin() { - return min; - } - + **/ + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Double getMin() { + return min; + } public void setMin(Double min) { this.min = min; } - /** Return true if this RUMGroupByHistogram object is equal to o. */ + /** + * Return true if this RUMGroupByHistogram object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +132,13 @@ public boolean equals(Object o) { return false; } RUMGroupByHistogram rumGroupByHistogram = (RUMGroupByHistogram) o; - return Objects.equals(this.interval, rumGroupByHistogram.interval) - && Objects.equals(this.max, rumGroupByHistogram.max) - && Objects.equals(this.min, rumGroupByHistogram.min); + return Objects.equals(this.interval, rumGroupByHistogram.interval) && Objects.equals(this.max, rumGroupByHistogram.max) && Objects.equals(this.min, rumGroupByHistogram.min); } + @Override public int hashCode() { - return Objects.hash(interval, max, min); + return Objects.hash(interval,max,min); } @Override @@ -141,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMGroupByMissing.java b/src/main/java/com/datadog/api/client/v2/model/RUMGroupByMissing.java index 80c885b2a35..13c229ca972 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMGroupByMissing.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMGroupByMissing.java @@ -6,262 +6,259 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = RUMGroupByMissing.RUMGroupByMissingDeserializer.class) @JsonSerialize(using = RUMGroupByMissing.RUMGroupByMissingSerializer.class) public class RUMGroupByMissing extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(RUMGroupByMissing.class.getName()); + private static final Logger log = Logger.getLogger(RUMGroupByMissing.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; - public static class RUMGroupByMissingSerializer extends StdSerializer { - public RUMGroupByMissingSerializer(Class t) { - super(t); - } - - public RUMGroupByMissingSerializer() { - this(null); - } - - @Override - public void serialize(RUMGroupByMissing value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class RUMGroupByMissingSerializer extends StdSerializer { + public RUMGroupByMissingSerializer(Class t) { + super(t); + } - public static class RUMGroupByMissingDeserializer extends StdDeserializer { - public RUMGroupByMissingDeserializer() { - this(RUMGroupByMissing.class); - } + public RUMGroupByMissingSerializer() { + this(null); + } - public RUMGroupByMissingDeserializer(Class vc) { - super(vc); + @Override + public void serialize(RUMGroupByMissing value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public RUMGroupByMissing 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 String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class RUMGroupByMissingDeserializer extends StdDeserializer { + public RUMGroupByMissingDeserializer() { + this(RUMGroupByMissing.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + public RUMGroupByMissingDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public RUMGroupByMissing 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 String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + RUMGroupByMissing ret = new RUMGroupByMissing(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Double'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public RUMGroupByMissing getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "RUMGroupByMissing cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } - - RUMGroupByMissing ret = new RUMGroupByMissing(); - 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 RUMGroupByMissing getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "RUMGroupByMissing cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public RUMGroupByMissing() { - super("oneOf", Boolean.FALSE); - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - public RUMGroupByMissing(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + public RUMGroupByMissing() { + super("oneOf", Boolean.FALSE); + } + public RUMGroupByMissing(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public RUMGroupByMissing(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - public RUMGroupByMissing(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } + static { + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + JSON.registerDescendants(RUMGroupByMissing.class, Collections.unmodifiableMap(schemas)); + } - static { - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - JSON.registerDescendants(RUMGroupByMissing.class, Collections.unmodifiableMap(schemas)); - } + @Override + public Map getSchemas() { + return RUMGroupByMissing.schemas; + } - @Override - public Map getSchemas() { - return RUMGroupByMissing.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * String, Double + * + * 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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Double - * - *

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(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.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 String, Double"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * String, Double + * + * @return The actual instance (String, Double) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be String, Double"); - } - /** - * Get the actual instance, which can be the following: String, Double - * - * @return The actual instance (String, Double) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMGroupByTotal.java b/src/main/java/com/datadog/api/client/v2/model/RUMGroupByTotal.java index 43045c4bcb1..5f06b709f93 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMGroupByTotal.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMGroupByTotal.java @@ -6,324 +6,308 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = RUMGroupByTotal.RUMGroupByTotalDeserializer.class) @JsonSerialize(using = RUMGroupByTotal.RUMGroupByTotalSerializer.class) public class RUMGroupByTotal extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(RUMGroupByTotal.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class RUMGroupByTotalSerializer extends StdSerializer { - public RUMGroupByTotalSerializer(Class t) { - super(t); - } + private static final Logger log = Logger.getLogger(RUMGroupByTotal.class.getName()); - public RUMGroupByTotalSerializer() { - this(null); - } + @JsonIgnore + public boolean unparsed = false; - @Override - public void serialize(RUMGroupByTotal value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } + public static class RUMGroupByTotalSerializer extends StdSerializer { + public RUMGroupByTotalSerializer(Class t) { + super(t); + } - public static class RUMGroupByTotalDeserializer extends StdDeserializer { - public RUMGroupByTotalDeserializer() { - this(RUMGroupByTotal.class); - } + public RUMGroupByTotalSerializer() { + this(null); + } - public RUMGroupByTotalDeserializer(Class vc) { - super(vc); + @Override + public void serialize(RUMGroupByTotal value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - @Override - public RUMGroupByTotal 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 Boolean - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Boolean.class.equals(Integer.class) - || Boolean.class.equals(Long.class) - || Boolean.class.equals(Float.class) - || Boolean.class.equals(Double.class) - || Boolean.class.equals(Boolean.class) - || Boolean.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Boolean.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public static class RUMGroupByTotalDeserializer extends StdDeserializer { + public RUMGroupByTotalDeserializer() { + this(RUMGroupByTotal.class); } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'Boolean'"); + public RUMGroupByTotalDeserializer(Class vc) { + super(vc); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); - } - // deserialize String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + @Override + public RUMGroupByTotal 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 Boolean + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class) || Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class) || Boolean.class.equals(Boolean.class) || Boolean.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Boolean.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Boolean'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Double + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Double.class.equals(Integer.class) || Double.class.equals(Long.class) || Double.class.equals(Float.class) || Double.class.equals(Double.class) || Double.class.equals(Boolean.class) || Double.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Double.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Double'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Double'", e); + } + + RUMGroupByTotal ret = new RUMGroupByTotal(); + 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; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + /** + * Handle deserialization of the 'null' value. + */ + @Override + public RUMGroupByTotal getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "RUMGroupByTotal cannot be null"); } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } + } - // deserialize Double - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Double.class.equals(Integer.class) - || Double.class.equals(Long.class) - || Double.class.equals(Float.class) - || Double.class.equals(Double.class) - || Double.class.equals(Boolean.class) - || Double.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Double.class.equals(Integer.class) || Double.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Double.class.equals(Float.class) || Double.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Double.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Double.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Double.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. - deserialized = tmp; - match++; + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - log.log(Level.FINER, "Input data matches schema 'Double'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Double'", e); - } + public RUMGroupByTotal() { + super("oneOf", Boolean.FALSE); + } + public RUMGroupByTotal(Boolean o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public RUMGroupByTotal(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public RUMGroupByTotal(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } - RUMGroupByTotal ret = new RUMGroupByTotal(); - 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; + static { + schemas.put("Boolean", new GenericType() { + }); + schemas.put("String", new GenericType() { + }); + schemas.put("Double", new GenericType() { + }); + JSON.registerDescendants(RUMGroupByTotal.class, Collections.unmodifiableMap(schemas)); } - /** Handle deserialization of the 'null' value. */ @Override - public RUMGroupByTotal getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "RUMGroupByTotal cannot be null"); + public Map getSchemas() { + return RUMGroupByTotal.schemas; } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - public RUMGroupByTotal() { - super("oneOf", Boolean.FALSE); - } - - public RUMGroupByTotal(Boolean o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public RUMGroupByTotal(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public RUMGroupByTotal(Double o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Boolean", new GenericType() {}); - schemas.put("String", new GenericType() {}); - schemas.put("Double", new GenericType() {}); - JSON.registerDescendants(RUMGroupByTotal.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return RUMGroupByTotal.schemas; - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Boolean, String, Double + * + * 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(Boolean.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Double.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Boolean, String, Double - * - *

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(Boolean.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Double.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 Boolean, String, Double"); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance, which can be the following: + * Boolean, String, Double + * + * @return The actual instance (Boolean, String, Double) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be Boolean, String, Double"); - } - /** - * Get the actual instance, which can be the following: Boolean, String, Double - * - * @return The actual instance (Boolean, String, Double) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Boolean` - * @throws ClassCastException if the instance is not `Boolean` - */ - public Boolean getBoolean() throws ClassCastException { - return (Boolean) super.getActualInstance(); - } + /** + * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Boolean` + * @throws ClassCastException if the instance is not `Boolean` + */ + public Boolean getBoolean() throws ClassCastException { + return (Boolean)super.getActualInstance(); + } - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); + } - /** - * Get the actual instance of `Double`. If the actual instance is not `Double`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Double` - * @throws ClassCastException if the instance is not `Double` - */ - public Double getDouble() throws ClassCastException { - return (Double) super.getActualInstance(); - } + /** + * Get the actual instance of `Double`. If the actual instance is not `Double`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Double` + * @throws ClassCastException if the instance is not `Double` + */ + public Double getDouble() throws ClassCastException { + return (Double)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java index 51040572e66..dc8bf17ddf9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The search and filter query settings. */ + +/** + *

The search and filter query settings.

+ */ @JsonPropertyOrder({ RUMQueryFilter.JSON_PROPERTY_FROM, RUMQueryFilter.JSON_PROPERTY_QUERY, RUMQueryFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMQueryFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; private String from = "now-15m"; @@ -37,70 +57,61 @@ public RUMQueryFilter from(String from) { } /** - * The minimum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, - * and the Z UTC indicator - seconds and fractional seconds are optional), math, and - * regular timestamps (in milliseconds). - * + *

The minimum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, and the Z UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds).

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFrom() { + return from; + } public void setFrom(String from) { this.from = from; } - public RUMQueryFilter query(String query) { this.query = query; return this; } /** - * The search query following the RUM search syntax. - * + *

The search query following the RUM search syntax.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public RUMQueryFilter to(String to) { this.to = to; return this; } /** - * The maximum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, - * and the Z UTC indicator - seconds and fractional seconds are optional), math, and - * regular timestamps (in milliseconds). - * + *

The maximum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, and the Z UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds).

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } public void setTo(String to) { this.to = to; } - /** Return true if this RUMQueryFilter object is equal to o. */ + /** + * Return true if this RUMQueryFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,14 +121,13 @@ public boolean equals(Object o) { return false; } RUMQueryFilter rumQueryFilter = (RUMQueryFilter) o; - return Objects.equals(this.from, rumQueryFilter.from) - && Objects.equals(this.query, rumQueryFilter.query) - && Objects.equals(this.to, rumQueryFilter.to); + return Objects.equals(this.from, rumQueryFilter.from) && Objects.equals(this.query, rumQueryFilter.query) && Objects.equals(this.to, rumQueryFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, query, to); + return Objects.hash(from,query,to); } @Override @@ -132,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMQueryOptions.java b/src/main/java/com/datadog/api/client/v2/model/RUMQueryOptions.java index c3f304af5fd..4b555f06d65 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMQueryOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMQueryOptions.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Global query options that are used during the query. Note: Only supply timezone or time offset, - * not both. Otherwise, the query fails. + *

Global query options that are used during the query. + * Note: Only supply timezone or time offset, not both. Otherwise, the query fails.

*/ @JsonPropertyOrder({ RUMQueryOptions.JSON_PROPERTY_TIME_OFFSET, RUMQueryOptions.JSON_PROPERTY_TIMEZONE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMQueryOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIME_OFFSET = "time_offset"; private Long timeOffset; @@ -36,44 +54,42 @@ public RUMQueryOptions timeOffset(Long timeOffset) { } /** - * The time offset (in seconds) to apply to the query. - * + *

The time offset (in seconds) to apply to the query.

* @return timeOffset - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIME_OFFSET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTimeOffset() { - return timeOffset; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_OFFSET) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeOffset() { + return timeOffset; + } public void setTimeOffset(Long timeOffset) { this.timeOffset = timeOffset; } - public RUMQueryOptions timezone(String timezone) { this.timezone = timezone; return this; } /** - * The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone - * Database identifier (like America/New_York). - * + *

The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).

* @return timezone - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMEZONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTimezone() { + return timezone; + } public void setTimezone(String timezone) { this.timezone = timezone; } - /** Return true if this RUMQueryOptions object is equal to o. */ + /** + * Return true if this RUMQueryOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +99,13 @@ public boolean equals(Object o) { return false; } RUMQueryOptions rumQueryOptions = (RUMQueryOptions) o; - return Objects.equals(this.timeOffset, rumQueryOptions.timeOffset) - && Objects.equals(this.timezone, rumQueryOptions.timezone); + return Objects.equals(this.timeOffset, rumQueryOptions.timeOffset) && Objects.equals(this.timezone, rumQueryOptions.timezone); } + @Override public int hashCode() { - return Objects.hash(timeOffset, timezone); + return Objects.hash(timeOffset,timezone); } @Override @@ -103,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java b/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java index 1bd2cb0823a..960e7841336 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Paging attributes for listing events. */ + +/** + *

Paging attributes for listing events.

+ */ @JsonPropertyOrder({ RUMQueryPageOptions.JSON_PROPERTY_CURSOR, RUMQueryPageOptions.JSON_PROPERTY_LIMIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMQueryPageOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -33,43 +53,43 @@ public RUMQueryPageOptions cursor(String cursor) { } /** - * List following results with a cursor provided in the previous query. - * + *

List following results with a cursor provided in the previous query.

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - public RUMQueryPageOptions limit(Integer limit) { this.limit = limit; return this; } /** - * Maximum number of events in the response. maximum: 1000 - * + *

Maximum number of events in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - /** Return true if this RUMQueryPageOptions object is equal to o. */ + /** + * Return true if this RUMQueryPageOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +99,13 @@ public boolean equals(Object o) { return false; } RUMQueryPageOptions rumQueryPageOptions = (RUMQueryPageOptions) o; - return Objects.equals(this.cursor, rumQueryPageOptions.cursor) - && Objects.equals(this.limit, rumQueryPageOptions.limit); + return Objects.equals(this.cursor, rumQueryPageOptions.cursor) && Objects.equals(this.limit, rumQueryPageOptions.limit); } + @Override public int hashCode() { - return Objects.hash(cursor, limit); + return Objects.hash(cursor,limit); } @Override @@ -99,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java index f2b245d6f55..15298f1cc8d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Links attributes. */ -@JsonPropertyOrder({RUMResponseLinks.JSON_PROPERTY_NEXT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Links attributes.

+ */ +@JsonPropertyOrder({ + RUMResponseLinks.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT = "next"; private String next; @@ -27,23 +49,24 @@ public RUMResponseLinks next(String next) { } /** - * Link for the next set of results. Note that the request can also be made using the POST - * endpoint. - * + *

Link for the next set of results. Note that the request can also be made using the + * POST endpoint.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - /** Return true if this RUMResponseLinks object is equal to o. */ + /** + * Return true if this RUMResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.next, rumResponseLinks.next); } + @Override public int hashCode() { return Objects.hash(next); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java index e1b1a90bccb..186e239ad92 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The metadata associated with a request. */ +/** + *

The metadata associated with a request.

+ */ @JsonPropertyOrder({ RUMResponseMetadata.JSON_PROPERTY_ELAPSED, RUMResponseMetadata.JSON_PROPERTY_PAGE, @@ -22,10 +40,10 @@ RUMResponseMetadata.JSON_PROPERTY_STATUS, RUMResponseMetadata.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMResponseMetadata { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ELAPSED = "elapsed"; private Long elapsed; @@ -47,21 +65,19 @@ public RUMResponseMetadata elapsed(Long elapsed) { } /** - * The time elapsed in milliseconds. - * + *

The time elapsed in milliseconds.

* @return elapsed - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ELAPSED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getElapsed() { - return elapsed; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELAPSED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getElapsed() { + return elapsed; + } public void setElapsed(Long elapsed) { this.elapsed = elapsed; } - public RUMResponseMetadata page(RUMResponsePage page) { this.page = page; this.unparsed |= page.unparsed; @@ -69,42 +85,38 @@ public RUMResponseMetadata page(RUMResponsePage page) { } /** - * Paging attributes. - * + *

Paging attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMResponsePage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMResponsePage getPage() { + return page; + } public void setPage(RUMResponsePage page) { this.page = page; } - public RUMResponseMetadata requestId(String requestId) { this.requestId = requestId; return this; } /** - * The identifier of the request. - * + *

The identifier of the request.

* @return requestId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestId() { - return requestId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } public void setRequestId(String requestId) { this.requestId = requestId; } - public RUMResponseMetadata status(RUMResponseStatus status) { this.status = status; this.unparsed |= !status.isValid(); @@ -112,24 +124,22 @@ public RUMResponseMetadata status(RUMResponseStatus status) { } /** - * The status of the response. - * + *

The status of the response.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMResponseStatus getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMResponseStatus getStatus() { + return status; + } public void setStatus(RUMResponseStatus status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - public RUMResponseMetadata warnings(List warnings) { this.warnings = warnings; for (RUMWarning item : warnings) { @@ -137,7 +147,6 @@ public RUMResponseMetadata warnings(List warnings) { } return this; } - public RUMResponseMetadata addWarningsItem(RUMWarning warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); @@ -148,23 +157,24 @@ public RUMResponseMetadata addWarningsItem(RUMWarning warningsItem) { } /** - * A list of warnings (non-fatal errors) encountered. Partial results may return if warnings are - * present in the response. - * + *

A list of warnings (non-fatal errors) encountered. Partial results may return if + * warnings are present in the response.

* @return warnings - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } public void setWarnings(List warnings) { this.warnings = warnings; } - /** Return true if this RUMResponseMetadata object is equal to o. */ + /** + * Return true if this RUMResponseMetadata object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -174,16 +184,13 @@ public boolean equals(Object o) { return false; } RUMResponseMetadata rumResponseMetadata = (RUMResponseMetadata) o; - return Objects.equals(this.elapsed, rumResponseMetadata.elapsed) - && Objects.equals(this.page, rumResponseMetadata.page) - && Objects.equals(this.requestId, rumResponseMetadata.requestId) - && Objects.equals(this.status, rumResponseMetadata.status) - && Objects.equals(this.warnings, rumResponseMetadata.warnings); + return Objects.equals(this.elapsed, rumResponseMetadata.elapsed) && Objects.equals(this.page, rumResponseMetadata.page) && Objects.equals(this.requestId, rumResponseMetadata.requestId) && Objects.equals(this.status, rumResponseMetadata.status) && Objects.equals(this.warnings, rumResponseMetadata.warnings); } + @Override public int hashCode() { - return Objects.hash(elapsed, page, requestId, status, warnings); + return Objects.hash(elapsed,page,requestId,status,warnings); } @Override @@ -200,7 +207,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java index 104a3163e2e..849c24915bc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Paging attributes. */ -@JsonPropertyOrder({RUMResponsePage.JSON_PROPERTY_AFTER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Paging attributes.

+ */ +@JsonPropertyOrder({ + RUMResponsePage.JSON_PROPERTY_AFTER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMResponsePage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -27,23 +49,23 @@ public RUMResponsePage after(String after) { } /** - * The cursor to use to get the next results, if any. To make the next request, use the same - * parameters with the addition of page[cursor]. - * + *

The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - /** Return true if this RUMResponsePage object is equal to o. */ + /** + * Return true if this RUMResponsePage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.after, rumResponsePage.after); } + @Override public int hashCode() { return Objects.hash(after); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java index 723f4800df3..ef6bde8f8ee 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The status of the response. */ +/** + *

The status of the response.

+ */ @JsonSerialize(using = RUMResponseStatus.RUMResponseStatusSerializer.class) public class RUMResponseStatus { public static final RUMResponseStatus DONE = new RUMResponseStatus("done"); public static final RUMResponseStatus TIMEOUT = new RUMResponseStatus("timeout"); - private static final Set allowedValues = - new HashSet(Arrays.asList("done", "timeout")); + private static final Set allowedValues = new HashSet(Arrays.asList("done", "timeout")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class RUMResponseStatusSerializer extends StdSerializer { - public RUMResponseStatusSerializer(Class t) { - super(t); - } - - public RUMResponseStatusSerializer() { - this(null); - } - - @Override - public void serialize(RUMResponseStatus value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMResponseStatusSerializer(Class t) { + super(t); + } + + public RUMResponseStatusSerializer() { + this(null); + } + + @Override + public void serialize(RUMResponseStatus value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMResponseStatus object is equal to o. */ + /** + * Return true if this RUMResponseStatus object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java index f5269b95f04..605a738ea8e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The request for a RUM events list. */ + +/** + *

The request for a RUM events list.

+ */ @JsonPropertyOrder({ RUMSearchEventsRequest.JSON_PROPERTY_FILTER, RUMSearchEventsRequest.JSON_PROPERTY_OPTIONS, RUMSearchEventsRequest.JSON_PROPERTY_PAGE, RUMSearchEventsRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMSearchEventsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private RUMQueryFilter filter; @@ -42,21 +62,19 @@ public RUMSearchEventsRequest filter(RUMQueryFilter filter) { } /** - * The search and filter query settings. - * + *

The search and filter query settings.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMQueryFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMQueryFilter getFilter() { + return filter; + } public void setFilter(RUMQueryFilter filter) { this.filter = filter; } - public RUMSearchEventsRequest options(RUMQueryOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -64,22 +82,20 @@ public RUMSearchEventsRequest options(RUMQueryOptions options) { } /** - * Global query options that are used during the query. Note: Only supply timezone or time offset, - * not both. Otherwise, the query fails. - * + *

Global query options that are used during the query. + * Note: Only supply timezone or time offset, not both. Otherwise, the query fails.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMQueryOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMQueryOptions getOptions() { + return options; + } public void setOptions(RUMQueryOptions options) { this.options = options; } - public RUMSearchEventsRequest page(RUMQueryPageOptions page) { this.page = page; this.unparsed |= page.unparsed; @@ -87,21 +103,19 @@ public RUMSearchEventsRequest page(RUMQueryPageOptions page) { } /** - * Paging attributes for listing events. - * + *

Paging attributes for listing events.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMQueryPageOptions getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMQueryPageOptions getPage() { + return page; + } public void setPage(RUMQueryPageOptions page) { this.page = page; } - public RUMSearchEventsRequest sort(RUMSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -109,25 +123,26 @@ public RUMSearchEventsRequest sort(RUMSort sort) { } /** - * Sort parameters when querying events. - * + *

Sort parameters when querying events.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RUMSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RUMSort getSort() { + return sort; + } public void setSort(RUMSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this RUMSearchEventsRequest object is equal to o. */ + /** + * Return true if this RUMSearchEventsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +152,13 @@ public boolean equals(Object o) { return false; } RUMSearchEventsRequest rumSearchEventsRequest = (RUMSearchEventsRequest) o; - return Objects.equals(this.filter, rumSearchEventsRequest.filter) - && Objects.equals(this.options, rumSearchEventsRequest.options) - && Objects.equals(this.page, rumSearchEventsRequest.page) - && Objects.equals(this.sort, rumSearchEventsRequest.sort); + return Objects.equals(this.filter, rumSearchEventsRequest.filter) && Objects.equals(this.options, rumSearchEventsRequest.options) && Objects.equals(this.page, rumSearchEventsRequest.page) && Objects.equals(this.sort, rumSearchEventsRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, options, page, sort); + return Objects.hash(filter,options,page,sort); } @Override @@ -161,7 +174,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMSort.java b/src/main/java/com/datadog/api/client/v2/model/RUMSort.java index 2db32c86dda..a36ab596b32 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMSort.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sort parameters when querying events. */ +/** + *

Sort parameters when querying events.

+ */ @JsonSerialize(using = RUMSort.RUMSortSerializer.class) public class RUMSort { public static final RUMSort TIMESTAMP_ASCENDING = new RUMSort("timestamp"); public static final RUMSort TIMESTAMP_DESCENDING = new RUMSort("-timestamp"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timestamp", "-timestamp")); + private static final Set allowedValues = new HashSet(Arrays.asList("timestamp", "-timestamp")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class RUMSortSerializer extends StdSerializer { - public RUMSortSerializer(Class t) { - super(t); - } - - public RUMSortSerializer() { - this(null); - } - - @Override - public void serialize(RUMSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMSortSerializer(Class t) { + super(t); + } + + public RUMSortSerializer() { + this(null); + } + + @Override + public void serialize(RUMSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMSort object is equal to o. */ + /** + * Return true if this RUMSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMSortOrder.java b/src/main/java/com/datadog/api/client/v2/model/RUMSortOrder.java index e482dfcf45c..8f4f25e5380 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMSortOrder.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMSortOrder.java @@ -6,28 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The order to use, ascending or descending. */ +/** + *

The order to use, ascending or descending.

+ */ @JsonSerialize(using = RUMSortOrder.RUMSortOrderSerializer.class) public class RUMSortOrder { public static final RUMSortOrder ASCENDING = new RUMSortOrder("asc"); public static final RUMSortOrder DESCENDING = new RUMSortOrder("desc"); - private static final Set allowedValues = - new HashSet(Arrays.asList("asc", "desc")); + private static final Set allowedValues = new HashSet(Arrays.asList("asc", "desc")); private String value; @@ -40,19 +63,18 @@ public boolean isValid() { } public static class RUMSortOrderSerializer extends StdSerializer { - public RUMSortOrderSerializer(Class t) { - super(t); - } - - public RUMSortOrderSerializer() { - this(null); - } - - @Override - public void serialize(RUMSortOrder value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RUMSortOrderSerializer(Class t) { + super(t); + } + + public RUMSortOrderSerializer() { + this(null); + } + + @Override + public void serialize(RUMSortOrder value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RUMSortOrder object is equal to o. */ + /** + * Return true if this RUMSortOrder object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMWarning.java b/src/main/java/com/datadog/api/client/v2/model/RUMWarning.java index e7aa2eda19c..fccaa12740c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMWarning.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMWarning.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A warning message indicating something that went wrong with the query. */ + +/** + *

A warning message indicating something that went wrong with the query.

+ */ @JsonPropertyOrder({ RUMWarning.JSON_PROPERTY_CODE, RUMWarning.JSON_PROPERTY_DETAIL, RUMWarning.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMWarning { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CODE = "code"; private String code; @@ -37,64 +57,61 @@ public RUMWarning code(String code) { } /** - * A unique code for this type of warning. - * + *

A unique code for this type of warning.

* @return code - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCode() { - return code; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } public void setCode(String code) { this.code = code; } - public RUMWarning detail(String detail) { this.detail = detail; return this; } /** - * A detailed explanation of this specific warning. - * + *

A detailed explanation of this specific warning.

* @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } public void setDetail(String detail) { this.detail = detail; } - public RUMWarning title(String title) { this.title = title; return this; } /** - * A short human-readable summary of the warning. - * + *

A short human-readable summary of the warning.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this RUMWarning object is equal to o. */ + /** + * Return true if this RUMWarning object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } RUMWarning rumWarning = (RUMWarning) o; - return Objects.equals(this.code, rumWarning.code) - && Objects.equals(this.detail, rumWarning.detail) - && Objects.equals(this.title, rumWarning.title); + return Objects.equals(this.code, rumWarning.code) && Objects.equals(this.detail, rumWarning.detail) && Objects.equals(this.title, rumWarning.title); } + @Override public int hashCode() { - return Objects.hash(code, detail, title); + return Objects.hash(code,detail,title); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachment.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachment.java index 2c9d7899035..ca871f144c2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachment.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachment.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A relationship reference for attachments. */ -@JsonPropertyOrder({RelationshipToIncidentAttachment.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A relationship reference for attachments.

+ */ +@JsonPropertyOrder({ + RelationshipToIncidentAttachment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToIncidentAttachment { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public RelationshipToIncidentAttachment() {} @JsonCreator public RelationshipToIncidentAttachment( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public RelationshipToIncidentAttachment data(List data) { this.data = data; for (RelationshipToIncidentAttachmentData item : data) { @@ -40,30 +57,29 @@ public RelationshipToIncidentAttachment data(ListAn array of incident attachments.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RelationshipToIncidentAttachment object is equal to o. */ + /** + * Return true if this RelationshipToIncidentAttachment object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,11 +88,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToIncidentAttachment relationshipToIncidentAttachment = - (RelationshipToIncidentAttachment) o; + RelationshipToIncidentAttachment relationshipToIncidentAttachment = (RelationshipToIncidentAttachment) o; return Objects.equals(this.data, relationshipToIncidentAttachment.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -92,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachmentData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachmentData.java index 21318b0badd..7d684ab7bd9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachmentData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentAttachmentData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The attachment relationship data. */ + +/** + *

The attachment relationship data.

+ */ @JsonPropertyOrder({ RelationshipToIncidentAttachmentData.JSON_PROPERTY_ID, RelationshipToIncidentAttachmentData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToIncidentAttachmentData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public RelationshipToIncidentAttachmentData() {} @JsonCreator public RelationshipToIncidentAttachmentData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentAttachmentType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentAttachmentType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RelationshipToIncidentAttachmentData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the attachment. - * + *

A unique identifier that represents the attachment.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToIncidentAttachmentData type(IncidentAttachmentType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public RelationshipToIncidentAttachmentData type(IncidentAttachmentType type) { } /** - * The incident attachment resource type. - * + *

The incident attachment resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentAttachmentType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentAttachmentType getType() { + return type; + } public void setType(IncidentAttachmentType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToIncidentAttachmentData object is equal to o. */ + /** + * Return true if this RelationshipToIncidentAttachmentData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToIncidentAttachmentData relationshipToIncidentAttachmentData = - (RelationshipToIncidentAttachmentData) o; - return Objects.equals(this.id, relationshipToIncidentAttachmentData.id) - && Objects.equals(this.type, relationshipToIncidentAttachmentData.type); + RelationshipToIncidentAttachmentData relationshipToIncidentAttachmentData = (RelationshipToIncidentAttachmentData) o; + return Objects.equals(this.id, relationshipToIncidentAttachmentData.id) && Objects.equals(this.type, relationshipToIncidentAttachmentData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadataData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadataData.java index b53437d57d2..90bb8fcc20e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadataData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadataData.java @@ -6,61 +6,75 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A relationship reference for an integration metadata object. */ + +/** + *

A relationship reference for an integration metadata object.

+ */ @JsonPropertyOrder({ RelationshipToIncidentIntegrationMetadataData.JSON_PROPERTY_ID, RelationshipToIncidentIntegrationMetadataData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToIncidentIntegrationMetadataData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentIntegrationMetadataType type = - IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS; + private IncidentIntegrationMetadataType type = IncidentIntegrationMetadataType.INCIDENT_INTEGRATIONS; public RelationshipToIncidentIntegrationMetadataData() {} @JsonCreator public RelationshipToIncidentIntegrationMetadataData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - IncidentIntegrationMetadataType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentIntegrationMetadataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RelationshipToIncidentIntegrationMetadataData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the integration metadata. - * + *

A unique identifier that represents the integration metadata.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToIncidentIntegrationMetadataData type(IncidentIntegrationMetadataType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -68,24 +82,25 @@ public RelationshipToIncidentIntegrationMetadataData type(IncidentIntegrationMet } /** - * Integration metadata resource type. - * + *

Integration metadata resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentIntegrationMetadataType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentIntegrationMetadataType getType() { + return type; + } public void setType(IncidentIntegrationMetadataType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToIncidentIntegrationMetadataData object is equal to o. */ + /** + * Return true if this RelationshipToIncidentIntegrationMetadataData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToIncidentIntegrationMetadataData relationshipToIncidentIntegrationMetadataData = - (RelationshipToIncidentIntegrationMetadataData) o; - return Objects.equals(this.id, relationshipToIncidentIntegrationMetadataData.id) - && Objects.equals(this.type, relationshipToIncidentIntegrationMetadataData.type); + RelationshipToIncidentIntegrationMetadataData relationshipToIncidentIntegrationMetadataData = (RelationshipToIncidentIntegrationMetadataData) o; + return Objects.equals(this.id, relationshipToIncidentIntegrationMetadataData.id) && Objects.equals(this.type, relationshipToIncidentIntegrationMetadataData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -116,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadatas.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadatas.java index 37a90e94943..6b2cb80fb02 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadatas.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentIntegrationMetadatas.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A relationship reference for multiple integration metadata objects. */ -@JsonPropertyOrder({RelationshipToIncidentIntegrationMetadatas.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A relationship reference for multiple integration metadata objects.

+ */ +@JsonPropertyOrder({ + RelationshipToIncidentIntegrationMetadatas.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToIncidentIntegrationMetadatas { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,43 +47,39 @@ public RelationshipToIncidentIntegrationMetadatas() {} @JsonCreator public RelationshipToIncidentIntegrationMetadatas( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - - public RelationshipToIncidentIntegrationMetadatas data( - List data) { + public RelationshipToIncidentIntegrationMetadatas data(List data) { this.data = data; for (RelationshipToIncidentIntegrationMetadataData item : data) { this.unparsed |= item.unparsed; } return this; } - - public RelationshipToIncidentIntegrationMetadatas addDataItem( - RelationshipToIncidentIntegrationMetadataData dataItem) { + public RelationshipToIncidentIntegrationMetadatas addDataItem(RelationshipToIncidentIntegrationMetadataData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; return this; } /** - * The integration metadata relationship array - * + *

Integration metadata relationship array

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RelationshipToIncidentIntegrationMetadatas object is equal to o. */ + /** + * Return true if this RelationshipToIncidentIntegrationMetadatas object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -73,11 +88,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToIncidentIntegrationMetadatas relationshipToIncidentIntegrationMetadatas = - (RelationshipToIncidentIntegrationMetadatas) o; + RelationshipToIncidentIntegrationMetadatas relationshipToIncidentIntegrationMetadatas = (RelationshipToIncidentIntegrationMetadatas) o; return Objects.equals(this.data, relationshipToIncidentIntegrationMetadatas.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -93,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortem.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortem.java index 7b5f2ab1283..aede116ad5c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortem.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortem.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A relationship reference for postmortems. */ -@JsonPropertyOrder({RelationshipToIncidentPostmortem.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A relationship reference for postmortems.

+ */ +@JsonPropertyOrder({ + RelationshipToIncidentPostmortem.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToIncidentPostmortem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RelationshipToIncidentPostmortemData data; @@ -26,12 +47,10 @@ public RelationshipToIncidentPostmortem() {} @JsonCreator public RelationshipToIncidentPostmortem( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - RelationshipToIncidentPostmortemData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RelationshipToIncidentPostmortemData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RelationshipToIncidentPostmortem data(RelationshipToIncidentPostmortemData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public RelationshipToIncidentPostmortem data(RelationshipToIncidentPostmortemDat } /** - * The postmortem relationship data. - * + *

The postmortem relationship data.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelationshipToIncidentPostmortemData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RelationshipToIncidentPostmortemData getData() { + return data; + } public void setData(RelationshipToIncidentPostmortemData data) { this.data = data; } - /** Return true if this RelationshipToIncidentPostmortem object is equal to o. */ + /** + * Return true if this RelationshipToIncidentPostmortem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToIncidentPostmortem relationshipToIncidentPostmortem = - (RelationshipToIncidentPostmortem) o; + RelationshipToIncidentPostmortem relationshipToIncidentPostmortem = (RelationshipToIncidentPostmortem) o; return Objects.equals(this.data, relationshipToIncidentPostmortem.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortemData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortemData.java index 0469354770e..465b8fb18b1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortemData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToIncidentPostmortemData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The postmortem relationship data. */ + +/** + *

The postmortem relationship data.

+ */ @JsonPropertyOrder({ RelationshipToIncidentPostmortemData.JSON_PROPERTY_ID, RelationshipToIncidentPostmortemData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToIncidentPostmortemData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public RelationshipToIncidentPostmortemData() {} @JsonCreator public RelationshipToIncidentPostmortemData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentPostmortemType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)IncidentPostmortemType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RelationshipToIncidentPostmortemData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the postmortem. - * + *

A unique identifier that represents the postmortem.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToIncidentPostmortemData type(IncidentPostmortemType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public RelationshipToIncidentPostmortemData type(IncidentPostmortemType type) { } /** - * Incident postmortem resource type. - * + *

Incident postmortem resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentPostmortemType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public IncidentPostmortemType getType() { + return type; + } public void setType(IncidentPostmortemType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToIncidentPostmortemData object is equal to o. */ + /** + * Return true if this RelationshipToIncidentPostmortemData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToIncidentPostmortemData relationshipToIncidentPostmortemData = - (RelationshipToIncidentPostmortemData) o; - return Objects.equals(this.id, relationshipToIncidentPostmortemData.id) - && Objects.equals(this.type, relationshipToIncidentPostmortemData.type); + RelationshipToIncidentPostmortemData relationshipToIncidentPostmortemData = (RelationshipToIncidentPostmortemData) o; + return Objects.equals(this.id, relationshipToIncidentPostmortemData.id) && Objects.equals(this.type, relationshipToIncidentPostmortemData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganization.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganization.java index fc3faf1f3e3..707873d1ad4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganization.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganization.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to an organization. */ -@JsonPropertyOrder({RelationshipToOrganization.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relationship to an organization.

+ */ +@JsonPropertyOrder({ + RelationshipToOrganization.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToOrganization { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RelationshipToOrganizationData data; @@ -26,12 +47,10 @@ public RelationshipToOrganization() {} @JsonCreator public RelationshipToOrganization( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - RelationshipToOrganizationData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RelationshipToOrganizationData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RelationshipToOrganization data(RelationshipToOrganizationData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public RelationshipToOrganization data(RelationshipToOrganizationData data) { } /** - * Relationship to organization object. - * + *

Relationship to organization object.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelationshipToOrganizationData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RelationshipToOrganizationData getData() { + return data; + } public void setData(RelationshipToOrganizationData data) { this.data = data; } - /** Return true if this RelationshipToOrganization object is equal to o. */ + /** + * Return true if this RelationshipToOrganization object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToOrganization.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizationData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizationData.java index 413d671fd87..4c032abe366 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizationData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizationData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to organization object. */ + +/** + *

Relationship to organization object.

+ */ @JsonPropertyOrder({ RelationshipToOrganizationData.JSON_PROPERTY_ID, RelationshipToOrganizationData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToOrganizationData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public RelationshipToOrganizationData() {} @JsonCreator public RelationshipToOrganizationData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OrganizationsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)OrganizationsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RelationshipToOrganizationData id(String id) { this.id = id; return this; } /** - * ID of the organization. - * + *

ID of the organization.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToOrganizationData type(OrganizationsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public RelationshipToOrganizationData type(OrganizationsType type) { } /** - * Organizations resource type. - * + *

Organizations resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OrganizationsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public OrganizationsType getType() { + return type; + } public void setType(OrganizationsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToOrganizationData object is equal to o. */ + /** + * Return true if this RelationshipToOrganizationData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToOrganizationData relationshipToOrganizationData = - (RelationshipToOrganizationData) o; - return Objects.equals(this.id, relationshipToOrganizationData.id) - && Objects.equals(this.type, relationshipToOrganizationData.type); + RelationshipToOrganizationData relationshipToOrganizationData = (RelationshipToOrganizationData) o; + return Objects.equals(this.id, relationshipToOrganizationData.id) && Objects.equals(this.type, relationshipToOrganizationData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizations.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizations.java index 99464540fc7..f3f5aa40437 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizations.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToOrganizations.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to organizations. */ -@JsonPropertyOrder({RelationshipToOrganizations.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relationship to organizations.

+ */ +@JsonPropertyOrder({ + RelationshipToOrganizations.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToOrganizations { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public RelationshipToOrganizations() {} @JsonCreator public RelationshipToOrganizations( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public RelationshipToOrganizations data(List data) { this.data = data; for (RelationshipToOrganizationData item : data) { @@ -40,7 +57,6 @@ public RelationshipToOrganizations data(List dat } return this; } - public RelationshipToOrganizations addDataItem(RelationshipToOrganizationData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -48,21 +64,22 @@ public RelationshipToOrganizations addDataItem(RelationshipToOrganizationData da } /** - * Relationships to organization objects. - * + *

Relationships to organization objects.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RelationshipToOrganizations object is equal to o. */ + /** + * Return true if this RelationshipToOrganizations object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToOrganizations.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermission.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermission.java index 2071808900d..6bba24a5c7d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermission.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermission.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationship to a permissions object. */ -@JsonPropertyOrder({RelationshipToPermission.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationship to a permissions object.

+ */ +@JsonPropertyOrder({ + RelationshipToPermission.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToPermission { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RelationshipToPermissionData data; @@ -28,22 +50,23 @@ public RelationshipToPermission data(RelationshipToPermissionData data) { } /** - * Relationship to permission object. - * + *

Relationship to permission object.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToPermissionData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToPermissionData getData() { + return data; + } public void setData(RelationshipToPermissionData data) { this.data = data; } - /** Return true if this RelationshipToPermission object is equal to o. */ + /** + * Return true if this RelationshipToPermission object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToPermission.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissionData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissionData.java index 5b5950a3718..0a275f14e49 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissionData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to permission object. */ + +/** + *

Relationship to permission object.

+ */ @JsonPropertyOrder({ RelationshipToPermissionData.JSON_PROPERTY_ID, RelationshipToPermissionData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToPermissionData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -33,21 +53,19 @@ public RelationshipToPermissionData id(String id) { } /** - * ID of the permission. - * + *

ID of the permission.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToPermissionData type(PermissionsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -55,25 +73,26 @@ public RelationshipToPermissionData type(PermissionsType type) { } /** - * Permissions resource type. - * + *

Permissions resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PermissionsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public PermissionsType getType() { + return type; + } public void setType(PermissionsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToPermissionData object is equal to o. */ + /** + * Return true if this RelationshipToPermissionData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +102,13 @@ public boolean equals(Object o) { return false; } RelationshipToPermissionData relationshipToPermissionData = (RelationshipToPermissionData) o; - return Objects.equals(this.id, relationshipToPermissionData.id) - && Objects.equals(this.type, relationshipToPermissionData.type); + return Objects.equals(this.id, relationshipToPermissionData.id) && Objects.equals(this.type, relationshipToPermissionData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -103,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissions.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissions.java index b435b097ad8..5f367244e6b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissions.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToPermissions.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Relationship to multiple permissions objects. */ -@JsonPropertyOrder({RelationshipToPermissions.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Relationship to multiple permissions objects.

+ */ +@JsonPropertyOrder({ + RelationshipToPermissions.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToPermissions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public RelationshipToPermissions data(List data) { } return this; } - public RelationshipToPermissions addDataItem(RelationshipToPermissionData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public RelationshipToPermissions addDataItem(RelationshipToPermissionData dataIt } /** - * Relationships to permission objects. - * + *

Relationships to permission objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RelationshipToPermissions object is equal to o. */ + /** + * Return true if this RelationshipToPermissions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToPermissions.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToRole.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToRole.java index 73185b7f522..2948300970b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToRole.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToRole.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationship to role. */ -@JsonPropertyOrder({RelationshipToRole.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationship to role.

+ */ +@JsonPropertyOrder({ + RelationshipToRole.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToRole { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RelationshipToRoleData data; @@ -28,22 +50,23 @@ public RelationshipToRole data(RelationshipToRoleData data) { } /** - * Relationship to role object. - * + *

Relationship to role object.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToRoleData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRoleData getData() { + return data; + } public void setData(RelationshipToRoleData data) { this.data = data; } - /** Return true if this RelationshipToRole object is equal to o. */ + /** + * Return true if this RelationshipToRole object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToRole.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoleData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoleData.java index c14c7c7601a..7f5e67c81b6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoleData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoleData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to role object. */ + +/** + *

Relationship to role object.

+ */ @JsonPropertyOrder({ RelationshipToRoleData.JSON_PROPERTY_ID, RelationshipToRoleData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToRoleData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -33,21 +53,19 @@ public RelationshipToRoleData id(String id) { } /** - * The unique identifier of the role. - * + *

The unique identifier of the role.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToRoleData type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -55,25 +73,26 @@ public RelationshipToRoleData type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RolesType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToRoleData object is equal to o. */ + /** + * Return true if this RelationshipToRoleData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +102,13 @@ public boolean equals(Object o) { return false; } RelationshipToRoleData relationshipToRoleData = (RelationshipToRoleData) o; - return Objects.equals(this.id, relationshipToRoleData.id) - && Objects.equals(this.type, relationshipToRoleData.type); + return Objects.equals(this.id, relationshipToRoleData.id) && Objects.equals(this.type, relationshipToRoleData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -103,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoles.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoles.java index f91e8c5d1ad..e795394ee00 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoles.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToRoles.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Relationship to roles. */ -@JsonPropertyOrder({RelationshipToRoles.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Relationship to roles.

+ */ +@JsonPropertyOrder({ + RelationshipToRoles.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToRoles { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public RelationshipToRoles data(List data) { } return this; } - public RelationshipToRoles addDataItem(RelationshipToRoleData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public RelationshipToRoles addDataItem(RelationshipToRoleData dataItem) { } /** - * An array containing type and the unique identifier of a role. - * + *

An array containing type and the unique identifier of a role.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RelationshipToRoles object is equal to o. */ + /** + * Return true if this RelationshipToRoles object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToRoles.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttribute.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttribute.java index 5abdd0898f6..f1143c9f1c2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttribute.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttribute.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** AuthN Mapping relationship to SAML Assertion Attribute. */ -@JsonPropertyOrder({RelationshipToSAMLAssertionAttribute.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

AuthN Mapping relationship to SAML Assertion Attribute.

+ */ +@JsonPropertyOrder({ + RelationshipToSAMLAssertionAttribute.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToSAMLAssertionAttribute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RelationshipToSAMLAssertionAttributeData data; @@ -26,12 +47,10 @@ public RelationshipToSAMLAssertionAttribute() {} @JsonCreator public RelationshipToSAMLAssertionAttribute( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - RelationshipToSAMLAssertionAttributeData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RelationshipToSAMLAssertionAttributeData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RelationshipToSAMLAssertionAttribute data(RelationshipToSAMLAssertionAttributeData data) { this.data = data; this.unparsed |= data.unparsed; @@ -39,21 +58,22 @@ public RelationshipToSAMLAssertionAttribute data(RelationshipToSAMLAssertionAttr } /** - * Data of AuthN Mapping relationship to SAML Assertion Attribute. - * + *

Data of AuthN Mapping relationship to SAML Assertion Attribute.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelationshipToSAMLAssertionAttributeData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RelationshipToSAMLAssertionAttributeData getData() { + return data; + } public void setData(RelationshipToSAMLAssertionAttributeData data) { this.data = data; } - /** Return true if this RelationshipToSAMLAssertionAttribute object is equal to o. */ + /** + * Return true if this RelationshipToSAMLAssertionAttribute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToSAMLAssertionAttribute relationshipToSamlAssertionAttribute = - (RelationshipToSAMLAssertionAttribute) o; + RelationshipToSAMLAssertionAttribute relationshipToSamlAssertionAttribute = (RelationshipToSAMLAssertionAttribute) o; return Objects.equals(this.data, relationshipToSamlAssertionAttribute.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttributeData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttributeData.java index 597f9734eda..5e9c7ebb2c0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttributeData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToSAMLAssertionAttributeData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data of AuthN Mapping relationship to SAML Assertion Attribute. */ + +/** + *

Data of AuthN Mapping relationship to SAML Assertion Attribute.

+ */ @JsonPropertyOrder({ RelationshipToSAMLAssertionAttributeData.JSON_PROPERTY_ID, RelationshipToSAMLAssertionAttributeData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToSAMLAssertionAttributeData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public RelationshipToSAMLAssertionAttributeData() {} @JsonCreator public RelationshipToSAMLAssertionAttributeData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SAMLAssertionAttributesType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SAMLAssertionAttributesType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RelationshipToSAMLAssertionAttributeData id(String id) { this.id = id; return this; } /** - * The ID of the SAML assertion attribute. - * + *

The ID of the SAML assertion attribute.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToSAMLAssertionAttributeData type(SAMLAssertionAttributesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public RelationshipToSAMLAssertionAttributeData type(SAMLAssertionAttributesType } /** - * SAML assertion attributes resource type. - * + *

SAML assertion attributes resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SAMLAssertionAttributesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SAMLAssertionAttributesType getType() { + return type; + } public void setType(SAMLAssertionAttributesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToSAMLAssertionAttributeData object is equal to o. */ + /** + * Return true if this RelationshipToSAMLAssertionAttributeData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelationshipToSAMLAssertionAttributeData relationshipToSamlAssertionAttributeData = - (RelationshipToSAMLAssertionAttributeData) o; - return Objects.equals(this.id, relationshipToSamlAssertionAttributeData.id) - && Objects.equals(this.type, relationshipToSamlAssertionAttributeData.type); + RelationshipToSAMLAssertionAttributeData relationshipToSamlAssertionAttributeData = (RelationshipToSAMLAssertionAttributeData) o; + return Objects.equals(this.id, relationshipToSamlAssertionAttributeData.id) && Objects.equals(this.type, relationshipToSamlAssertionAttributeData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToUser.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToUser.java index 2bffa6acfd0..0544b0631c3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToUser.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToUser.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to user. */ -@JsonPropertyOrder({RelationshipToUser.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relationship to user.

+ */ +@JsonPropertyOrder({ + RelationshipToUser.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToUser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RelationshipToUserData data; @@ -26,11 +47,10 @@ public RelationshipToUser() {} @JsonCreator public RelationshipToUser( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RelationshipToUserData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RelationshipToUserData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RelationshipToUser data(RelationshipToUserData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RelationshipToUser data(RelationshipToUserData data) { } /** - * Relationship to user object. - * + *

Relationship to user object.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelationshipToUserData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RelationshipToUserData getData() { + return data; + } public void setData(RelationshipToUserData data) { this.data = data; } - /** Return true if this RelationshipToUser object is equal to o. */ + /** + * Return true if this RelationshipToUser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToUser.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToUserData.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToUserData.java index 4a4a99e9081..d5d1c34946a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToUserData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToUserData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to user object. */ + +/** + *

Relationship to user object.

+ */ @JsonPropertyOrder({ RelationshipToUserData.JSON_PROPERTY_ID, RelationshipToUserData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToUserData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -32,33 +51,30 @@ public RelationshipToUserData() {} @JsonCreator public RelationshipToUserData( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UsersType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)UsersType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RelationshipToUserData id(String id) { this.id = id; return this; } /** - * A unique identifier that represents the user. - * + *

A unique identifier that represents the user.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RelationshipToUserData type(UsersType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +82,25 @@ public RelationshipToUserData type(UsersType type) { } /** - * Users resource type. - * + *

Users resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UsersType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UsersType getType() { + return type; + } public void setType(UsersType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RelationshipToUserData object is equal to o. */ + /** + * Return true if this RelationshipToUserData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +110,13 @@ public boolean equals(Object o) { return false; } RelationshipToUserData relationshipToUserData = (RelationshipToUserData) o; - return Objects.equals(this.id, relationshipToUserData.id) - && Objects.equals(this.type, relationshipToUserData.type); + return Objects.equals(this.id, relationshipToUserData.id) && Objects.equals(this.type, relationshipToUserData.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -113,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RelationshipToUsers.java b/src/main/java/com/datadog/api/client/v2/model/RelationshipToUsers.java index 8f1d696d51c..2367ef1eb50 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RelationshipToUsers.java +++ b/src/main/java/com/datadog/api/client/v2/model/RelationshipToUsers.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationship to users. */ -@JsonPropertyOrder({RelationshipToUsers.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relationship to users.

+ */ +@JsonPropertyOrder({ + RelationshipToUsers.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RelationshipToUsers { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,11 +47,9 @@ public RelationshipToUsers() {} @JsonCreator public RelationshipToUsers( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public RelationshipToUsers data(List data) { this.data = data; for (RelationshipToUserData item : data) { @@ -40,7 +57,6 @@ public RelationshipToUsers data(List data) { } return this; } - public RelationshipToUsers addDataItem(RelationshipToUserData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -48,21 +64,22 @@ public RelationshipToUsers addDataItem(RelationshipToUserData dataItem) { } /** - * Relationships to user objects. - * + *

Relationships to user objects.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this RelationshipToUsers object is equal to o. */ + /** + * Return true if this RelationshipToUsers object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, relationshipToUsers.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ResponseMetaAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ResponseMetaAttributes.java index ef9b480dce3..65d68eb316b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ResponseMetaAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ResponseMetaAttributes.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Object describing meta attributes of response. */ -@JsonPropertyOrder({ResponseMetaAttributes.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Object describing meta attributes of response.

+ */ +@JsonPropertyOrder({ + ResponseMetaAttributes.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ResponseMetaAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private Pagination page; @@ -28,22 +50,23 @@ public ResponseMetaAttributes page(Pagination page) { } /** - * Pagination object. - * + *

Pagination object.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Pagination getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Pagination getPage() { + return page; + } public void setPage(Pagination page) { this.page = page; } - /** Return true if this ResponseMetaAttributes object is equal to o. */ + /** + * Return true if this ResponseMetaAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.page, responseMetaAttributes.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicy.java b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicy.java index c10155ca9bd..7c82727529e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicy.java +++ b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicy.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Restriction policy object. */ +/** + *

Restriction policy object.

+ */ @JsonPropertyOrder({ RestrictionPolicy.JSON_PROPERTY_ATTRIBUTES, RestrictionPolicy.JSON_PROPERTY_ID, RestrictionPolicy.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RestrictionPolicy { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RestrictionPolicyAttributes attributes; @@ -36,17 +55,15 @@ public RestrictionPolicy() {} @JsonCreator public RestrictionPolicy( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RestrictionPolicyAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RestrictionPolicyType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RestrictionPolicyAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RestrictionPolicyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RestrictionPolicy attributes(RestrictionPolicyAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,41 +71,36 @@ public RestrictionPolicy attributes(RestrictionPolicyAttributes attributes) { } /** - * Restriction policy attributes. - * + *

Restriction policy attributes.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RestrictionPolicyAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RestrictionPolicyAttributes getAttributes() { + return attributes; + } public void setAttributes(RestrictionPolicyAttributes attributes) { this.attributes = attributes; } - public RestrictionPolicy id(String id) { this.id = id; return this; } /** - * The identifier, always equivalent to the value specified in the resource_id path - * parameter. - * + *

The identifier, always equivalent to the value specified in the resource_id path parameter.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RestrictionPolicy type(RestrictionPolicyType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -96,24 +108,25 @@ public RestrictionPolicy type(RestrictionPolicyType type) { } /** - * Restriction policy type. - * + *

Restriction policy type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RestrictionPolicyType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RestrictionPolicyType getType() { + return type; + } public void setType(RestrictionPolicyType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RestrictionPolicy object is equal to o. */ + /** + * Return true if this RestrictionPolicy object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -123,14 +136,13 @@ public boolean equals(Object o) { return false; } RestrictionPolicy restrictionPolicy = (RestrictionPolicy) o; - return Objects.equals(this.attributes, restrictionPolicy.attributes) - && Objects.equals(this.id, restrictionPolicy.id) - && Objects.equals(this.type, restrictionPolicy.type); + return Objects.equals(this.attributes, restrictionPolicy.attributes) && Objects.equals(this.id, restrictionPolicy.id) && Objects.equals(this.type, restrictionPolicy.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -145,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyAttributes.java index a110d80b5a4..5441b277e06 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyAttributes.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Restriction policy attributes. */ -@JsonPropertyOrder({RestrictionPolicyAttributes.JSON_PROPERTY_BINDINGS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Restriction policy attributes.

+ */ +@JsonPropertyOrder({ + RestrictionPolicyAttributes.JSON_PROPERTY_BINDINGS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RestrictionPolicyAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BINDINGS = "bindings"; private List bindings = new ArrayList<>(); @@ -28,11 +47,9 @@ public RestrictionPolicyAttributes() {} @JsonCreator public RestrictionPolicyAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_BINDINGS) - List bindings) { - this.bindings = bindings; + @JsonProperty(required=true, value=JSON_PROPERTY_BINDINGS)List bindings) { + this.bindings = bindings; } - public RestrictionPolicyAttributes bindings(List bindings) { this.bindings = bindings; for (RestrictionPolicyBinding item : bindings) { @@ -40,7 +57,6 @@ public RestrictionPolicyAttributes bindings(List bindi } return this; } - public RestrictionPolicyAttributes addBindingsItem(RestrictionPolicyBinding bindingsItem) { this.bindings.add(bindingsItem); this.unparsed |= bindingsItem.unparsed; @@ -48,21 +64,22 @@ public RestrictionPolicyAttributes addBindingsItem(RestrictionPolicyBinding bind } /** - * An array of bindings. - * + *

An array of bindings.

* @return bindings - */ - @JsonProperty(JSON_PROPERTY_BINDINGS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getBindings() { - return bindings; - } - + **/ + @JsonProperty(JSON_PROPERTY_BINDINGS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getBindings() { + return bindings; + } public void setBindings(List bindings) { this.bindings = bindings; } - /** Return true if this RestrictionPolicyAttributes object is equal to o. */ + /** + * Return true if this RestrictionPolicyAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -75,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.bindings, restrictionPolicyAttributes.bindings); } + @Override public int hashCode() { return Objects.hash(bindings); @@ -90,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyBinding.java b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyBinding.java index 01f2811cc28..c1465baa4ff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyBinding.java +++ b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyBinding.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Specifies which principals are associated with a relation. */ +/** + *

Specifies which principals are associated with a relation.

+ */ @JsonPropertyOrder({ RestrictionPolicyBinding.JSON_PROPERTY_PRINCIPALS, RestrictionPolicyBinding.JSON_PROPERTY_RELATION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RestrictionPolicyBinding { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PRINCIPALS = "principals"; private List principals = new ArrayList<>(); @@ -34,60 +51,57 @@ public RestrictionPolicyBinding() {} @JsonCreator public RestrictionPolicyBinding( - @JsonProperty(required = true, value = JSON_PROPERTY_PRINCIPALS) List principals, - @JsonProperty(required = true, value = JSON_PROPERTY_RELATION) String relation) { - this.principals = principals; - this.relation = relation; + @JsonProperty(required=true, value=JSON_PROPERTY_PRINCIPALS)List principals, + @JsonProperty(required=true, value=JSON_PROPERTY_RELATION)String relation) { + this.principals = principals; + this.relation = relation; } - public RestrictionPolicyBinding principals(List principals) { this.principals = principals; return this; } - public RestrictionPolicyBinding addPrincipalsItem(String principalsItem) { this.principals.add(principalsItem); return this; } /** - * An array of principals. A principal is a subject or group of subjects. Each principal is - * formatted as type:id. Supported types: role and org. The - * org ID can be obtained through the api/v2/current_user API. - * + *

An array of principals. A principal is a subject or group of subjects. + * Each principal is formatted as type:id. Supported types: role and org. + * The org ID can be obtained through the api/v2/current_user API.

* @return principals - */ - @JsonProperty(JSON_PROPERTY_PRINCIPALS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getPrincipals() { - return principals; - } - + **/ + @JsonProperty(JSON_PROPERTY_PRINCIPALS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getPrincipals() { + return principals; + } public void setPrincipals(List principals) { this.principals = principals; } - public RestrictionPolicyBinding relation(String relation) { this.relation = relation; return this; } /** - * The role/level of access. - * + *

The role/level of access.

* @return relation - */ - @JsonProperty(JSON_PROPERTY_RELATION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRelation() { - return relation; - } - + **/ + @JsonProperty(JSON_PROPERTY_RELATION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getRelation() { + return relation; + } public void setRelation(String relation) { this.relation = relation; } - /** Return true if this RestrictionPolicyBinding object is equal to o. */ + /** + * Return true if this RestrictionPolicyBinding object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +111,13 @@ public boolean equals(Object o) { return false; } RestrictionPolicyBinding restrictionPolicyBinding = (RestrictionPolicyBinding) o; - return Objects.equals(this.principals, restrictionPolicyBinding.principals) - && Objects.equals(this.relation, restrictionPolicyBinding.relation); + return Objects.equals(this.principals, restrictionPolicyBinding.principals) && Objects.equals(this.relation, restrictionPolicyBinding.relation); } + @Override public int hashCode() { - return Objects.hash(principals, relation); + return Objects.hash(principals,relation); } @Override @@ -117,7 +131,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyResponse.java b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyResponse.java index 26fc4aa7eb8..85470e129c3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyResponse.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response containing information about a single restriction policy. */ -@JsonPropertyOrder({RestrictionPolicyResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Response containing information about a single restriction policy.

+ */ +@JsonPropertyOrder({ + RestrictionPolicyResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RestrictionPolicyResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RestrictionPolicy data; @@ -26,11 +47,10 @@ public RestrictionPolicyResponse() {} @JsonCreator public RestrictionPolicyResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RestrictionPolicy data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RestrictionPolicy data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RestrictionPolicyResponse data(RestrictionPolicy data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RestrictionPolicyResponse data(RestrictionPolicy data) { } /** - * Restriction policy object. - * + *

Restriction policy object.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RestrictionPolicy getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RestrictionPolicy getData() { + return data; + } public void setData(RestrictionPolicy data) { this.data = data; } - /** Return true if this RestrictionPolicyResponse object is equal to o. */ + /** + * Return true if this RestrictionPolicyResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, restrictionPolicyResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyType.java b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyType.java index f2406fb3458..e36f1e0d92f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Restriction policy type. */ +/** + *

Restriction policy type.

+ */ @JsonSerialize(using = RestrictionPolicyType.RestrictionPolicyTypeSerializer.class) public class RestrictionPolicyType { - public static final RestrictionPolicyType RESTRICTION_POLICY = - new RestrictionPolicyType("restriction_policy"); + public static final RestrictionPolicyType RESTRICTION_POLICY = new RestrictionPolicyType("restriction_policy"); - private static final Set allowedValues = - new HashSet(Arrays.asList("restriction_policy")); + private static final Set allowedValues = new HashSet(Arrays.asList("restriction_policy")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class RestrictionPolicyTypeSerializer extends StdSerializer { - public RestrictionPolicyTypeSerializer(Class t) { - super(t); - } - - public RestrictionPolicyTypeSerializer() { - this(null); - } - - @Override - public void serialize( - RestrictionPolicyType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RestrictionPolicyTypeSerializer(Class t) { + super(t); + } + + public RestrictionPolicyTypeSerializer() { + this(null); + } + + @Override + public void serialize(RestrictionPolicyType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RestrictionPolicyType object is equal to o. */ + /** + * Return true if this RestrictionPolicyType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyUpdateRequest.java index 1dc2c57a1c6..87950793231 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RestrictionPolicyUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update request for a restriction policy. */ -@JsonPropertyOrder({RestrictionPolicyUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update request for a restriction policy.

+ */ +@JsonPropertyOrder({ + RestrictionPolicyUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RestrictionPolicyUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RestrictionPolicy data; @@ -26,11 +47,10 @@ public RestrictionPolicyUpdateRequest() {} @JsonCreator public RestrictionPolicyUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RestrictionPolicy data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RestrictionPolicy data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RestrictionPolicyUpdateRequest data(RestrictionPolicy data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RestrictionPolicyUpdateRequest data(RestrictionPolicy data) { } /** - * Restriction policy object. - * + *

Restriction policy object.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RestrictionPolicy getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RestrictionPolicy getData() { + return data; + } public void setData(RestrictionPolicy data) { this.data = data; } - /** Return true if this RestrictionPolicyUpdateRequest object is equal to o. */ + /** + * Return true if this RestrictionPolicyUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -61,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RestrictionPolicyUpdateRequest restrictionPolicyUpdateRequest = - (RestrictionPolicyUpdateRequest) o; + RestrictionPolicyUpdateRequest restrictionPolicyUpdateRequest = (RestrictionPolicyUpdateRequest) o; return Objects.equals(this.data, restrictionPolicyUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -81,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Role.java b/src/main/java/com/datadog/api/client/v2/model/Role.java index fda0115f533..70239a0e844 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Role.java +++ b/src/main/java/com/datadog/api/client/v2/model/Role.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Role object returned by the API. */ +/** + *

Role object returned by the API.

+ */ @JsonPropertyOrder({ Role.JSON_PROPERTY_ATTRIBUTES, Role.JSON_PROPERTY_ID, Role.JSON_PROPERTY_RELATIONSHIPS, Role.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Role { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RoleAttributes attributes; @@ -39,11 +58,11 @@ public class Role { public Role() {} @JsonCreator - public Role(@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RolesType type) { - this.type = type; - this.unparsed |= !type.isValid(); + public Role( + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RolesType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public Role attributes(RoleAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -51,42 +70,38 @@ public Role attributes(RoleAttributes attributes) { } /** - * Attributes of the role. - * + *

Attributes of the role.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleAttributes getAttributes() { + return attributes; + } public void setAttributes(RoleAttributes attributes) { this.attributes = attributes; } - public Role id(String id) { this.id = id; return this; } /** - * The unique identifier of the role. - * + *

The unique identifier of the role.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public Role relationships(RoleResponseRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -94,21 +109,19 @@ public Role relationships(RoleResponseRelationships relationships) { } /** - * Relationships of the role object returned by the API. - * + *

Relationships of the role object returned by the API.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleResponseRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleResponseRelationships getRelationships() { + return relationships; + } public void setRelationships(RoleResponseRelationships relationships) { this.relationships = relationships; } - public Role type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -116,24 +129,25 @@ public Role type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RolesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this Role object is equal to o. */ + /** + * Return true if this Role object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -143,15 +157,13 @@ public boolean equals(Object o) { return false; } Role role = (Role) o; - return Objects.equals(this.attributes, role.attributes) - && Objects.equals(this.id, role.id) - && Objects.equals(this.relationships, role.relationships) - && Objects.equals(this.type, role.type); + return Objects.equals(this.attributes, role.attributes) && Objects.equals(this.id, role.id) && Objects.equals(this.relationships, role.relationships) && Objects.equals(this.type, role.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -167,7 +179,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java index 246aae1af1d..d217a1fc655 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java @@ -6,33 +6,48 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of the role. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of the role.

+ */ @JsonPropertyOrder({ RoleAttributes.JSON_PROPERTY_CREATED_AT, RoleAttributes.JSON_PROPERTY_MODIFIED_AT, RoleAttributes.JSON_PROPERTY_NAME, RoleAttributes.JSON_PROPERTY_USER_COUNT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -42,64 +57,65 @@ public class RoleAttributes { public static final String JSON_PROPERTY_USER_COUNT = "user_count"; private Long userCount; + /** - * Creation time of the role. - * + *

Creation time of the role.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } /** - * Time of last role modification. - * + *

Time of last role modification.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public RoleAttributes name(String name) { this.name = name; return this; } /** - * The name of the role. The name is neither unique nor a stable identifier of the role. - * + *

The name of the role. The name is neither unique nor a stable identifier of the role.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } /** - * Number of users with that role. - * + *

Number of users with that role.

* @return userCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getUserCount() { - return userCount; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_COUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getUserCount() { + return userCount; + } - /** Return true if this RoleAttributes object is equal to o. */ + /** + * Return true if this RoleAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,15 +125,13 @@ public boolean equals(Object o) { return false; } RoleAttributes roleAttributes = (RoleAttributes) o; - return Objects.equals(this.createdAt, roleAttributes.createdAt) - && Objects.equals(this.modifiedAt, roleAttributes.modifiedAt) - && Objects.equals(this.name, roleAttributes.name) - && Objects.equals(this.userCount, roleAttributes.userCount); + return Objects.equals(this.createdAt, roleAttributes.createdAt) && Objects.equals(this.modifiedAt, roleAttributes.modifiedAt) && Objects.equals(this.name, roleAttributes.name) && Objects.equals(this.userCount, roleAttributes.userCount); } + @Override public int hashCode() { - return Objects.hash(createdAt, modifiedAt, name, userCount); + return Objects.hash(createdAt,modifiedAt,name,userCount); } @Override @@ -133,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleClone.java b/src/main/java/com/datadog/api/client/v2/model/RoleClone.java index 6ee76c72d53..51f791e2af1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleClone.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleClone.java @@ -6,19 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data for the clone role request. */ -@JsonPropertyOrder({RoleClone.JSON_PROPERTY_ATTRIBUTES, RoleClone.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Data for the clone role request.

+ */ +@JsonPropertyOrder({ + RoleClone.JSON_PROPERTY_ATTRIBUTES, + RoleClone.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleClone { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RoleCloneAttributes attributes; @@ -29,15 +51,13 @@ public RoleClone() {} @JsonCreator public RoleClone( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RoleCloneAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RolesType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RoleCloneAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RolesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public RoleClone attributes(RoleCloneAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -45,20 +65,18 @@ public RoleClone attributes(RoleCloneAttributes attributes) { } /** - * Attributes required to create a new role by cloning an existing one. - * + *

Attributes required to create a new role by cloning an existing one.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RoleCloneAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RoleCloneAttributes getAttributes() { + return attributes; + } public void setAttributes(RoleCloneAttributes attributes) { this.attributes = attributes; } - public RoleClone type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -66,24 +84,25 @@ public RoleClone type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RolesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RoleClone object is equal to o. */ + /** + * Return true if this RoleClone object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,13 +112,13 @@ public boolean equals(Object o) { return false; } RoleClone roleClone = (RoleClone) o; - return Objects.equals(this.attributes, roleClone.attributes) - && Objects.equals(this.type, roleClone.type); + return Objects.equals(this.attributes, roleClone.attributes) && Objects.equals(this.type, roleClone.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -113,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java index 25fac3cfd45..58eb3e7d869 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes required to create a new role by cloning an existing one. */ -@JsonPropertyOrder({RoleCloneAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Attributes required to create a new role by cloning an existing one.

+ */ +@JsonPropertyOrder({ + RoleCloneAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCloneAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -26,31 +47,31 @@ public RoleCloneAttributes() {} @JsonCreator public RoleCloneAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } - public RoleCloneAttributes name(String name) { this.name = name; return this; } /** - * Name of the new role that is cloned. - * + *

Name of the new role that is cloned.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this RoleCloneAttributes object is equal to o. */ + /** + * Return true if this RoleCloneAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,6 +84,7 @@ public boolean equals(Object o) { return Objects.equals(this.name, roleCloneAttributes.name); } + @Override public int hashCode() { return Objects.hash(name); @@ -78,7 +100,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCloneRequest.java b/src/main/java/com/datadog/api/client/v2/model/RoleCloneRequest.java index bf0747cd9bd..ef9498c60d1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCloneRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCloneRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request to create a role by cloning an existing role. */ -@JsonPropertyOrder({RoleCloneRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request to create a role by cloning an existing role.

+ */ +@JsonPropertyOrder({ + RoleCloneRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCloneRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RoleClone data; @@ -26,11 +47,10 @@ public RoleCloneRequest() {} @JsonCreator public RoleCloneRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RoleClone data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RoleClone data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RoleCloneRequest data(RoleClone data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RoleCloneRequest data(RoleClone data) { } /** - * Data for the clone role request. - * + *

Data for the clone role request.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RoleClone getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RoleClone getData() { + return data; + } public void setData(RoleClone data) { this.data = data; } - /** Return true if this RoleCloneRequest object is equal to o. */ + /** + * Return true if this RoleCloneRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, roleCloneRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java index 6a4ca266f85..cd5364482ba 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java @@ -6,33 +6,47 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of the created role. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of the created role.

+ */ @JsonPropertyOrder({ RoleCreateAttributes.JSON_PROPERTY_CREATED_AT, RoleCreateAttributes.JSON_PROPERTY_MODIFIED_AT, RoleCreateAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -43,55 +57,55 @@ public RoleCreateAttributes() {} @JsonCreator public RoleCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name) { + this.name = name; } /** - * Creation time of the role. - * + *

Creation time of the role.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } /** - * Time of last role modification. - * + *

Time of last role modification.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public RoleCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the role. - * + *

Name of the role.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this RoleCreateAttributes object is equal to o. */ + /** + * Return true if this RoleCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -101,14 +115,13 @@ public boolean equals(Object o) { return false; } RoleCreateAttributes roleCreateAttributes = (RoleCreateAttributes) o; - return Objects.equals(this.createdAt, roleCreateAttributes.createdAt) - && Objects.equals(this.modifiedAt, roleCreateAttributes.modifiedAt) - && Objects.equals(this.name, roleCreateAttributes.name); + return Objects.equals(this.createdAt, roleCreateAttributes.createdAt) && Objects.equals(this.modifiedAt, roleCreateAttributes.modifiedAt) && Objects.equals(this.name, roleCreateAttributes.name); } + @Override public int hashCode() { - return Objects.hash(createdAt, modifiedAt, name); + return Objects.hash(createdAt,modifiedAt,name); } @Override @@ -123,7 +136,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCreateData.java b/src/main/java/com/datadog/api/client/v2/model/RoleCreateData.java index 665050a1adf..75a00fca578 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data related to the creation of a role. */ + +/** + *

Data related to the creation of a role.

+ */ @JsonPropertyOrder({ RoleCreateData.JSON_PROPERTY_ATTRIBUTES, RoleCreateData.JSON_PROPERTY_RELATIONSHIPS, RoleCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RoleCreateAttributes attributes; @@ -36,12 +55,10 @@ public RoleCreateData() {} @JsonCreator public RoleCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RoleCreateAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RoleCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; } - public RoleCreateData attributes(RoleCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -49,20 +66,18 @@ public RoleCreateData attributes(RoleCreateAttributes attributes) { } /** - * Attributes of the created role. - * + *

Attributes of the created role.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RoleCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RoleCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(RoleCreateAttributes attributes) { this.attributes = attributes; } - public RoleCreateData relationships(RoleRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -70,21 +85,19 @@ public RoleCreateData relationships(RoleRelationships relationships) { } /** - * Relationships of the role object. - * + *

Relationships of the role object.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleRelationships getRelationships() { + return relationships; + } public void setRelationships(RoleRelationships relationships) { this.relationships = relationships; } - public RoleCreateData type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,25 +105,26 @@ public RoleCreateData type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RolesType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RoleCreateData object is equal to o. */ + /** + * Return true if this RoleCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } RoleCreateData roleCreateData = (RoleCreateData) o; - return Objects.equals(this.attributes, roleCreateData.attributes) - && Objects.equals(this.relationships, roleCreateData.relationships) - && Objects.equals(this.type, roleCreateData.type); + return Objects.equals(this.attributes, roleCreateData.attributes) && Objects.equals(this.relationships, roleCreateData.relationships) && Objects.equals(this.type, roleCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RoleCreateRequest.java index 4071b8fe4c7..7e9d5334830 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create a role. */ -@JsonPropertyOrder({RoleCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create a role.

+ */ +@JsonPropertyOrder({ + RoleCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RoleCreateData data; @@ -26,11 +47,10 @@ public RoleCreateRequest() {} @JsonCreator public RoleCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RoleCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RoleCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RoleCreateRequest data(RoleCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RoleCreateRequest data(RoleCreateData data) { } /** - * Data related to the creation of a role. - * + *

Data related to the creation of a role.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RoleCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RoleCreateData getData() { + return data; + } public void setData(RoleCreateData data) { this.data = data; } - /** Return true if this RoleCreateRequest object is equal to o. */ + /** + * Return true if this RoleCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, roleCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponse.java index 8ff7c4b6eec..e595b0488d7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response containing information about a created role. */ -@JsonPropertyOrder({RoleCreateResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response containing information about a created role.

+ */ +@JsonPropertyOrder({ + RoleCreateResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCreateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RoleCreateResponseData data; @@ -28,22 +50,23 @@ public RoleCreateResponse data(RoleCreateResponseData data) { } /** - * Role object returned by the API. - * + *

Role object returned by the API.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleCreateResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleCreateResponseData getData() { + return data; + } public void setData(RoleCreateResponseData data) { this.data = data; } - /** Return true if this RoleCreateResponse object is equal to o. */ + /** + * Return true if this RoleCreateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, roleCreateResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponseData.java index 5a81c6d752b..ce14e8e6fc6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCreateResponseData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Role object returned by the API. */ +/** + *

Role object returned by the API.

+ */ @JsonPropertyOrder({ RoleCreateResponseData.JSON_PROPERTY_ATTRIBUTES, RoleCreateResponseData.JSON_PROPERTY_ID, RoleCreateResponseData.JSON_PROPERTY_RELATIONSHIPS, RoleCreateResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCreateResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RoleCreateAttributes attributes; @@ -40,11 +59,10 @@ public RoleCreateResponseData() {} @JsonCreator public RoleCreateResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RolesType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RolesType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public RoleCreateResponseData attributes(RoleCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,42 +70,38 @@ public RoleCreateResponseData attributes(RoleCreateAttributes attributes) { } /** - * Attributes of the created role. - * + *

Attributes of the created role.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleCreateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(RoleCreateAttributes attributes) { this.attributes = attributes; } - public RoleCreateResponseData id(String id) { this.id = id; return this; } /** - * The unique identifier of the role. - * + *

The unique identifier of the role.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RoleCreateResponseData relationships(RoleResponseRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -95,21 +109,19 @@ public RoleCreateResponseData relationships(RoleResponseRelationships relationsh } /** - * Relationships of the role object returned by the API. - * + *

Relationships of the role object returned by the API.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleResponseRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleResponseRelationships getRelationships() { + return relationships; + } public void setRelationships(RoleResponseRelationships relationships) { this.relationships = relationships; } - public RoleCreateResponseData type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -117,24 +129,25 @@ public RoleCreateResponseData type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RolesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RoleCreateResponseData object is equal to o. */ + /** + * Return true if this RoleCreateResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -144,15 +157,13 @@ public boolean equals(Object o) { return false; } RoleCreateResponseData roleCreateResponseData = (RoleCreateResponseData) o; - return Objects.equals(this.attributes, roleCreateResponseData.attributes) - && Objects.equals(this.id, roleCreateResponseData.id) - && Objects.equals(this.relationships, roleCreateResponseData.relationships) - && Objects.equals(this.type, roleCreateResponseData.type); + return Objects.equals(this.attributes, roleCreateResponseData.attributes) && Objects.equals(this.id, roleCreateResponseData.id) && Objects.equals(this.relationships, roleCreateResponseData.relationships) && Objects.equals(this.type, roleCreateResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -168,7 +179,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleRelationships.java b/src/main/java/com/datadog/api/client/v2/model/RoleRelationships.java index 72f54bda8df..14f58651611 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleRelationships.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationships of the role object. */ + +/** + *

Relationships of the role object.

+ */ @JsonPropertyOrder({ RoleRelationships.JSON_PROPERTY_PERMISSIONS, RoleRelationships.JSON_PROPERTY_USERS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; private RelationshipToPermissions permissions; @@ -34,21 +54,19 @@ public RoleRelationships permissions(RelationshipToPermissions permissions) { } /** - * Relationship to multiple permissions objects. - * + *

Relationship to multiple permissions objects.

* @return permissions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PERMISSIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToPermissions getPermissions() { - return permissions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToPermissions getPermissions() { + return permissions; + } public void setPermissions(RelationshipToPermissions permissions) { this.permissions = permissions; } - public RoleRelationships users(RelationshipToUsers users) { this.users = users; this.unparsed |= users.unparsed; @@ -56,22 +74,23 @@ public RoleRelationships users(RelationshipToUsers users) { } /** - * Relationship to users. - * + *

Relationship to users.

* @return users - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUsers getUsers() { - return users; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUsers getUsers() { + return users; + } public void setUsers(RelationshipToUsers users) { this.users = users; } - /** Return true if this RoleRelationships object is equal to o. */ + /** + * Return true if this RoleRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } RoleRelationships roleRelationships = (RoleRelationships) o; - return Objects.equals(this.permissions, roleRelationships.permissions) - && Objects.equals(this.users, roleRelationships.users); + return Objects.equals(this.permissions, roleRelationships.permissions) && Objects.equals(this.users, roleRelationships.users); } + @Override public int hashCode() { - return Objects.hash(permissions, users); + return Objects.hash(permissions,users); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleResponse.java b/src/main/java/com/datadog/api/client/v2/model/RoleResponse.java index 42840bb0f07..38a03ff972f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response containing information about a single role. */ -@JsonPropertyOrder({RoleResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response containing information about a single role.

+ */ +@JsonPropertyOrder({ + RoleResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private Role data; @@ -28,22 +50,23 @@ public RoleResponse data(Role data) { } /** - * Role object returned by the API. - * + *

Role object returned by the API.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Role getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Role getData() { + return data; + } public void setData(Role data) { this.data = data; } - /** Return true if this RoleResponse object is equal to o. */ + /** + * Return true if this RoleResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, roleResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleResponseRelationships.java b/src/main/java/com/datadog/api/client/v2/model/RoleResponseRelationships.java index ad6f09bf996..71c5e7acc6d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleResponseRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleResponseRelationships.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationships of the role object returned by the API. */ -@JsonPropertyOrder({RoleResponseRelationships.JSON_PROPERTY_PERMISSIONS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationships of the role object returned by the API.

+ */ +@JsonPropertyOrder({ + RoleResponseRelationships.JSON_PROPERTY_PERMISSIONS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleResponseRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; private RelationshipToPermissions permissions; @@ -28,22 +50,23 @@ public RoleResponseRelationships permissions(RelationshipToPermissions permissio } /** - * Relationship to multiple permissions objects. - * + *

Relationship to multiple permissions objects.

* @return permissions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PERMISSIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToPermissions getPermissions() { - return permissions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToPermissions getPermissions() { + return permissions; + } public void setPermissions(RelationshipToPermissions permissions) { this.permissions = permissions; } - /** Return true if this RoleResponseRelationships object is equal to o. */ + /** + * Return true if this RoleResponseRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.permissions, roleResponseRelationships.permissions); } + @Override public int hashCode() { return Objects.hash(permissions); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java index 76389e39202..a5e9d071406 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java @@ -6,84 +6,100 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of the role. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of the role.

+ */ @JsonPropertyOrder({ RoleUpdateAttributes.JSON_PROPERTY_CREATED_AT, RoleUpdateAttributes.JSON_PROPERTY_MODIFIED_AT, RoleUpdateAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** - * Creation time of the role. - * + *

Creation time of the role.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } /** - * Time of last role modification. - * + *

Time of last role modification.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public RoleUpdateAttributes name(String name) { this.name = name; return this; } /** - * Name of the role. - * + *

Name of the role.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this RoleUpdateAttributes object is equal to o. */ + /** + * Return true if this RoleUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,14 +109,13 @@ public boolean equals(Object o) { return false; } RoleUpdateAttributes roleUpdateAttributes = (RoleUpdateAttributes) o; - return Objects.equals(this.createdAt, roleUpdateAttributes.createdAt) - && Objects.equals(this.modifiedAt, roleUpdateAttributes.modifiedAt) - && Objects.equals(this.name, roleUpdateAttributes.name); + return Objects.equals(this.createdAt, roleUpdateAttributes.createdAt) && Objects.equals(this.modifiedAt, roleUpdateAttributes.modifiedAt) && Objects.equals(this.name, roleUpdateAttributes.name); } + @Override public int hashCode() { - return Objects.hash(createdAt, modifiedAt, name); + return Objects.hash(createdAt,modifiedAt,name); } @Override @@ -115,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateData.java index 2875f04dbef..77ccf63d0ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Data related to the update of a role. */ +/** + *

Data related to the update of a role.

+ */ @JsonPropertyOrder({ RoleUpdateData.JSON_PROPERTY_ATTRIBUTES, RoleUpdateData.JSON_PROPERTY_ID, RoleUpdateData.JSON_PROPERTY_RELATIONSHIPS, RoleUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RoleUpdateAttributes attributes; @@ -40,17 +59,15 @@ public RoleUpdateData() {} @JsonCreator public RoleUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - RoleUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RolesType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)RoleUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RolesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public RoleUpdateData attributes(RoleUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -58,40 +75,36 @@ public RoleUpdateData attributes(RoleUpdateAttributes attributes) { } /** - * Attributes of the role. - * + *

Attributes of the role.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RoleUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RoleUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(RoleUpdateAttributes attributes) { this.attributes = attributes; } - public RoleUpdateData id(String id) { this.id = id; return this; } /** - * The unique identifier of the role. - * + *

The unique identifier of the role.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RoleUpdateData relationships(RoleRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -99,21 +112,19 @@ public RoleUpdateData relationships(RoleRelationships relationships) { } /** - * Relationships of the role object. - * + *

Relationships of the role object.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleRelationships getRelationships() { + return relationships; + } public void setRelationships(RoleRelationships relationships) { this.relationships = relationships; } - public RoleUpdateData type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -121,24 +132,25 @@ public RoleUpdateData type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RolesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RoleUpdateData object is equal to o. */ + /** + * Return true if this RoleUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -148,15 +160,13 @@ public boolean equals(Object o) { return false; } RoleUpdateData roleUpdateData = (RoleUpdateData) o; - return Objects.equals(this.attributes, roleUpdateData.attributes) - && Objects.equals(this.id, roleUpdateData.id) - && Objects.equals(this.relationships, roleUpdateData.relationships) - && Objects.equals(this.type, roleUpdateData.type); + return Objects.equals(this.attributes, roleUpdateData.attributes) && Objects.equals(this.id, roleUpdateData.id) && Objects.equals(this.relationships, roleUpdateData.relationships) && Objects.equals(this.type, roleUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -172,7 +182,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateRequest.java index d246bbadd33..086d6d19cea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update a role. */ -@JsonPropertyOrder({RoleUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update a role.

+ */ +@JsonPropertyOrder({ + RoleUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RoleUpdateData data; @@ -26,11 +47,10 @@ public RoleUpdateRequest() {} @JsonCreator public RoleUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RoleUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)RoleUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public RoleUpdateRequest data(RoleUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public RoleUpdateRequest data(RoleUpdateData data) { } /** - * Data related to the update of a role. - * + *

Data related to the update of a role.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RoleUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RoleUpdateData getData() { + return data; + } public void setData(RoleUpdateData data) { this.data = data; } - /** Return true if this RoleUpdateRequest object is equal to o. */ + /** + * Return true if this RoleUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, roleUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponse.java b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponse.java index 77288b86079..3ef8a23fef7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response containing information about an updated role. */ -@JsonPropertyOrder({RoleUpdateResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response containing information about an updated role.

+ */ +@JsonPropertyOrder({ + RoleUpdateResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleUpdateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private RoleUpdateResponseData data; @@ -28,22 +50,23 @@ public RoleUpdateResponse data(RoleUpdateResponseData data) { } /** - * Role object returned by the API. - * + *

Role object returned by the API.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleUpdateResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleUpdateResponseData getData() { + return data; + } public void setData(RoleUpdateResponseData data) { this.data = data; } - /** Return true if this RoleUpdateResponse object is equal to o. */ + /** + * Return true if this RoleUpdateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, roleUpdateResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponseData.java index 29ca8eb68b1..f00e75ce65f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateResponseData.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Role object returned by the API. */ +/** + *

Role object returned by the API.

+ */ @JsonPropertyOrder({ RoleUpdateResponseData.JSON_PROPERTY_ATTRIBUTES, RoleUpdateResponseData.JSON_PROPERTY_ID, RoleUpdateResponseData.JSON_PROPERTY_RELATIONSHIPS, RoleUpdateResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleUpdateResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private RoleUpdateAttributes attributes; @@ -40,11 +59,10 @@ public RoleUpdateResponseData() {} @JsonCreator public RoleUpdateResponseData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RolesType type) { - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)RolesType type) { + this.type = type; + this.unparsed |= !type.isValid(); } - public RoleUpdateResponseData attributes(RoleUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,42 +70,38 @@ public RoleUpdateResponseData attributes(RoleUpdateAttributes attributes) { } /** - * Attributes of the role. - * + *

Attributes of the role.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(RoleUpdateAttributes attributes) { this.attributes = attributes; } - public RoleUpdateResponseData id(String id) { this.id = id; return this; } /** - * The unique identifier of the role. - * + *

The unique identifier of the role.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public RoleUpdateResponseData relationships(RoleResponseRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -95,21 +109,19 @@ public RoleUpdateResponseData relationships(RoleResponseRelationships relationsh } /** - * Relationships of the role object returned by the API. - * + *

Relationships of the role object returned by the API.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleResponseRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RoleResponseRelationships getRelationships() { + return relationships; + } public void setRelationships(RoleResponseRelationships relationships) { this.relationships = relationships; } - public RoleUpdateResponseData type(RolesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -117,24 +129,25 @@ public RoleUpdateResponseData type(RolesType type) { } /** - * Roles type. - * + *

Roles type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RolesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RolesType getType() { + return type; + } public void setType(RolesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this RoleUpdateResponseData object is equal to o. */ + /** + * Return true if this RoleUpdateResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -144,15 +157,13 @@ public boolean equals(Object o) { return false; } RoleUpdateResponseData roleUpdateResponseData = (RoleUpdateResponseData) o; - return Objects.equals(this.attributes, roleUpdateResponseData.attributes) - && Objects.equals(this.id, roleUpdateResponseData.id) - && Objects.equals(this.relationships, roleUpdateResponseData.relationships) - && Objects.equals(this.type, roleUpdateResponseData.type); + return Objects.equals(this.attributes, roleUpdateResponseData.attributes) && Objects.equals(this.id, roleUpdateResponseData.id) && Objects.equals(this.relationships, roleUpdateResponseData.relationships) && Objects.equals(this.type, roleUpdateResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -168,7 +179,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RolesResponse.java b/src/main/java/com/datadog/api/client/v2/model/RolesResponse.java index b921dabb7c7..f4006718b4c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RolesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RolesResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing information about multiple roles. */ -@JsonPropertyOrder({RolesResponse.JSON_PROPERTY_DATA, RolesResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing information about multiple roles.

+ */ +@JsonPropertyOrder({ + RolesResponse.JSON_PROPERTY_DATA, + RolesResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RolesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -33,7 +54,6 @@ public RolesResponse data(List data) { } return this; } - public RolesResponse addDataItem(Role dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -44,21 +64,19 @@ public RolesResponse addDataItem(Role dataItem) { } /** - * Array of returned roles. - * + *

Array of returned roles.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public RolesResponse meta(ResponseMetaAttributes meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -66,22 +84,23 @@ public RolesResponse meta(ResponseMetaAttributes meta) { } /** - * Object describing meta attributes of response. - * + *

Object describing meta attributes of response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ResponseMetaAttributes getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ResponseMetaAttributes getMeta() { + return meta; + } public void setMeta(ResponseMetaAttributes meta) { this.meta = meta; } - /** Return true if this RolesResponse object is equal to o. */ + /** + * Return true if this RolesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +110,13 @@ public boolean equals(Object o) { return false; } RolesResponse rolesResponse = (RolesResponse) o; - return Objects.equals(this.data, rolesResponse.data) - && Objects.equals(this.meta, rolesResponse.meta); + return Objects.equals(this.data, rolesResponse.data) && Objects.equals(this.meta, rolesResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -111,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RolesSort.java b/src/main/java/com/datadog/api/client/v2/model/RolesSort.java index c538d856473..bdb20521f0a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RolesSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/RolesSort.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sorting options for roles. */ +/** + *

Sorting options for roles.

+ */ @JsonSerialize(using = RolesSort.RolesSortSerializer.class) public class RolesSort { @@ -30,10 +54,7 @@ public class RolesSort { public static final RolesSort USER_COUNT_ASCENDING = new RolesSort("user_count"); public static final RolesSort USER_COUNT_DESCENDING = new RolesSort("-user_count"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "name", "-name", "modified_at", "-modified_at", "user_count", "-user_count")); + private static final Set allowedValues = new HashSet(Arrays.asList("name", "-name", "modified_at", "-modified_at", "user_count", "-user_count")); private String value; @@ -46,19 +67,18 @@ public boolean isValid() { } public static class RolesSortSerializer extends StdSerializer { - public RolesSortSerializer(Class t) { - super(t); - } - - public RolesSortSerializer() { - this(null); - } - - @Override - public void serialize(RolesSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RolesSortSerializer(Class t) { + super(t); + } + + public RolesSortSerializer() { + this(null); + } + + @Override + public void serialize(RolesSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RolesSort object is equal to o. */ + /** + * Return true if this RolesSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/RolesType.java b/src/main/java/com/datadog/api/client/v2/model/RolesType.java index 451e909df86..765ef54a02a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RolesType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RolesType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Roles type. */ +/** + *

Roles type.

+ */ @JsonSerialize(using = RolesType.RolesTypeSerializer.class) public class RolesType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class RolesTypeSerializer extends StdSerializer { - public RolesTypeSerializer(Class t) { - super(t); - } - - public RolesTypeSerializer() { - this(null); - } - - @Override - public void serialize(RolesType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public RolesTypeSerializer(Class t) { + super(t); + } + + public RolesTypeSerializer() { + this(null); + } + + @Override + public void serialize(RolesType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this RolesType object is equal to o. */ + /** + * Return true if this RolesType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttribute.java b/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttribute.java index c9d0027e3d1..392407f42f7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttribute.java +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttribute.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** SAML assertion attribute. */ + +/** + *

SAML assertion attribute.

+ */ @JsonPropertyOrder({ SAMLAssertionAttribute.JSON_PROPERTY_ATTRIBUTES, SAMLAssertionAttribute.JSON_PROPERTY_ID, SAMLAssertionAttribute.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SAMLAssertionAttribute { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SAMLAssertionAttributeAttributes attributes; @@ -36,13 +55,12 @@ public SAMLAssertionAttribute() {} @JsonCreator public SAMLAssertionAttribute( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SAMLAssertionAttributesType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SAMLAssertionAttributesType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public SAMLAssertionAttribute attributes(SAMLAssertionAttributeAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -50,41 +68,37 @@ public SAMLAssertionAttribute attributes(SAMLAssertionAttributeAttributes attrib } /** - * Key/Value pair of attributes used in SAML assertion attributes. - * + *

Key/Value pair of attributes used in SAML assertion attributes.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SAMLAssertionAttributeAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SAMLAssertionAttributeAttributes getAttributes() { + return attributes; + } public void setAttributes(SAMLAssertionAttributeAttributes attributes) { this.attributes = attributes; } - public SAMLAssertionAttribute id(String id) { this.id = id; return this; } /** - * The ID of the SAML assertion attribute. - * + *

The ID of the SAML assertion attribute.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SAMLAssertionAttribute type(SAMLAssertionAttributesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +106,25 @@ public SAMLAssertionAttribute type(SAMLAssertionAttributesType type) { } /** - * SAML assertion attributes resource type. - * + *

SAML assertion attributes resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SAMLAssertionAttributesType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SAMLAssertionAttributesType getType() { + return type; + } public void setType(SAMLAssertionAttributesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SAMLAssertionAttribute object is equal to o. */ + /** + * Return true if this SAMLAssertionAttribute object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } SAMLAssertionAttribute samlAssertionAttribute = (SAMLAssertionAttribute) o; - return Objects.equals(this.attributes, samlAssertionAttribute.attributes) - && Objects.equals(this.id, samlAssertionAttribute.id) - && Objects.equals(this.type, samlAssertionAttribute.type); + return Objects.equals(this.attributes, samlAssertionAttribute.attributes) && Objects.equals(this.id, samlAssertionAttribute.id) && Objects.equals(this.type, samlAssertionAttribute.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributeAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributeAttributes.java index cbc9005e017..d36dbbab4cd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributeAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributeAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Key/Value pair of attributes used in SAML assertion attributes. */ + +/** + *

Key/Value pair of attributes used in SAML assertion attributes.

+ */ @JsonPropertyOrder({ SAMLAssertionAttributeAttributes.JSON_PROPERTY_ATTRIBUTE_KEY, SAMLAssertionAttributeAttributes.JSON_PROPERTY_ATTRIBUTE_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SAMLAssertionAttributeAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTE_KEY = "attribute_key"; private String attributeKey; @@ -33,43 +53,42 @@ public SAMLAssertionAttributeAttributes attributeKey(String attributeKey) { } /** - * Key portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Key portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeKey - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeKey() { - return attributeKey; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_KEY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeKey() { + return attributeKey; + } public void setAttributeKey(String attributeKey) { this.attributeKey = attributeKey; } - public SAMLAssertionAttributeAttributes attributeValue(String attributeValue) { this.attributeValue = attributeValue; return this; } /** - * Value portion of a key/value pair of the attribute sent from the Identity Provider. - * + *

Value portion of a key/value pair of the attribute sent from the Identity Provider.

* @return attributeValue - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAttributeValue() { - return attributeValue; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE_VALUE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAttributeValue() { + return attributeValue; + } public void setAttributeValue(String attributeValue) { this.attributeValue = attributeValue; } - /** Return true if this SAMLAssertionAttributeAttributes object is equal to o. */ + /** + * Return true if this SAMLAssertionAttributeAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SAMLAssertionAttributeAttributes samlAssertionAttributeAttributes = - (SAMLAssertionAttributeAttributes) o; - return Objects.equals(this.attributeKey, samlAssertionAttributeAttributes.attributeKey) - && Objects.equals(this.attributeValue, samlAssertionAttributeAttributes.attributeValue); + SAMLAssertionAttributeAttributes samlAssertionAttributeAttributes = (SAMLAssertionAttributeAttributes) o; + return Objects.equals(this.attributeKey, samlAssertionAttributeAttributes.attributeKey) && Objects.equals(this.attributeValue, samlAssertionAttributeAttributes.attributeValue); } + @Override public int hashCode() { - return Objects.hash(attributeKey, attributeValue); + return Objects.hash(attributeKey,attributeValue); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributesType.java b/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributesType.java index cf68daacb9b..c3f849cd2e0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributesType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLAssertionAttributesType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** SAML assertion attributes resource type. */ +/** + *

SAML assertion attributes resource type.

+ */ @JsonSerialize(using = SAMLAssertionAttributesType.SAMLAssertionAttributesTypeSerializer.class) public class SAMLAssertionAttributesType { - public static final SAMLAssertionAttributesType SAML_ASSERTION_ATTRIBUTES = - new SAMLAssertionAttributesType("saml_assertion_attributes"); + public static final SAMLAssertionAttributesType SAML_ASSERTION_ATTRIBUTES = new SAMLAssertionAttributesType("saml_assertion_attributes"); - private static final Set allowedValues = - new HashSet(Arrays.asList("saml_assertion_attributes")); + private static final Set allowedValues = new HashSet(Arrays.asList("saml_assertion_attributes")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SAMLAssertionAttributesTypeSerializer - extends StdSerializer { - public SAMLAssertionAttributesTypeSerializer(Class t) { - super(t); - } + public static class SAMLAssertionAttributesTypeSerializer extends StdSerializer { + public SAMLAssertionAttributesTypeSerializer(Class t) { + super(t); + } - public SAMLAssertionAttributesTypeSerializer() { - this(null); - } + public SAMLAssertionAttributesTypeSerializer() { + this(null); + } - @Override - public void serialize( - SAMLAssertionAttributesType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SAMLAssertionAttributesType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SAMLAssertionAttributesType object is equal to o. */ + /** + * Return true if this SAMLAssertionAttributesType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarColumn.java b/src/main/java/com/datadog/api/client/v2/model/ScalarColumn.java index ddfb668ff64..a0a122c18ef 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarColumn.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarColumn.java @@ -6,269 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = ScalarColumn.ScalarColumnDeserializer.class) @JsonSerialize(using = ScalarColumn.ScalarColumnSerializer.class) public class ScalarColumn extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ScalarColumn.class.getName()); + private static final Logger log = Logger.getLogger(ScalarColumn.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class ScalarColumnSerializer extends StdSerializer { + public ScalarColumnSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public ScalarColumnSerializer() { + this(null); + } - public static class ScalarColumnSerializer extends StdSerializer { - public ScalarColumnSerializer(Class t) { - super(t); + @Override + public void serialize(ScalarColumn value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public ScalarColumnSerializer() { - this(null); + public static class ScalarColumnDeserializer extends StdDeserializer { + public ScalarColumnDeserializer() { + this(ScalarColumn.class); + } + + public ScalarColumnDeserializer(Class vc) { + super(vc); + } + + @Override + public ScalarColumn 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 GroupScalarColumn + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (GroupScalarColumn.class.equals(Integer.class) || GroupScalarColumn.class.equals(Long.class) || GroupScalarColumn.class.equals(Float.class) || GroupScalarColumn.class.equals(Double.class) || GroupScalarColumn.class.equals(Boolean.class) || GroupScalarColumn.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((GroupScalarColumn.class.equals(Integer.class) || GroupScalarColumn.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((GroupScalarColumn.class.equals(Float.class) || GroupScalarColumn.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (GroupScalarColumn.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (GroupScalarColumn.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(GroupScalarColumn.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 (!((GroupScalarColumn)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'GroupScalarColumn'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'GroupScalarColumn'", e); + } + + // deserialize DataScalarColumn + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DataScalarColumn.class.equals(Integer.class) || DataScalarColumn.class.equals(Long.class) || DataScalarColumn.class.equals(Float.class) || DataScalarColumn.class.equals(Double.class) || DataScalarColumn.class.equals(Boolean.class) || DataScalarColumn.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((DataScalarColumn.class.equals(Integer.class) || DataScalarColumn.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((DataScalarColumn.class.equals(Float.class) || DataScalarColumn.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (DataScalarColumn.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (DataScalarColumn.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(DataScalarColumn.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 (!((DataScalarColumn)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'DataScalarColumn'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DataScalarColumn'", e); + } + + ScalarColumn ret = new ScalarColumn(); + 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 ScalarColumn getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "ScalarColumn cannot be null"); + } } - @Override - public void serialize(ScalarColumn value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ScalarColumn() { + super("oneOf", Boolean.FALSE); + } + public ScalarColumn(GroupScalarColumn o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ScalarColumn(DataScalarColumn o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class ScalarColumnDeserializer extends StdDeserializer { - public ScalarColumnDeserializer() { - this(ScalarColumn.class); + static { + schemas.put("GroupScalarColumn", new GenericType() { + }); + schemas.put("DataScalarColumn", new GenericType() { + }); + JSON.registerDescendants(ScalarColumn.class, Collections.unmodifiableMap(schemas)); } - public ScalarColumnDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return ScalarColumn.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * GroupScalarColumn, DataScalarColumn + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public ScalarColumn 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 GroupScalarColumn - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (GroupScalarColumn.class.equals(Integer.class) - || GroupScalarColumn.class.equals(Long.class) - || GroupScalarColumn.class.equals(Float.class) - || GroupScalarColumn.class.equals(Double.class) - || GroupScalarColumn.class.equals(Boolean.class) - || GroupScalarColumn.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((GroupScalarColumn.class.equals(Integer.class) - || GroupScalarColumn.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((GroupScalarColumn.class.equals(Float.class) - || GroupScalarColumn.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (GroupScalarColumn.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (GroupScalarColumn.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(GroupScalarColumn.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(GroupScalarColumn.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 (!((GroupScalarColumn) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'GroupScalarColumn'"); + if (JSON.isInstanceOf(DataScalarColumn.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'GroupScalarColumn'", e); - } - // deserialize DataScalarColumn - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (DataScalarColumn.class.equals(Integer.class) - || DataScalarColumn.class.equals(Long.class) - || DataScalarColumn.class.equals(Float.class) - || DataScalarColumn.class.equals(Double.class) - || DataScalarColumn.class.equals(Boolean.class) - || DataScalarColumn.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((DataScalarColumn.class.equals(Integer.class) - || DataScalarColumn.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((DataScalarColumn.class.equals(Float.class) - || DataScalarColumn.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (DataScalarColumn.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (DataScalarColumn.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(DataScalarColumn.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 (!((DataScalarColumn) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'DataScalarColumn'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'DataScalarColumn'", e); - } - - ScalarColumn ret = new ScalarColumn(); - 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; + throw new RuntimeException("Invalid instance type. Must be GroupScalarColumn, DataScalarColumn"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * GroupScalarColumn, DataScalarColumn + * + * @return The actual instance (GroupScalarColumn, DataScalarColumn) + */ @Override - public ScalarColumn getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ScalarColumn cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public ScalarColumn() { - super("oneOf", Boolean.FALSE); - } - - public ScalarColumn(GroupScalarColumn o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public ScalarColumn(DataScalarColumn o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("GroupScalarColumn", new GenericType() {}); - schemas.put("DataScalarColumn", new GenericType() {}); - JSON.registerDescendants(ScalarColumn.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return ScalarColumn.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: GroupScalarColumn, DataScalarColumn - * - *

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(GroupScalarColumn.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(DataScalarColumn.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `GroupScalarColumn`. If the actual instance is not `GroupScalarColumn`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `GroupScalarColumn` + * @throws ClassCastException if the instance is not `GroupScalarColumn` + */ + public GroupScalarColumn getGroupScalarColumn() throws ClassCastException { + return (GroupScalarColumn)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `DataScalarColumn`. If the actual instance is not `DataScalarColumn`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DataScalarColumn` + * @throws ClassCastException if the instance is not `DataScalarColumn` + */ + public DataScalarColumn getDataScalarColumn() throws ClassCastException { + return (DataScalarColumn)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be GroupScalarColumn, DataScalarColumn"); - } - - /** - * Get the actual instance, which can be the following: GroupScalarColumn, DataScalarColumn - * - * @return The actual instance (GroupScalarColumn, DataScalarColumn) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `GroupScalarColumn`. If the actual instance is not - * `GroupScalarColumn`, the ClassCastException will be thrown. - * - * @return The actual instance of `GroupScalarColumn` - * @throws ClassCastException if the instance is not `GroupScalarColumn` - */ - public GroupScalarColumn getGroupScalarColumn() throws ClassCastException { - return (GroupScalarColumn) super.getActualInstance(); - } - - /** - * Get the actual instance of `DataScalarColumn`. If the actual instance is not - * `DataScalarColumn`, the ClassCastException will be thrown. - * - * @return The actual instance of `DataScalarColumn` - * @throws ClassCastException if the instance is not `DataScalarColumn` - */ - public DataScalarColumn getDataScalarColumn() throws ClassCastException { - return (DataScalarColumn) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryRequest.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryRequest.java index d772a304603..5ef97b5e9d1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A wrapper request around one scalar query to be executed. */ -@JsonPropertyOrder({ScalarFormulaQueryRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A wrapper request around one scalar query to be executed.

+ */ +@JsonPropertyOrder({ + ScalarFormulaQueryRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarFormulaQueryRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ScalarFormulaRequest data; @@ -26,11 +47,10 @@ public ScalarFormulaQueryRequest() {} @JsonCreator public ScalarFormulaQueryRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ScalarFormulaRequest data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ScalarFormulaRequest data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ScalarFormulaQueryRequest data(ScalarFormulaRequest data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public ScalarFormulaQueryRequest data(ScalarFormulaRequest data) { } /** - * A single scalar query to be executed. - * + *

A single scalar query to be executed.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScalarFormulaRequest getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ScalarFormulaRequest getData() { + return data; + } public void setData(ScalarFormulaRequest data) { this.data = data; } - /** Return true if this ScalarFormulaQueryRequest object is equal to o. */ + /** + * Return true if this ScalarFormulaQueryRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, scalarFormulaQueryRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryResponse.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryResponse.java index 47e8f011a68..8d38c85d5cf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaQueryResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A message containing one or more responses to scalar queries. */ + +/** + *

A message containing one or more responses to scalar queries.

+ */ @JsonPropertyOrder({ ScalarFormulaQueryResponse.JSON_PROPERTY_DATA, ScalarFormulaQueryResponse.JSON_PROPERTY_ERRORS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarFormulaQueryResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ScalarResponse data; @@ -34,43 +54,42 @@ public ScalarFormulaQueryResponse data(ScalarResponse data) { } /** - * A message containing the response to a scalar query. - * + *

A message containing the response to a scalar query.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScalarResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScalarResponse getData() { + return data; + } public void setData(ScalarResponse data) { this.data = data; } - public ScalarFormulaQueryResponse errors(String errors) { this.errors = errors; return this; } /** - * An error generated when processing a request. - * + *

An error generated when processing a request.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getErrors() { + return errors; + } public void setErrors(String errors) { this.errors = errors; } - /** Return true if this ScalarFormulaQueryResponse object is equal to o. */ + /** + * Return true if this ScalarFormulaQueryResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +99,13 @@ public boolean equals(Object o) { return false; } ScalarFormulaQueryResponse scalarFormulaQueryResponse = (ScalarFormulaQueryResponse) o; - return Objects.equals(this.data, scalarFormulaQueryResponse.data) - && Objects.equals(this.errors, scalarFormulaQueryResponse.errors); + return Objects.equals(this.data, scalarFormulaQueryResponse.data) && Objects.equals(this.errors, scalarFormulaQueryResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequest.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequest.java index 54dee999a89..6a5d507998b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A single scalar query to be executed. */ + +/** + *

A single scalar query to be executed.

+ */ @JsonPropertyOrder({ ScalarFormulaRequest.JSON_PROPERTY_ATTRIBUTES, ScalarFormulaRequest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarFormulaRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ScalarFormulaRequestAttributes attributes; @@ -32,15 +51,13 @@ public ScalarFormulaRequest() {} @JsonCreator public ScalarFormulaRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ScalarFormulaRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ScalarFormulaRequestType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ScalarFormulaRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ScalarFormulaRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public ScalarFormulaRequest attributes(ScalarFormulaRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public ScalarFormulaRequest attributes(ScalarFormulaRequestAttributes attributes } /** - * The object describing a scalar formula request. - * + *

The object describing a scalar formula request.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScalarFormulaRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ScalarFormulaRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(ScalarFormulaRequestAttributes attributes) { this.attributes = attributes; } - public ScalarFormulaRequest type(ScalarFormulaRequestType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public ScalarFormulaRequest type(ScalarFormulaRequestType type) { } /** - * The type of the resource. The value should always be scalar_request. - * + *

The type of the resource. The value should always be scalar_request.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScalarFormulaRequestType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ScalarFormulaRequestType getType() { + return type; + } public void setType(ScalarFormulaRequestType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ScalarFormulaRequest object is equal to o. */ + /** + * Return true if this ScalarFormulaRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } ScalarFormulaRequest scalarFormulaRequest = (ScalarFormulaRequest) o; - return Objects.equals(this.attributes, scalarFormulaRequest.attributes) - && Objects.equals(this.type, scalarFormulaRequest.type); + return Objects.equals(this.attributes, scalarFormulaRequest.attributes) && Objects.equals(this.type, scalarFormulaRequest.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestAttributes.java index 150e016dfa4..7e62758d117 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestAttributes.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object describing a scalar formula request. */ +/** + *

The object describing a scalar formula request.

+ */ @JsonPropertyOrder({ ScalarFormulaRequestAttributes.JSON_PROPERTY_FORMULAS, ScalarFormulaRequestAttributes.JSON_PROPERTY_FROM, ScalarFormulaRequestAttributes.JSON_PROPERTY_QUERIES, ScalarFormulaRequestAttributes.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarFormulaRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -42,14 +59,13 @@ public ScalarFormulaRequestAttributes() {} @JsonCreator public ScalarFormulaRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERIES) List queries, - @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { - this.from = from; - this.queries = queries; - this.to = to; + @JsonProperty(required=true, value=JSON_PROPERTY_FROM)Long from, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERIES)List queries, + @JsonProperty(required=true, value=JSON_PROPERTY_TO)Long to) { + this.from = from; + this.queries = queries; + this.to = to; } - public ScalarFormulaRequestAttributes formulas(List formulas) { this.formulas = formulas; for (QueryFormula item : formulas) { @@ -57,7 +73,6 @@ public ScalarFormulaRequestAttributes formulas(List formulas) { } return this; } - public ScalarFormulaRequestAttributes addFormulasItem(QueryFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -68,41 +83,37 @@ public ScalarFormulaRequestAttributes addFormulasItem(QueryFormula formulasItem) } /** - * List of formulas to be calculated and returned as responses. - * + *

List of formulas to be calculated and returned as responses.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public ScalarFormulaRequestAttributes from(Long from) { this.from = from; return this; } /** - * Start date (inclusive) of the query in milliseconds since the Unix epoch. - * + *

Start date (inclusive) of the query in milliseconds since the Unix epoch.

* @return from - */ - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getFrom() { - return from; - } - + **/ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getFrom() { + return from; + } public void setFrom(Long from) { this.from = from; } - public ScalarFormulaRequestAttributes queries(List queries) { this.queries = queries; for (ScalarQuery item : queries) { @@ -110,7 +121,6 @@ public ScalarFormulaRequestAttributes queries(List queries) { } return this; } - public ScalarFormulaRequestAttributes addQueriesItem(ScalarQuery queriesItem) { this.queries.add(queriesItem); this.unparsed |= queriesItem.unparsed; @@ -118,41 +128,40 @@ public ScalarFormulaRequestAttributes addQueriesItem(ScalarQuery queriesItem) { } /** - * List of queries to be run and used as inputs to the formulas. - * + *

List of queries to be run and used as inputs to the formulas.

* @return queries - */ - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getQueries() { - return queries; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public ScalarFormulaRequestAttributes to(Long to) { this.to = to; return this; } /** - * End date (exclusive) of the query in milliseconds since the Unix epoch. - * + *

End date (exclusive) of the query in milliseconds since the Unix epoch.

* @return to - */ - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getTo() { - return to; - } - + **/ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getTo() { + return to; + } public void setTo(Long to) { this.to = to; } - /** Return true if this ScalarFormulaRequestAttributes object is equal to o. */ + /** + * Return true if this ScalarFormulaRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -161,17 +170,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ScalarFormulaRequestAttributes scalarFormulaRequestAttributes = - (ScalarFormulaRequestAttributes) o; - return Objects.equals(this.formulas, scalarFormulaRequestAttributes.formulas) - && Objects.equals(this.from, scalarFormulaRequestAttributes.from) - && Objects.equals(this.queries, scalarFormulaRequestAttributes.queries) - && Objects.equals(this.to, scalarFormulaRequestAttributes.to); + ScalarFormulaRequestAttributes scalarFormulaRequestAttributes = (ScalarFormulaRequestAttributes) o; + return Objects.equals(this.formulas, scalarFormulaRequestAttributes.formulas) && Objects.equals(this.from, scalarFormulaRequestAttributes.from) && Objects.equals(this.queries, scalarFormulaRequestAttributes.queries) && Objects.equals(this.to, scalarFormulaRequestAttributes.to); } + @Override public int hashCode() { - return Objects.hash(formulas, from, queries, to); + return Objects.hash(formulas,from,queries,to); } @Override @@ -187,7 +193,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestType.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestType.java index f7b71fb9ddc..0a6179f3649 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaRequestType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be scalar_request. */ +/** + *

The type of the resource. The value should always be scalar_request.

+ */ @JsonSerialize(using = ScalarFormulaRequestType.ScalarFormulaRequestTypeSerializer.class) public class ScalarFormulaRequestType { - public static final ScalarFormulaRequestType SCALAR_REQUEST = - new ScalarFormulaRequestType("scalar_request"); + public static final ScalarFormulaRequestType SCALAR_REQUEST = new ScalarFormulaRequestType("scalar_request"); - private static final Set allowedValues = - new HashSet(Arrays.asList("scalar_request")); + private static final Set allowedValues = new HashSet(Arrays.asList("scalar_request")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ScalarFormulaRequestTypeSerializer - extends StdSerializer { - public ScalarFormulaRequestTypeSerializer(Class t) { - super(t); - } + public static class ScalarFormulaRequestTypeSerializer extends StdSerializer { + public ScalarFormulaRequestTypeSerializer(Class t) { + super(t); + } - public ScalarFormulaRequestTypeSerializer() { - this(null); - } + public ScalarFormulaRequestTypeSerializer() { + this(null); + } - @Override - public void serialize( - ScalarFormulaRequestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ScalarFormulaRequestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ScalarFormulaRequestType object is equal to o. */ + /** + * Return true if this ScalarFormulaRequestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseAtrributes.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseAtrributes.java index 0a918797eb9..aff25482398 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseAtrributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseAtrributes.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object describing a scalar response. */ -@JsonPropertyOrder({ScalarFormulaResponseAtrributes.JSON_PROPERTY_COLUMNS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

The object describing a scalar response.

+ */ +@JsonPropertyOrder({ + ScalarFormulaResponseAtrributes.JSON_PROPERTY_COLUMNS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarFormulaResponseAtrributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COLUMNS = "columns"; private List columns = null; @@ -30,7 +50,6 @@ public ScalarFormulaResponseAtrributes columns(List columns) { } return this; } - public ScalarFormulaResponseAtrributes addColumnsItem(ScalarColumn columnsItem) { if (this.columns == null) { this.columns = new ArrayList<>(); @@ -41,23 +60,23 @@ public ScalarFormulaResponseAtrributes addColumnsItem(ScalarColumn columnsItem) } /** - * List of response columns, each corresponding to an individual formula or query in the request - * and with values in parallel arrays matching the series list. - * + *

List of response columns, each corresponding to an individual formula or query in the request and with values in parallel arrays matching the series list.

* @return columns - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLUMNS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getColumns() { - return columns; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } public void setColumns(List columns) { this.columns = columns; } - /** Return true if this ScalarFormulaResponseAtrributes object is equal to o. */ + /** + * Return true if this ScalarFormulaResponseAtrributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -66,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ScalarFormulaResponseAtrributes scalarFormulaResponseAtrributes = - (ScalarFormulaResponseAtrributes) o; + ScalarFormulaResponseAtrributes scalarFormulaResponseAtrributes = (ScalarFormulaResponseAtrributes) o; return Objects.equals(this.columns, scalarFormulaResponseAtrributes.columns); } + @Override public int hashCode() { return Objects.hash(columns); @@ -86,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseType.java b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseType.java index a31eb77ba71..33df79e7a2e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarFormulaResponseType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be scalar_response. */ +/** + *

The type of the resource. The value should always be scalar_response.

+ */ @JsonSerialize(using = ScalarFormulaResponseType.ScalarFormulaResponseTypeSerializer.class) public class ScalarFormulaResponseType { - public static final ScalarFormulaResponseType SCALAR_RESPONSE = - new ScalarFormulaResponseType("scalar_response"); + public static final ScalarFormulaResponseType SCALAR_RESPONSE = new ScalarFormulaResponseType("scalar_response"); - private static final Set allowedValues = - new HashSet(Arrays.asList("scalar_response")); + private static final Set allowedValues = new HashSet(Arrays.asList("scalar_response")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ScalarFormulaResponseTypeSerializer - extends StdSerializer { - public ScalarFormulaResponseTypeSerializer(Class t) { - super(t); - } + public static class ScalarFormulaResponseTypeSerializer extends StdSerializer { + public ScalarFormulaResponseTypeSerializer(Class t) { + super(t); + } - public ScalarFormulaResponseTypeSerializer() { - this(null); - } + public ScalarFormulaResponseTypeSerializer() { + this(null); + } - @Override - public void serialize( - ScalarFormulaResponseType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ScalarFormulaResponseType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ScalarFormulaResponseType object is equal to o. */ + /** + * Return true if this ScalarFormulaResponseType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarMeta.java b/src/main/java/com/datadog/api/client/v2/model/ScalarMeta.java index a55a82faaa5..377d816d9ed 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarMeta.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Metadata for the resulting numerical values. */ -@JsonPropertyOrder({ScalarMeta.JSON_PROPERTY_UNIT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Metadata for the resulting numerical values.

+ */ +@JsonPropertyOrder({ + ScalarMeta.JSON_PROPERTY_UNIT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_UNIT = "unit"; private List unit = null; @@ -30,7 +50,6 @@ public ScalarMeta unit(List unit) { } return this; } - public ScalarMeta addUnitItem(Unit unitItem) { if (this.unit == null) { this.unit = new ArrayList<>(); @@ -41,25 +60,26 @@ public ScalarMeta addUnitItem(Unit unitItem) { } /** - * Detailed information about the unit. First element describes the "primary unit" (for example, - * bytes in bytes per second). The second element describes the "per - * unit" (for example, second in bytes per second). If the second - * element is not present, the API returns null. - * + *

Detailed information about the unit. + * First element describes the "primary unit" (for example, bytes in bytes per second). + * The second element describes the "per unit" (for example, second in bytes per second). + * If the second element is not present, the API returns null.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUnit() { - return unit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUnit() { + return unit; + } public void setUnit(List unit) { this.unit = unit; } - /** Return true if this ScalarMeta object is equal to o. */ + /** + * Return true if this ScalarMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -72,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.unit, scalarMeta.unit); } + @Override public int hashCode() { return Objects.hash(unit); @@ -87,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarQuery.java b/src/main/java/com/datadog/api/client/v2/model/ScalarQuery.java index 1e151dab2a0..65ad50d46cc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarQuery.java @@ -6,269 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = ScalarQuery.ScalarQueryDeserializer.class) @JsonSerialize(using = ScalarQuery.ScalarQuerySerializer.class) public class ScalarQuery extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ScalarQuery.class.getName()); + private static final Logger log = Logger.getLogger(ScalarQuery.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class ScalarQuerySerializer extends StdSerializer { + public ScalarQuerySerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public ScalarQuerySerializer() { + this(null); + } - public static class ScalarQuerySerializer extends StdSerializer { - public ScalarQuerySerializer(Class t) { - super(t); + @Override + public void serialize(ScalarQuery value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public ScalarQuerySerializer() { - this(null); + public static class ScalarQueryDeserializer extends StdDeserializer { + public ScalarQueryDeserializer() { + this(ScalarQuery.class); + } + + public ScalarQueryDeserializer(Class vc) { + super(vc); + } + + @Override + public ScalarQuery 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 MetricsScalarQuery + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MetricsScalarQuery.class.equals(Integer.class) || MetricsScalarQuery.class.equals(Long.class) || MetricsScalarQuery.class.equals(Float.class) || MetricsScalarQuery.class.equals(Double.class) || MetricsScalarQuery.class.equals(Boolean.class) || MetricsScalarQuery.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MetricsScalarQuery.class.equals(Integer.class) || MetricsScalarQuery.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MetricsScalarQuery.class.equals(Float.class) || MetricsScalarQuery.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MetricsScalarQuery.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MetricsScalarQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MetricsScalarQuery.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 (!((MetricsScalarQuery)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MetricsScalarQuery'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MetricsScalarQuery'", e); + } + + // deserialize EventsScalarQuery + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EventsScalarQuery.class.equals(Integer.class) || EventsScalarQuery.class.equals(Long.class) || EventsScalarQuery.class.equals(Float.class) || EventsScalarQuery.class.equals(Double.class) || EventsScalarQuery.class.equals(Boolean.class) || EventsScalarQuery.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EventsScalarQuery.class.equals(Integer.class) || EventsScalarQuery.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EventsScalarQuery.class.equals(Float.class) || EventsScalarQuery.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (EventsScalarQuery.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EventsScalarQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(EventsScalarQuery.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 (!((EventsScalarQuery)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'EventsScalarQuery'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EventsScalarQuery'", e); + } + + ScalarQuery ret = new ScalarQuery(); + 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 ScalarQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "ScalarQuery cannot be null"); + } } - @Override - public void serialize(ScalarQuery value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ScalarQuery() { + super("oneOf", Boolean.FALSE); + } + public ScalarQuery(MetricsScalarQuery o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ScalarQuery(EventsScalarQuery o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class ScalarQueryDeserializer extends StdDeserializer { - public ScalarQueryDeserializer() { - this(ScalarQuery.class); + static { + schemas.put("MetricsScalarQuery", new GenericType() { + }); + schemas.put("EventsScalarQuery", new GenericType() { + }); + JSON.registerDescendants(ScalarQuery.class, Collections.unmodifiableMap(schemas)); } - public ScalarQueryDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return ScalarQuery.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MetricsScalarQuery, EventsScalarQuery + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public ScalarQuery 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 MetricsScalarQuery - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MetricsScalarQuery.class.equals(Integer.class) - || MetricsScalarQuery.class.equals(Long.class) - || MetricsScalarQuery.class.equals(Float.class) - || MetricsScalarQuery.class.equals(Double.class) - || MetricsScalarQuery.class.equals(Boolean.class) - || MetricsScalarQuery.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MetricsScalarQuery.class.equals(Integer.class) - || MetricsScalarQuery.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MetricsScalarQuery.class.equals(Float.class) - || MetricsScalarQuery.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MetricsScalarQuery.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MetricsScalarQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MetricsScalarQuery.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MetricsScalarQuery.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 (!((MetricsScalarQuery) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MetricsScalarQuery'"); + if (JSON.isInstanceOf(EventsScalarQuery.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'MetricsScalarQuery'", e); - } - // deserialize EventsScalarQuery - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (EventsScalarQuery.class.equals(Integer.class) - || EventsScalarQuery.class.equals(Long.class) - || EventsScalarQuery.class.equals(Float.class) - || EventsScalarQuery.class.equals(Double.class) - || EventsScalarQuery.class.equals(Boolean.class) - || EventsScalarQuery.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((EventsScalarQuery.class.equals(Integer.class) - || EventsScalarQuery.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((EventsScalarQuery.class.equals(Float.class) - || EventsScalarQuery.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (EventsScalarQuery.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (EventsScalarQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(EventsScalarQuery.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 (!((EventsScalarQuery) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'EventsScalarQuery'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'EventsScalarQuery'", e); - } - - ScalarQuery ret = new ScalarQuery(); - 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; + throw new RuntimeException("Invalid instance type. Must be MetricsScalarQuery, EventsScalarQuery"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * MetricsScalarQuery, EventsScalarQuery + * + * @return The actual instance (MetricsScalarQuery, EventsScalarQuery) + */ @Override - public ScalarQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ScalarQuery cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public ScalarQuery() { - super("oneOf", Boolean.FALSE); - } - - public ScalarQuery(MetricsScalarQuery o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public ScalarQuery(EventsScalarQuery o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MetricsScalarQuery", new GenericType() {}); - schemas.put("EventsScalarQuery", new GenericType() {}); - JSON.registerDescendants(ScalarQuery.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return ScalarQuery.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MetricsScalarQuery, EventsScalarQuery - * - *

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(MetricsScalarQuery.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(EventsScalarQuery.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MetricsScalarQuery`. If the actual instance is not `MetricsScalarQuery`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MetricsScalarQuery` + * @throws ClassCastException if the instance is not `MetricsScalarQuery` + */ + public MetricsScalarQuery getMetricsScalarQuery() throws ClassCastException { + return (MetricsScalarQuery)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `EventsScalarQuery`. If the actual instance is not `EventsScalarQuery`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EventsScalarQuery` + * @throws ClassCastException if the instance is not `EventsScalarQuery` + */ + public EventsScalarQuery getEventsScalarQuery() throws ClassCastException { + return (EventsScalarQuery)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be MetricsScalarQuery, EventsScalarQuery"); - } - - /** - * Get the actual instance, which can be the following: MetricsScalarQuery, EventsScalarQuery - * - * @return The actual instance (MetricsScalarQuery, EventsScalarQuery) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MetricsScalarQuery`. If the actual instance is not - * `MetricsScalarQuery`, the ClassCastException will be thrown. - * - * @return The actual instance of `MetricsScalarQuery` - * @throws ClassCastException if the instance is not `MetricsScalarQuery` - */ - public MetricsScalarQuery getMetricsScalarQuery() throws ClassCastException { - return (MetricsScalarQuery) super.getActualInstance(); - } - - /** - * Get the actual instance of `EventsScalarQuery`. If the actual instance is not - * `EventsScalarQuery`, the ClassCastException will be thrown. - * - * @return The actual instance of `EventsScalarQuery` - * @throws ClassCastException if the instance is not `EventsScalarQuery` - */ - public EventsScalarQuery getEventsScalarQuery() throws ClassCastException { - return (EventsScalarQuery) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ScalarResponse.java b/src/main/java/com/datadog/api/client/v2/model/ScalarResponse.java index 1340454209b..389909c6f9d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScalarResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScalarResponse.java @@ -6,18 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A message containing the response to a scalar query. */ -@JsonPropertyOrder({ScalarResponse.JSON_PROPERTY_ATTRIBUTES, ScalarResponse.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A message containing the response to a scalar query.

+ */ +@JsonPropertyOrder({ + ScalarResponse.JSON_PROPERTY_ATTRIBUTES, + ScalarResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ScalarResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ScalarFormulaResponseAtrributes attributes; @@ -31,21 +54,19 @@ public ScalarResponse attributes(ScalarFormulaResponseAtrributes attributes) { } /** - * The object describing a scalar response. - * + *

The object describing a scalar response.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScalarFormulaResponseAtrributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScalarFormulaResponseAtrributes getAttributes() { + return attributes; + } public void setAttributes(ScalarFormulaResponseAtrributes attributes) { this.attributes = attributes; } - public ScalarResponse type(ScalarFormulaResponseType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -53,25 +74,26 @@ public ScalarResponse type(ScalarFormulaResponseType type) { } /** - * The type of the resource. The value should always be scalar_response. - * + *

The type of the resource. The value should always be scalar_response.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScalarFormulaResponseType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ScalarFormulaResponseType getType() { + return type; + } public void setType(ScalarFormulaResponseType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ScalarResponse object is equal to o. */ + /** + * Return true if this ScalarResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +103,13 @@ public boolean equals(Object o) { return false; } ScalarResponse scalarResponse = (ScalarResponse) o; - return Objects.equals(this.attributes, scalarResponse.attributes) - && Objects.equals(this.type, scalarResponse.type); + return Objects.equals(this.attributes, scalarResponse.attributes) && Objects.equals(this.type, scalarResponse.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -101,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilter.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilter.java index d423b1cc306..750e632d5b9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilter.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The security filter's properties. */ + +/** + *

The security filter's properties.

+ */ @JsonPropertyOrder({ SecurityFilter.JSON_PROPERTY_ATTRIBUTES, SecurityFilter.JSON_PROPERTY_ID, SecurityFilter.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityFilterAttributes attributes; @@ -38,42 +58,38 @@ public SecurityFilter attributes(SecurityFilterAttributes attributes) { } /** - * The object describing a security filter. - * + *

The object describing a security filter.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilterAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilterAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityFilterAttributes attributes) { this.attributes = attributes; } - public SecurityFilter id(String id) { this.id = id; return this; } /** - * The ID of the security filter. - * + *

The ID of the security filter.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SecurityFilter type(SecurityFilterType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public SecurityFilter type(SecurityFilterType type) { } /** - * The type of the resource. The value should always be security_filters. - * + *

The type of the resource. The value should always be security_filters.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilterType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilterType getType() { + return type; + } public void setType(SecurityFilterType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SecurityFilter object is equal to o. */ + /** + * Return true if this SecurityFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } SecurityFilter securityFilter = (SecurityFilter) o; - return Objects.equals(this.attributes, securityFilter.attributes) - && Objects.equals(this.id, securityFilter.id) - && Objects.equals(this.type, securityFilter.type); + return Objects.equals(this.attributes, securityFilter.attributes) && Objects.equals(this.id, securityFilter.id) && Objects.equals(this.type, securityFilter.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterAttributes.java index 6a0af5016f6..8b1e4f08362 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object describing a security filter. */ +/** + *

The object describing a security filter.

+ */ @JsonPropertyOrder({ SecurityFilterAttributes.JSON_PROPERTY_EXCLUSION_FILTERS, SecurityFilterAttributes.JSON_PROPERTY_FILTERED_DATA_TYPE, @@ -24,10 +42,10 @@ SecurityFilterAttributes.JSON_PROPERTY_QUERY, SecurityFilterAttributes.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXCLUSION_FILTERS = "exclusion_filters"; private List exclusionFilters = null; @@ -49,17 +67,14 @@ public class SecurityFilterAttributes { public static final String JSON_PROPERTY_VERSION = "version"; private Integer version; - public SecurityFilterAttributes exclusionFilters( - List exclusionFilters) { + public SecurityFilterAttributes exclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; for (SecurityFilterExclusionFilterResponse item : exclusionFilters) { this.unparsed |= item.unparsed; } return this; } - - public SecurityFilterAttributes addExclusionFiltersItem( - SecurityFilterExclusionFilterResponse exclusionFiltersItem) { + public SecurityFilterAttributes addExclusionFiltersItem(SecurityFilterExclusionFilterResponse exclusionFiltersItem) { if (this.exclusionFilters == null) { this.exclusionFilters = new ArrayList<>(); } @@ -69,153 +84,142 @@ public SecurityFilterAttributes addExclusionFiltersItem( } /** - * The list of exclusion filters applied in this security filter. - * + *

The list of exclusion filters applied in this security filter.

* @return exclusionFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExclusionFilters() { - return exclusionFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExclusionFilters() { + return exclusionFilters; + } public void setExclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; } - - public SecurityFilterAttributes filteredDataType( - SecurityFilterFilteredDataType filteredDataType) { + public SecurityFilterAttributes filteredDataType(SecurityFilterFilteredDataType filteredDataType) { this.filteredDataType = filteredDataType; this.unparsed |= !filteredDataType.isValid(); return this; } /** - * The filtered data type. - * + *

The filtered data type.

* @return filteredDataType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERED_DATA_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilterFilteredDataType getFilteredDataType() { - return filteredDataType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERED_DATA_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilterFilteredDataType getFilteredDataType() { + return filteredDataType; + } public void setFilteredDataType(SecurityFilterFilteredDataType filteredDataType) { if (!filteredDataType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.filteredDataType = filteredDataType; } - public SecurityFilterAttributes isBuiltin(Boolean isBuiltin) { this.isBuiltin = isBuiltin; return this; } /** - * Whether the security filter is the built-in filter. - * + *

Whether the security filter is the built-in filter.

* @return isBuiltin - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_BUILTIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsBuiltin() { - return isBuiltin; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_BUILTIN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsBuiltin() { + return isBuiltin; + } public void setIsBuiltin(Boolean isBuiltin) { this.isBuiltin = isBuiltin; } - public SecurityFilterAttributes isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the security filter is enabled. - * + *

Whether the security filter is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityFilterAttributes name(String name) { this.name = name; return this; } /** - * The security filter name. - * + *

The security filter name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityFilterAttributes query(String query) { this.query = query; return this; } /** - * The security filter query. Logs accepted by this query will be accepted by this filter. - * + *

The security filter query. Logs accepted by this query will be accepted by this filter.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public SecurityFilterAttributes version(Integer version) { this.version = version; return this; } /** - * The version of the security filter. maximum: 2147483647 - * + *

The version of the security filter.

+ * maximum: 2147483647 * @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVersion() { + return version; + } public void setVersion(Integer version) { this.version = version; } - /** Return true if this SecurityFilterAttributes object is equal to o. */ + /** + * Return true if this SecurityFilterAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -225,19 +229,13 @@ public boolean equals(Object o) { return false; } SecurityFilterAttributes securityFilterAttributes = (SecurityFilterAttributes) o; - return Objects.equals(this.exclusionFilters, securityFilterAttributes.exclusionFilters) - && Objects.equals(this.filteredDataType, securityFilterAttributes.filteredDataType) - && Objects.equals(this.isBuiltin, securityFilterAttributes.isBuiltin) - && Objects.equals(this.isEnabled, securityFilterAttributes.isEnabled) - && Objects.equals(this.name, securityFilterAttributes.name) - && Objects.equals(this.query, securityFilterAttributes.query) - && Objects.equals(this.version, securityFilterAttributes.version); + return Objects.equals(this.exclusionFilters, securityFilterAttributes.exclusionFilters) && Objects.equals(this.filteredDataType, securityFilterAttributes.filteredDataType) && Objects.equals(this.isBuiltin, securityFilterAttributes.isBuiltin) && Objects.equals(this.isEnabled, securityFilterAttributes.isEnabled) && Objects.equals(this.name, securityFilterAttributes.name) && Objects.equals(this.query, securityFilterAttributes.query) && Objects.equals(this.version, securityFilterAttributes.version); } + @Override public int hashCode() { - return Objects.hash( - exclusionFilters, filteredDataType, isBuiltin, isEnabled, name, query, version); + return Objects.hash(exclusionFilters,filteredDataType,isBuiltin,isEnabled,name,query,version); } @Override @@ -256,7 +254,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateAttributes.java index 1b953cb65c0..2597f8f4e3c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing the attributes of the security filter to be created. */ +/** + *

Object containing the attributes of the security filter to be created.

+ */ @JsonPropertyOrder({ SecurityFilterCreateAttributes.JSON_PROPERTY_EXCLUSION_FILTERS, SecurityFilterCreateAttributes.JSON_PROPERTY_FILTERED_DATA_TYPE, @@ -23,10 +40,10 @@ SecurityFilterCreateAttributes.JSON_PROPERTY_NAME, SecurityFilterCreateAttributes.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXCLUSION_FILTERS = "exclusion_filters"; private List exclusionFilters = new ArrayList<>(); @@ -46,138 +63,124 @@ public SecurityFilterCreateAttributes() {} @JsonCreator public SecurityFilterCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_EXCLUSION_FILTERS) - List exclusionFilters, - @JsonProperty(required = true, value = JSON_PROPERTY_FILTERED_DATA_TYPE) - SecurityFilterFilteredDataType filteredDataType, - @JsonProperty(required = true, value = JSON_PROPERTY_IS_ENABLED) Boolean isEnabled, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.exclusionFilters = exclusionFilters; - this.filteredDataType = filteredDataType; - this.unparsed |= !filteredDataType.isValid(); - this.isEnabled = isEnabled; - this.name = name; - this.query = query; - } - - public SecurityFilterCreateAttributes exclusionFilters( - List exclusionFilters) { + @JsonProperty(required=true, value=JSON_PROPERTY_EXCLUSION_FILTERS)List exclusionFilters, + @JsonProperty(required=true, value=JSON_PROPERTY_FILTERED_DATA_TYPE)SecurityFilterFilteredDataType filteredDataType, + @JsonProperty(required=true, value=JSON_PROPERTY_IS_ENABLED)Boolean isEnabled, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.exclusionFilters = exclusionFilters; + this.filteredDataType = filteredDataType; + this.unparsed |= !filteredDataType.isValid(); + this.isEnabled = isEnabled; + this.name = name; + this.query = query; + } + public SecurityFilterCreateAttributes exclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; for (SecurityFilterExclusionFilter item : exclusionFilters) { this.unparsed |= item.unparsed; } return this; } - - public SecurityFilterCreateAttributes addExclusionFiltersItem( - SecurityFilterExclusionFilter exclusionFiltersItem) { + public SecurityFilterCreateAttributes addExclusionFiltersItem(SecurityFilterExclusionFilter exclusionFiltersItem) { this.exclusionFilters.add(exclusionFiltersItem); this.unparsed |= exclusionFiltersItem.unparsed; return this; } /** - * Exclusion filters to exclude some logs from the security filter. - * + *

Exclusion filters to exclude some logs from the security filter.

* @return exclusionFilters - */ - @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getExclusionFilters() { - return exclusionFilters; - } - + **/ + @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getExclusionFilters() { + return exclusionFilters; + } public void setExclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; } - - public SecurityFilterCreateAttributes filteredDataType( - SecurityFilterFilteredDataType filteredDataType) { + public SecurityFilterCreateAttributes filteredDataType(SecurityFilterFilteredDataType filteredDataType) { this.filteredDataType = filteredDataType; this.unparsed |= !filteredDataType.isValid(); return this; } /** - * The filtered data type. - * + *

The filtered data type.

* @return filteredDataType - */ - @JsonProperty(JSON_PROPERTY_FILTERED_DATA_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterFilteredDataType getFilteredDataType() { - return filteredDataType; - } - + **/ + @JsonProperty(JSON_PROPERTY_FILTERED_DATA_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterFilteredDataType getFilteredDataType() { + return filteredDataType; + } public void setFilteredDataType(SecurityFilterFilteredDataType filteredDataType) { if (!filteredDataType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.filteredDataType = filteredDataType; } - public SecurityFilterCreateAttributes isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the security filter is enabled. - * + *

Whether the security filter is enabled.

* @return isEnabled - */ - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityFilterCreateAttributes name(String name) { this.name = name; return this; } /** - * The name of the security filter. - * + *

The name of the security filter.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityFilterCreateAttributes query(String query) { this.query = query; return this; } /** - * The query of the security filter. - * + *

The query of the security filter.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this SecurityFilterCreateAttributes object is equal to o. */ + /** + * Return true if this SecurityFilterCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -186,18 +189,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityFilterCreateAttributes securityFilterCreateAttributes = - (SecurityFilterCreateAttributes) o; - return Objects.equals(this.exclusionFilters, securityFilterCreateAttributes.exclusionFilters) - && Objects.equals(this.filteredDataType, securityFilterCreateAttributes.filteredDataType) - && Objects.equals(this.isEnabled, securityFilterCreateAttributes.isEnabled) - && Objects.equals(this.name, securityFilterCreateAttributes.name) - && Objects.equals(this.query, securityFilterCreateAttributes.query); + SecurityFilterCreateAttributes securityFilterCreateAttributes = (SecurityFilterCreateAttributes) o; + return Objects.equals(this.exclusionFilters, securityFilterCreateAttributes.exclusionFilters) && Objects.equals(this.filteredDataType, securityFilterCreateAttributes.filteredDataType) && Objects.equals(this.isEnabled, securityFilterCreateAttributes.isEnabled) && Objects.equals(this.name, securityFilterCreateAttributes.name) && Objects.equals(this.query, securityFilterCreateAttributes.query); } + @Override public int hashCode() { - return Objects.hash(exclusionFilters, filteredDataType, isEnabled, name, query); + return Objects.hash(exclusionFilters,filteredDataType,isEnabled,name,query); } @Override @@ -214,7 +213,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateData.java index 8ab33faff98..1de514d6ff0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object for a single security filter. */ + +/** + *

Object for a single security filter.

+ */ @JsonPropertyOrder({ SecurityFilterCreateData.JSON_PROPERTY_ATTRIBUTES, SecurityFilterCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityFilterCreateAttributes attributes; @@ -32,15 +51,13 @@ public SecurityFilterCreateData() {} @JsonCreator public SecurityFilterCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SecurityFilterCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SecurityFilterType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SecurityFilterCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SecurityFilterType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public SecurityFilterCreateData attributes(SecurityFilterCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public SecurityFilterCreateData attributes(SecurityFilterCreateAttributes attrib } /** - * Object containing the attributes of the security filter to be created. - * + *

Object containing the attributes of the security filter to be created.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityFilterCreateAttributes attributes) { this.attributes = attributes; } - public SecurityFilterCreateData type(SecurityFilterType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public SecurityFilterCreateData type(SecurityFilterType type) { } /** - * The type of the resource. The value should always be security_filters. - * + *

The type of the resource. The value should always be security_filters.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterType getType() { + return type; + } public void setType(SecurityFilterType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SecurityFilterCreateData object is equal to o. */ + /** + * Return true if this SecurityFilterCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } SecurityFilterCreateData securityFilterCreateData = (SecurityFilterCreateData) o; - return Objects.equals(this.attributes, securityFilterCreateData.attributes) - && Objects.equals(this.type, securityFilterCreateData.type); + return Objects.equals(this.attributes, securityFilterCreateData.attributes) && Objects.equals(this.type, securityFilterCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateRequest.java index 842d80c0adb..dd76cd3ec86 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request object that includes the security filter that you would like to create. */ -@JsonPropertyOrder({SecurityFilterCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request object that includes the security filter that you would like to create.

+ */ +@JsonPropertyOrder({ + SecurityFilterCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityFilterCreateData data; @@ -26,11 +47,10 @@ public SecurityFilterCreateRequest() {} @JsonCreator public SecurityFilterCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SecurityFilterCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SecurityFilterCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public SecurityFilterCreateRequest data(SecurityFilterCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public SecurityFilterCreateRequest data(SecurityFilterCreateData data) { } /** - * Object for a single security filter. - * + *

Object for a single security filter.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterCreateData getData() { + return data; + } public void setData(SecurityFilterCreateData data) { this.data = data; } - /** Return true if this SecurityFilterCreateRequest object is equal to o. */ + /** + * Return true if this SecurityFilterCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, securityFilterCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilter.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilter.java index 34a131de0f2..9bf58dac3cb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilter.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Exclusion filter for the security filter. */ + +/** + *

Exclusion filter for the security filter.

+ */ @JsonPropertyOrder({ SecurityFilterExclusionFilter.JSON_PROPERTY_NAME, SecurityFilterExclusionFilter.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterExclusionFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -32,53 +51,51 @@ public SecurityFilterExclusionFilter() {} @JsonCreator public SecurityFilterExclusionFilter( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.name = name; - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.name = name; + this.query = query; } - public SecurityFilterExclusionFilter name(String name) { this.name = name; return this; } /** - * Exclusion filter name. - * + *

Exclusion filter name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityFilterExclusionFilter query(String query) { this.query = query; return this; } /** - * Exclusion filter query. Logs that match this query are excluded from the security filter. - * + *

Exclusion filter query. Logs that match this query are excluded from the security filter.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this SecurityFilterExclusionFilter object is equal to o. */ + /** + * Return true if this SecurityFilterExclusionFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -88,13 +105,13 @@ public boolean equals(Object o) { return false; } SecurityFilterExclusionFilter securityFilterExclusionFilter = (SecurityFilterExclusionFilter) o; - return Objects.equals(this.name, securityFilterExclusionFilter.name) - && Objects.equals(this.query, securityFilterExclusionFilter.query); + return Objects.equals(this.name, securityFilterExclusionFilter.name) && Objects.equals(this.query, securityFilterExclusionFilter.query); } + @Override public int hashCode() { - return Objects.hash(name, query); + return Objects.hash(name,query); } @Override @@ -108,7 +125,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilterResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilterResponse.java index f8b2e1543e6..fa17f1e40fd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilterResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterExclusionFilterResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A single exclusion filter. */ + +/** + *

A single exclusion filter.

+ */ @JsonPropertyOrder({ SecurityFilterExclusionFilterResponse.JSON_PROPERTY_NAME, SecurityFilterExclusionFilterResponse.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterExclusionFilterResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -33,43 +53,42 @@ public SecurityFilterExclusionFilterResponse name(String name) { } /** - * The exclusion filter name. - * + *

The exclusion filter name.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityFilterExclusionFilterResponse query(String query) { this.query = query; return this; } /** - * The exclusion filter query. - * + *

The exclusion filter query.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this SecurityFilterExclusionFilterResponse object is equal to o. */ + /** + * Return true if this SecurityFilterExclusionFilterResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +97,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityFilterExclusionFilterResponse securityFilterExclusionFilterResponse = - (SecurityFilterExclusionFilterResponse) o; - return Objects.equals(this.name, securityFilterExclusionFilterResponse.name) - && Objects.equals(this.query, securityFilterExclusionFilterResponse.query); + SecurityFilterExclusionFilterResponse securityFilterExclusionFilterResponse = (SecurityFilterExclusionFilterResponse) o; + return Objects.equals(this.name, securityFilterExclusionFilterResponse.name) && Objects.equals(this.query, securityFilterExclusionFilterResponse.query); } + @Override public int hashCode() { - return Objects.hash(name, query); + return Objects.hash(name,query); } @Override @@ -100,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterFilteredDataType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterFilteredDataType.java index d8e017a3cc6..ebb787a736e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterFilteredDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterFilteredDataType.java @@ -6,26 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The filtered data type. */ -@JsonSerialize( - using = SecurityFilterFilteredDataType.SecurityFilterFilteredDataTypeSerializer.class) +/** + *

The filtered data type.

+ */ +@JsonSerialize(using = SecurityFilterFilteredDataType.SecurityFilterFilteredDataTypeSerializer.class) public class SecurityFilterFilteredDataType { - public static final SecurityFilterFilteredDataType LOGS = - new SecurityFilterFilteredDataType("logs"); + public static final SecurityFilterFilteredDataType LOGS = new SecurityFilterFilteredDataType("logs"); private static final Set allowedValues = new HashSet(Arrays.asList("logs")); @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityFilterFilteredDataTypeSerializer - extends StdSerializer { - public SecurityFilterFilteredDataTypeSerializer(Class t) { - super(t); - } + public static class SecurityFilterFilteredDataTypeSerializer extends StdSerializer { + public SecurityFilterFilteredDataTypeSerializer(Class t) { + super(t); + } - public SecurityFilterFilteredDataTypeSerializer() { - this(null); - } + public SecurityFilterFilteredDataTypeSerializer() { + this(null); + } - @Override - public void serialize( - SecurityFilterFilteredDataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityFilterFilteredDataType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityFilterFilteredDataType object is equal to o. */ + /** + * Return true if this SecurityFilterFilteredDataType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterMeta.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterMeta.java index b19f2c08307..8aae6237108 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterMeta.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Optional metadata associated to the response. */ -@JsonPropertyOrder({SecurityFilterMeta.JSON_PROPERTY_WARNING}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Optional metadata associated to the response.

+ */ +@JsonPropertyOrder({ + SecurityFilterMeta.JSON_PROPERTY_WARNING +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_WARNING = "warning"; private String warning; @@ -27,22 +49,23 @@ public SecurityFilterMeta warning(String warning) { } /** - * A warning message. - * + *

A warning message.

* @return warning - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_WARNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getWarning() { - return warning; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getWarning() { + return warning; + } public void setWarning(String warning) { this.warning = warning; } - /** Return true if this SecurityFilterMeta object is equal to o. */ + /** + * Return true if this SecurityFilterMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.warning, securityFilterMeta.warning); } + @Override public int hashCode() { return Objects.hash(warning); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterResponse.java index 82def234887..cae9433fdab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response object which includes a single security filter. */ + +/** + *

Response object which includes a single security filter.

+ */ @JsonPropertyOrder({ SecurityFilterResponse.JSON_PROPERTY_DATA, SecurityFilterResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityFilter data; @@ -34,21 +54,19 @@ public SecurityFilterResponse data(SecurityFilter data) { } /** - * The security filter's properties. - * + *

The security filter's properties.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilter getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilter getData() { + return data; + } public void setData(SecurityFilter data) { this.data = data; } - public SecurityFilterResponse meta(SecurityFilterMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -56,22 +74,23 @@ public SecurityFilterResponse meta(SecurityFilterMeta meta) { } /** - * Optional metadata associated to the response. - * + *

Optional metadata associated to the response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilterMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilterMeta getMeta() { + return meta; + } public void setMeta(SecurityFilterMeta meta) { this.meta = meta; } - /** Return true if this SecurityFilterResponse object is equal to o. */ + /** + * Return true if this SecurityFilterResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,13 +100,13 @@ public boolean equals(Object o) { return false; } SecurityFilterResponse securityFilterResponse = (SecurityFilterResponse) o; - return Objects.equals(this.data, securityFilterResponse.data) - && Objects.equals(this.meta, securityFilterResponse.meta); + return Objects.equals(this.data, securityFilterResponse.data) && Objects.equals(this.meta, securityFilterResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -101,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterType.java index 54d3dfb20fb..be809a6dd4d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be security_filters. */ +/** + *

The type of the resource. The value should always be security_filters.

+ */ @JsonSerialize(using = SecurityFilterType.SecurityFilterTypeSerializer.class) public class SecurityFilterType { - public static final SecurityFilterType SECURITY_FILTERS = - new SecurityFilterType("security_filters"); + public static final SecurityFilterType SECURITY_FILTERS = new SecurityFilterType("security_filters"); - private static final Set allowedValues = - new HashSet(Arrays.asList("security_filters")); + private static final Set allowedValues = new HashSet(Arrays.asList("security_filters")); private String value; @@ -40,19 +62,18 @@ public boolean isValid() { } public static class SecurityFilterTypeSerializer extends StdSerializer { - public SecurityFilterTypeSerializer(Class t) { - super(t); - } - - public SecurityFilterTypeSerializer() { - this(null); - } - - @Override - public void serialize(SecurityFilterType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public SecurityFilterTypeSerializer(Class t) { + super(t); + } + + public SecurityFilterTypeSerializer() { + this(null); + } + + @Override + public void serialize(SecurityFilterType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityFilterType object is equal to o. */ + /** + * Return true if this SecurityFilterType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateAttributes.java index cf775fd0310..d35522d79c0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The security filters properties to be updated. */ + +/** + *

The security filters properties to be updated.

+ */ @JsonPropertyOrder({ SecurityFilterUpdateAttributes.JSON_PROPERTY_EXCLUSION_FILTERS, SecurityFilterUpdateAttributes.JSON_PROPERTY_FILTERED_DATA_TYPE, @@ -23,10 +41,10 @@ SecurityFilterUpdateAttributes.JSON_PROPERTY_QUERY, SecurityFilterUpdateAttributes.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EXCLUSION_FILTERS = "exclusion_filters"; private List exclusionFilters = null; @@ -45,17 +63,14 @@ public class SecurityFilterUpdateAttributes { public static final String JSON_PROPERTY_VERSION = "version"; private Integer version; - public SecurityFilterUpdateAttributes exclusionFilters( - List exclusionFilters) { + public SecurityFilterUpdateAttributes exclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; for (SecurityFilterExclusionFilter item : exclusionFilters) { this.unparsed |= item.unparsed; } return this; } - - public SecurityFilterUpdateAttributes addExclusionFiltersItem( - SecurityFilterExclusionFilter exclusionFiltersItem) { + public SecurityFilterUpdateAttributes addExclusionFiltersItem(SecurityFilterExclusionFilter exclusionFiltersItem) { if (this.exclusionFilters == null) { this.exclusionFilters = new ArrayList<>(); } @@ -65,132 +80,123 @@ public SecurityFilterUpdateAttributes addExclusionFiltersItem( } /** - * Exclusion filters to exclude some logs from the security filter. - * + *

Exclusion filters to exclude some logs from the security filter.

* @return exclusionFilters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExclusionFilters() { - return exclusionFilters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUSION_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExclusionFilters() { + return exclusionFilters; + } public void setExclusionFilters(List exclusionFilters) { this.exclusionFilters = exclusionFilters; } - - public SecurityFilterUpdateAttributes filteredDataType( - SecurityFilterFilteredDataType filteredDataType) { + public SecurityFilterUpdateAttributes filteredDataType(SecurityFilterFilteredDataType filteredDataType) { this.filteredDataType = filteredDataType; this.unparsed |= !filteredDataType.isValid(); return this; } /** - * The filtered data type. - * + *

The filtered data type.

* @return filteredDataType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERED_DATA_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilterFilteredDataType getFilteredDataType() { - return filteredDataType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERED_DATA_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilterFilteredDataType getFilteredDataType() { + return filteredDataType; + } public void setFilteredDataType(SecurityFilterFilteredDataType filteredDataType) { if (!filteredDataType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.filteredDataType = filteredDataType; } - public SecurityFilterUpdateAttributes isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the security filter is enabled. - * + *

Whether the security filter is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityFilterUpdateAttributes name(String name) { this.name = name; return this; } /** - * The name of the security filter. - * + *

The name of the security filter.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityFilterUpdateAttributes query(String query) { this.query = query; return this; } /** - * The query of the security filter. - * + *

The query of the security filter.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public SecurityFilterUpdateAttributes version(Integer version) { this.version = version; return this; } /** - * The version of the security filter to update. maximum: 2147483647 - * + *

The version of the security filter to update.

+ * maximum: 2147483647 * @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVersion() { + return version; + } public void setVersion(Integer version) { this.version = version; } - /** Return true if this SecurityFilterUpdateAttributes object is equal to o. */ + /** + * Return true if this SecurityFilterUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -199,19 +205,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityFilterUpdateAttributes securityFilterUpdateAttributes = - (SecurityFilterUpdateAttributes) o; - return Objects.equals(this.exclusionFilters, securityFilterUpdateAttributes.exclusionFilters) - && Objects.equals(this.filteredDataType, securityFilterUpdateAttributes.filteredDataType) - && Objects.equals(this.isEnabled, securityFilterUpdateAttributes.isEnabled) - && Objects.equals(this.name, securityFilterUpdateAttributes.name) - && Objects.equals(this.query, securityFilterUpdateAttributes.query) - && Objects.equals(this.version, securityFilterUpdateAttributes.version); + SecurityFilterUpdateAttributes securityFilterUpdateAttributes = (SecurityFilterUpdateAttributes) o; + return Objects.equals(this.exclusionFilters, securityFilterUpdateAttributes.exclusionFilters) && Objects.equals(this.filteredDataType, securityFilterUpdateAttributes.filteredDataType) && Objects.equals(this.isEnabled, securityFilterUpdateAttributes.isEnabled) && Objects.equals(this.name, securityFilterUpdateAttributes.name) && Objects.equals(this.query, securityFilterUpdateAttributes.query) && Objects.equals(this.version, securityFilterUpdateAttributes.version); } + @Override public int hashCode() { - return Objects.hash(exclusionFilters, filteredDataType, isEnabled, name, query, version); + return Objects.hash(exclusionFilters,filteredDataType,isEnabled,name,query,version); } @Override @@ -229,7 +230,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateData.java index b53ac716d69..b8e33b9bb35 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The new security filter properties. */ + +/** + *

The new security filter properties.

+ */ @JsonPropertyOrder({ SecurityFilterUpdateData.JSON_PROPERTY_ATTRIBUTES, SecurityFilterUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityFilterUpdateAttributes attributes; @@ -32,15 +51,13 @@ public SecurityFilterUpdateData() {} @JsonCreator public SecurityFilterUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SecurityFilterUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SecurityFilterType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SecurityFilterUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SecurityFilterType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public SecurityFilterUpdateData attributes(SecurityFilterUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -48,20 +65,18 @@ public SecurityFilterUpdateData attributes(SecurityFilterUpdateAttributes attrib } /** - * The security filters properties to be updated. - * + *

The security filters properties to be updated.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityFilterUpdateAttributes attributes) { this.attributes = attributes; } - public SecurityFilterUpdateData type(SecurityFilterType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public SecurityFilterUpdateData type(SecurityFilterType type) { } /** - * The type of the resource. The value should always be security_filters. - * + *

The type of the resource. The value should always be security_filters.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterType getType() { + return type; + } public void setType(SecurityFilterType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SecurityFilterUpdateData object is equal to o. */ + /** + * Return true if this SecurityFilterUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } SecurityFilterUpdateData securityFilterUpdateData = (SecurityFilterUpdateData) o; - return Objects.equals(this.attributes, securityFilterUpdateData.attributes) - && Objects.equals(this.type, securityFilterUpdateData.type); + return Objects.equals(this.attributes, securityFilterUpdateData.attributes) && Objects.equals(this.type, securityFilterUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateRequest.java index e0f8d278689..6c2a4286942 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFilterUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The new security filter body. */ -@JsonPropertyOrder({SecurityFilterUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The new security filter body.

+ */ +@JsonPropertyOrder({ + SecurityFilterUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFilterUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityFilterUpdateData data; @@ -26,11 +47,10 @@ public SecurityFilterUpdateRequest() {} @JsonCreator public SecurityFilterUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SecurityFilterUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SecurityFilterUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public SecurityFilterUpdateRequest data(SecurityFilterUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public SecurityFilterUpdateRequest data(SecurityFilterUpdateData data) { } /** - * The new security filter properties. - * + *

The new security filter properties.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityFilterUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityFilterUpdateData getData() { + return data; + } public void setData(SecurityFilterUpdateData data) { this.data = data; } - /** Return true if this SecurityFilterUpdateRequest object is equal to o. */ + /** + * Return true if this SecurityFilterUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, securityFilterUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityFiltersResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityFiltersResponse.java index 43f114816f2..a4e6cfbd43e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityFiltersResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityFiltersResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** All the available security filters objects. */ +/** + *

All the available security filters objects.

+ */ @JsonPropertyOrder({ SecurityFiltersResponse.JSON_PROPERTY_DATA, SecurityFiltersResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityFiltersResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -36,7 +54,6 @@ public SecurityFiltersResponse data(List data) { } return this; } - public SecurityFiltersResponse addDataItem(SecurityFilter dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -47,21 +64,19 @@ public SecurityFiltersResponse addDataItem(SecurityFilter dataItem) { } /** - * A list of security filters objects. - * + *

A list of security filters objects.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public SecurityFiltersResponse meta(SecurityFilterMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -69,22 +84,23 @@ public SecurityFiltersResponse meta(SecurityFilterMeta meta) { } /** - * Optional metadata associated to the response. - * + *

Optional metadata associated to the response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityFilterMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityFilterMeta getMeta() { + return meta; + } public void setMeta(SecurityFilterMeta meta) { this.meta = meta; } - /** Return true if this SecurityFiltersResponse object is equal to o. */ + /** + * Return true if this SecurityFiltersResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,13 +110,13 @@ public boolean equals(Object o) { return false; } SecurityFiltersResponse securityFiltersResponse = (SecurityFiltersResponse) o; - return Objects.equals(this.data, securityFiltersResponse.data) - && Objects.equals(this.meta, securityFiltersResponse.meta); + return Objects.equals(this.data, securityFiltersResponse.data) && Objects.equals(this.meta, securityFiltersResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -114,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilter.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilter.java index 5270489a538..179f6ed3644 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilter.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The rule's suppression filter. */ + +/** + *

The rule's suppression filter.

+ */ @JsonPropertyOrder({ SecurityMonitoringFilter.JSON_PROPERTY_ACTION, SecurityMonitoringFilter.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ACTION = "action"; private SecurityMonitoringFilterAction action; @@ -34,46 +54,45 @@ public SecurityMonitoringFilter action(SecurityMonitoringFilterAction action) { } /** - * The type of filtering action. - * + *

The type of filtering action.

* @return action - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringFilterAction getAction() { - return action; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringFilterAction getAction() { + return action; + } public void setAction(SecurityMonitoringFilterAction action) { if (!action.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.action = action; } - public SecurityMonitoringFilter query(String query) { this.query = query; return this; } /** - * Query for selecting logs to apply the filtering action. - * + *

Query for selecting logs to apply the filtering action.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this SecurityMonitoringFilter object is equal to o. */ + /** + * Return true if this SecurityMonitoringFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,13 +102,13 @@ public boolean equals(Object o) { return false; } SecurityMonitoringFilter securityMonitoringFilter = (SecurityMonitoringFilter) o; - return Objects.equals(this.action, securityMonitoringFilter.action) - && Objects.equals(this.query, securityMonitoringFilter.query); + return Objects.equals(this.action, securityMonitoringFilter.action) && Objects.equals(this.query, securityMonitoringFilter.query); } + @Override public int hashCode() { - return Objects.hash(action, query); + return Objects.hash(action,query); } @Override @@ -103,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilterAction.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilterAction.java index 6cd3b6d90d7..60664c10da2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilterAction.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringFilterAction.java @@ -6,31 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of filtering action. */ -@JsonSerialize( - using = SecurityMonitoringFilterAction.SecurityMonitoringFilterActionSerializer.class) +/** + *

The type of filtering action.

+ */ +@JsonSerialize(using = SecurityMonitoringFilterAction.SecurityMonitoringFilterActionSerializer.class) public class SecurityMonitoringFilterAction { - public static final SecurityMonitoringFilterAction REQUIRE = - new SecurityMonitoringFilterAction("require"); - public static final SecurityMonitoringFilterAction SUPPRESS = - new SecurityMonitoringFilterAction("suppress"); + public static final SecurityMonitoringFilterAction REQUIRE = new SecurityMonitoringFilterAction("require"); + public static final SecurityMonitoringFilterAction SUPPRESS = new SecurityMonitoringFilterAction("suppress"); - private static final Set allowedValues = - new HashSet(Arrays.asList("require", "suppress")); + private static final Set allowedValues = new HashSet(Arrays.asList("require", "suppress")); private String value; @@ -42,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringFilterActionSerializer - extends StdSerializer { - public SecurityMonitoringFilterActionSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringFilterActionSerializer extends StdSerializer { + public SecurityMonitoringFilterActionSerializer(Class t) { + super(t); + } - public SecurityMonitoringFilterActionSerializer() { - this(null); - } + public SecurityMonitoringFilterActionSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringFilterAction value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringFilterAction value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringFilterAction object is equal to o. */ + /** + * Return true if this SecurityMonitoringFilterAction object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringListRulesResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringListRulesResponse.java index c72fcb7fadf..6ce66a86f9b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringListRulesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringListRulesResponse.java @@ -6,23 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List of rules. */ +/** + *

List of rules.

+ */ @JsonPropertyOrder({ SecurityMonitoringListRulesResponse.JSON_PROPERTY_DATA, SecurityMonitoringListRulesResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringListRulesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -36,7 +54,6 @@ public SecurityMonitoringListRulesResponse data(List(); @@ -47,21 +64,19 @@ public SecurityMonitoringListRulesResponse addDataItem(SecurityMonitoringRuleRes } /** - * Array containing the list of rules. - * + *

Array containing the list of rules.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public SecurityMonitoringListRulesResponse meta(ResponseMetaAttributes meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -69,22 +84,23 @@ public SecurityMonitoringListRulesResponse meta(ResponseMetaAttributes meta) { } /** - * Object describing meta attributes of response. - * + *

Object describing meta attributes of response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ResponseMetaAttributes getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ResponseMetaAttributes getMeta() { + return meta; + } public void setMeta(ResponseMetaAttributes meta) { this.meta = meta; } - /** Return true if this SecurityMonitoringListRulesResponse object is equal to o. */ + /** + * Return true if this SecurityMonitoringListRulesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +109,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringListRulesResponse securityMonitoringListRulesResponse = - (SecurityMonitoringListRulesResponse) o; - return Objects.equals(this.data, securityMonitoringListRulesResponse.data) - && Objects.equals(this.meta, securityMonitoringListRulesResponse.meta); + SecurityMonitoringListRulesResponse securityMonitoringListRulesResponse = (SecurityMonitoringListRulesResponse) o; + return Objects.equals(this.data, securityMonitoringListRulesResponse.data) && Objects.equals(this.meta, securityMonitoringListRulesResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -115,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCase.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCase.java index 79976723f98..79f613ed54b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCase.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCase.java @@ -6,25 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Case when signal is generated. */ + +/** + *

Case when signal is generated.

+ */ @JsonPropertyOrder({ SecurityMonitoringRuleCase.JSON_PROPERTY_CONDITION, SecurityMonitoringRuleCase.JSON_PROPERTY_NAME, SecurityMonitoringRuleCase.JSON_PROPERTY_NOTIFICATIONS, SecurityMonitoringRuleCase.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringRuleCase { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONDITION = "condition"; private String condition; @@ -43,49 +61,43 @@ public SecurityMonitoringRuleCase condition(String condition) { } /** - * A rule case contains logical operations (>,>=, && - * , ||) to determine if a signal should be generated based on the event - * counts in the previously defined queries. - * + *

A rule case contains logical operations (>,>=, &&, ||) to determine if a signal should be generated + * based on the event counts in the previously defined queries.

* @return condition - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONDITION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCondition() { - return condition; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCondition() { + return condition; + } public void setCondition(String condition) { this.condition = condition; } - public SecurityMonitoringRuleCase name(String name) { this.name = name; return this; } /** - * Name of the case. - * + *

Name of the case.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringRuleCase notifications(List notifications) { this.notifications = notifications; return this; } - public SecurityMonitoringRuleCase addNotificationsItem(String notificationsItem) { if (this.notifications == null) { this.notifications = new ArrayList<>(); @@ -95,21 +107,19 @@ public SecurityMonitoringRuleCase addNotificationsItem(String notificationsItem) } /** - * Notification targets for each rule case. - * + *

Notification targets for each rule case.

* @return notifications - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotifications() { - return notifications; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotifications() { + return notifications; + } public void setNotifications(List notifications) { this.notifications = notifications; } - public SecurityMonitoringRuleCase status(SecurityMonitoringRuleSeverity status) { this.status = status; this.unparsed |= !status.isValid(); @@ -117,25 +127,26 @@ public SecurityMonitoringRuleCase status(SecurityMonitoringRuleSeverity status) } /** - * Severity of the Security Signal. - * + *

Severity of the Security Signal.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleSeverity getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleSeverity getStatus() { + return status; + } public void setStatus(SecurityMonitoringRuleSeverity status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SecurityMonitoringRuleCase object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleCase object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -145,15 +156,13 @@ public boolean equals(Object o) { return false; } SecurityMonitoringRuleCase securityMonitoringRuleCase = (SecurityMonitoringRuleCase) o; - return Objects.equals(this.condition, securityMonitoringRuleCase.condition) - && Objects.equals(this.name, securityMonitoringRuleCase.name) - && Objects.equals(this.notifications, securityMonitoringRuleCase.notifications) - && Objects.equals(this.status, securityMonitoringRuleCase.status); + return Objects.equals(this.condition, securityMonitoringRuleCase.condition) && Objects.equals(this.name, securityMonitoringRuleCase.name) && Objects.equals(this.notifications, securityMonitoringRuleCase.notifications) && Objects.equals(this.status, securityMonitoringRuleCase.status); } + @Override public int hashCode() { - return Objects.hash(condition, name, notifications, status); + return Objects.hash(condition,name,notifications,status); } @Override @@ -169,7 +178,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCaseCreate.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCaseCreate.java index 2aa0e99ad1c..a058cef362b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCaseCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCaseCreate.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Case when signal is generated. */ + +/** + *

Case when signal is generated.

+ */ @JsonPropertyOrder({ SecurityMonitoringRuleCaseCreate.JSON_PROPERTY_CONDITION, SecurityMonitoringRuleCaseCreate.JSON_PROPERTY_NAME, SecurityMonitoringRuleCaseCreate.JSON_PROPERTY_NOTIFICATIONS, SecurityMonitoringRuleCaseCreate.JSON_PROPERTY_STATUS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringRuleCaseCreate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONDITION = "condition"; private String condition; @@ -42,61 +59,53 @@ public SecurityMonitoringRuleCaseCreate() {} @JsonCreator public SecurityMonitoringRuleCaseCreate( - @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) - SecurityMonitoringRuleSeverity status) { - this.status = status; - this.unparsed |= !status.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_STATUS)SecurityMonitoringRuleSeverity status) { + this.status = status; + this.unparsed |= !status.isValid(); } - public SecurityMonitoringRuleCaseCreate condition(String condition) { this.condition = condition; return this; } /** - * A rule case contains logical operations (>,>=, && - * , ||) to determine if a signal should be generated based on the event - * counts in the previously defined queries. - * + *

A rule case contains logical operations (>,>=, &&, ||) to determine if a signal should be generated + * based on the event counts in the previously defined queries.

* @return condition - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONDITION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCondition() { - return condition; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCondition() { + return condition; + } public void setCondition(String condition) { this.condition = condition; } - public SecurityMonitoringRuleCaseCreate name(String name) { this.name = name; return this; } /** - * Name of the case. - * + *

Name of the case.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringRuleCaseCreate notifications(List notifications) { this.notifications = notifications; return this; } - public SecurityMonitoringRuleCaseCreate addNotificationsItem(String notificationsItem) { if (this.notifications == null) { this.notifications = new ArrayList<>(); @@ -106,21 +115,19 @@ public SecurityMonitoringRuleCaseCreate addNotificationsItem(String notification } /** - * Notification targets for each rule case. - * + *

Notification targets for each rule case.

* @return notifications - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNotifications() { - return notifications; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNotifications() { + return notifications; + } public void setNotifications(List notifications) { this.notifications = notifications; } - public SecurityMonitoringRuleCaseCreate status(SecurityMonitoringRuleSeverity status) { this.status = status; this.unparsed |= !status.isValid(); @@ -128,24 +135,25 @@ public SecurityMonitoringRuleCaseCreate status(SecurityMonitoringRuleSeverity st } /** - * Severity of the Security Signal. - * + *

Severity of the Security Signal.

* @return status - */ - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringRuleSeverity getStatus() { - return status; - } - + **/ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringRuleSeverity getStatus() { + return status; + } public void setStatus(SecurityMonitoringRuleSeverity status) { if (!status.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.status = status; } - /** Return true if this SecurityMonitoringRuleCaseCreate object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleCaseCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -154,17 +162,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringRuleCaseCreate securityMonitoringRuleCaseCreate = - (SecurityMonitoringRuleCaseCreate) o; - return Objects.equals(this.condition, securityMonitoringRuleCaseCreate.condition) - && Objects.equals(this.name, securityMonitoringRuleCaseCreate.name) - && Objects.equals(this.notifications, securityMonitoringRuleCaseCreate.notifications) - && Objects.equals(this.status, securityMonitoringRuleCaseCreate.status); + SecurityMonitoringRuleCaseCreate securityMonitoringRuleCaseCreate = (SecurityMonitoringRuleCaseCreate) o; + return Objects.equals(this.condition, securityMonitoringRuleCaseCreate.condition) && Objects.equals(this.name, securityMonitoringRuleCaseCreate.name) && Objects.equals(this.notifications, securityMonitoringRuleCaseCreate.notifications) && Objects.equals(this.status, securityMonitoringRuleCaseCreate.status); } + @Override public int hashCode() { - return Objects.hash(condition, name, notifications, status); + return Objects.hash(condition,name,notifications,status); } @Override @@ -180,7 +185,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCreatePayload.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCreatePayload.java index f4cb311aa47..b44cad2b355 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCreatePayload.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleCreatePayload.java @@ -6,382 +6,311 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - SecurityMonitoringRuleCreatePayload.SecurityMonitoringRuleCreatePayloadDeserializer.class) -@JsonSerialize( - using = SecurityMonitoringRuleCreatePayload.SecurityMonitoringRuleCreatePayloadSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = SecurityMonitoringRuleCreatePayload.SecurityMonitoringRuleCreatePayloadDeserializer.class) +@JsonSerialize(using = SecurityMonitoringRuleCreatePayload.SecurityMonitoringRuleCreatePayloadSerializer.class) public class SecurityMonitoringRuleCreatePayload extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(SecurityMonitoringRuleCreatePayload.class.getName()); + private static final Logger log = Logger.getLogger(SecurityMonitoringRuleCreatePayload.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; + + public static class SecurityMonitoringRuleCreatePayloadSerializer extends StdSerializer { + public SecurityMonitoringRuleCreatePayloadSerializer(Class t) { + super(t); + } - public static class SecurityMonitoringRuleCreatePayloadSerializer - extends StdSerializer { - public SecurityMonitoringRuleCreatePayloadSerializer( - Class t) { - super(t); + public SecurityMonitoringRuleCreatePayloadSerializer() { + this(null); + } + + @Override + public void serialize(SecurityMonitoringRuleCreatePayload value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public SecurityMonitoringRuleCreatePayloadSerializer() { - this(null); + public static class SecurityMonitoringRuleCreatePayloadDeserializer extends StdDeserializer { + public SecurityMonitoringRuleCreatePayloadDeserializer() { + this(SecurityMonitoringRuleCreatePayload.class); + } + + public SecurityMonitoringRuleCreatePayloadDeserializer(Class vc) { + super(vc); + } + + @Override + public SecurityMonitoringRuleCreatePayload 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 SecurityMonitoringStandardRuleCreatePayload + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringStandardRuleCreatePayload.class.equals(Integer.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(Long.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(Float.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(Double.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(Boolean.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecurityMonitoringStandardRuleCreatePayload.class.equals(Integer.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecurityMonitoringStandardRuleCreatePayload.class.equals(Float.class) || SecurityMonitoringStandardRuleCreatePayload.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SecurityMonitoringStandardRuleCreatePayload.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecurityMonitoringStandardRuleCreatePayload.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringStandardRuleCreatePayload.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 (!((SecurityMonitoringStandardRuleCreatePayload)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringStandardRuleCreatePayload'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecurityMonitoringStandardRuleCreatePayload'", e); + } + + // deserialize SecurityMonitoringSignalRuleCreatePayload + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringSignalRuleCreatePayload.class.equals(Integer.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(Long.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(Float.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(Double.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(Boolean.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecurityMonitoringSignalRuleCreatePayload.class.equals(Integer.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecurityMonitoringSignalRuleCreatePayload.class.equals(Float.class) || SecurityMonitoringSignalRuleCreatePayload.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SecurityMonitoringSignalRuleCreatePayload.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecurityMonitoringSignalRuleCreatePayload.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringSignalRuleCreatePayload.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 (!((SecurityMonitoringSignalRuleCreatePayload)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringSignalRuleCreatePayload'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecurityMonitoringSignalRuleCreatePayload'", e); + } + + // deserialize CloudConfigurationRuleCreatePayload + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CloudConfigurationRuleCreatePayload.class.equals(Integer.class) || CloudConfigurationRuleCreatePayload.class.equals(Long.class) || CloudConfigurationRuleCreatePayload.class.equals(Float.class) || CloudConfigurationRuleCreatePayload.class.equals(Double.class) || CloudConfigurationRuleCreatePayload.class.equals(Boolean.class) || CloudConfigurationRuleCreatePayload.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CloudConfigurationRuleCreatePayload.class.equals(Integer.class) || CloudConfigurationRuleCreatePayload.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CloudConfigurationRuleCreatePayload.class.equals(Float.class) || CloudConfigurationRuleCreatePayload.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (CloudConfigurationRuleCreatePayload.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CloudConfigurationRuleCreatePayload.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(CloudConfigurationRuleCreatePayload.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 (!((CloudConfigurationRuleCreatePayload)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'CloudConfigurationRuleCreatePayload'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CloudConfigurationRuleCreatePayload'", e); + } + + SecurityMonitoringRuleCreatePayload ret = new SecurityMonitoringRuleCreatePayload(); + 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 SecurityMonitoringRuleCreatePayload getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SecurityMonitoringRuleCreatePayload cannot be null"); + } } - @Override - public void serialize( - SecurityMonitoringRuleCreatePayload value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SecurityMonitoringRuleCreatePayload() { + super("oneOf", Boolean.FALSE); + } + public SecurityMonitoringRuleCreatePayload(SecurityMonitoringStandardRuleCreatePayload o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SecurityMonitoringRuleCreatePayload(SecurityMonitoringSignalRuleCreatePayload o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SecurityMonitoringRuleCreatePayload(CloudConfigurationRuleCreatePayload o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class SecurityMonitoringRuleCreatePayloadDeserializer - extends StdDeserializer { - public SecurityMonitoringRuleCreatePayloadDeserializer() { - this(SecurityMonitoringRuleCreatePayload.class); + static { + schemas.put("SecurityMonitoringStandardRuleCreatePayload", new GenericType() { + }); + schemas.put("SecurityMonitoringSignalRuleCreatePayload", new GenericType() { + }); + schemas.put("CloudConfigurationRuleCreatePayload", new GenericType() { + }); + JSON.registerDescendants(SecurityMonitoringRuleCreatePayload.class, Collections.unmodifiableMap(schemas)); } - public SecurityMonitoringRuleCreatePayloadDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return SecurityMonitoringRuleCreatePayload.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SecurityMonitoringStandardRuleCreatePayload, SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public SecurityMonitoringRuleCreatePayload 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 SecurityMonitoringStandardRuleCreatePayload - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SecurityMonitoringStandardRuleCreatePayload.class.equals(Integer.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(Long.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(Float.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(Double.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(Boolean.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SecurityMonitoringStandardRuleCreatePayload.class.equals(Integer.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SecurityMonitoringStandardRuleCreatePayload.class.equals(Float.class) - || SecurityMonitoringStandardRuleCreatePayload.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SecurityMonitoringStandardRuleCreatePayload.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SecurityMonitoringStandardRuleCreatePayload.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SecurityMonitoringStandardRuleCreatePayload.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(SecurityMonitoringStandardRuleCreatePayload.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 (!((SecurityMonitoringStandardRuleCreatePayload) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, - "Input data matches schema 'SecurityMonitoringStandardRuleCreatePayload'"); + if (JSON.isInstanceOf(SecurityMonitoringSignalRuleCreatePayload.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SecurityMonitoringStandardRuleCreatePayload'", - e); - } - - // deserialize SecurityMonitoringSignalRuleCreatePayload - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SecurityMonitoringSignalRuleCreatePayload.class.equals(Integer.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(Long.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(Float.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(Double.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(Boolean.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SecurityMonitoringSignalRuleCreatePayload.class.equals(Integer.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SecurityMonitoringSignalRuleCreatePayload.class.equals(Float.class) - || SecurityMonitoringSignalRuleCreatePayload.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SecurityMonitoringSignalRuleCreatePayload.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SecurityMonitoringSignalRuleCreatePayload.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(CloudConfigurationRuleCreatePayload.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(SecurityMonitoringSignalRuleCreatePayload.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 (!((SecurityMonitoringSignalRuleCreatePayload) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'SecurityMonitoringSignalRuleCreatePayload'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SecurityMonitoringSignalRuleCreatePayload'", - e); - } - // deserialize CloudConfigurationRuleCreatePayload - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (CloudConfigurationRuleCreatePayload.class.equals(Integer.class) - || CloudConfigurationRuleCreatePayload.class.equals(Long.class) - || CloudConfigurationRuleCreatePayload.class.equals(Float.class) - || CloudConfigurationRuleCreatePayload.class.equals(Double.class) - || CloudConfigurationRuleCreatePayload.class.equals(Boolean.class) - || CloudConfigurationRuleCreatePayload.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((CloudConfigurationRuleCreatePayload.class.equals(Integer.class) - || CloudConfigurationRuleCreatePayload.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((CloudConfigurationRuleCreatePayload.class.equals(Float.class) - || CloudConfigurationRuleCreatePayload.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (CloudConfigurationRuleCreatePayload.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (CloudConfigurationRuleCreatePayload.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(CloudConfigurationRuleCreatePayload.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 (!((CloudConfigurationRuleCreatePayload) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'CloudConfigurationRuleCreatePayload'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'CloudConfigurationRuleCreatePayload'", - e); - } - - SecurityMonitoringRuleCreatePayload ret = new SecurityMonitoringRuleCreatePayload(); - 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; + throw new RuntimeException("Invalid instance type. Must be SecurityMonitoringStandardRuleCreatePayload, SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SecurityMonitoringStandardRuleCreatePayload, SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload + * + * @return The actual instance (SecurityMonitoringStandardRuleCreatePayload, SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload) + */ @Override - public SecurityMonitoringRuleCreatePayload getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "SecurityMonitoringRuleCreatePayload cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public SecurityMonitoringRuleCreatePayload() { - super("oneOf", Boolean.FALSE); - } - - public SecurityMonitoringRuleCreatePayload(SecurityMonitoringStandardRuleCreatePayload o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SecurityMonitoringRuleCreatePayload(SecurityMonitoringSignalRuleCreatePayload o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public SecurityMonitoringRuleCreatePayload(CloudConfigurationRuleCreatePayload o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - static { - schemas.put( - "SecurityMonitoringStandardRuleCreatePayload", - new GenericType() {}); - schemas.put( - "SecurityMonitoringSignalRuleCreatePayload", - new GenericType() {}); - schemas.put( - "CloudConfigurationRuleCreatePayload", - new GenericType() {}); - JSON.registerDescendants( - SecurityMonitoringRuleCreatePayload.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SecurityMonitoringRuleCreatePayload.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SecurityMonitoringStandardRuleCreatePayload, - * SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload - * - *

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( - SecurityMonitoringStandardRuleCreatePayload.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SecurityMonitoringSignalRuleCreatePayload.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - CloudConfigurationRuleCreatePayload.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SecurityMonitoringStandardRuleCreatePayload`. If the actual instance is not `SecurityMonitoringStandardRuleCreatePayload`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringStandardRuleCreatePayload` + * @throws ClassCastException if the instance is not `SecurityMonitoringStandardRuleCreatePayload` + */ + public SecurityMonitoringStandardRuleCreatePayload getSecurityMonitoringStandardRuleCreatePayload() throws ClassCastException { + return (SecurityMonitoringStandardRuleCreatePayload)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SecurityMonitoringSignalRuleCreatePayload`. If the actual instance is not `SecurityMonitoringSignalRuleCreatePayload`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringSignalRuleCreatePayload` + * @throws ClassCastException if the instance is not `SecurityMonitoringSignalRuleCreatePayload` + */ + public SecurityMonitoringSignalRuleCreatePayload getSecurityMonitoringSignalRuleCreatePayload() throws ClassCastException { + return (SecurityMonitoringSignalRuleCreatePayload)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SecurityMonitoringStandardRuleCreatePayload," - + " SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload"); - } - /** - * Get the actual instance, which can be the following: - * SecurityMonitoringStandardRuleCreatePayload, SecurityMonitoringSignalRuleCreatePayload, - * CloudConfigurationRuleCreatePayload - * - * @return The actual instance (SecurityMonitoringStandardRuleCreatePayload, - * SecurityMonitoringSignalRuleCreatePayload, CloudConfigurationRuleCreatePayload) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SecurityMonitoringStandardRuleCreatePayload`. If the actual - * instance is not `SecurityMonitoringStandardRuleCreatePayload`, the ClassCastException will be - * thrown. - * - * @return The actual instance of `SecurityMonitoringStandardRuleCreatePayload` - * @throws ClassCastException if the instance is not `SecurityMonitoringStandardRuleCreatePayload` - */ - public SecurityMonitoringStandardRuleCreatePayload - getSecurityMonitoringStandardRuleCreatePayload() throws ClassCastException { - return (SecurityMonitoringStandardRuleCreatePayload) super.getActualInstance(); - } - - /** - * Get the actual instance of `SecurityMonitoringSignalRuleCreatePayload`. If the actual instance - * is not `SecurityMonitoringSignalRuleCreatePayload`, the ClassCastException will be thrown. - * - * @return The actual instance of `SecurityMonitoringSignalRuleCreatePayload` - * @throws ClassCastException if the instance is not `SecurityMonitoringSignalRuleCreatePayload` - */ - public SecurityMonitoringSignalRuleCreatePayload getSecurityMonitoringSignalRuleCreatePayload() - throws ClassCastException { - return (SecurityMonitoringSignalRuleCreatePayload) super.getActualInstance(); - } - - /** - * Get the actual instance of `CloudConfigurationRuleCreatePayload`. If the actual instance is not - * `CloudConfigurationRuleCreatePayload`, the ClassCastException will be thrown. - * - * @return The actual instance of `CloudConfigurationRuleCreatePayload` - * @throws ClassCastException if the instance is not `CloudConfigurationRuleCreatePayload` - */ - public CloudConfigurationRuleCreatePayload getCloudConfigurationRuleCreatePayload() - throws ClassCastException { - return (CloudConfigurationRuleCreatePayload) super.getActualInstance(); - } + /** + * Get the actual instance of `CloudConfigurationRuleCreatePayload`. If the actual instance is not `CloudConfigurationRuleCreatePayload`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CloudConfigurationRuleCreatePayload` + * @throws ClassCastException if the instance is not `CloudConfigurationRuleCreatePayload` + */ + public CloudConfigurationRuleCreatePayload getCloudConfigurationRuleCreatePayload() throws ClassCastException { + return (CloudConfigurationRuleCreatePayload)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleDetectionMethod.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleDetectionMethod.java index 6e3a3d18c70..4853e173a26 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleDetectionMethod.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleDetectionMethod.java @@ -6,47 +6,55 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The detection method. */ -@JsonSerialize( - using = - SecurityMonitoringRuleDetectionMethod.SecurityMonitoringRuleDetectionMethodSerializer.class) +/** + *

The detection method.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleDetectionMethod.SecurityMonitoringRuleDetectionMethodSerializer.class) public class SecurityMonitoringRuleDetectionMethod { - public static final SecurityMonitoringRuleDetectionMethod THRESHOLD = - new SecurityMonitoringRuleDetectionMethod("threshold"); - public static final SecurityMonitoringRuleDetectionMethod NEW_VALUE = - new SecurityMonitoringRuleDetectionMethod("new_value"); - public static final SecurityMonitoringRuleDetectionMethod ANOMALY_DETECTION = - new SecurityMonitoringRuleDetectionMethod("anomaly_detection"); - public static final SecurityMonitoringRuleDetectionMethod IMPOSSIBLE_TRAVEL = - new SecurityMonitoringRuleDetectionMethod("impossible_travel"); - public static final SecurityMonitoringRuleDetectionMethod HARDCODED = - new SecurityMonitoringRuleDetectionMethod("hardcoded"); - public static final SecurityMonitoringRuleDetectionMethod THIRD_PARTY = - new SecurityMonitoringRuleDetectionMethod("third_party"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "threshold", - "new_value", - "anomaly_detection", - "impossible_travel", - "hardcoded", - "third_party")); + public static final SecurityMonitoringRuleDetectionMethod THRESHOLD = new SecurityMonitoringRuleDetectionMethod("threshold"); + public static final SecurityMonitoringRuleDetectionMethod NEW_VALUE = new SecurityMonitoringRuleDetectionMethod("new_value"); + public static final SecurityMonitoringRuleDetectionMethod ANOMALY_DETECTION = new SecurityMonitoringRuleDetectionMethod("anomaly_detection"); + public static final SecurityMonitoringRuleDetectionMethod IMPOSSIBLE_TRAVEL = new SecurityMonitoringRuleDetectionMethod("impossible_travel"); + public static final SecurityMonitoringRuleDetectionMethod HARDCODED = new SecurityMonitoringRuleDetectionMethod("hardcoded"); + public static final SecurityMonitoringRuleDetectionMethod THIRD_PARTY = new SecurityMonitoringRuleDetectionMethod("third_party"); + + private static final Set allowedValues = new HashSet(Arrays.asList("threshold", "new_value", "anomaly_detection", "impossible_travel", "hardcoded", "third_party")); private String value; @@ -58,25 +66,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleDetectionMethodSerializer - extends StdSerializer { - public SecurityMonitoringRuleDetectionMethodSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleDetectionMethodSerializer extends StdSerializer { + public SecurityMonitoringRuleDetectionMethodSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleDetectionMethodSerializer() { - this(null); - } + public SecurityMonitoringRuleDetectionMethodSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleDetectionMethod value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleDetectionMethod value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -88,7 +90,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleDetectionMethod object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleDetectionMethod object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleEvaluationWindow.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleEvaluationWindow.java index 77942aa4ad7..1610138e6a3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleEvaluationWindow.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleEvaluationWindow.java @@ -6,48 +6,58 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * A time window is specified to match when at least one of the cases matches true. This is a - * sliding window and evaluates in real time. + *

A time window is specified to match when at least one of the cases matches true. This is a sliding window + * and evaluates in real time.

*/ -@JsonSerialize( - using = - SecurityMonitoringRuleEvaluationWindow.SecurityMonitoringRuleEvaluationWindowSerializer - .class) +@JsonSerialize(using = SecurityMonitoringRuleEvaluationWindow.SecurityMonitoringRuleEvaluationWindowSerializer.class) public class SecurityMonitoringRuleEvaluationWindow { - public static final SecurityMonitoringRuleEvaluationWindow ZERO_MINUTES = - new SecurityMonitoringRuleEvaluationWindow(0); - public static final SecurityMonitoringRuleEvaluationWindow ONE_MINUTE = - new SecurityMonitoringRuleEvaluationWindow(60); - public static final SecurityMonitoringRuleEvaluationWindow FIVE_MINUTES = - new SecurityMonitoringRuleEvaluationWindow(300); - public static final SecurityMonitoringRuleEvaluationWindow TEN_MINUTES = - new SecurityMonitoringRuleEvaluationWindow(600); - public static final SecurityMonitoringRuleEvaluationWindow FIFTEEN_MINUTES = - new SecurityMonitoringRuleEvaluationWindow(900); - public static final SecurityMonitoringRuleEvaluationWindow THIRTY_MINUTES = - new SecurityMonitoringRuleEvaluationWindow(1800); - public static final SecurityMonitoringRuleEvaluationWindow ONE_HOUR = - new SecurityMonitoringRuleEvaluationWindow(3600); - public static final SecurityMonitoringRuleEvaluationWindow TWO_HOURS = - new SecurityMonitoringRuleEvaluationWindow(7200); - - private static final Set allowedValues = - new HashSet(Arrays.asList(0, 60, 300, 600, 900, 1800, 3600, 7200)); + public static final SecurityMonitoringRuleEvaluationWindow ZERO_MINUTES = new SecurityMonitoringRuleEvaluationWindow(0); + public static final SecurityMonitoringRuleEvaluationWindow ONE_MINUTE = new SecurityMonitoringRuleEvaluationWindow(60); + public static final SecurityMonitoringRuleEvaluationWindow FIVE_MINUTES = new SecurityMonitoringRuleEvaluationWindow(300); + public static final SecurityMonitoringRuleEvaluationWindow TEN_MINUTES = new SecurityMonitoringRuleEvaluationWindow(600); + public static final SecurityMonitoringRuleEvaluationWindow FIFTEEN_MINUTES = new SecurityMonitoringRuleEvaluationWindow(900); + public static final SecurityMonitoringRuleEvaluationWindow THIRTY_MINUTES = new SecurityMonitoringRuleEvaluationWindow(1800); + public static final SecurityMonitoringRuleEvaluationWindow ONE_HOUR = new SecurityMonitoringRuleEvaluationWindow(3600); + public static final SecurityMonitoringRuleEvaluationWindow TWO_HOURS = new SecurityMonitoringRuleEvaluationWindow(7200); + + private static final Set allowedValues = new HashSet(Arrays.asList(0, 60, 300, 600, 900, 1800, 3600, 7200)); private Integer value; @@ -59,25 +69,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleEvaluationWindowSerializer - extends StdSerializer { - public SecurityMonitoringRuleEvaluationWindowSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleEvaluationWindowSerializer extends StdSerializer { + public SecurityMonitoringRuleEvaluationWindowSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleEvaluationWindowSerializer() { - this(null); - } + public SecurityMonitoringRuleEvaluationWindowSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleEvaluationWindow value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleEvaluationWindow value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -89,7 +93,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleEvaluationWindow object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleEvaluationWindow object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleHardcodedEvaluatorType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleHardcodedEvaluatorType.java index 621ada49217..0b4d0829ab7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleHardcodedEvaluatorType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleHardcodedEvaluatorType.java @@ -6,28 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Hardcoded evaluator type. */ -@JsonSerialize( - using = - SecurityMonitoringRuleHardcodedEvaluatorType - .SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer.class) +/** + *

Hardcoded evaluator type.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleHardcodedEvaluatorType.SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer.class) public class SecurityMonitoringRuleHardcodedEvaluatorType { - public static final SecurityMonitoringRuleHardcodedEvaluatorType LOG4SHELL = - new SecurityMonitoringRuleHardcodedEvaluatorType("log4shell"); + public static final SecurityMonitoringRuleHardcodedEvaluatorType LOG4SHELL = new SecurityMonitoringRuleHardcodedEvaluatorType("log4shell"); private static final Set allowedValues = new HashSet(Arrays.asList("log4shell")); @@ -41,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer - extends StdSerializer { - public SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer extends StdSerializer { + public SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer() { - this(null); - } + public SecurityMonitoringRuleHardcodedEvaluatorTypeSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleHardcodedEvaluatorType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleHardcodedEvaluatorType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleHardcodedEvaluatorType object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleHardcodedEvaluatorType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleImpossibleTravelOptions.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleImpossibleTravelOptions.java index fb8ec19704f..2d57f040807 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleImpossibleTravelOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleImpossibleTravelOptions.java @@ -6,48 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Options on impossible travel rules. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Options on impossible travel rules.

+ */ @JsonPropertyOrder({ SecurityMonitoringRuleImpossibleTravelOptions.JSON_PROPERTY_BASELINE_USER_LOCATIONS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringRuleImpossibleTravelOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_BASELINE_USER_LOCATIONS = "baselineUserLocations"; private Boolean baselineUserLocations; - public SecurityMonitoringRuleImpossibleTravelOptions baselineUserLocations( - Boolean baselineUserLocations) { + public SecurityMonitoringRuleImpossibleTravelOptions baselineUserLocations(Boolean baselineUserLocations) { this.baselineUserLocations = baselineUserLocations; return this; } /** - * If true, signals are suppressed for the first 24 hours. In that time, Datadog learns the user's - * regular access locations. This can be helpful to reduce noise and infer VPN usage or - * credentialed API access. - * + *

If true, signals are suppressed for the first 24 hours. In that time, Datadog learns the user's regular + * access locations. This can be helpful to reduce noise and infer VPN usage or credentialed API access.

* @return baselineUserLocations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BASELINE_USER_LOCATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getBaselineUserLocations() { - return baselineUserLocations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASELINE_USER_LOCATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getBaselineUserLocations() { + return baselineUserLocations; + } public void setBaselineUserLocations(Boolean baselineUserLocations) { this.baselineUserLocations = baselineUserLocations; } - /** Return true if this SecurityMonitoringRuleImpossibleTravelOptions object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleImpossibleTravelOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,13 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringRuleImpossibleTravelOptions securityMonitoringRuleImpossibleTravelOptions = - (SecurityMonitoringRuleImpossibleTravelOptions) o; - return Objects.equals( - this.baselineUserLocations, - securityMonitoringRuleImpossibleTravelOptions.baselineUserLocations); + SecurityMonitoringRuleImpossibleTravelOptions securityMonitoringRuleImpossibleTravelOptions = (SecurityMonitoringRuleImpossibleTravelOptions) o; + return Objects.equals(this.baselineUserLocations, securityMonitoringRuleImpossibleTravelOptions.baselineUserLocations); } + @Override public int hashCode() { return Objects.hash(baselineUserLocations); @@ -72,15 +89,14 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecurityMonitoringRuleImpossibleTravelOptions {\n"); - sb.append(" baselineUserLocations: ") - .append(toIndentedString(baselineUserLocations)) - .append("\n"); + sb.append(" baselineUserLocations: ").append(toIndentedString(baselineUserLocations)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleKeepAlive.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleKeepAlive.java index 68fe89fa440..06aea95ecb3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleKeepAlive.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleKeepAlive.java @@ -6,50 +6,60 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Once a signal is generated, the signal will remain “open” if a case is matched at least once - * within this keep alive window. + *

Once a signal is generated, the signal will remain “open” if a case is matched at least once within + * this keep alive window.

*/ -@JsonSerialize( - using = SecurityMonitoringRuleKeepAlive.SecurityMonitoringRuleKeepAliveSerializer.class) +@JsonSerialize(using = SecurityMonitoringRuleKeepAlive.SecurityMonitoringRuleKeepAliveSerializer.class) public class SecurityMonitoringRuleKeepAlive { - public static final SecurityMonitoringRuleKeepAlive ZERO_MINUTES = - new SecurityMonitoringRuleKeepAlive(0); - public static final SecurityMonitoringRuleKeepAlive ONE_MINUTE = - new SecurityMonitoringRuleKeepAlive(60); - public static final SecurityMonitoringRuleKeepAlive FIVE_MINUTES = - new SecurityMonitoringRuleKeepAlive(300); - public static final SecurityMonitoringRuleKeepAlive TEN_MINUTES = - new SecurityMonitoringRuleKeepAlive(600); - public static final SecurityMonitoringRuleKeepAlive FIFTEEN_MINUTES = - new SecurityMonitoringRuleKeepAlive(900); - public static final SecurityMonitoringRuleKeepAlive THIRTY_MINUTES = - new SecurityMonitoringRuleKeepAlive(1800); - public static final SecurityMonitoringRuleKeepAlive ONE_HOUR = - new SecurityMonitoringRuleKeepAlive(3600); - public static final SecurityMonitoringRuleKeepAlive TWO_HOURS = - new SecurityMonitoringRuleKeepAlive(7200); - public static final SecurityMonitoringRuleKeepAlive THREE_HOURS = - new SecurityMonitoringRuleKeepAlive(10800); - public static final SecurityMonitoringRuleKeepAlive SIX_HOURS = - new SecurityMonitoringRuleKeepAlive(21600); - - private static final Set allowedValues = - new HashSet(Arrays.asList(0, 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600)); + public static final SecurityMonitoringRuleKeepAlive ZERO_MINUTES = new SecurityMonitoringRuleKeepAlive(0); + public static final SecurityMonitoringRuleKeepAlive ONE_MINUTE = new SecurityMonitoringRuleKeepAlive(60); + public static final SecurityMonitoringRuleKeepAlive FIVE_MINUTES = new SecurityMonitoringRuleKeepAlive(300); + public static final SecurityMonitoringRuleKeepAlive TEN_MINUTES = new SecurityMonitoringRuleKeepAlive(600); + public static final SecurityMonitoringRuleKeepAlive FIFTEEN_MINUTES = new SecurityMonitoringRuleKeepAlive(900); + public static final SecurityMonitoringRuleKeepAlive THIRTY_MINUTES = new SecurityMonitoringRuleKeepAlive(1800); + public static final SecurityMonitoringRuleKeepAlive ONE_HOUR = new SecurityMonitoringRuleKeepAlive(3600); + public static final SecurityMonitoringRuleKeepAlive TWO_HOURS = new SecurityMonitoringRuleKeepAlive(7200); + public static final SecurityMonitoringRuleKeepAlive THREE_HOURS = new SecurityMonitoringRuleKeepAlive(10800); + public static final SecurityMonitoringRuleKeepAlive SIX_HOURS = new SecurityMonitoringRuleKeepAlive(21600); + + private static final Set allowedValues = new HashSet(Arrays.asList(0, 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600)); private Integer value; @@ -61,22 +71,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleKeepAliveSerializer - extends StdSerializer { - public SecurityMonitoringRuleKeepAliveSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringRuleKeepAliveSerializer extends StdSerializer { + public SecurityMonitoringRuleKeepAliveSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleKeepAliveSerializer() { - this(null); - } + public SecurityMonitoringRuleKeepAliveSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleKeepAlive value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleKeepAlive value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -88,7 +95,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleKeepAlive object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleKeepAlive object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +111,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleMaxSignalDuration.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleMaxSignalDuration.java index 459c461c871..48679cf61aa 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleMaxSignalDuration.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleMaxSignalDuration.java @@ -6,57 +6,62 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * A signal will “close” regardless of the query being matched once the time exceeds the maximum - * duration. This time is calculated from the first seen timestamp. + *

A signal will “close” regardless of the query being matched once the time exceeds the maximum duration. + * This time is calculated from the first seen timestamp.

*/ -@JsonSerialize( - using = - SecurityMonitoringRuleMaxSignalDuration.SecurityMonitoringRuleMaxSignalDurationSerializer - .class) +@JsonSerialize(using = SecurityMonitoringRuleMaxSignalDuration.SecurityMonitoringRuleMaxSignalDurationSerializer.class) public class SecurityMonitoringRuleMaxSignalDuration { - public static final SecurityMonitoringRuleMaxSignalDuration ZERO_MINUTES = - new SecurityMonitoringRuleMaxSignalDuration(0); - public static final SecurityMonitoringRuleMaxSignalDuration ONE_MINUTE = - new SecurityMonitoringRuleMaxSignalDuration(60); - public static final SecurityMonitoringRuleMaxSignalDuration FIVE_MINUTES = - new SecurityMonitoringRuleMaxSignalDuration(300); - public static final SecurityMonitoringRuleMaxSignalDuration TEN_MINUTES = - new SecurityMonitoringRuleMaxSignalDuration(600); - public static final SecurityMonitoringRuleMaxSignalDuration FIFTEEN_MINUTES = - new SecurityMonitoringRuleMaxSignalDuration(900); - public static final SecurityMonitoringRuleMaxSignalDuration THIRTY_MINUTES = - new SecurityMonitoringRuleMaxSignalDuration(1800); - public static final SecurityMonitoringRuleMaxSignalDuration ONE_HOUR = - new SecurityMonitoringRuleMaxSignalDuration(3600); - public static final SecurityMonitoringRuleMaxSignalDuration TWO_HOURS = - new SecurityMonitoringRuleMaxSignalDuration(7200); - public static final SecurityMonitoringRuleMaxSignalDuration THREE_HOURS = - new SecurityMonitoringRuleMaxSignalDuration(10800); - public static final SecurityMonitoringRuleMaxSignalDuration SIX_HOURS = - new SecurityMonitoringRuleMaxSignalDuration(21600); - public static final SecurityMonitoringRuleMaxSignalDuration TWELVE_HOURS = - new SecurityMonitoringRuleMaxSignalDuration(43200); - public static final SecurityMonitoringRuleMaxSignalDuration ONE_DAY = - new SecurityMonitoringRuleMaxSignalDuration(86400); - - private static final Set allowedValues = - new HashSet( - Arrays.asList(0, 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400)); + public static final SecurityMonitoringRuleMaxSignalDuration ZERO_MINUTES = new SecurityMonitoringRuleMaxSignalDuration(0); + public static final SecurityMonitoringRuleMaxSignalDuration ONE_MINUTE = new SecurityMonitoringRuleMaxSignalDuration(60); + public static final SecurityMonitoringRuleMaxSignalDuration FIVE_MINUTES = new SecurityMonitoringRuleMaxSignalDuration(300); + public static final SecurityMonitoringRuleMaxSignalDuration TEN_MINUTES = new SecurityMonitoringRuleMaxSignalDuration(600); + public static final SecurityMonitoringRuleMaxSignalDuration FIFTEEN_MINUTES = new SecurityMonitoringRuleMaxSignalDuration(900); + public static final SecurityMonitoringRuleMaxSignalDuration THIRTY_MINUTES = new SecurityMonitoringRuleMaxSignalDuration(1800); + public static final SecurityMonitoringRuleMaxSignalDuration ONE_HOUR = new SecurityMonitoringRuleMaxSignalDuration(3600); + public static final SecurityMonitoringRuleMaxSignalDuration TWO_HOURS = new SecurityMonitoringRuleMaxSignalDuration(7200); + public static final SecurityMonitoringRuleMaxSignalDuration THREE_HOURS = new SecurityMonitoringRuleMaxSignalDuration(10800); + public static final SecurityMonitoringRuleMaxSignalDuration SIX_HOURS = new SecurityMonitoringRuleMaxSignalDuration(21600); + public static final SecurityMonitoringRuleMaxSignalDuration TWELVE_HOURS = new SecurityMonitoringRuleMaxSignalDuration(43200); + public static final SecurityMonitoringRuleMaxSignalDuration ONE_DAY = new SecurityMonitoringRuleMaxSignalDuration(86400); + + private static final Set allowedValues = new HashSet(Arrays.asList(0, 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400)); private Integer value; @@ -68,25 +73,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleMaxSignalDurationSerializer - extends StdSerializer { - public SecurityMonitoringRuleMaxSignalDurationSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleMaxSignalDurationSerializer extends StdSerializer { + public SecurityMonitoringRuleMaxSignalDurationSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleMaxSignalDurationSerializer() { - this(null); - } + public SecurityMonitoringRuleMaxSignalDurationSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleMaxSignalDuration value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleMaxSignalDuration value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -98,7 +97,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleMaxSignalDuration object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleMaxSignalDuration object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +113,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptions.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptions.java index a0775b00927..b2bc6354053 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptions.java @@ -6,149 +6,152 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Options on new value rules. */ + +/** + *

Options on new value rules.

+ */ @JsonPropertyOrder({ SecurityMonitoringRuleNewValueOptions.JSON_PROPERTY_FORGET_AFTER, SecurityMonitoringRuleNewValueOptions.JSON_PROPERTY_LEARNING_DURATION, SecurityMonitoringRuleNewValueOptions.JSON_PROPERTY_LEARNING_METHOD, SecurityMonitoringRuleNewValueOptions.JSON_PROPERTY_LEARNING_THRESHOLD }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringRuleNewValueOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORGET_AFTER = "forgetAfter"; private SecurityMonitoringRuleNewValueOptionsForgetAfter forgetAfter; public static final String JSON_PROPERTY_LEARNING_DURATION = "learningDuration"; - private SecurityMonitoringRuleNewValueOptionsLearningDuration learningDuration = - SecurityMonitoringRuleNewValueOptionsLearningDuration.ZERO_DAYS; + private SecurityMonitoringRuleNewValueOptionsLearningDuration learningDuration = SecurityMonitoringRuleNewValueOptionsLearningDuration.ZERO_DAYS; public static final String JSON_PROPERTY_LEARNING_METHOD = "learningMethod"; - private SecurityMonitoringRuleNewValueOptionsLearningMethod learningMethod = - SecurityMonitoringRuleNewValueOptionsLearningMethod.DURATION; + private SecurityMonitoringRuleNewValueOptionsLearningMethod learningMethod = SecurityMonitoringRuleNewValueOptionsLearningMethod.DURATION; public static final String JSON_PROPERTY_LEARNING_THRESHOLD = "learningThreshold"; - private SecurityMonitoringRuleNewValueOptionsLearningThreshold learningThreshold = - SecurityMonitoringRuleNewValueOptionsLearningThreshold.ZERO_OCCURRENCES; + private SecurityMonitoringRuleNewValueOptionsLearningThreshold learningThreshold = SecurityMonitoringRuleNewValueOptionsLearningThreshold.ZERO_OCCURRENCES; - public SecurityMonitoringRuleNewValueOptions forgetAfter( - SecurityMonitoringRuleNewValueOptionsForgetAfter forgetAfter) { + public SecurityMonitoringRuleNewValueOptions forgetAfter(SecurityMonitoringRuleNewValueOptionsForgetAfter forgetAfter) { this.forgetAfter = forgetAfter; this.unparsed |= !forgetAfter.isValid(); return this; } /** - * The duration in days after which a learned value is forgotten. - * + *

The duration in days after which a learned value is forgotten.

* @return forgetAfter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORGET_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleNewValueOptionsForgetAfter getForgetAfter() { - return forgetAfter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORGET_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleNewValueOptionsForgetAfter getForgetAfter() { + return forgetAfter; + } public void setForgetAfter(SecurityMonitoringRuleNewValueOptionsForgetAfter forgetAfter) { if (!forgetAfter.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.forgetAfter = forgetAfter; } - - public SecurityMonitoringRuleNewValueOptions learningDuration( - SecurityMonitoringRuleNewValueOptionsLearningDuration learningDuration) { + public SecurityMonitoringRuleNewValueOptions learningDuration(SecurityMonitoringRuleNewValueOptionsLearningDuration learningDuration) { this.learningDuration = learningDuration; this.unparsed |= !learningDuration.isValid(); return this; } /** - * The duration in days during which values are learned, and after which signals will be generated - * for values that weren't learned. If set to 0, a signal will be generated for all new values - * after the first value is learned. - * + *

The duration in days during which values are learned, and after which signals will be generated for values that + * weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned.

* @return learningDuration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEARNING_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleNewValueOptionsLearningDuration getLearningDuration() { - return learningDuration; - } - - public void setLearningDuration( - SecurityMonitoringRuleNewValueOptionsLearningDuration learningDuration) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEARNING_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleNewValueOptionsLearningDuration getLearningDuration() { + return learningDuration; + } + public void setLearningDuration(SecurityMonitoringRuleNewValueOptionsLearningDuration learningDuration) { if (!learningDuration.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.learningDuration = learningDuration; } - - public SecurityMonitoringRuleNewValueOptions learningMethod( - SecurityMonitoringRuleNewValueOptionsLearningMethod learningMethod) { + public SecurityMonitoringRuleNewValueOptions learningMethod(SecurityMonitoringRuleNewValueOptionsLearningMethod learningMethod) { this.learningMethod = learningMethod; this.unparsed |= !learningMethod.isValid(); return this; } /** - * The learning method used to determine when signals should be generated for values that weren't - * learned. - * + *

The learning method used to determine when signals should be generated for values that weren't learned.

* @return learningMethod - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEARNING_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleNewValueOptionsLearningMethod getLearningMethod() { - return learningMethod; - } - - public void setLearningMethod( - SecurityMonitoringRuleNewValueOptionsLearningMethod learningMethod) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEARNING_METHOD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleNewValueOptionsLearningMethod getLearningMethod() { + return learningMethod; + } + public void setLearningMethod(SecurityMonitoringRuleNewValueOptionsLearningMethod learningMethod) { if (!learningMethod.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.learningMethod = learningMethod; } - - public SecurityMonitoringRuleNewValueOptions learningThreshold( - SecurityMonitoringRuleNewValueOptionsLearningThreshold learningThreshold) { + public SecurityMonitoringRuleNewValueOptions learningThreshold(SecurityMonitoringRuleNewValueOptionsLearningThreshold learningThreshold) { this.learningThreshold = learningThreshold; this.unparsed |= !learningThreshold.isValid(); return this; } /** - * A number of occurrences after which signals will be generated for values that weren't learned. - * + *

A number of occurrences after which signals will be generated for values that weren't learned.

* @return learningThreshold - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEARNING_THRESHOLD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleNewValueOptionsLearningThreshold getLearningThreshold() { - return learningThreshold; - } - - public void setLearningThreshold( - SecurityMonitoringRuleNewValueOptionsLearningThreshold learningThreshold) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEARNING_THRESHOLD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleNewValueOptionsLearningThreshold getLearningThreshold() { + return learningThreshold; + } + public void setLearningThreshold(SecurityMonitoringRuleNewValueOptionsLearningThreshold learningThreshold) { if (!learningThreshold.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.learningThreshold = learningThreshold; } - /** Return true if this SecurityMonitoringRuleNewValueOptions object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleNewValueOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -157,19 +160,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringRuleNewValueOptions securityMonitoringRuleNewValueOptions = - (SecurityMonitoringRuleNewValueOptions) o; - return Objects.equals(this.forgetAfter, securityMonitoringRuleNewValueOptions.forgetAfter) - && Objects.equals( - this.learningDuration, securityMonitoringRuleNewValueOptions.learningDuration) - && Objects.equals(this.learningMethod, securityMonitoringRuleNewValueOptions.learningMethod) - && Objects.equals( - this.learningThreshold, securityMonitoringRuleNewValueOptions.learningThreshold); + SecurityMonitoringRuleNewValueOptions securityMonitoringRuleNewValueOptions = (SecurityMonitoringRuleNewValueOptions) o; + return Objects.equals(this.forgetAfter, securityMonitoringRuleNewValueOptions.forgetAfter) && Objects.equals(this.learningDuration, securityMonitoringRuleNewValueOptions.learningDuration) && Objects.equals(this.learningMethod, securityMonitoringRuleNewValueOptions.learningMethod) && Objects.equals(this.learningThreshold, securityMonitoringRuleNewValueOptions.learningThreshold); } + @Override public int hashCode() { - return Objects.hash(forgetAfter, learningDuration, learningMethod, learningThreshold); + return Objects.hash(forgetAfter,learningDuration,learningMethod,learningThreshold); } @Override @@ -185,7 +183,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsForgetAfter.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsForgetAfter.java index a221371f2a6..43ffbea6655 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsForgetAfter.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsForgetAfter.java @@ -6,41 +6,55 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The duration in days after which a learned value is forgotten. */ -@JsonSerialize( - using = - SecurityMonitoringRuleNewValueOptionsForgetAfter - .SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer.class) +/** + *

The duration in days after which a learned value is forgotten.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleNewValueOptionsForgetAfter.SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer.class) public class SecurityMonitoringRuleNewValueOptionsForgetAfter { - public static final SecurityMonitoringRuleNewValueOptionsForgetAfter ONE_DAY = - new SecurityMonitoringRuleNewValueOptionsForgetAfter(1); - public static final SecurityMonitoringRuleNewValueOptionsForgetAfter TWO_DAYS = - new SecurityMonitoringRuleNewValueOptionsForgetAfter(2); - public static final SecurityMonitoringRuleNewValueOptionsForgetAfter ONE_WEEK = - new SecurityMonitoringRuleNewValueOptionsForgetAfter(7); - public static final SecurityMonitoringRuleNewValueOptionsForgetAfter TWO_WEEKS = - new SecurityMonitoringRuleNewValueOptionsForgetAfter(14); - public static final SecurityMonitoringRuleNewValueOptionsForgetAfter THREE_WEEKS = - new SecurityMonitoringRuleNewValueOptionsForgetAfter(21); - public static final SecurityMonitoringRuleNewValueOptionsForgetAfter FOUR_WEEKS = - new SecurityMonitoringRuleNewValueOptionsForgetAfter(28); - - private static final Set allowedValues = - new HashSet(Arrays.asList(1, 2, 7, 14, 21, 28)); + public static final SecurityMonitoringRuleNewValueOptionsForgetAfter ONE_DAY = new SecurityMonitoringRuleNewValueOptionsForgetAfter(1); + public static final SecurityMonitoringRuleNewValueOptionsForgetAfter TWO_DAYS = new SecurityMonitoringRuleNewValueOptionsForgetAfter(2); + public static final SecurityMonitoringRuleNewValueOptionsForgetAfter ONE_WEEK = new SecurityMonitoringRuleNewValueOptionsForgetAfter(7); + public static final SecurityMonitoringRuleNewValueOptionsForgetAfter TWO_WEEKS = new SecurityMonitoringRuleNewValueOptionsForgetAfter(14); + public static final SecurityMonitoringRuleNewValueOptionsForgetAfter THREE_WEEKS = new SecurityMonitoringRuleNewValueOptionsForgetAfter(21); + public static final SecurityMonitoringRuleNewValueOptionsForgetAfter FOUR_WEEKS = new SecurityMonitoringRuleNewValueOptionsForgetAfter(28); + + private static final Set allowedValues = new HashSet(Arrays.asList(1, 2, 7, 14, 21, 28)); private Integer value; @@ -52,25 +66,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer - extends StdSerializer { - public SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer extends StdSerializer { + public SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer() { - this(null); - } + public SecurityMonitoringRuleNewValueOptionsForgetAfterSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleNewValueOptionsForgetAfter value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleNewValueOptionsForgetAfter value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -82,7 +90,9 @@ public void setValue(Integer value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleNewValueOptionsForgetAfter object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleNewValueOptionsForgetAfter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +106,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningDuration.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningDuration.java index 05536fba0ec..3f4ce7e074e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningDuration.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningDuration.java @@ -6,36 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The duration in days during which values are learned, and after which signals will be generated - * for values that weren't learned. If set to 0, a signal will be generated for all new values after - * the first value is learned. + *

The duration in days during which values are learned, and after which signals will be generated for values that + * weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned.

*/ -@JsonSerialize( - using = - SecurityMonitoringRuleNewValueOptionsLearningDuration - .SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer.class) +@JsonSerialize(using = SecurityMonitoringRuleNewValueOptionsLearningDuration.SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer.class) public class SecurityMonitoringRuleNewValueOptionsLearningDuration { - public static final SecurityMonitoringRuleNewValueOptionsLearningDuration ZERO_DAYS = - new SecurityMonitoringRuleNewValueOptionsLearningDuration(0); - public static final SecurityMonitoringRuleNewValueOptionsLearningDuration ONE_DAY = - new SecurityMonitoringRuleNewValueOptionsLearningDuration(1); - public static final SecurityMonitoringRuleNewValueOptionsLearningDuration SEVEN_DAYS = - new SecurityMonitoringRuleNewValueOptionsLearningDuration(7); + public static final SecurityMonitoringRuleNewValueOptionsLearningDuration ZERO_DAYS = new SecurityMonitoringRuleNewValueOptionsLearningDuration(0); + public static final SecurityMonitoringRuleNewValueOptionsLearningDuration ONE_DAY = new SecurityMonitoringRuleNewValueOptionsLearningDuration(1); + public static final SecurityMonitoringRuleNewValueOptionsLearningDuration SEVEN_DAYS = new SecurityMonitoringRuleNewValueOptionsLearningDuration(7); private static final Set allowedValues = new HashSet(Arrays.asList(0, 1, 7)); @@ -49,25 +64,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer - extends StdSerializer { - public SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer extends StdSerializer { + public SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer() { - this(null); - } + public SecurityMonitoringRuleNewValueOptionsLearningDurationSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleNewValueOptionsLearningDuration value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleNewValueOptionsLearningDuration value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -95,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningMethod.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningMethod.java index 5194d3a4650..dc99d0e6b96 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningMethod.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningMethod.java @@ -6,36 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * The learning method used to determine when signals should be generated for values that weren't - * learned. + *

The learning method used to determine when signals should be generated for values that weren't learned.

*/ -@JsonSerialize( - using = - SecurityMonitoringRuleNewValueOptionsLearningMethod - .SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer.class) +@JsonSerialize(using = SecurityMonitoringRuleNewValueOptionsLearningMethod.SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer.class) public class SecurityMonitoringRuleNewValueOptionsLearningMethod { - public static final SecurityMonitoringRuleNewValueOptionsLearningMethod DURATION = - new SecurityMonitoringRuleNewValueOptionsLearningMethod("duration"); - public static final SecurityMonitoringRuleNewValueOptionsLearningMethod THRESHOLD = - new SecurityMonitoringRuleNewValueOptionsLearningMethod("threshold"); + public static final SecurityMonitoringRuleNewValueOptionsLearningMethod DURATION = new SecurityMonitoringRuleNewValueOptionsLearningMethod("duration"); + public static final SecurityMonitoringRuleNewValueOptionsLearningMethod THRESHOLD = new SecurityMonitoringRuleNewValueOptionsLearningMethod("threshold"); - private static final Set allowedValues = - new HashSet(Arrays.asList("duration", "threshold")); + private static final Set allowedValues = new HashSet(Arrays.asList("duration", "threshold")); private String value; @@ -47,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer - extends StdSerializer { - public SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer extends StdSerializer { + public SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer() { - this(null); - } + public SecurityMonitoringRuleNewValueOptionsLearningMethodSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleNewValueOptionsLearningMethod value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleNewValueOptionsLearningMethod value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -93,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningThreshold.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningThreshold.java index 04fbcffe532..998839b5d15 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningThreshold.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleNewValueOptionsLearningThreshold.java @@ -6,32 +6,49 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * A number of occurrences after which signals will be generated for values that weren't learned. + *

A number of occurrences after which signals will be generated for values that weren't learned.

*/ -@JsonSerialize( - using = - SecurityMonitoringRuleNewValueOptionsLearningThreshold - .SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer.class) +@JsonSerialize(using = SecurityMonitoringRuleNewValueOptionsLearningThreshold.SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer.class) public class SecurityMonitoringRuleNewValueOptionsLearningThreshold { - public static final SecurityMonitoringRuleNewValueOptionsLearningThreshold ZERO_OCCURRENCES = - new SecurityMonitoringRuleNewValueOptionsLearningThreshold(0); - public static final SecurityMonitoringRuleNewValueOptionsLearningThreshold ONE_OCCURRENCE = - new SecurityMonitoringRuleNewValueOptionsLearningThreshold(1); + public static final SecurityMonitoringRuleNewValueOptionsLearningThreshold ZERO_OCCURRENCES = new SecurityMonitoringRuleNewValueOptionsLearningThreshold(0); + public static final SecurityMonitoringRuleNewValueOptionsLearningThreshold ONE_OCCURRENCE = new SecurityMonitoringRuleNewValueOptionsLearningThreshold(1); private static final Set allowedValues = new HashSet(Arrays.asList(0, 1)); @@ -45,25 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer - extends StdSerializer { - public SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer extends StdSerializer { + public SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer() { - this(null); - } + public SecurityMonitoringRuleNewValueOptionsLearningThresholdSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleNewValueOptionsLearningThreshold value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleNewValueOptionsLearningThreshold value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -76,8 +87,7 @@ public void setValue(Integer value) { } /** - * Return true if this SecurityMonitoringRuleNewValueOptionsLearningThreshold object is equal to - * o. + * Return true if this SecurityMonitoringRuleNewValueOptionsLearningThreshold object is equal to o. */ @Override public boolean equals(Object o) { @@ -92,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleOptions.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleOptions.java index ed13840e242..8912d162b7e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleOptions.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Options on rules. */ + +/** + *

Options on rules.

+ */ @JsonPropertyOrder({ SecurityMonitoringRuleOptions.JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS, SecurityMonitoringRuleOptions.JSON_PROPERTY_DECREASE_CRITICALITY_BASED_ON_ENV, @@ -24,15 +44,14 @@ SecurityMonitoringRuleOptions.JSON_PROPERTY_MAX_SIGNAL_DURATION, SecurityMonitoringRuleOptions.JSON_PROPERTY_NEW_VALUE_OPTIONS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringRuleOptions { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS = "complianceRuleOptions"; private CloudConfigurationComplianceRuleOptions complianceRuleOptions; - public static final String JSON_PROPERTY_DECREASE_CRITICALITY_BASED_ON_ENV = - "decreaseCriticalityBasedOnEnv"; + public static final String JSON_PROPERTY_DECREASE_CRITICALITY_BASED_ON_ENV = "decreaseCriticalityBasedOnEnv"; private Boolean decreaseCriticalityBasedOnEnv; public static final String JSON_PROPERTY_DETECTION_METHOD = "detectionMethod"; @@ -56,162 +75,138 @@ public class SecurityMonitoringRuleOptions { public static final String JSON_PROPERTY_NEW_VALUE_OPTIONS = "newValueOptions"; private SecurityMonitoringRuleNewValueOptions newValueOptions; - public SecurityMonitoringRuleOptions complianceRuleOptions( - CloudConfigurationComplianceRuleOptions complianceRuleOptions) { + public SecurityMonitoringRuleOptions complianceRuleOptions(CloudConfigurationComplianceRuleOptions complianceRuleOptions) { this.complianceRuleOptions = complianceRuleOptions; this.unparsed |= complianceRuleOptions.unparsed; return this; } /** - * Options for cloud_configuration rules. Fields resourceType and regoRule - * are mandatory when managing custom cloud_configuration rules. - * + *

Options for cloud_configuration rules. + * Fields resourceType and regoRule are mandatory when managing custom cloud_configuration rules.

* @return complianceRuleOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudConfigurationComplianceRuleOptions getComplianceRuleOptions() { - return complianceRuleOptions; - } - - public void setComplianceRuleOptions( - CloudConfigurationComplianceRuleOptions complianceRuleOptions) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLIANCE_RULE_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudConfigurationComplianceRuleOptions getComplianceRuleOptions() { + return complianceRuleOptions; + } + public void setComplianceRuleOptions(CloudConfigurationComplianceRuleOptions complianceRuleOptions) { this.complianceRuleOptions = complianceRuleOptions; } - - public SecurityMonitoringRuleOptions decreaseCriticalityBasedOnEnv( - Boolean decreaseCriticalityBasedOnEnv) { + public SecurityMonitoringRuleOptions decreaseCriticalityBasedOnEnv(Boolean decreaseCriticalityBasedOnEnv) { this.decreaseCriticalityBasedOnEnv = decreaseCriticalityBasedOnEnv; return this; } /** - * If true, signals in non-production environments have a lower severity than what is defined by - * the rule case, which can reduce signal noise. The severity is decreased by one level: - * CRITICAL in production becomes HIGH in non-production, HIGH - * becomes MEDIUM and so on. INFO remains INFO. The - * decrement is applied when the environment tag of the signal starts with staging, - * test or dev. - * + *

If true, signals in non-production environments have a lower severity than what is defined by the rule case, which can reduce signal noise. + * The severity is decreased by one level: CRITICAL in production becomes HIGH in non-production, HIGH becomes MEDIUM and so on. INFO remains INFO. + * The decrement is applied when the environment tag of the signal starts with staging, test or dev.

* @return decreaseCriticalityBasedOnEnv - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECREASE_CRITICALITY_BASED_ON_ENV) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDecreaseCriticalityBasedOnEnv() { - return decreaseCriticalityBasedOnEnv; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECREASE_CRITICALITY_BASED_ON_ENV) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDecreaseCriticalityBasedOnEnv() { + return decreaseCriticalityBasedOnEnv; + } public void setDecreaseCriticalityBasedOnEnv(Boolean decreaseCriticalityBasedOnEnv) { this.decreaseCriticalityBasedOnEnv = decreaseCriticalityBasedOnEnv; } - - public SecurityMonitoringRuleOptions detectionMethod( - SecurityMonitoringRuleDetectionMethod detectionMethod) { + public SecurityMonitoringRuleOptions detectionMethod(SecurityMonitoringRuleDetectionMethod detectionMethod) { this.detectionMethod = detectionMethod; this.unparsed |= !detectionMethod.isValid(); return this; } /** - * The detection method. - * + *

The detection method.

* @return detectionMethod - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETECTION_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleDetectionMethod getDetectionMethod() { - return detectionMethod; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETECTION_METHOD) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleDetectionMethod getDetectionMethod() { + return detectionMethod; + } public void setDetectionMethod(SecurityMonitoringRuleDetectionMethod detectionMethod) { if (!detectionMethod.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.detectionMethod = detectionMethod; } - - public SecurityMonitoringRuleOptions evaluationWindow( - SecurityMonitoringRuleEvaluationWindow evaluationWindow) { + public SecurityMonitoringRuleOptions evaluationWindow(SecurityMonitoringRuleEvaluationWindow evaluationWindow) { this.evaluationWindow = evaluationWindow; this.unparsed |= !evaluationWindow.isValid(); return this; } /** - * A time window is specified to match when at least one of the cases matches true. This is a - * sliding window and evaluates in real time. - * + *

A time window is specified to match when at least one of the cases matches true. This is a sliding window + * and evaluates in real time.

* @return evaluationWindow - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVALUATION_WINDOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleEvaluationWindow getEvaluationWindow() { - return evaluationWindow; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_WINDOW) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleEvaluationWindow getEvaluationWindow() { + return evaluationWindow; + } public void setEvaluationWindow(SecurityMonitoringRuleEvaluationWindow evaluationWindow) { if (!evaluationWindow.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.evaluationWindow = evaluationWindow; } - - public SecurityMonitoringRuleOptions hardcodedEvaluatorType( - SecurityMonitoringRuleHardcodedEvaluatorType hardcodedEvaluatorType) { + public SecurityMonitoringRuleOptions hardcodedEvaluatorType(SecurityMonitoringRuleHardcodedEvaluatorType hardcodedEvaluatorType) { this.hardcodedEvaluatorType = hardcodedEvaluatorType; this.unparsed |= !hardcodedEvaluatorType.isValid(); return this; } /** - * Hardcoded evaluator type. - * + *

Hardcoded evaluator type.

* @return hardcodedEvaluatorType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HARDCODED_EVALUATOR_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleHardcodedEvaluatorType getHardcodedEvaluatorType() { - return hardcodedEvaluatorType; - } - - public void setHardcodedEvaluatorType( - SecurityMonitoringRuleHardcodedEvaluatorType hardcodedEvaluatorType) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HARDCODED_EVALUATOR_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleHardcodedEvaluatorType getHardcodedEvaluatorType() { + return hardcodedEvaluatorType; + } + public void setHardcodedEvaluatorType(SecurityMonitoringRuleHardcodedEvaluatorType hardcodedEvaluatorType) { if (!hardcodedEvaluatorType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.hardcodedEvaluatorType = hardcodedEvaluatorType; } - - public SecurityMonitoringRuleOptions impossibleTravelOptions( - SecurityMonitoringRuleImpossibleTravelOptions impossibleTravelOptions) { + public SecurityMonitoringRuleOptions impossibleTravelOptions(SecurityMonitoringRuleImpossibleTravelOptions impossibleTravelOptions) { this.impossibleTravelOptions = impossibleTravelOptions; this.unparsed |= impossibleTravelOptions.unparsed; return this; } /** - * Options on impossible travel rules. - * + *

Options on impossible travel rules.

* @return impossibleTravelOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IMPOSSIBLE_TRAVEL_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleImpossibleTravelOptions getImpossibleTravelOptions() { - return impossibleTravelOptions; - } - - public void setImpossibleTravelOptions( - SecurityMonitoringRuleImpossibleTravelOptions impossibleTravelOptions) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPOSSIBLE_TRAVEL_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleImpossibleTravelOptions getImpossibleTravelOptions() { + return impossibleTravelOptions; + } + public void setImpossibleTravelOptions(SecurityMonitoringRuleImpossibleTravelOptions impossibleTravelOptions) { this.impossibleTravelOptions = impossibleTravelOptions; } - public SecurityMonitoringRuleOptions keepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { this.keepAlive = keepAlive; this.unparsed |= !keepAlive.isValid(); @@ -219,76 +214,71 @@ public SecurityMonitoringRuleOptions keepAlive(SecurityMonitoringRuleKeepAlive k } /** - * Once a signal is generated, the signal will remain “open” if a case is matched at least once - * within this keep alive window. - * + *

Once a signal is generated, the signal will remain “open” if a case is matched at least once within + * this keep alive window.

* @return keepAlive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KEEP_ALIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleKeepAlive getKeepAlive() { - return keepAlive; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEEP_ALIVE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleKeepAlive getKeepAlive() { + return keepAlive; + } public void setKeepAlive(SecurityMonitoringRuleKeepAlive keepAlive) { if (!keepAlive.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.keepAlive = keepAlive; } - - public SecurityMonitoringRuleOptions maxSignalDuration( - SecurityMonitoringRuleMaxSignalDuration maxSignalDuration) { + public SecurityMonitoringRuleOptions maxSignalDuration(SecurityMonitoringRuleMaxSignalDuration maxSignalDuration) { this.maxSignalDuration = maxSignalDuration; this.unparsed |= !maxSignalDuration.isValid(); return this; } /** - * A signal will “close” regardless of the query being matched once the time exceeds the maximum - * duration. This time is calculated from the first seen timestamp. - * + *

A signal will “close” regardless of the query being matched once the time exceeds the maximum duration. + * This time is calculated from the first seen timestamp.

* @return maxSignalDuration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAX_SIGNAL_DURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleMaxSignalDuration getMaxSignalDuration() { - return maxSignalDuration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_SIGNAL_DURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleMaxSignalDuration getMaxSignalDuration() { + return maxSignalDuration; + } public void setMaxSignalDuration(SecurityMonitoringRuleMaxSignalDuration maxSignalDuration) { if (!maxSignalDuration.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.maxSignalDuration = maxSignalDuration; } - - public SecurityMonitoringRuleOptions newValueOptions( - SecurityMonitoringRuleNewValueOptions newValueOptions) { + public SecurityMonitoringRuleOptions newValueOptions(SecurityMonitoringRuleNewValueOptions newValueOptions) { this.newValueOptions = newValueOptions; this.unparsed |= newValueOptions.unparsed; return this; } /** - * Options on new value rules. - * + *

Options on new value rules.

* @return newValueOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEW_VALUE_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleNewValueOptions getNewValueOptions() { - return newValueOptions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_VALUE_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleNewValueOptions getNewValueOptions() { + return newValueOptions; + } public void setNewValueOptions(SecurityMonitoringRuleNewValueOptions newValueOptions) { this.newValueOptions = newValueOptions; } - /** Return true if this SecurityMonitoringRuleOptions object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleOptions object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -298,54 +288,25 @@ public boolean equals(Object o) { return false; } SecurityMonitoringRuleOptions securityMonitoringRuleOptions = (SecurityMonitoringRuleOptions) o; - return Objects.equals( - this.complianceRuleOptions, securityMonitoringRuleOptions.complianceRuleOptions) - && Objects.equals( - this.decreaseCriticalityBasedOnEnv, - securityMonitoringRuleOptions.decreaseCriticalityBasedOnEnv) - && Objects.equals(this.detectionMethod, securityMonitoringRuleOptions.detectionMethod) - && Objects.equals(this.evaluationWindow, securityMonitoringRuleOptions.evaluationWindow) - && Objects.equals( - this.hardcodedEvaluatorType, securityMonitoringRuleOptions.hardcodedEvaluatorType) - && Objects.equals( - this.impossibleTravelOptions, securityMonitoringRuleOptions.impossibleTravelOptions) - && Objects.equals(this.keepAlive, securityMonitoringRuleOptions.keepAlive) - && Objects.equals(this.maxSignalDuration, securityMonitoringRuleOptions.maxSignalDuration) - && Objects.equals(this.newValueOptions, securityMonitoringRuleOptions.newValueOptions); + return Objects.equals(this.complianceRuleOptions, securityMonitoringRuleOptions.complianceRuleOptions) && Objects.equals(this.decreaseCriticalityBasedOnEnv, securityMonitoringRuleOptions.decreaseCriticalityBasedOnEnv) && Objects.equals(this.detectionMethod, securityMonitoringRuleOptions.detectionMethod) && Objects.equals(this.evaluationWindow, securityMonitoringRuleOptions.evaluationWindow) && Objects.equals(this.hardcodedEvaluatorType, securityMonitoringRuleOptions.hardcodedEvaluatorType) && Objects.equals(this.impossibleTravelOptions, securityMonitoringRuleOptions.impossibleTravelOptions) && Objects.equals(this.keepAlive, securityMonitoringRuleOptions.keepAlive) && Objects.equals(this.maxSignalDuration, securityMonitoringRuleOptions.maxSignalDuration) && Objects.equals(this.newValueOptions, securityMonitoringRuleOptions.newValueOptions); } + @Override public int hashCode() { - return Objects.hash( - complianceRuleOptions, - decreaseCriticalityBasedOnEnv, - detectionMethod, - evaluationWindow, - hardcodedEvaluatorType, - impossibleTravelOptions, - keepAlive, - maxSignalDuration, - newValueOptions); + return Objects.hash(complianceRuleOptions,decreaseCriticalityBasedOnEnv,detectionMethod,evaluationWindow,hardcodedEvaluatorType,impossibleTravelOptions,keepAlive,maxSignalDuration,newValueOptions); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecurityMonitoringRuleOptions {\n"); - sb.append(" complianceRuleOptions: ") - .append(toIndentedString(complianceRuleOptions)) - .append("\n"); - sb.append(" decreaseCriticalityBasedOnEnv: ") - .append(toIndentedString(decreaseCriticalityBasedOnEnv)) - .append("\n"); + sb.append(" complianceRuleOptions: ").append(toIndentedString(complianceRuleOptions)).append("\n"); + sb.append(" decreaseCriticalityBasedOnEnv: ").append(toIndentedString(decreaseCriticalityBasedOnEnv)).append("\n"); sb.append(" detectionMethod: ").append(toIndentedString(detectionMethod)).append("\n"); sb.append(" evaluationWindow: ").append(toIndentedString(evaluationWindow)).append("\n"); - sb.append(" hardcodedEvaluatorType: ") - .append(toIndentedString(hardcodedEvaluatorType)) - .append("\n"); - sb.append(" impossibleTravelOptions: ") - .append(toIndentedString(impossibleTravelOptions)) - .append("\n"); + sb.append(" hardcodedEvaluatorType: ").append(toIndentedString(hardcodedEvaluatorType)).append("\n"); + sb.append(" impossibleTravelOptions: ").append(toIndentedString(impossibleTravelOptions)).append("\n"); sb.append(" keepAlive: ").append(toIndentedString(keepAlive)).append("\n"); sb.append(" maxSignalDuration: ").append(toIndentedString(maxSignalDuration)).append("\n"); sb.append(" newValueOptions: ").append(toIndentedString(newValueOptions)).append("\n"); @@ -354,7 +315,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQuery.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQuery.java index 8f2a6368edd..6e53d3a95f2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQuery.java @@ -6,293 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = SecurityMonitoringRuleQuery.SecurityMonitoringRuleQueryDeserializer.class) @JsonSerialize(using = SecurityMonitoringRuleQuery.SecurityMonitoringRuleQuerySerializer.class) public class SecurityMonitoringRuleQuery extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(SecurityMonitoringRuleQuery.class.getName()); + private static final Logger log = Logger.getLogger(SecurityMonitoringRuleQuery.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class SecurityMonitoringRuleQuerySerializer extends StdSerializer { + public SecurityMonitoringRuleQuerySerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public SecurityMonitoringRuleQuerySerializer() { + this(null); + } - public static class SecurityMonitoringRuleQuerySerializer - extends StdSerializer { - public SecurityMonitoringRuleQuerySerializer(Class t) { - super(t); + @Override + public void serialize(SecurityMonitoringRuleQuery value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public SecurityMonitoringRuleQuerySerializer() { - this(null); + public static class SecurityMonitoringRuleQueryDeserializer extends StdDeserializer { + public SecurityMonitoringRuleQueryDeserializer() { + this(SecurityMonitoringRuleQuery.class); + } + + public SecurityMonitoringRuleQueryDeserializer(Class vc) { + super(vc); + } + + @Override + public SecurityMonitoringRuleQuery 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 SecurityMonitoringStandardRuleQuery + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringStandardRuleQuery.class.equals(Integer.class) || SecurityMonitoringStandardRuleQuery.class.equals(Long.class) || SecurityMonitoringStandardRuleQuery.class.equals(Float.class) || SecurityMonitoringStandardRuleQuery.class.equals(Double.class) || SecurityMonitoringStandardRuleQuery.class.equals(Boolean.class) || SecurityMonitoringStandardRuleQuery.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecurityMonitoringStandardRuleQuery.class.equals(Integer.class) || SecurityMonitoringStandardRuleQuery.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecurityMonitoringStandardRuleQuery.class.equals(Float.class) || SecurityMonitoringStandardRuleQuery.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SecurityMonitoringStandardRuleQuery.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecurityMonitoringStandardRuleQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringStandardRuleQuery.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 (!((SecurityMonitoringStandardRuleQuery)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringStandardRuleQuery'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecurityMonitoringStandardRuleQuery'", e); + } + + // deserialize SecurityMonitoringSignalRuleQuery + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringSignalRuleQuery.class.equals(Integer.class) || SecurityMonitoringSignalRuleQuery.class.equals(Long.class) || SecurityMonitoringSignalRuleQuery.class.equals(Float.class) || SecurityMonitoringSignalRuleQuery.class.equals(Double.class) || SecurityMonitoringSignalRuleQuery.class.equals(Boolean.class) || SecurityMonitoringSignalRuleQuery.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecurityMonitoringSignalRuleQuery.class.equals(Integer.class) || SecurityMonitoringSignalRuleQuery.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecurityMonitoringSignalRuleQuery.class.equals(Float.class) || SecurityMonitoringSignalRuleQuery.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SecurityMonitoringSignalRuleQuery.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecurityMonitoringSignalRuleQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringSignalRuleQuery.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 (!((SecurityMonitoringSignalRuleQuery)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringSignalRuleQuery'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecurityMonitoringSignalRuleQuery'", e); + } + + SecurityMonitoringRuleQuery ret = new SecurityMonitoringRuleQuery(); + 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 SecurityMonitoringRuleQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SecurityMonitoringRuleQuery cannot be null"); + } } - @Override - public void serialize( - SecurityMonitoringRuleQuery value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SecurityMonitoringRuleQuery() { + super("oneOf", Boolean.FALSE); + } + public SecurityMonitoringRuleQuery(SecurityMonitoringStandardRuleQuery o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SecurityMonitoringRuleQuery(SecurityMonitoringSignalRuleQuery o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class SecurityMonitoringRuleQueryDeserializer - extends StdDeserializer { - public SecurityMonitoringRuleQueryDeserializer() { - this(SecurityMonitoringRuleQuery.class); + static { + schemas.put("SecurityMonitoringStandardRuleQuery", new GenericType() { + }); + schemas.put("SecurityMonitoringSignalRuleQuery", new GenericType() { + }); + JSON.registerDescendants(SecurityMonitoringRuleQuery.class, Collections.unmodifiableMap(schemas)); } - public SecurityMonitoringRuleQueryDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return SecurityMonitoringRuleQuery.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SecurityMonitoringStandardRuleQuery, SecurityMonitoringSignalRuleQuery + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public SecurityMonitoringRuleQuery 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 SecurityMonitoringStandardRuleQuery - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SecurityMonitoringStandardRuleQuery.class.equals(Integer.class) - || SecurityMonitoringStandardRuleQuery.class.equals(Long.class) - || SecurityMonitoringStandardRuleQuery.class.equals(Float.class) - || SecurityMonitoringStandardRuleQuery.class.equals(Double.class) - || SecurityMonitoringStandardRuleQuery.class.equals(Boolean.class) - || SecurityMonitoringStandardRuleQuery.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SecurityMonitoringStandardRuleQuery.class.equals(Integer.class) - || SecurityMonitoringStandardRuleQuery.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SecurityMonitoringStandardRuleQuery.class.equals(Float.class) - || SecurityMonitoringStandardRuleQuery.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SecurityMonitoringStandardRuleQuery.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SecurityMonitoringStandardRuleQuery.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SecurityMonitoringStandardRuleQuery.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringStandardRuleQuery.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 (!((SecurityMonitoringStandardRuleQuery) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringStandardRuleQuery'"); + if (JSON.isInstanceOf(SecurityMonitoringSignalRuleQuery.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SecurityMonitoringStandardRuleQuery'", - e); - } - // deserialize SecurityMonitoringSignalRuleQuery - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SecurityMonitoringSignalRuleQuery.class.equals(Integer.class) - || SecurityMonitoringSignalRuleQuery.class.equals(Long.class) - || SecurityMonitoringSignalRuleQuery.class.equals(Float.class) - || SecurityMonitoringSignalRuleQuery.class.equals(Double.class) - || SecurityMonitoringSignalRuleQuery.class.equals(Boolean.class) - || SecurityMonitoringSignalRuleQuery.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SecurityMonitoringSignalRuleQuery.class.equals(Integer.class) - || SecurityMonitoringSignalRuleQuery.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SecurityMonitoringSignalRuleQuery.class.equals(Float.class) - || SecurityMonitoringSignalRuleQuery.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SecurityMonitoringSignalRuleQuery.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SecurityMonitoringSignalRuleQuery.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringSignalRuleQuery.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 (!((SecurityMonitoringSignalRuleQuery) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringSignalRuleQuery'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, "Input data does not match schema 'SecurityMonitoringSignalRuleQuery'", e); - } - - SecurityMonitoringRuleQuery ret = new SecurityMonitoringRuleQuery(); - 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; + throw new RuntimeException("Invalid instance type. Must be SecurityMonitoringStandardRuleQuery, SecurityMonitoringSignalRuleQuery"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SecurityMonitoringStandardRuleQuery, SecurityMonitoringSignalRuleQuery + * + * @return The actual instance (SecurityMonitoringStandardRuleQuery, SecurityMonitoringSignalRuleQuery) + */ @Override - public SecurityMonitoringRuleQuery getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "SecurityMonitoringRuleQuery cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public SecurityMonitoringRuleQuery() { - super("oneOf", Boolean.FALSE); - } - - public SecurityMonitoringRuleQuery(SecurityMonitoringStandardRuleQuery o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public SecurityMonitoringRuleQuery(SecurityMonitoringSignalRuleQuery o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "SecurityMonitoringStandardRuleQuery", - new GenericType() {}); - schemas.put( - "SecurityMonitoringSignalRuleQuery", - new GenericType() {}); - JSON.registerDescendants( - SecurityMonitoringRuleQuery.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SecurityMonitoringRuleQuery.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SecurityMonitoringStandardRuleQuery, - * SecurityMonitoringSignalRuleQuery - * - *

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( - SecurityMonitoringStandardRuleQuery.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SecurityMonitoringSignalRuleQuery.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SecurityMonitoringStandardRuleQuery`. If the actual instance is not `SecurityMonitoringStandardRuleQuery`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringStandardRuleQuery` + * @throws ClassCastException if the instance is not `SecurityMonitoringStandardRuleQuery` + */ + public SecurityMonitoringStandardRuleQuery getSecurityMonitoringStandardRuleQuery() throws ClassCastException { + return (SecurityMonitoringStandardRuleQuery)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SecurityMonitoringSignalRuleQuery`. If the actual instance is not `SecurityMonitoringSignalRuleQuery`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringSignalRuleQuery` + * @throws ClassCastException if the instance is not `SecurityMonitoringSignalRuleQuery` + */ + public SecurityMonitoringSignalRuleQuery getSecurityMonitoringSignalRuleQuery() throws ClassCastException { + return (SecurityMonitoringSignalRuleQuery)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SecurityMonitoringStandardRuleQuery," - + " SecurityMonitoringSignalRuleQuery"); - } - - /** - * Get the actual instance, which can be the following: SecurityMonitoringStandardRuleQuery, - * SecurityMonitoringSignalRuleQuery - * - * @return The actual instance (SecurityMonitoringStandardRuleQuery, - * SecurityMonitoringSignalRuleQuery) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SecurityMonitoringStandardRuleQuery`. If the actual instance is not - * `SecurityMonitoringStandardRuleQuery`, the ClassCastException will be thrown. - * - * @return The actual instance of `SecurityMonitoringStandardRuleQuery` - * @throws ClassCastException if the instance is not `SecurityMonitoringStandardRuleQuery` - */ - public SecurityMonitoringStandardRuleQuery getSecurityMonitoringStandardRuleQuery() - throws ClassCastException { - return (SecurityMonitoringStandardRuleQuery) super.getActualInstance(); - } - - /** - * Get the actual instance of `SecurityMonitoringSignalRuleQuery`. If the actual instance is not - * `SecurityMonitoringSignalRuleQuery`, the ClassCastException will be thrown. - * - * @return The actual instance of `SecurityMonitoringSignalRuleQuery` - * @throws ClassCastException if the instance is not `SecurityMonitoringSignalRuleQuery` - */ - public SecurityMonitoringSignalRuleQuery getSecurityMonitoringSignalRuleQuery() - throws ClassCastException { - return (SecurityMonitoringSignalRuleQuery) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQueryAggregation.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQueryAggregation.java index 7a571146982..fe3572c7e81 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQueryAggregation.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleQueryAggregation.java @@ -6,54 +6,57 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The aggregation type. */ -@JsonSerialize( - using = - SecurityMonitoringRuleQueryAggregation.SecurityMonitoringRuleQueryAggregationSerializer - .class) +/** + *

The aggregation type.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleQueryAggregation.SecurityMonitoringRuleQueryAggregationSerializer.class) public class SecurityMonitoringRuleQueryAggregation { - public static final SecurityMonitoringRuleQueryAggregation COUNT = - new SecurityMonitoringRuleQueryAggregation("count"); - public static final SecurityMonitoringRuleQueryAggregation CARDINALITY = - new SecurityMonitoringRuleQueryAggregation("cardinality"); - public static final SecurityMonitoringRuleQueryAggregation SUM = - new SecurityMonitoringRuleQueryAggregation("sum"); - public static final SecurityMonitoringRuleQueryAggregation MAX = - new SecurityMonitoringRuleQueryAggregation("max"); - public static final SecurityMonitoringRuleQueryAggregation NEW_VALUE = - new SecurityMonitoringRuleQueryAggregation("new_value"); - public static final SecurityMonitoringRuleQueryAggregation GEO_DATA = - new SecurityMonitoringRuleQueryAggregation("geo_data"); - public static final SecurityMonitoringRuleQueryAggregation EVENT_COUNT = - new SecurityMonitoringRuleQueryAggregation("event_count"); - public static final SecurityMonitoringRuleQueryAggregation NONE = - new SecurityMonitoringRuleQueryAggregation("none"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "count", - "cardinality", - "sum", - "max", - "new_value", - "geo_data", - "event_count", - "none")); + public static final SecurityMonitoringRuleQueryAggregation COUNT = new SecurityMonitoringRuleQueryAggregation("count"); + public static final SecurityMonitoringRuleQueryAggregation CARDINALITY = new SecurityMonitoringRuleQueryAggregation("cardinality"); + public static final SecurityMonitoringRuleQueryAggregation SUM = new SecurityMonitoringRuleQueryAggregation("sum"); + public static final SecurityMonitoringRuleQueryAggregation MAX = new SecurityMonitoringRuleQueryAggregation("max"); + public static final SecurityMonitoringRuleQueryAggregation NEW_VALUE = new SecurityMonitoringRuleQueryAggregation("new_value"); + public static final SecurityMonitoringRuleQueryAggregation GEO_DATA = new SecurityMonitoringRuleQueryAggregation("geo_data"); + public static final SecurityMonitoringRuleQueryAggregation EVENT_COUNT = new SecurityMonitoringRuleQueryAggregation("event_count"); + public static final SecurityMonitoringRuleQueryAggregation NONE = new SecurityMonitoringRuleQueryAggregation("none"); + + private static final Set allowedValues = new HashSet(Arrays.asList("count", "cardinality", "sum", "max", "new_value", "geo_data", "event_count", "none")); private String value; @@ -65,25 +68,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleQueryAggregationSerializer - extends StdSerializer { - public SecurityMonitoringRuleQueryAggregationSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringRuleQueryAggregationSerializer extends StdSerializer { + public SecurityMonitoringRuleQueryAggregationSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleQueryAggregationSerializer() { - this(null); - } + public SecurityMonitoringRuleQueryAggregationSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleQueryAggregation value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleQueryAggregation value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -95,7 +92,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleQueryAggregation object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleQueryAggregation object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,7 +108,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleResponse.java index c3fd04bd2df..cae325701b3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleResponse.java @@ -6,302 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = SecurityMonitoringRuleResponse.SecurityMonitoringRuleResponseDeserializer.class) -@JsonSerialize( - using = SecurityMonitoringRuleResponse.SecurityMonitoringRuleResponseSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = SecurityMonitoringRuleResponse.SecurityMonitoringRuleResponseDeserializer.class) +@JsonSerialize(using = SecurityMonitoringRuleResponse.SecurityMonitoringRuleResponseSerializer.class) public class SecurityMonitoringRuleResponse extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(SecurityMonitoringRuleResponse.class.getName()); + private static final Logger log = Logger.getLogger(SecurityMonitoringRuleResponse.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class SecurityMonitoringRuleResponseSerializer extends StdSerializer { + public SecurityMonitoringRuleResponseSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public SecurityMonitoringRuleResponseSerializer() { + this(null); + } - public static class SecurityMonitoringRuleResponseSerializer - extends StdSerializer { - public SecurityMonitoringRuleResponseSerializer(Class t) { - super(t); + @Override + public void serialize(SecurityMonitoringRuleResponse value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public SecurityMonitoringRuleResponseSerializer() { - this(null); + public static class SecurityMonitoringRuleResponseDeserializer extends StdDeserializer { + public SecurityMonitoringRuleResponseDeserializer() { + this(SecurityMonitoringRuleResponse.class); + } + + public SecurityMonitoringRuleResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public SecurityMonitoringRuleResponse 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 SecurityMonitoringStandardRuleResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringStandardRuleResponse.class.equals(Integer.class) || SecurityMonitoringStandardRuleResponse.class.equals(Long.class) || SecurityMonitoringStandardRuleResponse.class.equals(Float.class) || SecurityMonitoringStandardRuleResponse.class.equals(Double.class) || SecurityMonitoringStandardRuleResponse.class.equals(Boolean.class) || SecurityMonitoringStandardRuleResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecurityMonitoringStandardRuleResponse.class.equals(Integer.class) || SecurityMonitoringStandardRuleResponse.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecurityMonitoringStandardRuleResponse.class.equals(Float.class) || SecurityMonitoringStandardRuleResponse.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SecurityMonitoringStandardRuleResponse.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecurityMonitoringStandardRuleResponse.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringStandardRuleResponse.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 (!((SecurityMonitoringStandardRuleResponse)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringStandardRuleResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecurityMonitoringStandardRuleResponse'", e); + } + + // deserialize SecurityMonitoringSignalRuleResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringSignalRuleResponse.class.equals(Integer.class) || SecurityMonitoringSignalRuleResponse.class.equals(Long.class) || SecurityMonitoringSignalRuleResponse.class.equals(Float.class) || SecurityMonitoringSignalRuleResponse.class.equals(Double.class) || SecurityMonitoringSignalRuleResponse.class.equals(Boolean.class) || SecurityMonitoringSignalRuleResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SecurityMonitoringSignalRuleResponse.class.equals(Integer.class) || SecurityMonitoringSignalRuleResponse.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SecurityMonitoringSignalRuleResponse.class.equals(Float.class) || SecurityMonitoringSignalRuleResponse.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SecurityMonitoringSignalRuleResponse.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SecurityMonitoringSignalRuleResponse.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringSignalRuleResponse.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 (!((SecurityMonitoringSignalRuleResponse)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringSignalRuleResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SecurityMonitoringSignalRuleResponse'", e); + } + + SecurityMonitoringRuleResponse ret = new SecurityMonitoringRuleResponse(); + 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 SecurityMonitoringRuleResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SecurityMonitoringRuleResponse cannot be null"); + } } - @Override - public void serialize( - SecurityMonitoringRuleResponse value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SecurityMonitoringRuleResponse() { + super("oneOf", Boolean.FALSE); + } + public SecurityMonitoringRuleResponse(SecurityMonitoringStandardRuleResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SecurityMonitoringRuleResponse(SecurityMonitoringSignalRuleResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class SecurityMonitoringRuleResponseDeserializer - extends StdDeserializer { - public SecurityMonitoringRuleResponseDeserializer() { - this(SecurityMonitoringRuleResponse.class); + static { + schemas.put("SecurityMonitoringStandardRuleResponse", new GenericType() { + }); + schemas.put("SecurityMonitoringSignalRuleResponse", new GenericType() { + }); + JSON.registerDescendants(SecurityMonitoringRuleResponse.class, Collections.unmodifiableMap(schemas)); } - public SecurityMonitoringRuleResponseDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return SecurityMonitoringRuleResponse.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SecurityMonitoringStandardRuleResponse, SecurityMonitoringSignalRuleResponse + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public SecurityMonitoringRuleResponse 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 SecurityMonitoringStandardRuleResponse - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SecurityMonitoringStandardRuleResponse.class.equals(Integer.class) - || SecurityMonitoringStandardRuleResponse.class.equals(Long.class) - || SecurityMonitoringStandardRuleResponse.class.equals(Float.class) - || SecurityMonitoringStandardRuleResponse.class.equals(Double.class) - || SecurityMonitoringStandardRuleResponse.class.equals(Boolean.class) - || SecurityMonitoringStandardRuleResponse.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SecurityMonitoringStandardRuleResponse.class.equals(Integer.class) - || SecurityMonitoringStandardRuleResponse.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SecurityMonitoringStandardRuleResponse.class.equals(Float.class) - || SecurityMonitoringStandardRuleResponse.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SecurityMonitoringStandardRuleResponse.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SecurityMonitoringStandardRuleResponse.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SecurityMonitoringStandardRuleResponse.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()) - .readValueAs(SecurityMonitoringStandardRuleResponse.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 (!((SecurityMonitoringStandardRuleResponse) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log( - Level.FINER, "Input data matches schema 'SecurityMonitoringStandardRuleResponse'"); + if (JSON.isInstanceOf(SecurityMonitoringSignalRuleResponse.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SecurityMonitoringStandardRuleResponse'", - e); - } - // deserialize SecurityMonitoringSignalRuleResponse - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SecurityMonitoringSignalRuleResponse.class.equals(Integer.class) - || SecurityMonitoringSignalRuleResponse.class.equals(Long.class) - || SecurityMonitoringSignalRuleResponse.class.equals(Float.class) - || SecurityMonitoringSignalRuleResponse.class.equals(Double.class) - || SecurityMonitoringSignalRuleResponse.class.equals(Boolean.class) - || SecurityMonitoringSignalRuleResponse.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SecurityMonitoringSignalRuleResponse.class.equals(Integer.class) - || SecurityMonitoringSignalRuleResponse.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SecurityMonitoringSignalRuleResponse.class.equals(Float.class) - || SecurityMonitoringSignalRuleResponse.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SecurityMonitoringSignalRuleResponse.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SecurityMonitoringSignalRuleResponse.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()).readValueAs(SecurityMonitoringSignalRuleResponse.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 (!((SecurityMonitoringSignalRuleResponse) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SecurityMonitoringSignalRuleResponse'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SecurityMonitoringSignalRuleResponse'", - e); - } - - SecurityMonitoringRuleResponse ret = new SecurityMonitoringRuleResponse(); - 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; + throw new RuntimeException("Invalid instance type. Must be SecurityMonitoringStandardRuleResponse, SecurityMonitoringSignalRuleResponse"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SecurityMonitoringStandardRuleResponse, SecurityMonitoringSignalRuleResponse + * + * @return The actual instance (SecurityMonitoringStandardRuleResponse, SecurityMonitoringSignalRuleResponse) + */ @Override - public SecurityMonitoringRuleResponse getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "SecurityMonitoringRuleResponse cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public SecurityMonitoringRuleResponse() { - super("oneOf", Boolean.FALSE); - } - - public SecurityMonitoringRuleResponse(SecurityMonitoringStandardRuleResponse o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public SecurityMonitoringRuleResponse(SecurityMonitoringSignalRuleResponse o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "SecurityMonitoringStandardRuleResponse", - new GenericType() {}); - schemas.put( - "SecurityMonitoringSignalRuleResponse", - new GenericType() {}); - JSON.registerDescendants( - SecurityMonitoringRuleResponse.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SecurityMonitoringRuleResponse.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SecurityMonitoringStandardRuleResponse, - * SecurityMonitoringSignalRuleResponse - * - *

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( - SecurityMonitoringStandardRuleResponse.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SecurityMonitoringSignalRuleResponse.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SecurityMonitoringStandardRuleResponse`. If the actual instance is not `SecurityMonitoringStandardRuleResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringStandardRuleResponse` + * @throws ClassCastException if the instance is not `SecurityMonitoringStandardRuleResponse` + */ + public SecurityMonitoringStandardRuleResponse getSecurityMonitoringStandardRuleResponse() throws ClassCastException { + return (SecurityMonitoringStandardRuleResponse)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SecurityMonitoringSignalRuleResponse`. If the actual instance is not `SecurityMonitoringSignalRuleResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringSignalRuleResponse` + * @throws ClassCastException if the instance is not `SecurityMonitoringSignalRuleResponse` + */ + public SecurityMonitoringSignalRuleResponse getSecurityMonitoringSignalRuleResponse() throws ClassCastException { + return (SecurityMonitoringSignalRuleResponse)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SecurityMonitoringStandardRuleResponse," - + " SecurityMonitoringSignalRuleResponse"); - } - - /** - * Get the actual instance, which can be the following: SecurityMonitoringStandardRuleResponse, - * SecurityMonitoringSignalRuleResponse - * - * @return The actual instance (SecurityMonitoringStandardRuleResponse, - * SecurityMonitoringSignalRuleResponse) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SecurityMonitoringStandardRuleResponse`. If the actual instance is - * not `SecurityMonitoringStandardRuleResponse`, the ClassCastException will be thrown. - * - * @return The actual instance of `SecurityMonitoringStandardRuleResponse` - * @throws ClassCastException if the instance is not `SecurityMonitoringStandardRuleResponse` - */ - public SecurityMonitoringStandardRuleResponse getSecurityMonitoringStandardRuleResponse() - throws ClassCastException { - return (SecurityMonitoringStandardRuleResponse) super.getActualInstance(); - } - - /** - * Get the actual instance of `SecurityMonitoringSignalRuleResponse`. If the actual instance is - * not `SecurityMonitoringSignalRuleResponse`, the ClassCastException will be thrown. - * - * @return The actual instance of `SecurityMonitoringSignalRuleResponse` - * @throws ClassCastException if the instance is not `SecurityMonitoringSignalRuleResponse` - */ - public SecurityMonitoringSignalRuleResponse getSecurityMonitoringSignalRuleResponse() - throws ClassCastException { - return (SecurityMonitoringSignalRuleResponse) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleSeverity.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleSeverity.java index f1697152160..8bfc4555c81 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleSeverity.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleSeverity.java @@ -6,37 +6,54 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Severity of the Security Signal. */ -@JsonSerialize( - using = SecurityMonitoringRuleSeverity.SecurityMonitoringRuleSeveritySerializer.class) +/** + *

Severity of the Security Signal.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleSeverity.SecurityMonitoringRuleSeveritySerializer.class) public class SecurityMonitoringRuleSeverity { - public static final SecurityMonitoringRuleSeverity INFO = - new SecurityMonitoringRuleSeverity("info"); - public static final SecurityMonitoringRuleSeverity LOW = - new SecurityMonitoringRuleSeverity("low"); - public static final SecurityMonitoringRuleSeverity MEDIUM = - new SecurityMonitoringRuleSeverity("medium"); - public static final SecurityMonitoringRuleSeverity HIGH = - new SecurityMonitoringRuleSeverity("high"); - public static final SecurityMonitoringRuleSeverity CRITICAL = - new SecurityMonitoringRuleSeverity("critical"); + public static final SecurityMonitoringRuleSeverity INFO = new SecurityMonitoringRuleSeverity("info"); + public static final SecurityMonitoringRuleSeverity LOW = new SecurityMonitoringRuleSeverity("low"); + public static final SecurityMonitoringRuleSeverity MEDIUM = new SecurityMonitoringRuleSeverity("medium"); + public static final SecurityMonitoringRuleSeverity HIGH = new SecurityMonitoringRuleSeverity("high"); + public static final SecurityMonitoringRuleSeverity CRITICAL = new SecurityMonitoringRuleSeverity("critical"); - private static final Set allowedValues = - new HashSet(Arrays.asList("info", "low", "medium", "high", "critical")); + private static final Set allowedValues = new HashSet(Arrays.asList("info", "low", "medium", "high", "critical")); private String value; @@ -48,22 +65,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleSeveritySerializer - extends StdSerializer { - public SecurityMonitoringRuleSeveritySerializer(Class t) { - super(t); - } + public static class SecurityMonitoringRuleSeveritySerializer extends StdSerializer { + public SecurityMonitoringRuleSeveritySerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleSeveritySerializer() { - this(null); - } + public SecurityMonitoringRuleSeveritySerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleSeverity value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleSeverity value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -75,7 +89,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleSeverity object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleSeverity object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +105,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeCreate.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeCreate.java index d5a34f3e7ab..c9de5a51320 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeCreate.java @@ -6,31 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The rule type. */ -@JsonSerialize( - using = SecurityMonitoringRuleTypeCreate.SecurityMonitoringRuleTypeCreateSerializer.class) +/** + *

The rule type.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleTypeCreate.SecurityMonitoringRuleTypeCreateSerializer.class) public class SecurityMonitoringRuleTypeCreate { - public static final SecurityMonitoringRuleTypeCreate LOG_DETECTION = - new SecurityMonitoringRuleTypeCreate("log_detection"); - public static final SecurityMonitoringRuleTypeCreate WORKLOAD_SECURITY = - new SecurityMonitoringRuleTypeCreate("workload_security"); + public static final SecurityMonitoringRuleTypeCreate LOG_DETECTION = new SecurityMonitoringRuleTypeCreate("log_detection"); + public static final SecurityMonitoringRuleTypeCreate WORKLOAD_SECURITY = new SecurityMonitoringRuleTypeCreate("workload_security"); - private static final Set allowedValues = - new HashSet(Arrays.asList("log_detection", "workload_security")); + private static final Set allowedValues = new HashSet(Arrays.asList("log_detection", "workload_security")); private String value; @@ -42,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleTypeCreateSerializer - extends StdSerializer { - public SecurityMonitoringRuleTypeCreateSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringRuleTypeCreateSerializer extends StdSerializer { + public SecurityMonitoringRuleTypeCreateSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleTypeCreateSerializer() { - this(null); - } + public SecurityMonitoringRuleTypeCreateSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleTypeCreate value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleTypeCreate value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleTypeCreate object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleTypeCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeRead.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeRead.java index 5918dbd4a19..1a030a062ab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeRead.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleTypeRead.java @@ -6,40 +6,53 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The rule type. */ -@JsonSerialize( - using = SecurityMonitoringRuleTypeRead.SecurityMonitoringRuleTypeReadSerializer.class) +/** + *

The rule type.

+ */ +@JsonSerialize(using = SecurityMonitoringRuleTypeRead.SecurityMonitoringRuleTypeReadSerializer.class) public class SecurityMonitoringRuleTypeRead { - public static final SecurityMonitoringRuleTypeRead LOG_DETECTION = - new SecurityMonitoringRuleTypeRead("log_detection"); - public static final SecurityMonitoringRuleTypeRead INFRASTRUCTURE_CONFIGURATION = - new SecurityMonitoringRuleTypeRead("infrastructure_configuration"); - public static final SecurityMonitoringRuleTypeRead WORKLOAD_SECURITY = - new SecurityMonitoringRuleTypeRead("workload_security"); - public static final SecurityMonitoringRuleTypeRead CLOUD_CONFIGURATION = - new SecurityMonitoringRuleTypeRead("cloud_configuration"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "log_detection", - "infrastructure_configuration", - "workload_security", - "cloud_configuration")); + public static final SecurityMonitoringRuleTypeRead LOG_DETECTION = new SecurityMonitoringRuleTypeRead("log_detection"); + public static final SecurityMonitoringRuleTypeRead INFRASTRUCTURE_CONFIGURATION = new SecurityMonitoringRuleTypeRead("infrastructure_configuration"); + public static final SecurityMonitoringRuleTypeRead WORKLOAD_SECURITY = new SecurityMonitoringRuleTypeRead("workload_security"); + public static final SecurityMonitoringRuleTypeRead CLOUD_CONFIGURATION = new SecurityMonitoringRuleTypeRead("cloud_configuration"); + + private static final Set allowedValues = new HashSet(Arrays.asList("log_detection", "infrastructure_configuration", "workload_security", "cloud_configuration")); private String value; @@ -51,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringRuleTypeReadSerializer - extends StdSerializer { - public SecurityMonitoringRuleTypeReadSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringRuleTypeReadSerializer extends StdSerializer { + public SecurityMonitoringRuleTypeReadSerializer(Class t) { + super(t); + } - public SecurityMonitoringRuleTypeReadSerializer() { - this(null); - } + public SecurityMonitoringRuleTypeReadSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringRuleTypeRead value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringRuleTypeRead value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -78,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringRuleTypeRead object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleTypeRead object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleUpdatePayload.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleUpdatePayload.java index 85851651398..9ba40e161f5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleUpdatePayload.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringRuleUpdatePayload.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update an existing rule. */ + +/** + *

Update an existing rule.

+ */ @JsonPropertyOrder({ SecurityMonitoringRuleUpdatePayload.JSON_PROPERTY_CASES, SecurityMonitoringRuleUpdatePayload.JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS, @@ -28,10 +46,10 @@ SecurityMonitoringRuleUpdatePayload.JSON_PROPERTY_TAGS, SecurityMonitoringRuleUpdatePayload.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringRuleUpdatePayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CASES = "cases"; private List cases = null; @@ -72,7 +90,6 @@ public SecurityMonitoringRuleUpdatePayload cases(List(); @@ -83,45 +100,39 @@ public SecurityMonitoringRuleUpdatePayload addCasesItem(SecurityMonitoringRuleCa } /** - * Cases for generating signals. - * + *

Cases for generating signals.

* @return cases - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CASES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCases() { - return cases; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCases() { + return cases; + } public void setCases(List cases) { this.cases = cases; } - - public SecurityMonitoringRuleUpdatePayload complianceSignalOptions( - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { + public SecurityMonitoringRuleUpdatePayload complianceSignalOptions(CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { this.complianceSignalOptions = complianceSignalOptions; this.unparsed |= complianceSignalOptions.unparsed; return this; } /** - * How to generate compliance signals. Useful for cloud_configuration rules only. - * + *

How to generate compliance signals. Useful for cloud_configuration rules only.

* @return complianceSignalOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudConfigurationRuleComplianceSignalOptions getComplianceSignalOptions() { - return complianceSignalOptions; - } - - public void setComplianceSignalOptions( - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudConfigurationRuleComplianceSignalOptions getComplianceSignalOptions() { + return complianceSignalOptions; + } + public void setComplianceSignalOptions(CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { this.complianceSignalOptions = complianceSignalOptions; } - public SecurityMonitoringRuleUpdatePayload filters(List filters) { this.filters = filters; for (SecurityMonitoringFilter item : filters) { @@ -129,7 +140,6 @@ public SecurityMonitoringRuleUpdatePayload filters(List(); @@ -140,105 +150,95 @@ public SecurityMonitoringRuleUpdatePayload addFiltersItem(SecurityMonitoringFilt } /** - * Additional queries to filter matched events before they are processed. - * + *

Additional queries to filter matched events before they are processed.

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public SecurityMonitoringRuleUpdatePayload hasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; return this; } /** - * Whether the notifications include the triggering group-by values in their title. - * + *

Whether the notifications include the triggering group-by values in their title.

* @return hasExtendedTitle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasExtendedTitle() { - return hasExtendedTitle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasExtendedTitle() { + return hasExtendedTitle; + } public void setHasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; } - public SecurityMonitoringRuleUpdatePayload isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the rule is enabled. - * + *

Whether the rule is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityMonitoringRuleUpdatePayload message(String message) { this.message = message; return this; } /** - * Message for generated signals. - * + *

Message for generated signals.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SecurityMonitoringRuleUpdatePayload name(String name) { this.name = name; return this; } /** - * Name of the rule. - * + *

Name of the rule.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringRuleUpdatePayload options(SecurityMonitoringRuleOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -246,21 +246,19 @@ public SecurityMonitoringRuleUpdatePayload options(SecurityMonitoringRuleOptions } /** - * Options on rules. - * + *

Options on rules.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleOptions getOptions() { + return options; + } public void setOptions(SecurityMonitoringRuleOptions options) { this.options = options; } - public SecurityMonitoringRuleUpdatePayload queries(List queries) { this.queries = queries; for (SecurityMonitoringRuleQuery item : queries) { @@ -268,9 +266,7 @@ public SecurityMonitoringRuleUpdatePayload queries(List(); } @@ -280,26 +276,23 @@ public SecurityMonitoringRuleUpdatePayload addQueriesItem( } /** - * Queries for selecting logs which are part of the rule. - * + *

Queries for selecting logs which are part of the rule.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public SecurityMonitoringRuleUpdatePayload tags(List tags) { this.tags = tags; return this; } - public SecurityMonitoringRuleUpdatePayload addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -309,43 +302,43 @@ public SecurityMonitoringRuleUpdatePayload addTagsItem(String tagsItem) { } /** - * Tags for generated signals. - * + *

Tags for generated signals.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SecurityMonitoringRuleUpdatePayload version(Integer version) { this.version = version; return this; } /** - * The version of the rule being updated. maximum: 2147483647 - * + *

The version of the rule being updated.

+ * maximum: 2147483647 * @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVersion() { + return version; + } public void setVersion(Integer version) { this.version = version; } - /** Return true if this SecurityMonitoringRuleUpdatePayload object is equal to o. */ + /** + * Return true if this SecurityMonitoringRuleUpdatePayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -354,38 +347,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringRuleUpdatePayload securityMonitoringRuleUpdatePayload = - (SecurityMonitoringRuleUpdatePayload) o; - return Objects.equals(this.cases, securityMonitoringRuleUpdatePayload.cases) - && Objects.equals( - this.complianceSignalOptions, - securityMonitoringRuleUpdatePayload.complianceSignalOptions) - && Objects.equals(this.filters, securityMonitoringRuleUpdatePayload.filters) - && Objects.equals( - this.hasExtendedTitle, securityMonitoringRuleUpdatePayload.hasExtendedTitle) - && Objects.equals(this.isEnabled, securityMonitoringRuleUpdatePayload.isEnabled) - && Objects.equals(this.message, securityMonitoringRuleUpdatePayload.message) - && Objects.equals(this.name, securityMonitoringRuleUpdatePayload.name) - && Objects.equals(this.options, securityMonitoringRuleUpdatePayload.options) - && Objects.equals(this.queries, securityMonitoringRuleUpdatePayload.queries) - && Objects.equals(this.tags, securityMonitoringRuleUpdatePayload.tags) - && Objects.equals(this.version, securityMonitoringRuleUpdatePayload.version); + SecurityMonitoringRuleUpdatePayload securityMonitoringRuleUpdatePayload = (SecurityMonitoringRuleUpdatePayload) o; + return Objects.equals(this.cases, securityMonitoringRuleUpdatePayload.cases) && Objects.equals(this.complianceSignalOptions, securityMonitoringRuleUpdatePayload.complianceSignalOptions) && Objects.equals(this.filters, securityMonitoringRuleUpdatePayload.filters) && Objects.equals(this.hasExtendedTitle, securityMonitoringRuleUpdatePayload.hasExtendedTitle) && Objects.equals(this.isEnabled, securityMonitoringRuleUpdatePayload.isEnabled) && Objects.equals(this.message, securityMonitoringRuleUpdatePayload.message) && Objects.equals(this.name, securityMonitoringRuleUpdatePayload.name) && Objects.equals(this.options, securityMonitoringRuleUpdatePayload.options) && Objects.equals(this.queries, securityMonitoringRuleUpdatePayload.queries) && Objects.equals(this.tags, securityMonitoringRuleUpdatePayload.tags) && Objects.equals(this.version, securityMonitoringRuleUpdatePayload.version); } + @Override public int hashCode() { - return Objects.hash( - cases, - complianceSignalOptions, - filters, - hasExtendedTitle, - isEnabled, - message, - name, - options, - queries, - tags, - version); + return Objects.hash(cases,complianceSignalOptions,filters,hasExtendedTitle,isEnabled,message,name,options,queries,tags,version); } @Override @@ -393,9 +362,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecurityMonitoringRuleUpdatePayload {\n"); sb.append(" cases: ").append(toIndentedString(cases)).append("\n"); - sb.append(" complianceSignalOptions: ") - .append(toIndentedString(complianceSignalOptions)) - .append("\n"); + sb.append(" complianceSignalOptions: ").append(toIndentedString(complianceSignalOptions)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" hasExtendedTitle: ").append(toIndentedString(hasExtendedTitle)).append("\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); @@ -410,7 +377,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignal.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignal.java index 53a20b385a5..13a6bddf550 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignal.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignal.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object description of a security signal. */ + +/** + *

Object description of a security signal.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignal.JSON_PROPERTY_ATTRIBUTES, SecurityMonitoringSignal.JSON_PROPERTY_ID, SecurityMonitoringSignal.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignal { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityMonitoringSignalAttributes attributes; @@ -38,42 +58,39 @@ public SecurityMonitoringSignal attributes(SecurityMonitoringSignalAttributes at } /** - * The object containing all signal attributes and their associated values. - * + *

The object containing all signal attributes and their + * associated values.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityMonitoringSignalAttributes attributes) { this.attributes = attributes; } - public SecurityMonitoringSignal id(String id) { this.id = id; return this; } /** - * The unique ID of the security signal. - * + *

The unique ID of the security signal.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SecurityMonitoringSignal type(SecurityMonitoringSignalType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +98,26 @@ public SecurityMonitoringSignal type(SecurityMonitoringSignalType type) { } /** - * The type of event. - * + *

The type of event.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalType getType() { + return type; + } public void setType(SecurityMonitoringSignalType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SecurityMonitoringSignal object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignal object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +127,13 @@ public boolean equals(Object o) { return false; } SecurityMonitoringSignal securityMonitoringSignal = (SecurityMonitoringSignal) o; - return Objects.equals(this.attributes, securityMonitoringSignal.attributes) - && Objects.equals(this.id, securityMonitoringSignal.id) - && Objects.equals(this.type, securityMonitoringSignal.type); + return Objects.equals(this.attributes, securityMonitoringSignal.attributes) && Objects.equals(this.id, securityMonitoringSignal.id) && Objects.equals(this.type, securityMonitoringSignal.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +148,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalArchiveReason.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalArchiveReason.java index b54529b6de6..629c973e70c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalArchiveReason.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalArchiveReason.java @@ -6,37 +6,53 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Reason a signal is archived. */ -@JsonSerialize( - using = - SecurityMonitoringSignalArchiveReason.SecurityMonitoringSignalArchiveReasonSerializer.class) +/** + *

Reason a signal is archived.

+ */ +@JsonSerialize(using = SecurityMonitoringSignalArchiveReason.SecurityMonitoringSignalArchiveReasonSerializer.class) public class SecurityMonitoringSignalArchiveReason { - public static final SecurityMonitoringSignalArchiveReason NONE = - new SecurityMonitoringSignalArchiveReason("none"); - public static final SecurityMonitoringSignalArchiveReason FALSE_POSITIVE = - new SecurityMonitoringSignalArchiveReason("false_positive"); - public static final SecurityMonitoringSignalArchiveReason TESTING_OR_MAINTENANCE = - new SecurityMonitoringSignalArchiveReason("testing_or_maintenance"); - public static final SecurityMonitoringSignalArchiveReason OTHER = - new SecurityMonitoringSignalArchiveReason("other"); + public static final SecurityMonitoringSignalArchiveReason NONE = new SecurityMonitoringSignalArchiveReason("none"); + public static final SecurityMonitoringSignalArchiveReason FALSE_POSITIVE = new SecurityMonitoringSignalArchiveReason("false_positive"); + public static final SecurityMonitoringSignalArchiveReason TESTING_OR_MAINTENANCE = new SecurityMonitoringSignalArchiveReason("testing_or_maintenance"); + public static final SecurityMonitoringSignalArchiveReason OTHER = new SecurityMonitoringSignalArchiveReason("other"); - private static final Set allowedValues = - new HashSet( - Arrays.asList("none", "false_positive", "testing_or_maintenance", "other")); + private static final Set allowedValues = new HashSet(Arrays.asList("none", "false_positive", "testing_or_maintenance", "other")); private String value; @@ -48,25 +64,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringSignalArchiveReasonSerializer - extends StdSerializer { - public SecurityMonitoringSignalArchiveReasonSerializer( - Class t) { - super(t); - } + public static class SecurityMonitoringSignalArchiveReasonSerializer extends StdSerializer { + public SecurityMonitoringSignalArchiveReasonSerializer(Class t) { + super(t); + } - public SecurityMonitoringSignalArchiveReasonSerializer() { - this(null); - } + public SecurityMonitoringSignalArchiveReasonSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringSignalArchiveReason value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringSignalArchiveReason value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -78,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringSignalArchiveReason object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalArchiveReason object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateAttributes.java index 44c2377eb0b..8e03a215fdf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateAttributes.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes describing the new assignee of a security signal. */ + +/** + *

Attributes describing the new assignee of a security signal.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalAssigneeUpdateAttributes.JSON_PROPERTY_ASSIGNEE, SecurityMonitoringSignalAssigneeUpdateAttributes.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalAssigneeUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ASSIGNEE = "assignee"; private SecurityMonitoringTriageUser assignee; @@ -32,56 +51,52 @@ public SecurityMonitoringSignalAssigneeUpdateAttributes() {} @JsonCreator public SecurityMonitoringSignalAssigneeUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_ASSIGNEE) - SecurityMonitoringTriageUser assignee) { - this.assignee = assignee; - this.unparsed |= assignee.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_ASSIGNEE)SecurityMonitoringTriageUser assignee) { + this.assignee = assignee; + this.unparsed |= assignee.unparsed; } - - public SecurityMonitoringSignalAssigneeUpdateAttributes assignee( - SecurityMonitoringTriageUser assignee) { + public SecurityMonitoringSignalAssigneeUpdateAttributes assignee(SecurityMonitoringTriageUser assignee) { this.assignee = assignee; this.unparsed |= assignee.unparsed; return this; } /** - * Object representing a given user entity. - * + *

Object representing a given user entity.

* @return assignee - */ - @JsonProperty(JSON_PROPERTY_ASSIGNEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringTriageUser getAssignee() { - return assignee; - } - + **/ + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringTriageUser getAssignee() { + return assignee; + } public void setAssignee(SecurityMonitoringTriageUser assignee) { this.assignee = assignee; } - public SecurityMonitoringSignalAssigneeUpdateAttributes version(Long version) { this.version = version; return this; } /** - * Version of the updated signal. If server side version is higher, update will be rejected. - * + *

Version of the updated signal. If server side version is higher, update will be rejected.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SecurityMonitoringSignalAssigneeUpdateAttributes object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalAssigneeUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -90,16 +105,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalAssigneeUpdateAttributes - securityMonitoringSignalAssigneeUpdateAttributes = - (SecurityMonitoringSignalAssigneeUpdateAttributes) o; - return Objects.equals(this.assignee, securityMonitoringSignalAssigneeUpdateAttributes.assignee) - && Objects.equals(this.version, securityMonitoringSignalAssigneeUpdateAttributes.version); + SecurityMonitoringSignalAssigneeUpdateAttributes securityMonitoringSignalAssigneeUpdateAttributes = (SecurityMonitoringSignalAssigneeUpdateAttributes) o; + return Objects.equals(this.assignee, securityMonitoringSignalAssigneeUpdateAttributes.assignee) && Objects.equals(this.version, securityMonitoringSignalAssigneeUpdateAttributes.version); } + @Override public int hashCode() { - return Objects.hash(assignee, version); + return Objects.hash(assignee,version); } @Override @@ -113,7 +126,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateData.java index e3e7a3dd48c..f2a11ea68bc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateData.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data containing the patch for changing the assignee of a signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalAssigneeUpdateData.JSON_PROPERTY_ATTRIBUTES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Data containing the patch for changing the assignee of a signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalAssigneeUpdateData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalAssigneeUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityMonitoringSignalAssigneeUpdateAttributes attributes; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalAssigneeUpdateData() {} @JsonCreator public SecurityMonitoringSignalAssigneeUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SecurityMonitoringSignalAssigneeUpdateAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SecurityMonitoringSignalAssigneeUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; } - - public SecurityMonitoringSignalAssigneeUpdateData attributes( - SecurityMonitoringSignalAssigneeUpdateAttributes attributes) { + public SecurityMonitoringSignalAssigneeUpdateData attributes(SecurityMonitoringSignalAssigneeUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes describing the new assignee of a security signal. - * + *

Attributes describing the new assignee of a security signal.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalAssigneeUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalAssigneeUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityMonitoringSignalAssigneeUpdateAttributes attributes) { this.attributes = attributes; } - /** Return true if this SecurityMonitoringSignalAssigneeUpdateData object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalAssigneeUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalAssigneeUpdateData securityMonitoringSignalAssigneeUpdateData = - (SecurityMonitoringSignalAssigneeUpdateData) o; + SecurityMonitoringSignalAssigneeUpdateData securityMonitoringSignalAssigneeUpdateData = (SecurityMonitoringSignalAssigneeUpdateData) o; return Objects.equals(this.attributes, securityMonitoringSignalAssigneeUpdateData.attributes); } + @Override public int hashCode() { return Objects.hash(attributes); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateRequest.java index 514bdf54589..d2e7a0bf477 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAssigneeUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request body for changing the assignee of a given security monitoring signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalAssigneeUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request body for changing the assignee of a given security monitoring signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalAssigneeUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalAssigneeUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityMonitoringSignalAssigneeUpdateData data; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalAssigneeUpdateRequest() {} @JsonCreator public SecurityMonitoringSignalAssigneeUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SecurityMonitoringSignalAssigneeUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SecurityMonitoringSignalAssigneeUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - - public SecurityMonitoringSignalAssigneeUpdateRequest data( - SecurityMonitoringSignalAssigneeUpdateData data) { + public SecurityMonitoringSignalAssigneeUpdateRequest data(SecurityMonitoringSignalAssigneeUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Data containing the patch for changing the assignee of a signal. - * + *

Data containing the patch for changing the assignee of a signal.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalAssigneeUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalAssigneeUpdateData getData() { + return data; + } public void setData(SecurityMonitoringSignalAssigneeUpdateData data) { this.data = data; } - /** Return true if this SecurityMonitoringSignalAssigneeUpdateRequest object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalAssigneeUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalAssigneeUpdateRequest securityMonitoringSignalAssigneeUpdateRequest = - (SecurityMonitoringSignalAssigneeUpdateRequest) o; + SecurityMonitoringSignalAssigneeUpdateRequest securityMonitoringSignalAssigneeUpdateRequest = (SecurityMonitoringSignalAssigneeUpdateRequest) o; return Objects.equals(this.data, securityMonitoringSignalAssigneeUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAttributes.java index 834d3f6acf7..f1c77316509 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalAttributes.java @@ -6,30 +6,44 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** The object containing all signal attributes and their associated values. */ +/** + *

The object containing all signal attributes and their + * associated values.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalAttributes.JSON_PROPERTY_ATTRIBUTES, SecurityMonitoringSignalAttributes.JSON_PROPERTY_MESSAGE, SecurityMonitoringSignalAttributes.JSON_PROPERTY_TAGS, SecurityMonitoringSignalAttributes.JSON_PROPERTY_TIMESTAMP }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private Map attributes = null; @@ -40,7 +54,6 @@ public class SecurityMonitoringSignalAttributes { private List tags = null; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -48,7 +61,6 @@ public SecurityMonitoringSignalAttributes attributes(Map attribu this.attributes = attributes; return this; } - public SecurityMonitoringSignalAttributes putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); @@ -58,47 +70,42 @@ public SecurityMonitoringSignalAttributes putAttributesItem(String key, Object a } /** - * A JSON object of attributes in the security signal. - * + *

A JSON object of attributes in the security signal.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } public void setAttributes(Map attributes) { this.attributes = attributes; } - public SecurityMonitoringSignalAttributes message(String message) { this.message = message; return this; } /** - * The message in the security signal defined by the rule that generated the signal. - * + *

The message in the security signal defined by the rule that generated the signal.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SecurityMonitoringSignalAttributes tags(List tags) { this.tags = tags; return this; } - public SecurityMonitoringSignalAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -108,43 +115,42 @@ public SecurityMonitoringSignalAttributes addTagsItem(String tagsItem) { } /** - * An array of tags associated with the security signal. - * + *

An array of tags associated with the security signal.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SecurityMonitoringSignalAttributes timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * The timestamp of the security signal. - * + *

The timestamp of the security signal.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - /** Return true if this SecurityMonitoringSignalAttributes object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -153,17 +159,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalAttributes securityMonitoringSignalAttributes = - (SecurityMonitoringSignalAttributes) o; - return Objects.equals(this.attributes, securityMonitoringSignalAttributes.attributes) - && Objects.equals(this.message, securityMonitoringSignalAttributes.message) - && Objects.equals(this.tags, securityMonitoringSignalAttributes.tags) - && Objects.equals(this.timestamp, securityMonitoringSignalAttributes.timestamp); + SecurityMonitoringSignalAttributes securityMonitoringSignalAttributes = (SecurityMonitoringSignalAttributes) o; + return Objects.equals(this.attributes, securityMonitoringSignalAttributes.attributes) && Objects.equals(this.message, securityMonitoringSignalAttributes.message) && Objects.equals(this.tags, securityMonitoringSignalAttributes.tags) && Objects.equals(this.timestamp, securityMonitoringSignalAttributes.timestamp); } + @Override public int hashCode() { - return Objects.hash(attributes, message, tags, timestamp); + return Objects.hash(attributes,message,tags,timestamp); } @Override @@ -179,7 +182,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateAttributes.java index a975dc8f773..fd0cb2e3f06 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateAttributes.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes describing the new list of related signals for a security signal. */ +/** + *

Attributes describing the new list of related signals for a security signal.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalIncidentsUpdateAttributes.JSON_PROPERTY_INCIDENT_IDS, SecurityMonitoringSignalIncidentsUpdateAttributes.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalIncidentsUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_INCIDENT_IDS = "incident_ids"; private List incidentIds = new ArrayList<>(); @@ -34,58 +51,54 @@ public SecurityMonitoringSignalIncidentsUpdateAttributes() {} @JsonCreator public SecurityMonitoringSignalIncidentsUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_IDS) List incidentIds) { - this.incidentIds = incidentIds; + @JsonProperty(required=true, value=JSON_PROPERTY_INCIDENT_IDS)List incidentIds) { + this.incidentIds = incidentIds; } - public SecurityMonitoringSignalIncidentsUpdateAttributes incidentIds(List incidentIds) { this.incidentIds = incidentIds; return this; } - - public SecurityMonitoringSignalIncidentsUpdateAttributes addIncidentIdsItem( - Long incidentIdsItem) { + public SecurityMonitoringSignalIncidentsUpdateAttributes addIncidentIdsItem(Long incidentIdsItem) { this.incidentIds.add(incidentIdsItem); return this; } /** - * Array of incidents that are associated with this signal. - * + *

Array of incidents that are associated with this signal.

* @return incidentIds - */ - @JsonProperty(JSON_PROPERTY_INCIDENT_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getIncidentIds() { - return incidentIds; - } - + **/ + @JsonProperty(JSON_PROPERTY_INCIDENT_IDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getIncidentIds() { + return incidentIds; + } public void setIncidentIds(List incidentIds) { this.incidentIds = incidentIds; } - public SecurityMonitoringSignalIncidentsUpdateAttributes version(Long version) { this.version = version; return this; } /** - * Version of the updated signal. If server side version is higher, update will be rejected. - * + *

Version of the updated signal. If server side version is higher, update will be rejected.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SecurityMonitoringSignalIncidentsUpdateAttributes object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalIncidentsUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -94,17 +107,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalIncidentsUpdateAttributes - securityMonitoringSignalIncidentsUpdateAttributes = - (SecurityMonitoringSignalIncidentsUpdateAttributes) o; - return Objects.equals( - this.incidentIds, securityMonitoringSignalIncidentsUpdateAttributes.incidentIds) - && Objects.equals(this.version, securityMonitoringSignalIncidentsUpdateAttributes.version); + SecurityMonitoringSignalIncidentsUpdateAttributes securityMonitoringSignalIncidentsUpdateAttributes = (SecurityMonitoringSignalIncidentsUpdateAttributes) o; + return Objects.equals(this.incidentIds, securityMonitoringSignalIncidentsUpdateAttributes.incidentIds) && Objects.equals(this.version, securityMonitoringSignalIncidentsUpdateAttributes.version); } + @Override public int hashCode() { - return Objects.hash(incidentIds, version); + return Objects.hash(incidentIds,version); } @Override @@ -118,7 +128,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateData.java index f0dc069b0b5..d101511aad8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateData.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data containing the patch for changing the related incidents of a signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalIncidentsUpdateData.JSON_PROPERTY_ATTRIBUTES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Data containing the patch for changing the related incidents of a signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalIncidentsUpdateData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalIncidentsUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityMonitoringSignalIncidentsUpdateAttributes attributes; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalIncidentsUpdateData() {} @JsonCreator public SecurityMonitoringSignalIncidentsUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SecurityMonitoringSignalIncidentsUpdateAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SecurityMonitoringSignalIncidentsUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; } - - public SecurityMonitoringSignalIncidentsUpdateData attributes( - SecurityMonitoringSignalIncidentsUpdateAttributes attributes) { + public SecurityMonitoringSignalIncidentsUpdateData attributes(SecurityMonitoringSignalIncidentsUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes describing the new list of related signals for a security signal. - * + *

Attributes describing the new list of related signals for a security signal.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalIncidentsUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalIncidentsUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityMonitoringSignalIncidentsUpdateAttributes attributes) { this.attributes = attributes; } - /** Return true if this SecurityMonitoringSignalIncidentsUpdateData object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalIncidentsUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalIncidentsUpdateData securityMonitoringSignalIncidentsUpdateData = - (SecurityMonitoringSignalIncidentsUpdateData) o; + SecurityMonitoringSignalIncidentsUpdateData securityMonitoringSignalIncidentsUpdateData = (SecurityMonitoringSignalIncidentsUpdateData) o; return Objects.equals(this.attributes, securityMonitoringSignalIncidentsUpdateData.attributes); } + @Override public int hashCode() { return Objects.hash(attributes); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateRequest.java index 2b81e96d725..de0adef822d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalIncidentsUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request body for changing the related incidents of a given security monitoring signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalIncidentsUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request body for changing the related incidents of a given security monitoring signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalIncidentsUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalIncidentsUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityMonitoringSignalIncidentsUpdateData data; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalIncidentsUpdateRequest() {} @JsonCreator public SecurityMonitoringSignalIncidentsUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SecurityMonitoringSignalIncidentsUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SecurityMonitoringSignalIncidentsUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - - public SecurityMonitoringSignalIncidentsUpdateRequest data( - SecurityMonitoringSignalIncidentsUpdateData data) { + public SecurityMonitoringSignalIncidentsUpdateRequest data(SecurityMonitoringSignalIncidentsUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Data containing the patch for changing the related incidents of a signal. - * + *

Data containing the patch for changing the related incidents of a signal.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalIncidentsUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalIncidentsUpdateData getData() { + return data; + } public void setData(SecurityMonitoringSignalIncidentsUpdateData data) { this.data = data; } - /** Return true if this SecurityMonitoringSignalIncidentsUpdateRequest object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalIncidentsUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalIncidentsUpdateRequest securityMonitoringSignalIncidentsUpdateRequest = - (SecurityMonitoringSignalIncidentsUpdateRequest) o; + SecurityMonitoringSignalIncidentsUpdateRequest securityMonitoringSignalIncidentsUpdateRequest = (SecurityMonitoringSignalIncidentsUpdateRequest) o; return Objects.equals(this.data, securityMonitoringSignalIncidentsUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequest.java index a79eda51f0d..93609b5db43 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequest.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The request for a security signal list. */ + +/** + *

The request for a security signal list.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalListRequest.JSON_PROPERTY_FILTER, SecurityMonitoringSignalListRequest.JSON_PROPERTY_PAGE, SecurityMonitoringSignalListRequest.JSON_PROPERTY_SORT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalListRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FILTER = "filter"; private SecurityMonitoringSignalListRequestFilter filter; @@ -31,29 +51,26 @@ public class SecurityMonitoringSignalListRequest { public static final String JSON_PROPERTY_SORT = "sort"; private SecurityMonitoringSignalsSort sort; - public SecurityMonitoringSignalListRequest filter( - SecurityMonitoringSignalListRequestFilter filter) { + public SecurityMonitoringSignalListRequest filter(SecurityMonitoringSignalListRequestFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; return this; } /** - * Search filters for listing security signals. - * + *

Search filters for listing security signals.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalListRequestFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalListRequestFilter getFilter() { + return filter; + } public void setFilter(SecurityMonitoringSignalListRequestFilter filter) { this.filter = filter; } - public SecurityMonitoringSignalListRequest page(SecurityMonitoringSignalListRequestPage page) { this.page = page; this.unparsed |= page.unparsed; @@ -61,21 +78,19 @@ public SecurityMonitoringSignalListRequest page(SecurityMonitoringSignalListRequ } /** - * The paging attributes for listing security signals. - * + *

The paging attributes for listing security signals.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalListRequestPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalListRequestPage getPage() { + return page; + } public void setPage(SecurityMonitoringSignalListRequestPage page) { this.page = page; } - public SecurityMonitoringSignalListRequest sort(SecurityMonitoringSignalsSort sort) { this.sort = sort; this.unparsed |= !sort.isValid(); @@ -83,25 +98,26 @@ public SecurityMonitoringSignalListRequest sort(SecurityMonitoringSignalsSort so } /** - * The sort parameters used for querying security signals. - * + *

The sort parameters used for querying security signals.

* @return sort - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SORT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalsSort getSort() { - return sort; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalsSort getSort() { + return sort; + } public void setSort(SecurityMonitoringSignalsSort sort) { if (!sort.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.sort = sort; } - /** Return true if this SecurityMonitoringSignalListRequest object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalListRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,16 +126,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalListRequest securityMonitoringSignalListRequest = - (SecurityMonitoringSignalListRequest) o; - return Objects.equals(this.filter, securityMonitoringSignalListRequest.filter) - && Objects.equals(this.page, securityMonitoringSignalListRequest.page) - && Objects.equals(this.sort, securityMonitoringSignalListRequest.sort); + SecurityMonitoringSignalListRequest securityMonitoringSignalListRequest = (SecurityMonitoringSignalListRequest) o; + return Objects.equals(this.filter, securityMonitoringSignalListRequest.filter) && Objects.equals(this.page, securityMonitoringSignalListRequest.page) && Objects.equals(this.sort, securityMonitoringSignalListRequest.sort); } + @Override public int hashCode() { - return Objects.hash(filter, page, sort); + return Objects.hash(filter,page,sort); } @Override @@ -134,7 +148,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestFilter.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestFilter.java index 7cc8fb657b4..dcd4c5c664d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestFilter.java @@ -6,27 +6,43 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; -/** Search filters for listing security signals. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Search filters for listing security signals.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalListRequestFilter.JSON_PROPERTY_FROM, SecurityMonitoringSignalListRequestFilter.JSON_PROPERTY_QUERY, SecurityMonitoringSignalListRequestFilter.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalListRequestFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FROM = "from"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime from; @@ -34,7 +50,6 @@ public class SecurityMonitoringSignalListRequestFilter { private String query; public static final String JSON_PROPERTY_TO = "to"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime to; @@ -44,64 +59,61 @@ public SecurityMonitoringSignalListRequestFilter from(OffsetDateTime from) { } /** - * The minimum timestamp for requested security signals. - * + *

The minimum timestamp for requested security signals.

* @return from - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getFrom() { - return from; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getFrom() { + return from; + } public void setFrom(OffsetDateTime from) { this.from = from; } - public SecurityMonitoringSignalListRequestFilter query(String query) { this.query = query; return this; } /** - * Search query for listing security signals. - * + *

Search query for listing security signals.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - public SecurityMonitoringSignalListRequestFilter to(OffsetDateTime to) { this.to = to; return this; } /** - * The maximum timestamp for requested security signals. - * + *

The maximum timestamp for requested security signals.

* @return to - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTo() { - return to; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTo() { + return to; + } public void setTo(OffsetDateTime to) { this.to = to; } - /** Return true if this SecurityMonitoringSignalListRequestFilter object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalListRequestFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,16 +122,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalListRequestFilter securityMonitoringSignalListRequestFilter = - (SecurityMonitoringSignalListRequestFilter) o; - return Objects.equals(this.from, securityMonitoringSignalListRequestFilter.from) - && Objects.equals(this.query, securityMonitoringSignalListRequestFilter.query) - && Objects.equals(this.to, securityMonitoringSignalListRequestFilter.to); + SecurityMonitoringSignalListRequestFilter securityMonitoringSignalListRequestFilter = (SecurityMonitoringSignalListRequestFilter) o; + return Objects.equals(this.from, securityMonitoringSignalListRequestFilter.from) && Objects.equals(this.query, securityMonitoringSignalListRequestFilter.query) && Objects.equals(this.to, securityMonitoringSignalListRequestFilter.to); } + @Override public int hashCode() { - return Objects.hash(from, query, to); + return Objects.hash(from,query,to); } @Override @@ -134,7 +144,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestPage.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestPage.java index 491e9d43ef0..f9c5d7b3d8c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalListRequestPage.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The paging attributes for listing security signals. */ + +/** + *

The paging attributes for listing security signals.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalListRequestPage.JSON_PROPERTY_CURSOR, SecurityMonitoringSignalListRequestPage.JSON_PROPERTY_LIMIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalListRequestPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CURSOR = "cursor"; private String cursor; @@ -33,43 +53,43 @@ public SecurityMonitoringSignalListRequestPage cursor(String cursor) { } /** - * A list of results using the cursor provided in the previous query. - * + *

A list of results using the cursor provided in the previous query.

* @return cursor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } public void setCursor(String cursor) { this.cursor = cursor; } - public SecurityMonitoringSignalListRequestPage limit(Integer limit) { this.limit = limit; return this; } /** - * The maximum number of security signals in the response. maximum: 1000 - * + *

The maximum number of security signals in the response.

+ * maximum: 1000 * @return limit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLimit() { - return limit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } public void setLimit(Integer limit) { this.limit = limit; } - /** Return true if this SecurityMonitoringSignalListRequestPage object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalListRequestPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,15 +98,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalListRequestPage securityMonitoringSignalListRequestPage = - (SecurityMonitoringSignalListRequestPage) o; - return Objects.equals(this.cursor, securityMonitoringSignalListRequestPage.cursor) - && Objects.equals(this.limit, securityMonitoringSignalListRequestPage.limit); + SecurityMonitoringSignalListRequestPage securityMonitoringSignalListRequestPage = (SecurityMonitoringSignalListRequestPage) o; + return Objects.equals(this.cursor, securityMonitoringSignalListRequestPage.cursor) && Objects.equals(this.limit, securityMonitoringSignalListRequestPage.limit); } + @Override public int hashCode() { - return Objects.hash(cursor, limit); + return Objects.hash(cursor,limit); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleCreatePayload.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleCreatePayload.java index 9ff32090209..a5b6e51551b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleCreatePayload.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleCreatePayload.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Create a new signal correlation rule. */ +/** + *

Create a new signal correlation rule.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalRuleCreatePayload.JSON_PROPERTY_CASES, SecurityMonitoringSignalRuleCreatePayload.JSON_PROPERTY_FILTERS, @@ -28,10 +45,10 @@ SecurityMonitoringSignalRuleCreatePayload.JSON_PROPERTY_TAGS, SecurityMonitoringSignalRuleCreatePayload.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalRuleCreatePayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CASES = "cases"; private List cases = new ArrayList<>(); @@ -66,55 +83,46 @@ public SecurityMonitoringSignalRuleCreatePayload() {} @JsonCreator public SecurityMonitoringSignalRuleCreatePayload( - @JsonProperty(required = true, value = JSON_PROPERTY_CASES) - List cases, - @JsonProperty(required = true, value = JSON_PROPERTY_IS_ENABLED) Boolean isEnabled, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) - SecurityMonitoringRuleOptions options, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERIES) - List queries) { - this.cases = cases; - this.isEnabled = isEnabled; - this.message = message; - this.name = name; - this.options = options; - this.unparsed |= options.unparsed; - this.queries = queries; - } - - public SecurityMonitoringSignalRuleCreatePayload cases( - List cases) { + @JsonProperty(required=true, value=JSON_PROPERTY_CASES)List cases, + @JsonProperty(required=true, value=JSON_PROPERTY_IS_ENABLED)Boolean isEnabled, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPTIONS)SecurityMonitoringRuleOptions options, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERIES)List queries) { + this.cases = cases; + this.isEnabled = isEnabled; + this.message = message; + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; + this.queries = queries; + } + public SecurityMonitoringSignalRuleCreatePayload cases(List cases) { this.cases = cases; for (SecurityMonitoringRuleCaseCreate item : cases) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringSignalRuleCreatePayload addCasesItem( - SecurityMonitoringRuleCaseCreate casesItem) { + public SecurityMonitoringSignalRuleCreatePayload addCasesItem(SecurityMonitoringRuleCaseCreate casesItem) { this.cases.add(casesItem); this.unparsed |= casesItem.unparsed; return this; } /** - * Cases for generating signals. - * + *

Cases for generating signals.

* @return cases - */ - @JsonProperty(JSON_PROPERTY_CASES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCases() { - return cases; - } - + **/ + @JsonProperty(JSON_PROPERTY_CASES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCases() { + return cases; + } public void setCases(List cases) { this.cases = cases; } - public SecurityMonitoringSignalRuleCreatePayload filters(List filters) { this.filters = filters; for (SecurityMonitoringFilter item : filters) { @@ -122,9 +130,7 @@ public SecurityMonitoringSignalRuleCreatePayload filters(List(); } @@ -134,102 +140,92 @@ public SecurityMonitoringSignalRuleCreatePayload addFiltersItem( } /** - * Additional queries to filter matched events before they are processed. - * + *

Additional queries to filter matched events before they are processed.

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public SecurityMonitoringSignalRuleCreatePayload hasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; return this; } /** - * Whether the notifications include the triggering group-by values in their title. - * + *

Whether the notifications include the triggering group-by values in their title.

* @return hasExtendedTitle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasExtendedTitle() { - return hasExtendedTitle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasExtendedTitle() { + return hasExtendedTitle; + } public void setHasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; } - public SecurityMonitoringSignalRuleCreatePayload isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the rule is enabled. - * + *

Whether the rule is enabled.

* @return isEnabled - */ - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityMonitoringSignalRuleCreatePayload message(String message) { this.message = message; return this; } /** - * Message for generated signals. - * + *

Message for generated signals.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SecurityMonitoringSignalRuleCreatePayload name(String name) { this.name = name; return this; } /** - * The name of the rule. - * + *

The name of the rule.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringSignalRuleCreatePayload options(SecurityMonitoringRuleOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -237,56 +233,48 @@ public SecurityMonitoringSignalRuleCreatePayload options(SecurityMonitoringRuleO } /** - * Options on rules. - * + *

Options on rules.

* @return options - */ - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringRuleOptions getOptions() { - return options; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringRuleOptions getOptions() { + return options; + } public void setOptions(SecurityMonitoringRuleOptions options) { this.options = options; } - - public SecurityMonitoringSignalRuleCreatePayload queries( - List queries) { + public SecurityMonitoringSignalRuleCreatePayload queries(List queries) { this.queries = queries; for (SecurityMonitoringSignalRuleQuery item : queries) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringSignalRuleCreatePayload addQueriesItem( - SecurityMonitoringSignalRuleQuery queriesItem) { + public SecurityMonitoringSignalRuleCreatePayload addQueriesItem(SecurityMonitoringSignalRuleQuery queriesItem) { this.queries.add(queriesItem); this.unparsed |= queriesItem.unparsed; return this; } /** - * Queries for selecting signals which are part of the rule. - * + *

Queries for selecting signals which are part of the rule.

* @return queries - */ - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getQueries() { - return queries; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public SecurityMonitoringSignalRuleCreatePayload tags(List tags) { this.tags = tags; return this; } - public SecurityMonitoringSignalRuleCreatePayload addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -296,21 +284,19 @@ public SecurityMonitoringSignalRuleCreatePayload addTagsItem(String tagsItem) { } /** - * Tags for generated signals. - * + *

Tags for generated signals.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SecurityMonitoringSignalRuleCreatePayload type(SecurityMonitoringSignalRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -318,25 +304,26 @@ public SecurityMonitoringSignalRuleCreatePayload type(SecurityMonitoringSignalRu } /** - * The rule type. - * + *

The rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalRuleType getType() { + return type; + } public void setType(SecurityMonitoringSignalRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SecurityMonitoringSignalRuleCreatePayload object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalRuleCreatePayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -345,25 +332,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalRuleCreatePayload securityMonitoringSignalRuleCreatePayload = - (SecurityMonitoringSignalRuleCreatePayload) o; - return Objects.equals(this.cases, securityMonitoringSignalRuleCreatePayload.cases) - && Objects.equals(this.filters, securityMonitoringSignalRuleCreatePayload.filters) - && Objects.equals( - this.hasExtendedTitle, securityMonitoringSignalRuleCreatePayload.hasExtendedTitle) - && Objects.equals(this.isEnabled, securityMonitoringSignalRuleCreatePayload.isEnabled) - && Objects.equals(this.message, securityMonitoringSignalRuleCreatePayload.message) - && Objects.equals(this.name, securityMonitoringSignalRuleCreatePayload.name) - && Objects.equals(this.options, securityMonitoringSignalRuleCreatePayload.options) - && Objects.equals(this.queries, securityMonitoringSignalRuleCreatePayload.queries) - && Objects.equals(this.tags, securityMonitoringSignalRuleCreatePayload.tags) - && Objects.equals(this.type, securityMonitoringSignalRuleCreatePayload.type); + SecurityMonitoringSignalRuleCreatePayload securityMonitoringSignalRuleCreatePayload = (SecurityMonitoringSignalRuleCreatePayload) o; + return Objects.equals(this.cases, securityMonitoringSignalRuleCreatePayload.cases) && Objects.equals(this.filters, securityMonitoringSignalRuleCreatePayload.filters) && Objects.equals(this.hasExtendedTitle, securityMonitoringSignalRuleCreatePayload.hasExtendedTitle) && Objects.equals(this.isEnabled, securityMonitoringSignalRuleCreatePayload.isEnabled) && Objects.equals(this.message, securityMonitoringSignalRuleCreatePayload.message) && Objects.equals(this.name, securityMonitoringSignalRuleCreatePayload.name) && Objects.equals(this.options, securityMonitoringSignalRuleCreatePayload.options) && Objects.equals(this.queries, securityMonitoringSignalRuleCreatePayload.queries) && Objects.equals(this.tags, securityMonitoringSignalRuleCreatePayload.tags) && Objects.equals(this.type, securityMonitoringSignalRuleCreatePayload.type); } + @Override public int hashCode() { - return Objects.hash( - cases, filters, hasExtendedTitle, isEnabled, message, name, options, queries, tags, type); + return Objects.hash(cases,filters,hasExtendedTitle,isEnabled,message,name,options,queries,tags,type); } @Override @@ -385,7 +361,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleQuery.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleQuery.java index a9e5f3c178d..ae0a83c9430 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleQuery.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Query for matching rule on signals. */ + +/** + *

Query for matching rule on signals.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalRuleQuery.JSON_PROPERTY_AGGREGATION, SecurityMonitoringSignalRuleQuery.JSON_PROPERTY_CORRELATED_BY_FIELDS, @@ -24,10 +41,10 @@ SecurityMonitoringSignalRuleQuery.JSON_PROPERTY_NAME, SecurityMonitoringSignalRuleQuery.JSON_PROPERTY_RULE_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalRuleQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private SecurityMonitoringRuleQueryAggregation aggregation; @@ -50,43 +67,37 @@ public SecurityMonitoringSignalRuleQuery() {} @JsonCreator public SecurityMonitoringSignalRuleQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_RULE_ID) String ruleId) { - this.ruleId = ruleId; + @JsonProperty(required=true, value=JSON_PROPERTY_RULE_ID)String ruleId) { + this.ruleId = ruleId; } - - public SecurityMonitoringSignalRuleQuery aggregation( - SecurityMonitoringRuleQueryAggregation aggregation) { + public SecurityMonitoringSignalRuleQuery aggregation(SecurityMonitoringRuleQueryAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * The aggregation type. - * + *

The aggregation type.

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleQueryAggregation getAggregation() { - return aggregation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleQueryAggregation getAggregation() { + return aggregation; + } public void setAggregation(SecurityMonitoringRuleQueryAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public SecurityMonitoringSignalRuleQuery correlatedByFields(List correlatedByFields) { this.correlatedByFields = correlatedByFields; return this; } - - public SecurityMonitoringSignalRuleQuery addCorrelatedByFieldsItem( - String correlatedByFieldsItem) { + public SecurityMonitoringSignalRuleQuery addCorrelatedByFieldsItem(String correlatedByFieldsItem) { if (this.correlatedByFields == null) { this.correlatedByFields = new ArrayList<>(); } @@ -95,47 +106,43 @@ public SecurityMonitoringSignalRuleQuery addCorrelatedByFieldsItem( } /** - * Fields to group by. - * + *

Fields to group by.

* @return correlatedByFields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CORRELATED_BY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCorrelatedByFields() { - return correlatedByFields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CORRELATED_BY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCorrelatedByFields() { + return correlatedByFields; + } public void setCorrelatedByFields(List correlatedByFields) { this.correlatedByFields = correlatedByFields; } - public SecurityMonitoringSignalRuleQuery correlatedQueryIndex(Integer correlatedQueryIndex) { this.correlatedQueryIndex = correlatedQueryIndex; return this; } /** - * Index of the rule query used to retrieve the correlated field. maximum: 9 - * + *

Index of the rule query used to retrieve the correlated field.

+ * maximum: 9 * @return correlatedQueryIndex - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CORRELATED_QUERY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCorrelatedQueryIndex() { - return correlatedQueryIndex; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CORRELATED_QUERY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCorrelatedQueryIndex() { + return correlatedQueryIndex; + } public void setCorrelatedQueryIndex(Integer correlatedQueryIndex) { this.correlatedQueryIndex = correlatedQueryIndex; } - public SecurityMonitoringSignalRuleQuery metrics(List metrics) { this.metrics = metrics; return this; } - public SecurityMonitoringSignalRuleQuery addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); @@ -145,63 +152,60 @@ public SecurityMonitoringSignalRuleQuery addMetricsItem(String metricsItem) { } /** - * Group of target fields to aggregate over. - * + *

Group of target fields to aggregate over.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetrics() { - return metrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetrics() { + return metrics; + } public void setMetrics(List metrics) { this.metrics = metrics; } - public SecurityMonitoringSignalRuleQuery name(String name) { this.name = name; return this; } /** - * Name of the query. - * + *

Name of the query.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringSignalRuleQuery ruleId(String ruleId) { this.ruleId = ruleId; return this; } /** - * Rule ID to match on signals. - * + *

Rule ID to match on signals.

* @return ruleId - */ - @JsonProperty(JSON_PROPERTY_RULE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRuleId() { - return ruleId; - } - + **/ + @JsonProperty(JSON_PROPERTY_RULE_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getRuleId() { + return ruleId; + } public void setRuleId(String ruleId) { this.ruleId = ruleId; } - /** Return true if this SecurityMonitoringSignalRuleQuery object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalRuleQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -210,22 +214,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalRuleQuery securityMonitoringSignalRuleQuery = - (SecurityMonitoringSignalRuleQuery) o; - return Objects.equals(this.aggregation, securityMonitoringSignalRuleQuery.aggregation) - && Objects.equals( - this.correlatedByFields, securityMonitoringSignalRuleQuery.correlatedByFields) - && Objects.equals( - this.correlatedQueryIndex, securityMonitoringSignalRuleQuery.correlatedQueryIndex) - && Objects.equals(this.metrics, securityMonitoringSignalRuleQuery.metrics) - && Objects.equals(this.name, securityMonitoringSignalRuleQuery.name) - && Objects.equals(this.ruleId, securityMonitoringSignalRuleQuery.ruleId); + SecurityMonitoringSignalRuleQuery securityMonitoringSignalRuleQuery = (SecurityMonitoringSignalRuleQuery) o; + return Objects.equals(this.aggregation, securityMonitoringSignalRuleQuery.aggregation) && Objects.equals(this.correlatedByFields, securityMonitoringSignalRuleQuery.correlatedByFields) && Objects.equals(this.correlatedQueryIndex, securityMonitoringSignalRuleQuery.correlatedQueryIndex) && Objects.equals(this.metrics, securityMonitoringSignalRuleQuery.metrics) && Objects.equals(this.name, securityMonitoringSignalRuleQuery.name) && Objects.equals(this.ruleId, securityMonitoringSignalRuleQuery.ruleId); } + @Override public int hashCode() { - return Objects.hash( - aggregation, correlatedByFields, correlatedQueryIndex, metrics, name, ruleId); + return Objects.hash(aggregation,correlatedByFields,correlatedQueryIndex,metrics,name,ruleId); } @Override @@ -234,9 +230,7 @@ public String toString() { sb.append("class SecurityMonitoringSignalRuleQuery {\n"); sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); sb.append(" correlatedByFields: ").append(toIndentedString(correlatedByFields)).append("\n"); - sb.append(" correlatedQueryIndex: ") - .append(toIndentedString(correlatedQueryIndex)) - .append("\n"); + sb.append(" correlatedQueryIndex: ").append(toIndentedString(correlatedQueryIndex)).append("\n"); sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" ruleId: ").append(toIndentedString(ruleId)).append("\n"); @@ -245,7 +239,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponse.java index b96f60a45e3..d4b2c3c68c9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponse.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Rule. */ +/** + *

Rule.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalRuleResponse.JSON_PROPERTY_CASES, SecurityMonitoringSignalRuleResponse.JSON_PROPERTY_CREATED_AT, @@ -35,10 +53,10 @@ SecurityMonitoringSignalRuleResponse.JSON_PROPERTY_UPDATE_AUTHOR_ID, SecurityMonitoringSignalRuleResponse.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalRuleResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CASES = "cases"; private List cases = null; @@ -100,7 +118,6 @@ public SecurityMonitoringSignalRuleResponse cases(List(); @@ -111,84 +128,76 @@ public SecurityMonitoringSignalRuleResponse addCasesItem(SecurityMonitoringRuleC } /** - * Cases for generating signals. - * + *

Cases for generating signals.

* @return cases - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CASES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCases() { - return cases; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCases() { + return cases; + } public void setCases(List cases) { this.cases = cases; } - public SecurityMonitoringSignalRuleResponse createdAt(Long createdAt) { this.createdAt = createdAt; return this; } /** - * When the rule was created, timestamp in milliseconds. - * + *

When the rule was created, timestamp in milliseconds.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } public void setCreatedAt(Long createdAt) { this.createdAt = createdAt; } - public SecurityMonitoringSignalRuleResponse creationAuthorId(Long creationAuthorId) { this.creationAuthorId = creationAuthorId; return this; } /** - * User ID of the user who created the rule. - * + *

User ID of the user who created the rule.

* @return creationAuthorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATION_AUTHOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreationAuthorId() { - return creationAuthorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATION_AUTHOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreationAuthorId() { + return creationAuthorId; + } public void setCreationAuthorId(Long creationAuthorId) { this.creationAuthorId = creationAuthorId; } - public SecurityMonitoringSignalRuleResponse deprecationDate(Long deprecationDate) { this.deprecationDate = deprecationDate; return this; } /** - * When the rule will be deprecated, timestamp in milliseconds. - * + *

When the rule will be deprecated, timestamp in milliseconds.

* @return deprecationDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEPRECATION_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDeprecationDate() { - return deprecationDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATION_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDeprecationDate() { + return deprecationDate; + } public void setDeprecationDate(Long deprecationDate) { this.deprecationDate = deprecationDate; } - public SecurityMonitoringSignalRuleResponse filters(List filters) { this.filters = filters; for (SecurityMonitoringFilter item : filters) { @@ -196,7 +205,6 @@ public SecurityMonitoringSignalRuleResponse filters(List(); @@ -207,168 +215,152 @@ public SecurityMonitoringSignalRuleResponse addFiltersItem(SecurityMonitoringFil } /** - * Additional queries to filter matched events before they are processed. - * + *

Additional queries to filter matched events before they are processed.

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public SecurityMonitoringSignalRuleResponse hasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; return this; } /** - * Whether the notifications include the triggering group-by values in their title. - * + *

Whether the notifications include the triggering group-by values in their title.

* @return hasExtendedTitle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasExtendedTitle() { - return hasExtendedTitle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasExtendedTitle() { + return hasExtendedTitle; + } public void setHasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; } - public SecurityMonitoringSignalRuleResponse id(String id) { this.id = id; return this; } /** - * The ID of the rule. - * + *

The ID of the rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SecurityMonitoringSignalRuleResponse isDefault(Boolean isDefault) { this.isDefault = isDefault; return this; } /** - * Whether the rule is included by default. - * + *

Whether the rule is included by default.

* @return isDefault - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_DEFAULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDefault() { - return isDefault; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDefault() { + return isDefault; + } public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } - public SecurityMonitoringSignalRuleResponse isDeleted(Boolean isDeleted) { this.isDeleted = isDeleted; return this; } /** - * Whether the rule has been deleted. - * + *

Whether the rule has been deleted.

* @return isDeleted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_DELETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDeleted() { - return isDeleted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDeleted() { + return isDeleted; + } public void setIsDeleted(Boolean isDeleted) { this.isDeleted = isDeleted; } - public SecurityMonitoringSignalRuleResponse isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the rule is enabled. - * + *

Whether the rule is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityMonitoringSignalRuleResponse message(String message) { this.message = message; return this; } /** - * Message for generated signals. - * + *

Message for generated signals.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SecurityMonitoringSignalRuleResponse name(String name) { this.name = name; return this; } /** - * The name of the rule. - * + *

The name of the rule.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringSignalRuleResponse options(SecurityMonitoringRuleOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -376,32 +368,27 @@ public SecurityMonitoringSignalRuleResponse options(SecurityMonitoringRuleOption } /** - * Options on rules. - * + *

Options on rules.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleOptions getOptions() { + return options; + } public void setOptions(SecurityMonitoringRuleOptions options) { this.options = options; } - - public SecurityMonitoringSignalRuleResponse queries( - List queries) { + public SecurityMonitoringSignalRuleResponse queries(List queries) { this.queries = queries; for (SecurityMonitoringSignalRuleResponseQuery item : queries) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringSignalRuleResponse addQueriesItem( - SecurityMonitoringSignalRuleResponseQuery queriesItem) { + public SecurityMonitoringSignalRuleResponse addQueriesItem(SecurityMonitoringSignalRuleResponseQuery queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); } @@ -411,26 +398,23 @@ public SecurityMonitoringSignalRuleResponse addQueriesItem( } /** - * Queries for selecting logs which are part of the rule. - * + *

Queries for selecting logs which are part of the rule.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public SecurityMonitoringSignalRuleResponse tags(List tags) { this.tags = tags; return this; } - public SecurityMonitoringSignalRuleResponse addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -440,21 +424,19 @@ public SecurityMonitoringSignalRuleResponse addTagsItem(String tagsItem) { } /** - * Tags for generated signals. - * + *

Tags for generated signals.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SecurityMonitoringSignalRuleResponse type(SecurityMonitoringSignalRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -462,67 +444,64 @@ public SecurityMonitoringSignalRuleResponse type(SecurityMonitoringSignalRuleTyp } /** - * The rule type. - * + *

The rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalRuleType getType() { + return type; + } public void setType(SecurityMonitoringSignalRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SecurityMonitoringSignalRuleResponse updateAuthorId(Long updateAuthorId) { this.updateAuthorId = updateAuthorId; return this; } /** - * User ID of the user who updated the rule. - * + *

User ID of the user who updated the rule.

* @return updateAuthorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATE_AUTHOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getUpdateAuthorId() { - return updateAuthorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATE_AUTHOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getUpdateAuthorId() { + return updateAuthorId; + } public void setUpdateAuthorId(Long updateAuthorId) { this.updateAuthorId = updateAuthorId; } - public SecurityMonitoringSignalRuleResponse version(Long version) { this.version = version; return this; } /** - * The version of the rule. - * + *

The version of the rule.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SecurityMonitoringSignalRuleResponse object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalRuleResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -531,52 +510,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalRuleResponse securityMonitoringSignalRuleResponse = - (SecurityMonitoringSignalRuleResponse) o; - return Objects.equals(this.cases, securityMonitoringSignalRuleResponse.cases) - && Objects.equals(this.createdAt, securityMonitoringSignalRuleResponse.createdAt) - && Objects.equals( - this.creationAuthorId, securityMonitoringSignalRuleResponse.creationAuthorId) - && Objects.equals( - this.deprecationDate, securityMonitoringSignalRuleResponse.deprecationDate) - && Objects.equals(this.filters, securityMonitoringSignalRuleResponse.filters) - && Objects.equals( - this.hasExtendedTitle, securityMonitoringSignalRuleResponse.hasExtendedTitle) - && Objects.equals(this.id, securityMonitoringSignalRuleResponse.id) - && Objects.equals(this.isDefault, securityMonitoringSignalRuleResponse.isDefault) - && Objects.equals(this.isDeleted, securityMonitoringSignalRuleResponse.isDeleted) - && Objects.equals(this.isEnabled, securityMonitoringSignalRuleResponse.isEnabled) - && Objects.equals(this.message, securityMonitoringSignalRuleResponse.message) - && Objects.equals(this.name, securityMonitoringSignalRuleResponse.name) - && Objects.equals(this.options, securityMonitoringSignalRuleResponse.options) - && Objects.equals(this.queries, securityMonitoringSignalRuleResponse.queries) - && Objects.equals(this.tags, securityMonitoringSignalRuleResponse.tags) - && Objects.equals(this.type, securityMonitoringSignalRuleResponse.type) - && Objects.equals(this.updateAuthorId, securityMonitoringSignalRuleResponse.updateAuthorId) - && Objects.equals(this.version, securityMonitoringSignalRuleResponse.version); + SecurityMonitoringSignalRuleResponse securityMonitoringSignalRuleResponse = (SecurityMonitoringSignalRuleResponse) o; + return Objects.equals(this.cases, securityMonitoringSignalRuleResponse.cases) && Objects.equals(this.createdAt, securityMonitoringSignalRuleResponse.createdAt) && Objects.equals(this.creationAuthorId, securityMonitoringSignalRuleResponse.creationAuthorId) && Objects.equals(this.deprecationDate, securityMonitoringSignalRuleResponse.deprecationDate) && Objects.equals(this.filters, securityMonitoringSignalRuleResponse.filters) && Objects.equals(this.hasExtendedTitle, securityMonitoringSignalRuleResponse.hasExtendedTitle) && Objects.equals(this.id, securityMonitoringSignalRuleResponse.id) && Objects.equals(this.isDefault, securityMonitoringSignalRuleResponse.isDefault) && Objects.equals(this.isDeleted, securityMonitoringSignalRuleResponse.isDeleted) && Objects.equals(this.isEnabled, securityMonitoringSignalRuleResponse.isEnabled) && Objects.equals(this.message, securityMonitoringSignalRuleResponse.message) && Objects.equals(this.name, securityMonitoringSignalRuleResponse.name) && Objects.equals(this.options, securityMonitoringSignalRuleResponse.options) && Objects.equals(this.queries, securityMonitoringSignalRuleResponse.queries) && Objects.equals(this.tags, securityMonitoringSignalRuleResponse.tags) && Objects.equals(this.type, securityMonitoringSignalRuleResponse.type) && Objects.equals(this.updateAuthorId, securityMonitoringSignalRuleResponse.updateAuthorId) && Objects.equals(this.version, securityMonitoringSignalRuleResponse.version); } + @Override public int hashCode() { - return Objects.hash( - cases, - createdAt, - creationAuthorId, - deprecationDate, - filters, - hasExtendedTitle, - id, - isDefault, - isDeleted, - isEnabled, - message, - name, - options, - queries, - tags, - type, - updateAuthorId, - version); + return Objects.hash(cases,createdAt,creationAuthorId,deprecationDate,filters,hasExtendedTitle,id,isDefault,isDeleted,isEnabled,message,name,options,queries,tags,type,updateAuthorId,version); } @Override @@ -606,7 +547,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponseQuery.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponseQuery.java index 898b504a266..fe8f270b297 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponseQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponseQuery.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Query for matching rule on signals. */ +/** + *

Query for matching rule on signals.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalRuleResponseQuery.JSON_PROPERTY_AGGREGATION, SecurityMonitoringSignalRuleResponseQuery.JSON_PROPERTY_CORRELATED_BY_FIELDS, @@ -24,10 +42,10 @@ SecurityMonitoringSignalRuleResponseQuery.JSON_PROPERTY_NAME, SecurityMonitoringSignalRuleResponseQuery.JSON_PROPERTY_RULE_ID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalRuleResponseQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private SecurityMonitoringRuleQueryAggregation aggregation; @@ -49,40 +67,34 @@ public class SecurityMonitoringSignalRuleResponseQuery { public static final String JSON_PROPERTY_RULE_ID = "ruleId"; private String ruleId; - public SecurityMonitoringSignalRuleResponseQuery aggregation( - SecurityMonitoringRuleQueryAggregation aggregation) { + public SecurityMonitoringSignalRuleResponseQuery aggregation(SecurityMonitoringRuleQueryAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * The aggregation type. - * + *

The aggregation type.

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleQueryAggregation getAggregation() { - return aggregation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleQueryAggregation getAggregation() { + return aggregation; + } public void setAggregation(SecurityMonitoringRuleQueryAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - - public SecurityMonitoringSignalRuleResponseQuery correlatedByFields( - List correlatedByFields) { + public SecurityMonitoringSignalRuleResponseQuery correlatedByFields(List correlatedByFields) { this.correlatedByFields = correlatedByFields; return this; } - - public SecurityMonitoringSignalRuleResponseQuery addCorrelatedByFieldsItem( - String correlatedByFieldsItem) { + public SecurityMonitoringSignalRuleResponseQuery addCorrelatedByFieldsItem(String correlatedByFieldsItem) { if (this.correlatedByFields == null) { this.correlatedByFields = new ArrayList<>(); } @@ -91,69 +103,62 @@ public SecurityMonitoringSignalRuleResponseQuery addCorrelatedByFieldsItem( } /** - * Fields to group by. - * + *

Fields to group by.

* @return correlatedByFields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CORRELATED_BY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCorrelatedByFields() { - return correlatedByFields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CORRELATED_BY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCorrelatedByFields() { + return correlatedByFields; + } public void setCorrelatedByFields(List correlatedByFields) { this.correlatedByFields = correlatedByFields; } - - public SecurityMonitoringSignalRuleResponseQuery correlatedQueryIndex( - Integer correlatedQueryIndex) { + public SecurityMonitoringSignalRuleResponseQuery correlatedQueryIndex(Integer correlatedQueryIndex) { this.correlatedQueryIndex = correlatedQueryIndex; return this; } /** - * Index of the rule query used to retrieve the correlated field. maximum: 9 - * + *

Index of the rule query used to retrieve the correlated field.

+ * maximum: 9 * @return correlatedQueryIndex - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CORRELATED_QUERY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCorrelatedQueryIndex() { - return correlatedQueryIndex; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CORRELATED_QUERY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCorrelatedQueryIndex() { + return correlatedQueryIndex; + } public void setCorrelatedQueryIndex(Integer correlatedQueryIndex) { this.correlatedQueryIndex = correlatedQueryIndex; } - public SecurityMonitoringSignalRuleResponseQuery defaultRuleId(String defaultRuleId) { this.defaultRuleId = defaultRuleId; return this; } /** - * Default Rule ID to match on signals. - * + *

Default Rule ID to match on signals.

* @return defaultRuleId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEFAULT_RULE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDefaultRuleId() { - return defaultRuleId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_RULE_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDefaultRuleId() { + return defaultRuleId; + } public void setDefaultRuleId(String defaultRuleId) { this.defaultRuleId = defaultRuleId; } - public SecurityMonitoringSignalRuleResponseQuery metrics(List metrics) { this.metrics = metrics; return this; } - public SecurityMonitoringSignalRuleResponseQuery addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); @@ -163,64 +168,61 @@ public SecurityMonitoringSignalRuleResponseQuery addMetricsItem(String metricsIt } /** - * Group of target fields to aggregate over. - * + *

Group of target fields to aggregate over.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetrics() { - return metrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetrics() { + return metrics; + } public void setMetrics(List metrics) { this.metrics = metrics; } - public SecurityMonitoringSignalRuleResponseQuery name(String name) { this.name = name; return this; } /** - * Name of the query. - * + *

Name of the query.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringSignalRuleResponseQuery ruleId(String ruleId) { this.ruleId = ruleId; return this; } /** - * Rule ID to match on signals. - * + *

Rule ID to match on signals.

* @return ruleId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RULE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRuleId() { - return ruleId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULE_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getRuleId() { + return ruleId; + } public void setRuleId(String ruleId) { this.ruleId = ruleId; } - /** Return true if this SecurityMonitoringSignalRuleResponseQuery object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalRuleResponseQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -229,31 +231,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalRuleResponseQuery securityMonitoringSignalRuleResponseQuery = - (SecurityMonitoringSignalRuleResponseQuery) o; - return Objects.equals(this.aggregation, securityMonitoringSignalRuleResponseQuery.aggregation) - && Objects.equals( - this.correlatedByFields, securityMonitoringSignalRuleResponseQuery.correlatedByFields) - && Objects.equals( - this.correlatedQueryIndex, - securityMonitoringSignalRuleResponseQuery.correlatedQueryIndex) - && Objects.equals( - this.defaultRuleId, securityMonitoringSignalRuleResponseQuery.defaultRuleId) - && Objects.equals(this.metrics, securityMonitoringSignalRuleResponseQuery.metrics) - && Objects.equals(this.name, securityMonitoringSignalRuleResponseQuery.name) - && Objects.equals(this.ruleId, securityMonitoringSignalRuleResponseQuery.ruleId); + SecurityMonitoringSignalRuleResponseQuery securityMonitoringSignalRuleResponseQuery = (SecurityMonitoringSignalRuleResponseQuery) o; + return Objects.equals(this.aggregation, securityMonitoringSignalRuleResponseQuery.aggregation) && Objects.equals(this.correlatedByFields, securityMonitoringSignalRuleResponseQuery.correlatedByFields) && Objects.equals(this.correlatedQueryIndex, securityMonitoringSignalRuleResponseQuery.correlatedQueryIndex) && Objects.equals(this.defaultRuleId, securityMonitoringSignalRuleResponseQuery.defaultRuleId) && Objects.equals(this.metrics, securityMonitoringSignalRuleResponseQuery.metrics) && Objects.equals(this.name, securityMonitoringSignalRuleResponseQuery.name) && Objects.equals(this.ruleId, securityMonitoringSignalRuleResponseQuery.ruleId); } + @Override public int hashCode() { - return Objects.hash( - aggregation, - correlatedByFields, - correlatedQueryIndex, - defaultRuleId, - metrics, - name, - ruleId); + return Objects.hash(aggregation,correlatedByFields,correlatedQueryIndex,defaultRuleId,metrics,name,ruleId); } @Override @@ -262,9 +247,7 @@ public String toString() { sb.append("class SecurityMonitoringSignalRuleResponseQuery {\n"); sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); sb.append(" correlatedByFields: ").append(toIndentedString(correlatedByFields)).append("\n"); - sb.append(" correlatedQueryIndex: ") - .append(toIndentedString(correlatedQueryIndex)) - .append("\n"); + sb.append(" correlatedQueryIndex: ").append(toIndentedString(correlatedQueryIndex)).append("\n"); sb.append(" defaultRuleId: ").append(toIndentedString(defaultRuleId)).append("\n"); sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -274,7 +257,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleType.java index 0be316379b4..53697f1a628 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleType.java @@ -6,29 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The rule type. */ -@JsonSerialize( - using = SecurityMonitoringSignalRuleType.SecurityMonitoringSignalRuleTypeSerializer.class) +/** + *

The rule type.

+ */ +@JsonSerialize(using = SecurityMonitoringSignalRuleType.SecurityMonitoringSignalRuleTypeSerializer.class) public class SecurityMonitoringSignalRuleType { - public static final SecurityMonitoringSignalRuleType SIGNAL_CORRELATION = - new SecurityMonitoringSignalRuleType("signal_correlation"); + public static final SecurityMonitoringSignalRuleType SIGNAL_CORRELATION = new SecurityMonitoringSignalRuleType("signal_correlation"); - private static final Set allowedValues = - new HashSet(Arrays.asList("signal_correlation")); + private static final Set allowedValues = new HashSet(Arrays.asList("signal_correlation")); private String value; @@ -40,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringSignalRuleTypeSerializer - extends StdSerializer { - public SecurityMonitoringSignalRuleTypeSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringSignalRuleTypeSerializer extends StdSerializer { + public SecurityMonitoringSignalRuleTypeSerializer(Class t) { + super(t); + } - public SecurityMonitoringSignalRuleTypeSerializer() { - this(null); - } + public SecurityMonitoringSignalRuleTypeSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringSignalRuleType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringSignalRuleType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -67,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringSignalRuleType object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalRuleType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalState.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalState.java index 04272477052..00a6a15d941 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalState.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalState.java @@ -6,32 +6,52 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The new triage state of the signal. */ +/** + *

The new triage state of the signal.

+ */ @JsonSerialize(using = SecurityMonitoringSignalState.SecurityMonitoringSignalStateSerializer.class) public class SecurityMonitoringSignalState { - public static final SecurityMonitoringSignalState OPEN = - new SecurityMonitoringSignalState("open"); - public static final SecurityMonitoringSignalState ARCHIVED = - new SecurityMonitoringSignalState("archived"); - public static final SecurityMonitoringSignalState UNDER_REVIEW = - new SecurityMonitoringSignalState("under_review"); + public static final SecurityMonitoringSignalState OPEN = new SecurityMonitoringSignalState("open"); + public static final SecurityMonitoringSignalState ARCHIVED = new SecurityMonitoringSignalState("archived"); + public static final SecurityMonitoringSignalState UNDER_REVIEW = new SecurityMonitoringSignalState("under_review"); - private static final Set allowedValues = - new HashSet(Arrays.asList("open", "archived", "under_review")); + private static final Set allowedValues = new HashSet(Arrays.asList("open", "archived", "under_review")); private String value; @@ -43,22 +63,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringSignalStateSerializer - extends StdSerializer { - public SecurityMonitoringSignalStateSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringSignalStateSerializer extends StdSerializer { + public SecurityMonitoringSignalStateSerializer(Class t) { + super(t); + } - public SecurityMonitoringSignalStateSerializer() { - this(null); - } + public SecurityMonitoringSignalStateSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringSignalState value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringSignalState value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -70,7 +87,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringSignalState object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalState object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,7 +103,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateAttributes.java index edd11bac2a9..85879a39d01 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateAttributes.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes describing the change of state of a security signal. */ +/** + *

Attributes describing the change of state of a security signal.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalStateUpdateAttributes.JSON_PROPERTY_ARCHIVE_COMMENT, SecurityMonitoringSignalStateUpdateAttributes.JSON_PROPERTY_ARCHIVE_REASON, SecurityMonitoringSignalStateUpdateAttributes.JSON_PROPERTY_STATE, SecurityMonitoringSignalStateUpdateAttributes.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalStateUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ARCHIVE_COMMENT = "archive_comment"; private String archiveComment; @@ -40,59 +59,52 @@ public SecurityMonitoringSignalStateUpdateAttributes() {} @JsonCreator public SecurityMonitoringSignalStateUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_STATE) - SecurityMonitoringSignalState state) { - this.state = state; - this.unparsed |= !state.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_STATE)SecurityMonitoringSignalState state) { + this.state = state; + this.unparsed |= !state.isValid(); } - public SecurityMonitoringSignalStateUpdateAttributes archiveComment(String archiveComment) { this.archiveComment = archiveComment; return this; } /** - * Optional comment to display on archived signals. - * + *

Optional comment to display on archived signals.

* @return archiveComment - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getArchiveComment() { - return archiveComment; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getArchiveComment() { + return archiveComment; + } public void setArchiveComment(String archiveComment) { this.archiveComment = archiveComment; } - - public SecurityMonitoringSignalStateUpdateAttributes archiveReason( - SecurityMonitoringSignalArchiveReason archiveReason) { + public SecurityMonitoringSignalStateUpdateAttributes archiveReason(SecurityMonitoringSignalArchiveReason archiveReason) { this.archiveReason = archiveReason; this.unparsed |= !archiveReason.isValid(); return this; } /** - * Reason a signal is archived. - * + *

Reason a signal is archived.

* @return archiveReason - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalArchiveReason getArchiveReason() { - return archiveReason; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalArchiveReason getArchiveReason() { + return archiveReason; + } public void setArchiveReason(SecurityMonitoringSignalArchiveReason archiveReason) { if (!archiveReason.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.archiveReason = archiveReason; } - public SecurityMonitoringSignalStateUpdateAttributes state(SecurityMonitoringSignalState state) { this.state = state; this.unparsed |= !state.isValid(); @@ -100,45 +112,44 @@ public SecurityMonitoringSignalStateUpdateAttributes state(SecurityMonitoringSig } /** - * The new triage state of the signal. - * + *

The new triage state of the signal.

* @return state - */ - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalState getState() { - return state; - } - + **/ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalState getState() { + return state; + } public void setState(SecurityMonitoringSignalState state) { if (!state.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.state = state; } - public SecurityMonitoringSignalStateUpdateAttributes version(Long version) { this.version = version; return this; } /** - * Version of the updated signal. If server side version is higher, update will be rejected. - * + *

Version of the updated signal. If server side version is higher, update will be rejected.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SecurityMonitoringSignalStateUpdateAttributes object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalStateUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,19 +158,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalStateUpdateAttributes securityMonitoringSignalStateUpdateAttributes = - (SecurityMonitoringSignalStateUpdateAttributes) o; - return Objects.equals( - this.archiveComment, securityMonitoringSignalStateUpdateAttributes.archiveComment) - && Objects.equals( - this.archiveReason, securityMonitoringSignalStateUpdateAttributes.archiveReason) - && Objects.equals(this.state, securityMonitoringSignalStateUpdateAttributes.state) - && Objects.equals(this.version, securityMonitoringSignalStateUpdateAttributes.version); + SecurityMonitoringSignalStateUpdateAttributes securityMonitoringSignalStateUpdateAttributes = (SecurityMonitoringSignalStateUpdateAttributes) o; + return Objects.equals(this.archiveComment, securityMonitoringSignalStateUpdateAttributes.archiveComment) && Objects.equals(this.archiveReason, securityMonitoringSignalStateUpdateAttributes.archiveReason) && Objects.equals(this.state, securityMonitoringSignalStateUpdateAttributes.state) && Objects.equals(this.version, securityMonitoringSignalStateUpdateAttributes.version); } + @Override public int hashCode() { - return Objects.hash(archiveComment, archiveReason, state, version); + return Objects.hash(archiveComment,archiveReason,state,version); } @Override @@ -175,7 +181,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateData.java index e9f77f91ad5..b9a8cd55d3d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateData.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data containing the patch for changing the state of a signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalStateUpdateData.JSON_PROPERTY_ATTRIBUTES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Data containing the patch for changing the state of a signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalStateUpdateData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalStateUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityMonitoringSignalStateUpdateAttributes attributes; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalStateUpdateData() {} @JsonCreator public SecurityMonitoringSignalStateUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SecurityMonitoringSignalStateUpdateAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SecurityMonitoringSignalStateUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; } - - public SecurityMonitoringSignalStateUpdateData attributes( - SecurityMonitoringSignalStateUpdateAttributes attributes) { + public SecurityMonitoringSignalStateUpdateData attributes(SecurityMonitoringSignalStateUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes describing the change of state of a security signal. - * + *

Attributes describing the change of state of a security signal.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalStateUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalStateUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityMonitoringSignalStateUpdateAttributes attributes) { this.attributes = attributes; } - /** Return true if this SecurityMonitoringSignalStateUpdateData object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalStateUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalStateUpdateData securityMonitoringSignalStateUpdateData = - (SecurityMonitoringSignalStateUpdateData) o; + SecurityMonitoringSignalStateUpdateData securityMonitoringSignalStateUpdateData = (SecurityMonitoringSignalStateUpdateData) o; return Objects.equals(this.attributes, securityMonitoringSignalStateUpdateData.attributes); } + @Override public int hashCode() { return Objects.hash(attributes); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateRequest.java index bc41a733974..deedd050b40 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalStateUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Request body for changing the state of a given security monitoring signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalStateUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Request body for changing the state of a given security monitoring signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalStateUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalStateUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityMonitoringSignalStateUpdateData data; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalStateUpdateRequest() {} @JsonCreator public SecurityMonitoringSignalStateUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SecurityMonitoringSignalStateUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SecurityMonitoringSignalStateUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - - public SecurityMonitoringSignalStateUpdateRequest data( - SecurityMonitoringSignalStateUpdateData data) { + public SecurityMonitoringSignalStateUpdateRequest data(SecurityMonitoringSignalStateUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Data containing the patch for changing the state of a signal. - * + *

Data containing the patch for changing the state of a signal.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalStateUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalStateUpdateData getData() { + return data; + } public void setData(SecurityMonitoringSignalStateUpdateData data) { this.data = data; } - /** Return true if this SecurityMonitoringSignalStateUpdateRequest object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalStateUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalStateUpdateRequest securityMonitoringSignalStateUpdateRequest = - (SecurityMonitoringSignalStateUpdateRequest) o; + SecurityMonitoringSignalStateUpdateRequest securityMonitoringSignalStateUpdateRequest = (SecurityMonitoringSignalStateUpdateRequest) o; return Objects.equals(this.data, securityMonitoringSignalStateUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageAttributes.java index 1befc7a9a15..a48e6ea08e2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes describing a triage state update operation over a security signal. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes describing a triage state update operation over a security signal.

+ */ @JsonPropertyOrder({ SecurityMonitoringSignalTriageAttributes.JSON_PROPERTY_ARCHIVE_COMMENT, SecurityMonitoringSignalTriageAttributes.JSON_PROPERTY_ARCHIVE_COMMENT_TIMESTAMP, @@ -27,10 +44,10 @@ SecurityMonitoringSignalTriageAttributes.JSON_PROPERTY_STATE_UPDATE_TIMESTAMP, SecurityMonitoringSignalTriageAttributes.JSON_PROPERTY_STATE_UPDATE_USER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalTriageAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ARCHIVE_COMMENT = "archive_comment"; private String archiveComment; @@ -62,110 +79,97 @@ public SecurityMonitoringSignalTriageAttributes() {} @JsonCreator public SecurityMonitoringSignalTriageAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_ASSIGNEE) - SecurityMonitoringTriageUser assignee, - @JsonProperty(required = true, value = JSON_PROPERTY_INCIDENT_IDS) List incidentIds, - @JsonProperty(required = true, value = JSON_PROPERTY_STATE) - SecurityMonitoringSignalState state) { - this.assignee = assignee; - this.unparsed |= assignee.unparsed; - this.incidentIds = incidentIds; - this.state = state; - this.unparsed |= !state.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ASSIGNEE)SecurityMonitoringTriageUser assignee, + @JsonProperty(required=true, value=JSON_PROPERTY_INCIDENT_IDS)List incidentIds, + @JsonProperty(required=true, value=JSON_PROPERTY_STATE)SecurityMonitoringSignalState state) { + this.assignee = assignee; + this.unparsed |= assignee.unparsed; + this.incidentIds = incidentIds; + this.state = state; + this.unparsed |= !state.isValid(); } - public SecurityMonitoringSignalTriageAttributes archiveComment(String archiveComment) { this.archiveComment = archiveComment; return this; } /** - * Optional comment to display on archived signals. - * + *

Optional comment to display on archived signals.

* @return archiveComment - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getArchiveComment() { - return archiveComment; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getArchiveComment() { + return archiveComment; + } public void setArchiveComment(String archiveComment) { this.archiveComment = archiveComment; } - - public SecurityMonitoringSignalTriageAttributes archiveCommentTimestamp( - Long archiveCommentTimestamp) { + public SecurityMonitoringSignalTriageAttributes archiveCommentTimestamp(Long archiveCommentTimestamp) { this.archiveCommentTimestamp = archiveCommentTimestamp; return this; } /** - * Timestamp of the last edit to the comment. minimum: 0 - * + *

Timestamp of the last edit to the comment.

+ * minimum: 0 * @return archiveCommentTimestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getArchiveCommentTimestamp() { - return archiveCommentTimestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getArchiveCommentTimestamp() { + return archiveCommentTimestamp; + } public void setArchiveCommentTimestamp(Long archiveCommentTimestamp) { this.archiveCommentTimestamp = archiveCommentTimestamp; } - - public SecurityMonitoringSignalTriageAttributes archiveCommentUser( - SecurityMonitoringTriageUser archiveCommentUser) { + public SecurityMonitoringSignalTriageAttributes archiveCommentUser(SecurityMonitoringTriageUser archiveCommentUser) { this.archiveCommentUser = archiveCommentUser; this.unparsed |= archiveCommentUser.unparsed; return this; } /** - * Object representing a given user entity. - * + *

Object representing a given user entity.

* @return archiveCommentUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringTriageUser getArchiveCommentUser() { - return archiveCommentUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_COMMENT_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringTriageUser getArchiveCommentUser() { + return archiveCommentUser; + } public void setArchiveCommentUser(SecurityMonitoringTriageUser archiveCommentUser) { this.archiveCommentUser = archiveCommentUser; } - - public SecurityMonitoringSignalTriageAttributes archiveReason( - SecurityMonitoringSignalArchiveReason archiveReason) { + public SecurityMonitoringSignalTriageAttributes archiveReason(SecurityMonitoringSignalArchiveReason archiveReason) { this.archiveReason = archiveReason; this.unparsed |= !archiveReason.isValid(); return this; } /** - * Reason a signal is archived. - * + *

Reason a signal is archived.

* @return archiveReason - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalArchiveReason getArchiveReason() { - return archiveReason; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalArchiveReason getArchiveReason() { + return archiveReason; + } public void setArchiveReason(SecurityMonitoringSignalArchiveReason archiveReason) { if (!archiveReason.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.archiveReason = archiveReason; } - public SecurityMonitoringSignalTriageAttributes assignee(SecurityMonitoringTriageUser assignee) { this.assignee = assignee; this.unparsed |= assignee.unparsed; @@ -173,45 +177,40 @@ public SecurityMonitoringSignalTriageAttributes assignee(SecurityMonitoringTriag } /** - * Object representing a given user entity. - * + *

Object representing a given user entity.

* @return assignee - */ - @JsonProperty(JSON_PROPERTY_ASSIGNEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringTriageUser getAssignee() { - return assignee; - } - + **/ + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringTriageUser getAssignee() { + return assignee; + } public void setAssignee(SecurityMonitoringTriageUser assignee) { this.assignee = assignee; } - public SecurityMonitoringSignalTriageAttributes incidentIds(List incidentIds) { this.incidentIds = incidentIds; return this; } - public SecurityMonitoringSignalTriageAttributes addIncidentIdsItem(Long incidentIdsItem) { this.incidentIds.add(incidentIdsItem); return this; } /** - * Array of incidents that are associated with this signal. - * + *

Array of incidents that are associated with this signal.

* @return incidentIds - */ - @JsonProperty(JSON_PROPERTY_INCIDENT_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getIncidentIds() { - return incidentIds; - } - + **/ + @JsonProperty(JSON_PROPERTY_INCIDENT_IDS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getIncidentIds() { + return incidentIds; + } public void setIncidentIds(List incidentIds) { this.incidentIds = incidentIds; } - public SecurityMonitoringSignalTriageAttributes state(SecurityMonitoringSignalState state) { this.state = state; this.unparsed |= !state.isValid(); @@ -219,68 +218,65 @@ public SecurityMonitoringSignalTriageAttributes state(SecurityMonitoringSignalSt } /** - * The new triage state of the signal. - * + *

The new triage state of the signal.

* @return state - */ - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalState getState() { - return state; - } - + **/ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalState getState() { + return state; + } public void setState(SecurityMonitoringSignalState state) { if (!state.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.state = state; } - public SecurityMonitoringSignalTriageAttributes stateUpdateTimestamp(Long stateUpdateTimestamp) { this.stateUpdateTimestamp = stateUpdateTimestamp; return this; } /** - * Timestamp of the last update to the signal state. minimum: 0 - * + *

Timestamp of the last update to the signal state.

+ * minimum: 0 * @return stateUpdateTimestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE_UPDATE_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStateUpdateTimestamp() { - return stateUpdateTimestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_UPDATE_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getStateUpdateTimestamp() { + return stateUpdateTimestamp; + } public void setStateUpdateTimestamp(Long stateUpdateTimestamp) { this.stateUpdateTimestamp = stateUpdateTimestamp; } - - public SecurityMonitoringSignalTriageAttributes stateUpdateUser( - SecurityMonitoringTriageUser stateUpdateUser) { + public SecurityMonitoringSignalTriageAttributes stateUpdateUser(SecurityMonitoringTriageUser stateUpdateUser) { this.stateUpdateUser = stateUpdateUser; this.unparsed |= stateUpdateUser.unparsed; return this; } /** - * Object representing a given user entity. - * + *

Object representing a given user entity.

* @return stateUpdateUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATE_UPDATE_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringTriageUser getStateUpdateUser() { - return stateUpdateUser; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_UPDATE_USER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringTriageUser getStateUpdateUser() { + return stateUpdateUser; + } public void setStateUpdateUser(SecurityMonitoringTriageUser stateUpdateUser) { this.stateUpdateUser = stateUpdateUser; } - /** Return true if this SecurityMonitoringSignalTriageAttributes object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalTriageAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -289,39 +285,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalTriageAttributes securityMonitoringSignalTriageAttributes = - (SecurityMonitoringSignalTriageAttributes) o; - return Objects.equals( - this.archiveComment, securityMonitoringSignalTriageAttributes.archiveComment) - && Objects.equals( - this.archiveCommentTimestamp, - securityMonitoringSignalTriageAttributes.archiveCommentTimestamp) - && Objects.equals( - this.archiveCommentUser, securityMonitoringSignalTriageAttributes.archiveCommentUser) - && Objects.equals( - this.archiveReason, securityMonitoringSignalTriageAttributes.archiveReason) - && Objects.equals(this.assignee, securityMonitoringSignalTriageAttributes.assignee) - && Objects.equals(this.incidentIds, securityMonitoringSignalTriageAttributes.incidentIds) - && Objects.equals(this.state, securityMonitoringSignalTriageAttributes.state) - && Objects.equals( - this.stateUpdateTimestamp, - securityMonitoringSignalTriageAttributes.stateUpdateTimestamp) - && Objects.equals( - this.stateUpdateUser, securityMonitoringSignalTriageAttributes.stateUpdateUser); + SecurityMonitoringSignalTriageAttributes securityMonitoringSignalTriageAttributes = (SecurityMonitoringSignalTriageAttributes) o; + return Objects.equals(this.archiveComment, securityMonitoringSignalTriageAttributes.archiveComment) && Objects.equals(this.archiveCommentTimestamp, securityMonitoringSignalTriageAttributes.archiveCommentTimestamp) && Objects.equals(this.archiveCommentUser, securityMonitoringSignalTriageAttributes.archiveCommentUser) && Objects.equals(this.archiveReason, securityMonitoringSignalTriageAttributes.archiveReason) && Objects.equals(this.assignee, securityMonitoringSignalTriageAttributes.assignee) && Objects.equals(this.incidentIds, securityMonitoringSignalTriageAttributes.incidentIds) && Objects.equals(this.state, securityMonitoringSignalTriageAttributes.state) && Objects.equals(this.stateUpdateTimestamp, securityMonitoringSignalTriageAttributes.stateUpdateTimestamp) && Objects.equals(this.stateUpdateUser, securityMonitoringSignalTriageAttributes.stateUpdateUser); } + @Override public int hashCode() { - return Objects.hash( - archiveComment, - archiveCommentTimestamp, - archiveCommentUser, - archiveReason, - assignee, - incidentIds, - state, - stateUpdateTimestamp, - stateUpdateUser); + return Objects.hash(archiveComment,archiveCommentTimestamp,archiveCommentUser,archiveReason,assignee,incidentIds,state,stateUpdateTimestamp,stateUpdateUser); } @Override @@ -329,24 +300,21 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecurityMonitoringSignalTriageAttributes {\n"); sb.append(" archiveComment: ").append(toIndentedString(archiveComment)).append("\n"); - sb.append(" archiveCommentTimestamp: ") - .append(toIndentedString(archiveCommentTimestamp)) - .append("\n"); + sb.append(" archiveCommentTimestamp: ").append(toIndentedString(archiveCommentTimestamp)).append("\n"); sb.append(" archiveCommentUser: ").append(toIndentedString(archiveCommentUser)).append("\n"); sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" incidentIds: ").append(toIndentedString(incidentIds)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateUpdateTimestamp: ") - .append(toIndentedString(stateUpdateTimestamp)) - .append("\n"); + sb.append(" stateUpdateTimestamp: ").append(toIndentedString(stateUpdateTimestamp)).append("\n"); sb.append(" stateUpdateUser: ").append(toIndentedString(stateUpdateUser)).append("\n"); sb.append("}"); return sb.toString(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateData.java index 580a2a5401b..8be07585b36 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateData.java @@ -6,45 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Data containing the updated triage attributes of the signal. */ -@JsonPropertyOrder({SecurityMonitoringSignalTriageUpdateData.JSON_PROPERTY_ATTRIBUTES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Data containing the updated triage attributes of the signal.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalTriageUpdateData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalTriageUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SecurityMonitoringSignalTriageAttributes attributes; - public SecurityMonitoringSignalTriageUpdateData attributes( - SecurityMonitoringSignalTriageAttributes attributes) { + public SecurityMonitoringSignalTriageUpdateData attributes(SecurityMonitoringSignalTriageAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes describing a triage state update operation over a security signal. - * + *

Attributes describing a triage state update operation over a security signal.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalTriageAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalTriageAttributes getAttributes() { + return attributes; + } public void setAttributes(SecurityMonitoringSignalTriageAttributes attributes) { this.attributes = attributes; } - /** Return true if this SecurityMonitoringSignalTriageUpdateData object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalTriageUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -53,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalTriageUpdateData securityMonitoringSignalTriageUpdateData = - (SecurityMonitoringSignalTriageUpdateData) o; + SecurityMonitoringSignalTriageUpdateData securityMonitoringSignalTriageUpdateData = (SecurityMonitoringSignalTriageUpdateData) o; return Objects.equals(this.attributes, securityMonitoringSignalTriageUpdateData.attributes); } + @Override public int hashCode() { return Objects.hash(attributes); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateResponse.java index 701ea4048ea..44dc4770632 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalTriageUpdateResponse.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The response returned after all triage operations, containing the updated signal triage data. */ -@JsonPropertyOrder({SecurityMonitoringSignalTriageUpdateResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

The response returned after all triage operations, containing the updated signal triage data.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalTriageUpdateResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalTriageUpdateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SecurityMonitoringSignalTriageUpdateData data; @@ -26,35 +47,33 @@ public SecurityMonitoringSignalTriageUpdateResponse() {} @JsonCreator public SecurityMonitoringSignalTriageUpdateResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SecurityMonitoringSignalTriageUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SecurityMonitoringSignalTriageUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - - public SecurityMonitoringSignalTriageUpdateResponse data( - SecurityMonitoringSignalTriageUpdateData data) { + public SecurityMonitoringSignalTriageUpdateResponse data(SecurityMonitoringSignalTriageUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Data containing the updated triage attributes of the signal. - * + *

Data containing the updated triage attributes of the signal.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringSignalTriageUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringSignalTriageUpdateData getData() { + return data; + } public void setData(SecurityMonitoringSignalTriageUpdateData data) { this.data = data; } - /** Return true if this SecurityMonitoringSignalTriageUpdateResponse object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalTriageUpdateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -63,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalTriageUpdateResponse securityMonitoringSignalTriageUpdateResponse = - (SecurityMonitoringSignalTriageUpdateResponse) o; + SecurityMonitoringSignalTriageUpdateResponse securityMonitoringSignalTriageUpdateResponse = (SecurityMonitoringSignalTriageUpdateResponse) o; return Objects.equals(this.data, securityMonitoringSignalTriageUpdateResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -83,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalType.java index f6dc34859bf..a9713b7c041 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of event. */ +/** + *

The type of event.

+ */ @JsonSerialize(using = SecurityMonitoringSignalType.SecurityMonitoringSignalTypeSerializer.class) public class SecurityMonitoringSignalType { - public static final SecurityMonitoringSignalType SIGNAL = - new SecurityMonitoringSignalType("signal"); + public static final SecurityMonitoringSignalType SIGNAL = new SecurityMonitoringSignalType("signal"); private static final Set allowedValues = new HashSet(Arrays.asList("signal")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringSignalTypeSerializer - extends StdSerializer { - public SecurityMonitoringSignalTypeSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringSignalTypeSerializer extends StdSerializer { + public SecurityMonitoringSignalTypeSerializer(Class t) { + super(t); + } - public SecurityMonitoringSignalTypeSerializer() { - this(null); - } + public SecurityMonitoringSignalTypeSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringSignalType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringSignalType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringSignalType object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponse.java index b91f0709051..386852f084f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponse.java @@ -6,26 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * The response object with all security signals matching the request and pagination information. + *

The response object with all security signals matching the request + * and pagination information.

*/ @JsonPropertyOrder({ SecurityMonitoringSignalsListResponse.JSON_PROPERTY_DATA, SecurityMonitoringSignalsListResponse.JSON_PROPERTY_LINKS, SecurityMonitoringSignalsListResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -42,7 +59,6 @@ public SecurityMonitoringSignalsListResponse data(List } return this; } - public SecurityMonitoringSignalsListResponse addDataItem(SecurityMonitoringSignal dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -53,68 +69,63 @@ public SecurityMonitoringSignalsListResponse addDataItem(SecurityMonitoringSigna } /** - * An array of security signals matching the request. - * + *

An array of security signals matching the request.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - - public SecurityMonitoringSignalsListResponse links( - SecurityMonitoringSignalsListResponseLinks links) { + public SecurityMonitoringSignalsListResponse links(SecurityMonitoringSignalsListResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; return this; } /** - * Links attributes. - * + *

Links attributes.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalsListResponseLinks getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalsListResponseLinks getLinks() { + return links; + } public void setLinks(SecurityMonitoringSignalsListResponseLinks links) { this.links = links; } - - public SecurityMonitoringSignalsListResponse meta( - SecurityMonitoringSignalsListResponseMeta meta) { + public SecurityMonitoringSignalsListResponse meta(SecurityMonitoringSignalsListResponseMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; return this; } /** - * Meta attributes. - * + *

Meta attributes.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalsListResponseMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalsListResponseMeta getMeta() { + return meta; + } public void setMeta(SecurityMonitoringSignalsListResponseMeta meta) { this.meta = meta; } - /** Return true if this SecurityMonitoringSignalsListResponse object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -123,16 +134,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalsListResponse securityMonitoringSignalsListResponse = - (SecurityMonitoringSignalsListResponse) o; - return Objects.equals(this.data, securityMonitoringSignalsListResponse.data) - && Objects.equals(this.links, securityMonitoringSignalsListResponse.links) - && Objects.equals(this.meta, securityMonitoringSignalsListResponse.meta); + SecurityMonitoringSignalsListResponse securityMonitoringSignalsListResponse = (SecurityMonitoringSignalsListResponse) o; + return Objects.equals(this.data, securityMonitoringSignalsListResponse.data) && Objects.equals(this.links, securityMonitoringSignalsListResponse.links) && Objects.equals(this.meta, securityMonitoringSignalsListResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, links, meta); + return Objects.hash(data,links,meta); } @Override @@ -147,7 +156,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseLinks.java index f3fbfd1556e..e373ecb4e6d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseLinks.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Links attributes. */ -@JsonPropertyOrder({SecurityMonitoringSignalsListResponseLinks.JSON_PROPERTY_NEXT}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Links attributes.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsListResponseLinks.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalsListResponseLinks { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NEXT = "next"; private String next; @@ -27,23 +49,24 @@ public SecurityMonitoringSignalsListResponseLinks next(String next) { } /** - * The link for the next set of results. Note: The request can also be made using - * the POST endpoint. - * + *

The link for the next set of results. Note: The request can also be made using the + * POST endpoint.

* @return next - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNext() { - return next; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } public void setNext(String next) { this.next = next; } - /** Return true if this SecurityMonitoringSignalsListResponseLinks object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalsListResponseLinks object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalsListResponseLinks securityMonitoringSignalsListResponseLinks = - (SecurityMonitoringSignalsListResponseLinks) o; + SecurityMonitoringSignalsListResponseLinks securityMonitoringSignalsListResponseLinks = (SecurityMonitoringSignalsListResponseLinks) o; return Objects.equals(this.next, securityMonitoringSignalsListResponseLinks.next); } + @Override public int hashCode() { return Objects.hash(next); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMeta.java index 99198304664..42cf92f1c40 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMeta.java @@ -6,45 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Meta attributes. */ -@JsonPropertyOrder({SecurityMonitoringSignalsListResponseMeta.JSON_PROPERTY_PAGE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Meta attributes.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsListResponseMeta.JSON_PROPERTY_PAGE +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalsListResponseMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGE = "page"; private SecurityMonitoringSignalsListResponseMetaPage page; - public SecurityMonitoringSignalsListResponseMeta page( - SecurityMonitoringSignalsListResponseMetaPage page) { + public SecurityMonitoringSignalsListResponseMeta page(SecurityMonitoringSignalsListResponseMetaPage page) { this.page = page; this.unparsed |= page.unparsed; return this; } /** - * Paging attributes. - * + *

Paging attributes.

* @return page - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringSignalsListResponseMetaPage getPage() { - return page; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringSignalsListResponseMetaPage getPage() { + return page; + } public void setPage(SecurityMonitoringSignalsListResponseMetaPage page) { this.page = page; } - /** Return true if this SecurityMonitoringSignalsListResponseMeta object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalsListResponseMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -53,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalsListResponseMeta securityMonitoringSignalsListResponseMeta = - (SecurityMonitoringSignalsListResponseMeta) o; + SecurityMonitoringSignalsListResponseMeta securityMonitoringSignalsListResponseMeta = (SecurityMonitoringSignalsListResponseMeta) o; return Objects.equals(this.page, securityMonitoringSignalsListResponseMeta.page); } + @Override public int hashCode() { return Objects.hash(page); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMetaPage.java index 1656e5eb49d..a5eff2649f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMetaPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsListResponseMetaPage.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Paging attributes. */ -@JsonPropertyOrder({SecurityMonitoringSignalsListResponseMetaPage.JSON_PROPERTY_AFTER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Paging attributes.

+ */ +@JsonPropertyOrder({ + SecurityMonitoringSignalsListResponseMetaPage.JSON_PROPERTY_AFTER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringSignalsListResponseMetaPage { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AFTER = "after"; private String after; @@ -27,23 +49,24 @@ public SecurityMonitoringSignalsListResponseMetaPage after(String after) { } /** - * The cursor used to get the next results, if any. To make the next request, use the same - * parameters with the addition of the page[cursor]. - * + *

The cursor used to get the next results, if any. To make the next request, use the same + * parameters with the addition of the page[cursor].

* @return after - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AFTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAfter() { - return after; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AFTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getAfter() { + return after; + } public void setAfter(String after) { this.after = after; } - /** Return true if this SecurityMonitoringSignalsListResponseMetaPage object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalsListResponseMetaPage object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringSignalsListResponseMetaPage securityMonitoringSignalsListResponseMetaPage = - (SecurityMonitoringSignalsListResponseMetaPage) o; + SecurityMonitoringSignalsListResponseMetaPage securityMonitoringSignalsListResponseMetaPage = (SecurityMonitoringSignalsListResponseMetaPage) o; return Objects.equals(this.after, securityMonitoringSignalsListResponseMetaPage.after); } + @Override public int hashCode() { return Objects.hash(after); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsSort.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsSort.java index 37afe019523..a98675045c8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalsSort.java @@ -6,30 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The sort parameters used for querying security signals. */ +/** + *

The sort parameters used for querying security signals.

+ */ @JsonSerialize(using = SecurityMonitoringSignalsSort.SecurityMonitoringSignalsSortSerializer.class) public class SecurityMonitoringSignalsSort { - public static final SecurityMonitoringSignalsSort TIMESTAMP_ASCENDING = - new SecurityMonitoringSignalsSort("timestamp"); - public static final SecurityMonitoringSignalsSort TIMESTAMP_DESCENDING = - new SecurityMonitoringSignalsSort("-timestamp"); + public static final SecurityMonitoringSignalsSort TIMESTAMP_ASCENDING = new SecurityMonitoringSignalsSort("timestamp"); + public static final SecurityMonitoringSignalsSort TIMESTAMP_DESCENDING = new SecurityMonitoringSignalsSort("-timestamp"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timestamp", "-timestamp")); + private static final Set allowedValues = new HashSet(Arrays.asList("timestamp", "-timestamp")); private String value; @@ -41,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class SecurityMonitoringSignalsSortSerializer - extends StdSerializer { - public SecurityMonitoringSignalsSortSerializer(Class t) { - super(t); - } + public static class SecurityMonitoringSignalsSortSerializer extends StdSerializer { + public SecurityMonitoringSignalsSortSerializer(Class t) { + super(t); + } - public SecurityMonitoringSignalsSortSerializer() { - this(null); - } + public SecurityMonitoringSignalsSortSerializer() { + this(null); + } - @Override - public void serialize( - SecurityMonitoringSignalsSort value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SecurityMonitoringSignalsSort value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SecurityMonitoringSignalsSort object is equal to o. */ + /** + * Return true if this SecurityMonitoringSignalsSort object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleCreatePayload.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleCreatePayload.java index 612e45f9743..61ad1bf4709 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleCreatePayload.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleCreatePayload.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Create a new rule. */ +/** + *

Create a new rule.

+ */ @JsonPropertyOrder({ SecurityMonitoringStandardRuleCreatePayload.JSON_PROPERTY_CASES, SecurityMonitoringStandardRuleCreatePayload.JSON_PROPERTY_FILTERS, @@ -28,10 +45,10 @@ SecurityMonitoringStandardRuleCreatePayload.JSON_PROPERTY_TAGS, SecurityMonitoringStandardRuleCreatePayload.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringStandardRuleCreatePayload { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CASES = "cases"; private List cases = new ArrayList<>(); @@ -66,66 +83,54 @@ public SecurityMonitoringStandardRuleCreatePayload() {} @JsonCreator public SecurityMonitoringStandardRuleCreatePayload( - @JsonProperty(required = true, value = JSON_PROPERTY_CASES) - List cases, - @JsonProperty(required = true, value = JSON_PROPERTY_IS_ENABLED) Boolean isEnabled, - @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) - SecurityMonitoringRuleOptions options, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERIES) - List queries) { - this.cases = cases; - this.isEnabled = isEnabled; - this.message = message; - this.name = name; - this.options = options; - this.unparsed |= options.unparsed; - this.queries = queries; - } - - public SecurityMonitoringStandardRuleCreatePayload cases( - List cases) { + @JsonProperty(required=true, value=JSON_PROPERTY_CASES)List cases, + @JsonProperty(required=true, value=JSON_PROPERTY_IS_ENABLED)Boolean isEnabled, + @JsonProperty(required=true, value=JSON_PROPERTY_MESSAGE)String message, + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_OPTIONS)SecurityMonitoringRuleOptions options, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERIES)List queries) { + this.cases = cases; + this.isEnabled = isEnabled; + this.message = message; + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; + this.queries = queries; + } + public SecurityMonitoringStandardRuleCreatePayload cases(List cases) { this.cases = cases; for (SecurityMonitoringRuleCaseCreate item : cases) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringStandardRuleCreatePayload addCasesItem( - SecurityMonitoringRuleCaseCreate casesItem) { + public SecurityMonitoringStandardRuleCreatePayload addCasesItem(SecurityMonitoringRuleCaseCreate casesItem) { this.cases.add(casesItem); this.unparsed |= casesItem.unparsed; return this; } /** - * Cases for generating signals. - * + *

Cases for generating signals.

* @return cases - */ - @JsonProperty(JSON_PROPERTY_CASES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getCases() { - return cases; - } - + **/ + @JsonProperty(JSON_PROPERTY_CASES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getCases() { + return cases; + } public void setCases(List cases) { this.cases = cases; } - - public SecurityMonitoringStandardRuleCreatePayload filters( - List filters) { + public SecurityMonitoringStandardRuleCreatePayload filters(List filters) { this.filters = filters; for (SecurityMonitoringFilter item : filters) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringStandardRuleCreatePayload addFiltersItem( - SecurityMonitoringFilter filtersItem) { + public SecurityMonitoringStandardRuleCreatePayload addFiltersItem(SecurityMonitoringFilter filtersItem) { if (this.filters == null) { this.filters = new ArrayList<>(); } @@ -135,160 +140,141 @@ public SecurityMonitoringStandardRuleCreatePayload addFiltersItem( } /** - * Additional queries to filter matched events before they are processed. - * + *

Additional queries to filter matched events before they are processed.

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public SecurityMonitoringStandardRuleCreatePayload hasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; return this; } /** - * Whether the notifications include the triggering group-by values in their title. - * + *

Whether the notifications include the triggering group-by values in their title.

* @return hasExtendedTitle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasExtendedTitle() { - return hasExtendedTitle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasExtendedTitle() { + return hasExtendedTitle; + } public void setHasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; } - public SecurityMonitoringStandardRuleCreatePayload isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the rule is enabled. - * + *

Whether the rule is enabled.

* @return isEnabled - */ - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityMonitoringStandardRuleCreatePayload message(String message) { this.message = message; return this; } /** - * Message for generated signals. - * + *

Message for generated signals.

* @return message - */ - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; - } - + **/ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SecurityMonitoringStandardRuleCreatePayload name(String name) { this.name = name; return this; } /** - * The name of the rule. - * + *

The name of the rule.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public SecurityMonitoringStandardRuleCreatePayload options( - SecurityMonitoringRuleOptions options) { + public SecurityMonitoringStandardRuleCreatePayload options(SecurityMonitoringRuleOptions options) { this.options = options; this.unparsed |= options.unparsed; return this; } /** - * Options on rules. - * + *

Options on rules.

* @return options - */ - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringRuleOptions getOptions() { - return options; - } - + **/ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringRuleOptions getOptions() { + return options; + } public void setOptions(SecurityMonitoringRuleOptions options) { this.options = options; } - - public SecurityMonitoringStandardRuleCreatePayload queries( - List queries) { + public SecurityMonitoringStandardRuleCreatePayload queries(List queries) { this.queries = queries; for (SecurityMonitoringStandardRuleQuery item : queries) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringStandardRuleCreatePayload addQueriesItem( - SecurityMonitoringStandardRuleQuery queriesItem) { + public SecurityMonitoringStandardRuleCreatePayload addQueriesItem(SecurityMonitoringStandardRuleQuery queriesItem) { this.queries.add(queriesItem); this.unparsed |= queriesItem.unparsed; return this; } /** - * Queries for selecting logs which are part of the rule. - * + *

Queries for selecting logs which are part of the rule.

* @return queries - */ - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getQueries() { - return queries; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public SecurityMonitoringStandardRuleCreatePayload tags(List tags) { this.tags = tags; return this; } - public SecurityMonitoringStandardRuleCreatePayload addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -298,21 +284,19 @@ public SecurityMonitoringStandardRuleCreatePayload addTagsItem(String tagsItem) } /** - * Tags for generated signals. - * + *

Tags for generated signals.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SecurityMonitoringStandardRuleCreatePayload type(SecurityMonitoringRuleTypeCreate type) { this.type = type; this.unparsed |= !type.isValid(); @@ -320,25 +304,26 @@ public SecurityMonitoringStandardRuleCreatePayload type(SecurityMonitoringRuleTy } /** - * The rule type. - * + *

The rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleTypeCreate getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleTypeCreate getType() { + return type; + } public void setType(SecurityMonitoringRuleTypeCreate type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SecurityMonitoringStandardRuleCreatePayload object is equal to o. */ + /** + * Return true if this SecurityMonitoringStandardRuleCreatePayload object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -347,25 +332,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringStandardRuleCreatePayload securityMonitoringStandardRuleCreatePayload = - (SecurityMonitoringStandardRuleCreatePayload) o; - return Objects.equals(this.cases, securityMonitoringStandardRuleCreatePayload.cases) - && Objects.equals(this.filters, securityMonitoringStandardRuleCreatePayload.filters) - && Objects.equals( - this.hasExtendedTitle, securityMonitoringStandardRuleCreatePayload.hasExtendedTitle) - && Objects.equals(this.isEnabled, securityMonitoringStandardRuleCreatePayload.isEnabled) - && Objects.equals(this.message, securityMonitoringStandardRuleCreatePayload.message) - && Objects.equals(this.name, securityMonitoringStandardRuleCreatePayload.name) - && Objects.equals(this.options, securityMonitoringStandardRuleCreatePayload.options) - && Objects.equals(this.queries, securityMonitoringStandardRuleCreatePayload.queries) - && Objects.equals(this.tags, securityMonitoringStandardRuleCreatePayload.tags) - && Objects.equals(this.type, securityMonitoringStandardRuleCreatePayload.type); + SecurityMonitoringStandardRuleCreatePayload securityMonitoringStandardRuleCreatePayload = (SecurityMonitoringStandardRuleCreatePayload) o; + return Objects.equals(this.cases, securityMonitoringStandardRuleCreatePayload.cases) && Objects.equals(this.filters, securityMonitoringStandardRuleCreatePayload.filters) && Objects.equals(this.hasExtendedTitle, securityMonitoringStandardRuleCreatePayload.hasExtendedTitle) && Objects.equals(this.isEnabled, securityMonitoringStandardRuleCreatePayload.isEnabled) && Objects.equals(this.message, securityMonitoringStandardRuleCreatePayload.message) && Objects.equals(this.name, securityMonitoringStandardRuleCreatePayload.name) && Objects.equals(this.options, securityMonitoringStandardRuleCreatePayload.options) && Objects.equals(this.queries, securityMonitoringStandardRuleCreatePayload.queries) && Objects.equals(this.tags, securityMonitoringStandardRuleCreatePayload.tags) && Objects.equals(this.type, securityMonitoringStandardRuleCreatePayload.type); } + @Override public int hashCode() { - return Objects.hash( - cases, filters, hasExtendedTitle, isEnabled, message, name, options, queries, tags, type); + return Objects.hash(cases,filters,hasExtendedTitle,isEnabled,message,name,options,queries,tags,type); } @Override @@ -387,7 +361,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleQuery.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleQuery.java index ba2fe3bc731..7965bab66d0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleQuery.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Query for matching rule. */ +/** + *

Query for matching rule.

+ */ @JsonPropertyOrder({ SecurityMonitoringStandardRuleQuery.JSON_PROPERTY_AGGREGATION, SecurityMonitoringStandardRuleQuery.JSON_PROPERTY_DISTINCT_FIELDS, @@ -25,10 +42,10 @@ SecurityMonitoringStandardRuleQuery.JSON_PROPERTY_NAME, SecurityMonitoringStandardRuleQuery.JSON_PROPERTY_QUERY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringStandardRuleQuery { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; private SecurityMonitoringRuleQueryAggregation aggregation; @@ -54,41 +71,36 @@ public SecurityMonitoringStandardRuleQuery() {} @JsonCreator public SecurityMonitoringStandardRuleQuery( - @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { - this.query = query; + @JsonProperty(required=true, value=JSON_PROPERTY_QUERY)String query) { + this.query = query; } - - public SecurityMonitoringStandardRuleQuery aggregation( - SecurityMonitoringRuleQueryAggregation aggregation) { + public SecurityMonitoringStandardRuleQuery aggregation(SecurityMonitoringRuleQueryAggregation aggregation) { this.aggregation = aggregation; this.unparsed |= !aggregation.isValid(); return this; } /** - * The aggregation type. - * + *

The aggregation type.

* @return aggregation - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGGREGATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleQueryAggregation getAggregation() { - return aggregation; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleQueryAggregation getAggregation() { + return aggregation; + } public void setAggregation(SecurityMonitoringRuleQueryAggregation aggregation) { if (!aggregation.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.aggregation = aggregation; } - public SecurityMonitoringStandardRuleQuery distinctFields(List distinctFields) { this.distinctFields = distinctFields; return this; } - public SecurityMonitoringStandardRuleQuery addDistinctFieldsItem(String distinctFieldsItem) { if (this.distinctFields == null) { this.distinctFields = new ArrayList<>(); @@ -98,26 +110,23 @@ public SecurityMonitoringStandardRuleQuery addDistinctFieldsItem(String distinct } /** - * Field for which the cardinality is measured. Sent as an array. - * + *

Field for which the cardinality is measured. Sent as an array.

* @return distinctFields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISTINCT_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDistinctFields() { - return distinctFields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISTINCT_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDistinctFields() { + return distinctFields; + } public void setDistinctFields(List distinctFields) { this.distinctFields = distinctFields; } - public SecurityMonitoringStandardRuleQuery groupByFields(List groupByFields) { this.groupByFields = groupByFields; return this; } - public SecurityMonitoringStandardRuleQuery addGroupByFieldsItem(String groupByFieldsItem) { if (this.groupByFields == null) { this.groupByFields = new ArrayList<>(); @@ -127,51 +136,46 @@ public SecurityMonitoringStandardRuleQuery addGroupByFieldsItem(String groupByFi } /** - * Fields to group by. - * + *

Fields to group by.

* @return groupByFields - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_BY_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupByFields() { - return groupByFields; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_BY_FIELDS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupByFields() { + return groupByFields; + } public void setGroupByFields(List groupByFields) { this.groupByFields = groupByFields; } - public SecurityMonitoringStandardRuleQuery metric(String metric) { this.metric = metric; return this; } /** - * (Deprecated) The target field to aggregate over when using the sum or max aggregations. - * metrics field should be used instead. - * + *

(Deprecated) The target field to aggregate over when using the sum or max + * aggregations. metrics field should be used instead.

* @return metric * @deprecated - */ - @Deprecated - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRIC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMetric() { - return metric; - } - + **/ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMetric() { + return metric; + } @Deprecated public void setMetric(String metric) { this.metric = metric; } - public SecurityMonitoringStandardRuleQuery metrics(List metrics) { this.metrics = metrics; return this; } - public SecurityMonitoringStandardRuleQuery addMetricsItem(String metricsItem) { if (this.metrics == null) { this.metrics = new ArrayList<>(); @@ -181,65 +185,60 @@ public SecurityMonitoringStandardRuleQuery addMetricsItem(String metricsItem) { } /** - * Group of target fields to aggregate over when using the sum, max, geo data, or new value - * aggregations. The sum, max, and geo data aggregations only accept one value in this list, - * whereas the new value aggregation accepts up to five values. - * + *

Group of target fields to aggregate over when using the sum, max, geo data, or new value aggregations. The sum, max, and geo data aggregations only accept one value in this list, whereas the new value aggregation accepts up to five values.

* @return metrics - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_METRICS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMetrics() { - return metrics; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getMetrics() { + return metrics; + } public void setMetrics(List metrics) { this.metrics = metrics; } - public SecurityMonitoringStandardRuleQuery name(String name) { this.name = name; return this; } /** - * Name of the query. - * + *

Name of the query.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringStandardRuleQuery query(String query) { this.query = query; return this; } /** - * Query to run on logs. - * + *

Query to run on logs.

* @return query - */ - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getQuery() { - return query; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this SecurityMonitoringStandardRuleQuery object is equal to o. */ + /** + * Return true if this SecurityMonitoringStandardRuleQuery object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -248,20 +247,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringStandardRuleQuery securityMonitoringStandardRuleQuery = - (SecurityMonitoringStandardRuleQuery) o; - return Objects.equals(this.aggregation, securityMonitoringStandardRuleQuery.aggregation) - && Objects.equals(this.distinctFields, securityMonitoringStandardRuleQuery.distinctFields) - && Objects.equals(this.groupByFields, securityMonitoringStandardRuleQuery.groupByFields) - && Objects.equals(this.metric, securityMonitoringStandardRuleQuery.metric) - && Objects.equals(this.metrics, securityMonitoringStandardRuleQuery.metrics) - && Objects.equals(this.name, securityMonitoringStandardRuleQuery.name) - && Objects.equals(this.query, securityMonitoringStandardRuleQuery.query); + SecurityMonitoringStandardRuleQuery securityMonitoringStandardRuleQuery = (SecurityMonitoringStandardRuleQuery) o; + return Objects.equals(this.aggregation, securityMonitoringStandardRuleQuery.aggregation) && Objects.equals(this.distinctFields, securityMonitoringStandardRuleQuery.distinctFields) && Objects.equals(this.groupByFields, securityMonitoringStandardRuleQuery.groupByFields) && Objects.equals(this.metric, securityMonitoringStandardRuleQuery.metric) && Objects.equals(this.metrics, securityMonitoringStandardRuleQuery.metrics) && Objects.equals(this.name, securityMonitoringStandardRuleQuery.name) && Objects.equals(this.query, securityMonitoringStandardRuleQuery.query); } + @Override public int hashCode() { - return Objects.hash(aggregation, distinctFields, groupByFields, metric, metrics, name, query); + return Objects.hash(aggregation,distinctFields,groupByFields,metric,metrics,name,query); } @Override @@ -280,7 +273,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleResponse.java index a735fd58b0f..5e9c540f1c3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleResponse.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Rule. */ +/** + *

Rule.

+ */ @JsonPropertyOrder({ SecurityMonitoringStandardRuleResponse.JSON_PROPERTY_CASES, SecurityMonitoringStandardRuleResponse.JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS, @@ -36,10 +54,10 @@ SecurityMonitoringStandardRuleResponse.JSON_PROPERTY_UPDATE_AUTHOR_ID, SecurityMonitoringStandardRuleResponse.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringStandardRuleResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CASES = "cases"; private List cases = null; @@ -104,7 +122,6 @@ public SecurityMonitoringStandardRuleResponse cases(List(); @@ -115,108 +132,96 @@ public SecurityMonitoringStandardRuleResponse addCasesItem(SecurityMonitoringRul } /** - * Cases for generating signals. - * + *

Cases for generating signals.

* @return cases - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CASES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCases() { - return cases; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getCases() { + return cases; + } public void setCases(List cases) { this.cases = cases; } - - public SecurityMonitoringStandardRuleResponse complianceSignalOptions( - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { + public SecurityMonitoringStandardRuleResponse complianceSignalOptions(CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { this.complianceSignalOptions = complianceSignalOptions; this.unparsed |= complianceSignalOptions.unparsed; return this; } /** - * How to generate compliance signals. Useful for cloud_configuration rules only. - * + *

How to generate compliance signals. Useful for cloud_configuration rules only.

* @return complianceSignalOptions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudConfigurationRuleComplianceSignalOptions getComplianceSignalOptions() { - return complianceSignalOptions; - } - - public void setComplianceSignalOptions( - CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLIANCE_SIGNAL_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public CloudConfigurationRuleComplianceSignalOptions getComplianceSignalOptions() { + return complianceSignalOptions; + } + public void setComplianceSignalOptions(CloudConfigurationRuleComplianceSignalOptions complianceSignalOptions) { this.complianceSignalOptions = complianceSignalOptions; } - public SecurityMonitoringStandardRuleResponse createdAt(Long createdAt) { this.createdAt = createdAt; return this; } /** - * When the rule was created, timestamp in milliseconds. - * + *

When the rule was created, timestamp in milliseconds.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedAt() { + return createdAt; + } public void setCreatedAt(Long createdAt) { this.createdAt = createdAt; } - public SecurityMonitoringStandardRuleResponse creationAuthorId(Long creationAuthorId) { this.creationAuthorId = creationAuthorId; return this; } /** - * User ID of the user who created the rule. - * + *

User ID of the user who created the rule.

* @return creationAuthorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATION_AUTHOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreationAuthorId() { - return creationAuthorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATION_AUTHOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreationAuthorId() { + return creationAuthorId; + } public void setCreationAuthorId(Long creationAuthorId) { this.creationAuthorId = creationAuthorId; } - public SecurityMonitoringStandardRuleResponse deprecationDate(Long deprecationDate) { this.deprecationDate = deprecationDate; return this; } /** - * When the rule will be deprecated, timestamp in milliseconds. - * + *

When the rule will be deprecated, timestamp in milliseconds.

* @return deprecationDate - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEPRECATION_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDeprecationDate() { - return deprecationDate; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATION_DATE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getDeprecationDate() { + return deprecationDate; + } public void setDeprecationDate(Long deprecationDate) { this.deprecationDate = deprecationDate; } - public SecurityMonitoringStandardRuleResponse filters(List filters) { this.filters = filters; for (SecurityMonitoringFilter item : filters) { @@ -224,9 +229,7 @@ public SecurityMonitoringStandardRuleResponse filters(List(); } @@ -236,168 +239,152 @@ public SecurityMonitoringStandardRuleResponse addFiltersItem( } /** - * Additional queries to filter matched events before they are processed. - * + *

Additional queries to filter matched events before they are processed.

* @return filters - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFilters() { - return filters; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } public void setFilters(List filters) { this.filters = filters; } - public SecurityMonitoringStandardRuleResponse hasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; return this; } /** - * Whether the notifications include the triggering group-by values in their title. - * + *

Whether the notifications include the triggering group-by values in their title.

* @return hasExtendedTitle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasExtendedTitle() { - return hasExtendedTitle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_EXTENDED_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasExtendedTitle() { + return hasExtendedTitle; + } public void setHasExtendedTitle(Boolean hasExtendedTitle) { this.hasExtendedTitle = hasExtendedTitle; } - public SecurityMonitoringStandardRuleResponse id(String id) { this.id = id; return this; } /** - * The ID of the rule. - * + *

The ID of the rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SecurityMonitoringStandardRuleResponse isDefault(Boolean isDefault) { this.isDefault = isDefault; return this; } /** - * Whether the rule is included by default. - * + *

Whether the rule is included by default.

* @return isDefault - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_DEFAULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDefault() { - return isDefault; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDefault() { + return isDefault; + } public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } - public SecurityMonitoringStandardRuleResponse isDeleted(Boolean isDeleted) { this.isDeleted = isDeleted; return this; } /** - * Whether the rule has been deleted. - * + *

Whether the rule has been deleted.

* @return isDeleted - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_DELETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDeleted() { - return isDeleted; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDeleted() { + return isDeleted; + } public void setIsDeleted(Boolean isDeleted) { this.isDeleted = isDeleted; } - public SecurityMonitoringStandardRuleResponse isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether the rule is enabled. - * + *

Whether the rule is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SecurityMonitoringStandardRuleResponse message(String message) { this.message = message; return this; } /** - * Message for generated signals. - * + *

Message for generated signals.

* @return message - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } public void setMessage(String message) { this.message = message; } - public SecurityMonitoringStandardRuleResponse name(String name) { this.name = name; return this; } /** - * The name of the rule. - * + *

The name of the rule.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringStandardRuleResponse options(SecurityMonitoringRuleOptions options) { this.options = options; this.unparsed |= options.unparsed; @@ -405,32 +392,27 @@ public SecurityMonitoringStandardRuleResponse options(SecurityMonitoringRuleOpti } /** - * Options on rules. - * + *

Options on rules.

* @return options - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleOptions getOptions() { - return options; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleOptions getOptions() { + return options; + } public void setOptions(SecurityMonitoringRuleOptions options) { this.options = options; } - - public SecurityMonitoringStandardRuleResponse queries( - List queries) { + public SecurityMonitoringStandardRuleResponse queries(List queries) { this.queries = queries; for (SecurityMonitoringStandardRuleQuery item : queries) { this.unparsed |= item.unparsed; } return this; } - - public SecurityMonitoringStandardRuleResponse addQueriesItem( - SecurityMonitoringStandardRuleQuery queriesItem) { + public SecurityMonitoringStandardRuleResponse addQueriesItem(SecurityMonitoringStandardRuleQuery queriesItem) { if (this.queries == null) { this.queries = new ArrayList<>(); } @@ -440,26 +422,23 @@ public SecurityMonitoringStandardRuleResponse addQueriesItem( } /** - * Queries for selecting logs which are part of the rule. - * + *

Queries for selecting logs which are part of the rule.

* @return queries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getQueries() { - return queries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public SecurityMonitoringStandardRuleResponse tags(List tags) { this.tags = tags; return this; } - public SecurityMonitoringStandardRuleResponse addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -469,21 +448,19 @@ public SecurityMonitoringStandardRuleResponse addTagsItem(String tagsItem) { } /** - * Tags for generated signals. - * + *

Tags for generated signals.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public SecurityMonitoringStandardRuleResponse type(SecurityMonitoringRuleTypeRead type) { this.type = type; this.unparsed |= !type.isValid(); @@ -491,67 +468,64 @@ public SecurityMonitoringStandardRuleResponse type(SecurityMonitoringRuleTypeRea } /** - * The rule type. - * + *

The rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringRuleTypeRead getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringRuleTypeRead getType() { + return type; + } public void setType(SecurityMonitoringRuleTypeRead type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public SecurityMonitoringStandardRuleResponse updateAuthorId(Long updateAuthorId) { this.updateAuthorId = updateAuthorId; return this; } /** - * User ID of the user who updated the rule. - * + *

User ID of the user who updated the rule.

* @return updateAuthorId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UPDATE_AUTHOR_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getUpdateAuthorId() { - return updateAuthorId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATE_AUTHOR_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getUpdateAuthorId() { + return updateAuthorId; + } public void setUpdateAuthorId(Long updateAuthorId) { this.updateAuthorId = updateAuthorId; } - public SecurityMonitoringStandardRuleResponse version(Long version) { this.version = version; return this; } /** - * The version of the rule. - * + *

The version of the rule.

* @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SecurityMonitoringStandardRuleResponse object is equal to o. */ + /** + * Return true if this SecurityMonitoringStandardRuleResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -560,57 +534,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SecurityMonitoringStandardRuleResponse securityMonitoringStandardRuleResponse = - (SecurityMonitoringStandardRuleResponse) o; - return Objects.equals(this.cases, securityMonitoringStandardRuleResponse.cases) - && Objects.equals( - this.complianceSignalOptions, - securityMonitoringStandardRuleResponse.complianceSignalOptions) - && Objects.equals(this.createdAt, securityMonitoringStandardRuleResponse.createdAt) - && Objects.equals( - this.creationAuthorId, securityMonitoringStandardRuleResponse.creationAuthorId) - && Objects.equals( - this.deprecationDate, securityMonitoringStandardRuleResponse.deprecationDate) - && Objects.equals(this.filters, securityMonitoringStandardRuleResponse.filters) - && Objects.equals( - this.hasExtendedTitle, securityMonitoringStandardRuleResponse.hasExtendedTitle) - && Objects.equals(this.id, securityMonitoringStandardRuleResponse.id) - && Objects.equals(this.isDefault, securityMonitoringStandardRuleResponse.isDefault) - && Objects.equals(this.isDeleted, securityMonitoringStandardRuleResponse.isDeleted) - && Objects.equals(this.isEnabled, securityMonitoringStandardRuleResponse.isEnabled) - && Objects.equals(this.message, securityMonitoringStandardRuleResponse.message) - && Objects.equals(this.name, securityMonitoringStandardRuleResponse.name) - && Objects.equals(this.options, securityMonitoringStandardRuleResponse.options) - && Objects.equals(this.queries, securityMonitoringStandardRuleResponse.queries) - && Objects.equals(this.tags, securityMonitoringStandardRuleResponse.tags) - && Objects.equals(this.type, securityMonitoringStandardRuleResponse.type) - && Objects.equals( - this.updateAuthorId, securityMonitoringStandardRuleResponse.updateAuthorId) - && Objects.equals(this.version, securityMonitoringStandardRuleResponse.version); + SecurityMonitoringStandardRuleResponse securityMonitoringStandardRuleResponse = (SecurityMonitoringStandardRuleResponse) o; + return Objects.equals(this.cases, securityMonitoringStandardRuleResponse.cases) && Objects.equals(this.complianceSignalOptions, securityMonitoringStandardRuleResponse.complianceSignalOptions) && Objects.equals(this.createdAt, securityMonitoringStandardRuleResponse.createdAt) && Objects.equals(this.creationAuthorId, securityMonitoringStandardRuleResponse.creationAuthorId) && Objects.equals(this.deprecationDate, securityMonitoringStandardRuleResponse.deprecationDate) && Objects.equals(this.filters, securityMonitoringStandardRuleResponse.filters) && Objects.equals(this.hasExtendedTitle, securityMonitoringStandardRuleResponse.hasExtendedTitle) && Objects.equals(this.id, securityMonitoringStandardRuleResponse.id) && Objects.equals(this.isDefault, securityMonitoringStandardRuleResponse.isDefault) && Objects.equals(this.isDeleted, securityMonitoringStandardRuleResponse.isDeleted) && Objects.equals(this.isEnabled, securityMonitoringStandardRuleResponse.isEnabled) && Objects.equals(this.message, securityMonitoringStandardRuleResponse.message) && Objects.equals(this.name, securityMonitoringStandardRuleResponse.name) && Objects.equals(this.options, securityMonitoringStandardRuleResponse.options) && Objects.equals(this.queries, securityMonitoringStandardRuleResponse.queries) && Objects.equals(this.tags, securityMonitoringStandardRuleResponse.tags) && Objects.equals(this.type, securityMonitoringStandardRuleResponse.type) && Objects.equals(this.updateAuthorId, securityMonitoringStandardRuleResponse.updateAuthorId) && Objects.equals(this.version, securityMonitoringStandardRuleResponse.version); } + @Override public int hashCode() { - return Objects.hash( - cases, - complianceSignalOptions, - createdAt, - creationAuthorId, - deprecationDate, - filters, - hasExtendedTitle, - id, - isDefault, - isDeleted, - isEnabled, - message, - name, - options, - queries, - tags, - type, - updateAuthorId, - version); + return Objects.hash(cases,complianceSignalOptions,createdAt,creationAuthorId,deprecationDate,filters,hasExtendedTitle,id,isDefault,isDeleted,isEnabled,message,name,options,queries,tags,type,updateAuthorId,version); } @Override @@ -618,9 +549,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SecurityMonitoringStandardRuleResponse {\n"); sb.append(" cases: ").append(toIndentedString(cases)).append("\n"); - sb.append(" complianceSignalOptions: ") - .append(toIndentedString(complianceSignalOptions)) - .append("\n"); + sb.append(" complianceSignalOptions: ").append(toIndentedString(complianceSignalOptions)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" creationAuthorId: ").append(toIndentedString(creationAuthorId)).append("\n"); sb.append(" deprecationDate: ").append(toIndentedString(deprecationDate)).append("\n"); @@ -643,7 +572,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringTriageUser.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringTriageUser.java index d853e268810..bd4420cbe4e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringTriageUser.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringTriageUser.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object representing a given user entity. */ +/** + *

Object representing a given user entity.

+ */ @JsonPropertyOrder({ SecurityMonitoringTriageUser.JSON_PROPERTY_HANDLE, SecurityMonitoringTriageUser.JSON_PROPERTY_ID, SecurityMonitoringTriageUser.JSON_PROPERTY_NAME, SecurityMonitoringTriageUser.JSON_PROPERTY_UUID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SecurityMonitoringTriageUser { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_HANDLE = "handle"; private String handle; @@ -40,94 +59,88 @@ public SecurityMonitoringTriageUser() {} @JsonCreator public SecurityMonitoringTriageUser( - @JsonProperty(required = true, value = JSON_PROPERTY_UUID) String uuid) { - this.uuid = uuid; + @JsonProperty(required=true, value=JSON_PROPERTY_UUID)String uuid) { + this.uuid = uuid; } - public SecurityMonitoringTriageUser handle(String handle) { this.handle = handle; return this; } /** - * The handle for this user account. - * + *

The handle for this user account.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public SecurityMonitoringTriageUser id(Long id) { this.id = id; return this; } /** - * Numerical ID assigned by Datadog to this user account. - * + *

Numerical ID assigned by Datadog to this user account.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getId() { + return id; + } public void setId(Long id) { this.id = id; } - public SecurityMonitoringTriageUser name(String name) { this.name = name; return this; } /** - * The name for this user account. - * + *

The name for this user account.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SecurityMonitoringTriageUser uuid(String uuid) { this.uuid = uuid; return this; } /** - * UUID assigned by Datadog to this user account. - * + *

UUID assigned by Datadog to this user account.

* @return uuid - */ - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUuid() { - return uuid; - } - + **/ + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUuid() { + return uuid; + } public void setUuid(String uuid) { this.uuid = uuid; } - /** Return true if this SecurityMonitoringTriageUser object is equal to o. */ + /** + * Return true if this SecurityMonitoringTriageUser object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,15 +150,13 @@ public boolean equals(Object o) { return false; } SecurityMonitoringTriageUser securityMonitoringTriageUser = (SecurityMonitoringTriageUser) o; - return Objects.equals(this.handle, securityMonitoringTriageUser.handle) - && Objects.equals(this.id, securityMonitoringTriageUser.id) - && Objects.equals(this.name, securityMonitoringTriageUser.name) - && Objects.equals(this.uuid, securityMonitoringTriageUser.uuid); + return Objects.equals(this.handle, securityMonitoringTriageUser.handle) && Objects.equals(this.id, securityMonitoringTriageUser.id) && Objects.equals(this.name, securityMonitoringTriageUser.name) && Objects.equals(this.uuid, securityMonitoringTriageUser.uuid); } + @Override public int hashCode() { - return Objects.hash(handle, id, name, uuid); + return Objects.hash(handle,id,name,uuid); } @Override @@ -161,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigRequest.java index 76eaf5f0dde..0672a24af90 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Group reorder request. */ + +/** + *

Group reorder request.

+ */ @JsonPropertyOrder({ SensitiveDataScannerConfigRequest.JSON_PROPERTY_DATA, SensitiveDataScannerConfigRequest.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerConfigRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerReorderConfig data; @@ -32,16 +51,13 @@ public SensitiveDataScannerConfigRequest() {} @JsonCreator public SensitiveDataScannerConfigRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SensitiveDataScannerReorderConfig data, - @JsonProperty(required = true, value = JSON_PROPERTY_META) - SensitiveDataScannerMetaVersionOnly meta) { - this.data = data; - this.unparsed |= data.unparsed; - this.meta = meta; - this.unparsed |= meta.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SensitiveDataScannerReorderConfig data, + @JsonProperty(required=true, value=JSON_PROPERTY_META)SensitiveDataScannerMetaVersionOnly meta) { + this.data = data; + this.unparsed |= data.unparsed; + this.meta = meta; + this.unparsed |= meta.unparsed; } - public SensitiveDataScannerConfigRequest data(SensitiveDataScannerReorderConfig data) { this.data = data; this.unparsed |= data.unparsed; @@ -49,20 +65,18 @@ public SensitiveDataScannerConfigRequest data(SensitiveDataScannerReorderConfig } /** - * Data related to the reordering of scanning groups. - * + *

Data related to the reordering of scanning groups.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerReorderConfig getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerReorderConfig getData() { + return data; + } public void setData(SensitiveDataScannerReorderConfig data) { this.data = data; } - public SensitiveDataScannerConfigRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -70,21 +84,22 @@ public SensitiveDataScannerConfigRequest meta(SensitiveDataScannerMetaVersionOnl } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerConfigRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerConfigRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerConfigRequest sensitiveDataScannerConfigRequest = - (SensitiveDataScannerConfigRequest) o; - return Objects.equals(this.data, sensitiveDataScannerConfigRequest.data) - && Objects.equals(this.meta, sensitiveDataScannerConfigRequest.meta); + SensitiveDataScannerConfigRequest sensitiveDataScannerConfigRequest = (SensitiveDataScannerConfigRequest) o; + return Objects.equals(this.data, sensitiveDataScannerConfigRequest.data) && Objects.equals(this.meta, sensitiveDataScannerConfigRequest.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -115,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfiguration.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfiguration.java index 0d897b51719..3a3f941f5b4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfiguration.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfiguration.java @@ -6,27 +6,46 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A Sensitive Data Scanner configuration. */ + +/** + *

A Sensitive Data Scanner configuration.

+ */ @JsonPropertyOrder({ SensitiveDataScannerConfiguration.JSON_PROPERTY_ID, SensitiveDataScannerConfiguration.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerConfiguration { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerConfigurationType type = - SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS; + private SensitiveDataScannerConfigurationType type = SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS; public SensitiveDataScannerConfiguration id(String id) { this.id = id; @@ -34,21 +53,19 @@ public SensitiveDataScannerConfiguration id(String id) { } /** - * ID of the configuration. - * + *

ID of the configuration.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SensitiveDataScannerConfiguration type(SensitiveDataScannerConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +73,26 @@ public SensitiveDataScannerConfiguration type(SensitiveDataScannerConfigurationT } /** - * Sensitive Data Scanner configuration type. - * + *

Sensitive Data Scanner configuration type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfigurationType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfigurationType getType() { + return type; + } public void setType(SensitiveDataScannerConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerConfiguration object is equal to o. */ + /** + * Return true if this SensitiveDataScannerConfiguration object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,15 +101,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerConfiguration sensitiveDataScannerConfiguration = - (SensitiveDataScannerConfiguration) o; - return Objects.equals(this.id, sensitiveDataScannerConfiguration.id) - && Objects.equals(this.type, sensitiveDataScannerConfiguration.type); + SensitiveDataScannerConfiguration sensitiveDataScannerConfiguration = (SensitiveDataScannerConfiguration) o; + return Objects.equals(this.id, sensitiveDataScannerConfiguration.id) && Objects.equals(this.type, sensitiveDataScannerConfiguration.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -105,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationData.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationData.java index fac6cd5a462..2da0f5dea82 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationData.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A Sensitive Data Scanner configuration data. */ -@JsonPropertyOrder({SensitiveDataScannerConfigurationData.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A Sensitive Data Scanner configuration data.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerConfigurationData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerConfigurationData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerConfiguration data; @@ -28,22 +50,23 @@ public SensitiveDataScannerConfigurationData data(SensitiveDataScannerConfigurat } /** - * A Sensitive Data Scanner configuration. - * + *

A Sensitive Data Scanner configuration.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfiguration getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfiguration getData() { + return data; + } public void setData(SensitiveDataScannerConfiguration data) { this.data = data; } - /** Return true if this SensitiveDataScannerConfigurationData object is equal to o. */ + /** + * Return true if this SensitiveDataScannerConfigurationData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerConfigurationData sensitiveDataScannerConfigurationData = - (SensitiveDataScannerConfigurationData) o; + SensitiveDataScannerConfigurationData sensitiveDataScannerConfigurationData = (SensitiveDataScannerConfigurationData) o; return Objects.equals(this.data, sensitiveDataScannerConfigurationData.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationRelationships.java index 60d7687274f..4daf48bb39e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationRelationships.java @@ -6,45 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationships of the configuration. */ -@JsonPropertyOrder({SensitiveDataScannerConfigurationRelationships.JSON_PROPERTY_GROUPS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationships of the configuration.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerConfigurationRelationships.JSON_PROPERTY_GROUPS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerConfigurationRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROUPS = "groups"; private SensitiveDataScannerGroupList groups; - public SensitiveDataScannerConfigurationRelationships groups( - SensitiveDataScannerGroupList groups) { + public SensitiveDataScannerConfigurationRelationships groups(SensitiveDataScannerGroupList groups) { this.groups = groups; this.unparsed |= groups.unparsed; return this; } /** - * List of groups, ordered. - * + *

List of groups, ordered.

* @return groups - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupList getGroups() { - return groups; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupList getGroups() { + return groups; + } public void setGroups(SensitiveDataScannerGroupList groups) { this.groups = groups; } - /** Return true if this SensitiveDataScannerConfigurationRelationships object is equal to o. */ + /** + * Return true if this SensitiveDataScannerConfigurationRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -53,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerConfigurationRelationships sensitiveDataScannerConfigurationRelationships = - (SensitiveDataScannerConfigurationRelationships) o; + SensitiveDataScannerConfigurationRelationships sensitiveDataScannerConfigurationRelationships = (SensitiveDataScannerConfigurationRelationships) o; return Objects.equals(this.groups, sensitiveDataScannerConfigurationRelationships.groups); } + @Override public int hashCode() { return Objects.hash(groups); @@ -73,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationType.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationType.java index 6a974a9f02a..d855e835149 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerConfigurationType.java @@ -6,30 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sensitive Data Scanner configuration type. */ -@JsonSerialize( - using = - SensitiveDataScannerConfigurationType.SensitiveDataScannerConfigurationTypeSerializer.class) +/** + *

Sensitive Data Scanner configuration type.

+ */ +@JsonSerialize(using = SensitiveDataScannerConfigurationType.SensitiveDataScannerConfigurationTypeSerializer.class) public class SensitiveDataScannerConfigurationType { - public static final SensitiveDataScannerConfigurationType SENSITIVE_DATA_SCANNER_CONFIGURATIONS = - new SensitiveDataScannerConfigurationType("sensitive_data_scanner_configuration"); + public static final SensitiveDataScannerConfigurationType SENSITIVE_DATA_SCANNER_CONFIGURATIONS = new SensitiveDataScannerConfigurationType("sensitive_data_scanner_configuration"); - private static final Set allowedValues = - new HashSet(Arrays.asList("sensitive_data_scanner_configuration")); + private static final Set allowedValues = new HashSet(Arrays.asList("sensitive_data_scanner_configuration")); private String value; @@ -41,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SensitiveDataScannerConfigurationTypeSerializer - extends StdSerializer { - public SensitiveDataScannerConfigurationTypeSerializer( - Class t) { - super(t); - } + public static class SensitiveDataScannerConfigurationTypeSerializer extends StdSerializer { + public SensitiveDataScannerConfigurationTypeSerializer(Class t) { + super(t); + } - public SensitiveDataScannerConfigurationTypeSerializer() { - this(null); - } + public SensitiveDataScannerConfigurationTypeSerializer() { + this(null); + } - @Override - public void serialize( - SensitiveDataScannerConfigurationType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SensitiveDataScannerConfigurationType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -71,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SensitiveDataScannerConfigurationType object is equal to o. */ + /** + * Return true if this SensitiveDataScannerConfigurationType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateGroupResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateGroupResponse.java index 2994ff8c918..8e53f17f1e4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateGroupResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateGroupResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create group response. */ + +/** + *

Create group response.

+ */ @JsonPropertyOrder({ SensitiveDataScannerCreateGroupResponse.JSON_PROPERTY_DATA, SensitiveDataScannerCreateGroupResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerCreateGroupResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerGroupResponse data; @@ -34,21 +54,19 @@ public SensitiveDataScannerCreateGroupResponse data(SensitiveDataScannerGroupRes } /** - * Response data related to the creation of a group. - * + *

Response data related to the creation of a group.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupResponse getData() { + return data; + } public void setData(SensitiveDataScannerGroupResponse data) { this.data = data; } - public SensitiveDataScannerCreateGroupResponse meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -56,22 +74,23 @@ public SensitiveDataScannerCreateGroupResponse meta(SensitiveDataScannerMetaVers } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerCreateGroupResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerCreateGroupResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerCreateGroupResponse sensitiveDataScannerCreateGroupResponse = - (SensitiveDataScannerCreateGroupResponse) o; - return Objects.equals(this.data, sensitiveDataScannerCreateGroupResponse.data) - && Objects.equals(this.meta, sensitiveDataScannerCreateGroupResponse.meta); + SensitiveDataScannerCreateGroupResponse sensitiveDataScannerCreateGroupResponse = (SensitiveDataScannerCreateGroupResponse) o; + return Objects.equals(this.data, sensitiveDataScannerCreateGroupResponse.data) && Objects.equals(this.meta, sensitiveDataScannerCreateGroupResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateRuleResponse.java index c2dd3b105ff..cc383508248 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateRuleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerCreateRuleResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create rule response. */ + +/** + *

Create rule response.

+ */ @JsonPropertyOrder({ SensitiveDataScannerCreateRuleResponse.JSON_PROPERTY_DATA, SensitiveDataScannerCreateRuleResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerCreateRuleResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerRuleResponse data; @@ -34,21 +54,19 @@ public SensitiveDataScannerCreateRuleResponse data(SensitiveDataScannerRuleRespo } /** - * Response data related to the creation of a rule. - * + *

Response data related to the creation of a rule.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleResponse getData() { + return data; + } public void setData(SensitiveDataScannerRuleResponse data) { this.data = data; } - public SensitiveDataScannerCreateRuleResponse meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -56,22 +74,23 @@ public SensitiveDataScannerCreateRuleResponse meta(SensitiveDataScannerMetaVersi } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerCreateRuleResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerCreateRuleResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerCreateRuleResponse sensitiveDataScannerCreateRuleResponse = - (SensitiveDataScannerCreateRuleResponse) o; - return Objects.equals(this.data, sensitiveDataScannerCreateRuleResponse.data) - && Objects.equals(this.meta, sensitiveDataScannerCreateRuleResponse.meta); + SensitiveDataScannerCreateRuleResponse sensitiveDataScannerCreateRuleResponse = (SensitiveDataScannerCreateRuleResponse) o; + return Objects.equals(this.data, sensitiveDataScannerCreateRuleResponse.data) && Objects.equals(this.meta, sensitiveDataScannerCreateRuleResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerFilter.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerFilter.java index 3c6282455a9..c2d4c5b8452 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerFilter.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Filter for the Scanning Group. */ -@JsonPropertyOrder({SensitiveDataScannerFilter.JSON_PROPERTY_QUERY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Filter for the Scanning Group.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerFilter.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerFilter { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -27,22 +49,23 @@ public SensitiveDataScannerFilter query(String query) { } /** - * Query to filter the events. - * + *

Query to filter the events.

* @return query - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getQuery() { - return query; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } public void setQuery(String query) { this.query = query; } - /** Return true if this SensitiveDataScannerFilter object is equal to o. */ + /** + * Return true if this SensitiveDataScannerFilter object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -55,6 +78,7 @@ public boolean equals(Object o) { return Objects.equals(this.query, sensitiveDataScannerFilter.query); } + @Override public int hashCode() { return Objects.hash(query); @@ -70,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigIncludedItem.java index e9a2e94eb0d..791c2c26e07 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigIncludedItem.java @@ -6,308 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = - SensitiveDataScannerGetConfigIncludedItem - .SensitiveDataScannerGetConfigIncludedItemDeserializer.class) -@JsonSerialize( - using = - SensitiveDataScannerGetConfigIncludedItem - .SensitiveDataScannerGetConfigIncludedItemSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = SensitiveDataScannerGetConfigIncludedItem.SensitiveDataScannerGetConfigIncludedItemDeserializer.class) +@JsonSerialize(using = SensitiveDataScannerGetConfigIncludedItem.SensitiveDataScannerGetConfigIncludedItemSerializer.class) public class SensitiveDataScannerGetConfigIncludedItem extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(SensitiveDataScannerGetConfigIncludedItem.class.getName()); + private static final Logger log = Logger.getLogger(SensitiveDataScannerGetConfigIncludedItem.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class SensitiveDataScannerGetConfigIncludedItemSerializer extends StdSerializer { + public SensitiveDataScannerGetConfigIncludedItemSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public SensitiveDataScannerGetConfigIncludedItemSerializer() { + this(null); + } - public static class SensitiveDataScannerGetConfigIncludedItemSerializer - extends StdSerializer { - public SensitiveDataScannerGetConfigIncludedItemSerializer( - Class t) { - super(t); + @Override + public void serialize(SensitiveDataScannerGetConfigIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public SensitiveDataScannerGetConfigIncludedItemSerializer() { - this(null); + public static class SensitiveDataScannerGetConfigIncludedItemDeserializer extends StdDeserializer { + public SensitiveDataScannerGetConfigIncludedItemDeserializer() { + this(SensitiveDataScannerGetConfigIncludedItem.class); + } + + public SensitiveDataScannerGetConfigIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public SensitiveDataScannerGetConfigIncludedItem 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 SensitiveDataScannerRuleIncludedItem + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SensitiveDataScannerRuleIncludedItem.class.equals(Integer.class) || SensitiveDataScannerRuleIncludedItem.class.equals(Long.class) || SensitiveDataScannerRuleIncludedItem.class.equals(Float.class) || SensitiveDataScannerRuleIncludedItem.class.equals(Double.class) || SensitiveDataScannerRuleIncludedItem.class.equals(Boolean.class) || SensitiveDataScannerRuleIncludedItem.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SensitiveDataScannerRuleIncludedItem.class.equals(Integer.class) || SensitiveDataScannerRuleIncludedItem.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SensitiveDataScannerRuleIncludedItem.class.equals(Float.class) || SensitiveDataScannerRuleIncludedItem.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SensitiveDataScannerRuleIncludedItem.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SensitiveDataScannerRuleIncludedItem.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SensitiveDataScannerRuleIncludedItem.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 (!((SensitiveDataScannerRuleIncludedItem)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SensitiveDataScannerRuleIncludedItem'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SensitiveDataScannerRuleIncludedItem'", e); + } + + // deserialize SensitiveDataScannerGroupIncludedItem + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SensitiveDataScannerGroupIncludedItem.class.equals(Integer.class) || SensitiveDataScannerGroupIncludedItem.class.equals(Long.class) || SensitiveDataScannerGroupIncludedItem.class.equals(Float.class) || SensitiveDataScannerGroupIncludedItem.class.equals(Double.class) || SensitiveDataScannerGroupIncludedItem.class.equals(Boolean.class) || SensitiveDataScannerGroupIncludedItem.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((SensitiveDataScannerGroupIncludedItem.class.equals(Integer.class) || SensitiveDataScannerGroupIncludedItem.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((SensitiveDataScannerGroupIncludedItem.class.equals(Float.class) || SensitiveDataScannerGroupIncludedItem.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (SensitiveDataScannerGroupIncludedItem.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (SensitiveDataScannerGroupIncludedItem.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SensitiveDataScannerGroupIncludedItem.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 (!((SensitiveDataScannerGroupIncludedItem)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SensitiveDataScannerGroupIncludedItem'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SensitiveDataScannerGroupIncludedItem'", e); + } + + SensitiveDataScannerGetConfigIncludedItem ret = new SensitiveDataScannerGetConfigIncludedItem(); + 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 SensitiveDataScannerGetConfigIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SensitiveDataScannerGetConfigIncludedItem cannot be null"); + } } - @Override - public void serialize( - SensitiveDataScannerGetConfigIncludedItem value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SensitiveDataScannerGetConfigIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public SensitiveDataScannerGetConfigIncludedItem(SensitiveDataScannerRuleIncludedItem o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public SensitiveDataScannerGetConfigIncludedItem(SensitiveDataScannerGroupIncludedItem o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class SensitiveDataScannerGetConfigIncludedItemDeserializer - extends StdDeserializer { - public SensitiveDataScannerGetConfigIncludedItemDeserializer() { - this(SensitiveDataScannerGetConfigIncludedItem.class); + static { + schemas.put("SensitiveDataScannerRuleIncludedItem", new GenericType() { + }); + schemas.put("SensitiveDataScannerGroupIncludedItem", new GenericType() { + }); + JSON.registerDescendants(SensitiveDataScannerGetConfigIncludedItem.class, Collections.unmodifiableMap(schemas)); } - public SensitiveDataScannerGetConfigIncludedItemDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return SensitiveDataScannerGetConfigIncludedItem.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * SensitiveDataScannerRuleIncludedItem, SensitiveDataScannerGroupIncludedItem + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public SensitiveDataScannerGetConfigIncludedItem 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 SensitiveDataScannerRuleIncludedItem - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SensitiveDataScannerRuleIncludedItem.class.equals(Integer.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(Long.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(Float.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(Double.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(Boolean.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SensitiveDataScannerRuleIncludedItem.class.equals(Integer.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SensitiveDataScannerRuleIncludedItem.class.equals(Float.class) - || SensitiveDataScannerRuleIncludedItem.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SensitiveDataScannerRuleIncludedItem.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SensitiveDataScannerRuleIncludedItem.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SensitiveDataScannerRuleIncludedItem.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()).readValueAs(SensitiveDataScannerRuleIncludedItem.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 (!((SensitiveDataScannerRuleIncludedItem) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SensitiveDataScannerRuleIncludedItem'"); + if (JSON.isInstanceOf(SensitiveDataScannerGroupIncludedItem.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SensitiveDataScannerRuleIncludedItem'", - e); - } - // deserialize SensitiveDataScannerGroupIncludedItem - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (SensitiveDataScannerGroupIncludedItem.class.equals(Integer.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(Long.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(Float.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(Double.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(Boolean.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((SensitiveDataScannerGroupIncludedItem.class.equals(Integer.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((SensitiveDataScannerGroupIncludedItem.class.equals(Float.class) - || SensitiveDataScannerGroupIncludedItem.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (SensitiveDataScannerGroupIncludedItem.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (SensitiveDataScannerGroupIncludedItem.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = - tree.traverse(jp.getCodec()).readValueAs(SensitiveDataScannerGroupIncludedItem.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 (!((SensitiveDataScannerGroupIncludedItem) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'SensitiveDataScannerGroupIncludedItem'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log( - Level.FINER, - "Input data does not match schema 'SensitiveDataScannerGroupIncludedItem'", - e); - } - - SensitiveDataScannerGetConfigIncludedItem ret = - new SensitiveDataScannerGetConfigIncludedItem(); - 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; + throw new RuntimeException("Invalid instance type. Must be SensitiveDataScannerRuleIncludedItem, SensitiveDataScannerGroupIncludedItem"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * SensitiveDataScannerRuleIncludedItem, SensitiveDataScannerGroupIncludedItem + * + * @return The actual instance (SensitiveDataScannerRuleIncludedItem, SensitiveDataScannerGroupIncludedItem) + */ @Override - public SensitiveDataScannerGetConfigIncludedItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "SensitiveDataScannerGetConfigIncludedItem cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public SensitiveDataScannerGetConfigIncludedItem() { - super("oneOf", Boolean.FALSE); - } - - public SensitiveDataScannerGetConfigIncludedItem(SensitiveDataScannerRuleIncludedItem o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public SensitiveDataScannerGetConfigIncludedItem(SensitiveDataScannerGroupIncludedItem o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put( - "SensitiveDataScannerRuleIncludedItem", - new GenericType() {}); - schemas.put( - "SensitiveDataScannerGroupIncludedItem", - new GenericType() {}); - JSON.registerDescendants( - SensitiveDataScannerGetConfigIncludedItem.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return SensitiveDataScannerGetConfigIncludedItem.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: SensitiveDataScannerRuleIncludedItem, - * SensitiveDataScannerGroupIncludedItem - * - *

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( - SensitiveDataScannerRuleIncludedItem.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf( - SensitiveDataScannerGroupIncludedItem.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SensitiveDataScannerRuleIncludedItem`. If the actual instance is not `SensitiveDataScannerRuleIncludedItem`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SensitiveDataScannerRuleIncludedItem` + * @throws ClassCastException if the instance is not `SensitiveDataScannerRuleIncludedItem` + */ + public SensitiveDataScannerRuleIncludedItem getSensitiveDataScannerRuleIncludedItem() throws ClassCastException { + return (SensitiveDataScannerRuleIncludedItem)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `SensitiveDataScannerGroupIncludedItem`. If the actual instance is not `SensitiveDataScannerGroupIncludedItem`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SensitiveDataScannerGroupIncludedItem` + * @throws ClassCastException if the instance is not `SensitiveDataScannerGroupIncludedItem` + */ + public SensitiveDataScannerGroupIncludedItem getSensitiveDataScannerGroupIncludedItem() throws ClassCastException { + return (SensitiveDataScannerGroupIncludedItem)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be SensitiveDataScannerRuleIncludedItem," - + " SensitiveDataScannerGroupIncludedItem"); - } - - /** - * Get the actual instance, which can be the following: SensitiveDataScannerRuleIncludedItem, - * SensitiveDataScannerGroupIncludedItem - * - * @return The actual instance (SensitiveDataScannerRuleIncludedItem, - * SensitiveDataScannerGroupIncludedItem) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `SensitiveDataScannerRuleIncludedItem`. If the actual instance is - * not `SensitiveDataScannerRuleIncludedItem`, the ClassCastException will be thrown. - * - * @return The actual instance of `SensitiveDataScannerRuleIncludedItem` - * @throws ClassCastException if the instance is not `SensitiveDataScannerRuleIncludedItem` - */ - public SensitiveDataScannerRuleIncludedItem getSensitiveDataScannerRuleIncludedItem() - throws ClassCastException { - return (SensitiveDataScannerRuleIncludedItem) super.getActualInstance(); - } - - /** - * Get the actual instance of `SensitiveDataScannerGroupIncludedItem`. If the actual instance is - * not `SensitiveDataScannerGroupIncludedItem`, the ClassCastException will be thrown. - * - * @return The actual instance of `SensitiveDataScannerGroupIncludedItem` - * @throws ClassCastException if the instance is not `SensitiveDataScannerGroupIncludedItem` - */ - public SensitiveDataScannerGroupIncludedItem getSensitiveDataScannerGroupIncludedItem() - throws ClassCastException { - return (SensitiveDataScannerGroupIncludedItem) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponse.java index 815b4032b12..b9c078ae636 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Get all groups response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Get all groups response.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGetConfigResponse.JSON_PROPERTY_DATA, SensitiveDataScannerGetConfigResponse.JSON_PROPERTY_INCLUDED, SensitiveDataScannerGetConfigResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGetConfigResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerGetConfigResponseData data; @@ -33,40 +51,34 @@ public class SensitiveDataScannerGetConfigResponse { public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMeta meta; - public SensitiveDataScannerGetConfigResponse data( - SensitiveDataScannerGetConfigResponseData data) { + public SensitiveDataScannerGetConfigResponse data(SensitiveDataScannerGetConfigResponseData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Response data related to the scanning groups. - * + *

Response data related to the scanning groups.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGetConfigResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGetConfigResponseData getData() { + return data; + } public void setData(SensitiveDataScannerGetConfigResponseData data) { this.data = data; } - - public SensitiveDataScannerGetConfigResponse included( - List included) { + public SensitiveDataScannerGetConfigResponse included(List included) { this.included = included; for (SensitiveDataScannerGetConfigIncludedItem item : included) { this.unparsed |= item.unparsed; } return this; } - - public SensitiveDataScannerGetConfigResponse addIncludedItem( - SensitiveDataScannerGetConfigIncludedItem includedItem) { + public SensitiveDataScannerGetConfigResponse addIncludedItem(SensitiveDataScannerGetConfigIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); } @@ -76,21 +88,19 @@ public SensitiveDataScannerGetConfigResponse addIncludedItem( } /** - * Included objects from relationships. - * + *

Included objects from relationships.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - public SensitiveDataScannerGetConfigResponse meta(SensitiveDataScannerMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -98,22 +108,23 @@ public SensitiveDataScannerGetConfigResponse meta(SensitiveDataScannerMeta meta) } /** - * Meta response containing information about the API. - * + *

Meta response containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMeta getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMeta meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerGetConfigResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGetConfigResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,16 +133,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGetConfigResponse sensitiveDataScannerGetConfigResponse = - (SensitiveDataScannerGetConfigResponse) o; - return Objects.equals(this.data, sensitiveDataScannerGetConfigResponse.data) - && Objects.equals(this.included, sensitiveDataScannerGetConfigResponse.included) - && Objects.equals(this.meta, sensitiveDataScannerGetConfigResponse.meta); + SensitiveDataScannerGetConfigResponse sensitiveDataScannerGetConfigResponse = (SensitiveDataScannerGetConfigResponse) o; + return Objects.equals(this.data, sensitiveDataScannerGetConfigResponse.data) && Objects.equals(this.included, sensitiveDataScannerGetConfigResponse.included) && Objects.equals(this.meta, sensitiveDataScannerGetConfigResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, included, meta); + return Objects.hash(data,included,meta); } @Override @@ -146,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponseData.java index 76906cfaea0..8720d10fa9b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGetConfigResponseData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response data related to the scanning groups. */ + +/** + *

Response data related to the scanning groups.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGetConfigResponseData.JSON_PROPERTY_ID, SensitiveDataScannerGetConfigResponseData.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerGetConfigResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGetConfigResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -29,8 +49,7 @@ public class SensitiveDataScannerGetConfigResponseData { private SensitiveDataScannerConfigurationRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerConfigurationType type = - SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS; + private SensitiveDataScannerConfigurationType type = SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS; public SensitiveDataScannerGetConfigResponseData id(String id) { this.id = id; @@ -38,71 +57,66 @@ public SensitiveDataScannerGetConfigResponseData id(String id) { } /** - * ID of the configuration. - * + *

ID of the configuration.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerGetConfigResponseData relationships( - SensitiveDataScannerConfigurationRelationships relationships) { + public SensitiveDataScannerGetConfigResponseData relationships(SensitiveDataScannerConfigurationRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of the configuration. - * + *

Relationships of the configuration.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfigurationRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfigurationRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerConfigurationRelationships relationships) { this.relationships = relationships; } - - public SensitiveDataScannerGetConfigResponseData type( - SensitiveDataScannerConfigurationType type) { + public SensitiveDataScannerGetConfigResponseData type(SensitiveDataScannerConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Sensitive Data Scanner configuration type. - * + *

Sensitive Data Scanner configuration type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfigurationType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfigurationType getType() { + return type; + } public void setType(SensitiveDataScannerConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGetConfigResponseData object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGetConfigResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,17 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGetConfigResponseData sensitiveDataScannerGetConfigResponseData = - (SensitiveDataScannerGetConfigResponseData) o; - return Objects.equals(this.id, sensitiveDataScannerGetConfigResponseData.id) - && Objects.equals( - this.relationships, sensitiveDataScannerGetConfigResponseData.relationships) - && Objects.equals(this.type, sensitiveDataScannerGetConfigResponseData.type); + SensitiveDataScannerGetConfigResponseData sensitiveDataScannerGetConfigResponseData = (SensitiveDataScannerGetConfigResponseData) o; + return Objects.equals(this.id, sensitiveDataScannerGetConfigResponseData.id) && Objects.equals(this.relationships, sensitiveDataScannerGetConfigResponseData.relationships) && Objects.equals(this.type, sensitiveDataScannerGetConfigResponseData.type); } + @Override public int hashCode() { - return Objects.hash(id, relationships, type); + return Objects.hash(id,relationships,type); } @Override @@ -136,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroup.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroup.java index 87d25624902..5a92a154f01 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroup.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroup.java @@ -6,27 +6,46 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A scanning group. */ + +/** + *

A scanning group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroup.JSON_PROPERTY_ID, SensitiveDataScannerGroup.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroup { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerGroupType type = - SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; + private SensitiveDataScannerGroupType type = SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; public SensitiveDataScannerGroup id(String id) { this.id = id; @@ -34,21 +53,19 @@ public SensitiveDataScannerGroup id(String id) { } /** - * ID of the group. - * + *

ID of the group.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SensitiveDataScannerGroup type(SensitiveDataScannerGroupType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +73,26 @@ public SensitiveDataScannerGroup type(SensitiveDataScannerGroupType type) { } /** - * Sensitive Data Scanner group type. - * + *

Sensitive Data Scanner group type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupType getType() { + return type; + } public void setType(SensitiveDataScannerGroupType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGroup object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroup object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +102,13 @@ public boolean equals(Object o) { return false; } SensitiveDataScannerGroup sensitiveDataScannerGroup = (SensitiveDataScannerGroup) o; - return Objects.equals(this.id, sensitiveDataScannerGroup.id) - && Objects.equals(this.type, sensitiveDataScannerGroup.type); + return Objects.equals(this.id, sensitiveDataScannerGroup.id) && Objects.equals(this.type, sensitiveDataScannerGroup.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -104,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupAttributes.java index 6c7cc3397c9..124b2d36997 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes of the Sensitive Data Scanner group. */ +/** + *

Attributes of the Sensitive Data Scanner group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupAttributes.JSON_PROPERTY_DESCRIPTION, SensitiveDataScannerGroupAttributes.JSON_PROPERTY_FILTER, @@ -22,10 +40,10 @@ SensitiveDataScannerGroupAttributes.JSON_PROPERTY_NAME, SensitiveDataScannerGroupAttributes.JSON_PROPERTY_PRODUCT_LIST }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -47,21 +65,19 @@ public SensitiveDataScannerGroupAttributes description(String description) { } /** - * Description of the group. - * + *

Description of the group.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SensitiveDataScannerGroupAttributes filter(SensitiveDataScannerFilter filter) { this.filter = filter; this.unparsed |= filter.unparsed; @@ -69,71 +85,62 @@ public SensitiveDataScannerGroupAttributes filter(SensitiveDataScannerFilter fil } /** - * Filter for the Scanning Group. - * + *

Filter for the Scanning Group.

* @return filter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerFilter getFilter() { - return filter; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerFilter getFilter() { + return filter; + } public void setFilter(SensitiveDataScannerFilter filter) { this.filter = filter; } - public SensitiveDataScannerGroupAttributes isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the group is enabled. - * + *

Whether or not the group is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SensitiveDataScannerGroupAttributes name(String name) { this.name = name; return this; } /** - * Name of the group. - * + *

Name of the group.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - - public SensitiveDataScannerGroupAttributes productList( - List productList) { + public SensitiveDataScannerGroupAttributes productList(List productList) { this.productList = productList; return this; } - - public SensitiveDataScannerGroupAttributes addProductListItem( - SensitiveDataScannerProduct productListItem) { + public SensitiveDataScannerGroupAttributes addProductListItem(SensitiveDataScannerProduct productListItem) { if (this.productList == null) { this.productList = new ArrayList<>(); } @@ -143,22 +150,23 @@ public SensitiveDataScannerGroupAttributes addProductListItem( } /** - * List of products the scanning group applies. - * + *

List of products the scanning group applies.

* @return productList - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRODUCT_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getProductList() { - return productList; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_LIST) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getProductList() { + return productList; + } public void setProductList(List productList) { this.productList = productList; } - /** Return true if this SensitiveDataScannerGroupAttributes object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -167,18 +175,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupAttributes sensitiveDataScannerGroupAttributes = - (SensitiveDataScannerGroupAttributes) o; - return Objects.equals(this.description, sensitiveDataScannerGroupAttributes.description) - && Objects.equals(this.filter, sensitiveDataScannerGroupAttributes.filter) - && Objects.equals(this.isEnabled, sensitiveDataScannerGroupAttributes.isEnabled) - && Objects.equals(this.name, sensitiveDataScannerGroupAttributes.name) - && Objects.equals(this.productList, sensitiveDataScannerGroupAttributes.productList); + SensitiveDataScannerGroupAttributes sensitiveDataScannerGroupAttributes = (SensitiveDataScannerGroupAttributes) o; + return Objects.equals(this.description, sensitiveDataScannerGroupAttributes.description) && Objects.equals(this.filter, sensitiveDataScannerGroupAttributes.filter) && Objects.equals(this.isEnabled, sensitiveDataScannerGroupAttributes.isEnabled) && Objects.equals(this.name, sensitiveDataScannerGroupAttributes.name) && Objects.equals(this.productList, sensitiveDataScannerGroupAttributes.productList); } + @Override public int hashCode() { - return Objects.hash(description, filter, isEnabled, name, productList); + return Objects.hash(description,filter,isEnabled,name,productList); } @Override @@ -195,7 +199,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreate.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreate.java index 130ba935ca1..b65719abd14 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreate.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data related to the creation of a group. */ + +/** + *

Data related to the creation of a group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupCreate.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerGroupCreate.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerGroupCreate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupCreate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerGroupAttributes attributes; @@ -30,68 +49,58 @@ public class SensitiveDataScannerGroupCreate { private SensitiveDataScannerGroupRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerGroupType type = - SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; + private SensitiveDataScannerGroupType type = SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; public SensitiveDataScannerGroupCreate() {} @JsonCreator public SensitiveDataScannerGroupCreate( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SensitiveDataScannerGroupAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SensitiveDataScannerGroupType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SensitiveDataScannerGroupAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SensitiveDataScannerGroupType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - - public SensitiveDataScannerGroupCreate attributes( - SensitiveDataScannerGroupAttributes attributes) { + public SensitiveDataScannerGroupCreate attributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner group. - * + *

Attributes of the Sensitive Data Scanner group.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerGroupAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerGroupAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; } - - public SensitiveDataScannerGroupCreate relationships( - SensitiveDataScannerGroupRelationships relationships) { + public SensitiveDataScannerGroupCreate relationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of the group. - * + *

Relationships of the group.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerGroupCreate type(SensitiveDataScannerGroupType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -99,24 +108,25 @@ public SensitiveDataScannerGroupCreate type(SensitiveDataScannerGroupType type) } /** - * Sensitive Data Scanner group type. - * + *

Sensitive Data Scanner group type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerGroupType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerGroupType getType() { + return type; + } public void setType(SensitiveDataScannerGroupType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGroupCreate object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -125,16 +135,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupCreate sensitiveDataScannerGroupCreate = - (SensitiveDataScannerGroupCreate) o; - return Objects.equals(this.attributes, sensitiveDataScannerGroupCreate.attributes) - && Objects.equals(this.relationships, sensitiveDataScannerGroupCreate.relationships) - && Objects.equals(this.type, sensitiveDataScannerGroupCreate.type); + SensitiveDataScannerGroupCreate sensitiveDataScannerGroupCreate = (SensitiveDataScannerGroupCreate) o; + return Objects.equals(this.attributes, sensitiveDataScannerGroupCreate.attributes) && Objects.equals(this.relationships, sensitiveDataScannerGroupCreate.relationships) && Objects.equals(this.type, sensitiveDataScannerGroupCreate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -149,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreateRequest.java index 3025491e8cd..ceb8028a1c5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupCreateRequest.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create group request. */ + +/** + *

Create group request.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupCreateRequest.JSON_PROPERTY_DATA, SensitiveDataScannerGroupCreateRequest.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerGroupCreate data; @@ -34,21 +54,19 @@ public SensitiveDataScannerGroupCreateRequest data(SensitiveDataScannerGroupCrea } /** - * Data related to the creation of a group. - * + *

Data related to the creation of a group.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupCreate getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupCreate getData() { + return data; + } public void setData(SensitiveDataScannerGroupCreate data) { this.data = data; } - public SensitiveDataScannerGroupCreateRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -56,22 +74,23 @@ public SensitiveDataScannerGroupCreateRequest meta(SensitiveDataScannerMetaVersi } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerGroupCreateRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupCreateRequest sensitiveDataScannerGroupCreateRequest = - (SensitiveDataScannerGroupCreateRequest) o; - return Objects.equals(this.data, sensitiveDataScannerGroupCreateRequest.data) - && Objects.equals(this.meta, sensitiveDataScannerGroupCreateRequest.meta); + SensitiveDataScannerGroupCreateRequest sensitiveDataScannerGroupCreateRequest = (SensitiveDataScannerGroupCreateRequest) o; + return Objects.equals(this.data, sensitiveDataScannerGroupCreateRequest.data) && Objects.equals(this.meta, sensitiveDataScannerGroupCreateRequest.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupData.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupData.java index a06fd4f9ed2..068ba36d0e5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupData.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A scanning group data. */ -@JsonPropertyOrder({SensitiveDataScannerGroupData.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A scanning group data.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerGroupData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerGroup data; @@ -28,22 +50,23 @@ public SensitiveDataScannerGroupData data(SensitiveDataScannerGroup data) { } /** - * A scanning group. - * + *

A scanning group.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroup getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroup getData() { + return data; + } public void setData(SensitiveDataScannerGroup data) { this.data = data; } - /** Return true if this SensitiveDataScannerGroupData object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, sensitiveDataScannerGroupData.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteRequest.java index b858df5cb78..2a61851b040 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Delete group request. */ -@JsonPropertyOrder({SensitiveDataScannerGroupDeleteRequest.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Delete group request.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerGroupDeleteRequest.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupDeleteRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMetaVersionOnly meta; @@ -26,12 +47,10 @@ public SensitiveDataScannerGroupDeleteRequest() {} @JsonCreator public SensitiveDataScannerGroupDeleteRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_META) - SensitiveDataScannerMetaVersionOnly meta) { - this.meta = meta; - this.unparsed |= meta.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_META)SensitiveDataScannerMetaVersionOnly meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; } - public SensitiveDataScannerGroupDeleteRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -39,21 +58,22 @@ public SensitiveDataScannerGroupDeleteRequest meta(SensitiveDataScannerMetaVersi } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerGroupDeleteRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupDeleteRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupDeleteRequest sensitiveDataScannerGroupDeleteRequest = - (SensitiveDataScannerGroupDeleteRequest) o; + SensitiveDataScannerGroupDeleteRequest sensitiveDataScannerGroupDeleteRequest = (SensitiveDataScannerGroupDeleteRequest) o; return Objects.equals(this.meta, sensitiveDataScannerGroupDeleteRequest.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteResponse.java index 54b8fb290c2..d432a2272e6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupDeleteResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Delete group response. */ -@JsonPropertyOrder({SensitiveDataScannerGroupDeleteResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Delete group response.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerGroupDeleteResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupDeleteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMetaVersionOnly meta; @@ -28,22 +50,23 @@ public SensitiveDataScannerGroupDeleteResponse meta(SensitiveDataScannerMetaVers } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerGroupDeleteResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupDeleteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupDeleteResponse sensitiveDataScannerGroupDeleteResponse = - (SensitiveDataScannerGroupDeleteResponse) o; + SensitiveDataScannerGroupDeleteResponse sensitiveDataScannerGroupDeleteResponse = (SensitiveDataScannerGroupDeleteResponse) o; return Objects.equals(this.meta, sensitiveDataScannerGroupDeleteResponse.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupIncludedItem.java index 8b287e50f60..aa92d337d83 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupIncludedItem.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A Scanning Group included item. */ + +/** + *

A Scanning Group included item.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupIncludedItem.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerGroupIncludedItem.JSON_PROPERTY_ID, SensitiveDataScannerGroupIncludedItem.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerGroupIncludedItem.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupIncludedItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerGroupAttributes attributes; @@ -33,76 +53,67 @@ public class SensitiveDataScannerGroupIncludedItem { private SensitiveDataScannerGroupRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerGroupType type = - SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; + private SensitiveDataScannerGroupType type = SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; - public SensitiveDataScannerGroupIncludedItem attributes( - SensitiveDataScannerGroupAttributes attributes) { + public SensitiveDataScannerGroupIncludedItem attributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner group. - * + *

Attributes of the Sensitive Data Scanner group.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerGroupIncludedItem id(String id) { this.id = id; return this; } /** - * ID of the group. - * + *

ID of the group.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerGroupIncludedItem relationships( - SensitiveDataScannerGroupRelationships relationships) { + public SensitiveDataScannerGroupIncludedItem relationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of the group. - * + *

Relationships of the group.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerGroupIncludedItem type(SensitiveDataScannerGroupType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -110,25 +121,26 @@ public SensitiveDataScannerGroupIncludedItem type(SensitiveDataScannerGroupType } /** - * Sensitive Data Scanner group type. - * + *

Sensitive Data Scanner group type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupType getType() { + return type; + } public void setType(SensitiveDataScannerGroupType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGroupIncludedItem object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupIncludedItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,17 +149,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupIncludedItem sensitiveDataScannerGroupIncludedItem = - (SensitiveDataScannerGroupIncludedItem) o; - return Objects.equals(this.attributes, sensitiveDataScannerGroupIncludedItem.attributes) - && Objects.equals(this.id, sensitiveDataScannerGroupIncludedItem.id) - && Objects.equals(this.relationships, sensitiveDataScannerGroupIncludedItem.relationships) - && Objects.equals(this.type, sensitiveDataScannerGroupIncludedItem.type); + SensitiveDataScannerGroupIncludedItem sensitiveDataScannerGroupIncludedItem = (SensitiveDataScannerGroupIncludedItem) o; + return Objects.equals(this.attributes, sensitiveDataScannerGroupIncludedItem.attributes) && Objects.equals(this.id, sensitiveDataScannerGroupIncludedItem.id) && Objects.equals(this.relationships, sensitiveDataScannerGroupIncludedItem.relationships) && Objects.equals(this.type, sensitiveDataScannerGroupIncludedItem.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -163,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupItem.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupItem.java index 303ab5176fe..92da7c6c883 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupItem.java @@ -6,27 +6,46 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data related to a Sensitive Data Scanner Group. */ + +/** + *

Data related to a Sensitive Data Scanner Group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupItem.JSON_PROPERTY_ID, SensitiveDataScannerGroupItem.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerGroupType type = - SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; + private SensitiveDataScannerGroupType type = SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; public SensitiveDataScannerGroupItem id(String id) { this.id = id; @@ -34,21 +53,19 @@ public SensitiveDataScannerGroupItem id(String id) { } /** - * ID of the group. - * + *

ID of the group.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SensitiveDataScannerGroupItem type(SensitiveDataScannerGroupType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +73,26 @@ public SensitiveDataScannerGroupItem type(SensitiveDataScannerGroupType type) { } /** - * Sensitive Data Scanner group type. - * + *

Sensitive Data Scanner group type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupType getType() { + return type; + } public void setType(SensitiveDataScannerGroupType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGroupItem object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +102,13 @@ public boolean equals(Object o) { return false; } SensitiveDataScannerGroupItem sensitiveDataScannerGroupItem = (SensitiveDataScannerGroupItem) o; - return Objects.equals(this.id, sensitiveDataScannerGroupItem.id) - && Objects.equals(this.type, sensitiveDataScannerGroupItem.type); + return Objects.equals(this.id, sensitiveDataScannerGroupItem.id) && Objects.equals(this.type, sensitiveDataScannerGroupItem.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -104,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupList.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupList.java index fbfee164940..92c262ee0c2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupList.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupList.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List of groups, ordered. */ -@JsonPropertyOrder({SensitiveDataScannerGroupList.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

List of groups, ordered.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerGroupList.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupList { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public SensitiveDataScannerGroupList data(List da } return this; } - public SensitiveDataScannerGroupList addDataItem(SensitiveDataScannerGroupItem dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public SensitiveDataScannerGroupList addDataItem(SensitiveDataScannerGroupItem d } /** - * List of groups. The order is important. - * + *

List of groups. The order is important.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this SensitiveDataScannerGroupList object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupList object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, sensitiveDataScannerGroupList.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupRelationships.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupRelationships.java index d058d2894b5..59d600807c0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupRelationships.java @@ -6,50 +6,67 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationships of the group. */ + +/** + *

Relationships of the group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupRelationships.JSON_PROPERTY_CONFIGURATION, SensitiveDataScannerGroupRelationships.JSON_PROPERTY_RULES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; private SensitiveDataScannerConfigurationData configuration; public static final String JSON_PROPERTY_RULES = "rules"; private SensitiveDataScannerRuleData rules; - public SensitiveDataScannerGroupRelationships configuration( - SensitiveDataScannerConfigurationData configuration) { + public SensitiveDataScannerGroupRelationships configuration(SensitiveDataScannerConfigurationData configuration) { this.configuration = configuration; this.unparsed |= configuration.unparsed; return this; } /** - * A Sensitive Data Scanner configuration data. - * + *

A Sensitive Data Scanner configuration data.

* @return configuration - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONFIGURATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfigurationData getConfiguration() { - return configuration; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGURATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfigurationData getConfiguration() { + return configuration; + } public void setConfiguration(SensitiveDataScannerConfigurationData configuration) { this.configuration = configuration; } - public SensitiveDataScannerGroupRelationships rules(SensitiveDataScannerRuleData rules) { this.rules = rules; this.unparsed |= rules.unparsed; @@ -57,22 +74,23 @@ public SensitiveDataScannerGroupRelationships rules(SensitiveDataScannerRuleData } /** - * Rules included in the group. - * + *

Rules included in the group.

* @return rules - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleData getRules() { - return rules; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleData getRules() { + return rules; + } public void setRules(SensitiveDataScannerRuleData rules) { this.rules = rules; } - /** Return true if this SensitiveDataScannerGroupRelationships object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupRelationships sensitiveDataScannerGroupRelationships = - (SensitiveDataScannerGroupRelationships) o; - return Objects.equals(this.configuration, sensitiveDataScannerGroupRelationships.configuration) - && Objects.equals(this.rules, sensitiveDataScannerGroupRelationships.rules); + SensitiveDataScannerGroupRelationships sensitiveDataScannerGroupRelationships = (SensitiveDataScannerGroupRelationships) o; + return Objects.equals(this.configuration, sensitiveDataScannerGroupRelationships.configuration) && Objects.equals(this.rules, sensitiveDataScannerGroupRelationships.rules); } + @Override public int hashCode() { - return Objects.hash(configuration, rules); + return Objects.hash(configuration,rules); } @Override @@ -103,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupResponse.java index ed5830c38d2..fa1f47d4e21 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupResponse.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response data related to the creation of a group. */ + +/** + *

Response data related to the creation of a group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupResponse.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerGroupResponse.JSON_PROPERTY_ID, SensitiveDataScannerGroupResponse.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerGroupResponse.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerGroupAttributes attributes; @@ -33,76 +53,67 @@ public class SensitiveDataScannerGroupResponse { private SensitiveDataScannerGroupRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerGroupType type = - SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; + private SensitiveDataScannerGroupType type = SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; - public SensitiveDataScannerGroupResponse attributes( - SensitiveDataScannerGroupAttributes attributes) { + public SensitiveDataScannerGroupResponse attributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner group. - * + *

Attributes of the Sensitive Data Scanner group.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerGroupResponse id(String id) { this.id = id; return this; } /** - * ID of the group. - * + *

ID of the group.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerGroupResponse relationships( - SensitiveDataScannerGroupRelationships relationships) { + public SensitiveDataScannerGroupResponse relationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of the group. - * + *

Relationships of the group.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerGroupResponse type(SensitiveDataScannerGroupType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -110,25 +121,26 @@ public SensitiveDataScannerGroupResponse type(SensitiveDataScannerGroupType type } /** - * Sensitive Data Scanner group type. - * + *

Sensitive Data Scanner group type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupType getType() { + return type; + } public void setType(SensitiveDataScannerGroupType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGroupResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,17 +149,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupResponse sensitiveDataScannerGroupResponse = - (SensitiveDataScannerGroupResponse) o; - return Objects.equals(this.attributes, sensitiveDataScannerGroupResponse.attributes) - && Objects.equals(this.id, sensitiveDataScannerGroupResponse.id) - && Objects.equals(this.relationships, sensitiveDataScannerGroupResponse.relationships) - && Objects.equals(this.type, sensitiveDataScannerGroupResponse.type); + SensitiveDataScannerGroupResponse sensitiveDataScannerGroupResponse = (SensitiveDataScannerGroupResponse) o; + return Objects.equals(this.attributes, sensitiveDataScannerGroupResponse.attributes) && Objects.equals(this.id, sensitiveDataScannerGroupResponse.id) && Objects.equals(this.relationships, sensitiveDataScannerGroupResponse.relationships) && Objects.equals(this.type, sensitiveDataScannerGroupResponse.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -163,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupType.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupType.java index f0f8f669c26..4d5acaf5c94 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sensitive Data Scanner group type. */ +/** + *

Sensitive Data Scanner group type.

+ */ @JsonSerialize(using = SensitiveDataScannerGroupType.SensitiveDataScannerGroupTypeSerializer.class) public class SensitiveDataScannerGroupType { - public static final SensitiveDataScannerGroupType SENSITIVE_DATA_SCANNER_GROUP = - new SensitiveDataScannerGroupType("sensitive_data_scanner_group"); + public static final SensitiveDataScannerGroupType SENSITIVE_DATA_SCANNER_GROUP = new SensitiveDataScannerGroupType("sensitive_data_scanner_group"); - private static final Set allowedValues = - new HashSet(Arrays.asList("sensitive_data_scanner_group")); + private static final Set allowedValues = new HashSet(Arrays.asList("sensitive_data_scanner_group")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SensitiveDataScannerGroupTypeSerializer - extends StdSerializer { - public SensitiveDataScannerGroupTypeSerializer(Class t) { - super(t); - } + public static class SensitiveDataScannerGroupTypeSerializer extends StdSerializer { + public SensitiveDataScannerGroupTypeSerializer(Class t) { + super(t); + } - public SensitiveDataScannerGroupTypeSerializer() { - this(null); - } + public SensitiveDataScannerGroupTypeSerializer() { + this(null); + } - @Override - public void serialize( - SensitiveDataScannerGroupType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SensitiveDataScannerGroupType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SensitiveDataScannerGroupType object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdate.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdate.java index 3d5f468623a..a05030de1f9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdate.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data related to the update of a group. */ + +/** + *

Data related to the update of a group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupUpdate.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerGroupUpdate.JSON_PROPERTY_ID, SensitiveDataScannerGroupUpdate.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerGroupUpdate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupUpdate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerGroupAttributes attributes; @@ -33,76 +53,67 @@ public class SensitiveDataScannerGroupUpdate { private SensitiveDataScannerGroupRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerGroupType type = - SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; + private SensitiveDataScannerGroupType type = SensitiveDataScannerGroupType.SENSITIVE_DATA_SCANNER_GROUP; - public SensitiveDataScannerGroupUpdate attributes( - SensitiveDataScannerGroupAttributes attributes) { + public SensitiveDataScannerGroupUpdate attributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner group. - * + *

Attributes of the Sensitive Data Scanner group.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerGroupAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerGroupUpdate id(String id) { this.id = id; return this; } /** - * ID of the group. - * + *

ID of the group.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerGroupUpdate relationships( - SensitiveDataScannerGroupRelationships relationships) { + public SensitiveDataScannerGroupUpdate relationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of the group. - * + *

Relationships of the group.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerGroupRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerGroupUpdate type(SensitiveDataScannerGroupType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -110,25 +121,26 @@ public SensitiveDataScannerGroupUpdate type(SensitiveDataScannerGroupType type) } /** - * Sensitive Data Scanner group type. - * + *

Sensitive Data Scanner group type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupType getType() { + return type; + } public void setType(SensitiveDataScannerGroupType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerGroupUpdate object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupUpdate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,17 +149,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupUpdate sensitiveDataScannerGroupUpdate = - (SensitiveDataScannerGroupUpdate) o; - return Objects.equals(this.attributes, sensitiveDataScannerGroupUpdate.attributes) - && Objects.equals(this.id, sensitiveDataScannerGroupUpdate.id) - && Objects.equals(this.relationships, sensitiveDataScannerGroupUpdate.relationships) - && Objects.equals(this.type, sensitiveDataScannerGroupUpdate.type); + SensitiveDataScannerGroupUpdate sensitiveDataScannerGroupUpdate = (SensitiveDataScannerGroupUpdate) o; + return Objects.equals(this.attributes, sensitiveDataScannerGroupUpdate.attributes) && Objects.equals(this.id, sensitiveDataScannerGroupUpdate.id) && Objects.equals(this.relationships, sensitiveDataScannerGroupUpdate.relationships) && Objects.equals(this.type, sensitiveDataScannerGroupUpdate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -163,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateRequest.java index 2ce396f8592..6d37b2c190f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update group request. */ + +/** + *

Update group request.

+ */ @JsonPropertyOrder({ SensitiveDataScannerGroupUpdateRequest.JSON_PROPERTY_DATA, SensitiveDataScannerGroupUpdateRequest.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerGroupUpdate data; @@ -32,16 +51,13 @@ public SensitiveDataScannerGroupUpdateRequest() {} @JsonCreator public SensitiveDataScannerGroupUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SensitiveDataScannerGroupUpdate data, - @JsonProperty(required = true, value = JSON_PROPERTY_META) - SensitiveDataScannerMetaVersionOnly meta) { - this.data = data; - this.unparsed |= data.unparsed; - this.meta = meta; - this.unparsed |= meta.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SensitiveDataScannerGroupUpdate data, + @JsonProperty(required=true, value=JSON_PROPERTY_META)SensitiveDataScannerMetaVersionOnly meta) { + this.data = data; + this.unparsed |= data.unparsed; + this.meta = meta; + this.unparsed |= meta.unparsed; } - public SensitiveDataScannerGroupUpdateRequest data(SensitiveDataScannerGroupUpdate data) { this.data = data; this.unparsed |= data.unparsed; @@ -49,20 +65,18 @@ public SensitiveDataScannerGroupUpdateRequest data(SensitiveDataScannerGroupUpda } /** - * Data related to the update of a group. - * + *

Data related to the update of a group.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerGroupUpdate getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerGroupUpdate getData() { + return data; + } public void setData(SensitiveDataScannerGroupUpdate data) { this.data = data; } - public SensitiveDataScannerGroupUpdateRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -70,21 +84,22 @@ public SensitiveDataScannerGroupUpdateRequest meta(SensitiveDataScannerMetaVersi } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerGroupUpdateRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupUpdateRequest sensitiveDataScannerGroupUpdateRequest = - (SensitiveDataScannerGroupUpdateRequest) o; - return Objects.equals(this.data, sensitiveDataScannerGroupUpdateRequest.data) - && Objects.equals(this.meta, sensitiveDataScannerGroupUpdateRequest.meta); + SensitiveDataScannerGroupUpdateRequest sensitiveDataScannerGroupUpdateRequest = (SensitiveDataScannerGroupUpdateRequest) o; + return Objects.equals(this.data, sensitiveDataScannerGroupUpdateRequest.data) && Objects.equals(this.meta, sensitiveDataScannerGroupUpdateRequest.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -115,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateResponse.java index decaf456e93..358eceb1843 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerGroupUpdateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Update group response. */ -@JsonPropertyOrder({SensitiveDataScannerGroupUpdateResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Update group response.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerGroupUpdateResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerGroupUpdateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMetaVersionOnly meta; @@ -28,22 +50,23 @@ public SensitiveDataScannerGroupUpdateResponse meta(SensitiveDataScannerMetaVers } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerGroupUpdateResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerGroupUpdateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerGroupUpdateResponse sensitiveDataScannerGroupUpdateResponse = - (SensitiveDataScannerGroupUpdateResponse) o; + SensitiveDataScannerGroupUpdateResponse sensitiveDataScannerGroupUpdateResponse = (SensitiveDataScannerGroupUpdateResponse) o; return Objects.equals(this.meta, sensitiveDataScannerGroupUpdateResponse.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMeta.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMeta.java index 4fb21fce9ae..f1d1c27a4b2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMeta.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Meta response containing information about the API. */ +/** + *

Meta response containing information about the API.

+ */ @JsonPropertyOrder({ SensitiveDataScannerMeta.JSON_PROPERTY_COUNT_LIMIT, SensitiveDataScannerMeta.JSON_PROPERTY_GROUP_COUNT_LIMIT, @@ -20,10 +40,10 @@ SensitiveDataScannerMeta.JSON_PROPERTY_IS_PCI_COMPLIANT, SensitiveDataScannerMeta.JSON_PROPERTY_VERSION }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_COUNT_LIMIT = "count_limit"; private Long countLimit; @@ -45,106 +65,100 @@ public SensitiveDataScannerMeta countLimit(Long countLimit) { } /** - * Maximum number of scanning rules allowed for the org. - * + *

Maximum number of scanning rules allowed for the org.

* @return countLimit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COUNT_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCountLimit() { - return countLimit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getCountLimit() { + return countLimit; + } public void setCountLimit(Long countLimit) { this.countLimit = countLimit; } - public SensitiveDataScannerMeta groupCountLimit(Long groupCountLimit) { this.groupCountLimit = groupCountLimit; return this; } /** - * Maximum number of scanning groups allowed for the org. - * + *

Maximum number of scanning groups allowed for the org.

* @return groupCountLimit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_COUNT_LIMIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getGroupCountLimit() { - return groupCountLimit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_COUNT_LIMIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getGroupCountLimit() { + return groupCountLimit; + } public void setGroupCountLimit(Long groupCountLimit) { this.groupCountLimit = groupCountLimit; } - public SensitiveDataScannerMeta hasHighlightEnabled(Boolean hasHighlightEnabled) { this.hasHighlightEnabled = hasHighlightEnabled; return this; } /** - * Whether or not scanned events are highlighted in Logs or RUM for the org. - * + *

Whether or not scanned events are highlighted in Logs or RUM for the org.

* @return hasHighlightEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HAS_HIGHLIGHT_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasHighlightEnabled() { - return hasHighlightEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_HIGHLIGHT_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasHighlightEnabled() { + return hasHighlightEnabled; + } public void setHasHighlightEnabled(Boolean hasHighlightEnabled) { this.hasHighlightEnabled = hasHighlightEnabled; } - public SensitiveDataScannerMeta isPciCompliant(Boolean isPciCompliant) { this.isPciCompliant = isPciCompliant; return this; } /** - * Whether or not the org is compliant to the payment card industry standard. - * + *

Whether or not the org is compliant to the payment card industry standard.

* @return isPciCompliant - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_PCI_COMPLIANT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsPciCompliant() { - return isPciCompliant; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_PCI_COMPLIANT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsPciCompliant() { + return isPciCompliant; + } public void setIsPciCompliant(Boolean isPciCompliant) { this.isPciCompliant = isPciCompliant; } - public SensitiveDataScannerMeta version(Long version) { this.version = version; return this; } /** - * Version of the API. minimum: 0 - * + *

Version of the API.

+ * minimum: 0 * @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SensitiveDataScannerMeta object is equal to o. */ + /** + * Return true if this SensitiveDataScannerMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -154,16 +168,13 @@ public boolean equals(Object o) { return false; } SensitiveDataScannerMeta sensitiveDataScannerMeta = (SensitiveDataScannerMeta) o; - return Objects.equals(this.countLimit, sensitiveDataScannerMeta.countLimit) - && Objects.equals(this.groupCountLimit, sensitiveDataScannerMeta.groupCountLimit) - && Objects.equals(this.hasHighlightEnabled, sensitiveDataScannerMeta.hasHighlightEnabled) - && Objects.equals(this.isPciCompliant, sensitiveDataScannerMeta.isPciCompliant) - && Objects.equals(this.version, sensitiveDataScannerMeta.version); + return Objects.equals(this.countLimit, sensitiveDataScannerMeta.countLimit) && Objects.equals(this.groupCountLimit, sensitiveDataScannerMeta.groupCountLimit) && Objects.equals(this.hasHighlightEnabled, sensitiveDataScannerMeta.hasHighlightEnabled) && Objects.equals(this.isPciCompliant, sensitiveDataScannerMeta.isPciCompliant) && Objects.equals(this.version, sensitiveDataScannerMeta.version); } + @Override public int hashCode() { - return Objects.hash(countLimit, groupCountLimit, hasHighlightEnabled, isPciCompliant, version); + return Objects.hash(countLimit,groupCountLimit,hasHighlightEnabled,isPciCompliant,version); } @Override @@ -172,9 +183,7 @@ public String toString() { sb.append("class SensitiveDataScannerMeta {\n"); sb.append(" countLimit: ").append(toIndentedString(countLimit)).append("\n"); sb.append(" groupCountLimit: ").append(toIndentedString(groupCountLimit)).append("\n"); - sb.append(" hasHighlightEnabled: ") - .append(toIndentedString(hasHighlightEnabled)) - .append("\n"); + sb.append(" hasHighlightEnabled: ").append(toIndentedString(hasHighlightEnabled)).append("\n"); sb.append(" isPciCompliant: ").append(toIndentedString(isPciCompliant)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); @@ -182,7 +191,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMetaVersionOnly.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMetaVersionOnly.java index 412d220b082..2dbaba8f32c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMetaVersionOnly.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerMetaVersionOnly.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Meta payload containing information about the API. */ -@JsonPropertyOrder({SensitiveDataScannerMetaVersionOnly.JSON_PROPERTY_VERSION}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Meta payload containing information about the API.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerMetaVersionOnly.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerMetaVersionOnly { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_VERSION = "version"; private Long version; @@ -27,22 +49,24 @@ public SensitiveDataScannerMetaVersionOnly version(Long version) { } /** - * Version of the API (optional). minimum: 0 - * + *

Version of the API (optional).

+ * minimum: 0 * @return version - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getVersion() { - return version; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } public void setVersion(Long version) { this.version = version; } - /** Return true if this SensitiveDataScannerMetaVersionOnly object is equal to o. */ + /** + * Return true if this SensitiveDataScannerMetaVersionOnly object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerMetaVersionOnly sensitiveDataScannerMetaVersionOnly = - (SensitiveDataScannerMetaVersionOnly) o; + SensitiveDataScannerMetaVersionOnly sensitiveDataScannerMetaVersionOnly = (SensitiveDataScannerMetaVersionOnly) o; return Objects.equals(this.version, sensitiveDataScannerMetaVersionOnly.version); } + @Override public int hashCode() { return Objects.hash(version); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerProduct.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerProduct.java index 08e1fb6f46a..40c1bc4eed0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerProduct.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerProduct.java @@ -6,31 +6,53 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Datadog product onto which Sensitive Data Scanner can be activated. */ +/** + *

Datadog product onto which Sensitive Data Scanner can be activated.

+ */ @JsonSerialize(using = SensitiveDataScannerProduct.SensitiveDataScannerProductSerializer.class) public class SensitiveDataScannerProduct { public static final SensitiveDataScannerProduct LOGS = new SensitiveDataScannerProduct("logs"); public static final SensitiveDataScannerProduct RUM = new SensitiveDataScannerProduct("rum"); - public static final SensitiveDataScannerProduct EVENTS = - new SensitiveDataScannerProduct("events"); + public static final SensitiveDataScannerProduct EVENTS = new SensitiveDataScannerProduct("events"); public static final SensitiveDataScannerProduct APM = new SensitiveDataScannerProduct("apm"); - private static final Set allowedValues = - new HashSet(Arrays.asList("logs", "rum", "events", "apm")); + private static final Set allowedValues = new HashSet(Arrays.asList("logs", "rum", "events", "apm")); private String value; @@ -42,22 +64,19 @@ public boolean isValid() { this.value = value; } - public static class SensitiveDataScannerProductSerializer - extends StdSerializer { - public SensitiveDataScannerProductSerializer(Class t) { - super(t); - } + public static class SensitiveDataScannerProductSerializer extends StdSerializer { + public SensitiveDataScannerProductSerializer(Class t) { + super(t); + } - public SensitiveDataScannerProductSerializer() { - this(null); - } + public SensitiveDataScannerProductSerializer() { + this(null); + } - @Override - public void serialize( - SensitiveDataScannerProduct value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SensitiveDataScannerProduct value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -69,7 +88,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SensitiveDataScannerProduct object is equal to o. */ + /** + * Return true if this SensitiveDataScannerProduct object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,7 +104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderConfig.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderConfig.java index 9c06b47a6b9..04b48b826e9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderConfig.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data related to the reordering of scanning groups. */ + +/** + *

Data related to the reordering of scanning groups.

+ */ @JsonPropertyOrder({ SensitiveDataScannerReorderConfig.JSON_PROPERTY_ID, SensitiveDataScannerReorderConfig.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerReorderConfig.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerReorderConfig { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -29,8 +49,7 @@ public class SensitiveDataScannerReorderConfig { private SensitiveDataScannerConfigurationRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerConfigurationType type = - SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS; + private SensitiveDataScannerConfigurationType type = SensitiveDataScannerConfigurationType.SENSITIVE_DATA_SCANNER_CONFIGURATIONS; public SensitiveDataScannerReorderConfig id(String id) { this.id = id; @@ -38,44 +57,39 @@ public SensitiveDataScannerReorderConfig id(String id) { } /** - * ID of the configuration. - * + *

ID of the configuration.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerReorderConfig relationships( - SensitiveDataScannerConfigurationRelationships relationships) { + public SensitiveDataScannerReorderConfig relationships(SensitiveDataScannerConfigurationRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of the configuration. - * + *

Relationships of the configuration.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfigurationRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfigurationRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerConfigurationRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerReorderConfig type(SensitiveDataScannerConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -83,25 +97,26 @@ public SensitiveDataScannerReorderConfig type(SensitiveDataScannerConfigurationT } /** - * Sensitive Data Scanner configuration type. - * + *

Sensitive Data Scanner configuration type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerConfigurationType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerConfigurationType getType() { + return type; + } public void setType(SensitiveDataScannerConfigurationType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerReorderConfig object is equal to o. */ + /** + * Return true if this SensitiveDataScannerReorderConfig object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,16 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerReorderConfig sensitiveDataScannerReorderConfig = - (SensitiveDataScannerReorderConfig) o; - return Objects.equals(this.id, sensitiveDataScannerReorderConfig.id) - && Objects.equals(this.relationships, sensitiveDataScannerReorderConfig.relationships) - && Objects.equals(this.type, sensitiveDataScannerReorderConfig.type); + SensitiveDataScannerReorderConfig sensitiveDataScannerReorderConfig = (SensitiveDataScannerReorderConfig) o; + return Objects.equals(this.id, sensitiveDataScannerReorderConfig.id) && Objects.equals(this.relationships, sensitiveDataScannerReorderConfig.relationships) && Objects.equals(this.type, sensitiveDataScannerReorderConfig.type); } + @Override public int hashCode() { - return Objects.hash(id, relationships, type); + return Objects.hash(id,relationships,type); } @Override @@ -134,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderGroupsResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderGroupsResponse.java index 4c01bda9099..144b3b25277 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderGroupsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerReorderGroupsResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Group reorder response. */ -@JsonPropertyOrder({SensitiveDataScannerReorderGroupsResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Group reorder response.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerReorderGroupsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerReorderGroupsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMeta meta; @@ -28,22 +50,23 @@ public SensitiveDataScannerReorderGroupsResponse meta(SensitiveDataScannerMeta m } /** - * Meta response containing information about the API. - * + *

Meta response containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMeta getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMeta meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerReorderGroupsResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerReorderGroupsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerReorderGroupsResponse sensitiveDataScannerReorderGroupsResponse = - (SensitiveDataScannerReorderGroupsResponse) o; + SensitiveDataScannerReorderGroupsResponse sensitiveDataScannerReorderGroupsResponse = (SensitiveDataScannerReorderGroupsResponse) o; return Objects.equals(this.meta, sensitiveDataScannerReorderGroupsResponse.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRule.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRule.java index cc105a5d32b..855ee26c7c8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRule.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRule.java @@ -6,27 +6,46 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Rule item included in the group. */ + +/** + *

Rule item included in the group.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRule.JSON_PROPERTY_ID, SensitiveDataScannerRule.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRule { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerRuleType type = - SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; + private SensitiveDataScannerRuleType type = SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; public SensitiveDataScannerRule id(String id) { this.id = id; @@ -34,21 +53,19 @@ public SensitiveDataScannerRule id(String id) { } /** - * ID of the rule. - * + *

ID of the rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SensitiveDataScannerRule type(SensitiveDataScannerRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +73,26 @@ public SensitiveDataScannerRule type(SensitiveDataScannerRuleType type) { } /** - * Sensitive Data Scanner rule type. - * + *

Sensitive Data Scanner rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleType getType() { + return type; + } public void setType(SensitiveDataScannerRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerRule object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRule object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +102,13 @@ public boolean equals(Object o) { return false; } SensitiveDataScannerRule sensitiveDataScannerRule = (SensitiveDataScannerRule) o; - return Objects.equals(this.id, sensitiveDataScannerRule.id) - && Objects.equals(this.type, sensitiveDataScannerRule.type); + return Objects.equals(this.id, sensitiveDataScannerRule.id) && Objects.equals(this.type, sensitiveDataScannerRule.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -104,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleAttributes.java index 561dd5fa439..923e12ed730 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleAttributes.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes of the Sensitive Data Scanner rule. */ +/** + *

Attributes of the Sensitive Data Scanner rule.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleAttributes.JSON_PROPERTY_DESCRIPTION, SensitiveDataScannerRuleAttributes.JSON_PROPERTY_EXCLUDED_NAMESPACES, @@ -25,10 +43,10 @@ SensitiveDataScannerRuleAttributes.JSON_PROPERTY_TAGS, SensitiveDataScannerRuleAttributes.JSON_PROPERTY_TEXT_REPLACEMENT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -59,28 +77,24 @@ public SensitiveDataScannerRuleAttributes description(String description) { } /** - * Description of the rule. - * + *

Description of the rule.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public SensitiveDataScannerRuleAttributes excludedNamespaces(List excludedNamespaces) { this.excludedNamespaces = excludedNamespaces; return this; } - - public SensitiveDataScannerRuleAttributes addExcludedNamespacesItem( - String excludedNamespacesItem) { + public SensitiveDataScannerRuleAttributes addExcludedNamespacesItem(String excludedNamespacesItem) { if (this.excludedNamespaces == null) { this.excludedNamespaces = new ArrayList<>(); } @@ -89,69 +103,61 @@ public SensitiveDataScannerRuleAttributes addExcludedNamespacesItem( } /** - * Attributes excluded from the scan. If namespaces is provided, it has to be a sub-path of the - * namespaces array. - * + *

Attributes excluded from the scan. If namespaces is provided, it has to be a sub-path of the namespaces array.

* @return excludedNamespaces - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXCLUDED_NAMESPACES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExcludedNamespaces() { - return excludedNamespaces; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDED_NAMESPACES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExcludedNamespaces() { + return excludedNamespaces; + } public void setExcludedNamespaces(List excludedNamespaces) { this.excludedNamespaces = excludedNamespaces; } - public SensitiveDataScannerRuleAttributes isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; return this; } /** - * Whether or not the rule is enabled. - * + *

Whether or not the rule is enabled.

* @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEnabled() { + return isEnabled; + } public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; } - public SensitiveDataScannerRuleAttributes name(String name) { this.name = name; return this; } /** - * Name of the rule. - * + *

Name of the rule.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SensitiveDataScannerRuleAttributes namespaces(List namespaces) { this.namespaces = namespaces; return this; } - public SensitiveDataScannerRuleAttributes addNamespacesItem(String namespacesItem) { if (this.namespaces == null) { this.namespaces = new ArrayList<>(); @@ -161,48 +167,43 @@ public SensitiveDataScannerRuleAttributes addNamespacesItem(String namespacesIte } /** - * Attributes included in the scan. If namespaces is empty or missing, all attributes except - * excluded_namespaces are scanned. If both are missing the whole event is scanned. - * + *

Attributes included in the scan. If namespaces is empty or missing, all attributes except excluded_namespaces are scanned. + * If both are missing the whole event is scanned.

* @return namespaces - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAMESPACES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNamespaces() { - return namespaces; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getNamespaces() { + return namespaces; + } public void setNamespaces(List namespaces) { this.namespaces = namespaces; } - public SensitiveDataScannerRuleAttributes pattern(String pattern) { this.pattern = pattern; return this; } /** - * Not included if there is a relationship to a standard pattern. - * + *

Not included if there is a relationship to a standard pattern.

* @return pattern - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATTERN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPattern() { - return pattern; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPattern() { + return pattern; + } public void setPattern(String pattern) { this.pattern = pattern; } - public SensitiveDataScannerRuleAttributes tags(List tags) { this.tags = tags; return this; } - public SensitiveDataScannerRuleAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -212,45 +213,43 @@ public SensitiveDataScannerRuleAttributes addTagsItem(String tagsItem) { } /** - * List of tags. - * + *

List of tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - - public SensitiveDataScannerRuleAttributes textReplacement( - SensitiveDataScannerTextReplacement textReplacement) { + public SensitiveDataScannerRuleAttributes textReplacement(SensitiveDataScannerTextReplacement textReplacement) { this.textReplacement = textReplacement; this.unparsed |= textReplacement.unparsed; return this; } /** - * Object describing how the scanned event will be replaced. - * + *

Object describing how the scanned event will be replaced.

* @return textReplacement - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT_REPLACEMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerTextReplacement getTextReplacement() { - return textReplacement; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_REPLACEMENT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerTextReplacement getTextReplacement() { + return textReplacement; + } public void setTextReplacement(SensitiveDataScannerTextReplacement textReplacement) { this.textReplacement = textReplacement; } - /** Return true if this SensitiveDataScannerRuleAttributes object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -259,30 +258,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleAttributes sensitiveDataScannerRuleAttributes = - (SensitiveDataScannerRuleAttributes) o; - return Objects.equals(this.description, sensitiveDataScannerRuleAttributes.description) - && Objects.equals( - this.excludedNamespaces, sensitiveDataScannerRuleAttributes.excludedNamespaces) - && Objects.equals(this.isEnabled, sensitiveDataScannerRuleAttributes.isEnabled) - && Objects.equals(this.name, sensitiveDataScannerRuleAttributes.name) - && Objects.equals(this.namespaces, sensitiveDataScannerRuleAttributes.namespaces) - && Objects.equals(this.pattern, sensitiveDataScannerRuleAttributes.pattern) - && Objects.equals(this.tags, sensitiveDataScannerRuleAttributes.tags) - && Objects.equals(this.textReplacement, sensitiveDataScannerRuleAttributes.textReplacement); + SensitiveDataScannerRuleAttributes sensitiveDataScannerRuleAttributes = (SensitiveDataScannerRuleAttributes) o; + return Objects.equals(this.description, sensitiveDataScannerRuleAttributes.description) && Objects.equals(this.excludedNamespaces, sensitiveDataScannerRuleAttributes.excludedNamespaces) && Objects.equals(this.isEnabled, sensitiveDataScannerRuleAttributes.isEnabled) && Objects.equals(this.name, sensitiveDataScannerRuleAttributes.name) && Objects.equals(this.namespaces, sensitiveDataScannerRuleAttributes.namespaces) && Objects.equals(this.pattern, sensitiveDataScannerRuleAttributes.pattern) && Objects.equals(this.tags, sensitiveDataScannerRuleAttributes.tags) && Objects.equals(this.textReplacement, sensitiveDataScannerRuleAttributes.textReplacement); } + @Override public int hashCode() { - return Objects.hash( - description, - excludedNamespaces, - isEnabled, - name, - namespaces, - pattern, - tags, - textReplacement); + return Objects.hash(description,excludedNamespaces,isEnabled,name,namespaces,pattern,tags,textReplacement); } @Override @@ -302,7 +285,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreate.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreate.java index 5ab7c9c0ab5..1c46d889cb2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreate.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Data related to the creation of a rule. */ +/** + *

Data related to the creation of a rule.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleCreate.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerRuleCreate.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerRuleCreate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleCreate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerRuleAttributes attributes; @@ -30,27 +49,22 @@ public class SensitiveDataScannerRuleCreate { private SensitiveDataScannerRuleRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerRuleType type = - SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; + private SensitiveDataScannerRuleType type = SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; public SensitiveDataScannerRuleCreate() {} @JsonCreator public SensitiveDataScannerRuleCreate( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - SensitiveDataScannerRuleAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) - SensitiveDataScannerRuleRelationships relationships, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SensitiveDataScannerRuleType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.relationships = relationships; - this.unparsed |= relationships.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)SensitiveDataScannerRuleAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_RELATIONSHIPS)SensitiveDataScannerRuleRelationships relationships, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)SensitiveDataScannerRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public SensitiveDataScannerRuleCreate attributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -58,42 +72,37 @@ public SensitiveDataScannerRuleCreate attributes(SensitiveDataScannerRuleAttribu } /** - * Attributes of the Sensitive Data Scanner rule. - * + *

Attributes of the Sensitive Data Scanner rule.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerRuleAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerRuleAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; } - - public SensitiveDataScannerRuleCreate relationships( - SensitiveDataScannerRuleRelationships relationships) { + public SensitiveDataScannerRuleCreate relationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of a scanning rule. - * + *

Relationships of a scanning rule.

* @return relationships - */ - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerRuleRelationships getRelationships() { - return relationships; - } - + **/ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerRuleRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerRuleCreate type(SensitiveDataScannerRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -101,24 +110,25 @@ public SensitiveDataScannerRuleCreate type(SensitiveDataScannerRuleType type) { } /** - * Sensitive Data Scanner rule type. - * + *

Sensitive Data Scanner rule type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerRuleType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerRuleType getType() { + return type; + } public void setType(SensitiveDataScannerRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerRuleCreate object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleCreate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -127,16 +137,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleCreate sensitiveDataScannerRuleCreate = - (SensitiveDataScannerRuleCreate) o; - return Objects.equals(this.attributes, sensitiveDataScannerRuleCreate.attributes) - && Objects.equals(this.relationships, sensitiveDataScannerRuleCreate.relationships) - && Objects.equals(this.type, sensitiveDataScannerRuleCreate.type); + SensitiveDataScannerRuleCreate sensitiveDataScannerRuleCreate = (SensitiveDataScannerRuleCreate) o; + return Objects.equals(this.attributes, sensitiveDataScannerRuleCreate.attributes) && Objects.equals(this.relationships, sensitiveDataScannerRuleCreate.relationships) && Objects.equals(this.type, sensitiveDataScannerRuleCreate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -151,7 +159,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreateRequest.java index 343e5283741..199352897e0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleCreateRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create rule request. */ + +/** + *

Create rule request.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleCreateRequest.JSON_PROPERTY_DATA, SensitiveDataScannerRuleCreateRequest.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerRuleCreate data; @@ -32,16 +51,13 @@ public SensitiveDataScannerRuleCreateRequest() {} @JsonCreator public SensitiveDataScannerRuleCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SensitiveDataScannerRuleCreate data, - @JsonProperty(required = true, value = JSON_PROPERTY_META) - SensitiveDataScannerMetaVersionOnly meta) { - this.data = data; - this.unparsed |= data.unparsed; - this.meta = meta; - this.unparsed |= meta.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SensitiveDataScannerRuleCreate data, + @JsonProperty(required=true, value=JSON_PROPERTY_META)SensitiveDataScannerMetaVersionOnly meta) { + this.data = data; + this.unparsed |= data.unparsed; + this.meta = meta; + this.unparsed |= meta.unparsed; } - public SensitiveDataScannerRuleCreateRequest data(SensitiveDataScannerRuleCreate data) { this.data = data; this.unparsed |= data.unparsed; @@ -49,20 +65,18 @@ public SensitiveDataScannerRuleCreateRequest data(SensitiveDataScannerRuleCreate } /** - * Data related to the creation of a rule. - * + *

Data related to the creation of a rule.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerRuleCreate getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerRuleCreate getData() { + return data; + } public void setData(SensitiveDataScannerRuleCreate data) { this.data = data; } - public SensitiveDataScannerRuleCreateRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -70,21 +84,22 @@ public SensitiveDataScannerRuleCreateRequest meta(SensitiveDataScannerMetaVersio } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerRuleCreateRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleCreateRequest sensitiveDataScannerRuleCreateRequest = - (SensitiveDataScannerRuleCreateRequest) o; - return Objects.equals(this.data, sensitiveDataScannerRuleCreateRequest.data) - && Objects.equals(this.meta, sensitiveDataScannerRuleCreateRequest.meta); + SensitiveDataScannerRuleCreateRequest sensitiveDataScannerRuleCreateRequest = (SensitiveDataScannerRuleCreateRequest) o; + return Objects.equals(this.data, sensitiveDataScannerRuleCreateRequest.data) && Objects.equals(this.meta, sensitiveDataScannerRuleCreateRequest.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -115,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleData.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleData.java index e349139f341..41415d09219 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleData.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Rules included in the group. */ -@JsonPropertyOrder({SensitiveDataScannerRuleData.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Rules included in the group.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerRuleData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public SensitiveDataScannerRuleData data(List data) { } return this; } - public SensitiveDataScannerRuleData addDataItem(SensitiveDataScannerRule dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public SensitiveDataScannerRuleData addDataItem(SensitiveDataScannerRule dataIte } /** - * Rules included in the group. The order is important. - * + *

Rules included in the group. The order is important.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this SensitiveDataScannerRuleData object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, sensitiveDataScannerRuleData.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteRequest.java index 6574ce48130..7143d9746e3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Delete rule request. */ -@JsonPropertyOrder({SensitiveDataScannerRuleDeleteRequest.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Delete rule request.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerRuleDeleteRequest.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleDeleteRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMetaVersionOnly meta; @@ -26,12 +47,10 @@ public SensitiveDataScannerRuleDeleteRequest() {} @JsonCreator public SensitiveDataScannerRuleDeleteRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_META) - SensitiveDataScannerMetaVersionOnly meta) { - this.meta = meta; - this.unparsed |= meta.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_META)SensitiveDataScannerMetaVersionOnly meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; } - public SensitiveDataScannerRuleDeleteRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -39,21 +58,22 @@ public SensitiveDataScannerRuleDeleteRequest meta(SensitiveDataScannerMetaVersio } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerRuleDeleteRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleDeleteRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,11 +82,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleDeleteRequest sensitiveDataScannerRuleDeleteRequest = - (SensitiveDataScannerRuleDeleteRequest) o; + SensitiveDataScannerRuleDeleteRequest sensitiveDataScannerRuleDeleteRequest = (SensitiveDataScannerRuleDeleteRequest) o; return Objects.equals(this.meta, sensitiveDataScannerRuleDeleteRequest.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -82,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteResponse.java index 571f683bc7e..34a345b8c8b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleDeleteResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Delete rule response. */ -@JsonPropertyOrder({SensitiveDataScannerRuleDeleteResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Delete rule response.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerRuleDeleteResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleDeleteResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMetaVersionOnly meta; @@ -28,22 +50,23 @@ public SensitiveDataScannerRuleDeleteResponse meta(SensitiveDataScannerMetaVersi } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerRuleDeleteResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleDeleteResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleDeleteResponse sensitiveDataScannerRuleDeleteResponse = - (SensitiveDataScannerRuleDeleteResponse) o; + SensitiveDataScannerRuleDeleteResponse sensitiveDataScannerRuleDeleteResponse = (SensitiveDataScannerRuleDeleteResponse) o; return Objects.equals(this.meta, sensitiveDataScannerRuleDeleteResponse.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleIncludedItem.java index 6971466a8b2..f33119fafbf 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleIncludedItem.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A Scanning Rule included item. */ + +/** + *

A Scanning Rule included item.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleIncludedItem.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerRuleIncludedItem.JSON_PROPERTY_ID, SensitiveDataScannerRuleIncludedItem.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerRuleIncludedItem.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleIncludedItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerRuleAttributes attributes; @@ -33,76 +53,67 @@ public class SensitiveDataScannerRuleIncludedItem { private SensitiveDataScannerRuleRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerRuleType type = - SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; + private SensitiveDataScannerRuleType type = SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; - public SensitiveDataScannerRuleIncludedItem attributes( - SensitiveDataScannerRuleAttributes attributes) { + public SensitiveDataScannerRuleIncludedItem attributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner rule. - * + *

Attributes of the Sensitive Data Scanner rule.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerRuleIncludedItem id(String id) { this.id = id; return this; } /** - * ID of the rule. - * + *

ID of the rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerRuleIncludedItem relationships( - SensitiveDataScannerRuleRelationships relationships) { + public SensitiveDataScannerRuleIncludedItem relationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of a scanning rule. - * + *

Relationships of a scanning rule.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerRuleIncludedItem type(SensitiveDataScannerRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -110,25 +121,26 @@ public SensitiveDataScannerRuleIncludedItem type(SensitiveDataScannerRuleType ty } /** - * Sensitive Data Scanner rule type. - * + *

Sensitive Data Scanner rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleType getType() { + return type; + } public void setType(SensitiveDataScannerRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerRuleIncludedItem object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleIncludedItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,17 +149,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleIncludedItem sensitiveDataScannerRuleIncludedItem = - (SensitiveDataScannerRuleIncludedItem) o; - return Objects.equals(this.attributes, sensitiveDataScannerRuleIncludedItem.attributes) - && Objects.equals(this.id, sensitiveDataScannerRuleIncludedItem.id) - && Objects.equals(this.relationships, sensitiveDataScannerRuleIncludedItem.relationships) - && Objects.equals(this.type, sensitiveDataScannerRuleIncludedItem.type); + SensitiveDataScannerRuleIncludedItem sensitiveDataScannerRuleIncludedItem = (SensitiveDataScannerRuleIncludedItem) o; + return Objects.equals(this.attributes, sensitiveDataScannerRuleIncludedItem.attributes) && Objects.equals(this.id, sensitiveDataScannerRuleIncludedItem.id) && Objects.equals(this.relationships, sensitiveDataScannerRuleIncludedItem.relationships) && Objects.equals(this.type, sensitiveDataScannerRuleIncludedItem.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -163,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleRelationships.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleRelationships.java index daed797a0d9..9491a8597d9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleRelationships.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationships of a scanning rule. */ + +/** + *

Relationships of a scanning rule.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleRelationships.JSON_PROPERTY_GROUP, SensitiveDataScannerRuleRelationships.JSON_PROPERTY_STANDARD_PATTERN }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROUP = "group"; private SensitiveDataScannerGroupData group; @@ -34,45 +54,43 @@ public SensitiveDataScannerRuleRelationships group(SensitiveDataScannerGroupData } /** - * A scanning group data. - * + *

A scanning group data.

* @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerGroupData getGroup() { - return group; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerGroupData getGroup() { + return group; + } public void setGroup(SensitiveDataScannerGroupData group) { this.group = group; } - - public SensitiveDataScannerRuleRelationships standardPattern( - SensitiveDataScannerStandardPatternData standardPattern) { + public SensitiveDataScannerRuleRelationships standardPattern(SensitiveDataScannerStandardPatternData standardPattern) { this.standardPattern = standardPattern; this.unparsed |= standardPattern.unparsed; return this; } /** - * A standard pattern. - * + *

A standard pattern.

* @return standardPattern - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STANDARD_PATTERN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerStandardPatternData getStandardPattern() { - return standardPattern; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STANDARD_PATTERN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerStandardPatternData getStandardPattern() { + return standardPattern; + } public void setStandardPattern(SensitiveDataScannerStandardPatternData standardPattern) { this.standardPattern = standardPattern; } - /** Return true if this SensitiveDataScannerRuleRelationships object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -81,16 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleRelationships sensitiveDataScannerRuleRelationships = - (SensitiveDataScannerRuleRelationships) o; - return Objects.equals(this.group, sensitiveDataScannerRuleRelationships.group) - && Objects.equals( - this.standardPattern, sensitiveDataScannerRuleRelationships.standardPattern); + SensitiveDataScannerRuleRelationships sensitiveDataScannerRuleRelationships = (SensitiveDataScannerRuleRelationships) o; + return Objects.equals(this.group, sensitiveDataScannerRuleRelationships.group) && Objects.equals(this.standardPattern, sensitiveDataScannerRuleRelationships.standardPattern); } + @Override public int hashCode() { - return Objects.hash(group, standardPattern); + return Objects.hash(group,standardPattern); } @Override @@ -104,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleResponse.java index 6e52d8c9309..a2c53831453 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleResponse.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Response data related to the creation of a rule. */ + +/** + *

Response data related to the creation of a rule.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleResponse.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerRuleResponse.JSON_PROPERTY_ID, SensitiveDataScannerRuleResponse.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerRuleResponse.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerRuleAttributes attributes; @@ -33,76 +53,67 @@ public class SensitiveDataScannerRuleResponse { private SensitiveDataScannerRuleRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerRuleType type = - SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; + private SensitiveDataScannerRuleType type = SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; - public SensitiveDataScannerRuleResponse attributes( - SensitiveDataScannerRuleAttributes attributes) { + public SensitiveDataScannerRuleResponse attributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner rule. - * + *

Attributes of the Sensitive Data Scanner rule.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerRuleResponse id(String id) { this.id = id; return this; } /** - * ID of the rule. - * + *

ID of the rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerRuleResponse relationships( - SensitiveDataScannerRuleRelationships relationships) { + public SensitiveDataScannerRuleResponse relationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of a scanning rule. - * + *

Relationships of a scanning rule.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerRuleResponse type(SensitiveDataScannerRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -110,25 +121,26 @@ public SensitiveDataScannerRuleResponse type(SensitiveDataScannerRuleType type) } /** - * Sensitive Data Scanner rule type. - * + *

Sensitive Data Scanner rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleType getType() { + return type; + } public void setType(SensitiveDataScannerRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerRuleResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -137,17 +149,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleResponse sensitiveDataScannerRuleResponse = - (SensitiveDataScannerRuleResponse) o; - return Objects.equals(this.attributes, sensitiveDataScannerRuleResponse.attributes) - && Objects.equals(this.id, sensitiveDataScannerRuleResponse.id) - && Objects.equals(this.relationships, sensitiveDataScannerRuleResponse.relationships) - && Objects.equals(this.type, sensitiveDataScannerRuleResponse.type); + SensitiveDataScannerRuleResponse sensitiveDataScannerRuleResponse = (SensitiveDataScannerRuleResponse) o; + return Objects.equals(this.attributes, sensitiveDataScannerRuleResponse.attributes) && Objects.equals(this.id, sensitiveDataScannerRuleResponse.id) && Objects.equals(this.relationships, sensitiveDataScannerRuleResponse.relationships) && Objects.equals(this.type, sensitiveDataScannerRuleResponse.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -163,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleType.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleType.java index 67b774c0c62..050940e8b7b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sensitive Data Scanner rule type. */ +/** + *

Sensitive Data Scanner rule type.

+ */ @JsonSerialize(using = SensitiveDataScannerRuleType.SensitiveDataScannerRuleTypeSerializer.class) public class SensitiveDataScannerRuleType { - public static final SensitiveDataScannerRuleType SENSITIVE_DATA_SCANNER_RULE = - new SensitiveDataScannerRuleType("sensitive_data_scanner_rule"); + public static final SensitiveDataScannerRuleType SENSITIVE_DATA_SCANNER_RULE = new SensitiveDataScannerRuleType("sensitive_data_scanner_rule"); - private static final Set allowedValues = - new HashSet(Arrays.asList("sensitive_data_scanner_rule")); + private static final Set allowedValues = new HashSet(Arrays.asList("sensitive_data_scanner_rule")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SensitiveDataScannerRuleTypeSerializer - extends StdSerializer { - public SensitiveDataScannerRuleTypeSerializer(Class t) { - super(t); - } + public static class SensitiveDataScannerRuleTypeSerializer extends StdSerializer { + public SensitiveDataScannerRuleTypeSerializer(Class t) { + super(t); + } - public SensitiveDataScannerRuleTypeSerializer() { - this(null); - } + public SensitiveDataScannerRuleTypeSerializer() { + this(null); + } - @Override - public void serialize( - SensitiveDataScannerRuleType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SensitiveDataScannerRuleType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SensitiveDataScannerRuleType object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdate.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdate.java index d004786ed4d..08dc53eef35 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdate.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data related to the update of a rule. */ + +/** + *

Data related to the update of a rule.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleUpdate.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerRuleUpdate.JSON_PROPERTY_ID, SensitiveDataScannerRuleUpdate.JSON_PROPERTY_RELATIONSHIPS, SensitiveDataScannerRuleUpdate.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleUpdate { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerRuleAttributes attributes; @@ -33,8 +53,7 @@ public class SensitiveDataScannerRuleUpdate { private SensitiveDataScannerRuleRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerRuleType type = - SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; + private SensitiveDataScannerRuleType type = SensitiveDataScannerRuleType.SENSITIVE_DATA_SCANNER_RULE; public SensitiveDataScannerRuleUpdate attributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; @@ -43,65 +62,58 @@ public SensitiveDataScannerRuleUpdate attributes(SensitiveDataScannerRuleAttribu } /** - * Attributes of the Sensitive Data Scanner rule. - * + *

Attributes of the Sensitive Data Scanner rule.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerRuleAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerRuleUpdate id(String id) { this.id = id; return this; } /** - * ID of the rule. - * + *

ID of the rule.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerRuleUpdate relationships( - SensitiveDataScannerRuleRelationships relationships) { + public SensitiveDataScannerRuleUpdate relationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; return this; } /** - * Relationships of a scanning rule. - * + *

Relationships of a scanning rule.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleRelationships getRelationships() { + return relationships; + } public void setRelationships(SensitiveDataScannerRuleRelationships relationships) { this.relationships = relationships; } - public SensitiveDataScannerRuleUpdate type(SensitiveDataScannerRuleType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -109,25 +121,26 @@ public SensitiveDataScannerRuleUpdate type(SensitiveDataScannerRuleType type) { } /** - * Sensitive Data Scanner rule type. - * + *

Sensitive Data Scanner rule type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerRuleType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerRuleType getType() { + return type; + } public void setType(SensitiveDataScannerRuleType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerRuleUpdate object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleUpdate object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,17 +149,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleUpdate sensitiveDataScannerRuleUpdate = - (SensitiveDataScannerRuleUpdate) o; - return Objects.equals(this.attributes, sensitiveDataScannerRuleUpdate.attributes) - && Objects.equals(this.id, sensitiveDataScannerRuleUpdate.id) - && Objects.equals(this.relationships, sensitiveDataScannerRuleUpdate.relationships) - && Objects.equals(this.type, sensitiveDataScannerRuleUpdate.type); + SensitiveDataScannerRuleUpdate sensitiveDataScannerRuleUpdate = (SensitiveDataScannerRuleUpdate) o; + return Objects.equals(this.attributes, sensitiveDataScannerRuleUpdate.attributes) && Objects.equals(this.id, sensitiveDataScannerRuleUpdate.id) && Objects.equals(this.relationships, sensitiveDataScannerRuleUpdate.relationships) && Objects.equals(this.type, sensitiveDataScannerRuleUpdate.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -162,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateRequest.java index 6941b2d8627..37677e265f9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update rule request. */ + +/** + *

Update rule request.

+ */ @JsonPropertyOrder({ SensitiveDataScannerRuleUpdateRequest.JSON_PROPERTY_DATA, SensitiveDataScannerRuleUpdateRequest.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerRuleUpdate data; @@ -32,16 +51,13 @@ public SensitiveDataScannerRuleUpdateRequest() {} @JsonCreator public SensitiveDataScannerRuleUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SensitiveDataScannerRuleUpdate data, - @JsonProperty(required = true, value = JSON_PROPERTY_META) - SensitiveDataScannerMetaVersionOnly meta) { - this.data = data; - this.unparsed |= data.unparsed; - this.meta = meta; - this.unparsed |= meta.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)SensitiveDataScannerRuleUpdate data, + @JsonProperty(required=true, value=JSON_PROPERTY_META)SensitiveDataScannerMetaVersionOnly meta) { + this.data = data; + this.unparsed |= data.unparsed; + this.meta = meta; + this.unparsed |= meta.unparsed; } - public SensitiveDataScannerRuleUpdateRequest data(SensitiveDataScannerRuleUpdate data) { this.data = data; this.unparsed |= data.unparsed; @@ -49,20 +65,18 @@ public SensitiveDataScannerRuleUpdateRequest data(SensitiveDataScannerRuleUpdate } /** - * Data related to the update of a rule. - * + *

Data related to the update of a rule.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerRuleUpdate getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerRuleUpdate getData() { + return data; + } public void setData(SensitiveDataScannerRuleUpdate data) { this.data = data; } - public SensitiveDataScannerRuleUpdateRequest meta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -70,21 +84,22 @@ public SensitiveDataScannerRuleUpdateRequest meta(SensitiveDataScannerMetaVersio } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerRuleUpdateRequest object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -93,15 +108,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleUpdateRequest sensitiveDataScannerRuleUpdateRequest = - (SensitiveDataScannerRuleUpdateRequest) o; - return Objects.equals(this.data, sensitiveDataScannerRuleUpdateRequest.data) - && Objects.equals(this.meta, sensitiveDataScannerRuleUpdateRequest.meta); + SensitiveDataScannerRuleUpdateRequest sensitiveDataScannerRuleUpdateRequest = (SensitiveDataScannerRuleUpdateRequest) o; + return Objects.equals(this.data, sensitiveDataScannerRuleUpdateRequest.data) && Objects.equals(this.meta, sensitiveDataScannerRuleUpdateRequest.meta); } + @Override public int hashCode() { - return Objects.hash(data, meta); + return Objects.hash(data,meta); } @Override @@ -115,7 +129,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateResponse.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateResponse.java index be38a33eb90..d195e7f5ba9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerRuleUpdateResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Update rule response. */ -@JsonPropertyOrder({SensitiveDataScannerRuleUpdateResponse.JSON_PROPERTY_META}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Update rule response.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerRuleUpdateResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerRuleUpdateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private SensitiveDataScannerMetaVersionOnly meta; @@ -28,22 +50,23 @@ public SensitiveDataScannerRuleUpdateResponse meta(SensitiveDataScannerMetaVersi } /** - * Meta payload containing information about the API. - * + *

Meta payload containing information about the API.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerMetaVersionOnly getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerMetaVersionOnly getMeta() { + return meta; + } public void setMeta(SensitiveDataScannerMetaVersionOnly meta) { this.meta = meta; } - /** Return true if this SensitiveDataScannerRuleUpdateResponse object is equal to o. */ + /** + * Return true if this SensitiveDataScannerRuleUpdateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerRuleUpdateResponse sensitiveDataScannerRuleUpdateResponse = - (SensitiveDataScannerRuleUpdateResponse) o; + SensitiveDataScannerRuleUpdateResponse sensitiveDataScannerRuleUpdateResponse = (SensitiveDataScannerRuleUpdateResponse) o; return Objects.equals(this.meta, sensitiveDataScannerRuleUpdateResponse.meta); } + @Override public int hashCode() { return Objects.hash(meta); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPattern.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPattern.java index 2c543062bdd..2d0e29c5722 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPattern.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPattern.java @@ -6,27 +6,46 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Data containing the standard pattern id. */ + +/** + *

Data containing the standard pattern id.

+ */ @JsonPropertyOrder({ SensitiveDataScannerStandardPattern.JSON_PROPERTY_ID, SensitiveDataScannerStandardPattern.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerStandardPattern { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerStandardPatternType type = - SensitiveDataScannerStandardPatternType.SENSITIVE_DATA_SCANNER_STANDARD_PATTERN; + private SensitiveDataScannerStandardPatternType type = SensitiveDataScannerStandardPatternType.SENSITIVE_DATA_SCANNER_STANDARD_PATTERN; public SensitiveDataScannerStandardPattern id(String id) { this.id = id; @@ -34,21 +53,19 @@ public SensitiveDataScannerStandardPattern id(String id) { } /** - * ID of the standard pattern. - * + *

ID of the standard pattern.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public SensitiveDataScannerStandardPattern type(SensitiveDataScannerStandardPatternType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +73,26 @@ public SensitiveDataScannerStandardPattern type(SensitiveDataScannerStandardPatt } /** - * Sensitive Data Scanner standard pattern type. - * + *

Sensitive Data Scanner standard pattern type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerStandardPatternType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerStandardPatternType getType() { + return type; + } public void setType(SensitiveDataScannerStandardPatternType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerStandardPattern object is equal to o. */ + /** + * Return true if this SensitiveDataScannerStandardPattern object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -83,15 +101,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerStandardPattern sensitiveDataScannerStandardPattern = - (SensitiveDataScannerStandardPattern) o; - return Objects.equals(this.id, sensitiveDataScannerStandardPattern.id) - && Objects.equals(this.type, sensitiveDataScannerStandardPattern.type); + SensitiveDataScannerStandardPattern sensitiveDataScannerStandardPattern = (SensitiveDataScannerStandardPattern) o; + return Objects.equals(this.id, sensitiveDataScannerStandardPattern.id) && Objects.equals(this.type, sensitiveDataScannerStandardPattern.type); } + @Override public int hashCode() { - return Objects.hash(id, type); + return Objects.hash(id,type); } @Override @@ -105,7 +122,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternAttributes.java index 361965250e1..73fcc42694e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of the Sensitive Data Scanner standard pattern. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of the Sensitive Data Scanner standard pattern.

+ */ @JsonPropertyOrder({ SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_NAME, SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_PATTERN, SensitiveDataScannerStandardPatternAttributes.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerStandardPatternAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -39,47 +57,42 @@ public SensitiveDataScannerStandardPatternAttributes name(String name) { } /** - * Name of the standard pattern. - * + *

Name of the standard pattern.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public SensitiveDataScannerStandardPatternAttributes pattern(String pattern) { this.pattern = pattern; return this; } /** - * Regex to match. - * + *

Regex to match.

* @return pattern - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATTERN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPattern() { - return pattern; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPattern() { + return pattern; + } public void setPattern(String pattern) { this.pattern = pattern; } - public SensitiveDataScannerStandardPatternAttributes tags(List tags) { this.tags = tags; return this; } - public SensitiveDataScannerStandardPatternAttributes addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -89,22 +102,23 @@ public SensitiveDataScannerStandardPatternAttributes addTagsItem(String tagsItem } /** - * List of tags. - * + *

List of tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this SensitiveDataScannerStandardPatternAttributes object is equal to o. */ + /** + * Return true if this SensitiveDataScannerStandardPatternAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,16 +127,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerStandardPatternAttributes sensitiveDataScannerStandardPatternAttributes = - (SensitiveDataScannerStandardPatternAttributes) o; - return Objects.equals(this.name, sensitiveDataScannerStandardPatternAttributes.name) - && Objects.equals(this.pattern, sensitiveDataScannerStandardPatternAttributes.pattern) - && Objects.equals(this.tags, sensitiveDataScannerStandardPatternAttributes.tags); + SensitiveDataScannerStandardPatternAttributes sensitiveDataScannerStandardPatternAttributes = (SensitiveDataScannerStandardPatternAttributes) o; + return Objects.equals(this.name, sensitiveDataScannerStandardPatternAttributes.name) && Objects.equals(this.pattern, sensitiveDataScannerStandardPatternAttributes.pattern) && Objects.equals(this.tags, sensitiveDataScannerStandardPatternAttributes.tags); } + @Override public int hashCode() { - return Objects.hash(name, pattern, tags); + return Objects.hash(name,pattern,tags); } @Override @@ -137,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternData.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternData.java index a796de8e4cd..d8673789364 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternData.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** A standard pattern. */ -@JsonPropertyOrder({SensitiveDataScannerStandardPatternData.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

A standard pattern.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerStandardPatternData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerStandardPatternData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private SensitiveDataScannerStandardPattern data; @@ -28,22 +50,23 @@ public SensitiveDataScannerStandardPatternData data(SensitiveDataScannerStandard } /** - * Data containing the standard pattern id. - * + *

Data containing the standard pattern id.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerStandardPattern getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerStandardPattern getData() { + return data; + } public void setData(SensitiveDataScannerStandardPattern data) { this.data = data; } - /** Return true if this SensitiveDataScannerStandardPatternData object is equal to o. */ + /** + * Return true if this SensitiveDataScannerStandardPatternData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -52,11 +75,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerStandardPatternData sensitiveDataScannerStandardPatternData = - (SensitiveDataScannerStandardPatternData) o; + SensitiveDataScannerStandardPatternData sensitiveDataScannerStandardPatternData = (SensitiveDataScannerStandardPatternData) o; return Objects.equals(this.data, sensitiveDataScannerStandardPatternData.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -72,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternType.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternType.java index 36fd4627fda..0a928382cfc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternType.java @@ -6,32 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Sensitive Data Scanner standard pattern type. */ -@JsonSerialize( - using = - SensitiveDataScannerStandardPatternType.SensitiveDataScannerStandardPatternTypeSerializer - .class) +/** + *

Sensitive Data Scanner standard pattern type.

+ */ +@JsonSerialize(using = SensitiveDataScannerStandardPatternType.SensitiveDataScannerStandardPatternTypeSerializer.class) public class SensitiveDataScannerStandardPatternType { - public static final SensitiveDataScannerStandardPatternType - SENSITIVE_DATA_SCANNER_STANDARD_PATTERN = - new SensitiveDataScannerStandardPatternType("sensitive_data_scanner_standard_pattern"); + public static final SensitiveDataScannerStandardPatternType SENSITIVE_DATA_SCANNER_STANDARD_PATTERN = new SensitiveDataScannerStandardPatternType("sensitive_data_scanner_standard_pattern"); - private static final Set allowedValues = - new HashSet(Arrays.asList("sensitive_data_scanner_standard_pattern")); + private static final Set allowedValues = new HashSet(Arrays.asList("sensitive_data_scanner_standard_pattern")); private String value; @@ -43,25 +61,19 @@ public boolean isValid() { this.value = value; } - public static class SensitiveDataScannerStandardPatternTypeSerializer - extends StdSerializer { - public SensitiveDataScannerStandardPatternTypeSerializer( - Class t) { - super(t); - } + public static class SensitiveDataScannerStandardPatternTypeSerializer extends StdSerializer { + public SensitiveDataScannerStandardPatternTypeSerializer(Class t) { + super(t); + } - public SensitiveDataScannerStandardPatternTypeSerializer() { - this(null); - } + public SensitiveDataScannerStandardPatternTypeSerializer() { + this(null); + } - @Override - public void serialize( - SensitiveDataScannerStandardPatternType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SensitiveDataScannerStandardPatternType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -73,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SensitiveDataScannerStandardPatternType object is equal to o. */ + /** + * Return true if this SensitiveDataScannerStandardPatternType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseData.java index 3be3105f339..c6900aa6e2a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseData.java @@ -6,34 +6,51 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** List Standard patterns response data. */ -@JsonPropertyOrder({SensitiveDataScannerStandardPatternsResponseData.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

List Standard patterns response data.

+ */ +@JsonPropertyOrder({ + SensitiveDataScannerStandardPatternsResponseData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerStandardPatternsResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; - public SensitiveDataScannerStandardPatternsResponseData data( - List data) { + public SensitiveDataScannerStandardPatternsResponseData data(List data) { this.data = data; for (SensitiveDataScannerStandardPatternsResponseItem item : data) { this.unparsed |= item.unparsed; } return this; } - - public SensitiveDataScannerStandardPatternsResponseData addDataItem( - SensitiveDataScannerStandardPatternsResponseItem dataItem) { + public SensitiveDataScannerStandardPatternsResponseData addDataItem(SensitiveDataScannerStandardPatternsResponseItem dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -43,22 +60,23 @@ public SensitiveDataScannerStandardPatternsResponseData addDataItem( } /** - * List Standard patterns response. - * + *

List Standard patterns response.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this SensitiveDataScannerStandardPatternsResponseData object is equal to o. */ + /** + * Return true if this SensitiveDataScannerStandardPatternsResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -67,12 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerStandardPatternsResponseData - sensitiveDataScannerStandardPatternsResponseData = - (SensitiveDataScannerStandardPatternsResponseData) o; + SensitiveDataScannerStandardPatternsResponseData sensitiveDataScannerStandardPatternsResponseData = (SensitiveDataScannerStandardPatternsResponseData) o; return Objects.equals(this.data, sensitiveDataScannerStandardPatternsResponseData.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -88,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseItem.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseItem.java index 527090b7480..9f5ad193c3f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerStandardPatternsResponseItem.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Standard pattern item. */ + +/** + *

Standard pattern item.

+ */ @JsonPropertyOrder({ SensitiveDataScannerStandardPatternsResponseItem.JSON_PROPERTY_ATTRIBUTES, SensitiveDataScannerStandardPatternsResponseItem.JSON_PROPERTY_ID, SensitiveDataScannerStandardPatternsResponseItem.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerStandardPatternsResponseItem { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private SensitiveDataScannerStandardPatternAttributes attributes; @@ -29,80 +49,74 @@ public class SensitiveDataScannerStandardPatternsResponseItem { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerStandardPatternType type = - SensitiveDataScannerStandardPatternType.SENSITIVE_DATA_SCANNER_STANDARD_PATTERN; + private SensitiveDataScannerStandardPatternType type = SensitiveDataScannerStandardPatternType.SENSITIVE_DATA_SCANNER_STANDARD_PATTERN; - public SensitiveDataScannerStandardPatternsResponseItem attributes( - SensitiveDataScannerStandardPatternAttributes attributes) { + public SensitiveDataScannerStandardPatternsResponseItem attributes(SensitiveDataScannerStandardPatternAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the Sensitive Data Scanner standard pattern. - * + *

Attributes of the Sensitive Data Scanner standard pattern.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerStandardPatternAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerStandardPatternAttributes getAttributes() { + return attributes; + } public void setAttributes(SensitiveDataScannerStandardPatternAttributes attributes) { this.attributes = attributes; } - public SensitiveDataScannerStandardPatternsResponseItem id(String id) { this.id = id; return this; } /** - * ID of the standard pattern. - * + *

ID of the standard pattern.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - - public SensitiveDataScannerStandardPatternsResponseItem type( - SensitiveDataScannerStandardPatternType type) { + public SensitiveDataScannerStandardPatternsResponseItem type(SensitiveDataScannerStandardPatternType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Sensitive Data Scanner standard pattern type. - * + *

Sensitive Data Scanner standard pattern type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerStandardPatternType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerStandardPatternType getType() { + return type; + } public void setType(SensitiveDataScannerStandardPatternType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerStandardPatternsResponseItem object is equal to o. */ + /** + * Return true if this SensitiveDataScannerStandardPatternsResponseItem object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,18 +125,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerStandardPatternsResponseItem - sensitiveDataScannerStandardPatternsResponseItem = - (SensitiveDataScannerStandardPatternsResponseItem) o; - return Objects.equals( - this.attributes, sensitiveDataScannerStandardPatternsResponseItem.attributes) - && Objects.equals(this.id, sensitiveDataScannerStandardPatternsResponseItem.id) - && Objects.equals(this.type, sensitiveDataScannerStandardPatternsResponseItem.type); + SensitiveDataScannerStandardPatternsResponseItem sensitiveDataScannerStandardPatternsResponseItem = (SensitiveDataScannerStandardPatternsResponseItem) o; + return Objects.equals(this.attributes, sensitiveDataScannerStandardPatternsResponseItem.attributes) && Objects.equals(this.id, sensitiveDataScannerStandardPatternsResponseItem.id) && Objects.equals(this.type, sensitiveDataScannerStandardPatternsResponseItem.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -137,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacement.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacement.java index 01e0389e5d4..1989e44e548 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacement.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacement.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object describing how the scanned event will be replaced. */ + +/** + *

Object describing how the scanned event will be replaced.

+ */ @JsonPropertyOrder({ SensitiveDataScannerTextReplacement.JSON_PROPERTY_NUMBER_OF_CHARS, SensitiveDataScannerTextReplacement.JSON_PROPERTY_REPLACEMENT_STRING, SensitiveDataScannerTextReplacement.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SensitiveDataScannerTextReplacement { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NUMBER_OF_CHARS = "number_of_chars"; private Long numberOfChars; @@ -29,8 +49,7 @@ public class SensitiveDataScannerTextReplacement { private String replacementString; public static final String JSON_PROPERTY_TYPE = "type"; - private SensitiveDataScannerTextReplacementType type = - SensitiveDataScannerTextReplacementType.NONE; + private SensitiveDataScannerTextReplacementType type = SensitiveDataScannerTextReplacementType.NONE; public SensitiveDataScannerTextReplacement numberOfChars(Long numberOfChars) { this.numberOfChars = numberOfChars; @@ -38,43 +57,40 @@ public SensitiveDataScannerTextReplacement numberOfChars(Long numberOfChars) { } /** - * Required if type == 'partial_replacement_from_beginning' or 'partial_replacement_from_end'. It - * must be > 0. minimum: 0 - * + *

Required if type == 'partial_replacement_from_beginning' + * or 'partial_replacement_from_end'. It must be > 0.

+ * minimum: 0 * @return numberOfChars - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NUMBER_OF_CHARS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNumberOfChars() { - return numberOfChars; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_CHARS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumberOfChars() { + return numberOfChars; + } public void setNumberOfChars(Long numberOfChars) { this.numberOfChars = numberOfChars; } - public SensitiveDataScannerTextReplacement replacementString(String replacementString) { this.replacementString = replacementString; return this; } /** - * Required if type == 'replacement_string'. - * + *

Required if type == 'replacement_string'.

* @return replacementString - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REPLACEMENT_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getReplacementString() { - return replacementString; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPLACEMENT_STRING) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getReplacementString() { + return replacementString; + } public void setReplacementString(String replacementString) { this.replacementString = replacementString; } - public SensitiveDataScannerTextReplacement type(SensitiveDataScannerTextReplacementType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -82,29 +98,31 @@ public SensitiveDataScannerTextReplacement type(SensitiveDataScannerTextReplacem } /** - * Type of the replacement text. None means no replacement. hash means the data will be stubbed. - * replacement_string means that one can chose a text to replace the data. - * partial_replacement_from_beginning allows a user to partially replace the data from the - * beginning, and partial_replacement_from_end on the other hand, allows to replace data from the - * end. - * + *

Type of the replacement text. None means no replacement. + * hash means the data will be stubbed. replacement_string means that + * one can chose a text to replace the data. partial_replacement_from_beginning + * allows a user to partially replace the data from the beginning, and + * partial_replacement_from_end on the other hand, allows to replace data from + * the end.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SensitiveDataScannerTextReplacementType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public SensitiveDataScannerTextReplacementType getType() { + return type; + } public void setType(SensitiveDataScannerTextReplacementType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this SensitiveDataScannerTextReplacement object is equal to o. */ + /** + * Return true if this SensitiveDataScannerTextReplacement object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,17 +131,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SensitiveDataScannerTextReplacement sensitiveDataScannerTextReplacement = - (SensitiveDataScannerTextReplacement) o; - return Objects.equals(this.numberOfChars, sensitiveDataScannerTextReplacement.numberOfChars) - && Objects.equals( - this.replacementString, sensitiveDataScannerTextReplacement.replacementString) - && Objects.equals(this.type, sensitiveDataScannerTextReplacement.type); + SensitiveDataScannerTextReplacement sensitiveDataScannerTextReplacement = (SensitiveDataScannerTextReplacement) o; + return Objects.equals(this.numberOfChars, sensitiveDataScannerTextReplacement.numberOfChars) && Objects.equals(this.replacementString, sensitiveDataScannerTextReplacement.replacementString) && Objects.equals(this.type, sensitiveDataScannerTextReplacement.type); } + @Override public int hashCode() { - return Objects.hash(numberOfChars, replacementString, type); + return Objects.hash(numberOfChars,replacementString,type); } @Override @@ -138,7 +153,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacementType.java b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacementType.java index eda90ee2874..04b2aa4ce29 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacementType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SensitiveDataScannerTextReplacementType.java @@ -6,51 +6,59 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; /** - * Type of the replacement text. None means no replacement. hash means the data will be stubbed. - * replacement_string means that one can chose a text to replace the data. - * partial_replacement_from_beginning allows a user to partially replace the data from the - * beginning, and partial_replacement_from_end on the other hand, allows to replace data from the - * end. + *

Type of the replacement text. None means no replacement. + * hash means the data will be stubbed. replacement_string means that + * one can chose a text to replace the data. partial_replacement_from_beginning + * allows a user to partially replace the data from the beginning, and + * partial_replacement_from_end on the other hand, allows to replace data from + * the end.

*/ -@JsonSerialize( - using = - SensitiveDataScannerTextReplacementType.SensitiveDataScannerTextReplacementTypeSerializer - .class) +@JsonSerialize(using = SensitiveDataScannerTextReplacementType.SensitiveDataScannerTextReplacementTypeSerializer.class) public class SensitiveDataScannerTextReplacementType { - public static final SensitiveDataScannerTextReplacementType NONE = - new SensitiveDataScannerTextReplacementType("none"); - public static final SensitiveDataScannerTextReplacementType HASH = - new SensitiveDataScannerTextReplacementType("hash"); - public static final SensitiveDataScannerTextReplacementType REPLACEMENT_STRING = - new SensitiveDataScannerTextReplacementType("replacement_string"); - public static final SensitiveDataScannerTextReplacementType PARTIAL_REPLACEMENT_FROM_BEGINNING = - new SensitiveDataScannerTextReplacementType("partial_replacement_from_beginning"); - public static final SensitiveDataScannerTextReplacementType PARTIAL_REPLACEMENT_FROM_END = - new SensitiveDataScannerTextReplacementType("partial_replacement_from_end"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "none", - "hash", - "replacement_string", - "partial_replacement_from_beginning", - "partial_replacement_from_end")); + public static final SensitiveDataScannerTextReplacementType NONE = new SensitiveDataScannerTextReplacementType("none"); + public static final SensitiveDataScannerTextReplacementType HASH = new SensitiveDataScannerTextReplacementType("hash"); + public static final SensitiveDataScannerTextReplacementType REPLACEMENT_STRING = new SensitiveDataScannerTextReplacementType("replacement_string"); + public static final SensitiveDataScannerTextReplacementType PARTIAL_REPLACEMENT_FROM_BEGINNING = new SensitiveDataScannerTextReplacementType("partial_replacement_from_beginning"); + public static final SensitiveDataScannerTextReplacementType PARTIAL_REPLACEMENT_FROM_END = new SensitiveDataScannerTextReplacementType("partial_replacement_from_end"); + + private static final Set allowedValues = new HashSet(Arrays.asList("none", "hash", "replacement_string", "partial_replacement_from_beginning", "partial_replacement_from_end")); private String value; @@ -62,25 +70,19 @@ public boolean isValid() { this.value = value; } - public static class SensitiveDataScannerTextReplacementTypeSerializer - extends StdSerializer { - public SensitiveDataScannerTextReplacementTypeSerializer( - Class t) { - super(t); - } + public static class SensitiveDataScannerTextReplacementTypeSerializer extends StdSerializer { + public SensitiveDataScannerTextReplacementTypeSerializer(Class t) { + super(t); + } - public SensitiveDataScannerTextReplacementTypeSerializer() { - this(null); - } + public SensitiveDataScannerTextReplacementTypeSerializer() { + this(null); + } - @Override - public void serialize( - SensitiveDataScannerTextReplacementType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(SensitiveDataScannerTextReplacementType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -92,7 +94,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this SensitiveDataScannerTextReplacementType object is equal to o. */ + /** + * Return true if this SensitiveDataScannerTextReplacementType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -106,7 +110,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateAttributes.java index 9a770ff6400..c3832b45dea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateAttributes.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Attributes of the created user. */ +/** + *

Attributes of the created user.

+ */ @JsonPropertyOrder({ ServiceAccountCreateAttributes.JSON_PROPERTY_EMAIL, ServiceAccountCreateAttributes.JSON_PROPERTY_NAME, ServiceAccountCreateAttributes.JSON_PROPERTY_SERVICE_ACCOUNT, ServiceAccountCreateAttributes.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceAccountCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -40,96 +59,89 @@ public ServiceAccountCreateAttributes() {} @JsonCreator public ServiceAccountCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email, - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_ACCOUNT) - Boolean serviceAccount) { - this.email = email; - this.serviceAccount = serviceAccount; + @JsonProperty(required=true, value=JSON_PROPERTY_EMAIL)String email, + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE_ACCOUNT)Boolean serviceAccount) { + this.email = email; + this.serviceAccount = serviceAccount; } - public ServiceAccountCreateAttributes email(String email) { this.email = email; return this; } /** - * The email of the user. - * + *

The email of the user.

* @return email - */ - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmail() { - return email; - } - + **/ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public ServiceAccountCreateAttributes name(String name) { this.name = name; return this; } /** - * The name of the user. - * + *

The name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceAccountCreateAttributes serviceAccount(Boolean serviceAccount) { this.serviceAccount = serviceAccount; return this; } /** - * Whether the user is a service account. Must be true. - * + *

Whether the user is a service account. Must be true.

* @return serviceAccount - */ - @JsonProperty(JSON_PROPERTY_SERVICE_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getServiceAccount() { - return serviceAccount; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE_ACCOUNT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Boolean getServiceAccount() { + return serviceAccount; + } public void setServiceAccount(Boolean serviceAccount) { this.serviceAccount = serviceAccount; } - public ServiceAccountCreateAttributes title(String title) { this.title = title; return this; } /** - * The title of the user. - * + *

The title of the user.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this ServiceAccountCreateAttributes object is equal to o. */ + /** + * Return true if this ServiceAccountCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -138,17 +150,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceAccountCreateAttributes serviceAccountCreateAttributes = - (ServiceAccountCreateAttributes) o; - return Objects.equals(this.email, serviceAccountCreateAttributes.email) - && Objects.equals(this.name, serviceAccountCreateAttributes.name) - && Objects.equals(this.serviceAccount, serviceAccountCreateAttributes.serviceAccount) - && Objects.equals(this.title, serviceAccountCreateAttributes.title); + ServiceAccountCreateAttributes serviceAccountCreateAttributes = (ServiceAccountCreateAttributes) o; + return Objects.equals(this.email, serviceAccountCreateAttributes.email) && Objects.equals(this.name, serviceAccountCreateAttributes.name) && Objects.equals(this.serviceAccount, serviceAccountCreateAttributes.serviceAccount) && Objects.equals(this.title, serviceAccountCreateAttributes.title); } + @Override public int hashCode() { - return Objects.hash(email, name, serviceAccount, title); + return Objects.hash(email,name,serviceAccount,title); } @Override @@ -164,7 +173,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateData.java index 14952e814d4..badcde44b64 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to create a service account User. */ + +/** + *

Object to create a service account User.

+ */ @JsonPropertyOrder({ ServiceAccountCreateData.JSON_PROPERTY_ATTRIBUTES, ServiceAccountCreateData.JSON_PROPERTY_RELATIONSHIPS, ServiceAccountCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceAccountCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ServiceAccountCreateAttributes attributes; @@ -36,15 +55,13 @@ public ServiceAccountCreateData() {} @JsonCreator public ServiceAccountCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - ServiceAccountCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UsersType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)ServiceAccountCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)UsersType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public ServiceAccountCreateData attributes(ServiceAccountCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,20 +69,18 @@ public ServiceAccountCreateData attributes(ServiceAccountCreateAttributes attrib } /** - * Attributes of the created user. - * + *

Attributes of the created user.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceAccountCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceAccountCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(ServiceAccountCreateAttributes attributes) { this.attributes = attributes; } - public ServiceAccountCreateData relationships(UserRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -73,21 +88,19 @@ public ServiceAccountCreateData relationships(UserRelationships relationships) { } /** - * Relationships of the user object. - * + *

Relationships of the user object.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserRelationships getRelationships() { + return relationships; + } public void setRelationships(UserRelationships relationships) { this.relationships = relationships; } - public ServiceAccountCreateData type(UsersType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public ServiceAccountCreateData type(UsersType type) { } /** - * Users resource type. - * + *

Users resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UsersType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UsersType getType() { + return type; + } public void setType(UsersType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ServiceAccountCreateData object is equal to o. */ + /** + * Return true if this ServiceAccountCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } ServiceAccountCreateData serviceAccountCreateData = (ServiceAccountCreateData) o; - return Objects.equals(this.attributes, serviceAccountCreateData.attributes) - && Objects.equals(this.relationships, serviceAccountCreateData.relationships) - && Objects.equals(this.type, serviceAccountCreateData.type); + return Objects.equals(this.attributes, serviceAccountCreateData.attributes) && Objects.equals(this.relationships, serviceAccountCreateData.relationships) && Objects.equals(this.type, serviceAccountCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateRequest.java index 55bb209f1db..64c37353a0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceAccountCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create a service account. */ -@JsonPropertyOrder({ServiceAccountCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create a service account.

+ */ +@JsonPropertyOrder({ + ServiceAccountCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceAccountCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ServiceAccountCreateData data; @@ -26,11 +47,10 @@ public ServiceAccountCreateRequest() {} @JsonCreator public ServiceAccountCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ServiceAccountCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)ServiceAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public ServiceAccountCreateRequest data(ServiceAccountCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public ServiceAccountCreateRequest data(ServiceAccountCreateData data) { } /** - * Object to create a service account User. - * + *

Object to create a service account User.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceAccountCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceAccountCreateData getData() { + return data; + } public void setData(ServiceAccountCreateData data) { this.data = data; } - /** Return true if this ServiceAccountCreateRequest object is equal to o. */ + /** + * Return true if this ServiceAccountCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, serviceAccountCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionCreateResponse.java index 194cb6c8b4a..8f90f3512f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionCreateResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionCreateResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Create service definitions response. */ -@JsonPropertyOrder({ServiceDefinitionCreateResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Create service definitions response.

+ */ +@JsonPropertyOrder({ + ServiceDefinitionCreateResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionCreateResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public ServiceDefinitionCreateResponse data(List data) { } return this; } - public ServiceDefinitionCreateResponse addDataItem(ServiceDefinitionData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public ServiceDefinitionCreateResponse addDataItem(ServiceDefinitionData dataIte } /** - * Create service definitions response payload. - * + *

Create service definitions response payload.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this ServiceDefinitionCreateResponse object is equal to o. */ + /** + * Return true if this ServiceDefinitionCreateResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceDefinitionCreateResponse serviceDefinitionCreateResponse = - (ServiceDefinitionCreateResponse) o; + ServiceDefinitionCreateResponse serviceDefinitionCreateResponse = (ServiceDefinitionCreateResponse) o; return Objects.equals(this.data, serviceDefinitionCreateResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionData.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionData.java index 26dd593829b..59f2f2a45a9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionData.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service definition data. */ + +/** + *

Service definition data.

+ */ @JsonPropertyOrder({ ServiceDefinitionData.JSON_PROPERTY_ATTRIBUTES, ServiceDefinitionData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ServiceDefinitionDataAttributes attributes; @@ -34,43 +54,42 @@ public ServiceDefinitionData attributes(ServiceDefinitionDataAttributes attribut } /** - * Service definition attributes. - * + *

Service definition attributes.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionDataAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionDataAttributes getAttributes() { + return attributes; + } public void setAttributes(ServiceDefinitionDataAttributes attributes) { this.attributes = attributes; } - public ServiceDefinitionData type(String type) { this.type = type; return this; } /** - * Service definition type. - * + *

Service definition type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } public void setType(String type) { this.type = type; } - /** Return true if this ServiceDefinitionData object is equal to o. */ + /** + * Return true if this ServiceDefinitionData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,13 +99,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionData serviceDefinitionData = (ServiceDefinitionData) o; - return Objects.equals(this.attributes, serviceDefinitionData.attributes) - && Objects.equals(this.type, serviceDefinitionData.type); + return Objects.equals(this.attributes, serviceDefinitionData.attributes) && Objects.equals(this.type, serviceDefinitionData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -100,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionDataAttributes.java index 5cd3cf9b544..f008d733a80 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionDataAttributes.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service definition attributes. */ + +/** + *

Service definition attributes.

+ */ @JsonPropertyOrder({ ServiceDefinitionDataAttributes.JSON_PROPERTY_META, ServiceDefinitionDataAttributes.JSON_PROPERTY_SCHEMA }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_META = "meta"; private ServiceDefinitionMeta meta; @@ -34,21 +54,19 @@ public ServiceDefinitionDataAttributes meta(ServiceDefinitionMeta meta) { } /** - * Metadata about a service definition. - * + *

Metadata about a service definition.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionMeta getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionMeta getMeta() { + return meta; + } public void setMeta(ServiceDefinitionMeta meta) { this.meta = meta; } - public ServiceDefinitionDataAttributes schema(ServiceDefinitionSchema schema) { this.schema = schema; this.unparsed |= schema.unparsed; @@ -56,22 +74,23 @@ public ServiceDefinitionDataAttributes schema(ServiceDefinitionSchema schema) { } /** - * Service definition schema. - * + *

Service definition schema.

* @return schema - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCHEMA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionSchema getSchema() { - return schema; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCHEMA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionSchema getSchema() { + return schema; + } public void setSchema(ServiceDefinitionSchema schema) { this.schema = schema; } - /** Return true if this ServiceDefinitionDataAttributes object is equal to o. */ + /** + * Return true if this ServiceDefinitionDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,15 +99,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceDefinitionDataAttributes serviceDefinitionDataAttributes = - (ServiceDefinitionDataAttributes) o; - return Objects.equals(this.meta, serviceDefinitionDataAttributes.meta) - && Objects.equals(this.schema, serviceDefinitionDataAttributes.schema); + ServiceDefinitionDataAttributes serviceDefinitionDataAttributes = (ServiceDefinitionDataAttributes) o; + return Objects.equals(this.meta, serviceDefinitionDataAttributes.meta) && Objects.equals(this.schema, serviceDefinitionDataAttributes.schema); } + @Override public int hashCode() { - return Objects.hash(meta, schema); + return Objects.hash(meta,schema); } @Override @@ -102,7 +120,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionGetResponse.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionGetResponse.java index 83594fc279a..df35b8e0de7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionGetResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionGetResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Get service definition response. */ -@JsonPropertyOrder({ServiceDefinitionGetResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Get service definition response.

+ */ +@JsonPropertyOrder({ + ServiceDefinitionGetResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionGetResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private ServiceDefinitionData data; @@ -28,22 +50,23 @@ public ServiceDefinitionGetResponse data(ServiceDefinitionData data) { } /** - * Service definition data. - * + *

Service definition data.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionData getData() { + return data; + } public void setData(ServiceDefinitionData data) { this.data = data; } - /** Return true if this ServiceDefinitionGetResponse object is equal to o. */ + /** + * Return true if this ServiceDefinitionGetResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, serviceDefinitionGetResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionMeta.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionMeta.java index a8183ba5d51..4552fdd4541 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionMeta.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Metadata about a service definition. */ + +/** + *

Metadata about a service definition.

+ */ @JsonPropertyOrder({ ServiceDefinitionMeta.JSON_PROPERTY_GITHUB_HTML_URL, ServiceDefinitionMeta.JSON_PROPERTY_INGESTED_SCHEMA_VERSION, ServiceDefinitionMeta.JSON_PROPERTY_INGESTION_SOURCE, ServiceDefinitionMeta.JSON_PROPERTY_LAST_MODIFIED_TIME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionMeta { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GITHUB_HTML_URL = "github-html-url"; private String githubHtmlUrl; @@ -41,85 +61,80 @@ public ServiceDefinitionMeta githubHtmlUrl(String githubHtmlUrl) { } /** - * GitHub HTML URL. - * + *

GitHub HTML URL.

* @return githubHtmlUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GITHUB_HTML_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGithubHtmlUrl() { - return githubHtmlUrl; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GITHUB_HTML_URL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getGithubHtmlUrl() { + return githubHtmlUrl; + } public void setGithubHtmlUrl(String githubHtmlUrl) { this.githubHtmlUrl = githubHtmlUrl; } - public ServiceDefinitionMeta ingestedSchemaVersion(String ingestedSchemaVersion) { this.ingestedSchemaVersion = ingestedSchemaVersion; return this; } /** - * Ingestion schema version. - * + *

Ingestion schema version.

* @return ingestedSchemaVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_SCHEMA_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIngestedSchemaVersion() { - return ingestedSchemaVersion; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTED_SCHEMA_VERSION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIngestedSchemaVersion() { + return ingestedSchemaVersion; + } public void setIngestedSchemaVersion(String ingestedSchemaVersion) { this.ingestedSchemaVersion = ingestedSchemaVersion; } - public ServiceDefinitionMeta ingestionSource(String ingestionSource) { this.ingestionSource = ingestionSource; return this; } /** - * Ingestion source of the service definition. - * + *

Ingestion source of the service definition.

* @return ingestionSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTION_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIngestionSource() { - return ingestionSource; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTION_SOURCE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIngestionSource() { + return ingestionSource; + } public void setIngestionSource(String ingestionSource) { this.ingestionSource = ingestionSource; } - public ServiceDefinitionMeta lastModifiedTime(String lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } /** - * Last modified time of the service definition. - * + *

Last modified time of the service definition.

* @return lastModifiedTime - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLastModifiedTime() { - return lastModifiedTime; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_TIME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getLastModifiedTime() { + return lastModifiedTime; + } public void setLastModifiedTime(String lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } - /** Return true if this ServiceDefinitionMeta object is equal to o. */ + /** + * Return true if this ServiceDefinitionMeta object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -129,15 +144,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionMeta serviceDefinitionMeta = (ServiceDefinitionMeta) o; - return Objects.equals(this.githubHtmlUrl, serviceDefinitionMeta.githubHtmlUrl) - && Objects.equals(this.ingestedSchemaVersion, serviceDefinitionMeta.ingestedSchemaVersion) - && Objects.equals(this.ingestionSource, serviceDefinitionMeta.ingestionSource) - && Objects.equals(this.lastModifiedTime, serviceDefinitionMeta.lastModifiedTime); + return Objects.equals(this.githubHtmlUrl, serviceDefinitionMeta.githubHtmlUrl) && Objects.equals(this.ingestedSchemaVersion, serviceDefinitionMeta.ingestedSchemaVersion) && Objects.equals(this.ingestionSource, serviceDefinitionMeta.ingestionSource) && Objects.equals(this.lastModifiedTime, serviceDefinitionMeta.lastModifiedTime); } + @Override public int hashCode() { - return Objects.hash(githubHtmlUrl, ingestedSchemaVersion, ingestionSource, lastModifiedTime); + return Objects.hash(githubHtmlUrl,ingestedSchemaVersion,ingestionSource,lastModifiedTime); } @Override @@ -145,9 +158,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServiceDefinitionMeta {\n"); sb.append(" githubHtmlUrl: ").append(toIndentedString(githubHtmlUrl)).append("\n"); - sb.append(" ingestedSchemaVersion: ") - .append(toIndentedString(ingestedSchemaVersion)) - .append("\n"); + sb.append(" ingestedSchemaVersion: ").append(toIndentedString(ingestedSchemaVersion)).append("\n"); sb.append(" ingestionSource: ").append(toIndentedString(ingestionSource)).append("\n"); sb.append(" lastModifiedTime: ").append(toIndentedString(lastModifiedTime)).append("\n"); sb.append("}"); @@ -155,7 +166,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionSchema.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionSchema.java index 31c97a2e421..d6be63f27d3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionSchema.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionSchema.java @@ -6,273 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = ServiceDefinitionSchema.ServiceDefinitionSchemaDeserializer.class) @JsonSerialize(using = ServiceDefinitionSchema.ServiceDefinitionSchemaSerializer.class) public class ServiceDefinitionSchema extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ServiceDefinitionSchema.class.getName()); + private static final Logger log = Logger.getLogger(ServiceDefinitionSchema.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class ServiceDefinitionSchemaSerializer extends StdSerializer { + public ServiceDefinitionSchemaSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public ServiceDefinitionSchemaSerializer() { + this(null); + } - public static class ServiceDefinitionSchemaSerializer - extends StdSerializer { - public ServiceDefinitionSchemaSerializer(Class t) { - super(t); + @Override + public void serialize(ServiceDefinitionSchema value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public ServiceDefinitionSchemaSerializer() { - this(null); + public static class ServiceDefinitionSchemaDeserializer extends StdDeserializer { + public ServiceDefinitionSchemaDeserializer() { + this(ServiceDefinitionSchema.class); + } + + public ServiceDefinitionSchemaDeserializer(Class vc) { + super(vc); + } + + @Override + public ServiceDefinitionSchema 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 ServiceDefinitionV1 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceDefinitionV1.class.equals(Integer.class) || ServiceDefinitionV1.class.equals(Long.class) || ServiceDefinitionV1.class.equals(Float.class) || ServiceDefinitionV1.class.equals(Double.class) || ServiceDefinitionV1.class.equals(Boolean.class) || ServiceDefinitionV1.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceDefinitionV1.class.equals(Integer.class) || ServiceDefinitionV1.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceDefinitionV1.class.equals(Float.class) || ServiceDefinitionV1.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceDefinitionV1.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceDefinitionV1.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV1.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 (!((ServiceDefinitionV1)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV1'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV1'", e); + } + + // deserialize ServiceDefinitionV2 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceDefinitionV2.class.equals(Integer.class) || ServiceDefinitionV2.class.equals(Long.class) || ServiceDefinitionV2.class.equals(Float.class) || ServiceDefinitionV2.class.equals(Double.class) || ServiceDefinitionV2.class.equals(Boolean.class) || ServiceDefinitionV2.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceDefinitionV2.class.equals(Integer.class) || ServiceDefinitionV2.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceDefinitionV2.class.equals(Float.class) || ServiceDefinitionV2.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceDefinitionV2.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceDefinitionV2.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2.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 (!((ServiceDefinitionV2)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2'", e); + } + + ServiceDefinitionSchema ret = new ServiceDefinitionSchema(); + 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 ServiceDefinitionSchema getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "ServiceDefinitionSchema cannot be null"); + } } - @Override - public void serialize( - ServiceDefinitionSchema value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ServiceDefinitionSchema() { + super("oneOf", Boolean.FALSE); + } + public ServiceDefinitionSchema(ServiceDefinitionV1 o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ServiceDefinitionSchema(ServiceDefinitionV2 o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class ServiceDefinitionSchemaDeserializer - extends StdDeserializer { - public ServiceDefinitionSchemaDeserializer() { - this(ServiceDefinitionSchema.class); + static { + schemas.put("ServiceDefinitionV1", new GenericType() { + }); + schemas.put("ServiceDefinitionV2", new GenericType() { + }); + JSON.registerDescendants(ServiceDefinitionSchema.class, Collections.unmodifiableMap(schemas)); } - public ServiceDefinitionSchemaDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return ServiceDefinitionSchema.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ServiceDefinitionV1, ServiceDefinitionV2 + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public ServiceDefinitionSchema 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 ServiceDefinitionV1 - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceDefinitionV1.class.equals(Integer.class) - || ServiceDefinitionV1.class.equals(Long.class) - || ServiceDefinitionV1.class.equals(Float.class) - || ServiceDefinitionV1.class.equals(Double.class) - || ServiceDefinitionV1.class.equals(Boolean.class) - || ServiceDefinitionV1.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceDefinitionV1.class.equals(Integer.class) - || ServiceDefinitionV1.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceDefinitionV1.class.equals(Float.class) - || ServiceDefinitionV1.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceDefinitionV1.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceDefinitionV1.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ServiceDefinitionV1.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV1.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 (!((ServiceDefinitionV1) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV1'"); + if (JSON.isInstanceOf(ServiceDefinitionV2.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV1'", e); - } - // deserialize ServiceDefinitionV2 - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceDefinitionV2.class.equals(Integer.class) - || ServiceDefinitionV2.class.equals(Long.class) - || ServiceDefinitionV2.class.equals(Float.class) - || ServiceDefinitionV2.class.equals(Double.class) - || ServiceDefinitionV2.class.equals(Boolean.class) - || ServiceDefinitionV2.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceDefinitionV2.class.equals(Integer.class) - || ServiceDefinitionV2.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceDefinitionV2.class.equals(Float.class) - || ServiceDefinitionV2.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceDefinitionV2.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceDefinitionV2.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2.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 (!((ServiceDefinitionV2) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2'", e); - } - - ServiceDefinitionSchema ret = new ServiceDefinitionSchema(); - 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; + throw new RuntimeException("Invalid instance type. Must be ServiceDefinitionV1, ServiceDefinitionV2"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * ServiceDefinitionV1, ServiceDefinitionV2 + * + * @return The actual instance (ServiceDefinitionV1, ServiceDefinitionV2) + */ @Override - public ServiceDefinitionSchema getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ServiceDefinitionSchema cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public ServiceDefinitionSchema() { - super("oneOf", Boolean.FALSE); - } - - public ServiceDefinitionSchema(ServiceDefinitionV1 o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public ServiceDefinitionSchema(ServiceDefinitionV2 o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("ServiceDefinitionV1", new GenericType() {}); - schemas.put("ServiceDefinitionV2", new GenericType() {}); - JSON.registerDescendants(ServiceDefinitionSchema.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return ServiceDefinitionSchema.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: ServiceDefinitionV1, ServiceDefinitionV2 - * - *

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(ServiceDefinitionV1.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ServiceDefinitionV2.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `ServiceDefinitionV1`. If the actual instance is not `ServiceDefinitionV1`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceDefinitionV1` + * @throws ClassCastException if the instance is not `ServiceDefinitionV1` + */ + public ServiceDefinitionV1 getServiceDefinitionV1() throws ClassCastException { + return (ServiceDefinitionV1)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `ServiceDefinitionV2`. If the actual instance is not `ServiceDefinitionV2`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceDefinitionV2` + * @throws ClassCastException if the instance is not `ServiceDefinitionV2` + */ + public ServiceDefinitionV2 getServiceDefinitionV2() throws ClassCastException { + return (ServiceDefinitionV2)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be ServiceDefinitionV1, ServiceDefinitionV2"); - } - - /** - * Get the actual instance, which can be the following: ServiceDefinitionV1, ServiceDefinitionV2 - * - * @return The actual instance (ServiceDefinitionV1, ServiceDefinitionV2) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `ServiceDefinitionV1`. If the actual instance is not - * `ServiceDefinitionV1`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceDefinitionV1` - * @throws ClassCastException if the instance is not `ServiceDefinitionV1` - */ - public ServiceDefinitionV1 getServiceDefinitionV1() throws ClassCastException { - return (ServiceDefinitionV1) super.getActualInstance(); - } - - /** - * Get the actual instance of `ServiceDefinitionV2`. If the actual instance is not - * `ServiceDefinitionV2`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceDefinitionV2` - * @throws ClassCastException if the instance is not `ServiceDefinitionV2` - */ - public ServiceDefinitionV2 getServiceDefinitionV2() throws ClassCastException { - return (ServiceDefinitionV2) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1.java index ffd476fb8bd..8e51419c546 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1.java @@ -6,20 +6,32 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * Deprecated - Service definition V1 for providing additional service metadata and integrations. - * + *

Deprecated - Service definition V1 for providing additional service metadata and integrations.

* @deprecated */ @Deprecated @@ -33,10 +45,10 @@ ServiceDefinitionV1.JSON_PROPERTY_SCHEMA_VERSION, ServiceDefinitionV1.JSON_PROPERTY_TAGS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV1 { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTACT = "contact"; private ServiceDefinitionV1Contact contact = null; @@ -65,15 +77,13 @@ public ServiceDefinitionV1() {} @JsonCreator public ServiceDefinitionV1( - @JsonProperty(required = true, value = JSON_PROPERTY_INFO) ServiceDefinitionV1Info info, - @JsonProperty(required = true, value = JSON_PROPERTY_SCHEMA_VERSION) - ServiceDefinitionV1Version schemaVersion) { - this.info = info; - this.unparsed |= info.unparsed; - this.schemaVersion = schemaVersion; - this.unparsed |= !schemaVersion.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_INFO)ServiceDefinitionV1Info info, + @JsonProperty(required=true, value=JSON_PROPERTY_SCHEMA_VERSION)ServiceDefinitionV1Version schemaVersion) { + this.info = info; + this.unparsed |= info.unparsed; + this.schemaVersion = schemaVersion; + this.unparsed |= !schemaVersion.isValid(); } - public ServiceDefinitionV1 contact(ServiceDefinitionV1Contact contact) { this.contact = contact; this.unparsed |= contact.unparsed; @@ -81,26 +91,23 @@ public ServiceDefinitionV1 contact(ServiceDefinitionV1Contact contact) { } /** - * Contact information about the service. - * + *

Contact information about the service.

* @return contact - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTACT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionV1Contact getContact() { - return contact; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionV1Contact getContact() { + return contact; + } public void setContact(ServiceDefinitionV1Contact contact) { this.contact = contact; } - public ServiceDefinitionV1 extensions(Map extensions) { this.extensions = extensions; return this; } - public ServiceDefinitionV1 putExtensionsItem(String key, Object extensionsItem) { if (this.extensions == null) { this.extensions = new HashMap<>(); @@ -110,32 +117,27 @@ public ServiceDefinitionV1 putExtensionsItem(String key, Object extensionsItem) } /** - * Extensions to V1 schema. - * + *

Extensions to V1 schema.

* @return extensions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXTENSIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getExtensions() { - return extensions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTENSIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getExtensions() { + return extensions; + } public void setExtensions(Map extensions) { this.extensions = extensions; } - - public ServiceDefinitionV1 externalResources( - List externalResources) { + public ServiceDefinitionV1 externalResources(List externalResources) { this.externalResources = externalResources; for (ServiceDefinitionV1Resource item : externalResources) { this.unparsed |= item.unparsed; } return this; } - - public ServiceDefinitionV1 addExternalResourcesItem( - ServiceDefinitionV1Resource externalResourcesItem) { + public ServiceDefinitionV1 addExternalResourcesItem(ServiceDefinitionV1Resource externalResourcesItem) { if (this.externalResources == null) { this.externalResources = new ArrayList<>(); } @@ -145,21 +147,19 @@ public ServiceDefinitionV1 addExternalResourcesItem( } /** - * A list of external links related to the services. - * + *

A list of external links related to the services.

* @return externalResources - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXTERNAL_RESOURCES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getExternalResources() { - return externalResources; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_RESOURCES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getExternalResources() { + return externalResources; + } public void setExternalResources(List externalResources) { this.externalResources = externalResources; } - public ServiceDefinitionV1 info(ServiceDefinitionV1Info info) { this.info = info; this.unparsed |= info.unparsed; @@ -167,20 +167,18 @@ public ServiceDefinitionV1 info(ServiceDefinitionV1Info info) { } /** - * Basic information about a service. - * + *

Basic information about a service.

* @return info - */ - @JsonProperty(JSON_PROPERTY_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV1Info getInfo() { - return info; - } - + **/ + @JsonProperty(JSON_PROPERTY_INFO) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV1Info getInfo() { + return info; + } public void setInfo(ServiceDefinitionV1Info info) { this.info = info; } - public ServiceDefinitionV1 integrations(ServiceDefinitionV1Integrations integrations) { this.integrations = integrations; this.unparsed |= integrations.unparsed; @@ -188,21 +186,19 @@ public ServiceDefinitionV1 integrations(ServiceDefinitionV1Integrations integrat } /** - * Third party integrations that Datadog supports. - * + *

Third party integrations that Datadog supports.

* @return integrations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGRATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionV1Integrations getIntegrations() { - return integrations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionV1Integrations getIntegrations() { + return integrations; + } public void setIntegrations(ServiceDefinitionV1Integrations integrations) { this.integrations = integrations; } - public ServiceDefinitionV1 org(ServiceDefinitionV1Org org) { this.org = org; this.unparsed |= org.unparsed; @@ -210,21 +206,19 @@ public ServiceDefinitionV1 org(ServiceDefinitionV1Org org) { } /** - * Org related information about the service. - * + *

Org related information about the service.

* @return org - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionV1Org getOrg() { - return org; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionV1Org getOrg() { + return org; + } public void setOrg(ServiceDefinitionV1Org org) { this.org = org; } - public ServiceDefinitionV1 schemaVersion(ServiceDefinitionV1Version schemaVersion) { this.schemaVersion = schemaVersion; this.unparsed |= !schemaVersion.isValid(); @@ -232,28 +226,25 @@ public ServiceDefinitionV1 schemaVersion(ServiceDefinitionV1Version schemaVersio } /** - * Schema version being used. - * + *

Schema version being used.

* @return schemaVersion - */ - @JsonProperty(JSON_PROPERTY_SCHEMA_VERSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV1Version getSchemaVersion() { - return schemaVersion; - } - + **/ + @JsonProperty(JSON_PROPERTY_SCHEMA_VERSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV1Version getSchemaVersion() { + return schemaVersion; + } public void setSchemaVersion(ServiceDefinitionV1Version schemaVersion) { if (!schemaVersion.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.schemaVersion = schemaVersion; } - public ServiceDefinitionV1 tags(List tags) { this.tags = tags; return this; } - public ServiceDefinitionV1 addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -263,22 +254,23 @@ public ServiceDefinitionV1 addTagsItem(String tagsItem) { } /** - * A set of custom tags. - * + *

A set of custom tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - /** Return true if this ServiceDefinitionV1 object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1 object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -288,20 +280,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV1 serviceDefinitionV1 = (ServiceDefinitionV1) o; - return Objects.equals(this.contact, serviceDefinitionV1.contact) - && Objects.equals(this.extensions, serviceDefinitionV1.extensions) - && Objects.equals(this.externalResources, serviceDefinitionV1.externalResources) - && Objects.equals(this.info, serviceDefinitionV1.info) - && Objects.equals(this.integrations, serviceDefinitionV1.integrations) - && Objects.equals(this.org, serviceDefinitionV1.org) - && Objects.equals(this.schemaVersion, serviceDefinitionV1.schemaVersion) - && Objects.equals(this.tags, serviceDefinitionV1.tags); + return Objects.equals(this.contact, serviceDefinitionV1.contact) && Objects.equals(this.extensions, serviceDefinitionV1.extensions) && Objects.equals(this.externalResources, serviceDefinitionV1.externalResources) && Objects.equals(this.info, serviceDefinitionV1.info) && Objects.equals(this.integrations, serviceDefinitionV1.integrations) && Objects.equals(this.org, serviceDefinitionV1.org) && Objects.equals(this.schemaVersion, serviceDefinitionV1.schemaVersion) && Objects.equals(this.tags, serviceDefinitionV1.tags); } + @Override public int hashCode() { - return Objects.hash( - contact, extensions, externalResources, info, integrations, org, schemaVersion, tags); + return Objects.hash(contact,extensions,externalResources,info,integrations,org,schemaVersion,tags); } @Override @@ -321,7 +306,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Contact.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Contact.java index fe020ea31fc..ee2a2afa8e3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Contact.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Contact.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Contact information about the service. */ + +/** + *

Contact information about the service.

+ */ @JsonPropertyOrder({ ServiceDefinitionV1Contact.JSON_PROPERTY_EMAIL, ServiceDefinitionV1Contact.JSON_PROPERTY_SLACK }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV1Contact { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -33,43 +53,42 @@ public ServiceDefinitionV1Contact email(String email) { } /** - * Service owner’s email. - * + *

Service owner’s email.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public ServiceDefinitionV1Contact slack(String slack) { this.slack = slack; return this; } /** - * Service owner’s Slack channel. - * + *

Service owner’s Slack channel.

* @return slack - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SLACK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSlack() { - return slack; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLACK) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getSlack() { + return slack; + } public void setSlack(String slack) { this.slack = slack; } - /** Return true if this ServiceDefinitionV1Contact object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1Contact object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV1Contact serviceDefinitionV1Contact = (ServiceDefinitionV1Contact) o; - return Objects.equals(this.email, serviceDefinitionV1Contact.email) - && Objects.equals(this.slack, serviceDefinitionV1Contact.slack); + return Objects.equals(this.email, serviceDefinitionV1Contact.email) && Objects.equals(this.slack, serviceDefinitionV1Contact.slack); } + @Override public int hashCode() { - return Objects.hash(email, slack); + return Objects.hash(email,slack); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Info.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Info.java index 94ed4aa8e1e..c6d51fd96f2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Info.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Info.java @@ -6,24 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Basic information about a service. */ +/** + *

Basic information about a service.

+ */ @JsonPropertyOrder({ ServiceDefinitionV1Info.JSON_PROPERTY_DD_SERVICE, ServiceDefinitionV1Info.JSON_PROPERTY_DESCRIPTION, ServiceDefinitionV1Info.JSON_PROPERTY_DISPLAY_NAME, ServiceDefinitionV1Info.JSON_PROPERTY_SERVICE_TIER }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV1Info { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DD_SERVICE = "dd-service"; private String ddService; @@ -40,95 +59,88 @@ public ServiceDefinitionV1Info() {} @JsonCreator public ServiceDefinitionV1Info( - @JsonProperty(required = true, value = JSON_PROPERTY_DD_SERVICE) String ddService) { - this.ddService = ddService; + @JsonProperty(required=true, value=JSON_PROPERTY_DD_SERVICE)String ddService) { + this.ddService = ddService; } - public ServiceDefinitionV1Info ddService(String ddService) { this.ddService = ddService; return this; } /** - * Unique identifier of the service. Must be unique across all services and is used to match with - * a service in Datadog. - * + *

Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog.

* @return ddService - */ - @JsonProperty(JSON_PROPERTY_DD_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDdService() { - return ddService; - } - + **/ + @JsonProperty(JSON_PROPERTY_DD_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDdService() { + return ddService; + } public void setDdService(String ddService) { this.ddService = ddService; } - public ServiceDefinitionV1Info description(String description) { this.description = description; return this; } /** - * A short description of the service. - * + *

A short description of the service.

* @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } public void setDescription(String description) { this.description = description; } - public ServiceDefinitionV1Info displayName(String displayName) { this.displayName = displayName; return this; } /** - * A friendly name of the service. - * + *

A friendly name of the service.

* @return displayName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDisplayName() { - return displayName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } public void setDisplayName(String displayName) { this.displayName = displayName; } - public ServiceDefinitionV1Info serviceTier(String serviceTier) { this.serviceTier = serviceTier; return this; } /** - * Service tier. - * + *

Service tier.

* @return serviceTier - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE_TIER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getServiceTier() { - return serviceTier; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_TIER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceTier() { + return serviceTier; + } public void setServiceTier(String serviceTier) { this.serviceTier = serviceTier; } - /** Return true if this ServiceDefinitionV1Info object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1Info object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -138,15 +150,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV1Info serviceDefinitionV1Info = (ServiceDefinitionV1Info) o; - return Objects.equals(this.ddService, serviceDefinitionV1Info.ddService) - && Objects.equals(this.description, serviceDefinitionV1Info.description) - && Objects.equals(this.displayName, serviceDefinitionV1Info.displayName) - && Objects.equals(this.serviceTier, serviceDefinitionV1Info.serviceTier); + return Objects.equals(this.ddService, serviceDefinitionV1Info.ddService) && Objects.equals(this.description, serviceDefinitionV1Info.description) && Objects.equals(this.displayName, serviceDefinitionV1Info.displayName) && Objects.equals(this.serviceTier, serviceDefinitionV1Info.serviceTier); } + @Override public int hashCode() { - return Objects.hash(ddService, description, displayName, serviceTier); + return Objects.hash(ddService,description,displayName,serviceTier); } @Override @@ -162,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Integrations.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Integrations.java index 08b09d95a8a..1941e37d86c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Integrations.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Integrations.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Third party integrations that Datadog supports. */ -@JsonPropertyOrder({ServiceDefinitionV1Integrations.JSON_PROPERTY_PAGERDUTY}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Third party integrations that Datadog supports.

+ */ +@JsonPropertyOrder({ + ServiceDefinitionV1Integrations.JSON_PROPERTY_PAGERDUTY +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV1Integrations { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_PAGERDUTY = "pagerduty"; private String pagerduty; @@ -27,22 +49,23 @@ public ServiceDefinitionV1Integrations pagerduty(String pagerduty) { } /** - * PagerDuty service URL for the service. - * + *

PagerDuty service URL for the service.

* @return pagerduty - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGERDUTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPagerduty() { - return pagerduty; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGERDUTY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPagerduty() { + return pagerduty; + } public void setPagerduty(String pagerduty) { this.pagerduty = pagerduty; } - /** Return true if this ServiceDefinitionV1Integrations object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1Integrations object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -51,11 +74,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceDefinitionV1Integrations serviceDefinitionV1Integrations = - (ServiceDefinitionV1Integrations) o; + ServiceDefinitionV1Integrations serviceDefinitionV1Integrations = (ServiceDefinitionV1Integrations) o; return Objects.equals(this.pagerduty, serviceDefinitionV1Integrations.pagerduty); } + @Override public int hashCode() { return Objects.hash(pagerduty); @@ -71,7 +94,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Org.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Org.java index 03ad32c75c4..31927cda848 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Org.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Org.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Org related information about the service. */ + +/** + *

Org related information about the service.

+ */ @JsonPropertyOrder({ ServiceDefinitionV1Org.JSON_PROPERTY_APPLICATION, ServiceDefinitionV1Org.JSON_PROPERTY_TEAM }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV1Org { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_APPLICATION = "application"; private String application; @@ -33,43 +53,42 @@ public ServiceDefinitionV1Org application(String application) { } /** - * App feature this service supports. - * + *

App feature this service supports.

* @return application - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApplication() { - return application; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getApplication() { + return application; + } public void setApplication(String application) { this.application = application; } - public ServiceDefinitionV1Org team(String team) { this.team = team; return this; } /** - * Team that owns the service. - * + *

Team that owns the service.

* @return team - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeam() { - return team; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } public void setTeam(String team) { this.team = team; } - /** Return true if this ServiceDefinitionV1Org object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1Org object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,13 +98,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV1Org serviceDefinitionV1Org = (ServiceDefinitionV1Org) o; - return Objects.equals(this.application, serviceDefinitionV1Org.application) - && Objects.equals(this.team, serviceDefinitionV1Org.team); + return Objects.equals(this.application, serviceDefinitionV1Org.application) && Objects.equals(this.team, serviceDefinitionV1Org.team); } + @Override public int hashCode() { - return Objects.hash(application, team); + return Objects.hash(application,team); } @Override @@ -99,7 +118,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Resource.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Resource.java index 3502310c213..f2b0f46958a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Resource.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Resource.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service's external links. */ + +/** + *

Service's external links.

+ */ @JsonPropertyOrder({ ServiceDefinitionV1Resource.JSON_PROPERTY_NAME, ServiceDefinitionV1Resource.JSON_PROPERTY_TYPE, ServiceDefinitionV1Resource.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV1Resource { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -36,36 +55,32 @@ public ServiceDefinitionV1Resource() {} @JsonCreator public ServiceDefinitionV1Resource( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ServiceDefinitionV1ResourceType type, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.name = name; - this.type = type; - this.unparsed |= !type.isValid(); - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ServiceDefinitionV1ResourceType type, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); + this.url = url; } - public ServiceDefinitionV1Resource name(String name) { this.name = name; return this; } /** - * Link name. - * + *

Link name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceDefinitionV1Resource type(ServiceDefinitionV1ResourceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -73,44 +88,43 @@ public ServiceDefinitionV1Resource type(ServiceDefinitionV1ResourceType type) { } /** - * Link type. - * + *

Link type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV1ResourceType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV1ResourceType getType() { + return type; + } public void setType(ServiceDefinitionV1ResourceType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public ServiceDefinitionV1Resource url(String url) { this.url = url; return this; } /** - * Link URL. - * + *

Link URL.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this ServiceDefinitionV1Resource object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1Resource object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,14 +134,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV1Resource serviceDefinitionV1Resource = (ServiceDefinitionV1Resource) o; - return Objects.equals(this.name, serviceDefinitionV1Resource.name) - && Objects.equals(this.type, serviceDefinitionV1Resource.type) - && Objects.equals(this.url, serviceDefinitionV1Resource.url); + return Objects.equals(this.name, serviceDefinitionV1Resource.name) && Objects.equals(this.type, serviceDefinitionV1Resource.type) && Objects.equals(this.url, serviceDefinitionV1Resource.url); } + @Override public int hashCode() { - return Objects.hash(name, type, url); + return Objects.hash(name,type,url); } @Override @@ -142,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1ResourceType.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1ResourceType.java index dfff5c0b400..7556a7b0de7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1ResourceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1ResourceType.java @@ -6,47 +6,58 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Link type. */ -@JsonSerialize( - using = ServiceDefinitionV1ResourceType.ServiceDefinitionV1ResourceTypeSerializer.class) +/** + *

Link type.

+ */ +@JsonSerialize(using = ServiceDefinitionV1ResourceType.ServiceDefinitionV1ResourceTypeSerializer.class) public class ServiceDefinitionV1ResourceType { - public static final ServiceDefinitionV1ResourceType DOC = - new ServiceDefinitionV1ResourceType("doc"); - public static final ServiceDefinitionV1ResourceType WIKI = - new ServiceDefinitionV1ResourceType("wiki"); - public static final ServiceDefinitionV1ResourceType RUNBOOK = - new ServiceDefinitionV1ResourceType("runbook"); - public static final ServiceDefinitionV1ResourceType URL = - new ServiceDefinitionV1ResourceType("url"); - public static final ServiceDefinitionV1ResourceType REPO = - new ServiceDefinitionV1ResourceType("repo"); - public static final ServiceDefinitionV1ResourceType DASHBOARD = - new ServiceDefinitionV1ResourceType("dashboard"); - public static final ServiceDefinitionV1ResourceType ONCALL = - new ServiceDefinitionV1ResourceType("oncall"); - public static final ServiceDefinitionV1ResourceType CODE = - new ServiceDefinitionV1ResourceType("code"); - public static final ServiceDefinitionV1ResourceType LINK = - new ServiceDefinitionV1ResourceType("link"); - - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "doc", "wiki", "runbook", "url", "repo", "dashboard", "oncall", "code", "link")); + public static final ServiceDefinitionV1ResourceType DOC = new ServiceDefinitionV1ResourceType("doc"); + public static final ServiceDefinitionV1ResourceType WIKI = new ServiceDefinitionV1ResourceType("wiki"); + public static final ServiceDefinitionV1ResourceType RUNBOOK = new ServiceDefinitionV1ResourceType("runbook"); + public static final ServiceDefinitionV1ResourceType URL = new ServiceDefinitionV1ResourceType("url"); + public static final ServiceDefinitionV1ResourceType REPO = new ServiceDefinitionV1ResourceType("repo"); + public static final ServiceDefinitionV1ResourceType DASHBOARD = new ServiceDefinitionV1ResourceType("dashboard"); + public static final ServiceDefinitionV1ResourceType ONCALL = new ServiceDefinitionV1ResourceType("oncall"); + public static final ServiceDefinitionV1ResourceType CODE = new ServiceDefinitionV1ResourceType("code"); + public static final ServiceDefinitionV1ResourceType LINK = new ServiceDefinitionV1ResourceType("link"); + + private static final Set allowedValues = new HashSet(Arrays.asList("doc", "wiki", "runbook", "url", "repo", "dashboard", "oncall", "code", "link")); private String value; @@ -58,22 +69,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV1ResourceTypeSerializer - extends StdSerializer { - public ServiceDefinitionV1ResourceTypeSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV1ResourceTypeSerializer extends StdSerializer { + public ServiceDefinitionV1ResourceTypeSerializer(Class t) { + super(t); + } - public ServiceDefinitionV1ResourceTypeSerializer() { - this(null); - } + public ServiceDefinitionV1ResourceTypeSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV1ResourceType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV1ResourceType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -85,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV1ResourceType object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1ResourceType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Version.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Version.java index 8edbc654d2d..dc172103c30 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Version.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV1Version.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Schema version being used. */ +/** + *

Schema version being used.

+ */ @JsonSerialize(using = ServiceDefinitionV1Version.ServiceDefinitionV1VersionSerializer.class) public class ServiceDefinitionV1Version { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV1VersionSerializer - extends StdSerializer { - public ServiceDefinitionV1VersionSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV1VersionSerializer extends StdSerializer { + public ServiceDefinitionV1VersionSerializer(Class t) { + super(t); + } - public ServiceDefinitionV1VersionSerializer() { - this(null); - } + public ServiceDefinitionV1VersionSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV1Version value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV1Version value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV1Version object is equal to o. */ + /** + * Return true if this ServiceDefinitionV1Version object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2.java index 54db7dac3b0..6ba991dec2d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2.java @@ -6,18 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service definition V2 for providing service metadata and integrations. */ + +/** + *

Service definition V2 for providing service metadata and integrations.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2.JSON_PROPERTY_CONTACTS, ServiceDefinitionV2.JSON_PROPERTY_DD_SERVICE, @@ -31,10 +46,10 @@ ServiceDefinitionV2.JSON_PROPERTY_TAGS, ServiceDefinitionV2.JSON_PROPERTY_TEAM }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2 { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTACTS = "contacts"; private List contacts = null; @@ -72,14 +87,12 @@ public ServiceDefinitionV2() {} @JsonCreator public ServiceDefinitionV2( - @JsonProperty(required = true, value = JSON_PROPERTY_DD_SERVICE) String ddService, - @JsonProperty(required = true, value = JSON_PROPERTY_SCHEMA_VERSION) - ServiceDefinitionV2Version schemaVersion) { - this.ddService = ddService; - this.schemaVersion = schemaVersion; - this.unparsed |= !schemaVersion.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_DD_SERVICE)String ddService, + @JsonProperty(required=true, value=JSON_PROPERTY_SCHEMA_VERSION)ServiceDefinitionV2Version schemaVersion) { + this.ddService = ddService; + this.schemaVersion = schemaVersion; + this.unparsed |= !schemaVersion.isValid(); } - public ServiceDefinitionV2 contacts(List contacts) { this.contacts = contacts; for (ServiceDefinitionV2Contact item : contacts) { @@ -87,7 +100,6 @@ public ServiceDefinitionV2 contacts(List contacts) { } return this; } - public ServiceDefinitionV2 addContactsItem(ServiceDefinitionV2Contact contactsItem) { if (this.contacts == null) { this.contacts = new ArrayList<>(); @@ -98,63 +110,56 @@ public ServiceDefinitionV2 addContactsItem(ServiceDefinitionV2Contact contactsIt } /** - * A list of contacts related to the services. - * + *

A list of contacts related to the services.

* @return contacts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONTACTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getContacts() { - return contacts; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTACTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getContacts() { + return contacts; + } public void setContacts(List contacts) { this.contacts = contacts; } - public ServiceDefinitionV2 ddService(String ddService) { this.ddService = ddService; return this; } /** - * Unique identifier of the service. Must be unique across all services and is used to match with - * a service in Datadog. - * + *

Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog.

* @return ddService - */ - @JsonProperty(JSON_PROPERTY_DD_SERVICE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDdService() { - return ddService; - } - + **/ + @JsonProperty(JSON_PROPERTY_DD_SERVICE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getDdService() { + return ddService; + } public void setDdService(String ddService) { this.ddService = ddService; } - public ServiceDefinitionV2 ddTeam(String ddTeam) { this.ddTeam = ddTeam; return this; } /** - * Experimental feature. A Team handle that matches a Team in the Datadog Teams product. - * + *

Experimental feature. A Team handle that matches a Team in the Datadog Teams product.

* @return ddTeam - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DD_TEAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDdTeam() { - return ddTeam; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DD_TEAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getDdTeam() { + return ddTeam; + } public void setDdTeam(String ddTeam) { this.ddTeam = ddTeam; } - public ServiceDefinitionV2 docs(List docs) { this.docs = docs; for (ServiceDefinitionV2Doc item : docs) { @@ -162,7 +167,6 @@ public ServiceDefinitionV2 docs(List docs) { } return this; } - public ServiceDefinitionV2 addDocsItem(ServiceDefinitionV2Doc docsItem) { if (this.docs == null) { this.docs = new ArrayList<>(); @@ -173,26 +177,23 @@ public ServiceDefinitionV2 addDocsItem(ServiceDefinitionV2Doc docsItem) { } /** - * A list of documentation related to the services. - * + *

A list of documentation related to the services.

* @return docs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDocs() { - return docs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOCS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getDocs() { + return docs; + } public void setDocs(List docs) { this.docs = docs; } - public ServiceDefinitionV2 extensions(Map extensions) { this.extensions = extensions; return this; } - public ServiceDefinitionV2 putExtensionsItem(String key, Object extensionsItem) { if (this.extensions == null) { this.extensions = new HashMap<>(); @@ -202,21 +203,19 @@ public ServiceDefinitionV2 putExtensionsItem(String key, Object extensionsItem) } /** - * Extensions to V2 schema. - * + *

Extensions to V2 schema.

* @return extensions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXTENSIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getExtensions() { - return extensions; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTENSIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Map getExtensions() { + return extensions; + } public void setExtensions(Map extensions) { this.extensions = extensions; } - public ServiceDefinitionV2 integrations(ServiceDefinitionV2Integrations integrations) { this.integrations = integrations; this.unparsed |= integrations.unparsed; @@ -224,21 +223,19 @@ public ServiceDefinitionV2 integrations(ServiceDefinitionV2Integrations integrat } /** - * Third party integrations that Datadog supports. - * + *

Third party integrations that Datadog supports.

* @return integrations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGRATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionV2Integrations getIntegrations() { - return integrations; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATIONS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionV2Integrations getIntegrations() { + return integrations; + } public void setIntegrations(ServiceDefinitionV2Integrations integrations) { this.integrations = integrations; } - public ServiceDefinitionV2 links(List links) { this.links = links; for (ServiceDefinitionV2Link item : links) { @@ -246,7 +243,6 @@ public ServiceDefinitionV2 links(List links) { } return this; } - public ServiceDefinitionV2 addLinksItem(ServiceDefinitionV2Link linksItem) { if (this.links == null) { this.links = new ArrayList<>(); @@ -257,21 +253,19 @@ public ServiceDefinitionV2 addLinksItem(ServiceDefinitionV2Link linksItem) { } /** - * A list of links related to the services. - * + *

A list of links related to the services.

* @return links - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LINKS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLinks() { - return links; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getLinks() { + return links; + } public void setLinks(List links) { this.links = links; } - public ServiceDefinitionV2 repos(List repos) { this.repos = repos; for (ServiceDefinitionV2Repo item : repos) { @@ -279,7 +273,6 @@ public ServiceDefinitionV2 repos(List repos) { } return this; } - public ServiceDefinitionV2 addReposItem(ServiceDefinitionV2Repo reposItem) { if (this.repos == null) { this.repos = new ArrayList<>(); @@ -290,21 +283,19 @@ public ServiceDefinitionV2 addReposItem(ServiceDefinitionV2Repo reposItem) { } /** - * A list of code repositories related to the services. - * + *

A list of code repositories related to the services.

* @return repos - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REPOS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRepos() { - return repos; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPOS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getRepos() { + return repos; + } public void setRepos(List repos) { this.repos = repos; } - public ServiceDefinitionV2 schemaVersion(ServiceDefinitionV2Version schemaVersion) { this.schemaVersion = schemaVersion; this.unparsed |= !schemaVersion.isValid(); @@ -312,28 +303,25 @@ public ServiceDefinitionV2 schemaVersion(ServiceDefinitionV2Version schemaVersio } /** - * Schema version being used. - * + *

Schema version being used.

* @return schemaVersion - */ - @JsonProperty(JSON_PROPERTY_SCHEMA_VERSION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV2Version getSchemaVersion() { - return schemaVersion; - } - + **/ + @JsonProperty(JSON_PROPERTY_SCHEMA_VERSION) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV2Version getSchemaVersion() { + return schemaVersion; + } public void setSchemaVersion(ServiceDefinitionV2Version schemaVersion) { if (!schemaVersion.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.schemaVersion = schemaVersion; } - public ServiceDefinitionV2 tags(List tags) { this.tags = tags; return this; } - public ServiceDefinitionV2 addTagsItem(String tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); @@ -343,43 +331,42 @@ public ServiceDefinitionV2 addTagsItem(String tagsItem) { } /** - * A set of custom tags. - * + *

A set of custom tags.

* @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } public void setTags(List tags) { this.tags = tags; } - public ServiceDefinitionV2 team(String team) { this.team = team; return this; } /** - * Team that owns the service. - * + *

Team that owns the service.

* @return team - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEAM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeam() { - return team; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } public void setTeam(String team) { this.team = team; } - /** Return true if this ServiceDefinitionV2 object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2 object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -389,33 +376,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2 serviceDefinitionV2 = (ServiceDefinitionV2) o; - return Objects.equals(this.contacts, serviceDefinitionV2.contacts) - && Objects.equals(this.ddService, serviceDefinitionV2.ddService) - && Objects.equals(this.ddTeam, serviceDefinitionV2.ddTeam) - && Objects.equals(this.docs, serviceDefinitionV2.docs) - && Objects.equals(this.extensions, serviceDefinitionV2.extensions) - && Objects.equals(this.integrations, serviceDefinitionV2.integrations) - && Objects.equals(this.links, serviceDefinitionV2.links) - && Objects.equals(this.repos, serviceDefinitionV2.repos) - && Objects.equals(this.schemaVersion, serviceDefinitionV2.schemaVersion) - && Objects.equals(this.tags, serviceDefinitionV2.tags) - && Objects.equals(this.team, serviceDefinitionV2.team); + return Objects.equals(this.contacts, serviceDefinitionV2.contacts) && Objects.equals(this.ddService, serviceDefinitionV2.ddService) && Objects.equals(this.ddTeam, serviceDefinitionV2.ddTeam) && Objects.equals(this.docs, serviceDefinitionV2.docs) && Objects.equals(this.extensions, serviceDefinitionV2.extensions) && Objects.equals(this.integrations, serviceDefinitionV2.integrations) && Objects.equals(this.links, serviceDefinitionV2.links) && Objects.equals(this.repos, serviceDefinitionV2.repos) && Objects.equals(this.schemaVersion, serviceDefinitionV2.schemaVersion) && Objects.equals(this.tags, serviceDefinitionV2.tags) && Objects.equals(this.team, serviceDefinitionV2.team); } + @Override public int hashCode() { - return Objects.hash( - contacts, - ddService, - ddTeam, - docs, - extensions, - integrations, - links, - repos, - schemaVersion, - tags, - team); + return Objects.hash(contacts,ddService,ddTeam,docs,extensions,integrations,links,repos,schemaVersion,tags,team); } @Override @@ -438,7 +405,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Contact.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Contact.java index 9c823bac887..9bf77cfc583 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Contact.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Contact.java @@ -6,277 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = ServiceDefinitionV2Contact.ServiceDefinitionV2ContactDeserializer.class) @JsonSerialize(using = ServiceDefinitionV2Contact.ServiceDefinitionV2ContactSerializer.class) public class ServiceDefinitionV2Contact extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ServiceDefinitionV2Contact.class.getName()); + private static final Logger log = Logger.getLogger(ServiceDefinitionV2Contact.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class ServiceDefinitionV2ContactSerializer extends StdSerializer { + public ServiceDefinitionV2ContactSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public ServiceDefinitionV2ContactSerializer() { + this(null); + } - public static class ServiceDefinitionV2ContactSerializer - extends StdSerializer { - public ServiceDefinitionV2ContactSerializer(Class t) { - super(t); + @Override + public void serialize(ServiceDefinitionV2Contact value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public ServiceDefinitionV2ContactSerializer() { - this(null); + public static class ServiceDefinitionV2ContactDeserializer extends StdDeserializer { + public ServiceDefinitionV2ContactDeserializer() { + this(ServiceDefinitionV2Contact.class); + } + + public ServiceDefinitionV2ContactDeserializer(Class vc) { + super(vc); + } + + @Override + public ServiceDefinitionV2Contact 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 ServiceDefinitionV2Email + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceDefinitionV2Email.class.equals(Integer.class) || ServiceDefinitionV2Email.class.equals(Long.class) || ServiceDefinitionV2Email.class.equals(Float.class) || ServiceDefinitionV2Email.class.equals(Double.class) || ServiceDefinitionV2Email.class.equals(Boolean.class) || ServiceDefinitionV2Email.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceDefinitionV2Email.class.equals(Integer.class) || ServiceDefinitionV2Email.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceDefinitionV2Email.class.equals(Float.class) || ServiceDefinitionV2Email.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceDefinitionV2Email.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceDefinitionV2Email.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2Email.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 (!((ServiceDefinitionV2Email)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2Email'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2Email'", e); + } + + // deserialize ServiceDefinitionV2Slack + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceDefinitionV2Slack.class.equals(Integer.class) || ServiceDefinitionV2Slack.class.equals(Long.class) || ServiceDefinitionV2Slack.class.equals(Float.class) || ServiceDefinitionV2Slack.class.equals(Double.class) || ServiceDefinitionV2Slack.class.equals(Boolean.class) || ServiceDefinitionV2Slack.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceDefinitionV2Slack.class.equals(Integer.class) || ServiceDefinitionV2Slack.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceDefinitionV2Slack.class.equals(Float.class) || ServiceDefinitionV2Slack.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceDefinitionV2Slack.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceDefinitionV2Slack.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2Slack.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 (!((ServiceDefinitionV2Slack)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2Slack'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2Slack'", e); + } + + ServiceDefinitionV2Contact ret = new ServiceDefinitionV2Contact(); + 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 ServiceDefinitionV2Contact getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "ServiceDefinitionV2Contact cannot be null"); + } } - @Override - public void serialize( - ServiceDefinitionV2Contact value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ServiceDefinitionV2Contact() { + super("oneOf", Boolean.FALSE); + } + public ServiceDefinitionV2Contact(ServiceDefinitionV2Email o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ServiceDefinitionV2Contact(ServiceDefinitionV2Slack o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class ServiceDefinitionV2ContactDeserializer - extends StdDeserializer { - public ServiceDefinitionV2ContactDeserializer() { - this(ServiceDefinitionV2Contact.class); + static { + schemas.put("ServiceDefinitionV2Email", new GenericType() { + }); + schemas.put("ServiceDefinitionV2Slack", new GenericType() { + }); + JSON.registerDescendants(ServiceDefinitionV2Contact.class, Collections.unmodifiableMap(schemas)); } - public ServiceDefinitionV2ContactDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return ServiceDefinitionV2Contact.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ServiceDefinitionV2Email, ServiceDefinitionV2Slack + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public ServiceDefinitionV2Contact 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 ServiceDefinitionV2Email - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceDefinitionV2Email.class.equals(Integer.class) - || ServiceDefinitionV2Email.class.equals(Long.class) - || ServiceDefinitionV2Email.class.equals(Float.class) - || ServiceDefinitionV2Email.class.equals(Double.class) - || ServiceDefinitionV2Email.class.equals(Boolean.class) - || ServiceDefinitionV2Email.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceDefinitionV2Email.class.equals(Integer.class) - || ServiceDefinitionV2Email.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceDefinitionV2Email.class.equals(Float.class) - || ServiceDefinitionV2Email.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceDefinitionV2Email.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceDefinitionV2Email.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ServiceDefinitionV2Email.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2Email.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 (!((ServiceDefinitionV2Email) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2Email'"); + if (JSON.isInstanceOf(ServiceDefinitionV2Slack.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2Email'", e); - } - // deserialize ServiceDefinitionV2Slack - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceDefinitionV2Slack.class.equals(Integer.class) - || ServiceDefinitionV2Slack.class.equals(Long.class) - || ServiceDefinitionV2Slack.class.equals(Float.class) - || ServiceDefinitionV2Slack.class.equals(Double.class) - || ServiceDefinitionV2Slack.class.equals(Boolean.class) - || ServiceDefinitionV2Slack.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceDefinitionV2Slack.class.equals(Integer.class) - || ServiceDefinitionV2Slack.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceDefinitionV2Slack.class.equals(Float.class) - || ServiceDefinitionV2Slack.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceDefinitionV2Slack.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceDefinitionV2Slack.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2Slack.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 (!((ServiceDefinitionV2Slack) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2Slack'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2Slack'", e); - } - - ServiceDefinitionV2Contact ret = new ServiceDefinitionV2Contact(); - 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; + throw new RuntimeException("Invalid instance type. Must be ServiceDefinitionV2Email, ServiceDefinitionV2Slack"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * ServiceDefinitionV2Email, ServiceDefinitionV2Slack + * + * @return The actual instance (ServiceDefinitionV2Email, ServiceDefinitionV2Slack) + */ @Override - public ServiceDefinitionV2Contact getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ServiceDefinitionV2Contact cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public ServiceDefinitionV2Contact() { - super("oneOf", Boolean.FALSE); - } - - public ServiceDefinitionV2Contact(ServiceDefinitionV2Email o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public ServiceDefinitionV2Contact(ServiceDefinitionV2Slack o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("ServiceDefinitionV2Email", new GenericType() {}); - schemas.put("ServiceDefinitionV2Slack", new GenericType() {}); - JSON.registerDescendants( - ServiceDefinitionV2Contact.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return ServiceDefinitionV2Contact.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: ServiceDefinitionV2Email, ServiceDefinitionV2Slack - * - *

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(ServiceDefinitionV2Email.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(ServiceDefinitionV2Slack.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `ServiceDefinitionV2Email`. If the actual instance is not `ServiceDefinitionV2Email`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceDefinitionV2Email` + * @throws ClassCastException if the instance is not `ServiceDefinitionV2Email` + */ + public ServiceDefinitionV2Email getServiceDefinitionV2Email() throws ClassCastException { + return (ServiceDefinitionV2Email)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `ServiceDefinitionV2Slack`. If the actual instance is not `ServiceDefinitionV2Slack`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceDefinitionV2Slack` + * @throws ClassCastException if the instance is not `ServiceDefinitionV2Slack` + */ + public ServiceDefinitionV2Slack getServiceDefinitionV2Slack() throws ClassCastException { + return (ServiceDefinitionV2Slack)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be ServiceDefinitionV2Email, ServiceDefinitionV2Slack"); - } - - /** - * Get the actual instance, which can be the following: ServiceDefinitionV2Email, - * ServiceDefinitionV2Slack - * - * @return The actual instance (ServiceDefinitionV2Email, ServiceDefinitionV2Slack) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `ServiceDefinitionV2Email`. If the actual instance is not - * `ServiceDefinitionV2Email`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceDefinitionV2Email` - * @throws ClassCastException if the instance is not `ServiceDefinitionV2Email` - */ - public ServiceDefinitionV2Email getServiceDefinitionV2Email() throws ClassCastException { - return (ServiceDefinitionV2Email) super.getActualInstance(); - } - - /** - * Get the actual instance of `ServiceDefinitionV2Slack`. If the actual instance is not - * `ServiceDefinitionV2Slack`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceDefinitionV2Slack` - * @throws ClassCastException if the instance is not `ServiceDefinitionV2Slack` - */ - public ServiceDefinitionV2Slack getServiceDefinitionV2Slack() throws ClassCastException { - return (ServiceDefinitionV2Slack) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Doc.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Doc.java index fee781cc0ec..22366cbdcb6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Doc.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Doc.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service documents. */ + +/** + *

Service documents.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Doc.JSON_PROPERTY_NAME, ServiceDefinitionV2Doc.JSON_PROPERTY_PROVIDER, ServiceDefinitionV2Doc.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Doc { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -36,74 +55,70 @@ public ServiceDefinitionV2Doc() {} @JsonCreator public ServiceDefinitionV2Doc( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.name = name; - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.name = name; + this.url = url; } - public ServiceDefinitionV2Doc name(String name) { this.name = name; return this; } /** - * Document name. - * + *

Document name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceDefinitionV2Doc provider(String provider) { this.provider = provider; return this; } /** - * Document provider. - * + *

Document provider.

* @return provider - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProvider() { - return provider; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } public void setProvider(String provider) { this.provider = provider; } - public ServiceDefinitionV2Doc url(String url) { this.url = url; return this; } /** - * Document URL. - * + *

Document URL.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this ServiceDefinitionV2Doc object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Doc object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,14 +128,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2Doc serviceDefinitionV2Doc = (ServiceDefinitionV2Doc) o; - return Objects.equals(this.name, serviceDefinitionV2Doc.name) - && Objects.equals(this.provider, serviceDefinitionV2Doc.provider) - && Objects.equals(this.url, serviceDefinitionV2Doc.url); + return Objects.equals(this.name, serviceDefinitionV2Doc.name) && Objects.equals(this.provider, serviceDefinitionV2Doc.provider) && Objects.equals(this.url, serviceDefinitionV2Doc.url); } + @Override public int hashCode() { - return Objects.hash(name, provider, url); + return Objects.hash(name,provider,url); } @Override @@ -135,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Email.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Email.java index cd2742bcdd2..a4c3b40d52c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Email.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Email.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service owner's email. */ + +/** + *

Service owner's email.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Email.JSON_PROPERTY_CONTACT, ServiceDefinitionV2Email.JSON_PROPERTY_NAME, ServiceDefinitionV2Email.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Email { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTACT = "contact"; private String contact; @@ -36,55 +55,49 @@ public ServiceDefinitionV2Email() {} @JsonCreator public ServiceDefinitionV2Email( - @JsonProperty(required = true, value = JSON_PROPERTY_CONTACT) String contact, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ServiceDefinitionV2EmailType type) { - this.contact = contact; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CONTACT)String contact, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ServiceDefinitionV2EmailType type) { + this.contact = contact; + this.type = type; + this.unparsed |= !type.isValid(); } - public ServiceDefinitionV2Email contact(String contact) { this.contact = contact; return this; } /** - * Contact value. - * + *

Contact value.

* @return contact - */ - @JsonProperty(JSON_PROPERTY_CONTACT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getContact() { - return contact; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getContact() { + return contact; + } public void setContact(String contact) { this.contact = contact; } - public ServiceDefinitionV2Email name(String name) { this.name = name; return this; } /** - * Contact email. - * + *

Contact email.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceDefinitionV2Email type(ServiceDefinitionV2EmailType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +105,25 @@ public ServiceDefinitionV2Email type(ServiceDefinitionV2EmailType type) { } /** - * Contact type. - * + *

Contact type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV2EmailType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV2EmailType getType() { + return type; + } public void setType(ServiceDefinitionV2EmailType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ServiceDefinitionV2Email object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Email object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +133,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2Email serviceDefinitionV2Email = (ServiceDefinitionV2Email) o; - return Objects.equals(this.contact, serviceDefinitionV2Email.contact) - && Objects.equals(this.name, serviceDefinitionV2Email.name) - && Objects.equals(this.type, serviceDefinitionV2Email.type); + return Objects.equals(this.contact, serviceDefinitionV2Email.contact) && Objects.equals(this.name, serviceDefinitionV2Email.name) && Objects.equals(this.type, serviceDefinitionV2Email.type); } + @Override public int hashCode() { - return Objects.hash(contact, name, type); + return Objects.hash(contact,name,type); } @Override @@ -141,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2EmailType.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2EmailType.java index 0aa46a1a1c8..506bdbaaa13 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2EmailType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2EmailType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Contact type. */ +/** + *

Contact type.

+ */ @JsonSerialize(using = ServiceDefinitionV2EmailType.ServiceDefinitionV2EmailTypeSerializer.class) public class ServiceDefinitionV2EmailType { - public static final ServiceDefinitionV2EmailType EMAIL = - new ServiceDefinitionV2EmailType("email"); + public static final ServiceDefinitionV2EmailType EMAIL = new ServiceDefinitionV2EmailType("email"); private static final Set allowedValues = new HashSet(Arrays.asList("email")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV2EmailTypeSerializer - extends StdSerializer { - public ServiceDefinitionV2EmailTypeSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV2EmailTypeSerializer extends StdSerializer { + public ServiceDefinitionV2EmailTypeSerializer(Class t) { + super(t); + } - public ServiceDefinitionV2EmailTypeSerializer() { - this(null); - } + public ServiceDefinitionV2EmailTypeSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV2EmailType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV2EmailType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV2EmailType object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2EmailType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Integrations.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Integrations.java index 5a6439929d2..2bac07be4af 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Integrations.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Integrations.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Third party integrations that Datadog supports. */ + +/** + *

Third party integrations that Datadog supports.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Integrations.JSON_PROPERTY_OPSGENIE, ServiceDefinitionV2Integrations.JSON_PROPERTY_PAGERDUTY }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Integrations { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_OPSGENIE = "opsgenie"; private ServiceDefinitionV2Opsgenie opsgenie; @@ -34,43 +54,42 @@ public ServiceDefinitionV2Integrations opsgenie(ServiceDefinitionV2Opsgenie opsg } /** - * Opsgenie integration for the service. - * + *

Opsgenie integration for the service.

* @return opsgenie - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPSGENIE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionV2Opsgenie getOpsgenie() { - return opsgenie; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPSGENIE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionV2Opsgenie getOpsgenie() { + return opsgenie; + } public void setOpsgenie(ServiceDefinitionV2Opsgenie opsgenie) { this.opsgenie = opsgenie; } - public ServiceDefinitionV2Integrations pagerduty(String pagerduty) { this.pagerduty = pagerduty; return this; } /** - * PagerDuty service URL for the service. - * + *

PagerDuty service URL for the service.

* @return pagerduty - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PAGERDUTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPagerduty() { - return pagerduty; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGERDUTY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPagerduty() { + return pagerduty; + } public void setPagerduty(String pagerduty) { this.pagerduty = pagerduty; } - /** Return true if this ServiceDefinitionV2Integrations object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Integrations object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,15 +98,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceDefinitionV2Integrations serviceDefinitionV2Integrations = - (ServiceDefinitionV2Integrations) o; - return Objects.equals(this.opsgenie, serviceDefinitionV2Integrations.opsgenie) - && Objects.equals(this.pagerduty, serviceDefinitionV2Integrations.pagerduty); + ServiceDefinitionV2Integrations serviceDefinitionV2Integrations = (ServiceDefinitionV2Integrations) o; + return Objects.equals(this.opsgenie, serviceDefinitionV2Integrations.opsgenie) && Objects.equals(this.pagerduty, serviceDefinitionV2Integrations.pagerduty); } + @Override public int hashCode() { - return Objects.hash(opsgenie, pagerduty); + return Objects.hash(opsgenie,pagerduty); } @Override @@ -101,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Link.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Link.java index cd7c4c86a2e..afc39feea53 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Link.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Link.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service's external links. */ + +/** + *

Service's external links.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Link.JSON_PROPERTY_NAME, ServiceDefinitionV2Link.JSON_PROPERTY_TYPE, ServiceDefinitionV2Link.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Link { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -36,35 +55,32 @@ public ServiceDefinitionV2Link() {} @JsonCreator public ServiceDefinitionV2Link( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ServiceDefinitionV2LinkType type, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.name = name; - this.type = type; - this.unparsed |= !type.isValid(); - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ServiceDefinitionV2LinkType type, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); + this.url = url; } - public ServiceDefinitionV2Link name(String name) { this.name = name; return this; } /** - * Link name. - * + *

Link name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceDefinitionV2Link type(ServiceDefinitionV2LinkType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -72,44 +88,43 @@ public ServiceDefinitionV2Link type(ServiceDefinitionV2LinkType type) { } /** - * Link type. - * + *

Link type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV2LinkType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV2LinkType getType() { + return type; + } public void setType(ServiceDefinitionV2LinkType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - public ServiceDefinitionV2Link url(String url) { this.url = url; return this; } /** - * Link URL. - * + *

Link URL.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this ServiceDefinitionV2Link object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Link object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +134,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2Link serviceDefinitionV2Link = (ServiceDefinitionV2Link) o; - return Objects.equals(this.name, serviceDefinitionV2Link.name) - && Objects.equals(this.type, serviceDefinitionV2Link.type) - && Objects.equals(this.url, serviceDefinitionV2Link.url); + return Objects.equals(this.name, serviceDefinitionV2Link.name) && Objects.equals(this.type, serviceDefinitionV2Link.type) && Objects.equals(this.url, serviceDefinitionV2Link.url); } + @Override public int hashCode() { - return Objects.hash(name, type, url); + return Objects.hash(name,type,url); } @Override @@ -141,7 +155,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2LinkType.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2LinkType.java index 628c056fb97..4140b1baa14 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2LinkType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2LinkType.java @@ -6,40 +6,58 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Link type. */ +/** + *

Link type.

+ */ @JsonSerialize(using = ServiceDefinitionV2LinkType.ServiceDefinitionV2LinkTypeSerializer.class) public class ServiceDefinitionV2LinkType { public static final ServiceDefinitionV2LinkType DOC = new ServiceDefinitionV2LinkType("doc"); public static final ServiceDefinitionV2LinkType WIKI = new ServiceDefinitionV2LinkType("wiki"); - public static final ServiceDefinitionV2LinkType RUNBOOK = - new ServiceDefinitionV2LinkType("runbook"); + public static final ServiceDefinitionV2LinkType RUNBOOK = new ServiceDefinitionV2LinkType("runbook"); public static final ServiceDefinitionV2LinkType URL = new ServiceDefinitionV2LinkType("url"); public static final ServiceDefinitionV2LinkType REPO = new ServiceDefinitionV2LinkType("repo"); - public static final ServiceDefinitionV2LinkType DASHBOARD = - new ServiceDefinitionV2LinkType("dashboard"); - public static final ServiceDefinitionV2LinkType ONCALL = - new ServiceDefinitionV2LinkType("oncall"); + public static final ServiceDefinitionV2LinkType DASHBOARD = new ServiceDefinitionV2LinkType("dashboard"); + public static final ServiceDefinitionV2LinkType ONCALL = new ServiceDefinitionV2LinkType("oncall"); public static final ServiceDefinitionV2LinkType CODE = new ServiceDefinitionV2LinkType("code"); public static final ServiceDefinitionV2LinkType LINK = new ServiceDefinitionV2LinkType("link"); - private static final Set allowedValues = - new HashSet( - Arrays.asList( - "doc", "wiki", "runbook", "url", "repo", "dashboard", "oncall", "code", "link")); + private static final Set allowedValues = new HashSet(Arrays.asList("doc", "wiki", "runbook", "url", "repo", "dashboard", "oncall", "code", "link")); private String value; @@ -51,22 +69,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV2LinkTypeSerializer - extends StdSerializer { - public ServiceDefinitionV2LinkTypeSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV2LinkTypeSerializer extends StdSerializer { + public ServiceDefinitionV2LinkTypeSerializer(Class t) { + super(t); + } - public ServiceDefinitionV2LinkTypeSerializer() { - this(null); - } + public ServiceDefinitionV2LinkTypeSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV2LinkType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV2LinkType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -78,7 +93,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV2LinkType object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2LinkType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,7 +109,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Opsgenie.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Opsgenie.java index b640ed10ec4..66b50ac0ffd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Opsgenie.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Opsgenie.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Opsgenie integration for the service. */ + +/** + *

Opsgenie integration for the service.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Opsgenie.JSON_PROPERTY_REGION, ServiceDefinitionV2Opsgenie.JSON_PROPERTY_SERVICE_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Opsgenie { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_REGION = "region"; private ServiceDefinitionV2OpsgenieRegion region; @@ -32,10 +51,9 @@ public ServiceDefinitionV2Opsgenie() {} @JsonCreator public ServiceDefinitionV2Opsgenie( - @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_URL) String serviceUrl) { - this.serviceUrl = serviceUrl; + @JsonProperty(required=true, value=JSON_PROPERTY_SERVICE_URL)String serviceUrl) { + this.serviceUrl = serviceUrl; } - public ServiceDefinitionV2Opsgenie region(ServiceDefinitionV2OpsgenieRegion region) { this.region = region; this.unparsed |= !region.isValid(); @@ -43,45 +61,44 @@ public ServiceDefinitionV2Opsgenie region(ServiceDefinitionV2OpsgenieRegion regi } /** - * Opsgenie instance region. - * + *

Opsgenie instance region.

* @return region - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_REGION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ServiceDefinitionV2OpsgenieRegion getRegion() { - return region; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ServiceDefinitionV2OpsgenieRegion getRegion() { + return region; + } public void setRegion(ServiceDefinitionV2OpsgenieRegion region) { if (!region.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.region = region; } - public ServiceDefinitionV2Opsgenie serviceUrl(String serviceUrl) { this.serviceUrl = serviceUrl; return this; } /** - * Opsgenie service url. - * + *

Opsgenie service url.

* @return serviceUrl - */ - @JsonProperty(JSON_PROPERTY_SERVICE_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getServiceUrl() { - return serviceUrl; - } - + **/ + @JsonProperty(JSON_PROPERTY_SERVICE_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getServiceUrl() { + return serviceUrl; + } public void setServiceUrl(String serviceUrl) { this.serviceUrl = serviceUrl; } - /** Return true if this ServiceDefinitionV2Opsgenie object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Opsgenie object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +108,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2Opsgenie serviceDefinitionV2Opsgenie = (ServiceDefinitionV2Opsgenie) o; - return Objects.equals(this.region, serviceDefinitionV2Opsgenie.region) - && Objects.equals(this.serviceUrl, serviceDefinitionV2Opsgenie.serviceUrl); + return Objects.equals(this.region, serviceDefinitionV2Opsgenie.region) && Objects.equals(this.serviceUrl, serviceDefinitionV2Opsgenie.serviceUrl); } + @Override public int hashCode() { - return Objects.hash(region, serviceUrl); + return Objects.hash(region,serviceUrl); } @Override @@ -111,7 +128,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2OpsgenieRegion.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2OpsgenieRegion.java index 780349899d4..bbaf4b61ca5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2OpsgenieRegion.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2OpsgenieRegion.java @@ -6,28 +6,49 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Opsgenie instance region. */ -@JsonSerialize( - using = ServiceDefinitionV2OpsgenieRegion.ServiceDefinitionV2OpsgenieRegionSerializer.class) +/** + *

Opsgenie instance region.

+ */ +@JsonSerialize(using = ServiceDefinitionV2OpsgenieRegion.ServiceDefinitionV2OpsgenieRegionSerializer.class) public class ServiceDefinitionV2OpsgenieRegion { - public static final ServiceDefinitionV2OpsgenieRegion US = - new ServiceDefinitionV2OpsgenieRegion("US"); - public static final ServiceDefinitionV2OpsgenieRegion EU = - new ServiceDefinitionV2OpsgenieRegion("EU"); + public static final ServiceDefinitionV2OpsgenieRegion US = new ServiceDefinitionV2OpsgenieRegion("US"); + public static final ServiceDefinitionV2OpsgenieRegion EU = new ServiceDefinitionV2OpsgenieRegion("EU"); private static final Set allowedValues = new HashSet(Arrays.asList("US", "EU")); @@ -41,22 +62,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV2OpsgenieRegionSerializer - extends StdSerializer { - public ServiceDefinitionV2OpsgenieRegionSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV2OpsgenieRegionSerializer extends StdSerializer { + public ServiceDefinitionV2OpsgenieRegionSerializer(Class t) { + super(t); + } - public ServiceDefinitionV2OpsgenieRegionSerializer() { - this(null); - } + public ServiceDefinitionV2OpsgenieRegionSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV2OpsgenieRegion value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV2OpsgenieRegion value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -68,7 +86,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV2OpsgenieRegion object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2OpsgenieRegion object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,7 +102,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Repo.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Repo.java index aa8224699f3..b3c33376ded 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Repo.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Repo.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service code repositories. */ + +/** + *

Service code repositories.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Repo.JSON_PROPERTY_NAME, ServiceDefinitionV2Repo.JSON_PROPERTY_PROVIDER, ServiceDefinitionV2Repo.JSON_PROPERTY_URL }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Repo { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -36,74 +55,70 @@ public ServiceDefinitionV2Repo() {} @JsonCreator public ServiceDefinitionV2Repo( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, - @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { - this.name = name; - this.url = url; + @JsonProperty(required=true, value=JSON_PROPERTY_NAME)String name, + @JsonProperty(required=true, value=JSON_PROPERTY_URL)String url) { + this.name = name; + this.url = url; } - public ServiceDefinitionV2Repo name(String name) { this.name = name; return this; } /** - * Repository name. - * + *

Repository name.

* @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - + **/ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceDefinitionV2Repo provider(String provider) { this.provider = provider; return this; } /** - * Repository provider. - * + *

Repository provider.

* @return provider - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROVIDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProvider() { - return provider; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } public void setProvider(String provider) { this.provider = provider; } - public ServiceDefinitionV2Repo url(String url) { this.url = url; return this; } /** - * Repository URL. - * + *

Repository URL.

* @return url - */ - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUrl() { - return url; - } - + **/ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } public void setUrl(String url) { this.url = url; } - /** Return true if this ServiceDefinitionV2Repo object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Repo object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -113,14 +128,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2Repo serviceDefinitionV2Repo = (ServiceDefinitionV2Repo) o; - return Objects.equals(this.name, serviceDefinitionV2Repo.name) - && Objects.equals(this.provider, serviceDefinitionV2Repo.provider) - && Objects.equals(this.url, serviceDefinitionV2Repo.url); + return Objects.equals(this.name, serviceDefinitionV2Repo.name) && Objects.equals(this.provider, serviceDefinitionV2Repo.provider) && Objects.equals(this.url, serviceDefinitionV2Repo.url); } + @Override public int hashCode() { - return Objects.hash(name, provider, url); + return Objects.hash(name,provider,url); } @Override @@ -135,7 +149,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Slack.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Slack.java index e40820abd4a..e7b8dc48fa9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Slack.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Slack.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Service owner's Slack channel. */ + +/** + *

Service owner's Slack channel.

+ */ @JsonPropertyOrder({ ServiceDefinitionV2Slack.JSON_PROPERTY_CONTACT, ServiceDefinitionV2Slack.JSON_PROPERTY_NAME, ServiceDefinitionV2Slack.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionV2Slack { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CONTACT = "contact"; private String contact; @@ -36,55 +55,49 @@ public ServiceDefinitionV2Slack() {} @JsonCreator public ServiceDefinitionV2Slack( - @JsonProperty(required = true, value = JSON_PROPERTY_CONTACT) String contact, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ServiceDefinitionV2SlackType type) { - this.contact = contact; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_CONTACT)String contact, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)ServiceDefinitionV2SlackType type) { + this.contact = contact; + this.type = type; + this.unparsed |= !type.isValid(); } - public ServiceDefinitionV2Slack contact(String contact) { this.contact = contact; return this; } /** - * Slack Channel. - * + *

Slack Channel.

* @return contact - */ - @JsonProperty(JSON_PROPERTY_CONTACT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getContact() { - return contact; - } - + **/ + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getContact() { + return contact; + } public void setContact(String contact) { this.contact = contact; } - public ServiceDefinitionV2Slack name(String name) { this.name = name; return this; } /** - * Contact Slack. - * + *

Contact Slack.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public ServiceDefinitionV2Slack type(ServiceDefinitionV2SlackType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -92,24 +105,25 @@ public ServiceDefinitionV2Slack type(ServiceDefinitionV2SlackType type) { } /** - * Contact type. - * + *

Contact type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ServiceDefinitionV2SlackType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public ServiceDefinitionV2SlackType getType() { + return type; + } public void setType(ServiceDefinitionV2SlackType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this ServiceDefinitionV2Slack object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Slack object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -119,14 +133,13 @@ public boolean equals(Object o) { return false; } ServiceDefinitionV2Slack serviceDefinitionV2Slack = (ServiceDefinitionV2Slack) o; - return Objects.equals(this.contact, serviceDefinitionV2Slack.contact) - && Objects.equals(this.name, serviceDefinitionV2Slack.name) - && Objects.equals(this.type, serviceDefinitionV2Slack.type); + return Objects.equals(this.contact, serviceDefinitionV2Slack.contact) && Objects.equals(this.name, serviceDefinitionV2Slack.name) && Objects.equals(this.type, serviceDefinitionV2Slack.type); } + @Override public int hashCode() { - return Objects.hash(contact, name, type); + return Objects.hash(contact,name,type); } @Override @@ -141,7 +154,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2SlackType.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2SlackType.java index 7bd75dbd7e3..f5eecbf03be 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2SlackType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2SlackType.java @@ -6,25 +6,48 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Contact type. */ +/** + *

Contact type.

+ */ @JsonSerialize(using = ServiceDefinitionV2SlackType.ServiceDefinitionV2SlackTypeSerializer.class) public class ServiceDefinitionV2SlackType { - public static final ServiceDefinitionV2SlackType SLACK = - new ServiceDefinitionV2SlackType("slack"); + public static final ServiceDefinitionV2SlackType SLACK = new ServiceDefinitionV2SlackType("slack"); private static final Set allowedValues = new HashSet(Arrays.asList("slack")); @@ -38,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV2SlackTypeSerializer - extends StdSerializer { - public ServiceDefinitionV2SlackTypeSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV2SlackTypeSerializer extends StdSerializer { + public ServiceDefinitionV2SlackTypeSerializer(Class t) { + super(t); + } - public ServiceDefinitionV2SlackTypeSerializer() { - this(null); - } + public ServiceDefinitionV2SlackTypeSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV2SlackType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV2SlackType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV2SlackType object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2SlackType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Version.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Version.java index 2230de0c973..5b759e31c91 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Version.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionV2Version.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Schema version being used. */ +/** + *

Schema version being used.

+ */ @JsonSerialize(using = ServiceDefinitionV2Version.ServiceDefinitionV2VersionSerializer.class) public class ServiceDefinitionV2Version { @@ -37,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class ServiceDefinitionV2VersionSerializer - extends StdSerializer { - public ServiceDefinitionV2VersionSerializer(Class t) { - super(t); - } + public static class ServiceDefinitionV2VersionSerializer extends StdSerializer { + public ServiceDefinitionV2VersionSerializer(Class t) { + super(t); + } - public ServiceDefinitionV2VersionSerializer() { - this(null); - } + public ServiceDefinitionV2VersionSerializer() { + this(null); + } - @Override - public void serialize( - ServiceDefinitionV2Version value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(ServiceDefinitionV2Version value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -64,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this ServiceDefinitionV2Version object is equal to o. */ + /** + * Return true if this ServiceDefinitionV2Version object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -78,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsCreateRequest.java index 362823e478b..772573d2632 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsCreateRequest.java @@ -6,274 +6,260 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize( - using = ServiceDefinitionsCreateRequest.ServiceDefinitionsCreateRequestDeserializer.class) -@JsonSerialize( - using = ServiceDefinitionsCreateRequest.ServiceDefinitionsCreateRequestSerializer.class) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = ServiceDefinitionsCreateRequest.ServiceDefinitionsCreateRequestDeserializer.class) +@JsonSerialize(using = ServiceDefinitionsCreateRequest.ServiceDefinitionsCreateRequestSerializer.class) public class ServiceDefinitionsCreateRequest extends AbstractOpenApiSchema { - private static final Logger log = - Logger.getLogger(ServiceDefinitionsCreateRequest.class.getName()); + private static final Logger log = Logger.getLogger(ServiceDefinitionsCreateRequest.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class ServiceDefinitionsCreateRequestSerializer extends StdSerializer { + public ServiceDefinitionsCreateRequestSerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public ServiceDefinitionsCreateRequestSerializer() { + this(null); + } - public static class ServiceDefinitionsCreateRequestSerializer - extends StdSerializer { - public ServiceDefinitionsCreateRequestSerializer(Class t) { - super(t); + @Override + public void serialize(ServiceDefinitionsCreateRequest value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public ServiceDefinitionsCreateRequestSerializer() { - this(null); + public static class ServiceDefinitionsCreateRequestDeserializer extends StdDeserializer { + public ServiceDefinitionsCreateRequestDeserializer() { + this(ServiceDefinitionsCreateRequest.class); + } + + public ServiceDefinitionsCreateRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public ServiceDefinitionsCreateRequest 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 ServiceDefinitionV2 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ServiceDefinitionV2.class.equals(Integer.class) || ServiceDefinitionV2.class.equals(Long.class) || ServiceDefinitionV2.class.equals(Float.class) || ServiceDefinitionV2.class.equals(Double.class) || ServiceDefinitionV2.class.equals(Boolean.class) || ServiceDefinitionV2.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ServiceDefinitionV2.class.equals(Integer.class) || ServiceDefinitionV2.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ServiceDefinitionV2.class.equals(Float.class) || ServiceDefinitionV2.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (ServiceDefinitionV2.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ServiceDefinitionV2.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2.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 (!((ServiceDefinitionV2)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2'", e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) || String.class.equals(Long.class) || String.class.equals(Float.class) || String.class.equals(Double.class) || String.class.equals(Boolean.class) || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((String.class.equals(Integer.class) || String.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((String.class.equals(Float.class) || String.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (String.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + ServiceDefinitionsCreateRequest ret = new ServiceDefinitionsCreateRequest(); + 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 ServiceDefinitionsCreateRequest getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "ServiceDefinitionsCreateRequest cannot be null"); + } } - @Override - public void serialize( - ServiceDefinitionsCreateRequest value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ServiceDefinitionsCreateRequest() { + super("oneOf", Boolean.FALSE); + } + public ServiceDefinitionsCreateRequest(ServiceDefinitionV2 o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ServiceDefinitionsCreateRequest(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class ServiceDefinitionsCreateRequestDeserializer - extends StdDeserializer { - public ServiceDefinitionsCreateRequestDeserializer() { - this(ServiceDefinitionsCreateRequest.class); + static { + schemas.put("ServiceDefinitionV2", new GenericType() { + }); + schemas.put("String", new GenericType() { + }); + JSON.registerDescendants(ServiceDefinitionsCreateRequest.class, Collections.unmodifiableMap(schemas)); } - public ServiceDefinitionsCreateRequestDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return ServiceDefinitionsCreateRequest.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ServiceDefinitionV2, String + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public ServiceDefinitionsCreateRequest 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 ServiceDefinitionV2 - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (ServiceDefinitionV2.class.equals(Integer.class) - || ServiceDefinitionV2.class.equals(Long.class) - || ServiceDefinitionV2.class.equals(Float.class) - || ServiceDefinitionV2.class.equals(Double.class) - || ServiceDefinitionV2.class.equals(Boolean.class) - || ServiceDefinitionV2.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((ServiceDefinitionV2.class.equals(Integer.class) - || ServiceDefinitionV2.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((ServiceDefinitionV2.class.equals(Float.class) - || ServiceDefinitionV2.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (ServiceDefinitionV2.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (ServiceDefinitionV2.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ServiceDefinitionV2.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(ServiceDefinitionV2.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 (!((ServiceDefinitionV2) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'ServiceDefinitionV2'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'ServiceDefinitionV2'", e); - } - - // deserialize String - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (String.class.equals(Integer.class) - || String.class.equals(Long.class) - || String.class.equals(Float.class) - || String.class.equals(Double.class) - || String.class.equals(Boolean.class) - || String.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((String.class.equals(Integer.class) || String.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((String.class.equals(Float.class) || String.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (String.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(String.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. - deserialized = tmp; - match++; - log.log(Level.FINER, "Input data matches schema 'String'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'String'", e); - } - - ServiceDefinitionsCreateRequest ret = new ServiceDefinitionsCreateRequest(); - 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; + throw new RuntimeException("Invalid instance type. Must be ServiceDefinitionV2, String"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * ServiceDefinitionV2, String + * + * @return The actual instance (ServiceDefinitionV2, String) + */ @Override - public ServiceDefinitionsCreateRequest getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "ServiceDefinitionsCreateRequest cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public ServiceDefinitionsCreateRequest() { - super("oneOf", Boolean.FALSE); - } - - public ServiceDefinitionsCreateRequest(ServiceDefinitionV2 o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public ServiceDefinitionsCreateRequest(String o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("ServiceDefinitionV2", new GenericType() {}); - schemas.put("String", new GenericType() {}); - JSON.registerDescendants( - ServiceDefinitionsCreateRequest.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return ServiceDefinitionsCreateRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: ServiceDefinitionV2, String - * - *

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(ServiceDefinitionV2.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `ServiceDefinitionV2`. If the actual instance is not `ServiceDefinitionV2`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ServiceDefinitionV2` + * @throws ClassCastException if the instance is not `ServiceDefinitionV2` + */ + public ServiceDefinitionV2 getServiceDefinitionV2() throws ClassCastException { + return (ServiceDefinitionV2)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `String`. If the actual instance is not `String`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be ServiceDefinitionV2, String"); - } - - /** - * Get the actual instance, which can be the following: ServiceDefinitionV2, String - * - * @return The actual instance (ServiceDefinitionV2, String) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `ServiceDefinitionV2`. If the actual instance is not - * `ServiceDefinitionV2`, the ClassCastException will be thrown. - * - * @return The actual instance of `ServiceDefinitionV2` - * @throws ClassCastException if the instance is not `ServiceDefinitionV2` - */ - public ServiceDefinitionV2 getServiceDefinitionV2() throws ClassCastException { - return (ServiceDefinitionV2) super.getActualInstance(); - } - - /** - * Get the actual instance of `String`. If the actual instance is not `String`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `String` - * @throws ClassCastException if the instance is not `String` - */ - public String getString() throws ClassCastException { - return (String) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsListResponse.java index a2f2be6f19a..ac6d550f201 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceDefinitionsListResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Create service definitions response. */ -@JsonPropertyOrder({ServiceDefinitionsListResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Create service definitions response.

+ */ +@JsonPropertyOrder({ + ServiceDefinitionsListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ServiceDefinitionsListResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public ServiceDefinitionsListResponse data(List data) { } return this; } - public ServiceDefinitionsListResponse addDataItem(ServiceDefinitionData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public ServiceDefinitionsListResponse addDataItem(ServiceDefinitionData dataItem } /** - * Data representing service definitions. - * + *

Data representing service definitions.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this ServiceDefinitionsListResponse object is equal to o. */ + /** + * Return true if this ServiceDefinitionsListResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceDefinitionsListResponse serviceDefinitionsListResponse = - (ServiceDefinitionsListResponse) o; + ServiceDefinitionsListResponse serviceDefinitionsListResponse = (ServiceDefinitionsListResponse) o; return Objects.equals(this.data, serviceDefinitionsListResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/SlackIntegrationMetadata.java b/src/main/java/com/datadog/api/client/v2/model/SlackIntegrationMetadata.java new file mode 100644 index 00000000000..1fc3a4c0ff1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SlackIntegrationMetadata.java @@ -0,0 +1,120 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Incident integration metadata for the Slack integration.

+ */ +@JsonPropertyOrder({ + SlackIntegrationMetadata.JSON_PROPERTY_CHANNELS +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SlackIntegrationMetadata { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_CHANNELS = "channels"; + private List channels = new ArrayList<>(); + + public SlackIntegrationMetadata() {} + + @JsonCreator + public SlackIntegrationMetadata( + @JsonProperty(required=true, value=JSON_PROPERTY_CHANNELS)List channels) { + this.channels = channels; + } + public SlackIntegrationMetadata channels(List channels) { + this.channels = channels; + for (SlackIntegrationMetadataChannelItem item : channels) { + this.unparsed |= item.unparsed; + } + return this; + } + public SlackIntegrationMetadata addChannelsItem(SlackIntegrationMetadataChannelItem channelsItem) { + this.channels.add(channelsItem); + this.unparsed |= channelsItem.unparsed; + return this; + } + + /** + *

Array of Slack channels in this integration metadata.

+ * @return channels + **/ + @JsonProperty(JSON_PROPERTY_CHANNELS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getChannels() { + return channels; + } + public void setChannels(List channels) { + this.channels = channels; + } + + /** + * Return true if this SlackIntegrationMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SlackIntegrationMetadata slackIntegrationMetadata = (SlackIntegrationMetadata) o; + return Objects.equals(this.channels, slackIntegrationMetadata.channels); + } + + + @Override + public int hashCode() { + return Objects.hash(channels); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SlackIntegrationMetadata {\n"); + sb.append(" channels: ").append(toIndentedString(channels)).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/SlackIntegrationMetadataChannelItem.java b/src/main/java/com/datadog/api/client/v2/model/SlackIntegrationMetadataChannelItem.java new file mode 100644 index 00000000000..bd7308154d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SlackIntegrationMetadataChannelItem.java @@ -0,0 +1,186 @@ +/* + * 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Item in the Slack integration metadata channel array.

+ */ +@JsonPropertyOrder({ + SlackIntegrationMetadataChannelItem.JSON_PROPERTY_CHANNEL_ID, + SlackIntegrationMetadataChannelItem.JSON_PROPERTY_CHANNEL_NAME, + SlackIntegrationMetadataChannelItem.JSON_PROPERTY_REDIRECT_URL, + SlackIntegrationMetadataChannelItem.JSON_PROPERTY_TEAM_ID +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SlackIntegrationMetadataChannelItem { + @JsonIgnore + public boolean unparsed = false; + public static final String JSON_PROPERTY_CHANNEL_ID = "channel_id"; + private String channelId; + + public static final String JSON_PROPERTY_CHANNEL_NAME = "channel_name"; + private String channelName; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirect_url"; + private String redirectUrl; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private String teamId; + + public SlackIntegrationMetadataChannelItem() {} + + @JsonCreator + public SlackIntegrationMetadataChannelItem( + @JsonProperty(required=true, value=JSON_PROPERTY_CHANNEL_ID)String channelId, + @JsonProperty(required=true, value=JSON_PROPERTY_CHANNEL_NAME)String channelName, + @JsonProperty(required=true, value=JSON_PROPERTY_REDIRECT_URL)String redirectUrl) { + this.channelId = channelId; + this.channelName = channelName; + this.redirectUrl = redirectUrl; + } + public SlackIntegrationMetadataChannelItem channelId(String channelId) { + this.channelId = channelId; + return this; + } + + /** + *

Slack channel ID.

+ * @return channelId + **/ + @JsonProperty(JSON_PROPERTY_CHANNEL_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getChannelId() { + return channelId; + } + public void setChannelId(String channelId) { + this.channelId = channelId; + } + public SlackIntegrationMetadataChannelItem channelName(String channelName) { + this.channelName = channelName; + return this; + } + + /** + *

Name of the Slack channel.

+ * @return channelName + **/ + @JsonProperty(JSON_PROPERTY_CHANNEL_NAME) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getChannelName() { + return channelName; + } + public void setChannelName(String channelName) { + this.channelName = channelName; + } + public SlackIntegrationMetadataChannelItem redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + *

URL redirecting to the Slack channel.

+ * @return redirectUrl + **/ + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getRedirectUrl() { + return redirectUrl; + } + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + public SlackIntegrationMetadataChannelItem teamId(String teamId) { + this.teamId = teamId; + return this; + } + + /** + *

Slack team ID.

+ * @return teamId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTeamId() { + return teamId; + } + public void setTeamId(String teamId) { + this.teamId = teamId; + } + + /** + * Return true if this SlackIntegrationMetadataChannelItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SlackIntegrationMetadataChannelItem slackIntegrationMetadataChannelItem = (SlackIntegrationMetadataChannelItem) o; + return Objects.equals(this.channelId, slackIntegrationMetadataChannelItem.channelId) && Objects.equals(this.channelName, slackIntegrationMetadataChannelItem.channelName) && Objects.equals(this.redirectUrl, slackIntegrationMetadataChannelItem.redirectUrl) && Objects.equals(this.teamId, slackIntegrationMetadataChannelItem.teamId); + } + + + @Override + public int hashCode() { + return Objects.hash(channelId,channelName,redirectUrl,teamId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SlackIntegrationMetadataChannelItem {\n"); + sb.append(" channelId: ").append(toIndentedString(channelId)).append("\n"); + sb.append(" channelName: ").append(toIndentedString(channelName)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).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/TimeseriesFormulaQueryRequest.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryRequest.java index 8a1fdde6977..86e686a53d4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A request wrapper around a single timeseries query to be executed. */ -@JsonPropertyOrder({TimeseriesFormulaQueryRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

A request wrapper around a single timeseries query to be executed.

+ */ +@JsonPropertyOrder({ + TimeseriesFormulaQueryRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesFormulaQueryRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private TimeseriesFormulaRequest data; @@ -26,11 +47,10 @@ public TimeseriesFormulaQueryRequest() {} @JsonCreator public TimeseriesFormulaQueryRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TimeseriesFormulaRequest data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)TimeseriesFormulaRequest data) { + this.data = data; + this.unparsed |= data.unparsed; } - public TimeseriesFormulaQueryRequest data(TimeseriesFormulaRequest data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public TimeseriesFormulaQueryRequest data(TimeseriesFormulaRequest data) { } /** - * A single timeseries query to be executed. - * + *

A single timeseries query to be executed.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TimeseriesFormulaRequest getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TimeseriesFormulaRequest getData() { + return data; + } public void setData(TimeseriesFormulaRequest data) { this.data = data; } - /** Return true if this TimeseriesFormulaQueryRequest object is equal to o. */ + /** + * Return true if this TimeseriesFormulaQueryRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, timeseriesFormulaQueryRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryResponse.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryResponse.java index 48181256e82..78438b46fda 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaQueryResponse.java @@ -6,24 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + /** - * A message containing one response to a timeseries query made with timeseries formula query - * request. + *

A message containing one response to a timeseries query made with timeseries formula query request.

*/ @JsonPropertyOrder({ TimeseriesFormulaQueryResponse.JSON_PROPERTY_DATA, TimeseriesFormulaQueryResponse.JSON_PROPERTY_ERRORS }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesFormulaQueryResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private TimeseriesResponse data; @@ -37,43 +54,42 @@ public TimeseriesFormulaQueryResponse data(TimeseriesResponse data) { } /** - * A message containing the response to a timeseries query. - * + *

A message containing the response to a timeseries query.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeseriesResponse getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TimeseriesResponse getData() { + return data; + } public void setData(TimeseriesResponse data) { this.data = data; } - public TimeseriesFormulaQueryResponse errors(String errors) { this.errors = errors; return this; } /** - * The error generated by the request. - * + *

The error generated by the request.

* @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getErrors() { - return errors; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getErrors() { + return errors; + } public void setErrors(String errors) { this.errors = errors; } - /** Return true if this TimeseriesFormulaQueryResponse object is equal to o. */ + /** + * Return true if this TimeseriesFormulaQueryResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -82,15 +98,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TimeseriesFormulaQueryResponse timeseriesFormulaQueryResponse = - (TimeseriesFormulaQueryResponse) o; - return Objects.equals(this.data, timeseriesFormulaQueryResponse.data) - && Objects.equals(this.errors, timeseriesFormulaQueryResponse.errors); + TimeseriesFormulaQueryResponse timeseriesFormulaQueryResponse = (TimeseriesFormulaQueryResponse) o; + return Objects.equals(this.data, timeseriesFormulaQueryResponse.data) && Objects.equals(this.errors, timeseriesFormulaQueryResponse.errors); } + @Override public int hashCode() { - return Objects.hash(data, errors); + return Objects.hash(data,errors); } @Override @@ -104,7 +119,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequest.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequest.java index d31185afc32..111b5975288 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequest.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A single timeseries query to be executed. */ + +/** + *

A single timeseries query to be executed.

+ */ @JsonPropertyOrder({ TimeseriesFormulaRequest.JSON_PROPERTY_ATTRIBUTES, TimeseriesFormulaRequest.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesFormulaRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private TimeseriesFormulaRequestAttributes attributes; @@ -32,16 +51,13 @@ public TimeseriesFormulaRequest() {} @JsonCreator public TimeseriesFormulaRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - TimeseriesFormulaRequestAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - TimeseriesFormulaRequestType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)TimeseriesFormulaRequestAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)TimeseriesFormulaRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public TimeseriesFormulaRequest attributes(TimeseriesFormulaRequestAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -49,20 +65,18 @@ public TimeseriesFormulaRequest attributes(TimeseriesFormulaRequestAttributes at } /** - * The object describing a timeseries formula request. - * + *

The object describing a timeseries formula request.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TimeseriesFormulaRequestAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TimeseriesFormulaRequestAttributes getAttributes() { + return attributes; + } public void setAttributes(TimeseriesFormulaRequestAttributes attributes) { this.attributes = attributes; } - public TimeseriesFormulaRequest type(TimeseriesFormulaRequestType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -70,24 +84,25 @@ public TimeseriesFormulaRequest type(TimeseriesFormulaRequestType type) { } /** - * The type of the resource. The value should always be timeseries_request. - * + *

The type of the resource. The value should always be timeseries_request.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TimeseriesFormulaRequestType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public TimeseriesFormulaRequestType getType() { + return type; + } public void setType(TimeseriesFormulaRequestType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this TimeseriesFormulaRequest object is equal to o. */ + /** + * Return true if this TimeseriesFormulaRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,13 +112,13 @@ public boolean equals(Object o) { return false; } TimeseriesFormulaRequest timeseriesFormulaRequest = (TimeseriesFormulaRequest) o; - return Objects.equals(this.attributes, timeseriesFormulaRequest.attributes) - && Objects.equals(this.type, timeseriesFormulaRequest.type); + return Objects.equals(this.attributes, timeseriesFormulaRequest.attributes) && Objects.equals(this.type, timeseriesFormulaRequest.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -117,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestAttributes.java index f72a9f07839..bb100d4a5d1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestAttributes.java @@ -6,16 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** The object describing a timeseries formula request. */ + +/** + *

The object describing a timeseries formula request.

+ */ @JsonPropertyOrder({ TimeseriesFormulaRequestAttributes.JSON_PROPERTY_FORMULAS, TimeseriesFormulaRequestAttributes.JSON_PROPERTY_FROM, @@ -23,10 +40,10 @@ TimeseriesFormulaRequestAttributes.JSON_PROPERTY_QUERIES, TimeseriesFormulaRequestAttributes.JSON_PROPERTY_TO }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesFormulaRequestAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -46,14 +63,13 @@ public TimeseriesFormulaRequestAttributes() {} @JsonCreator public TimeseriesFormulaRequestAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, - @JsonProperty(required = true, value = JSON_PROPERTY_QUERIES) List queries, - @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { - this.from = from; - this.queries = queries; - this.to = to; + @JsonProperty(required=true, value=JSON_PROPERTY_FROM)Long from, + @JsonProperty(required=true, value=JSON_PROPERTY_QUERIES)List queries, + @JsonProperty(required=true, value=JSON_PROPERTY_TO)Long to) { + this.from = from; + this.queries = queries; + this.to = to; } - public TimeseriesFormulaRequestAttributes formulas(List formulas) { this.formulas = formulas; for (QueryFormula item : formulas) { @@ -61,7 +77,6 @@ public TimeseriesFormulaRequestAttributes formulas(List formulas) } return this; } - public TimeseriesFormulaRequestAttributes addFormulasItem(QueryFormula formulasItem) { if (this.formulas == null) { this.formulas = new ArrayList<>(); @@ -72,64 +87,59 @@ public TimeseriesFormulaRequestAttributes addFormulasItem(QueryFormula formulasI } /** - * List of formulas to be calculated and returned as responses. - * + *

List of formulas to be calculated and returned as responses.

* @return formulas - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FORMULAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormulas() { - return formulas; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORMULAS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getFormulas() { + return formulas; + } public void setFormulas(List formulas) { this.formulas = formulas; } - public TimeseriesFormulaRequestAttributes from(Long from) { this.from = from; return this; } /** - * Start date (inclusive) of the query in milliseconds since the Unix epoch. - * + *

Start date (inclusive) of the query in milliseconds since the Unix epoch.

* @return from - */ - @JsonProperty(JSON_PROPERTY_FROM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getFrom() { - return from; - } - + **/ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getFrom() { + return from; + } public void setFrom(Long from) { this.from = from; } - public TimeseriesFormulaRequestAttributes interval(Long interval) { this.interval = interval; return this; } /** - * A time interval in milliseconds. May be overridden by a larger interval if the query would - * result in too many points for the specified timeframe. Defaults to a reasonable interval for - * the given timeframe. - * + *

A time interval in milliseconds. + * May be overridden by a larger interval if the query would result in + * too many points for the specified timeframe. + * Defaults to a reasonable interval for the given timeframe.

* @return interval - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTERVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInterval() { - return interval; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Long getInterval() { + return interval; + } public void setInterval(Long interval) { this.interval = interval; } - public TimeseriesFormulaRequestAttributes queries(List queries) { this.queries = queries; for (TimeseriesQuery item : queries) { @@ -137,7 +147,6 @@ public TimeseriesFormulaRequestAttributes queries(List queries) } return this; } - public TimeseriesFormulaRequestAttributes addQueriesItem(TimeseriesQuery queriesItem) { this.queries.add(queriesItem); this.unparsed |= queriesItem.unparsed; @@ -145,41 +154,40 @@ public TimeseriesFormulaRequestAttributes addQueriesItem(TimeseriesQuery queries } /** - * List of queries to be run and used as inputs to the formulas. - * + *

List of queries to be run and used as inputs to the formulas.

* @return queries - */ - @JsonProperty(JSON_PROPERTY_QUERIES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getQueries() { - return queries; - } - + **/ + @JsonProperty(JSON_PROPERTY_QUERIES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getQueries() { + return queries; + } public void setQueries(List queries) { this.queries = queries; } - public TimeseriesFormulaRequestAttributes to(Long to) { this.to = to; return this; } /** - * End date (exclusive) of the query in milliseconds since the Unix epoch. - * + *

End date (exclusive) of the query in milliseconds since the Unix epoch.

* @return to - */ - @JsonProperty(JSON_PROPERTY_TO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getTo() { - return to; - } - + **/ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public Long getTo() { + return to; + } public void setTo(Long to) { this.to = to; } - /** Return true if this TimeseriesFormulaRequestAttributes object is equal to o. */ + /** + * Return true if this TimeseriesFormulaRequestAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -188,18 +196,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TimeseriesFormulaRequestAttributes timeseriesFormulaRequestAttributes = - (TimeseriesFormulaRequestAttributes) o; - return Objects.equals(this.formulas, timeseriesFormulaRequestAttributes.formulas) - && Objects.equals(this.from, timeseriesFormulaRequestAttributes.from) - && Objects.equals(this.interval, timeseriesFormulaRequestAttributes.interval) - && Objects.equals(this.queries, timeseriesFormulaRequestAttributes.queries) - && Objects.equals(this.to, timeseriesFormulaRequestAttributes.to); + TimeseriesFormulaRequestAttributes timeseriesFormulaRequestAttributes = (TimeseriesFormulaRequestAttributes) o; + return Objects.equals(this.formulas, timeseriesFormulaRequestAttributes.formulas) && Objects.equals(this.from, timeseriesFormulaRequestAttributes.from) && Objects.equals(this.interval, timeseriesFormulaRequestAttributes.interval) && Objects.equals(this.queries, timeseriesFormulaRequestAttributes.queries) && Objects.equals(this.to, timeseriesFormulaRequestAttributes.to); } + @Override public int hashCode() { - return Objects.hash(formulas, from, interval, queries, to); + return Objects.hash(formulas,from,interval,queries,to); } @Override @@ -216,7 +220,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestType.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestType.java index 22fae638b53..6122b32f920 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestType.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaRequestType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be timeseries_request. */ +/** + *

The type of the resource. The value should always be timeseries_request.

+ */ @JsonSerialize(using = TimeseriesFormulaRequestType.TimeseriesFormulaRequestTypeSerializer.class) public class TimeseriesFormulaRequestType { - public static final TimeseriesFormulaRequestType TIMESERIES_REQUEST = - new TimeseriesFormulaRequestType("timeseries_request"); + public static final TimeseriesFormulaRequestType TIMESERIES_REQUEST = new TimeseriesFormulaRequestType("timeseries_request"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries_request")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries_request")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class TimeseriesFormulaRequestTypeSerializer - extends StdSerializer { - public TimeseriesFormulaRequestTypeSerializer(Class t) { - super(t); - } + public static class TimeseriesFormulaRequestTypeSerializer extends StdSerializer { + public TimeseriesFormulaRequestTypeSerializer(Class t) { + super(t); + } - public TimeseriesFormulaRequestTypeSerializer() { - this(null); - } + public TimeseriesFormulaRequestTypeSerializer() { + this(null); + } - @Override - public void serialize( - TimeseriesFormulaRequestType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TimeseriesFormulaRequestType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TimeseriesFormulaRequestType object is equal to o. */ + /** + * Return true if this TimeseriesFormulaRequestType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaResponseType.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaResponseType.java index 306dcefe242..7f2938f3ad3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaResponseType.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesFormulaResponseType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** The type of the resource. The value should always be timeseries_response. */ +/** + *

The type of the resource. The value should always be timeseries_response.

+ */ @JsonSerialize(using = TimeseriesFormulaResponseType.TimeseriesFormulaResponseTypeSerializer.class) public class TimeseriesFormulaResponseType { - public static final TimeseriesFormulaResponseType TIMESERIES_RESPONSE = - new TimeseriesFormulaResponseType("timeseries_response"); + public static final TimeseriesFormulaResponseType TIMESERIES_RESPONSE = new TimeseriesFormulaResponseType("timeseries_response"); - private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries_response")); + private static final Set allowedValues = new HashSet(Arrays.asList("timeseries_response")); private String value; @@ -39,22 +61,19 @@ public boolean isValid() { this.value = value; } - public static class TimeseriesFormulaResponseTypeSerializer - extends StdSerializer { - public TimeseriesFormulaResponseTypeSerializer(Class t) { - super(t); - } + public static class TimeseriesFormulaResponseTypeSerializer extends StdSerializer { + public TimeseriesFormulaResponseTypeSerializer(Class t) { + super(t); + } - public TimeseriesFormulaResponseTypeSerializer() { - this(null); - } + public TimeseriesFormulaResponseTypeSerializer() { + this(null); + } - @Override - public void serialize( - TimeseriesFormulaResponseType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + @Override + public void serialize(TimeseriesFormulaResponseType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -66,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this TimeseriesFormulaResponseType object is equal to o. */ + /** + * Return true if this TimeseriesFormulaResponseType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -80,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesQuery.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesQuery.java index 7de1e2ba54c..69010531d8c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesQuery.java @@ -6,272 +6,261 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = TimeseriesQuery.TimeseriesQueryDeserializer.class) @JsonSerialize(using = TimeseriesQuery.TimeseriesQuerySerializer.class) public class TimeseriesQuery extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(TimeseriesQuery.class.getName()); + private static final Logger log = Logger.getLogger(TimeseriesQuery.class.getName()); + + @JsonIgnore + public boolean unparsed = false; + + public static class TimeseriesQuerySerializer extends StdSerializer { + public TimeseriesQuerySerializer(Class t) { + super(t); + } - @JsonIgnore public boolean unparsed = false; + public TimeseriesQuerySerializer() { + this(null); + } - public static class TimeseriesQuerySerializer extends StdSerializer { - public TimeseriesQuerySerializer(Class t) { - super(t); + @Override + public void serialize(TimeseriesQuery value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public TimeseriesQuerySerializer() { - this(null); + public static class TimeseriesQueryDeserializer extends StdDeserializer { + public TimeseriesQueryDeserializer() { + this(TimeseriesQuery.class); + } + + public TimeseriesQueryDeserializer(Class vc) { + super(vc); + } + + @Override + public TimeseriesQuery 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 MetricsTimeseriesQuery + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MetricsTimeseriesQuery.class.equals(Integer.class) || MetricsTimeseriesQuery.class.equals(Long.class) || MetricsTimeseriesQuery.class.equals(Float.class) || MetricsTimeseriesQuery.class.equals(Double.class) || MetricsTimeseriesQuery.class.equals(Boolean.class) || MetricsTimeseriesQuery.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MetricsTimeseriesQuery.class.equals(Integer.class) || MetricsTimeseriesQuery.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MetricsTimeseriesQuery.class.equals(Float.class) || MetricsTimeseriesQuery.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (MetricsTimeseriesQuery.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MetricsTimeseriesQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(MetricsTimeseriesQuery.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 (!((MetricsTimeseriesQuery)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'MetricsTimeseriesQuery'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MetricsTimeseriesQuery'", e); + } + + // deserialize EventsTimeseriesQuery + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EventsTimeseriesQuery.class.equals(Integer.class) || EventsTimeseriesQuery.class.equals(Long.class) || EventsTimeseriesQuery.class.equals(Float.class) || EventsTimeseriesQuery.class.equals(Double.class) || EventsTimeseriesQuery.class.equals(Boolean.class) || EventsTimeseriesQuery.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((EventsTimeseriesQuery.class.equals(Integer.class) || EventsTimeseriesQuery.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((EventsTimeseriesQuery.class.equals(Float.class) || EventsTimeseriesQuery.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (EventsTimeseriesQuery.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (EventsTimeseriesQuery.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(EventsTimeseriesQuery.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 (!((EventsTimeseriesQuery)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'EventsTimeseriesQuery'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EventsTimeseriesQuery'", e); + } + + TimeseriesQuery ret = new TimeseriesQuery(); + 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 TimeseriesQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "TimeseriesQuery cannot be null"); + } } - @Override - public void serialize(TimeseriesQuery value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public TimeseriesQuery() { + super("oneOf", Boolean.FALSE); + } + public TimeseriesQuery(MetricsTimeseriesQuery o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public TimeseriesQuery(EventsTimeseriesQuery o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class TimeseriesQueryDeserializer extends StdDeserializer { - public TimeseriesQueryDeserializer() { - this(TimeseriesQuery.class); + static { + schemas.put("MetricsTimeseriesQuery", new GenericType() { + }); + schemas.put("EventsTimeseriesQuery", new GenericType() { + }); + JSON.registerDescendants(TimeseriesQuery.class, Collections.unmodifiableMap(schemas)); } - public TimeseriesQueryDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return TimeseriesQuery.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MetricsTimeseriesQuery, EventsTimeseriesQuery + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public TimeseriesQuery 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 MetricsTimeseriesQuery - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (MetricsTimeseriesQuery.class.equals(Integer.class) - || MetricsTimeseriesQuery.class.equals(Long.class) - || MetricsTimeseriesQuery.class.equals(Float.class) - || MetricsTimeseriesQuery.class.equals(Double.class) - || MetricsTimeseriesQuery.class.equals(Boolean.class) - || MetricsTimeseriesQuery.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((MetricsTimeseriesQuery.class.equals(Integer.class) - || MetricsTimeseriesQuery.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((MetricsTimeseriesQuery.class.equals(Float.class) - || MetricsTimeseriesQuery.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (MetricsTimeseriesQuery.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (MetricsTimeseriesQuery.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MetricsTimeseriesQuery.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(MetricsTimeseriesQuery.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 (!((MetricsTimeseriesQuery) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'MetricsTimeseriesQuery'"); + if (JSON.isInstanceOf(EventsTimeseriesQuery.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'MetricsTimeseriesQuery'", e); - } - // deserialize EventsTimeseriesQuery - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (EventsTimeseriesQuery.class.equals(Integer.class) - || EventsTimeseriesQuery.class.equals(Long.class) - || EventsTimeseriesQuery.class.equals(Float.class) - || EventsTimeseriesQuery.class.equals(Double.class) - || EventsTimeseriesQuery.class.equals(Boolean.class) - || EventsTimeseriesQuery.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((EventsTimeseriesQuery.class.equals(Integer.class) - || EventsTimeseriesQuery.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((EventsTimeseriesQuery.class.equals(Float.class) - || EventsTimeseriesQuery.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (EventsTimeseriesQuery.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (EventsTimeseriesQuery.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(EventsTimeseriesQuery.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 (!((EventsTimeseriesQuery) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'EventsTimeseriesQuery'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'EventsTimeseriesQuery'", e); - } - - TimeseriesQuery ret = new TimeseriesQuery(); - 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; + throw new RuntimeException("Invalid instance type. Must be MetricsTimeseriesQuery, EventsTimeseriesQuery"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * MetricsTimeseriesQuery, EventsTimeseriesQuery + * + * @return The actual instance (MetricsTimeseriesQuery, EventsTimeseriesQuery) + */ @Override - public TimeseriesQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "TimeseriesQuery cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public TimeseriesQuery() { - super("oneOf", Boolean.FALSE); - } - - public TimeseriesQuery(MetricsTimeseriesQuery o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - public TimeseriesQuery(EventsTimeseriesQuery o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MetricsTimeseriesQuery", new GenericType() {}); - schemas.put("EventsTimeseriesQuery", new GenericType() {}); - JSON.registerDescendants(TimeseriesQuery.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return TimeseriesQuery.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: MetricsTimeseriesQuery, EventsTimeseriesQuery - * - *

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(MetricsTimeseriesQuery.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(EventsTimeseriesQuery.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `MetricsTimeseriesQuery`. If the actual instance is not `MetricsTimeseriesQuery`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MetricsTimeseriesQuery` + * @throws ClassCastException if the instance is not `MetricsTimeseriesQuery` + */ + public MetricsTimeseriesQuery getMetricsTimeseriesQuery() throws ClassCastException { + return (MetricsTimeseriesQuery)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `EventsTimeseriesQuery`. If the actual instance is not `EventsTimeseriesQuery`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `EventsTimeseriesQuery` + * @throws ClassCastException if the instance is not `EventsTimeseriesQuery` + */ + public EventsTimeseriesQuery getEventsTimeseriesQuery() throws ClassCastException { + return (EventsTimeseriesQuery)super.getActualInstance(); } - throw new RuntimeException( - "Invalid instance type. Must be MetricsTimeseriesQuery, EventsTimeseriesQuery"); - } - - /** - * Get the actual instance, which can be the following: MetricsTimeseriesQuery, - * EventsTimeseriesQuery - * - * @return The actual instance (MetricsTimeseriesQuery, EventsTimeseriesQuery) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MetricsTimeseriesQuery`. If the actual instance is not - * `MetricsTimeseriesQuery`, the ClassCastException will be thrown. - * - * @return The actual instance of `MetricsTimeseriesQuery` - * @throws ClassCastException if the instance is not `MetricsTimeseriesQuery` - */ - public MetricsTimeseriesQuery getMetricsTimeseriesQuery() throws ClassCastException { - return (MetricsTimeseriesQuery) super.getActualInstance(); - } - - /** - * Get the actual instance of `EventsTimeseriesQuery`. If the actual instance is not - * `EventsTimeseriesQuery`, the ClassCastException will be thrown. - * - * @return The actual instance of `EventsTimeseriesQuery` - * @throws ClassCastException if the instance is not `EventsTimeseriesQuery` - */ - public EventsTimeseriesQuery getEventsTimeseriesQuery() throws ClassCastException { - return (EventsTimeseriesQuery) super.getActualInstance(); - } } diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponse.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponse.java index 04886853b5d..41b957472d7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponse.java @@ -6,21 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** A message containing the response to a timeseries query. */ + +/** + *

A message containing the response to a timeseries query.

+ */ @JsonPropertyOrder({ TimeseriesResponse.JSON_PROPERTY_ATTRIBUTES, TimeseriesResponse.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private TimeseriesResponseAttributes attributes; @@ -34,21 +54,19 @@ public TimeseriesResponse attributes(TimeseriesResponseAttributes attributes) { } /** - * The object describing a timeseries response. - * + *

The object describing a timeseries response.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeseriesResponseAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TimeseriesResponseAttributes getAttributes() { + return attributes; + } public void setAttributes(TimeseriesResponseAttributes attributes) { this.attributes = attributes; } - public TimeseriesResponse type(TimeseriesFormulaResponseType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -56,25 +74,26 @@ public TimeseriesResponse type(TimeseriesFormulaResponseType type) { } /** - * The type of the resource. The value should always be timeseries_response. - * + *

The type of the resource. The value should always be timeseries_response.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeseriesFormulaResponseType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public TimeseriesFormulaResponseType getType() { + return type; + } public void setType(TimeseriesFormulaResponseType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this TimeseriesResponse object is equal to o. */ + /** + * Return true if this TimeseriesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -84,13 +103,13 @@ public boolean equals(Object o) { return false; } TimeseriesResponse timeseriesResponse = (TimeseriesResponse) o; - return Objects.equals(this.attributes, timeseriesResponse.attributes) - && Objects.equals(this.type, timeseriesResponse.type); + return Objects.equals(this.attributes, timeseriesResponse.attributes) && Objects.equals(this.type, timeseriesResponse.type); } + @Override public int hashCode() { - return Objects.hash(attributes, type); + return Objects.hash(attributes,type); } @Override @@ -104,7 +123,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseAttributes.java index 128cd714e8a..b4b58e6994f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseAttributes.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** The object describing a timeseries response. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

The object describing a timeseries response.

+ */ @JsonPropertyOrder({ TimeseriesResponseAttributes.JSON_PROPERTY_SERIES, TimeseriesResponseAttributes.JSON_PROPERTY_TIMES, TimeseriesResponseAttributes.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesResponseAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_SERIES = "series"; private List series = null; @@ -40,7 +58,6 @@ public TimeseriesResponseAttributes series(List series } return this; } - public TimeseriesResponseAttributes addSeriesItem(TimeseriesResponseSeries seriesItem) { if (this.series == null) { this.series = new ArrayList<>(); @@ -51,27 +68,23 @@ public TimeseriesResponseAttributes addSeriesItem(TimeseriesResponseSeries serie } /** - * Array of response series. The index here corresponds to the index in the formulas - * or queries array from the request. - * + *

Array of response series. The index here corresponds to the index in the formulas or queries array from the request.

* @return series - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSeries() { - return series; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getSeries() { + return series; + } public void setSeries(List series) { this.series = series; } - public TimeseriesResponseAttributes times(List times) { this.times = times; return this; } - public TimeseriesResponseAttributes addTimesItem(Long timesItem) { if (this.times == null) { this.times = new ArrayList<>(); @@ -81,26 +94,23 @@ public TimeseriesResponseAttributes addTimesItem(Long timesItem) { } /** - * Array of times, 1-1 match with individual values arrays. - * + *

Array of times, 1-1 match with individual values arrays.

* @return times - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimes() { - return times; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimes() { + return times; + } public void setTimes(List times) { this.times = times; } - public TimeseriesResponseAttributes values(List> values) { this.values = values; return this; } - public TimeseriesResponseAttributes addValuesItem(List valuesItem) { if (this.values == null) { this.values = new ArrayList<>(); @@ -110,23 +120,23 @@ public TimeseriesResponseAttributes addValuesItem(List valuesItem) { } /** - * Array of value-arrays. The index here corresponds to the index in the formulas or - * queries array from the request. - * + *

Array of value-arrays. The index here corresponds to the index in the formulas or queries array from the request.

* @return values - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getValues() { - return values; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List> getValues() { + return values; + } public void setValues(List> values) { this.values = values; } - /** Return true if this TimeseriesResponseAttributes object is equal to o. */ + /** + * Return true if this TimeseriesResponseAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,14 +146,13 @@ public boolean equals(Object o) { return false; } TimeseriesResponseAttributes timeseriesResponseAttributes = (TimeseriesResponseAttributes) o; - return Objects.equals(this.series, timeseriesResponseAttributes.series) - && Objects.equals(this.times, timeseriesResponseAttributes.times) - && Objects.equals(this.values, timeseriesResponseAttributes.values); + return Objects.equals(this.series, timeseriesResponseAttributes.series) && Objects.equals(this.times, timeseriesResponseAttributes.times) && Objects.equals(this.values, timeseriesResponseAttributes.values); } + @Override public int hashCode() { - return Objects.hash(series, times, values); + return Objects.hash(series,times,values); } @Override @@ -158,7 +167,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseSeries.java b/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseSeries.java index bb76f62e791..2347e5ef62d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseSeries.java +++ b/src/main/java/com/datadog/api/client/v2/model/TimeseriesResponseSeries.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + + */ @JsonPropertyOrder({ TimeseriesResponseSeries.JSON_PROPERTY_GROUP_TAGS, TimeseriesResponseSeries.JSON_PROPERTY_QUERY_INDEX, TimeseriesResponseSeries.JSON_PROPERTY_UNIT }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TimeseriesResponseSeries { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_GROUP_TAGS = "group_tags"; private List groupTags = null; @@ -37,7 +55,6 @@ public TimeseriesResponseSeries groupTags(List groupTags) { this.groupTags = groupTags; return this; } - public TimeseriesResponseSeries addGroupTagsItem(String groupTagsItem) { if (this.groupTags == null) { this.groupTags = new ArrayList<>(); @@ -47,43 +64,39 @@ public TimeseriesResponseSeries addGroupTagsItem(String groupTagsItem) { } /** - * List of tags that apply to a single response value. - * + *

List of tags that apply to a single response value.

* @return groupTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupTags() { - return groupTags; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP_TAGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupTags() { + return groupTags; + } public void setGroupTags(List groupTags) { this.groupTags = groupTags; } - public TimeseriesResponseSeries queryIndex(Integer queryIndex) { this.queryIndex = queryIndex; return this; } /** - * The index of the query in the "formulas" array (or "queries" array if no "formulas" was - * specified). maximum: 2147483647 - * + *

The index of the query in the "formulas" array (or "queries" array if no "formulas" was specified).

+ * maximum: 2147483647 * @return queryIndex - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUERY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getQueryIndex() { - return queryIndex; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY_INDEX) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Integer getQueryIndex() { + return queryIndex; + } public void setQueryIndex(Integer queryIndex) { this.queryIndex = queryIndex; } - public TimeseriesResponseSeries unit(List unit) { this.unit = unit; for (Unit item : unit) { @@ -91,7 +104,6 @@ public TimeseriesResponseSeries unit(List unit) { } return this; } - public TimeseriesResponseSeries addUnitItem(Unit unitItem) { if (this.unit == null) { this.unit = new ArrayList<>(); @@ -102,25 +114,26 @@ public TimeseriesResponseSeries addUnitItem(Unit unitItem) { } /** - * Detailed information about the unit. The first element describes the "primary unit" (for - * example, bytes in bytes per second). The second element describes the - * "per unit" (for example, second in bytes per second). If the second - * element is not present, the API returns null. - * + *

Detailed information about the unit. + * The first element describes the "primary unit" (for example, bytes in bytes per second). + * The second element describes the "per unit" (for example, second in bytes per second). + * If the second element is not present, the API returns null.

* @return unit - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UNIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getUnit() { - return unit; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getUnit() { + return unit; + } public void setUnit(List unit) { this.unit = unit; } - /** Return true if this TimeseriesResponseSeries object is equal to o. */ + /** + * Return true if this TimeseriesResponseSeries object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -130,14 +143,13 @@ public boolean equals(Object o) { return false; } TimeseriesResponseSeries timeseriesResponseSeries = (TimeseriesResponseSeries) o; - return Objects.equals(this.groupTags, timeseriesResponseSeries.groupTags) - && Objects.equals(this.queryIndex, timeseriesResponseSeries.queryIndex) - && Objects.equals(this.unit, timeseriesResponseSeries.unit); + return Objects.equals(this.groupTags, timeseriesResponseSeries.groupTags) && Objects.equals(this.queryIndex, timeseriesResponseSeries.queryIndex) && Objects.equals(this.unit, timeseriesResponseSeries.unit); } + @Override public int hashCode() { - return Objects.hash(groupTags, queryIndex, unit); + return Objects.hash(groupTags,queryIndex,unit); } @Override @@ -152,7 +164,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/Unit.java b/src/main/java/com/datadog/api/client/v2/model/Unit.java index 8a00087e6fd..772377ebd7c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Unit.java +++ b/src/main/java/com/datadog/api/client/v2/model/Unit.java @@ -6,13 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object containing the metric unit family, scale factor, name, and short name. */ +/** + *

Object containing the metric unit family, scale factor, name, and short name.

+ */ @JsonPropertyOrder({ Unit.JSON_PROPERTY_FAMILY, Unit.JSON_PROPERTY_NAME, @@ -20,10 +40,10 @@ Unit.JSON_PROPERTY_SCALE_FACTOR, Unit.JSON_PROPERTY_SHORT_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Unit { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_FAMILY = "family"; private String family; @@ -45,106 +65,99 @@ public Unit family(String family) { } /** - * Unit family, allows for conversion between units of the same family, for scaling. - * + *

Unit family, allows for conversion between units of the same family, for scaling.

* @return family - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFamily() { - return family; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAMILY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getFamily() { + return family; + } public void setFamily(String family) { this.family = family; } - public Unit name(String name) { this.name = name; return this; } /** - * Unit name - * + *

Unit name

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public Unit plural(String plural) { this.plural = plural; return this; } /** - * Plural form of the unit name. - * + *

Plural form of the unit name.

* @return plural - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PLURAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPlural() { - return plural; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLURAL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPlural() { + return plural; + } public void setPlural(String plural) { this.plural = plural; } - public Unit scaleFactor(Double scaleFactor) { this.scaleFactor = scaleFactor; return this; } /** - * Factor for scaling between units of the same family. - * + *

Factor for scaling between units of the same family.

* @return scaleFactor - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SCALE_FACTOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getScaleFactor() { - return scaleFactor; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCALE_FACTOR) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Double getScaleFactor() { + return scaleFactor; + } public void setScaleFactor(Double scaleFactor) { this.scaleFactor = scaleFactor; } - public Unit shortName(String shortName) { this.shortName = shortName; return this; } /** - * Abbreviation of the unit. - * + *

Abbreviation of the unit.

* @return shortName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHORT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getShortName() { - return shortName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHORT_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getShortName() { + return shortName; + } public void setShortName(String shortName) { this.shortName = shortName; } - /** Return true if this Unit object is equal to o. */ + /** + * Return true if this Unit object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -154,16 +167,13 @@ public boolean equals(Object o) { return false; } Unit unit = (Unit) o; - return Objects.equals(this.family, unit.family) - && Objects.equals(this.name, unit.name) - && Objects.equals(this.plural, unit.plural) - && Objects.equals(this.scaleFactor, unit.scaleFactor) - && Objects.equals(this.shortName, unit.shortName); + return Objects.equals(this.family, unit.family) && Objects.equals(this.name, unit.name) && Objects.equals(this.plural, unit.plural) && Objects.equals(this.scaleFactor, unit.scaleFactor) && Objects.equals(this.shortName, unit.shortName); } + @Override public int hashCode() { - return Objects.hash(family, name, plural, scaleFactor, shortName); + return Objects.hash(family,name,plural,scaleFactor,shortName); } @Override @@ -180,7 +190,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageApplicationSecurityMonitoringResponse.java b/src/main/java/com/datadog/api/client/v2/model/UsageApplicationSecurityMonitoringResponse.java index 9d37853d6de..2cc66f419ec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageApplicationSecurityMonitoringResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageApplicationSecurityMonitoringResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Application Security Monitoring usage response. */ -@JsonPropertyOrder({UsageApplicationSecurityMonitoringResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Application Security Monitoring usage response.

+ */ +@JsonPropertyOrder({ + UsageApplicationSecurityMonitoringResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageApplicationSecurityMonitoringResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public UsageApplicationSecurityMonitoringResponse data(List dat } return this; } - public UsageApplicationSecurityMonitoringResponse addDataItem(UsageDataObject dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageApplicationSecurityMonitoringResponse addDataItem(UsageDataObject da } /** - * Response containing Application Security Monitoring usage. - * + *

Response containing Application Security Monitoring usage.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this UsageApplicationSecurityMonitoringResponse object is equal to o. */ + /** + * Return true if this UsageApplicationSecurityMonitoringResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageApplicationSecurityMonitoringResponse usageApplicationSecurityMonitoringResponse = - (UsageApplicationSecurityMonitoringResponse) o; + UsageApplicationSecurityMonitoringResponse usageApplicationSecurityMonitoringResponse = (UsageApplicationSecurityMonitoringResponse) o; return Objects.equals(this.data, usageApplicationSecurityMonitoringResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageAttributesObject.java b/src/main/java/com/datadog/api/client/v2/model/UsageAttributesObject.java index 23a78d423c5..baa2d0ee3b4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageAttributesObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageAttributesObject.java @@ -6,15 +6,33 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Usage attributes data. */ +/** + *

Usage attributes data.

+ */ @JsonPropertyOrder({ UsageAttributesObject.JSON_PROPERTY_ORG_NAME, UsageAttributesObject.JSON_PROPERTY_PRODUCT_FAMILY, @@ -22,10 +40,10 @@ UsageAttributesObject.JSON_PROPERTY_TIMESERIES, UsageAttributesObject.JSON_PROPERTY_USAGE_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageAttributesObject { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ORG_NAME = "org_name"; private String orgName; @@ -47,63 +65,57 @@ public UsageAttributesObject orgName(String orgName) { } /** - * The organization name. - * + *

The organization name.

* @return orgName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOrgName() { - return orgName; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgName() { + return orgName; + } public void setOrgName(String orgName) { this.orgName = orgName; } - public UsageAttributesObject productFamily(String productFamily) { this.productFamily = productFamily; return this; } /** - * The product for which usage is being reported. - * + *

The product for which usage is being reported.

* @return productFamily - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRODUCT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProductFamily() { - return productFamily; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_FAMILY) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getProductFamily() { + return productFamily; + } public void setProductFamily(String productFamily) { this.productFamily = productFamily; } - public UsageAttributesObject publicId(String publicId) { this.publicId = publicId; return this; } /** - * The organization public ID. - * + *

The organization public ID.

* @return publicId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicId() { - return publicId; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } public void setPublicId(String publicId) { this.publicId = publicId; } - public UsageAttributesObject timeseries(List timeseries) { this.timeseries = timeseries; for (UsageTimeSeriesObject item : timeseries) { @@ -111,7 +123,6 @@ public UsageAttributesObject timeseries(List timeseries) } return this; } - public UsageAttributesObject addTimeseriesItem(UsageTimeSeriesObject timeseriesItem) { if (this.timeseries == null) { this.timeseries = new ArrayList<>(); @@ -122,21 +133,19 @@ public UsageAttributesObject addTimeseriesItem(UsageTimeSeriesObject timeseriesI } /** - * List of usage data reported for each requested hour. - * + *

List of usage data reported for each requested hour.

* @return timeseries - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESERIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTimeseries() { - return timeseries; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESERIES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getTimeseries() { + return timeseries; + } public void setTimeseries(List timeseries) { this.timeseries = timeseries; } - public UsageAttributesObject usageType(HourlyUsageType usageType) { this.usageType = usageType; this.unparsed |= !usageType.isValid(); @@ -144,25 +153,26 @@ public UsageAttributesObject usageType(HourlyUsageType usageType) { } /** - * Usage type that is being measured. - * + *

Usage type that is being measured.

* @return usageType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USAGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public HourlyUsageType getUsageType() { - return usageType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USAGE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public HourlyUsageType getUsageType() { + return usageType; + } public void setUsageType(HourlyUsageType usageType) { if (!usageType.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.usageType = usageType; } - /** Return true if this UsageAttributesObject object is equal to o. */ + /** + * Return true if this UsageAttributesObject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -172,16 +182,13 @@ public boolean equals(Object o) { return false; } UsageAttributesObject usageAttributesObject = (UsageAttributesObject) o; - return Objects.equals(this.orgName, usageAttributesObject.orgName) - && Objects.equals(this.productFamily, usageAttributesObject.productFamily) - && Objects.equals(this.publicId, usageAttributesObject.publicId) - && Objects.equals(this.timeseries, usageAttributesObject.timeseries) - && Objects.equals(this.usageType, usageAttributesObject.usageType); + return Objects.equals(this.orgName, usageAttributesObject.orgName) && Objects.equals(this.productFamily, usageAttributesObject.productFamily) && Objects.equals(this.publicId, usageAttributesObject.publicId) && Objects.equals(this.timeseries, usageAttributesObject.timeseries) && Objects.equals(this.usageType, usageAttributesObject.usageType); } + @Override public int hashCode() { - return Objects.hash(orgName, productFamily, publicId, timeseries, usageType); + return Objects.hash(orgName,productFamily,publicId,timeseries,usageType); } @Override @@ -198,7 +205,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageDataObject.java b/src/main/java/com/datadog/api/client/v2/model/UsageDataObject.java index 681d7f915c6..1bcdc7378b6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageDataObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageDataObject.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Usage data. */ + +/** + *

Usage data.

+ */ @JsonPropertyOrder({ UsageDataObject.JSON_PROPERTY_ATTRIBUTES, UsageDataObject.JSON_PROPERTY_ID, UsageDataObject.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageDataObject { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UsageAttributesObject attributes; @@ -38,42 +58,38 @@ public UsageDataObject attributes(UsageAttributesObject attributes) { } /** - * Usage attributes data. - * + *

Usage attributes data.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageAttributesObject getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageAttributesObject getAttributes() { + return attributes; + } public void setAttributes(UsageAttributesObject attributes) { this.attributes = attributes; } - public UsageDataObject id(String id) { this.id = id; return this; } /** - * Unique ID of the response. - * + *

Unique ID of the response.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public UsageDataObject type(UsageTimeSeriesType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public UsageDataObject type(UsageTimeSeriesType type) { } /** - * Type of usage data. - * + *

Type of usage data.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsageTimeSeriesType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsageTimeSeriesType getType() { + return type; + } public void setType(UsageTimeSeriesType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UsageDataObject object is equal to o. */ + /** + * Return true if this UsageDataObject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } UsageDataObject usageDataObject = (UsageDataObject) o; - return Objects.equals(this.attributes, usageDataObject.attributes) - && Objects.equals(this.id, usageDataObject.id) - && Objects.equals(this.type, usageDataObject.type); + return Objects.equals(this.attributes, usageDataObject.attributes) && Objects.equals(this.id, usageDataObject.id) && Objects.equals(this.type, usageDataObject.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageLambdaTracedInvocationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/UsageLambdaTracedInvocationsResponse.java index c2431c7ab8c..830345ca16c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageLambdaTracedInvocationsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageLambdaTracedInvocationsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Lambda Traced Invocations usage response. */ -@JsonPropertyOrder({UsageLambdaTracedInvocationsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Lambda Traced Invocations usage response.

+ */ +@JsonPropertyOrder({ + UsageLambdaTracedInvocationsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageLambdaTracedInvocationsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public UsageLambdaTracedInvocationsResponse data(List data) { } return this; } - public UsageLambdaTracedInvocationsResponse addDataItem(UsageDataObject dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageLambdaTracedInvocationsResponse addDataItem(UsageDataObject dataItem } /** - * Response containing Lambda Traced Invocations usage. - * + *

Response containing Lambda Traced Invocations usage.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this UsageLambdaTracedInvocationsResponse object is equal to o. */ + /** + * Return true if this UsageLambdaTracedInvocationsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageLambdaTracedInvocationsResponse usageLambdaTracedInvocationsResponse = - (UsageLambdaTracedInvocationsResponse) o; + UsageLambdaTracedInvocationsResponse usageLambdaTracedInvocationsResponse = (UsageLambdaTracedInvocationsResponse) o; return Objects.equals(this.data, usageLambdaTracedInvocationsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageObservabilityPipelinesResponse.java b/src/main/java/com/datadog/api/client/v2/model/UsageObservabilityPipelinesResponse.java index 8b5e5d265ca..87a3fb5e615 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageObservabilityPipelinesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageObservabilityPipelinesResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Observability Pipelines usage response. */ -@JsonPropertyOrder({UsageObservabilityPipelinesResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Observability Pipelines usage response.

+ */ +@JsonPropertyOrder({ + UsageObservabilityPipelinesResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageObservabilityPipelinesResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public UsageObservabilityPipelinesResponse data(List data) { } return this; } - public UsageObservabilityPipelinesResponse addDataItem(UsageDataObject dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public UsageObservabilityPipelinesResponse addDataItem(UsageDataObject dataItem) } /** - * Response containing Observability Pipelines usage. - * + *

Response containing Observability Pipelines usage.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this UsageObservabilityPipelinesResponse object is equal to o. */ + /** + * Return true if this UsageObservabilityPipelinesResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,11 +85,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UsageObservabilityPipelinesResponse usageObservabilityPipelinesResponse = - (UsageObservabilityPipelinesResponse) o; + UsageObservabilityPipelinesResponse usageObservabilityPipelinesResponse = (UsageObservabilityPipelinesResponse) o; return Objects.equals(this.data, usageObservabilityPipelinesResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -85,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesObject.java b/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesObject.java index ab8b8670b9c..1712e46d70d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesObject.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesObject.java @@ -6,27 +6,42 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Usage timeseries data. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Usage timeseries data.

+ */ @JsonPropertyOrder({ UsageTimeSeriesObject.JSON_PROPERTY_TIMESTAMP, UsageTimeSeriesObject.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsageTimeSeriesObject { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime timestamp; @@ -39,53 +54,49 @@ public UsageTimeSeriesObject timestamp(OffsetDateTime timestamp) { } /** - * Datetime in ISO-8601 format, UTC. The hour for the usage. - * + *

Datetime in ISO-8601 format, UTC. The hour for the usage.

* @return timestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; } - public UsageTimeSeriesObject value(Long value) { this.value = JsonNullable.of(value); return this; } /** - * Contains the number measured for the given usage_type during the hour. - * + *

Contains the number measured for the given usage_type during the hour.

* @return value - */ - @jakarta.annotation.Nullable - @JsonIgnore - public Long getValue() { - return value.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getValue() { + return value.orElse(null); + } @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getValue_JsonNullable() { return value; } - - @JsonProperty(JSON_PROPERTY_VALUE) - public void setValue_JsonNullable(JsonNullable value) { + @JsonProperty(JSON_PROPERTY_VALUE)public void setValue_JsonNullable(JsonNullable value) { this.value = value; } - public void setValue(Long value) { this.value = JsonNullable.of(value); } - /** Return true if this UsageTimeSeriesObject object is equal to o. */ + /** + * Return true if this UsageTimeSeriesObject object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -95,13 +106,13 @@ public boolean equals(Object o) { return false; } UsageTimeSeriesObject usageTimeSeriesObject = (UsageTimeSeriesObject) o; - return Objects.equals(this.timestamp, usageTimeSeriesObject.timestamp) - && Objects.equals(this.value, usageTimeSeriesObject.value); + return Objects.equals(this.timestamp, usageTimeSeriesObject.timestamp) && Objects.equals(this.value, usageTimeSeriesObject.value); } + @Override public int hashCode() { - return Objects.hash(timestamp, value); + return Objects.hash(timestamp,value); } @Override @@ -115,7 +126,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesType.java b/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesType.java index 207757c0773..a9acf32c645 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesType.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsageTimeSeriesType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Type of usage data. */ +/** + *

Type of usage data.

+ */ @JsonSerialize(using = UsageTimeSeriesType.UsageTimeSeriesTypeSerializer.class) public class UsageTimeSeriesType { - public static final UsageTimeSeriesType USAGE_TIMESERIES = - new UsageTimeSeriesType("usage_timeseries"); + public static final UsageTimeSeriesType USAGE_TIMESERIES = new UsageTimeSeriesType("usage_timeseries"); - private static final Set allowedValues = - new HashSet(Arrays.asList("usage_timeseries")); + private static final Set allowedValues = new HashSet(Arrays.asList("usage_timeseries")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class UsageTimeSeriesTypeSerializer extends StdSerializer { - public UsageTimeSeriesTypeSerializer(Class t) { - super(t); - } - - public UsageTimeSeriesTypeSerializer() { - this(null); - } - - @Override - public void serialize( - UsageTimeSeriesType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsageTimeSeriesTypeSerializer(Class t) { + super(t); + } + + public UsageTimeSeriesTypeSerializer() { + this(null); + } + + @Override + public void serialize(UsageTimeSeriesType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsageTimeSeriesType object is equal to o. */ + /** + * Return true if this UsageTimeSeriesType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/User.java b/src/main/java/com/datadog/api/client/v2/model/User.java index bed89734165..c74e1e8dd4e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/User.java +++ b/src/main/java/com/datadog/api/client/v2/model/User.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** User object returned by the API. */ + +/** + *

User object returned by the API.

+ */ @JsonPropertyOrder({ User.JSON_PROPERTY_ATTRIBUTES, User.JSON_PROPERTY_ID, User.JSON_PROPERTY_RELATIONSHIPS, User.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class User { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UserAttributes attributes; @@ -42,42 +62,38 @@ public User attributes(UserAttributes attributes) { } /** - * Attributes of user object returned by the API. - * + *

Attributes of user object returned by the API.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserAttributes getAttributes() { + return attributes; + } public void setAttributes(UserAttributes attributes) { this.attributes = attributes; } - public User id(String id) { this.id = id; return this; } /** - * ID of the user. - * + *

ID of the user.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public User relationships(UserResponseRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -85,21 +101,19 @@ public User relationships(UserResponseRelationships relationships) { } /** - * Relationships of the user object returned by the API. - * + *

Relationships of the user object returned by the API.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserResponseRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserResponseRelationships getRelationships() { + return relationships; + } public void setRelationships(UserResponseRelationships relationships) { this.relationships = relationships; } - public User type(UsersType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -107,25 +121,26 @@ public User type(UsersType type) { } /** - * Users resource type. - * + *

Users resource type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UsersType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UsersType getType() { + return type; + } public void setType(UsersType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this User object is equal to o. */ + /** + * Return true if this User object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -135,15 +150,13 @@ public boolean equals(Object o) { return false; } User user = (User) o; - return Objects.equals(this.attributes, user.attributes) - && Objects.equals(this.id, user.id) - && Objects.equals(this.relationships, user.relationships) - && Objects.equals(this.type, user.type); + return Objects.equals(this.attributes, user.attributes) && Objects.equals(this.id, user.id) && Objects.equals(this.relationships, user.relationships) && Objects.equals(this.type, user.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type); + return Objects.hash(attributes,id,relationships,type); } @Override @@ -159,7 +172,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UserAttributes.java index 5506e919eb0..9fb81199366 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserAttributes.java @@ -6,17 +6,33 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes of user object returned by the API. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Attributes of user object returned by the API.

+ */ @JsonPropertyOrder({ UserAttributes.JSON_PROPERTY_CREATED_AT, UserAttributes.JSON_PROPERTY_DISABLED, @@ -30,12 +46,11 @@ UserAttributes.JSON_PROPERTY_TITLE, UserAttributes.JSON_PROPERTY_VERIFIED }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; @@ -52,7 +67,6 @@ public class UserAttributes { private String icon; public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime modifiedAt; @@ -77,252 +91,227 @@ public UserAttributes createdAt(OffsetDateTime createdAt) { } /** - * Creation time of the user. - * + *

Creation time of the user.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public UserAttributes disabled(Boolean disabled) { this.disabled = disabled; return this; } /** - * Whether the user is disabled. - * + *

Whether the user is disabled.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } - public UserAttributes email(String email) { this.email = email; return this; } /** - * Email of the user. - * + *

Email of the user.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public UserAttributes handle(String handle) { this.handle = handle; return this; } /** - * Handle of the user. - * + *

Handle of the user.

* @return handle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHandle() { - return handle; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } public void setHandle(String handle) { this.handle = handle; } - public UserAttributes icon(String icon) { this.icon = icon; return this; } /** - * URL of the user's icon. - * + *

URL of the user's icon.

* @return icon - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ICON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIcon() { - return icon; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ICON) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getIcon() { + return icon; + } public void setIcon(String icon) { this.icon = icon; } - public UserAttributes modifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; return this; } /** - * Time that the user was last modified. - * + *

Time that the user was last modified.

* @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } public void setModifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; } - public UserAttributes name(String name) { this.name = JsonNullable.of(name); return this; } /** - * Name of the user. - * + *

Name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getName() { - return name.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getName_JsonNullable() { return name; } - - @JsonProperty(JSON_PROPERTY_NAME) - public void setName_JsonNullable(JsonNullable name) { + @JsonProperty(JSON_PROPERTY_NAME)public void setName_JsonNullable(JsonNullable name) { this.name = name; } - public void setName(String name) { this.name = JsonNullable.of(name); } - public UserAttributes serviceAccount(Boolean serviceAccount) { this.serviceAccount = serviceAccount; return this; } /** - * Whether the user is a service account. - * + *

Whether the user is a service account.

* @return serviceAccount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SERVICE_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getServiceAccount() { - return serviceAccount; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_ACCOUNT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getServiceAccount() { + return serviceAccount; + } public void setServiceAccount(Boolean serviceAccount) { this.serviceAccount = serviceAccount; } - public UserAttributes status(String status) { this.status = status; return this; } /** - * Status of the user. - * + *

Status of the user.

* @return status - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatus() { - return status; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } public void setStatus(String status) { this.status = status; } - public UserAttributes title(String title) { this.title = JsonNullable.of(title); return this; } /** - * Title of the user. - * + *

Title of the user.

* @return title - */ - @jakarta.annotation.Nullable - @JsonIgnore - public String getTitle() { - return title.orElse(null); - } - + **/ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTitle() { + return title.orElse(null); + } @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) public JsonNullable getTitle_JsonNullable() { return title; } - - @JsonProperty(JSON_PROPERTY_TITLE) - public void setTitle_JsonNullable(JsonNullable title) { + @JsonProperty(JSON_PROPERTY_TITLE)public void setTitle_JsonNullable(JsonNullable title) { this.title = title; } - public void setTitle(String title) { this.title = JsonNullable.of(title); } - public UserAttributes verified(Boolean verified) { this.verified = verified; return this; } /** - * Whether the user is verified. - * + *

Whether the user is verified.

* @return verified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VERIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVerified() { - return verified; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVerified() { + return verified; + } public void setVerified(Boolean verified) { this.verified = verified; } - /** Return true if this UserAttributes object is equal to o. */ + /** + * Return true if this UserAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -332,33 +321,13 @@ public boolean equals(Object o) { return false; } UserAttributes userAttributes = (UserAttributes) o; - return Objects.equals(this.createdAt, userAttributes.createdAt) - && Objects.equals(this.disabled, userAttributes.disabled) - && Objects.equals(this.email, userAttributes.email) - && Objects.equals(this.handle, userAttributes.handle) - && Objects.equals(this.icon, userAttributes.icon) - && Objects.equals(this.modifiedAt, userAttributes.modifiedAt) - && Objects.equals(this.name, userAttributes.name) - && Objects.equals(this.serviceAccount, userAttributes.serviceAccount) - && Objects.equals(this.status, userAttributes.status) - && Objects.equals(this.title, userAttributes.title) - && Objects.equals(this.verified, userAttributes.verified); + return Objects.equals(this.createdAt, userAttributes.createdAt) && Objects.equals(this.disabled, userAttributes.disabled) && Objects.equals(this.email, userAttributes.email) && Objects.equals(this.handle, userAttributes.handle) && Objects.equals(this.icon, userAttributes.icon) && Objects.equals(this.modifiedAt, userAttributes.modifiedAt) && Objects.equals(this.name, userAttributes.name) && Objects.equals(this.serviceAccount, userAttributes.serviceAccount) && Objects.equals(this.status, userAttributes.status) && Objects.equals(this.title, userAttributes.title) && Objects.equals(this.verified, userAttributes.verified); } + @Override public int hashCode() { - return Objects.hash( - createdAt, - disabled, - email, - handle, - icon, - modifiedAt, - name, - serviceAccount, - status, - title, - verified); + return Objects.hash(createdAt,disabled,email,handle,icon,modifiedAt,name,serviceAccount,status,title,verified); } @Override @@ -381,7 +350,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UserCreateAttributes.java index 48b2add7392..224661a9f15 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserCreateAttributes.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes of the created user. */ + +/** + *

Attributes of the created user.

+ */ @JsonPropertyOrder({ UserCreateAttributes.JSON_PROPERTY_EMAIL, UserCreateAttributes.JSON_PROPERTY_NAME, UserCreateAttributes.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserCreateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_EMAIL = "email"; private String email; @@ -36,73 +55,69 @@ public UserCreateAttributes() {} @JsonCreator public UserCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email) { - this.email = email; + @JsonProperty(required=true, value=JSON_PROPERTY_EMAIL)String email) { + this.email = email; } - public UserCreateAttributes email(String email) { this.email = email; return this; } /** - * The email of the user. - * + *

The email of the user.

* @return email - */ - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmail() { - return email; - } - + **/ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public UserCreateAttributes name(String name) { this.name = name; return this; } /** - * The name of the user. - * + *

The name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - public UserCreateAttributes title(String title) { this.title = title; return this; } /** - * The title of the user. - * + *

The title of the user.

* @return title - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } public void setTitle(String title) { this.title = title; } - /** Return true if this UserCreateAttributes object is equal to o. */ + /** + * Return true if this UserCreateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,14 +127,13 @@ public boolean equals(Object o) { return false; } UserCreateAttributes userCreateAttributes = (UserCreateAttributes) o; - return Objects.equals(this.email, userCreateAttributes.email) - && Objects.equals(this.name, userCreateAttributes.name) - && Objects.equals(this.title, userCreateAttributes.title); + return Objects.equals(this.email, userCreateAttributes.email) && Objects.equals(this.name, userCreateAttributes.name) && Objects.equals(this.title, userCreateAttributes.title); } + @Override public int hashCode() { - return Objects.hash(email, name, title); + return Objects.hash(email,name,title); } @Override @@ -134,7 +148,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserCreateData.java b/src/main/java/com/datadog/api/client/v2/model/UserCreateData.java index 31fb6148e33..d1c0d266c5e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserCreateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to create a user. */ + +/** + *

Object to create a user.

+ */ @JsonPropertyOrder({ UserCreateData.JSON_PROPERTY_ATTRIBUTES, UserCreateData.JSON_PROPERTY_RELATIONSHIPS, UserCreateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserCreateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UserCreateAttributes attributes; @@ -36,15 +55,13 @@ public UserCreateData() {} @JsonCreator public UserCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - UserCreateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UsersType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)UserCreateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)UsersType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public UserCreateData attributes(UserCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -52,20 +69,18 @@ public UserCreateData attributes(UserCreateAttributes attributes) { } /** - * Attributes of the created user. - * + *

Attributes of the created user.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UserCreateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UserCreateAttributes getAttributes() { + return attributes; + } public void setAttributes(UserCreateAttributes attributes) { this.attributes = attributes; } - public UserCreateData relationships(UserRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -73,21 +88,19 @@ public UserCreateData relationships(UserRelationships relationships) { } /** - * Relationships of the user object. - * + *

Relationships of the user object.

* @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserRelationships getRelationships() { - return relationships; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserRelationships getRelationships() { + return relationships; + } public void setRelationships(UserRelationships relationships) { this.relationships = relationships; } - public UserCreateData type(UsersType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public UserCreateData type(UsersType type) { } /** - * Users resource type. - * + *

Users resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UsersType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UsersType getType() { + return type; + } public void setType(UsersType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UserCreateData object is equal to o. */ + /** + * Return true if this UserCreateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } UserCreateData userCreateData = (UserCreateData) o; - return Objects.equals(this.attributes, userCreateData.attributes) - && Objects.equals(this.relationships, userCreateData.relationships) - && Objects.equals(this.type, userCreateData.type); + return Objects.equals(this.attributes, userCreateData.attributes) && Objects.equals(this.relationships, userCreateData.relationships) && Objects.equals(this.type, userCreateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, relationships, type); + return Objects.hash(attributes,relationships,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/UserCreateRequest.java index 3f1296cd938..d570bd78826 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserCreateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Create a user. */ -@JsonPropertyOrder({UserCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Create a user.

+ */ +@JsonPropertyOrder({ + UserCreateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserCreateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private UserCreateData data; @@ -26,11 +47,10 @@ public UserCreateRequest() {} @JsonCreator public UserCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) UserCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)UserCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public UserCreateRequest data(UserCreateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public UserCreateRequest data(UserCreateData data) { } /** - * Object to create a user. - * + *

Object to create a user.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UserCreateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UserCreateData getData() { + return data; + } public void setData(UserCreateData data) { this.data = data; } - /** Return true if this UserCreateRequest object is equal to o. */ + /** + * Return true if this UserCreateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, userCreateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationData.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationData.java index 79a78bc7534..cafb2d692f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationData.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationData.java @@ -6,22 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to create a user invitation. */ + +/** + *

Object to create a user invitation.

+ */ @JsonPropertyOrder({ UserInvitationData.JSON_PROPERTY_RELATIONSHIPS, UserInvitationData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; private UserInvitationRelationships relationships; @@ -32,15 +51,13 @@ public UserInvitationData() {} @JsonCreator public UserInvitationData( - @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) - UserInvitationRelationships relationships, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UserInvitationsType type) { - this.relationships = relationships; - this.unparsed |= relationships.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_RELATIONSHIPS)UserInvitationRelationships relationships, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)UserInvitationsType type) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); } - public UserInvitationData relationships(UserInvitationRelationships relationships) { this.relationships = relationships; this.unparsed |= relationships.unparsed; @@ -48,20 +65,18 @@ public UserInvitationData relationships(UserInvitationRelationships relationship } /** - * Relationships data for user invitation. - * + *

Relationships data for user invitation.

* @return relationships - */ - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UserInvitationRelationships getRelationships() { - return relationships; - } - + **/ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UserInvitationRelationships getRelationships() { + return relationships; + } public void setRelationships(UserInvitationRelationships relationships) { this.relationships = relationships; } - public UserInvitationData type(UserInvitationsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -69,24 +84,25 @@ public UserInvitationData type(UserInvitationsType type) { } /** - * User invitations type. - * + *

User invitations type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UserInvitationsType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UserInvitationsType getType() { + return type; + } public void setType(UserInvitationsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UserInvitationData object is equal to o. */ + /** + * Return true if this UserInvitationData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -96,13 +112,13 @@ public boolean equals(Object o) { return false; } UserInvitationData userInvitationData = (UserInvitationData) o; - return Objects.equals(this.relationships, userInvitationData.relationships) - && Objects.equals(this.type, userInvitationData.type); + return Objects.equals(this.relationships, userInvitationData.relationships) && Objects.equals(this.type, userInvitationData.type); } + @Override public int hashCode() { - return Objects.hash(relationships, type); + return Objects.hash(relationships,type); } @Override @@ -116,7 +132,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationDataAttributes.java index 8a06aa48d0d..4ea6e239320 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationDataAttributes.java @@ -6,33 +6,48 @@ package com.datadog.api.client.v2.model; -import com.datadog.api.client.JsonTimeSerializer; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.time.OffsetDateTime; -import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes of a user invitation. */ + +/** + *

Attributes of a user invitation.

+ */ @JsonPropertyOrder({ UserInvitationDataAttributes.JSON_PROPERTY_CREATED_AT, UserInvitationDataAttributes.JSON_PROPERTY_EXPIRES_AT, UserInvitationDataAttributes.JSON_PROPERTY_INVITE_TYPE, UserInvitationDataAttributes.JSON_PROPERTY_UUID }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationDataAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - @JsonSerialize(using = JsonTimeSerializer.class) private OffsetDateTime expiresAt; @@ -48,85 +63,80 @@ public UserInvitationDataAttributes createdAt(OffsetDateTime createdAt) { } /** - * Creation time of the user invitation. - * + *

Creation time of the user invitation.

* @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public UserInvitationDataAttributes expiresAt(OffsetDateTime expiresAt) { this.expiresAt = expiresAt; return this; } /** - * Time of invitation expiration. - * + *

Time of invitation expiration.

* @return expiresAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getExpiresAt() { - return expiresAt; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } public void setExpiresAt(OffsetDateTime expiresAt) { this.expiresAt = expiresAt; } - public UserInvitationDataAttributes inviteType(String inviteType) { this.inviteType = inviteType; return this; } /** - * Type of invitation. - * + *

Type of invitation.

* @return inviteType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INVITE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInviteType() { - return inviteType; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVITE_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getInviteType() { + return inviteType; + } public void setInviteType(String inviteType) { this.inviteType = inviteType; } - public UserInvitationDataAttributes uuid(String uuid) { this.uuid = uuid; return this; } /** - * UUID of the user invitation. - * + *

UUID of the user invitation.

* @return uuid - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUuid() { - return uuid; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getUuid() { + return uuid; + } public void setUuid(String uuid) { this.uuid = uuid; } - /** Return true if this UserInvitationDataAttributes object is equal to o. */ + /** + * Return true if this UserInvitationDataAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,15 +146,13 @@ public boolean equals(Object o) { return false; } UserInvitationDataAttributes userInvitationDataAttributes = (UserInvitationDataAttributes) o; - return Objects.equals(this.createdAt, userInvitationDataAttributes.createdAt) - && Objects.equals(this.expiresAt, userInvitationDataAttributes.expiresAt) - && Objects.equals(this.inviteType, userInvitationDataAttributes.inviteType) - && Objects.equals(this.uuid, userInvitationDataAttributes.uuid); + return Objects.equals(this.createdAt, userInvitationDataAttributes.createdAt) && Objects.equals(this.expiresAt, userInvitationDataAttributes.expiresAt) && Objects.equals(this.inviteType, userInvitationDataAttributes.inviteType) && Objects.equals(this.uuid, userInvitationDataAttributes.uuid); } + @Override public int hashCode() { - return Objects.hash(createdAt, expiresAt, inviteType, uuid); + return Objects.hash(createdAt,expiresAt,inviteType,uuid); } @Override @@ -160,7 +168,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationRelationships.java index 66ea58cd423..ec6a701fe7e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationRelationships.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationships data for user invitation. */ -@JsonPropertyOrder({UserInvitationRelationships.JSON_PROPERTY_USER}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Relationships data for user invitation.

+ */ +@JsonPropertyOrder({ + UserInvitationRelationships.JSON_PROPERTY_USER +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_USER = "user"; private RelationshipToUser user; @@ -26,11 +47,10 @@ public UserInvitationRelationships() {} @JsonCreator public UserInvitationRelationships( - @JsonProperty(required = true, value = JSON_PROPERTY_USER) RelationshipToUser user) { - this.user = user; - this.unparsed |= user.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_USER)RelationshipToUser user) { + this.user = user; + this.unparsed |= user.unparsed; } - public UserInvitationRelationships user(RelationshipToUser user) { this.user = user; this.unparsed |= user.unparsed; @@ -38,21 +58,22 @@ public UserInvitationRelationships user(RelationshipToUser user) { } /** - * Relationship to user. - * + *

Relationship to user.

* @return user - */ - @JsonProperty(JSON_PROPERTY_USER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelationshipToUser getUser() { - return user; - } - + **/ + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public RelationshipToUser getUser() { + return user; + } public void setUser(RelationshipToUser user) { this.user = user; } - /** Return true if this UserInvitationRelationships object is equal to o. */ + /** + * Return true if this UserInvitationRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.user, userInvitationRelationships.user); } + @Override public int hashCode() { return Objects.hash(user); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponse.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponse.java index fa28be361d6..344d6f4cf57 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponse.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** User invitation as returned by the API. */ -@JsonPropertyOrder({UserInvitationResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

User invitation as returned by the API.

+ */ +@JsonPropertyOrder({ + UserInvitationResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private UserInvitationResponseData data; @@ -28,22 +50,23 @@ public UserInvitationResponse data(UserInvitationResponseData data) { } /** - * Object of a user invitation returned by the API. - * + *

Object of a user invitation returned by the API.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserInvitationResponseData getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserInvitationResponseData getData() { + return data; + } public void setData(UserInvitationResponseData data) { this.data = data; } - /** Return true if this UserInvitationResponse object is equal to o. */ + /** + * Return true if this UserInvitationResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, userInvitationResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponseData.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponseData.java index f5ca125b108..4806bdee884 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationResponseData.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object of a user invitation returned by the API. */ + +/** + *

Object of a user invitation returned by the API.

+ */ @JsonPropertyOrder({ UserInvitationResponseData.JSON_PROPERTY_ATTRIBUTES, UserInvitationResponseData.JSON_PROPERTY_ID, UserInvitationResponseData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationResponseData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UserInvitationDataAttributes attributes; @@ -38,42 +58,38 @@ public UserInvitationResponseData attributes(UserInvitationDataAttributes attrib } /** - * Attributes of a user invitation. - * + *

Attributes of a user invitation.

* @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserInvitationDataAttributes getAttributes() { - return attributes; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserInvitationDataAttributes getAttributes() { + return attributes; + } public void setAttributes(UserInvitationDataAttributes attributes) { this.attributes = attributes; } - public UserInvitationResponseData id(String id) { this.id = id; return this; } /** - * ID of the user invitation. - * + *

ID of the user invitation.

* @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public UserInvitationResponseData type(UserInvitationsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -81,25 +97,26 @@ public UserInvitationResponseData type(UserInvitationsType type) { } /** - * User invitations type. - * + *

User invitations type.

* @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public UserInvitationsType getType() { - return type; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public UserInvitationsType getType() { + return type; + } public void setType(UserInvitationsType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UserInvitationResponseData object is equal to o. */ + /** + * Return true if this UserInvitationResponseData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,14 +126,13 @@ public boolean equals(Object o) { return false; } UserInvitationResponseData userInvitationResponseData = (UserInvitationResponseData) o; - return Objects.equals(this.attributes, userInvitationResponseData.attributes) - && Objects.equals(this.id, userInvitationResponseData.id) - && Objects.equals(this.type, userInvitationResponseData.type); + return Objects.equals(this.attributes, userInvitationResponseData.attributes) && Objects.equals(this.id, userInvitationResponseData.id) && Objects.equals(this.type, userInvitationResponseData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -131,7 +147,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationsRequest.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationsRequest.java index b645e233c85..161ea40b876 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationsRequest.java @@ -6,21 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Object to invite users to join the organization. */ -@JsonPropertyOrder({UserInvitationsRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Object to invite users to join the organization.

+ */ +@JsonPropertyOrder({ + UserInvitationsRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationsRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); @@ -28,10 +47,9 @@ public UserInvitationsRequest() {} @JsonCreator public UserInvitationsRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)List data) { + this.data = data; } - public UserInvitationsRequest data(List data) { this.data = data; for (UserInvitationData item : data) { @@ -39,7 +57,6 @@ public UserInvitationsRequest data(List data) { } return this; } - public UserInvitationsRequest addDataItem(UserInvitationData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; @@ -47,21 +64,22 @@ public UserInvitationsRequest addDataItem(UserInvitationData dataItem) { } /** - * List of user invitations. - * + *

List of user invitations.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this UserInvitationsRequest object is equal to o. */ + /** + * Return true if this UserInvitationsRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -74,6 +92,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, userInvitationsRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -89,7 +108,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationsResponse.java index 39ee82cf5da..d8c78f7e298 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationsResponse.java @@ -6,20 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** User invitations as returned by the API. */ -@JsonPropertyOrder({UserInvitationsResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

User invitations as returned by the API.

+ */ +@JsonPropertyOrder({ + UserInvitationsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserInvitationsResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -30,7 +50,6 @@ public UserInvitationsResponse data(List data) { } return this; } - public UserInvitationsResponse addDataItem(UserInvitationResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -41,22 +60,23 @@ public UserInvitationsResponse addDataItem(UserInvitationResponseData dataItem) } /** - * Array of user invitations. - * + *

Array of user invitations.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - /** Return true if this UserInvitationsResponse object is equal to o. */ + /** + * Return true if this UserInvitationsResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -69,6 +89,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, userInvitationsResponse.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -84,7 +105,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserInvitationsType.java b/src/main/java/com/datadog/api/client/v2/model/UserInvitationsType.java index 721354dd5c9..3540dac6b84 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserInvitationsType.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserInvitationsType.java @@ -6,28 +6,50 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** User invitations type. */ +/** + *

User invitations type.

+ */ @JsonSerialize(using = UserInvitationsType.UserInvitationsTypeSerializer.class) public class UserInvitationsType { - public static final UserInvitationsType USER_INVITATIONS = - new UserInvitationsType("user_invitations"); + public static final UserInvitationsType USER_INVITATIONS = new UserInvitationsType("user_invitations"); - private static final Set allowedValues = - new HashSet(Arrays.asList("user_invitations")); + private static final Set allowedValues = new HashSet(Arrays.asList("user_invitations")); private String value; @@ -40,20 +62,18 @@ public boolean isValid() { } public static class UserInvitationsTypeSerializer extends StdSerializer { - public UserInvitationsTypeSerializer(Class t) { - super(t); - } - - public UserInvitationsTypeSerializer() { - this(null); - } - - @Override - public void serialize( - UserInvitationsType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UserInvitationsTypeSerializer(Class t) { + super(t); + } + + public UserInvitationsTypeSerializer() { + this(null); + } + + @Override + public void serialize(UserInvitationsType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -65,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UserInvitationsType object is equal to o. */ + /** + * Return true if this UserInvitationsType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/main/java/com/datadog/api/client/v2/model/UserRelationships.java b/src/main/java/com/datadog/api/client/v2/model/UserRelationships.java index f0c8a0bab00..4e484b57839 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserRelationships.java @@ -6,18 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Relationships of the user object. */ -@JsonPropertyOrder({UserRelationships.JSON_PROPERTY_ROLES}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Relationships of the user object.

+ */ +@JsonPropertyOrder({ + UserRelationships.JSON_PROPERTY_ROLES +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ROLES = "roles"; private RelationshipToRoles roles; @@ -28,22 +50,23 @@ public UserRelationships roles(RelationshipToRoles roles) { } /** - * Relationship to roles. - * + *

Relationship to roles.

* @return roles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToRoles getRoles() { - return roles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRoles getRoles() { + return roles; + } public void setRoles(RelationshipToRoles roles) { this.roles = roles; } - /** Return true if this UserRelationships object is equal to o. */ + /** + * Return true if this UserRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -56,6 +79,7 @@ public boolean equals(Object o) { return Objects.equals(this.roles, userRelationships.roles); } + @Override public int hashCode() { return Objects.hash(roles); @@ -71,7 +95,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserResponse.java b/src/main/java/com/datadog/api/client/v2/model/UserResponse.java index c4ce40a290f..b03b44e51ad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserResponse.java @@ -6,20 +6,41 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Response containing information about a single user. */ -@JsonPropertyOrder({UserResponse.JSON_PROPERTY_DATA, UserResponse.JSON_PROPERTY_INCLUDED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +/** + *

Response containing information about a single user.

+ */ +@JsonPropertyOrder({ + UserResponse.JSON_PROPERTY_DATA, + UserResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private User data; @@ -33,21 +54,19 @@ public UserResponse data(User data) { } /** - * User object returned by the API. - * + *

User object returned by the API.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public User getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public User getData() { + return data; + } public void setData(User data) { this.data = data; } - public UserResponse included(List included) { this.included = included; for (UserResponseIncludedItem item : included) { @@ -55,7 +74,6 @@ public UserResponse included(List included) { } return this; } - public UserResponse addIncludedItem(UserResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -66,22 +84,23 @@ public UserResponse addIncludedItem(UserResponseIncludedItem includedItem) { } /** - * Array of objects related to the user. - * + *

Array of objects related to the user.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - /** Return true if this UserResponse object is equal to o. */ + /** + * Return true if this UserResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,13 +110,13 @@ public boolean equals(Object o) { return false; } UserResponse userResponse = (UserResponse) o; - return Objects.equals(this.data, userResponse.data) - && Objects.equals(this.included, userResponse.included); + return Objects.equals(this.data, userResponse.data) && Objects.equals(this.included, userResponse.included); } + @Override public int hashCode() { - return Objects.hash(data, included); + return Objects.hash(data,included); } @Override @@ -111,7 +130,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserResponseIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/UserResponseIncludedItem.java index 683090594da..e6c8ce34930 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserResponseIncludedItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserResponseIncludedItem.java @@ -6,330 +6,311 @@ 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 java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + 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.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; 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; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.datadog.api.client.JSON; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.UnparsedObject; -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @JsonDeserialize(using = UserResponseIncludedItem.UserResponseIncludedItemDeserializer.class) @JsonSerialize(using = UserResponseIncludedItem.UserResponseIncludedItemSerializer.class) public class UserResponseIncludedItem extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UserResponseIncludedItem.class.getName()); + private static final Logger log = Logger.getLogger(UserResponseIncludedItem.class.getName()); - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; + + public static class UserResponseIncludedItemSerializer extends StdSerializer { + public UserResponseIncludedItemSerializer(Class t) { + super(t); + } - public static class UserResponseIncludedItemSerializer - extends StdSerializer { - public UserResponseIncludedItemSerializer(Class t) { - super(t); + public UserResponseIncludedItemSerializer() { + this(null); + } + + @Override + public void serialize(UserResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - public UserResponseIncludedItemSerializer() { - this(null); + public static class UserResponseIncludedItemDeserializer extends StdDeserializer { + public UserResponseIncludedItemDeserializer() { + this(UserResponseIncludedItem.class); + } + + public UserResponseIncludedItemDeserializer(Class vc) { + super(vc); + } + + @Override + public UserResponseIncludedItem 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 Organization + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Organization.class.equals(Integer.class) || Organization.class.equals(Long.class) || Organization.class.equals(Float.class) || Organization.class.equals(Double.class) || Organization.class.equals(Boolean.class) || Organization.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Organization.class.equals(Integer.class) || Organization.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Organization.class.equals(Float.class) || Organization.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Organization.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Organization.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Organization.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 (!((Organization)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'Organization'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Organization'", e); + } + + // deserialize Permission + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Permission.class.equals(Integer.class) || Permission.class.equals(Long.class) || Permission.class.equals(Float.class) || Permission.class.equals(Double.class) || Permission.class.equals(Boolean.class) || Permission.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Permission.class.equals(Integer.class) || Permission.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Permission.class.equals(Float.class) || Permission.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Permission.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Permission.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Permission.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 (!((Permission)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'Permission'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Permission'", e); + } + + // deserialize Role + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Role.class.equals(Integer.class) || Role.class.equals(Long.class) || Role.class.equals(Float.class) || Role.class.equals(Double.class) || Role.class.equals(Boolean.class) || Role.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((Role.class.equals(Integer.class) || Role.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((Role.class.equals(Float.class) || Role.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= (Role.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Role.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Role.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 (!((Role)tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'Role'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Role'", e); + } + + UserResponseIncludedItem ret = new UserResponseIncludedItem(); + 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 UserResponseIncludedItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UserResponseIncludedItem cannot be null"); + } } - @Override - public void serialize( - UserResponseIncludedItem value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public UserResponseIncludedItem() { + super("oneOf", Boolean.FALSE); + } + public UserResponseIncludedItem(Organization o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public UserResponseIncludedItem(Permission o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public UserResponseIncludedItem(Role o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - } - public static class UserResponseIncludedItemDeserializer - extends StdDeserializer { - public UserResponseIncludedItemDeserializer() { - this(UserResponseIncludedItem.class); + static { + schemas.put("Organization", new GenericType() { + }); + schemas.put("Permission", new GenericType() { + }); + schemas.put("Role", new GenericType() { + }); + JSON.registerDescendants(UserResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); } - public UserResponseIncludedItemDeserializer(Class vc) { - super(vc); + @Override + public Map getSchemas() { + return UserResponseIncludedItem.schemas; } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Organization, Permission, Role + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ @Override - public UserResponseIncludedItem 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 Organization - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Organization.class.equals(Integer.class) - || Organization.class.equals(Long.class) - || Organization.class.equals(Float.class) - || Organization.class.equals(Double.class) - || Organization.class.equals(Boolean.class) - || Organization.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Organization.class.equals(Integer.class) || Organization.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Organization.class.equals(Float.class) || Organization.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Organization.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Organization.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Organization.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Organization.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 (!((Organization) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'Organization'"); + if (JSON.isInstanceOf(Permission.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Organization'", e); - } - - // deserialize Permission - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Permission.class.equals(Integer.class) - || Permission.class.equals(Long.class) - || Permission.class.equals(Float.class) - || Permission.class.equals(Double.class) - || Permission.class.equals(Boolean.class) - || Permission.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Permission.class.equals(Integer.class) || Permission.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Permission.class.equals(Float.class) || Permission.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Permission.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Permission.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } + if (JSON.isInstanceOf(Role.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Permission.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 (!((Permission) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'Permission'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Permission'", e); - } - // deserialize Role - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Role.class.equals(Integer.class) - || Role.class.equals(Long.class) - || Role.class.equals(Float.class) - || Role.class.equals(Double.class) - || Role.class.equals(Boolean.class) - || Role.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Role.class.equals(Integer.class) || Role.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Role.class.equals(Float.class) || Role.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (Role.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (Role.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Role.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 (!((Role) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'Role'"); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Role'", e); - } - - UserResponseIncludedItem ret = new UserResponseIncludedItem(); - 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; + throw new RuntimeException("Invalid instance type. Must be Organization, Permission, Role"); } - /** Handle deserialization of the 'null' value. */ + /** + * Get the actual instance, which can be the following: + * Organization, Permission, Role + * + * @return The actual instance (Organization, Permission, Role) + */ @Override - public UserResponseIncludedItem getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "UserResponseIncludedItem cannot be null"); + public Object getActualInstance() { + return super.getActualInstance(); } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public UserResponseIncludedItem() { - super("oneOf", Boolean.FALSE); - } - - public UserResponseIncludedItem(Organization o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UserResponseIncludedItem(Permission o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UserResponseIncludedItem(Role o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - static { - schemas.put("Organization", new GenericType() {}); - schemas.put("Permission", new GenericType() {}); - schemas.put("Role", new GenericType() {}); - JSON.registerDescendants(UserResponseIncludedItem.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return UserResponseIncludedItem.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Organization, Permission, Role - * - *

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(Organization.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Permission.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - if (JSON.isInstanceOf(Role.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `Organization`. If the actual instance is not `Organization`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Organization` + * @throws ClassCastException if the instance is not `Organization` + */ + public Organization getOrganization() throws ClassCastException { + return (Organization)super.getActualInstance(); } - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; + /** + * Get the actual instance of `Permission`. If the actual instance is not `Permission`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Permission` + * @throws ClassCastException if the instance is not `Permission` + */ + public Permission getPermission() throws ClassCastException { + return (Permission)super.getActualInstance(); } - throw new RuntimeException("Invalid instance type. Must be Organization, Permission, Role"); - } - /** - * Get the actual instance, which can be the following: Organization, Permission, Role - * - * @return The actual instance (Organization, Permission, Role) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Organization`. If the actual instance is not `Organization`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Organization` - * @throws ClassCastException if the instance is not `Organization` - */ - public Organization getOrganization() throws ClassCastException { - return (Organization) super.getActualInstance(); - } - - /** - * Get the actual instance of `Permission`. If the actual instance is not `Permission`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Permission` - * @throws ClassCastException if the instance is not `Permission` - */ - public Permission getPermission() throws ClassCastException { - return (Permission) super.getActualInstance(); - } - - /** - * Get the actual instance of `Role`. If the actual instance is not `Role`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `Role` - * @throws ClassCastException if the instance is not `Role` - */ - public Role getRole() throws ClassCastException { - return (Role) super.getActualInstance(); - } + /** + * Get the actual instance of `Role`. If the actual instance is not `Role`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Role` + * @throws ClassCastException if the instance is not `Role` + */ + public Role getRole() throws ClassCastException { + return (Role)super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/UserResponseRelationships.java b/src/main/java/com/datadog/api/client/v2/model/UserResponseRelationships.java index d687b08e82c..01ac633cfd1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserResponseRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserResponseRelationships.java @@ -6,23 +6,43 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Relationships of the user object returned by the API. */ + +/** + *

Relationships of the user object returned by the API.

+ */ @JsonPropertyOrder({ UserResponseRelationships.JSON_PROPERTY_ORG, UserResponseRelationships.JSON_PROPERTY_OTHER_ORGS, UserResponseRelationships.JSON_PROPERTY_OTHER_USERS, UserResponseRelationships.JSON_PROPERTY_ROLES }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserResponseRelationships { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ORG = "org"; private RelationshipToOrganization org; @@ -42,21 +62,19 @@ public UserResponseRelationships org(RelationshipToOrganization org) { } /** - * Relationship to an organization. - * + *

Relationship to an organization.

* @return org - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToOrganization getOrg() { - return org; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToOrganization getOrg() { + return org; + } public void setOrg(RelationshipToOrganization org) { this.org = org; } - public UserResponseRelationships otherOrgs(RelationshipToOrganizations otherOrgs) { this.otherOrgs = otherOrgs; this.unparsed |= otherOrgs.unparsed; @@ -64,21 +82,19 @@ public UserResponseRelationships otherOrgs(RelationshipToOrganizations otherOrgs } /** - * Relationship to organizations. - * + *

Relationship to organizations.

* @return otherOrgs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OTHER_ORGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToOrganizations getOtherOrgs() { - return otherOrgs; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_ORGS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToOrganizations getOtherOrgs() { + return otherOrgs; + } public void setOtherOrgs(RelationshipToOrganizations otherOrgs) { this.otherOrgs = otherOrgs; } - public UserResponseRelationships otherUsers(RelationshipToUsers otherUsers) { this.otherUsers = otherUsers; this.unparsed |= otherUsers.unparsed; @@ -86,21 +102,19 @@ public UserResponseRelationships otherUsers(RelationshipToUsers otherUsers) { } /** - * Relationship to users. - * + *

Relationship to users.

* @return otherUsers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OTHER_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUsers getOtherUsers() { - return otherUsers; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_USERS) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUsers getOtherUsers() { + return otherUsers; + } public void setOtherUsers(RelationshipToUsers otherUsers) { this.otherUsers = otherUsers; } - public UserResponseRelationships roles(RelationshipToRoles roles) { this.roles = roles; this.unparsed |= roles.unparsed; @@ -108,22 +122,23 @@ public UserResponseRelationships roles(RelationshipToRoles roles) { } /** - * Relationship to roles. - * + *

Relationship to roles.

* @return roles - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToRoles getRoles() { - return roles; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLES) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRoles getRoles() { + return roles; + } public void setRoles(RelationshipToRoles roles) { this.roles = roles; } - /** Return true if this UserResponseRelationships object is equal to o. */ + /** + * Return true if this UserResponseRelationships object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -133,15 +148,13 @@ public boolean equals(Object o) { return false; } UserResponseRelationships userResponseRelationships = (UserResponseRelationships) o; - return Objects.equals(this.org, userResponseRelationships.org) - && Objects.equals(this.otherOrgs, userResponseRelationships.otherOrgs) - && Objects.equals(this.otherUsers, userResponseRelationships.otherUsers) - && Objects.equals(this.roles, userResponseRelationships.roles); + return Objects.equals(this.org, userResponseRelationships.org) && Objects.equals(this.otherOrgs, userResponseRelationships.otherOrgs) && Objects.equals(this.otherUsers, userResponseRelationships.otherUsers) && Objects.equals(this.roles, userResponseRelationships.roles); } + @Override public int hashCode() { - return Objects.hash(org, otherOrgs, otherUsers, roles); + return Objects.hash(org,otherOrgs,otherUsers,roles); } @Override @@ -157,7 +170,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UserUpdateAttributes.java index 79488c0c157..8956ef62c11 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserUpdateAttributes.java @@ -6,22 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Attributes of the edited user. */ + +/** + *

Attributes of the edited user.

+ */ @JsonPropertyOrder({ UserUpdateAttributes.JSON_PROPERTY_DISABLED, UserUpdateAttributes.JSON_PROPERTY_EMAIL, UserUpdateAttributes.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserUpdateAttributes { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DISABLED = "disabled"; private Boolean disabled; @@ -37,64 +57,61 @@ public UserUpdateAttributes disabled(Boolean disabled) { } /** - * If the user is enabled or disabled. - * + *

If the user is enabled or disabled.

* @return disabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDisabled() { - return disabled; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisabled() { + return disabled; + } public void setDisabled(Boolean disabled) { this.disabled = disabled; } - public UserUpdateAttributes email(String email) { this.email = email; return this; } /** - * The email of the user. - * + *

The email of the user.

* @return email - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmail() { - return email; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } public void setEmail(String email) { this.email = email; } - public UserUpdateAttributes name(String name) { this.name = name; return this; } /** - * The name of the user. - * + *

The name of the user.

* @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } public void setName(String name) { this.name = name; } - /** Return true if this UserUpdateAttributes object is equal to o. */ + /** + * Return true if this UserUpdateAttributes object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -104,14 +121,13 @@ public boolean equals(Object o) { return false; } UserUpdateAttributes userUpdateAttributes = (UserUpdateAttributes) o; - return Objects.equals(this.disabled, userUpdateAttributes.disabled) - && Objects.equals(this.email, userUpdateAttributes.email) - && Objects.equals(this.name, userUpdateAttributes.name); + return Objects.equals(this.disabled, userUpdateAttributes.disabled) && Objects.equals(this.email, userUpdateAttributes.email) && Objects.equals(this.name, userUpdateAttributes.name); } + @Override public int hashCode() { - return Objects.hash(disabled, email, name); + return Objects.hash(disabled,email,name); } @Override @@ -126,7 +142,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/UserUpdateData.java index 3fa0bd7fa83..e1e728ec459 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserUpdateData.java @@ -6,23 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + -/** Object to update a user. */ +/** + *

Object to update a user.

+ */ @JsonPropertyOrder({ UserUpdateData.JSON_PROPERTY_ATTRIBUTES, UserUpdateData.JSON_PROPERTY_ID, UserUpdateData.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserUpdateData { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private UserUpdateAttributes attributes; @@ -36,17 +55,15 @@ public UserUpdateData() {} @JsonCreator public UserUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - UserUpdateAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UsersType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); + @JsonProperty(required=true, value=JSON_PROPERTY_ATTRIBUTES)UserUpdateAttributes attributes, + @JsonProperty(required=true, value=JSON_PROPERTY_ID)String id, + @JsonProperty(required=true, value=JSON_PROPERTY_TYPE)UsersType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); } - public UserUpdateData attributes(UserUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; @@ -54,40 +71,36 @@ public UserUpdateData attributes(UserUpdateAttributes attributes) { } /** - * Attributes of the edited user. - * + *

Attributes of the edited user.

* @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UserUpdateAttributes getAttributes() { - return attributes; - } - + **/ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UserUpdateAttributes getAttributes() { + return attributes; + } public void setAttributes(UserUpdateAttributes attributes) { this.attributes = attributes; } - public UserUpdateData id(String id) { this.id = id; return this; } /** - * ID of the user. - * + *

ID of the user.

* @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - + **/ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } public void setId(String id) { this.id = id; } - public UserUpdateData type(UsersType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -95,24 +108,25 @@ public UserUpdateData type(UsersType type) { } /** - * Users resource type. - * + *

Users resource type.

* @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UsersType getType() { - return type; - } - + **/ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UsersType getType() { + return type; + } public void setType(UsersType type) { if (!type.isValid()) { - this.unparsed = true; + this.unparsed = true; } this.type = type; } - /** Return true if this UserUpdateData object is equal to o. */ + /** + * Return true if this UserUpdateData object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,14 +136,13 @@ public boolean equals(Object o) { return false; } UserUpdateData userUpdateData = (UserUpdateData) o; - return Objects.equals(this.attributes, userUpdateData.attributes) - && Objects.equals(this.id, userUpdateData.id) - && Objects.equals(this.type, userUpdateData.type); + return Objects.equals(this.attributes, userUpdateData.attributes) && Objects.equals(this.id, userUpdateData.id) && Objects.equals(this.type, userUpdateData.type); } + @Override public int hashCode() { - return Objects.hash(attributes, id, type); + return Objects.hash(attributes,id,type); } @Override @@ -144,7 +157,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UserUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/UserUpdateRequest.java index 7309e3cfe04..6beb926c596 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UserUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/UserUpdateRequest.java @@ -6,19 +6,40 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; -/** Update a user. */ -@JsonPropertyOrder({UserUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") + +/** + *

Update a user.

+ */ +@JsonPropertyOrder({ + UserUpdateRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UserUpdateRequest { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private UserUpdateData data; @@ -26,11 +47,10 @@ public UserUpdateRequest() {} @JsonCreator public UserUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) UserUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; + @JsonProperty(required=true, value=JSON_PROPERTY_DATA)UserUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; } - public UserUpdateRequest data(UserUpdateData data) { this.data = data; this.unparsed |= data.unparsed; @@ -38,21 +58,22 @@ public UserUpdateRequest data(UserUpdateData data) { } /** - * Object to update a user. - * + *

Object to update a user.

* @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UserUpdateData getData() { - return data; - } - + **/ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.ALWAYS) + public UserUpdateData getData() { + return data; + } public void setData(UserUpdateData data) { this.data = data; } - /** Return true if this UserUpdateRequest object is equal to o. */ + /** + * Return true if this UserUpdateRequest object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -65,6 +86,7 @@ public boolean equals(Object o) { return Objects.equals(this.data, userUpdateRequest.data); } + @Override public int hashCode() { return Objects.hash(data); @@ -80,7 +102,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsersResponse.java b/src/main/java/com/datadog/api/client/v2/model/UsersResponse.java index 0c0cea882b2..82199e75ee3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsersResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsersResponse.java @@ -6,24 +6,42 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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.List; -import java.util.Objects; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; -/** Response containing information about multiple users. */ +import com.datadog.api.client.JsonTimeSerializer; + + +/** + *

Response containing information about multiple users.

+ */ @JsonPropertyOrder({ UsersResponse.JSON_PROPERTY_DATA, UsersResponse.JSON_PROPERTY_INCLUDED, UsersResponse.JSON_PROPERTY_META }) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@jakarta.annotation.Generated(value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsersResponse { - @JsonIgnore public boolean unparsed = false; + @JsonIgnore + public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; private List data = null; @@ -40,7 +58,6 @@ public UsersResponse data(List data) { } return this; } - public UsersResponse addDataItem(User dataItem) { if (this.data == null) { this.data = new ArrayList<>(); @@ -51,21 +68,19 @@ public UsersResponse addDataItem(User dataItem) { } /** - * Array of returned users. - * + *

Array of returned users.

* @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } public void setData(List data) { this.data = data; } - public UsersResponse included(List included) { this.included = included; for (UserResponseIncludedItem item : included) { @@ -73,7 +88,6 @@ public UsersResponse included(List included) { } return this; } - public UsersResponse addIncludedItem(UserResponseIncludedItem includedItem) { if (this.included == null) { this.included = new ArrayList<>(); @@ -84,21 +98,19 @@ public UsersResponse addIncludedItem(UserResponseIncludedItem includedItem) { } /** - * Array of objects related to the users. - * + *

Array of objects related to the users.

* @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - 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; } - public UsersResponse meta(ResponseMetaAttributes meta) { this.meta = meta; this.unparsed |= meta.unparsed; @@ -106,22 +118,23 @@ public UsersResponse meta(ResponseMetaAttributes meta) { } /** - * Object describing meta attributes of response. - * + *

Object describing meta attributes of response.

* @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ResponseMetaAttributes getMeta() { - return meta; - } - + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude( + value = JsonInclude.Include.USE_DEFAULTS) + public ResponseMetaAttributes getMeta() { + return meta; + } public void setMeta(ResponseMetaAttributes meta) { this.meta = meta; } - /** Return true if this UsersResponse object is equal to o. */ + /** + * Return true if this UsersResponse object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -131,14 +144,13 @@ public boolean equals(Object o) { return false; } UsersResponse usersResponse = (UsersResponse) o; - return Objects.equals(this.data, usersResponse.data) - && Objects.equals(this.included, usersResponse.included) - && Objects.equals(this.meta, usersResponse.meta); + return Objects.equals(this.data, usersResponse.data) && Objects.equals(this.included, usersResponse.included) && Objects.equals(this.meta, usersResponse.meta); } + @Override public int hashCode() { - return Objects.hash(data, included, meta); + return Objects.hash(data,included,meta); } @Override @@ -153,7 +165,8 @@ public String toString() { } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * 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) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UsersType.java b/src/main/java/com/datadog/api/client/v2/model/UsersType.java index 32219e3e254..3996b9e2b73 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UsersType.java +++ b/src/main/java/com/datadog/api/client/v2/model/UsersType.java @@ -6,20 +6,44 @@ package com.datadog.api.client.v2.model; +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.time.OffsetDateTime; + +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 com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.datadog.api.client.JsonTimeSerializer; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; 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.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Objects; + import java.util.Set; +import java.util.HashSet; -/** Users resource type. */ +/** + *

Users resource type.

+ */ @JsonSerialize(using = UsersType.UsersTypeSerializer.class) public class UsersType { @@ -38,19 +62,18 @@ public boolean isValid() { } public static class UsersTypeSerializer extends StdSerializer { - public UsersTypeSerializer(Class t) { - super(t); - } - - public UsersTypeSerializer() { - this(null); - } - - @Override - public void serialize(UsersType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } + public UsersTypeSerializer(Class t) { + super(t); + } + + public UsersTypeSerializer() { + this(null); + } + + @Override + public void serialize(UsersType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } } @JsonValue @@ -62,7 +85,9 @@ public void setValue(String value) { this.value = value; } - /** Return true if this UsersType object is equal to o. */ + /** + * Return true if this UsersType object is equal to o. + */ @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(value); + return Objects.hash(value); } @Override diff --git a/src/test/resources/cassettes/features/v2/Create_an_incident_integration_metadata_returns_CREATED_response.freeze b/src/test/resources/cassettes/features/v2/Create_an_incident_integration_metadata_returns_CREATED_response.freeze new file mode 100644 index 00000000000..b89bb1f43d8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_incident_integration_metadata_returns_CREATED_response.freeze @@ -0,0 +1 @@ +2023-02-24T19:27:59.533Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_incident_integration_metadata_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_an_incident_integration_metadata_returns_CREATED_response.json new file mode 100644 index 00000000000..0c73a2a57a1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_incident_integration_metadata_returns_CREATED_response.json @@ -0,0 +1,112 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Create_an_incident_integration_metadata_returns_CREATED_response-1677266879\"},\"type\":\"incidents\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/incidents", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incidents\",\"id\":\"abf796eb-6708-5e57-8662-c2db5e67bcfb\",\"attributes\":{\"public_id\":123328,\"title\":\"Test-Create_an_incident_integration_metadata_returns_CREATED_response-1677266879\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-02-24T19:28:00.054593+00:00\",\"modified\":\"2023-02-24T19:28:00.054593+00:00\",\"commander\":null,\"detected\":\"2023-02-24T19:28:00.048565+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c70b3675-6b20-9a52-905a-dbd21cc5b253" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"incident_id\":\"00000000-aaaa-0000-0000-000000000000\",\"integration_type\":1,\"metadata\":{\"channels\":[]}},\"type\":\"incident_integrations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/incidents/abf796eb-6708-5e57-8662-c2db5e67bcfb/relationships/integrations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"5af42f95-3c6b-59ab-9d36-c9cef1b94566\",\"attributes\":{\"created\":\"2023-02-24T19:28:00.534302+00:00\",\"modified\":\"2023-02-24T19:28:00.534302+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"abf796eb-6708-5e57-8662-c2db5e67bcfb\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d2dd434b-f691-2155-e740-e7d9a96d82db" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/abf796eb-6708-5e57-8662-c2db5e67bcfb/relationships/integrations/5af42f95-3c6b-59ab-9d36-c9cef1b94566", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": { + "Content-Type": [ + "text/html; charset=utf-8" + ] + }, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3e948ecc-4f1e-0458-c5b7-03868e5c8c10" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/abf796eb-6708-5e57-8662-c2db5e67bcfb", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": { + "Content-Type": [ + "text/html; charset=utf-8" + ] + }, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "24c44e50-415e-b80a-d3c1-c30e2c6fd2ee" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_incident_integration_metadata_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_incident_integration_metadata_returns_OK_response.freeze new file mode 100644 index 00000000000..56155f272fc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_an_incident_integration_metadata_returns_OK_response.freeze @@ -0,0 +1 @@ +2023-02-24T19:28:01.343Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_incident_integration_metadata_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_an_incident_integration_metadata_returns_OK_response.json new file mode 100644 index 00000000000..9e6523836ee --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_an_incident_integration_metadata_returns_OK_response.json @@ -0,0 +1,138 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Delete_an_incident_integration_metadata_returns_OK_response-1677266881\"},\"type\":\"incidents\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/incidents", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incidents\",\"id\":\"312a9af4-0bed-524e-9243-a9de9492506a\",\"attributes\":{\"public_id\":123329,\"title\":\"Test-Delete_an_incident_integration_metadata_returns_OK_response-1677266881\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-02-24T19:28:01.563619+00:00\",\"modified\":\"2023-02-24T19:28:01.563619+00:00\",\"commander\":null,\"detected\":\"2023-02-24T19:28:01.554591+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "eff4e522-b87c-8321-099f-dc7482ed4aea" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"incident_id\":\"312a9af4-0bed-524e-9243-a9de9492506a\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a/relationships/integrations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"74bd2fb0-e385-5564-85db-7d8de4966f36\",\"attributes\":{\"created\":\"2023-02-24T19:28:01.991274+00:00\",\"modified\":\"2023-02-24T19:28:01.991274+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"312a9af4-0bed-524e-9243-a9de9492506a\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c4acf7ca-5a82-0ed9-837b-a28c735488e7" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a/relationships/integrations/74bd2fb0-e385-5564-85db-7d8de4966f36", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": { + "Content-Type": [ + "text/html; charset=utf-8" + ] + }, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f708958b-fdd0-a2f5-ebf1-0a1b7d8a61bb" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a/relationships/integrations/74bd2fb0-e385-5564-85db-7d8de4966f36", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"74bd2fb0-e385-5564-85db-7d8de4966f36 not found\"]}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f708958b-fdd0-a2f5-ebf1-0a1b7d8a61bc" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": { + "Content-Type": [ + "text/html; charset=utf-8" + ] + }, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "87d2edee-e40f-bd7d-5fcd-1f6b7496bf49" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_incident_integration_metadata_details_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_incident_integration_metadata_details_returns_OK_response.freeze new file mode 100644 index 00000000000..5f7c73fad68 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_incident_integration_metadata_details_returns_OK_response.freeze @@ -0,0 +1 @@ +2023-02-24T19:28:03.052Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_incident_integration_metadata_details_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_incident_integration_metadata_details_returns_OK_response.json new file mode 100644 index 00000000000..83a8086ab01 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_incident_integration_metadata_details_returns_OK_response.json @@ -0,0 +1,138 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_incident_integration_metadata_details_returns_OK_response-1677266883\"},\"type\":\"incidents\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/incidents", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incidents\",\"id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"attributes\":{\"public_id\":123330,\"title\":\"Test-Get_incident_integration_metadata_details_returns_OK_response-1677266883\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-02-24T19:28:03.236100+00:00\",\"modified\":\"2023-02-24T19:28:03.236100+00:00\",\"commander\":null,\"detected\":\"2023-02-24T19:28:03.228113+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3a571986-f6ce-f962-c311-34861aa81d94" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"incident_id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9/relationships/integrations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"6e654fe0-d3db-56c9-937c-861a9f9ce19e\",\"attributes\":{\"created\":\"2023-02-24T19:28:03.731346+00:00\",\"modified\":\"2023-02-24T19:28:03.731346+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "24dbd185-b729-2453-c517-bf4ba8f40a5c" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9/relationships/integrations/6e654fe0-d3db-56c9-937c-861a9f9ce19e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"6e654fe0-d3db-56c9-937c-861a9f9ce19e\",\"attributes\":{\"created\":\"2023-02-24T19:28:03.731346+00:00\",\"modified\":\"2023-02-24T19:28:03.731346+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"team_id\":\"T01234567\",\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "671671fb-2a6f-48af-d786-dbd0676663cd" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9/relationships/integrations/6e654fe0-d3db-56c9-937c-861a9f9ce19e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": { + "Content-Type": [ + "text/html; charset=utf-8" + ] + }, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "47d9319d-416b-9478-ad3a-ec99b4415eb7" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": { + "Content-Type": [ + "text/html; charset=utf-8" + ] + }, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9055c481-e7de-4333-7866-4658511cdeff" + } +] \ No newline at end of file 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 a1507110282..17620e9575e 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 @@ -95,6 +95,22 @@ "tag": "Incidents", "operationId": "UpdateIncidentAttachments" }, + { + "parameters": [ + { + "name": "incident_id", + "source": "incident.data.id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"integration_type\": 1,\n \"incident_id\": \"{{ incident.data.id }}\",\n \"status\": 2,\n \"metadata\": {\n \"channels\": [\n {\n \"channel_id\": \"C0123456789\",\n \"team_id\": \"T01234567\",\n \"channel_name\": \"#example-channel-name\",\n \"redirect_url\": \"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\"\n }\n ]\n }\n },\n \"type\": \"incident_integrations\"\n }\n}" + } + ], + "step": "the \"incident\" has an \"incident_integration_metadata\"", + "key": "incident_integration_metadata", + "tag": "Incidents", + "operationId": "CreateIncidentIntegration" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature index f2026fd4ca5..5cc9ac24f2e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature @@ -29,6 +29,34 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 1 + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident integration metadata returns "Bad Request" response + Given operation "CreateIncidentIntegration" enabled + And new "CreateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/incident-app + Scenario: Create an incident integration metadata returns "CREATED" response + Given operation "CreateIncidentIntegration" enabled + And new "CreateIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident integration metadata returns "Not Found" response + Given operation "CreateIncidentIntegration" enabled + And new "CreateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app Scenario: Create an incident returns "Bad Request" response Given operation "CreateIncident" enabled @@ -107,6 +135,59 @@ Feature: Incidents When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident integration metadata returns "Bad Request" response + Given operation "DeleteIncidentIntegration" enabled + And new "DeleteIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident integration metadata returns "Not Found" response + Given operation "DeleteIncidentIntegration" enabled + And new "DeleteIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Delete an incident integration metadata returns "OK" response + Given operation "DeleteIncidentIntegration" enabled + And new "DeleteIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And the "incident" has an "incident_integration_metadata" + And request contains "integration_metadata_id" parameter from "incident_integration_metadata.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "Bad Request" response + Given operation "ListIncidentIntegrations" enabled + And new "ListIncidentIntegrations" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "Not Found" response + Given operation "ListIncidentIntegrations" enabled + And new "ListIncidentIntegrations" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "OK" response + Given operation "ListIncidentIntegrations" enabled + And new "ListIncidentIntegrations" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get a list of attachments returns "Bad Request" response Given operation "ListIncidentAttachments" enabled @@ -173,6 +254,35 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 1 + @generated @skip @team:DataDog/incident-app + Scenario: Get incident integration metadata details returns "Bad Request" response + Given operation "GetIncidentIntegration" enabled + And new "GetIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident integration metadata details returns "Not Found" response + Given operation "GetIncidentIntegration" enabled + And new "GetIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Get incident integration metadata details returns "OK" response + Given operation "GetIncidentIntegration" enabled + And new "GetIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And the "incident" has an "incident_integration_metadata" + And request contains "integration_metadata_id" parameter from "incident_integration_metadata.data.id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get the details of an incident returns "Bad Request" response Given operation "GetIncident" enabled @@ -235,6 +345,36 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident integration metadata returns "Bad Request" response + Given operation "UpdateIncidentIntegration" enabled + And new "UpdateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident integration metadata returns "CREATED" response + Given operation "UpdateIncidentIntegration" enabled + And new "UpdateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 CREATED + + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident integration metadata returns "Not Found" response + Given operation "UpdateIncidentIntegration" enabled + And new "UpdateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app Scenario: Update an existing incident returns "Bad Request" response Given operation "UpdateIncident" enabled 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 e4a5021518d..2ae185f7f21 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 @@ -273,6 +273,47 @@ "type": "idempotent" } }, + "ListIncidentIntegrations": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentIntegration": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentIntegration", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "integration_metadata_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteIncidentIntegration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentIntegration": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentIntegration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListOpsgenieServices": { "tag": "Opsgenie Integration", "undo": {